]> gitweb.factorcode.org Git - factor.git/commitdiff
Merge branch 'master' into experimental
authorAlex Chapman <chapman.alex@gmail.com>
Fri, 30 Jan 2009 10:20:28 +0000 (21:20 +1100)
committerAlex Chapman <chapman.alex@gmail.com>
Fri, 30 Jan 2009 10:20:28 +0000 (21:20 +1100)
Conflicts:
basis/http/client/client.factor

2529 files changed:
.gitignore
Factor.app/Contents/Info.plist
Makefile
basis/alias/alias-docs.factor [deleted file]
basis/alias/alias.factor [deleted file]
basis/alias/authors.txt [deleted file]
basis/alias/summary.txt [deleted file]
basis/alien/c-types/c-types-tests.factor
basis/alien/c-types/c-types.factor
basis/alien/remote-control/remote-control-tests.factor [new file with mode: 0644]
basis/alien/remote-control/remote-control.factor
basis/alien/strings/windows/tags.txt [new file with mode: 0644]
basis/alien/structs/fields/fields.factor
basis/alien/syntax/syntax.factor
basis/ascii/ascii-docs.factor
basis/ascii/ascii-tests.factor
basis/ascii/ascii.factor
basis/assoc-heaps/assoc-heaps-docs.factor [new file with mode: 0644]
basis/assoc-heaps/assoc-heaps-tests.factor [new file with mode: 0644]
basis/assoc-heaps/assoc-heaps.factor [new file with mode: 0644]
basis/assoc-heaps/authors.txt [new file with mode: 0644]
basis/base64/base64-docs.factor
basis/base64/base64-tests.factor
basis/base64/base64.factor
basis/base64/tags.txt [new file with mode: 0644]
basis/bit-arrays/bit-arrays-tests.factor
basis/bit-arrays/bit-arrays.factor
basis/bootstrap/compiler/compiler.factor
basis/bootstrap/finish-bootstrap.factor
basis/bootstrap/finish-staging.factor
basis/bootstrap/help/help.factor
basis/bootstrap/image/image-docs.factor
basis/bootstrap/image/image.factor
basis/bootstrap/image/upload/upload.factor
basis/bootstrap/io/io.factor
basis/bootstrap/math/math.factor
basis/bootstrap/stage2.factor
basis/bootstrap/threads/threads.factor
basis/bootstrap/unicode/unicode.factor
basis/cairo/authors.txt [new file with mode: 0644]
basis/cairo/cairo.factor [new file with mode: 0755]
basis/cairo/ffi/ffi.factor [new file with mode: 0644]
basis/cairo/gadgets/gadgets.factor [new file with mode: 0644]
basis/cairo/summary.txt [new file with mode: 0644]
basis/cairo/tags.txt [new file with mode: 0644]
basis/calendar/calendar.factor
basis/channels/remote/remote-docs.factor
basis/checksums/common/common.factor
basis/checksums/md5/md5.factor
basis/checksums/openssl/openssl-docs.factor
basis/checksums/sha1/sha1.factor
basis/checksums/sha2/sha2.factor
basis/cocoa/application/application-docs.factor
basis/cocoa/application/application.factor
basis/cocoa/views/views-docs.factor
basis/cocoa/windows/windows.factor
basis/columns/columns-docs.factor
basis/columns/columns.factor
basis/combinators/smart/authors.txt [new file with mode: 0644]
basis/combinators/smart/smart-docs.factor [new file with mode: 0644]
basis/combinators/smart/smart-tests.factor [new file with mode: 0644]
basis/combinators/smart/smart.factor [new file with mode: 0644]
basis/command-line/command-line.factor
basis/compiler/cfg/alias-analysis/alias-analysis-tests.factor
basis/compiler/cfg/alias-analysis/alias-analysis.factor
basis/compiler/cfg/builder/builder-tests.factor
basis/compiler/cfg/hats/hats.factor
basis/compiler/cfg/instructions/instructions.factor
basis/compiler/cfg/instructions/syntax/syntax.factor
basis/compiler/cfg/intrinsics/intrinsics.factor
basis/compiler/cfg/linear-scan/linear-scan-tests.factor
basis/compiler/cfg/linearization/linearization.factor
basis/compiler/cfg/value-numbering/expressions/expressions.factor
basis/compiler/cfg/value-numbering/value-numbering-tests.factor
basis/compiler/codegen/codegen.factor
basis/compiler/compiler.factor
basis/compiler/tests/codegen.factor
basis/compiler/tests/curry.factor
basis/compiler/tests/optimizer.factor
basis/compiler/tests/peg-regression.factor
basis/compiler/tests/redefine1.factor
basis/compiler/tests/redefine3.factor
basis/compiler/tests/simple.factor
basis/compiler/tests/spilling.factor
basis/compiler/tree/checker/checker.factor
basis/compiler/tree/dead-code/dead-code-tests.factor
basis/compiler/tree/debugger/debugger.factor
basis/compiler/tree/escape-analysis/branches/branches.factor
basis/compiler/tree/modular-arithmetic/modular-arithmetic-tests.factor
basis/compiler/tree/propagation/copy/copy.factor
basis/compiler/tree/propagation/inlining/inlining.factor
basis/compiler/tree/propagation/known-words/known-words.factor
basis/compiler/tree/propagation/propagation-tests.factor
basis/compiler/utilities/utilities.factor
basis/concurrency/combinators/combinators.factor [changed mode: 0644->0755]
basis/concurrency/distributed/distributed-tests.factor
basis/concurrency/distributed/distributed.factor
basis/concurrency/messaging/messaging-docs.factor
basis/concurrency/messaging/messaging.factor
basis/cords/authors.txt [new file with mode: 0644]
basis/cords/cords-tests.factor [new file with mode: 0644]
basis/cords/cords.factor [new file with mode: 0644]
basis/cords/summary.txt [new file with mode: 0644]
basis/cords/tags.txt [new file with mode: 0644]
basis/core-foundation/core-foundation.factor
basis/core-foundation/data/data.factor
basis/core-foundation/fsevents/fsevents.factor
basis/core-foundation/run-loop/run-loop.factor
basis/core-foundation/strings/strings.factor
basis/core-foundation/time/time.factor [new file with mode: 0644]
basis/core-foundation/timers/timers.factor
basis/cpu/architecture/architecture.factor
basis/cpu/ppc/assembler/assembler.factor
basis/cpu/ppc/assembler/backend/backend.factor
basis/cpu/ppc/bootstrap.factor
basis/cpu/ppc/ppc.factor
basis/cpu/x86/32/32.factor
basis/cpu/x86/64/64.factor
basis/cpu/x86/assembler/syntax/syntax.factor
basis/cpu/x86/bootstrap.factor
basis/cpu/x86/x86.factor
basis/csv/csv.factor
basis/db/db-docs.factor
basis/db/db.factor
basis/db/pools/pools-tests.factor
basis/db/pools/pools.factor
basis/db/postgresql/lib/lib.factor
basis/db/postgresql/postgresql-tests.factor
basis/db/postgresql/postgresql.factor
basis/db/queries/queries.factor
basis/db/sqlite/lib/lib.factor
basis/db/sqlite/sqlite-tests.factor
basis/db/sqlite/sqlite.factor
basis/db/tester/authors.txt [new file with mode: 0644]
basis/db/tester/tester-tests.factor [new file with mode: 0644]
basis/db/tester/tester.factor [new file with mode: 0644]
basis/db/tuples/tuples-docs.factor
basis/db/tuples/tuples-tests.factor
basis/db/tuples/tuples.factor
basis/db/types/types-docs.factor
basis/db/types/types.factor
basis/debugger/debugger.factor
basis/delegate/delegate-tests.factor
basis/delegate/delegate.factor
basis/delegate/protocols/protocols.factor
basis/deques/deques.factor
basis/disjoint-sets/disjoint-sets.factor
basis/dlists/dlists.factor
basis/documents/documents.factor
basis/editors/editors.factor
basis/editors/editpadlite/editpadlite.factor
basis/editors/editpadpro/editpadpro.factor
basis/editors/editplus/editplus.factor
basis/editors/emeditor/emeditor.factor
basis/editors/etexteditor/etexteditor.factor
basis/editors/gvim/gvim.factor
basis/editors/gvim/unix/unix.factor
basis/editors/gvim/windows/windows.factor
basis/editors/jedit/jedit.factor
basis/editors/notepad/authors.txt [new file with mode: 0755]
basis/editors/notepad/notepad.factor [new file with mode: 0755]
basis/editors/notepad2/notepad2.factor
basis/editors/notepadpp/notepadpp.factor
basis/editors/scite/scite.factor
basis/editors/ted-notepad/ted-notepad.factor
basis/editors/textpad/authors.txt [new file with mode: 0644]
basis/editors/textpad/summary.txt [new file with mode: 0644]
basis/editors/textpad/tags.txt [new file with mode: 0644]
basis/editors/textpad/textpad.factor [new file with mode: 0644]
basis/editors/ultraedit/ultraedit.factor
basis/editors/vim/generate-syntax/generate-syntax.factor
basis/editors/vim/vim-docs.factor
basis/editors/wordpad/wordpad.factor
basis/eval/eval-docs.factor
basis/eval/eval-tests.factor [new file with mode: 0644]
basis/eval/eval.factor
basis/farkup/farkup-docs.factor
basis/farkup/farkup-tests.factor
basis/farkup/farkup.factor
basis/formatting/authors.txt [new file with mode: 0644]
basis/formatting/formatting-docs.factor [new file with mode: 0644]
basis/formatting/formatting-tests.factor [new file with mode: 0644]
basis/formatting/formatting.factor [new file with mode: 0644]
basis/formatting/summary.txt [new file with mode: 0644]
basis/fry/fry-docs.factor
basis/fry/fry-tests.factor
basis/fry/fry.factor
basis/ftp/client/client.factor
basis/ftp/client/listing-parser/listing-parser.factor
basis/ftp/server/server.factor
basis/functors/functors-tests.factor
basis/functors/functors.factor
basis/furnace/alloy/alloy-docs.factor
basis/furnace/auth/auth-docs.factor
basis/furnace/auth/features/recover-password/recover-password.factor
basis/furnace/auth/providers/db/db-tests.factor
basis/furnace/chloe-tags/chloe-tags.factor
basis/furnace/conversations/conversations-docs.factor
basis/furnace/db/db-docs.factor
basis/furnace/db/db.factor
basis/furnace/redirection/redirection-docs.factor
basis/furnace/sessions/sessions-docs.factor
basis/furnace/sessions/sessions-tests.factor
basis/furnace/syndication/syndication-docs.factor
basis/furnace/utilities/utilities.factor
basis/generalizations/generalizations-docs.factor
basis/generalizations/generalizations-tests.factor
basis/generalizations/generalizations.factor
basis/grouping/grouping-docs.factor
basis/grouping/grouping-tests.factor
basis/grouping/grouping.factor
basis/heaps/heaps-tests.factor
basis/heaps/heaps.factor
basis/help/cookbook/cookbook.factor
basis/help/handbook/handbook.factor
basis/help/help-docs.factor
basis/help/help-tests.factor
basis/help/help.factor
basis/help/html/html.factor
basis/help/lint/lint.factor
basis/help/markup/markup-tests.factor
basis/help/markup/markup.factor
basis/help/syntax/syntax.factor
basis/help/tutorial/tutorial.factor
basis/hints/hints.factor
basis/html/components/components-docs.factor
basis/html/components/components-tests.factor
basis/html/components/components.factor
basis/html/elements/elements-docs.factor
basis/html/elements/elements.factor
basis/html/templates/chloe/chloe-docs.factor
basis/html/templates/chloe/chloe-tests.factor
basis/html/templates/chloe/chloe.factor
basis/html/templates/chloe/compiler/compiler.factor
basis/html/templates/chloe/syntax/syntax.factor
basis/html/templates/chloe/test/test13.xml [new file with mode: 0644]
basis/html/templates/fhtml/fhtml-docs.factor
basis/html/templates/fhtml/fhtml.factor
basis/http/client/client-docs.factor
basis/http/client/client.factor
basis/http/client/post-data/authors.txt [new file with mode: 0644]
basis/http/client/post-data/post-data-tests.factor [new file with mode: 0644]
basis/http/client/post-data/post-data.factor [new file with mode: 0644]
basis/http/http-docs.factor
basis/http/http-tests.factor
basis/http/http.factor [changed mode: 0644->0755]
basis/http/server/cgi/cgi.factor
basis/http/server/dispatchers/dispatchers-docs.factor
basis/http/server/server-docs.factor
basis/http/server/server.factor [changed mode: 0644->0755]
basis/http/server/static/static.factor
basis/inspector/inspector.factor
basis/interpolate/interpolate.factor
basis/interval-maps/interval-maps-docs.factor
basis/interval-maps/interval-maps.factor
basis/io/backend/unix/authors.txt [new file with mode: 0644]
basis/io/backend/unix/bsd/authors.txt [new file with mode: 0755]
basis/io/backend/unix/bsd/bsd.factor [new file with mode: 0644]
basis/io/backend/unix/bsd/tags.txt [new file with mode: 0644]
basis/io/backend/unix/freebsd/freebsd.factor [new file with mode: 0644]
basis/io/backend/unix/freebsd/tags.txt [new file with mode: 0644]
basis/io/backend/unix/linux/authors.txt [new file with mode: 0755]
basis/io/backend/unix/linux/linux.factor [new file with mode: 0644]
basis/io/backend/unix/linux/tags.txt [new file with mode: 0644]
basis/io/backend/unix/macosx/macosx.factor [new file with mode: 0644]
basis/io/backend/unix/macosx/tags.txt [new file with mode: 0644]
basis/io/backend/unix/multiplexers/epoll/authors.txt [new file with mode: 0755]
basis/io/backend/unix/multiplexers/epoll/epoll.factor [new file with mode: 0644]
basis/io/backend/unix/multiplexers/epoll/tags.txt [new file with mode: 0644]
basis/io/backend/unix/multiplexers/kqueue/authors.txt [new file with mode: 0755]
basis/io/backend/unix/multiplexers/kqueue/kqueue.factor [new file with mode: 0644]
basis/io/backend/unix/multiplexers/kqueue/tags.txt [new file with mode: 0644]
basis/io/backend/unix/multiplexers/multiplexers.factor [new file with mode: 0644]
basis/io/backend/unix/multiplexers/run-loop/run-loop.factor [new file with mode: 0644]
basis/io/backend/unix/multiplexers/run-loop/tags.txt [new file with mode: 0644]
basis/io/backend/unix/multiplexers/select/authors.txt [new file with mode: 0755]
basis/io/backend/unix/multiplexers/select/select.factor [new file with mode: 0644]
basis/io/backend/unix/multiplexers/select/tags.txt [new file with mode: 0644]
basis/io/backend/unix/netbsd/netbsd.factor [new file with mode: 0644]
basis/io/backend/unix/netbsd/tags.txt [new file with mode: 0644]
basis/io/backend/unix/openbsd/openbsd.factor [new file with mode: 0644]
basis/io/backend/unix/openbsd/tags.txt [new file with mode: 0644]
basis/io/backend/unix/summary.txt [new file with mode: 0644]
basis/io/backend/unix/tags.txt [new file with mode: 0644]
basis/io/backend/unix/unix-tests.factor [new file with mode: 0644]
basis/io/backend/unix/unix.factor [new file with mode: 0644]
basis/io/backend/windows/authors.txt [new file with mode: 0644]
basis/io/backend/windows/nt/authors.txt [new file with mode: 0755]
basis/io/backend/windows/nt/nt.factor [new file with mode: 0755]
basis/io/backend/windows/nt/privileges/privileges.factor [new file with mode: 0755]
basis/io/backend/windows/nt/privileges/tags.txt [new file with mode: 0644]
basis/io/backend/windows/nt/tags.txt [new file with mode: 0644]
basis/io/backend/windows/privileges/privileges.factor [new file with mode: 0644]
basis/io/backend/windows/privileges/tags.txt [new file with mode: 0644]
basis/io/backend/windows/summary.txt [new file with mode: 0644]
basis/io/backend/windows/tags.txt [new file with mode: 0755]
basis/io/backend/windows/windows.factor [new file with mode: 0755]
basis/io/crlf/authors.txt [new file with mode: 0644]
basis/io/crlf/crlf-docs.factor [new file with mode: 0644]
basis/io/crlf/crlf.factor [new file with mode: 0644]
basis/io/crlf/summary.txt [new file with mode: 0644]
basis/io/directories/authors.txt [new file with mode: 0644]
basis/io/directories/directories-docs.factor [new file with mode: 0644]
basis/io/directories/directories-tests.factor [new file with mode: 0644]
basis/io/directories/directories.factor [new file with mode: 0755]
basis/io/directories/hierarchy/authors.txt [new file with mode: 0644]
basis/io/directories/hierarchy/hierarchy-docs.factor [new file with mode: 0644]
basis/io/directories/hierarchy/hierarchy.factor [new file with mode: 0644]
basis/io/directories/hierarchy/summary.txt [new file with mode: 0644]
basis/io/directories/search/authors.txt [new file with mode: 0755]
basis/io/directories/search/search-docs.factor [new file with mode: 0644]
basis/io/directories/search/search-tests.factor [new file with mode: 0644]
basis/io/directories/search/search.factor [new file with mode: 0755]
basis/io/directories/search/windows/authors.txt [new file with mode: 0644]
basis/io/directories/search/windows/tags.txt [new file with mode: 0644]
basis/io/directories/search/windows/windows.factor [new file with mode: 0644]
basis/io/directories/summary.txt [new file with mode: 0644]
basis/io/directories/unix/tags.txt [new file with mode: 0644]
basis/io/directories/unix/unix.factor [new file with mode: 0644]
basis/io/directories/windows/tags.txt [new file with mode: 0644]
basis/io/directories/windows/windows.factor [new file with mode: 0755]
basis/io/encodings/8-bit/8-bit-docs.factor
basis/io/encodings/8-bit/8-bit.factor
basis/io/encodings/ascii/ascii.factor
basis/io/encodings/binary/authors.txt [new file with mode: 0644]
basis/io/encodings/binary/binary-docs.factor [new file with mode: 0644]
basis/io/encodings/binary/binary.factor [new file with mode: 0644]
basis/io/encodings/binary/summary.txt [new file with mode: 0644]
basis/io/encodings/binary/tags.txt [new file with mode: 0644]
basis/io/files/info/authors.txt [new file with mode: 0644]
basis/io/files/info/info-docs.factor [new file with mode: 0644]
basis/io/files/info/info-tests.factor [new file with mode: 0644]
basis/io/files/info/info.factor [new file with mode: 0644]
basis/io/files/info/summary.txt [new file with mode: 0644]
basis/io/files/info/unix/bsd/bsd.factor [new file with mode: 0644]
basis/io/files/info/unix/bsd/tags.txt [new file with mode: 0644]
basis/io/files/info/unix/freebsd/freebsd.factor [new file with mode: 0644]
basis/io/files/info/unix/freebsd/tags.txt [new file with mode: 0644]
basis/io/files/info/unix/linux/linux.factor [new file with mode: 0644]
basis/io/files/info/unix/linux/tags.txt [new file with mode: 0644]
basis/io/files/info/unix/macosx/macosx.factor [new file with mode: 0644]
basis/io/files/info/unix/macosx/tags.txt [new file with mode: 0644]
basis/io/files/info/unix/netbsd/netbsd.factor [new file with mode: 0644]
basis/io/files/info/unix/netbsd/tags.txt [new file with mode: 0644]
basis/io/files/info/unix/openbsd/openbsd.factor [new file with mode: 0644]
basis/io/files/info/unix/openbsd/tags.txt [new file with mode: 0644]
basis/io/files/info/unix/tags.txt [new file with mode: 0644]
basis/io/files/info/unix/unix-docs.factor [new file with mode: 0644]
basis/io/files/info/unix/unix.factor [new file with mode: 0644]
basis/io/files/info/windows/tags.txt [new file with mode: 0644]
basis/io/files/info/windows/windows.factor [new file with mode: 0755]
basis/io/files/links/authors.txt [new file with mode: 0644]
basis/io/files/links/links-docs.factor [new file with mode: 0644]
basis/io/files/links/links.factor [new file with mode: 0644]
basis/io/files/links/summary.txt [new file with mode: 0644]
basis/io/files/links/unix/tags.txt [new file with mode: 0644]
basis/io/files/links/unix/unix-tests.factor [new file with mode: 0644]
basis/io/files/links/unix/unix.factor [new file with mode: 0644]
basis/io/files/temp/temp-docs.factor [new file with mode: 0644]
basis/io/files/temp/temp.factor [new file with mode: 0644]
basis/io/files/types/types-docs.factor [new file with mode: 0644]
basis/io/files/types/types.factor [new file with mode: 0644]
basis/io/files/unique/unique-docs.factor
basis/io/files/unique/unique-tests.factor
basis/io/files/unique/unique.factor
basis/io/files/unique/unix/tags.txt [new file with mode: 0644]
basis/io/files/unique/unix/unix.factor [new file with mode: 0644]
basis/io/files/unique/windows/tags.txt [new file with mode: 0644]
basis/io/files/unique/windows/windows.factor [new file with mode: 0644]
basis/io/files/unix/authors.txt [new file with mode: 0644]
basis/io/files/unix/summary.txt [new file with mode: 0644]
basis/io/files/unix/tags.txt [new file with mode: 0644]
basis/io/files/unix/unix-tests.factor [new file with mode: 0644]
basis/io/files/unix/unix.factor [new file with mode: 0644]
basis/io/files/windows/nt/authors.txt [new file with mode: 0755]
basis/io/files/windows/nt/nt-tests.factor [new file with mode: 0644]
basis/io/files/windows/nt/nt.factor [new file with mode: 0755]
basis/io/files/windows/nt/tags.txt [new file with mode: 0644]
basis/io/files/windows/tags.txt [new file with mode: 0644]
basis/io/files/windows/windows.factor [new file with mode: 0755]
basis/io/launcher/launcher.factor [changed mode: 0644->0755]
basis/io/launcher/unix/authors.txt [new file with mode: 0755]
basis/io/launcher/unix/parser/parser-tests.factor [new file with mode: 0644]
basis/io/launcher/unix/parser/parser.factor [new file with mode: 0644]
basis/io/launcher/unix/parser/tags.txt [new file with mode: 0644]
basis/io/launcher/unix/tags.txt [new file with mode: 0644]
basis/io/launcher/unix/unix-tests.factor [new file with mode: 0644]
basis/io/launcher/unix/unix.factor [new file with mode: 0644]
basis/io/launcher/windows/authors.txt [new file with mode: 0755]
basis/io/launcher/windows/nt/authors.txt [new file with mode: 0755]
basis/io/launcher/windows/nt/nt-tests.factor [new file with mode: 0644]
basis/io/launcher/windows/nt/nt.factor [new file with mode: 0755]
basis/io/launcher/windows/nt/tags.txt [new file with mode: 0644]
basis/io/launcher/windows/nt/test/append.factor [new file with mode: 0644]
basis/io/launcher/windows/nt/test/env.factor [new file with mode: 0644]
basis/io/launcher/windows/nt/test/stderr.factor [new file with mode: 0644]
basis/io/launcher/windows/tags.txt [new file with mode: 0644]
basis/io/launcher/windows/windows-tests.factor [new file with mode: 0644]
basis/io/launcher/windows/windows.factor [new file with mode: 0755]
basis/io/mmap/functor/functor.factor
basis/io/mmap/mmap-docs.factor
basis/io/mmap/mmap-tests.factor
basis/io/mmap/mmap.factor
basis/io/mmap/unix/authors.txt [new file with mode: 0755]
basis/io/mmap/unix/tags.txt [new file with mode: 0644]
basis/io/mmap/unix/unix.factor [new file with mode: 0644]
basis/io/mmap/windows/authors.txt [new file with mode: 0755]
basis/io/mmap/windows/tags.txt [new file with mode: 0644]
basis/io/mmap/windows/windows.factor [new file with mode: 0644]
basis/io/monitors/linux/linux-tests.factor [new file with mode: 0644]
basis/io/monitors/linux/linux.factor [new file with mode: 0644]
basis/io/monitors/linux/tags.txt [new file with mode: 0644]
basis/io/monitors/macosx/macosx.factor [new file with mode: 0644]
basis/io/monitors/macosx/tags.txt [new file with mode: 0644]
basis/io/monitors/monitors-docs.factor
basis/io/monitors/monitors-tests.factor
basis/io/monitors/monitors.factor
basis/io/monitors/recursive/recursive-tests.factor
basis/io/monitors/recursive/recursive.factor
basis/io/monitors/windows/nt/authors.txt [new file with mode: 0755]
basis/io/monitors/windows/nt/nt-tests.factor [new file with mode: 0644]
basis/io/monitors/windows/nt/nt.factor [new file with mode: 0755]
basis/io/monitors/windows/nt/tags.txt [new file with mode: 0644]
basis/io/paths/authors.txt [deleted file]
basis/io/paths/paths-tests.factor [deleted file]
basis/io/paths/paths.factor [deleted file]
basis/io/paths/windows/authors.txt [deleted file]
basis/io/paths/windows/tags.txt [deleted file]
basis/io/paths/windows/windows.factor [deleted file]
basis/io/pipes/pipes-docs.factor
basis/io/pipes/pipes.factor
basis/io/pipes/unix/pipes-tests.factor [new file with mode: 0644]
basis/io/pipes/unix/tags.txt [new file with mode: 0644]
basis/io/pipes/unix/unix.factor [new file with mode: 0644]
basis/io/pipes/windows/nt/authors.txt [new file with mode: 0755]
basis/io/pipes/windows/nt/nt.factor [new file with mode: 0644]
basis/io/pipes/windows/nt/tags.txt [new file with mode: 0644]
basis/io/ports/ports.factor
basis/io/sockets/secure/openssl/openssl.factor
basis/io/sockets/secure/secure-docs.factor
basis/io/sockets/secure/secure.factor
basis/io/sockets/secure/unix/debug/debug.factor [new file with mode: 0644]
basis/io/sockets/secure/unix/tags.txt [new file with mode: 0644]
basis/io/sockets/secure/unix/unix-tests.factor [new file with mode: 0644]
basis/io/sockets/secure/unix/unix.factor [new file with mode: 0644]
basis/io/sockets/sockets-docs.factor
basis/io/sockets/sockets-tests.factor
basis/io/sockets/sockets.factor
basis/io/sockets/unix/authors.txt [new file with mode: 0644]
basis/io/sockets/unix/summary.txt [new file with mode: 0644]
basis/io/sockets/unix/tags.txt [new file with mode: 0644]
basis/io/sockets/unix/unix.factor [new file with mode: 0644]
basis/io/sockets/windows/nt/authors.txt [new file with mode: 0755]
basis/io/sockets/windows/nt/nt.factor [new file with mode: 0644]
basis/io/sockets/windows/nt/tags.txt [new file with mode: 0644]
basis/io/sockets/windows/tags.txt [new file with mode: 0644]
basis/io/sockets/windows/windows.factor [new file with mode: 0644]
basis/io/streams/duplex/duplex-docs.factor
basis/io/streams/limited/limited-docs.factor [new file with mode: 0755]
basis/io/streams/limited/limited-tests.factor
basis/io/streams/limited/limited.factor [changed mode: 0644->0755]
basis/io/streams/null/authors.txt [deleted file]
basis/io/streams/null/null.factor [deleted file]
basis/io/styles/styles-docs.factor
basis/io/styles/styles-tests.factor [new file with mode: 0644]
basis/io/styles/styles.factor
basis/io/thread/thread.factor
basis/io/timeouts/timeouts.factor [changed mode: 0644->0755]
basis/io/unix/authors.txt [deleted file]
basis/io/unix/backend/authors.txt [deleted file]
basis/io/unix/backend/backend.factor [deleted file]
basis/io/unix/backend/summary.txt [deleted file]
basis/io/unix/backend/tags.txt [deleted file]
basis/io/unix/bsd/authors.txt [deleted file]
basis/io/unix/bsd/bsd.factor [deleted file]
basis/io/unix/bsd/tags.txt [deleted file]
basis/io/unix/epoll/authors.txt [deleted file]
basis/io/unix/epoll/epoll.factor [deleted file]
basis/io/unix/epoll/tags.txt [deleted file]
basis/io/unix/files/authors.txt [deleted file]
basis/io/unix/files/bsd/bsd.factor [deleted file]
basis/io/unix/files/bsd/tags.txt [deleted file]
basis/io/unix/files/files-docs.factor [deleted file]
basis/io/unix/files/files-tests.factor [deleted file]
basis/io/unix/files/files.factor [deleted file]
basis/io/unix/files/freebsd/freebsd.factor [deleted file]
basis/io/unix/files/freebsd/tags.txt [deleted file]
basis/io/unix/files/linux/linux.factor [deleted file]
basis/io/unix/files/linux/tags.txt [deleted file]
basis/io/unix/files/macosx/macosx.factor [deleted file]
basis/io/unix/files/macosx/tags.txt [deleted file]
basis/io/unix/files/netbsd/netbsd.factor [deleted file]
basis/io/unix/files/netbsd/tags.txt [deleted file]
basis/io/unix/files/openbsd/openbsd.factor [deleted file]
basis/io/unix/files/openbsd/tags.txt [deleted file]
basis/io/unix/files/summary.txt [deleted file]
basis/io/unix/files/tags.txt [deleted file]
basis/io/unix/files/unique/tags.txt [deleted file]
basis/io/unix/files/unique/unique.factor [deleted file]
basis/io/unix/freebsd/freebsd.factor [deleted file]
basis/io/unix/freebsd/tags.txt [deleted file]
basis/io/unix/kqueue/authors.txt [deleted file]
basis/io/unix/kqueue/kqueue.factor [deleted file]
basis/io/unix/kqueue/tags.txt [deleted file]
basis/io/unix/launcher/authors.txt [deleted file]
basis/io/unix/launcher/launcher-tests.factor [deleted file]
basis/io/unix/launcher/launcher.factor [deleted file]
basis/io/unix/launcher/parser/parser-tests.factor [deleted file]
basis/io/unix/launcher/parser/parser.factor [deleted file]
basis/io/unix/launcher/parser/tags.txt [deleted file]
basis/io/unix/launcher/tags.txt [deleted file]
basis/io/unix/linux/authors.txt [deleted file]
basis/io/unix/linux/linux.factor [deleted file]
basis/io/unix/linux/monitors/monitors-tests.factor [deleted file]
basis/io/unix/linux/monitors/monitors.factor [deleted file]
basis/io/unix/linux/monitors/tags.txt [deleted file]
basis/io/unix/linux/tags.txt [deleted file]
basis/io/unix/macosx/macosx.factor [deleted file]
basis/io/unix/macosx/monitors/monitors.factor [deleted file]
basis/io/unix/macosx/monitors/tags.txt [deleted file]
basis/io/unix/macosx/tags.txt [deleted file]
basis/io/unix/mmap/authors.txt [deleted file]
basis/io/unix/mmap/mmap.factor [deleted file]
basis/io/unix/mmap/tags.txt [deleted file]
basis/io/unix/multiplexers/epoll/authors.txt [deleted file]
basis/io/unix/multiplexers/epoll/epoll.factor [deleted file]
basis/io/unix/multiplexers/epoll/tags.txt [deleted file]
basis/io/unix/multiplexers/kqueue/authors.txt [deleted file]
basis/io/unix/multiplexers/kqueue/kqueue.factor [deleted file]
basis/io/unix/multiplexers/kqueue/tags.txt [deleted file]
basis/io/unix/multiplexers/multiplexers.factor [deleted file]
basis/io/unix/multiplexers/run-loop/run-loop-tests.factor [deleted file]
basis/io/unix/multiplexers/run-loop/run-loop.factor [deleted file]
basis/io/unix/multiplexers/run-loop/tags.txt [deleted file]
basis/io/unix/multiplexers/select/authors.txt [deleted file]
basis/io/unix/multiplexers/select/select.factor [deleted file]
basis/io/unix/multiplexers/select/tags.txt [deleted file]
basis/io/unix/netbsd/netbsd.factor [deleted file]
basis/io/unix/netbsd/tags.txt [deleted file]
basis/io/unix/openbsd/openbsd.factor [deleted file]
basis/io/unix/openbsd/tags.txt [deleted file]
basis/io/unix/pipes/pipes-tests.factor [deleted file]
basis/io/unix/pipes/pipes.factor [deleted file]
basis/io/unix/pipes/tags.txt [deleted file]
basis/io/unix/select/authors.txt [deleted file]
basis/io/unix/select/select.factor [deleted file]
basis/io/unix/select/tags.txt [deleted file]
basis/io/unix/sockets/authors.txt [deleted file]
basis/io/unix/sockets/secure/debug/debug.factor [deleted file]
basis/io/unix/sockets/secure/secure-tests.factor [deleted file]
basis/io/unix/sockets/secure/secure.factor [deleted file]
basis/io/unix/sockets/secure/tags.txt [deleted file]
basis/io/unix/sockets/sockets.factor [deleted file]
basis/io/unix/sockets/summary.txt [deleted file]
basis/io/unix/sockets/tags.txt [deleted file]
basis/io/unix/summary.txt [deleted file]
basis/io/unix/tags.txt [deleted file]
basis/io/unix/unix-tests.factor [deleted file]
basis/io/unix/unix.factor [deleted file]
basis/io/windows/authors.txt [deleted file]
basis/io/windows/files/files.factor [deleted file]
basis/io/windows/files/tags.txt [deleted file]
basis/io/windows/files/unique/tags.txt [deleted file]
basis/io/windows/files/unique/unique.factor [deleted file]
basis/io/windows/launcher/authors.txt [deleted file]
basis/io/windows/launcher/launcher-tests.factor [deleted file]
basis/io/windows/launcher/launcher.factor [deleted file]
basis/io/windows/launcher/tags.txt [deleted file]
basis/io/windows/mmap/authors.txt [deleted file]
basis/io/windows/mmap/mmap.factor [deleted file]
basis/io/windows/mmap/tags.txt [deleted file]
basis/io/windows/nt/authors.txt [deleted file]
basis/io/windows/nt/backend/authors.txt [deleted file]
basis/io/windows/nt/backend/backend.factor [deleted file]
basis/io/windows/nt/backend/tags.txt [deleted file]
basis/io/windows/nt/files/authors.txt [deleted file]
basis/io/windows/nt/files/files-tests.factor [deleted file]
basis/io/windows/nt/files/files.factor [deleted file]
basis/io/windows/nt/files/tags.txt [deleted file]
basis/io/windows/nt/launcher/authors.txt [deleted file]
basis/io/windows/nt/launcher/launcher-tests.factor [deleted file]
basis/io/windows/nt/launcher/launcher.factor [deleted file]
basis/io/windows/nt/launcher/tags.txt [deleted file]
basis/io/windows/nt/launcher/test/append.factor [deleted file]
basis/io/windows/nt/launcher/test/env.factor [deleted file]
basis/io/windows/nt/launcher/test/stderr.factor [deleted file]
basis/io/windows/nt/monitors/authors.txt [deleted file]
basis/io/windows/nt/monitors/monitors-tests.factor [deleted file]
basis/io/windows/nt/monitors/monitors.factor [deleted file]
basis/io/windows/nt/monitors/tags.txt [deleted file]
basis/io/windows/nt/nt.factor [deleted file]
basis/io/windows/nt/pipes/authors.txt [deleted file]
basis/io/windows/nt/pipes/pipes.factor [deleted file]
basis/io/windows/nt/pipes/tags.txt [deleted file]
basis/io/windows/nt/privileges/privileges.factor [deleted file]
basis/io/windows/nt/privileges/tags.txt [deleted file]
basis/io/windows/nt/sockets/authors.txt [deleted file]
basis/io/windows/nt/sockets/sockets.factor [deleted file]
basis/io/windows/nt/sockets/tags.txt [deleted file]
basis/io/windows/nt/summary.txt [deleted file]
basis/io/windows/nt/tags.txt [deleted file]
basis/io/windows/privileges/privileges.factor [deleted file]
basis/io/windows/privileges/tags.txt [deleted file]
basis/io/windows/sockets/sockets.factor [deleted file]
basis/io/windows/sockets/tags.txt [deleted file]
basis/io/windows/summary.txt [deleted file]
basis/io/windows/tags.txt [deleted file]
basis/io/windows/windows.factor [deleted file]
basis/lcs/diff2html/diff2html-tests.factor [new file with mode: 0644]
basis/lcs/diff2html/diff2html.factor
basis/lcs/lcs.factor
basis/listener/listener-tests.factor
basis/listener/listener.factor
basis/locals/backend/backend.factor
basis/locals/locals-docs.factor
basis/locals/locals-tests.factor
basis/locals/parser/parser.factor
basis/locals/rewrite/point-free/point-free.factor
basis/locals/rewrite/sugar/sugar.factor
basis/locals/types/types.factor
basis/logging/insomniac/insomniac.factor
basis/logging/logging.factor
basis/logging/parser/parser-docs.factor
basis/logging/server/server.factor
basis/match/match.factor
basis/math/bitwise/bitwise-tests.factor
basis/math/bitwise/bitwise.factor [changed mode: 0644->0755]
basis/math/blas/cblas/authors.txt [new file with mode: 0644]
basis/math/blas/cblas/cblas.factor [new file with mode: 0644]
basis/math/blas/cblas/summary.txt [new file with mode: 0644]
basis/math/blas/cblas/tags.txt [new file with mode: 0644]
basis/math/blas/matrices/authors.txt [new file with mode: 0644]
basis/math/blas/matrices/matrices-docs.factor [new file with mode: 0644]
basis/math/blas/matrices/matrices-tests.factor [new file with mode: 0644]
basis/math/blas/matrices/matrices.factor [new file with mode: 0755]
basis/math/blas/matrices/summary.txt [new file with mode: 0644]
basis/math/blas/matrices/tags.txt [new file with mode: 0644]
basis/math/blas/syntax/authors.txt [new file with mode: 0644]
basis/math/blas/syntax/summary.txt [new file with mode: 0644]
basis/math/blas/syntax/syntax-docs.factor [new file with mode: 0644]
basis/math/blas/syntax/syntax.factor [new file with mode: 0644]
basis/math/blas/syntax/tags.txt [new file with mode: 0644]
basis/math/blas/vectors/authors.txt [new file with mode: 0644]
basis/math/blas/vectors/summary.txt [new file with mode: 0644]
basis/math/blas/vectors/tags.txt [new file with mode: 0644]
basis/math/blas/vectors/vectors-docs.factor [new file with mode: 0644]
basis/math/blas/vectors/vectors-tests.factor [new file with mode: 0644]
basis/math/blas/vectors/vectors.factor [new file with mode: 0755]
basis/math/complex/complex-docs.factor
basis/math/complex/complex.factor
basis/math/complex/prettyprint/prettyprint.factor [deleted file]
basis/math/functions/functions-tests.factor
basis/math/functions/functions.factor
basis/math/geometry/rect/rect-docs.factor
basis/math/intervals/intervals-docs.factor
basis/math/intervals/intervals-tests.factor
basis/math/intervals/intervals.factor
basis/math/libm/libm-docs.factor
basis/math/miller-rabin/authors.txt [new file with mode: 0755]
basis/math/miller-rabin/miller-rabin-tests.factor [new file with mode: 0644]
basis/math/miller-rabin/miller-rabin.factor [new file with mode: 0755]
basis/math/miller-rabin/summary.txt [new file with mode: 0644]
basis/math/polynomials/polynomials.factor
basis/math/primes/authors.txt [new file with mode: 0644]
basis/math/primes/erato/authors.txt [new file with mode: 0644]
basis/math/primes/erato/erato-docs.factor [new file with mode: 0644]
basis/math/primes/erato/erato-tests.factor [new file with mode: 0644]
basis/math/primes/erato/erato.factor [new file with mode: 0644]
basis/math/primes/erato/summary.txt [new file with mode: 0644]
basis/math/primes/factors/authors.txt [new file with mode: 0644]
basis/math/primes/factors/factors-docs.factor [new file with mode: 0644]
basis/math/primes/factors/factors-tests.factor [new file with mode: 0644]
basis/math/primes/factors/factors.factor [new file with mode: 0644]
basis/math/primes/factors/summary.txt [new file with mode: 0644]
basis/math/primes/primes-docs.factor [new file with mode: 0644]
basis/math/primes/primes-tests.factor [new file with mode: 0644]
basis/math/primes/primes.factor [new file with mode: 0644]
basis/math/primes/summary.txt [new file with mode: 0644]
basis/math/quaternions/quaternions.factor
basis/math/ranges/ranges-tests.factor
basis/math/ranges/ranges.factor
basis/math/ratios/ratios.factor
basis/math/statistics/statistics.factor
basis/mime/multipart/multipart-tests.factor
basis/mime/multipart/multipart.factor [changed mode: 0644->0755]
basis/mime/types/types.factor
basis/mirrors/mirrors-docs.factor
basis/mirrors/mirrors.factor
basis/models/compose/compose-tests.factor
basis/models/compose/compose.factor
basis/multiline/multiline-tests.factor
basis/multiline/multiline.factor
basis/nibble-arrays/nibble-arrays.factor
basis/opengl/capabilities/authors.txt [new file with mode: 0644]
basis/opengl/capabilities/capabilities-docs.factor [new file with mode: 0644]
basis/opengl/capabilities/capabilities.factor [new file with mode: 0755]
basis/opengl/capabilities/summary.txt [new file with mode: 0644]
basis/opengl/capabilities/tags.txt [new file with mode: 0644]
basis/opengl/framebuffers/authors.txt [new file with mode: 0644]
basis/opengl/framebuffers/framebuffers-docs.factor [new file with mode: 0644]
basis/opengl/framebuffers/framebuffers.factor [new file with mode: 0644]
basis/opengl/framebuffers/summary.txt [new file with mode: 0644]
basis/opengl/framebuffers/tags.txt [new file with mode: 0644]
basis/opengl/gl/extensions/extensions.factor
basis/opengl/gl/gl.factor
basis/opengl/opengl.factor
basis/opengl/shaders/authors.txt [new file with mode: 0644]
basis/opengl/shaders/shaders-docs.factor [new file with mode: 0644]
basis/opengl/shaders/shaders.factor [new file with mode: 0755]
basis/opengl/shaders/summary.txt [new file with mode: 0644]
basis/opengl/shaders/tags.txt [new file with mode: 0755]
basis/openssl/libssl/libssl.factor
basis/pack/authors.txt [new file with mode: 0644]
basis/pack/pack-tests.factor [new file with mode: 0755]
basis/pack/pack.factor [new file with mode: 0755]
basis/peg/parsers/parsers.factor
basis/peg/peg-tests.factor
basis/peg/peg.factor
basis/persistent/deques/deques.factor
basis/persistent/hashtables/nodes/leaf/leaf.factor
basis/persistent/heaps/heaps.factor
basis/persistent/sequences/sequences-docs.factor
basis/persistent/vectors/vectors.factor
basis/porter-stemmer/authors.txt [new file with mode: 0644]
basis/porter-stemmer/porter-stemmer-docs.factor [new file with mode: 0644]
basis/porter-stemmer/porter-stemmer-tests.factor [new file with mode: 0644]
basis/porter-stemmer/porter-stemmer.factor [new file with mode: 0644]
basis/porter-stemmer/summary.txt [new file with mode: 0644]
basis/porter-stemmer/test/output.txt [new file with mode: 0644]
basis/porter-stemmer/test/voc.txt [new file with mode: 0644]
basis/prettyprint/backend/backend.factor
basis/prettyprint/prettyprint-docs.factor
basis/prettyprint/prettyprint-tests.factor
basis/prettyprint/prettyprint.factor
basis/prettyprint/sections/sections.factor
basis/qualified/authors.txt [deleted file]
basis/qualified/qualified-docs.factor [deleted file]
basis/qualified/qualified-tests.factor [deleted file]
basis/qualified/qualified.factor [deleted file]
basis/qualified/summary.txt [deleted file]
basis/qualified/tags.txt [deleted file]
basis/quoted-printable/authors.txt [new file with mode: 0644]
basis/quoted-printable/quoted-printable-docs.factor [new file with mode: 0644]
basis/quoted-printable/quoted-printable-tests.factor [new file with mode: 0644]
basis/quoted-printable/quoted-printable.factor [new file with mode: 0644]
basis/quoted-printable/summary.txt [new file with mode: 0644]
basis/quoted-printable/tags.txt [new file with mode: 0644]
basis/random/random-docs.factor
basis/random/random.factor
basis/refs/refs-docs.factor
basis/refs/refs.factor
basis/regexp/classes/classes.factor
basis/regexp/dfa/dfa.factor
basis/regexp/nfa/nfa.factor
basis/regexp/parser/parser.factor
basis/regexp/regexp-tests.factor
basis/regexp/regexp.factor
basis/regexp/transition-tables/transition-tables.factor
basis/roman/authors.txt [new file with mode: 0644]
basis/roman/roman-docs.factor [new file with mode: 0644]
basis/roman/roman-tests.factor [new file with mode: 0644]
basis/roman/roman.factor [new file with mode: 0644]
basis/roman/summary.txt [new file with mode: 0644]
basis/roman/tags.txt [new file with mode: 0644]
basis/search-deques/search-deques-docs.factor
basis/sequences/complex-components/authors.txt [new file with mode: 0644]
basis/sequences/complex-components/complex-components-docs.factor [new file with mode: 0644]
basis/sequences/complex-components/complex-components-tests.factor [new file with mode: 0644]
basis/sequences/complex-components/complex-components.factor [new file with mode: 0644]
basis/sequences/complex-components/summary.txt [new file with mode: 0644]
basis/sequences/complex-components/tags.txt [new file with mode: 0644]
basis/sequences/complex/authors.txt [new file with mode: 0644]
basis/sequences/complex/complex-docs.factor [new file with mode: 0644]
basis/sequences/complex/complex-tests.factor [new file with mode: 0644]
basis/sequences/complex/complex.factor [new file with mode: 0644]
basis/sequences/complex/summary.txt [new file with mode: 0644]
basis/sequences/complex/tags.txt [new file with mode: 0644]
basis/sequences/deep/authors.txt
basis/sequences/deep/deep-tests.factor
basis/sequences/deep/deep.factor
basis/sequences/next/next.factor
basis/serialize/serialize.factor
basis/smtp/server/server.factor
basis/smtp/smtp-docs.factor
basis/smtp/smtp-tests.factor
basis/smtp/smtp.factor
basis/sorting/human/human-docs.factor [new file with mode: 0644]
basis/sorting/human/human.factor
basis/sorting/slots/authors.txt [new file with mode: 0644]
basis/sorting/slots/slots-docs.factor [new file with mode: 0644]
basis/sorting/slots/slots-tests.factor [new file with mode: 0644]
basis/sorting/slots/slots.factor [new file with mode: 0644]
basis/soundex/author.txt [new file with mode: 0644]
basis/soundex/soundex-tests.factor [new file with mode: 0644]
basis/soundex/soundex.factor [new file with mode: 0644]
basis/soundex/summary.txt [new file with mode: 0644]
basis/specialized-arrays/direct/functor/functor.factor
basis/specialized-arrays/functor/functor.factor
basis/specialized-vectors/functor/functor.factor
basis/splitting/monotonic/authors.txt [new file with mode: 0644]
basis/splitting/monotonic/monotonic-docs.factor [new file with mode: 0644]
basis/splitting/monotonic/monotonic-tests.factor [new file with mode: 0644]
basis/splitting/monotonic/monotonic.factor [new file with mode: 0644]
basis/splitting/monotonic/summary.txt [new file with mode: 0644]
basis/splitting/monotonic/tags.txt [new file with mode: 0644]
basis/stack-checker/backend/backend.factor
basis/stack-checker/branches/branches.factor
basis/stack-checker/errors/errors-docs.factor
basis/stack-checker/known-words/known-words.factor
basis/stack-checker/stack-checker-docs.factor
basis/stack-checker/stack-checker-tests.factor
basis/state-parser/authors.txt [deleted file]
basis/state-parser/state-parser-docs.factor [deleted file]
basis/state-parser/state-parser-tests.factor [deleted file]
basis/state-parser/state-parser.factor [deleted file]
basis/state-parser/summary.txt [deleted file]
basis/struct-arrays/struct-arrays-tests.factor
basis/struct-arrays/struct-arrays.factor
basis/symbols/authors.txt [deleted file]
basis/symbols/summary.txt [deleted file]
basis/symbols/symbols-docs.factor [deleted file]
basis/symbols/symbols-tests.factor [deleted file]
basis/symbols/symbols.factor [deleted file]
basis/symbols/tags.txt [deleted file]
basis/syndication/syndication-tests.factor
basis/syndication/syndication.factor
basis/tools/cocoa/cocoa.factor
basis/tools/crossref/crossref-tests.factor
basis/tools/deploy/backend/backend.factor
basis/tools/deploy/config/editor/editor.factor
basis/tools/deploy/deploy-tests.factor
basis/tools/deploy/macosx/macosx.factor
basis/tools/deploy/shaker/shaker.factor
basis/tools/deploy/shaker/strip-cocoa.factor
basis/tools/deploy/test/10/10-tests.factor [new file with mode: 0644]
basis/tools/deploy/test/10/10.factor [new file with mode: 0644]
basis/tools/deploy/test/10/authors.txt [new file with mode: 0644]
basis/tools/deploy/test/10/deploy.factor [new file with mode: 0644]
basis/tools/deploy/test/test.factor [new file with mode: 0644]
basis/tools/deploy/unix/unix.factor
basis/tools/deploy/windows/windows.factor
basis/tools/disassembler/gdb/gdb.factor [changed mode: 0644->0755]
basis/tools/disassembler/udis/udis.factor
basis/tools/files/files-tests.factor
basis/tools/files/files.factor
basis/tools/files/unix/unix.factor
basis/tools/files/windows/windows.factor
basis/tools/profiler/profiler-docs.factor
basis/tools/profiler/profiler.factor
basis/tools/scaffold/scaffold-docs.factor
basis/tools/scaffold/scaffold.factor
basis/tools/threads/threads-docs.factor
basis/tools/vocabs/browser/browser.factor
basis/tools/vocabs/monitor/monitor-tests.factor
basis/tools/vocabs/monitor/monitor.factor
basis/tools/vocabs/vocabs.factor
basis/tr/tr-tests.factor
basis/tr/tr.factor
basis/tuple-arrays/tuple-arrays.factor
basis/ui/backend/backend.factor
basis/ui/cocoa/cocoa.factor
basis/ui/event-loop/event-loop-tests.factor [new file with mode: 0644]
basis/ui/event-loop/event-loop.factor [new file with mode: 0644]
basis/ui/freetype/freetype.factor
basis/ui/gadgets/borders/borders.factor
basis/ui/gadgets/buttons/buttons.factor
basis/ui/gadgets/editors/editors.factor
basis/ui/gadgets/gadgets.factor
basis/ui/gadgets/grid-lines/grid-lines.factor
basis/ui/gadgets/grids/grids.factor
basis/ui/gadgets/incremental/incremental.factor
basis/ui/gadgets/labels/labels.factor
basis/ui/gadgets/menus/menus.factor
basis/ui/gadgets/panes/panes-docs.factor
basis/ui/gadgets/panes/panes.factor
basis/ui/gadgets/presentations/presentations-docs.factor
basis/ui/gadgets/presentations/presentations.factor
basis/ui/gadgets/scrollers/scrollers-tests.factor
basis/ui/gadgets/scrollers/scrollers.factor
basis/ui/gadgets/theme/theme.factor
basis/ui/gadgets/tracks/tracks-tests.factor
basis/ui/gadgets/tracks/tracks.factor
basis/ui/gadgets/viewports/viewports.factor
basis/ui/gestures/gestures.factor
basis/ui/tools/deploy/deploy.factor
basis/ui/tools/interactor/interactor.factor
basis/ui/tools/operations/operations.factor
basis/ui/tools/search/search-tests.factor
basis/ui/tools/search/search.factor
basis/ui/tools/tools-docs.factor
basis/ui/tools/tools-tests.factor
basis/ui/ui-docs.factor
basis/ui/ui-tests.factor
basis/ui/ui.factor
basis/ui/windows/windows.factor
basis/ui/x11/x11.factor
basis/unicode/breaks/GraphemeBreakTest.txt [new file with mode: 0644]
basis/unicode/breaks/WordBreakTest.txt [new file with mode: 0644]
basis/unicode/breaks/breaks-docs.factor [new file with mode: 0644]
basis/unicode/breaks/breaks-tests.factor
basis/unicode/breaks/breaks.factor
basis/unicode/case/case-docs.factor [new file with mode: 0644]
basis/unicode/case/case-tests.factor
basis/unicode/case/case.factor
basis/unicode/categories/categories-docs.factor [new file with mode: 0644]
basis/unicode/collation/collation-docs.factor
basis/unicode/collation/collation-tests.factor
basis/unicode/collation/collation.factor
basis/unicode/data/CompositionExclusions.txt [new file with mode: 0644]
basis/unicode/data/WordBreakProperty.txt [new file with mode: 0644]
basis/unicode/data/data-docs.factor [new file with mode: 0644]
basis/unicode/data/data.factor
basis/unicode/normalize/normalize-docs.factor [new file with mode: 0644]
basis/unicode/normalize/normalize-tests.factor
basis/unicode/normalize/normalize.factor
basis/unicode/script/script-tests.factor
basis/unicode/script/script.factor
basis/unicode/unicode-docs.factor [new file with mode: 0644]
basis/unicode/unicode.factor [new file with mode: 0644]
basis/unix/authors.txt
basis/unix/bsd/bsd.factor
basis/unix/bsd/freebsd/freebsd.factor
basis/unix/bsd/macosx/macosx.factor
basis/unix/bsd/netbsd/netbsd.factor
basis/unix/bsd/openbsd/openbsd.factor
basis/unix/debugger/debugger.factor
basis/unix/getfsstat/freebsd/freebsd.factor
basis/unix/getfsstat/macosx/macosx.factor
basis/unix/getfsstat/netbsd/netbsd.factor
basis/unix/getfsstat/openbsd/openbsd.factor
basis/unix/groups/groups-docs.factor
basis/unix/groups/groups-tests.factor
basis/unix/groups/groups.factor
basis/unix/kqueue/freebsd/freebsd.factor
basis/unix/kqueue/kqueue.factor
basis/unix/kqueue/macosx/macosx.factor
basis/unix/kqueue/netbsd/netbsd.factor
basis/unix/kqueue/openbsd/openbsd.factor
basis/unix/linux/epoll/epoll.factor
basis/unix/linux/fs/authors.txt [deleted file]
basis/unix/linux/fs/fs.factor [deleted file]
basis/unix/linux/fs/tags.txt [deleted file]
basis/unix/linux/if/authors.txt [deleted file]
basis/unix/linux/if/if.factor [deleted file]
basis/unix/linux/if/tags.txt [deleted file]
basis/unix/linux/ifreq/authors.txt [deleted file]
basis/unix/linux/ifreq/ifreq.factor [deleted file]
basis/unix/linux/ifreq/tags.txt [deleted file]
basis/unix/linux/inotify/inotify.factor
basis/unix/linux/linux.factor
basis/unix/linux/route/authors.txt [deleted file]
basis/unix/linux/route/route.factor [deleted file]
basis/unix/linux/route/tags.txt [deleted file]
basis/unix/linux/sockios/authors.txt [deleted file]
basis/unix/linux/sockios/sockios.factor [deleted file]
basis/unix/linux/sockios/tags.txt [deleted file]
basis/unix/linux/swap/authors.txt [deleted file]
basis/unix/linux/swap/swap.factor [deleted file]
basis/unix/linux/swap/tags.txt [deleted file]
basis/unix/process/process.factor
basis/unix/solaris/solaris.factor
basis/unix/stat/linux/32/32.factor
basis/unix/stat/linux/64/64.factor
basis/unix/stat/netbsd/32/32.factor
basis/unix/stat/netbsd/64/64.factor
basis/unix/stat/stat.factor
basis/unix/statfs/freebsd/freebsd.factor
basis/unix/statfs/linux/linux.factor
basis/unix/statfs/macosx/macosx.factor
basis/unix/statfs/openbsd/openbsd.factor
basis/unix/statvfs/freebsd/freebsd.factor
basis/unix/statvfs/linux/linux.factor
basis/unix/statvfs/macosx/macosx.factor
basis/unix/statvfs/netbsd/netbsd.factor
basis/unix/statvfs/openbsd/openbsd.factor
basis/unix/unix.factor
basis/unix/users/users-docs.factor
basis/unix/users/users-tests.factor
basis/unix/users/users.factor
basis/unix/utmpx/utmpx.factor
basis/urls/urls-docs.factor
basis/uuid/authors.txt [new file with mode: 0644]
basis/uuid/summary.txt [new file with mode: 0644]
basis/uuid/uuid-docs.factor [new file with mode: 0644]
basis/uuid/uuid-tests.factor [new file with mode: 0644]
basis/uuid/uuid.factor [new file with mode: 0644]
basis/validators/validators-docs.factor
basis/validators/validators-tests.factor
basis/validators/validators.factor
basis/values/values-docs.factor
basis/values/values.factor
basis/vlists/vlists.factor
basis/windows/advapi32/advapi32.factor
basis/windows/com/wrapper/wrapper.factor
basis/windows/dinput/constants/constants.factor
basis/windows/dinput/dinput.factor [changed mode: 0644->0755]
basis/windows/dragdrop-listener/dragdrop-listener.factor
basis/windows/errors/errors.factor
basis/windows/gdi32/gdi32.factor
basis/windows/kernel32/kernel32.factor [changed mode: 0644->0755]
basis/windows/messages/messages.factor [changed mode: 0644->0755]
basis/windows/ole32/ole32.factor
basis/windows/shell32/shell32.factor
basis/windows/time/time.factor
basis/windows/user32/user32.factor
basis/windows/winsock/winsock.factor
basis/x11/clipboard/clipboard.factor
basis/x11/events/events.factor
basis/x11/windows/windows.factor
basis/x11/xim/xim.factor
basis/x11/xlib/xlib.factor
basis/xml-rpc/example.factor
basis/xml-rpc/xml-rpc-docs.factor
basis/xml-rpc/xml-rpc.factor
basis/xml/autoencoding/authors.txt [new file with mode: 0644]
basis/xml/autoencoding/autoencoding.factor [new file with mode: 0644]
basis/xml/autoencoding/summary.txt [new file with mode: 0644]
basis/xml/backend/backend.factor [deleted file]
basis/xml/char-classes/char-classes.factor
basis/xml/char-classes/summary.txt [new file with mode: 0644]
basis/xml/data/data-docs.factor [new file with mode: 0644]
basis/xml/data/data.factor
basis/xml/data/summary.txt [new file with mode: 0644]
basis/xml/data/tags.txt [new file with mode: 0644]
basis/xml/dispatch/authors.txt [new file with mode: 0644]
basis/xml/dispatch/dispatch-docs.factor [new file with mode: 0644]
basis/xml/dispatch/dispatch-tests.factor [new file with mode: 0644]
basis/xml/dispatch/dispatch.factor [new file with mode: 0644]
basis/xml/dispatch/summary.txt [new file with mode: 0644]
basis/xml/dispatch/tags.txt [new file with mode: 0644]
basis/xml/dtd/authors.txt [new file with mode: 0644]
basis/xml/dtd/dtd.factor [new file with mode: 0644]
basis/xml/dtd/summary.txt [new file with mode: 0644]
basis/xml/elements/authors.txt [new file with mode: 0644]
basis/xml/elements/elements.factor [new file with mode: 0644]
basis/xml/elements/summary.txt [new file with mode: 0644]
basis/xml/entities/entities-docs.factor [new file with mode: 0644]
basis/xml/entities/entities.factor
basis/xml/entities/html/authors.txt [new file with mode: 0644]
basis/xml/entities/html/html-docs.factor [new file with mode: 0644]
basis/xml/entities/html/html-tests.factor [new file with mode: 0644]
basis/xml/entities/html/html.factor [new file with mode: 0644]
basis/xml/entities/html/xhtml-lat1.ent [new file with mode: 0644]
basis/xml/entities/html/xhtml-special.ent [new file with mode: 0644]
basis/xml/entities/html/xhtml-symbol.ent [new file with mode: 0644]
basis/xml/entities/summary.txt [new file with mode: 0644]
basis/xml/errors/errors-docs.factor [new file with mode: 0644]
basis/xml/errors/errors-tests.factor
basis/xml/errors/errors.factor
basis/xml/errors/summary.txt [new file with mode: 0644]
basis/xml/generator/authors.txt [deleted file]
basis/xml/generator/generator-tests.factor [deleted file]
basis/xml/generator/generator.factor [deleted file]
basis/xml/interpolate/authors.txt [new file with mode: 0644]
basis/xml/interpolate/interpolate-docs.factor [new file with mode: 0644]
basis/xml/interpolate/interpolate-tests.factor [new file with mode: 0644]
basis/xml/interpolate/interpolate.factor [new file with mode: 0644]
basis/xml/interpolate/summary.txt [new file with mode: 0644]
basis/xml/interpolate/tags.txt [new file with mode: 0644]
basis/xml/name/authors.txt [new file with mode: 0644]
basis/xml/name/name.factor [new file with mode: 0644]
basis/xml/name/summary.txt [new file with mode: 0644]
basis/xml/state/authors.txt [new file with mode: 0644]
basis/xml/state/state.factor [new file with mode: 0644]
basis/xml/state/summary.txt [new file with mode: 0644]
basis/xml/tests/arithmetic.factor [deleted file]
basis/xml/tests/ascii.xml [new file with mode: 0644]
basis/xml/tests/encodings.factor [new file with mode: 0644]
basis/xml/tests/latin1.xml [new file with mode: 0644]
basis/xml/tests/latin5.xml [new file with mode: 0644]
basis/xml/tests/prologless.xml [new file with mode: 0644]
basis/xml/tests/soap.xml
basis/xml/tests/spaces.xml [new file with mode: 0644]
basis/xml/tests/state-parser-tests.factor [new file with mode: 0644]
basis/xml/tests/templating.factor
basis/xml/tests/test.factor
basis/xml/tests/unitag.xml [new file with mode: 0644]
basis/xml/tests/utf16.xml [new file with mode: 0644]
basis/xml/tests/utf16be-bom.xml [new file with mode: 0644]
basis/xml/tests/utf16be.xml [new file with mode: 0644]
basis/xml/tests/utf16le-bom.xml [new file with mode: 0644]
basis/xml/tests/utf16le.xml [new file with mode: 0644]
basis/xml/tests/utf8-bom.xml [new file with mode: 0644]
basis/xml/tests/utf8.xml [new file with mode: 0644]
basis/xml/tests/xmltest.factor [new file with mode: 0644]
basis/xml/tests/xmltest/canonxml.html [new file with mode: 0755]
basis/xml/tests/xmltest/invalid/002.ent [new file with mode: 0755]
basis/xml/tests/xmltest/invalid/002.xml [new file with mode: 0755]
basis/xml/tests/xmltest/invalid/005.ent [new file with mode: 0755]
basis/xml/tests/xmltest/invalid/005.xml [new file with mode: 0755]
basis/xml/tests/xmltest/invalid/006.ent [new file with mode: 0755]
basis/xml/tests/xmltest/invalid/006.xml [new file with mode: 0755]
basis/xml/tests/xmltest/invalid/not-sa/022.ent [new file with mode: 0644]
basis/xml/tests/xmltest/invalid/not-sa/022.xml [new file with mode: 0644]
basis/xml/tests/xmltest/invalid/not-sa/out/022.xml [new file with mode: 0644]
basis/xml/tests/xmltest/not-wf/ext-sa/001.ent [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/ext-sa/001.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/ext-sa/002.ent [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/ext-sa/002.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/ext-sa/003.ent [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/ext-sa/003.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/not-sa/001.ent [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/not-sa/001.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/not-sa/002.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/not-sa/003.ent [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/not-sa/003.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/not-sa/004.ent [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/not-sa/004.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/not-sa/005.ent [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/not-sa/005.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/not-sa/006.ent [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/not-sa/006.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/not-sa/007.ent [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/not-sa/007.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/not-sa/008.ent [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/not-sa/008.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/not-sa/009.ent [new file with mode: 0644]
basis/xml/tests/xmltest/not-wf/not-sa/009.xml [new file with mode: 0644]
basis/xml/tests/xmltest/not-wf/not-sa/010.ent [new file with mode: 0644]
basis/xml/tests/xmltest/not-wf/not-sa/010.xml [new file with mode: 0644]
basis/xml/tests/xmltest/not-wf/not-sa/011.ent [new file with mode: 0644]
basis/xml/tests/xmltest/not-wf/not-sa/011.xml [new file with mode: 0644]
basis/xml/tests/xmltest/not-wf/sa/001.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/002.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/003.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/004.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/005.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/006.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/007.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/008.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/009.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/010.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/011.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/012.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/013.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/014.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/015.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/016.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/017.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/018.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/019.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/020.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/021.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/022.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/023.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/024.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/025.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/026.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/027.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/028.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/029.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/030.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/031.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/032.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/033.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/034.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/035.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/036.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/037.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/038.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/039.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/040.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/041.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/042.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/043.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/044.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/045.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/046.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/047.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/048.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/049.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/050.xml [new file with mode: 0644]
basis/xml/tests/xmltest/not-wf/sa/051.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/052.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/053.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/054.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/055.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/056.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/057.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/058.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/059.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/060.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/061.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/062.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/063.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/064.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/065.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/066.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/067.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/068.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/069.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/070.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/071.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/072.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/073.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/074.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/075.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/076.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/077.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/078.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/079.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/080.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/081.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/082.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/083.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/084.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/085.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/086.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/087.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/088.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/089.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/090.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/091.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/092.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/093.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/094.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/095.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/096.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/097.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/098.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/099.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/100.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/101.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/102.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/103.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/104.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/105.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/106.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/107.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/108.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/109.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/110.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/111.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/112.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/113.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/114.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/115.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/116.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/117.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/118.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/119.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/120.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/121.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/122.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/123.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/124.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/125.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/126.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/127.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/128.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/129.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/130.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/131.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/132.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/133.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/134.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/135.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/136.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/137.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/138.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/139.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/140.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/141.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/142.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/143.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/144.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/145.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/146.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/147.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/148.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/149.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/150.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/151.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/152.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/153.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/154.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/155.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/156.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/157.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/158.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/159.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/160.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/161.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/162.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/163.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/164.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/165.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/166.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/167.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/168.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/169.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/170.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/171.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/172.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/173.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/174.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/175.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/176.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/177.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/178.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/179.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/180.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/181.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/182.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/183.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/184.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/185.ent [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/185.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/186.xml [new file with mode: 0755]
basis/xml/tests/xmltest/not-wf/sa/null.ent [new file with mode: 0644]
basis/xml/tests/xmltest/readme.html [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/001.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/001.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/002.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/002.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/003.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/003.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/004.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/004.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/005.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/005.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/006.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/006.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/007.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/007.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/008.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/008.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/009.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/009.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/010.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/010.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/011.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/011.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/012.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/012.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/013.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/013.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/014.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/014.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/out/001.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/out/002.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/out/003.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/out/004.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/out/005.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/out/006.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/out/007.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/out/008.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/out/009.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/out/010.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/out/011.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/out/012.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/out/013.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/ext-sa/out/014.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/001.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/001.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/002.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/002.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/003-1.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/003-2.ent [new file with mode: 0644]
basis/xml/tests/xmltest/valid/not-sa/003.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/004-1.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/004-2.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/004.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/005-1.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/005-2.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/005.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/006.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/006.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/007.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/007.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/008.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/008.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/009.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/009.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/010.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/010.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/011.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/011.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/012.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/012.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/013.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/013.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/014.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/014.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/015.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/015.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/016.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/016.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/017.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/017.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/018.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/018.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/019.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/019.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/020.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/020.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/021.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/021.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/023.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/023.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/024.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/024.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/025.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/025.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/026.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/026.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/027.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/027.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/028.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/028.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/029.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/029.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/030.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/030.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/031-1.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/031-2.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/031.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/001.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/002.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/003.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/004.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/005.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/006.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/007.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/008.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/009.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/010.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/011.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/012.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/013.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/014.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/015.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/016.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/017.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/018.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/019.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/020.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/021.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/022.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/023.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/024.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/025.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/026.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/027.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/028.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/029.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/030.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/not-sa/out/031.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/001.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/002.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/003.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/004.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/005.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/006.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/007.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/008.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/009.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/010.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/011.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/012.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/013.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/014.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/015.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/016.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/017.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/018.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/019.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/020.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/021.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/022.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/023.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/024.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/025.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/026.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/027.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/028.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/029.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/030.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/031.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/032.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/033.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/034.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/035.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/036.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/037.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/038.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/039.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/040.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/041.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/042.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/043.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/044.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/045.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/046.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/047.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/048.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/049.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/050.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/051.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/052.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/053.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/054.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/055.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/056.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/057.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/058.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/059.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/060.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/061.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/062.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/063.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/064.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/065.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/066.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/067.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/068.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/069.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/070.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/071.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/072.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/073.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/074.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/075.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/076.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/077.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/078.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/079.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/080.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/081.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/082.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/083.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/084.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/085.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/086.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/087.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/088.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/089.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/090.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/091.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/092.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/093.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/094.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/095.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/096.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/097.ent [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/097.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/098.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/099.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/100.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/101.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/102.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/103.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/104.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/105.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/106.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/107.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/108.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/109.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/110.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/111.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/112.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/113.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/114.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/115.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/116.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/117.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/118.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/119.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/001.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/002.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/003.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/004.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/005.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/006.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/007.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/008.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/009.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/010.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/011.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/012.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/013.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/014.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/015.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/016.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/017.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/018.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/019.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/020.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/021.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/022.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/023.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/024.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/025.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/026.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/027.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/028.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/029.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/030.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/031.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/032.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/033.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/034.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/035.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/036.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/037.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/038.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/039.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/040.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/041.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/042.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/043.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/044.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/045.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/046.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/047.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/048.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/049.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/050.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/051.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/052.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/053.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/054.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/055.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/056.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/057.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/058.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/059.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/060.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/061.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/062.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/063.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/064.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/065.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/066.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/067.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/068.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/069.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/070.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/071.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/072.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/073.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/074.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/075.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/076.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/077.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/078.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/079.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/080.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/081.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/082.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/083.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/084.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/085.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/086.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/087.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/088.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/089.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/090.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/091.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/092.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/093.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/094.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/095.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/096.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/097.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/098.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/099.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/100.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/101.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/102.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/103.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/104.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/105.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/106.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/107.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/108.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/109.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/110.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/111.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/112.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/113.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/114.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/115.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/116.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/117.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/118.xml [new file with mode: 0755]
basis/xml/tests/xmltest/valid/sa/out/119.xml [new file with mode: 0755]
basis/xml/tests/xmltest/xmltest.xml [new file with mode: 0755]
basis/xml/tests/xmode-dtd.factor
basis/xml/tokenize/summary.txt [new file with mode: 0644]
basis/xml/tokenize/tokenize.factor
basis/xml/utilities/summary.txt [new file with mode: 0644]
basis/xml/utilities/tags.txt [new file with mode: 0644]
basis/xml/utilities/utilities-docs.factor [new file with mode: 0644]
basis/xml/utilities/utilities-tests.factor
basis/xml/utilities/utilities.factor
basis/xml/writer/summary.txt [new file with mode: 0644]
basis/xml/writer/writer-docs.factor [new file with mode: 0644]
basis/xml/writer/writer-tests.factor
basis/xml/writer/writer.factor
basis/xml/xml-docs.factor
basis/xml/xml.factor
basis/xmode/catalog/catalog.factor
basis/xmode/code2html/code2html-tests.factor [new file with mode: 0644]
basis/xmode/code2html/code2html.factor
basis/xmode/code2html/responder/responder.factor
basis/xmode/loader/loader.factor
basis/xmode/loader/syntax/syntax.factor
basis/xmode/marker/marker.factor
basis/xmode/marker/state/state.factor
basis/xmode/rules/rules.factor
basis/xmode/tokens/tokens.factor
basis/xmode/utilities/utilities.factor
build-support/factor.sh
core/assocs/assocs-docs.factor
core/assocs/assocs-tests.factor
core/assocs/assocs.factor
core/bootstrap/primitives.factor
core/bootstrap/stage1.factor
core/bootstrap/syntax.factor
core/byte-arrays/byte-arrays-docs.factor
core/checksums/checksums.factor
core/checksums/crc32/crc32.factor
core/classes/algebra/algebra.factor
core/classes/classes.factor
core/classes/mixin/mixin.factor
core/classes/singleton/singleton-docs.factor
core/classes/tuple/tuple-docs.factor
core/classes/tuple/tuple.factor
core/combinators/combinators.factor
core/compiler/errors/errors-docs.factor
core/compiler/units/units-tests.factor
core/compiler/units/units.factor
core/continuations/continuations-docs.factor
core/effects/effects.factor
core/effects/parser/parser.factor
core/generic/generic.factor
core/generic/standard/standard-tests.factor
core/generic/standard/standard.factor
core/growable/growable-docs.factor
core/growable/growable.factor
core/hashtables/hashtables.factor
core/io/backend/backend.factor
core/io/encodings/binary/authors.txt [deleted file]
core/io/encodings/binary/binary-docs.factor [deleted file]
core/io/encodings/binary/binary.factor [deleted file]
core/io/encodings/binary/summary.txt [deleted file]
core/io/encodings/binary/tags.txt [deleted file]
core/io/encodings/encodings-docs.factor
core/io/encodings/encodings.factor
core/io/files/files-docs.factor
core/io/files/files-tests.factor
core/io/files/files.factor
core/io/io-docs.factor
core/io/io-tests.factor
core/io/io.factor
core/io/pathnames/authors.txt [new file with mode: 0644]
core/io/pathnames/pathnames-docs.factor [new file with mode: 0644]
core/io/pathnames/pathnames-tests.factor [new file with mode: 0644]
core/io/pathnames/pathnames.factor [new file with mode: 0644]
core/io/pathnames/summary.txt [new file with mode: 0644]
core/io/streams/c/c-docs.factor
core/io/streams/c/c-tests.factor
core/io/streams/c/c.factor
core/io/streams/nested/authors.txt [deleted file]
core/io/streams/nested/nested-docs.factor [deleted file]
core/io/streams/nested/nested.factor [deleted file]
core/io/streams/nested/summary.txt [deleted file]
core/io/streams/null/authors.txt [new file with mode: 0755]
core/io/streams/null/null-docs.factor [new file with mode: 0644]
core/io/streams/null/null-tests.factor [new file with mode: 0644]
core/io/streams/null/null.factor [new file with mode: 0644]
core/io/streams/plain/plain-docs.factor
core/io/streams/plain/plain.factor
core/io/streams/string/string.factor
core/kernel/kernel-docs.factor
core/kernel/kernel-tests.factor
core/kernel/kernel.factor
core/layouts/layouts.factor
core/math/floats/floats-tests.factor
core/math/integers/integers-docs.factor
core/math/math-docs.factor
core/math/math.factor [changed mode: 0644->0755]
core/math/order/order-docs.factor
core/math/order/order.factor
core/memory/memory-docs.factor
core/memory/memory.factor
core/namespaces/namespaces-docs.factor
core/parser/parser-docs.factor
core/parser/parser-tests.factor
core/parser/parser.factor
core/quotations/quotations-docs.factor
core/quotations/quotations.factor
core/sequences/sequences-docs.factor
core/sequences/sequences-tests.factor
core/sequences/sequences.factor
core/sets/sets-docs.factor
core/sets/sets-tests.factor
core/sets/sets.factor
core/slots/slots-docs.factor
core/slots/slots.factor
core/sorting/sorting-docs.factor
core/sorting/sorting-tests.factor
core/sorting/sorting.factor
core/source-files/source-files-docs.factor
core/source-files/source-files.factor
core/splitting/splitting.factor
core/strings/strings-docs.factor
core/strings/strings-tests.factor
core/strings/strings.factor
core/syntax/syntax-docs.factor
core/syntax/syntax.factor
core/syntax/tags.txt [deleted file]
core/vocabs/loader/loader-tests.factor
core/vocabs/loader/loader.factor
core/vocabs/parser/authors.txt [new file with mode: 0644]
core/vocabs/parser/parser-docs.factor [new file with mode: 0644]
core/vocabs/parser/parser.factor [new file with mode: 0644]
core/vocabs/vocabs.factor
core/words/alias/alias-docs.factor [new file with mode: 0644]
core/words/alias/alias.factor [new file with mode: 0644]
core/words/alias/authors.txt [new file with mode: 0644]
core/words/alias/summary.txt [new file with mode: 0644]
core/words/constant/constant.factor [new file with mode: 0644]
core/words/symbol/symbol-docs.factor [new file with mode: 0644]
core/words/symbol/symbol.factor [new file with mode: 0644]
core/words/words-docs.factor
core/words/words-tests.factor
core/words/words.factor
extra/L-system/L-system.factor [new file with mode: 0644]
extra/L-system/models/abop-1/abop-1.factor [new file with mode: 0644]
extra/L-system/models/abop-2/abop-2.factor [new file with mode: 0644]
extra/L-system/models/abop-3/abop-3.factor [new file with mode: 0644]
extra/L-system/models/abop-4/abop-4.factor [new file with mode: 0644]
extra/L-system/models/abop-5-angular/abop-5-angular.factor [new file with mode: 0644]
extra/L-system/models/abop-5/abop-5.factor [new file with mode: 0644]
extra/L-system/models/abop-6/abop-6.factor [new file with mode: 0644]
extra/L-system/models/airhorse/airhorse.factor [new file with mode: 0644]
extra/L-system/models/tree-5/tree-5.factor [new file with mode: 0644]
extra/advice/advice.factor
extra/asn1/asn1-tests.factor
extra/asn1/asn1.factor
extra/assoc-heaps/assoc-heaps-docs.factor [deleted file]
extra/assoc-heaps/assoc-heaps-tests.factor [deleted file]
extra/assoc-heaps/assoc-heaps.factor [deleted file]
extra/assoc-heaps/authors.txt [deleted file]
extra/assocs/lib/authors.txt [deleted file]
extra/assocs/lib/lib-tests.factor [deleted file]
extra/assocs/lib/lib.factor [deleted file]
extra/assocs/lib/summary.txt [deleted file]
extra/assocs/lib/tags.txt [deleted file]
extra/automata/ui/ui.factor
extra/bake/authors.txt [deleted file]
extra/bake/bake-tests.factor [deleted file]
extra/bake/bake.factor [deleted file]
extra/bake/fry/fry-tests.factor [deleted file]
extra/bake/fry/fry.factor [deleted file]
extra/bake/summary.txt [deleted file]
extra/bank/bank.factor
extra/benchmark/binary-search/binary-search.factor
extra/benchmark/binary-trees/binary-trees.factor
extra/benchmark/crc32/crc32.factor
extra/benchmark/knucleotide/knucleotide.factor
extra/benchmark/mandel/colors/colors.factor
extra/benchmark/mandel/mandel.factor
extra/benchmark/md5/md5.factor
extra/benchmark/nbody/nbody.factor
extra/benchmark/nsieve-bits/nsieve-bits.factor
extra/benchmark/nsieve-bytes/nsieve-bytes.factor
extra/benchmark/nsieve/nsieve.factor
extra/benchmark/random/random.factor
extra/benchmark/raytracer/raytracer.factor
extra/benchmark/reverse-complement/reverse-complement.factor
extra/benchmark/sha1/sha1.factor
extra/benchmark/xml/xml.factor
extra/bind-in/bind-in.factor [deleted file]
extra/bitfields/authors.txt [deleted file]
extra/bitfields/bitfields-docs.factor [deleted file]
extra/bitfields/bitfields-tests.factor [deleted file]
extra/bitfields/bitfields.factor [deleted file]
extra/bitfields/summary.txt [deleted file]
extra/bitfields/tags.txt [deleted file]
extra/boolean-expr/boolean-expr.factor
extra/bubble-chamber/bubble-chamber-docs.factor [deleted file]
extra/bubble-chamber/bubble-chamber.factor
extra/bubble-chamber/common/common.factor [deleted file]
extra/bubble-chamber/hadron-chamber/hadron-chamber.factor [new file with mode: 0644]
extra/bubble-chamber/hadron-chamber/tags.txt [new file with mode: 0644]
extra/bubble-chamber/large/large.factor [new file with mode: 0644]
extra/bubble-chamber/large/tags.txt [new file with mode: 0644]
extra/bubble-chamber/medium/medium.factor [new file with mode: 0644]
extra/bubble-chamber/medium/tags.txt [new file with mode: 0644]
extra/bubble-chamber/original/original.factor [new file with mode: 0644]
extra/bubble-chamber/original/tags.txt [new file with mode: 0644]
extra/bubble-chamber/particle/axion/axion.factor [deleted file]
extra/bubble-chamber/particle/hadron/hadron.factor [deleted file]
extra/bubble-chamber/particle/muon/colors/colors.factor [deleted file]
extra/bubble-chamber/particle/muon/muon.factor [deleted file]
extra/bubble-chamber/particle/particle.factor [deleted file]
extra/bubble-chamber/particle/quark/quark.factor [deleted file]
extra/bubble-chamber/quark-chamber/quark-chamber.factor [new file with mode: 0644]
extra/bubble-chamber/quark-chamber/tags.txt [new file with mode: 0644]
extra/bubble-chamber/small/small.factor [new file with mode: 0644]
extra/bubble-chamber/small/tags.txt [new file with mode: 0644]
extra/bubble-chamber/tags.txt [deleted file]
extra/bubble-chamber/ten-hadrons/tags.txt [new file with mode: 0644]
extra/bubble-chamber/ten-hadrons/ten-hadrons.factor [new file with mode: 0644]
extra/bunny/cel-shaded/cel-shaded.factor
extra/bunny/model/model.factor
extra/bunny/outlined/outlined.factor
extra/cairo-demo/cairo-demo.factor
extra/cairo-samples/cairo-samples.factor [new file with mode: 0644]
extra/cairo/authors.txt [deleted file]
extra/cairo/cairo.factor [deleted file]
extra/cairo/ffi/ffi.factor [deleted file]
extra/cairo/gadgets/gadgets.factor [deleted file]
extra/cairo/samples/samples.factor [deleted file]
extra/cairo/summary.txt [deleted file]
extra/cairo/tags.txt [deleted file]
extra/cfdg/cfdg.factor
extra/combinators/cleave/cleave.factor
extra/combinators/lib/authors.txt [deleted file]
extra/combinators/lib/lib-docs.factor [deleted file]
extra/combinators/lib/lib-tests.factor [deleted file]
extra/combinators/lib/lib.factor [deleted file]
extra/contributors/contributors.factor
extra/cords/authors.txt [deleted file]
extra/cords/cords-tests.factor [deleted file]
extra/cords/cords.factor [deleted file]
extra/cords/summary.txt [deleted file]
extra/cords/tags.txt [deleted file]
extra/coroutines/coroutines-tests.factor
extra/crypto/hmac/hmac.factor
extra/crypto/passwd-md5/passwd-md5.factor
extra/curses/authors.txt [new file with mode: 0644]
extra/curses/curses-tests.factor [new file with mode: 0644]
extra/curses/curses.factor [new file with mode: 0644]
extra/curses/ffi/ffi.factor [new file with mode: 0644]
extra/curses/ffi/tags.txt [new file with mode: 0644]
extra/curses/summary.txt [new file with mode: 0644]
extra/curses/tags.txt [new file with mode: 0644]
extra/descriptive/descriptive.factor
extra/dns/dns.factor
extra/dns/server/server.factor
extra/dns/util/util.factor
extra/easy-help/easy-help.factor [new file with mode: 0644]
extra/easy-help/expand-markup/expand-markup.factor [new file with mode: 0644]
extra/faq/authors.txt [deleted file]
extra/faq/faq.factor [deleted file]
extra/faq/summary.txt [deleted file]
extra/fjsc/fjsc.factor
extra/frame-buffer/frame-buffer.factor [new file with mode: 0644]
extra/fuel/authors.txt
extra/fuel/eval/authors.txt [new file with mode: 0644]
extra/fuel/eval/eval-tests.factor [new file with mode: 0644]
extra/fuel/eval/eval.factor [new file with mode: 0644]
extra/fuel/fuel.factor
extra/fuel/help/authors.txt [new file with mode: 0644]
extra/fuel/help/help-tests.factor [new file with mode: 0644]
extra/fuel/help/help.factor [new file with mode: 0644]
extra/fuel/pprint/authors.txt [new file with mode: 0644]
extra/fuel/pprint/pprint-tests.factor [new file with mode: 0644]
extra/fuel/pprint/pprint.factor [new file with mode: 0644]
extra/fuel/remote/authors.txt [new file with mode: 0644]
extra/fuel/remote/remote.factor [new file with mode: 0644]
extra/fuel/xref/authors.txt [new file with mode: 0644]
extra/fuel/xref/xref.factor [new file with mode: 0644]
extra/game-input/backend/authors.txt [deleted file]
extra/game-input/backend/backend.factor [deleted file]
extra/game-input/backend/dinput/authors.txt [deleted file]
extra/game-input/backend/dinput/dinput.factor [deleted file]
extra/game-input/backend/dinput/keys-array/keys-array.factor [deleted file]
extra/game-input/backend/dinput/summary.txt [deleted file]
extra/game-input/backend/dinput/tags.txt [deleted file]
extra/game-input/backend/iokit/authors.txt [deleted file]
extra/game-input/backend/iokit/iokit.factor [deleted file]
extra/game-input/backend/iokit/summary.txt [deleted file]
extra/game-input/backend/iokit/tags.txt [deleted file]
extra/game-input/backend/summary.txt [deleted file]
extra/game-input/backend/tags.txt [deleted file]
extra/game-input/dinput/authors.txt [new file with mode: 0755]
extra/game-input/dinput/dinput.factor [new file with mode: 0755]
extra/game-input/dinput/keys-array/keys-array.factor [new file with mode: 0755]
extra/game-input/dinput/summary.txt [new file with mode: 0755]
extra/game-input/dinput/tags.txt [new file with mode: 0755]
extra/game-input/game-input.factor
extra/game-input/iokit/authors.txt [new file with mode: 0644]
extra/game-input/iokit/iokit.factor [new file with mode: 0755]
extra/game-input/iokit/summary.txt [new file with mode: 0644]
extra/game-input/iokit/tags.txt [new file with mode: 0755]
extra/geo-ip/geo-ip.factor
extra/golden-section/authors.txt [new file with mode: 0644]
extra/golden-section/deploy.factor [new file with mode: 0755]
extra/golden-section/golden-section.factor [new file with mode: 0644]
extra/golden-section/summary.txt [new file with mode: 0644]
extra/golden-section/tags.txt [new file with mode: 0644]
extra/google-tech-talk/google-tech-talk.factor
extra/graphics/bitmap/bitmap.factor
extra/html/parser/analyzer/analyzer.factor
extra/html/parser/parser.factor
extra/html/parser/state/state-tests.factor [new file with mode: 0644]
extra/html/parser/state/state.factor [new file with mode: 0644]
extra/html/parser/utils/utils-tests.factor
extra/html/parser/utils/utils.factor
extra/icfp/2006/2006.factor
extra/inverse/inverse-docs.factor
extra/inverse/inverse-tests.factor
extra/inverse/inverse.factor
extra/io/serial/serial.factor
extra/iokit/hid/hid.factor
extra/irc/client/client-tests.factor
extra/irc/client/client.factor
extra/irc/messages/messages-tests.factor
extra/irc/messages/messages.factor
extra/irc/ui/load/load.factor
extra/irc/ui/ui.factor
extra/joystick-demo/joystick-demo.factor
extra/koszul/koszul-tests.factor
extra/koszul/koszul.factor
extra/lint/lint.factor
extra/literals/authors.txt [new file with mode: 0644]
extra/literals/literals-docs.factor [new file with mode: 0644]
extra/literals/literals-tests.factor
extra/literals/literals.factor
extra/literals/summary.txt [new file with mode: 0644]
extra/literals/tags.txt [new file with mode: 0644]
extra/log-viewer/log-viewer.factor
extra/mason/build/build.factor
extra/mason/child/child.factor
extra/mason/cleanup/cleanup.factor
extra/mason/common/common-tests.factor
extra/mason/common/common.factor
extra/mason/config/config.factor
extra/mason/help/help.factor
extra/mason/mason.factor
extra/mason/release/archive/archive.factor
extra/mason/release/branch/branch.factor
extra/mason/release/tidy/tidy.factor
extra/mason/test/test.factor
extra/math/binpack/binpack-docs.factor
extra/math/blas/cblas/authors.txt [deleted file]
extra/math/blas/cblas/cblas.factor [deleted file]
extra/math/blas/cblas/summary.txt [deleted file]
extra/math/blas/cblas/tags.txt [deleted file]
extra/math/blas/matrices/authors.txt [deleted file]
extra/math/blas/matrices/matrices-docs.factor [deleted file]
extra/math/blas/matrices/matrices-tests.factor [deleted file]
extra/math/blas/matrices/matrices.factor [deleted file]
extra/math/blas/matrices/summary.txt [deleted file]
extra/math/blas/matrices/tags.txt [deleted file]
extra/math/blas/syntax/authors.txt [deleted file]
extra/math/blas/syntax/summary.txt [deleted file]
extra/math/blas/syntax/syntax-docs.factor [deleted file]
extra/math/blas/syntax/syntax.factor [deleted file]
extra/math/blas/syntax/tags.txt [deleted file]
extra/math/blas/vectors/authors.txt [deleted file]
extra/math/blas/vectors/summary.txt [deleted file]
extra/math/blas/vectors/tags.txt [deleted file]
extra/math/blas/vectors/vectors-docs.factor [deleted file]
extra/math/blas/vectors/vectors-tests.factor [deleted file]
extra/math/blas/vectors/vectors.factor [deleted file]
extra/math/erato/erato-docs.factor [deleted file]
extra/math/erato/erato-tests.factor [deleted file]
extra/math/erato/erato.factor [deleted file]
extra/math/function-tools/function-tools.factor
extra/math/miller-rabin/authors.txt [deleted file]
extra/math/miller-rabin/miller-rabin-tests.factor [deleted file]
extra/math/miller-rabin/miller-rabin.factor [deleted file]
extra/math/miller-rabin/summary.txt [deleted file]
extra/math/primes/authors.txt [deleted file]
extra/math/primes/factors/authors.txt [deleted file]
extra/math/primes/factors/factors-docs.factor [deleted file]
extra/math/primes/factors/factors-tests.factor [deleted file]
extra/math/primes/factors/factors.factor [deleted file]
extra/math/primes/factors/summary.txt [deleted file]
extra/math/primes/list/authors.txt [deleted file]
extra/math/primes/list/list.factor [deleted file]
extra/math/primes/lists/authors.txt [new file with mode: 0644]
extra/math/primes/lists/lists-docs.factor [new file with mode: 0644]
extra/math/primes/lists/lists-tests.factor [new file with mode: 0644]
extra/math/primes/lists/lists.factor [new file with mode: 0644]
extra/math/primes/lists/summary.txt [new file with mode: 0644]
extra/math/primes/primes-docs.factor [deleted file]
extra/math/primes/primes-tests.factor [deleted file]
extra/math/primes/primes.factor [deleted file]
extra/math/primes/summary.txt [deleted file]
extra/math/text/english/english.factor
extra/math/text/french/authors.txt [new file with mode: 0644]
extra/math/text/french/french-docs.factor [new file with mode: 0644]
extra/math/text/french/french-tests.factor [new file with mode: 0644]
extra/math/text/french/french.factor [new file with mode: 0644]
extra/math/text/french/summary.txt [new file with mode: 0644]
extra/math/text/utils/authors.txt [new file with mode: 0644]
extra/math/text/utils/summary.txt [new file with mode: 0644]
extra/math/text/utils/utils-docs.factor [new file with mode: 0644]
extra/math/text/utils/utils-tests.factor [new file with mode: 0644]
extra/math/text/utils/utils.factor [new file with mode: 0644]
extra/math/trig/trig.factor
extra/multi-methods/multi-methods.factor
extra/multi-methods/tests/definitions.factor
extra/namespaces/lib/authors.txt [deleted file]
extra/namespaces/lib/lib-tests.factor [deleted file]
extra/namespaces/lib/lib.factor [deleted file]
extra/namespaces/lib/summary.txt [deleted file]
extra/namespaces/lib/tags.txt [deleted file]
extra/nehe/2/2.factor [new file with mode: 0644]
extra/nehe/2/authors.txt [new file with mode: 0755]
extra/nehe/3/3.factor [new file with mode: 0644]
extra/nehe/3/authors.txt [new file with mode: 0755]
extra/nehe/4/4.factor [new file with mode: 0644]
extra/nehe/4/authors.txt [new file with mode: 0755]
extra/nehe/5/5.factor [new file with mode: 0755]
extra/nehe/5/authors.txt [new file with mode: 0755]
extra/nehe/authors.txt [new file with mode: 0644]
extra/nehe/deploy.factor [new file with mode: 0755]
extra/nehe/nehe.factor [new file with mode: 0644]
extra/nehe/summary.txt [new file with mode: 0644]
extra/nehe/tags.txt [new file with mode: 0644]
extra/newfx/newfx.factor
extra/obj/alist/alist.factor [deleted file]
extra/obj/examples/todo/todo.factor [deleted file]
extra/obj/misc/misc.factor [deleted file]
extra/obj/obj.factor [deleted file]
extra/obj/papers/papers.factor [deleted file]
extra/obj/print/print.factor [deleted file]
extra/obj/util/util.factor [deleted file]
extra/obj/view/view.factor [deleted file]
extra/opengl/capabilities/authors.txt [deleted file]
extra/opengl/capabilities/capabilities-docs.factor [deleted file]
extra/opengl/capabilities/capabilities.factor [deleted file]
extra/opengl/capabilities/summary.txt [deleted file]
extra/opengl/capabilities/tags.txt [deleted file]
extra/opengl/demo-support/demo-support.factor
extra/opengl/framebuffers/authors.txt [deleted file]
extra/opengl/framebuffers/framebuffers-docs.factor [deleted file]
extra/opengl/framebuffers/framebuffers.factor [deleted file]
extra/opengl/framebuffers/summary.txt [deleted file]
extra/opengl/framebuffers/tags.txt [deleted file]
extra/opengl/gadgets/gadgets.factor
extra/opengl/shaders/authors.txt [deleted file]
extra/opengl/shaders/shaders-docs.factor [deleted file]
extra/opengl/shaders/shaders.factor [deleted file]
extra/opengl/shaders/summary.txt [deleted file]
extra/opengl/shaders/tags.txt [deleted file]
extra/oracle/authors.txt [deleted file]
extra/oracle/liboci/authors.txt [deleted file]
extra/oracle/liboci/liboci.factor [deleted file]
extra/oracle/oracle-tests.factor [deleted file]
extra/oracle/oracle.factor [deleted file]
extra/oracle/summary.txt [deleted file]
extra/oracle/tags.txt [deleted file]
extra/ori/ori.factor
extra/otug-talk/2bi.png [new file with mode: 0644]
extra/otug-talk/2bi_at.png [new file with mode: 0644]
extra/otug-talk/2bi_star.png [new file with mode: 0644]
extra/otug-talk/authors.txt [new file with mode: 0644]
extra/otug-talk/bi.png [new file with mode: 0644]
extra/otug-talk/bi_at.png [new file with mode: 0644]
extra/otug-talk/bi_star.png [new file with mode: 0644]
extra/otug-talk/otug-talk.factor [new file with mode: 0644]
extra/otug-talk/summary.txt [new file with mode: 0644]
extra/otug-talk/tags.txt [new file with mode: 0644]
extra/pack/authors.txt [deleted file]
extra/pack/pack-tests.factor [deleted file]
extra/pack/pack.factor [deleted file]
extra/parser-combinators/parser-combinators.factor
extra/parser-combinators/regexp/regexp.factor
extra/partial-continuations/partial-continuations-docs.factor
extra/partial-continuations/partial-continuations.factor
extra/porter-stemmer/authors.txt [deleted file]
extra/porter-stemmer/porter-stemmer-docs.factor [deleted file]
extra/porter-stemmer/porter-stemmer-tests.factor [deleted file]
extra/porter-stemmer/porter-stemmer.factor [deleted file]
extra/porter-stemmer/summary.txt [deleted file]
extra/porter-stemmer/test/output.txt [deleted file]
extra/porter-stemmer/test/voc.txt [deleted file]
extra/printf/authors.txt [deleted file]
extra/printf/printf-docs.factor [deleted file]
extra/printf/printf-tests.factor [deleted file]
extra/printf/printf.factor [deleted file]
extra/printf/summary.txt [deleted file]
extra/processing/gadget/gadget.factor [deleted file]
extra/processing/processing.factor [deleted file]
extra/project-euler/007/007.factor
extra/project-euler/010/010.factor
extra/project-euler/052/052.factor
extra/project-euler/057/057-tests.factor [new file with mode: 0644]
extra/project-euler/057/057.factor [new file with mode: 0644]
extra/project-euler/134/134.factor
extra/project-euler/215/215.factor
extra/project-euler/common/common.factor
extra/project-euler/project-euler.factor
extra/random-weighted/random-weighted.factor
extra/random/blum-blum-shub/blum-blum-shub.factor
extra/raptor/authors.txt [deleted file]
extra/raptor/config.factor [deleted file]
extra/raptor/cron/authors.txt [deleted file]
extra/raptor/cron/cron.factor [deleted file]
extra/raptor/cron/tags.txt [deleted file]
extra/raptor/cronjobs.factor [deleted file]
extra/raptor/raptor.factor [deleted file]
extra/raptor/readme [deleted file]
extra/raptor/tags.txt [deleted file]
extra/reports/noise/noise.factor
extra/rewrite-closures/rewrite-closures.factor
extra/roman/authors.txt [deleted file]
extra/roman/roman-docs.factor [deleted file]
extra/roman/roman-tests.factor [deleted file]
extra/roman/roman.factor [deleted file]
extra/roman/summary.txt [deleted file]
extra/roman/tags.txt [deleted file]
extra/self/self.factor
extra/sequences/complex-components/authors.txt [deleted file]
extra/sequences/complex-components/complex-components-docs.factor [deleted file]
extra/sequences/complex-components/complex-components-tests.factor [deleted file]
extra/sequences/complex-components/complex-components.factor [deleted file]
extra/sequences/complex-components/summary.txt [deleted file]
extra/sequences/complex-components/tags.txt [deleted file]
extra/sequences/complex/authors.txt [deleted file]
extra/sequences/complex/complex-docs.factor [deleted file]
extra/sequences/complex/complex-tests.factor [deleted file]
extra/sequences/complex/complex.factor [deleted file]
extra/sequences/complex/summary.txt [deleted file]
extra/sequences/complex/tags.txt [deleted file]
extra/sequences/lib/authors.txt [deleted file]
extra/sequences/lib/lib-docs.factor [deleted file]
extra/sequences/lib/lib-tests.factor [deleted file]
extra/sequences/lib/lib.factor [deleted file]
extra/sequences/lib/summary.txt [deleted file]
extra/sequences/lib/tags.txt [deleted file]
extra/sequences/merged/merged.factor
extra/sequences/n-based/authors.txt [new file with mode: 0644]
extra/sequences/n-based/n-based-docs.factor [new file with mode: 0644]
extra/sequences/n-based/n-based-tests.factor [new file with mode: 0644]
extra/sequences/n-based/n-based.factor [new file with mode: 0644]
extra/sequences/n-based/summary.txt [new file with mode: 0644]
extra/sequences/n-based/tags.txt [new file with mode: 0644]
extra/serial/serial.factor
extra/serial/windows/authors.txt [new file with mode: 0755]
extra/serial/windows/tags.txt [new file with mode: 0644]
extra/serial/windows/windows-tests.factor [new file with mode: 0755]
extra/serial/windows/windows.factor [new file with mode: 0755]
extra/shell/shell.factor
extra/slides/lib.factor [deleted file]
extra/slides/slides.factor
extra/soundex/author.txt [deleted file]
extra/soundex/soundex-tests.factor [deleted file]
extra/soundex/soundex.factor [deleted file]
extra/soundex/summary.txt [deleted file]
extra/spheres/spheres.factor
extra/state-machine/state-machine.factor
extra/strings/lib/lib-tests.factor [deleted file]
extra/strings/lib/lib.factor [deleted file]
extra/sudoku/sudoku.factor
extra/system-info/linux/linux.factor
extra/system-info/macosx/macosx.factor
extra/tar/tar.factor
extra/taxes/usa/federal/federal.factor
extra/taxes/usa/fica/fica.factor
extra/tetris/game/game.factor
extra/tetris/gl/gl.factor
extra/tetris/tetris.factor
extra/time/authors.txt [deleted file]
extra/time/time-docs.factor [deleted file]
extra/time/time-tests.factor [deleted file]
extra/time/time.factor [deleted file]
extra/trails/trails.factor
extra/ui/gadgets/frame-buffer/frame-buffer.factor [deleted file]
extra/ui/gadgets/slate/authors.txt [deleted file]
extra/ui/gadgets/slate/slate.factor [deleted file]
extra/units/units.factor
extra/update/backup/backup.factor
extra/update/latest/latest.factor
extra/update/update.factor
extra/usa-cities/usa-cities-tests.factor [new file with mode: 0644]
extra/usa-cities/usa-cities.factor
extra/vars/vars.factor
extra/vpri-talk/vpri-talk.factor
extra/webapps/calculator/calculator.factor
extra/webapps/calculator/calculator.xml
extra/webapps/counter/counter.xml
extra/webapps/help/help.factor
extra/webapps/imagebin/authors.txt [new file with mode: 0644]
extra/webapps/imagebin/imagebin.factor [new file with mode: 0755]
extra/webapps/imagebin/upload-image.xml [new file with mode: 0644]
extra/webapps/imagebin/uploaded-image.xml [new file with mode: 0644]
extra/webapps/irc-log/irc-log.factor
extra/webapps/pastebin/pastebin.factor
extra/webapps/planet/planet.factor
extra/webapps/wiki/wiki.factor
extra/webkit-demo/deploy.factor
extra/websites/concatenative/concatenative.factor
extra/wordtimer/wordtimer.factor
license.txt
misc/factor.vim [deleted file]
misc/fuel/README
misc/fuel/factor-mode.el
misc/fuel/fu.el
misc/fuel/fuel-autodoc.el [new file with mode: 0644]
misc/fuel/fuel-base.el
misc/fuel/fuel-completion.el [new file with mode: 0644]
misc/fuel/fuel-connection.el
misc/fuel/fuel-debug-uses.el [new file with mode: 0644]
misc/fuel/fuel-debug.el
misc/fuel/fuel-edit.el [new file with mode: 0644]
misc/fuel/fuel-eval.el
misc/fuel/fuel-font-lock.el
misc/fuel/fuel-help.el
misc/fuel/fuel-listener.el
misc/fuel/fuel-log.el [new file with mode: 0644]
misc/fuel/fuel-markup.el [new file with mode: 0644]
misc/fuel/fuel-mode.el
misc/fuel/fuel-popup.el [new file with mode: 0644]
misc/fuel/fuel-refactor.el [new file with mode: 0644]
misc/fuel/fuel-scaffold.el [new file with mode: 0644]
misc/fuel/fuel-stack.el [new file with mode: 0644]
misc/fuel/fuel-syntax.el
misc/fuel/fuel-table.el [new file with mode: 0644]
misc/fuel/fuel-xref.el [new file with mode: 0644]
misc/vim/README [new file with mode: 0644]
misc/vim/ftdetect/factor.vim [new file with mode: 0644]
misc/vim/ftplugin/factor_settings.vim [new file with mode: 0644]
misc/vim/syntax/factor.vim [new file with mode: 0644]
unfinished/benchmark/richards/richards.factor
unmaintained/4DNav/4DNav-docs.factor [new file with mode: 0755]
unmaintained/4DNav/4DNav.factor [new file with mode: 0755]
unmaintained/4DNav/authors.txt [new file with mode: 0755]
unmaintained/4DNav/camera/authors.txt [new file with mode: 0755]
unmaintained/4DNav/camera/camera-docs.factor [new file with mode: 0755]
unmaintained/4DNav/camera/camera.factor [new file with mode: 0755]
unmaintained/4DNav/deep/deep-docs.factor [new file with mode: 0755]
unmaintained/4DNav/deep/deep.factor [new file with mode: 0755]
unmaintained/4DNav/deploy.factor [new file with mode: 0755]
unmaintained/4DNav/file-chooser/authors.txt [new file with mode: 0755]
unmaintained/4DNav/file-chooser/file-chooser.factor [new file with mode: 0755]
unmaintained/4DNav/hypercube.xml [new file with mode: 0755]
unmaintained/4DNav/light_test.xml [new file with mode: 0755]
unmaintained/4DNav/multi solids.xml [new file with mode: 0755]
unmaintained/4DNav/prismetriagone.xml [new file with mode: 0755]
unmaintained/4DNav/space-file-decoder/authors.txt [new file with mode: 0755]
unmaintained/4DNav/space-file-decoder/space-file-decoder-docs.factor [new file with mode: 0755]
unmaintained/4DNav/space-file-decoder/space-file-decoder.factor [new file with mode: 0755]
unmaintained/4DNav/summary.txt [new file with mode: 0755]
unmaintained/4DNav/tags.txt [new file with mode: 0755]
unmaintained/4DNav/triancube.xml [new file with mode: 0755]
unmaintained/4DNav/turtle/authors.txt [new file with mode: 0755]
unmaintained/4DNav/turtle/turtle-docs.factor [new file with mode: 0755]
unmaintained/4DNav/turtle/turtle.factor [new file with mode: 0755]
unmaintained/4DNav/window3D/authors.txt [new file with mode: 0755]
unmaintained/4DNav/window3D/window3D-docs.factor [new file with mode: 0755]
unmaintained/4DNav/window3D/window3D.factor [new file with mode: 0755]
unmaintained/adsoda/adsoda-docs.factor [new file with mode: 0755]
unmaintained/adsoda/adsoda-tests.factor [new file with mode: 0755]
unmaintained/adsoda/adsoda.factor [new file with mode: 0755]
unmaintained/adsoda/adsoda.tests [new file with mode: 0755]
unmaintained/adsoda/authors.txt [new file with mode: 0755]
unmaintained/adsoda/combinators/authors.txt [new file with mode: 0755]
unmaintained/adsoda/combinators/combinators-docs.factor [new file with mode: 0755]
unmaintained/adsoda/combinators/combinators-tests.factor [new file with mode: 0755]
unmaintained/adsoda/combinators/combinators.factor [new file with mode: 0755]
unmaintained/adsoda/solution2/solution2.factor [new file with mode: 0755]
unmaintained/adsoda/solution2/summary.txt [new file with mode: 0755]
unmaintained/adsoda/summary.txt [new file with mode: 0755]
unmaintained/adsoda/tags.txt [new file with mode: 0755]
unmaintained/adsoda/tools/authors.txt [new file with mode: 0755]
unmaintained/adsoda/tools/tools-docs.factor [new file with mode: 0755]
unmaintained/adsoda/tools/tools-tests.factor [new file with mode: 0755]
unmaintained/adsoda/tools/tools.factor [new file with mode: 0755]
unmaintained/assocs-lib/authors.txt [new file with mode: 0644]
unmaintained/assocs-lib/lib-tests.factor [new file with mode: 0644]
unmaintained/assocs-lib/lib.factor [new file with mode: 0755]
unmaintained/assocs-lib/summary.txt [new file with mode: 0644]
unmaintained/assocs-lib/tags.txt [new file with mode: 0644]
unmaintained/bake/authors.txt [new file with mode: 0644]
unmaintained/bake/bake-tests.factor [new file with mode: 0644]
unmaintained/bake/bake.factor [new file with mode: 0644]
unmaintained/bake/fry/fry-tests.factor [new file with mode: 0755]
unmaintained/bake/fry/fry.factor [new file with mode: 0644]
unmaintained/bake/summary.txt [new file with mode: 0644]
unmaintained/bitfields/authors.txt [new file with mode: 0644]
unmaintained/bitfields/bitfields-docs.factor [new file with mode: 0644]
unmaintained/bitfields/bitfields-tests.factor [new file with mode: 0755]
unmaintained/bitfields/bitfields.factor [new file with mode: 0755]
unmaintained/bitfields/summary.txt [new file with mode: 0644]
unmaintained/bitfields/tags.txt [new file with mode: 0644]
unmaintained/combinators-lib/authors.txt [new file with mode: 0755]
unmaintained/combinators-lib/lib-docs.factor [new file with mode: 0755]
unmaintained/combinators-lib/lib-tests.factor [new file with mode: 0755]
unmaintained/combinators-lib/lib.factor [new file with mode: 0755]
unmaintained/fs/authors.txt [new file with mode: 0755]
unmaintained/fs/fs.factor [new file with mode: 0644]
unmaintained/fs/tags.txt [new file with mode: 0644]
unmaintained/golden-section/authors.txt [deleted file]
unmaintained/golden-section/deploy.factor [deleted file]
unmaintained/golden-section/golden-section.factor [deleted file]
unmaintained/golden-section/summary.txt [deleted file]
unmaintained/golden-section/tags.txt [deleted file]
unmaintained/if/authors.txt [new file with mode: 0755]
unmaintained/if/if.factor [new file with mode: 0644]
unmaintained/if/tags.txt [new file with mode: 0644]
unmaintained/ifreq/authors.txt [new file with mode: 0755]
unmaintained/ifreq/ifreq.factor [new file with mode: 0644]
unmaintained/ifreq/tags.txt [new file with mode: 0644]
unmaintained/lsys/authors.txt [deleted file]
unmaintained/lsys/strings/authors.txt [deleted file]
unmaintained/lsys/strings/interpret/authors.txt [deleted file]
unmaintained/lsys/strings/interpret/interpret.factor [deleted file]
unmaintained/lsys/strings/rewrite/authors.txt [deleted file]
unmaintained/lsys/strings/rewrite/rewrite.factor [deleted file]
unmaintained/lsys/strings/strings.factor [deleted file]
unmaintained/lsys/summary.txt [deleted file]
unmaintained/lsys/tags.txt [deleted file]
unmaintained/lsys/tortoise/authors.txt [deleted file]
unmaintained/lsys/tortoise/graphics/authors.txt [deleted file]
unmaintained/lsys/tortoise/graphics/graphics.factor [deleted file]
unmaintained/lsys/tortoise/tortoise.factor [deleted file]
unmaintained/lsys/ui/authors.txt [deleted file]
unmaintained/lsys/ui/deploy.factor [deleted file]
unmaintained/lsys/ui/tags.txt [deleted file]
unmaintained/lsys/ui/ui.factor [deleted file]
unmaintained/namespaces-lib/authors.txt [new file with mode: 0644]
unmaintained/namespaces-lib/lib-tests.factor [new file with mode: 0755]
unmaintained/namespaces-lib/lib.factor [new file with mode: 0755]
unmaintained/namespaces-lib/summary.txt [new file with mode: 0644]
unmaintained/namespaces-lib/tags.txt [new file with mode: 0644]
unmaintained/nehe/2/2.factor [deleted file]
unmaintained/nehe/2/authors.txt [deleted file]
unmaintained/nehe/3/3.factor [deleted file]
unmaintained/nehe/3/authors.txt [deleted file]
unmaintained/nehe/4/4.factor [deleted file]
unmaintained/nehe/4/authors.txt [deleted file]
unmaintained/nehe/5/5.factor [deleted file]
unmaintained/nehe/5/authors.txt [deleted file]
unmaintained/nehe/authors.txt [deleted file]
unmaintained/nehe/deploy.factor [deleted file]
unmaintained/nehe/nehe.factor [deleted file]
unmaintained/nehe/summary.txt [deleted file]
unmaintained/nehe/tags.txt [deleted file]
unmaintained/obj/alist/alist.factor [new file with mode: 0644]
unmaintained/obj/examples/todo/todo.factor [new file with mode: 0644]
unmaintained/obj/misc/misc.factor [new file with mode: 0644]
unmaintained/obj/obj.factor [new file with mode: 0644]
unmaintained/obj/papers/papers.factor [new file with mode: 0644]
unmaintained/obj/print/print.factor [new file with mode: 0644]
unmaintained/obj/util/util.factor [new file with mode: 0644]
unmaintained/obj/view/view.factor [new file with mode: 0644]
unmaintained/oracle/authors.txt [new file with mode: 0644]
unmaintained/oracle/liboci/authors.txt [new file with mode: 0755]
unmaintained/oracle/liboci/liboci.factor [new file with mode: 0644]
unmaintained/oracle/oracle-tests.factor [new file with mode: 0755]
unmaintained/oracle/oracle.factor [new file with mode: 0644]
unmaintained/oracle/summary.txt [new file with mode: 0644]
unmaintained/oracle/tags.txt [new file with mode: 0644]
unmaintained/plot/plot.factor [deleted file]
unmaintained/raptor/authors.txt [new file with mode: 0755]
unmaintained/raptor/config.factor [new file with mode: 0644]
unmaintained/raptor/cron/authors.txt [new file with mode: 0755]
unmaintained/raptor/cron/cron.factor [new file with mode: 0755]
unmaintained/raptor/cron/tags.txt [new file with mode: 0644]
unmaintained/raptor/cronjobs.factor [new file with mode: 0644]
unmaintained/raptor/raptor.factor [new file with mode: 0755]
unmaintained/raptor/readme [new file with mode: 0644]
unmaintained/raptor/tags.txt [new file with mode: 0644]
unmaintained/route/authors.txt [new file with mode: 0755]
unmaintained/route/route.factor [new file with mode: 0644]
unmaintained/route/tags.txt [new file with mode: 0644]
unmaintained/sequences-lib/authors.txt [new file with mode: 0644]
unmaintained/sequences-lib/lib-docs.factor [new file with mode: 0755]
unmaintained/sequences-lib/lib-tests.factor [new file with mode: 0755]
unmaintained/sequences-lib/lib.factor [new file with mode: 0755]
unmaintained/sequences-lib/summary.txt [new file with mode: 0644]
unmaintained/sequences-lib/tags.txt [new file with mode: 0644]
unmaintained/size-of/size-of.factor
unmaintained/sockios/authors.txt [new file with mode: 0755]
unmaintained/sockios/sockios.factor [new file with mode: 0644]
unmaintained/sockios/tags.txt [new file with mode: 0644]
unmaintained/strings-lib/lib-tests.factor [new file with mode: 0644]
unmaintained/strings-lib/lib.factor [new file with mode: 0644]
unmaintained/swap/authors.txt [new file with mode: 0755]
unmaintained/swap/swap.factor [new file with mode: 0644]
unmaintained/swap/tags.txt [new file with mode: 0644]
unmaintained/tiling/tiling.factor [deleted file]
unmaintained/turtle/authors.txt [deleted file]
unmaintained/turtle/turtle.factor [deleted file]
unmaintained/ui/gadgets/plot/plot.factor [new file with mode: 0644]
unmaintained/ui/gadgets/slate/authors.txt [new file with mode: 0755]
unmaintained/ui/gadgets/slate/slate.factor [new file with mode: 0644]
unmaintained/ui/gadgets/tiling/tiling.factor [new file with mode: 0644]
unmaintained/xml/syntax/syntax.factor [deleted file]
vm/Config.windows.nt
vm/Config.windows.nt.x86.32
vm/Config.windows.nt.x86.64
vm/callstack.c
vm/callstack.h
vm/code_block.c [new file with mode: 0644]
vm/code_block.h [new file with mode: 0644]
vm/code_gc.c
vm/code_gc.h
vm/code_heap.c
vm/code_heap.h
vm/cpu-ppc.S
vm/data_gc.c
vm/data_gc.h
vm/data_heap.c [new file with mode: 0644]
vm/data_heap.h [new file with mode: 0644]
vm/debug.c
vm/factor.c
vm/factor.h
vm/image.c
vm/image.h
vm/layouts.h
vm/local_roots.h [new file with mode: 0644]
vm/main-unix.c
vm/main-windows-ce.c
vm/main-windows-nt.c
vm/master.h
vm/os-unix.c
vm/os-unix.h
vm/os-windows-nt.c
vm/os-windows-nt.h
vm/os-windows.c
vm/os-windows.h
vm/primitives.c
vm/profiler.c
vm/profiler.h
vm/quotations.c
vm/quotations.h
vm/types.c
vm/write_barrier.h [new file with mode: 0644]

index f4334f37278ce8cfb2aa838fc2eda20635f93e9b..a7cbeeeef3ff73e95b6411eb112505e050b18843 100644 (file)
@@ -21,3 +21,4 @@ logs
 work
 build-support/wordsize
 *.bak
+.#*
index a8943d0d32f507a804ad341bef02ea8aaefef533..c87520d0fdf3ab76cbba2a98ed82c6902f08a4b2 100644 (file)
@@ -32,7 +32,7 @@
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>NSHumanReadableCopyright</key>
-       <string>Copyright Â© 2003-2008, Slava Pestov and friends</string>
+       <string>Copyright Â© 2003-2009, Slava Pestov and friends</string>
        <key>NSServices</key>
        <array>
                <dict>
index ffcbf6364c2544f1a4a4be579a0ed984faf2e41d..b41e75672960061aeb87d889bd9ec080997a4fc1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ AR = ar
 LD = ld
 
 EXECUTABLE = factor
+CONSOLE_EXECUTABLE = factor-console
 VERSION = 0.92
 
 IMAGE = factor.image
@@ -25,23 +26,25 @@ ENGINE = $(DLL_PREFIX)factor$(DLL_SUFFIX)$(DLL_EXTENSION)
 DLL_OBJS = $(PLAF_DLL_OBJS) \
        vm/alien.o \
        vm/bignum.o \
+       vm/callstack.o \
+       vm/code_block.o \
+       vm/code_gc.o \
        vm/code_heap.o \
+       vm/data_gc.o \
+       vm/data_heap.o \
        vm/debug.o \
+       vm/errors.o \
        vm/factor.o \
        vm/ffi_test.o \
        vm/image.o \
        vm/io.o \
        vm/math.o \
-       vm/data_gc.o \
-       vm/code_gc.o \
        vm/primitives.o \
+       vm/profiler.o \
+       vm/quotations.o \
        vm/run.o \
-       vm/callstack.o \
        vm/types.o \
-       vm/quotations.o \
-       vm/utilities.o \
-       vm/errors.o \
-       vm/profiler.o
+       vm/utilities.o
 
 EXE_OBJS = $(PLAF_EXE_OBJS)
 
@@ -136,9 +139,11 @@ zlib1.dll:
 
 winnt-x86-32: freetype6.dll zlib1.dll
        $(MAKE) $(EXECUTABLE) CONFIG=vm/Config.windows.nt.x86.32
+       $(MAKE) $(CONSOLE_EXECUTABLE) CONFIG=vm/Config.windows.nt.x86.32
 
 winnt-x86-64:
        $(MAKE) $(EXECUTABLE) CONFIG=vm/Config.windows.nt.x86.64
+       $(MAKE) $(CONSOLE_EXECUTABLE) CONFIG=vm/Config.windows.nt.x86.64
 
 wince-arm:
        $(MAKE) $(EXECUTABLE) CONFIG=vm/Config.windows.ce.arm
@@ -159,6 +164,11 @@ factor: $(DLL_OBJS) $(EXE_OBJS)
        $(CC) $(LIBS) $(LIBPATH) -L. $(LINK_WITH_ENGINE) \
                $(CFLAGS) -o $@$(EXE_SUFFIX)$(EXE_EXTENSION) $(EXE_OBJS)
 
+factor-console: $(DLL_OBJS) $(EXE_OBJS)
+       $(LINKER) $(ENGINE) $(DLL_OBJS)
+       $(CC) $(LIBS) $(LIBPATH) -L. $(LINK_WITH_ENGINE) \
+               $(CFLAGS) $(CFLAGS_CONSOLE) -o $@$(EXE_SUFFIX)$(EXE_EXTENSION) $(EXE_OBJS)
+
 clean:
        rm -f vm/*.o
        rm -f factor*.dll libfactor.{a,so,dylib}
diff --git a/basis/alias/alias-docs.factor b/basis/alias/alias-docs.factor
deleted file mode 100644 (file)
index 3f2eee6..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: kernel words help.markup help.syntax ;
-IN: alias
-
-HELP: ALIAS:
-{ $syntax "ALIAS: new-word existing-word" }
-{ $values { "new-word" word } { "existing-word" word } }
-{ $description "Creates a " { $snippet "new" } " inlined word that calls the " { $snippet "existing" } " word." }
-{ $examples
-    { $example "USING: alias prettyprint sequences ;"
-               "IN: alias.test"
-               "ALIAS: sequence-nth nth"
-               "0 { 10 20 30 } sequence-nth ."
-               "10"
-    }
-} ;
-
-ARTICLE: "alias" "Word aliasing"
-"The " { $vocab-link "alias" } " vocabulary implements a way to make many different names for the same word. Although creating new names for words is generally frowned upon, aliases are useful for the Win32 API and other cases where words need to be renamed for symmetry." $nl 
-"Make a new word that aliases another word:"
-{ $subsection define-alias }
-"Make an alias at parse-time:"
-{ $subsection POSTPONE: ALIAS: } ;
-
-ABOUT: "alias"
diff --git a/basis/alias/alias.factor b/basis/alias/alias.factor
deleted file mode 100644 (file)
index 4de4d83..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.\r
-! See http://factorcode.org/license.txt for BSD license.\r
-USING: accessors words quotations kernel effects sequences parser ;\r
-IN: alias\r
-\r
-PREDICATE: alias < word "alias" word-prop ;\r
-\r
-M: alias reset-word\r
-    [ call-next-method ] [ f "alias" set-word-prop ] bi ;\r
-\r
-M: alias stack-effect\r
-    def>> first stack-effect ;\r
-\r
-: define-alias ( new old -- )\r
-    [ 1quotation define-inline ]\r
-    [ drop t "alias" set-word-prop ] 2bi ;\r
-\r
-: ALIAS: CREATE-WORD scan-word define-alias ; parsing\r
diff --git a/basis/alias/authors.txt b/basis/alias/authors.txt
deleted file mode 100644 (file)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/alias/summary.txt b/basis/alias/summary.txt
deleted file mode 100644 (file)
index 15690a7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Defining multiple words with the same name
index 31542b2699eb94224500aa3c5fe181e47d4f9fa0..40171f56e7917bda2b0916c6c1903f61672ca30d 100644 (file)
@@ -8,10 +8,6 @@ sequences system libc alien.strings io.encodings.utf8 ;
 
 [ { "blah" 123 } ] [ { "blah" xyz } expand-constants ] unit-test
 
-: foo ( -- n ) &: fdafd [ 123 ] unless* ;
-
-[ 123 ] [ foo ] unit-test
-
 [ -1 ] [ -1 <char> *char ] unit-test
 [ -1 ] [ -1 <short> *short ] unit-test
 [ -1 ] [ -1 <int> *int ] unit-test
index ae148e3ac06f6263c204934bc5b21dc30fdd793f..d1354cb04e03f584263c69250a494b1047321b54 100644 (file)
@@ -234,17 +234,16 @@ M: long-long-type box-return ( type -- )
     f swap box-parameter ;
 
 : define-deref ( name -- )
-    [ CHAR: * prefix "alien.c-types" create ]
-    [ c-getter 0 prefix ] bi
-    define-inline ;
+    [ CHAR: * prefix "alien.c-types" create ] [ c-getter 0 prefix ] bi
+    (( c-ptr -- value )) define-inline ;
 
 : define-out ( name -- )
     [ "alien.c-types" constructor-word ]
-    [ dup c-setter '[ _ <c-object> [ 0 @ ] keep ] ]
-    bi define-inline ;
+    [ dup c-setter '[ _ <c-object> [ 0 @ ] keep ] ] bi
+    (( value -- c-ptr )) define-inline ;
 
 : c-bool> ( int -- ? )
-    zero? not ;
+    0 = not ; inline
 
 : define-primitive-type ( type name -- )
     [ typedef ]
diff --git a/basis/alien/remote-control/remote-control-tests.factor b/basis/alien/remote-control/remote-control-tests.factor
new file mode 100644 (file)
index 0000000..8b6c5e9
--- /dev/null
@@ -0,0 +1,44 @@
+USING: interpolate multiline
+io io.directories io.encodings.ascii io.files
+io.files.temp io.launcher io.streams.string kernel locals system
+tools.test sequences ;
+IN: alien.remote-control.tests
+
+: compile-file ( contents -- )
+    "test.c" ascii set-file-contents
+    { "gcc" "-I../" "-L.." "-lfactor" "test.c" }
+    os macosx? cpu x86.64? and [ "-m64" suffix ] when
+    try-process ;
+
+: run-test ( -- line )
+    os windows? "temp/a.exe" "temp/a.out" ?
+    ascii [ readln ] with-process-reader ;
+
+:: test-embedding ( code -- line )
+    image :> image
+
+    [
+        I[
+#include <vm/master.h>
+#include <stdio.h>
+#include <stdbool.h>
+
+int main(int argc, char **argv)
+{
+    F_PARAMETERS p;
+    default_parameters(&p);
+    p.image_path = STRING_LITERAL("${image}");
+    init_factor(&p);
+    start_embedded_factor(&p);
+    ${code}
+    printf("Done.\n");
+    return 0;
+}
+        ]I
+    ] with-string-writer
+    "resource:temp" [ compile-file ] with-directory
+    "resource:" [ run-test ] with-directory ;
+
+! [ "Done." ] [ "" test-embedding ] unit-test
+
+! [ "Done." ] [ "factor_yield();" test-embedding ] unit-test
\ No newline at end of file
index 9cd9050ea86544163df0ac459e91ccfa96db5780..4da06ec4c96ba23bc60cdc034210bbd3488d8af6 100644 (file)
@@ -15,7 +15,7 @@ IN: alien.remote-control
     "void" { "long" } "cdecl" [ sleep ] alien-callback ;
 
 : ?callback ( word -- alien )
-    dup compiled>> [ execute ] [ drop f ] if ; inline
+    dup optimized>> [ execute ] [ drop f ] if ; inline
 
 : init-remote-control ( -- )
     \ eval-callback ?callback 16 setenv
diff --git a/basis/alien/strings/windows/tags.txt b/basis/alien/strings/windows/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
index abce91f56f45ecc86705f76b054beb77394596a0..f5537fa23994d2320f98af4f5859d00845191231 100644 (file)
@@ -52,8 +52,8 @@ PREDICATE: slot-writer < word "writing" word-prop >boolean ;
         [ (>>offset) ] [ type>> heap-size + ] 2bi
     ] reduce ;
 
-: define-struct-slot-word ( word quot spec -- )
-    offset>> prefix define-inline ;
+: define-struct-slot-word ( word quot spec effect -- )
+    [ offset>> prefix ] dip define-inline ;
 
 : define-getter ( type spec -- )
     [ set-reader-props ] keep
@@ -62,11 +62,13 @@ PREDICATE: slot-writer < word "writing" word-prop >boolean ;
         type>>
         [ c-getter ] [ c-type-boxer-quot ] bi append
     ]
-    [ ] tri define-struct-slot-word ;
+    [ ] tri
+    (( c-ptr -- value )) define-struct-slot-word ;
 
 : define-setter ( type spec -- )
     [ set-writer-props ] keep
-    [ writer>> ] [ type>> c-setter ] [ ] tri define-struct-slot-word ;
+    [ writer>> ] [ type>> c-setter ] [ ] tri
+    (( value c-ptr -- )) define-struct-slot-word ;
 
 : define-field ( type spec -- )
     [ define-getter ] [ define-setter ] 2bi ;
index 15d82884f9c82e6fa18bd4e3511a94471efe1f35..bed454e81d1625aac2b335f83c9c1291904ef782 100644 (file)
@@ -4,7 +4,7 @@ USING: accessors arrays alien alien.c-types alien.structs
 alien.arrays alien.strings kernel math namespaces parser
 sequences words quotations math.parser splitting grouping
 effects assocs combinators lexer strings.parser alien.parser 
-fry ;
+fry vocabs.parser words.constant ;
 IN: alien.syntax
 
 : DLL" lexer get skip-blank parse-string dlopen parsed ; parsing
@@ -31,10 +31,11 @@ IN: alien.syntax
 
 : C-ENUM:
     ";" parse-tokens
-    dup length
-    [ [ create-in ] dip 1quotation define ] 2each ;
+    [ [ create-in ] dip define-constant ] each-index ;
     parsing
 
+: address-of ( name library -- value )
+    load-library dlsym [ "No such symbol" throw ] unless* ;
+
 : &:
-    scan "c-library" get
-    '[ _ _ load-library dlsym ] over push-all ; parsing
+    scan "c-library" get '[ _ _ address-of ] over push-all ; parsing
index 6af697cf8935c09020d4a3846beb283eb2ea76bb..b2bbc16836cbd738614c9d6b950a3b55777c9520 100644 (file)
@@ -37,8 +37,30 @@ HELP: quotable?
 { $values { "ch" "a character" } { "?" "a boolean" } }\r
 { $description "Tests for characters which may appear in a Factor string literal without escaping." } ;\r
 \r
-ARTICLE: "ascii" "ASCII character classes"\r
-"The " { $vocab-link "ascii" } " vocabulary implements traditional ASCII character classes:"\r
+HELP: ascii?\r
+{ $values { "ch" "a character" } { "?" "a boolean" } }\r
+{ $description "Tests for whether a number is an ASCII character." } ;\r
+\r
+HELP: ch>lower\r
+{ $values { "ch" "a character" } { "lower" "a character" } }\r
+{ $description "Converts an ASCII character to lower case." } ;\r
+\r
+HELP: ch>upper\r
+{ $values { "ch" "a character" } { "upper" "a character" } }\r
+{ $description "Converts an ASCII character to upper case." } ;\r
+\r
+HELP: >lower\r
+{ $values { "str" "a string" } { "lower" "a string" } }\r
+{ $description "Converts an ASCII string to lower case." } ;\r
+\r
+HELP: >upper\r
+{ $values { "str" "a string" } { "upper" "a string" } }\r
+{ $description "Converts an ASCII string to upper case." } ;\r
+\r
+ARTICLE: "ascii" "ASCII"\r
+"The " { $vocab-link "ascii" } " vocabulary implements support for the legacy ASCII character set. Most applications should use " { $link "unicode" } " instead."\r
+$nl\r
+"ASCII character classes:"\r
 { $subsection blank? }\r
 { $subsection letter? }\r
 { $subsection LETTER? }\r
@@ -46,6 +68,11 @@ ARTICLE: "ascii" "ASCII character classes"
 { $subsection printable? }\r
 { $subsection control? }\r
 { $subsection quotable? }\r
-"Modern applications should use Unicode 5.0 instead (" { $vocab-link "unicode.categories" } ")." ;\r
+{ $subsection ascii? }\r
+"ASCII case conversion:"\r
+{ $subsection ch>lower }\r
+{ $subsection ch>upper }\r
+{ $subsection >lower }\r
+{ $subsection >upper } ;\r
 \r
 ABOUT: "ascii"\r
index 7dacce734b7562da14a0f8be48a076ac7c763faf..6f39b32a0110c906865162ff2ce1895e0479df18 100644 (file)
@@ -12,3 +12,8 @@ IN: ascii.tests
     0 "There are Four Upper Case characters"
     [ LETTER? [ 1+ ] when ] each
 ] unit-test
+
+[ t f ] [ CHAR: \s ascii? 400 ascii? ] unit-test
+
+[ "HELLO HOW ARE YOU?" ] [ "hellO hOw arE YOU?" >upper ] unit-test
+[ "i'm good thx bai" ] [ "I'm Good THX bai" >lower ] unit-test
index c009c66cde33a2f7b796679f1a83ab045f455ddf..193e847d2714ee868e2e195373a067557bcf6b89 100644 (file)
@@ -1,27 +1,23 @@
-! Copyright (C) 2005, 2008 Slava Pestov.\r
+! Copyright (C) 2005, 2009 Slava Pestov.\r
 ! See http://factorcode.org/license.txt for BSD license.\r
-USING: kernel math math.order sequences\r
-combinators.short-circuit ;\r
+USING: kernel math math.order sequences strings\r
+combinators.short-circuit hints ;\r
 IN: ascii\r
 \r
+: ascii? ( ch -- ? ) 0 127 between? ; inline\r
 : blank? ( ch -- ? ) " \t\n\r" member? ; inline\r
-\r
 : letter? ( ch -- ? ) CHAR: a CHAR: z between? ; inline\r
-\r
 : LETTER? ( ch -- ? ) CHAR: A CHAR: Z between? ; inline\r
-\r
 : digit? ( ch -- ? ) CHAR: 0 CHAR: 9 between? ; inline\r
-\r
 : printable? ( ch -- ? ) CHAR: \s CHAR: ~ between? ; inline\r
-\r
-: control? ( ch -- ? )\r
-    "\0\e\r\n\t\u000008\u00007f" member? ; inline\r
-\r
-: quotable? ( ch -- ? )\r
-    dup printable? [ "\"\\" member? not ] [ drop f ] if ; inline\r
-\r
-: Letter? ( ch -- ? )\r
-    [ [ letter? ] [ LETTER? ] ] 1|| ;\r
-\r
-: alpha? ( ch -- ? )\r
-    [ [ Letter? ] [ digit? ] ] 1|| ;\r
+: control? ( ch -- ? ) "\0\e\r\n\t\u000008\u00007f" member? ; inline\r
+: quotable? ( ch -- ? ) { [ printable? ] [ "\"\\" member? not ] } 1&& ; inline\r
+: Letter? ( ch -- ? ) { [ letter? ] [ LETTER? ] } 1|| ; inline\r
+: alpha? ( ch -- ? ) { [ Letter? ] [ digit? ] } 1|| ; inline\r
+: ch>lower ( ch -- lower ) dup LETTER? [ HEX: 20 + ] when ; inline\r
+: >lower ( str -- lower ) [ ch>lower ] map ;\r
+: ch>upper ( ch -- upper ) dup letter? [ HEX: 20 - ] when ; inline\r
+: >upper ( str -- upper ) [ ch>upper ] map ;\r
+\r
+HINTS: >lower string ;\r
+HINTS: >upper string ;
\ No newline at end of file
diff --git a/basis/assoc-heaps/assoc-heaps-docs.factor b/basis/assoc-heaps/assoc-heaps-docs.factor
new file mode 100644 (file)
index 0000000..b148995
--- /dev/null
@@ -0,0 +1,32 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax io.streams.string assocs
+heaps.private ;
+IN: assoc-heaps
+
+HELP: <assoc-heap>
+{ $values { "assoc" assoc } { "heap" heap } { "assoc-heap" assoc-heap } }
+{ $description "Constructs a new " { $link assoc-heap } " from two existing data structures." } ;
+
+HELP: <unique-max-heap>
+{ $values { "unique-heap" assoc-heap } }
+{ $description "Creates a new " { $link assoc-heap } " where the assoc is a hashtable and the heap is a max-heap. Popping an element from the heap leaves this element in the hashtable to ensure that the element will not be processed again." } ;
+
+HELP: <unique-min-heap>
+{ $values { "unique-heap" assoc-heap } }
+{ $description "Creates a new " { $link assoc-heap } " where the assoc is a hashtable and the heap is a min-heap. Popping an element from the heap leaves this element in the hashtable to ensure that the element will not be processed again." } ;
+
+{ <unique-max-heap> <unique-min-heap> } related-words
+
+HELP: assoc-heap
+{ $description "A data structure containing an assoc and a heap to get certain properties with better time constraints at the expense of more space and complexity. For instance, a hashtable and a heap can be combined into one assoc-heap to get a sorted data structure with O(1) lookup. Operations on assoc-heap may update both the assoc and the heap or leave them out of sync if it's advantageous." } ;
+
+ARTICLE: "assoc-heaps" "Associative heaps"
+"The " { $vocab-link "assoc-heaps" } " vocabulary combines exists to synthesize data structures with better time properties than either of the two component data structures alone." $nl
+"Associative heap constructor:"
+{ $subsection <assoc-heap> }
+"Unique heaps:"
+{ $subsection <unique-min-heap> }
+{ $subsection <unique-max-heap> } ;
+
+ABOUT: "assoc-heaps"
diff --git a/basis/assoc-heaps/assoc-heaps-tests.factor b/basis/assoc-heaps/assoc-heaps-tests.factor
new file mode 100644 (file)
index 0000000..6ea3fe1
--- /dev/null
@@ -0,0 +1,4 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: tools.test assoc-heaps ;
+IN: assoc-heaps.tests
diff --git a/basis/assoc-heaps/assoc-heaps.factor b/basis/assoc-heaps/assoc-heaps.factor
new file mode 100644 (file)
index 0000000..a495aed
--- /dev/null
@@ -0,0 +1,30 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors assocs hashtables heaps kernel ;
+IN: assoc-heaps
+
+TUPLE: assoc-heap assoc heap ;
+
+C: <assoc-heap> assoc-heap
+
+: <unique-min-heap> ( -- unique-heap )
+    H{ } clone <min-heap> <assoc-heap> ;
+
+: <unique-max-heap> ( -- unique-heap )
+    H{ } clone <max-heap> <assoc-heap> ;
+
+M: assoc-heap heap-push* ( value key assoc-heap -- entry )
+    pick over assoc>> key? [
+        3drop f
+    ] [
+        [ assoc>> swapd set-at ] [ heap>> heap-push* ] 3bi
+    ] if ;
+
+M: assoc-heap heap-pop ( assoc-heap -- value key )
+    heap>> heap-pop ;
+
+M: assoc-heap heap-peek ( assoc-heap -- value key )
+    heap>> heap-peek ;
+
+M: assoc-heap heap-empty? ( assoc-heap -- value key )
+    heap>> heap-empty? ;
diff --git a/basis/assoc-heaps/authors.txt b/basis/assoc-heaps/authors.txt
new file mode 100644 (file)
index 0000000..b4bd0e7
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
\ No newline at end of file
index ed92a19577737b89bfc536dda894fb41e5a1a413..530caab8bddd8ad90c8c2af0aaad97059aaa5470 100644 (file)
@@ -7,7 +7,13 @@ HELP: >base64
 { $examples
     { $example "USING: prettyprint base64 strings ;" "\"The monorail is a free service.\" >base64 >string ." "\"VGhlIG1vbm9yYWlsIGlzIGEgZnJlZSBzZXJ2aWNlLg==\"" }
 }
-{ $see-also base64> } ;
+{ $see-also base64> >base64-lines } ;
+
+HELP: >base64-lines
+{ $values { "seq" sequence } { "base64" "a string of base64 characters" } }
+{ $description "Converts a sequence to its base64 representation by taking six bits at a time as an index into a lookup table containing alphanumerics, '+', and '/'.  The result is padded with '=' if the input was not a multiple of six bits. A crlf is inserted for every 76 characters of output." }
+{ $see-also base64> >base64-lines } ;
+
 
 HELP: base64>
 { $values { "base64" "a string of base64 characters" } { "seq" sequence } }
@@ -16,13 +22,26 @@ HELP: base64>
     { $example "USING: prettyprint base64 strings ;" "\"VGhlIG1vbm9yYWlsIGlzIGEgZnJlZSBzZXJ2aWNlLg==\" base64> >string ." "\"The monorail is a free service.\"" }
 }
 { $notes "This word will throw if the input string contains characters other than those allowed in base64 encodings." }
-{ $see-also >base64 } ;
+{ $see-also >base64 >base64-lines } ;
+
+HELP: encode-base64
+{ $description "Reads the standard input and writes it to standard output encoded in base64." } ;
+
+HELP: decode-base64
+{ $description "Reads the standard input and decodes it, writing to standard output." } ;
+
+HELP: encode-base64-lines
+{ $description "Reads the standard input and writes it to standard output encoded in base64 with a crlf every 76 characters." } ;
 
 ARTICLE: "base64" "Base 64 conversions"
 "The " { $vocab-link "base64" } " vocabulary implements conversions of sequences to printable characters in base 64. These plain-text representations of binary data may be passed around and converted back to binary data later." $nl
-"Converting to base 64:"
+"Converting to and from base64 as strings:"
 { $subsection >base64 }
-"Converting back to binary:"
-{ $subsection base64> } ;
+{ $subsection >base64-lines }
+{ $subsection base64> }
+"Using base64 from streams:"
+{ $subsection encode-base64 }
+{ $subsection encode-base64-lines }
+{ $subsection decode-base64 } ;
 
 ABOUT: "base64"
index 9958e7943ffb0c2693c124ba4b6f5611c28db093..dcc4aa5240cd9757455d9ae378242def89deed1f 100644 (file)
@@ -1,4 +1,4 @@
-USING: kernel tools.test base64 strings ;
+USING: kernel tools.test base64 strings sequences  ;
 IN: base64.tests
 
 [ "abcdefghijklmnopqrstuvwxyz" ] [ "abcdefghijklmnopqrstuvwxyz" >base64 base64> >string
@@ -7,6 +7,7 @@ IN: base64.tests
 [ "a" ] [ "a" >base64 base64> >string ] unit-test
 [ "ab" ] [ "ab" >base64 base64> >string ] unit-test
 [ "abc" ] [ "abc" >base64 base64> >string ] unit-test
+[ "abcde" ] [ "abcde" >base64 3 cut "\r\n" swap 3append base64> >string ] unit-test
 
 ! From http://en.wikipedia.org/wiki/Base64
 [ "TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2YgdGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGludWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=" ]
@@ -15,5 +16,11 @@ IN: base64.tests
     >base64 >string
 ] unit-test
 
+[ "TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz\r\nIHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2Yg\r\ndGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGlu\r\ndWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRo\r\nZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=" ]
+[
+    "Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure."
+    >base64-lines >string
+] unit-test
+
 \ >base64 must-infer
 \ base64> must-infer
index e3033a2bde3e111c7cc233c81374ca76b4587108..a1668e7ce93ae9899087859970c6fe3055167687 100644 (file)
@@ -1,16 +1,22 @@
-! Copyright (C) 2008 Doug Coleman.
+! Copyright (C) 2008 Doug Coleman, Daniel Ehrenberg.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math sequences io.binary splitting grouping
-accessors ;
+USING: combinators io io.binary io.encodings.binary
+io.streams.byte-array io.streams.string kernel math namespaces
+sequences strings io.crlf ;
 IN: base64
 
 <PRIVATE
 
-: count-end ( seq quot -- n )
-    trim-right-slice [ seq>> length ] [ to>> ] bi - ; inline
+: read1-ignoring ( ignoring -- ch )
+    read1 2dup swap member? [ drop read1-ignoring ] [ nip ] if ;
+
+: read-ignoring ( ignoring n -- str )
+    [ drop read1-ignoring ] with map harvest
+    [ f ] [ >string ] if-empty ;
 
 : ch>base64 ( ch -- ch )
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" nth ;
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
+    nth ; inline
 
 : base64>ch ( ch -- ch )
     {
@@ -19,32 +25,60 @@ IN: base64
         f 0 f f f 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
         22 23 24 25 f f f f f f 26 27 28 29 30 31 32 33 34 35 36 37 38 39
         40 41 42 43 44 45 46 47 48 49 50 51
-    } nth ;
+    } nth ; inline
+
+SYMBOL: column
+
+: write1-lines ( ch -- )
+    write1
+    column get [
+        1+ [ 76 = [ crlf ] when ]
+        [ 76 mod column set ] bi
+    ] when* ;
 
-: encode3 ( seq -- seq )
+: write-lines ( str -- )
+    [ write1-lines ] each ;
+
+: encode3 ( seq -- )
     be> 4 <reversed> [
-        -6 * shift HEX: 3f bitand ch>base64
-    ] with B{ } map-as ;
+        -6 * shift HEX: 3f bitand ch>base64 write1-lines
+    ] with each ; inline
+
+: encode-pad ( seq n -- )
+    [ 3 0 pad-right binary [ encode3 ] with-byte-writer ]
+    [ 1+ ] bi* head-slice 4 CHAR: = pad-right write-lines ; inline
 
-: decode4 ( str -- str )
-    0 [ base64>ch swap 6 shift bitor ] reduce 3 >be ;
+ERROR: malformed-base64 ;
 
-: >base64-rem ( str -- str )
-    [ 3 0 pad-right encode3 ] [ length 1+ ] bi
-    head-slice 4 CHAR: = pad-right ;
+: decode4 ( seq -- )
+    [ 0 [ base64>ch swap 6 shift bitor ] reduce 3 >be ]
+    [ [ CHAR: = = ] count ] bi head-slice*
+    [ write1 ] each ; inline
 
 PRIVATE>
 
+: encode-base64 ( -- )
+    3 read dup length {
+        { 0 [ drop ] }
+        { 3 [ encode3 encode-base64 ] }
+        [ encode-pad encode-base64 ]
+    } case ;
+
+: encode-base64-lines ( -- )
+    0 column [ encode-base64 ] with-variable ;
+
+: decode-base64 ( -- )
+    "\n\r" 4 read-ignoring dup length {
+        { 0 [ drop ] }
+        { 4 [ decode4 decode-base64 ] }
+        [ malformed-base64 ]
+    } case ;
+
 : >base64 ( seq -- base64 )
-    #! cut string into two pieces, convert 3 bytes at a time
-    #! pad string with = when not enough bits
-    dup length dup 3 mod - cut
-    [ 3 <groups> [ encode3 ] map concat ]
-    [ [ "" ] [ >base64-rem ] if-empty ]
-    bi* append ;
+    binary [ [ encode-base64 ] with-string-reader ] with-byte-writer ;
 
 : base64> ( base64 -- seq )
-    #! input length must be a multiple of 4
-    [ 4 <groups> [ decode4 ] map concat ]
-    [ [ CHAR: = = ] count-end ]
-    bi head* ;
+    [ binary [ decode-base64 ] with-byte-reader ] with-string-writer ;
+
+: >base64-lines ( seq -- base64 )
+    binary [ [ encode-base64-lines ] with-string-reader ] with-byte-writer ;
diff --git a/basis/base64/tags.txt b/basis/base64/tags.txt
new file mode 100644 (file)
index 0000000..8fd3ecc
--- /dev/null
@@ -0,0 +1,2 @@
+parsing
+web
index a5ae23dde69c049e4e59ad2e5387d0f542133424..1de49d353d7684fb3a306b36ebaf1fc89c06cc3b 100644 (file)
@@ -76,3 +76,7 @@ IN: bit-arrays.tests
     t t t t t t t t   t t t t t t t t   t t t t t t t t  t t t t t t t t
     t t t t t t t t   t t t t t t t t   t t t t t t t t  t t t t t t t t
 } bit-array>integer ] unit-test
+
+[ 49 ] [ 49 <bit-array> dup set-bits [ ] count ] unit-test
+
+[ HEX: 100 ] [ ?{ f f f f f f f f t } bit-array>integer ] unit-test
index d407f0b84d08583d2a83a5c1663fa9d2e6fd7925..f1ba71ce1e02861bd79af83aeaff13b9639636b0 100644 (file)
@@ -11,7 +11,7 @@ TUPLE: bit-array
 
 <PRIVATE
 
-: n>byte -3 shift ; inline
+: n>byte ( m -- n ) -3 shift ; inline
 
 : byte/bit ( n alien -- byte bit )
     over n>byte alien-unsigned-1 swap 7 bitand ; inline
@@ -19,13 +19,13 @@ TUPLE: bit-array
 : set-bit ( ? byte bit -- byte )
     2^ rot [ bitor ] [ bitnot bitand ] if ; inline
 
-: bits>cells 31 + -5 shift ; inline
+: bits>cells ( m -- n ) 31 + -5 shift ; inline
 
-: bits>bytes 7 + n>byte ; inline
+: bits>bytes ( m -- n ) 7 + n>byte ; inline
 
 : (set-bits) ( bit-array n -- )
     [ [ length bits>cells ] keep ] dip swap underlying>>
-    '[ [ _ _ ] dip set-alien-unsigned-4 ] each ; inline
+    '[ 2 shift [ _ _ ] dip set-alien-unsigned-4 ] each ; inline
 
 PRIVATE>
 
@@ -83,7 +83,7 @@ M: bit-array byte-length length 7 + -3 shift ;
     ] if ;
 
 : bit-array>integer ( bit-array -- n )
-    0 swap underlying>> dup length [
+    0 swap underlying>> dup length <reversed> [
         alien-unsigned-1 swap 8 shift bitor
     ] with each ;
 
index f0d9e8e131cb43afff4ad18349f235041890f51a..617073bbc45e202c54431521b3b3ce0cf251d473 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2007, 2008 Slava Pestov.
+! Copyright (C) 2007, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors compiler cpu.architecture vocabs.loader system
 sequences namespaces parser kernel kernel.private classes
@@ -25,8 +25,8 @@ IN: bootstrap.compiler
 
 enable-compiler
 
-: compile-uncompiled ( words -- )
-    [ compiled>> not ] filter compile ;
+: compile-unoptimized ( words -- )
+    [ optimized>> not ] filter compile ;
 
 nl
 "Compiling..." write flush
@@ -48,70 +48,70 @@ nl
     wrap probe
 
     namestack*
-} compile-uncompiled
+} compile-unoptimized
 
 "." write flush
 
 {
     bitand bitor bitxor bitnot
-} compile-uncompiled
+} compile-unoptimized
 
 "." write flush
 
 {
     + 1+ 1- 2/ < <= > >= shift
-} compile-uncompiled
+} compile-unoptimized
 
 "." write flush
 
 {
     new-sequence nth push pop peek flip
-} compile-uncompiled
+} compile-unoptimized
 
 "." write flush
 
 {
     hashcode* = get set
-} compile-uncompiled
+} compile-unoptimized
 
 "." write flush
 
 {
     memq? split harvest sift cut cut-slice start index clone
     set-at reverse push-all class number>string string>number
-} compile-uncompiled
+} compile-unoptimized
 
 "." write flush
 
 {
     lines prefix suffix unclip new-assoc update
     word-prop set-word-prop 1array 2array 3array ?nth
-} compile-uncompiled
+} compile-unoptimized
 
 "." write flush
 
 {
     malloc calloc free memcpy
-} compile-uncompiled
+} compile-unoptimized
 
 "." write flush
 
-{ build-tree } compile-uncompiled
+{ build-tree } compile-unoptimized
 
 "." write flush
 
-{ optimize-tree } compile-uncompiled
+{ optimize-tree } compile-unoptimized
 
 "." write flush
 
-{ optimize-cfg } compile-uncompiled
+{ optimize-cfg } compile-unoptimized
 
 "." write flush
 
-{ (compile) } compile-uncompiled
+{ (compile) } compile-unoptimized
 
 "." write flush
 
-vocabs [ words compile-uncompiled "." write flush ] each
+vocabs [ words compile-unoptimized "." write flush ] each
 
 " done" print flush
index 133b64acaa425dd11598dd773baae24dc9924668..36f6291bc6f7bb31ca9617184182ad7a11c00919 100644 (file)
@@ -12,5 +12,6 @@ namespaces eval kernel vocabs.loader io ;
         ignore-cli-args? not script get and
         [ run-script ] [ "run" get run ] if*
         output-stream get [ stream-flush ] when*
+        0 exit
     ] [ print-error 1 exit ] recover
 ] set-boot-quot
index a60ce04e15ad3aa1bcfec4720b9c2888db6dbffb..49f504fd41441d34f148171aefb5c9f3a43f70b4 100644 (file)
@@ -7,4 +7,5 @@ io ;
     (command-line) parse-command-line
     "run" get run
     output-stream get [ stream-flush ] when*
+    0 exit
 ] set-boot-quot
index 5b49ce28021a0a6722416bdc2aec7265e22bd0f8..145738ff4507792f5ce7bebbf0effbfd95409e04 100644 (file)
@@ -4,6 +4,7 @@ parser vocabs.loader vocabs.loader.private accessors assocs ;
 IN: bootstrap.help
 
 : load-help ( -- )
+    "help.lint" require
     "alien.syntax" require
     "compiler" require
 
index 91aa22b73814aed26835ea3692967eac4a92333b..3856382ffbb4b2b999c8e7d75821ef258d792d9f 100644 (file)
@@ -1,4 +1,4 @@
-USING: help.markup help.syntax io io.files ;
+USING: help.markup help.syntax io io.files io.pathnames ;
 IN: bootstrap.image
 
 ARTICLE: "bootstrap.image" "Bootstrapping new images"
index c7d87776a19b12a0e18ccbef0ea469c2afe6965e..513b8972a647b5b591f18841a43eae0c81156e1e 100644 (file)
@@ -1,15 +1,16 @@
-! Copyright (C) 2004, 2008 Slava Pestov.
+! Copyright (C) 2004, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien arrays byte-arrays generic assocs hashtables assocs
-hashtables.private io kernel kernel.private math namespaces make
-parser prettyprint sequences sequences.private strings sbufs
+hashtables.private io io.binary io.files io.encodings.binary
+io.pathnames kernel kernel.private math namespaces make parser
+prettyprint sequences sequences.private strings sbufs
 vectors words quotations assocs system layouts splitting
 grouping growable classes classes.builtin classes.tuple
-classes.tuple.private words.private io.binary io.files vocabs
+classes.tuple.private words.private vocabs
 vocabs.loader source-files definitions debugger
 quotations.private sequences.private combinators
-io.encodings.binary math.order math.private accessors
-slots.private compiler.units ;
+math.order math.private accessors
+slots.private compiler.units fry ;
 IN: bootstrap.image
 
 : arch ( os cpu -- arch )
@@ -65,14 +66,14 @@ M: id equal?
 
 SYMBOL: objects
 
-: (objects) <id> objects get ; inline
+: (objects) ( obj -- id assoc ) <id> objects get ; inline
 
 : lookup-object ( obj -- n/f ) (objects) at ;
 
 : put-object ( n obj -- ) (objects) set-at ;
 
 : cache-object ( obj quot -- value )
-    [ (objects) ] dip [ obj>> ] prepose cache ; inline
+    [ (objects) ] dip '[ obj>> @ ] cache ; inline
 
 ! Constants
 
@@ -94,7 +95,7 @@ SYMBOL: objects
 SYMBOL: sub-primitives
 
 : make-jit ( quot rc rt offset -- quad )
-    { [ { } make ] [ ] [ ] [ ] } spread 4array ; inline
+    [ { } make ] 3dip 4array ; inline
 
 : jit-define ( quot rc rt offset name -- )
     [ make-jit ] dip set ; inline
@@ -343,25 +344,37 @@ M: wrapper '
     [ emit ] emit-object ;
 
 ! Strings
+: native> ( object -- object )
+    big-endian get [ [ be> ] map ] [ [ le> ] map ] if ;
+
 : emit-bytes ( seq -- )
-    bootstrap-cell <groups>
-    big-endian get [ [ be> ] map ] [ [ le> ] map ] if
-    emit-seq ;
+    bootstrap-cell <groups> native> emit-seq ;
 
 : pad-bytes ( seq -- newseq )
     dup length bootstrap-cell align 0 pad-right ;
 
-: check-string ( string -- )
-    [ 127 > ] contains?
-    [ "Bootstrap cannot emit non-ASCII strings" throw ] when ;
+: extended-part ( str -- str' )
+    dup [ 128 < ] all? [ drop f ] [
+        [ -7 shift 1 bitxor ] { } map-as
+        big-endian get
+        [ [ 2 >be ] { } map-as ]
+        [ [ 2 >le ] { } map-as ] if
+        B{ } join
+    ] if ;
+
+: ascii-part ( str -- str' )
+    [
+        [ 128 mod ] [ 128 >= ] bi
+        [ 128 bitor ] when
+    ] B{ } map-as ;
 
 : emit-string ( string -- ptr )
-    dup check-string
+    [ length ] [ extended-part ' ] [ ] tri
     string type-number object tag-number [
-        dup length emit-fixnum
-        f ' emit
-        f ' emit
-        pad-bytes emit-bytes
+        [ emit-fixnum ]
+        [ emit ]
+        [ f ' emit ascii-part pad-bytes emit-bytes ]
+        tri*
     ] emit-object ;
 
 M: string '
@@ -432,7 +445,7 @@ M: quotation '
         array>> '
         quotation type-number object tag-number [
             emit ! array
-            f ' emit ! compiled>>
+            f ' emit ! compiled
             0 emit ! xt
             0 emit ! code
         ] emit-object
@@ -523,11 +536,9 @@ M: quotation '
 ! Image output
 
 : (write-image) ( image -- )
-    bootstrap-cell big-endian get [
-        [ >be write ] curry each
-    ] [
-        [ >le write ] curry each
-    ] if ;
+    bootstrap-cell big-endian get
+    [ '[ _ >be write ] each ]
+    [ '[ _ >le write ] each ] if ;
 
 : write-image ( image -- )
     "Writing image to " write
index f0edf85e653e3a12d0d65d9e0814784f5f8935f7..d70a253e5f46a90cc3231205e2f3061b17d9636a 100644 (file)
@@ -2,7 +2,8 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: checksums checksums.openssl splitting assocs
 kernel io.files bootstrap.image sequences io namespaces make
-io.launcher math io.encodings.ascii ;
+io.launcher math io.encodings.ascii io.files.temp io.pathnames
+io.directories ;
 IN: bootstrap.image.upload
 
 SYMBOL: upload-images-destination
index a38107fbabcd0ab749af06928b4adc91a752c0ac..b9a49b48b82d43bbd979f740e29ea36cf00064fd 100644 (file)
@@ -1,12 +1,11 @@
 USING: system vocabs vocabs.loader kernel combinators
-namespaces sequences io.backend ;
+namespaces sequences io.backend accessors ;
 IN: bootstrap.io
 
 "bootstrap.compiler" vocab [
-    "io." {
+    "io.backend." {
         { [ "io-backend" get ] [ "io-backend" get ] }
-        { [ os unix? ] [ "unix" ] }
+        { [ os unix? ] [ "unix." os name>> append ] }
         { [ os winnt? ] [ "windows.nt" ] }
-        { [ os wince? ] [ "windows.ce" ] }
     } cond append require
 ] when
index 347969af0d6698cb65230ddaec7a8aa90efea2bf..27b2f6b181f79f322c8185af743261099237a9f5 100644 (file)
@@ -2,6 +2,4 @@ USING: vocabs vocabs.loader kernel ;
 
 "math.ratios" require
 "math.floats" require
-"math.complex" require
-
-"prettyprint" vocab [ "math.complex.prettyprint" require ] when
+"math.complex" require
\ No newline at end of file
index fb7292b989caaa7508711711a014c8d935dc27f7..b521244fe0ae73abf32b170eaff1713b1cff0a89 100644 (file)
@@ -1,11 +1,11 @@
 ! Copyright (C) 2004, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors init namespaces words io
+USING: accessors init namespaces words words.symbol io
 kernel.private math memory continuations kernel io.files
-io.backend system parser vocabs sequences
+io.pathnames io.backend system parser vocabs sequences
 vocabs.loader combinators splitting source-files strings
-definitions assocs compiler.errors compiler.units
-math.parser generic sets command-line ;
+definitions assocs compiler.errors compiler.units math.parser
+generic sets command-line ;
 IN: bootstrap.stage2
 
 SYMBOL: core-bootstrap-time
@@ -13,7 +13,7 @@ SYMBOL: core-bootstrap-time
 SYMBOL: bootstrap-time
 
 : default-image-name ( -- string )
-    vm file-name os windows? [ "." split1 drop ] when
+    vm file-name os windows? [ "." split1-last drop ] when
     ".image" append resource-path ;
 
 : do-crossref ( -- )
@@ -42,7 +42,7 @@ SYMBOL: bootstrap-time
     "Core bootstrap completed in " write core-bootstrap-time get print-time
     "Bootstrap completed in "      write bootstrap-time      get print-time
 
-    [ compiled>> ] count-words " compiled words" print
+    [ optimized>> ] count-words " compiled words" print
     [ symbol? ] count-words " symbol words" print
     [ ] count-words " words total" print
 
@@ -102,6 +102,8 @@ SYMBOL: bootstrap-time
     ] if
 ] [
     drop
-    load-help? off
-    "resource:basis/bootstrap/bootstrap-error.factor" run-file
+    [
+        load-help? off
+        "resource:basis/bootstrap/bootstrap-error.factor" run-file
+    ] with-scope
 ] recover
index 8b751f8458ca431b53f1e4bf5603614dfee97e50..24cbba6af815eab92c0c103940c7677d56884979 100644 (file)
@@ -1,11 +1,11 @@
-! Copyright (C) 2008 Slava Pestov.
+! Copyright (C) 2008, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: vocabs vocabs.loader kernel ;
+USING: vocabs vocabs.loader kernel io.thread threads
+compiler.utilities namespaces ;
 IN: bootstrap.threads
 
-USE: io.thread
-USE: threads
-
 "debugger" vocab [
     "debugger.threads" require
 ] when
+
+[ yield ] yield-hook set-global
\ No newline at end of file
index 1046d41bdcedef22e20a7466e6b19c41402b8f7d..3530c9d99fde9058936329c6c97be5ad78b31036 100644 (file)
@@ -1,5 +1 @@
-USING: strings.parser kernel namespaces unicode.data ;
-IN: bootstrap.unicode
-
-[ name>char [ "Invalid character" throw ] unless* ]
-name>char-hook set-global
+USE: unicode
\ No newline at end of file
diff --git a/basis/cairo/authors.txt b/basis/cairo/authors.txt
new file mode 100644 (file)
index 0000000..68d35d1
--- /dev/null
@@ -0,0 +1,2 @@
+Sampo Vuori
+Doug Coleman
diff --git a/basis/cairo/cairo.factor b/basis/cairo/cairo.factor
new file mode 100755 (executable)
index 0000000..da7f5a2
--- /dev/null
@@ -0,0 +1,37 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: cairo.ffi kernel accessors sequences
+namespaces fry continuations destructors ;
+IN: cairo
+
+TUPLE: cairo-t alien ;
+C: <cairo-t> cairo-t
+M: cairo-t dispose ( alien -- ) alien>> cairo_destroy ;
+
+TUPLE: cairo-surface-t alien ;
+C: <cairo-surface-t> cairo-surface-t
+M: cairo-surface-t dispose ( alien -- ) alien>> cairo_surface_destroy ;
+
+: check-cairo ( cairo_status_t -- )
+    dup CAIRO_STATUS_SUCCESS = [ drop ]
+    [ cairo_status_to_string "Cairo error: " prepend throw ] if ;
+
+SYMBOL: cairo
+: cr ( -- cairo ) cairo get ; inline
+
+: (with-cairo) ( cairo-t quot -- )
+    [ alien>> cairo ] dip
+    '[ @ cr cairo_status check-cairo ]
+    with-variable ; inline
+    
+: with-cairo ( cairo quot -- )
+    [ <cairo-t> ] dip '[ _ (with-cairo) ] with-disposal ; inline
+
+: (with-surface) ( cairo-surface-t quot -- )
+    [ alien>> ] dip [ cairo_surface_status check-cairo ] bi ; inline
+
+: with-surface ( cairo_surface quot -- )
+    [ <cairo-surface-t> ] dip '[ _ (with-surface) ] with-disposal ; inline
+
+: with-cairo-from-surface ( cairo_surface quot -- )
+    '[ cairo_create _ with-cairo ] with-surface ; inline
diff --git a/basis/cairo/ffi/ffi.factor b/basis/cairo/ffi/ffi.factor
new file mode 100644 (file)
index 0000000..d29a3fb
--- /dev/null
@@ -0,0 +1,948 @@
+! Copyright (c) 2007 Sampo Vuori
+! Copyright (c) 2008 Matthew Willis
+!
+! Adapted from cairo.h, version 1.5.14
+! License: http://factorcode.org/license.txt
+
+USING: system combinators alien alien.syntax kernel 
+alien.c-types accessors sequences arrays ui.gadgets ;
+
+IN: cairo.ffi
+<< "cairo" {
+    { [ os winnt? ] [ "libcairo-2.dll" ] }
+    { [ os macosx? ] [ "/opt/local/lib/libcairo.dylib" ] }
+    { [ os unix? ] [ "libcairo.so.2" ] }
+} cond "cdecl" add-library >>
+
+LIBRARY: cairo
+
+FUNCTION: int cairo_version ( ) ;
+FUNCTION: char* cairo_version_string ( ) ;
+
+TYPEDEF: int cairo_bool_t
+
+! I am leaving these and other void* types as opaque structures
+TYPEDEF: void* cairo_t
+TYPEDEF: void* cairo_surface_t
+
+C-STRUCT: cairo_matrix_t
+    { "double" "xx" }
+    { "double" "yx" }
+    { "double" "xy" }
+    { "double" "yy" }
+    { "double" "x0" }
+    { "double" "y0" } ;
+
+TYPEDEF: void* cairo_pattern_t
+
+TYPEDEF: void* cairo_destroy_func_t
+: cairo-destroy-func ( quot -- callback )
+    [ "void" { "void*" } "cdecl" ] dip alien-callback ; inline
+
+! See cairo.h for details
+C-STRUCT: cairo_user_data_key_t
+    { "int" "unused" } ;
+
+TYPEDEF: int cairo_status_t
+C-ENUM:
+    CAIRO_STATUS_SUCCESS
+    CAIRO_STATUS_NO_MEMORY
+    CAIRO_STATUS_INVALID_RESTORE
+    CAIRO_STATUS_INVALID_POP_GROUP
+    CAIRO_STATUS_NO_CURRENT_POINT
+    CAIRO_STATUS_INVALID_MATRIX
+    CAIRO_STATUS_INVALID_STATUS
+    CAIRO_STATUS_NULL_POINTER
+    CAIRO_STATUS_INVALID_STRING
+    CAIRO_STATUS_INVALID_PATH_DATA
+    CAIRO_STATUS_READ_ERROR
+    CAIRO_STATUS_WRITE_ERROR
+    CAIRO_STATUS_SURFACE_FINISHED
+    CAIRO_STATUS_SURFACE_TYPE_MISMATCH
+    CAIRO_STATUS_PATTERN_TYPE_MISMATCH
+    CAIRO_STATUS_INVALID_CONTENT
+    CAIRO_STATUS_INVALID_FORMAT
+    CAIRO_STATUS_INVALID_VISUAL
+    CAIRO_STATUS_FILE_NOT_FOUND
+    CAIRO_STATUS_INVALID_DASH
+    CAIRO_STATUS_INVALID_DSC_COMMENT
+    CAIRO_STATUS_INVALID_INDEX
+    CAIRO_STATUS_CLIP_NOT_REPRESENTABLE
+    CAIRO_STATUS_TEMP_FILE_ERROR
+    CAIRO_STATUS_INVALID_STRIDE ;
+
+TYPEDEF: int cairo_content_t
+: CAIRO_CONTENT_COLOR          HEX: 1000 ;
+: CAIRO_CONTENT_ALPHA          HEX: 2000 ;
+: CAIRO_CONTENT_COLOR_ALPHA    HEX: 3000 ;
+
+TYPEDEF: void* cairo_write_func_t
+: cairo-write-func ( quot -- callback )
+    [ "cairo_status_t" { "void*" "uchar*" "int" } "cdecl" ] dip alien-callback ; inline
+                          
+TYPEDEF: void* cairo_read_func_t
+: cairo-read-func ( quot -- callback )
+    [ "cairo_status_t" { "void*" "uchar*" "int" } "cdecl" ] dip alien-callback ; inline
+
+! Functions for manipulating state objects
+FUNCTION: cairo_t*
+cairo_create ( cairo_surface_t* target ) ;
+
+FUNCTION: cairo_t*
+cairo_reference ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_destroy ( cairo_t* cr ) ;
+
+FUNCTION: uint
+cairo_get_reference_count ( cairo_t* cr ) ;
+
+FUNCTION: void*
+cairo_get_user_data ( cairo_t* cr, cairo_user_data_key_t* key ) ;
+
+FUNCTION: cairo_status_t
+cairo_set_user_data ( cairo_t* cr, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy ) ;
+
+FUNCTION: void
+cairo_save ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_restore ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_push_group ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_push_group_with_content  ( cairo_t* cr, cairo_content_t content ) ;
+
+FUNCTION: cairo_pattern_t*
+cairo_pop_group ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_pop_group_to_source ( cairo_t* cr ) ;
+
+! Modify state
+TYPEDEF: int cairo_operator_t
+C-ENUM:
+    CAIRO_OPERATOR_CLEAR
+
+    CAIRO_OPERATOR_SOURCE
+    CAIRO_OPERATOR_OVER
+    CAIRO_OPERATOR_IN
+    CAIRO_OPERATOR_OUT
+    CAIRO_OPERATOR_ATOP
+
+    CAIRO_OPERATOR_DEST
+    CAIRO_OPERATOR_DEST_OVER
+    CAIRO_OPERATOR_DEST_IN
+    CAIRO_OPERATOR_DEST_OUT
+    CAIRO_OPERATOR_DEST_ATOP
+
+    CAIRO_OPERATOR_XOR
+    CAIRO_OPERATOR_ADD
+    CAIRO_OPERATOR_SATURATE ;
+
+FUNCTION: void
+cairo_set_operator ( cairo_t* cr, cairo_operator_t op ) ;
+
+FUNCTION: void
+cairo_set_source ( cairo_t* cr, cairo_pattern_t* source ) ;
+
+FUNCTION: void
+cairo_set_source_rgb ( cairo_t* cr, double red, double green, double blue ) ;
+
+FUNCTION: void
+cairo_set_source_rgba ( cairo_t* cr, double red, double green, double blue, double alpha ) ;
+
+FUNCTION: void
+cairo_set_source_surface ( cairo_t* cr, cairo_surface_t* surface, double x, double y ) ;
+
+FUNCTION: void
+cairo_set_tolerance ( cairo_t* cr, double tolerance ) ;
+
+TYPEDEF: int cairo_antialias_t
+C-ENUM:
+    CAIRO_ANTIALIAS_DEFAULT
+    CAIRO_ANTIALIAS_NONE
+    CAIRO_ANTIALIAS_GRAY
+    CAIRO_ANTIALIAS_SUBPIXEL ;
+
+FUNCTION: void
+cairo_set_antialias ( cairo_t* cr, cairo_antialias_t antialias ) ;
+
+TYPEDEF: int cairo_fill_rule_t
+C-ENUM:
+    CAIRO_FILL_RULE_WINDING
+    CAIRO_FILL_RULE_EVEN_ODD ;
+
+FUNCTION: void
+cairo_set_fill_rule ( cairo_t* cr, cairo_fill_rule_t fill_rule ) ;
+
+FUNCTION: void
+cairo_set_line_width ( cairo_t* cr, double width ) ;
+
+TYPEDEF: int cairo_line_cap_t
+C-ENUM:
+    CAIRO_LINE_CAP_BUTT
+    CAIRO_LINE_CAP_ROUND
+    CAIRO_LINE_CAP_SQUARE ;
+
+FUNCTION: void
+cairo_set_line_cap ( cairo_t* cr, cairo_line_cap_t line_cap ) ;
+
+TYPEDEF: int cairo_line_join_t
+C-ENUM:
+    CAIRO_LINE_JOIN_MITER
+    CAIRO_LINE_JOIN_ROUND
+    CAIRO_LINE_JOIN_BEVEL ;
+
+FUNCTION: void
+cairo_set_line_join ( cairo_t* cr, cairo_line_join_t line_join ) ;
+
+FUNCTION: void
+cairo_set_dash ( cairo_t* cr, double* dashes, int num_dashes, double offset ) ;
+
+FUNCTION: void
+cairo_set_miter_limit ( cairo_t* cr, double limit ) ;
+
+FUNCTION: void
+cairo_translate ( cairo_t* cr, double tx, double ty ) ;
+
+FUNCTION: void
+cairo_scale ( cairo_t* cr, double sx, double sy ) ;
+
+FUNCTION: void
+cairo_rotate ( cairo_t* cr, double angle ) ;
+
+FUNCTION: void
+cairo_transform ( cairo_t* cr, cairo_matrix_t* matrix ) ;
+
+FUNCTION: void
+cairo_set_matrix ( cairo_t* cr, cairo_matrix_t* matrix ) ;
+
+FUNCTION: void
+cairo_identity_matrix ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_user_to_device ( cairo_t* cr, double* x, double* y ) ;
+
+FUNCTION: void
+cairo_user_to_device_distance ( cairo_t* cr, double* dx, double* dy ) ;
+
+FUNCTION: void
+cairo_device_to_user ( cairo_t* cr, double* x, double* y ) ;
+
+FUNCTION: void
+cairo_device_to_user_distance ( cairo_t* cr, double* dx, double* dy ) ;
+
+! Path creation functions
+FUNCTION: void
+cairo_new_path ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_move_to ( cairo_t* cr, double x, double y ) ;
+
+FUNCTION: void
+cairo_new_sub_path ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_line_to ( cairo_t* cr, double x, double y ) ;
+
+FUNCTION: void
+cairo_curve_to ( cairo_t* cr, double x1, double y1, double x2, double y2, double x3, double y3 ) ;
+
+FUNCTION: void
+cairo_arc ( cairo_t* cr, double xc, double yc, double radius, double angle1, double angle2 ) ;
+
+FUNCTION: void
+cairo_arc_negative ( cairo_t* cr, double xc, double yc, double radius, double angle1, double angle2 ) ;
+
+FUNCTION: void
+cairo_rel_move_to ( cairo_t* cr, double dx, double dy ) ;
+
+FUNCTION: void
+cairo_rel_line_to ( cairo_t* cr, double dx, double dy ) ;
+
+FUNCTION: void
+cairo_rel_curve_to ( cairo_t* cr, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3 ) ;
+
+FUNCTION: void
+cairo_rectangle ( cairo_t* cr, double x, double y, double width, double height ) ;
+
+FUNCTION: void
+cairo_close_path ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_path_extents ( cairo_t* cr, double* x1, double* y1, double* x2, double* y2 ) ;
+
+! Painting functions
+FUNCTION: void
+cairo_paint ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_paint_with_alpha ( cairo_t* cr, double alpha ) ;
+
+FUNCTION: void
+cairo_mask ( cairo_t* cr, cairo_pattern_t* pattern ) ;
+
+FUNCTION: void
+cairo_mask_surface ( cairo_t* cr, cairo_surface_t* surface, double surface_x, double surface_y ) ;
+
+FUNCTION: void
+cairo_stroke ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_stroke_preserve ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_fill ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_fill_preserve ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_copy_page ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_show_page ( cairo_t* cr ) ;
+
+! Insideness testing
+FUNCTION: cairo_bool_t
+cairo_in_stroke ( cairo_t* cr, double x, double y ) ;
+
+FUNCTION: cairo_bool_t
+cairo_in_fill ( cairo_t* cr, double x, double y ) ;
+
+! Rectangular extents
+FUNCTION: void
+cairo_stroke_extents ( cairo_t* cr, double* x1, double* y1, double* x2, double* y2 ) ;
+
+FUNCTION: void
+cairo_fill_extents ( cairo_t* cr, double* x1, double* y1, double* x2, double* y2 ) ;
+
+! Clipping
+FUNCTION: void
+cairo_reset_clip ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_clip ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_clip_preserve ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_clip_extents ( cairo_t* cr, double* x1, double* y1, double* x2, double* y2 ) ;
+
+C-STRUCT: cairo_rectangle_t
+    { "double" "x" }
+    { "double" "y" }
+    { "double" "width" }
+    { "double" "height" } ;
+    
+C-STRUCT: cairo_rectangle_list_t
+    { "cairo_status_t"     "status" }
+    { "cairo_rectangle_t*" "rectangles" }
+    { "int"                "num_rectangles" } ;
+
+FUNCTION: cairo_rectangle_list_t*
+cairo_copy_clip_rectangle_list ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_rectangle_list_destroy ( cairo_rectangle_list_t* rectangle_list ) ;
+
+! Font/Text functions
+
+TYPEDEF: void* cairo_scaled_font_t
+
+TYPEDEF: void* cairo_font_face_t
+
+C-STRUCT: cairo_glyph_t
+  { "ulong"     "index" }
+  { "double"    "x" }
+  { "double"    "y" } ;
+
+C-STRUCT: cairo_text_extents_t
+    { "double" "x_bearing" }
+    { "double" "y_bearing" }
+    { "double" "width" }
+    { "double" "height" }
+    { "double" "x_advance" }
+    { "double" "y_advance" } ;
+
+C-STRUCT: cairo_font_extents_t
+    { "double" "ascent" }
+    { "double" "descent" }
+    { "double" "height" }
+    { "double" "max_x_advance" }
+    { "double" "max_y_advance" } ;
+
+TYPEDEF: int cairo_font_slant_t
+C-ENUM:
+    CAIRO_FONT_SLANT_NORMAL
+    CAIRO_FONT_SLANT_ITALIC
+    CAIRO_FONT_SLANT_OBLIQUE ;
+
+TYPEDEF: int cairo_font_weight_t
+C-ENUM:
+    CAIRO_FONT_WEIGHT_NORMAL
+    CAIRO_FONT_WEIGHT_BOLD ;
+
+TYPEDEF: int cairo_subpixel_order_t
+C-ENUM:
+    CAIRO_SUBPIXEL_ORDER_DEFAULT
+    CAIRO_SUBPIXEL_ORDER_RGB
+    CAIRO_SUBPIXEL_ORDER_BGR
+    CAIRO_SUBPIXEL_ORDER_VRGB
+    CAIRO_SUBPIXEL_ORDER_VBGR ;
+
+TYPEDEF: int cairo_hint_style_t
+C-ENUM:
+    CAIRO_HINT_STYLE_DEFAULT
+    CAIRO_HINT_STYLE_NONE
+    CAIRO_HINT_STYLE_SLIGHT
+    CAIRO_HINT_STYLE_MEDIUM
+    CAIRO_HINT_STYLE_FULL ;
+
+TYPEDEF: int cairo_hint_metrics_t
+C-ENUM:
+    CAIRO_HINT_METRICS_DEFAULT
+    CAIRO_HINT_METRICS_OFF
+    CAIRO_HINT_METRICS_ON ;
+
+TYPEDEF: void* cairo_font_options_t
+
+FUNCTION: cairo_font_options_t*
+cairo_font_options_create ( ) ;
+
+FUNCTION: cairo_font_options_t*
+cairo_font_options_copy ( cairo_font_options_t* original ) ;
+
+FUNCTION: void
+cairo_font_options_destroy ( cairo_font_options_t* options ) ;
+
+FUNCTION: cairo_status_t
+cairo_font_options_status ( cairo_font_options_t* options ) ;
+
+FUNCTION: void
+cairo_font_options_merge ( cairo_font_options_t* options, cairo_font_options_t* other ) ;
+
+FUNCTION: cairo_bool_t
+cairo_font_options_equal ( cairo_font_options_t* options, cairo_font_options_t* other ) ;
+
+FUNCTION: ulong
+cairo_font_options_hash ( cairo_font_options_t* options ) ;
+
+FUNCTION: void
+cairo_font_options_set_antialias ( cairo_font_options_t* options, cairo_antialias_t antialias ) ;
+
+FUNCTION: cairo_antialias_t
+cairo_font_options_get_antialias ( cairo_font_options_t* options ) ;
+
+FUNCTION: void
+cairo_font_options_set_subpixel_order ( cairo_font_options_t* options, cairo_subpixel_order_t subpixel_order ) ;
+
+FUNCTION: cairo_subpixel_order_t
+cairo_font_options_get_subpixel_order ( cairo_font_options_t* options ) ;
+
+FUNCTION: void
+cairo_font_options_set_hint_style ( cairo_font_options_t* options, cairo_hint_style_t hint_style ) ;
+
+FUNCTION: cairo_hint_style_t
+cairo_font_options_get_hint_style ( cairo_font_options_t* options ) ;
+
+FUNCTION: void
+cairo_font_options_set_hint_metrics ( cairo_font_options_t* options, cairo_hint_metrics_t hint_metrics ) ;
+
+FUNCTION: cairo_hint_metrics_t
+cairo_font_options_get_hint_metrics ( cairo_font_options_t* options ) ;
+
+! This interface is for dealing with text as text, not caring about the
+!  font object inside the the cairo_t.
+
+FUNCTION: void
+cairo_select_font_face ( cairo_t* cr, char* family, cairo_font_slant_t slant, cairo_font_weight_t weight ) ;
+
+FUNCTION: void
+cairo_set_font_size ( cairo_t* cr, double size ) ;
+
+FUNCTION: void
+cairo_set_font_matrix ( cairo_t* cr, cairo_matrix_t* matrix ) ;
+
+FUNCTION: void
+cairo_get_font_matrix ( cairo_t* cr, cairo_matrix_t* matrix ) ;
+
+FUNCTION: void
+cairo_set_font_options ( cairo_t* cr, cairo_font_options_t* options ) ;
+
+FUNCTION: void
+cairo_get_font_options ( cairo_t* cr, cairo_font_options_t* options ) ;
+
+FUNCTION: void
+cairo_set_font_face ( cairo_t* cr, cairo_font_face_t* font_face ) ;
+
+FUNCTION: cairo_font_face_t*
+cairo_get_font_face ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_set_scaled_font ( cairo_t* cr, cairo_scaled_font_t* scaled_font ) ;
+
+FUNCTION: cairo_scaled_font_t*
+cairo_get_scaled_font ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_show_text ( cairo_t* cr, char* utf8 ) ;
+
+FUNCTION: void
+cairo_show_glyphs ( cairo_t* cr, cairo_glyph_t* glyphs, int num_glyphs ) ;
+
+FUNCTION: void
+cairo_text_path  ( cairo_t* cr, char* utf8 ) ;
+
+FUNCTION: void
+cairo_glyph_path ( cairo_t* cr, cairo_glyph_t* glyphs, int num_glyphs ) ;
+
+FUNCTION: void
+cairo_text_extents ( cairo_t* cr, char* utf8, cairo_text_extents_t* extents ) ;
+
+FUNCTION: void
+cairo_glyph_extents ( cairo_t* cr, cairo_glyph_t* glyphs, int num_glyphs, cairo_text_extents_t* extents ) ;
+
+FUNCTION: void
+cairo_font_extents ( cairo_t* cr, cairo_font_extents_t* extents ) ;
+
+! Generic identifier for a font style
+
+FUNCTION: cairo_font_face_t*
+cairo_font_face_reference ( cairo_font_face_t* font_face ) ;
+
+FUNCTION: void
+cairo_font_face_destroy ( cairo_font_face_t* font_face ) ;
+
+FUNCTION: uint
+cairo_font_face_get_reference_count ( cairo_font_face_t* font_face ) ;
+
+FUNCTION: cairo_status_t
+cairo_font_face_status ( cairo_font_face_t* font_face ) ;
+
+TYPEDEF: int cairo_font_type_t
+C-ENUM:
+    CAIRO_FONT_TYPE_TOY
+    CAIRO_FONT_TYPE_FT
+    CAIRO_FONT_TYPE_WIN32
+    CAIRO_FONT_TYPE_QUARTZ ;
+
+FUNCTION: cairo_font_type_t
+cairo_font_face_get_type ( cairo_font_face_t* font_face ) ;
+
+FUNCTION: void* 
+cairo_font_face_get_user_data ( cairo_font_face_t* font_face, cairo_user_data_key_t* key ) ;
+
+FUNCTION: cairo_status_t
+cairo_font_face_set_user_data ( cairo_font_face_t* font_face, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy ) ;
+
+! Portable interface to general font features.
+
+FUNCTION: cairo_scaled_font_t*
+cairo_scaled_font_create ( cairo_font_face_t* font_face, cairo_matrix_t* font_matrix, cairo_matrix_t* ctm, cairo_font_options_t* options ) ;
+
+FUNCTION: cairo_scaled_font_t*
+cairo_scaled_font_reference ( cairo_scaled_font_t* scaled_font ) ;
+
+FUNCTION: void
+cairo_scaled_font_destroy ( cairo_scaled_font_t* scaled_font ) ;
+
+FUNCTION: uint
+cairo_scaled_font_get_reference_count ( cairo_scaled_font_t* scaled_font ) ;
+
+FUNCTION: cairo_status_t
+cairo_scaled_font_status ( cairo_scaled_font_t* scaled_font ) ;
+
+FUNCTION: cairo_font_type_t
+cairo_scaled_font_get_type ( cairo_scaled_font_t* scaled_font ) ;
+
+FUNCTION: void* 
+cairo_scaled_font_get_user_data ( cairo_scaled_font_t* scaled_font, cairo_user_data_key_t* key ) ;
+
+FUNCTION: cairo_status_t
+cairo_scaled_font_set_user_data ( cairo_scaled_font_t* scaled_font, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy ) ;
+
+FUNCTION: void
+cairo_scaled_font_extents ( cairo_scaled_font_t* scaled_font, cairo_font_extents_t* extents ) ;
+
+FUNCTION: void
+cairo_scaled_font_text_extents ( cairo_scaled_font_t* scaled_font, char* utf8, cairo_text_extents_t* extents ) ;
+
+FUNCTION: void
+cairo_scaled_font_glyph_extents ( cairo_scaled_font_t* scaled_font, cairo_glyph_t* glyphs, int num_glyphs, cairo_text_extents_t* extents ) ;
+
+FUNCTION: cairo_font_face_t*
+cairo_scaled_font_get_font_face ( cairo_scaled_font_t* scaled_font ) ;
+
+FUNCTION: void
+cairo_scaled_font_get_font_matrix ( cairo_scaled_font_t* scaled_font, cairo_matrix_t* font_matrix ) ;
+
+FUNCTION: void
+cairo_scaled_font_get_ctm ( cairo_scaled_font_t* scaled_font, cairo_matrix_t* ctm ) ;
+
+FUNCTION: void
+cairo_scaled_font_get_font_options ( cairo_scaled_font_t* scaled_font, cairo_font_options_t* options ) ;
+
+! Query functions
+
+FUNCTION: cairo_operator_t
+cairo_get_operator ( cairo_t* cr ) ;
+
+FUNCTION: cairo_pattern_t*
+cairo_get_source ( cairo_t* cr ) ;
+
+FUNCTION: double
+cairo_get_tolerance ( cairo_t* cr ) ;
+
+FUNCTION: cairo_antialias_t
+cairo_get_antialias ( cairo_t* cr ) ;
+
+FUNCTION: cairo_bool_t
+cairo_has_current_point ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_get_current_point ( cairo_t* cr, double* x, double* y ) ;
+
+FUNCTION: cairo_fill_rule_t
+cairo_get_fill_rule ( cairo_t* cr ) ;
+
+FUNCTION: double
+cairo_get_line_width ( cairo_t* cr ) ;
+
+FUNCTION: cairo_line_cap_t
+cairo_get_line_cap ( cairo_t* cr ) ;
+
+FUNCTION: cairo_line_join_t
+cairo_get_line_join ( cairo_t* cr ) ;
+
+FUNCTION: double
+cairo_get_miter_limit ( cairo_t* cr ) ;
+
+FUNCTION: int
+cairo_get_dash_count ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_get_dash ( cairo_t* cr, double* dashes, double* offset ) ;
+
+FUNCTION: void
+cairo_get_matrix ( cairo_t* cr, cairo_matrix_t* matrix ) ;
+
+FUNCTION: cairo_surface_t*
+cairo_get_target ( cairo_t* cr ) ;
+
+FUNCTION: cairo_surface_t*
+cairo_get_group_target ( cairo_t* cr ) ;
+
+TYPEDEF: int cairo_path_data_type_t
+C-ENUM:
+    CAIRO_PATH_MOVE_TO
+    CAIRO_PATH_LINE_TO
+    CAIRO_PATH_CURVE_TO
+    CAIRO_PATH_CLOSE_PATH ;
+
+! NEED TO DO UNION HERE
+C-STRUCT: cairo_path_data_t-point
+    { "double" "x" }
+    { "double" "y" } ;
+
+C-STRUCT: cairo_path_data_t-header
+    { "cairo_path_data_type_t" "type" }
+    { "int" "length" } ;
+
+C-UNION: cairo_path_data_t "cairo_path_data_t-point" "cairo_path_data_t-header" ;
+
+C-STRUCT: cairo_path_t
+    { "cairo_status_t"      "status" }
+    { "cairo_path_data_t*"  "data" }
+    { "int"                 "num_data" } ;
+
+FUNCTION: cairo_path_t*
+cairo_copy_path ( cairo_t* cr ) ;
+
+FUNCTION: cairo_path_t*
+cairo_copy_path_flat ( cairo_t* cr ) ;
+
+FUNCTION: void
+cairo_append_path ( cairo_t* cr, cairo_path_t* path ) ;
+
+FUNCTION: void
+cairo_path_destroy ( cairo_path_t* path ) ;
+
+! Error status queries
+
+FUNCTION: cairo_status_t
+cairo_status ( cairo_t* cr ) ;
+
+FUNCTION: char* 
+cairo_status_to_string ( cairo_status_t status ) ;
+
+! Surface manipulation
+
+FUNCTION: cairo_surface_t*
+cairo_surface_create_similar ( cairo_surface_t* other, cairo_content_t content, int width, int height ) ;
+
+FUNCTION: cairo_surface_t*
+cairo_surface_reference ( cairo_surface_t* surface ) ;
+
+FUNCTION: void
+cairo_surface_finish ( cairo_surface_t* surface ) ;
+
+FUNCTION: void
+cairo_surface_destroy ( cairo_surface_t* surface ) ;
+
+FUNCTION: uint
+cairo_surface_get_reference_count ( cairo_surface_t* surface ) ;
+
+FUNCTION: cairo_status_t
+cairo_surface_status ( cairo_surface_t* surface ) ;
+
+TYPEDEF: int cairo_surface_type_t
+C-ENUM:
+    CAIRO_SURFACE_TYPE_IMAGE
+    CAIRO_SURFACE_TYPE_PDF
+    CAIRO_SURFACE_TYPE_PS
+    CAIRO_SURFACE_TYPE_XLIB
+    CAIRO_SURFACE_TYPE_XCB
+    CAIRO_SURFACE_TYPE_GLITZ
+    CAIRO_SURFACE_TYPE_QUARTZ
+    CAIRO_SURFACE_TYPE_WIN32
+    CAIRO_SURFACE_TYPE_BEOS
+    CAIRO_SURFACE_TYPE_DIRECTFB
+    CAIRO_SURFACE_TYPE_SVG
+    CAIRO_SURFACE_TYPE_OS2
+    CAIRO_SURFACE_TYPE_WIN32_PRINTING
+    CAIRO_SURFACE_TYPE_QUARTZ_IMAGE ;
+
+FUNCTION: cairo_surface_type_t
+cairo_surface_get_type ( cairo_surface_t* surface ) ;
+
+FUNCTION: cairo_content_t
+cairo_surface_get_content ( cairo_surface_t* surface ) ;
+
+FUNCTION: cairo_status_t
+cairo_surface_write_to_png ( cairo_surface_t* surface, char* filename ) ;
+
+FUNCTION: cairo_status_t
+cairo_surface_write_to_png_stream ( cairo_surface_t* surface, cairo_write_func_t write_func, void* closure ) ;
+
+FUNCTION: void* 
+cairo_surface_get_user_data ( cairo_surface_t* surface, cairo_user_data_key_t* key ) ;
+
+FUNCTION: cairo_status_t
+cairo_surface_set_user_data ( cairo_surface_t* surface, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy ) ;
+
+FUNCTION: void
+cairo_surface_get_font_options ( cairo_surface_t* surface, cairo_font_options_t* options ) ;
+
+FUNCTION: void
+cairo_surface_flush ( cairo_surface_t* surface ) ;
+
+FUNCTION: void
+cairo_surface_mark_dirty ( cairo_surface_t* surface ) ;
+
+FUNCTION: void
+cairo_surface_mark_dirty_rectangle ( cairo_surface_t* surface, int x, int y, int width, int height ) ;
+
+FUNCTION: void
+cairo_surface_set_device_offset ( cairo_surface_t* surface, double x_offset, double y_offset ) ;
+
+FUNCTION: void
+cairo_surface_get_device_offset ( cairo_surface_t* surface, double* x_offset, double* y_offset ) ;
+
+FUNCTION: void
+cairo_surface_set_fallback_resolution ( cairo_surface_t* surface, double x_pixels_per_inch, double y_pixels_per_inch ) ;
+
+FUNCTION: void
+cairo_surface_copy_page ( cairo_surface_t* surface ) ;
+
+FUNCTION: void
+cairo_surface_show_page ( cairo_surface_t* surface ) ;
+
+! Image-surface functions
+
+TYPEDEF: int cairo_format_t
+C-ENUM:
+    CAIRO_FORMAT_ARGB32
+    CAIRO_FORMAT_RGB24
+    CAIRO_FORMAT_A8
+    CAIRO_FORMAT_A1
+    CAIRO_FORMAT_RGB16_565 ;
+
+FUNCTION: cairo_surface_t*
+cairo_image_surface_create ( cairo_format_t format, int width, int height ) ;
+
+FUNCTION: int
+cairo_format_stride_for_width ( cairo_format_t format, int width ) ;
+
+FUNCTION: cairo_surface_t*
+cairo_image_surface_create_for_data ( uchar* data, cairo_format_t format, int width, int height, int stride ) ;
+
+FUNCTION: uchar*
+cairo_image_surface_get_data ( cairo_surface_t* surface ) ;
+
+FUNCTION: cairo_format_t
+cairo_image_surface_get_format ( cairo_surface_t* surface ) ;
+
+FUNCTION: int
+cairo_image_surface_get_width ( cairo_surface_t* surface ) ;
+
+FUNCTION: int
+cairo_image_surface_get_height ( cairo_surface_t* surface ) ;
+
+FUNCTION: int
+cairo_image_surface_get_stride ( cairo_surface_t* surface ) ;
+
+FUNCTION: cairo_surface_t*
+cairo_image_surface_create_from_png ( char* filename ) ;
+
+FUNCTION: cairo_surface_t*
+cairo_image_surface_create_from_png_stream ( cairo_read_func_t read_func, void* closure ) ;
+
+! Pattern creation functions
+
+FUNCTION: cairo_pattern_t*
+cairo_pattern_create_rgb ( double red, double green, double blue ) ;
+
+FUNCTION: cairo_pattern_t*
+cairo_pattern_create_rgba ( double red, double green, double blue, double alpha ) ;
+
+FUNCTION: cairo_pattern_t*
+cairo_pattern_create_for_surface ( cairo_surface_t* surface ) ;
+
+FUNCTION: cairo_pattern_t*
+cairo_pattern_create_linear ( double x0, double y0, double x1, double y1 ) ;
+
+FUNCTION: cairo_pattern_t*
+cairo_pattern_create_radial ( double cx0, double cy0, double radius0, double cx1, double cy1, double radius1 ) ;
+
+FUNCTION: cairo_pattern_t*
+cairo_pattern_reference ( cairo_pattern_t* pattern ) ;
+
+FUNCTION: void
+cairo_pattern_destroy ( cairo_pattern_t* pattern ) ;
+
+FUNCTION: uint
+cairo_pattern_get_reference_count ( cairo_pattern_t* pattern ) ;
+
+FUNCTION: cairo_status_t
+cairo_pattern_status ( cairo_pattern_t* pattern ) ;
+
+FUNCTION: void*
+cairo_pattern_get_user_data ( cairo_pattern_t* pattern, cairo_user_data_key_t* key ) ;
+
+FUNCTION: cairo_status_t
+cairo_pattern_set_user_data ( cairo_pattern_t* pattern, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy ) ;
+
+TYPEDEF: int cairo_pattern_type_t
+C-ENUM:
+    CAIRO_PATTERN_TYPE_SOLID
+    CAIRO_PATTERN_TYPE_SURFACE
+    CAIRO_PATTERN_TYPE_LINEAR
+    CAIRO_PATTERN_TYPE_RADIA ;
+
+FUNCTION: cairo_pattern_type_t
+cairo_pattern_get_type ( cairo_pattern_t* pattern ) ;
+
+FUNCTION: void
+cairo_pattern_add_color_stop_rgb ( cairo_pattern_t* pattern, double offset, double red, double green, double blue ) ;
+
+FUNCTION: void
+cairo_pattern_add_color_stop_rgba ( cairo_pattern_t* pattern, double offset, double red, double green, double blue, double alpha ) ;
+
+FUNCTION: void
+cairo_pattern_set_matrix ( cairo_pattern_t* pattern, cairo_matrix_t* matrix ) ;
+
+FUNCTION: void
+cairo_pattern_get_matrix ( cairo_pattern_t* pattern, cairo_matrix_t* matrix ) ;
+
+TYPEDEF: int cairo_extend_t
+C-ENUM:
+    CAIRO_EXTEND_NONE
+    CAIRO_EXTEND_REPEAT
+    CAIRO_EXTEND_REFLECT
+    CAIRO_EXTEND_PAD ;
+
+FUNCTION: void
+cairo_pattern_set_extend ( cairo_pattern_t* pattern, cairo_extend_t extend ) ;
+
+FUNCTION: cairo_extend_t
+cairo_pattern_get_extend ( cairo_pattern_t* pattern ) ;
+
+TYPEDEF: int cairo_filter_t
+C-ENUM:
+    CAIRO_FILTER_FAST
+    CAIRO_FILTER_GOOD
+    CAIRO_FILTER_BEST
+    CAIRO_FILTER_NEAREST
+    CAIRO_FILTER_BILINEAR
+    CAIRO_FILTER_GAUSSIAN ;
+
+FUNCTION: void
+cairo_pattern_set_filter ( cairo_pattern_t* pattern, cairo_filter_t filter ) ;
+
+FUNCTION: cairo_filter_t
+cairo_pattern_get_filter ( cairo_pattern_t* pattern ) ;
+
+FUNCTION: cairo_status_t
+cairo_pattern_get_rgba ( cairo_pattern_t* pattern, double* red, double* green, double* blue, double* alpha ) ;
+
+FUNCTION: cairo_status_t
+cairo_pattern_get_surface ( cairo_pattern_t* pattern, cairo_surface_t* *surface ) ;
+
+FUNCTION: cairo_status_t
+cairo_pattern_get_color_stop_rgba ( cairo_pattern_t* pattern, int index, double* offset, double* red, double* green, double* blue, double* alpha ) ;
+
+FUNCTION: cairo_status_t
+cairo_pattern_get_color_stop_count ( cairo_pattern_t* pattern, int* count ) ;
+
+FUNCTION: cairo_status_t
+cairo_pattern_get_linear_points ( cairo_pattern_t* pattern, double* x0, double* y0, double* x1, double* y1 ) ;
+
+FUNCTION: cairo_status_t
+cairo_pattern_get_radial_circles ( cairo_pattern_t* pattern, double* x0, double* y0, double* r0, double* x1, double* y1, double* r1 ) ;
+
+! Matrix functions
+
+FUNCTION: void
+cairo_matrix_init ( cairo_matrix_t* matrix, double  xx, double  yx, double  xy, double  yy, double  x0, double  y0 ) ;
+
+FUNCTION: void
+cairo_matrix_init_identity ( cairo_matrix_t* matrix ) ;
+
+FUNCTION: void
+cairo_matrix_init_translate ( cairo_matrix_t* matrix, double tx, double ty ) ;
+
+FUNCTION: void
+cairo_matrix_init_scale ( cairo_matrix_t* matrix, double sx, double sy ) ;
+
+FUNCTION: void
+cairo_matrix_init_rotate ( cairo_matrix_t* matrix, double radians ) ;
+
+FUNCTION: void
+cairo_matrix_translate ( cairo_matrix_t* matrix, double tx, double ty ) ;
+
+FUNCTION: void
+cairo_matrix_scale ( cairo_matrix_t* matrix, double sx, double sy ) ;
+
+FUNCTION: void
+cairo_matrix_rotate ( cairo_matrix_t* matrix, double radians ) ;
+
+FUNCTION: cairo_status_t
+cairo_matrix_invert ( cairo_matrix_t* matrix ) ;
+
+FUNCTION: void
+cairo_matrix_multiply ( cairo_matrix_t* result, cairo_matrix_t* a, cairo_matrix_t* b ) ;
+
+FUNCTION: void
+cairo_matrix_transform_distance ( cairo_matrix_t* matrix, double* dx, double* dy ) ;
+
+FUNCTION: void
+cairo_matrix_transform_point ( cairo_matrix_t* matrix, double* x, double* y ) ;
+
+! Functions to be used while debugging (not intended for use in production code)
+FUNCTION: void
+cairo_debug_reset_static_data ( ) ;
diff --git a/basis/cairo/gadgets/gadgets.factor b/basis/cairo/gadgets/gadgets.factor
new file mode 100644 (file)
index 0000000..87942b4
--- /dev/null
@@ -0,0 +1,43 @@
+! Copyright (C) 2008 Matthew Willis.
+! See http://factorcode.org/license.txt for BSD license.
+USING: sequences math kernel byte-arrays cairo.ffi cairo
+io.backend ui.gadgets accessors opengl.gl arrays fry
+classes ui.render namespaces destructors libc ;
+IN: cairo.gadgets
+
+<PRIVATE
+: width>stride ( width -- stride ) 4 * ;
+
+: image-dims ( gadget -- width height stride )
+    dim>> first2 over width>stride ; inline
+: image-buffer ( width height stride -- alien )
+    * nip malloc ; inline
+PRIVATE>
+    
+GENERIC: render-cairo* ( gadget -- )
+
+: render-cairo ( gadget -- alien )
+    [
+        image-dims
+        [ image-buffer dup CAIRO_FORMAT_ARGB32 ] 
+        [ cairo_image_surface_create_for_data ] 3bi
+    ] [ '[ _ render-cairo* ] with-cairo-from-surface ] bi ;
+
+TUPLE: cairo-gadget < gadget ;
+
+: <cairo-gadget> ( dim -- gadget )
+    cairo-gadget new-gadget
+        swap >>dim ;
+
+M: cairo-gadget draw-gadget*
+    [
+        [ dim>> ] [ render-cairo &free ] bi
+        origin get first2 glRasterPos2i
+        1.0 -1.0 glPixelZoom
+        [ first2 GL_BGRA GL_UNSIGNED_BYTE ] dip
+        glDrawPixels
+    ] with-destructors ;
+
+: copy-surface ( surface -- )
+    cr swap 0 0 cairo_set_source_surface
+    cr cairo_paint ;
diff --git a/basis/cairo/summary.txt b/basis/cairo/summary.txt
new file mode 100644 (file)
index 0000000..f6cb370
--- /dev/null
@@ -0,0 +1 @@
+Cairo graphics library binding
diff --git a/basis/cairo/tags.txt b/basis/cairo/tags.txt
new file mode 100644 (file)
index 0000000..bb863cf
--- /dev/null
@@ -0,0 +1 @@
+bindings
index 793c771b64a1eaab9090c5c50939e0a997e0e33e..522e0c52f34e11b3dd0574aa0fb7b55569f7b23d 100644 (file)
@@ -211,7 +211,7 @@ M: real +minute ( timestamp n -- timestamp )
 M: number +second ( timestamp n -- timestamp )
     [ over second>> + seconds/minutes [ >>second ] dip +minute ] unless-zero ;
 
-: (time+)
+: (time+) ( timestamp duration -- timestamp' duration )
     [ second>> +second ] keep
     [ minute>> +minute ] keep
     [ hour>>   +hour   ] keep
@@ -219,7 +219,8 @@ M: number +second ( timestamp n -- timestamp )
     [ month>>  +month  ] keep
     [ year>>   +year   ] keep ; inline
 
-: +slots [ bi@ + ] curry 2keep ; inline
+: +slots ( obj1 obj2 quot -- n obj1 obj2 )
+    [ bi@ + ] curry 2keep ; inline
 
 PRIVATE>
 
index 862084e1d9e4a856f0f04102d0b7e894fc971aeb..309f764d2da6f1e6a3deb4baef1901fc0932b2ac 100644 (file)
@@ -6,6 +6,7 @@ IN: channels.remote
 HELP: <remote-channel>
 { $values { "node" "a node object" }
           { "id" "the id of the published channel on the node" } 
+          { "remote-channel" remote-channel }
 }
 { $description "Create a remote channel that acts as a proxy for a "
 "channel on another node. The remote node's channel must have been "
index 7d5f34777d74acc1f3de92d279272cda19e6ee94..0ae4328446c1d1e4aa8295c7165f70845277f75b 100644 (file)
@@ -1,21 +1,20 @@
 ! Copyright (C) 2006, 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel math math.bitwise strings io.binary namespaces
-make grouping ;
+make grouping byte-arrays ;
 IN: checksums.common
 
 SYMBOL: bytes-read
 
-: calculate-pad-length ( length -- pad-length )
-    dup 56 < 55 119 ? swap - ;
+: calculate-pad-length ( length -- length' )
+    [ 56 < 55 119 ? ] keep - ;
 
 : pad-last-block ( str big-endian? length -- str )
     [
-        rot %
-        HEX: 80 ,
-        dup HEX: 3f bitand calculate-pad-length 0 <string> %
-        3 shift 8 rot [ >be ] [ >le ] if %
-    ] "" make 64 group ;
+        [ % ] 2dip HEX: 80 ,
+        [ HEX: 3f bitand calculate-pad-length <byte-array> % ]
+        [ 3 shift 8 rot [ >be ] [ >le ] if % ] bi
+    ] B{ } make 64 group ;
 
 : update-old-new ( old new -- )
     [ [ get ] bi@ w+ dup ] 2keep [ set ] bi@ ; inline
index d919b0e31305b366b1b05cb6691429d9cfc74856..04c6c2497edadb2c52af7162a5c730e59568e372 100644 (file)
@@ -2,9 +2,9 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel io io.binary io.files io.streams.byte-array math
 math.functions math.parser namespaces splitting grouping strings
-sequences byte-arrays locals sequences.private
-io.encodings.binary symbols math.bitwise checksums
-checksums.common checksums.stream ;
+sequences byte-arrays locals sequences.private macros fry
+io.encodings.binary math.bitwise checksums
+checksums.common checksums.stream combinators ;
 IN: checksums.md5
 
 ! See http://www.faqs.org/rfcs/rfc1321.html
@@ -29,7 +29,7 @@ SYMBOLS: a b c d old-a old-b old-c old-d ;
     old-c c update-old-new
     old-d d update-old-new ;
 
-:: (ABCD) ( x s i k func a b c d -- )
+:: (ABCD) ( x a b c d k s i func -- )
     #! a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s)
     a [
         b get c get d get func call w+
@@ -39,11 +39,6 @@ SYMBOLS: a b c d old-a old-b old-c old-d ;
         b get w+
     ] change ; inline
 
-: ABCD a b c d (ABCD) ; inline
-: BCDA b c d a (ABCD) ; inline
-: CDAB c d a b (ABCD) ; inline
-: DABC d a b c (ABCD) ; inline
-
 : F ( X Y Z -- FXYZ )
     #! F(X,Y,Z) = XY v not(X) Z
     pick bitnot bitand [ bitand ] [ bitor ] bi* ;
@@ -60,104 +55,113 @@ SYMBOLS: a b c d old-a old-b old-c old-d ;
     #! I(X,Y,Z) = Y xor (X v not(Z))
     rot swap bitnot bitor bitxor ;
 
-: S11 7  ; inline
-: S12 12 ; inline
-: S13 17 ; inline
-: S14 22 ; inline
-: S21 5  ; inline
-: S22 9  ; inline
-: S23 14 ; inline
-: S24 20 ; inline
-: S31 4 ;  inline
-: S32 11 ; inline
-: S33 16 ; inline
-: S34 23 ; inline
-: S41 6  ; inline
-: S42 10 ; inline
-: S43 15 ; inline
-: S44 21 ; inline
-
-: (process-md5-block-F) ( block -- block )
-    dup S11 1  0  [ F ] ABCD
-    dup S12 2  1  [ F ] DABC
-    dup S13 3  2  [ F ] CDAB
-    dup S14 4  3  [ F ] BCDA
-    dup S11 5  4  [ F ] ABCD
-    dup S12 6  5  [ F ] DABC
-    dup S13 7  6  [ F ] CDAB
-    dup S14 8  7  [ F ] BCDA
-    dup S11 9  8  [ F ] ABCD
-    dup S12 10 9  [ F ] DABC
-    dup S13 11 10 [ F ] CDAB
-    dup S14 12 11 [ F ] BCDA
-    dup S11 13 12 [ F ] ABCD
-    dup S12 14 13 [ F ] DABC
-    dup S13 15 14 [ F ] CDAB
-    dup S14 16 15 [ F ] BCDA ;
-
-: (process-md5-block-G) ( block -- block )
-    dup S21 17 1  [ G ] ABCD
-    dup S22 18 6  [ G ] DABC
-    dup S23 19 11 [ G ] CDAB
-    dup S24 20 0  [ G ] BCDA
-    dup S21 21 5  [ G ] ABCD
-    dup S22 22 10 [ G ] DABC
-    dup S23 23 15 [ G ] CDAB
-    dup S24 24 4  [ G ] BCDA
-    dup S21 25 9  [ G ] ABCD
-    dup S22 26 14 [ G ] DABC
-    dup S23 27 3  [ G ] CDAB
-    dup S24 28 8  [ G ] BCDA
-    dup S21 29 13 [ G ] ABCD
-    dup S22 30 2  [ G ] DABC
-    dup S23 31 7  [ G ] CDAB
-    dup S24 32 12 [ G ] BCDA ;
-
-: (process-md5-block-H) ( block -- block )
-    dup S31 33 5  [ H ] ABCD
-    dup S32 34 8  [ H ] DABC
-    dup S33 35 11 [ H ] CDAB
-    dup S34 36 14 [ H ] BCDA
-    dup S31 37 1  [ H ] ABCD
-    dup S32 38 4  [ H ] DABC
-    dup S33 39 7  [ H ] CDAB
-    dup S34 40 10 [ H ] BCDA
-    dup S31 41 13 [ H ] ABCD
-    dup S32 42 0  [ H ] DABC
-    dup S33 43 3  [ H ] CDAB
-    dup S34 44 6  [ H ] BCDA
-    dup S31 45 9  [ H ] ABCD
-    dup S32 46 12 [ H ] DABC
-    dup S33 47 15 [ H ] CDAB
-    dup S34 48 2  [ H ] BCDA ;
-
-: (process-md5-block-I) ( block -- block )
-    dup S41 49 0  [ I ] ABCD
-    dup S42 50 7  [ I ] DABC
-    dup S43 51 14 [ I ] CDAB
-    dup S44 52 5  [ I ] BCDA
-    dup S41 53 12 [ I ] ABCD
-    dup S42 54 3  [ I ] DABC
-    dup S43 55 10 [ I ] CDAB
-    dup S44 56 1  [ I ] BCDA
-    dup S41 57 8  [ I ] ABCD
-    dup S42 58 15 [ I ] DABC
-    dup S43 59 6  [ I ] CDAB
-    dup S44 60 13 [ I ] BCDA
-    dup S41 61 4  [ I ] ABCD
-    dup S42 62 11 [ I ] DABC
-    dup S43 63 2  [ I ] CDAB
-    dup S44 64 9  [ I ] BCDA ;
+CONSTANT: S11 7
+CONSTANT: S12 12
+CONSTANT: S13 17
+CONSTANT: S14 22
+CONSTANT: S21 5
+CONSTANT: S22 9
+CONSTANT: S23 14
+CONSTANT: S24 20
+CONSTANT: S31 4
+CONSTANT: S32 11
+CONSTANT: S33 16
+CONSTANT: S34 23
+CONSTANT: S41 6
+CONSTANT: S42 10
+CONSTANT: S43 15
+CONSTANT: S44 21
+
+MACRO: with-md5-round ( ops func -- )
+    '[ [ _ (ABCD) ] compose ] map '[ _ cleave ] ;
+
+: (process-md5-block-F) ( block -- )
+    {
+        [ a b c d 0  S11 1  ]
+        [ d a b c 1  S12 2  ]
+        [ c d a b 2  S13 3  ]
+        [ b c d a 3  S14 4  ]
+        [ a b c d 4  S11 5  ]
+        [ d a b c 5  S12 6  ]
+        [ c d a b 6  S13 7  ]
+        [ b c d a 7  S14 8  ]
+        [ a b c d 8  S11 9  ]
+        [ d a b c 9  S12 10 ]
+        [ c d a b 10 S13 11 ]
+        [ b c d a 11 S14 12 ]
+        [ a b c d 12 S11 13 ]
+        [ d a b c 13 S12 14 ]
+        [ c d a b 14 S13 15 ]
+        [ b c d a 15 S14 16 ]
+    } [ F ] with-md5-round ;
+
+: (process-md5-block-G) ( block -- )
+    {
+        [ a b c d 1  S21 17 ]
+        [ d a b c 6  S22 18 ]
+        [ c d a b 11 S23 19 ]
+        [ b c d a 0  S24 20 ]
+        [ a b c d 5  S21 21 ]
+        [ d a b c 10 S22 22 ]
+        [ c d a b 15 S23 23 ]
+        [ b c d a 4  S24 24 ]
+        [ a b c d 9  S21 25 ]
+        [ d a b c 14 S22 26 ]
+        [ c d a b 3  S23 27 ]
+        [ b c d a 8  S24 28 ]
+        [ a b c d 13 S21 29 ]
+        [ d a b c 2  S22 30 ]
+        [ c d a b 7  S23 31 ]
+        [ b c d a 12 S24 32 ]
+    } [ G ] with-md5-round ;
+
+: (process-md5-block-H) ( block -- )
+    {
+        [ a b c d 5  S31 33 ]
+        [ d a b c 8  S32 34 ]
+        [ c d a b 11 S33 35 ]
+        [ b c d a 14 S34 36 ]
+        [ a b c d 1  S31 37 ]
+        [ d a b c 4  S32 38 ]
+        [ c d a b 7  S33 39 ]
+        [ b c d a 10 S34 40 ]
+        [ a b c d 13 S31 41 ]
+        [ d a b c 0  S32 42 ]
+        [ c d a b 3  S33 43 ]
+        [ b c d a 6  S34 44 ]
+        [ a b c d 9  S31 45 ]
+        [ d a b c 12 S32 46 ]
+        [ c d a b 15 S33 47 ]
+        [ b c d a 2  S34 48 ]
+    } [ H ] with-md5-round ;
+
+: (process-md5-block-I) ( block -- )
+    {
+        [ a b c d 0  S41 49 ]
+        [ d a b c 7  S42 50 ]
+        [ c d a b 14 S43 51 ]
+        [ b c d a 5  S44 52 ]
+        [ a b c d 12 S41 53 ]
+        [ d a b c 3  S42 54 ]
+        [ c d a b 10 S43 55 ]
+        [ b c d a 1  S44 56 ]
+        [ a b c d 8  S41 57 ]
+        [ d a b c 15 S42 58 ]
+        [ c d a b 6  S43 59 ]
+        [ b c d a 13 S44 60 ]
+        [ a b c d 4  S41 61 ]
+        [ d a b c 11 S42 62 ]
+        [ c d a b 2  S43 63 ]
+        [ b c d a 9  S44 64 ]
+    } [ I ] with-md5-round ;
 
 : (process-md5-block) ( block -- )
-    4 <groups> [ le> ] map
-
-    (process-md5-block-F)
-    (process-md5-block-G)
-    (process-md5-block-H)
-    (process-md5-block-I)
-
-    drop
+    4 <groups> [ le> ] map {
+        [ (process-md5-block-F) ]
+        [ (process-md5-block-G) ]
+        [ (process-md5-block-H) ]
+        [ (process-md5-block-I) ]
+    } cleave
 
     update-md ;
 
index fd067997a78c082b67747e869651025b3f8549cc..750e05f3c89bea6b2d61366189bb119f3044fcb5 100644 (file)
@@ -4,8 +4,8 @@ USING: help.syntax help.markup ;
 HELP: openssl-checksum
 { $class-description "The class of checksum algorithms implemented by OpenSSL. The exact set of algorithms supported depends on how the OpenSSL library was compiled; " { $snippet "md5" } " and " { $snippet "sha1" } " should be universally available." } ;
 
-HELP: <openssl-checksum> ( name -- checksum )
-{ $values { "name" "an EVP message digest name" } { "checksum" openssl-checksum } }
+HELP: <openssl-checksum>
+{ $values { "name" "an EVP message digest name" } { "openssl-checksum" openssl-checksum } }
 { $description "Creates a new OpenSSL checksum object." } ;
 
 HELP: openssl-md5
index 6cdc9270aa7262b8057db66b94007975e359f2f7..ede8a8f6532cba1585fb0b4bfd5d327518fb93c6 100644 (file)
@@ -3,7 +3,7 @@
 USING: arrays combinators kernel io io.encodings.binary io.files
 io.streams.byte-array math.vectors strings sequences namespaces
 make math parser sequences assocs grouping vectors io.binary
-hashtables symbols math.bitwise checksums checksums.common
+hashtables math.bitwise checksums checksums.common
 checksums.stream ;
 IN: checksums.sha1
 
index beb657bd3e1ab5b0b332ca64805e0f85959ebd7e..898a695b34d5ce3308ec1fa19ba47db105ea9fd2 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel splitting grouping math sequences namespaces make
-io.binary symbols math.bitwise checksums checksums.common
+io.binary math.bitwise checksums checksums.common
 sbufs strings ;
 IN: checksums.sha2
 
index e12b6eb2765e78e0fa0b306937a36b2885cdb83e..60a0232a2cc5ed823884bec79fb71d6c559a9960 100644 (file)
@@ -30,10 +30,6 @@ HELP: cocoa-app
 { $values { "quot" quotation } }
 { $description "Initializes Cocoa, calls the quotation, and starts the Cocoa event loop." } ;
 
-HELP: do-event
-{ $values { "app" "an " { $snippet "NSApplication" } } { "?" "a boolean" } }
-{ $description "Processes a pending event in the queue, if any, returning a boolean indicating if there was one. Does not block." } ;
-
 HELP: add-observer
 { $values { "observer" "an " { $snippet "NSObject" } } { "selector" string } { "name" "an " { $snippet "NSString" } } { "object" "an " { $snippet "NSObject" } } }
 { $description "Registers an observer with the " { $snippet "NSNotificationCenter" } " singleton." } ;
@@ -52,7 +48,6 @@ HELP: objc-error
 ARTICLE: "cocoa-application-utils" "Cocoa application utilities"
 "Utilities:"
 { $subsection NSApp }
-{ $subsection do-event }
 { $subsection add-observer }
 { $subsection remove-observer }
 { $subsection install-delegate }
index a52aaedce27d226623a7e51bbb813b7caa1fef93..ab2b6375a90b04fd4da7c1131fbef0f646939e4c 100644 (file)
@@ -1,10 +1,10 @@
 ! Copyright (C) 2006, 2008 Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.syntax io kernel namespaces core-foundation
-core-foundation.run-loop core-foundation.arrays
-core-foundation.data core-foundation.strings cocoa.messages
-cocoa cocoa.classes cocoa.runtime sequences threads init summary
-kernel.private assocs ;
+core-foundation.arrays core-foundation.data
+core-foundation.strings cocoa.messages cocoa cocoa.classes
+cocoa.runtime sequences threads init summary kernel.private
+assocs ;
 IN: cocoa.application
 
 : <NSString> ( str -- alien ) <CFString> -> autorelease ;
@@ -35,13 +35,6 @@ FUNCTION: void NSBeep ( ) ;
 : with-cocoa ( quot -- )
     [ NSApp drop call ] with-autorelease-pool ; inline
 
-: next-event ( app -- event )
-    NSAnyEventMask f CFRunLoopDefaultMode 1
-    -> nextEventMatchingMask:untilDate:inMode:dequeue: ;
-
-: do-event ( app -- ? )
-    dup next-event [ dupd -> sendEvent: -> updateWindows t ] [ drop f ] if* ;
-
 : add-observer ( observer selector name object -- )
     [
         [ NSNotificationCenter -> defaultCenter ] 2dip
index a1cd7924366b9476aead1f05e7afcb1c9276f9e2..3b533f98c38a4eed90c0877aa22a5ed8ce119f95 100644 (file)
@@ -2,7 +2,7 @@ USING: help.syntax help.markup ;
 IN: cocoa.views
 
 HELP: <PixelFormat>
-{ $values { "pixelfmt" "an " { $snippet "NSOpenGLPixelFormat" } } }
+{ $values { "attributes" "a sequence of attributes" } { "pixelfmt" "an " { $snippet "NSOpenGLPixelFormat" } } }
 { $description "Creates an " { $snippet "NSOpenGLPixelFormat" } " with some reasonable defaults." } ;
 
 HELP: <GLView>
index 3a53a1cc3cfde331251e64bb92cb6cc04052380d..51f692d02d6658e7d8b2f60f77108246345357e6 100644 (file)
@@ -14,7 +14,7 @@ IN: cocoa.windows
 : NSBackingStoreNonretained 1 ; inline
 : NSBackingStoreBuffered    2 ; inline
 
-: standard-window-type
+: standard-window-type ( -- n )
     {
         NSTitledWindowMask
         NSClosableWindowMask
index 27dc1608127e35241dc034124024b8038b40eaca..1dd9257281d6ff66e29b5513d3c89ab0a2bba43a 100644 (file)
@@ -4,8 +4,8 @@ IN: columns
 HELP: column
 { $class-description "A virtual sequence which presents a fixed column of a matrix represented as a sequence of rows. New instances can be created by calling " { $link <column> } "." } ;
 
-HELP: <column> ( seq n -- column )
-{ $values { "seq" sequence } { "n" "a non-negative integer" } { "column" column } }
+HELP: <column>
+{ $values { "seq" sequence } { "col" "a non-negative integer" } { "column" column } }
 { $description "Outputs a new virtual sequence which presents a fixed column of a matrix represented as a sequence of rows." "The " { $snippet "i" } "th element of a column is the " { $snippet "n" } "th element of the " { $snippet "i" } "th element of " { $snippet "seq" } ". Every element of " { $snippet "seq" } " must be a sequence, and all sequences must have equal length." }
 { $examples
     { $example
index 5ac8531f586c7ff05377c79b5092c85a93175d83..8f45dab8728c4e7ef153f94692dea47d0b2c36a1 100644 (file)
@@ -9,7 +9,7 @@ TUPLE: column seq col ;
 C: <column> column
 
 M: column virtual-seq seq>> ;
-M: column virtual@ dup col>> -rot seq>> nth bounds-check ;
+M: column virtual@ [ col>> swap ] [ seq>> ] bi nth bounds-check ;
 M: column length seq>> length ;
 
 INSTANCE: column virtual-sequence
diff --git a/basis/combinators/smart/authors.txt b/basis/combinators/smart/authors.txt
new file mode 100644 (file)
index 0000000..b4bd0e7
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
\ No newline at end of file
diff --git a/basis/combinators/smart/smart-docs.factor b/basis/combinators/smart/smart-docs.factor
new file mode 100644 (file)
index 0000000..75f83c1
--- /dev/null
@@ -0,0 +1,125 @@
+! Copyright (C) 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax kernel quotations math sequences
+multiline ;
+IN: combinators.smart
+
+HELP: input<sequence
+{ $values
+     { "quot" quotation }
+     { "newquot" quotation }
+}
+{ $description "Infers the number of inputs, " { $snippet "n" } ", to " { $snippet "quot" } " and calls the " { $snippet "quot" } " with the first " { $snippet "n" } " values from a sequence." }
+{ $examples
+    { $example
+        "USING: combinators.smart math prettyprint ;"
+        "{ 1 2 3 } [ + + ] input<sequence ."
+        "6"
+    }
+} ;
+
+HELP: output>array
+{ $values
+     { "quot" quotation }
+     { "newquot" quotation }
+}
+{ $description "Infers the number or outputs from the quotation and constructs an array from those outputs." }
+{ $examples
+    { $example
+        <" USING: combinators combinators.smart math prettyprint ;
+9 [
+    { [ 1- ] [ 1+ ] [ sq ] } cleave
+] output>array .">
+    "{ 8 10 81 }"
+    }
+} ;
+
+HELP: output>sequence
+{ $values
+     { "quot" quotation } { "exemplar" "an exemplar" }
+     { "newquot" quotation }
+}
+{ $description "Infers the number of outputs from the quotation and constructs a new sequence from those objects of the same type as the exemplar." }
+{ $examples
+    { $example
+        "USING: combinators.smart kernel math prettyprint ;"
+        "4 [ [ 1 + ] [ 2 + ] [ 3 + ] tri ] V{ } output>sequence ."
+        "V{ 5 6 7 }"
+    }
+} ;
+
+HELP: reduce-outputs
+{ $values
+     { "quot" quotation } { "operation" quotation }
+     { "newquot" quotation }
+}
+{ $description "Infers the number of outputs from " { $snippet "quot" } " and reduces them using " { $snippet "operation" } ". The identity for the " { $link reduce } " operation is the first output." }
+{ $examples
+    { $example
+        "USING: combinators.smart kernel math prettyprint ;"
+        "3 [ [ 4 * ] [ 4 / ] [ 4 - ] tri ] [ * ] reduce-outputs ."
+        "-9"
+    }
+} ;
+
+HELP: sum-outputs
+{ $values
+     { "quot" quotation }
+     { "n" integer }
+}
+{ $description "Infers the number of outputs from " { $snippet "quot" } " and returns their sum." }
+{ $examples
+    { $example
+        "USING: combinators.smart kernel math prettyprint ;"
+        "10 [ [ 1- ] [ 1+ ] bi ] sum-outputs ."
+        "20"
+    }
+} ;
+
+HELP: append-outputs
+{ $values
+     { "quot" quotation }
+     { "seq" sequence }
+}
+{ $description "Infers the number of outputs from " { $snippet "quot" } " and returns a sequence of the outputs appended." }
+{ $examples
+    { $example
+        "USING: combinators.smart prettyprint ;"
+        "[ { 1 2 } { \"A\" \"b\" } ] append-outputs ."
+        "{ 1 2 \"A\" \"b\" }"
+    }
+} ;
+
+HELP: append-outputs-as
+{ $values
+     { "quot" quotation } { "exemplar" sequence }
+     { "seq" sequence }
+}
+{ $description "Infers the number of outputs from " { $snippet "quot" } " and returns a sequence of type " { $snippet "exemplar" } " of the outputs appended." }
+{ $examples
+    { $example
+        "USING: combinators.smart prettyprint ;"
+        "[ { 1 2 } { \"A\" \"b\" } ] V{ } append-outputs-as ."
+        "V{ 1 2 \"A\" \"b\" }"
+    }
+} ;
+
+{ append-outputs append-outputs-as } related-words
+
+
+ARTICLE: "combinators.smart" "Smart combinators"
+"The " { $vocab-link "combinators.smart" } " vocabulary implements " { $emphasis "smart combinators" } ". A smart combinator is one whose behavior depends on the static stack effect of an input quotation." $nl
+"Smart inputs from a sequence:"
+{ $subsection input<sequence }
+"Smart outputs to a sequence:"
+{ $subsection output>sequence }
+{ $subsection output>array }
+"Reducing the output of a quotation:"
+{ $subsection reduce-outputs }
+"Summing the output of a quotation:"
+{ $subsection sum-outputs }
+"Appending the results of a quotation:"
+{ $subsection append-outputs }
+{ $subsection append-outputs-as } ;
+
+ABOUT: "combinators.smart"
diff --git a/basis/combinators/smart/smart-tests.factor b/basis/combinators/smart/smart-tests.factor
new file mode 100644 (file)
index 0000000..370dc26
--- /dev/null
@@ -0,0 +1,39 @@
+! Copyright (C) 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: tools.test combinators.smart math kernel ;
+IN: combinators.smart.tests
+
+: test-bi ( -- 9 11 )
+    10 [ 1- ] [ 1+ ] bi ;
+
+[ [ test-bi ] output>array ] must-infer
+[ { 9 11 } ] [ [ test-bi ] output>array ] unit-test
+
+[ { 9 11 } [ + ] input<sequence ] must-infer
+[ 20 ] [ { 9 11 } [ + ] input<sequence ] unit-test
+
+[ 6 ] [ [ 1 2 3 ] [ + ] reduce-outputs ] unit-test
+
+[ [ 1 2 3 ] [ + ] reduce-outputs ] must-infer
+
+[ 6 ] [ [ 1 2 3 ] sum-outputs ] unit-test
+
+[ "ab" ]
+[
+    [ "a" "b" ] "" append-outputs-as
+] unit-test
+
+[ "" ]
+[
+    [ ] "" append-outputs-as
+] unit-test
+
+[ { } ]
+[
+    [ ] append-outputs
+] unit-test
+
+[ B{ 1 2 3 } ]
+[
+    [ { 1 } { 2 } { 3 } ] B{ } append-outputs-as
+] unit-test
diff --git a/basis/combinators/smart/smart.factor b/basis/combinators/smart/smart.factor
new file mode 100644 (file)
index 0000000..e93d84e
--- /dev/null
@@ -0,0 +1,28 @@
+! Copyright (C) 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors fry generalizations kernel macros math.order
+stack-checker math ;
+IN: combinators.smart
+
+MACRO: output>sequence ( quot exemplar -- newquot )
+    [ dup infer out>> ] dip
+    '[ @ _ _ nsequence ] ;
+
+: output>array ( quot -- newquot )
+    { } output>sequence ; inline
+
+MACRO: input<sequence ( quot -- newquot )
+    [ infer in>> ] keep
+    '[ _ firstn @ ] ;
+
+MACRO: reduce-outputs ( quot operation -- newquot )
+    [ dup infer out>> 1 [-] ] dip n*quot compose ;
+
+: sum-outputs ( quot -- n )
+    [ + ] reduce-outputs ; inline
+
+MACRO: append-outputs-as ( quot exemplar -- newquot )
+    [ dup infer out>> ] dip '[ @ _ _ nappend-as ] ;
+
+: append-outputs ( quot -- seq )
+    { } append-outputs-as ; inline
index 7d5a041951a6320fbb2872afb9b2410e20e5c38e..38d40d84828b0055873718a7c3be9221e151d3c1 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2003, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: init continuations hashtables io io.encodings.utf8
-io.files kernel kernel.private namespaces parser sequences
-strings system splitting vocabs.loader ;
+io.files io.pathnames kernel kernel.private namespaces parser
+sequences strings system splitting vocabs.loader ;
 IN: command-line
 
 SYMBOL: script
index d8bad5ec410a61f511759732f7cde7ab6a9a48a6..81359690dbbbd7680e58b555ce0fa3bbb4dcaa19 100644 (file)
@@ -13,7 +13,7 @@ IN: compiler.cfg.alias-analysis.tests
 
 [ ] [
     {
-        T{ ##load-indirect f V int-regs 1 "hello" }
+        T{ ##load-reference f V int-regs 1 "hello" }
         T{ ##slot-imm f V int-regs 0 V int-regs 1 0 3 }
     } alias-analysis drop
 ] unit-test
index 90227bb5dae9ffd79c26355f18cfa3f639b7396f..ec8fe62dfbf05326078cef474c288f67beb4f639 100644 (file)
@@ -68,7 +68,8 @@ IN: compiler.cfg.alias-analysis
 ! Map vregs -> alias classes
 SYMBOL: vregs>acs
 
-: check [ "BUG: static type error detected" throw ] unless* ; inline
+: check ( obj -- obj )
+    [ "BUG: static type error detected" throw ] unless* ; inline
  
 : vreg>ac ( vreg -- ac )
     #! Only vregs produced by ##allot, ##peek and ##slot can
@@ -223,7 +224,7 @@ GENERIC: analyze-aliases* ( insn -- insn' )
 M: ##load-immediate analyze-aliases*
     dup [ val>> ] [ dst>> ] bi constants get set-at ;
 
-M: ##load-indirect analyze-aliases*
+M: ##load-reference analyze-aliases*
     dup dst>> set-heap-ac ;
 
 M: ##alien-global analyze-aliases*
index c3cce1425e9705c11f02e585629b48bb24f26a1e..0b303a8a43440429ba748dcbc7765ec96aed3fa5 100644 (file)
@@ -14,7 +14,7 @@ kernel.private math ;
     [ ]
     [ dup ]
     [ swap ]
-    [ >r r> ]
+    [ [ ] dip ]
     [ fixnum+ ]
     [ fixnum+fast ]
     [ 3 fixnum+fast ]
index c0d5bf79a6f7a24b993d546f91338f47c2c18666..817c0f4680ff8f7d7e4a0ceec9c3fa7ad21c96f4 100644 (file)
@@ -5,17 +5,17 @@ sequences classes.tuple cpu.architecture compiler.cfg.registers
 compiler.cfg.instructions ;
 IN: compiler.cfg.hats
 
-: i int-regs next-vreg ; inline
-: ^^i i dup ; inline
-: ^^i1 [ ^^i ] dip ; inline
-: ^^i2 [ ^^i ] 2dip ; inline
-: ^^i3 [ ^^i ] 3dip ; inline
+: i ( -- vreg ) int-regs next-vreg ; inline
+: ^^i ( -- vreg vreg ) i dup ; inline
+: ^^i1 ( obj -- vreg vreg obj ) [ ^^i ] dip ; inline
+: ^^i2 ( obj obj -- vreg vreg obj obj ) [ ^^i ] 2dip ; inline
+: ^^i3 ( obj obj obj -- vreg vreg obj obj obj ) [ ^^i ] 3dip ; inline
 
-: d double-float-regs next-vreg ; inline
-: ^^d d dup ; inline
-: ^^d1 [ ^^d ] dip ; inline
-: ^^d2 [ ^^d ] 2dip ; inline
-: ^^d3 [ ^^d ] 3dip ; inline
+: d ( -- vreg ) double-float-regs next-vreg ; inline
+: ^^d  ( -- vreg vreg ) d dup ; inline
+: ^^d1 ( obj -- vreg vreg obj ) [ ^^d ] dip ; inline
+: ^^d2 ( obj obj -- vreg vreg obj obj ) [ ^^d ] 2dip ; inline
+: ^^d3 ( obj obj obj -- vreg vreg obj obj obj ) [ ^^d ] 3dip ; inline
 
 : ^^load-literal ( obj -- dst ) ^^i1 ##load-literal ; inline
 : ^^peek ( loc -- dst ) ^^i1 ##peek ; inline
index 5619a70740bef3632cd7dbb2a198420907ebfd0f..d152a8cc33ba8c113ea68fce38105d9f55959e54 100644 (file)
@@ -36,13 +36,13 @@ TUPLE: ##alien-setter < ##effect { value vreg } ;
 
 ! Stack operations
 INSN: ##load-immediate < ##pure { val integer } ;
-INSN: ##load-indirect < ##pure obj ;
+INSN: ##load-reference < ##pure obj ;
 
 GENERIC: ##load-literal ( dst value -- )
 
 M: fixnum ##load-literal tag-fixnum ##load-immediate ;
 M: f ##load-literal drop \ f tag-number ##load-immediate ;
-M: object ##load-literal ##load-indirect ;
+M: object ##load-literal ##load-reference ;
 
 INSN: ##peek < ##read { loc loc } ;
 INSN: ##replace < ##write { loc loc } ;
index 5a5df881124d52f4b7db6429bca40da70b11b85a..30d062d4cce1a8795f3c181ba22a7786ec796a8b 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: classes.tuple classes.tuple.parser kernel words
-make fry sequences parser ;
+make fry sequences parser accessors ;
 IN: compiler.cfg.instructions.syntax
 
 : insn-word ( -- word )
@@ -10,10 +10,13 @@ IN: compiler.cfg.instructions.syntax
     #! this one.
     "insn" "compiler.cfg.instructions" lookup ;
 
+: insn-effect ( word -- effect )
+    boa-effect [ but-last ] change-in { } >>out ;
+
 : INSN:
     parse-tuple-definition "regs" suffix
     [ dup tuple eq? [ drop insn-word ] when ] dip
     [ define-tuple-class ]
     [ 2drop save-location ]
-    [ 2drop dup '[ f _ boa , ] define-inline ]
+    [ 2drop [ ] [ '[ f _ boa , ] ] [ insn-effect ] tri define-inline ]
     3tri ; parsing
index 5f753308655f96a8aa1e108057b89fe8a90b695b..3d0a7bec9c39a50667b4d4695bb884c3d652646b 100644 (file)
@@ -1,7 +1,6 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: qualified words sequences kernel combinators
-cpu.architecture
+USING: words sequences kernel combinators cpu.architecture
 compiler.cfg.hats
 compiler.cfg.instructions
 compiler.cfg.intrinsics.alien
index 948302c74b58093678213d610c3dfd010a92741e..4ddd1fdc0b18256d698ee4f1ae10ba29e25ceb3e 100644 (file)
@@ -1,7 +1,7 @@
 IN: compiler.cfg.linear-scan.tests
 USING: tools.test random sorting sequences sets hashtables assocs
 kernel fry arrays splitting namespaces math accessors vectors
-math.order
+math.order grouping
 cpu.architecture
 compiler.cfg.instructions
 compiler.cfg.registers
@@ -249,7 +249,7 @@ SYMBOL: max-uses
     ] with-scope ;
 
 : random-test ( num-intervals max-uses max-registers max-insns -- )
-    over >r random-live-intervals r> int-regs associate check-linear-scan ;
+    over [ random-live-intervals ] dip int-regs associate check-linear-scan ;
 
 [ ] [ 30 2 1 60 random-test ] unit-test
 [ ] [ 60 2 2 60 random-test ] unit-test
index 7433df9617cbab44cbfe28c660f25f457e17c9df..584c4cd6629cbe15fc64d7147188584c4c3bcf87 100644 (file)
@@ -37,7 +37,7 @@ M: insn linearize-insn , drop ;
 M: ##branch linearize-insn
     drop dup successors>> first emit-branch ;
 
-: (binary-conditional)
+: (binary-conditional) ( basic-block insn -- basic-block successor1 successor2 src1 src2 cc )
     [ dup successors>> first2 ]
     [ [ src1>> ] [ src2>> ] [ cc>> ] tri ] bi* ; inline
 
index 476ba7d0ab4179e32f0a6cc16d9a2e6ed30b6d43..cc790c6c0a3725579447373309c2563dc6a6e75a 100644 (file)
@@ -39,8 +39,6 @@ GENERIC: >expr ( insn -- expr )
 
 M: ##load-immediate >expr val>> <constant> ;
 
-M: ##load-indirect >expr obj>> <constant> ;
-
 M: ##unary >expr
     [ class ] [ src>> vreg>vn ] bi unary-expr boa ;
 
index 641ccceb5daee5f43514caaec892a28e9e45174b..ac9603522effc4debda56f26f76806817b5d699c 100644 (file)
@@ -81,7 +81,7 @@ sequences ;
 
 [
     {
-        T{ ##load-indirect f V int-regs 1 + }
+        T{ ##load-reference f V int-regs 1 + }
         T{ ##peek f V int-regs 2 D 0 }
         T{ ##compare f V int-regs 4 V int-regs 2 V int-regs 1 cc> }
         T{ ##compare f V int-regs 6 V int-regs 2 V int-regs 1 cc> }
@@ -89,7 +89,7 @@ sequences ;
     }
 ] [
     {
-        T{ ##load-indirect f V int-regs 1 + }
+        T{ ##load-reference f V int-regs 1 + }
         T{ ##peek f V int-regs 2 D 0 }
         T{ ##compare f V int-regs 4 V int-regs 2 V int-regs 1 cc> }
         T{ ##compare-imm f V int-regs 6 V int-regs 4 7 cc/= }
@@ -99,7 +99,7 @@ sequences ;
 
 [
     {
-        T{ ##load-indirect f V int-regs 1 + }
+        T{ ##load-reference f V int-regs 1 + }
         T{ ##peek f V int-regs 2 D 0 }
         T{ ##compare f V int-regs 4 V int-regs 2 V int-regs 1 cc<= }
         T{ ##compare f V int-regs 6 V int-regs 2 V int-regs 1 cc> }
@@ -107,7 +107,7 @@ sequences ;
     }
 ] [
     {
-        T{ ##load-indirect f V int-regs 1 + }
+        T{ ##load-reference f V int-regs 1 + }
         T{ ##peek f V int-regs 2 D 0 }
         T{ ##compare f V int-regs 4 V int-regs 2 V int-regs 1 cc<= }
         T{ ##compare-imm f V int-regs 6 V int-regs 4 7 cc= }
index 9f134c02d7f0a0112d246993964f36becbb2d7cb..3d7f574cf8d54ca9facfabddd1ce304465813488 100644 (file)
@@ -1,9 +1,9 @@
-! Copyright (C) 2008 Slava Pestov.
+! Copyright (C) 2008, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: namespaces make math math.order math.parser sequences accessors
 kernel kernel.private layouts assocs words summary arrays
 combinators classes.algebra alien alien.c-types alien.structs
-alien.strings alien.arrays sets threads libc continuations.private
+alien.strings alien.arrays sets libc continuations.private
 fry cpu.architecture
 compiler.errors
 compiler.alien
@@ -11,7 +11,8 @@ compiler.cfg
 compiler.cfg.instructions
 compiler.cfg.registers
 compiler.cfg.builder
-compiler.codegen.fixup ;
+compiler.codegen.fixup
+compiler.utilities ;
 IN: compiler.codegen
 
 GENERIC: generate-insn ( insn -- )
@@ -69,8 +70,8 @@ SYMBOL: labels
 M: ##load-immediate generate-insn
     [ dst>> register ] [ val>> ] bi %load-immediate ;
 
-M: ##load-indirect generate-insn
-    [ dst>> register ] [ obj>> ] bi %load-indirect ;
+M: ##load-reference generate-insn
+    [ dst>> register ] [ obj>> ] bi %load-reference ;
 
 M: ##peek generate-insn
     [ dst>> register ] [ loc>> ] bi %peek ;
@@ -95,7 +96,7 @@ M: ##dispatch-label generate-insn label>> %dispatch-label ;
 M: ##dispatch generate-insn
     [ src>> register ] [ temp>> register ] [ offset>> ] tri %dispatch ;
 
-: >slot<
+: >slot< ( insn -- dst obj slot tag )
     {
         [ dst>> register ]
         [ obj>> register ]
@@ -109,7 +110,7 @@ M: ##slot generate-insn
 M: ##slot-imm generate-insn
     >slot< %slot-imm ;
 
-: >set-slot<
+: >set-slot< ( insn -- src obj slot tag )
     {
         [ src>> register ]
         [ obj>> register ]
@@ -209,7 +210,8 @@ M: ##alien-cell       generate-insn dst/src %alien-cell       ;
 M: ##alien-float      generate-insn dst/src %alien-float      ;
 M: ##alien-double     generate-insn dst/src %alien-double     ;
 
-: >alien-setter< [ src>> register ] [ value>> register ] bi ; inline
+: >alien-setter< ( insn -- src value )
+    [ src>> register ] [ value>> register ] bi ; inline
 
 M: ##set-alien-integer-1 generate-insn >alien-setter< %set-alien-integer-1 ;
 M: ##set-alien-integer-2 generate-insn >alien-setter< %set-alien-integer-2 ;
@@ -462,7 +464,7 @@ TUPLE: callback-context ;
     dup current-callback eq? [
         drop
     ] [
-        yield wait-to-return
+        yield-hook get call wait-to-return
     ] if ;
 
 : do-callback ( quot token -- )
index 0d24daef7103220b2ced01f573a0f42fb2e52333..f2f4e7aa9e5c65b73bc55676a7c26b49d3d7da39 100644 (file)
@@ -1,14 +1,14 @@
-! Copyright (C) 2004, 2008 Slava Pestov.
+! Copyright (C) 2004, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors kernel namespaces arrays sequences io
 words fry continuations vocabs assocs dlists definitions math
-threads graphs generic combinators deques search-deques io
+graphs generic combinators deques search-deques io
 stack-checker stack-checker.state stack-checker.inlining
 compiler.errors compiler.units compiler.tree.builder
 compiler.tree.optimizer compiler.cfg.builder
 compiler.cfg.optimizer compiler.cfg.linearization
 compiler.cfg.two-operand compiler.cfg.linear-scan
-compiler.cfg.stack-frame compiler.codegen ;
+compiler.cfg.stack-frame compiler.codegen compiler.utilities ;
 IN: compiler
 
 SYMBOL: compile-queue
@@ -24,7 +24,7 @@ SYMBOL: compiled
     } cond drop ;
 
 : maybe-compile ( word -- )
-    dup compiled>> [ drop ] [ queue-compile ] if ;
+    dup optimized>> [ drop ] [ queue-compile ] if ;
 
 SYMBOL: +failed+
 
@@ -107,10 +107,10 @@ t compile-dependencies? set-global
     ] with-return ;
 
 : compile-loop ( deque -- )
-    [ (compile) yield ] slurp-deque ;
+    [ (compile) yield-hook get call ] slurp-deque ;
 
 : decompile ( word -- )
-    f 2array 1array modify-code-heap ;
+    f 2array 1array modify-code-heap ;
 
 : optimized-recompile-hook ( words -- alist )
     [
index e743c8484bc3c2cc1e9786e5822380ab27bc822e..78e95ffb91e86efe0847752212f0f2ea63572b96 100644 (file)
@@ -75,7 +75,7 @@ unit-test
     -12 -13 [ [ 0 swap fixnum-fast ] bi@ ] compile-call
 ] unit-test
 
-[ -1 2 ] [ 1 2 [ >r 0 swap fixnum- r> ] compile-call ] unit-test
+[ -1 2 ] [ 1 2 [ [ 0 swap fixnum- ] dip ] compile-call ] unit-test
 
 [ 12 13 ] [
     -12 -13 [ [ 0 swap fixnum- ] bi@ ] compile-call
@@ -88,13 +88,13 @@ unit-test
 ! Test slow shuffles
 [ 3 1 2 3 4 5 6 7 8 9 ] [
     1 2 3 4 5 6 7 8 9
-    [ >r >r >r >r >r >r >r >r >r 3 r> r> r> r> r> r> r> r> r> ]
+    [ [ [ [ [ [ [ [ [ [ 3 ] dip ] dip ] dip ] dip ] dip ] dip ] dip ] dip ] dip ]
     compile-call
 ] unit-test
 
 [ 2 2 2 2 2 2 2 2 2 2 1 ] [
     1 2
-    [ swap >r dup dup dup dup dup dup dup dup dup r> ] compile-call
+    [ swap [ dup dup dup dup dup dup dup dup dup ] dip ] compile-call
 ] unit-test
 
 [ ] [ [ 9 [ ] times ] compile-call ] unit-test
@@ -110,7 +110,7 @@ unit-test
     float+ swap { [ "hey" ] [ "bye" ] } dispatch ;
 
 : try-breaking-dispatch-2 ( -- ? )
-    1 1.0 2.5 try-breaking-dispatch "bye" = >r 3.5 = r> and ;
+    1 1.0 2.5 try-breaking-dispatch "bye" = [ 3.5 = ] dip and ;
 
 [ t ] [
     10000000 [ drop try-breaking-dispatch-2 ] all?
@@ -131,10 +131,10 @@ unit-test
     2dup 1 slot eq? [ 2drop ] [ 
         2dup array-nth tombstone? [ 
             [
-                [ array-nth ] 2keep >r 1 fixnum+fast r> array-nth
+                [ array-nth ] 2keep [ 1 fixnum+fast ] dip array-nth
                 pick 2dup hellish-bug-1 3drop
             ] 2keep
-        ] unless >r 2 fixnum+fast r> hellish-bug-2
+        ] unless [ 2 fixnum+fast ] dip hellish-bug-2
     ] if ; inline recursive
 
 : hellish-bug-3 ( hash array -- ) 
@@ -159,9 +159,9 @@ TUPLE: my-tuple ;
 [ 5 ] [ "hi" foox ] unit-test
 
 ! Making sure we don't needlessly unbox/rebox
-[ t 3.0 ] [ 1.0 dup [ dup 2.0 float+ >r eq? r> ] compile-call ] unit-test
+[ t 3.0 ] [ 1.0 dup [ dup 2.0 float+ [ eq? ] dip ] compile-call ] unit-test
 
-[ t 3.0 ] [ 1.0 dup [ dup 2.0 float+ ] compile-call >r eq? r> ] unit-test
+[ t 3.0 ] [ 1.0 dup [ dup 2.0 float+ ] compile-call [ eq? ] dip ] unit-test
 
 [ t ] [ 1.0 dup [ [ 2.0 float+ ] keep ] compile-call nip eq? ] unit-test
 
@@ -188,7 +188,7 @@ TUPLE: my-tuple ;
 
 [ 2 1 ] [
     2 1
-    [ 2dup fixnum< [ >r die r> ] when ] compile-call
+    [ 2dup fixnum< [ [ die ] dip ] when ] compile-call
 ] unit-test
 
 ! Regression
@@ -211,7 +211,7 @@ TUPLE: my-tuple ;
     { tuple vector } 3 slot { word } declare
     dup 1 slot 0 fixnum-bitand { [ ] } dispatch ;
 
-[ t ] [ \ dispatch-alignment-regression compiled>> ] unit-test
+[ t ] [ \ dispatch-alignment-regression optimized>> ] unit-test
 
 [ vector ] [ dispatch-alignment-regression ] unit-test
 
@@ -276,3 +276,9 @@ TUPLE: id obj ;
 
 [ 4 ] [ 2 [ dup fixnum* ] compile-call ] unit-test
 [ 7 ] [ 2 [ dup fixnum* 3 fixnum+fast ] compile-call ] unit-test
+
+TUPLE: cucumber ;
+
+M: cucumber equal? "The cucumber has no equal" throw ;
+
+[ t ] [ [ cucumber ] compile-call cucumber eq? ] unit-test
\ No newline at end of file
index ecc2d87b7330f1910c431477f509a1a47d04f4f1..1857baf503560e798d37e17a37d515fa6131bded 100644 (file)
@@ -8,7 +8,7 @@ IN: compiler.tests
 [ 3 ] [ 5 [ 2 [ - ] 2curry call ] compile-call ] unit-test
 [ 3 ] [ 5 2 [ [ - ] 2curry call ] compile-call ] unit-test
 [ 3 ] [ 5 2 [ [ - ] 2curry 9 swap call /i ] compile-call ] unit-test
-[ 3 ] [ 5 2 [ [ - ] 2curry >r 9 r> call /i ] compile-call ] unit-test
+[ 3 ] [ 5 2 [ [ - ] 2curry [ 9 ] dip call /i ] compile-call ] unit-test
 
 [ -10 -20 ] [ 10 20 -1 [ [ * ] curry bi@ ] compile-call ] unit-test
 
@@ -21,14 +21,14 @@ IN: compiler.tests
 [ [ 6 2 + ] ]
 [
     2 5
-    [ >r [ + ] curry r> 0 < [ -2 ] [ 6 ] if swap curry ]
+    [ [ [ + ] curry ] dip 0 < [ -2 ] [ 6 ] if swap curry ]
     compile-call >quotation
 ] unit-test
 
 [ 8 ]
 [
     2 5
-    [ >r [ + ] curry r> 0 < [ -2 ] [ 6 ] if swap curry call ]
+    [ [ [ + ] curry ] dip 0 < [ -2 ] [ 6 ] if swap curry call ]
     compile-call
 ] unit-test
 
index fa6a3c7b21647ff3282cdc2f974268f7df8cf80b..c5bbe4a6c3937693ee0decb15c4f9af875a6690e 100644 (file)
@@ -9,7 +9,7 @@ IN: optimizer.tests
 GENERIC: xyz ( obj -- obj )
 M: array xyz xyz ;
 
-[ t ] [ \ xyz compiled>> ] unit-test
+[ t ] [ \ xyz optimized>> ] unit-test
 
 ! Test predicate inlining
 : pred-test-1
@@ -94,7 +94,7 @@ TUPLE: pred-test ;
 ! regression
 GENERIC: void-generic ( obj -- * )
 : breakage ( -- * ) "hi" void-generic ;
-[ t ] [ \ breakage compiled>> ] unit-test
+[ t ] [ \ breakage optimized>> ] unit-test
 [ breakage ] must-fail
 
 ! regression
@@ -119,7 +119,7 @@ GENERIC: void-generic ( obj -- * )
 ! compiling <tuple> with a non-literal class failed
 : <tuple>-regression ( class -- tuple ) <tuple> ;
 
-[ t ] [ \ <tuple>-regression compiled>> ] unit-test
+[ t ] [ \ <tuple>-regression optimized>> ] unit-test
 
 GENERIC: foozul ( a -- b )
 M: reversed foozul ;
@@ -228,7 +228,7 @@ USE: binary-search.private
 : node-successor-f-bug ( x -- * )
     [ 3 throw ] [ empty-compound ] compose [ 3 throw ] if ;
 
-[ t ] [ \ node-successor-f-bug compiled>> ] unit-test
+[ t ] [ \ node-successor-f-bug optimized>> ] unit-test
 
 [ ] [ [ new ] build-tree optimize-tree drop ] unit-test
 
@@ -242,18 +242,18 @@ USE: binary-search.private
         ] if
     ] if ;
 
-[ t ] [ \ lift-throw-tail-regression compiled>> ] unit-test
+[ t ] [ \ lift-throw-tail-regression optimized>> ] unit-test
 [ 3 "an integer" ] [ 3 lift-throw-tail-regression ] unit-test
 [ "hi" "a string" ] [ "hi" lift-throw-tail-regression ] unit-test
 
 : lift-loop-tail-test-1 ( a quot -- )
     over even? [
-        [ >r 3 - r> call ] keep lift-loop-tail-test-1
+        [ [ 3 - ] dip call ] keep lift-loop-tail-test-1
     ] [
         over 0 < [
             2drop
         ] [
-            [ >r 2 - r> call ] keep lift-loop-tail-test-1
+            [ [ 2 - ] dip call ] keep lift-loop-tail-test-1
         ] if
     ] if ; inline
 
@@ -271,7 +271,7 @@ HINTS: recursive-inline-hang array ;
 : recursive-inline-hang-1 ( -- a )
     { } recursive-inline-hang ;
 
-[ t ] [ \ recursive-inline-hang-1 compiled>> ] unit-test
+[ t ] [ \ recursive-inline-hang-1 optimized>> ] unit-test
 
 DEFER: recursive-inline-hang-3
 
@@ -290,7 +290,7 @@ HINTS: recursive-inline-hang-3 array ;
 
 ! Wow
 : counter-example ( a b c d -- a' b' c' d' )
-    dup 0 > [ 1 - >r rot 2 * r> counter-example ] when ; inline
+    dup 0 > [ 1 - [ rot 2 * ] dip counter-example ] when ; inline
 
 : counter-example' ( -- a' b' c' d' )
     1 2 3.0 3 counter-example ;
@@ -330,7 +330,7 @@ PREDICATE: list < improper-list
 [ 0 5 ] [ 0 interval-inference-bug ] unit-test
 
 : aggressive-flush-regression ( a -- b )
-    f over >r <array> drop r> 1 + ;
+    f over [ <array> drop ] dip 1 + ;
 
 [ 1.0 aggressive-flush-regression drop ] must-fail
 
index a0262fdc819ffebe0b972f85835ba31a20cd5120..56a4021eed3e9f995fba9effb38eee1131651a4a 100644 (file)
@@ -22,5 +22,5 @@ pipeline = "hello" => [[ ast>pipeline-expr ]]
 
 USE: tools.test
 
-[ t ] [ \ expr compiled>> ] unit-test
-[ t ] [ \ ast>pipeline-expr compiled>> ] unit-test
+[ t ] [ \ expr optimized>> ] unit-test
+[ t ] [ \ ast>pipeline-expr optimized>> ] unit-test
index 1b349d2296de31dead616154a71c4353ea979688..b5835de5fd08180769274e89ddc2c5b25ac1d593 100644 (file)
@@ -23,36 +23,36 @@ M: integer method-redefine-test 3 + ;
 : hey ( -- ) ;
 : there ( -- ) hey ;
 
-[ t ] [ \ hey compiled>> ] unit-test
-[ t ] [ \ there compiled>> ] unit-test
+[ t ] [ \ hey optimized>> ] unit-test
+[ t ] [ \ there optimized>> ] unit-test
 [ ] [ "IN: compiler.tests : hey ( -- ) 3 ;" eval ] unit-test
-[ f ] [ \ hey compiled>> ] unit-test
-[ f ] [ \ there compiled>> ] unit-test
+[ f ] [ \ hey optimized>> ] unit-test
+[ f ] [ \ there optimized>> ] unit-test
 [ ] [ "IN: compiler.tests : hey ( -- ) ;" eval ] unit-test
-[ t ] [ \ there compiled>> ] unit-test
+[ t ] [ \ there optimized>> ] unit-test
 
 : good ( -- ) ;
 : bad ( -- ) good ;
 : ugly ( -- ) bad ;
 
-[ t ] [ \ good compiled>> ] unit-test
-[ t ] [ \ bad compiled>> ] unit-test
-[ t ] [ \ ugly compiled>> ] unit-test
+[ t ] [ \ good optimized>> ] unit-test
+[ t ] [ \ bad optimized>> ] unit-test
+[ t ] [ \ ugly optimized>> ] unit-test
 
 [ f ] [ \ good compiled-usage assoc-empty? ] unit-test
 
 [ ] [ "IN: compiler.tests : good ( -- ) 3 ;" eval ] unit-test
 
-[ f ] [ \ good compiled>> ] unit-test
-[ f ] [ \ bad compiled>> ] unit-test
-[ f ] [ \ ugly compiled>> ] unit-test
+[ f ] [ \ good optimized>> ] unit-test
+[ f ] [ \ bad optimized>> ] unit-test
+[ f ] [ \ ugly optimized>> ] unit-test
 
 [ t ] [ \ good compiled-usage assoc-empty? ] unit-test
 
 [ ] [ "IN: compiler.tests : good ( -- ) ;" eval ] unit-test
 
-[ t ] [ \ good compiled>> ] unit-test
-[ t ] [ \ bad compiled>> ] unit-test
-[ t ] [ \ ugly compiled>> ] unit-test
+[ t ] [ \ good optimized>> ] unit-test
+[ t ] [ \ bad optimized>> ] unit-test
+[ t ] [ \ ugly optimized>> ] unit-test
 
 [ f ] [ \ good compiled-usage assoc-empty? ] unit-test
index 941d0863124340351bd3b6eea236bcea7070c3a7..b25b5a1a5e2dabc37744a10a01fb3ed22f057984 100644 (file)
@@ -14,7 +14,7 @@ M: empty-mixin sheeple drop "wake up" ;
 : sheeple-test ( -- string ) { } sheeple ;
 
 [ "sheeple" ] [ sheeple-test ] unit-test
-[ t ] [ \ sheeple-test compiled>> ] unit-test
+[ t ] [ \ sheeple-test optimized>> ] unit-test
 [ t ] [ object \ sheeple method \ sheeple-test "compiled-uses" word-prop key? ] unit-test
 [ f ] [ empty-mixin \ sheeple method \ sheeple-test "compiled-uses" word-prop key? ] unit-test
 
@@ -27,6 +27,6 @@ M: empty-mixin sheeple drop "wake up" ;
 [ ] [ [ array empty-mixin remove-mixin-instance ] with-compilation-unit ] unit-test
 
 [ "sheeple" ] [ sheeple-test ] unit-test
-[ t ] [ \ sheeple-test compiled>> ] unit-test
+[ t ] [ \ sheeple-test optimized>> ] unit-test
 [ t ] [ object \ sheeple method \ sheeple-test "compiled-uses" word-prop key? ] unit-test
 [ f ] [ empty-mixin \ sheeple method \ sheeple-test "compiled-uses" word-prop key? ] unit-test
index c1e23c3e1e482c685ac8ee3eb4ab3ca13a8c6912..a6d6c5dfb9ac8812387a300ad6f85587c3112cee 100644 (file)
@@ -237,6 +237,6 @@ M: f single-combination-test-2 single-combination-test-4 ;
 10 [
     [ "compiler.tests.foo" forget-vocab ] with-compilation-unit
     [ t ] [
-        "USING: prettyprint words accessors ; IN: compiler.tests.foo : (recursive) ( -- ) (recursive) (recursive) ; inline recursive : recursive ( -- ) (recursive) ; \\ (recursive) compiled>>" eval
+        "USING: prettyprint words accessors ; IN: compiler.tests.foo : (recursive) ( -- ) (recursive) (recursive) ; inline recursive : recursive ( -- ) (recursive) ; \\ (recursive) optimized>>" eval
     ] unit-test
 ] times
index ee8c2f056a97fecd2611224e24243b6595c63fce..4092352fd5930d154a5f305fe444f522c8e64f2a 100644 (file)
@@ -47,7 +47,7 @@ IN: compiler.tests
 [ 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 ]
 [ 1.0 float-spill-bug ] unit-test
 
-[ t ] [ \ float-spill-bug compiled>> ] unit-test
+[ t ] [ \ float-spill-bug optimized>> ] unit-test
 
 : float-fixnum-spill-bug ( object -- object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object object )
     {
@@ -132,7 +132,7 @@ IN: compiler.tests
 [ 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 2.0 2 ]
 [ 1.0 float-fixnum-spill-bug ] unit-test
 
-[ t ] [ \ float-fixnum-spill-bug compiled>> ] unit-test
+[ t ] [ \ float-fixnum-spill-bug optimized>> ] unit-test
 
 : resolve-spill-bug ( a b -- c )
     [ 1 fixnum+fast ] bi@ dup 10 fixnum< [
@@ -159,7 +159,7 @@ IN: compiler.tests
         16 narray
     ] if ;
 
-[ t ] [ \ resolve-spill-bug compiled>> ] unit-test
+[ t ] [ \ resolve-spill-bug optimized>> ] unit-test
 
 [ 4 ] [ 1 1 resolve-spill-bug ] unit-test
 
index 4f99fa015d83f7f5ab4cedba19593191a26ecd91..a5f18d6389c0b56e027fd0c506eb258092786c4d 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: sequences kernel sets namespaces accessors assocs
 arrays combinators continuations columns math vectors
-stack-checker.branches
+grouping stack-checker.branches
 compiler.tree
 compiler.tree.def-use
 compiler.tree.combinators ;
index b64e30d8f94394a9ac5914fe95035504a3ea4a94..7c28866e94ba4770322b2b6b723532280baf0d29 100644 (file)
@@ -79,7 +79,7 @@ IN: compiler.tree.dead-code.tests
 
 [ [ read drop 1 2 ] ] [ [ read [ 1 2 ] dip drop ] optimize-quot ] unit-test
 
-[ [ over >r + r> ] ] [ [ [ + ] [ drop ] 2bi ] optimize-quot ] unit-test
+[ [ over >R + R> ] ] [ [ [ + ] [ drop ] 2bi ] optimize-quot ] unit-test
 
 [ [ [ ] [ ] if ] ] [ [ [ 1 ] [ 2 ] if drop ] optimize-quot ] unit-test
 
index e75e7f60469af5bf79589e34d418917a04ee4b71..9f2cc0536e34a9bc622317e9b67d8410484aa61a 100644 (file)
@@ -4,7 +4,7 @@ USING: kernel assocs match fry accessors namespaces make effects
 sequences sequences.private quotations generic macros arrays
 prettyprint prettyprint.backend prettyprint.custom
 prettyprint.sections math words combinators
-combinators.short-circuit io sorting hints qualified
+combinators.short-circuit io sorting hints
 compiler.tree
 compiler.tree.recursive
 compiler.tree.normalization
@@ -80,10 +80,12 @@ M: shuffle-node pprint* effect>> effect>string text ;
         [ out-d>> length 1 = ]
     } 1&& ;
 
+SYMBOLS: >R R> ;
+
 M: #shuffle node>quot
     {
-        { [ dup #>r? ] [ drop \ >r , ] }
-        { [ dup #r>? ] [ drop \ r> , ] }
+        { [ dup #>r? ] [ drop \ >R , ] }
+        { [ dup #r>? ] [ drop \ R> , ] }
         {
             [ dup [ in-r>> empty? ] [ out-r>> empty? ] bi and ]
             [
index 2eee3e698bbfe9f428dcb868f5f3ec487a5a1eab..ca41ac59fc194d9cc1bed2c0e2bd87f2422bc5ba 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors kernel namespaces sequences sets fry columns
-stack-checker.branches
+grouping stack-checker.branches
 compiler.tree
 compiler.tree.propagation.branches
 compiler.tree.escape-analysis.nodes
index b535dfe39c2047a420254db4aa3405c9298b497b..5d6a9cdea1661206c285515a78ef8602fd0d9c0a 100644 (file)
@@ -8,13 +8,13 @@ compiler.tree.debugger ;
 : test-modular-arithmetic ( quot -- quot' )
     build-tree optimize-tree nodes>quot ;
 
-[ [ >r >fixnum r> >fixnum fixnum+fast ] ]
+[ [ >R >fixnum R> >fixnum fixnum+fast ] ]
 [ [ { integer integer } declare + >fixnum ] test-modular-arithmetic ] unit-test
 
 [ [ +-integer-integer dup >fixnum ] ]
 [ [ { integer integer } declare + dup >fixnum ] test-modular-arithmetic ] unit-test
 
-[ [ >r >fixnum r> >fixnum fixnum+fast 4 fixnum*fast ] ]
+[ [ >R >fixnum R> >fixnum fixnum+fast 4 fixnum*fast ] ]
 [ [ { integer integer } declare + 4 * >fixnum ] test-modular-arithmetic ] unit-test
 
 TUPLE: declared-fixnum { x fixnum } ;
index 53b7d17326bb2d90e60c42b014dd92818c90447a..c989aaf672eee27756450024190328100c672a24 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: namespaces sequences assocs math kernel accessors fry
-combinators sets locals columns
+combinators sets locals columns grouping
 stack-checker.branches
 compiler.tree
 compiler.tree.def-use
index bd6d65744243b5e8800770656bd3aeb8f3fbace2..7b3135e85c3a100282235f66439401f235e88186 100644 (file)
@@ -3,7 +3,7 @@
 USING: accessors kernel arrays sequences math math.order
 math.partial-dispatch generic generic.standard generic.math
 classes.algebra classes.union sets quotations assocs combinators
-words namespaces continuations classes fry
+words namespaces continuations classes fry combinators.smart
 compiler.tree
 compiler.tree.builder
 compiler.tree.recursive
@@ -134,17 +134,19 @@ DEFER: (flat-length)
     over 2 <= [ drop ] [ 2/ 1+ * ] if 24 swap [-] 4 /i ;
 
 : inlining-rank ( #call word -- n )
-    [ classes-known? 2 0 ? ]
     [
-        {
-            [ body-length-bias ]
-            [ "default" word-prop -4 0 ? ]
-            [ "specializer" word-prop 1 0 ? ]
-            [ method-body? 1 0 ? ]
-        } cleave
-        node-count-bias
-        loop-nesting get 0 or 2 *
-    ] bi* + + + + + + ;
+        [ classes-known? 2 0 ? ]
+        [
+            {
+                [ body-length-bias ]
+                [ "default" word-prop -4 0 ? ]
+                [ "specializer" word-prop 1 0 ? ]
+                [ method-body? 1 0 ? ]
+            } cleave
+            node-count-bias
+            loop-nesting get 0 or 2 *
+        ] bi*
+    ] sum-outputs ;
 
 : should-inline? ( #call word -- ? )
     dup "inline" word-prop [ 2drop t ] [ inlining-rank 5 >= ] if ;
index 4d8d9354771ca406f23941d8c574b72f6454909b..d5aa5318a4a47503048f0ee7cabcfaffad4626ac 100644 (file)
@@ -6,7 +6,7 @@ math.parser math.order layouts words sequences sequences.private
 arrays assocs classes classes.algebra combinators generic.math
 splitting fry locals classes.tuple alien.accessors
 classes.tuple.private slots.private definitions strings.private
-vectors hashtables
+vectors hashtables generic
 stack-checker.state
 compiler.tree.comparisons
 compiler.tree.propagation.info
@@ -337,3 +337,12 @@ generic-comparison-ops [
         bi
     ] [ 2drop object-info ] if
 ] "outputs" set-word-prop
+
+\ equal? [
+    ! If first input has a known type and second input is an
+    ! object, we convert this to [ swap equal? ].
+    in-d>> first2 value-info class>> object class= [
+        value-info class>> \ equal? specific-method
+        [ swap equal? ] f ?
+    ] [ drop f ] if
+] "custom-inlining" set-word-prop
index d95245fe8303ff8ce4b5efc748c35c08c7f60b28..b9a88de34aaed1110ec814beecc46ee3812cde12 100644 (file)
@@ -18,7 +18,7 @@ IN: compiler.tree.propagation.tests
 
 [ V{ fixnum } ] [ [ 1 ] final-classes ] unit-test
 
-[ V{ fixnum } ] [ [ 1 >r r> ] final-classes ] unit-test
+[ V{ fixnum } ] [ [ 1 [ ] dip ] final-classes ] unit-test
 
 [ V{ fixnum object } ] [ [ 1 swap ] final-classes ] unit-test
 
@@ -198,7 +198,7 @@ IN: compiler.tree.propagation.tests
     [
         { fixnum byte-array } declare
         [ nth-unsafe ] 2keep [ nth-unsafe ] 2keep nth-unsafe
-        >r >r 298 * r> 100 * - r> 208 * - 128 + -8 shift
+        [ [ 298 * ] dip 100 * - ] dip 208 * - 128 + -8 shift
         255 min 0 max
     ] final-classes
 ] unit-test
@@ -640,6 +640,10 @@ MIXIN: empty-mixin
     [ { fixnum } declare log2 0 >= ] final-classes
 ] unit-test
 
+[ V{ POSTPONE: f } ] [
+    [ { word object } declare equal? ] final-classes
+] unit-test
+
 ! [ V{ string } ] [
 !     [ dup string? t xor [ "A" throw ] [ ] if ] final-classes
 ! ] unit-test
index 1f488b3dde81384ae35c4d15ac1e2fb62a45f8bd..ec4ced8c9f359a37fdebc7947aae7e4dc06b7010 100644 (file)
@@ -1,7 +1,7 @@
-! Copyright (C) 2008 Slava Pestov.
+! Copyright (C) 2008, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel sequences sequences.private arrays vectors fry
-math.order ;
+math.order namespaces assocs ;
 IN: compiler.utilities
 
 : flattener ( seq quot -- seq vector quot' )
@@ -22,10 +22,6 @@ IN: compiler.utilities
 
 : 2map-flat ( seq quot -- seq' ) [ 2each ] flattening ; inline
 
-: (3each) ( seq1 seq2 seq3 quot -- n quot' )
-    [ [ [ length ] tri@ min min ] 3keep ] dip
-    '[ [ _ nth-unsafe ] [ _ nth-unsafe ] [ _ nth-unsafe ] tri @ ] ; inline
+SYMBOL: yield-hook
 
-: 3each ( seq1 seq2 seq3 quot -- seq ) (3each) each ; inline
-
-: 3map ( seq1 seq2 seq3 quot -- seq ) (3each) map ; inline
+yield-hook global [ [ ] or ] change-at
old mode 100644 (file)
new mode 100755 (executable)
index 932605f..3d18b9e
@@ -28,7 +28,8 @@ PRIVATE>
 \r
 : [future] ( quot -- quot' ) '[ _ curry future ] ; inline\r
 \r
-: future-values dup [ ?future ] change-each ; inline\r
+: future-values ( futures -- futures )\r
+    dup [ ?future ] change-each ; inline\r
 \r
 PRIVATE>\r
 \r
index 1087823aa0ff2e93ee623c2068b2e8c58a8a3954..996e3db4c0dfb6c3ccdfe33f8bd3d3568ee84635 100644 (file)
@@ -1,7 +1,8 @@
 IN: concurrency.distributed.tests
 USING: tools.test concurrency.distributed kernel io.files
-arrays io.sockets system combinators threads math sequences
-concurrency.messaging continuations accessors prettyprint ;
+io.files.temp io.directories arrays io.sockets system
+combinators threads math sequences concurrency.messaging
+continuations accessors prettyprint ;
 
 : test-node ( -- addrspec )
     {
index 99ad239011ad1e9545c6bfefcb450b11495ede6d..ca1c5762f68378cdebb924d72bf2a6862eb21945 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: serialize sequences concurrency.messaging threads io
 io.servers.connection io.encodings.binary
-qualified arrays namespaces kernel accessors ;
+arrays namespaces kernel accessors ;
 FROM: io.sockets => host-name <inet> with-client ;
 IN: concurrency.distributed
 
index 3bd2d330c36a39c57dd08cc6da8353ac8c0bd1cc..41beedb6dc7b59c265f309093d476539fe686144 100644 (file)
@@ -53,7 +53,8 @@ ARTICLE: { "concurrency" "synchronous-sends" } "Synchronous sends"
 { $subsection reply-synchronous }
 "An example:"
 { $example
-    "USING: concurrency.messaging kernel threads ;"
+    "USING: concurrency.messaging kernel prettyprint threads ;"
+    "IN: scratchpad"
     ": pong-server ( -- )"
     "    receive [ \"pong\" ] dip reply-synchronous ;"
     "[ pong-server t ] \"pong-server\" spawn-server"
index 7a00f62e9ebdc95bd7c06f2864713c768d984918..61a3c3899192b8bf15051f4545b2038d81d84145 100644 (file)
@@ -20,13 +20,13 @@ M: thread send ( message thread -- )
     my-mailbox mailbox-get ?linked ;\r
 \r
 : receive-timeout ( timeout -- message )\r
-    my-mailbox swap mailbox-get-timeout ?linked ;\r
+    [ my-mailbox ] dip mailbox-get-timeout ?linked ;\r
 \r
 : receive-if ( pred -- message )\r
-    my-mailbox swap mailbox-get? ?linked ; inline\r
+    [ my-mailbox ] dip mailbox-get? ?linked ; inline\r
 \r
 : receive-if-timeout ( timeout pred -- message )\r
-    my-mailbox -rot mailbox-get-timeout? ?linked ; inline\r
+    [ my-mailbox ] 2dip mailbox-get-timeout? ?linked ; inline\r
 \r
 : rethrow-linked ( error process supervisor -- )\r
     [ <linked-error> ] dip send ;\r
diff --git a/basis/cords/authors.txt b/basis/cords/authors.txt
new file mode 100644 (file)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/basis/cords/cords-tests.factor b/basis/cords/cords-tests.factor
new file mode 100644 (file)
index 0000000..0058c8f
--- /dev/null
@@ -0,0 +1,5 @@
+IN: cords.tests
+USING: cords strings tools.test kernel sequences ;
+
+[ "hello world" ] [ "hello" " world" cord-append dup like ] unit-test
+[ "hello world" ] [ { "he" "llo" " world" } cord-concat dup like ] unit-test
diff --git a/basis/cords/cords.factor b/basis/cords/cords.factor
new file mode 100644 (file)
index 0000000..9157444
--- /dev/null
@@ -0,0 +1,70 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors assocs sequences sorting binary-search math
+math.order arrays combinators kernel ;
+IN: cords
+
+<PRIVATE
+
+TUPLE: simple-cord first second ;
+
+M: simple-cord length
+    [ first>> length ] [ second>> length ] bi + ;
+
+M: simple-cord virtual-seq first>> ;
+
+M: simple-cord virtual@
+    2dup first>> length <
+    [ first>> ] [ [ first>> length - ] [ second>> ] bi ] if ;
+
+TUPLE: multi-cord count seqs ;
+
+M: multi-cord length count>> ;
+
+M: multi-cord virtual@
+    dupd
+    seqs>> [ first <=> ] with search nip
+    [ first - ] [ second ] bi ;
+
+M: multi-cord virtual-seq
+    seqs>> [ f ] [ first second ] if-empty ;
+
+: <cord> ( seqs -- cord )
+    dup length 2 = [
+        first2 simple-cord boa
+    ] [
+        [ 0 [ length + ] accumulate ] keep zip multi-cord boa
+    ] if ;
+
+PRIVATE>
+
+UNION: cord simple-cord multi-cord ;
+
+INSTANCE: cord virtual-sequence
+
+INSTANCE: multi-cord virtual-sequence
+
+: cord-append ( seq1 seq2 -- cord )
+    {
+        { [ over empty? ] [ nip ] }
+        { [ dup empty? ] [ drop ] }
+        { [ 2dup [ cord? ] both? ] [ [ seqs>> values ] bi@ append <cord> ] }
+        { [ over cord? ] [ [ seqs>> values ] dip suffix <cord> ] }
+        { [ dup cord? ] [ seqs>> values swap prefix <cord> ] }
+        [ 2array <cord> ]
+    } cond ;
+
+: cord-concat ( seqs -- cord )
+    {
+        { [ dup empty? ] [ drop f ] }
+        { [ dup length 1 = ] [ first ] }
+        [
+            [
+                {
+                    { [ dup cord? ] [ seqs>> values ] }
+                    { [ dup empty? ] [ drop { } ] }
+                    [ 1array ]
+                } cond
+            ] map concat <cord>
+        ]
+    } cond ;
diff --git a/basis/cords/summary.txt b/basis/cords/summary.txt
new file mode 100644 (file)
index 0000000..3c69862
--- /dev/null
@@ -0,0 +1 @@
+Virtual sequence concatenation
diff --git a/basis/cords/tags.txt b/basis/cords/tags.txt
new file mode 100644 (file)
index 0000000..42d711b
--- /dev/null
@@ -0,0 +1 @@
+collections
index 0f64c0666f4eaa188a9b165132d503a07f03bee3..ec83ba7a8bd5f5f7ba04d4296d09681d7a2ed5e0 100644 (file)
@@ -14,8 +14,7 @@ TYPEDEF: int SInt32
 TYPEDEF: uint UInt32
 TYPEDEF: ulong CFTypeID
 TYPEDEF: UInt32 CFOptionFlags
-TYPEDEF: double CFTimeInterval
-TYPEDEF: double CFAbsoluteTime
+TYPEDEF: void* CFUUIDRef
 
 FUNCTION: CFTypeRef CFRetain ( CFTypeRef cf ) ;
 
index 043fb905ad84822098cfb731c8f92a670f627810..f4d2babca710d3a5dd1e4b627c902bd25b20f54f 100644 (file)
@@ -8,7 +8,6 @@ TYPEDEF: void* CFDictionaryRef
 TYPEDEF: void* CFMutableDictionaryRef
 TYPEDEF: void* CFNumberRef
 TYPEDEF: void* CFSetRef
-TYPEDEF: void* CFUUIDRef
 
 TYPEDEF: int CFNumberType
 : kCFNumberSInt8Type 1 ; inline
index 7ed040b45538c05e7aee75270ce6db51b7439019..b0c299a83178ec477413cf7a23c496d38d02b173 100644 (file)
@@ -5,7 +5,8 @@ math sequences namespaces make assocs init accessors
 continuations combinators io.encodings.utf8 destructors locals
 arrays specialized-arrays.direct.alien
 specialized-arrays.direct.int specialized-arrays.direct.longlong
-core-foundation core-foundation.run-loop core-foundation.strings ;
+core-foundation core-foundation.run-loop core-foundation.strings
+core-foundation.time ;
 IN: core-foundation.fsevents
 
 : kFSEventStreamCreateFlagUseCFTypes 2 ; inline
index 475991a2469dc5ed31cd35d019750d6031e48641..4b98e9a410c88e6961de6c6a57cfcfb3ad1a8c15 100644 (file)
@@ -1,8 +1,10 @@
 ! Copyright (C) 2008 Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien alien.syntax kernel namespaces core-foundation
-core-foundation.strings core-foundation.file-descriptors
-core-foundation.timers ;
+USING: accessors alien alien.syntax kernel math namespaces
+sequences destructors combinators threads heaps deques calendar
+core-foundation core-foundation.strings
+core-foundation.file-descriptors core-foundation.timers
+core-foundation.time ;
 IN: core-foundation.run-loop
 
 : kCFRunLoopRunFinished 1 ; inline
@@ -17,9 +19,9 @@ FUNCTION: CFRunLoopRef CFRunLoopGetMain ( ) ;
 FUNCTION: CFRunLoopRef CFRunLoopGetCurrent ( ) ;
 
 FUNCTION: SInt32 CFRunLoopRunInMode (
-   CFStringRef mode,
-   CFTimeInterval seconds,
-   Boolean returnAfterSourceHandled
+    CFStringRef mode,
+    CFTimeInterval seconds,
+    Boolean returnAfterSourceHandled
 ) ;
 
 FUNCTION: CFRunLoopSourceRef CFFileDescriptorCreateRunLoopSource (
@@ -29,27 +31,27 @@ FUNCTION: CFRunLoopSourceRef CFFileDescriptorCreateRunLoopSource (
 ) ;
 
 FUNCTION: void CFRunLoopAddSource (
-   CFRunLoopRef rl,
-   CFRunLoopSourceRef source,
-   CFStringRef mode
+    CFRunLoopRef rl,
+    CFRunLoopSourceRef source,
+    CFStringRef mode
 ) ;
 
 FUNCTION: void CFRunLoopRemoveSource (
-   CFRunLoopRef rl,
-   CFRunLoopSourceRef source,
-   CFStringRef mode
+    CFRunLoopRef rl,
+    CFRunLoopSourceRef source,
+    CFStringRef mode
 ) ;
 
 FUNCTION: void CFRunLoopAddTimer (
-   CFRunLoopRef rl,
-   CFRunLoopTimerRef timer,
-   CFStringRef mode
+    CFRunLoopRef rl,
+    CFRunLoopTimerRef timer,
+    CFStringRef mode
 ) ;
 
 FUNCTION: void CFRunLoopRemoveTimer (
-   CFRunLoopRef rl,
-   CFRunLoopTimerRef timer,
-   CFStringRef mode
+    CFRunLoopRef rl,
+    CFRunLoopTimerRef timer,
+    CFStringRef mode
 ) ;
 
 : CFRunLoopDefaultMode ( -- alien )
@@ -59,3 +61,80 @@ FUNCTION: void CFRunLoopRemoveTimer (
         "kCFRunLoopDefaultMode" <CFString>
         dup \ CFRunLoopDefaultMode set-global
     ] when ;
+
+TUPLE: run-loop fds sources timers ;
+
+: <run-loop> ( -- run-loop )
+    V{ } clone V{ } clone V{ } clone \ run-loop boa ;
+
+SYMBOL: expiry-check
+
+: run-loop ( -- run-loop )
+    \ run-loop get-global not expiry-check get expired? or
+    [
+        31337 <alien> expiry-check set-global
+        <run-loop> dup \ run-loop set-global
+    ] [ \ run-loop get-global ] if ;
+
+: add-source-to-run-loop ( source -- )
+    [ run-loop sources>> push ]
+    [
+        CFRunLoopGetMain
+        swap CFRunLoopDefaultMode
+        CFRunLoopAddSource
+    ] bi ;
+
+: create-fd-source ( CFFileDescriptor -- source )
+    f swap 0 CFFileDescriptorCreateRunLoopSource ;
+
+: add-fd-to-run-loop ( fd callback -- )
+    [
+        <CFFileDescriptor> |CFRelease
+        [ run-loop fds>> push ]
+        [ create-fd-source |CFRelease add-source-to-run-loop ]
+        bi
+    ] with-destructors ;
+
+: add-timer-to-run-loop ( timer -- )
+    [ run-loop timers>> push ]
+    [
+        CFRunLoopGetMain
+        swap CFRunLoopDefaultMode
+        CFRunLoopAddTimer
+    ] bi ;
+
+<PRIVATE
+
+: ((reset-timer)) ( timer counter timestamp -- )
+    nip >CFAbsoluteTime CFRunLoopTimerSetNextFireDate ;
+
+: (reset-timer) ( timer counter -- )
+    yield {
+        { [ dup 0 = ] [ now ((reset-timer)) ] }
+        { [ run-queue deque-empty? not ] [ 1- (reset-timer) ] }
+        { [ sleep-queue heap-empty? ] [ 5 minutes hence ((reset-timer)) ] }
+        [ sleep-queue heap-peek nip micros>timestamp ((reset-timer)) ]
+    } cond ;
+
+: reset-timer ( timer -- )
+    10 (reset-timer) ;
+
+PRIVATE>
+
+: reset-run-loop ( -- )
+    run-loop
+    [ timers>> [ reset-timer ] each ]
+    [ fds>> [ enable-all-callbacks ] each ] bi ;
+
+: timer-callback ( -- callback )
+    "void" { "CFRunLoopTimerRef" "void*" } "cdecl"
+    [ 2drop reset-run-loop yield ] alien-callback ;
+
+: init-thread-timer ( -- )
+    timer-callback <CFTimer> add-timer-to-run-loop ;
+
+: run-one-iteration ( us -- handled? )
+    reset-run-loop
+    CFRunLoopDefaultMode
+    swap [ microseconds ] [ 5 minutes ] if* >CFTimeInterval
+    t CFRunLoopRunInMode kCFRunLoopRunHandledSource = ;
index 2e6180c8972635c812236044ffc11d02d29d29d9..c3a969a32561d8a0a5a11fba39764a2133288604 100644 (file)
@@ -23,11 +23,11 @@ TYPEDEF: int CFStringEncoding
 : kCFStringEncodingUTF32LE HEX: 1c000100 ;
 
 FUNCTION: CFStringRef CFStringCreateWithBytes (
-   CFAllocatorRef alloc,
-   UInt8* bytes,
-   CFIndex numBytes,
-   CFStringEncoding encoding,
-   Boolean isExternalRepresentation
+    CFAllocatorRef alloc,
+    UInt8* bytes,
+    CFIndex numBytes,
+    CFStringEncoding encoding,
+    Boolean isExternalRepresentation
 ) ;
 
 FUNCTION: CFIndex CFStringGetLength ( CFStringRef theString ) ;
@@ -35,16 +35,16 @@ FUNCTION: CFIndex CFStringGetLength ( CFStringRef theString ) ;
 FUNCTION: void CFStringGetCharacters ( void* theString, CFIndex start, CFIndex length, void* buffer ) ;
 
 FUNCTION: Boolean CFStringGetCString (
-   CFStringRef theString,
-   char* buffer,
-   CFIndex bufferSize,
-   CFStringEncoding encoding
+    CFStringRef theString,
+    char* buffer,
+    CFIndex bufferSize,
+    CFStringEncoding encoding
 ) ;
 
 FUNCTION: CFStringRef CFStringCreateWithCString (
-   CFAllocatorRef alloc,
-   char* cStr,
-   CFStringEncoding encoding
+    CFAllocatorRef alloc,
+    char* cStr,
+    CFStringEncoding encoding
 ) ;
 
 : <CFString> ( string -- alien )
diff --git a/basis/core-foundation/time/time.factor b/basis/core-foundation/time/time.factor
new file mode 100644 (file)
index 0000000..15ad7bb
--- /dev/null
@@ -0,0 +1,14 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: calendar alien.syntax ;
+IN: core-foundation.time
+
+TYPEDEF: double CFTimeInterval
+TYPEDEF: double CFAbsoluteTime
+
+: >CFTimeInterval ( duration -- interval )
+    duration>seconds ; inline
+
+: >CFAbsoluteTime ( timestamp -- time )
+    T{ timestamp { year 2001 } { month 1 } { day 1 } } time-
+    duration>seconds ; inline
index 049e80b20f29c505581afe74fa1cb3ec39dcc959..51ee98259231e48bc4fc35b63fbfb1925f021087 100644 (file)
@@ -1,6 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax system math kernel core-foundation ;
+USING: alien.syntax system math kernel calendar core-foundation
+core-foundation.time ;
 IN: core-foundation.timers
 
 TYPEDEF: void* CFRunLoopTimerRef
@@ -18,12 +19,16 @@ FUNCTION: CFRunLoopTimerRef CFRunLoopTimerCreate (
 ) ;
 
 : <CFTimer> ( callback -- timer )
-    [ f millis 1000 /f 60 0 0 ] dip f CFRunLoopTimerCreate ;
+    [ f now >CFAbsoluteTime 60 0 0 ] dip f CFRunLoopTimerCreate ;
 
 FUNCTION: void CFRunLoopTimerInvalidate (
    CFRunLoopTimerRef timer
 ) ;
 
+FUNCTION: Boolean CFRunLoopTimerIsValid (
+   CFRunLoopTimerRef timer
+) ;
+
 FUNCTION: void CFRunLoopTimerSetNextFireDate (
    CFRunLoopTimerRef timer,
    CFAbsoluteTime fireDate
index c609b9e98d6d011d635b6a5d0662d0365218d3f4..5670110f04dbfc32a1f5037159145b7b7d899d31 100644 (file)
@@ -38,7 +38,7 @@ M: object param-reg param-regs nth ;
 HOOK: two-operand? cpu ( -- ? )
 
 HOOK: %load-immediate cpu ( reg obj -- )
-HOOK: %load-indirect cpu ( reg obj -- )
+HOOK: %load-reference cpu ( reg obj -- )
 
 HOOK: %peek cpu ( vreg loc -- )
 HOOK: %replace cpu ( vreg loc -- )
index f94cc00abc2857d409125b012658772cf1332d78..fbb878a888044f01f1b178a55b18b38b98cf7083 100644 (file)
@@ -97,10 +97,10 @@ X: XOR 0 316 31
 X: XOR. 1 316 31
 X1: EXTSB 0 954 31
 X1: EXTSB. 1 954 31
-: FMR ( a s -- ) 0 -rot 72 0 63 x-insn ;
-: FMR. ( a s -- ) 0 -rot 72 1 63 x-insn ;
-: FCTIWZ ( a s -- ) 0 -rot 0 15 63 x-insn ;
-: FCTIWZ. ( a s -- ) 0 -rot 1 15 63 x-insn ;
+: FMR ( a s -- ) [ 0 ] 2dip 72 0 63 x-insn ;
+: FMR. ( a s -- ) [ 0 ] 2dip 72 1 63 x-insn ;
+: FCTIWZ ( a s -- ) [ 0 ] 2dip 0 15 63 x-insn ;
+: FCTIWZ. ( a s -- ) [ 0 ] 2dip 1 15 63 x-insn ;
 
 ! XO-form
 XO: ADD 0 0 266 31
@@ -189,21 +189,21 @@ MTSPR: LR 8
 MTSPR: CTR 9
 
 ! Pseudo-instructions
-: LI 0 rot ADDI ; inline
-: SUBI neg ADDI ; inline
-: LIS 0 rot ADDIS ; inline
-: SUBIC neg ADDIC ; inline
-: SUBIC. neg ADDIC. ; inline
-: NOT dup NOR ; inline
-: NOT. dup NOR. ; inline
-: MR dup OR ; inline
-: MR. dup OR. ; inline
-: (SLWI) 0 31 pick - ; inline
+: LI ( value dst -- ) 0 rot ADDI ; inline
+: SUBI ( dst src1 src2 -- ) neg ADDI ; inline
+: LIS ( value dst -- ) 0 rot ADDIS ; inline
+: SUBIC ( dst src1 src2 -- ) neg ADDIC ; inline
+: SUBIC. ( dst src1 src2 -- ) neg ADDIC. ; inline
+: NOT ( dst src -- ) dup NOR ; inline
+: NOT. ( dst src -- ) dup NOR. ; inline
+: MR ( dst src -- ) dup OR ; inline
+: MR. ( dst src -- ) dup OR. ; inline
+: (SLWI) ( d a b -- d a b x y ) 0 31 pick - ; inline
 : SLWI ( d a b -- ) (SLWI) RLWINM ;
 : SLWI. ( d a b -- ) (SLWI) RLWINM. ;
-: (SRWI) 32 over - swap 31 ; inline
+: (SRWI) ( d a b -- d a b x y ) 32 over - swap 31 ; inline
 : SRWI ( d a b -- ) (SRWI) RLWINM ;
 : SRWI. ( d a b -- ) (SRWI) RLWINM. ;
-: LOAD32 ( n r -- ) >r w>h/h r> tuck LIS dup rot ORI ;
+: LOAD32 ( n r -- ) [ w>h/h ] dip tuck LIS dup rot ORI ;
 : immediate? ( n -- ? ) HEX: -8000 HEX: 7fff between? ;
 : LOAD ( n r -- ) over immediate? [ LI ] [ LOAD32 ] if ;
index 881b094ca229e9fdd32d194e449de3d34e351d98..c6a3a941949dfb0eca459d232c75056500b4a53e 100644 (file)
@@ -74,13 +74,13 @@ IN: cpu.ppc.assembler.backend
 
 GENERIC# (B) 2 ( dest aa lk -- )
 M: integer (B) 18 i-insn ;
-M: word (B) 0 -rot (B) rc-relative-ppc-3 rel-word ;
-M: label (B) 0 -rot (B) rc-relative-ppc-3 label-fixup ;
+M: word (B) [ 0 ] 2dip (B) rc-relative-ppc-3 rel-word ;
+M: label (B) [ 0 ] 2dip (B) rc-relative-ppc-3 label-fixup ;
 
 GENERIC: BC ( a b c -- )
 M: integer BC 0 0 16 b-insn ;
-M: word BC >r 0 BC r> rc-relative-ppc-2 rel-word ;
-M: label BC >r 0 BC r> rc-relative-ppc-2 label-fixup ;
+M: word BC [ 0 BC ] dip rc-relative-ppc-2 rel-word ;
+M: label BC [ 0 BC ] dip rc-relative-ppc-2 label-fixup ;
 
 : CREATE-B ( -- word ) scan "B" prepend create-in ;
 
index 445c7082bcbce551b35a676a5fcbbf194f5d65b8..b27f3aee72b0f7940405ce65572943d501af3ce4 100644 (file)
@@ -302,9 +302,7 @@ big-endian on
     4 ds-reg 0 STW\r
 ] f f f \ -rot define-sub-primitive\r
 \r
-[ jit->r ] f f f \ >r define-sub-primitive\r
-\r
-[ jit-r> ] f f f \ r> define-sub-primitive\r
+[ jit->r ] f f f \ load-local define-sub-primitive\r
 \r
 ! Comparisons\r
 : jit-compare ( insn -- )\r
index c555c4b8090ba60779b5e0f097d54e5ce8b2a876..b177c71d77cd04b9a03b605f5756b3b789a6b287 100644 (file)
@@ -34,7 +34,7 @@ M: ppc two-operand? f ;
 
 M: ppc %load-immediate ( reg n -- ) swap LOAD ;
 
-M: ppc %load-indirect ( reg obj -- )
+M: ppc %load-reference ( reg obj -- )
     [ 0 swap LOAD32 ] [ rc-absolute-ppc-2/2 rel-immediate ] bi* ;
 
 M: ppc %alien-global ( register symbol dll -- )
@@ -261,7 +261,7 @@ M:: ppc %fixnum-mul-tail ( src1 src2 temp1 temp2 -- )
 M:: ppc %integer>bignum ( dst src temp -- )
     [
         "end" define-label
-        dst 0 >bignum %load-indirect
+        dst 0 >bignum %load-reference
         ! Is it zero? Then just go to the end and return this zero
         0 src 0 CMPI
         "end" get BEQ
@@ -321,7 +321,7 @@ M:: ppc %integer>float ( dst src -- )
     scratch-reg dup HEX: 8000 XORIS
     scratch-reg 1 4 scratch@ STW
     dst 1 0 scratch@ LFD
-    scratch-reg 4503601774854144.0 %load-indirect
+    scratch-reg 4503601774854144.0 %load-reference
     fp-scratch-reg scratch-reg float-offset LFD
     dst dst fp-scratch-reg FSUB ;
 
@@ -467,26 +467,28 @@ M: ppc %gc
 M: ppc %prologue ( n -- )
     0 11 LOAD32 rc-absolute-ppc-2/2 rel-this
     0 MFLR
-    1 1 pick neg ADDI
-    11 1 pick xt-save STW
-    dup 11 LI
-    11 1 pick next-save STW
-    0 1 rot lr-save + STW ;
+    {
+        [ [ 1 1 ] dip neg ADDI ]
+        [ [ 11 1 ] dip xt-save STW ]
+        [ 11 LI ]
+        [ [ 11 1 ] dip next-save STW ]
+        [ [ 0 1 ] dip lr-save + STW ]
+    } cleave ;
 
 M: ppc %epilogue ( n -- )
     #! At the end of each word that calls a subroutine, we store
     #! the previous link register value in r0 by popping it off
     #! the stack, set the link register to the contents of r0,
     #! and jump to the link register.
-    0 1 pick lr-save + LWZ
-    1 1 rot ADDI
+    [ [ 0 1 ] dip lr-save + LWZ ]
+    [ [ 1 1 ] dip ADDI ] bi
     0 MTLR ;
 
 :: (%boolean) ( dst temp word -- )
     "end" define-label
     dst \ f tag-number %load-immediate
     "end" get word execute
-    dst \ t %load-indirect
+    dst \ t %load-reference
     "end" get resolve-label ; inline
 
 : %boolean ( dst temp cc -- )
@@ -541,17 +543,17 @@ GENERIC: STF ( src dst off reg-class -- )
 M: single-float-regs STF drop STFS ;
 M: double-float-regs STF drop STFD ;
 
-M: float-regs %save-param-reg >r 1 rot local@ r> STF ;
+M: float-regs %save-param-reg [ 1 rot local@ ] dip STF ;
 
 GENERIC: LF ( dst src off reg-class -- )
 
 M: single-float-regs LF drop LFS ;
 M: double-float-regs LF drop LFD ;
 
-M: float-regs %load-param-reg >r 1 rot local@ r> LF ;
+M: float-regs %load-param-reg [ 1 rot local@ ] dip LF ;
 
 M: stack-params %load-param-reg ( stack reg reg-class -- )
-    drop >r 0 1 rot local@ LWZ 0 1 r> param@ STW ;
+    drop [ 0 1 rot local@ LWZ 0 1 ] dip param@ STW ;
 
 : next-param@ ( n -- x ) param@ stack-frame get total-size>> + ;
 
@@ -559,8 +561,8 @@ M: stack-params %save-param-reg ( stack reg reg-class -- )
     #! Funky. Read the parameter from the caller's stack frame.
     #! This word is used in callbacks
     drop
-    0 1 rot next-param@ LWZ
-    0 1 rot local@ STW ;
+    [ 0 1 ] dip next-param@ LWZ
+    [ 0 1 ] dip local@ STW ;
 
 M: ppc %prepare-unbox ( -- )
     ! First parameter is top of stack
@@ -580,14 +582,14 @@ M: ppc %unbox-long-long ( n func -- )
     f %alien-invoke
     ! Store the return value on the C stack
     [
-        3 1 pick local@ STW
-        4 1 rot cell + local@ STW
+        [ [ 3 1 ] dip local@ STW ]
+        [ [ 4 1 ] dip cell + local@ STW ] bi
     ] when* ;
 
 M: ppc %unbox-large-struct ( n c-type -- )
     ! Value must be in r3
     ! Compute destination address and load struct size
-    [ 4 1 rot local@ ADDI ] [ heap-size 5 LI ] bi*
+    [ [ 4 1 ] dip local@ ADDI ] [ heap-size 5 LI ] bi*
     ! Call the function
     "to_value_struct" f %alien-invoke ;
 
@@ -595,15 +597,16 @@ M: ppc %box ( n reg-class func -- )
     ! If the source is a stack location, load it into freg #0.
     ! If the source is f, then we assume the value is already in
     ! freg #0.
-    >r
-    over [ 0 over param-reg swap %load-param-reg ] [ 2drop ] if
-    r> f %alien-invoke ;
+    [ over [ 0 over param-reg swap %load-param-reg ] [ 2drop ] if ] dip
+    f %alien-invoke ;
 
 M: ppc %box-long-long ( n func -- )
-    >r [
-        3 1 pick local@ LWZ
-        4 1 rot cell + local@ LWZ
-    ] when* r> f %alien-invoke ;
+    [
+        [
+            [ [ 3 1 ] dip local@ LWZ ]
+            [ [ 4 1 ] dip cell + local@ LWZ ] bi
+        ] when*
+    ] dip f %alien-invoke ;
 
 : struct-return@ ( n -- n )
     [ stack-frame get params>> ] unless* local@ ;
@@ -616,7 +619,7 @@ M: ppc %prepare-box-struct ( -- )
 M: ppc %box-large-struct ( n c-type -- )
     ! If n = f, then we're boxing a returned struct
     ! Compute destination address and load struct size
-    [ 3 1 rot struct-return@ ADDI ] [ heap-size 4 LI ] bi*
+    [ [ 3 1 ] dip struct-return@ ADDI ] [ heap-size 4 LI ] bi*
     ! Call the function
     "box_value_struct" f %alien-invoke ;
 
@@ -634,7 +637,7 @@ M: ppc %alien-invoke ( symbol dll -- )
     [ 11 ] 2dip %alien-global 11 MTLR BLRL ;
 
 M: ppc %alien-callback ( quot -- )
-    3 swap %load-indirect "c_to_factor" f %alien-invoke ;
+    3 swap %load-reference "c_to_factor" f %alien-invoke ;
 
 M: ppc %prepare-alien-indirect ( -- )
     "unbox_alien" f %alien-invoke
index 5e06e721187bfcc0c4e63658023f4695abfe1e6d..affd39ffc576297219e638a5b47738e66eabedec 100755 (executable)
@@ -237,7 +237,7 @@ M: x86.32 %alien-indirect ( -- )
 
 M: x86.32 %alien-callback ( quot -- )
     4 [
-        EAX swap %load-indirect
+        EAX swap %load-reference
         EAX PUSH
         "c_to_factor" f %alien-invoke
     ] with-aligned-stack ;
index 2077f51e0a7c8b5b1302bfb7ddf58f556d6e92f7..8cc69958a4ec4761168b7a1acb5d966b7ba126e1 100644 (file)
@@ -37,7 +37,7 @@ M:: x86.64 %dispatch ( src temp offset -- )
 
 M: x86.64 param-reg-1 int-regs param-regs first ;
 M: x86.64 param-reg-2 int-regs param-regs second ;
-: param-reg-3 int-regs param-regs third ; inline
+: param-reg-3 ( -- reg ) int-regs param-regs third ; inline
 
 M: int-regs return-reg drop RAX ;
 M: float-regs return-reg drop XMM0 ;
@@ -50,8 +50,8 @@ M: x86.64 %prologue ( n -- )
 
 M: stack-params %load-param-reg
     drop
-    >r R11 swap param@ MOV
-    r> param@ R11 MOV ;
+    [ R11 swap param@ MOV ] dip
+    param@ R11 MOV ;
 
 M: stack-params %save-param-reg
     drop
@@ -176,7 +176,7 @@ M: x86.64 %alien-indirect ( -- )
     RBP CALL ;
 
 M: x86.64 %alien-callback ( quot -- )
-    param-reg-1 swap %load-indirect
+    param-reg-1 swap %load-reference
     "c_to_factor" f %alien-invoke ;
 
 M: x86.64 %callback-value ( ctype -- )
index 6ddec4af07e87ff914a9339b47c8ed68f2677058..343850f9e639dc47ffb8bb59947cb1e868721de9 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel words sequences lexer parser fry ;
+USING: kernel words words.symbol sequences lexer parser fry ;
 IN: cpu.x86.assembler.syntax
 
 : define-register ( name num size -- )
index 42fcfaa6a2421f0d851c884a701ea24485059b80..5e3405e93ad80fe5544787b57021762fcd0f5dc7 100644 (file)
@@ -79,9 +79,10 @@ big-endian off
     ! compute quotation location
     temp0 temp1 ADD
     ! load quotation
-    temp0 temp0 array-start-offset [+] MOV
-    ! execute branch
-    temp0 quot-xt-offset [+] JMP
+    arg temp0 array-start-offset [+] MOV
+    ! execute branch. the quot must be in arg, since it might
+    ! not be compiled yet
+    arg quot-xt-offset [+] JMP
 ] rc-absolute-cell rt-immediate 1 rex-length + jit-dispatch jit-define
 
 : jit->r ( -- )
@@ -318,9 +319,7 @@ big-endian off
     ds-reg [] temp1 MOV
 ] f f f \ -rot define-sub-primitive
 
-[ jit->r ] f f f \ >r define-sub-primitive
-
-[ jit-r> ] f f f \ r> define-sub-primitive
+[ jit->r ] f f f \ load-local define-sub-primitive
 
 ! Comparisons
 : jit-compare ( insn -- )
index 44300a75f97368194ab5b0e0d60c7dc663525cb4..2859e71be2b6e8932eff788a98f544fbf6838759 100644 (file)
@@ -21,7 +21,7 @@ HOOK: param-reg-2 cpu ( -- reg )
 
 M: x86 %load-immediate MOV ;
 
-M: x86 %load-indirect swap 0 MOV rc-absolute-cell rel-immediate ;
+M: x86 %load-reference swap 0 MOV rc-absolute-cell rel-immediate ;
 
 HOOK: ds-reg cpu ( -- reg )
 HOOK: rs-reg cpu ( -- reg )
@@ -188,7 +188,7 @@ M:: x86 %integer>bignum ( dst src temp -- )
     [
         "end" define-label
         ! Load cached zero value
-        dst 0 >bignum %load-indirect
+        dst 0 >bignum %load-reference
         src 0 CMP
         ! Is it zero? Then just go to the end and return this zero
         "end" get JE
index 133223b6e4787c0c37b0a8a2e2410a68b087dea6..483a5825a9e00e1674529d8be513ea3e18b5ec45 100644 (file)
@@ -12,7 +12,7 @@ SYMBOL: delimiter
 
 CHAR: , delimiter set-global
 
-: delimiter> delimiter get ; inline
+: delimiter> ( -- delimiter ) delimiter get ; inline
     
 DEFER: quoted-field ( -- endchar )
     
index 8173ff6a5b137ac24122a582d4ad61cf3e815b99..08544b336785eeef210ec138ef95b6a59f503bbc 100644 (file)
@@ -1,20 +1,20 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: classes kernel help.markup help.syntax sequences
-alien assocs strings math multiline quotations ;
+alien assocs strings math multiline quotations db.private ;
 IN: db
 
-HELP: db
-{ $description "The " { $snippet "db" } " class is the superclass of all other database classes. It stores a " { $snippet "handle" } " to the database as well as insert, update, and delete queries." } ;
+HELP: db-connection
+{ $description "The " { $snippet "db-connection" } " class is the superclass of all other database classes. It stores a " { $snippet "handle" } " to the database as well as insert, update, and delete queries. Stores the current database object as a dynamic variable." } ;
 
-HELP: new-db
-{ $values { "class" class } { "obj" object } }
+HELP: new-db-connection
+{ $values { "class" class } { "obj" db-connection } }
 { $description "Creates a new database object from a given class with caches for prepared statements. Does not actually connect to the database until " { $link db-open } " or " { $link with-db } " is called." }
 { $notes "User-defined databases must call this constructor word instead of " { $link new } "." } ;
 
 HELP: db-open
-{ $values { "db" db } { "db" db } }
-{ $description "Opens a database using the configuration data stored in a " { $link db } " tuple. The database object now references a database handle that must be cleaned up. Therefore, it is better to use the " { $link with-db } " combinator than calling this word directly." } ;
+{ $values { "db" "a database configuration object" } { "db-connection" db-connection } }
+{ $description "Opens a database using the configuration data stored in a " { $snippet "database configuration object" } "tuple. The database object now references a database handle that must be cleaned up. Therefore, it is better to use the " { $link with-db } " combinator than calling this word directly." } ;
 
 HELP: db-close
 { $values { "handle" alien } }
@@ -141,13 +141,13 @@ HELP: rollback-transaction
 HELP: sql-command
 { $values
      { "sql" string } }
-{ $description "Executes a SQL string using the databse in the " { $link db } " symbol." } ;
+{ $description "Executes a SQL string using the databse in the " { $link db-connection } " symbol." } ;
 
 HELP: sql-query
 { $values
      { "sql" string }
      { "rows" "an array of arrays of strings" } }
-{ $description "Runs a SQL query of raw text in the database in the " { $link db } " symbol. Each row is returned as an array of strings; no type-conversions are done on the resulting data." } ;
+{ $description "Runs a SQL query of raw text in the database in the " { $link db-connection } " symbol. Each row is returned as an array of strings; no type-conversions are done on the resulting data." } ;
 
 { sql-command sql-query } related-words
 
@@ -167,8 +167,8 @@ HELP: sql-row-typed
 
 HELP: with-db
 { $values
-     { "db" db } { "quot" quotation } }
-{ $description "Calls the quotation with a database bound to the " { $link db } " symbol. See " { $link "db-custom-database-combinators" } " for help setting up database access." } ;
+     { "db" "a database configuration object" } { "quot" quotation } }
+{ $description "Calls the quotation with a database bound to the " { $link db-connection } " symbol. See " { $link "db-custom-database-combinators" } " for help setting up database access." } ;
 
 HELP: with-transaction
 { $values
@@ -244,13 +244,13 @@ ARTICLE: "db-protocol" "Low-level database protocol"
 ! { $subsection bind-tuple }
 
 ARTICLE: "db-lowlevel-tutorial" "Low-level database tutorial"
-"Although Factor makes integrating a database with its object system easy (see " { $vocab-link "db.tuples" } "), sometimes you may want to write SQL directly and get the results back as arrays of strings, for instance, when interfacing with a legacy database that doesn't easily map to " { $snippet "tuples" } "."
+"Although Factor makes integrating a database with its object system easy (see " { $vocab-link "db.tuples" } "), sometimes you may want to write SQL directly and get the results back as arrays of strings, for instance, when interfacing with a legacy database that doesn't easily map to " { $snippet "tuples" } "." $nl
 "Executing a SQL command:"
 { $subsection sql-command }
 "Executing a query directly:"
 { $subsection sql-query }
 "Here's an example usage where we'll make a book table, insert some objects, and query them." $nl
-"First, let's set up a custom combinator for using our database.  See " { $link "db-custom-database-combinators" } " for more details."
+"First, let's set up a custom combinator for using our database. See " { $link "db-custom-database-combinators" } " for more details."
 { $code <"
 USING: db.sqlite db io.files ;
 : with-book-db ( quot -- )
index b7bd8218a2e0d832e9083ec95d75a78ed4cd2e98..0b18044f2b8002a57eccba0b257c47f5c2cab671 100644 (file)
@@ -5,25 +5,29 @@ namespaces sequences classes.tuple words strings
 tools.walker accessors combinators fry ;
 IN: db
 
-TUPLE: db
+<PRIVATE
+
+TUPLE: db-connection
     handle
     insert-statements
     update-statements
     delete-statements ;
 
-: new-db ( class -- obj )
+: new-db-connection ( class -- obj )
     new
         H{ } clone >>insert-statements
         H{ } clone >>update-statements
         H{ } clone >>delete-statements ; inline
 
-GENERIC: db-open ( db -- db )
-HOOK: db-close db ( handle -- )
+PRIVATE>
+
+GENERIC: db-open ( db -- db-connection )
+HOOK: db-close db-connection ( handle -- )
 
 : dispose-statements ( assoc -- ) values dispose-each ;
 
-M: db dispose ( db -- ) 
-    dup db [
+M: db-connection dispose ( db-connection -- ) 
+    dup db-connection [
         [ dispose-statements H{ } clone ] change-insert-statements
         [ dispose-statements H{ } clone ] change-update-statements
         [ dispose-statements H{ } clone ] change-delete-statements
@@ -63,8 +67,8 @@ TUPLE: prepared-statement < statement ;
         swap >>in-params
         swap >>sql ;
 
-HOOK: <simple-statement> db ( string in out -- statement )
-HOOK: <prepared-statement> db ( string in out -- statement )
+HOOK: <simple-statement> db-connection ( string in out -- statement )
+HOOK: <prepared-statement> db-connection ( string in out -- statement )
 GENERIC: prepare-statement ( statement -- )
 GENERIC: bind-statement* ( statement -- )
 GENERIC: low-level-bind ( statement -- )
@@ -107,8 +111,8 @@ M: object execute-statement* ( statement type -- )
     accumulator [ query-each ] dip { } like ; inline
 
 : with-db ( db quot -- )
-    [ db-open db ] dip
-    '[ db get [ drop @ ] with-disposal ] with-variable ; inline
+    [ db-open db-connection ] dip
+    '[ db-connection get [ drop @ ] with-disposal ] with-variable ; inline
 
 ! Words for working with raw SQL statements
 : default-query ( query -- result-set )
@@ -126,13 +130,13 @@ M: object execute-statement* ( statement type -- )
 ! Transactions
 SYMBOL: in-transaction
 
-HOOK: begin-transaction db ( -- )
-HOOK: commit-transaction db ( -- )
-HOOK: rollback-transaction db ( -- )
+HOOK: begin-transaction db-connection ( -- )
+HOOK: commit-transaction db-connection ( -- )
+HOOK: rollback-transaction db-connection ( -- )
 
-M: db begin-transaction ( -- ) "BEGIN" sql-command ;
-M: db commit-transaction ( -- ) "COMMIT" sql-command ;
-M: db rollback-transaction ( -- ) "ROLLBACK" sql-command ;
+M: db-connection begin-transaction ( -- ) "BEGIN" sql-command ;
+M: db-connection commit-transaction ( -- ) "COMMIT" sql-command ;
+M: db-connection rollback-transaction ( -- ) "ROLLBACK" sql-command ;
 
 : in-transaction? ( -- ? ) in-transaction get ;
 
index 0a68db501b9a1404edc02bfff95c86389883e979..7ff2a33d92239fcba935a00cd5c72726953b4d38 100644 (file)
@@ -1,6 +1,6 @@
 IN: db.pools.tests
-USING: db.pools tools.test continuations io.files namespaces
-accessors kernel math destructors ;
+USING: db.pools tools.test continuations io.files io.files.temp
+io.directories namespaces accessors kernel math destructors ;
 
 \ <db-pool> must-infer
 
index 8bc5e87f0ea4ef26f17fed72410746c70e9c4306..55ff3a383b58a22c1007cb375706126524b6d975 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors kernel arrays namespaces sequences continuations
-io.pools db fry ;
+io.pools db fry db.private ;
 IN: db.pools
 
 TUPLE: db-pool < pool db ;
@@ -17,4 +17,4 @@ M: db-pool make-connection ( pool -- )
     db>> db-open ;
 
 : with-pooled-db ( pool quot -- )
-    '[ db _ with-variable ] with-pooled-connection ; inline
+    '[ db-connection _ with-variable ] with-pooled-connection ; inline
index 5149d14f3d8986d5a77c1b015b970cc010244e45..19cf5c5002f91161f0df6afb2c681d0d75ee3259 100644 (file)
@@ -6,7 +6,7 @@ db.types tools.walker ascii splitting math.parser combinators
 libc shuffle calendar.format byte-arrays destructors prettyprint
 accessors strings serialize io.encodings.binary io.encodings.utf8
 alien.strings io.streams.byte-array summary present urls
-specialized-arrays.uint specialized-arrays.alien ;
+specialized-arrays.uint specialized-arrays.alien db.private ;
 IN: db.postgresql.lib
 
 : postgresql-result-error-message ( res -- str/f )
@@ -24,7 +24,7 @@ IN: db.postgresql.lib
     "\n" split [ [ blank? ] trim ] map "\n" join ;
 
 : postgresql-error-message ( -- str )
-    db get handle>> (postgresql-error-message) ;
+    db-connection get handle>> (postgresql-error-message) ;
 
 : postgresql-error ( res -- res )
     dup [ postgresql-error-message throw ] unless ;
@@ -44,7 +44,7 @@ M: postgresql-result-null summary ( obj -- str )
     dup PQstatus zero? [ (postgresql-error-message) throw ] unless ;
 
 : do-postgresql-statement ( statement -- res )
-    db get handle>> swap sql>> PQexec dup postgresql-result-ok? [
+    db-connection get handle>> swap sql>> PQexec dup postgresql-result-ok? [
         [ postgresql-result-error-message ] [ PQclear ] bi throw
     ] unless ;
 
@@ -99,7 +99,7 @@ M: postgresql-result-null summary ( obj -- str )
 
 : do-postgresql-bound-statement ( statement -- res )
     [
-        [ db get handle>> ] dip
+        [ db-connection get handle>> ] dip
         {
             [ sql>> ]
             [ bind-params>> length ]
index bc5ec2f0c5d10633319240f7eb86cec6dc0e5cac..cf6dc903f10081b3109577c2e13f6904c3df8e5d 100644 (file)
@@ -1,5 +1,5 @@
 USING: kernel db.postgresql alien continuations io classes
-prettyprint sequences namespaces tools.test db
+prettyprint sequences namespaces tools.test db db.private
 db.tuples db.types unicode.case accessors system ;
 IN: db.postgresql.tests
 
@@ -92,7 +92,3 @@ os windows? cpu x86.64? and [
         ] with-db
     ] unit-test
 ] unless
-
-
-: with-dummy-db ( quot -- )
-    [ T{ postgresql-db } db ] dip with-variable ;
index 90a875b8fff6f4992731f1073ffd538d79a596e5..1f55dcf769669e587993cb6a8345d4f28be32552 100644 (file)
@@ -4,23 +4,31 @@ USING: arrays assocs alien alien.syntax continuations io
 kernel math math.parser namespaces make prettyprint quotations
 sequences debugger db db.postgresql.lib db.postgresql.ffi
 db.tuples db.types tools.annotations math.ranges
-combinators classes locals words tools.walker
+combinators classes locals words tools.walker db.private
 nmake accessors random db.queries destructors db.tuples.private ;
 USE: tools.walker
 IN: db.postgresql
 
-TUPLE: postgresql-db < db
-    host port pgopts pgtty database username password ;
+TUPLE: postgresql-db host port pgopts pgtty database username password ;
 
 : <postgresql-db> ( -- postgresql-db )
-    postgresql-db new-db ;
+    postgresql-db new ;
+
+<PRIVATE
+
+TUPLE: postgresql-db-connection < db-connection ;
+: <postgresql-db-connection> ( handle -- db-connection )
+    postgresql-db-connection new-db-connection
+        swap >>handle ;
+
+PRIVATE>
 
 TUPLE: postgresql-statement < statement ;
 
 TUPLE: postgresql-result-set < result-set ;
 
-M: postgresql-db db-open ( db -- db )
-    dup {
+M: postgresql-db db-open ( db -- db-connection )
+    {
         [ host>> ]
         [ port>> ]
         [ pgopts>> ]
@@ -28,10 +36,9 @@ M: postgresql-db db-open ( db -- db )
         [ database>> ]
         [ username>> ]
         [ password>> ]
-    } cleave connect-postgres >>handle ;
+    } cleave connect-postgres <postgresql-db-connection> ;
 
-M: postgresql-db db-close ( handle -- )
-    PQfinish ;
+M: postgresql-db-connection db-close ( handle -- ) PQfinish ;
 
 M: postgresql-statement bind-statement* ( statement -- ) drop ;
 
@@ -48,8 +55,10 @@ M: generator-bind postgresql-bind-conversion ( tuple generate-bind -- object )
     [ swap slot-name>> rot set-slot-named ] [ <low-level-binding> ] bi ;
 
 M: postgresql-statement bind-tuple ( tuple statement -- )
-    tuck in-params>>
-    [ postgresql-bind-conversion ] with map
+    [ nip ] [
+        in-params>>
+        [ postgresql-bind-conversion ] with map
+    ] 2bi
     >>bind-params drop ;
 
 M: postgresql-result-set #rows ( result-set -- n )
@@ -98,25 +107,25 @@ M: postgresql-result-set dispose ( result-set -- )
 
 M: postgresql-statement prepare-statement ( statement -- )
     dup
-    [ db get handle>> f ] dip
+    [ db-connection get handle>> f ] dip
     [ sql>> ] [ in-params>> ] bi
     length f PQprepare postgresql-error
     >>handle drop ;
 
-M: postgresql-db <simple-statement> ( sql in out -- statement )
+M: postgresql-db-connection <simple-statement> ( sql in out -- statement )
     postgresql-statement new-statement ;
 
-M: postgresql-db <prepared-statement> ( sql in out -- statement )
+M: postgresql-db-connection <prepared-statement> ( sql in out -- statement )
     <simple-statement> dup prepare-statement ;
 
 : bind-name% ( -- )
     CHAR: $ 0,
     sql-counter [ inc ] [ get 0# ] bi ;
 
-M: postgresql-db bind% ( spec -- )
+M: postgresql-db-connection bind% ( spec -- )
     bind-name% 1, ;
 
-M: postgresql-db bind# ( spec object -- )
+M: postgresql-db-connection bind# ( spec object -- )
     [ bind-name% f swap type>> ] dip
     <literal-bind> 1, ;
 
@@ -162,7 +171,7 @@ M: postgresql-db bind# ( spec object -- )
         "_seq'');' language sql;" 0%
     ] query-make ;
 
-M: postgresql-db create-sql-statement ( class -- seq )
+M: postgresql-db-connection create-sql-statement ( class -- seq )
     [
         [ create-table-sql , ] keep
         dup db-assigned? [ create-function-sql , ] [ drop ] if
@@ -182,13 +191,13 @@ M: postgresql-db create-sql-statement ( class -- seq )
         "drop table " 0% 0% drop
     ] query-make ;
 
-M: postgresql-db drop-sql-statement ( class -- seq )
+M: postgresql-db-connection drop-sql-statement ( class -- seq )
     [
         [ drop-table-sql , ] keep
         dup db-assigned? [ drop-function-sql , ] [ drop ] if
     ] { } make ;
 
-M: postgresql-db <insert-db-assigned-statement> ( class -- statement )
+M: postgresql-db-connection <insert-db-assigned-statement> ( class -- statement )
     [
         "select add_" 0% 0%
         "(" 0%
@@ -198,7 +207,7 @@ M: postgresql-db <insert-db-assigned-statement> ( class -- statement )
         ");" 0%
     ] query-make ;
 
-M: postgresql-db <insert-user-assigned-statement> ( class -- statement )
+M: postgresql-db-connection <insert-user-assigned-statement> ( class -- statement )
     [
         "insert into " 0% 0%
         "(" 0%
@@ -221,10 +230,10 @@ M: postgresql-db <insert-user-assigned-statement> ( class -- statement )
         ");" 0%
     ] query-make ;
 
-M: postgresql-db insert-tuple-set-key ( tuple statement -- )
+M: postgresql-db-connection insert-tuple-set-key ( tuple statement -- )
     query-modify-tuple ;
 
-M: postgresql-db persistent-table ( -- hashtable )
+M: postgresql-db-connection persistent-table ( -- hashtable )
     H{
         { +db-assigned-id+ { "integer" "serial" f } }
         { +user-assigned-id+ { f f f } }
@@ -264,7 +273,7 @@ M: postgresql-db persistent-table ( -- hashtable )
     } ;
 
 ERROR: no-compound-found string object ;
-M: postgresql-db compound ( string object -- string' )
+M: postgresql-db-connection compound ( string object -- string' )
     over {
         { "default" [ first number>string " " glue ] }
         { "varchar" [ first number>string "(" ")" surround append ] }
index a96398ff2c88c93be25c58583ead3f50386a6927..2d7ea67107147ea23b6ae89e33a99780304d34fb 100644 (file)
@@ -3,7 +3,8 @@
 USING: accessors kernel math namespaces make sequences random
 strings math.parser math.intervals combinators math.bitwise
 nmake db db.tuples db.types classes words shuffle arrays
-destructors continuations db.tuples.private prettyprint ;
+destructors continuations db.tuples.private prettyprint
+db.private ;
 IN: db.queries
 
 GENERIC: where ( specs obj -- )
@@ -62,7 +63,7 @@ M: retryable execute-statement* ( statement type -- )
         dup column-name>> 0% " = " 0% bind%
     ] interleave ;
 
-M: db <update-tuple-statement> ( class -- statement )
+M: db-connection <update-tuple-statement> ( class -- statement )
     [
         "update " 0% 0%
         " set " 0%
@@ -142,7 +143,7 @@ M: string where ( spec obj -- ) object-where ;
 : where-clause ( tuple specs -- )
     dupd filter-slots [ drop ] [ many-where ] if-empty ;
 
-M: db <delete-tuples-statement> ( tuple table -- sql )
+M: db-connection <delete-tuples-statement> ( tuple table -- sql )
     [
         "delete from " 0% 0%
         where-clause
@@ -150,7 +151,7 @@ M: db <delete-tuples-statement> ( tuple table -- sql )
 
 ERROR: all-slots-ignored class ;
 
-M: db <select-by-slots-statement> ( tuple class -- statement )
+M: db-connection <select-by-slots-statement> ( tuple class -- statement )
     [
         "select " 0%
         [ dupd filter-ignores ] dip
@@ -185,13 +186,13 @@ M: db <select-by-slots-statement> ( tuple class -- statement )
         [ offset>> [ do-offset ] [ drop ] if* ]
     } 2cleave ;
 
-M: db query>statement ( query -- tuple )
+M: db-connection query>statement ( query -- tuple )
     [ tuple>> dup class ] keep
     [ <select-by-slots-statement> ] dip make-query* ;
 
 ! select ID, NAME, SCORE from EXAM limit 1 offset 3
 
-M: db <count-statement> ( query -- statement )
+M: db-connection <count-statement> ( query -- statement )
     [ tuple>> dup class ] keep
     [ [ "select count(*) from " 0% 0% where-clause ] query-make ]
     dip make-query* ;
index 1ec18260cd56268410af8e442c1d07b497ff25bc..b1bc9aa1a218933a4b93e79db6128d29c5e630df 100644 (file)
@@ -5,7 +5,8 @@ namespaces sequences db.sqlite.ffi db combinators
 continuations db.types calendar.format serialize
 io.streams.byte-array byte-arrays io.encodings.binary
 io.backend db.errors present urls io.encodings.utf8
-io.encodings.string accessors shuffle ;
+io.encodings.string accessors shuffle io prettyprint
+db.private ;
 IN: db.sqlite.lib
 
 ERROR: sqlite-error < db-error n string ;
@@ -16,7 +17,7 @@ ERROR: sqlite-sql-error < sql-error n string ;
 
 : sqlite-statement-error ( -- * )
     SQLITE_ERROR
-    db get handle>> sqlite3_errmsg sqlite-sql-error ;
+    db-connection get handle>> sqlite3_errmsg sqlite-sql-error ;
 
 : sqlite-check-result ( n -- )
     {
@@ -42,7 +43,7 @@ ERROR: sqlite-sql-error < sql-error n string ;
     sqlite3_bind_parameter_index ;
 
 : parameter-index ( handle name text -- handle name text )
-    >r dupd sqlite-bind-parameter-index r> ;
+    [ dupd sqlite-bind-parameter-index ] dip ;
 
 : sqlite-bind-text ( handle index text -- )
     utf8 encode dup length SQLITE_TRANSIENT
@@ -124,7 +125,8 @@ ERROR: sqlite-sql-error < sql-error n string ;
     ] if* (sqlite-bind-type) ;
 
 : sqlite-finalize ( handle -- ) sqlite3_finalize sqlite-check-result ;
-: sqlite-reset ( handle -- ) sqlite3_reset sqlite-check-result ;
+: sqlite-reset ( handle -- )
+"resetting: " write dup . sqlite3_reset sqlite-check-result ;
 : sqlite-clear-bindings ( handle -- )
     sqlite3_clear_bindings sqlite-check-result ;
 : sqlite-#columns ( query -- int ) sqlite3_column_count ;
@@ -166,7 +168,7 @@ ERROR: sqlite-sql-error < sql-error n string ;
 : sqlite-row ( handle -- seq )
     dup sqlite-#columns [ sqlite-column ] with map ;
 
-: sqlite-step-has-more-rows? ( prepared -- bool )
+: sqlite-step-has-more-rows? ( prepared -- ? )
     {
         { SQLITE_ROW [ t ] }
         { SQLITE_DONE [ f ] }
index fe95980bcf9658cad74a7ffd53691a1ef1eefc2b..6fb1cd19adccb262b943a4bbad49ccfaa90135e5 100644 (file)
@@ -1,10 +1,10 @@
-USING: io io.files io.launcher kernel namespaces
-prettyprint tools.test db.sqlite db sequences
+USING: io io.files io.files.temp io.directories io.launcher
+kernel namespaces prettyprint tools.test db.sqlite db sequences
 continuations db.types db.tuples unicode.case ;
 IN: db.sqlite.tests
 
-: db-path "test.db" temp-file ;
-: test.db db-path <sqlite-db> ;
+: db-path ( -- path ) "test.db" temp-file ;
+: test.db ( -- sqlite-db ) db-path <sqlite-db> ;
 
 [ ] [ [ db-path delete-file ] ignore-errors ] unit-test
 
index 32c5ca00752149fd24a07266188cc8083dc6f6f5..0f545030a33dc9d930b70aeeccf51cf24ca38b95 100644 (file)
@@ -6,33 +6,43 @@ sequences strings classes.tuple alien.c-types continuations
 db.sqlite.lib db.sqlite.ffi db.tuples words db.types combinators
 math.intervals io nmake accessors vectors math.ranges random
 math.bitwise db.queries destructors db.tuples.private interpolate
-io.streams.string multiline make ;
+io.streams.string multiline make db.private ;
 IN: db.sqlite
 
-TUPLE: sqlite-db < db path ;
+TUPLE: sqlite-db path ;
 
 : <sqlite-db> ( path -- sqlite-db )
-    sqlite-db new-db
+    sqlite-db new
         swap >>path ;
 
-M: sqlite-db db-open ( db -- db )
-    dup path>> sqlite-open >>handle ;
+<PRIVATE
 
-M: sqlite-db db-close ( handle -- ) sqlite-close ;
+TUPLE: sqlite-db-connection < db-connection ;
+
+: <sqlite-db-connection> ( handle -- db-connection )
+    sqlite-db-connection new-db-connection
+        swap >>handle ;
+
+PRIVATE>
+
+M: sqlite-db db-open ( db -- db-connection )
+    path>> sqlite-open <sqlite-db-connection> ;
+
+M: sqlite-db-connection db-close ( handle -- ) sqlite-close ;
 
 TUPLE: sqlite-statement < statement ;
 
 TUPLE: sqlite-result-set < result-set has-more? ;
 
-M: sqlite-db <simple-statement> ( str in out -- obj )
+M: sqlite-db-connection <simple-statement> ( str in out -- obj )
     <prepared-statement> ;
 
-M: sqlite-db <prepared-statement> ( str in out -- obj )
+M: sqlite-db-connection <prepared-statement> ( str in out -- obj )
     sqlite-statement new-statement ;
 
 : sqlite-maybe-prepare ( statement -- statement )
     dup handle>> [
-        db get handle>> over sql>> sqlite-prepare
+        db-connection get handle>> over sql>> sqlite-prepare
         >>handle
     ] unless ;
 
@@ -89,10 +99,10 @@ M: sqlite-statement bind-tuple ( tuple statement -- )
 ERROR: sqlite-last-id-fail ;
 
 : last-insert-id ( -- id )
-    db get handle>> sqlite3_last_insert_rowid
+    db-connection get handle>> sqlite3_last_insert_rowid
     dup zero? [ sqlite-last-id-fail ] when ;
 
-M: sqlite-db insert-tuple-set-key ( tuple statement -- )
+M: sqlite-db-connection insert-tuple-set-key ( tuple statement -- )
     execute-statement last-insert-id swap set-primary-key ;
 
 M: sqlite-result-set #columns ( result-set -- n )
@@ -116,7 +126,7 @@ M: sqlite-statement query-results ( query -- result-set )
     dup handle>> sqlite-result-set new-result-set
     dup advance-row ;
 
-M: sqlite-db create-sql-statement ( class -- statement )
+M: sqlite-db-connection create-sql-statement ( class -- statement )
     [
         dupd
         "create table " 0% 0%
@@ -135,10 +145,10 @@ M: sqlite-db create-sql-statement ( class -- statement )
         "));" 0%
     ] query-make ;
 
-M: sqlite-db drop-sql-statement ( class -- statement )
+M: sqlite-db-connection drop-sql-statement ( class -- statement )
     [ "drop table " 0% 0% ";" 0% drop ] query-make ;
 
-M: sqlite-db <insert-db-assigned-statement> ( tuple -- statement )
+M: sqlite-db-connection <insert-db-assigned-statement> ( tuple -- statement )
     [
         "insert into " 0% 0%
         "(" 0%
@@ -159,19 +169,19 @@ M: sqlite-db <insert-db-assigned-statement> ( tuple -- statement )
         ");" 0%
     ] query-make ;
 
-M: sqlite-db <insert-user-assigned-statement> ( tuple -- statement )
+M: sqlite-db-connection <insert-user-assigned-statement> ( tuple -- statement )
     <insert-db-assigned-statement> ;
 
-M: sqlite-db bind# ( spec obj -- )
+M: sqlite-db-connection bind# ( spec obj -- )
     [
         [ column-name>> ":" next-sql-counter surround dup 0% ]
         [ type>> ] bi
     ] dip <literal-bind> 1, ;
 
-M: sqlite-db bind% ( spec -- )
+M: sqlite-db-connection bind% ( spec -- )
     dup 1, column-name>> ":" prepend 0% ;
 
-M: sqlite-db persistent-table ( -- assoc )
+M: sqlite-db-connection persistent-table ( -- assoc )
     H{
         { +db-assigned-id+ { "integer" "integer" f } }
         { +user-assigned-id+ { f f f } }
@@ -306,7 +316,7 @@ M: sqlite-db persistent-table ( -- assoc )
         delete-trigger-restrict sqlite-trigger,
     ] if ;
 
-M: sqlite-db compound ( string seq -- new-string )
+M: sqlite-db-connection compound ( string seq -- new-string )
     over {
         { "default" [ first number>string " " glue ] }
         { "references" [
diff --git a/basis/db/tester/authors.txt b/basis/db/tester/authors.txt
new file mode 100644 (file)
index 0000000..f372b57
--- /dev/null
@@ -0,0 +1,2 @@
+Slava Pestov
+Doug Coleman
diff --git a/basis/db/tester/tester-tests.factor b/basis/db/tester/tester-tests.factor
new file mode 100644 (file)
index 0000000..6b39a7e
--- /dev/null
@@ -0,0 +1,7 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: tools.test db.tester ;
+IN: db.tester.tests
+
+[ ] [ sqlite-test-db db-tester ] unit-test
+[ ] [ sqlite-test-db db-tester2 ] unit-test
diff --git a/basis/db/tester/tester.factor b/basis/db/tester/tester.factor
new file mode 100644 (file)
index 0000000..490f6bb
--- /dev/null
@@ -0,0 +1,62 @@
+! Copyright (C) 2008 Slava Pestov, Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: concurrency.combinators db.pools db.sqlite db.tuples
+db.types kernel math random threads tools.test db sequences
+io prettyprint ;
+IN: db.tester
+
+TUPLE: test-1 id a b c ;
+
+test-1 "TEST1" {
+   { "id" "ID" INTEGER +db-assigned-id+ }
+   { "a" "A" { VARCHAR 256 } +not-null+ }
+   { "b" "B" { VARCHAR 256 } +not-null+ }
+   { "c" "C" { VARCHAR 256 } +not-null+ }
+} define-persistent
+
+TUPLE: test-2 id x y z ;
+
+test-2 "TEST2" {
+   { "id" "ID" INTEGER +db-assigned-id+ }
+   { "x" "X" { VARCHAR 256 } +not-null+ }
+   { "y" "Y" { VARCHAR 256 } +not-null+ }
+   { "z" "Z" { VARCHAR 256 } +not-null+ }
+} define-persistent
+
+: sqlite-test-db ( -- db ) "test.db" <sqlite-db> ;
+: test-db ( -- db ) "test.db" <sqlite-db> ;
+
+: db-tester ( test-db -- )
+    [
+        [
+            test-1 ensure-table
+            test-2 ensure-table
+        ] with-db
+    ] [
+        10 [
+            drop
+            10 [
+                dup [
+                    f 100 random 100 random 100 random test-1 boa
+                    insert-tuple yield
+                ] with-db
+            ] times
+        ] with parallel-each
+    ] bi ;
+
+: db-tester2 ( test-db -- )
+    [
+        [
+            test-1 ensure-table
+            test-2 ensure-table
+        ] with-db
+    ] [
+        <db-pool> [
+            10 [
+                10 [
+                    f 100 random 100 random 100 random test-1 boa
+                    insert-tuple yield
+                ] times
+            ] parallel-each
+        ] with-pooled-db
+    ] bi ;
index 51830ee610b1cecaf95fcbbf64202c0c84109b29..e853c55edeec7b53d8254888fdb0cbd80a321cfd 100644 (file)
@@ -199,7 +199,7 @@ ARTICLE: "db-tuples-protocol" "Tuple database protocol"
 { $subsection <count-statement> } ;
 
 ARTICLE: "db-tuples-tutorial" "Tuple database tutorial"
-"Let's make a tuple and store it in a database. To follow along, click on each code example and run it in the listener.  If you forget to run an example, just start at the top and run them all again in order." $nl
+"Let's make a tuple and store it in a database. To follow along, click on each code example and run it in the listener. If you forget to run an example, just start at the top and run them all again in order." $nl
 "We're going to store books in this tutorial."
 { $code "TUPLE: book id title author date-published edition cover-price condition ;" }
 "The title, author, and publisher should be strings; the date-published a timestamp; the edition an integer; the cover-price a float. These are the Factor types for which we will need to look up the corresponding " { $link "db.types" } ". " $nl
@@ -246,7 +246,7 @@ T{ book
 { $code <" [
     book get update-tuple
 ] with-book-tutorial "> }
-"And select it again.  You can query the database by any field -- just set it in the exemplar tuple you pass to " { $link select-tuples } "."
+"And select it again. You can query the database by any field -- just set it in the exemplar tuple you pass to " { $link select-tuples } "."
 { $code <" [
     T{ book { title "Factor for Sheeple" } } select-tuples
 ] with-book-tutorial "> }
index 0432f3868381da552a5228240f38ee141e05e9f8..246946c7151717fc9887532c8d767cb6ece12f21 100644 (file)
@@ -1,10 +1,10 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io.files kernel tools.test db db.tuples classes
+USING: io.files io.files.temp kernel tools.test db db.tuples classes
 db.types continuations namespaces math math.ranges
 prettyprint calendar sequences db.sqlite math.intervals
 db.postgresql accessors random math.bitwise system
-math.ranges strings urls fry db.tuples.private ;
+math.ranges strings urls fry db.tuples.private db.private ;
 IN: db.tuples.tests
 
 : sqlite-db ( -- sqlite-db )
@@ -33,10 +33,10 @@ IN: db.tuples.tests
 
 ! These words leak resources, but are useful for interactivel testing 
 : sqlite-test-db ( -- )
-    sqlite-db db-open db set ;
+    sqlite-db db-open db-connection set ;
 
 : postgresql-test-db ( -- )
-    postgresql-db db-open db set ;
+    postgresql-db db-open db-connection set ;
 
 TUPLE: person the-id the-name the-number the-real
 ts date time blob factor-blob url ;
index 7a5c9e41e68b87d2c8e28cc9f7df0b16f143ed89..219116aefd0ddfc5ba5f2ec247f9ad2aea07a4b2 100644 (file)
@@ -3,20 +3,20 @@
 USING: arrays assocs classes db kernel namespaces
 classes.tuple words sequences slots math accessors
 math.parser io prettyprint db.types continuations
-destructors mirrors sets db.types ;
+destructors mirrors sets db.types db.private ;
 IN: db.tuples
 
-HOOK: create-sql-statement db ( class -- object )
-HOOK: drop-sql-statement db ( class -- object )
+HOOK: create-sql-statement db-connection ( class -- object )
+HOOK: drop-sql-statement db-connection ( class -- object )
 
-HOOK: <insert-db-assigned-statement> db ( class -- object )
-HOOK: <insert-user-assigned-statement> db ( class -- object )
-HOOK: <update-tuple-statement> db ( class -- object )
-HOOK: <delete-tuples-statement> db ( tuple class -- object )
-HOOK: <select-by-slots-statement> db ( tuple class -- tuple )
-HOOK: <count-statement> db ( query -- statement )
-HOOK: query>statement db ( query -- statement )
-HOOK: insert-tuple-set-key db ( tuple statement -- )
+HOOK: <insert-db-assigned-statement> db-connection ( class -- object )
+HOOK: <insert-user-assigned-statement> db-connection ( class -- object )
+HOOK: <update-tuple-statement> db-connection ( class -- object )
+HOOK: <delete-tuples-statement> db-connection ( tuple class -- object )
+HOOK: <select-by-slots-statement> db-connection ( tuple class -- tuple )
+HOOK: <count-statement> db-connection ( query -- statement )
+HOOK: query>statement db-connection ( query -- statement )
+HOOK: insert-tuple-set-key db-connection ( tuple statement -- )
 
 <PRIVATE
 
@@ -52,12 +52,14 @@ GENERIC: eval-generator ( singleton -- object )
 
 : insert-db-assigned-statement ( tuple -- )
     dup class
-    db get insert-statements>> [ <insert-db-assigned-statement> ] cache
+    db-connection get insert-statements>>
+    [ <insert-db-assigned-statement> ] cache
     [ bind-tuple ] 2keep insert-tuple-set-key ;
 
 : insert-user-assigned-statement ( tuple -- )
     dup class
-    db get insert-statements>> [ <insert-user-assigned-statement> ] cache
+    db-connection get insert-statements>>
+    [ <insert-user-assigned-statement> ] cache
     [ bind-tuple ] keep execute-statement ;
 
 : do-select ( exemplar-tuple statement -- tuples )
@@ -71,9 +73,10 @@ PRIVATE>
 ! High level
 ERROR: no-slots-named class seq ;
 : check-columns ( class columns -- )
-    tuck
-    [ [ first ] map ]
-    [ all-slots [ name>> ] map ] bi* diff
+    [ nip ] [
+        [ [ first ] map ]
+        [ all-slots [ name>> ] map ] bi* diff
+    ] 2bi
     [ drop ] [ no-slots-named ] if-empty ;
 
 : define-persistent ( class table columns -- )
@@ -117,7 +120,7 @@ M: tuple >query <query> swap >>tuple ;
 
 : update-tuple ( tuple -- )
     dup class
-    db get update-statements>> [ <update-tuple-statement> ] cache
+    db-connection get update-statements>> [ <update-tuple-statement> ] cache
     [ bind-tuple ] keep execute-statement ;
 
 : delete-tuples ( tuple -- )
index bd0b443fbe860f15a43ec36f41d1c49fe327f4fa..d5908740c611068609cdf53a840e4ec9bff70251 100644 (file)
@@ -41,12 +41,15 @@ HELP: +user-assigned-id+
 { $description "The user is responsible for choosing a primary key for tuples inserted with this database type. Keys must be unique or else the database will throw an error. Usually it is better to use a " { $link +db-assigned-id+ } "." } ;
 
 HELP: <generator-bind>
+{ $values { "slot-name" object } { "key" object } { "generator-singleton" object } { "type" object } { "generator-bind" generator-bind } }
 { $description "" } ;
 
 HELP: <literal-bind>
+{ $values { "key" object } { "type" object } { "value" object } { "literal-bind" literal-bind } }
 { $description "" } ;
 
 HELP: <low-level-binding>
+{ $values { "value" object } { "low-level-binding" low-level-binding } }
 { $description "" } ;
 
 HELP: BIG-INTEGER
index da9fe39b8065aeef2fac5558a2bdc2958657ea6d..2d4a6ff5fb094cbb1e2229416910dd179ce1534c 100644 (file)
@@ -3,12 +3,12 @@
 USING: arrays assocs db kernel math math.parser
 sequences continuations sequences.deep prettyprint
 words namespaces slots slots.private classes mirrors
-classes.tuple combinators calendar.format symbols
-classes.singleton accessors quotations random ;
+classes.tuple combinators calendar.format classes.singleton
+accessors quotations random db.private ;
 IN: db.types
 
-HOOK: persistent-table db ( -- hash )
-HOOK: compound db ( string obj -- hash )
+HOOK: persistent-table db-connection ( -- hash )
+HOOK: compound db-connection ( string obj -- hash )
 
 TUPLE: sql-spec class slot-name column-name type primary-key modifiers ;
 
@@ -42,10 +42,10 @@ ERROR: no-slot ;
     slot-named dup [ no-slot ] unless offset>> ;
 
 : get-slot-named ( name tuple -- value )
-    tuck offset-of-slot slot ;
+    [ nip ] [ offset-of-slot ] 2bi slot ;
 
 : set-slot-named ( value name obj -- )
-    tuck offset-of-slot set-slot ;
+    [ nip ] [ offset-of-slot ] 2bi set-slot ;
 
 ERROR: not-persistent class ;
 
@@ -158,8 +158,8 @@ ERROR: no-sql-type type ;
     modifiers>> [ lookup-modifier ] map " " join
     [ "" ] [ " " prepend ] if-empty ;
 
-HOOK: bind% db ( spec -- )
-HOOK: bind# db ( spec obj -- )
+HOOK: bind% db-connection ( spec -- )
+HOOK: bind# db-connection ( spec obj -- )
 
 ERROR: no-column column ;
 
index 4e0c4e88405d05d9daa852ff9c4973b2693f09c1..1440e7ca5da422754efae1ffc6d2e517d385cf3d 100644 (file)
@@ -2,14 +2,14 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: slots arrays definitions generic hashtables summary io
 kernel math namespaces make prettyprint prettyprint.config
-sequences assocs sequences.private strings io.styles io.files
-vectors words system splitting math.parser classes.mixin
-classes.tuple continuations continuations.private combinators
-generic.math classes.builtin classes compiler.units
+sequences assocs sequences.private strings io.styles
+io.pathnames vectors words system splitting math.parser
+classes.mixin classes.tuple continuations continuations.private
+combinators generic.math classes.builtin classes compiler.units
 generic.standard vocabs init kernel.private io.encodings
 accessors math.order destructors source-files parser
 classes.tuple.parser effects.parser lexer compiler.errors
-generic.parser strings.parser ;
+generic.parser strings.parser vocabs.parser ;
 IN: debugger
 
 GENERIC: error. ( error -- )
index d1e7d31656e7847d710ee1820aa7f4dd821e2995..7d297af1ed1dd75b7e0d8ae39dd23726869b445f 100644 (file)
@@ -20,7 +20,7 @@ PROTOCOL: baz foo { bar 0 } { whoa 1 } ;
 CONSULT: baz goodbye these>> ;
 M: hello foo this>> ;
 M: hello bar hello-test ;
-M: hello whoa >r this>> r> + ;
+M: hello whoa [ this>> ] dip + ;
 
 GENERIC: bing ( c -- d )
 PROTOCOL: bee bing ;
index 57f9b35c96373bff90e534fd3023fbab35b06dbf..4da22441143e5a3a0766b83a0b420b74f8bf6285 100644 (file)
@@ -2,7 +2,8 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors parser generic kernel classes classes.tuple
 words slots assocs sequences arrays vectors definitions
-math hashtables sets generalizations namespaces make ;
+math hashtables sets generalizations namespaces make
+words.symbol ;
 IN: delegate
 
 : protocol-words ( protocol -- words )
index c21f33ec8ef44524aa832b0c5596f2f70f58a10c..edbec804c1cbd7c1a496cefc7a6160104f0a3bb1 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2007 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
 USING: delegate sequences.private sequences assocs
-io definitions kernel continuations ;
+io io.styles definitions kernel continuations ;
 IN: delegate.protocols
 
 PROTOCOL: sequence-protocol
index f4e68c214b2a921b390984f43f55099032a43cd4..73769cc4d21e39a3a98d69164e9014df7a73904d 100644 (file)
@@ -1,6 +1,6 @@
-! Copyright (C) 2008 Slava Pestov.
+! Copyright (C) 2008, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel sequences math ;
+USING: kernel sequences math fry ;
 IN: deques
 
 GENERIC: push-front* ( obj deque -- node )
@@ -34,7 +34,8 @@ GENERIC: deque-empty? ( deque -- ? )
     [ peek-back ] [ pop-back* ] bi ;
 
 : slurp-deque ( deque quot -- )
-    [ drop [ deque-empty? not ] curry ]
-    [ [ pop-back ] prepose curry ] 2bi [ ] while ; inline
+    [ drop '[ _ deque-empty? not ] ]
+    [ '[ _ pop-back @ ] ]
+    2bi [ ] while ; inline
 
 MIXIN: deque
index ea246cfa28e73859e7062f7725b6dcabbf72f9b4..a3e5c7ceb7bce396bcf55635302a92fcf42a57ff 100644 (file)
@@ -60,8 +60,8 @@ GENERIC: add-atom ( a disjoint-set -- )
 
 M: disjoint-set add-atom
     [ dupd parents>> set-at ]
-    [ 0 -rot ranks>> set-at ]
-    [ 1 -rot counts>> set-at ]
+    [ [ 0 ] 2dip ranks>> set-at ]
+    [ [ 1 ] 2dip counts>> set-at ]
     2tri ;
 
 : add-atoms ( seq disjoint-set -- ) '[ _ add-atom ] each ;
index dcff476166ac47545274c5ce907fc4850057c3fc..8c575105d1c8b528ff592f184531a0c1a14319c8 100644 (file)
@@ -1,8 +1,8 @@
-! Copyright (C) 2007, 2008 Mackenzie Straight, Doug Coleman,
+! Copyright (C) 2007, 2009 Mackenzie Straight, Doug Coleman,
 ! Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: combinators kernel math sequences accessors deques
-search-deques summary hashtables ;
+search-deques summary hashtables fry ;
 IN: dlists
 
 <PRIVATE
@@ -64,7 +64,7 @@ M: dlist-node node-value obj>> ;
     [ front>> ] dip (dlist-find-node) ; inline
 
 : dlist-each-node ( dlist quot -- )
-    [ f ] compose dlist-find-node 2drop ; inline
+    '[ @ f ] dlist-find-node 2drop ; inline
 
 : unlink-node ( dlist-node -- )
     dup prev>> over next>> set-prev-when
@@ -115,8 +115,7 @@ M: dlist pop-back* ( dlist -- )
     normalize-front ;
 
 : dlist-find ( dlist quot -- obj/f ? )
-    [ obj>> ] prepose
-    dlist-find-node [ obj>> t ] [ drop f f ] if ; inline
+    '[ obj>> @ ] dlist-find-node [ obj>> t ] [ drop f f ] if ; inline
 
 : dlist-contains? ( dlist quot -- ? )
     dlist-find nip ; inline
@@ -143,7 +142,7 @@ M: dlist delete-node ( dlist-node dlist -- )
     ] if ; inline
 
 : delete-node-if ( dlist quot -- obj/f )
-    [ obj>> ] prepose delete-node-if* drop ; inline
+    '[ obj>> @ ] delete-node-if* drop ; inline
 
 M: dlist clear-deque ( dlist -- )
     f >>front
@@ -151,7 +150,7 @@ M: dlist clear-deque ( dlist -- )
     drop ;
 
 : dlist-each ( dlist quot -- )
-    [ obj>> ] prepose dlist-each-node ; inline
+    '[ obj>> @ ] dlist-each-node ; inline
 
 : dlist>seq ( dlist -- seq )
     [ ] accumulator [ dlist-each ] dip ;
@@ -159,8 +158,6 @@ M: dlist clear-deque ( dlist -- )
 : 1dlist ( obj -- dlist ) <dlist> [ push-front ] keep ;
 
 M: dlist clone
-    <dlist> [
-        [ push-back ] curry dlist-each
-    ] keep ;
+    <dlist> [ '[ _ push-back ] dlist-each ] keep ;
 
 INSTANCE: dlist deque
index 6993bcb65bf4ab0973d883f9406e850171ba5e78..29f865cf3c7673d7603ded2cbf062c4b1f94a2a3 100644 (file)
@@ -153,18 +153,18 @@ GENERIC: next-elt ( loc document elt -- newloc )
 TUPLE: char-elt ;
 
 : (prev-char) ( loc document quot -- loc )
-    -rot {
-        { [ over { 0 0 } = ] [ drop ] }
-        { [ over second zero? ] [ [ first 1- ] dip line-end ] }
-        [ pick call ]
-    } cond nip ; inline
+    {
+        { [ pick { 0 0 } = ] [ 2drop ] }
+        { [ pick second zero? ] [ drop [ first 1- ] dip line-end ] }
+        [ call ]
+    } cond ; inline
 
 : (next-char) ( loc document quot -- loc )
-    -rot {
-        { [ 2dup doc-end = ] [ drop ] }
-        { [ 2dup line-end? ] [ drop first 1+ 0 2array ] }
-        [ pick call ]
-    } cond nip ; inline
+    {
+        { [ 2over doc-end = ] [ 2drop ] }
+        { [ 2over line-end? ] [ 2drop first 1+ 0 2array ] }
+        [ call ]
+    } cond ; inline
 
 M: char-elt prev-elt
     drop [ drop -1 +col ] (prev-char) ;
index 6b49c939c38ba2723479e702309382332d0afe44..53887bd3534f5335ab1526e0e91da49c63813619 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: parser lexer kernel namespaces sequences definitions
-io.files summary continuations tools.crossref tools.vocabs io
-prettyprint source-files assocs vocabs vocabs.loader io.backend
-splitting accessors ;
+io.files io.backend io.pathnames io summary continuations
+tools.crossref tools.vocabs prettyprint source-files assocs
+vocabs vocabs.loader splitting accessors ;
 IN: editors
 
 TUPLE: no-edit-hook ;
index c002c2fa759edffbc1587326ca129d0caa818486..d487ca776f81e72d90883c6fc9ec39a38649f1cc 100644 (file)
@@ -1,11 +1,12 @@
 USING: definitions kernel parser words sequences math.parser
 namespaces editors io.launcher windows.shell32 io.files
-io.paths.windows strings unicode.case make ;
+io.directories.search.windows strings unicode.case make ;
 IN: editors.editpadlite
 
 : editpadlite-path ( -- path )
     \ editpadlite-path get-global [
         "JGsoft" t [ >lower "editpadlite.exe" tail? ] find-in-program-files
+        [ "editpadlite.exe" ] unless*
     ] unless* ;
 
 : editpadlite ( file line -- )
index 2a7f92f9329dcb6378472732882588c71a76726d..09bfd69de8c0809a5764fbc5582737c82a2a1a97 100644 (file)
@@ -1,11 +1,12 @@
 USING: definitions kernel parser words sequences math.parser
 namespaces editors io.launcher windows.shell32 io.files
-io.paths.windows strings unicode.case make ;
+io.directories.search.windows strings unicode.case make ;
 IN: editors.editpadpro
 
 : editpadpro-path ( -- path )
     \ editpadpro-path get-global [
         "JGsoft" t [ >lower "editpadpro.exe" tail? ] find-in-program-files
+        [ "editpadpro.exe" ] unless*
     ] unless* ;
 
 : editpadpro ( file line -- )
index 9fa477f51a5f20be2b32a8ec028dafe6c08a5adf..affbcd4eb69152f88d4acf0eb821bb7111c99cd6 100644 (file)
@@ -1,10 +1,12 @@
 USING: editors io.files io.launcher kernel math.parser
-namespaces sequences windows.shell32 make io.paths.windows ;
+namespaces sequences windows.shell32 make
+io.directories.search.windows ;
 IN: editors.editplus
 
 : editplus-path ( -- path )
     \ editplus-path get-global [
         "EditPlus 2" t [ "editplus.exe" tail? ] find-in-program-files
+        [ "editplus.exe" ] unless*
     ] unless* ;
 
 : editplus ( file line -- )
index fc3deae670d6ab4236f92719ff5419094bae8e23..52c52bbb8bd554426248254e118ab307ebd76cc2 100644 (file)
@@ -1,10 +1,12 @@
 USING: editors io.files io.launcher kernel math.parser
-namespaces sequences windows.shell32 make io.paths.windows ;
+namespaces sequences windows.shell32 make
+io.directories.search.windows ;
 IN: editors.emeditor
 
 : emeditor-path ( -- path )
     \ emeditor-path get-global [
         "EmEditor" t [ "EmEditor.exe" tail? ] find-in-program-files
+        [ "EmEditor.exe" ] unless*
     ] unless* ;
 
 : emeditor ( file line -- )
index c4b3ad35c1a0268022875b7216d78df6fcc45826..37c8d1b57248174f9bfe69c82969c068e00b3042 100755 (executable)
@@ -1,12 +1,13 @@
 ! Copyright (C) 2008 Kibleur Christophe.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: editors io.files io.launcher kernel math.parser
-namespaces sequences windows.shell32 io.paths.windows make ;
+USING: editors io.files io.launcher kernel math.parser make
+namespaces sequences windows.shell32 io.directories.search.windows ;
 IN: editors.etexteditor
 
 : etexteditor-path ( -- str )
     \ etexteditor-path get-global [
         "e" t [ "e.exe" tail? ] find-in-program-files
+        [ "e" ] unless*
     ] unless* ;
 
 : etexteditor ( file line -- )
index ad6fb65cfbde06e7a7f41530e522dfc4419ef95d..15fd52f5eef4f229412ca49416751bee485a2985 100644 (file)
@@ -3,12 +3,15 @@ namespaces sequences system combinators
 editors.vim vocabs.loader make ;
 IN: editors.gvim
 
+! This code builds on the code in editors.vim; see there for
+! more information.
+
 SINGLETON: gvim
 
 HOOK: gvim-path io-backend ( -- path )
 
 M: gvim vim-command ( file line -- string )
-    [ gvim-path , swap , "+" swap number>string append , ] { } make ;
+    [ gvim-path , "+" swap number>string append , , ] { } make ;
 
 gvim vim-editor set-global
 
index 82b6bf199d0a2605730b4dc955f6a5175863e3b1..3e2a42e6e5619384f78f367d5b87a81a893688f3 100644 (file)
@@ -1,5 +1,4 @@
-USING: io.unix.backend kernel namespaces editors.gvim
-system ;
+USING: kernel namespaces editors.gvim system ;
 IN: editors.gvim.unix
 
 M: unix gvim-path
index 2f733f3c2f6dfe5927b5c931481c35ab1572bb27..4edc13b90c3cf936573459bfd81b00c58b9613f0 100644 (file)
@@ -1,8 +1,10 @@
-USING: editors.gvim io.files io.windows kernel namespaces
-sequences windows.shell32 io.paths.windows system ;
+USING: editors.gvim io.files kernel namespaces sequences
+windows.shell32 io.directories.search.windows system
+io.pathnames ;
 IN: editors.gvim.windows
 
 M: windows gvim-path
     \ gvim-path get-global [
         "vim" t [ "gvim.exe" tail? ] find-in-program-files
+        [ "gvim.exe" ] unless*
     ] unless* ;
index fe9abc0e76b4640cb9f50f2f09583f926a235271..e34f0ce1756ca494feef99645e1ecbdb73a8a2fd 100644 (file)
@@ -4,7 +4,7 @@ USING: arrays definitions io kernel math
 namespaces parser prettyprint sequences strings words
 editors io.files io.sockets io.streams.byte-array io.binary
 math.parser io.encodings.ascii io.encodings.binary
-io.encodings.utf8 io.files.private ;
+io.encodings.utf8 io.files.private io.pathnames ;
 IN: editors.jedit
 
 : jedit-server-info ( -- port auth )
diff --git a/basis/editors/notepad/authors.txt b/basis/editors/notepad/authors.txt
new file mode 100755 (executable)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/basis/editors/notepad/notepad.factor b/basis/editors/notepad/notepad.factor
new file mode 100755 (executable)
index 0000000..6094bf4
--- /dev/null
@@ -0,0 +1,18 @@
+! Copyright (C) 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: editors io.launcher kernel io.directories.search.windows
+math.parser namespaces sequences io.files arrays windows.shell32
+io.directories.search ;
+IN: editors.notepad
+
+: notepad-path ( -- path )
+    \ notepad-path get [
+        windows-directory t
+        [ "notepad.exe" tail? ] find-file
+    ] unless* ;
+
+: notepad ( file line -- )
+    drop notepad-path swap 2array run-detached drop ;
+
+[ notepad ] edit-hook set-global
+
index e22de4f68d96d5fe6aa62e63bd4c4bad4dd73316..dc1a8a7991e62e72454bf26443f1ee04433c0107 100644 (file)
@@ -1,10 +1,11 @@
 USING: editors io.files io.launcher kernel math.parser
-namespaces sequences windows.shell32 make ;
+namespaces sequences windows.shell32 make io.pathnames ;
 IN: editors.notepad2
 
 : notepad2-path ( -- path )
     \ notepad2-path get-global [
-        "C:\\Windows\\system32\\notepad.exe"
+        windows-directory "system32\\notepad.exe" append-path
+        [ "notepad.exe" ] unless*
     ] unless* ;
 
 : notepad2 ( file line -- )
index d68008c2ca21680dbd034c754575824ab894f2b0..1c856bd7615273388c5425a8ccf24c970e5ee741 100644 (file)
@@ -1,10 +1,11 @@
 USING: editors io.files io.launcher kernel math.parser
-namespaces sequences io.paths.windows make ;
+namespaces sequences io.directories.search.windows make ;
 IN: editors.notepadpp
 
 : notepadpp-path ( -- path )
     \ notepadpp-path get-global [
         "notepad++" t [ "notepad++.exe" tail? ] find-in-program-files
+        [ "notepad++.exe" ] unless*
     ] unless* ;
 
 : notepadpp ( file line -- )
index e0b48a3e72b5f7aba591ba822f8a974d57a5e604..fc7e9e319e345c43ce7395fb06e2019326d4e4dc 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2007 Clemens F. Hofreither.
 ! See http://factorcode.org/license.txt for BSD license.
 ! clemens.hofreither@gmx.net
-USING: io.files io.launcher kernel namespaces io.paths.windows
+USING: io.files io.launcher kernel namespaces io.directories.search.windows
 math math.parser editors sequences make unicode.case ;
 IN: editors.scite
 
@@ -9,6 +9,12 @@ IN: editors.scite
     \ scite-path get-global [
         "Scintilla Text Editor" t
         [ >lower "scite.exe" tail? ] find-in-program-files
+
+        [
+            "SciTE Source Code Editor" t
+            [ >lower "scite.exe" tail? ] find-in-program-files
+        ] unless*
+        [ "scite.exe" ] unless*
     ] unless* ;
 
 : scite-command ( file line -- cmd )
index 994dc60ba378faf6624b83eba8fa83f1c34c0e0e..301e82225c7547900316c1a7e290d20f8490c3c7 100644 (file)
@@ -1,10 +1,11 @@
 USING: editors io.files io.launcher kernel math.parser
-namespaces sequences io.paths.windows make ;
+namespaces sequences io.directories.search.windows make ;
 IN: editors.ted-notepad
 
 : ted-notepad-path ( -- path )
     \ ted-notepad-path get-global [
         "TED Notepad" t [ "TedNPad.exe" tail? ] find-in-program-files
+        [ "TedNPad.exe" ] unless*
     ] unless* ;
 
 : ted-notepad ( file line -- )
diff --git a/basis/editors/textpad/authors.txt b/basis/editors/textpad/authors.txt
new file mode 100644 (file)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/basis/editors/textpad/summary.txt b/basis/editors/textpad/summary.txt
new file mode 100644 (file)
index 0000000..c882050
--- /dev/null
@@ -0,0 +1 @@
+TextPad editor integration
diff --git a/basis/editors/textpad/tags.txt b/basis/editors/textpad/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/editors/textpad/textpad.factor b/basis/editors/textpad/textpad.factor
new file mode 100644 (file)
index 0000000..ca9d5c4
--- /dev/null
@@ -0,0 +1,17 @@
+USING: editors io.files io.launcher kernel math.parser
+namespaces sequences make io.directories.search
+io.directories.search.windows ;
+IN: editors.textpad
+
+: textpad-path ( -- path )
+    \ textpad-path get-global [
+        "TextPad 5" t [ "TextPad.exe" tail? ] find-in-program-files
+        [ "TextPad.exe" ] unless*
+    ] unless* ;
+
+: textpad ( file line -- )
+    [
+        textpad-path , [ , ] [ number>string "(" ",0)" surround , ] bi*
+    ] { } make run-detached drop ;
+
+[ textpad ] edit-hook set-global
index f1929ebf64a16f4280dac4fae1e78bc69096c68f..b5bc2297437116f1833b8d4f2e8f9aaf5d494a0f 100644 (file)
@@ -1,10 +1,11 @@
 USING: editors io.files io.launcher kernel math.parser
-namespaces sequences io.paths.windows make ;
+namespaces sequences io.directories.search.windows make ;
 IN: editors.ultraedit
 
 : ultraedit-path ( -- path )
     \ ultraedit-path get-global [
         "IDM Computer Solutions" t [ "uedit32.exe" tail? ] find-in-program-files
+        [ "uedit32.exe" ] unless*
     ] unless* ;
 
 : ultraedit ( file line -- )
index 325a451a0b3686a242485d4486bde1cd7b71e9c3..061e938dcfc98d3a071ac197a3e59da205de2d4d 100644 (file)
@@ -1,11 +1,10 @@
 ! Generate a new factor.vim file for syntax highlighting
-USING: http.server.templating http.server.templating.fhtml
-io.files ;
+USING: html.templates html.templates.fhtml io.files io.pathnames ;
 IN: editors.vim.generate-syntax
 
 : generate-vim-syntax ( -- )
     "misc/factor.vim.fgen" resource-path <fhtml>
-    "misc/factor.vim" resource-path
+    "misc/vim/syntax/factor.vim" resource-path
     template-convert ;
 
 MAIN: generate-vim-syntax
index cf42884084d41a022cffa999d5653022be11226b..7f527bf18f2544dc621101b52dd993acf3cac461 100644 (file)
@@ -1,4 +1,5 @@
-USING: definitions help help.markup help.syntax io io.files editors words ;
+USING: definitions editors help help.markup help.syntax io io.files
+    io.pathnames words ;
 IN: editors.vim
 
 ARTICLE: { "vim" "vim" } "Vim support"
@@ -11,5 +12,6 @@ $nl
 "USE: vim"
 "\"c:\\\\program files\\\\vim\\\\vim70\\\\gvim\" vim-path set-global"
 }
-"On Unix, you may omit the last line if " { $snippet "\"vim\"" } " is in your " { $snippet "$PATH" } "." ;
-
+"On Unix, you may omit the last line if " { $snippet "\"vim\"" } " is in your " { $snippet "$PATH" } "." 
+$nl
+"You may also wish to install Vim support files to enable syntax hilighting and other features. These are in the " { $link resource-path } " in " { $snippet "misc/vim" } "." ; 
index fa0f6852ddcb96f1ee41a39630cf9bc08320cd3c..ef670d5d28f482006db8704c3684001517c13a6d 100644 (file)
@@ -1,4 +1,4 @@
-USING: editors io.launcher kernel io.paths.windows
+USING: editors io.launcher kernel io.directories.search.windows
 math.parser namespaces sequences io.files arrays ;
 IN: editors.wordpad
 
index 057d291b7ff656c3fc2e84b9ee739faedb674fba..b53c3bae6bb040eda37fe7e186129594d642d1ee 100644 (file)
@@ -11,7 +11,7 @@ HELP: eval>string
 { $description "Evaluates the Factor code in " { $snippet "str" } " with " { $link output-stream } " rebound to a string output stream, then outputs the resulting string." } ;
 
 ARTICLE: "eval" "Evaluating strings at runtime"
-"Evaluating strings at runtime:"
+"The " { $vocab-link "eval" } " vocabulary implements support for evaluating strings at runtime."
 { $subsection eval }
 { $subsection eval>string } ;
 
diff --git a/basis/eval/eval-tests.factor b/basis/eval/eval-tests.factor
new file mode 100644 (file)
index 0000000..6759219
--- /dev/null
@@ -0,0 +1,4 @@
+IN: eval.tests
+USING: eval tools.test ;
+
+[ "4\n" ] [ "USING: math prettyprint ; 2 2 + ." eval>string ] unit-test
index 5b22fec159de78a98e73afa0ac79af7bf6003ecc..dfa9baf418d2806859f2388e3eb717f2df36ea0c 100644 (file)
@@ -1,14 +1,24 @@
-! Copyright (C) 2008 Slava Pestov.
+! Copyright (C) 2008, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: splitting parser compiler.units kernel namespaces
-debugger io.streams.string ;
+debugger io.streams.string fry ;
 IN: eval
 
+: parse-string ( str -- )
+    [ string-lines parse-lines ] with-compilation-unit ;
+
+: (eval) ( str -- )
+    parse-string call ;
+
 : eval ( str -- )
-    [ string-lines parse-fresh ] with-compilation-unit call ;
+    [ (eval) ] with-file-vocabs ;
 
-: eval>string ( str -- output )
+: (eval>string) ( str -- output )
     [
+        "quiet" on
         parser-notes off
-        [ [ eval ] keep ] try drop
+        '[ _ (eval) ] try
     ] with-string-writer ;
+
+: eval>string ( str -- output )
+    [ (eval>string) ] with-file-vocabs ;
\ No newline at end of file
index 8e7270cc015051266398a5e5fb3f36eac08e82f2..8c6b07a01c61a866a5b2405842d3b96abd5c958c 100644 (file)
@@ -14,8 +14,8 @@ HELP: parse-farkup ( string -- farkup )
 { $description "Parses Farkup and outputs a tree of " { $link "farkup-ast" } "." } ;
 
 HELP: (write-farkup)
-{ $values { "farkup" "a Farkup syntax tree node" } }
-{ $description "Writes a Farkup syntax tree as HTML on " { $link output-stream } "." } ;
+{ $values { "farkup" "a Farkup syntax tree node" } { "xml" "an XML chunk" } }
+{ $description "Converts a Farkup syntax tree node to XML." } ;
 
 ARTICLE: "farkup-ast" "Farkup syntax tree nodes"
 "The " { $link parse-farkup } " word outputs a tree of nodes corresponding to the Farkup syntax of the input string. This tree can be programatically traversed and mutated before being passed on to " { $link write-farkup } "."
index 27911a8d13ea089ed141fa9bb5f54b501bd8746d..49c4dab0dbaf13febb714850d2983e0cd372a687 100644 (file)
@@ -1,6 +1,7 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: farkup kernel peg peg.ebnf tools.test namespaces ;
+USING: farkup kernel peg peg.ebnf tools.test namespaces xml
+urls.encoding assocs xml.utilities xml.data ;
 IN: farkup.tests
 
 relative-link-prefix off
@@ -91,22 +92,22 @@ link-no-follow? off
 [ "<p>=</p><h2>foo</h2>" ] [ "===foo==" convert-farkup ] unit-test
 [ "<h1>foo</h1><p>=</p>" ] [ "=foo==" convert-farkup ] unit-test
 
-[ "<pre><span class='KEYWORD3'>int</span> <span class='FUNCTION'>main</span><span class='OPERATOR'>(</span><span class='OPERATOR'>)</span>\n</pre>" ]
+[ "<pre><span class=\"KEYWORD3\">int</span> <span class=\"FUNCTION\">main</span><span class=\"OPERATOR\">(</span><span class=\"OPERATOR\">)</span></pre>" ]
 [ "[c{int main()}]" convert-farkup ] unit-test
 
-[ "<p><img src='lol.jpg'/></p>" ] [ "[[image:lol.jpg]]" convert-farkup ] unit-test
-[ "<p><img src='lol.jpg' alt='teh lol'/></p>" ] [ "[[image:lol.jpg|teh lol]]" convert-farkup ] unit-test
-[ "<p><a href='http://lol.com'>http://lol.com</a></p>" ] [ "[[http://lol.com]]" convert-farkup ] unit-test
-[ "<p><a href='http://lol.com'>haha</a></p>" ] [ "[[http://lol.com|haha]]" convert-farkup ] unit-test
-[ "<p><a href='Foo/Bar'>Bar</a></p>" ] [ "[[Foo/Bar]]" convert-farkup ] unit-test
+[ "<p><img src=\"lol.jpg\"/></p>" ] [ "[[image:lol.jpg]]" convert-farkup ] unit-test
+[ "<p><img src=\"lol.jpg\" alt=\"teh lol\"/></p>" ] [ "[[image:lol.jpg|teh lol]]" convert-farkup ] unit-test
+[ "<p><a href=\"http://lol.com\">http://lol.com</a></p>" ] [ "[[http://lol.com]]" convert-farkup ] unit-test
+[ "<p><a href=\"http://lol.com\">haha</a></p>" ] [ "[[http://lol.com|haha]]" convert-farkup ] unit-test
+[ "<p><a href=\"Foo/Bar\">Bar</a></p>" ] [ "[[Foo/Bar]]" convert-farkup ] unit-test
 
 "/wiki/view/" relative-link-prefix [
-    [ "<p><a href='/wiki/view/Foo/Bar'>Bar</a></p>" ] [ "[[Foo/Bar]]" convert-farkup ] unit-test
+    [ "<p><a href=\"/wiki/view/Foo/Bar\">Bar</a></p>" ] [ "[[Foo/Bar]]" convert-farkup ] unit-test
 ] with-variable
 
 [ ] [ "[{}]" convert-farkup drop ] unit-test
 
-[ "<pre>hello\n</pre>" ] [ "[{hello}]" convert-farkup ] unit-test
+[ "<pre>hello</pre>" ] [ "[{hello}]" convert-farkup ] unit-test
 
 [
     "<p>Feature comparison:\n<table><tr><td>a</td><td>Factor</td><td>Java</td><td>Lisp</td></tr><tr><td>Coolness</td><td>Yes</td><td>No</td><td>No</td></tr><tr><td>Badass</td><td>Yes</td><td>No</td><td>No</td></tr><tr><td>Enterprise</td><td>Yes</td><td>Yes</td><td>No</td></tr><tr><td>Kosher</td><td>Yes</td><td>No</td><td>Yes</td></tr></table></p>"
@@ -117,15 +118,15 @@ link-no-follow? off
 ] [ "Feature comparison:\n\n|a|Factor|Java|Lisp|\n|Coolness|Yes|No|No|\n|Badass|Yes|No|No|\n|Enterprise|Yes|Yes|No|\n|Kosher|Yes|No|Yes|\n" convert-farkup ] unit-test
 
 [
-    "<p>This wiki is written in <a href='Factor'>Factor</a> and is hosted on a <a href='http://linode.com'>http://linode.com</a> virtual server.</p>"
+    "<p>This wiki is written in <a href=\"Factor\">Factor</a> and is hosted on a <a href=\"http://linode.com\">http://linode.com</a> virtual server.</p>"
 ] [
     "This wiki is written in [[Factor]] and is hosted on a [[http://linode.com|http://linode.com]] virtual server."
     convert-farkup
 ] unit-test
 
-[ "<p><a href='a'>a</a> <a href='b'>c</a></p>" ] [ "[[a]] [[b|c]]" convert-farkup ] unit-test
+[ "<p><a href=\"a\">a</a> <a href=\"b\">c</a></p>" ] [ "[[a]] [[b|c]]" convert-farkup ] unit-test
 
-[ "<p><a href='C%2b%2b'>C++</a></p>" ] [ "[[C++]]" convert-farkup ] unit-test
+[ "<p><a href=\"C%2b%2b\">C++</a></p>" ] [ "[[C++]]" convert-farkup ] unit-test
 
 [ "<p>&lt;foo&gt;</p>" ] [ "<foo>" convert-farkup ] unit-test
 
@@ -137,10 +138,10 @@ link-no-follow? off
 [ "<hr/>" ] [ "___" convert-farkup ] unit-test
 [ "<hr/>\n" ] [ "___\n" convert-farkup ] unit-test
 
-[ "<p>before:\n<pre><span class='OPERATOR'>{</span> <span class='DIGIT'>1</span> <span class='DIGIT'>2</span> <span class='DIGIT'>3</span> <span class='OPERATOR'>}</span> <span class='DIGIT'>1</span> tail\n</pre></p>" ] 
+[ "<p>before:\n<pre><span class=\"OPERATOR\">{</span> <span class=\"DIGIT\">1</span> <span class=\"DIGIT\">2</span> <span class=\"DIGIT\">3</span> <span class=\"OPERATOR\">}</span> <span class=\"DIGIT\">1</span> tail</pre></p>" ] 
 [ "before:\n[factor{{ 1 2 3 } 1 tail}]" convert-farkup ] unit-test
  
-[ "<p><a href='Factor'>Factor</a>-rific!</p>" ]
+[ "<p><a href=\"Factor\">Factor</a>-rific!</p>" ]
 [ "[[Factor]]-rific!" convert-farkup ] unit-test
 
 [ "<p>[ factor { 1 2 3 }]</p>" ]
@@ -157,3 +158,12 @@ link-no-follow? off
 
 [ "<p>hello_world how are you today?\n<ul><li> hello_world how are you today?</li></ul></p>" ]
 [ "hello_world how are you today?\n- hello_world how are you today?" convert-farkup ] unit-test
+
+: check-link-escaping ( string -- link )
+    convert-farkup string>xml-chunk
+    "a" deep-tag-named "href" attr url-decode ;
+
+[ "Trader Joe\"s" ] [ "[[Trader Joe\"s]]" check-link-escaping ] unit-test
+[ "<foo>" ] [ "[[<foo>]]" check-link-escaping ] unit-test
+[ "&blah;" ] [ "[[&blah;]]" check-link-escaping ] unit-test
+[ "C++" ] [ "[[C++]]" check-link-escaping ] unit-test
index 284d5758a334b24fbc0c2cf4014e3110840fe2ae..b9e62717ebaf3b67c21f72ad3cde313f9bf0c1d0 100644 (file)
@@ -2,8 +2,9 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays combinators html.elements io
 io.streams.string kernel math namespaces peg peg.ebnf
-sequences sequences.deep strings xml.entities
-vectors splitting xmode.code2html urls.encoding ;
+sequences sequences.deep strings xml.entities xml.interpolate
+vectors splitting xmode.code2html urls.encoding xml.data
+xml.writer ;
 IN: farkup
 
 SYMBOL: relative-link-prefix
@@ -74,6 +75,7 @@ inline-code   = "%" (!("%" | nl).)+ "%"
     => [[ second >string inline-code boa ]]
 
 link-content     = (!("|"|"]").)+
+                    => [[ >string ]]
 
 image-link       = "[[image:" link-content  "|" link-content "]]"
                     => [[ [ second >string ] [ fourth >string ] bi image boa ]]
@@ -146,7 +148,7 @@ named-code
 
 simple-code
            = "[{" (!("}]").)+ "}]"
-    => [[ second f swap code boa ]]
+    => [[ second >string f swap code boa ]]
 
 code = named-code | simple-code
 
@@ -163,66 +165,78 @@ stand-alone
         { [ dup [ 127 > ] contains? ] [ drop invalid-url ] }
         { [ dup first "/\\" member? ] [ drop invalid-url ] }
         { [ CHAR: : over member? ] [ dup absolute-url? [ drop invalid-url ] unless ] }
-        [ relative-link-prefix get prepend ]
-    } cond ;
+        [ relative-link-prefix get prepend "" like ]
+    } cond url-encode ;
 
-: escape-link ( href text -- href-esc text-esc )
-    [ check-url escape-quoted-string ] dip escape-string ;
+: write-link ( href text -- xml )
+    [ check-url link-no-follow? get "true" and ] dip
+    [XML <a href=<-> nofollow=<->><-></a> XML] ;
 
-: write-link ( href text -- )
-    escape-link
-    [ <a url-encode =href link-no-follow? get [ "true" =nofollow ] when a> ]
-    [ write </a> ]
-    bi* ;
-
-: write-image-link ( href text -- )
+: write-image-link ( href text -- xml )
     disable-images? get [
         2drop
-        <strong> "Images are not allowed" write </strong>
+        [XML <strong>Images are not allowed</strong> XML]
     ] [
-        escape-link
-        [ <img url-encode =src ] [ [ =alt ] unless-empty img/> ] bi*
+        [ check-url ] [ f like ] bi*
+        [XML <img src=<-> alt=<->/> XML]
     ] if ;
 
-: render-code ( string mode -- string' )
-    [ string-lines ] dip
-    [
-        <pre>
-            htmlize-lines
-        </pre>
-    ] with-string-writer write ;
-
-GENERIC: (write-farkup) ( farkup -- )
-: <foo.> ( string -- ) <foo> write ;
-: </foo.> ( string -- ) </foo> write ;
-: in-tag. ( obj quot string -- ) [ <foo.> call ] keep </foo.> ; inline
-M: heading1 (write-farkup) [ child>> (write-farkup) ] "h1" in-tag. ;
-M: heading2 (write-farkup) [ child>> (write-farkup) ] "h2" in-tag. ;
-M: heading3 (write-farkup) [ child>> (write-farkup) ] "h3" in-tag. ;
-M: heading4 (write-farkup) [ child>> (write-farkup) ] "h4" in-tag. ;
-M: strong (write-farkup) [ child>> (write-farkup) ] "strong" in-tag. ;
-M: emphasis (write-farkup) [ child>> (write-farkup) ] "em" in-tag. ;
-M: superscript (write-farkup) [ child>> (write-farkup) ] "sup" in-tag. ;
-M: subscript (write-farkup) [ child>> (write-farkup) ] "sub" in-tag. ;
-M: inline-code (write-farkup) [ child>> (write-farkup) ] "code" in-tag. ;
-M: list-item (write-farkup) [ child>> (write-farkup) ] "li" in-tag. ;
-M: unordered-list (write-farkup) [ child>> (write-farkup) ] "ul" in-tag. ;
-M: ordered-list (write-farkup) [ child>> (write-farkup) ] "ol" in-tag. ;
-M: paragraph (write-farkup) [ child>> (write-farkup) ] "p" in-tag. ;
-M: link (write-farkup) [ href>> ] [ text>> ] bi write-link ;
-M: image (write-farkup) [ href>> ] [ text>> ] bi write-image-link ;
-M: code (write-farkup) [ string>> ] [ mode>> ] bi render-code ;
-M: line (write-farkup) drop <hr/> ;
-M: line-break (write-farkup) drop <br/> nl ;
-M: table-row (write-farkup) ( obj -- )
-    child>> [ [ [ (write-farkup) ] "td" in-tag. ] each ] "tr" in-tag. ;
-M: table (write-farkup) [ child>> (write-farkup) ] "table" in-tag. ;
-M: string (write-farkup) escape-string write ;
-M: vector (write-farkup) [ (write-farkup) ] each ;
-M: f (write-farkup) drop ;
+: render-code ( string mode -- xml )
+    [ string-lines ] dip htmlize-lines
+    [XML <pre><-></pre> XML] ;
 
-: write-farkup ( string -- )
+GENERIC: (write-farkup) ( farkup -- xml )
+
+: farkup-inside ( farkup name -- xml )
+    <simple-name> swap T{ attrs } swap
+    child>> (write-farkup) 1array <tag> ;
+
+M: heading1 (write-farkup) "h1" farkup-inside ;
+M: heading2 (write-farkup) "h2" farkup-inside ;
+M: heading3 (write-farkup) "h3" farkup-inside ;
+M: heading4 (write-farkup) "h4" farkup-inside ;
+M: strong (write-farkup) "strong" farkup-inside ;
+M: emphasis (write-farkup) "em" farkup-inside ;
+M: superscript (write-farkup) "sup" farkup-inside ;
+M: subscript (write-farkup) "sub" farkup-inside ;
+M: inline-code (write-farkup) "code" farkup-inside ;
+M: list-item (write-farkup) "li" farkup-inside ;
+M: unordered-list (write-farkup) "ul" farkup-inside ;
+M: ordered-list (write-farkup) "ol" farkup-inside ;
+M: paragraph (write-farkup) "p" farkup-inside ;
+M: table (write-farkup) "table" farkup-inside ;
+
+M: link (write-farkup)
+    [ href>> ] [ text>> ] bi write-link ;
+
+M: image (write-farkup)
+    [ href>> ] [ text>> ] bi write-image-link ;
+
+M: code (write-farkup)
+    [ string>> ] [ mode>> ] bi render-code ;
+
+M: line (write-farkup)
+    drop [XML <hr/> XML] ;
+
+M: line-break (write-farkup)
+    drop [XML <br/> XML] ;
+
+M: table-row (write-farkup)
+    child>>
+    [ (write-farkup) [XML <td><-></td> XML] ] map
+    [XML <tr><-></tr> XML] ;
+
+M: string (write-farkup) ;
+
+M: vector (write-farkup) [ (write-farkup) ] map ;
+
+M: f (write-farkup) ;
+
+: farkup>xml ( string -- xml )
     parse-farkup (write-farkup) ;
 
+: write-farkup ( string -- )
+    farkup>xml write-xml ;
+
 : convert-farkup ( string -- string' )
-    parse-farkup [ (write-farkup) ] with-string-writer ;
+    [ write-farkup ] with-string-writer ;
diff --git a/basis/formatting/authors.txt b/basis/formatting/authors.txt
new file mode 100644 (file)
index 0000000..e091bb8
--- /dev/null
@@ -0,0 +1 @@
+John Benediktsson
diff --git a/basis/formatting/formatting-docs.factor b/basis/formatting/formatting-docs.factor
new file mode 100644 (file)
index 0000000..196302f
--- /dev/null
@@ -0,0 +1,129 @@
+
+USING: help.syntax help.markup kernel prettyprint sequences strings ;
+
+IN: formatting
+
+HELP: printf
+{ $values { "format-string" string } }
+{ $description 
+    "Writes the arguments (specified on the stack) formatted according to the format string.\n" 
+    $nl
+    "Several format specifications exist for handling arguments of different types, and "
+    "specifying attributes for the result string, including such things as maximum width, "
+    "padding, and decimals.\n"
+    { $table
+        { "%%"      "Single %"                   "" }
+        { "%P.Ds"   "String format"              "string" }
+        { "%P.DS"   "String format uppercase"    "string" }
+        { "%c"      "Character format"           "char" } 
+        { "%C"      "Character format uppercase" "char" } 
+        { "%+Pd"    "Integer format"             "fixnum" }
+        { "%+P.De"  "Scientific notation"        "fixnum, float" }
+        { "%+P.DE"  "Scientific notation"        "fixnum, float" }
+        { "%+P.Df"  "Fixed format"               "fixnum, float" }
+        { "%+Px"    "Hexadecimal"                "hex" }
+        { "%+PX"    "Hexadecimal uppercase"      "hex" }
+    }
+    $nl
+    "A plus sign ('+') is used to optionally specify that the number should be "
+    "formatted with a '+' preceeding it if positive.\n"
+    $nl
+    "Padding ('P') is used to optionally specify the minimum width of the result "
+    "string, the padding character, and the alignment.  By default, the padding "
+    "character defaults to a space and the alignment defaults to right-aligned. "
+    "For example:\n"
+    { $list
+        "\"%5s\" formats a string padding with spaces up to 5 characters wide."
+        "\"%08d\" formats an integer padding with zeros up to 3 characters wide."
+        "\"%'#5f\" formats a float padding with '#' up to 3 characters wide."
+        "\"%-10d\" formats an integer to 10 characters wide and left-aligns." 
+    }
+    $nl
+    "Digits ('D') is used to optionally specify the maximum digits in the result "
+    "string. For example:\n"
+    { $list 
+        "\"%.3s\" formats a string to truncate at 3 characters (from the left)."
+        "\"%.10f\" formats a float to pad-right with zeros up to 10 digits beyond the decimal point."
+        "\"%.5E\" formats a float into scientific notation with zeros up to 5 digits beyond the decimal point, but before the exponent."
+    }
+}
+{ $examples 
+    { $example
+        "USING: formatting ;"
+        "123 \"%05d\" printf"
+        "00123" }
+    { $example
+        "USING: formatting ;"
+        "HEX: ff \"%04X\" printf"
+        "00FF" }
+    { $example
+        "USING: formatting ;"
+        "1.23456789 \"%.3f\" printf"
+        "1.235" }
+    { $example 
+        "USING: formatting ;"
+        "1234567890 \"%.5e\" printf"
+        "1.23457e+09" }
+    { $example
+        "USING: formatting ;"
+        "12 \"%'#4d\" printf"
+        "##12" }
+    { $example
+        "USING: formatting ;"
+        "1234 \"%+d\" printf"
+        "+1234" }
+} ;
+
+HELP: sprintf
+{ $values { "format-string" string } { "result" string } }
+{ $description "Returns the arguments (specified on the stack) formatted according to the format string as a result string." } 
+{ $see-also printf } ;
+
+HELP: strftime
+{ $values { "format-string" string } }
+{ $description 
+    "Writes the timestamp (specified on the stack) formatted according to the format string.\n"
+    $nl
+    "Different attributes of the timestamp can be retrieved using format specifications.\n"
+    { $table
+        { "%a"     "Abbreviated weekday name." }
+        { "%A"     "Full weekday name." }
+        { "%b"     "Abbreviated month name." }
+        { "%B"     "Full month name." }
+        { "%c"     "Date and time representation." }
+        { "%d"     "Day of the month as a decimal number [01,31]." }
+        { "%H"     "Hour (24-hour clock) as a decimal number [00,23]." }
+        { "%I"     "Hour (12-hour clock) as a decimal number [01,12]." }
+        { "%j"     "Day of the year as a decimal number [001,366]." }
+        { "%m"     "Month as a decimal number [01,12]." }
+        { "%M"     "Minute as a decimal number [00,59]." }
+        { "%p"     "Either AM or PM." }
+        { "%S"     "Second as a decimal number [00,59]." }
+        { "%U"     "Week number of the year (Sunday as the first day of the week) as a decimal number [00,53]." }
+        { "%w"     "Weekday as a decimal number [0(Sunday),6]." }
+        { "%W"     "Week number of the year (Monday as the first day of the week) as a decimal number [00,53]." }
+        { "%x"     "Date representation." }
+        { "%X"     "Time representation." }
+        { "%y"     "Year without century as a decimal number [00,99]." }
+        { "%Y"     "Year with century as a decimal number." }
+        { "%Z"     "Time zone name (no characters if no time zone exists)." }
+        { "%%"     "A literal '%' character." }
+    } 
+} 
+{ $examples 
+    { $unchecked-example
+        "USING: calendar formatting io ;"
+        "now \"%c\" strftime print"
+        "Mon Dec 15 14:40:43 2008" }
+} ;
+
+ARTICLE: "formatting" "Formatted printing"
+"The " { $vocab-link "formatting" } " vocabulary is used for formatted printing."
+{ $subsection printf }
+{ $subsection sprintf }
+{ $subsection strftime }
+;
+
+ABOUT: "formatting"
+
+
diff --git a/basis/formatting/formatting-tests.factor b/basis/formatting/formatting-tests.factor
new file mode 100644 (file)
index 0000000..c7e9fb9
--- /dev/null
@@ -0,0 +1,97 @@
+! Copyright (C) 2008 John Benediktsson
+! See http://factorcode.org/license.txt for BSD license
+
+USING: calendar kernel formatting tools.test ;
+
+IN: formatting.tests
+
+[ "%s" printf ] must-infer 
+[ "%s" sprintf ] must-infer
+
+[ t ] [ "" "" sprintf = ] unit-test
+[ t ] [ "asdf" "asdf" sprintf = ] unit-test
+[ t ] [ "10" 10 "%d" sprintf = ] unit-test
+[ t ] [ "+10" 10 "%+d" sprintf = ] unit-test
+[ t ] [ "-10" -10 "%d" sprintf = ] unit-test
+[ t ] [ "  -10" -10 "%5d" sprintf = ] unit-test
+[ t ] [ "-0010" -10 "%05d" sprintf = ] unit-test
+[ t ] [ "+0010" 10 "%+05d" sprintf = ] unit-test
+[ t ] [ "123.456000" 123.456 "%f" sprintf = ] unit-test
+[ t ] [ "2.44" 2.436 "%.2f" sprintf = ] unit-test
+[ t ] [ "123.10" 123.1 "%01.2f" sprintf = ] unit-test
+[ t ] [ "1.2346" 1.23456789 "%.4f" sprintf = ] unit-test
+[ t ] [ "  1.23" 1.23456789 "%6.2f" sprintf = ] unit-test
+[ t ] [ "1.234000e+08" 123400000 "%e" sprintf = ] unit-test
+[ t ] [ "-1.234000e+08" -123400000 "%e" sprintf = ] unit-test
+[ t ] [ "1.234567e+08" 123456700 "%e" sprintf = ] unit-test
+[ t ] [ "3.625e+08" 362525200 "%.3e" sprintf = ] unit-test
+[ t ] [ "2.500000e-03" 0.0025 "%e" sprintf = ] unit-test
+[ t ] [ "2.500000E-03" 0.0025 "%E" sprintf = ] unit-test
+[ t ] [ "   1.0E+01" 10 "%10.1E" sprintf = ] unit-test
+[ t ] [ "  -1.0E+01" -10 "%10.1E" sprintf = ] unit-test
+[ t ] [ "  -1.0E+01" -10 "%+10.1E" sprintf = ] unit-test
+[ t ] [ "  +1.0E+01" 10 "%+10.1E" sprintf = ] unit-test
+[ t ] [ "-001.0E+01" -10 "%+010.1E" sprintf = ] unit-test
+[ t ] [ "+001.0E+01" 10 "%+010.1E" sprintf = ] unit-test
+[ t ] [ "ff" HEX: ff "%x" sprintf = ] unit-test
+[ t ] [ "FF" HEX: ff "%X" sprintf = ] unit-test
+[ t ] [ "0f" HEX: f "%02x" sprintf = ] unit-test
+[ t ] [ "0F" HEX: f "%02X" sprintf = ] unit-test
+[ t ] [ "2008-09-10" 
+        2008 9 10 "%04d-%02d-%02d" sprintf = ] unit-test
+[ t ] [ "Hello, World!" 
+        "Hello, World!" "%s" sprintf = ] unit-test
+[ t ] [ "printf test" 
+        "printf test" sprintf = ] unit-test
+[ t ] [ "char a = 'a'"
+        CHAR: a "char %c = 'a'" sprintf = ] unit-test
+[ t ] [ "00" HEX: 0 "%02x" sprintf = ] unit-test
+[ t ] [ "ff" HEX: ff "%02x" sprintf = ] unit-test
+[ t ] [ "0 message(s)"
+        0 "message" "%d %s(s)" sprintf = ] unit-test
+[ t ] [ "0 message(s) with %"
+        0 "message" "%d %s(s) with %%" sprintf = ] unit-test
+[ t ] [ "justif: \"left      \""
+        "left" "justif: \"%-10s\"" sprintf = ] unit-test
+[ t ] [ "justif: \"     right\""
+        "right" "justif: \"%10s\"" sprintf = ] unit-test
+[ t ] [ " 3: 0003 zero padded" 
+        3 " 3: %04d zero padded" sprintf = ] unit-test
+[ t ] [ " 3: 3    left justif" 
+        3 " 3: %-4d left justif" sprintf = ] unit-test
+[ t ] [ " 3:    3 right justif" 
+        3 " 3: %4d right justif" sprintf = ] unit-test
+[ t ] [ " -3: -003 zero padded"
+        -3 " -3: %04d zero padded" sprintf = ] unit-test
+[ t ] [ " -3: -3   left justif"
+        -3 " -3: %-4d left justif" sprintf = ] unit-test
+[ t ] [ " -3:   -3 right justif"
+        -3 " -3: %4d right justif" sprintf = ] unit-test
+[ t ] [ "There are 10 monkeys in the kitchen" 
+        10 "kitchen" "There are %d monkeys in the %s" sprintf = ] unit-test
+[ f ] [ "%d" 10 "%d" sprintf = ] unit-test
+[ t ] [ "[monkey]" "monkey" "[%s]" sprintf = ] unit-test
+[ t ] [ "[    monkey]" "monkey" "[%10s]" sprintf = ] unit-test
+[ t ] [ "[monkey    ]" "monkey" "[%-10s]" sprintf = ] unit-test
+[ t ] [ "[0000monkey]" "monkey" "[%010s]" sprintf = ] unit-test
+[ t ] [ "[####monkey]" "monkey" "[%'#10s]" sprintf = ] unit-test
+[ t ] [ "[many monke]" "many monkeys" "[%10.10s]" sprintf = ] unit-test
+
+
+[ "%H:%M:%S" strftime ] must-infer
+
+: testtime ( -- timestamp )
+    2008 10 9 12 3 15 instant <timestamp> ;
+
+[ t ] [ "12:03:15" testtime "%H:%M:%S" strftime = ] unit-test
+[ t ] [ "12:03:15" testtime "%X" strftime = ] unit-test
+[ t ] [ "10/09/2008" testtime "%m/%d/%Y" strftime = ] unit-test
+[ t ] [ "10/09/2008" testtime "%x" strftime = ] unit-test
+[ t ] [ "10/09/08" testtime "%m/%d/%y" strftime = ] unit-test
+[ t ] [ "Thu" testtime "%a" strftime = ] unit-test
+[ t ] [ "Thursday" testtime "%A" strftime = ] unit-test
+[ t ] [ "Oct" testtime "%b" strftime = ] unit-test
+[ t ] [ "October" testtime "%B" strftime = ] unit-test
+[ t ] [ "Thu Oct 09 12:03:15 2008" testtime "%c" strftime = ] unit-test
+[ t ] [ "PM" testtime "%p" strftime = ] unit-test
+
diff --git a/basis/formatting/formatting.factor b/basis/formatting/formatting.factor
new file mode 100644 (file)
index 0000000..3f12c36
--- /dev/null
@@ -0,0 +1,185 @@
+! Copyright (C) 2008 John Benediktsson
+! See http://factorcode.org/license.txt for BSD license
+
+USING: accessors arrays ascii calendar combinators fry kernel 
+generalizations io io.encodings.ascii io.files io.streams.string
+macros math math.functions math.parser peg.ebnf quotations
+sequences splitting strings unicode.case vectors ;
+
+IN: formatting
+
+<PRIVATE
+
+: compose-all ( seq -- quot )
+    [ ] [ compose ] reduce ;
+
+: fix-sign ( string -- string )
+    dup CHAR: 0 swap index 0 = 
+      [ dup 0 swap [ [ CHAR: 0 = not ] keep digit? and ] find-from
+         [ dup 1- rot dup [ nth ] dip swap
+            {
+               { CHAR: - [ [ 1- ] dip remove-nth "-" prepend ] }
+               { CHAR: + [ [ 1- ] dip remove-nth "+" prepend ] }
+               [ drop swap drop ] 
+            } case 
+         ] [ drop ] if
+      ] when ;
+
+: >digits ( string -- digits ) 
+    [ 0 ] [ string>number ] if-empty ;
+
+: pad-digits ( string digits -- string' )
+    [ "." split1 ] dip [ CHAR: 0 pad-right ] [ head-slice ] bi "." glue ;
+
+: max-digits ( n digits -- n' )
+    10 swap ^ [ * round ] keep / ; inline
+
+: >exp ( x -- exp base )
+    [ 
+        abs 0 swap
+        [ dup [ 10.0 >= ] [ 1.0 < ] bi or ]
+        [ dup 10.0 >=
+          [ 10.0 / [ 1+ ] dip ]
+          [ 10.0 * [ 1- ] dip ] if
+        ] [ ] while 
+     ] keep 0 < [ neg ] when ;
+
+: exp>string ( exp base digits -- string )
+    [ max-digits ] keep -rot
+    [
+        [ 0 < "-" "+" ? ]
+        [ abs number>string 2 CHAR: 0 pad-left ] bi 
+        "e" -rot 3append
+    ]
+    [ number>string ] bi*
+    rot pad-digits prepend ;
+
+EBNF: parse-printf
+
+zero      = "0"                  => [[ CHAR: 0 ]]
+char      = "'" (.)              => [[ second ]]
+
+pad-char  = (zero|char)?         => [[ CHAR: \s or ]]
+pad-align = ("-")?               => [[ \ pad-right \ pad-left ? ]] 
+pad-width = ([0-9])*             => [[ >digits ]]
+pad       = pad-align pad-char pad-width => [[ reverse >quotation dup first 0 = [ drop [ ] ] when ]]
+
+sign      = ("+")?               => [[ [ dup CHAR: - swap index [ "+" prepend ] unless ] [ ] ? ]]
+
+width_    = "." ([0-9])*         => [[ second >digits '[ _ short head ] ]]
+width     = (width_)?            => [[ [ ] or ]] 
+
+digits_   = "." ([0-9])*         => [[ second >digits ]]
+digits    = (digits_)?           => [[ 6 or ]]
+
+fmt-%     = "%"                  => [[ [ "%" ] ]] 
+fmt-c     = "c"                  => [[ [ 1string ] ]]
+fmt-C     = "C"                  => [[ [ 1string >upper ] ]]
+fmt-s     = "s"                  => [[ [ ] ]]
+fmt-S     = "S"                  => [[ [ >upper ] ]]
+fmt-d     = "d"                  => [[ [ >fixnum number>string ] ]]
+fmt-e     = digits "e"           => [[ first '[ >exp _ exp>string ] ]]
+fmt-E     = digits "E"           => [[ first '[ >exp _ exp>string >upper ] ]]
+fmt-f     = digits "f"           => [[ first dup '[ >float _ max-digits number>string _ pad-digits ] ]] 
+fmt-x     = "x"                  => [[ [ >hex ] ]]
+fmt-X     = "X"                  => [[ [ >hex >upper ] ]]
+unknown   = (.)*                 => [[ "Unknown directive" throw ]]
+
+strings_  = fmt-c|fmt-C|fmt-s|fmt-S
+strings   = pad width strings_   => [[ reverse compose-all ]]
+
+numbers_  = fmt-d|fmt-e|fmt-E|fmt-f|fmt-x|fmt-X
+numbers   = sign pad numbers_    => [[ unclip-last prefix compose-all [ fix-sign ] append ]]
+
+formats   = "%" (strings|numbers|fmt-%|unknown) => [[ second '[ _ dip ] ]]
+
+plain-text = (!("%").)+          => [[ >string '[ _ swap ] ]]
+
+text      = (formats|plain-text)* => [[ reverse [ [ [ push ] keep ] append ] map ]]
+
+;EBNF
+
+PRIVATE>
+
+MACRO: printf ( format-string -- )
+    parse-printf [ length ] keep compose-all '[ _ <vector> @ reverse [ write ] each ] ;
+
+: sprintf ( format-string -- result )
+    [ printf ] with-string-writer ; inline
+
+
+<PRIVATE
+
+: pad-00 ( n -- string ) number>string 2 CHAR: 0 pad-left ; inline
+
+: pad-000 ( n -- string ) number>string 3 CHAR: 0 pad-left ; inline
+
+: >time ( timestamp -- string )
+    [ hour>> ] [ minute>> ] [ second>> floor ] tri 3array
+    [ pad-00 ] map ":" join ; inline
+
+: >date ( timestamp -- string )
+    [ month>> ] [ day>> ] [ year>> ] tri 3array
+    [ pad-00 ] map "/" join ; inline
+
+: >datetime ( timestamp -- string )
+    { [ day-of-week day-abbreviation3 ]
+      [ month>> month-abbreviation ]
+      [ day>> pad-00 ]
+      [ >time ]
+      [ year>> number>string ]
+    } cleave 5 narray " " join ; inline
+
+: (week-of-year) ( timestamp day -- n )
+    [ dup clone 1 >>month 1 >>day day-of-week dup ] dip > [ 7 swap - ] when
+    [ day-of-year ] dip 2dup < [ 0 2nip ] [ - 7 / 1+ >fixnum ] if ;
+
+: week-of-year-sunday ( timestamp -- n ) 0 (week-of-year) ; inline
+
+: week-of-year-monday ( timestamp -- n ) 1 (week-of-year) ; inline
+
+EBNF: parse-strftime
+
+fmt-%     = "%"                  => [[ [ "%" ] ]]
+fmt-a     = "a"                  => [[ [ dup day-of-week day-abbreviation3 ] ]]
+fmt-A     = "A"                  => [[ [ dup day-of-week day-name ] ]]
+fmt-b     = "b"                  => [[ [ dup month>> month-abbreviation ] ]]
+fmt-B     = "B"                  => [[ [ dup month>> month-name ] ]]
+fmt-c     = "c"                  => [[ [ dup >datetime ] ]]
+fmt-d     = "d"                  => [[ [ dup day>> pad-00 ] ]]
+fmt-H     = "H"                  => [[ [ dup hour>> pad-00 ] ]]
+fmt-I     = "I"                  => [[ [ dup hour>> dup 12 > [ 12 - ] when pad-00 ] ]]
+fmt-j     = "j"                  => [[ [ dup day-of-year pad-000 ] ]]
+fmt-m     = "m"                  => [[ [ dup month>> pad-00 ] ]]
+fmt-M     = "M"                  => [[ [ dup minute>> pad-00 ] ]]
+fmt-p     = "p"                  => [[ [ dup hour>> 12 < "AM" "PM" ? ] ]]
+fmt-S     = "S"                  => [[ [ dup second>> floor pad-00 ] ]]
+fmt-U     = "U"                  => [[ [ dup week-of-year-sunday pad-00 ] ]]
+fmt-w     = "w"                  => [[ [ dup day-of-week number>string ] ]]
+fmt-W     = "W"                  => [[ [ dup week-of-year-monday pad-00 ] ]]
+fmt-x     = "x"                  => [[ [ dup >date ] ]]
+fmt-X     = "X"                  => [[ [ dup >time ] ]]
+fmt-y     = "y"                  => [[ [ dup year>> 100 mod pad-00 ] ]]
+fmt-Y     = "Y"                  => [[ [ dup year>> number>string ] ]]
+fmt-Z     = "Z"                  => [[ [ "Not yet implemented" throw ] ]]
+unknown   = (.)*                 => [[ "Unknown directive" throw ]]
+
+formats_  = fmt-%|fmt-a|fmt-A|fmt-b|fmt-B|fmt-c|fmt-d|fmt-H|fmt-I|
+            fmt-j|fmt-m|fmt-M|fmt-p|fmt-S|fmt-U|fmt-w|fmt-W|fmt-x|
+            fmt-X|fmt-y|fmt-Y|fmt-Z|unknown
+
+formats   = "%" (formats_)       => [[ second '[ _ dip ] ]]
+
+plain-text = (!("%").)+          => [[ >string '[ _ swap ] ]]
+
+text      = (formats|plain-text)* => [[ reverse [ [ [ push ] keep ] append ] map ]]
+
+;EBNF
+
+PRIVATE>
+
+MACRO: strftime ( format-string -- )
+    parse-strftime [ length ] keep [ ] join
+    '[ _ <vector> @ reverse concat nip ] ;
+
+
diff --git a/basis/formatting/summary.txt b/basis/formatting/summary.txt
new file mode 100644 (file)
index 0000000..da1aa31
--- /dev/null
@@ -0,0 +1 @@
+Format data according to a specified format string, and writes (or returns) the result string.  
index 1dff0942bd301327bbb077ef6cf1d90bf5e37401..5d750775e571d0885fc70b2dc49c7a1f37e3d435 100644 (file)
@@ -20,7 +20,7 @@ HELP: '[
 { $examples "See " { $link "fry.examples" } "." } ;\r
 \r
 HELP: >r/r>-in-fry-error\r
-{ $error-description "Thrown by " { $link POSTPONE: '[ } " if the fried quotation contains calls to " { $link >r } " or " { $link r> } ". Explicit retain stack manipulation of this form does not work with fry; use " { $link dip } " instead." } ;\r
+{ $error-description "Thrown by " { $link POSTPONE: '[ } " if the fried quotation contains calls to retain stack manipulation primitives." } ;\r
 \r
 ARTICLE: "fry.examples" "Examples of fried quotations"\r
 "The easiest way to understand fried quotations is to look at some examples."\r
@@ -69,18 +69,18 @@ ARTICLE: "fry.philosophy" "Fried quotation philosophy"
     "'[ [ _ key? ] all? ] filter"\r
     "[ [ key? ] curry all? ] curry filter"\r
 }\r
-"There is a mapping from fried quotations to lexical closures as defined in the " { $vocab-link "locals" } " vocabulary. Namely, a fried quotation is equivalent to a ``let'' form where each local binding is only used once, and bindings are used in the same order in which they are defined. The following two lines are equivalent:"\r
+"There is a mapping from fried quotations to lexical closures as defined in the " { $vocab-link "locals" } " vocabulary. Namely, a fried quotation is equivalent to a â€œlet†form where each local binding is only used once, and bindings are used in the same order in which they are defined. The following two lines are equivalent:"\r
 { $code\r
     "'[ 3 _ + 4 _ / ]"\r
     "[let | a [ ] b [ ] | [ 3 a + 4 b / ] ]"\r
 } ;\r
 \r
 ARTICLE: "fry" "Fried quotations"\r
-"The " { $vocab-link "fry" } " vocabulary implements " { $emphasis "fried quotation" } ". Conceptually, fried quotations are quotations with ``holes'' (more formally, " { $emphasis "fry specifiers" } "), and the holes are filled in when the fried quotation is pushed on the stack."\r
+"The " { $vocab-link "fry" } " vocabulary implements " { $emphasis "fried quotation" } ". Conceptually, fried quotations are quotations with â€œholes†(more formally, " { $emphasis "fry specifiers" } "), and the holes are filled in when the fried quotation is pushed on the stack."\r
 $nl\r
 "Fried quotations are started by a special parsing word:"\r
 { $subsection POSTPONE: '[ }\r
-"There are two types of fry specifiers; the first can hold a value, and the second ``splices'' a quotation, as if it were inserted without surrounding brackets:"\r
+"There are two types of fry specifiers; the first can hold a value, and the second â€œsplices†a quotation, as if it were inserted without surrounding brackets:"\r
 { $subsection _ }\r
 { $subsection @ }\r
 "The holes are filled in with the top of stack going in the rightmost hole, the second item on the stack going in the second hole from the right, and so on."\r
index 0137e8be22b7d159aef81da677225a751f30cac4..71894503945c43cd91b6944faef4b49f56543a00 100644 (file)
@@ -56,7 +56,7 @@ sequences eval accessors ;
     3 '[ [ [ _ 1array ] call 1array ] call 1array ] call
 ] unit-test
 
-[ "USING: fry kernel ; f '[ >r _ r> ]" eval ]
+[ "USING: fry locals.backend ; f '[ load-local _ ]" eval ]
 [ error>> >r/r>-in-fry-error? ] must-fail-with
 
 [ { { "a" 1 } { "b" 2 } { "c" 3 } { "d" 4 } } ] [
index f84ad233cd8b5c1b9420e3efb0eb950b3d209fe8..e62a42749fef2a8313d58a91a2131381c9887274 100644 (file)
@@ -25,7 +25,7 @@ M: >r/r>-in-fry-error summary
     "Explicit retain stack manipulation is not permitted in fried quotations" ;
 
 : check-fry ( quot -- quot )
-    dup { >r r> load-locals get-local drop-locals } intersect
+    dup { load-local load-locals get-local drop-locals } intersect
     empty? [ >r/r>-in-fry-error ] unless ;
 
 PREDICATE: fry-specifier < word { _ @ } memq? ;
index 9c82cdbb509b29e91de1adf7a7becd183a679823..ac21bb8f78b39aa1d1a824e2b2de656cc3f102a0 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays classes.singleton combinators
 continuations io io.encodings.binary io.encodings.utf8
-io.files io.sockets kernel io.streams.duplex math
+io.files io.pathnames io.sockets kernel io.streams.duplex math
 math.parser sequences splitting namespaces strings fry ftp
 ftp.client.listing-parser urls ;
 IN: ftp.client
@@ -104,7 +104,3 @@ ERROR: ftp-error got expected ;
         [ nip parent-directory ftp-cwd drop ]
         [ file-name (ftp-get) ] 2bi
     ] with-ftp-client ;
-
-
-
-
index 04e96ed77ab088edc1d39f4ad0591b0acfce411b..6183165b3adda6736a8e2d466bd34153e9fc51ee 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors combinators io.files kernel math.parser
+USING: accessors combinators io.files.types kernel math.parser
 sequences splitting ;
 IN: ftp.client.listing-parser
 
index b0ec340202aa176290ea0216a93b10369fb7bf4c..20a753785ce6452da4bfc4045eb3716755e23212 100644 (file)
@@ -2,12 +2,13 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: combinators.short-circuit accessors combinators io
 io.encodings.8-bit io.encodings io.encodings.binary
-io.encodings.utf8 io.files io.sockets kernel math.parser
-namespaces make sequences ftp io.unix.launcher.parser
-unicode.case splitting assocs classes io.servers.connection
-destructors calendar io.timeouts io.streams.duplex threads
-continuations math concurrency.promises byte-arrays
-io.backend tools.hexdump tools.files io.streams.string ;
+io.encodings.utf8 io.files io.files.info io.directories
+io.sockets kernel math.parser namespaces make sequences
+ftp io.launcher.unix.parser unicode.case splitting
+assocs classes io.servers.connection destructors calendar
+io.timeouts io.streams.duplex threads continuations math
+concurrency.promises byte-arrays io.backend tools.hexdump
+io.streams.string math.bitwise tools.files io.pathnames ;
 IN: ftp.server
 
 TUPLE: ftp-client url mode state command-promise user password ;
@@ -48,7 +49,7 @@ C: <ftp-list> ftp-list
     [ >>raw ] [ tokenize-command >>tokenized ] bi ;
 
 : (send-response) ( n string separator -- )
-    rot number>string write write ftp-send ;
+    [ number>string write ] 2dip write ftp-send ;
 
 : send-response ( ftp-response -- )
     [ n>> ] [ strings>> ] bi
@@ -101,7 +102,7 @@ ERROR: type-error type ;
 : handle-TYPE ( obj -- )
     [
         tokenized>> second parse-type
-        200 "Switching to " rot " mode" 3append server-response
+        [ 200 ] dip "Switching to " " mode" surround server-response
     ] [
         2drop "TYPE is binary only" ftp-error
     ] recover ;
@@ -110,11 +111,11 @@ ERROR: type-error type ;
     remote-address get class new 0 >>port binary <server> ;
 
 : port>bytes ( port -- hi lo )
-    [ -8 shift ] keep [ HEX: ff bitand ] bi@ ;
+    [ -8 shift ] keep [ 8 bits ] bi@ ;
 
 : handle-PWD ( obj -- )
     drop
-    257 current-directory get "\"" "\"" surround server-response ;
+    257 current-directory get "\"" dup surround server-response ;
 
 : handle-SYST ( obj -- )
     drop
@@ -154,15 +155,19 @@ M: ftp-list service-command ( stream obj -- )
     finish-directory ;
 
 : transfer-outgoing-file ( path -- )
-    150 "Opening BINARY mode data connection for "
-    rot   
-    [ file-name ] [
-        " " swap  file-info size>> number>string
-        "(" " bytes)." surround append
-    ] bi 3append server-response ;
+    [
+        150
+        "Opening BINARY mode data connection for "
+    ] dip
+    [
+        file-name
+    ] [
+        file-info size>> number>string
+        "(" " bytes)." surround
+    ] bi " " glue append server-response ;
 
 : transfer-incoming-file ( path -- )
-    150 "Opening BINARY mode data connection for " rot append
+    [ 150 ] dip "Opening BINARY mode data connection for " prepend
     server-response ;
 
 : finish-file-transfer ( -- )
@@ -208,8 +213,9 @@ M: ftp-put service-command ( stream obj -- )
 
 : handle-SIZE ( obj -- )
     [
+        [ 213 ] dip
         tokenized>> second file-info size>>
-        213 swap number>string server-response
+        number>string server-response
     ] [
         2drop
         550 "Could not get file size" server-response
@@ -227,21 +233,20 @@ M: ftp-put service-command ( stream obj -- )
 
 : handle-PASV ( obj -- )
     drop client get passive >>mode drop
-    expect-connection
-    [
-        "Entering Passive Mode (127,0,0,1," %
-        port>bytes [ number>string ] bi@ "," glue %
-        ")" %
-    ] "" make 227 swap server-response ;
+    221
+    expect-connection port>bytes [ number>string ] bi@ "," glue
+    "Entering Passive Mode (127,0,0,1," ")" surround
+    server-response ;
 
 : handle-EPSV ( obj -- )
     drop
     client get command-promise>> [
         "You already have a passive stream" ftp-error
     ] [
-        229 "Entering Extended Passive Mode (|||"
+        229
         expect-connection number>string
-        "|)" 3append server-response
+        "Entering Extended Passive Mode (|||" "|)" surround
+        server-response
     ] if ;
 
 ! LPRT 6,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,242,186
index 39923afee7851e74693ff5384ce05f0e92fac349..a5f3042b38e6eaf669e50689e0f1a1521e7937f8 100644 (file)
@@ -34,7 +34,7 @@ WW DEFINES ${W}${W}
 
 WHERE
 
-: WW W twice ; inline
+: WW ( a -- b ) \ W twice ; inline
 
 ;FUNCTOR
 
@@ -45,3 +45,21 @@ WHERE
 \ sqsq must-infer
 
 [ 16 ] [ 2 sqsq ] unit-test
+
+<<
+
+FUNCTOR: wrapper-test-2 ( W -- )
+
+W DEFINES ${W}
+
+WHERE
+
+: W ( a b -- c ) \ + execute ;
+
+;FUNCTOR
+
+"blah" wrapper-test-2
+
+>>
+
+[ 4 ] [ 1 3 blah ] unit-test
\ No newline at end of file
index 2029c0cf2526e6672cb5dab84a26443834a07f07..f4d35b6932ae09b1403711494516d735c43aea2f 100644 (file)
@@ -1,16 +1,43 @@
-! Copyright (C) 2008 Slava Pestov.
+! Copyright (C) 2008, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel quotations classes.tuple make combinators generic
 words interpolate namespaces sequences io.streams.string fry
 classes.mixin effects lexer parser classes.tuple.parser
-effects.parser locals.types locals.parser locals.rewrite.closures ;
+effects.parser locals.types locals.parser
+locals.rewrite.closures vocabs.parser arrays accessors ;
 IN: functors
 
-: scan-param ( -- obj )
-    scan-object dup special? [ literalize ] unless ;
+! This is a hack
+
+<PRIVATE
+
+: scan-param ( -- obj ) scan-object literalize ;
 
 : define* ( word def effect -- ) pick set-word define-declared ;
 
+TUPLE: fake-quotation seq ;
+
+GENERIC: >fake-quotations ( quot -- fake )
+
+M: callable >fake-quotations
+    >array >fake-quotations fake-quotation boa ;
+
+M: array >fake-quotations [ >fake-quotations ] { } map-as ;
+
+M: object >fake-quotations ;
+
+GENERIC: fake-quotations> ( fake -- quot )
+
+M: fake-quotation fake-quotations>
+    seq>> [ fake-quotations> ] map >quotation ;
+
+M: array fake-quotations> [ fake-quotations> ] map ;
+
+M: object fake-quotations> ;
+
+: parse-definition* ( -- )
+    parse-definition >fake-quotations parsed \ fake-quotations> parsed ;
+
 : DEFINE* ( accum -- accum ) effect get parsed \ define* parsed ;
 
 : `TUPLE:
@@ -31,7 +58,7 @@ IN: functors
     scan-param parsed
     scan-param parsed
     \ create-method parsed
-    parse-definition parsed
+    parse-definition*
     DEFINE* ; parsing
 
 : `C:
@@ -44,7 +71,7 @@ IN: functors
 : `:
     effect off
     scan-param parsed
-    parse-definition parsed
+    parse-definition*
     DEFINE* ; parsing
 
 : `INSTANCE:
@@ -63,12 +90,16 @@ IN: functors
     [ scan interpolate-locals ] dip
     '[ _ with-string-writer @ ] parsed ;
 
+PRIVATE>
+
 : IS [ dup search [ ] [ no-word ] ?if ] (INTERPOLATE) ; parsing
 
 : DEFINES [ create-in ] (INTERPOLATE) ; parsing
 
 DEFER: ;FUNCTOR delimiter
 
+<PRIVATE
+
 : functor-words ( -- assoc )
     H{
         { "TUPLE:" POSTPONE: `TUPLE: }
@@ -103,4 +134,6 @@ DEFER: ;FUNCTOR delimiter
     parse-functor-body swap pop-locals <lambda>
     rewrite-closures first ;
 
+PRIVATE>
+
 : FUNCTOR: (FUNCTOR:) define ; parsing
index f108428c901b09817d4e428c2120800365813be4..f21fc237a8ff4564ff207f9dd697cd3737387269 100644 (file)
@@ -5,7 +5,7 @@ HELP: init-furnace-tables
 { $description "Initializes database tables used by asides, conversations and session management. This word must be invoked inside a " { $link with-db } " scope." } ;
 
 HELP: <alloy>
-{ $values { "responder" "a responder" } { "db" db } { "responder'" "an alloy responder" } }
+{ $values { "responder" "a responder" } { "db" "a database descriptor" } { "responder'" "an alloy responder" } }
 { $description "Wraps the responder with support for asides, conversations, sessions and database persistence." }
 { $examples
     "The " { $vocab-link "webapps.counter" } " vocabulary uses an alloy to configure the counter:"
@@ -21,7 +21,7 @@ HELP: <alloy>
 } ;
 
 HELP: start-expiring
-{ $values { "db" db } }
+{ $values { "db" "a database descriptor" } }
 { $description "Starts a timer which expires old session state from the given database." } ;
 
 ARTICLE: "furnace.alloy" "Furnace alloy responder"
index e7e722344a07d573b7849919a8b5c1f53334ce24..f1f68c975d7da81de04ff733a2ecd18e4b280f44 100644 (file)
@@ -1,5 +1,5 @@
 USING: assocs classes help.markup help.syntax kernel
-quotations strings words furnace.auth.providers.db
+quotations strings words words.symbol furnace.auth.providers.db
 checksums.sha2 furnace.auth.providers math byte-arrays
 http multiline ;
 IN: furnace.auth
@@ -121,7 +121,7 @@ $nl
 { $subsection "furnace.auth.providers.db" } ;
 
 ARTICLE: "furnace.auth.features" "Optional authentication features"
-"Vocabularies having names prefixed by " { $code "furnace.auth.features" } "  implement optional features which can be enabled by calling special words. These words define new actions on an authentication realm."
+"Vocabularies having names prefixed by " { $code "furnace.auth.features" } " implement optional features which can be enabled by calling special words. These words define new actions on an authentication realm."
 { $subsection "furnace.auth.features.deactivate-user" }
 { $subsection "furnace.auth.features.edit-profile" }
 { $subsection "furnace.auth.features.recover-password" }
@@ -148,7 +148,7 @@ ARTICLE: "furnace.auth.users" "User profiles"
 "User profile variables have the same restrictions on their values as session variables; see " { $link "furnace.sessions.serialize" } " for a discussion." ;
 
 ARTICLE: "furnace.auth.example" "Furnace authentication example"
-"The " { $vocab-link "webapps.todo" } " vocabulary wraps all of its responders in a protected responder. The " { $slot "description" } " slot is set so that the login page contains the message ``You must log in to view your todo list'':"
+"The " { $vocab-link "webapps.todo" } " vocabulary wraps all of its responders in a protected responder. The " { $slot "description" } " slot is set so that the login page contains the message â€œYou must log in to view your todo listâ€:"
 { $code
     <" <protected>
     "view your todo list" >>description">
index 77be30a2d184d6c39bfb0be0adef97c5bb3cd107..aeaf9e9471a4d1667d4799c63bde32232a2df352 100644 (file)
@@ -27,7 +27,7 @@ SYMBOL: lost-password-from
         over email>> 1array >>to
         [
             "This e-mail was sent by the application server on " % current-host % "\n" %
-            "because somebody, maybe you, clicked on a ``recover password'' link in the\n" %
+            "because somebody, maybe you, clicked on a â€œrecover password†link in the\n" %
             "login form, and requested a new password for the user named ``" %
             over username>> % "''.\n" %
             "\n" %
index 3bcd82a15dbb7b127abb3f414c5131bede3732a5..de7650d9ef2da9accdeb6ce1343084de475f2552 100644 (file)
@@ -5,7 +5,7 @@ furnace.auth.login
 furnace.auth.providers\r
 furnace.auth.providers.db tools.test\r
 namespaces db db.sqlite db.tuples continuations\r
-io.files accessors kernel ;\r
+io.files io.files.temp io.directories accessors kernel ;\r
 \r
 <action> "test" <login-realm> realm set\r
 \r
index 8ab70ded7b1c7d1ae4016d151bbed48e5635cdd2..1c320182bf39c30b2fe6ac2f4dafa3e88b87fdb3 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays kernel combinators assocs
 namespaces sequences splitting words
-fry urls multiline present qualified
+fry urls multiline present
 xml
 xml.data
 xml.entities
@@ -32,7 +32,7 @@ IN: furnace.chloe-tags
     [ [ "/" ?tail drop "/" ] dip present 3append ] when* ;
 
 : a-url ( href rest query value-name -- url )
-    dup [ >r 3drop r> value ] [
+    dup [ [ 3drop ] dip value ] [
         drop
         <url>
             swap parse-query-attr >>query
index 4ad2c8a249b699d518d915d9c3d42d2e75b59c37..2b644ef4229d57137a6094ab944a4470f6262ddb 100644 (file)
@@ -1,5 +1,5 @@
 USING: help.markup help.syntax urls http words kernel
-furnace.sessions furnace.db ;
+furnace.sessions furnace.db words.symbol ;
 IN: furnace.conversations
 
 HELP: <conversations>
index a7ef02b77f545cca678c8f01240b3eb1622b789e..c64356c812e20eecc561cf9d341cf11226c7292e 100644 (file)
@@ -3,7 +3,7 @@ IN: furnace.db
 
 HELP: <db-persistence>
 { $values
-     { "responder" "a responder" } { "db" db }
+     { "responder" "a responder" } { "db" "a database descriptor" }
      { "responder'" db-persistence }
 }
 { $description "Wraps a responder with database persistence support. The responder's " { $link call-responder* } " method will run in a " { $link with-db } " scope." } ;
index ed18e42a4fe8c767aa26d34ffd8eff65dc91a432..d771d1d2d79abb6329f67c839233b9460a357438 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.\r
 ! See http://factorcode.org/license.txt for BSD license.\r
 USING: kernel accessors continuations namespaces destructors\r
-db db.pools io.pools http.server http.server.filters ;\r
+db db.private db.pools io.pools http.server http.server.filters ;\r
 IN: furnace.db\r
 \r
 TUPLE: db-persistence < filter-responder pool ;\r
@@ -12,6 +12,6 @@ TUPLE: db-persistence < filter-responder pool ;
 M: db-persistence call-responder*\r
     [\r
         pool>> [ acquire-connection ] keep\r
-        [ return-connection-later ] [ drop db set ] 2bi\r
+        [ return-connection-later ] [ drop db-connection set ] 2bi\r
     ]\r
     [ call-next-method ] bi ;\r
index fd3671fa1c8ede95f2cd8be8a9750f2f98eeafa0..b70ec0ae57f022fe978655fd929e9fee22b8a9f1 100644 (file)
@@ -10,8 +10,8 @@ HELP: <redirect>
 { $values { "url" url } { "response" response } }
 { $description "Creates a response which redirects the client to the given URL." } ;
 
-HELP: <secure-only> ( responder -- responder' )
-{ $values { "responder" "a responder" } { "responder'" "a responder" } }
+HELP: <secure-only>
+{ $values { "responder" "a responder" } { "secure-only" "a responder" } }
 { $description "Creates a new responder which ensures that the client is connecting via HTTPS before delegating to the underlying responder. If the client is connecting via HTTP, a redirect is sent instead." } ;
 
 HELP: <secure-redirect>
index 959d6b69b81c0ef05161fdf60196dc13b6d2a34e..7a4de18eafe8346f1752522c6a7027e326899f02 100644 (file)
@@ -1,4 +1,6 @@
-USING: help.markup help.syntax io.streams.string quotations strings calendar serialize kernel furnace.db words kernel ;
+USING: help.markup help.syntax io.streams.string quotations
+strings calendar serialize kernel furnace.db words words.symbol
+kernel ;
 IN: furnace.sessions
 
 HELP: <sessions>
index 907e657125b514e65ba2107003929b1beb24d35c..14cdce3811b908e6ea111dbea459c053c74e3f70 100644 (file)
@@ -2,9 +2,9 @@ IN: furnace.sessions.tests
 USING: tools.test http furnace.sessions furnace.actions\r
 http.server http.server.responses math namespaces make kernel\r
 accessors io.sockets io.servers.connection prettyprint\r
-io.streams.string io.files splitting destructors sequences db\r
-db.tuples db.sqlite continuations urls math.parser furnace\r
-furnace.utilities ;\r
+io.streams.string io.files io.files.temp io.directories\r
+splitting destructors sequences db db.tuples db.sqlite\r
+continuations urls math.parser furnace furnace.utilities ;\r
 \r
 : with-session\r
     [\r
index 94a69ccd0e31259d3c9ce76a656e4d2153364e53..1ce1cd7da1ac9c6b408b6fcafe97856fa3ae8359 100644 (file)
@@ -29,7 +29,7 @@ HELP: feed-entry-date
 HELP: feed-entry-description
 { $values
      { "object" object }
-     { "description" null }
+     { "description" string }
 }
 { $contract "Outputs a feed entry description." } ;
 
index 7f71a131eda164a1103ccc882516bc9380c5b2fe..f84519b9c189769a1d214004296aad3c2c0890d9 100644 (file)
@@ -96,11 +96,7 @@ M: object modify-form drop ;
     dup method>> {
         { "GET" [ url>> query>> ] }
         { "HEAD" [ url>> query>> ] }
-        { "POST" [
-            post-data>>
-            dup content-type>> "application/x-www-form-urlencoded" =
-            [ content>> ] [ drop f ] if
-        ] }
+        { "POST" [ post-data>> params>> ] }
     } case ;
 
 : referrer ( -- referrer/f )
index 3979e0518a413a2a50cb5b04956db2d3b2b9dd80..a676be3be8eb430fea0d8e95033310d9a99d70e8 100644 (file)
@@ -229,8 +229,9 @@ HELP: napply
 { $examples\r
   "Some core words expressed in terms of " { $link napply } ":"\r
     { $table\r
-        { { $link bi@ } { $snippet "1 napply" } }\r
-        { { $link tri@ } { $snippet "2 napply" } }\r
+        { { $link call } { $snippet "1 napply" } }\r
+        { { $link bi@ } { $snippet "2 napply" } }\r
+        { { $link tri@ } { $snippet "3 napply" } }\r
     }\r
 } ;\r
 \r
@@ -258,6 +259,55 @@ HELP: mnswap
     }\r
 } ;\r
 \r
+HELP: n*quot\r
+{ $values\r
+     { "n" integer } { "seq" sequence }\r
+     { "seq'" sequence }\r
+}\r
+{ $examples\r
+    { $example "USING: generalizations prettyprint math ;"\r
+               "3 [ + ] n*quot ."\r
+               "[ + + + ]"\r
+    }\r
+}\r
+{ $description "Construct a quotation containing the contents of " { $snippet "seq" } " repeated " { $snippet "n"} " times." } ;\r
+\r
+HELP: nappend\r
+{ $values\r
+     { "n" integer }\r
+     { "seq" sequence }\r
+}\r
+{ $description "Outputs a new sequence consisting of the elements of the top " { $snippet "n" } " sequences from the datastack in turn." }\r
+{ $errors "Throws an error if any of the sequences contain elements that are not permitted in the sequence type of the first sequence." }\r
+{ $examples\r
+    { $example "USING: generalizations prettyprint math ;"\r
+               "{ 1 2 } { 3 4 } { 5 6 } { 7 8 } 4 nappend ."\r
+               "{ 1 2 3 4 5 6 7 8 }"\r
+    }\r
+} ;\r
+\r
+HELP: nappend-as\r
+{ $values\r
+     { "n" integer } { "exemplar" sequence }\r
+     { "seq" sequence }\r
+}\r
+{ $description "Outputs a new sequence of type " { $snippet "exemplar" } " consisting of the elements of the top " { $snippet "n" } " sequences from the datastack in turn." }\r
+{ $errors "Throws an error if any of the sequences contain elements that are not permitted in the sequence type of the first sequence." }\r
+{ $examples\r
+    { $example "USING: generalizations prettyprint math ;"\r
+               "{ 1 2 } { 3 4 } { 5 6 } { 7 8 } 4 V{ } nappend-as ."\r
+               "V{ 1 2 3 4 5 6 7 8 }"\r
+    }\r
+} ;\r
+\r
+{ nappend nappend-as } related-words\r
+\r
+HELP: ntuck\r
+{ $values\r
+     { "n" integer }\r
+}\r
+{ $description "A generalization of " { $link tuck } " that can work for any stack depth. The top item will be copied and placed " { $snippet "n" } " items down on the stack." } ;\r
+\r
 ARTICLE: "generalizations" "Generalized shuffle words and combinators"\r
 "The " { $vocab-link "generalizations" } " vocabulary defines a number of stack shuffling words and combinators for use in "\r
 "macros where the arity of the input quotations depends on an "\r
@@ -267,6 +317,8 @@ $nl
 { $subsection narray }\r
 { $subsection nsequence }\r
 { $subsection firstn }\r
+{ $subsection nappend }\r
+{ $subsection nappend-as }\r
 "Generated stack shuffle operations:"\r
 { $subsection ndup }\r
 { $subsection npick }\r
@@ -274,6 +326,7 @@ $nl
 { $subsection -nrot }\r
 { $subsection nnip }\r
 { $subsection ndrop }\r
+{ $subsection ntuck }\r
 { $subsection nrev }\r
 { $subsection mnswap }\r
 "Generalized combinators:"\r
index 1291012700c608f78529ed097e73c1867810880b..35e02f08b4c8a16544164bec1240f17d3a0b5885 100644 (file)
@@ -1,10 +1,11 @@
-USING: tools.test generalizations kernel math arrays sequences ;\r
+USING: tools.test generalizations kernel math arrays sequences ascii ;\r
 IN: generalizations.tests\r
 \r
 { 1 2 3 4 1 } [ 1 2 3 4 4 npick ] unit-test\r
 { 1 2 3 4 2 } [ 1 2 3 4 3 npick ] unit-test\r
 { 1 2 3 4 3 } [ 1 2 3 4 2 npick ] unit-test\r
 { 1 2 3 4 4 } [ 1 2 3 4 1 npick ] unit-test\r
+\r
 [ 1 1 ndup ] must-infer\r
 { 1 1 } [ 1 1 ndup ] unit-test\r
 { 1 2 1 2 } [ 1 2 2 ndup ] unit-test\r
@@ -22,12 +23,16 @@ IN: generalizations.tests
 { 4 } [ 1 2 3 4 3 nnip ] unit-test\r
 [ 1 2 3 4 4 ndrop ] must-infer\r
 { 0 } [ 0 1 2 3 4 4 ndrop ] unit-test\r
+[ [ 1 ] 5 ndip ] must-infer\r
+[ 1 2 3 4 ] [ 2 3 4 [ 1 ] 3 ndip ] unit-test\r
 \r
 [ [ 99 ] 1 2 3 4 5 5 nslip ] must-infer\r
 { 99 1 2 3 4 5 } [ [ 99 ] 1 2 3 4 5 5 nslip ] unit-test\r
 [ 1 2 3 4 5 [ drop drop drop drop drop 2 ] 5 nkeep ] must-infer\r
 { 2 1 2 3 4 5 } [ 1 2 3 4 5 [ drop drop drop drop drop 2 ] 5 nkeep ] unit-test\r
 [ [ 1 2 3 + ] ] [ 1 2 3 [ + ] 3 ncurry ] unit-test\r
+\r
+[ "HELLO" ] [ "hello" [ >upper ] 1 napply ] unit-test\r
 [ { 1 2 } { 2 4 } { 3 8 } { 4 16 } { 5 32 } ] [ 1 2 3 4 5 [ dup 2^ 2array ] 5 napply ] unit-test\r
 [ [ dup 2^ 2array ] 5 napply ] must-infer\r
 \r
@@ -42,3 +47,9 @@ IN: generalizations.tests
 [ 4 5 1 2 3 ] [ 1 2 3 4 5 2 3 mnswap ] unit-test\r
 \r
 [ 1 2 3 4 5 6 ] [ 1 2 3 4 5 6 2 4 mnswap 4 2 mnswap ] unit-test\r
+\r
+[ { 1 2 3 4 } ] [ { 1 } { 2 } { 3 } { 4 } 4 nappend ] unit-test\r
+[ V{ 1 2 3 4 } ] [ { 1 } { 2 } { 3 } { 4 } 4 V{ } nappend-as ] unit-test\r
+\r
+[ 4 nappend ] must-infer\r
+[ 4 { } nappend-as ] must-infer\r
index ae7437b346b8cd23795da57944a525856ee58862..c6a17df0997b4b0f3e17ea90704d4721773ec4b4 100644 (file)
@@ -2,7 +2,7 @@
 ! Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel sequences sequences.private math math.ranges
-combinators macros quotations fry ;
+combinators macros quotations fry macros locals ;
 IN: generalizations
 
 <<
@@ -73,10 +73,13 @@ MACRO: ncleave ( quots n -- )
     [ '[ _ '[ _ _ nkeep ] ] map [ ] join ] [ '[ _ ndrop ] ] bi
     compose ;
 
-MACRO: napply ( n -- )
-    2 [a,b]
-    [ [ 1- ] [ ] bi '[ _ ntuck _ nslip ] ]
-    map concat >quotation [ call ] append ;
+MACRO: napply ( quot n -- )
+    swap <repetition> spread>quot ;
 
 MACRO: mnswap ( m n -- )
     1+ '[ _ -nrot ] <repetition> spread>quot ;
+
+: nappend-as ( n exemplar -- seq )
+    [ narray concat ] dip like ; inline
+
+: nappend ( n -- seq ) narray concat ; inline
index 3b3a98eabd17b470045a12b5477fd3c2d055de92..e4ad97abd0c7a3a33c3f157d5ee0f25ee432284b 100644 (file)
@@ -20,17 +20,21 @@ ARTICLE: "grouping" "Groups and clumps"
         { $unchecked-example "dup n groups concat sequence= ." "t" }
     }
     { "With clumps, collecting the first element of each subsequence but the last one, together with the last subseqence, yields the original sequence:"
-        { $unchecked-example "dup n clumps unclip-last >r [ first ] map r> append sequence= ." "t" }
+        { $unchecked-example "dup n clumps unclip-last [ [ first ] map ] dip append sequence= ." "t" }
     }
-} ;
+}
+"A combinator built using clumps:"
+{ $subsection monotonic? }
+"Testing how elements are related:"
+{ $subsection all-eq? }
+{ $subsection all-equal? } ;
 
 ABOUT: "grouping"
 
 HELP: groups
 { $class-description "Instances are virtual sequences whose elements are disjoint fixed-length subsequences of an underlying sequence. Groups are mutable and resizable if the underlying sequence is mutable and resizable, respectively."
 $nl
-"New groups are created by calling " { $link <groups> } " and " { $link <sliced-groups> } "." }
-{ $see-also group } ;
+"New groups are created by calling " { $link <groups> } " and " { $link <sliced-groups> } "." } ;
 
 HELP: group
 { $values { "seq" "a sequence" } { "n" "a non-negative integer" } { "array" "a sequence of sequences" } }
@@ -48,11 +52,16 @@ HELP: <groups>
         "USING: arrays kernel prettyprint sequences grouping ;"
         "9 >array 3 <groups> dup reverse-here concat >array ." "{ 6 7 8 3 4 5 0 1 2 }"
     }
+    { $example
+        "USING: kernel prettyprint sequences grouping ;"
+        "{ 1 2 3 4 5 6 } 3 <groups> first ."
+        "{ 1 2 3 }"
+    }
 } ;
 
 HELP: <sliced-groups>
 { $values { "seq" "a sequence" } { "n" "a non-negative integer" } { "groups" groups } }
-{ $description "Outputs a virtual sequence whose elements are overlapping subsequences of " { $snippet "n" } " elements from the underlying sequence." }
+{ $description "Outputs a virtual sequence whose elements are slices of disjoint subsequences of " { $snippet "n" } " elements from the underlying sequence." }
 { $examples
     { $example
         "USING: arrays kernel prettyprint sequences grouping ;"
@@ -60,6 +69,11 @@ HELP: <sliced-groups>
         "dup [ reverse-here ] each concat >array ."
         "{ 2 1 0 5 4 3 8 7 6 }"
     }
+    { $example
+        "USING: kernel prettyprint sequences grouping ;"
+        "{ 1 2 3 4 5 6 } 3 <sliced-groups> second ."
+        "T{ slice { from 3 } { to 6 } { seq { 1 2 3 4 5 6 } } }"
+    }
 } ;
 
 HELP: clumps
@@ -89,11 +103,23 @@ HELP: <clumps>
         "share-price 4 <clumps> [ [ sum ] [ length ] bi / ] map ."
         "{ 113/400 167/400 201/400 241/400 243/400 91/200 1/4 }"
     }
+    { $example
+        "USING: kernel sequences grouping prettyprint ;"
+        "{ 1 2 3 4 5 6 } 3 <clumps> second ."
+        "{ 2 3 4 }"
+    }
 } ;
 
 HELP: <sliced-clumps>
 { $values { "seq" "a sequence" } { "n" "a non-negative integer" } { "clumps" clumps } }
-{ $description "Outputs a virtual sequence whose elements are overlapping slices of " { $snippet "n" } " elements from the underlying sequence." } ;
+{ $description "Outputs a virtual sequence whose elements are overlapping slices of " { $snippet "n" } " elements from the underlying sequence." }
+{ $examples
+    { $example
+        "USING: kernel sequences grouping prettyprint ;"
+        "{ 1 2 3 4 5 6 } 3 <sliced-clumps> second ."
+        "T{ slice { from 1 } { to 4 } { seq { 1 2 3 4 5 6 } } }"
+    }
+} ;
 
 { clumps groups } related-words
 
@@ -102,3 +128,23 @@ HELP: <sliced-clumps>
 { <clumps> <groups> } related-words
 
 { <sliced-clumps> <sliced-groups> } related-words
+
+HELP: monotonic?
+{ $values { "seq" sequence } { "quot" { $quotation "( elt elt -- ? )" } } { "?" "a boolean" } }
+{ $description "Applies the relation to successive pairs of elements in the sequence, testing for a truth value. The relation should be a transitive relation, such as a total order or an equality relation." }
+{ $examples
+    "Testing if a sequence is non-decreasing:"
+    { $example "USING: grouping math prettyprint ;" "{ 1 1 2 } [ <= ] monotonic? ." "t" }
+    "Testing if a sequence is decreasing:"
+    { $example "USING: grouping math prettyprint ;" "{ 9 8 6 7 } [ < ] monotonic? ." "f" }
+} ;
+
+HELP: all-equal?
+{ $values { "seq" sequence } { "?" "a boolean" } }
+{ $description "Tests if all elements in the sequence are equal. Yields true with an empty sequence." } ;
+
+HELP: all-eq?
+{ $values { "seq" sequence } { "?" "a boolean" } }
+{ $description "Tests if all elements in the sequence are the same identical object. Yields true with an empty sequence." } ;
+
+{ monotonic? all-eq? all-equal? } related-words
index cfcc65377610431c8de32ae2347b3317039bfbe9..c91e5a56d683ab83e274c66ecd7246f75450a4e4 100644 (file)
@@ -1,4 +1,5 @@
-USING: grouping tools.test kernel sequences arrays ;
+USING: grouping tools.test kernel sequences arrays
+math ;
 IN: grouping.tests
 
 [ { 1 2 3 } 0 group ] must-fail
@@ -12,3 +13,11 @@ IN: grouping.tests
 ] unit-test
 
 [ { { 1 2 } { 2 3 } } ] [ { 1 2 3 } 2 <sliced-clumps> [ >array ] map ] unit-test
+
+[ f ] [ [ { } { } "Hello" ] all-equal? ] unit-test
+[ f ] [ [ { 2 } { } { } ] all-equal? ] unit-test
+[ t ] [ [ ] all-equal? ] unit-test
+[ t ] [ [ 1234 ] all-equal? ] unit-test
+[ f ] [ [ 1.0 1 1 ] all-equal? ] unit-test
+[ t ] [ { 1 2 3 4 } [ < ] monotonic? ] unit-test
+[ f ] [ { 1 2 3 4 } [ > ] monotonic? ] unit-test
index 0fa20b41fc43b63918a6c20cc0892625bfbb11b2..ec13e3a75083fe3e34c42c59d3e5e71007d75d4c 100644 (file)
@@ -1,14 +1,15 @@
-! Copyright (C) 2005, 2008 Slava Pestov.
+! Copyright (C) 2005, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel math math.order strings arrays vectors sequences
-sequences.private accessors ;
+sequences.private accessors fry ;
 IN: grouping
 
 <PRIVATE
 
 TUPLE: chunking-seq { seq read-only } { n read-only } ;
 
-: check-groups dup 0 <= [ "Invalid group count" throw ] when ; inline
+: check-groups ( n -- n )
+    dup 0 <= [ "Invalid group count" throw ] when ; inline
 
 : new-groups ( seq n class -- groups )
     [ check-groups ] dip boa ; inline
@@ -86,3 +87,17 @@ INSTANCE: sliced-clumps slice-chunking
 : group ( seq n -- array ) <groups> { } like ;
 
 : clump ( seq n -- array ) <clumps> { } like ;
+
+: monotonic? ( seq quot -- ? )
+    over length 2 < [ 2drop t ] [
+        over length 2 = [
+            [ first2-unsafe ] dip call
+        ] [
+            [ 2 <sliced-clumps> ] dip
+            '[ first2-unsafe @ ] all?
+        ] if
+    ] if ; inline
+
+: all-equal? ( seq -- ? ) [ = ] monotonic? ;
+
+: all-eq? ( seq -- ? ) [ eq? ] monotonic? ;
\ No newline at end of file
index e28eb3007a4e148bebb82a5a9f3f8297cdf351c1..7e780cbe5ef674cf56b22a4aef1335d362306143 100644 (file)
@@ -32,10 +32,8 @@ IN: heaps.tests
 
 : random-alist ( n -- alist )
     [
-        [
-            32 random-bits dup number>string swap set
-        ] times
-    ] H{ } make-assoc ;
+        drop 32 random-bits dup number>string
+    ] H{ } map>assoc ;
 
 : test-heap-sort ( n -- ? )
     random-alist dup >alist sort-keys swap heap-sort = ;
@@ -61,7 +59,7 @@ IN: heaps.tests
         random-alist
         <min-heap> [ heap-push-all ] keep
         dup data>> clone swap
-    ] keep 3 /i [ 2dup >r delete-random r> heap-delete ] times
+    ] keep 3 /i [ 2dup [ delete-random ] dip heap-delete ] times
     data>>
     [ [ key>> ] map ] bi@
     [ natural-sort ] bi@ ;
index ba95a9f249d201ba841cb53c7ee5029bf07f62a0..aa1ebf77865cca0dc8f05a2bebbc2986156ddace 100644 (file)
@@ -87,7 +87,8 @@ M: heap heap-size ( heap -- n )
 
 GENERIC: heap-compare ( pair1 pair2 heap -- ? )
 
-: (heap-compare) drop [ key>> ] compare ; inline
+: (heap-compare) ( pair1 pair2 heap -- <=> )
+    drop [ key>> ] compare ; inline
 
 M: min-heap heap-compare (heap-compare) +gt+ eq? ;
 
index e72fbb439c125baeb80edb1d09303c890c097bed..ebc711d5273ca13b4ef4211b7dc0ef7561eac5d3 100644 (file)
@@ -100,14 +100,12 @@ $nl
 { $code "10 [ \"Factor rocks!\" print ] times" }
 "Now we can look at a new data type, the array:"
 { $code "{ 1 2 3 }" }
-"An array looks like a quotation except it cannot be evaluated; it simply stores data."
+"An array differs from a quotation in that it cannot be evaluated; it simply stores data."
 $nl
 "You can perform an operation on each element of an array:"
 { $example
     "{ 1 2 3 } [ \"The number is \" write . ] each"
-    "The number is 1"
-    "The number is 2"
-    "The number is 3"
+    "The number is 1\nThe number is 2\nThe number is 3"
 }
 "You can transform each element, collecting the results in a new array:"
 { $example "{ 5 12 0 -12 -5 } [ sq ] map ." "{ 25 144 0 144 25 }" }
@@ -269,8 +267,8 @@ $nl
 { $heading "Example: ls" }
 "Here is an example implementing a simplified version of the Unix " { $snippet "ls" } " command in Factor:"
 { $code
-    <" USING: command-line namespaces io io.files tools.files
-sequences kernel ;
+    <" USING: command-line namespaces io io.files
+io.pathnames tools.files sequences kernel ;
 
 command-line get [
     current-directory get directory.
@@ -360,7 +358,7 @@ ARTICLE: "cookbook-pitfalls" "Pitfalls to avoid"
 { $list
     "Factor only makes use of one native thread, and Factor threads are scheduled co-operatively. C library calls block the entire VM."
     "Factor does not hide anything from the programmer, all internals are exposed. It is your responsibility to avoid writing fragile code which depends too much on implementation detail."
-    { "When a source file uses two vocabularies which define words with the same name, the order of the vocabularies in the " { $link POSTPONE: USE: } " or " { $link POSTPONE: USING: } " forms is important. The parser prints warnings when vocabularies shadow words from other vocabularies; see " { $link "vocabulary-search-shadow" } ". The " { $vocab-link "qualified" } " vocabulary implements qualified naming, which can be used to resolve ambiguities." }
+    { "When a source file uses two vocabularies which define words with the same name, the order of the vocabularies in the " { $link POSTPONE: USE: } " or " { $link POSTPONE: USING: } " forms is important. The " { $link POSTPONE: QUALIFIED: } " word implements qualified naming, which can be used to resolve ambiguities." }
     { "If a literal object appears in a word definition, the object itself is pushed on the stack when the word executes, not a copy. If you intend to mutate this object, you must " { $link clone } " it first. See " { $link "syntax-literals" } "." }
     { "For a discussion of potential issues surrounding the " { $link f } " object, see " { $link "booleans" } "." }
     { "Factor's object system is quite flexible. Careless usage of union, mixin and predicate classes can lead to similar problems to those caused by ``multiple inheritance'' in other languages. In particular, it is possible to have two classes such that they have a non-empty intersection and yet neither is a subclass of the other. If a generic word defines methods on two such classes, various disambiguation rules are applied to ensure method dispatch remains deterministic, however they may not be what you expect. See " { $link "method-order" } " for details." }
index cc36e9faab9f27b7949407dca6a907b54d7977e1..39b5a13e30c19335092d97e04c58fc4668fd260c 100644 (file)
@@ -162,12 +162,18 @@ ARTICLE: "encodings-introduction" "An introduction to encodings"
 { $code "\"file.txt\" utf16 file-contents" }
 "Encoding descriptors are also used by " { $link "io.streams.byte-array" } " and taken by combinators like " { $link with-file-writer } " and " { $link with-byte-reader } " which deal with streams. It is " { $emphasis "not" } " used with " { $link "io.streams.string" } " because these deal with abstract text."
 $nl
-"When the " { $link binary } " encoding is used, a " { $link byte-array } " is expected for writing and returned for reading, since the stream deals with bytes. All other encodings deal with strings, since they are used to represent text." ;
+"When the " { $link binary } " encoding is used, a " { $link byte-array } " is expected for writing and returned for reading, since the stream deals with bytes. All other encodings deal with strings, since they are used to represent text."
+{ $see-also "stream-elements" } ;
 
 ARTICLE: "io" "Input and output"
 { $heading "Streams" }
 { $subsection "streams" }
 { $subsection "io.files" }
+{ $heading "The file system" }
+{ $subsection "io.pathnames" }
+{ $subsection "io.files.info" }
+{ $subsection "io.files.links" }
+{ $subsection "io.directories" }
 { $heading "Encodings" }
 { $subsection "encodings-introduction" }
 { $subsection "io.encodings" }
@@ -178,7 +184,7 @@ ARTICLE: "io" "Input and output"
 { $subsection "io.streams.byte-array" }
 { $heading "Utilities" }
 { $subsection "stream-binary" }
-{ $subsection "styles" }
+{ $subsection "io.styles" }
 { $subsection "checksums" }
 { $heading "Implementation" }
 { $subsection "io.streams.c" }
@@ -204,7 +210,8 @@ ARTICLE: "tools" "Developer tools"
 { $subsection "timing" }
 { $subsection "tools.disassembler" }
 "Deployment tools:"
-{ $subsection "tools.deploy" } ;
+{ $subsection "tools.deploy" }
+{ $see-also "ui-tools" } ;
 
 ARTICLE: "article-index" "Article index"
 { $index [ articles get keys ] } ;
index 4a06235c691507ca669e3e1c29c3671773f0b5b9..6b77f656c0d4235a07fefa0ec947ae1b34bd148e 100644 (file)
@@ -36,6 +36,7 @@ ARTICLE: "block-elements" "Block elements"
 "Elements used in " { $link $values } " forms:"
 { $subsection $instance }
 { $subsection $maybe }
+{ $subsection $or }
 { $subsection $quotation }
 "Boilerplate paragraphs:"
 { $subsection $low-level-note }
@@ -88,6 +89,12 @@ $nl
     { "an array of markup elements," }
     { "or an array of the form " { $snippet "{ $directive content... }" } ", where " { $snippet "$directive" } " is a markup word whose name starts with " { $snippet "$" } ", and " { $snippet "content..." } " is a series of markup elements" }
 }
+"Here is a more formal schema for the help markup language:"
+{ $code
+"<element> ::== <string> | <simple-element> | <fancy-element>"
+"<simple-element> ::== { <element>* }"
+"<fancy-element> ::== { <type> <element> }"
+}
 { $subsection "element-types" }
 { $subsection "printing-elements" }
 "Related words can be cross-referenced:"
@@ -119,7 +126,7 @@ ARTICLE: "help" "Help system"
 "The help system maintains documentation written in a simple markup language, along with cross-referencing and search. Documentation can either exist as free-standing " { $emphasis "articles" } " or be associated with words."
 { $subsection "browsing-help" }
 { $subsection "writing-help" }
-{ $vocab-subsection "Help lint tool" "help.lint" }
+{ $subsection "help.lint" }
 { $subsection "help-impl" } ;
 
 IN: help
@@ -327,7 +334,7 @@ HELP: $table
 
 HELP: $values
 { $values { "element" "an array of pairs of markup elements" } }
-{ $description "Prints the description of arguments and values found on every word help page. The first element of a pair is the argument name and is output with " { $link $snippet } ". The remainder is either a single class word, or an element. If it is a class word " { $snippet "class" } ", it is intereted as if it were shorthand for " { $snippet "{ $instance class }" } "." }
+{ $description "Prints the description of arguments and values found on every word help page. The first element of a pair is the argument name and is output with " { $link $snippet } ". The remainder is either a single class word, or an element. If it is a class word " { $snippet "class" } ", it is inserted as if it were shorthand for " { $snippet "{ $instance class }" } "." }
 { $see-also $maybe $instance $quotation } ;
 
 HELP: $instance
index e38f2fc15d7b13af947be4005cbef0e28b2495c4..e09127835977c3e1ad57387c26f2ffa5582b092b 100644 (file)
@@ -3,3 +3,4 @@ USING: tools.test help kernel ;
 
 [ 3 throw ] must-fail
 [ ] [ :help ] unit-test
+[ ] [ f print-topic ] unit-test
\ No newline at end of file
index 5d12438e0d4b1bdf459c0e94b1e4c29355ea295c..272bdc1db3696891947e38f8d0d80cc2857e609a 100644 (file)
@@ -1,10 +1,11 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays io io.styles kernel namespaces make
-parser prettyprint sequences words assocs definitions generic
-quotations effects slots continuations classes.tuple debugger
-combinators vocabs help.stylesheet help.topics help.crossref
-help.markup sorting classes vocabs.loader ;
+parser prettyprint sequences words words.symbol assocs
+definitions generic quotations effects slots continuations
+classes.tuple debugger combinators vocabs help.stylesheet
+help.topics help.crossref help.markup sorting classes
+vocabs.loader ;
 IN: help
 
 GENERIC: word-help* ( word -- content )
@@ -111,6 +112,7 @@ M: word set-article-parent swap "help-parent" set-word-prop ;
     ] with-style nl ;
 
 : print-topic ( topic -- )
+    >link
     last-element off dup $title
     article-content print-content nl ;
 
index a9df0bea811e49a37f554a217db98d8d387e8cdf..ec52264643e52a76a73812ef55cb1cf76f5c1955 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: io.encodings.utf8 io.encodings.ascii io.encodings.binary
-io.files html.streams html.elements help kernel
+io.files io.files.temp io.directories html.streams html.elements help kernel
 assocs sequences make words accessors arrays help.topics vocabs
 tools.vocabs tools.vocabs.browser namespaces prettyprint io
 vocabs.loader serialize fry memoize unicode.case math.order
index fbebc7f0f6b0661bc35f649f51425c9c7dbf2442..30d5ef49df24258e074fe50e3dab2cc0cd839111 100644 (file)
@@ -1,25 +1,29 @@
-! Copyright (C) 2006, 2008 Slava Pestov.
+! Copyright (C) 2006, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: fry accessors sequences parser kernel help help.markup
 help.topics words strings classes tools.vocabs namespaces make
 io io.streams.string prettyprint definitions arrays vectors
 combinators combinators.short-circuit splitting debugger
 hashtables sorting effects vocabs vocabs.loader assocs editors
-continuations classes.predicate macros math sets eval ;
+continuations classes.predicate macros math sets eval
+vocabs.parser words.symbol values grouping unicode.categories
+sequences.deep ;
 IN: help.lint
 
+SYMBOL: vocabs-quot
+
 : check-example ( element -- )
-    rest [
-        but-last "\n" join 1vector
-        [
-            use [ clone ] change
-            [ eval>string ] with-datastack
-        ] with-scope peek "\n" ?tail drop
-    ] keep
-    peek assert= ;
+    [
+        rest [
+            but-last "\n" join 1vector
+            [ (eval>string) ] with-datastack
+            peek "\n" ?tail drop
+        ] keep
+        peek assert=
+    ] vocabs-quot get call ;
 
-: check-examples ( word element -- )
-    nip \ $example swap elements [ check-example ] each ;
+: check-examples ( element -- )
+    \ $example swap elements [ check-example ] each ;
 
 : extract-values ( element -- seq )
     \ $values swap elements dup empty? [
@@ -41,25 +45,40 @@ IN: help.lint
         $error-description
     } swap '[ _ elements empty? not ] contains? ;
 
+: don't-check-word? ( word -- ? )
+    {
+        [ macro? ]
+        [ symbol? ]
+        [ value-word? ]
+        [ parsing-word? ]
+        [ "declared-effect" word-prop not ]
+    } 1|| ;
+
 : check-values ( word element -- )
     {
-        [ drop "declared-effect" word-prop not ]
-        [ nip contains-funky-elements? ]
-        [ drop macro? ]
         [
-            [ effect-values >array ]
-            [ extract-values >array ]
-            bi* =
+            [ don't-check-word? ]
+            [ contains-funky-elements? ]
+            bi* or
+        ] [
+            [ effect-values ]
+            [ extract-values ]
+            bi* sequence=
         ]
     } 2|| [ "$values don't match stack effect" throw ] unless ;
 
-: check-see-also ( word element -- )
-    nip \ $see-also swap elements [
+: check-nulls ( element -- )
+    \ $values swap elements
+    null swap deep-member?
+    [ "$values should not contain null" throw ] when ;
+
+: check-see-also ( element -- )
+    \ $see-also swap elements [
         rest dup prune [ length ] bi@ assert=
     ] each ;
 
 : vocab-exists? ( name -- ? )
-    dup vocab swap "all-vocabs" get member? or ;
+    [ vocab ] [ "all-vocabs" get member? ] bi or ;
 
 : check-modules ( element -- )
     \ $vocab-link swap elements [
@@ -68,43 +87,78 @@ IN: help.lint
     ] each ;
 
 : check-rendering ( element -- )
-    [ print-topic ] with-string-writer drop ;
+    [ print-content ] with-string-writer drop ;
+
+: check-strings ( str -- )
+    [
+        "\n\t" intersects?
+        [ "Paragraph text should not contain \\n or \\t" throw ] when
+    ] [
+        "  " swap subseq?
+        [ "Paragraph text should not contain double spaces" throw ] when
+    ] bi ;
+
+: check-whitespace ( str1 str2 -- )
+    [ " " tail? ] [ " " head? ] bi* or
+    [ "Missing whitespace between strings" throw ] unless ;
+
+: check-bogus-nl ( element -- )
+    { { $nl } { { $nl } } } [ head? ] with contains?
+    [ "Simple element should not begin with a paragraph break" throw ] when ;
+
+: check-elements ( element -- )
+    {
+        [ check-bogus-nl ]
+        [ [ string? ] filter [ check-strings ] each ]
+        [ [ simple-element? ] filter [ check-elements ] each ]
+        [ 2 <clumps> [ [ string? ] all? ] filter [ first2 check-whitespace ] each ]
+    } cleave ;
+
+: check-markup ( element -- )
+    {
+        [ check-elements ]
+        [ check-rendering ]
+        [ check-examples ]
+        [ check-modules ]
+    } cleave ;
 
 : all-word-help ( words -- seq )
     [ word-help ] filter ;
 
-TUPLE: help-error topic error ;
+TUPLE: help-error error topic ;
 
 C: <help-error> help-error
 
 M: help-error error.
-    "In " write dup topic>> pprint nl
-    error>> error. ;
+    [ "In " write topic>> pprint nl ]
+    [ error>> error. ]
+    bi ;
 
 : check-something ( obj quot -- )
-    flush [ <help-error> , ] recover ; inline
+    flush '[ _ assert-depth ] swap '[ _ <help-error> , ] recover ; inline
 
 : check-word ( word -- )
+    [ with-file-vocabs ] vocabs-quot set
     dup word-help [
-        [
-            dup word-help '[
-                _ _ {
-                    [ check-examples ]
-                    [ check-values ]
-                    [ check-see-also ]
-                    [ [ check-rendering ] [ check-modules ] bi* ]
-                } 2cleave
-            ] assert-depth
+        dup '[
+            _ dup word-help
+            [ check-values ]
+            [ nip [ check-nulls ] [ check-see-also ] [ check-markup ] tri ] 2bi
         ] check-something
     ] [ drop ] if ;
 
 : check-words ( words -- ) [ check-word ] each ;
 
+: check-article-title ( article -- )
+    article-title first LETTER?
+    [ "Article title must begin with a capital letter" throw ] unless ;
+
 : check-article ( article -- )
-    [
-        dup article-content
-        '[ _ check-rendering _ check-modules ]
-        assert-depth
+    [ with-interactive-vocabs ] vocabs-quot set
+    dup '[
+        _
+        [ check-article-title ]
+        [ article-content check-markup ] bi
     ] check-something ;
 
 : files>vocabs ( -- assoc )
@@ -124,7 +178,7 @@ M: help-error error.
     ] keep ;
 
 : check-about ( vocab -- )
-    [ vocab-help [ article drop ] when* ] check-something ;
+    dup '[ _ vocab-help [ article drop ] when* ] check-something ;
 
 : check-vocab ( vocab -- seq )
     "Checking " write dup write "..." print
index b9ec34a831314da1827b5a40bcddff964aa601e4..0d8aa53d442fe7a549392a9449b8c5d46c5d70f6 100644 (file)
@@ -1,5 +1,6 @@
 USING: definitions help help.markup kernel sequences tools.test
-words parser namespaces assocs generic io.streams.string accessors ;
+words parser namespaces assocs generic io.streams.string accessors
+strings math ;
 IN: help.markup.tests
 
 TUPLE: blahblah quux ;
@@ -15,3 +16,12 @@ TUPLE: blahblah quux ;
 [ ] [ \ fooey print-topic ] unit-test
 
 [ ] [ gensym print-topic ] unit-test
+
+[ "a string" ]
+[ [ { $or string } print-element ] with-string-writer ] unit-test
+
+[ "a string or an integer" ]
+[ [ { $or string integer } print-element ] with-string-writer ] unit-test
+
+[ "a string, a fixnum, or an integer" ]
+[ [ { $or string fixnum integer } print-element ] with-string-writer ] unit-test
index a7501dc242615256f9d926c04a7930e7d4ecfc08..2fd8d55d10a4976c1404e5e94081df959973459d 100644 (file)
@@ -1,20 +1,12 @@
-! Copyright (C) 2005, 2008 Slava Pestov.
+! Copyright (C) 2005, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays definitions generic io kernel assocs
 hashtables namespaces make parser prettyprint sequences strings
 io.styles vectors words math sorting splitting classes slots
-vocabs help.stylesheet help.topics vocabs.loader alias
-quotations ;
+vocabs help.stylesheet help.topics vocabs.loader quotations
+combinators ;
 IN: help.markup
 
-! Simple markup language.
-
-! <element> ::== <string> | <simple-element> | <fancy-element>
-! <simple-element> ::== { <element>* }
-! <fancy-element> ::== { <type> <element> }
-
-! Element types are words whose name begins with $.
-
 PREDICATE: simple-element < array
     [ t ] [ first word? not ] if-empty ;
 
@@ -251,8 +243,21 @@ M: f ($instance)
 
 : $instance ( element -- ) first ($instance) ;
 
+: $or ( element -- )
+    dup length {
+        { 1 [ first ($instance) ] }
+        { 2 [ first2 [ ($instance) " or " print-element ] [ ($instance) ] bi* ] }
+        [
+            drop
+            unclip-last
+            [ [ ($instance) ", " print-element ] each ]
+            [ "or " print-element ($instance) ]
+            bi*
+        ]
+    } case ;
+
 : $maybe ( element -- )
-    $instance " or " print-element { f } $instance ;
+    f suffix $or ;
 
 : $quotation ( element -- )
     { "a " { $link quotation } " with stack effect " } print-element
index 9a372174ba581d4f371111a56dfcfd3f79319f82..9f98ba6d8d607949dcef701a3a758ef9d74a5fbd 100644 (file)
@@ -1,7 +1,8 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays kernel parser sequences words help
-help.topics namespaces vocabs definitions compiler.units ;
+help.topics namespaces vocabs definitions compiler.units
+vocabs.parser ;
 IN: help.syntax
 
 : HELP:
index 9ed36ac77cbf453e53c7c9ad930b23e4ca686894..efb1e0a0f75c0dfb93ef924488299e2fe0551e02 100644 (file)
@@ -30,7 +30,7 @@ ARTICLE: "first-program-logic" "Writing some logic in your first program"
     "! See http://factorcode.org/license.txt for BSD license."
     "IN: palindrome"
 }
-"We will now write our first word using " { $link POSTPONE: : } ". This word will test if a string is a palindrome; it will take a string as input, and give back a  boolean as output. We will call this word " { $snippet "palindrome?" } ", following a naming convention that words returning booleans have names ending with " { $snippet "?" } "."
+"We will now write our first word using " { $link POSTPONE: : } ". This word will test if a string is a palindrome; it will take a string as input, and give back a boolean as output. We will call this word " { $snippet "palindrome?" } ", following a naming convention that words returning booleans have names ending with " { $snippet "?" } "."
 $nl
 "Recall that a string is a palindrome if it is spelled the same forwards or backwards; that is, if the string is equal to its reverse. We can express this in Factor as follows:"
 { $code ": palindrome? ( string -- ? ) dup reverse = ;" }
@@ -94,7 +94,7 @@ $nl
 "For example, we'd like it to identify the following as a palindrome:"
 { $code "\"A man, a plan, a canal: Panama.\"" }
 "However, right now, the simplistic algorithm we use says this is not a palindrome:"
-{ $example "\"A man, a plan, a canal: Panama.\" palindrome?" "f" }
+{ $unchecked-example "\"A man, a plan, a canal: Panama.\" palindrome?" "f" }
 "We would like it to output " { $link t } " there. We can encode this requirement with a unit test that we add to " { $snippet "palindrome-tests.factor" } ":"
 { $code "[ t ] [ \"A man, a plan, a canal: Panama.\" palindrome? ] unit-test" }
 "If you now run unit tests, you will see a unit test failure:"
@@ -106,12 +106,12 @@ $nl
 "Start by pushing a character on the stack; notice that characters are really just integers:"
 { $code "CHAR: a" }
 "Now, use the " { $link Letter? } " word to test if it is an alphabetical character, upper or lower case:"
-{ $example "Letter? ." "t" }
+{ $unchecked-example "Letter? ." "t" }
 "This gives the expected result."
 $nl
 "Now try with a non-alphabetical character:"
 { $code "CHAR: #" }
-{ $example "Letter? ." "f" }
+{ $unchecked-example "Letter? ." "f" }
 "What we want to do is given a string, remove all characters which do not match the " { $link Letter? } " predicate. Let's push a string on the stack:"
 { $code "\"A man, a plan, a canal: Panama.\"" }
 "Now, place a quotation containing " { $link Letter? } " on the stack; quoting code places it on the stack instead of executing it immediately:"
index 240acf74b1fa073672d34158b5f30fbe3f555402..b6af773ce523389cb13e2c041617ba8762f32726 100644 (file)
@@ -3,7 +3,8 @@
 USING: parser words definitions kernel sequences assocs arrays
 kernel.private fry combinators accessors vectors strings sbufs
 byte-arrays byte-vectors io.binary io.streams.string splitting
-math generic generic.standard generic.standard.engines classes ;
+math generic generic.standard generic.standard.engines classes
+hashtables ;
 IN: hints
 
 GENERIC: specializer-predicate ( spec -- quot )
@@ -50,14 +51,10 @@ M: object specializer-declaration class ;
     ] [ drop f ] if ;
 
 : specialized-def ( word -- quot )
-    dup def>> swap {
-        {
-            [ dup "specializer" word-prop ]
-            [ "specializer" word-prop specialize-quot ]
-        }
-        { [ dup standard-method? ] [ specialize-method ] }
-        [ drop ]
-    } cond ;
+    [ def>> ] keep
+    [ dup standard-method? [ specialize-method ] [ drop ] if ]
+    [ "specializer" word-prop [ specialize-quot ] when* ]
+    bi ;
 
 : specialized-length ( specializer -- n )
     dup [ array? ] all? [ first ] when length ;
@@ -120,3 +117,7 @@ M: object specializer-declaration class ;
 \ >le { { fixnum fixnum } { bignum fixnum } } "specializer" set-word-prop
 
 \ >be { { bignum fixnum } { fixnum fixnum } } "specializer" set-word-prop
+
+\ hashtable \ at* method { { fixnum hashtable } { word hashtable } } "specializer" set-word-prop
+
+\ hashtable \ set-at method { { object fixnum object } { object word object } } "specializer" set-word-prop
index d131cc3e030e0b2f4e5cf9ff4f3e0910098414d3..39c17a4708895ed01c4bab4c30767bb36156ba68 100644 (file)
@@ -70,8 +70,8 @@ HELP: render
 { $description "Renders an HTML component to the " { $link output-stream } "." } ;
 
 HELP: render*
-{ $values { "value" "a value" } { "name" "a value name" } { "renderer" "a component renderer" } }
-{ $contract "Renders an HTML component to the " { $link output-stream } "." } ;
+{ $values { "value" "a value" } { "name" "a value name" } { "renderer" "a component renderer" } { "xml" "an XML chunk" } }
+{ $contract "Renders an HTML component, outputting an XHTML snippet." } ;
 
 ARTICLE: "html.components" "HTML components"
 "The " { $vocab-link "html.components" } " vocabulary provides various HTML form components."
index b4247e6e30574e6a7fcaf086043914b133db9d51..09bb5860ade889e67892042d65756b9ad8fc978d 100644 (file)
@@ -31,7 +31,7 @@ TUPLE: color red green blue ;
     ] with-string-writer
 ] unit-test
 
-[ "<input type='hidden' name='red' value='<jimmy>'/>" ] [
+[ "<input value=\"&lt;jimmy>\" name=\"red\" type=\"hidden\"/>" ] [
     [
         "red" hidden render
     ] with-string-writer
@@ -39,13 +39,13 @@ TUPLE: color red green blue ;
 
 [ ] [ "'jimmy'" "red" set-value ] unit-test
 
-[ "<input type='text' size='5' name='red' value='&apos;jimmy&apos;'/>" ] [
+[ "<input value=\"&apos;jimmy&apos;\" name=\"red\" size=\"5\" type=\"text\"/>" ] [
     [
         "red" <field> 5 >>size render
     ] with-string-writer
 ] unit-test
 
-[ "<input type='password' size='5' name='red' value=''/>" ] [
+[ "<input value=\"\" name=\"red\" size=\"5\" type=\"password\"/>" ] [
     [
         "red" <password> 5 >>size render
     ] with-string-writer
@@ -105,7 +105,7 @@ TUPLE: color red green blue ;
 
 [ ] [ t "delivery" set-value ] unit-test
 
-[ "<input type='checkbox' name='delivery' checked='true'>Delivery</input>" ] [
+[ "<input type=\"checkbox\" checked=\"true\" name=\"delivery\">Delivery</input>" ] [
     [
         "delivery"
         <checkbox>
@@ -116,7 +116,7 @@ TUPLE: color red green blue ;
 
 [ ] [ f "delivery" set-value ] unit-test
 
-[ "<input type='checkbox' name='delivery'>Delivery</input>" ] [
+[ "<input type=\"checkbox\" name=\"delivery\">Delivery</input>" ] [
     [
         "delivery"
         <checkbox>
@@ -133,7 +133,7 @@ M: link-test link-href drop "http://www.apple.com/foo&bar" ;
 
 [ ] [ link-test "link" set-value ] unit-test
 
-[ "<a href='http://www.apple.com/foo&amp;bar'>&lt;Link Title&gt;</a>" ] [
+[ "<a href=\"http://www.apple.com/foo&amp;bar\">&lt;Link Title&gt;</a>" ] [
     [ "link" link new render ] with-string-writer
 ] unit-test
 
@@ -149,7 +149,7 @@ M: link-test link-href drop "http://www.apple.com/foo&bar" ;
 
 [ ] [ "java" "mode" set-value ] unit-test
 
-[ "<span class='KEYWORD3'>int</span> x <span class='OPERATOR'>=</span> <span class='DIGIT'>4</span>;\n" ] [
+[ "<span class=\"KEYWORD3\">int</span> x <span class=\"OPERATOR\">=</span> <span class=\"DIGIT\">4</span>;" ] [
     [ "code" <code> "mode" >>mode render ] with-string-writer
 ] unit-test
 
@@ -163,6 +163,8 @@ M: link-test link-href drop "http://www.apple.com/foo&bar" ;
 
 [ t ] [
     [ "object" inspector render ] with-string-writer
+    USING: splitting sequences ;
+    "\"" split "'" join ! replace " with ' for now
     [ "object" value [ describe ] with-html-writer ] with-string-writer
     =
 ] unit-test
index 6f35ba5d975bd21af143347af6c39345422b3dbc..462c9b3c789dc48ac81bcec1a62e89437bb26de5 100644 (file)
@@ -3,13 +3,13 @@
 USING: accessors kernel namespaces io math.parser assocs classes
 classes.tuple words arrays sequences splitting mirrors
 hashtables combinators continuations math strings inspector
-fry locals calendar calendar.format xml.entities
-validators urls present
-xmode.code2html lcs.diff2html farkup
+fry locals calendar calendar.format xml.entities xml.data
+validators urls present xml.writer xml.interpolate xml
+xmode.code2html lcs.diff2html farkup io.streams.string
 html.elements html.streams html.forms ;
 IN: html.components
 
-GENERIC: render* ( value name renderer -- )
+GENERIC: render* ( value name renderer -- xml )
 
 : render ( name renderer -- )
     prepare-value
@@ -19,38 +19,36 @@ GENERIC: render* ( value name renderer -- )
         [ f swap ]
         if
     ] 2dip
-    render*
+    render* write-xml
     [ render-error ] when* ;
 
 <PRIVATE
 
-: render-input ( value name type -- )
-    <input =type =name present =value input/> ;
+: render-input ( value name type -- xml )
+    [XML <input value=<-> name=<-> type=<->/> XML] ;
 
 PRIVATE>
 
 SINGLETON: label
 
-M: label render* 2drop present escape-string write ;
+M: label render*
+    2drop present ;
 
 SINGLETON: hidden
 
-M: hidden render* drop "hidden" render-input ;
+M: hidden render*
+    drop "hidden" render-input ;
 
-: render-field ( value name size type -- )
-    <input
-        =type
-        [ present =size ] when*
-        =name
-        present =value
-    input/> ;
+: render-field ( value name size type -- xml )
+    [XML <input value=<-> name=<-> size=<-> type=<->/> XML] ;
 
 TUPLE: field size ;
 
 : <field> ( -- field )
     field new ;
 
-M: field render* size>> "text" render-field ;
+M: field render*
+    size>> "text" render-field ;
 
 TUPLE: password size ;
 
@@ -67,14 +65,15 @@ TUPLE: textarea rows cols ;
 : <textarea> ( -- renderer )
     textarea new ;
 
-M: textarea render*
-    <textarea
-        [ rows>> [ present =rows ] when* ]
-        [ cols>> [ present =cols ] when* ] bi
-        =name
-    textarea>
-        present escape-string write
-    </textarea> ;
+M:: textarea render* ( value name area -- xml )
+    area rows>> :> rows
+    area cols>> :> cols
+    [XML
+         <textarea
+            name=<-name->
+            rows=<-rows->
+            cols=<-cols->><-value-></textarea>
+    XML] ;
 
 ! Choice
 TUPLE: choice size multiple choices ;
@@ -82,24 +81,23 @@ TUPLE: choice size multiple choices ;
 : <choice> ( -- choice )
     choice new ;
 
-: render-option ( text selected? -- )
-    <option [ "selected" =selected ] when option>
-        present escape-string write
-    </option> ;
-
-: render-options ( options selected -- )
-    '[ dup _ member? render-option ] each ;
-
-M: choice render*
-    <select
-        swap =name
-        dup size>> [ present =size ] when*
-        dup multiple>> [ "true" =multiple ] when
-    select>
-        [ choices>> value ] [ multiple>> ] bi
-        [ swap ] [ swap 1array ] if
-        render-options
-    </select> ;
+: render-option ( text selected? -- xml )
+    "selected" and swap
+    [XML <option selected=<->><-></option> XML] ;
+
+: render-options ( value choice -- xml )
+    [ choices>> value ] [ multiple>> ] bi
+    [ swap ] [ swap 1array ] if
+    '[ dup _ member? render-option ] map ;
+
+M:: choice render* ( value name choice -- xml )
+    choice size>> :> size
+    choice multiple>> "true" and :> multiple
+    value choice render-options :> contents
+    [XML <select
+        name=<-name->
+        size=<-size->
+        multiple=<-multiple->><-contents-></select> XML] ;
 
 ! Checkboxes
 TUPLE: checkbox label ;
@@ -108,13 +106,10 @@ TUPLE: checkbox label ;
     checkbox new ;
 
 M: checkbox render*
-    <input
-        "checkbox" =type
-        swap =name
-        swap [ "true" =checked ] when
-    input>
-        label>> escape-string write
-    </input> ;
+    [ "true" and ] [ ] [ label>> ] tri*
+    [XML <input
+        type="checkbox"
+        checked=<-> name=<->><-></input> XML] ;
 
 ! Link components
 GENERIC: link-title ( obj -- string )
@@ -129,10 +124,9 @@ M: url link-href ;
 TUPLE: link target ;
 
 M: link render*
-    nip
-    <a target>> [ =target ] when* dup link-href =href a>
-        link-title present escape-string write
-    </a> ;
+    nip swap
+    [ target>> ] [ [ link-href ] [ link-title ] bi ] bi*
+    [XML <a target=<-> href=<->><-></a> XML] ;
 
 ! XMode code component
 TUPLE: code mode ;
@@ -161,7 +155,7 @@ M: farkup render*
         nip
         [ no-follow>> [ string>boolean link-no-follow? set ] when* ]
         [ disable-images>> [ string>boolean disable-images? set ] when* ]
-        [ parsed>> string>boolean [ (write-farkup) ] [ write-farkup ] if ]
+        [ parsed>> string>boolean [ (write-farkup) ] [ farkup>xml ] if ]
         tri
     ] with-scope ;
 
@@ -169,7 +163,9 @@ M: farkup render*
 SINGLETON: inspector
 
 M: inspector render*
-    2drop [ describe ] with-html-writer ;
+    2drop [
+        [ describe ] with-html-writer
+    ] with-string-writer <unescaped> ;
 
 ! Diff component
 SINGLETON: comparison
@@ -180,4 +176,4 @@ M: comparison render*
 ! HTML component
 SINGLETON: html
 
-M: html render* 2drop write ;
+M: html render* 2drop <unescaped> ;
index f6e15e46cd57eebec31c74ad6b486b4faf8b71b3..dab937641363ae207e52a9debcf7080c9a604c76 100644 (file)
@@ -14,7 +14,7 @@ $nl
 { $code "<a =href a> \"Click me\" write </a>" }
 { $code "<a \"http://\" prepend =href a> \"click\" write </a>" }
 { $code "<a [ \"http://\" % % ] \"\" make =href a> \"click\" write </a>" }
-"Tags that have no ``closing'' equivalent have a trailing " { $snippet "tag/>" } " form:"
+"Tags that have no â€œclosing†equivalent have a trailing " { $snippet "tag/>" } " form:"
 { $code "<input \"text\" =type \"name\" =name 20 =size input/>" }
 "For the full list of HTML tags and attributes, consult the word list for the " { $vocab-link "html.elements" } " vocabulary. In addition to HTML tag and attribute words, a few utilities are provided."
 $nl
index 2149bf7bf68cafd6d8157b6cd26675bd2f2dd774..a6e1928f83282986ff65f557f13dad35487207a1 100644 (file)
@@ -1,11 +1,9 @@
-! cont-html v0.6
-!
-! Copyright (C) 2004 Chris Double.
+! Copyright (C) 2004, 2009 Chris Double, Daniel Ehrenberg.
 ! See http://factorcode.org/license.txt for BSD license.
-
-USING: io kernel namespaces prettyprint quotations
+USING: io io.styles kernel namespaces prettyprint quotations
 sequences strings words xml.entities compiler.units effects
-urls math math.parser combinators present fry ;
+xml.data xml.interpolate urls math math.parser combinators
+present fry io.streams.string xml.writer ;
 
 IN: html.elements
 
@@ -135,17 +133,18 @@ SYMBOL: html
     "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">" write-html ;
 
 : simple-page ( title head-quot body-quot -- )
-    #! Call the quotation, with all output going to the
-    #! body of an html page with the given title.
-    spin
-    xhtml-preamble
-    <html "http://www.w3.org/1999/xhtml" =xmlns "en" =xml:lang "en" =lang html>
-        <head>
-            <title> write </title>
-            call
-        </head>
-        <body> call </body>
-    </html> ; inline
+    [ with-string-writer <unescaped> ] bi@
+    <XML
+        <?xml version="1.0"?>
+        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+            <head>
+                <title><-></title>
+                <->
+            </head>
+            <body><-></body>
+        </html>
+    XML> write-xml ; inline
 
 : render-error ( message -- )
-    <span "error" =class span> escape-string write </span> ;
+    [XML <span class="error"><-></span> XML] write-xml ;
index 1f2975bce1923ce0b40ea940d367b8a277a3a918..f6408d3b5917e82ac2f9da0a9daeae9b3b0316f2 100644 (file)
@@ -4,8 +4,8 @@ html.templates html.templates.chloe.syntax
 html.templates.chloe.compiler html.templates.chloe.components
 math xml.data strings quotations namespaces ;
 
-HELP: <chloe> ( path -- template )
-{ $values { "path" "a pathname string without the trailing " { $snippet ".xml" } " extension" } { "template" chloe } }
+HELP: <chloe>
+{ $values { "path" "a pathname string without the trailing " { $snippet ".xml" } " extension" } { "chloe" chloe } }
 { $description "Creates a new Chloe template object which can be passed to " { $link call-template } "." } ;
 
 HELP: required-attr
index 5114b4088adf95d0286a4df4a679901e5a181713..19b67f70188edff234d7bd7af4bbd085e0c0ce86 100644 (file)
@@ -1,7 +1,8 @@
 USING: html.templates html.templates.chloe
 tools.test io.streams.string kernel sequences ascii boxes
 namespaces xml html.components html.forms
-splitting unicode.categories furnace accessors ;
+splitting unicode.categories furnace accessors
+html.templates.chloe.compiler ;
 IN: html.templates.chloe.tests
 
 : run-template
@@ -158,8 +159,14 @@ TUPLE: person first-name last-name ;
     "true" "b" set-value
 ] unit-test
 
-[ "<input type='checkbox' name='a'>a</input><input type='checkbox' name='b' checked='true'>b</input>" ] [
+[ "<input type=\"checkbox\" name=\"a\">a</input><input type=\"checkbox\" checked=\"true\" name=\"b\">b</input>" ] [
     [
         "test12" test-template call-template
     ] run-template
 ] unit-test
+
+[
+    [
+        "test13" test-template call-template
+    ] run-template
+] [ error>> T{ unknown-chloe-tag f "this-tag-does-not-exist" } = ] must-fail-with
index 73cc239a56de12a63b391214a042e514c2c3e07b..c3c1ec2b9e29172f966eb9693565705f43b84be5 100644 (file)
@@ -2,9 +2,9 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors kernel sequences combinators kernel fry
 namespaces make classes.tuple assocs splitting words arrays io
-io.files io.encodings.utf8 io.streams.string unicode.case
-mirrors math urls present multiline quotations xml logging
-continuations
+io.files io.files.info io.encodings.utf8 io.streams.string
+unicode.case mirrors math urls present multiline quotations xml
+logging continuations
 xml.data
 html.forms
 html.elements
index d4f34ab8aa969ef9ad8bb8ac0b395389b6113dad..4034b67d45a26fd91441cb3877627f547209cd37 100644 (file)
@@ -7,16 +7,16 @@ html.templates html.templates.chloe.syntax continuations ;
 IN: html.templates.chloe.compiler
 
 : chloe-attrs-only ( assoc -- assoc' )
-    [ drop url>> chloe-ns = ] assoc-filter ;
+    [ drop chloe-name? ] assoc-filter ;
 
 : non-chloe-attrs-only ( assoc -- assoc' )
-    [ drop url>> chloe-ns = not ] assoc-filter ;
+    [ drop chloe-name? not ] assoc-filter ;
 
 : chloe-tag? ( tag -- ? )
     dup xml? [ body>> ] when
     {
         { [ dup tag? not ] [ f ] }
-        { [ dup url>> chloe-ns = not ] [ f ] }
+        { [ dup chloe-name? not ] [ f ] }
         [ t ]
     } cond nip ;
 
@@ -59,7 +59,7 @@ DEFER: compile-element
 
 : compile-start-tag ( tag -- )
     "<" [write]
-    [ name>string [write] ] [ compile-attrs ] bi
+    [ name>string [write] ] [ attrs>> compile-attrs ] bi
     ">" [write] ;
 
 : compile-end-tag ( tag -- )
@@ -76,10 +76,13 @@ DEFER: compile-element
         [ drop tag-stack get pop* ]
     } cleave ;
 
+ERROR: unknown-chloe-tag tag ;
+
 : compile-chloe-tag ( tag -- )
-    ! "Unknown chloe tag: " prepend throw
     dup main>> dup tags get at
-    [ curry assert-depth ] [ 2drop ] ?if ;
+    [ curry assert-depth ]
+    [ unknown-chloe-tag ]
+    ?if ;
 
 : compile-element ( element -- )
     {
@@ -87,7 +90,7 @@ DEFER: compile-element
         { [ dup [ tag? ] [ xml? ] bi or ] [ compile-tag ] }
         { [ dup string? ] [ escape-string [write] ] }
         { [ dup comment? ] [ drop ] }
-        [ [ write-xml-chunk ] [code-with] ]
+        [ [ write-xml ] [code-with] ]
     } cond ;
 
 : with-compiler ( quot -- quot' )
@@ -123,7 +126,7 @@ DEFER: compile-element
 
 : compile-prologue ( xml -- )
     [
-        [ prolog>> [ write-prolog ] [code-with] ]
+        [ prolog>> [ write-xml ] [code-with] ]
         [ before>> compile-chunk ]
         bi
     ] compile-quot
index 90c171917bab0eec227a3a4d9bde90782ed30930..fb457ff1df4d0b74e0ddb0b0f15dbc46f80b9a92 100644 (file)
@@ -21,14 +21,14 @@ tags global [ H{ } clone or ] change-at
 
 : chloe-ns "http://factorcode.org/chloe/1.0" ; inline
 
-: chloe-name ( string -- name )
-    name new
-        swap >>main
-        chloe-ns >>url ;
+: chloe-name? ( name -- ? )
+    url>> chloe-ns = ;
+
+XML-NS: chloe-name http://factorcode.org/chloe/1.0
 
 : required-attr ( tag name -- value )
-    dup chloe-name rot at*
-    [ nip ] [ drop " attribute is required" append throw ] if ;
+    tuck chloe-name attr
+    [ nip ] [ " attribute is required" append throw ] if* ;
 
 : optional-attr ( tag name -- value )
-    chloe-name swap at ;
+    chloe-name attr ;
diff --git a/basis/html/templates/chloe/test/test13.xml b/basis/html/templates/chloe/test/test13.xml
new file mode 100644 (file)
index 0000000..adf5daf
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version='1.0' ?>
+
+<t:chloe xmlns:t="http://factorcode.org/chloe/1.0">
+
+  <t:this-tag-does-not-exist />
+
+</t:chloe>
index c302a581abec2774dce146a043fa893835f03caf..e775651cbca6c9c0979394ab089d46988421c606 100644 (file)
@@ -1,7 +1,7 @@
 IN: html.templates.fhtml
 USING: help.markup help.syntax ;
 
-HELP: <fhtml> ( path -- fhtml )
+HELP: <fhtml>
 { $values { "path" "a pathname string" } { "fhtml" fhtml } }
 { $description "Creates an FHTML template descriptor." } ;
 
index 7742ff9bc6369aa303ae48fe2545f929fc5963d7..992b6600704e61eeead4472f4166e255febfa98e 100644 (file)
@@ -3,7 +3,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: continuations sequences kernel namespaces debugger
 combinators math quotations generic strings splitting
-accessors assocs fry
+accessors assocs fry vocabs.parser
 parser lexer io io.files io.streams.string io.encodings.utf8
 html.elements
 html.templates ;
index 7a35ba812b351c72d66f0d4b38783c0d76c97c4b..9a8aa48738a9dce78e672dff676b7d9d8fdb5869 100644 (file)
@@ -1,6 +1,6 @@
-USING: http help.markup help.syntax io.files io.streams.string
+USING: http help.markup help.syntax io.pathnames io.streams.string
 io.encodings.8-bit io.encodings.binary kernel strings urls
-urls.encoding byte-arrays strings assocs sequences ;
+urls.encoding byte-arrays strings assocs sequences destructors ;
 IN: http.client
 
 HELP: download-failed
@@ -36,7 +36,12 @@ HELP: http-get
 
 HELP: http-post
 { $values { "post-data" object } { "url" "a " { $link url } " or " { $link string } } { "response" response } { "data" sequence } }
-{ $description "Submits a form at a URL." }
+{ $description "Submits an HTTP POST request." }
+{ $errors "Throws an error if the HTTP request fails." } ;
+
+HELP: http-put
+{ $values { "post-data" object } { "url" "a " { $link url } " or " { $link string } } { "response" response } { "data" sequence } }
+{ $description "Submits an HTTP PUT request." }
 { $errors "Throws an error if the HTTP request fails." } ;
 
 HELP: with-http-get
@@ -67,17 +72,36 @@ ARTICLE: "http.client.get" "GET requests with the HTTP client"
 { $subsection with-http-get }
 { $subsection with-http-request } ;
 
-ARTICLE: "http.client.post" "POST requests with the HTTP client"
-"As with GET requests, there is a high-level word which takes a " { $link url } " and a lower-level word which constructs an HTTP request object which can be passed to " { $link http-request } ":"
-{ $subsection http-post }
-{ $subsection <post-request> }
-"Both words take a post data parameter, which can be one of the following:"
+ARTICLE: "http.client.post-data" "HTTP client submission data"
+"HTTP POST and PUT request words take a post data parameter, which can be one of the following:"
 { $list
-    { "a " { $link byte-array } " or " { $link string } " is sent the server without further encoding" }
-    { "an " { $link assoc } " is interpreted as a series of form parameters, which are encoded with " { $link assoc>query } }
+    { "a " { $link byte-array } ": the data is sent the server without further encoding" }
+    { "a " { $link string } ": the data is encoded and then sent as a series of bytes" }
+    { "an " { $link assoc } ": the assoc is interpreted as a series of form parameters, which are encoded with " { $link assoc>query } }
+    { "an input stream: the contents of the input stream are transmitted to the server without being read entirely into memory - this is useful for large requests" }
     { { $link f } " denotes that there is no post data" }
+    { "a " { $link post-data } " tuple, for additional control" }
+}
+"When passing a stream, you must ensure the stream is closed afterwards. The best way is to use " { $link with-disposal } " or " { $link "destructors" } ". For example,"
+{ $code
+  "\"my-large-post-request.txt\" ascii <file-reader>"
+  "[ URL\" http://www.my-company.com/web-service\" http-post ] with-disposal"
 } ;
 
+ARTICLE: "http.client.post" "POST requests with the HTTP client"
+"Basic usage involves passing post data and a " { $link url } ", and getting a " { $link response } " and data back:"
+{ $subsection http-post }
+"Advanced usage involves constructing a " { $link request } ", which allows " { $link "http.cookies" } " and " { $link "http.headers" } " to be set:"
+{ $subsection <post-request> }
+"Both words take a post data parameter; see " { $link "http.client.post-data" } "." ;
+
+ARTICLE: "http.client.put" "PUT requests with the HTTP client"
+"Basic usage involves passing post data and a " { $link url } ", and getting a " { $link response } " and data back:"
+{ $subsection http-post }
+"Advanced usage involves constructing a " { $link request } ", which allows " { $link "http.cookies" } " and " { $link "http.headers" } " to be set:"
+{ $subsection <post-request> }
+"Both words take a post data parameter; see " { $link "http.client.post-data" } "." ;
+
 ARTICLE: "http.client.encoding" "Character encodings and the HTTP client"
 "The " { $link http-request } ", " { $link http-get } " and " { $link http-post } " words output a sequence containing data that was sent by the server."
 $nl
@@ -95,11 +119,14 @@ ARTICLE: "http.client.errors" "HTTP client errors"
 ARTICLE: "http.client" "HTTP client"
 "The " { $vocab-link "http.client" } " vocabulary implements an HTTP and HTTPS client on top of " { $link "http" } "."
 $nl
-"For HTTPS support, you must load the " { $vocab-link "urls.secure" } " vocab first. If you don't load it, HTTPS will not load and images generated by " { $vocab-link "tools.deploy" } " will be smaller as a result."
+"For HTTPS support, you must load the " { $vocab-link "urls.secure" } " vocab first. If you don't need HTTPS support, don't load " { $vocab-link "urls.secure" } "; this will reduce the size of images generated by " { $vocab-link "tools.deploy" } "."
 $nl
 "There are two primary usage patterns, data retrieval with GET requests and form submission with POST requests:"
 { $subsection "http.client.get" }
 { $subsection "http.client.post" }
+{ $subsection "http.client.put" }
+"Submission data for POST and PUT requests:"
+{ $subsection "http.client.post-data" }
 "More esoteric use-cases, for example HTTP methods other than the above, are accomodated by constructing an empty request object with " { $link <request> } " and filling everything in by hand."
 { $subsection "http.client.encoding" }
 { $subsection "http.client.errors" }
index 9c56411290ab4c7b4b9647658958838747a2199d..d4d09789121241135a07db213c626402286db432 100644 (file)
@@ -1,20 +1,21 @@
-! Copyright (C) 2005, 2008 Slava Pestov.
+! Copyright (C) 2005, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors assocs kernel math math.parser namespaces make
-sequences io io.sockets io.streams.string io.files io.timeouts
-strings splitting calendar continuations accessors vectors
+sequences strings splitting calendar continuations accessors vectors
 math.order hashtables byte-arrays destructors
-io.encodings
-io.encodings.string
-io.encodings.ascii
-io.encodings.utf8
-io.encodings.8-bit
-io.encodings.binary
-io.streams.duplex
-fry ascii urls urls.encoding present
-http http.parsers ;
+io io.sockets io.streams.string io.files io.timeouts
+io.pathnames io.encodings io.encodings.string io.encodings.ascii
+io.encodings.utf8 io.encodings.8-bit io.encodings.binary io.crlf
+io.streams.duplex fry ascii urls urls.encoding present
+http http.parsers http.client.post-data ;
 IN: http.client
 
+ERROR: too-many-redirects ;
+
+CONSTANT: max-redirects 10
+
+<PRIVATE
+
 : write-request-line ( request -- request )
     dup
     [ method>> write bl ]
@@ -26,36 +27,19 @@ IN: http.client
     [ host>> ] [ port>> ] bi dup "http" protocol-port =
     [ drop ] [ ":" swap number>string 3append ] if ;
 
+: set-host-header ( request header -- request header )
+    over url>> url-host "host" pick set-at ;
+
+: set-cookie-header ( header cookies -- header )
+    unparse-cookie "cookie" pick set-at ;
+
 : write-request-header ( request -- request )
     dup header>> >hashtable
-    over url>> host>> [ over url>> url-host "host" pick set-at ] when
-    over post-data>> [
-        [ raw>> length "content-length" pick set-at ]
-        [ content-type>> "content-type" pick set-at ]
-        bi
-    ] when*
-    over cookies>> [ unparse-cookie "cookie" pick set-at ] unless-empty
+    over url>> host>> [ set-host-header ] when
+    over post-data>> [ set-post-data-headers ] when*
+    over cookies>> [ set-cookie-header ] unless-empty
     write-header ;
 
-GENERIC: >post-data ( object -- post-data )
-
-M: post-data >post-data ;
-
-M: string >post-data utf8 encode "application/octet-stream" <post-data> ;
-
-M: byte-array >post-data "application/octet-stream" <post-data> ;
-
-M: assoc >post-data assoc>query ascii encode "application/x-www-form-urlencoded" <post-data> ;
-
-M: f >post-data ;
-
-: unparse-post-data ( request -- request )
-    [ >post-data ] change-post-data ;
-
-: write-post-data ( request -- request )
-    dup method>> [ "POST" = ] [ "PUT" = ] bi or
-    [ dup post-data>> [ raw>> write ] when* ] when ; 
-
 : write-request ( request -- )
     unparse-post-data
     write-request-line
@@ -83,17 +67,7 @@ M: f >post-data ;
     read-response-line
     read-response-header ;
 
-: max-redirects 10 ;
-
-ERROR: too-many-redirects ;
-
-M: too-many-redirects summary
-    drop
-    [ "Redirection limit of " % max-redirects # " exceeded" % ] "" make ;
-
-DEFER: with-http-request
-
-<PRIVATE
+DEFER: (with-http-request)
 
 SYMBOL: redirects
 
@@ -122,15 +96,10 @@ SYMBOL: redirects
         read-crlf B{ } assert= read-chunked
     ] if ; inline recursive
 
-: read-unchunked ( quot: ( chunk -- ) -- )
-    8192 read-partial dup [
-        [ swap call ] [ drop read-unchunked ] 2bi
-    ] [ 2drop ] if ; inline recursive
-
 : read-response-body ( quot response -- )
     binary decode-input
     "transfer-encoding" header "chunked" =
-    [ read-chunked ] [ read-unchunked ] if ; inline
+    [ read-chunked ] [ each-block ] if ; inline
 
 : <request-socket> ( -- stream )
     request get url>> url-addr ascii <client> drop
@@ -160,6 +129,13 @@ PRIVATE>
         [ do-redirect ] [ nip ] if
     ] with-variable ; inline recursive
 
+: <client-request> ( url method -- request )
+    <request>
+        swap >>method
+        swap >url ensure-port >>url ; inline
+
+PRIVATE>
+
 : success? ( code -- ? ) 200 299 between? ;
 
 ERROR: download-failed response data ;
@@ -171,8 +147,8 @@ M: download-failed error.
 : check-response* ( response data -- response data )
     over code>> success? [ download-failed ] unless ;
 
-: check-response ( response -- response )
-    f check-response* drop ;
+: with-http-request ( request quot -- response )
+    [ (with-http-request) check-response ] with-destructors ; inline
 
 : http-request ( request -- response data )
     [ [ % ] with-http-request ] B{ } make
@@ -185,7 +161,7 @@ M: download-failed error.
     <client-request> swap >>post-data ;
 
 : <get-request> ( url -- request )
-    <client-request> "GET" >>method ;
+    "GET" <client-request> ;
 
 : http-get ( url -- response data )
     <get-request> http-request ;
@@ -215,15 +191,17 @@ M: download-failed error.
     dup download-name download-to ;
 
 : <post-request> ( post-data url -- request )
-    <client-data-request> "POST" >>method ;
+    "POST" <client-request>
+        swap >>post-data ;
 
 : http-post ( post-data url -- response data )
     <post-request> http-request ;
 
-: <put-request> ( data url -- request )
-    <client-data-request> "PUT" >>method ;
+: <put-request> ( post-data url -- request )
+    "PUT" <client-request>
+        swap >>post-data ;
 
-: http-put ( data url -- response data )
+: http-put ( post-data url -- response data )
     <put-request> http-request ;
 
 USING: vocabs vocabs.loader ;
diff --git a/basis/http/client/post-data/authors.txt b/basis/http/client/post-data/authors.txt
new file mode 100644 (file)
index 0000000..d4f5d6b
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
\ No newline at end of file
diff --git a/basis/http/client/post-data/post-data-tests.factor b/basis/http/client/post-data/post-data-tests.factor
new file mode 100644 (file)
index 0000000..2704ce1
--- /dev/null
@@ -0,0 +1,4 @@
+! Copyright (C) 2009 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: tools.test http.client.post-data ;
+IN: http.client.post-data.tests
diff --git a/basis/http/client/post-data/post-data.factor b/basis/http/client/post-data/post-data.factor
new file mode 100644 (file)
index 0000000..b7551d8
--- /dev/null
@@ -0,0 +1,91 @@
+! Copyright (C) 2009 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors assocs destructors http io io.encodings.ascii
+io.encodings.binary io.encodings.string io.encodings.utf8
+io.files io.files.info io.pathnames kernel math.parser
+namespaces sequences strings urls.encoding ;
+IN: http.client.post-data
+
+TUPLE: measured-stream stream size ;
+
+C: <measured-stream> measured-stream
+
+<PRIVATE
+
+GENERIC: (set-post-data-headers) ( header data -- header )
+
+M: sequence (set-post-data-headers)
+    length "content-length" pick set-at ;
+
+M: measured-stream (set-post-data-headers)
+    size>> "content-length" pick set-at ;
+
+M: object (set-post-data-headers)
+    drop "chunked" "transfer-encoding" pick set-at ;
+
+PRIVATE>
+
+: set-post-data-headers ( header post-data -- header )
+    [ data>> (set-post-data-headers) ]
+    [ content-type>> "content-type" pick set-at ] bi ;
+
+<PRIVATE
+
+GENERIC: (write-post-data) ( data -- )
+
+M: sequence (write-post-data) write ;
+
+M: measured-stream (write-post-data)
+    stream>> [ [ write ] each-block ] with-input-stream ;
+
+: write-chunk ( chunk -- )
+    [ length >hex ";\r\n" append ascii encode write ] [ write ] bi ;
+
+M: object (write-post-data)
+    [ [ write-chunk ] each-block ] with-input-stream
+    "0;\r\n" ascii encode write ;
+
+GENERIC: >post-data ( object -- post-data )
+
+M: f >post-data ;
+
+M: post-data >post-data ;
+
+M: string >post-data
+    utf8 encode
+    "application/octet-stream" <post-data>
+        swap >>data ;
+
+M: assoc >post-data
+    "application/x-www-form-urlencoded" <post-data>
+        swap >>params ;
+
+M: object >post-data
+    "application/octet-stream" <post-data>
+        swap >>data ;
+
+: pathname>measured-stream ( pathname -- stream )
+    string>>
+    [ binary <file-reader> &dispose ]
+    [ file-info size>> ] bi
+    <measured-stream> ;
+
+: normalize-post-data ( request -- request )
+    dup post-data>> [
+        dup params>> [
+            assoc>query ascii encode >>data
+        ] when*
+        dup data>> pathname? [
+            [ pathname>measured-stream ] change-data
+        ] when
+        drop
+    ] when* ;
+
+PRIVATE>
+
+: unparse-post-data ( request -- request )
+    [ >post-data ] change-post-data
+    normalize-post-data ;
+
+: write-post-data ( request -- request )
+    dup post-data>> [ data>> (write-post-data) ] when* ;
index 6fb5b73fadf24ea0f0a34864834a7a049d1af78f..fc3f65fa5658c962c6c969762aa19f1a014b2e68 100644 (file)
@@ -30,7 +30,7 @@ $nl
 { $table
     { { $slot "version" } { "The HTTP version. Default is " { $snippet "1.1" } " and should not be changed without good reason." } }
     { { $slot "code" } { "HTTP status code, an " { $link integer } ". Examples are 200 for success, 404 for file not found, and so on." } }
-    { { $slot "message" } { "HTTP status message, only displayed to the user. If the status code is 200, the status message might be ``Success'', for example." } }
+    { { $slot "message" } { "HTTP status message, only displayed to the user. If the status code is 200, the status message might be â€œSuccessâ€, for example." } }
     { { $slot "header" } { "An assoc of HTTP header values. See " { $link "http.headers" } } }
     { { $slot "cookies" } { "A sequence of HTTP cookies. See " { $link "http.cookies" } } }
     { { $slot "content-type" } { "an HTTP content type" } }
@@ -49,7 +49,7 @@ $nl
 { $table
     { { $slot "version" } { "The HTTP version. Default is " { $snippet "1.1" } " and should not be changed without good reason." } }
     { { $slot "code" } { "HTTP status code, an " { $link integer } ". Examples are 200 for success, 404 for file not found, and so on." } }
-    { { $slot "message" } { "HTTP status message, only displayed to the user. If the status code is 200, the status message might be ``Success'', for example." } }
+    { { $slot "message" } { "HTTP status message, only displayed to the user. If the status code is 200, the status message might be â€œSuccessâ€, for example." } }
     { { $slot "body" } { "an HTTP response body" } }
 } } ;
 
@@ -90,7 +90,7 @@ HELP: put-cookie
 { $side-effects "request/response" } ;
 
 HELP: <post-data>
-{ $values { "raw" byte-array } { "content-type" "a MIME type string" } { "post-data" post-data } }
+{ $values { "content-type" "a MIME type string" } { "post-data" post-data } }
 { $description "Creates a new " { $link post-data } "." } ;
 
 HELP: header
@@ -110,7 +110,7 @@ $nl
 HELP: set-header
 { $values { "request/response" "a " { $link request } " or a " { $link response } } { "value" object } { "key" string } }
 { $description "Stores a value into the HTTP header of a request or response. The value can be any object supported by " { $link present } "." }
-{ $notes "This word always returns the same object that was input. This allows for a ``pipeline'' coding style, where several header parameters are set in a row." }
+{ $notes "This word always returns the same object that was input. This allows for a â€œpipeline†coding style, where several header parameters are set in a row." }
 { $side-effects "request/response" } ;
 
 ARTICLE: "http.cookies" "HTTP cookies"
index 6e93d5ee3acbab7592cb6a1dea7b824d0c9ddf29..6103fb622f82b2d784cf547da0053bcbfe9a8787 100644 (file)
@@ -1,8 +1,8 @@
-USING: http http.server http.client tools.test multiline
+USING: http http.server http.client http.client.private tools.test multiline
 io.streams.string io.encodings.utf8 io.encodings.8-bit
 io.encodings.binary io.encodings.string kernel arrays splitting
 sequences assocs io.sockets db db.sqlite continuations urls
-hashtables accessors namespaces ;
+hashtables accessors namespaces xml.data ;
 IN: http.tests
 
 [ "text/plain" latin1 ] [ "text/plain" parse-content-type ] unit-test
@@ -35,7 +35,7 @@ blah
         { method "POST" }
         { version "1.1" }
         { header H{ { "some-header" "1; 2" } { "content-length" "4" } { "content-type" "application/octet-stream" } } }
-        { post-data T{ post-data { content "blah" } { raw "blah" } { content-type "application/octet-stream" } } }
+        { post-data T{ post-data { data "blah" } { content-type "application/octet-stream" } } }
         { cookies V{ } }
     }
 ] [
@@ -179,7 +179,7 @@ Set-Cookie: oo="bar; a=b"; comment="your mom"; httponly=yes
 ! Live-fire exercise
 USING: http.server http.server.static furnace.sessions furnace.alloy
 furnace.actions furnace.auth furnace.auth.login furnace.db http.client
-io.servers.connection io.files io io.encodings.ascii
+io.servers.connection io.files io.files.temp io.directories io io.encodings.ascii
 accessors namespaces threads
 http.server.responses http.server.redirection furnace.redirection
 http.server.dispatchers db.tuples ;
@@ -322,7 +322,7 @@ SYMBOL: a
 
 3 a set-global
 
-: test-a string>xml "input" tag-named "value" swap at ;
+: test-a string>xml "input" tag-named "value" attr ;
 
 [ "3" ] [
     "http://localhost/" add-port http-get
old mode 100644 (file)
new mode 100755 (executable)
index bbb0335..cda3460
@@ -6,9 +6,9 @@ quotations arrays byte-arrays math.parser calendar
 calendar.format present urls
 
 io io.encodings io.encodings.iana io.encodings.binary
-io.encodings.8-bit
+io.encodings.8-bit io.crlf
 
-unicode.case unicode.categories qualified
+unicode.case unicode.categories
 
 http.parsers ;
 
@@ -16,12 +16,6 @@ EXCLUDE: fry => , ;
 
 IN: http
 
-: crlf ( -- ) "\r\n" write ;
-
-: read-crlf ( -- bytes )
-    "\r" read-until
-    [ CHAR: \r assert= read1 CHAR: \n assert= ] when* ;
-
 : (read-header) ( -- alist )
     [ read-crlf dup f like ] [ parse-header-line ] [ drop ] produce ;
 
@@ -45,8 +39,8 @@ IN: http
 
 : check-header-string ( str -- str )
     #! http://en.wikipedia.org/wiki/HTTP_Header_Injection
-    dup "\r\n\"" intersect empty?
-    [ "Header injection attack" throw ] unless ;
+    dup "\r\n\"" intersects?
+    [ "Header injection attack" throw ] when ;
 
 : write-header ( assoc -- )
     >alist sort-keys [
@@ -97,8 +91,8 @@ TUPLE: cookie name value version comment path domain expires max-age http-only s
     ] { } make ;
 
 : check-cookie-string ( string -- string' )
-    dup "=;'\"\r\n" intersect empty?
-    [ "Bad cookie name or value" throw ] unless ;
+    dup "=;'\"\r\n" intersects?
+    [ "Bad cookie name or value" throw ] when ;
 
 : unparse-cookie-value ( key value -- )
     {
@@ -213,12 +207,11 @@ body ;
     raw-response new
         "1.1" >>version ;
 
-TUPLE: post-data raw content content-type ;
+TUPLE: post-data data params content-type content-encoding ;
 
-: <post-data> ( raw content-type -- post-data )
+: <post-data> ( content-type -- post-data )
     post-data new
-        swap >>content-type
-        swap >>raw ;
+        swap >>content-type ;
 
 : parse-content-type-attributes ( string -- attributes )
     " " split harvest [ "=" split1 [ >lower ] dip ] { } map>assoc ;
index e618249ff4a56d228ec35f4a9777fbf6cdacae14..a64fe9af3cbfef9f43e7e6f11f31e4fc22a43716 100644 (file)
@@ -1,7 +1,7 @@
-! Copyright (C) 2007, 2008 Slava Pestov.\r
+! Copyright (C) 2007, 2009 Slava Pestov.\r
 ! See http://factorcode.org/license.txt for BSD license.\r
 USING: namespaces kernel assocs io.files io.streams.duplex\r
-combinators arrays io.launcher io.encodings.binary io\r
+combinators arrays io.launcher io.encodings io.encodings.binary io\r
 http.server.static http.server http accessors sequences strings\r
 math.parser fry urls urls.encoding calendar ;\r
 IN: http.server.cgi\r
@@ -34,7 +34,7 @@ IN: http.server.cgi
         request get "accept" header "HTTP_ACCEPT" set\r
 \r
         post-request? [\r
-            request get post-data>> raw>>\r
+            request get post-data>> data>>\r
             [ "CONTENT_TYPE" set ]\r
             [ length number>string "CONTENT_LENGTH" set ]\r
             bi\r
@@ -52,12 +52,15 @@ IN: http.server.cgi
     200 >>code\r
     "CGI output follows" >>message\r
     swap '[\r
+        binary encode-output\r
         _ output-stream get swap <cgi-process> binary <process-stream> [\r
-            post-request? [ request get post-data>> raw>> write flush ] when\r
-            input-stream get swap (stream-copy)\r
+            post-request? [ request get post-data>> data>> write flush ] when\r
+            '[ _ write ] each-block\r
         ] with-stream\r
     ] >>body ;\r
 \r
+SLOT: special\r
+\r
 : enable-cgi ( responder -- responder )\r
     [ serve-cgi ] "application/x-cgi-script"\r
     pick special>> set-at ;\r
index 71842f649144d9031c2761e2c7b7fba273538ca0..e0f7f20e692d5fbaedb82fc187ffc19a92cb2699 100644 (file)
@@ -41,7 +41,7 @@ main-responder set-global">
 }
 "In the above example, visiting any URL other than " { $snippet "/new" } ", " { $snippet "/edit" } ", " { $snippet "/delete" } ", or " { $snippet "/" } " will result in a 404 error."
 { $heading "Another pathname dispatcher" }
-"On the other hand, suppose we wanted to route all unrecognized paths to a ``view'' action:"
+"On the other hand, suppose we wanted to route all unrecognized paths to a â€œview†action:"
 { $code
     <" <dispatcher>
     <new-action> "new" add-responder
index 12183f1b2528da7bea382b9a22a14a943b2eff60..29f61416fa1fd003d4f9d1592b6dd2d520356278 100644 (file)
@@ -4,8 +4,8 @@ IN: http.server
 HELP: trivial-responder
 { $description "The class of trivial responders, which output the same response for every request. New instances are created by calling " { $link <trivial-responder> } "." } ;
 
-HELP: <trivial-responder> ( response -- responder )
-{ $values { "response" response } { "responder" trivial-responder } }
+HELP: <trivial-responder>
+{ $values { "response" response } { "trivial-responder" trivial-responder } }
 { $description "Creates a new trivial responder which outputs the same response for every request." } ;
 
 HELP: benchmark?
old mode 100644 (file)
new mode 100755 (executable)
index 697dec2..a886d7b
@@ -12,9 +12,13 @@ io.encodings.utf8
 io.encodings.ascii
 io.encodings.binary
 io.streams.limited
+io.streams.string
 io.servers.connection
 io.timeouts
+io.crlf
 fry logging logging.insomniac calendar urls urls.encoding
+mime.multipart
+unicode.categories
 http
 http.parsers
 http.server.responses
@@ -24,8 +28,6 @@ html.elements
 html.streams ;
 IN: http.server
 
-\ parse-cookie DEBUG add-input-logging
-
 : check-absolute ( url -- url )
     dup path>> "/" head? [ "Bad request: URL" throw ] unless ; inline
 
@@ -36,17 +38,34 @@ IN: http.server
 : read-request-header ( request -- request )
     read-header >>header ;
 
-: parse-post-data ( post-data -- post-data )
-    [ ] [ raw>> ] [ content-type>> ] tri
-    "application/x-www-form-urlencoded" = [ query>assoc ] when
-    >>content ;
+ERROR: no-boundary ;
+
+: parse-multipart-form-data ( string -- separator )
+    ";" split1 nip
+    "=" split1 nip [ no-boundary ] unless* ;
+
+: read-multipart-data ( request -- mime-parts )
+    [ "content-type" header ]
+    [ "content-length" header string>number ] bi
+    unlimit-input
+    stream-eofs limit-input
+    binary decode-input
+    parse-multipart-form-data parse-multipart ;
+
+: read-content ( request -- bytes )
+    "content-length" header string>number read ;
+
+: parse-content ( request content-type -- post-data )
+    [ <post-data> swap ] keep {
+        { "multipart/form-data" [ read-multipart-data >>params ] }
+        { "application/x-www-form-urlencoded" [ read-content query>assoc >>params ] }
+        [ drop read-content >>data ]
+    } case ;
 
 : read-post-data ( request -- request )
     dup method>> "POST" = [
-        [ ]
-        [ "content-length" header string>number read ]
-        [ "content-type" header ] tri
-        <post-data> parse-post-data >>post-data
+        dup dup "content-type" header
+        ";" split1 drop parse-content >>post-data
     ] when ;
 
 : extract-host ( request -- request )
@@ -80,7 +99,7 @@ GENERIC: write-full-response ( request response -- )
     [ content-type>> "application/octet-stream" or ]
     [ content-charset>> encoding>name ]
     bi
-    [ "; charset=" swap 3append ] when* ;
+    [ "; charset=" glue ] when* ;
 
 : ensure-domain ( cookie -- cookie )
     [
@@ -179,8 +198,8 @@ LOG: httpd-hit NOTICE
 
 LOG: httpd-header NOTICE
 
-: log-header ( headers name -- )
-    tuck header 2array httpd-header ;
+: log-header ( request name -- )
+    [ nip ] [ header ] 2bi 2array httpd-header ;
 
 : log-request ( request -- )
     [ [ method>> ] [ url>> ] bi 2array httpd-hit ]
@@ -236,7 +255,7 @@ TUPLE: http-server < threaded-server ;
 M: http-server handle-client*
     drop
     [
-        64 1024 * limit-input
+        64 1024 * stream-throws limit-input
         ?refresh-all
         [ read-request ] ?benchmark
         [ do-request ] ?benchmark
index 0bc644d019dc109b22bbd38bb4f3dd02614b8895..b19bf2ae55be4d9a6911b92a3a63ab987aba4747 100644 (file)
@@ -1,14 +1,11 @@
 ! Copyright (C) 2004, 2008 Slava Pestov.\r
 ! See http://factorcode.org/license.txt for BSD license.\r
-USING: calendar io io.files kernel math math.order\r
-math.parser namespaces parser sequences strings\r
-assocs hashtables debugger mime.types sorting logging\r
-calendar.format accessors splitting\r
-io.encodings.binary fry xml.entities destructors urls\r
-html.elements html.templates.fhtml\r
-http\r
-http.server\r
-http.server.responses\r
+USING: calendar kernel math math.order math.parser namespaces\r
+parser sequences strings assocs hashtables debugger mime.types\r
+sorting logging calendar.format accessors splitting io io.files\r
+io.files.info io.directories io.pathnames io.encodings.binary\r
+fry xml.entities destructors urls html.elements\r
+html.templates.fhtml http http.server http.server.responses\r
 http.server.redirection ;\r
 IN: http.server.static\r
 \r
index b47426f5bbd9ce140f69239f649baece62fde7ce..9c61d092e5622ea66f1bec001fe9620006d2ec52 100644 (file)
@@ -3,7 +3,7 @@
 USING: accessors arrays generic hashtables io kernel assocs math
 namespaces prettyprint sequences strings io.styles vectors words
 quotations mirrors splitting math.parser classes vocabs refs
-sets sorting summary debugger continuations ;
+sets sorting summary debugger continuations fry ;
 IN: inspector
 
 : value-editor ( path -- )
@@ -53,7 +53,7 @@ SYMBOL: +editable+
     [ drop ] [
         dup enum? [ +sequence+ on ] when
         standard-table-style [
-            swap [ -rot describe-row ] curry each-index
+            swap '[ [ _ ] 2dip describe-row ] each-index
         ] tabular-output
     ] if-empty ;
 
@@ -64,7 +64,7 @@ M: tuple error. describe ;
 
 : namestack. ( seq -- )
     [ [ global eq? not ] filter [ keys ] gather ] keep
-    [ dupd assoc-stack ] curry H{ } map>assoc describe ;
+    '[ dup _ assoc-stack ] H{ } map>assoc describe ;
 
 : .vars ( -- )
     namestack namestack. ;
index 5e4805a8ac4ed825da2a9f5b6dc620d531cc2c87..5c859f8947dcdca655a99bec9c4aba763b3b76c7 100644 (file)
@@ -1,9 +1,11 @@
-! Copyright (C) 2008 Slava Pestov.
+! Copyright (C) 2008, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: io kernel macros make multiline namespaces parser
 present sequences strings splitting fry accessors ;
 IN: interpolate
 
+<PRIVATE
+
 TUPLE: interpolate-var name ;
 
 : (parse-interpolate) ( string -- )
@@ -20,21 +22,22 @@ TUPLE: interpolate-var name ;
 : parse-interpolate ( string -- seq )
     [ (parse-interpolate) ] { } make ;
 
-MACRO: interpolate ( string -- )
-    parse-interpolate [
+: (interpolate) ( string quot -- quot' )
+    [ parse-interpolate ] dip '[
         dup interpolate-var?
-        [ name>> '[ _ get present write ] ]
+        [ name>> @ '[ _ @ present write ] ]
         [ '[ _ write ] ]
         if
-    ] map [ ] join ;
+    ] map [ ] join ; inline
+
+PRIVATE>
+
+MACRO: interpolate ( string -- )
+    [ [ get ] ] (interpolate) ;
 
 : interpolate-locals ( string -- quot )
-    parse-interpolate [
-        dup interpolate-var?
-        [ name>> search '[ _ present write ] ]
-        [ '[ _ write ] ]
-        if
-    ] map [ ] join ;
+    [ search [ ] ] (interpolate) ;
 
-: I[ "]I" parse-multiline-string
-    interpolate-locals parsed \ call parsed ; parsing
+: I[
+    "]I" parse-multiline-string
+    interpolate-locals over push-all ; parsing
index 1a862fbe2d9e61fb0f29eef1d326a7990da88417..de184585462f553fcf8ce2be277a8dcf751d3ab5 100644 (file)
@@ -18,7 +18,8 @@ HELP: <interval-map>
 { $description "From a specification, produce an interval tree. The specification is an assoc where the keys are intervals, or pairs of numbers to represent intervals, or individual numbers to represent singleton intervals. The values are the values int he interval map. Construction time is O(n log n)." } ;\r
 \r
 ARTICLE: "interval-maps" "Interval maps"\r
-"Interval maps are a mechanism, similar to assocs, where a set of closed intervals of keys are associated with values. As such, interval maps do not conform to the assoc protocol, because intervals of floats, for example, can be used, and it is impossible to get a list of keys in between."\r
+"The " { $vocab-link "interval-maps" } " vocabulary implements a data structure, similar to assocs, where a set of closed intervals of keys are associated with values. As such, interval maps do not conform to the assoc protocol, because intervals of floats, for example, can be used, and it is impossible to get a list of keys in between."\r
+$nl\r
 "The following operations are used to query interval maps:"\r
 { $subsection interval-at* }\r
 { $subsection interval-at }\r
index 34e43ddc7583729f804830f35233377e83e5b9cf..4fd4592ee15cae45e85984fdfd19868bfe97a243 100644 (file)
@@ -31,7 +31,8 @@ PRIVATE>
 \r
 : interval-at* ( key map -- value ? )\r
     [ drop ] [ array>> find-interval ] 2bi\r
-    tuck interval-contains? [ third t ] [ drop f f ] if ;\r
+    [ nip ] [ interval-contains? ] 2bi\r
+    [ third t ] [ drop f f ] if ;\r
 \r
 : interval-at ( key map -- value ) interval-at* drop ;\r
 \r
diff --git a/basis/io/backend/unix/authors.txt b/basis/io/backend/unix/authors.txt
new file mode 100644 (file)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/basis/io/backend/unix/bsd/authors.txt b/basis/io/backend/unix/bsd/authors.txt
new file mode 100755 (executable)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/basis/io/backend/unix/bsd/bsd.factor b/basis/io/backend/unix/bsd/bsd.factor
new file mode 100644 (file)
index 0000000..e0a675a
--- /dev/null
@@ -0,0 +1,13 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: namespaces system kernel accessors assocs continuations
+unix io.backend io.backend.unix io.backend.unix.multiplexers
+io.backend.unix.multiplexers.kqueue io.files.unix ;
+IN: io.backend.unix.bsd
+
+M: bsd init-io ( -- )
+    <kqueue-mx> mx set-global ;
+
+! M: bsd (monitor) ( path recursive? mailbox -- )
+!     swap [ "Recursive kqueue monitors not supported" throw ] when
+!     <vnode-monitor> ;
diff --git a/basis/io/backend/unix/bsd/tags.txt b/basis/io/backend/unix/bsd/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/backend/unix/freebsd/freebsd.factor b/basis/io/backend/unix/freebsd/freebsd.factor
new file mode 100644 (file)
index 0000000..1c0471b
--- /dev/null
@@ -0,0 +1,3 @@
+USING: io.backend.unix.bsd io.backend system ;
+
+freebsd set-io-backend
diff --git a/basis/io/backend/unix/freebsd/tags.txt b/basis/io/backend/unix/freebsd/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/backend/unix/linux/authors.txt b/basis/io/backend/unix/linux/authors.txt
new file mode 100755 (executable)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/basis/io/backend/unix/linux/linux.factor b/basis/io/backend/unix/linux/linux.factor
new file mode 100644 (file)
index 0000000..54b20d1
--- /dev/null
@@ -0,0 +1,11 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel system namespaces io.files.unix io.backend
+io.backend.unix io.backend.unix.multiplexers
+io.backend.unix.multiplexers.epoll ;
+IN: io.backend.unix.linux
+
+M: linux init-io ( -- )
+    <epoll-mx> mx set-global ;
+
+linux set-io-backend
diff --git a/basis/io/backend/unix/linux/tags.txt b/basis/io/backend/unix/linux/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/backend/unix/macosx/macosx.factor b/basis/io/backend/unix/macosx/macosx.factor
new file mode 100644 (file)
index 0000000..e669875
--- /dev/null
@@ -0,0 +1,10 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: io.backend system namespaces io.backend.unix.bsd
+io.backend.unix.multiplexers io.backend.unix.multiplexers.run-loop ;
+IN: io.backend.macosx
+
+M: macosx init-io ( -- )
+    <run-loop-mx> mx set-global ;
+
+macosx set-io-backend
diff --git a/basis/io/backend/unix/macosx/tags.txt b/basis/io/backend/unix/macosx/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/backend/unix/multiplexers/epoll/authors.txt b/basis/io/backend/unix/multiplexers/epoll/authors.txt
new file mode 100755 (executable)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/basis/io/backend/unix/multiplexers/epoll/epoll.factor b/basis/io/backend/unix/multiplexers/epoll/epoll.factor
new file mode 100644 (file)
index 0000000..a91f62f
--- /dev/null
@@ -0,0 +1,66 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors alien.c-types kernel destructors bit-arrays
+sequences assocs struct-arrays math namespaces locals fry unix
+unix.linux.epoll unix.time io.ports io.backend.unix
+io.backend.unix.multiplexers ;
+IN: io.backend.unix.multiplexers.epoll
+
+TUPLE: epoll-mx < mx events ;
+
+: max-events ( -- n )
+    #! We read up to 256 events at a time. This is an arbitrary
+    #! constant...
+    256 ; inline
+
+: <epoll-mx> ( -- mx )
+    epoll-mx new-mx
+        max-events epoll_create dup io-error >>fd
+        max-events "epoll-event" <struct-array> >>events ;
+
+M: epoll-mx dispose fd>> close-file ;
+
+: make-event ( fd events -- event )
+    "epoll-event" <c-object>
+    [ set-epoll-event-events ] keep
+    [ set-epoll-event-fd ] keep ;
+
+:: do-epoll-ctl ( fd mx what events -- )
+    mx fd>> what fd fd events make-event epoll_ctl io-error ;
+
+: do-epoll-add ( fd mx events -- )
+    EPOLL_CTL_ADD swap EPOLLONESHOT bitor do-epoll-ctl ;
+
+: do-epoll-del ( fd mx events -- )
+    EPOLL_CTL_DEL swap do-epoll-ctl ;
+
+M: epoll-mx add-input-callback ( thread fd mx -- )
+    [ EPOLLIN do-epoll-add ] [ call-next-method ] 2bi ;
+
+M: epoll-mx add-output-callback ( thread fd mx -- )
+    [ EPOLLOUT do-epoll-add ] [ call-next-method ] 2bi ;
+
+M: epoll-mx remove-input-callbacks ( fd mx -- seq )
+    2dup reads>> key? [
+        [ call-next-method ] [ EPOLLIN do-epoll-del ] 2bi
+    ] [ 2drop f ] if ;
+
+M: epoll-mx remove-output-callbacks ( fd mx -- seq )
+    2dup writes>> key? [
+        [ EPOLLOUT do-epoll-del ] [ call-next-method ] 2bi
+    ] [ 2drop f ] if ;
+
+: wait-event ( mx us -- n )
+    [ [ fd>> ] [ events>> ] bi [ underlying>> ] [ length ] bi ] [ 1000 /i ] bi*
+    epoll_wait multiplexer-error ;
+
+: handle-event ( event mx -- )
+    [ epoll-event-fd ] dip
+    [ EPOLLIN EPOLLOUT bitor do-epoll-del ]
+    [ input-available ] [ output-available ] 2tri ;
+
+: handle-events ( mx n -- )
+    [ dup events>> ] dip head-slice swap '[ _ handle-event ] each ;
+
+M: epoll-mx wait-for-events ( us mx -- )
+    swap 60000000 or dupd wait-event handle-events ;
diff --git a/basis/io/backend/unix/multiplexers/epoll/tags.txt b/basis/io/backend/unix/multiplexers/epoll/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/backend/unix/multiplexers/kqueue/authors.txt b/basis/io/backend/unix/multiplexers/kqueue/authors.txt
new file mode 100755 (executable)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/basis/io/backend/unix/multiplexers/kqueue/kqueue.factor b/basis/io/backend/unix/multiplexers/kqueue/kqueue.factor
new file mode 100644 (file)
index 0000000..2a66489
--- /dev/null
@@ -0,0 +1,76 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors alien.c-types combinators destructors
+io.backend.unix kernel math.bitwise sequences struct-arrays unix
+unix.kqueue unix.time assocs io.backend.unix.multiplexers ;
+IN: io.backend.unix.multiplexers.kqueue
+
+TUPLE: kqueue-mx < mx events ;
+
+: max-events ( -- n )
+    #! We read up to 256 events at a time. This is an arbitrary
+    #! constant...
+    256 ; inline
+
+: <kqueue-mx> ( -- mx )
+    kqueue-mx new-mx
+        kqueue dup io-error >>fd
+        max-events "kevent" <struct-array> >>events ;
+
+M: kqueue-mx dispose fd>> close-file ;
+
+: make-kevent ( fd filter flags -- event )
+    "kevent" <c-object>
+    [ set-kevent-flags ] keep
+    [ set-kevent-filter ] keep
+    [ set-kevent-ident ] keep ;
+
+: register-kevent ( kevent mx -- )
+    fd>> swap 1 f 0 f kevent io-error ;
+
+M: kqueue-mx add-input-callback ( thread fd mx -- )
+    [ call-next-method ] [
+        [ EVFILT_READ { EV_ADD EV_ONESHOT } flags make-kevent ] dip
+        register-kevent
+    ] 2bi ;
+
+M: kqueue-mx add-output-callback ( thread fd mx -- )
+    [ call-next-method ] [
+        [ EVFILT_WRITE { EV_ADD EV_ONESHOT } flags make-kevent ] dip
+        register-kevent
+    ] 2bi ;
+
+M: kqueue-mx remove-input-callbacks ( fd mx -- seq )
+    2dup reads>> key? [
+        [ call-next-method ] [
+            [ EVFILT_READ EV_DELETE make-kevent ] dip
+            register-kevent
+        ] 2bi
+    ] [ 2drop f ] if ;
+
+M: kqueue-mx remove-output-callbacks ( fd mx -- seq )
+    2dup writes>> key? [
+        [
+            [ EVFILT_WRITE EV_DELETE make-kevent ] dip
+            register-kevent
+        ] [ call-next-method ] 2bi
+    ] [ 2drop f ] if ;
+
+: wait-kevent ( mx timespec -- n )
+    [
+        [ fd>> f 0 ]
+        [ events>> [ underlying>> ] [ length ] bi ] bi
+    ] dip kevent multiplexer-error ;
+
+: handle-kevent ( mx kevent -- )
+    [ kevent-ident swap ] [ kevent-filter ] bi {
+        { EVFILT_READ [ input-available ] }
+        { EVFILT_WRITE [ output-available ] }
+    } case ;
+
+: handle-kevents ( mx n -- )
+    [ dup events>> ] dip head-slice [ handle-kevent ] with each ;
+
+M: kqueue-mx wait-for-events ( us mx -- )
+    swap dup [ make-timespec ] when
+    dupd wait-kevent handle-kevents ;
diff --git a/basis/io/backend/unix/multiplexers/kqueue/tags.txt b/basis/io/backend/unix/multiplexers/kqueue/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/backend/unix/multiplexers/multiplexers.factor b/basis/io/backend/unix/multiplexers/multiplexers.factor
new file mode 100644 (file)
index 0000000..844670d
--- /dev/null
@@ -0,0 +1,35 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel accessors assocs sequences threads ;
+IN: io.backend.unix.multiplexers
+
+TUPLE: mx fd reads writes ;
+
+: new-mx ( class -- obj )
+    new
+        H{ } clone >>reads
+        H{ } clone >>writes ; inline
+
+GENERIC: add-input-callback ( thread fd mx -- )
+
+M: mx add-input-callback reads>> push-at ;
+
+GENERIC: add-output-callback ( thread fd mx -- )
+
+M: mx add-output-callback writes>> push-at ;
+
+GENERIC: remove-input-callbacks ( fd mx -- callbacks )
+
+M: mx remove-input-callbacks reads>> delete-at* drop ;
+
+GENERIC: remove-output-callbacks ( fd mx -- callbacks )
+
+M: mx remove-output-callbacks writes>> delete-at* drop ;
+
+GENERIC: wait-for-events ( ms mx -- )
+
+: input-available ( fd mx -- )
+    reads>> delete-at* drop [ resume ] each ;
+
+: output-available ( fd mx -- )
+    writes>> delete-at* drop [ resume ] each ;
diff --git a/basis/io/backend/unix/multiplexers/run-loop/run-loop.factor b/basis/io/backend/unix/multiplexers/run-loop/run-loop.factor
new file mode 100644 (file)
index 0000000..84a6096
--- /dev/null
@@ -0,0 +1,33 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel arrays namespaces math accessors alien locals
+destructors system threads io.backend.unix.multiplexers
+io.backend.unix.multiplexers.kqueue core-foundation
+core-foundation.run-loop ;
+IN: io.backend.unix.multiplexers.run-loop
+
+TUPLE: run-loop-mx kqueue-mx ;
+
+: file-descriptor-callback ( -- callback )
+    "void" { "CFFileDescriptorRef" "CFOptionFlags" "void*" }
+    "cdecl" [
+        3drop
+        0 mx get kqueue-mx>> wait-for-events
+        reset-run-loop
+        yield
+    ] alien-callback ;
+
+: <run-loop-mx> ( -- mx )
+    [
+        <kqueue-mx> |dispose
+        dup fd>> file-descriptor-callback add-fd-to-run-loop
+        run-loop-mx boa
+    ] with-destructors ;
+
+M: run-loop-mx add-input-callback kqueue-mx>> add-input-callback ;
+M: run-loop-mx add-output-callback kqueue-mx>> add-output-callback ;
+M: run-loop-mx remove-input-callbacks kqueue-mx>> remove-input-callbacks ;
+M: run-loop-mx remove-output-callbacks kqueue-mx>> remove-output-callbacks ;
+
+M: run-loop-mx wait-for-events ( us mx -- )
+    swap run-one-iteration [ 0 swap wait-for-events ] [ drop ] if ;
diff --git a/basis/io/backend/unix/multiplexers/run-loop/tags.txt b/basis/io/backend/unix/multiplexers/run-loop/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/backend/unix/multiplexers/select/authors.txt b/basis/io/backend/unix/multiplexers/select/authors.txt
new file mode 100755 (executable)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/basis/io/backend/unix/multiplexers/select/select.factor b/basis/io/backend/unix/multiplexers/select/select.factor
new file mode 100644 (file)
index 0000000..c62101e
--- /dev/null
@@ -0,0 +1,56 @@
+! Copyright (C) 2004, 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: alien.c-types kernel bit-arrays sequences assocs unix
+math namespaces accessors math.order locals unix.time fry
+io.ports io.backend.unix io.backend.unix.multiplexers ;
+IN: io.backend.unix.multiplexers.select
+
+TUPLE: select-mx < mx read-fdset write-fdset ;
+
+! Factor's bit-arrays are an array of bytes, OS X expects
+! FD_SET to be an array of cells, so we have to account for
+! byte order differences on big endian platforms
+: munge ( i -- i' )
+    little-endian? [ BIN: 11000 bitxor ] unless ; inline
+
+: <select-mx> ( -- mx )
+    select-mx new-mx
+        FD_SETSIZE 8 * <bit-array> >>read-fdset
+        FD_SETSIZE 8 * <bit-array> >>write-fdset ;
+
+: clear-nth ( n seq -- ? )
+    [ nth ] [ [ f ] 2dip set-nth ] 2bi ;
+
+:: check-fd ( fd fdset mx quot -- )
+    fd munge fdset clear-nth [ fd mx quot call ] when ; inline
+
+: check-fdset ( fds fdset mx quot -- )
+    [ check-fd ] 3curry each ; inline
+
+: init-fdset ( fds fdset -- )
+    '[ t swap munge _ set-nth ] each ;
+
+: read-fdset/tasks ( mx -- seq fdset )
+    [ reads>> keys ] [ read-fdset>> ] bi ;
+
+: write-fdset/tasks ( mx -- seq fdset )
+    [ writes>> keys ] [ write-fdset>> ] bi ;
+
+: max-fd ( assoc -- n )
+    dup assoc-empty? [ drop 0 ] [ keys supremum ] if ;
+
+: num-fds ( mx -- n )
+    [ reads>> max-fd ] [ writes>> max-fd ] bi max 1+ ;
+
+: init-fdsets ( mx -- nfds read write except )
+    [ num-fds ]
+    [ read-fdset/tasks [ init-fdset ] [ underlying>> ] bi ]
+    [ write-fdset/tasks [ init-fdset ] [ underlying>> ] bi ] tri
+    f ;
+
+M:: select-mx wait-for-events ( us mx -- )
+    mx
+    [ init-fdsets us dup [ make-timeval ] when select multiplexer-error drop ]
+    [ [ read-fdset/tasks ] keep [ input-available ] check-fdset ]
+    [ [ write-fdset/tasks ] keep [ output-available ] check-fdset ]
+    tri ;
diff --git a/basis/io/backend/unix/multiplexers/select/tags.txt b/basis/io/backend/unix/multiplexers/select/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/backend/unix/netbsd/netbsd.factor b/basis/io/backend/unix/netbsd/netbsd.factor
new file mode 100644 (file)
index 0000000..a47be30
--- /dev/null
@@ -0,0 +1,3 @@
+USING: io.backend.unix.bsd io.backend system ;
+
+netbsd set-io-backend
diff --git a/basis/io/backend/unix/netbsd/tags.txt b/basis/io/backend/unix/netbsd/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/backend/unix/openbsd/openbsd.factor b/basis/io/backend/unix/openbsd/openbsd.factor
new file mode 100644 (file)
index 0000000..a9e2513
--- /dev/null
@@ -0,0 +1,3 @@
+USING: io.backend.unix.bsd io.backend system ;
+
+openbsd set-io-backend
diff --git a/basis/io/backend/unix/openbsd/tags.txt b/basis/io/backend/unix/openbsd/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/backend/unix/summary.txt b/basis/io/backend/unix/summary.txt
new file mode 100644 (file)
index 0000000..8f66d88
--- /dev/null
@@ -0,0 +1 @@
+Non-blocking I/O and sockets on Unix-like systems
diff --git a/basis/io/backend/unix/tags.txt b/basis/io/backend/unix/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/backend/unix/unix-tests.factor b/basis/io/backend/unix/unix-tests.factor
new file mode 100644 (file)
index 0000000..2e94d7a
--- /dev/null
@@ -0,0 +1,150 @@
+USING: io.files io.files.temp io.directories io.sockets io kernel threads
+namespaces tools.test continuations strings byte-arrays
+sequences prettyprint system io.encodings.binary io.encodings.ascii
+io.streams.duplex destructors make io.launcher ;
+IN: io.backend.unix.tests
+
+! Unix domain stream sockets
+: socket-server "unix-domain-socket-test" temp-file ;
+
+[
+    [ socket-server delete-file ] ignore-errors
+
+    socket-server <local>
+    ascii <server> [
+        accept drop [
+            "Hello world" print flush
+            readln "XYZ" = "FOO" "BAR" ? print flush
+        ] with-stream
+    ] with-disposal
+
+    socket-server delete-file
+] "Test" spawn drop
+
+yield
+
+[ { "Hello world" "FOO" } ] [
+    [
+        socket-server <local> ascii [
+            readln ,
+            "XYZ" print flush
+            readln ,
+        ] with-client
+    ] { } make
+] unit-test
+
+: datagram-server "unix-domain-datagram-test" temp-file ;
+: datagram-client "unix-domain-datagram-test-2" temp-file ;
+
+! Unix domain datagram sockets
+[ datagram-server delete-file ] ignore-errors
+[ datagram-client delete-file ] ignore-errors
+
+[
+    [
+        datagram-server <local> <datagram> "d" set
+
+        "Receive 1" print
+
+        "d" get receive [ reverse ] dip
+        
+        "Send 1" print
+        dup .
+
+        "d" get send
+
+        "Receive 2" print
+
+        "d" get receive [ " world" append ] dip
+        
+        "Send 1" print
+        dup .
+
+         "d" get send
+
+        "d" get dispose
+
+        "Done" print
+
+        datagram-server delete-file
+    ] with-scope
+] "Test" spawn drop
+
+yield
+
+[ datagram-client delete-file ] ignore-errors
+
+datagram-client <local> <datagram>
+"d" set
+
+[ ] [
+    "hello" >byte-array
+    datagram-server <local>
+    "d" get send
+] unit-test
+
+[ "olleh" t ] [
+    "d" get receive
+    datagram-server <local> =
+    [ >string ] dip
+] unit-test
+
+[ ] [
+    "hello" >byte-array
+    datagram-server <local>
+    "d" get send
+] unit-test
+
+[ "hello world" t ] [
+    "d" get receive
+    datagram-server <local> =
+    [ >string ] dip
+] unit-test
+
+[ ] [ "d" get dispose ] unit-test
+
+! Test error behavior
+: another-datagram "unix-domain-datagram-test-3" temp-file ;
+
+[ another-datagram delete-file ] ignore-errors
+
+datagram-client delete-file
+
+[ ] [ datagram-client <local> <datagram> "d" set ] unit-test
+
+[ B{ 1 2 3 } another-datagram <local> "d" get send ] must-fail
+
+[ ] [ "d" get dispose ] unit-test
+
+! See what happens on send/receive after close
+
+[ "d" get receive ] must-fail
+
+[ B{ 1 2 } datagram-server <local> "d" get send ] must-fail
+
+! Invalid parameter tests
+
+[
+    image binary [ input-stream get accept ] with-file-reader
+] must-fail
+
+[
+    image binary [ input-stream get receive ] with-file-reader
+] must-fail
+
+[
+    image binary [
+        B{ 1 2 } datagram-server <local>
+        input-stream get send
+    ] with-file-reader
+] must-fail
+
+! closing stdin caused some problems
+[ ] [
+    [
+        vm ,
+        "-i=" image append ,
+        "-run=none" ,
+        "-e=USING: destructors namespaces io calendar threads ; input-stream get dispose 1 seconds sleep" ,
+    ] { } make try-process
+] unit-test
diff --git a/basis/io/backend/unix/unix.factor b/basis/io/backend/unix/unix.factor
new file mode 100644 (file)
index 0000000..c4883f5
--- /dev/null
@@ -0,0 +1,185 @@
+! Copyright (C) 2004, 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: alien alien.c-types alien.syntax generic assocs kernel
+kernel.private math io.ports sequences strings sbufs threads
+unix vectors io.buffers io.backend io.encodings math.parser
+continuations system libc namespaces make io.timeouts
+io.encodings.utf8 destructors accessors summary combinators
+locals unix.time fry io.backend.unix.multiplexers ;
+QUALIFIED: io
+IN: io.backend.unix
+
+GENERIC: handle-fd ( handle -- fd )
+
+TUPLE: fd fd disposed ;
+
+: init-fd ( fd -- fd )
+    [
+        |dispose
+        dup fd>> F_SETFL O_NONBLOCK fcntl io-error
+        dup fd>> F_SETFD FD_CLOEXEC fcntl io-error
+    ] with-destructors ;
+
+: <fd> ( n -- fd )
+    #! We drop the error code rather than calling io-error,
+    #! since on OS X 10.3, this operation fails from init-io
+    #! when running the Factor.app (presumably because fd 0 and
+    #! 1 are closed).
+    f fd boa ;
+
+M: fd dispose
+    dup disposed>> [ drop ] [
+        [ cancel-operation ]
+        [ t >>disposed drop ]
+        [ fd>> close-file ]
+        tri
+    ] if ;
+
+M: fd handle-fd dup check-disposed fd>> ;
+
+M: fd cancel-operation ( fd -- )
+    dup disposed>> [ drop ] [
+        fd>>
+        mx get-global
+        [ remove-input-callbacks [ t swap resume-with ] each ]
+        [ remove-output-callbacks [ t swap resume-with ] each ]
+        2bi
+    ] if ;
+
+SYMBOL: +retry+ ! just try the operation again without blocking
+SYMBOL: +input+
+SYMBOL: +output+
+
+ERROR: io-timeout ;
+
+M: io-timeout summary drop "I/O operation timed out" ;
+
+: wait-for-fd ( handle event -- )
+    dup +retry+ eq? [ 2drop ] [
+        '[
+            swap handle-fd mx get-global _ {
+                { +input+ [ add-input-callback ] }
+                { +output+ [ add-output-callback ] }
+            } case
+        ] "I/O" suspend nip [ io-timeout ] when
+    ] if ;
+
+: wait-for-port ( port event -- )
+    '[ handle>> _ wait-for-fd ] with-timeout ;
+
+! Some general stuff
+: file-mode OCT: 0666 ;
+! Readers
+: (refill) ( port -- n )
+    [ handle>> ]
+    [ buffer>> buffer-end ]
+    [ buffer>> buffer-capacity ] tri read ;
+
+! Returns an event to wait for which will ensure completion of
+! this request
+GENERIC: refill ( port handle -- event/f )
+
+M: fd refill
+    fd>> over buffer>> [ buffer-end ] [ buffer-capacity ] bi read
+    {
+        { [ dup 0 >= ] [ swap buffer>> n>buffer f ] }
+        { [ err_no EINTR = ] [ 2drop +retry+ ] }
+        { [ err_no EAGAIN = ] [ 2drop +input+ ] }
+        [ (io-error) ]
+    } cond ;
+
+M: unix (wait-to-read) ( port -- )
+    dup
+    dup handle>> dup check-disposed refill dup
+    [ dupd wait-for-port (wait-to-read) ] [ 2drop ] if ;
+
+! Writers
+GENERIC: drain ( port handle -- event/f )
+
+M: fd drain
+    fd>> over buffer>> [ buffer@ ] [ buffer-length ] bi write
+    {
+        { [ dup 0 >= ] [
+            over buffer>> buffer-consume
+            buffer>> buffer-empty? f +output+ ?
+        ] }
+        { [ err_no EINTR = ] [ 2drop +retry+ ] }
+        { [ err_no EAGAIN = ] [ 2drop +output+ ] }
+        [ (io-error) ]
+    } cond ;
+
+M: unix (wait-to-write) ( port -- )
+    dup
+    dup handle>> dup check-disposed drain
+    dup [ wait-for-port ] [ 2drop ] if ;
+
+M: unix io-multiplex ( ms/f -- )
+    mx get-global wait-for-events ;
+
+! On Unix, you're not supposed to set stdin to non-blocking
+! because the fd might be shared with another process (either
+! parent or child). So what we do is have the VM start a thread
+! which pumps data from the real stdin to a pipe. We set the
+! pipe to non-blocking, and read from it instead of the real
+! stdin. Very crufty, but it will suffice until we get native
+! threading support at the language level.
+TUPLE: stdin control size data disposed ;
+
+M: stdin dispose*
+    [
+        [ control>> &dispose drop ]
+        [ size>> &dispose drop ]
+        [ data>> &dispose drop ]
+        tri
+    ] with-destructors ;
+
+: wait-for-stdin ( stdin -- n )
+    [ control>> CHAR: X over io:stream-write1 io:stream-flush ]
+    [ size>> "ssize_t" heap-size swap io:stream-read *int ]
+    bi ;
+
+:: refill-stdin ( buffer stdin size -- )
+    stdin data>> handle-fd buffer buffer-end size read
+    dup 0 < [
+        drop
+        err_no EINTR = [ buffer stdin size refill-stdin ] [ (io-error) ] if
+    ] [
+        size = [ "Error reading stdin pipe" throw ] unless
+        size buffer n>buffer
+    ] if ;
+
+M: stdin refill
+    [ buffer>> ] [ dup wait-for-stdin ] bi* refill-stdin f ;
+
+: control-write-fd ( -- fd ) &: control_write *uint ;
+
+: size-read-fd ( -- fd ) &: size_read *uint ;
+
+: data-read-fd ( -- fd ) &: stdin_read *uint ;
+
+: <stdin> ( -- stdin )
+    stdin new
+        control-write-fd <fd> <output-port> >>control
+        size-read-fd <fd> init-fd <input-port> >>size
+        data-read-fd <fd> >>data ;
+
+M: unix (init-stdio)
+    <stdin> <input-port>
+    1 <fd> <output-port>
+    2 <fd> <output-port> ;
+
+! mx io-task for embedding an fd-based mx inside another mx
+TUPLE: mx-port < port mx ;
+
+: <mx-port> ( mx -- port )
+    dup fd>> mx-port <port> swap >>mx ;
+
+: multiplexer-error ( n -- n )
+    dup 0 < [
+        err_no [ EAGAIN = ] [ EINTR = ] bi or
+        [ drop 0 ] [ (io-error) ] if
+    ] when ;
+
+: ?flag ( n mask symbol -- n )
+    pick rot bitand 0 > [ , ] [ drop ] if ;
diff --git a/basis/io/backend/windows/authors.txt b/basis/io/backend/windows/authors.txt
new file mode 100644 (file)
index 0000000..781acc2
--- /dev/null
@@ -0,0 +1,2 @@
+Doug Coleman
+Mackenzie Straight
diff --git a/basis/io/backend/windows/nt/authors.txt b/basis/io/backend/windows/nt/authors.txt
new file mode 100755 (executable)
index 0000000..026f4cd
--- /dev/null
@@ -0,0 +1,3 @@
+Doug Coleman
+Slava Pestov
+Mackenzie Straight
diff --git a/basis/io/backend/windows/nt/nt.factor b/basis/io/backend/windows/nt/nt.factor
new file mode 100755 (executable)
index 0000000..c6b24a0
--- /dev/null
@@ -0,0 +1,128 @@
+USING: alien alien.c-types arrays assocs combinators
+continuations destructors io io.backend io.ports io.timeouts
+io.backend.windows io.files.windows io.files.windows.nt io.files
+io.pathnames io.buffers io.streams.c libc kernel math namespaces
+sequences threads windows windows.errors windows.kernel32
+strings splitting ascii system accessors locals ;
+QUALIFIED: windows.winsock
+IN: io.backend.windows.nt
+
+! Global variable with assoc mapping overlapped to threads
+SYMBOL: pending-overlapped
+
+TUPLE: io-callback port thread ;
+
+C: <io-callback> io-callback
+
+: (make-overlapped) ( -- overlapped-ext )
+    "OVERLAPPED" malloc-object &free ;
+
+: make-overlapped ( port -- overlapped-ext )
+    [ (make-overlapped) ] dip
+    handle>> ptr>> [ over set-OVERLAPPED-offset ] when* ;
+
+M: winnt FileArgs-overlapped ( port -- overlapped )
+    make-overlapped ;
+
+: <completion-port> ( handle existing -- handle )
+     f 1 CreateIoCompletionPort dup win32-error=0/f ;
+
+SYMBOL: master-completion-port
+
+: <master-completion-port> ( -- handle )
+    INVALID_HANDLE_VALUE f <completion-port> ;
+
+M: winnt add-completion ( win32-handle -- )
+    handle>> master-completion-port get-global <completion-port> drop ;
+
+: eof? ( error -- ? )
+    [ ERROR_HANDLE_EOF = ] [ ERROR_BROKEN_PIPE = ] bi or ;
+
+: twiddle-thumbs ( overlapped port -- bytes-transferred )
+    [
+        drop
+        [ pending-overlapped get-global set-at ] curry "I/O" suspend
+        {
+            { [ dup integer? ] [ ] }
+            { [ dup array? ] [
+                first dup eof?
+                [ drop 0 ] [ (win32-error-string) throw ] if
+            ] }
+        } cond
+    ] with-timeout ;
+
+:: wait-for-overlapped ( us -- bytes-transferred overlapped error? )
+    master-completion-port get-global
+    0 <int> [ ! bytes
+        f <void*> ! key
+        f <void*> [ ! overlapped
+            us [ 1000 /i ] [ INFINITE ] if* ! timeout
+            GetQueuedCompletionStatus zero?
+        ] keep *void*
+    ] keep *int spin ;
+
+: resume-callback ( result overlapped -- )
+    pending-overlapped get-global delete-at* drop resume-with ;
+
+: handle-overlapped ( us -- ? )
+    wait-for-overlapped [
+        dup [
+            [ drop GetLastError 1array ] dip resume-callback t
+        ] [ 2drop f ] if
+    ] [ resume-callback t ] if ;
+
+M: win32-handle cancel-operation
+    [ check-disposed ] [ handle>> CancelIo drop ] bi ;
+
+M: winnt io-multiplex ( us -- )
+    handle-overlapped [ 0 io-multiplex ] when ;
+
+M: winnt init-io ( -- )
+    <master-completion-port> master-completion-port set-global
+    H{ } clone pending-overlapped set-global
+    windows.winsock:init-winsock ;
+
+: file-error? ( n -- eof? )
+    zero? [
+        GetLastError {
+            { [ dup expected-io-error? ] [ drop f ] }
+            { [ dup eof? ] [ drop t ] }
+            [ (win32-error-string) throw ]
+        } cond
+    ] [ f ] if ;
+
+: wait-for-file ( FileArgs n port -- n )
+    swap file-error?
+    [ 2drop 0 ] [ [ lpOverlapped>> ] dip twiddle-thumbs ] if ;
+
+: update-file-ptr ( n port -- )
+    handle>> dup ptr>> [ rot + >>ptr drop ] [ 2drop ] if* ;
+
+: finish-write ( n port -- )
+    [ update-file-ptr ] [ buffer>> buffer-consume ] 2bi ;
+
+M: winnt (wait-to-write)
+    [
+        [ make-FileArgs dup setup-write WriteFile ]
+        [ wait-for-file ]
+        [ finish-write ]
+        tri
+    ] with-destructors ;
+
+: finish-read ( n port -- )
+    [ update-file-ptr ] [ buffer>> n>buffer ] 2bi ;
+
+M: winnt (wait-to-read) ( port -- )
+    [
+        [ make-FileArgs dup setup-read ReadFile ]
+        [ wait-for-file ]
+        [ finish-read ]
+        tri
+    ] with-destructors ;
+
+: console-app? ( -- ? ) GetConsoleWindow >boolean ;
+
+M: winnt (init-stdio)
+    console-app? [ init-c-stdio t ] [ f f f f ] if ;
+
+winnt set-io-backend
diff --git a/basis/io/backend/windows/nt/privileges/privileges.factor b/basis/io/backend/windows/nt/privileges/privileges.factor
new file mode 100755 (executable)
index 0000000..64218f7
--- /dev/null
@@ -0,0 +1,52 @@
+USING: alien alien.c-types alien.syntax arrays continuations\r
+destructors generic io.mmap io.ports io.backend.windows io.files.windows\r
+kernel libc math math.bitwise namespaces quotations sequences windows\r
+windows.advapi32 windows.kernel32 io.backend system accessors\r
+io.backend.windows.privileges ;\r
+IN: io.backend.windows.nt.privileges\r
+\r
+TYPEDEF: TOKEN_PRIVILEGES* PTOKEN_PRIVILEGES\r
+\r
+! Security tokens\r
+!  http://msdn.microsoft.com/msdnmag/issues/05/03/TokenPrivileges/\r
+\r
+: (open-process-token) ( handle -- handle )\r
+    { TOKEN_ADJUST_PRIVILEGES TOKEN_QUERY } flags "PHANDLE" <c-object>\r
+    [ OpenProcessToken win32-error=0/f ] keep *void* ;\r
+\r
+: open-process-token ( -- handle )\r
+    #! remember to CloseHandle\r
+    GetCurrentProcess (open-process-token) ;\r
+\r
+: with-process-token ( quot -- )\r
+    #! quot: ( token-handle -- token-handle )\r
+    [ open-process-token ] dip\r
+    [ keep ] curry\r
+    [ CloseHandle drop ] [ ] cleanup ; inline\r
+\r
+: lookup-privilege ( string -- luid )\r
+    [ f ] dip "LUID" <c-object>\r
+    [ LookupPrivilegeValue win32-error=0/f ] keep ;\r
+\r
+: make-token-privileges ( name ? -- obj )\r
+    "TOKEN_PRIVILEGES" <c-object>\r
+    1 [ over set-TOKEN_PRIVILEGES-PrivilegeCount ] keep\r
+    "LUID_AND_ATTRIBUTES" malloc-array &free\r
+    over set-TOKEN_PRIVILEGES-Privileges\r
+\r
+    swap [\r
+        SE_PRIVILEGE_ENABLED over TOKEN_PRIVILEGES-Privileges\r
+        set-LUID_AND_ATTRIBUTES-Attributes\r
+    ] when\r
+\r
+    [ lookup-privilege ] dip\r
+    [\r
+        TOKEN_PRIVILEGES-Privileges\r
+        set-LUID_AND_ATTRIBUTES-Luid\r
+    ] keep ;\r
+\r
+M: winnt set-privilege ( name ? -- )\r
+    [\r
+        -rot 0 -rot make-token-privileges\r
+        dup length f f AdjustTokenPrivileges win32-error=0/f\r
+    ] with-process-token ;\r
diff --git a/basis/io/backend/windows/nt/privileges/tags.txt b/basis/io/backend/windows/nt/privileges/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/backend/windows/nt/tags.txt b/basis/io/backend/windows/nt/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/backend/windows/privileges/privileges.factor b/basis/io/backend/windows/privileges/privileges.factor
new file mode 100644 (file)
index 0000000..8661ba9
--- /dev/null
@@ -0,0 +1,14 @@
+USING: io.backend kernel continuations sequences\r
+system vocabs.loader combinators ;\r
+IN: io.backend.windows.privileges\r
+\r
+HOOK: set-privilege io-backend ( name ? -- ) inline\r
+\r
+: with-privileges ( seq quot -- )\r
+    over [ [ t set-privilege ] each ] curry compose\r
+    swap [ [ f set-privilege ] each ] curry [ ] cleanup ; inline\r
+\r
+{\r
+    { [ os winnt? ] [ "io.backend.windows.nt.privileges" require ] }\r
+    { [ os wince? ] [ "io.backend.windows.ce.privileges" require ] }\r
+} cond\r
diff --git a/basis/io/backend/windows/privileges/tags.txt b/basis/io/backend/windows/privileges/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/backend/windows/summary.txt b/basis/io/backend/windows/summary.txt
new file mode 100644 (file)
index 0000000..2a2d544
--- /dev/null
@@ -0,0 +1 @@
+Microsoft Windows native I/O implementation
diff --git a/basis/io/backend/windows/tags.txt b/basis/io/backend/windows/tags.txt
new file mode 100755 (executable)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/backend/windows/windows.factor b/basis/io/backend/windows/windows.factor
new file mode 100755 (executable)
index 0000000..6ecbc49
--- /dev/null
@@ -0,0 +1,54 @@
+! Copyright (C) 2004, 2008 Mackenzie Straight, Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: alien alien.c-types arrays destructors io io.backend
+io.buffers io.files io.ports io.binary io.timeouts
+windows.errors strings kernel math namespaces sequences windows
+windows.kernel32 windows.shell32 windows.types windows.winsock
+splitting continuations math.bitwise system accessors ;
+IN: io.backend.windows
+
+: set-inherit ( handle ? -- )
+    [ HANDLE_FLAG_INHERIT ] dip
+    >BOOLEAN SetHandleInformation win32-error=0/f ;
+
+TUPLE: win32-handle handle disposed ;
+
+: new-win32-handle ( handle class -- win32-handle )
+    new swap [ >>handle ] [ f set-inherit ] bi ;
+
+: <win32-handle> ( handle -- win32-handle )
+    win32-handle new-win32-handle ;
+
+M: win32-handle dispose* ( handle -- )
+    handle>> CloseHandle drop ;
+
+TUPLE: win32-file < win32-handle ptr ;
+
+: <win32-file> ( handle -- win32-file )
+    win32-file new-win32-handle ;
+
+M: win32-file dispose
+    dup disposed>> [ drop ] [
+        [ cancel-operation ] [ call-next-method ] bi
+    ] if ;
+
+HOOK: CreateFile-flags io-backend ( DWORD -- DWORD )
+HOOK: FileArgs-overlapped io-backend ( port -- overlapped/f )
+HOOK: add-completion io-backend ( port -- )
+
+: opened-file ( handle -- win32-file )
+    dup invalid-handle?
+    <win32-file> |dispose
+    dup add-completion ;
+
+: share-mode ( -- fixnum )
+    {
+        FILE_SHARE_READ
+        FILE_SHARE_WRITE
+        FILE_SHARE_DELETE
+    } flags ; foldable
+
+: default-security-attributes ( -- obj )
+    "SECURITY_ATTRIBUTES" <c-object>
+    "SECURITY_ATTRIBUTES" heap-size
+    over set-SECURITY_ATTRIBUTES-nLength ;
\ No newline at end of file
diff --git a/basis/io/crlf/authors.txt b/basis/io/crlf/authors.txt
new file mode 100644 (file)
index 0000000..33616a2
--- /dev/null
@@ -0,0 +1,2 @@
+Daniel Ehrenberg
+Slava Pestov
diff --git a/basis/io/crlf/crlf-docs.factor b/basis/io/crlf/crlf-docs.factor
new file mode 100644 (file)
index 0000000..ac7c8c3
--- /dev/null
@@ -0,0 +1,12 @@
+! Copyright (C) 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.syntax help.markup sequences ;
+IN: io.crlf
+
+HELP: crlf
+{ $values }
+{ $description "Prints a carriage return and line feed to the current output stream, used to indicate a newline for certain network protocols." } ;
+
+HELP: read-crlf
+{ $values { "seq" sequence } }
+{ $description "Reads until the next CRLF (carriage return followed by line feed) from the current input stream, throwing an error if there is not a CRLF remaining, or if CR is present without immediately being followed by LF." } ;
diff --git a/basis/io/crlf/crlf.factor b/basis/io/crlf/crlf.factor
new file mode 100644 (file)
index 0000000..53dddce
--- /dev/null
@@ -0,0 +1,11 @@
+! Copyright (C) 2009 Daniel Ehrenberg, Slava Pestov
+! See http://factorcode.org/license.txt for BSD license.
+USING: io kernel ;
+IN: io.crlf
+
+: crlf ( -- )
+    "\r\n" write ;
+
+: read-crlf ( -- seq )
+    "\r" read-until
+    [ CHAR: \r assert= read1 CHAR: \n assert= ] when* ;
diff --git a/basis/io/crlf/summary.txt b/basis/io/crlf/summary.txt
new file mode 100644 (file)
index 0000000..2fa6a6e
--- /dev/null
@@ -0,0 +1 @@
+Writing and reading until \r\n
diff --git a/basis/io/directories/authors.txt b/basis/io/directories/authors.txt
new file mode 100644 (file)
index 0000000..f372b57
--- /dev/null
@@ -0,0 +1,2 @@
+Slava Pestov
+Doug Coleman
diff --git a/basis/io/directories/directories-docs.factor b/basis/io/directories/directories-docs.factor
new file mode 100644 (file)
index 0000000..7318df9
--- /dev/null
@@ -0,0 +1,172 @@
+USING: help.markup help.syntax io.files.private io.pathnames
+quotations ;
+IN: io.directories
+
+HELP: cwd
+{ $values { "path" "a pathname string" } }
+{ $description "Outputs the current working directory of the Factor process." }
+{ $errors "Windows CE has no concept of â€œcurrent directoryâ€, so this word throws an error there." }
+{ $notes "User code should use the value of the " { $link current-directory } " variable instead." } ;
+
+HELP: cd
+{ $values { "path" "a pathname string" } }
+{ $description "Changes the current working directory of the Factor process." }
+{ $errors "Windows CE has no concept of â€œcurrent directoryâ€, so this word throws an error there." }
+{ $notes "User code should use " { $link with-directory } " or " { $link set-current-directory } " instead." } ;
+
+{ cd cwd current-directory set-current-directory with-directory } related-words
+
+HELP: current-directory
+{ $description "A variable holding the current directory as an absolute path. Words that use the filesystem do so in relation to this variable."
+$nl
+"This variable should never be set directly; instead, use " { $link set-current-directory } " or " { $link with-directory } ". This preserves the invariant that the value of this variable is an absolute path." } ;
+
+HELP: set-current-directory
+{ $values { "path" "a pathname string" } }
+{ $description "Changes the " { $link current-directory } " variable."
+$nl
+"If " { $snippet "path" } " is relative, it is first resolved relative to the current directory. If " { $snippet "path" } " is absolute, it becomes the new current directory." } ;
+
+HELP: with-directory
+{ $values { "path" "a pathname string" } { "quot" quotation } }
+{ $description "Calls the quotation in a new dynamic scope with the " { $link current-directory } " variable rebound."
+$nl
+"If " { $snippet "path" } " is relative, it is first resolved relative to the current directory. If " { $snippet "path" } " is absolute, it becomes the new current directory." } ;
+
+HELP: (directory-entries)
+{ $values { "path" "a pathname string" } { "seq" "a sequence of " { $snippet "{ name dir? }" } " pairs" } }
+{ $description "Outputs the contents of a directory named by " { $snippet "path" } "." }
+{ $notes "This is a low-level word, and user code should call one of the related words instead." } ;
+
+HELP: directory-entries
+{ $values { "path" "a pathname string" } { "seq" "a sequence of " { $link directory-entry } " objects" } }
+{ $description "Outputs the contents of a directory named by " { $snippet "path" } "." } ;
+
+HELP: directory-files
+{ $values { "path" "a pathname string" } { "seq" "a sequence of filenames" } }
+{ $description "Outputs the contents of a directory named by " { $snippet "path" } "." } ;
+
+HELP: with-directory-files
+{ $values { "path" "a pathname string" } { "quot" quotation } }
+{ $description "Calls the quotation with the directory file names on the stack and with the directory set as the " { $link current-directory } ".  Restores the current directory after the quotation is called." } ;
+
+HELP: with-directory-entries
+{ $values { "path" "a pathname string" } { "quot" quotation } }
+{ $description "Calls the quotation with the directory entries on the stack and with the directory set as the " { $link current-directory } ".  Restores the current directory after the quotation is called." } ;
+
+HELP: delete-file
+{ $values { "path" "a pathname string" } }
+{ $description "Deletes a file." }
+{ $errors "Throws an error if the file could not be deleted." } ;
+
+HELP: make-directory
+{ $values { "path" "a pathname string" } }
+{ $description "Creates a directory." }
+{ $errors "Throws an error if the directory could not be created." } ;
+
+HELP: make-directories
+{ $values { "path" "a pathname string" } }
+{ $description "Creates a directory and any parent directories which do not yet exist." }
+{ $errors "Throws an error if the directories could not be created." } ;
+
+HELP: delete-directory
+{ $values { "path" "a pathname string" } }
+{ $description "Deletes a directory. The directory must be empty." }
+{ $errors "Throws an error if the directory could not be deleted." } ;
+
+HELP: touch-file
+{ $values { "path" "a pathname string" } }
+{ $description "Updates the modification time of a file or directory. If the file does not exist, creates a new, empty file." }
+{ $errors "Throws an error if the file could not be touched." } ;
+
+HELP: move-file
+{ $values { "from" "a pathname string" } { "to" "a pathname string" } }
+{ $description "Moves or renames a file." }
+{ $errors "Throws an error if the file does not exist or if the move operation fails." } ;
+
+HELP: move-file-into
+{ $values { "from" "a pathname string" } { "to" "a directory pathname string" } }
+{ $description "Moves a file to another directory without renaming it." }
+{ $errors "Throws an error if the file does not exist or if the move operation fails." } ;
+
+HELP: move-files-into
+{ $values { "files" "a sequence of pathname strings" } { "to" "a directory pathname string" } }
+{ $description "Moves a set of files to another directory." }
+{ $errors "Throws an error if the file does not exist or if the move operation fails." } ;
+
+HELP: copy-file
+{ $values { "from" "a pathname string" } { "to" "a pathname string" } }
+{ $description "Copies a file." }
+{ $notes "This operation attempts to preserve the original file's attributes, however not all attributes may be preserved." }
+{ $errors "Throws an error if the file does not exist or if the copy operation fails." } ;
+
+HELP: copy-file-into
+{ $values { "from" "a pathname string" } { "to" "a directory pathname string" } }
+{ $description "Copies a file to another directory." }
+{ $errors "Throws an error if the file does not exist or if the copy operation fails." } ;
+
+HELP: copy-files-into
+{ $values { "files" "a sequence of pathname strings" } { "to" "a directory pathname string" } }
+{ $description "Copies a set of files to another directory." }
+{ $errors "Throws an error if the file does not exist or if the copy operation fails." } ;
+
+ARTICLE: "current-directory" "Current working directory"
+"File system I/O operations use the value of a variable to resolve relative pathnames:"
+{ $subsection current-directory }
+"This variable can be changed with a pair of words:"
+{ $subsection set-current-directory }
+{ $subsection with-directory }
+"This variable is independent of the operating system notion of â€œcurrent working directoryâ€. While all Factor I/O operations use the variable and not the operating system's value, care must be taken when making FFI calls which expect a pathname. The first option is to resolve relative paths:"
+{ $subsection (normalize-path) }
+"The second is to change the working directory of the current process:"
+{ $subsection cd }
+{ $subsection cwd } ;
+
+ARTICLE: "io.directories.listing" "Directory listing"
+"Directory listing:"
+{ $subsection directory-entries }
+{ $subsection directory-files }
+{ $subsection with-directory-entries }
+{ $subsection with-directory-files } ;
+
+ARTICLE: "io.directories.create" "Creating directories"
+{ $subsection make-directory }
+{ $subsection make-directories } ;
+
+ARTICLE: "delete-move-copy" "Deleting, moving, and copying files"
+"Operations for deleting and copying files come in two forms:"
+{ $list
+    { "Words named " { $snippet { $emphasis "operation" } "-file" } " which work on regular files only." }
+    { "Words named " { $snippet { $emphasis "operation" } "-tree" } " works on directory trees recursively, and also accepts regular files." }
+}
+"The operations for moving and copying files come in three flavors:"
+{ $list
+    { "A word named " { $snippet { $emphasis "operation" } } " which takes a source and destination path." }
+    { "A word named " { $snippet { $emphasis "operation" } "-into" } " which takes a source path and destination directory. The destination file will be stored in the destination directory and will have the same file name as the source path." }
+    { "A word named " { $snippet { $emphasis "operation" } "s-into" } " which takes a sequence of source paths and destination directory." }
+}
+"Since both of the above lists apply to copying files, that this means that there are a total of six variations on copying a file."
+$nl
+"Deleting files:"
+{ $subsection delete-file }
+{ $subsection delete-directory }
+"Moving files:"
+{ $subsection move-file }
+{ $subsection move-file-into }
+{ $subsection move-files-into }
+"Copying files:"
+{ $subsection copy-file }
+{ $subsection copy-file-into }
+{ $subsection copy-files-into }
+"On most operating systems, files can only be moved within the same file system. To move files between file systems, use " { $link copy-file } " followed by " { $link delete-file } " on the old name." ;
+
+ARTICLE: "io.directories" "Directory manipulation"
+"The " { $vocab-link "io.directories" } " vocabulary defines words for inspecting and manipulating directory trees."
+{ $subsection home }
+{ $subsection "current-directory" }
+{ $subsection "io.directories.listing" }
+{ $subsection "io.directories.create" }
+{ $subsection "delete-move-copy" }
+{ $subsection "io.directories.hierarchy" } ;
+
+ABOUT: "io.directories"
diff --git a/basis/io/directories/directories-tests.factor b/basis/io/directories/directories-tests.factor
new file mode 100644 (file)
index 0000000..b703421
--- /dev/null
@@ -0,0 +1,189 @@
+USING: continuations destructors io io.directories
+io.directories.hierarchy io.encodings.ascii io.encodings.utf8
+io.files io.files.info io.files.temp io.pathnames kernel
+sequences tools.test ;
+IN: io.directories.tests
+
+[ { "kernel" } ] [
+    "core" resource-path [
+        "." directory-files [ "kernel" = ] filter
+    ] with-directory
+] unit-test
+
+[ { "kernel" } ] [
+    "resource:core" [
+        "." directory-files [ "kernel" = ] filter
+    ] with-directory
+] unit-test
+
+[ { "kernel" } ] [
+    "resource:core" [
+        [ "kernel" = ] filter
+    ] with-directory-files
+] unit-test
+
+[ ] [ "blahblah" temp-file dup exists? [ delete-directory ] [ drop ] if ] unit-test
+[ ] [ "blahblah" temp-file make-directory ] unit-test
+[ t ] [ "blahblah" temp-file file-info directory? ] unit-test
+
+[ t ] [
+    [ temp-directory "loldir" append-path delete-directory ] ignore-errors
+    temp-directory [
+        "loldir" make-directory
+    ] with-directory
+    temp-directory "loldir" append-path exists?
+] unit-test
+
+[ ] [
+    [ temp-directory "loldir" append-path delete-directory ] ignore-errors
+    temp-directory [
+        "loldir" make-directory
+        "loldir" delete-directory
+    ] with-directory
+] unit-test
+
+[ "file1 contents" ] [
+    [ temp-directory "loldir" append-path delete-directory ] ignore-errors
+    temp-directory [
+        "file1 contents" "file1" utf8 set-file-contents
+        "file1" "file2" copy-file
+        "file2" utf8 file-contents
+    ] with-directory
+    "file1" temp-file delete-file
+    "file2" temp-file delete-file
+] unit-test
+
+[ "file3 contents" ] [
+    temp-directory [
+        "file3 contents" "file3" utf8 set-file-contents
+        "file3" "file4" move-file
+        "file4" utf8 file-contents
+    ] with-directory
+    "file4" temp-file delete-file
+] unit-test
+
+[ "file5" temp-file delete-file ] ignore-errors
+
+[ ] [
+    temp-directory [
+        "file5" touch-file
+        "file5" delete-file
+    ] with-directory
+] unit-test
+
+[ "file6" temp-file delete-file ] ignore-errors
+
+[ ] [
+    temp-directory [
+        "file6" touch-file
+        "file6" link-info drop
+    ] with-directory
+] unit-test
+
+[ ] [
+    { "Hello world." }
+    "test-foo.txt" temp-file ascii set-file-lines
+] unit-test
+
+[ ] [
+    "test-foo.txt" temp-file ascii [
+        "Hello appender." print
+    ] with-file-appender
+] unit-test
+
+[ ] [
+    "test-bar.txt" temp-file ascii [
+        "Hello appender." print
+    ] with-file-appender
+] unit-test
+
+[ "Hello world.\nHello appender.\n" ] [
+    "test-foo.txt" temp-file ascii file-contents
+] unit-test
+
+[ "Hello appender.\n" ] [
+    "test-bar.txt" temp-file ascii file-contents
+] unit-test
+
+[ ] [ "test-foo.txt" temp-file delete-file ] unit-test
+
+[ ] [ "test-bar.txt" temp-file delete-file ] unit-test
+
+[ f ] [ "test-foo.txt" temp-file exists? ] unit-test
+
+[ f ] [ "test-bar.txt" temp-file exists? ] unit-test
+
+[ "test-blah" temp-file delete-tree ] ignore-errors
+
+[ ] [ "test-blah" temp-file make-directory ] unit-test
+
+[ ] [
+    "test-blah/fooz" temp-file ascii <file-writer> dispose
+] unit-test
+
+[ t ] [
+    "test-blah/fooz" temp-file exists?
+] unit-test
+
+[ ] [ "test-blah/fooz" temp-file delete-file ] unit-test
+
+[ ] [ "test-blah" temp-file delete-directory ] unit-test
+
+[ f ] [ "test-blah" temp-file exists? ] unit-test
+
+[ ] [ "delete-tree-test/a/b/c" temp-file make-directories ] unit-test
+
+[ ] [
+    { "Hi" }
+    "delete-tree-test/a/b/c/d" temp-file ascii set-file-lines
+] unit-test
+
+[ ] [
+    "delete-tree-test" temp-file delete-tree
+] unit-test
+
+[ ] [
+    "copy-tree-test/a/b/c" temp-file make-directories
+] unit-test
+
+[ ] [
+    "Foobar"
+    "copy-tree-test/a/b/c/d" temp-file
+    ascii set-file-contents
+] unit-test
+
+[ ] [
+    "copy-tree-test" temp-file
+    "copy-destination" temp-file copy-tree
+] unit-test
+
+[ "Foobar" ] [
+    "copy-destination/a/b/c/d" temp-file ascii file-contents
+] unit-test
+
+[ ] [
+    "copy-destination" temp-file delete-tree
+] unit-test
+
+[ ] [
+    "copy-tree-test" temp-file
+    "copy-destination" temp-file copy-tree-into
+] unit-test
+
+[ "Foobar" ] [
+    "copy-destination/copy-tree-test/a/b/c/d" temp-file ascii file-contents
+] unit-test
+
+[ ] [
+    "copy-destination/copy-tree-test/a/b/c/d" temp-file "" temp-file copy-file-into
+] unit-test
+
+[ "Foobar" ] [
+    "d" temp-file ascii file-contents
+] unit-test
+
+[ ] [ "d" temp-file delete-file ] unit-test
+
+[ ] [ "copy-destination" temp-file delete-tree ] unit-test
+
+[ ] [ "copy-tree-test" temp-file delete-tree ] unit-test
diff --git a/basis/io/directories/directories.factor b/basis/io/directories/directories.factor
new file mode 100755 (executable)
index 0000000..6ae55b7
--- /dev/null
@@ -0,0 +1,90 @@
+! Copyright (C) 2004, 2008 Slava Pestov, Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors combinators destructors io io.backend
+io.encodings.binary io.files io.pathnames kernel namespaces
+sequences system vocabs.loader fry ;
+IN: io.directories
+
+: set-current-directory ( path -- )
+    (normalize-path) current-directory set ;
+
+: with-directory ( path quot -- )
+    [ (normalize-path) current-directory ] dip with-variable ; inline
+
+! Creating directories
+HOOK: make-directory io-backend ( path -- )
+
+: make-directories ( path -- )
+    normalize-path trim-right-separators {
+        { [ dup "." = ] [ ] }
+        { [ dup root-directory? ] [ ] }
+        { [ dup empty? ] [ ] }
+        { [ dup exists? ] [ ] }
+        [
+            dup parent-directory make-directories
+            dup make-directory
+        ]
+    } cond drop ;
+
+! Listing directories
+TUPLE: directory-entry name type ;
+
+HOOK: >directory-entry os ( byte-array -- directory-entry )
+
+HOOK: (directory-entries) os ( path -- seq )
+
+: directory-entries ( path -- seq )
+    normalize-path
+    (directory-entries)
+    [ name>> { "." ".." } member? not ] filter ;
+    
+: directory-files ( path -- seq )
+    directory-entries [ name>> ] map ;
+
+: with-directory-entries ( path quot -- )
+    '[ "" directory-entries @ ] with-directory ; inline
+
+: with-directory-files ( path quot -- )
+    '[ "" directory-files @ ] with-directory ; inline
+
+! Touching files
+HOOK: touch-file io-backend ( path -- )
+
+! Deleting files
+HOOK: delete-file io-backend ( path -- )
+
+HOOK: delete-directory io-backend ( path -- )
+
+: to-directory ( from to -- from to' )
+    over file-name append-path ;
+
+! Moving and renaming files
+HOOK: move-file io-backend ( from to -- )
+
+: move-file-into ( from to -- )
+    to-directory move-file ;
+
+: move-files-into ( files to -- )
+    '[ _ move-file-into ] each ;
+
+! Copying files
+HOOK: copy-file io-backend ( from to -- )
+
+M: object copy-file
+    dup parent-directory make-directories
+    binary <file-writer> [
+        swap binary <file-reader> [
+            swap stream-copy
+        ] with-disposal
+    ] with-disposal ;
+
+: copy-file-into ( from to -- )
+    to-directory copy-file ;
+
+: copy-files-into ( files to -- )
+    '[ _ copy-file-into ] each ;
+
+{
+    { [ os unix? ] [ "io.directories.unix" require ] }
+    { [ os windows? ] [ "io.directories.windows" require ] }
+} cond
\ No newline at end of file
diff --git a/basis/io/directories/hierarchy/authors.txt b/basis/io/directories/hierarchy/authors.txt
new file mode 100644 (file)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/basis/io/directories/hierarchy/hierarchy-docs.factor b/basis/io/directories/hierarchy/hierarchy-docs.factor
new file mode 100644 (file)
index 0000000..8b3ca73
--- /dev/null
@@ -0,0 +1,36 @@
+USING: help.markup help.syntax ;
+IN: io.directories.hierarchy
+
+HELP: delete-tree
+{ $values { "path" "a pathname string" } }
+{ $description "Deletes a file or directory, recursing into subdirectories." }
+{ $errors "Throws an error if the deletion fails." } 
+{ $warning "Misuse of this word can lead to catastrophic data loss." } ;
+
+HELP: copy-tree
+{ $values { "from" "a pathname string" } { "to" "a pathname string" } }
+{ $description "Copies a directory tree recursively." }
+{ $notes "This operation attempts to preserve original file attributes, however not all attributes may be preserved." }
+{ $errors "Throws an error if the copy operation fails." } ;
+
+HELP: copy-tree-into
+{ $values { "from" "a pathname string" } { "to" "a directory pathname string" } }
+{ $description "Copies a directory tree to another directory, recursively." }
+{ $errors "Throws an error if the copy operation fails." } ;
+
+HELP: copy-trees-into
+{ $values { "files" "a sequence of pathname strings" } { "to" "a directory pathname string" } }
+{ $description "Copies a set of directory trees to another directory, recursively." }
+{ $errors "Throws an error if the copy operation fails." } ;
+
+ARTICLE: "io.directories.hierarchy" "Directory hierarchy manipulation"
+"The " { $vocab-link "io.directories.hierarchy" } " vocabulary defines words for operating on directory hierarchies recursively."
+$nl
+"Deleting directory trees recursively:"
+{ $subsection delete-tree }
+"Copying directory trees recursively:"
+{ $subsection copy-tree }
+{ $subsection copy-tree-into }
+{ $subsection copy-trees-into } ;
+
+ABOUT: "io.directories.hierarchy"
diff --git a/basis/io/directories/hierarchy/hierarchy.factor b/basis/io/directories/hierarchy/hierarchy.factor
new file mode 100644 (file)
index 0000000..555f001
--- /dev/null
@@ -0,0 +1,31 @@
+! Copyright (C) 2004, 2008 Slava Pestov, Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel accessors sequences combinators fry io.directories
+io.pathnames io.files.info io.files.types io.files.links
+io.backend ;
+IN: io.directories.hierarchy
+
+: delete-tree ( path -- )
+    dup link-info directory? [
+        [ [ [ delete-tree ] each ] with-directory-files ]
+        [ delete-directory ]
+        bi
+    ] [ delete-file ] if ;
+
+DEFER: copy-tree-into
+
+: copy-tree ( from to -- )
+    normalize-path
+    over link-info type>>
+    {
+        { +symbolic-link+ [ copy-link ] }
+        { +directory+ [ '[ [ _ copy-tree-into ] each ] with-directory-files ] }
+        [ drop copy-file ]
+    } case ;
+
+: copy-tree-into ( from to -- )
+    to-directory copy-tree ;
+
+: copy-trees-into ( files to -- )
+    '[ _ copy-tree-into ] each ;
+
diff --git a/basis/io/directories/hierarchy/summary.txt b/basis/io/directories/hierarchy/summary.txt
new file mode 100644 (file)
index 0000000..3480f88
--- /dev/null
@@ -0,0 +1 @@
+Deleting and copying directory hierarchies
diff --git a/basis/io/directories/search/authors.txt b/basis/io/directories/search/authors.txt
new file mode 100755 (executable)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/basis/io/directories/search/search-docs.factor b/basis/io/directories/search/search-docs.factor
new file mode 100644 (file)
index 0000000..99135b7
--- /dev/null
@@ -0,0 +1,66 @@
+! Copyright (C) 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax kernel quotations ;
+IN: io.directories.search
+
+HELP: each-file
+{ $values
+     { "path" "a pathname string" } { "bfs?" "a boolean, breadth-first or depth-first" } { "quot" quotation }
+}
+{ $description "Performs a directory traversal, breadth-first or depth-first, and calls the quotation on the full pathname of each file." }
+{ $examples
+    { $unchecked-example "USING: sequences io.directories.search ;"
+        "\"resource:misc\" t [ . ] each-file"
+        "! Recursive directory listing prints here"
+    }
+} ;
+
+HELP: recursive-directory
+{ $values
+     { "path" "a pathname string" } { "bfs?" "a boolean, breadth-first or depth-first" }
+     { "paths" "a sequence of pathname strings" }
+}
+{ $description "Traverses a directory path recursively and returns a sequence of files in a breadth-first or depth-first manner." } ;
+
+HELP: find-file
+{ $values
+     { "path" "a pathname string" } { "bfs?" "a boolean, breadth-first or depth-first" } { "quot" quotation }
+     { "path/f" "a pathname string or f" }
+}
+{ $description "Finds the first file in the input directory matching the predicate quotation in a breadth-first or depth-first traversal." } ;
+
+HELP: find-in-directories
+{ $values
+     { "directories" "a sequence of pathnames" } { "bfs?" "a boolean, breadth-first or depth-first" } { "quot" quotation }
+     { "path'/f" "a pathname string or f" }
+}
+{ $description "Finds the first file in the input directories matching the predicate quotation in a breadth-first or depth-first traversal." } ;
+
+HELP: find-all-files
+{ $values
+     { "path" "a pathname string" } { "bfs?" "a boolean, breadth-first or depth-first" } { "quot" quotation }
+     { "paths/f" "a sequence of pathname strings or f" }
+}
+{ $description "Finds all files in the input directory matching the predicate quotation in a breadth-first or depth-first traversal." } ;
+
+HELP: find-all-in-directories
+{ $values
+     { "directories" "a sequence of directory paths" } { "bfs?" "a boolean, breadth-first or depth-first" } { "quot" quotation }
+     { "paths/f" "a sequence of pathname strings or f" }
+}
+{ $description "Finds all files in the input directories matching the predicate quotation in a breadth-first or depth-first traversal." } ;
+
+{ find-file find-all-files find-in-directories find-all-in-directories } related-words
+
+ARTICLE: "io.directories.search" "Searching directories"
+"The " { $vocab-link "io.directories.search" } " vocabulary contains words used for recursively iterating over a directory and for finding files in a directory tree." $nl
+"Traversing directories:"
+{ $subsection recursive-directory }
+{ $subsection each-file }
+"Finding files:"
+{ $subsection find-file }
+{ $subsection find-all-files }
+{ $subsection find-in-directories }
+{ $subsection find-all-in-directories } ;
+
+ABOUT: "io.directories.search"
diff --git a/basis/io/directories/search/search-tests.factor b/basis/io/directories/search/search-tests.factor
new file mode 100644 (file)
index 0000000..a8b8bf9
--- /dev/null
@@ -0,0 +1,10 @@
+USING: io.directories.search io.files io.files.unique
+io.pathnames kernel namespaces sequences sorting tools.test ;
+IN: io.directories.search.tests
+
+[ t ] [
+    [
+        10 [ "io.paths.test" "gogogo" make-unique-file ] replicate
+        current-temporary-directory get t [ ] find-all-files
+    ] with-unique-directory drop [ natural-sort ] bi@ =
+] unit-test
diff --git a/basis/io/directories/search/search.factor b/basis/io/directories/search/search.factor
new file mode 100755 (executable)
index 0000000..41031f8
--- /dev/null
@@ -0,0 +1,66 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors arrays continuations deques dlists fry
+io.directories io.files io.files.info io.pathnames kernel
+sequences system vocabs.loader ;
+IN: io.directories.search
+
+<PRIVATE
+
+TUPLE: directory-iterator path bfs queue ;
+
+: qualified-directory ( path -- seq )
+    dup directory-files [ append-path ] with map ;
+
+: push-directory ( path iter -- )
+    [ qualified-directory ] dip [
+        [ queue>> ] [ bfs>> ] bi
+        [ push-front ] [ push-back ] if
+    ] curry each ;
+
+: <directory-iterator> ( path bfs? -- iterator )
+    <dlist> directory-iterator boa
+    dup path>> over push-directory ;
+
+: next-file ( iter -- file/f )
+    dup queue>> deque-empty? [ drop f ] [
+        dup queue>> pop-back dup link-info directory?
+        [ over push-directory next-file ] [ nip ] if
+    ] if ;
+
+: iterate-directory ( iter quot: ( obj -- ? ) -- obj )
+    over next-file [
+        over call
+        [ 2nip ] [ iterate-directory ] if*
+    ] [
+        2drop f
+    ] if* ; inline recursive
+
+PRIVATE>
+
+: each-file ( path bfs? quot: ( obj -- ) -- )
+    [ <directory-iterator> ] dip
+    [ f ] compose iterate-directory drop ; inline
+
+: recursive-directory ( path bfs? -- paths )
+    [ ] accumulator [ each-file ] dip ;
+
+: find-file ( path bfs? quot: ( obj -- ? ) -- path/f )
+    '[
+        _ _ _ [ <directory-iterator> ] dip
+        [ keep and ] curry iterate-directory
+    ] [ drop f ] recover ; inline
+
+: find-all-files ( path bfs? quot: ( obj -- ? ) -- paths/f )
+    '[
+        _ _ _ [ <directory-iterator> ] dip
+        pusher [ [ f ] compose iterate-directory drop ] dip
+    ] [ drop f ] recover ; inline
+
+: find-in-directories ( directories bfs? quot: ( obj -- ? ) -- path'/f )
+    '[ _ _ find-file ] attempt-all ;
+
+: find-all-in-directories ( directories bfs? quot: ( obj -- ? ) -- paths/f )
+    '[ _ _ find-all-files ] map concat ;
+
+os windows? [ "io.directories.search.windows" require ] when
diff --git a/basis/io/directories/search/windows/authors.txt b/basis/io/directories/search/windows/authors.txt
new file mode 100644 (file)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/basis/io/directories/search/windows/tags.txt b/basis/io/directories/search/windows/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/directories/search/windows/windows.factor b/basis/io/directories/search/windows/windows.factor
new file mode 100644 (file)
index 0000000..755710b
--- /dev/null
@@ -0,0 +1,13 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: arrays fry io.pathnames kernel sequences windows.shell32
+io.directories.search ;
+IN: io.directories.search.windows
+
+: program-files-directories ( -- array )
+    program-files program-files-x86 2array harvest ; inline
+
+: find-in-program-files ( base-directory bfs? quot -- path )
+    [
+        [ program-files-directories ] dip '[ _ append-path ] map
+    ] 2dip find-in-directories ; inline
diff --git a/basis/io/directories/summary.txt b/basis/io/directories/summary.txt
new file mode 100644 (file)
index 0000000..b770122
--- /dev/null
@@ -0,0 +1 @@
+Listing directories, moving, copying and deleting files
diff --git a/basis/io/directories/unix/tags.txt b/basis/io/directories/unix/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/directories/unix/unix.factor b/basis/io/directories/unix/unix.factor
new file mode 100644 (file)
index 0000000..1ef80b3
--- /dev/null
@@ -0,0 +1,73 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors alien.c-types alien.strings combinators
+continuations destructors fry io io.backend io.backend.unix
+io.directories io.encodings.binary io.encodings.utf8 io.files
+io.pathnames io.files.types kernel math.bitwise sequences system
+unix unix.stat ;
+IN: io.directories.unix
+
+: touch-mode ( -- n )
+    { O_WRONLY O_APPEND O_CREAT O_EXCL } flags ; foldable
+
+M: unix touch-file ( path -- )
+    normalize-path
+    dup exists? [ touch ] [
+        touch-mode file-mode open-file close-file
+    ] if ;
+
+M: unix move-file ( from to -- )
+    [ normalize-path ] bi@ rename io-error ;
+
+M: unix delete-file ( path -- ) normalize-path unlink-file ;
+
+M: unix make-directory ( path -- )
+    normalize-path OCT: 777 mkdir io-error ;
+
+M: unix delete-directory ( path -- )
+    normalize-path rmdir io-error ;
+
+: (copy-file) ( from to -- )
+    dup parent-directory make-directories
+    binary <file-writer> [
+        swap binary <file-reader> [
+            swap stream-copy
+        ] with-disposal
+    ] with-disposal ;
+
+M: unix copy-file ( from to -- )
+    [ normalize-path ] bi@ (copy-file) ;
+
+: with-unix-directory ( path quot -- )
+    [ opendir dup [ (io-error) ] unless ] dip
+    dupd curry swap '[ _ closedir io-error ] [ ] cleanup ; inline
+
+: find-next-file ( DIR* -- byte-array )
+    "dirent" <c-object>
+    f <void*>
+    [ readdir_r 0 = [ (io-error) ] unless ] 2keep
+    *void* [ drop f ] unless ;
+
+: dirent-type>file-type ( ch -- type )
+    {
+        { DT_BLK  [ +block-device+ ] }
+        { DT_CHR  [ +character-device+ ] }
+        { DT_DIR  [ +directory+ ] }
+        { DT_LNK  [ +symbolic-link+ ] }
+        { DT_SOCK [ +socket+ ] }
+        { DT_FIFO [ +fifo+ ] }
+        { DT_REG  [ +regular-file+ ] }
+        { DT_WHT  [ +whiteout+ ] }
+        [ drop +unknown+ ]
+    } case ;
+
+M: unix >directory-entry ( byte-array -- directory-entry )
+    [ dirent-d_name utf8 alien>string ]
+    [ dirent-d_type dirent-type>file-type ] bi directory-entry boa ;
+
+M: unix (directory-entries) ( path -- seq )
+    [
+        '[ _ find-next-file dup ]
+        [ >directory-entry ]
+        [ drop ] produce
+    ] with-unix-directory ;
diff --git a/basis/io/directories/windows/tags.txt b/basis/io/directories/windows/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/directories/windows/windows.factor b/basis/io/directories/windows/windows.factor
new file mode 100755 (executable)
index 0000000..a6dacc1
--- /dev/null
@@ -0,0 +1,68 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: system io.directories io.encodings.utf16n alien.strings
+io.pathnames io.backend io.files.windows destructors
+kernel accessors calendar windows windows.errors
+windows.kernel32 alien.c-types sequences splitting
+fry continuations ;
+IN: io.directories.windows
+
+M: windows touch-file ( path -- )
+    [
+        normalize-path
+        maybe-create-file [ &dispose ] dip
+        [ drop ] [ handle>> f now dup (set-file-times) ] if
+    ] with-destructors ;
+
+M: windows move-file ( from to -- )
+    [ normalize-path ] bi@ MoveFile win32-error=0/f ;
+
+M: windows delete-file ( path -- )
+    normalize-path DeleteFile win32-error=0/f ;
+
+M: windows copy-file ( from to -- )
+    dup parent-directory make-directories
+    [ normalize-path ] bi@ 0 CopyFile win32-error=0/f ;
+
+M: windows make-directory ( path -- )
+    normalize-path
+    f CreateDirectory win32-error=0/f ;
+
+M: windows delete-directory ( path -- )
+    normalize-path
+    RemoveDirectory win32-error=0/f ;
+
+: find-first-file ( path -- WIN32_FIND_DATA handle )
+    "WIN32_FIND_DATA" <c-object>
+    [ nip ] [ FindFirstFile ] 2bi
+    [ INVALID_HANDLE_VALUE = [ win32-error-string throw ] when ] keep ;
+
+: find-next-file ( path -- WIN32_FIND_DATA/f )
+    "WIN32_FIND_DATA" <c-object>
+    [ nip ] [ FindNextFile ] 2bi 0 = [
+        GetLastError ERROR_NO_MORE_FILES = [
+            win32-error
+        ] unless drop f
+    ] when ;
+
+TUPLE: windows-directory-entry < directory-entry attributes ;
+
+M: windows >directory-entry ( byte-array -- directory-entry )
+    [ WIN32_FIND_DATA-cFileName utf16n alien>string ]
+    [ WIN32_FIND_DATA-dwFileAttributes win32-file-type ]
+    [ WIN32_FIND_DATA-dwFileAttributes win32-file-attributes ]
+    tri
+    dupd remove windows-directory-entry boa ;
+
+M: windows (directory-entries) ( path -- seq )
+    "\\" ?tail drop "\\*" append
+    find-first-file [ >directory-entry ] dip
+    [
+        '[
+            [ _ find-next-file dup ]
+            [ >directory-entry ]
+            [ drop ] produce
+            over name>> "." = [ nip ] [ swap prefix ] if
+        ]
+    ] [ '[ _ FindClose win32-error=0/f ] ] bi [ ] cleanup ;
+
index 8f5e955998ec929a3f8c0afd496da3df975b5a77..9ba4fcf44db598372a9b0d5e88922cee0fc4c304 100644 (file)
@@ -4,7 +4,7 @@ USING: help.syntax help.markup io.encodings.8-bit.private
 strings ;
 IN: io.encodings.8-bit
 
-ARTICLE: "io.encodings.8-bit" "8-bit encodings"
+ARTICLE: "io.encodings.8-bit" "Legacy 8-bit encodings"
 "Many encodings are a simple mapping of bytes onto characters. The " { $vocab-link "io.encodings.8-bit" } " vocabulary implements these generically using existing resource files. These encodings should be used with extreme caution, as fully general Unicode encodings like UTF-8 are nearly always more appropriate. The following 8-bit encodings are already defined:"
 { $subsection latin1 }
 { $subsection latin2 }
index 2cafb6be479e336d8303c3cc454009f355c2d707..6ac0ed399e6ba3762939193218708c154f3fa0d0 100644 (file)
@@ -2,7 +2,8 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: math.parser arrays io.encodings sequences kernel assocs
 hashtables io.encodings.ascii generic parser classes.tuple words
-io io.files splitting namespaces math compiler.units accessors ;
+words.symbol io io.files splitting namespaces math
+compiler.units accessors ;
 IN: io.encodings.8-bit
 
 <PRIVATE
index 0803ba3871be14008780484d1829759e87a525a5..d971cf2e60ad26bd2e064a00e7fa8262d783f9cc 100644 (file)
@@ -9,7 +9,8 @@ IN: io.encodings.ascii
 
 : decode-if< ( stream encoding max -- character )
     nip swap stream-read1 dup
-    [ tuck > [ >fixnum ] [ drop replacement-char ] if ] [ 2drop f ] if ; inline
+    [ [ nip ] [ > ] 2bi [ >fixnum ] [ drop replacement-char ] if ]
+    [ 2drop f ] if ; inline
 PRIVATE>
 
 SINGLETON: ascii
diff --git a/basis/io/encodings/binary/authors.txt b/basis/io/encodings/binary/authors.txt
new file mode 100644 (file)
index 0000000..f990dd0
--- /dev/null
@@ -0,0 +1 @@
+Daniel Ehrenberg
diff --git a/basis/io/encodings/binary/binary-docs.factor b/basis/io/encodings/binary/binary-docs.factor
new file mode 100644 (file)
index 0000000..4da1e08
--- /dev/null
@@ -0,0 +1,11 @@
+USING: help.syntax help.markup ;
+IN: io.encodings.binary
+
+HELP: binary
+{ $class-description "Encoding descriptor for binary I/O." } ;
+
+ARTICLE: "io.encodings.binary" "Binary encoding"
+"Making an encoded stream with the binary encoding is a no-op; streams with this encoding deal with byte-arrays, not strings." 
+{ $subsection binary } ;
+
+ABOUT: "io.encodings.binary"
diff --git a/basis/io/encodings/binary/binary.factor b/basis/io/encodings/binary/binary.factor
new file mode 100644 (file)
index 0000000..e54163f
--- /dev/null
@@ -0,0 +1,8 @@
+! Copyright (C) 2008 Daniel Ehrenberg.
+! See http://factorcode.org/license.txt for BSD license.
+USING: io.encodings kernel ;
+IN: io.encodings.binary
+
+SINGLETON: binary
+M: binary <encoder> drop ;
+M: binary <decoder> drop ;
diff --git a/basis/io/encodings/binary/summary.txt b/basis/io/encodings/binary/summary.txt
new file mode 100644 (file)
index 0000000..a1eb4bc
--- /dev/null
@@ -0,0 +1 @@
+Dummy encoding for binary I/O
diff --git a/basis/io/encodings/binary/tags.txt b/basis/io/encodings/binary/tags.txt
new file mode 100644 (file)
index 0000000..8e27be7
--- /dev/null
@@ -0,0 +1 @@
+text
diff --git a/basis/io/files/info/authors.txt b/basis/io/files/info/authors.txt
new file mode 100644 (file)
index 0000000..f372b57
--- /dev/null
@@ -0,0 +1,2 @@
+Slava Pestov
+Doug Coleman
diff --git a/basis/io/files/info/info-docs.factor b/basis/io/files/info/info-docs.factor
new file mode 100644 (file)
index 0000000..8db780f
--- /dev/null
@@ -0,0 +1,41 @@
+USING: help.markup help.syntax arrays io.files ;
+IN: io.files.info
+
+HELP: file-info
+{ $values { "path" "a pathname string" } { "info" file-info } }
+{ $description "Queries the file system for metadata. If " { $snippet "path" } " refers to a symbolic link, it is followed. See the article " { $link "file-types" } " for a list of metadata symbols." }
+{ $errors "Throws an error if the file does not exist." } ;
+
+HELP: link-info
+{ $values { "path" "a pathname string" } { "info" "a file-info tuple" } }
+{ $description "Queries the file system for metadata. If path refers to a symbolic link, information about the symbolic link itself is returned. If the file does not exist, an exception is thrown." } ;
+
+{ file-info link-info } related-words
+
+HELP: directory?
+{ $values { "file-info" file-info } { "?" "a boolean" } }
+{ $description "Tests if " { $snippet "file-info" } " is a directory." } ;
+
+HELP: file-systems
+{ $values { "array" array } }
+{ $description "Returns an array of " { $link file-system-info } " objects returned by iterating the mount points and calling " { $link file-system-info } " on each." } ;
+
+HELP: file-system-info
+{ $values
+{ "path" "a pathname string" }
+{ "file-system-info" file-system-info } }
+{ $description "Returns a platform-specific object describing the file-system that contains the path. The cross-platform slot is " { $slot "free-space" } "." } ;
+
+ARTICLE: "io.files.info" "File system meta-data"
+"File meta-data:"
+{ $subsection file-info }
+{ $subsection link-info }
+{ $subsection exists? }
+{ $subsection directory? }
+"File types:"
+{ $subsection "file-types" }
+"File system meta-data:"
+{ $subsection file-system-info }
+{ $subsection file-systems } ;
+
+ABOUT: "io.files.info"
diff --git a/basis/io/files/info/info-tests.factor b/basis/io/files/info/info-tests.factor
new file mode 100644 (file)
index 0000000..b94bc06
--- /dev/null
@@ -0,0 +1,19 @@
+USING: io.files.info io.pathnames io.encodings.utf8 io.files
+io.directories kernel io.pathnames accessors tools.test
+sequences io.files.temp ;
+IN: io.files.info.tests
+
+\ file-info must-infer
+\ link-info must-infer
+
+[ t ] [
+    temp-directory [ "hi41" "test41" utf8 set-file-contents ] with-directory
+    temp-directory "test41" append-path utf8 file-contents "hi41" =
+] unit-test
+
+[ t ] [
+    temp-directory [ "test41" file-info size>> ] with-directory 4 =
+] unit-test
+
+[ t ] [ "/" file-system-info file-system-info? ] unit-test
+[ t ] [ file-systems [ file-system-info? ] all? ] unit-test
diff --git a/basis/io/files/info/info.factor b/basis/io/files/info/info.factor
new file mode 100644 (file)
index 0000000..fd21850
--- /dev/null
@@ -0,0 +1,28 @@
+! Copyright (C) 2008 Doug Coleman, Eduardo Cavazos.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors kernel system sequences combinators
+vocabs.loader io.files.types ;
+IN: io.files.info
+
+! File info
+TUPLE: file-info type size permissions created modified
+accessed ;
+
+HOOK: file-info os ( path -- info )
+
+HOOK: link-info os ( path -- info )
+
+: directory? ( file-info -- ? ) type>> +directory+ = ;
+
+! File systems
+HOOK: file-systems os ( -- array )
+
+TUPLE: file-system-info device-name mount-point type
+available-space free-space used-space total-space ;
+
+HOOK: file-system-info os ( path -- file-system-info )
+
+{
+    { [ os unix? ] [ "io.files.info.unix." os name>> append ] }
+    { [ os windows? ] [ "io.files.info.windows" ] }
+} cond require
\ No newline at end of file
diff --git a/basis/io/files/info/summary.txt b/basis/io/files/info/summary.txt
new file mode 100644 (file)
index 0000000..5d354fb
--- /dev/null
@@ -0,0 +1 @@
+File and file system meta-data
diff --git a/basis/io/files/info/unix/bsd/bsd.factor b/basis/io/files/info/unix/bsd/bsd.factor
new file mode 100644 (file)
index 0000000..6d0f3e7
--- /dev/null
@@ -0,0 +1,21 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel alien.syntax math io.files.unix system
+unix.stat accessors combinators calendar.unix
+io.files.info.unix ;
+IN: io.files.info.unix.bsd
+
+TUPLE: bsd-file-info < unix-file-info birth-time flags gen ;
+
+M: bsd new-file-info ( -- class ) bsd-file-info new ;
+
+M: bsd stat>file-info ( stat -- file-info )
+    [ call-next-method ] keep
+    {
+        [ stat-st_flags >>flags ]
+        [ stat-st_gen >>gen ]
+        [
+            stat-st_birthtimespec timespec>unix-time
+            >>birth-time
+        ]
+    } cleave ;
diff --git a/basis/io/files/info/unix/bsd/tags.txt b/basis/io/files/info/unix/bsd/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/files/info/unix/freebsd/freebsd.factor b/basis/io/files/info/unix/freebsd/freebsd.factor
new file mode 100644 (file)
index 0000000..61d7a1d
--- /dev/null
@@ -0,0 +1,55 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors alien.c-types alien.syntax combinators
+io.backend io.files io.files.info io.files.unix kernel math system unix
+unix.statfs.freebsd unix.statvfs.freebsd unix.getfsstat.freebsd
+sequences grouping alien.strings io.encodings.utf8 unix.types
+specialized-arrays.direct.uint arrays io.files.info.unix ;
+IN: io.files.info.unix.freebsd
+
+TUPLE: freebsd-file-system-info < unix-file-system-info
+version io-size owner syncreads syncwrites asyncreads asyncwrites ;
+
+M: freebsd new-file-system-info freebsd-file-system-info new ;
+
+M: freebsd file-system-statfs ( path -- byte-array )
+    "statfs" <c-object> [ statfs io-error ] keep ;
+
+M: freebsd statfs>file-system-info ( file-system-info statvfs -- file-system-info )
+    {
+        [ statfs-f_version >>version ]
+        [ statfs-f_type >>type ]
+        [ statfs-f_flags >>flags ]
+        [ statfs-f_bsize >>block-size ]
+        [ statfs-f_iosize >>io-size ]
+        [ statfs-f_blocks >>blocks ]
+        [ statfs-f_bfree >>blocks-free ]
+        [ statfs-f_bavail >>blocks-available ]
+        [ statfs-f_files >>files ]
+        [ statfs-f_ffree >>files-free ]
+        [ statfs-f_syncwrites >>syncwrites ]
+        [ statfs-f_asyncwrites >>asyncwrites ]
+        [ statfs-f_syncreads >>syncreads ]
+        [ statfs-f_asyncreads >>asyncreads ]
+        [ statfs-f_namemax >>name-max ]
+        [ statfs-f_owner >>owner ]
+        [ statfs-f_fsid 2 <direct-uint-array> >array >>id ]
+        [ statfs-f_fstypename utf8 alien>string >>type ]
+        [ statfs-f_mntfromname utf8 alien>string >>device-name ]
+        [ statfs-f_mntonname utf8 alien>string >>mount-point ]
+    } cleave ;
+
+M: freebsd file-system-statvfs ( path -- byte-array )
+    "statvfs" <c-object> [ statvfs io-error ] keep ;
+
+M: freebsd statvfs>file-system-info ( file-system-info statvfs -- file-system-info )
+    {
+        [ statvfs-f_favail >>files-available ]
+        [ statvfs-f_frsize >>preferred-block-size ]
+    } cleave ;
+
+M: freebsd file-systems ( -- array )
+    f 0 0 getfsstat dup io-error
+    "statfs" <c-array> dup dup length 0 getfsstat io-error
+    "statfs" heap-size group
+    [ statfs-f_mntonname alien>native-string file-system-info ] map ;
diff --git a/basis/io/files/info/unix/freebsd/tags.txt b/basis/io/files/info/unix/freebsd/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/files/info/unix/linux/linux.factor b/basis/io/files/info/unix/linux/linux.factor
new file mode 100644 (file)
index 0000000..5dddca4
--- /dev/null
@@ -0,0 +1,99 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors alien.c-types alien.syntax combinators csv
+io.backend io.encodings.utf8 io.files io.files.info io.streams.string
+io.files.unix kernel math.order namespaces sequences sorting
+system unix unix.statfs.linux unix.statvfs.linux io.files.links
+specialized-arrays.direct.uint arrays io.files.info.unix assocs
+io.pathnames unix.types ;
+IN: io.files.info.unix.linux
+
+TUPLE: linux-file-system-info < unix-file-system-info
+namelen ;
+
+M: linux new-file-system-info linux-file-system-info new ;
+
+M: linux file-system-statfs ( path -- byte-array )
+    "statfs64" <c-object> [ statfs64 io-error ] keep ;
+
+M: linux statfs>file-system-info ( struct -- statfs )
+    {
+        [ statfs64-f_type >>type ]
+        [ statfs64-f_bsize >>block-size ]
+        [ statfs64-f_blocks >>blocks ]
+        [ statfs64-f_bfree >>blocks-free ]
+        [ statfs64-f_bavail >>blocks-available ]
+        [ statfs64-f_files >>files ]
+        [ statfs64-f_ffree >>files-free ]
+        [ statfs64-f_fsid 2 <direct-uint-array> >array >>id ]
+        [ statfs64-f_namelen >>namelen ]
+        [ statfs64-f_frsize >>preferred-block-size ]
+        ! [ statfs64-f_spare >>spare ]
+    } cleave ;
+
+M: linux file-system-statvfs ( path -- byte-array )
+    "statvfs64" <c-object> [ statvfs64 io-error ] keep ;
+
+M: linux statvfs>file-system-info ( struct -- statfs )
+    {
+        [ statvfs64-f_flag >>flags ]
+        [ statvfs64-f_namemax >>name-max ]
+    } cleave ;
+
+TUPLE: mtab-entry file-system-name mount-point type options
+frequency pass-number ;
+
+: mtab-csv>mtab-entry ( csv -- mtab-entry )
+    [ mtab-entry new ] dip
+    {
+        [ first >>file-system-name ]
+        [ second >>mount-point ]
+        [ third >>type ]
+        [ fourth <string-reader> csv first >>options ]
+        [ 4 swap nth >>frequency ]
+        [ 5 swap nth >>pass-number ]
+    } cleave ;
+
+: parse-mtab ( -- array )
+    [
+        "/etc/mtab" utf8 <file-reader>
+        CHAR: \s delimiter set csv
+    ] with-scope
+    [ mtab-csv>mtab-entry ] map ;
+
+M: linux file-systems
+    parse-mtab [
+        [ mount-point>> file-system-info ] keep
+        {
+            [ file-system-name>> >>device-name ]
+            [ mount-point>> >>mount-point ]
+            [ type>> >>type ]
+        } cleave
+    ] map ;
+
+: (find-mount-point) ( path mtab-paths -- mtab-entry )
+    [ follow-links ] dip 2dup at* [
+        2nip
+    ] [
+        drop [ parent-directory ] dip (find-mount-point)
+    ] if ;
+
+: find-mount-point ( path -- mtab-entry )
+    parse-mtab [ [ mount-point>> ] keep ] H{ } map>assoc (find-mount-point) ;
+
+ERROR: file-system-not-found ;
+
+M: linux file-system-info ( path -- )
+    normalize-path
+    [
+        [ new-file-system-info ] dip
+        [ file-system-statfs statfs>file-system-info ]
+        [ file-system-statvfs statvfs>file-system-info ] bi
+        file-system-calculations
+    ] keep
+    find-mount-point
+    {
+        [ file-system-name>> >>device-name drop ]
+        [ mount-point>> >>mount-point drop ]
+        [ type>> >>type ]
+    } 2cleave ;
diff --git a/basis/io/files/info/unix/linux/tags.txt b/basis/io/files/info/unix/linux/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/files/info/unix/macosx/macosx.factor b/basis/io/files/info/unix/macosx/macosx.factor
new file mode 100644 (file)
index 0000000..cfc13ba
--- /dev/null
@@ -0,0 +1,52 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors alien.c-types alien.strings combinators
+grouping io.encodings.utf8 io.files kernel math sequences
+system unix io.files.unix specialized-arrays.direct.uint arrays
+unix.statfs.macosx unix.statvfs.macosx unix.getfsstat.macosx
+io.files.info.unix io.files.info ;
+IN: io.files.info.unix.macosx
+
+TUPLE: macosx-file-system-info < unix-file-system-info
+io-size owner type-id filesystem-subtype ;
+
+M: macosx file-systems ( -- array )
+    f <void*> dup 0 getmntinfo64 dup io-error
+    [ *void* ] dip
+    "statfs64" heap-size [ * memory>byte-array ] keep group
+    [ statfs64-f_mntonname utf8 alien>string file-system-info ] map ;
+    ! [ [ new-file-system-info ] dip statfs>file-system-info ] map ;
+
+M: macosx new-file-system-info macosx-file-system-info new ;
+
+M: macosx file-system-statfs ( normalized-path -- statfs )
+    "statfs64" <c-object> [ statfs64 io-error ] keep ;
+
+M: macosx file-system-statvfs ( normalized-path -- statvfs )
+    "statvfs" <c-object> [ statvfs io-error ] keep ;
+
+M: macosx statfs>file-system-info ( file-system-info byte-array -- file-system-info' )
+    {
+        [ statfs64-f_bsize >>block-size ]
+        [ statfs64-f_iosize >>io-size ]
+        [ statfs64-f_blocks >>blocks ]
+        [ statfs64-f_bfree >>blocks-free ]
+        [ statfs64-f_bavail >>blocks-available ]
+        [ statfs64-f_files >>files ]
+        [ statfs64-f_ffree >>files-free ]
+        [ statfs64-f_fsid 2 <direct-uint-array> >array >>id ]
+        [ statfs64-f_owner >>owner ]
+        [ statfs64-f_type >>type-id ]
+        [ statfs64-f_flags >>flags ]
+        [ statfs64-f_fssubtype >>filesystem-subtype ]
+        [ statfs64-f_fstypename utf8 alien>string >>type ]
+        [ statfs64-f_mntonname utf8 alien>string >>mount-point ]
+        [ statfs64-f_mntfromname utf8 alien>string >>device-name ]
+    } cleave ;
+
+M: macosx statvfs>file-system-info ( file-system-info byte-array -- file-system-info' )
+    {
+        [ statvfs-f_frsize >>preferred-block-size ]
+        [ statvfs-f_favail >>files-available ]
+        [ statvfs-f_namemax >>name-max ]
+    } cleave ;
diff --git a/basis/io/files/info/unix/macosx/tags.txt b/basis/io/files/info/unix/macosx/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/files/info/unix/netbsd/netbsd.factor b/basis/io/files/info/unix/netbsd/netbsd.factor
new file mode 100644 (file)
index 0000000..4f284b5
--- /dev/null
@@ -0,0 +1,53 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: alien.syntax kernel unix.stat math unix
+combinators system io.backend accessors alien.c-types
+io.encodings.utf8 alien.strings unix.types io.files.unix
+io.files io.files.info unix.statvfs.netbsd unix.getfsstat.netbsd arrays
+grouping sequences io.encodings.utf8
+specialized-arrays.direct.uint io.files.info.unix ;
+IN: io.files.info.unix.netbsd
+
+TUPLE: netbsd-file-system-info < unix-file-system-info
+blocks-reserved files-reserved
+owner io-size sync-reads sync-writes async-reads async-writes
+idx mount-from ;
+
+M: netbsd new-file-system-info netbsd-file-system-info new ;
+
+M: netbsd file-system-statvfs
+    "statvfs" <c-object> [ statvfs io-error ] keep ;
+
+M: netbsd statvfs>file-system-info ( file-system-info statvfs -- file-system-info' )
+    {
+        [ statvfs-f_flag >>flags ]
+        [ statvfs-f_bsize >>block-size ]
+        [ statvfs-f_frsize >>preferred-block-size ]
+        [ statvfs-f_iosize >>io-size ]
+        [ statvfs-f_blocks >>blocks ]
+        [ statvfs-f_bfree >>blocks-free ]
+        [ statvfs-f_bavail >>blocks-available ]
+        [ statvfs-f_bresvd >>blocks-reserved ]
+        [ statvfs-f_files >>files ]
+        [ statvfs-f_ffree >>files-free ]
+        [ statvfs-f_favail >>files-available ]
+        [ statvfs-f_fresvd >>files-reserved ]
+        [ statvfs-f_syncreads >>sync-reads ]
+        [ statvfs-f_syncwrites >>sync-writes ]
+        [ statvfs-f_asyncreads >>async-reads ]
+        [ statvfs-f_asyncwrites >>async-writes ]
+        [ statvfs-f_fsidx 2 <direct-uint-array> >array >>idx ]
+        [ statvfs-f_fsid >>id ]
+        [ statvfs-f_namemax >>name-max ]
+        [ statvfs-f_owner >>owner ]
+        ! [ statvfs-f_spare >>spare ]
+        [ statvfs-f_fstypename utf8 alien>string >>type ]
+        [ statvfs-f_mntonname utf8 alien>string >>mount-point ]
+        [ statvfs-f_mntfromname utf8 alien>string >>device-name ]
+    } cleave ;
+
+M: netbsd file-systems ( -- array )
+    f 0 0 getvfsstat dup io-error
+    "statvfs" <c-array> dup dup length 0 getvfsstat io-error
+    "statvfs" heap-size group
+    [ statvfs-f_mntonname utf8 alien>string file-system-info ] map ;
diff --git a/basis/io/files/info/unix/netbsd/tags.txt b/basis/io/files/info/unix/netbsd/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/files/info/unix/openbsd/openbsd.factor b/basis/io/files/info/unix/openbsd/openbsd.factor
new file mode 100644 (file)
index 0000000..0fe4c4b
--- /dev/null
@@ -0,0 +1,55 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors alien.c-types alien.strings alien.syntax
+combinators io.backend io.files io.files.info io.files.unix kernel math
+sequences system unix unix.getfsstat.openbsd grouping
+unix.statfs.openbsd unix.statvfs.openbsd unix.types
+specialized-arrays.direct.uint arrays io.files.info.unix ;
+IN: io.files.unix.openbsd
+
+TUPLE: freebsd-file-system-info < unix-file-system-info
+io-size sync-writes sync-reads async-writes async-reads 
+owner ;
+
+M: openbsd new-file-system-info freebsd-file-system-info new ;
+
+M: openbsd file-system-statfs
+    "statfs" <c-object> [ statfs io-error ] keep ;
+
+M: openbsd statfs>file-system-info ( file-system-info statfs -- file-system-info' )
+    {
+        [ statfs-f_flags >>flags ]
+        [ statfs-f_bsize >>block-size ]
+        [ statfs-f_iosize >>io-size ]
+        [ statfs-f_blocks >>blocks ]
+        [ statfs-f_bfree >>blocks-free ]
+        [ statfs-f_bavail >>blocks-available ]
+        [ statfs-f_files >>files ]
+        [ statfs-f_ffree >>files-free ]
+        [ statfs-f_favail >>files-available ]
+        [ statfs-f_syncwrites >>sync-writes ]
+        [ statfs-f_syncreads >>sync-reads ]
+        [ statfs-f_asyncwrites >>async-writes ]
+        [ statfs-f_asyncreads >>async-reads ]
+        [ statfs-f_fsid 2 <direct-uint-array> >array >>id ]
+        [ statfs-f_namemax >>name-max ]
+        [ statfs-f_owner >>owner ]
+        ! [ statfs-f_spare >>spare ]
+        [ statfs-f_fstypename alien>native-string >>type ]
+        [ statfs-f_mntonname alien>native-string >>mount-point ]
+        [ statfs-f_mntfromname alien>native-string >>device-name ]
+    } cleave ;
+
+M: openbsd file-system-statvfs ( normalized-path -- statvfs )
+    "statvfs" <c-object> [ statvfs io-error ] keep ;
+
+M: openbsd statvfs>file-system-info ( file-system-info statvfs -- file-system-info' )
+    {
+        [ statvfs-f_frsize >>preferred-block-size ]
+    } cleave ;
+
+M: openbsd file-systems ( -- seq )
+    f 0 0 getfsstat dup io-error
+    "statfs" <c-array> dup dup length 0 getfsstat io-error 
+    "statfs" heap-size group 
+    [ statfs-f_mntonname alien>native-string file-system-info ] map ;
diff --git a/basis/io/files/info/unix/openbsd/tags.txt b/basis/io/files/info/unix/openbsd/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/files/info/unix/tags.txt b/basis/io/files/info/unix/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/files/info/unix/unix-docs.factor b/basis/io/files/info/unix/unix-docs.factor
new file mode 100644 (file)
index 0000000..a6ee2b9
--- /dev/null
@@ -0,0 +1,277 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: classes help.markup help.syntax io.streams.string
+strings math calendar io.files.info io.files.info.unix ;
+IN: io.files.unix
+
+HELP: file-group-id
+{ $values
+     { "path" "a pathname string" }
+     { "gid" integer } }
+{ $description "Returns the group id for a given file." } ;
+
+HELP: file-group-name
+{ $values
+     { "path" "a pathname string" }
+     { "string" string } }
+{ $description "Returns the group name for a given file." } ;
+
+HELP: file-permissions
+{ $values
+     { "path" "a pathname string" }
+     { "n" integer } }
+{ $description "Returns the Unix file permissions for a given file." } ;
+
+HELP: file-user-name
+{ $values
+     { "path" "a pathname string" }
+     { "string" string } }
+{ $description "Returns the user-name for a given file." } ;
+
+HELP: file-user-id
+{ $values
+     { "path" "a pathname string" }
+     { "uid" integer } }
+{ $description "Returns the user id for a given file." } ;
+
+HELP: group-execute?
+{ $values
+     { "obj" "a pathname string or an integer" }
+     { "?" "a boolean" } }
+{ $description "Tests whether the " { $snippet "group execute" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
+
+HELP: group-read?
+{ $values
+     { "obj" "a pathname string, file-info object, or an integer" }
+     { "?" "a boolean" } }
+{ $description "Tests whether the " { $snippet "group read" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
+
+HELP: group-write?
+{ $values
+     { "obj" "a pathname string, file-info object, or an integer" }
+     { "?" "a boolean" } }
+{ $description "Tests whether the " { $snippet "group write" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
+
+HELP: other-execute?
+{ $values
+     { "obj" "a pathname string, file-info object, or an integer" }
+     { "?" "a boolean" } }
+{ $description "Tests whether the " { $snippet "other execute" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
+
+HELP: other-read?
+{ $values
+     { "obj" "a pathname string, file-info object, or an integer" }
+     { "?" "a boolean" } }
+{ $description "Tests whether the " { $snippet "other read" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
+
+HELP: other-write?
+{ $values
+     { "obj" "a pathname string, file-info object, or an integer" }
+     { "?" "a boolean" } }
+{ $description "Tests whether the " { $snippet "other write" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
+
+HELP: set-file-access-time
+{ $values
+     { "path" "a pathname string" } { "timestamp" timestamp } }
+{ $description "Sets a file's last access timestamp." } ;
+
+HELP: set-file-group
+{ $values
+     { "path" "a pathname string" } { "string/id" "a string or a group id" } }
+{ $description "Sets a file's group id from the given group id or group name." } ;
+
+HELP: set-file-ids
+{ $values
+     { "path" "a pathname string" } { "uid" integer } { "gid" integer } }
+{ $description "Sets the user id and group id of a file with a single library call." } ;
+
+HELP: set-file-permissions
+{ $values
+     { "path" "a pathname string" } { "n" "an integer, interepreted as a string of bits" } }
+{ $description "Sets the file permissions for a given file with the supplied Unix permissions integer. Supplying an octal number with " { $link POSTPONE: OCT: } " is recommended." }
+{ $examples "Using the tradidional octal value:"
+    { $unchecked-example "USING: io.files.unix kernel ;"
+        "\"resource:license.txt\" OCT: 755 set-file-permissions"
+        ""
+    }
+    "Higher-level, setting named bits:"
+    { $unchecked-example "USING: io.files.unix kernel math.bitwise ;"
+    "\"resource:license.txt\""
+    "{ USER-ALL GROUP-READ GROUP-EXECUTE OTHER-READ OTHER-EXECUTE }"
+    "flags set-file-permissions"
+    "" }
+} ;
+
+HELP: set-file-times
+{ $values
+     { "path" "a pathname string" } { "timestamps" "an array of two timestamps" } }
+{ $description "Sets the access and write timestamps for a file as provided in the input array. A value of " { $link f } " provided for either of the timestamps will not change that timestamp." } ;
+
+HELP: set-file-user
+{ $values
+     { "path" "a pathname string" } { "string/id" "a string or a user id" } }
+{ $description "Sets a file's user id from the given user id or user-name." } ;
+
+HELP: set-file-modified-time
+{ $values
+     { "path" "a pathname string" } { "timestamp" timestamp } }
+{ $description "Sets a file's last modified timestamp, or write timestamp." } ;
+
+HELP: set-gid
+{ $values
+     { "path" "a pathname string" } { "?" "a boolean" } }
+{ $description "Sets the " { $snippet "gid" } " bit of a file to true or false." } ;
+
+HELP: gid?
+{ $values
+     { "obj" "a pathname string, file-info object, or an integer" }
+     { "?" "a boolean" } }
+{ $description "Tests whether the " { $snippet "gid" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
+
+HELP: set-group-execute
+{ $values
+     { "path" "a pathname string" } { "?" "a boolean" } }
+{ $description "Sets the " { $snippet "group execute" } " bit of a file to true or false." } ;
+
+HELP: set-group-read
+{ $values
+     { "path" "a pathname string" } { "?" "a boolean" } }
+{ $description "Sets the " { $snippet "group read" } " bit of a file to true or false." } ;
+
+HELP: set-group-write
+{ $values
+     { "path" "a pathname string" } { "?" "a boolean" } }
+{ $description "Sets the " { $snippet "group write" } " bit of a file to true or false." } ;
+
+HELP: set-other-execute
+{ $values
+     { "path" "a pathname string" } { "?" "a boolean" } }
+{ $description "Sets the " { $snippet "other execute" } " bit of a file to true or false." } ;
+
+HELP: set-other-read
+{ $values
+     { "path" "a pathname string" } { "?" "a boolean" } }
+{ $description "Sets the " { $snippet "other read" } " bit of a file to true or false." } ;
+
+HELP: set-other-write
+{ $values
+     { "path" "a pathname string" } { "?" "a boolean" } }
+{ $description "Sets the " { $snippet "other execute" } " bit of a file to true or false." } ;
+
+HELP: set-sticky
+{ $values
+     { "path" "a pathname string" } { "?" "a boolean" } }
+{ $description "Sets the " { $snippet "sticky" } " bit of a file to true or false." } ;
+
+HELP: sticky?
+{ $values
+     { "obj" "a pathname string, file-info object, or an integer" }
+     { "?" "a boolean" } }
+{ $description "Tests whether the " { $snippet "sticky" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
+
+HELP: set-uid
+{ $values
+     { "path" "a pathname string" } { "?" "a boolean" } }
+{ $description "Sets the " { $snippet "uid" } " bit of a file to true or false." } ;
+
+HELP: uid?
+{ $values
+     { "obj" "a pathname string, file-info object, or an integer" }
+     { "?" "a boolean" } }
+{ $description "Tests whether the " { $snippet "uid" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
+
+HELP: set-user-execute
+{ $values
+     { "path" "a pathname string" } { "?" "a boolean" } }
+{ $description "Sets the " { $snippet "user execute" } " bit of a file to true or false." } ;
+
+HELP: set-user-read
+{ $values
+     { "path" "a pathname string" } { "?" "a boolean" } }
+{ $description "Sets the " { $snippet "user read" } " bit of a file to true or false." } ;
+
+HELP: set-user-write
+{ $values
+     { "path" "a pathname string" } { "?" "a boolean" } }
+{ $description "Sets the " { $snippet "user write" } " bit of a file to true or false." } ;
+
+HELP: user-execute?
+{ $values
+     { "obj" "a pathname string, file-info object, or an integer" }
+     { "?" "a boolean" } }
+{ $description "Tests whether the " { $snippet "user execute" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
+
+HELP: user-read?
+{ $values
+     { "obj" "a pathname string, file-info object, or an integer" }
+     { "?" "a boolean" } }
+{ $description "Tests whether the " { $snippet "user read" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
+
+HELP: user-write?
+{ $values
+     { "obj" "a pathname string, file-info object, or an integer" }
+     { "?" "a boolean" } }
+{ $description "Tests whether the " { $snippet "user write" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
+
+ARTICLE: "unix-file-permissions" "Unix file permissions"
+"Reading all file permissions:"
+{ $subsection file-permissions }
+"Reading individual file permissions:"
+{ $subsection uid? }
+{ $subsection gid? }
+{ $subsection sticky? }
+{ $subsection user-read? }
+{ $subsection user-write? }
+{ $subsection user-execute? }
+{ $subsection group-read? }
+{ $subsection group-write? }
+{ $subsection group-execute? }
+{ $subsection other-read? }
+{ $subsection other-write? }
+{ $subsection other-execute? }
+"Writing all file permissions:"
+{ $subsection set-file-permissions }
+"Writing individual file permissions:"
+{ $subsection set-uid }
+{ $subsection set-gid }
+{ $subsection set-sticky }
+{ $subsection set-user-read }
+{ $subsection set-user-write }
+{ $subsection set-user-execute }
+{ $subsection set-group-read }
+{ $subsection set-group-write }
+{ $subsection set-group-execute }
+{ $subsection set-other-read }
+{ $subsection set-other-write }
+{ $subsection set-other-execute } ;
+
+ARTICLE: "unix-file-timestamps" "Unix file timestamps"
+"To read file times, use the accessors on the object returned by the " { $link file-info } " word." $nl
+"Setting multiple file times:"
+{ $subsection set-file-times }
+"Setting just the last access time:"
+{ $subsection set-file-access-time }
+"Setting just the last modified time:"
+{ $subsection set-file-modified-time } ;
+
+
+ARTICLE: "unix-file-ids" "Unix file user and group ids"
+"Reading file user data:"
+{ $subsection file-user-id }
+{ $subsection file-user-name }
+"Setting file user data:"
+{ $subsection set-file-user }
+"Reading file group data:"
+{ $subsection file-group-id }
+{ $subsection file-group-name }
+"Setting file group data:"
+{ $subsection set-file-group } ;
+
+
+ARTICLE: "io.files.info.unix" "Unix file attributes"
+"The " { $vocab-link "io.files.info.unix" } " vocabulary implements a high-level way to set Unix-specific permissions, timestamps, and user and group IDs for files."
+{ $subsection "unix-file-permissions" }
+{ $subsection "unix-file-timestamps" }
+{ $subsection "unix-file-ids" } ;
+
+ABOUT: "io.files.info.unix"
diff --git a/basis/io/files/info/unix/unix.factor b/basis/io/files/info/unix/unix.factor
new file mode 100644 (file)
index 0000000..b7edc14
--- /dev/null
@@ -0,0 +1,273 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors kernel system math math.bitwise strings arrays
+sequences combinators combinators.short-circuit alien.c-types
+vocabs.loader calendar calendar.unix io.files.info
+io.files.types io.backend unix unix.stat unix.time unix.users
+unix.groups ;
+IN: io.files.info.unix
+
+TUPLE: unix-file-system-info < file-system-info
+block-size preferred-block-size
+blocks blocks-free blocks-available
+files files-free files-available
+name-max flags id ;
+
+HOOK: new-file-system-info os ( --  file-system-info )
+
+M: unix new-file-system-info ( -- ) unix-file-system-info new ;
+
+HOOK: file-system-statfs os ( path -- statfs )
+
+M: unix file-system-statfs drop f ;
+
+HOOK: file-system-statvfs os ( path -- statvfs )
+
+M: unix file-system-statvfs drop f ;
+
+HOOK: statfs>file-system-info os ( file-system-info statfs -- file-system-info' )
+
+M: unix statfs>file-system-info drop ;
+
+HOOK: statvfs>file-system-info os ( file-system-info statvfs -- file-system-info' )
+
+M: unix statvfs>file-system-info drop ;
+
+: file-system-calculations ( file-system-info -- file-system-info' )
+    dup [ blocks-available>> ] [ block-size>> ] bi * >>available-space
+    dup [ blocks-free>> ] [ block-size>> ] bi * >>free-space
+    dup [ blocks>> ] [ block-size>> ] bi * >>total-space
+    dup [ total-space>> ] [ free-space>> ] bi - >>used-space ;
+
+M: unix file-system-info
+    normalize-path
+    [ new-file-system-info ] dip
+    [ file-system-statfs statfs>file-system-info ]
+    [ file-system-statvfs statvfs>file-system-info ] bi
+    file-system-calculations ;
+
+TUPLE: unix-file-info < file-info uid gid dev ino
+nlink rdev blocks blocksize ;
+
+HOOK: new-file-info os ( -- file-info )
+
+HOOK: stat>file-info os ( stat -- file-info )
+
+HOOK: stat>type os ( stat -- file-info )
+
+M: unix file-info ( path -- info )
+    normalize-path file-status stat>file-info ;
+
+M: unix link-info ( path -- info )
+    normalize-path link-status stat>file-info ;
+
+M: unix new-file-info ( -- class ) unix-file-info new ;
+
+M: unix stat>file-info ( stat -- file-info )
+    [ new-file-info ] dip
+    {
+        [ stat>type >>type ]
+        [ stat-st_size >>size ]
+        [ stat-st_mode >>permissions ]
+        [ stat-st_ctimespec timespec>unix-time >>created ]
+        [ stat-st_mtimespec timespec>unix-time >>modified ]
+        [ stat-st_atimespec timespec>unix-time >>accessed ]
+        [ stat-st_uid >>uid ]
+        [ stat-st_gid >>gid ]
+        [ stat-st_dev >>dev ]
+        [ stat-st_ino >>ino ]
+        [ stat-st_nlink >>nlink ]
+        [ stat-st_rdev >>rdev ]
+        [ stat-st_blocks >>blocks ]
+        [ stat-st_blksize >>blocksize ]
+    } cleave ;
+
+: n>file-type ( n -- type )
+    S_IFMT bitand {
+        { S_IFREG [ +regular-file+ ] }
+        { S_IFDIR [ +directory+ ] }
+        { S_IFCHR [ +character-device+ ] }
+        { S_IFBLK [ +block-device+ ] }
+        { S_IFIFO [ +fifo+ ] }
+        { S_IFLNK [ +symbolic-link+ ] }
+        { S_IFSOCK [ +socket+ ] }
+        [ drop +unknown+ ]
+    } case ;
+
+M: unix stat>type ( stat -- type )
+    stat-st_mode n>file-type ;
+
+<PRIVATE
+
+: stat-mode ( path -- mode )
+    normalize-path file-status stat-st_mode ;
+
+: chmod-set-bit ( path mask ? -- )
+    [ dup stat-mode ] 2dip
+    [ bitor ] [ unmask ] if chmod io-error ;
+
+GENERIC# file-mode? 1 ( obj mask -- ? )
+
+M: integer file-mode? mask? ;
+M: string file-mode? [ stat-mode ] dip mask? ;
+M: file-info file-mode? [ permissions>> ] dip mask? ;
+
+PRIVATE>
+
+: UID           OCT: 0004000 ; inline
+: GID           OCT: 0002000 ; inline
+: STICKY        OCT: 0001000 ; inline
+: USER-ALL      OCT: 0000700 ; inline
+: USER-READ     OCT: 0000400 ; inline
+: USER-WRITE    OCT: 0000200 ; inline
+: USER-EXECUTE  OCT: 0000100 ; inline
+: GROUP-ALL     OCT: 0000070 ; inline
+: GROUP-READ    OCT: 0000040 ; inline
+: GROUP-WRITE   OCT: 0000020 ; inline
+: GROUP-EXECUTE OCT: 0000010 ; inline
+: OTHER-ALL     OCT: 0000007 ; inline
+: OTHER-READ    OCT: 0000004 ; inline
+: OTHER-WRITE   OCT: 0000002 ; inline
+: OTHER-EXECUTE OCT: 0000001 ; inline
+
+: uid? ( obj -- ? ) UID file-mode? ;
+: gid? ( obj -- ? ) GID file-mode? ;
+: sticky? ( obj -- ? ) STICKY file-mode? ;
+: user-read? ( obj -- ? ) USER-READ file-mode? ;
+: user-write? ( obj -- ? ) USER-WRITE file-mode? ;
+: user-execute? ( obj -- ? ) USER-EXECUTE file-mode? ;
+: group-read? ( obj -- ? ) GROUP-READ file-mode? ;
+: group-write? ( obj -- ? ) GROUP-WRITE file-mode? ;
+: group-execute? ( obj -- ? ) GROUP-EXECUTE file-mode? ;
+: other-read? ( obj -- ? ) OTHER-READ file-mode? ;
+: other-write? ( obj -- ? ) OTHER-WRITE file-mode? ;
+: other-execute? ( obj -- ? ) OTHER-EXECUTE file-mode? ;
+
+: any-read? ( obj -- ? )
+    { [ user-read? ] [ group-read? ] [ other-read? ] } 1|| ;
+
+: any-write? ( obj -- ? )
+    { [ user-write? ] [ group-write? ] [ other-write? ] } 1|| ;
+
+: any-execute? ( obj -- ? )
+    { [ user-execute? ] [ group-execute? ] [ other-execute? ] } 1|| ;
+
+: set-uid ( path ? -- ) UID swap chmod-set-bit ;
+: set-gid ( path ? -- ) GID swap chmod-set-bit ;
+: set-sticky ( path ? -- ) STICKY swap chmod-set-bit ;
+: set-user-read ( path ? -- ) USER-READ swap chmod-set-bit ;
+: set-user-write ( path ? -- ) USER-WRITE swap chmod-set-bit ;
+: set-user-execute ( path ? -- ) USER-EXECUTE swap chmod-set-bit ;
+: set-group-read ( path ? -- ) GROUP-READ swap chmod-set-bit ;
+: set-group-write ( path ? -- ) GROUP-WRITE swap chmod-set-bit ;
+: set-group-execute ( path ? -- ) GROUP-EXECUTE swap chmod-set-bit ;
+: set-other-read ( path ? -- ) OTHER-READ swap chmod-set-bit ;
+: set-other-write ( path ? -- ) OTHER-WRITE swap chmod-set-bit ;
+: set-other-execute ( path ? -- ) OTHER-EXECUTE swap chmod-set-bit ;
+
+: set-file-permissions ( path n -- )
+    [ normalize-path ] dip chmod io-error ;
+
+: file-permissions ( path -- n )
+    normalize-path file-info permissions>> ;
+
+<PRIVATE
+
+: make-timeval-array ( array -- byte-array )
+    [ [ "timeval" <c-object> ] unless* ] map concat ;
+
+: timestamp>timeval ( timestamp -- timeval )
+    unix-1970 time- duration>microseconds make-timeval ;
+
+: timestamps>byte-array ( timestamps -- byte-array )
+    [ dup [ timestamp>timeval ] when ] map make-timeval-array ;
+
+PRIVATE>
+
+: set-file-times ( path timestamps -- )
+    #! set access, write
+    [ normalize-path ] dip
+    timestamps>byte-array utimes io-error ;
+
+: set-file-access-time ( path timestamp -- )
+    f 2array set-file-times ;
+
+: set-file-modified-time ( path timestamp -- )
+    f swap 2array set-file-times ;
+
+: set-file-ids ( path uid gid -- )
+    [ normalize-path ] 2dip
+    [ [ -1 ] unless* ] bi@ chown io-error ;
+
+GENERIC: set-file-user ( path string/id -- )
+
+GENERIC: set-file-group ( path string/id -- )
+
+M: integer set-file-user ( path uid -- )
+    f set-file-ids ;
+
+M: string set-file-user ( path string -- )
+    user-id f set-file-ids ;
+
+M: integer set-file-group ( path gid -- )
+    f swap set-file-ids ;
+
+M: string set-file-group ( path string -- )
+    group-id
+    f swap set-file-ids ;
+
+: file-user-id ( path -- uid )
+    normalize-path file-info uid>> ;
+
+: file-user-name ( path -- string )
+    file-user-id user-name ;
+
+: file-group-id ( path -- gid )
+    normalize-path file-info gid>> ;
+
+: file-group-name ( path -- string )
+    file-group-id group-name ;
+
+: ch>file-type ( ch -- type )
+    {
+        { CHAR: b [ +block-device+ ] }
+        { CHAR: c [ +character-device+ ] }
+        { CHAR: d [ +directory+ ] }
+        { CHAR: l [ +symbolic-link+ ] }
+        { CHAR: s [ +socket+ ] }
+        { CHAR: p [ +fifo+ ] }
+        { CHAR: - [ +regular-file+ ] }
+        [ drop +unknown+ ]
+    } case ;
+
+: file-type>ch ( type -- ch )
+    {
+        { +block-device+ [ CHAR: b ] }
+        { +character-device+ [ CHAR: c ] }
+        { +directory+ [ CHAR: d ] }
+        { +symbolic-link+ [ CHAR: l ] }
+        { +socket+ [ CHAR: s ] }
+        { +fifo+ [ CHAR: p ] }
+        { +regular-file+ [ CHAR: - ] }
+        [ drop CHAR: - ]
+    } case ;
+
+<PRIVATE
+
+: file-type>executable ( directory-entry -- string )
+    name>> any-execute? "*" "" ? ;
+
+PRIVATE>
+
+: file-type>trailing ( directory-entry -- string )
+    dup type>>
+    {
+        { +directory+ [ drop "/" ] }
+        { +symbolic-link+ [ drop "@" ] }
+        { +fifo+ [ drop "|" ] }
+        { +socket+ [ drop "=" ] }
+        { +whiteout+ [ drop "%" ] }
+        { +unknown+ [ file-type>executable ] }
+        { +regular-file+ [ file-type>executable ] }
+        [ drop file-type>executable ]
+    } case ;
diff --git a/basis/io/files/info/windows/tags.txt b/basis/io/files/info/windows/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/files/info/windows/windows.factor b/basis/io/files/info/windows/windows.factor
new file mode 100755 (executable)
index 0000000..cf826a5
--- /dev/null
@@ -0,0 +1,201 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: byte-arrays math io.backend io.files.info
+io.files.windows io.files.windows.nt kernel windows.kernel32
+windows.time windows accessors alien.c-types combinators
+generalizations system alien.strings io.encodings.utf16n
+sequences splitting windows.errors fry continuations destructors
+calendar ascii combinators.short-circuit ;
+IN: io.files.info.windows
+
+TUPLE: windows-file-info < file-info attributes ;
+
+: WIN32_FIND_DATA>file-info ( WIN32_FIND_DATA -- file-info )
+    [ \ windows-file-info new ] dip
+    {
+        [ WIN32_FIND_DATA-dwFileAttributes win32-file-type >>type ]
+        [ WIN32_FIND_DATA-dwFileAttributes win32-file-attributes >>attributes ]
+        [
+            [ WIN32_FIND_DATA-nFileSizeLow ]
+            [ WIN32_FIND_DATA-nFileSizeHigh ] bi >64bit >>size
+        ]
+        [ WIN32_FIND_DATA-dwFileAttributes >>permissions ]
+        [ WIN32_FIND_DATA-ftCreationTime FILETIME>timestamp >>created ]
+        [ WIN32_FIND_DATA-ftLastWriteTime FILETIME>timestamp >>modified ]
+        [ WIN32_FIND_DATA-ftLastAccessTime FILETIME>timestamp >>accessed ]
+    } cleave ;
+
+: find-first-file-stat ( path -- WIN32_FIND_DATA )
+    "WIN32_FIND_DATA" <c-object> [
+        FindFirstFile
+        [ INVALID_HANDLE_VALUE = [ win32-error ] when ] keep
+        FindClose win32-error=0/f
+    ] keep ;
+
+: BY_HANDLE_FILE_INFORMATION>file-info ( HANDLE_FILE_INFORMATION -- file-info )
+    [ \ windows-file-info new ] dip
+    {
+        [ BY_HANDLE_FILE_INFORMATION-dwFileAttributes win32-file-type >>type ]
+        [ BY_HANDLE_FILE_INFORMATION-dwFileAttributes win32-file-attributes >>attributes ]
+        [
+            [ BY_HANDLE_FILE_INFORMATION-nFileSizeLow ]
+            [ BY_HANDLE_FILE_INFORMATION-nFileSizeHigh ] bi >64bit >>size
+        ]
+        [ BY_HANDLE_FILE_INFORMATION-dwFileAttributes >>permissions ]
+        [
+            BY_HANDLE_FILE_INFORMATION-ftCreationTime
+            FILETIME>timestamp >>created
+        ]
+        [
+            BY_HANDLE_FILE_INFORMATION-ftLastWriteTime
+            FILETIME>timestamp >>modified
+        ]
+        [
+            BY_HANDLE_FILE_INFORMATION-ftLastAccessTime
+            FILETIME>timestamp >>accessed
+        ]
+        ! [ BY_HANDLE_FILE_INFORMATION-nNumberOfLinks ]
+        ! [
+          ! [ BY_HANDLE_FILE_INFORMATION-nFileIndexLow ]
+          ! [ BY_HANDLE_FILE_INFORMATION-nFileIndexHigh ] bi >64bit
+        ! ]
+    } cleave ;
+
+: get-file-information ( handle -- BY_HANDLE_FILE_INFORMATION )
+    [
+        "BY_HANDLE_FILE_INFORMATION" <c-object>
+        [ GetFileInformationByHandle win32-error=0/f ] keep
+    ] keep CloseHandle win32-error=0/f ;
+
+: get-file-information-stat ( path -- BY_HANDLE_FILE_INFORMATION )
+    dup
+    GENERIC_READ FILE_SHARE_READ f
+    OPEN_EXISTING FILE_FLAG_BACKUP_SEMANTICS f
+    CreateFileW dup INVALID_HANDLE_VALUE = [
+        drop find-first-file-stat WIN32_FIND_DATA>file-info
+    ] [
+        nip
+        get-file-information BY_HANDLE_FILE_INFORMATION>file-info
+    ] if ;
+
+M: windows file-info ( path -- info )
+    normalize-path get-file-information-stat ;
+
+M: windows link-info ( path -- info )
+    file-info ;
+
+: volume-information ( normalized-path -- volume-name volume-serial max-component flags type )
+    MAX_PATH 1+ [ <byte-array> ] keep
+    "DWORD" <c-object>
+    "DWORD" <c-object>
+    "DWORD" <c-object>
+    MAX_PATH 1+ [ <byte-array> ] keep
+    [ GetVolumeInformation win32-error=0/f ] 7 nkeep
+    drop 5 nrot drop
+    [ utf16n alien>string ] 4 ndip
+    utf16n alien>string ;
+
+: file-system-space ( normalized-path -- available-space total-space free-space )
+    "ULARGE_INTEGER" <c-object>
+    "ULARGE_INTEGER" <c-object>
+    "ULARGE_INTEGER" <c-object>
+    [ GetDiskFreeSpaceEx win32-error=0/f ] 3keep ;
+
+: calculate-file-system-info ( file-system-info -- file-system-info' )
+    [ dup [ total-space>> ] [ free-space>> ] bi - >>used-space drop ] keep ;
+
+TUPLE: win32-file-system-info < file-system-info max-component flags device-serial ;
+
+ERROR: not-absolute-path ;
+
+: root-directory ( string -- string' )
+    unicode-prefix ?head drop
+    dup {
+        [ length 2 >= ]
+        [ second CHAR: : = ]
+        [ first Letter? ]
+    } 1&& [ 2 head "\\" append ] [ not-absolute-path ] if ;
+
+M: winnt file-system-info ( path -- file-system-info )
+    normalize-path root-directory
+    dup [ volume-information ] [ file-system-space ] bi
+    \ win32-file-system-info new
+        swap *ulonglong >>free-space
+        swap *ulonglong >>total-space
+        swap *ulonglong >>available-space
+        swap >>type
+        swap *uint >>flags
+        swap *uint >>max-component
+        swap *uint >>device-serial
+        swap >>device-name
+        swap >>mount-point
+    calculate-file-system-info ;
+
+: volume>paths ( string -- array )
+    16384 "ushort" <c-array> tuck dup length
+    0 <uint> dup [ GetVolumePathNamesForVolumeName 0 = ] dip swap [
+        win32-error-string throw
+    ] [
+        *uint "ushort" heap-size * head
+        utf16n alien>string CHAR: \0 split
+    ] if ;
+
+: find-first-volume ( -- string handle )
+    MAX_PATH 1+ [ <byte-array> ] keep
+    dupd
+    FindFirstVolume dup win32-error=0/f
+    [ utf16n alien>string ] dip ;
+
+: find-next-volume ( handle -- string/f )
+    MAX_PATH 1+ [ <byte-array> tuck ] keep
+    FindNextVolume 0 = [
+        GetLastError ERROR_NO_MORE_FILES =
+        [ drop f ] [ win32-error-string throw ] if
+    ] [
+        utf16n alien>string
+    ] if ;
+
+: find-volumes ( -- array )
+    find-first-volume
+    [
+        '[
+            [ _ find-next-volume dup ]
+            [ ]
+            [ drop ] produce
+            swap prefix
+        ]
+    ] [ '[ _ FindVolumeClose win32-error=0/f ] ] bi [ ] cleanup ;
+
+M: winnt file-systems ( -- array )
+    find-volumes [ volume>paths ] map
+    concat [
+        [ file-system-info ]
+        [ drop \ file-system-info new swap >>mount-point ] recover
+    ] map ;
+
+: file-times ( path -- timestamp timestamp timestamp )
+    [
+        normalize-path open-existing &dispose handle>>
+        "FILETIME" <c-object>
+        "FILETIME" <c-object>
+        "FILETIME" <c-object>
+        [ GetFileTime win32-error=0/f ] 3keep
+        [ FILETIME>timestamp >local-time ] tri@
+    ] with-destructors ;
+
+: set-file-times ( path timestamp/f timestamp/f timestamp/f -- )
+    #! timestamp order: creation access write
+    [
+        [
+            normalize-path open-existing &dispose handle>>
+        ] 3dip (set-file-times)
+    ] with-destructors ;
+
+: set-file-create-time ( path timestamp -- )
+    f f set-file-times ;
+
+: set-file-access-time ( path timestamp -- )
+    [ f ] dip f set-file-times ;
+
+: set-file-write-time ( path timestamp -- )
+    [ f f ] dip set-file-times ;
diff --git a/basis/io/files/links/authors.txt b/basis/io/files/links/authors.txt
new file mode 100644 (file)
index 0000000..f372b57
--- /dev/null
@@ -0,0 +1,2 @@
+Slava Pestov
+Doug Coleman
diff --git a/basis/io/files/links/links-docs.factor b/basis/io/files/links/links-docs.factor
new file mode 100644 (file)
index 0000000..8419399
--- /dev/null
@@ -0,0 +1,56 @@
+USING: help.markup help.syntax io.files.info math ;
+IN: io.files.links
+
+HELP: make-link
+{ $values { "target" "a path to the symbolic link's target" } { "symlink" "a path to new symbolic link" } }
+{ $description "Creates a symbolic link." } ;
+
+HELP: read-link
+{ $values { "symlink" "a path to an existing symbolic link" } { "path" "the path pointed to by the symbolic link" } }
+{ $description "Reads the symbolic link and returns its target path." } ;
+
+HELP: copy-link
+{ $values { "target" "a path to an existing symlink" } { "symlink" "a path to a new symbolic link" } }
+{ $description "Copies a symbolic link without following the link." } ;
+
+HELP: follow-link
+{ $values
+     { "path" "a pathname string" }
+     { "path'" "a pathname string" }
+}
+{ $description "Returns an absolute path from " { $link read-link } "." } ;
+
+HELP: follow-links
+{ $values
+     { "path" "a pathname string" }
+     { "path'" "a pathname string" }
+}
+{ $description "Follows a chain of symlinks up to " { $link symlink-depth } "." } ;
+
+{ read-link follow-link follow-links } related-words
+
+HELP: symlink-depth
+{ $values
+     { "value" integer }
+}
+{ $description "The number of redirections " { $link follow-links } " will follow." } ;
+
+HELP: too-many-symlinks
+{ $values
+     { "path" "a pathname string" } { "n" integer }
+}
+{ $description "An error thrown when the number of redirections in a chain of symlinks surpasses the value in the " { $link symlink-depth } " variable." } ;
+
+ARTICLE: "io.files.links" "Symbolic links"
+"Reading links:"
+{ $subsection read-link }
+{ $subsection follow-link }
+{ $subsection follow-links }
+"Creating links:"
+{ $subsection make-link }
+"Copying links:"
+{ $subsection copy-link }
+"Not all operating systems support symbolic links."
+{ $see-also link-info } ;
+
+ABOUT: "io.files.links"
diff --git a/basis/io/files/links/links.factor b/basis/io/files/links/links.factor
new file mode 100644 (file)
index 0000000..1212d57
--- /dev/null
@@ -0,0 +1,35 @@
+! Copyright (C) 2008 Slava Pestov, Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors io.backend io.files.info io.files.types
+io.pathnames kernel math namespaces system vocabs.loader ;
+IN: io.files.links
+
+HOOK: make-link os ( target symlink -- )
+
+HOOK: read-link os ( symlink -- path )
+
+: copy-link ( target symlink -- )
+    [ read-link ] dip make-link ;
+
+os unix? [ "io.files.links.unix" require ] when
+
+: follow-link ( path -- path' )
+    [ parent-directory ] [ read-link ] bi append-path ;
+
+SYMBOL: symlink-depth
+10 symlink-depth set-global
+
+ERROR: too-many-symlinks path n ;
+
+<PRIVATE
+
+: (follow-links) ( n path -- path' )
+    over 0 = [ symlink-depth get too-many-symlinks ] when
+    dup link-info type>> +symbolic-link+ =
+    [ [ 1- ] [ follow-link ] bi* (follow-links) ]
+    [ nip ] if ; inline recursive
+
+PRIVATE>
+
+: follow-links ( path -- path' )
+    [ symlink-depth get ] dip normalize-path (follow-links) ;
diff --git a/basis/io/files/links/summary.txt b/basis/io/files/links/summary.txt
new file mode 100644 (file)
index 0000000..6f5e459
--- /dev/null
@@ -0,0 +1 @@
+Working with symbolic links
diff --git a/basis/io/files/links/unix/tags.txt b/basis/io/files/links/unix/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/files/links/unix/unix-tests.factor b/basis/io/files/links/unix/unix-tests.factor
new file mode 100644 (file)
index 0000000..dd5eb5c
--- /dev/null
@@ -0,0 +1,38 @@
+USING: io.directories io.files.links tools.test sequences
+io.files.unique tools.files fry math kernel math.parser
+io.pathnames namespaces ;
+IN: io.files.links.unix.tests
+
+: make-test-links ( n path -- )
+    [ '[ [ 1+ ] keep [ number>string _ prepend ] bi@ make-link ] each ]
+    [ [ number>string ] dip prepend touch-file ] 2bi ; inline
+
+[ t ] [
+    [
+        current-temporary-directory get [
+            5 "lol" make-test-links
+            "lol1" follow-links
+            current-temporary-directory get "lol5" append-path =
+        ] with-directory
+    ] cleanup-unique-directory
+] unit-test
+
+[
+    [
+        current-temporary-directory get [
+            100 "laf" make-test-links "laf1" follow-links
+        ] with-directory
+    ] with-unique-directory
+] [ too-many-symlinks? ] must-fail-with
+
+[ t ] [
+    110 symlink-depth [
+        [
+            current-temporary-directory get [
+                100 "laf" make-test-links
+                "laf1" follow-links
+                current-temporary-directory get "laf100" append-path =
+            ] with-directory
+        ] cleanup-unique-directory
+    ] with-variable
+] unit-test
diff --git a/basis/io/files/links/unix/unix.factor b/basis/io/files/links/unix/unix.factor
new file mode 100644 (file)
index 0000000..2f38c39
--- /dev/null
@@ -0,0 +1,10 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: io.backend io.files.links system unix ;
+IN: io.files.links.unix
+
+M: unix make-link ( path1 path2 -- )
+    normalize-path symlink io-error ;
+
+M: unix read-link ( path -- path' )
+    normalize-path read-symbolic-link ;
diff --git a/basis/io/files/temp/temp-docs.factor b/basis/io/files/temp/temp-docs.factor
new file mode 100644 (file)
index 0000000..e9f4928
--- /dev/null
@@ -0,0 +1,9 @@
+USING: help.markup help.syntax ;
+IN: io.files.temp
+
+ARTICLE: "io.files.temp" "Temporary files"
+"Pathnames relative to Factor's temporary files directory:"
+{ $subsection temp-directory }
+{ $subsection temp-file } ;
+
+ABOUT: "io.files.temp"
diff --git a/basis/io/files/temp/temp.factor b/basis/io/files/temp/temp.factor
new file mode 100644 (file)
index 0000000..7ace219
--- /dev/null
@@ -0,0 +1,10 @@
+! Copyright (C) 2008 Slava Pestov, Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel io.pathnames io.directories ;
+IN: io.files.temp
+
+: temp-directory ( -- path )
+    "temp" resource-path dup make-directories ;
+
+: temp-file ( name -- path )
+    temp-directory prepend-path ;
\ No newline at end of file
diff --git a/basis/io/files/types/types-docs.factor b/basis/io/files/types/types-docs.factor
new file mode 100644 (file)
index 0000000..a640285
--- /dev/null
@@ -0,0 +1,40 @@
+USING: help.markup help.syntax ;
+IN: io.files.types
+
+HELP: +regular-file+
+{ $description "A regular file. This type exists on all platforms. See " { $link "io.files" } " for words operating on files." } ;
+
+HELP: +directory+
+{ $description "A directory. This type exists on all platforms. See " { $link "io.directories" } " for words operating on directories." } ;
+
+HELP: +symbolic-link+
+{ $description "A symbolic link file.  This type is currently implemented on Unix platforms only. See " { $link "io.files.links" } " for words operating on symbolic links." } ;
+
+HELP: +character-device+
+{ $description "A Unix character device file. This type exists on Unix platforms only." } ;
+
+HELP: +block-device+
+{ $description "A Unix block device file. This type exists on Unix platforms only." } ;
+
+HELP: +fifo+
+{ $description "A Unix fifo file. This type exists on Unix platforms only." } ;
+
+HELP: +socket+
+{ $description "A Unix socket file. This type exists on Unix platforms only." } ;
+
+HELP: +unknown+
+{ $description "A unknown file type." } ;
+
+ARTICLE: "file-types" "File types"
+"Platform-independent types:"
+{ $subsection +regular-file+ }
+{ $subsection +directory+ }
+"Platform-specific types:"
+{ $subsection +character-device+ }
+{ $subsection +block-device+ }
+{ $subsection +fifo+ }
+{ $subsection +symbolic-link+ }
+{ $subsection +socket+ }
+{ $subsection +unknown+ } ;
+
+ABOUT: "file-types"
diff --git a/basis/io/files/types/types.factor b/basis/io/files/types/types.factor
new file mode 100644 (file)
index 0000000..bf8be9e
--- /dev/null
@@ -0,0 +1,13 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+IN: io.files.types
+
+SYMBOL: +regular-file+
+SYMBOL: +directory+
+SYMBOL: +symbolic-link+
+SYMBOL: +character-device+
+SYMBOL: +block-device+
+SYMBOL: +fifo+
+SYMBOL: +socket+
+SYMBOL: +whiteout+
+SYMBOL: +unknown+
index bfde09dc487b02532bcf22a4f67c968f180b73f8..b8a4431a73ba11724afbdd7171bb58964f863ef4 100644 (file)
@@ -1,8 +1,9 @@
 USING: help.markup help.syntax io io.ports kernel math
-io.files.unique.private math.parser io.files ;
+io.pathnames io.directories math.parser io.files strings
+quotations io.files.unique.private ;
 IN: io.files.unique
 
-HELP: temporary-path
+HELP: default-temporary-directory
 { $values
      { "path" "a pathname string" }
 }
@@ -25,42 +26,66 @@ HELP: unique-retries
 HELP: make-unique-file ( prefix suffix -- path )
 { $values { "prefix" "a string" } { "suffix" "a string" }
 { "path" "a pathname string" } }
-{ $description "Creates a file that is guaranteed not to exist in a platform-specific temporary directory. The file name is composed of a prefix, a number of random digits and letters, and the suffix. Returns the full pathname." }
+{ $description "Creates a file that is guaranteed not to exist in the directory stored in " { $link current-temporary-directory } ". The file name is composed of a prefix, a number of random digits and letters, and the suffix. Returns the full pathname." }
 { $errors "Throws an error if a new unique file cannot be created after a number of tries. The most likely error is incorrect directory permissions on the temporary directory." } ;
 
-HELP: make-unique-file*
-{ $values
-     { "prefix" null } { "suffix" null }
-     { "path" "a pathname string" }
-}
-{ $description "Creates a file that is guaranteed not to exist in the directory in the " { $link current-directory } " variable. The file name is composed of a prefix, a number of random digits and letters, and the suffix. Returns the full pathname." } ;
+{ unique-file make-unique-file cleanup-unique-file } related-words
 
-{ make-unique-file make-unique-file* with-unique-file } related-words
-
-HELP: with-unique-file ( prefix suffix quot: ( path -- ) -- )
+HELP: cleanup-unique-file ( prefix suffix quot: ( path -- ) -- )
 { $values { "prefix" "a string" } { "suffix" "a string" }
 { "quot" "a quotation" } }
 { $description "Creates a file with " { $link make-unique-file } " and calls the quotation with the path name on the stack." }
 { $notes "The unique file will be deleted after calling this word." } ;
 
-HELP: make-unique-directory ( -- path )
+HELP: unique-directory ( -- path )
 { $values { "path" "a pathname string" } }
-{ $description "Creates a directory that is guaranteed not to exist in a platform-specific temporary directory and returns the full pathname." }
+{ $description "Creates a directory in the value in " { $link current-temporary-directory } " that is guaranteed not to exist in and returns the full pathname." }
 { $errors "Throws an error if the directory cannot be created after a number of tries. The most likely error is incorrect directory permissions on the temporary directory." } ;
 
-HELP: with-unique-directory ( quot -- )
+HELP: cleanup-unique-directory ( quot -- )
 { $values { "quot" "a quotation" } }
-{ $description "Creates a directory with " { $link make-unique-directory } " and calls the quotation with the pathname on the stack using the " { $link with-directory } " combinator. The quotation can access the " { $link current-directory } " symbol for the name of the temporary directory." }
-{ $notes "The directory will be deleted after calling this word, even if an error is thrown in the quotation." } ;
+{ $description "Creates a directory with " { $link unique-directory } " and calls the quotation with the pathname on the stack using the " { $link with-temporary-directory } " combinator. The quotation can access the " { $link current-temporary-directory } " symbol for the name of the temporary directory. Subsequent unique files will be created in this unique directory until the combinator returns." }
+{ $notes "The directory will be deleted after calling this word, even if an error is thrown in the quotation. This combinator is like " { $link with-unique-directory } " but does not delete the directory." } ;
+
+HELP: with-unique-directory
+{ $values
+     { "quot" quotation }
+     { "path" "a pathname string" }
+}
+{ $description "Creates a directory with " { $link unique-directory } " and calls the quotation with the pathname on the stack using the " { $link with-temporary-directory } " combinator. The quotation can access the " { $link current-temporary-directory } " symbol for the name of the temporary directory. Subsequent unique files will be created in this unique directory until the combinator returns." } ;
+
+HELP: current-temporary-directory
+{ $values
+     { "value" "a path" }
+}
+{ $description "The temporary directory used for creating unique files and directories." } ;
+
+HELP: unique-file
+{ $values
+     { "path" "a pathname string" }
+     { "path'" "a pathname string" }
+}
+{ $description "Creates a temporary file in the directory stored in " { $link current-temporary-directory } " and outputs the path name." } ;
+
+HELP: with-temporary-directory
+{ $values
+     { "path" "a pathname string" } { "quot" quotation }
+}
+{ $description "Sets " { $link current-temporary-directory } " to " { $snippet "path" } " and calls the quotation, restoring the previous temporary path after execution completes." } ;
 
-ARTICLE: "io.files.unique" "Temporary files"
-"The " { $vocab-link "io.files.unique" } " vocabulary implements cross-platform temporary file creation in a high-level and secure way." $nl
-"Files:"
+ARTICLE: "io.files.unique" "Unique files"
+"The " { $vocab-link "io.files.unique" } " vocabulary implements cross-platform unique file creation in temporary directories in a high-level and secure way." $nl
+"Changing the temporary path:"
+{ $subsection current-temporary-directory }
+"Creating unique files:"
+{ $subsection unique-file }
+{ $subsection cleanup-unique-file }
 { $subsection make-unique-file }
-{ $subsection make-unique-file* }
-{ $subsection with-unique-file }
-"Directories:"
-{ $subsection make-unique-directory }
-{ $subsection with-unique-directory } ;
+"Creating unique directories:"
+{ $subsection unique-directory }
+{ $subsection with-unique-directory }
+{ $subsection cleanup-unique-directory }
+"Default temporary directory:"
+{ $subsection default-temporary-directory } ;
 
 ABOUT: "io.files.unique"
index 178e4572d0af9a14ec6226ad720f96c9448df971..fd8cf2c69f730af740f83c89b9083d38c778554b 100644 (file)
@@ -1,20 +1,41 @@
 USING: io.encodings.ascii sequences strings io io.files accessors
-tools.test kernel io.files.unique namespaces continuations ;
+tools.test kernel io.files.unique namespaces continuations
+io.files.info io.pathnames io.directories ;
 IN: io.files.unique.tests
 
 [ 123 ] [
     "core" ".test" [
         [ [ 123 CHAR: a <repetition> ] dip ascii set-file-contents ]
         [ file-info size>> ] bi
-    ] with-unique-file
+    ] cleanup-unique-file
 ] unit-test
 
 [ t ] [
-    [ current-directory get file-info directory? ] with-unique-directory
+    [ current-directory get file-info directory? ] cleanup-unique-directory
 ] unit-test
 
 [ t ] [
     current-directory get
-    [ [ "FAILDOG" throw ] with-unique-directory ] [ drop ] recover
+    [ [ "FAILDOG" throw ] cleanup-unique-directory ] [ drop ] recover
     current-directory get =
 ] unit-test
+
+[ t ] [
+    [
+        "asdf" unique-file drop
+        "asdf2" unique-file drop
+        current-temporary-directory get directory-files length 2 =
+    ] cleanup-unique-directory
+] unit-test
+
+[ t ] [
+    [ ] with-unique-directory >boolean
+] unit-test
+
+[ t ] [
+    [
+        "asdf" unique-file drop
+        "asdf" unique-file drop
+        current-temporary-directory get directory-files length 2 =
+    ] with-unique-directory drop
+] unit-test
index 66540fb48ed24c71e6264b9b8b5164f6b0818b64..7bd96aa63b4a10a1b7cf2f850ef6c34a5586d9a0 100644 (file)
@@ -1,12 +1,18 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.bitwise math.parser random sequences
-continuations namespaces io.files io arrays system
-combinators vocabs.loader fry io.backend ;
+USING: arrays combinators continuations fry io io.backend
+io.directories io.directories.hierarchy io.files io.pathnames
+kernel math math.bitwise math.parser namespaces random
+sequences system vocabs.loader ;
 IN: io.files.unique
 
-HOOK: touch-unique-file io-backend ( path -- )
-HOOK: temporary-path io-backend ( -- path )
+HOOK: (touch-unique-file) io-backend ( path -- )
+: touch-unique-file ( path -- )
+    normalize-path (touch-unique-file) ;
+
+HOOK: default-temporary-directory io-backend ( -- path )
+
+SYMBOL: current-temporary-directory
 
 SYMBOL: unique-length
 SYMBOL: unique-retries
@@ -14,6 +20,9 @@ SYMBOL: unique-retries
 10 unique-length set-global
 10 unique-retries set-global
 
+: with-temporary-directory ( path quot -- )
+    [ current-temporary-directory ] dip with-variable ; inline
+
 <PRIVATE
 
 : random-letter ( -- ch )
@@ -23,37 +32,44 @@ SYMBOL: unique-retries
     { t f } random
     [ 10 random CHAR: 0 + ] [ random-letter ] if ;
 
-: random-name ( n -- string )
-    [ random-ch ] "" replicate-as ;
-
-PRIVATE>
+: random-name ( -- string )
+    unique-length get [ random-ch ] "" replicate-as ;
 
 : (make-unique-file) ( path prefix suffix -- path )
     '[
-        _ _ _ unique-length get random-name glue append-path
+        _ _ _ random-name glue append-path
         dup touch-unique-file
     ] unique-retries get retry ;
 
-: make-unique-file ( prefix suffix -- path )
-    [ temporary-path ] 2dip (make-unique-file) ;
+PRIVATE>
 
-: make-unique-file* ( prefix suffix -- path )
-    [ current-directory get ] 2dip (make-unique-file) ;
+: make-unique-file ( prefix suffix -- path )
+    [ current-temporary-directory get ] 2dip (make-unique-file) ;
 
-: with-unique-file ( prefix suffix quot: ( path -- ) -- )
+: cleanup-unique-file ( prefix suffix quot: ( path -- ) -- )
     [ make-unique-file ] dip [ delete-file ] bi ; inline
 
-: make-unique-directory ( -- path )
+: unique-directory ( -- path )
     [
-        temporary-path unique-length get random-name append-path
+        current-temporary-directory get
+        random-name append-path
         dup make-directory
     ] unique-retries get retry ;
 
-: with-unique-directory ( quot: ( -- ) -- )
-    [ make-unique-directory ] dip
-    '[ _ with-directory ] [ delete-tree ] bi ; inline
+: with-unique-directory ( quot -- path )
+    [ unique-directory ] dip
+    [ with-temporary-directory ] [ drop ] 2bi ; inline
+
+: cleanup-unique-directory ( quot: ( -- ) -- )
+    [ unique-directory ] dip
+    '[ _ with-temporary-directory ] [ delete-tree ] bi ; inline
+
+: unique-file ( path -- path' )
+    "" make-unique-file ;
 
 {
-    { [ os unix? ] [ "io.unix.files.unique" ] }
-    { [ os windows? ] [ "io.windows.files.unique" ] }
+    { [ os unix? ] [ "io.files.unique.unix" ] }
+    { [ os windows? ] [ "io.files.unique.windows" ] }
 } cond require
+
+default-temporary-directory current-temporary-directory set-global
diff --git a/basis/io/files/unique/unix/tags.txt b/basis/io/files/unique/unix/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/files/unique/unix/unix.factor b/basis/io/files/unique/unix/unix.factor
new file mode 100644 (file)
index 0000000..9f35f44
--- /dev/null
@@ -0,0 +1,13 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel io.ports io.backend.unix math.bitwise
+unix system io.files.unique ;
+IN: io.files.unique.unix
+
+: open-unique-flags ( -- flags )
+    { O_RDWR O_CREAT O_EXCL } flags ;
+
+M: unix (touch-unique-file) ( path -- )
+    open-unique-flags file-mode open-file close-file ;
+
+M: unix default-temporary-directory ( -- path ) "/tmp" ;
diff --git a/basis/io/files/unique/windows/tags.txt b/basis/io/files/unique/windows/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/files/unique/windows/windows.factor b/basis/io/files/unique/windows/windows.factor
new file mode 100644 (file)
index 0000000..2c72242
--- /dev/null
@@ -0,0 +1,10 @@
+USING: kernel system windows.kernel32 io.backend.windows
+io.files.windows io.ports windows destructors environment
+io.files.unique ;
+IN: io.files.unique.windows
+
+M: windows (touch-unique-file) ( path -- )
+    GENERIC_WRITE CREATE_NEW 0 open-file dispose ;
+
+M: windows default-temporary-directory ( -- path )
+    "TEMP" os-env ;
diff --git a/basis/io/files/unix/authors.txt b/basis/io/files/unix/authors.txt
new file mode 100644 (file)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/basis/io/files/unix/summary.txt b/basis/io/files/unix/summary.txt
new file mode 100644 (file)
index 0000000..57527be
--- /dev/null
@@ -0,0 +1 @@
+Implementation of reading and writing files on Unix-like systems
diff --git a/basis/io/files/unix/tags.txt b/basis/io/files/unix/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/files/unix/unix-tests.factor b/basis/io/files/unix/unix-tests.factor
new file mode 100644 (file)
index 0000000..d2f4494
--- /dev/null
@@ -0,0 +1,165 @@
+USING: tools.test io.files io.files.temp io.pathnames
+io.directories io.files.info io.files.info.unix continuations
+kernel io.files.unix math.bitwise calendar accessors
+math.functions math unix.users unix.groups arrays sequences
+grouping ;
+IN: io.files.unix.tests
+
+[ "/usr/libexec/" ] [ "/usr/libexec/awk/" parent-directory ] unit-test
+[ "/etc/" ] [ "/etc/passwd" parent-directory ] unit-test
+[ "/" ] [ "/etc/" parent-directory ] unit-test
+[ "/" ] [ "/etc" parent-directory ] unit-test
+[ "/" ] [ "/" parent-directory ] unit-test
+
+[ f ] [ "" root-directory? ] unit-test
+[ t ] [ "/" root-directory? ] unit-test
+[ t ] [ "//" root-directory? ] unit-test
+[ t ] [ "///////" root-directory? ] unit-test
+
+[ "/" ] [ "/" file-name ] unit-test
+[ "///" ] [ "///" file-name ] unit-test
+
+[ "/" ] [ "/" "../.." append-path ] unit-test
+[ "/" ] [ "/" "../../" append-path ] unit-test
+[ "/lib" ] [ "/" "../lib" append-path ] unit-test
+[ "/lib/" ] [ "/" "../lib/" append-path ] unit-test
+[ "/lib" ] [ "/" "../../lib" append-path ] unit-test
+[ "/lib/" ] [ "/" "../../lib/" append-path ] unit-test
+
+[ "/lib" ] [ "/usr/" "/lib" append-path ] unit-test
+[ "/lib/" ] [ "/usr/" "/lib/" append-path ] unit-test
+[ "/lib/bux" ] [ "/usr" "/lib/bux" append-path ] unit-test
+[ "/lib/bux/" ] [ "/usr" "/lib/bux/" append-path ] unit-test
+[ t ] [ "/foo" absolute-path? ] unit-test
+
+: test-file ( -- path )
+    "permissions" temp-file ;
+
+: prepare-test-file ( -- )
+    [ test-file delete-file ] ignore-errors
+    test-file touch-file ;
+
+: perms ( -- n )
+    test-file file-permissions OCT: 7777 mask ;
+
+prepare-test-file
+
+[ t ]
+[ test-file { USER-ALL GROUP-ALL OTHER-ALL } flags set-file-permissions perms OCT: 777 = ] unit-test
+
+[ t ] [ test-file user-read? ] unit-test
+[ t ] [ test-file user-write? ] unit-test
+[ t ] [ test-file user-execute? ] unit-test
+[ t ] [ test-file group-read? ] unit-test
+[ t ] [ test-file group-write? ] unit-test
+[ t ] [ test-file group-execute? ] unit-test
+[ t ] [ test-file other-read? ] unit-test
+[ t ] [ test-file other-write? ] unit-test
+[ t ] [ test-file other-execute? ] unit-test
+
+[ t ] [ test-file f set-other-execute perms OCT: 776 = ] unit-test
+[ f ] [ test-file file-info other-execute? ] unit-test
+
+[ t ] [ test-file f set-other-write perms OCT: 774 = ] unit-test
+[ f ] [ test-file file-info other-write? ] unit-test
+
+[ t ] [ test-file f set-other-read perms OCT: 770 = ] unit-test
+[ f ] [ test-file file-info other-read? ] unit-test
+
+[ t ] [ test-file f set-group-execute perms OCT: 760 = ] unit-test
+[ f ] [ test-file file-info group-execute? ] unit-test
+
+[ t ] [ test-file f set-group-write perms OCT: 740 = ] unit-test
+[ f ] [ test-file file-info group-write? ] unit-test
+
+[ t ] [ test-file f set-group-read perms OCT: 700 = ] unit-test
+[ f ] [ test-file file-info group-read? ] unit-test
+
+[ t ] [ test-file f set-user-execute perms OCT: 600 = ] unit-test
+[ f ] [ test-file file-info other-execute? ] unit-test
+
+[ t ] [ test-file f set-user-write perms OCT: 400 = ] unit-test
+[ f ] [ test-file file-info other-write? ] unit-test
+
+[ t ] [ test-file f set-user-read perms OCT: 000 = ] unit-test
+[ f ] [ test-file file-info other-read? ] unit-test
+
+[ t ]
+[ test-file { USER-ALL GROUP-ALL OTHER-EXECUTE } flags set-file-permissions perms OCT: 771 = ] unit-test
+
+prepare-test-file
+
+[ t ]
+[
+    test-file now
+    [ set-file-access-time ] 2keep
+    [ file-info accessed>> ]
+    [ [ [ truncate >integer ] change-second ] bi@ ] bi* =
+] unit-test
+
+[ t ]
+[
+    test-file now
+    [ set-file-modified-time ] 2keep
+    [ file-info modified>> ]
+    [ [ [ truncate >integer ] change-second ] bi@ ] bi* =
+] unit-test
+
+[ t ]
+[
+    test-file now [ dup 2array set-file-times ] 2keep
+    [ file-info [ modified>> ] [ accessed>> ] bi ] dip
+    3array
+    [ [ truncate >integer ] change-second ] map all-equal?
+] unit-test
+
+[ ] [ test-file f now 2array set-file-times ] unit-test
+[ ] [ test-file now f 2array set-file-times ] unit-test
+[ ] [ test-file f f 2array set-file-times ] unit-test
+
+
+[ ] [ test-file real-user-name set-file-user ] unit-test
+[ ] [ test-file real-user-id set-file-user ] unit-test
+[ ] [ test-file real-group-name set-file-group ] unit-test
+[ ] [ test-file real-group-id set-file-group ] unit-test
+
+[ t ] [ test-file file-user-name real-user-name = ] unit-test
+[ t ] [ test-file file-group-name real-group-name = ] unit-test
+
+[ ]
+[ test-file real-user-id real-group-id set-file-ids ] unit-test
+
+[ ]
+[ test-file f real-group-id set-file-ids ] unit-test
+
+[ ]
+[ test-file real-user-id f set-file-ids ] unit-test
+
+[ ]
+[ test-file f f set-file-ids ] unit-test
+
+[ t ] [ OCT: 4000 uid? ] unit-test
+[ t ] [ OCT: 2000 gid? ] unit-test
+[ t ] [ OCT: 1000 sticky? ] unit-test
+[ t ] [ OCT: 400 user-read? ] unit-test
+[ t ] [ OCT: 200 user-write? ] unit-test
+[ t ] [ OCT: 100 user-execute? ] unit-test
+[ t ] [ OCT: 040 group-read? ] unit-test
+[ t ] [ OCT: 020 group-write? ] unit-test
+[ t ] [ OCT: 010 group-execute? ] unit-test
+[ t ] [ OCT: 004 other-read? ] unit-test
+[ t ] [ OCT: 002 other-write? ] unit-test
+[ t ] [ OCT: 001 other-execute? ] unit-test
+
+[ f ] [ 0 uid? ] unit-test
+[ f ] [ 0 gid? ] unit-test
+[ f ] [ 0 sticky? ] unit-test
+[ f ] [ 0 user-read? ] unit-test
+[ f ] [ 0 user-write? ] unit-test
+[ f ] [ 0 user-execute? ] unit-test
+[ f ] [ 0 group-read? ] unit-test
+[ f ] [ 0 group-write? ] unit-test
+[ f ] [ 0 group-execute? ] unit-test
+[ f ] [ 0 other-read? ] unit-test
+[ f ] [ 0 other-write? ] unit-test
+[ f ] [ 0 other-execute? ] unit-test
diff --git a/basis/io/files/unix/unix.factor b/basis/io/files/unix/unix.factor
new file mode 100644 (file)
index 0000000..9518d1c
--- /dev/null
@@ -0,0 +1,42 @@
+! Copyright (C) 2005, 2008 Slava Pestov, Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: unix byte-arrays kernel io.backend.unix math.bitwise
+io.ports io.files io.files.private io.pathnames environment
+destructors system ;
+IN: io.files.unix
+
+M: unix cwd ( -- path )
+    MAXPATHLEN [ <byte-array> ] keep getcwd
+    [ (io-error) ] unless* ;
+
+M: unix cd ( path -- ) [ chdir ] unix-system-call drop ;
+
+: read-flags ( -- n ) O_RDONLY ; inline
+
+: open-read ( path -- fd ) O_RDONLY file-mode open-file ;
+
+M: unix (file-reader) ( path -- stream )
+    open-read <fd> init-fd <input-port> ;
+
+: write-flags ( -- n )
+    { O_WRONLY O_CREAT O_TRUNC } flags ; inline
+
+: open-write ( path -- fd )
+    write-flags file-mode open-file ;
+
+M: unix (file-writer) ( path -- stream )
+    open-write <fd> init-fd <output-port> ;
+
+: append-flags ( -- n )
+    { O_WRONLY O_APPEND O_CREAT } flags ; inline
+
+: open-append ( path -- fd )
+    [
+        append-flags file-mode open-file |dispose
+        dup 0 SEEK_END lseek io-error
+    ] with-destructors ;
+
+M: unix (file-appender) ( path -- stream )
+    open-append <fd> init-fd <output-port> ;
+
+M: unix home "HOME" os-env ;
diff --git a/basis/io/files/windows/nt/authors.txt b/basis/io/files/windows/nt/authors.txt
new file mode 100755 (executable)
index 0000000..026f4cd
--- /dev/null
@@ -0,0 +1,3 @@
+Doug Coleman
+Slava Pestov
+Mackenzie Straight
diff --git a/basis/io/files/windows/nt/nt-tests.factor b/basis/io/files/windows/nt/nt-tests.factor
new file mode 100644 (file)
index 0000000..e934dc8
--- /dev/null
@@ -0,0 +1,55 @@
+USING: io.files io.pathnames kernel tools.test io.backend
+io.files.windows.nt splitting sequences ;
+IN: io.files.windows.nt.tests
+
+[ f ] [ "\\foo" absolute-path? ] unit-test
+[ t ] [ "\\\\?\\c:\\foo" absolute-path? ] unit-test
+[ t ] [ "\\\\?\\c:\\" absolute-path? ] unit-test
+[ t ] [ "\\\\?\\c:" absolute-path? ] unit-test
+[ t ] [ "c:\\foo" absolute-path? ] unit-test
+[ t ] [ "c:" absolute-path? ] unit-test
+[ t ] [ "c:\\" absolute-path? ] unit-test
+[ f ] [ "/cygdrive/c/builds" absolute-path? ] unit-test
+
+[ "c:\\foo\\" ] [ "c:\\foo\\bar" parent-directory ] unit-test
+[ "c:\\" ] [ "c:\\foo\\" parent-directory ] unit-test
+[ "c:\\" ] [ "c:\\foo" parent-directory ] unit-test
+! { "c:" "c:\\" "c:/" } [ directory ] each -- all do the same thing
+[ "c:\\" ] [ "c:\\" parent-directory ] unit-test
+[ "Z:\\" ] [ "Z:\\" parent-directory ] unit-test
+[ "c:" ] [ "c:" parent-directory ] unit-test
+[ "Z:" ] [ "Z:" parent-directory ] unit-test
+
+[ f ] [ "" root-directory? ] unit-test
+[ t ] [ "\\" root-directory? ] unit-test
+[ t ] [ "\\\\" root-directory? ] unit-test
+[ t ] [ "/" root-directory? ] unit-test
+[ t ] [ "//" root-directory? ] unit-test
+[ t ] [ "c:\\" trim-right-separators root-directory? ] unit-test
+[ t ] [ "Z:\\" trim-right-separators root-directory? ] unit-test
+[ f ] [ "c:\\foo" root-directory? ] unit-test
+[ f ] [ "." root-directory? ] unit-test
+[ f ] [ ".." root-directory? ] unit-test
+[ t ] [ "\\\\?\\c:\\" root-directory? ] unit-test
+[ t ] [ "\\\\?\\c:" root-directory? ] unit-test
+[ f ] [ "\\\\?\\c:\\bar" root-directory? ] unit-test
+
+[ "\\foo\\bar" ] [ "/foo/bar" normalize-path ":" split1 nip ] unit-test
+
+[ "\\\\?\\C:\\builds\\factor\\log.txt" ] [
+    "C:\\builds\\factor\\12345\\"
+    "..\\log.txt" append-path normalize-path
+] unit-test
+
+[ "\\\\?\\C:\\builds\\" ] [
+    "C:\\builds\\factor\\12345\\"
+    "..\\.." append-path normalize-path
+] unit-test
+
+[ "\\\\?\\C:\\builds\\" ] [
+    "C:\\builds\\factor\\12345\\"
+    "..\\.." append-path normalize-path
+] unit-test
+
+[ "c:\\blah" ] [ "c:\\foo\\bar" "\\blah" append-path ] unit-test
+[ t ] [ "" resource-path 2 tail exists? ] unit-test
diff --git a/basis/io/files/windows/nt/nt.factor b/basis/io/files/windows/nt/nt.factor
new file mode 100755 (executable)
index 0000000..3241d19
--- /dev/null
@@ -0,0 +1,61 @@
+USING: continuations destructors io.buffers io.files io.backend
+io.timeouts io.ports io.pathnames io.files.private
+io.backend.windows io.files.windows io.encodings.utf16n windows
+windows.kernel32 kernel libc math threads system environment
+alien.c-types alien.arrays alien.strings sequences combinators
+combinators.short-circuit ascii splitting alien strings assocs
+namespaces make accessors tr windows.time ;
+IN: io.files.windows.nt
+
+M: winnt cwd
+    MAX_UNICODE_PATH dup "ushort" <c-array>
+    [ GetCurrentDirectory win32-error=0/f ] keep
+    utf16n alien>string ;
+
+M: winnt cd
+    SetCurrentDirectory win32-error=0/f ;
+
+: unicode-prefix ( -- seq )
+    "\\\\?\\" ; inline
+
+M: winnt root-directory? ( path -- ? )
+    {
+        { [ dup empty? ] [ drop f ] }
+        { [ dup [ path-separator? ] all? ] [ drop t ] }
+        { [ dup trim-right-separators { [ length 2 = ]
+          [ second CHAR: : = ] } 1&& ] [ drop t ] }
+        { [ dup unicode-prefix head? ]
+          [ trim-right-separators length unicode-prefix length 2 + = ] }
+        [ drop f ]
+    } cond ;
+
+: prepend-prefix ( string -- string' )
+    dup unicode-prefix head? [
+        unicode-prefix prepend
+    ] unless ;
+
+TR: normalize-separators "/" "\\" ;
+
+M: winnt normalize-path ( string -- string' )
+    (normalize-path)
+    normalize-separators
+    prepend-prefix ;
+
+M: winnt CreateFile-flags ( DWORD -- DWORD )
+    FILE_FLAG_OVERLAPPED bitor ;
+
+<PRIVATE
+
+: windows-file-size ( path -- size )
+    normalize-path 0 "WIN32_FILE_ATTRIBUTE_DATA" <c-object>
+    [ GetFileAttributesEx win32-error=0/f ] keep
+    [ WIN32_FILE_ATTRIBUTE_DATA-nFileSizeLow ]
+    [ WIN32_FILE_ATTRIBUTE_DATA-nFileSizeHigh ] bi >64bit ;
+
+PRIVATE>
+
+M: winnt open-append
+    [ dup windows-file-size ] [ drop 0 ] recover
+    [ (open-append) ] dip >>ptr ;
+
+M: winnt home "USERPROFILE" os-env ;
diff --git a/basis/io/files/windows/nt/tags.txt b/basis/io/files/windows/nt/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/files/windows/tags.txt b/basis/io/files/windows/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/files/windows/windows.factor b/basis/io/files/windows/windows.factor
new file mode 100755 (executable)
index 0000000..444ba98
--- /dev/null
@@ -0,0 +1,133 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: alien.c-types io.binary io.backend io.files
+io.files.types io.buffers io.encodings.utf16n io.ports
+io.backend.windows kernel math splitting fry alien.strings
+windows windows.kernel32 windows.time calendar combinators
+math.functions sequences namespaces make words system
+destructors accessors math.bitwise continuations windows.errors
+arrays byte-arrays generalizations ;
+IN: io.files.windows
+
+: open-file ( path access-mode create-mode flags -- handle )
+    [
+        [ share-mode default-security-attributes ] 2dip
+        CreateFile-flags f CreateFile opened-file
+    ] with-destructors ;
+
+: open-r/w ( path -- win32-file )
+    { GENERIC_READ GENERIC_WRITE } flags
+    OPEN_EXISTING 0 open-file ;
+
+: open-read ( path -- win32-file )
+    GENERIC_READ OPEN_EXISTING 0 open-file 0 >>ptr ;
+
+: open-write ( path -- win32-file )
+    GENERIC_WRITE CREATE_ALWAYS 0 open-file 0 >>ptr ;
+
+: (open-append) ( path -- win32-file )
+    GENERIC_WRITE OPEN_ALWAYS 0 open-file ;
+
+: open-existing ( path -- win32-file )
+    { GENERIC_READ GENERIC_WRITE } flags
+    share-mode
+    f
+    OPEN_EXISTING
+    FILE_FLAG_BACKUP_SEMANTICS
+    f CreateFileW dup win32-error=0/f <win32-file> ;
+
+: maybe-create-file ( path -- win32-file ? )
+    #! return true if file was just created
+    { GENERIC_READ GENERIC_WRITE } flags
+    share-mode
+    f
+    OPEN_ALWAYS
+    0 CreateFile-flags
+    f CreateFileW dup win32-error=0/f <win32-file>
+    GetLastError ERROR_ALREADY_EXISTS = not ;
+
+: set-file-pointer ( handle length method -- )
+    [ dupd d>w/w <uint> ] dip SetFilePointer
+    INVALID_SET_FILE_POINTER = [
+        CloseHandle "SetFilePointer failed" throw
+    ] when drop ;
+
+HOOK: open-append os ( path -- win32-file )
+
+TUPLE: FileArgs
+    hFile lpBuffer nNumberOfBytesToRead
+    lpNumberOfBytesRet lpOverlapped ;
+
+C: <FileArgs> FileArgs
+
+: make-FileArgs ( port -- <FileArgs> )
+    {
+        [ handle>> check-disposed ]
+        [ handle>> handle>> ]
+        [ buffer>> ]
+        [ buffer>> buffer-length ]
+        [ drop "DWORD" <c-object> ]
+        [ FileArgs-overlapped ]
+    } cleave <FileArgs> ;
+
+: setup-read ( <FileArgs> -- hFile lpBuffer nNumberOfBytesToRead lpNumberOfBytesRead lpOverlapped )
+    {
+        [ hFile>> ]
+        [ lpBuffer>> buffer-end ]
+        [ lpBuffer>> buffer-capacity ]
+        [ lpNumberOfBytesRet>> ]
+        [ lpOverlapped>> ]
+    } cleave ;
+
+: setup-write ( <FileArgs> -- hFile lpBuffer nNumberOfBytesToWrite lpNumberOfBytesWritten lpOverlapped )
+    {
+        [ hFile>> ]
+        [ lpBuffer>> buffer@ ]
+        [ lpBuffer>> buffer-length ]
+        [ lpNumberOfBytesRet>> ]
+        [ lpOverlapped>> ]
+    } cleave ;
+
+M: windows (file-reader) ( path -- stream )
+    open-read <input-port> ;
+
+M: windows (file-writer) ( path -- stream )
+    open-write <output-port> ;
+
+M: windows (file-appender) ( path -- stream )
+    open-append <output-port> ;
+
+SYMBOLS: +read-only+ +hidden+ +system+
++archive+ +device+ +normal+ +temporary+
++sparse-file+ +reparse-point+ +compressed+ +offline+
++not-content-indexed+ +encrypted+ ;
+
+: win32-file-attribute ( n attr symbol -- )
+    rot mask? [ , ] [ drop ] if ;
+
+: win32-file-attributes ( n -- seq )
+    [
+        {
+            [ +read-only+ FILE_ATTRIBUTE_READONLY win32-file-attribute ]
+            [ +hidden+ FILE_ATTRIBUTE_HIDDEN win32-file-attribute ]
+            [ +system+ FILE_ATTRIBUTE_SYSTEM win32-file-attribute ]
+            [ +directory+ FILE_ATTRIBUTE_DIRECTORY win32-file-attribute ]
+            [ +archive+ FILE_ATTRIBUTE_ARCHIVE win32-file-attribute ]
+            [ +device+ FILE_ATTRIBUTE_DEVICE win32-file-attribute ]
+            [ +normal+ FILE_ATTRIBUTE_NORMAL win32-file-attribute ]
+            [ +temporary+ FILE_ATTRIBUTE_TEMPORARY win32-file-attribute ]
+            [ +sparse-file+ FILE_ATTRIBUTE_SPARSE_FILE win32-file-attribute ]
+            [ +reparse-point+ FILE_ATTRIBUTE_REPARSE_POINT win32-file-attribute ]
+            [ +compressed+ FILE_ATTRIBUTE_COMPRESSED win32-file-attribute ]
+            [ +offline+ FILE_ATTRIBUTE_OFFLINE win32-file-attribute ]
+            [ +not-content-indexed+ FILE_ATTRIBUTE_NOT_CONTENT_INDEXED win32-file-attribute ]
+            [ +encrypted+ FILE_ATTRIBUTE_ENCRYPTED win32-file-attribute ]
+        } cleave
+    ] { } make ;
+
+: win32-file-type ( n -- symbol )
+    FILE_ATTRIBUTE_DIRECTORY mask? +directory+ +regular-file+ ? ;
+
+: (set-file-times) ( handle timestamp/f timestamp/f timestamp/f -- )
+    [ timestamp>FILETIME ] tri@
+    SetFileTime win32-error=0/f ;
old mode 100644 (file)
new mode 100755 (executable)
index 7bafb95..f580922
@@ -261,8 +261,7 @@ M: object run-pipeline-element
     drop ;
 
 {
-    { [ os unix? ] [ "io.unix.launcher" require ] }
-    { [ os winnt? ] [ "io.windows.nt.launcher" require ] }
-    { [ os wince? ] [ "io.windows.launcher" require ] }
+    { [ os unix? ] [ "io.launcher.unix" require ] }
+    { [ os winnt? ] [ "io.launcher.windows.nt" require ] }
     [ ]
 } cond
diff --git a/basis/io/launcher/unix/authors.txt b/basis/io/launcher/unix/authors.txt
new file mode 100755 (executable)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/basis/io/launcher/unix/parser/parser-tests.factor b/basis/io/launcher/unix/parser/parser-tests.factor
new file mode 100644 (file)
index 0000000..07502e8
--- /dev/null
@@ -0,0 +1,33 @@
+IN: io.launcher.unix.parser.tests
+USING: io.launcher.unix.parser tools.test ;
+
+[ "" tokenize-command ] must-fail
+[ "   " tokenize-command ] must-fail
+[ V{ "a" } ] [ "a" tokenize-command ] unit-test
+[ V{ "abc" } ] [ "abc" tokenize-command ] unit-test
+[ V{ "abc" } ] [ "abc   " tokenize-command ] unit-test
+[ V{ "abc" } ] [ "   abc" tokenize-command ] unit-test
+[ V{ "abc" "def" } ] [ "abc def" tokenize-command ] unit-test
+[ V{ "abc def" } ] [ "abc\\ def" tokenize-command ] unit-test
+[ V{ "abc\\" "def" } ] [ "abc\\\\ def" tokenize-command ] unit-test
+[ V{ "abc\\ def" } ] [ "'abc\\\\ def'" tokenize-command ] unit-test
+[ V{ "abc\\ def" } ] [ "  'abc\\\\ def'" tokenize-command ] unit-test
+[ V{ "abc\\ def" "hey" } ] [ "'abc\\\\ def' hey" tokenize-command ] unit-test
+[ V{ "abc def" "hey" } ] [ "'abc def' \"hey\"" tokenize-command ] unit-test
+[ "'abc def' \"hey" tokenize-command ] must-fail
+[ "'abc def" tokenize-command ] must-fail
+[ V{ "abc def" "h\"ey" } ] [ "'abc def' \"h\\\"ey\"  " tokenize-command ] unit-test
+
+[
+    V{
+        "Hello world.app/Contents/MacOS/hello-ui"
+        "-i=boot.macosx-ppc.image"
+        "-include= math compiler ui"
+        "-deploy-vocab=hello-ui"
+        "-output-image=Hello world.app/Contents/Resources/hello-ui.image"
+        "-no-stack-traces"
+        "-no-user-init"
+    }
+] [
+    "\"Hello world.app/Contents/MacOS/hello-ui\" -i=boot.macosx-ppc.image \"-include= math compiler ui\" -deploy-vocab=hello-ui \"-output-image=Hello world.app/Contents/Resources/hello-ui.image\" -no-stack-traces -no-user-init" tokenize-command
+] unit-test
diff --git a/basis/io/launcher/unix/parser/parser.factor b/basis/io/launcher/unix/parser/parser.factor
new file mode 100644 (file)
index 0000000..97e6dee
--- /dev/null
@@ -0,0 +1,33 @@
+! Copyright (C) 2008 Slava Pestov
+! See http://factorcode.org/license.txt for BSD license.
+USING: peg peg.parsers kernel sequences strings words ;
+IN: io.launcher.unix.parser
+
+! Our command line parser. Supported syntax:
+! foo bar baz -- simple tokens
+! foo\ bar -- escaping the space
+! 'foo bar' -- quotation
+! "foo bar" -- quotation
+: 'escaped-char' ( -- parser )
+    "\\" token any-char 2seq [ second ] action ;
+
+: 'quoted-char' ( delimiter -- parser' )
+    'escaped-char'
+    swap [ member? not ] curry satisfy
+    2choice ; inline
+
+: 'quoted' ( delimiter -- parser )
+    dup 'quoted-char' repeat0 swap dup surrounded-by ;
+
+: 'unquoted' ( -- parser ) " '\"" 'quoted-char' repeat1 ;
+
+: 'argument' ( -- parser )
+    "\"" 'quoted'
+    "'" 'quoted'
+    'unquoted' 3choice
+    [ >string ] action ;
+
+PEG: tokenize-command ( command -- ast/f )
+    'argument' " " token repeat1 list-of
+    " " token repeat0 tuck pack
+    just ;
diff --git a/basis/io/launcher/unix/parser/tags.txt b/basis/io/launcher/unix/parser/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/launcher/unix/tags.txt b/basis/io/launcher/unix/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/launcher/unix/unix-tests.factor b/basis/io/launcher/unix/unix-tests.factor
new file mode 100644 (file)
index 0000000..f375bb4
--- /dev/null
@@ -0,0 +1,138 @@
+IN: io.launcher.unix.tests
+USING: io.files io.files.temp io.directories io.pathnames
+tools.test io.launcher arrays io namespaces continuations math
+io.encodings.binary io.encodings.ascii accessors kernel
+sequences io.encodings.utf8 destructors io.streams.duplex locals
+concurrency.promises threads unix.process ;
+
+[ ] [
+    [ "launcher-test-1" temp-file delete-file ] ignore-errors
+] unit-test
+
+[ ] [
+    "touch"
+    "launcher-test-1" temp-file
+    2array
+    try-process
+] unit-test
+
+[ t ] [ "launcher-test-1" temp-file exists? ] unit-test
+
+[ ] [
+    [ "launcher-test-1" temp-file delete-file ] ignore-errors
+] unit-test
+
+[ ] [
+    <process>
+        "echo Hello" >>command
+        "launcher-test-1" temp-file >>stdout
+    try-process
+] unit-test
+
+[ "Hello\n" ] [
+    "cat"
+    "launcher-test-1" temp-file
+    2array
+    ascii <process-reader> contents
+] unit-test
+
+[ ] [
+    [ "launcher-test-1" temp-file delete-file ] ignore-errors
+] unit-test
+
+[ ] [
+    <process>
+        "cat" >>command
+        +closed+ >>stdin
+        "launcher-test-1" temp-file >>stdout
+    try-process
+] unit-test
+
+[ f ] [
+    "cat"
+    "launcher-test-1" temp-file
+    2array
+    ascii <process-reader> contents
+] unit-test
+
+[ ] [
+    2 [
+        "launcher-test-1" temp-file binary <file-appender> [
+            <process>
+                swap >>stdout
+                "echo Hello" >>command
+            try-process
+        ] with-disposal
+    ] times
+] unit-test
+
+[ "Hello\nHello\n" ] [
+    "cat"
+    "launcher-test-1" temp-file
+    2array
+    ascii <process-reader> contents
+] unit-test
+
+[ t ] [
+    <process>
+        "env" >>command
+        { { "A" "B" } } >>environment
+    ascii <process-reader> lines
+    "A=B" swap member?
+] unit-test
+
+[ { "A=B" } ] [
+    <process>
+        "env" >>command
+        { { "A" "B" } } >>environment
+        +replace-environment+ >>environment-mode
+    ascii <process-reader> lines
+] unit-test
+
+[ "hi\n" ] [
+    temp-directory [
+        [ "aloha" delete-file ] ignore-errors
+        <process>
+            { "echo" "hi" } >>command
+            "aloha" >>stdout
+        try-process
+    ] with-directory
+    temp-directory "aloha" append-path
+    utf8 file-contents
+] unit-test
+
+[ "append-test" temp-file delete-file ] ignore-errors
+
+[ "hi\nhi\n" ] [
+    2 [
+        <process>
+            "echo hi" >>command
+            "append-test" temp-file <appender> >>stdout
+        try-process
+    ] times
+    "append-test" temp-file utf8 file-contents
+] unit-test
+
+[ t ] [ "ls" utf8 <process-stream> contents >boolean ] unit-test
+
+[ "Hello world.\n" ] [
+    "cat" utf8 <process-stream> [
+        "Hello world.\n" write
+        output-stream get dispose
+        input-stream get contents
+    ] with-stream
+] unit-test
+
+! Killed processes were exiting with code 0 on FreeBSD
+[ f ] [
+    [let | p [ <promise> ]
+           s [ <promise> ] |
+       [
+           "sleep 1000" run-detached
+           [ p fulfill ] [ wait-for-process s fulfill ] bi
+       ] in-thread
+
+       p ?promise handle>> 9 kill drop
+       s ?promise 0 =
+    ]
+] unit-test
diff --git a/basis/io/launcher/unix/unix.factor b/basis/io/launcher/unix/unix.factor
new file mode 100644 (file)
index 0000000..ac25e4e
--- /dev/null
@@ -0,0 +1,106 @@
+! Copyright (C) 2007, 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors alien.c-types arrays assocs combinators
+continuations environment io io.backend io.backend.unix
+io.files io.files.private io.files.unix io.launcher
+io.launcher.unix.parser io.pathnames io.ports kernel math
+namespaces sequences strings system threads unix unix
+unix.process ;
+IN: io.launcher.unix
+
+! Search unix first
+USE: unix
+
+: get-arguments ( process -- seq )
+    command>> dup string? [ tokenize-command ] when ;
+
+: assoc>env ( assoc -- env )
+    [ "=" glue ] { } assoc>map ;
+
+: setup-priority ( process -- process )
+    dup priority>> [
+        H{
+            { +lowest-priority+ 20 }
+            { +low-priority+ 10 }
+            { +normal-priority+ 0 }
+            { +high-priority+ -10 }
+            { +highest-priority+ -20 }
+            { +realtime-priority+ -20 }
+        } at set-priority
+    ] when* ;
+
+: reset-fd ( fd -- )
+    [ F_SETFL 0 fcntl io-error ] [ F_SETFD 0 fcntl io-error ] bi ;
+
+: redirect-fd ( oldfd fd -- )
+    2dup = [ 2drop ] [ dup2 io-error ] if ;
+
+: redirect-file ( obj mode fd -- )
+    [ [ normalize-path ] dip file-mode open-file ] dip redirect-fd ;
+
+: redirect-file-append ( obj mode fd -- )
+    [ drop path>> normalize-path open-append ] dip redirect-fd ;
+
+: redirect-closed ( obj mode fd -- )
+    [ drop "/dev/null" ] 2dip redirect-file ;
+
+: redirect ( obj mode fd -- )
+    {
+        { [ pick not ] [ 3drop ] }
+        { [ pick string? ] [ redirect-file ] }
+        { [ pick appender? ] [ redirect-file-append ] }
+        { [ pick +closed+ eq? ] [ redirect-closed ] }
+        { [ pick fd? ] [ [ drop fd>> dup reset-fd ] dip redirect-fd ] }
+        [ [ underlying-handle ] 2dip redirect ]
+    } cond ;
+
+: ?closed ( obj -- obj' )
+    dup +closed+ eq? [ drop "/dev/null" ] when ;
+
+: setup-redirection ( process -- process )
+    dup stdin>> ?closed read-flags 0 redirect
+    dup stdout>> ?closed write-flags 1 redirect
+    dup stderr>> dup +stdout+ eq? [
+        drop 1 2 dup2 io-error
+    ] [
+        ?closed write-flags 2 redirect
+    ] if ;
+
+: setup-environment ( process -- process )
+    dup pass-environment? [
+        dup get-environment set-os-envs
+    ] when ;
+
+: spawn-process ( process -- * )
+    [ setup-priority ] [ 250 _exit ] recover
+    [ setup-redirection ] [ 251 _exit ] recover
+    [ current-directory get (normalize-path) cd ] [ 252 _exit ] recover
+    [ setup-environment ] [ 253 _exit ] recover
+    [ get-arguments exec-args-with-path ] [ 254 _exit ] recover
+    255 _exit ;
+
+M: unix current-process-handle ( -- handle ) getpid ;
+
+M: unix run-process* ( process -- pid )
+    [ spawn-process ] curry [ ] with-fork ;
+
+M: unix kill-process* ( pid -- )
+    SIGTERM kill io-error ;
+
+: find-process ( handle -- process )
+    processes get swap [ nip swap handle>> = ] curry
+    assoc-find 2drop ;
+
+TUPLE: signal n ;
+
+: code>status ( code -- obj )
+    dup WIFEXITED [ WEXITSTATUS ] [ WTERMSIG signal boa ] if ;
+
+M: unix wait-for-processes ( -- ? )
+    -1 0 <int> tuck WNOHANG waitpid
+    dup 0 <= [
+        2drop t
+    ] [
+        find-process dup
+        [ swap *int code>status notify-exit f ] [ 2drop f ] if
+    ] if ;
diff --git a/basis/io/launcher/windows/authors.txt b/basis/io/launcher/windows/authors.txt
new file mode 100755 (executable)
index 0000000..5674120
--- /dev/null
@@ -0,0 +1,2 @@
+Doug Coleman
+Slava Pestov
diff --git a/basis/io/launcher/windows/nt/authors.txt b/basis/io/launcher/windows/nt/authors.txt
new file mode 100755 (executable)
index 0000000..026f4cd
--- /dev/null
@@ -0,0 +1,3 @@
+Doug Coleman
+Slava Pestov
+Mackenzie Straight
diff --git a/basis/io/launcher/windows/nt/nt-tests.factor b/basis/io/launcher/windows/nt/nt-tests.factor
new file mode 100644 (file)
index 0000000..93b1e8c
--- /dev/null
@@ -0,0 +1,161 @@
+USING: io.launcher tools.test calendar accessors environment
+namespaces kernel system arrays io io.files io.encodings.ascii
+sequences parser assocs hashtables math continuations eval
+io.files.temp io.directories io.pathnames ;
+IN: io.launcher.windows.nt.tests
+
+[ ] [
+    <process>
+        "notepad" >>command
+        1/2 seconds >>timeout
+    "notepad" set
+] unit-test
+
+[ f ] [ "notepad" get process-running? ] unit-test
+
+[ f ] [ "notepad" get process-started? ] unit-test
+
+[ ] [ "notepad" [ run-detached ] change ] unit-test
+
+[ "notepad" get wait-for-process ] must-fail
+
+[ t ] [ "notepad" get killed>> ] unit-test
+
+[ f ] [ "notepad" get process-running? ] unit-test
+
+[ ] [
+    <process>
+        vm "-quiet" "-run=hello-world" 3array >>command
+        "out.txt" temp-file >>stdout
+    try-process
+] unit-test
+
+[ "Hello world" ] [
+    "out.txt" temp-file ascii file-lines first
+] unit-test
+
+[ ] [
+    <process>
+        vm "-run=listener" 2array >>command
+        +closed+ >>stdin
+    try-process
+] unit-test
+
+: launcher-test-path ( -- str )
+    "resource:basis/io/launcher/windows/nt/test" ;
+
+[ ] [
+    launcher-test-path [
+        <process>
+            vm "-script" "stderr.factor" 3array >>command
+            "out.txt" temp-file >>stdout
+            "err.txt" temp-file >>stderr
+        try-process
+    ] with-directory
+] unit-test
+
+[ "output" ] [
+    "out.txt" temp-file ascii file-lines first
+] unit-test
+
+[ "error" ] [
+    "err.txt" temp-file ascii file-lines first
+] unit-test
+
+[ ] [
+    launcher-test-path [
+        <process>
+            vm "-script" "stderr.factor" 3array >>command
+            "out.txt" temp-file >>stdout
+            +stdout+ >>stderr
+        try-process
+    ] with-directory
+] unit-test
+
+[ "outputerror" ] [
+    "out.txt" temp-file ascii file-lines first
+] unit-test
+
+[ "output" ] [
+    launcher-test-path [
+        <process>
+            vm "-script" "stderr.factor" 3array >>command
+            "err2.txt" temp-file >>stderr
+        ascii <process-reader> lines first
+    ] with-directory
+] unit-test
+
+[ "error" ] [
+    "err2.txt" temp-file ascii file-lines first
+] unit-test
+
+[ t ] [
+    launcher-test-path [
+        <process>
+            vm "-script" "env.factor" 3array >>command
+        ascii <process-reader> contents
+    ] with-directory eval
+
+    os-envs =
+] unit-test
+
+[ t ] [
+    launcher-test-path [
+        <process>
+            vm "-script" "env.factor" 3array >>command
+            +replace-environment+ >>environment-mode
+            os-envs >>environment
+        ascii <process-reader> contents
+    ] with-directory eval
+    
+    os-envs =
+] unit-test
+
+[ "B" ] [
+    launcher-test-path [
+        <process>
+            vm "-script" "env.factor" 3array >>command
+            { { "A" "B" } } >>environment
+        ascii <process-reader> contents
+    ] with-directory eval
+
+    "A" swap at
+] unit-test
+
+[ f ] [
+    launcher-test-path [
+        <process>
+            vm "-script" "env.factor" 3array >>command
+            { { "USERPROFILE" "XXX" } } >>environment
+            +prepend-environment+ >>environment-mode
+        ascii <process-reader> contents
+    ] with-directory eval
+
+    "USERPROFILE" swap at "XXX" =
+] unit-test
+
+2 [
+    [ ] [
+        <process>
+            "cmd.exe /c dir" >>command
+            "dir.txt" temp-file >>stdout
+        try-process
+    ] unit-test
+
+    [ ] [ "dir.txt" temp-file delete-file ] unit-test
+] times
+
+[ "append-test" temp-file delete-file ] ignore-errors
+
+[ "Hello appender\r\nHello appender\r\n" ] [
+    2 [
+        launcher-test-path [
+            <process>
+                vm "-script" "append.factor" 3array >>command
+                "append-test" temp-file <appender> >>stdout
+            try-process
+        ] with-directory
+    ] times
+   
+    "append-test" temp-file ascii file-contents
+] unit-test
diff --git a/basis/io/launcher/windows/nt/nt.factor b/basis/io/launcher/windows/nt/nt.factor
new file mode 100755 (executable)
index 0000000..5ebb38a
--- /dev/null
@@ -0,0 +1,110 @@
+! Copyright (C) 2007, 2008 Doug Coleman, Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: alien alien.c-types arrays continuations destructors io
+io.backend.windows libc io.ports io.pipes windows.types math
+windows.kernel32 windows namespaces make io.launcher kernel
+sequences windows.errors assocs splitting system strings
+io.launcher.windows io.files.windows io.backend io.files
+io.files.private combinators shuffle accessors locals ;
+IN: io.launcher.windows.nt
+
+: duplicate-handle ( handle -- handle' )
+    GetCurrentProcess ! source process
+    swap ! handle
+    GetCurrentProcess ! target process
+    f <void*> [ ! target handle
+        DUPLICATE_SAME_ACCESS ! desired access
+        TRUE ! inherit handle
+        DUPLICATE_CLOSE_SOURCE ! options
+        DuplicateHandle win32-error=0/f
+    ] keep *void* ;
+
+! /dev/null simulation
+: null-input ( -- pipe )
+    (pipe) [ in>> handle>> ] [ out>> dispose ] bi ;
+
+: null-output ( -- pipe )
+    (pipe) [ in>> dispose ] [ out>> handle>> ] bi ;
+
+: null-pipe ( mode -- pipe )
+    {
+        { GENERIC_READ [ null-input ] }
+        { GENERIC_WRITE [ null-output ] }
+    } case ;
+
+! The below code is based on the example given in
+! http://msdn2.microsoft.com/en-us/library/ms682499.aspx
+
+: redirect-default ( obj access-mode create-mode -- handle )
+    3drop f ;
+
+: redirect-closed ( obj access-mode create-mode -- handle )
+    drop nip null-pipe ;
+
+:: redirect-file ( path access-mode create-mode -- handle )
+    path normalize-path
+    access-mode
+    share-mode
+    default-security-attributes
+    create-mode
+    FILE_ATTRIBUTE_NORMAL ! flags and attributes
+    f ! template file
+    CreateFile dup invalid-handle? <win32-file> &dispose handle>> ;
+
+: redirect-append ( path access-mode create-mode -- handle )
+    [ path>> ] 2dip
+    drop OPEN_ALWAYS
+    redirect-file
+    dup 0 FILE_END set-file-pointer ;
+
+: redirect-handle ( handle access-mode create-mode -- handle )
+    2drop handle>> duplicate-handle ;
+
+: redirect-stream ( stream access-mode create-mode -- handle )
+    [ underlying-handle handle>> ] 2dip redirect-handle ;
+
+: redirect ( obj access-mode create-mode -- handle )
+    {
+        { [ pick not ] [ redirect-default ] }
+        { [ pick +closed+ eq? ] [ redirect-closed ] }
+        { [ pick string? ] [ redirect-file ] }
+        { [ pick appender? ] [ redirect-append ] }
+        { [ pick win32-file? ] [ redirect-handle ] }
+        [ redirect-stream ]
+    } cond
+    dup [ dup t set-inherit ] when ;
+
+: redirect-stdout ( process args -- handle )
+    drop
+    stdout>>
+    GENERIC_WRITE
+    CREATE_ALWAYS
+    redirect
+    STD_OUTPUT_HANDLE GetStdHandle or ;
+
+: redirect-stderr ( process args -- handle )
+    over stderr>> +stdout+ eq? [
+        nip
+        lpStartupInfo>> STARTUPINFO-hStdOutput
+    ] [
+        drop
+        stderr>>
+        GENERIC_WRITE
+        CREATE_ALWAYS
+        redirect
+        STD_ERROR_HANDLE GetStdHandle or
+    ] if ;
+
+: redirect-stdin ( process args -- handle )
+    drop
+    stdin>>
+    GENERIC_READ
+    OPEN_EXISTING
+    redirect
+    STD_INPUT_HANDLE GetStdHandle or ;
+
+M: winnt fill-redirection ( process args -- )
+    [ 2dup redirect-stdout ] keep lpStartupInfo>> set-STARTUPINFO-hStdOutput
+    [ 2dup redirect-stderr ] keep lpStartupInfo>> set-STARTUPINFO-hStdError
+    [ 2dup redirect-stdin  ] keep lpStartupInfo>> set-STARTUPINFO-hStdInput
+    2drop ;
diff --git a/basis/io/launcher/windows/nt/tags.txt b/basis/io/launcher/windows/nt/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/launcher/windows/nt/test/append.factor b/basis/io/launcher/windows/nt/test/append.factor
new file mode 100644 (file)
index 0000000..4c1de0c
--- /dev/null
@@ -0,0 +1,2 @@
+USE: io\r
+"Hello appender" print\r
diff --git a/basis/io/launcher/windows/nt/test/env.factor b/basis/io/launcher/windows/nt/test/env.factor
new file mode 100644 (file)
index 0000000..503ca7d
--- /dev/null
@@ -0,0 +1,4 @@
+USE: system
+USE: prettyprint
+USE: environment
+os-envs .
diff --git a/basis/io/launcher/windows/nt/test/stderr.factor b/basis/io/launcher/windows/nt/test/stderr.factor
new file mode 100644 (file)
index 0000000..f22f50e
--- /dev/null
@@ -0,0 +1,5 @@
+USE: io\r
+USE: namespaces\r
+\r
+"output" write flush\r
+"error" error-stream get stream-write error-stream get stream-flush\r
diff --git a/basis/io/launcher/windows/tags.txt b/basis/io/launcher/windows/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/launcher/windows/windows-tests.factor b/basis/io/launcher/windows/windows-tests.factor
new file mode 100644 (file)
index 0000000..1a3fe82
--- /dev/null
@@ -0,0 +1,10 @@
+IN: io.launcher.windows.tests\r
+USING: tools.test io.launcher.windows ;\r
+\r
+[ "hello world" ] [ { "hello" "world" } join-arguments ] unit-test\r
+\r
+[ "bob \"mac arthur\"" ] [ { "bob" "mac arthur" } join-arguments ] unit-test\r
+\r
+[ "bob mac\\\\arthur" ] [ { "bob" "mac\\\\arthur" } join-arguments ] unit-test\r
+\r
+[ "bob \"mac arthur\\\\\"" ] [ { "bob" "mac arthur\\" } join-arguments ] unit-test\r
diff --git a/basis/io/launcher/windows/windows.factor b/basis/io/launcher/windows/windows.factor
new file mode 100755 (executable)
index 0000000..0497754
--- /dev/null
@@ -0,0 +1,164 @@
+! Copyright (C) 2007, 2008 Doug Coleman, Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: alien alien.c-types arrays continuations io
+io.backend.windows io.pipes.windows.nt io.pathnames libc io.ports
+windows.types math windows.kernel32
+namespaces make io.launcher kernel sequences windows.errors
+splitting system threads init strings combinators
+io.backend accessors concurrency.flags io.files assocs
+io.files.private windows destructors specialized-arrays.ushort
+specialized-arrays.alien ;
+IN: io.launcher.windows
+
+TUPLE: CreateProcess-args
+       lpApplicationName
+       lpCommandLine
+       lpProcessAttributes
+       lpThreadAttributes
+       bInheritHandles
+       dwCreateFlags
+       lpEnvironment
+       lpCurrentDirectory
+       lpStartupInfo
+       lpProcessInformation ;
+
+: default-CreateProcess-args ( -- obj )
+    CreateProcess-args new
+    "STARTUPINFO" <c-object>
+    "STARTUPINFO" heap-size over set-STARTUPINFO-cb >>lpStartupInfo
+    "PROCESS_INFORMATION" <c-object> >>lpProcessInformation
+    TRUE >>bInheritHandles
+    0 >>dwCreateFlags ;
+
+: call-CreateProcess ( CreateProcess-args -- )
+    {
+        [ lpApplicationName>> ]
+        [ lpCommandLine>> ]
+        [ lpProcessAttributes>> ]
+        [ lpThreadAttributes>> ]
+        [ bInheritHandles>> ]
+        [ dwCreateFlags>> ]
+        [ lpEnvironment>> ]
+        [ lpCurrentDirectory>> ]
+        [ lpStartupInfo>> ]
+        [ lpProcessInformation>> ]
+    } cleave
+    CreateProcess win32-error=0/f ;
+
+: count-trailing-backslashes ( str n -- str n )
+    [ "\\" ?tail ] dip swap [
+        1+ count-trailing-backslashes
+    ] when ;
+
+: fix-trailing-backslashes ( str -- str' )
+    0 count-trailing-backslashes
+    2 * CHAR: \\ <repetition> append ;
+
+: escape-argument ( str -- newstr )
+    CHAR: \s over member? [
+        fix-trailing-backslashes "\"" dup surround
+    ] when ;
+
+: join-arguments ( args -- cmd-line )
+    [ escape-argument ] map " " join ;
+
+: lookup-priority ( process -- n )
+    priority>> {
+        { +lowest-priority+ [ IDLE_PRIORITY_CLASS ] }
+        { +low-priority+ [ BELOW_NORMAL_PRIORITY_CLASS ] }
+        { +normal-priority+ [ NORMAL_PRIORITY_CLASS ] }
+        { +high-priority+ [ ABOVE_NORMAL_PRIORITY_CLASS ] }
+        { +highest-priority+ [ HIGH_PRIORITY_CLASS ] }
+        { +realtime-priority+ [ REALTIME_PRIORITY_CLASS ] }
+        [ drop f ]
+    } case ;
+
+: app-name/cmd-line ( process -- app-name cmd-line )
+    command>> dup string? [
+        " " split1
+    ] [
+        unclip swap join-arguments
+    ] if ;
+
+: cmd-line ( process -- cmd-line )
+    command>> dup string? [ join-arguments ] unless ;
+
+: fill-lpApplicationName ( process args -- process args )
+    over app-name/cmd-line
+    [ >>lpApplicationName ] [ >>lpCommandLine ] bi* ;
+
+: fill-lpCommandLine ( process args -- process args )
+    over cmd-line >>lpCommandLine ;
+
+: fill-dwCreateFlags ( process args -- process args )
+    0
+    pick pass-environment? [ CREATE_UNICODE_ENVIRONMENT bitor ] when
+    pick detached>> os winnt? and [ DETACHED_PROCESS bitor ] when
+    pick lookup-priority [ bitor ] when*
+    >>dwCreateFlags ;
+
+: fill-lpEnvironment ( process args -- process args )
+    over pass-environment? [
+        [
+            over get-environment
+            [ swap % "=" % % "\0" % ] assoc-each
+            "\0" %
+        ] ushort-array{ } make underlying>>
+        >>lpEnvironment
+    ] when ;
+
+: fill-startup-info ( process args -- process args )
+    STARTF_USESTDHANDLES over lpStartupInfo>> set-STARTUPINFO-dwFlags ;
+
+HOOK: fill-redirection io-backend ( process args -- )
+
+M: wince fill-redirection 2drop ;
+
+: make-CreateProcess-args ( process -- args )
+    default-CreateProcess-args
+    os wince? [ fill-lpApplicationName ] [ fill-lpCommandLine ] if
+    fill-dwCreateFlags
+    fill-lpEnvironment
+    fill-startup-info
+    nip ;
+
+M: windows current-process-handle ( -- handle )
+    GetCurrentProcessId ;
+
+M: windows run-process* ( process -- handle )
+    [
+        current-directory get (normalize-path) cd
+
+        dup make-CreateProcess-args
+        tuck fill-redirection
+        dup call-CreateProcess
+        lpProcessInformation>>
+    ] with-destructors ;
+
+M: windows kill-process* ( handle -- )
+    PROCESS_INFORMATION-hProcess
+    255 TerminateProcess win32-error=0/f ;
+
+: dispose-process ( process-information -- )
+    #! From MSDN: "Handles in PROCESS_INFORMATION must be closed
+    #! with CloseHandle when they are no longer needed."
+    dup PROCESS_INFORMATION-hProcess [ CloseHandle drop ] when*
+    PROCESS_INFORMATION-hThread [ CloseHandle drop ] when* ;
+
+: exit-code ( process -- n )
+    PROCESS_INFORMATION-hProcess
+    0 <ulong> [ GetExitCodeProcess ] keep *ulong
+    swap win32-error=0/f ;
+
+: process-exited ( process -- )
+    dup handle>> exit-code
+    over handle>> dispose-process
+    notify-exit ;
+
+M: windows wait-for-processes ( -- ? )
+    processes get keys dup
+    [ handle>> PROCESS_INFORMATION-hProcess ] void*-array{ } map-as
+    [ length ] [ underlying>> ] bi 0 0
+    WaitForMultipleObjects
+    dup HEX: ffffffff = [ win32-error ] when
+    dup WAIT_TIMEOUT = [ 2drop t ] [ swap nth process-exited f ] if ;
index 4587a75fd9d2b9c97018013f385e7e12bfa62e49..954d8b43c7bf6edd612d49980748bf58affe58e6 100644 (file)
@@ -20,9 +20,9 @@ with-mapped-A-file DEFINES with-mapped-${T}-file
 WHERE
 
 : <mapped-A> ( mapped-file -- direct-array )
-    T mapped-file>direct <A> execute ; inline
+    T mapped-file>direct <A> ; inline
 
 : with-mapped-A-file ( path length quot -- )
-    '[ <mapped-A> execute @ ] with-mapped-file ; inline
+    '[ <mapped-A> @ ] with-mapped-file ; inline
 
 ;FUNCTOR
index bd971656d4dee588ad87866df4353db53fce1898..5ef3400a6dd7969dd11828f94b484ee319493399 100644 (file)
@@ -19,6 +19,7 @@ HELP: <mapped-file>
 HELP: with-mapped-file
 { $values { "path" "a pathname string" } { "quot" { $quotation "( mmap -- )" } } }
 { $contract "Opens a file and maps its contents into memory, passing the " { $link mapped-file } " instance to the quotation. The mapped file is disposed of when the quotation returns, or if an error is thrown." }
+{ $notes "This is a low-level word, because " { $link mapped-file } " objects simply expose their base address and length. Most applications should use " { $link "io.mmap.arrays" } " instead." }
 { $errors "Throws an error if a memory mapping could not be established." } ;
 
 HELP: close-mapped-file
index dc2f0b4687a76c48b5928ad803c8d2c34625e726..166167a7e7f070c591a4a3ef13c7170121652740 100644 (file)
@@ -1,5 +1,6 @@
-USING: io io.mmap io.mmap.char io.files kernel tools.test
-continuations sequences io.encodings.ascii accessors ;
+USING: io io.mmap io.mmap.char io.files io.files.temp
+io.directories kernel tools.test continuations sequences
+io.encodings.ascii accessors ;
 IN: io.mmap.tests
 
 [ "mmap-test-file.txt" temp-file delete-file ] ignore-errors
index 3cf451bd036f432af4ae12aecbf38a691cd04164..6f2fabb7098e9ba53ffd8fe1b0fba1c65103e8cd 100644 (file)
@@ -1,13 +1,13 @@
 ! Copyright (C) 2007, 2008 Doug Coleman, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: continuations destructors io.files io.backend kernel
-quotations system alien alien.accessors accessors system
-vocabs.loader combinators alien.c-types ;
+USING: continuations destructors io.files io.files.info
+io.backend kernel quotations system alien alien.accessors
+accessors system vocabs.loader combinators alien.c-types ;
 IN: io.mmap
 
 TUPLE: mapped-file address handle length disposed ;
 
-HOOK: (mapped-file) io-backend ( path length -- address handle )
+HOOK: (mapped-file) os ( path length -- address handle )
 
 : <mapped-file> ( path -- mmap )
     [ normalize-path ] [ file-info size>> ] bi [ (mapped-file) ] keep
@@ -21,6 +21,6 @@ M: mapped-file dispose* ( mmap -- ) close-mapped-file ;
     [ <mapped-file> ] dip with-disposal ; inline
 
 {
-    { [ os unix? ] [ "io.unix.mmap" require ] }
-    { [ os winnt? ] [ "io.windows.mmap" require ] }
+    { [ os unix? ] [ "io.mmap.unix" require ] }
+    { [ os winnt? ] [ "io.mmap.windows" require ] }
 } cond
diff --git a/basis/io/mmap/unix/authors.txt b/basis/io/mmap/unix/authors.txt
new file mode 100755 (executable)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/basis/io/mmap/unix/tags.txt b/basis/io/mmap/unix/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/mmap/unix/unix.factor b/basis/io/mmap/unix/unix.factor
new file mode 100644 (file)
index 0000000..9325dcd
--- /dev/null
@@ -0,0 +1,24 @@
+! Copyright (C) 2007 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: alien io io.files kernel math math.bitwise system unix
+io.backend.unix io.ports io.mmap destructors locals accessors ;
+IN: io.mmap.unix
+
+: open-r/w ( path -- fd ) O_RDWR file-mode open-file ;
+
+:: mmap-open ( path length prot flags -- alien fd )
+    [
+        f length prot flags
+        path open-r/w |dispose
+        [ 0 mmap dup MAP_FAILED = [ (io-error) ] when ] keep
+    ] with-destructors ;
+
+M: unix (mapped-file)
+    { PROT_READ PROT_WRITE } flags
+    { MAP_FILE MAP_SHARED } flags
+    mmap-open ;
+
+M: unix close-mapped-file ( mmap -- )
+    [ [ address>> ] [ length>> ] bi munmap io-error ]
+    [ handle>> close-file ]
+    bi ;
diff --git a/basis/io/mmap/windows/authors.txt b/basis/io/mmap/windows/authors.txt
new file mode 100755 (executable)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/basis/io/mmap/windows/tags.txt b/basis/io/mmap/windows/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/mmap/windows/windows.factor b/basis/io/mmap/windows/windows.factor
new file mode 100644 (file)
index 0000000..fcdf416
--- /dev/null
@@ -0,0 +1,44 @@
+USING: alien alien.c-types arrays destructors generic io.mmap
+io.ports io.backend.windows io.files.windows io.backend.windows.privileges
+kernel libc math math.bitwise namespaces quotations sequences
+windows windows.advapi32 windows.kernel32 io.backend system
+accessors locals ;
+IN: io.mmap.windows
+
+: create-file-mapping ( hFile lpAttributes flProtect dwMaximumSizeHigh dwMaximumSizeLow lpName -- HANDLE )
+    CreateFileMapping [ win32-error=0/f ] keep <win32-handle> ;
+
+: map-view-of-file ( hFileMappingObject dwDesiredAccess dwFileOffsetHigh dwFileOffsetLow dwNumberOfBytesToMap -- HANDLE )
+    MapViewOfFile [ win32-error=0/f ] keep ;
+
+:: mmap-open ( path length access-mode create-mode protect access -- handle handle address )
+    [let | lo [ length HEX: ffffffff bitand ]
+           hi [ length -32 shift HEX: ffffffff bitand ] |
+        { "SeCreateGlobalPrivilege" "SeLockMemoryPrivilege" } [
+            path access-mode create-mode 0 open-file |dispose
+            dup handle>> f protect hi lo f create-file-mapping |dispose
+            dup handle>> access 0 0 0 map-view-of-file
+        ] with-privileges
+    ] ;
+
+TUPLE: win32-mapped-file file mapping ;
+
+M: win32-mapped-file dispose
+    [ file>> dispose ] [ mapping>> dispose ] bi ;
+
+C: <win32-mapped-file> win32-mapped-file
+
+M: windows (mapped-file)
+    [
+        { GENERIC_WRITE GENERIC_READ } flags
+        OPEN_ALWAYS
+        { PAGE_READWRITE SEC_COMMIT } flags
+        FILE_MAP_ALL_ACCESS mmap-open
+        -rot <win32-mapped-file>
+    ] with-destructors ;
+
+M: windows close-mapped-file ( mapped-file -- )
+    [
+        [ handle>> &dispose drop ]
+        [ address>> UnmapViewOfFile win32-error=0/f ] bi
+    ] with-destructors ;
diff --git a/basis/io/monitors/linux/linux-tests.factor b/basis/io/monitors/linux/linux-tests.factor
new file mode 100644 (file)
index 0000000..2170bd7
--- /dev/null
@@ -0,0 +1,37 @@
+IN: io.monitors.linux.tests
+USING: io.monitors tools.test io.files io.files.temp
+io.directories system sequences continuations namespaces
+concurrency.count-downs kernel io threads calendar prettyprint
+destructors io.timeouts accessors ;
+
+! On Linux, a notification on the directory itself would report an invalid
+! path name
+[
+    [ ] [ "monitor-test-self" temp-file make-directories ] unit-test
+    
+    ! Non-recursive
+    [ ] [ "monitor-test-self" temp-file f <monitor> "m" set ] unit-test
+    [ ] [ 3 seconds "m" get set-timeout ] unit-test
+
+    [ ] [ "monitor-test-self" temp-file touch-file ] unit-test
+
+    [ t ] [
+        "m" get next-change path>>
+        [ "" = ] [ "monitor-test-self" temp-file = ] bi or
+    ] unit-test
+
+    [ ] [ "m" get dispose ] unit-test
+    
+    ! Recursive
+    [ ] [ "monitor-test-self" temp-file t <monitor> "m" set ] unit-test
+    [ ] [ 3 seconds "m" get set-timeout ] unit-test
+
+    [ ] [ "monitor-test-self" temp-file touch-file ] unit-test
+
+    [ t ] [
+        "m" get next-change path>>
+        [ "" = ] [ "monitor-test-self" temp-file = ] bi or
+    ] unit-test
+
+    [ ] [ "m" get dispose ] unit-test
+] with-monitors
diff --git a/basis/io/monitors/linux/linux.factor b/basis/io/monitors/linux/linux.factor
new file mode 100644 (file)
index 0000000..e914f32
--- /dev/null
@@ -0,0 +1,136 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel io.backend io.monitors io.monitors.recursive
+io.files io.pathnames io.buffers io.monitors io.ports io.timeouts
+io.backend.unix io.encodings.utf8 unix.linux.inotify assocs
+namespaces make threads continuations init math math.bitwise
+sets alien alien.strings alien.c-types vocabs.loader accessors
+system hashtables destructors unix ;
+IN: io.monitors.linux
+
+SYMBOL: watches
+
+SYMBOL: inotify
+
+TUPLE: linux-monitor < monitor wd inotify watches disposed ;
+
+: <linux-monitor> ( wd path mailbox -- monitor )
+    linux-monitor new-monitor
+        inotify get >>inotify
+        watches get >>watches
+        swap >>wd ;
+
+: wd>monitor ( wd -- monitor ) watches get at ;
+
+: <inotify> ( -- port/f )
+    inotify_init dup 0 < [ drop f ] [ <fd> init-fd <input-port> ] if ;
+
+: inotify-fd ( -- fd ) inotify get handle>> handle-fd ;
+
+: check-existing ( wd -- )
+    watches get key? [
+        "Cannot open multiple monitors for the same file" throw
+    ] when ;
+
+: (add-watch) ( path mask -- wd )
+    inotify-fd -rot inotify_add_watch dup io-error dup check-existing ;
+
+: add-watch ( path mask mailbox -- monitor )
+    [ [ (normalize-path) ] dip [ (add-watch) ] [ drop ] 2bi ] dip
+    <linux-monitor> [ ] [ ] [ wd>> ] tri watches get set-at ;
+
+: check-inotify ( -- )
+    inotify get [
+        "Calling <monitor> outside with-monitors" throw
+    ] unless ;
+
+M: linux (monitor) ( path recursive? mailbox -- monitor )
+    swap [
+        <recursive-monitor>
+    ] [
+        check-inotify
+        IN_CHANGE_EVENTS swap add-watch
+    ] if ;
+
+M: linux-monitor dispose* ( monitor -- )
+    [ [ wd>> ] [ watches>> ] bi delete-at ]
+    [
+        dup inotify>> disposed>> [ drop ] [
+            [ inotify>> handle>> handle-fd ] [ wd>> ] bi
+            inotify_rm_watch io-error
+        ] if
+    ] bi ;
+
+: ignore-flags? ( mask -- ? )
+    {
+        IN_DELETE_SELF
+        IN_MOVE_SELF
+        IN_UNMOUNT
+        IN_Q_OVERFLOW
+        IN_IGNORED
+    } flags bitand 0 > ;
+
+: parse-action ( mask -- changed )
+    [
+        IN_CREATE +add-file+ ?flag
+        IN_DELETE +remove-file+ ?flag
+        IN_MODIFY +modify-file+ ?flag
+        IN_ATTRIB +modify-file+ ?flag
+        IN_MOVED_FROM +rename-file-old+ ?flag
+        IN_MOVED_TO +rename-file-new+ ?flag
+        drop
+    ] { } make prune ;
+
+: parse-event-name ( event -- name )
+    dup inotify-event-len zero?
+    [ drop "" ] [ inotify-event-name utf8 alien>string ] if ;
+
+: parse-file-notify ( buffer -- path changed )
+    dup inotify-event-mask ignore-flags? [
+        drop f f
+    ] [
+        [ parse-event-name ] [ inotify-event-mask parse-action ] bi
+    ] if ;
+
+: events-exhausted? ( i buffer -- ? )
+    fill>> >= ;
+
+: inotify-event@ ( i buffer -- alien )
+    ptr>> <displaced-alien> ;
+
+: next-event ( i buffer -- i buffer )
+    2dup inotify-event@
+    inotify-event-len "inotify-event" heap-size +
+    swap [ + ] dip ;
+
+: parse-file-notifications ( i buffer -- )
+    2dup events-exhausted? [ 2drop ] [
+        2dup inotify-event@ dup inotify-event-wd wd>monitor
+        [ parse-file-notify ] dip queue-change
+        next-event parse-file-notifications
+    ] if ;
+
+: inotify-read-loop ( port -- )
+    dup check-disposed
+    dup wait-to-read drop
+    0 over buffer>> parse-file-notifications
+    0 over buffer>> buffer-reset
+    inotify-read-loop ;
+
+: inotify-read-thread ( port -- )
+    [ inotify-read-loop ] curry ignore-errors ;
+
+M: linux init-monitors
+    H{ } clone watches set
+    <inotify> [
+        [ inotify set ]
+        [
+            [ inotify-read-thread ] curry
+            "Linux monitor thread" spawn drop
+        ] bi
+    ] [
+        "Linux kernel version is too old" throw
+    ] if* ;
+
+M: linux dispose-monitors
+    inotify get dispose ;
diff --git a/basis/io/monitors/linux/tags.txt b/basis/io/monitors/linux/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/monitors/macosx/macosx.factor b/basis/io/monitors/macosx/macosx.factor
new file mode 100644 (file)
index 0000000..be1dcc6
--- /dev/null
@@ -0,0 +1,23 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: io.backend io.monitors
+core-foundation.fsevents continuations kernel sequences
+namespaces arrays system locals accessors destructors fry ;
+IN: io.monitors.macosx
+
+TUPLE: macosx-monitor < monitor handle ;
+
+: enqueue-notifications ( triples monitor -- )
+    '[ first { +modify-file+ } _ queue-change ] each ;
+
+M:: macosx (monitor) ( path recursive? mailbox -- monitor )
+    [let | path [ path normalize-path ] |
+        path mailbox macosx-monitor new-monitor
+        dup [ enqueue-notifications ] curry
+        path 1array 0 0 <event-stream> >>handle
+    ] ;
+
+M: macosx-monitor dispose
+    handle>> dispose ;
+
+macosx set-io-backend
diff --git a/basis/io/monitors/macosx/tags.txt b/basis/io/monitors/macosx/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
index 3242b276e6494de6567902032b91102bfcae600c..f0278e300e03457cc84b5518ec01590decd101b2 100644 (file)
@@ -17,9 +17,12 @@ HELP: (monitor)
 { $contract "Opens a file system change monitor which listens for changes on " { $snippet "path" } " and posts notifications to " { $snippet "mailbox" } " as triples with shape " { $snippet "{ path changed monitor } " } ". The boolean indicates whether changes in subdirectories should be reported." }\r
 { $errors "Throws an error if the pathname does not exist, if a monitor could not be created or if the platform does not support monitors." } ;\r
 \r
+HELP: file-change\r
+{ $class-description "A change notification output by " { $link next-change } ". The " { $snippet "path" } " slot holds a pathname string. The " { $snippet "changed" } " slots holds a sequence of symbols documented in " { $link "io.monitors.descriptors" } "." } ;\r
+\r
 HELP: next-change\r
-{ $values { "monitor" "a monitor" } { "path" "a pathname string" } { "changed" "a change descriptor" } }\r
-{ $contract "Waits for file system changes and outputs the pathname of the first changed file. The change descriptor is a sequence of symbols documented in " { $link "io.monitors.descriptors" } "." }\r
+{ $values { "monitor" "a monitor" } { "change" file-change } }\r
+{ $contract "Waits for file system changes and outputs a change descriptor for the first changed file." }\r
 { $errors "Throws an error if the monitor is closed from another thread." } ;\r
 \r
 HELP: with-monitor\r
@@ -46,7 +49,9 @@ HELP: +rename-file+
 { $description "Indicates that a file has been renamed." } ;\r
 \r
 ARTICLE: "io.monitors.descriptors" "File system change descriptors"\r
-"Change descriptors output by " { $link next-change } ":"\r
+"The " { $link next-change } " word outputs instances of a class:"\r
+{ $subsection file-change }\r
+"The " { $slot "changed" } " slot holds a sequence which may contain any of the following symbols:"\r
 { $subsection +add-file+ }\r
 { $subsection +remove-file+ }\r
 { $subsection +modify-file+ }\r
@@ -55,7 +60,7 @@ ARTICLE: "io.monitors.descriptors" "File system change descriptors"
 { $subsection +rename-file+ } ;\r
 \r
 ARTICLE: "io.monitors.platforms" "Monitors on different platforms"\r
-"Whether the " { $snippet "path" } " output value of " { $link next-change } " contains an absolute path or a path relative to the path given to " { $link <monitor> } " is unspecified, and may even vary on the same platform. User code should not assume either case."\r
+"Whether the " { $slot "path" } " slot of a " { $link file-change } " contains an absolute path or a path relative to the path given to " { $link <monitor> } " is unspecified, and may even vary on the same platform. User code should not assume either case."\r
 $nl\r
 "If the immediate path being monitored was changed, then " { $snippet "path" } " will equal " { $snippet "\"\"" } "; however this condition is not reported on all platforms. See below."\r
 { $heading "Mac OS X" }\r
@@ -63,7 +68,7 @@ $nl
 $nl\r
 { $snippet "FSEventStream" } "s always monitor directory hierarchies recursively, and the " { $snippet "recursive?" } " parameter to " { $link <monitor> } " has no effect."\r
 $nl\r
-"The " { $snippet "changed" } " output value of the " { $link next-change } " word always outputs " { $link +modify-file+ } " and the " { $snippet "path" } " output value is always the directory containing the file that changed. Unlike other platforms, fine-grained information is not available."\r
+"The " { $snippet "changed" } " slot of the " { $link file-change } " word tuple always contains " { $link +modify-file+ } " and the " { $snippet "path" } " slot is always the directory containing the file that changed. Unlike other platforms, fine-grained information is not available."\r
 $nl\r
 "Only directories may be monitored, not individual files. Changes to the directory itself (permissions, modification time, and so on) are not reported; only changes to children are reported."\r
 { $heading "Windows" }\r
@@ -107,7 +112,7 @@ $nl
 { $code\r
     "USE: io.monitors"\r
     ": watch-loop ( monitor -- )"\r
-    "    dup next-change . nl nl flush watch-loop ;"\r
+    "    dup next-change . nl nl flush watch-loop ;"\r
     ""\r
     ": watch-directory ( path -- )"\r
     "    [ t [ watch-loop ] with-monitor ] with-monitors"\r
index 1cc97753b715a8e067f06a472d25c2aa6089da13..7c50a4e63782c11915baeedc25920ecdec68fbfa 100644 (file)
@@ -1,7 +1,9 @@
 IN: io.monitors.tests
 USING: io.monitors tools.test io.files system sequences
 continuations namespaces concurrency.count-downs kernel io
-threads calendar prettyprint destructors io.timeouts ;
+threads calendar prettyprint destructors io.timeouts
+io.files.temp io.directories io.directories.hierarchy
+io.pathnames accessors ;
 
 os { winnt linux macosx } member? [
     [
@@ -51,7 +53,7 @@ os { winnt linux macosx } member? [
                 "b" get count-down
 
                 [
-                    "m" get next-change drop
+                    "m" get next-change path>>
                     dup print flush
                     dup parent-directory
                     [ trim-right-separators "xyz" tail? ] either? not
@@ -60,7 +62,7 @@ os { winnt linux macosx } member? [
                 "c1" get count-down
                 
                 [
-                    "m" get next-change drop
+                    "m" get next-change path>>
                     dup print flush
                     dup parent-directory
                     [ trim-right-separators "yxy" tail? ] either? not
@@ -99,13 +101,13 @@ os { winnt linux macosx } member? [
         ! Non-recursive
         [ ] [ "monitor-timeout-test" temp-file f <monitor> "m" set ] unit-test
         [ ] [ 3 seconds "m" get set-timeout ] unit-test
-        [ [ t ] [ "m" get next-change 2drop ] [ ] while ] must-fail
+        [ [ t ] [ "m" get next-change drop ] [ ] while ] must-fail
         [ ] [ "m" get dispose ] unit-test
 
         ! Recursive
         [ ] [ "monitor-timeout-test" temp-file t <monitor> "m" set ] unit-test
         [ ] [ 3 seconds "m" get set-timeout ] unit-test
-        [ [ t ] [ "m" get next-change 2drop ] [ ] while ] must-fail
+        [ [ t ] [ "m" get next-change drop ] [ ] while ] must-fail
         [ ] [ "m" get dispose ] unit-test
     ] with-monitors
 ] when
index 72f2bc80c5d1be305770596b082ae5089b5dba52..7d40a1563a6020f9d42bf1f83a8b028488c113fa 100644 (file)
@@ -1,8 +1,8 @@
-! Copyright (C) 2008 Slava Pestov.
+! Copyright (C) 2008, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: io.backend kernel continuations destructors namespaces
 sequences assocs hashtables sorting arrays threads boxes
-io.timeouts accessors concurrency.mailboxes
+io.timeouts accessors concurrency.mailboxes fry
 system vocabs.loader combinators ;
 IN: io.monitors
 
@@ -33,17 +33,19 @@ M: monitor set-timeout (>>timeout) ;
         swap >>queue
         swap >>path ; inline
 
+TUPLE: file-change path changed monitor ;
+
 : queue-change ( path changes monitor -- )
     3dup and and
-    [ [ 3array ] keep queue>> mailbox-put ] [ 3drop ] if ;
+    [ [ file-change boa ] keep queue>> mailbox-put ] [ 3drop ] if ;
 
 HOOK: (monitor) io-backend ( path recursive? mailbox -- monitor )
 
 : <monitor> ( path recursive? -- monitor )
     <mailbox> (monitor) ;
 
-: next-change ( monitor -- path changed )
-    [ queue>> ] [ timeout ] bi mailbox-get-timeout first2 ;
+: next-change ( monitor -- change )
+    [ queue>> ] [ timeout ] bi mailbox-get-timeout ;
 
 SYMBOL: +add-file+
 SYMBOL: +remove-file+
@@ -55,9 +57,15 @@ SYMBOL: +rename-file+
 : with-monitor ( path recursive? quot -- )
     [ <monitor> ] dip with-disposal ; inline
 
+: run-monitor ( path recursive? quot -- )
+    '[ [ @ t ] loop ] with-monitor ; inline
+
+: spawn-monitor ( path recursive? quot -- )
+    [ '[ _ _ _ run-monitor ] ] [ 2drop "Monitoring " prepend ] 3bi
+    spawn drop ;
 {
-    { [ os macosx? ] [ "io.unix.macosx.monitors" require ] }
-    { [ os linux? ] [ "io.unix.linux.monitors" require ] }
-    { [ os winnt? ] [ "io.windows.nt.monitors" require ] }
-    [ ]
+    { [ os macosx? ] [ "io.monitors.macosx" require ] }
+    { [ os linux? ] [ "io.monitors.linux" require ] }
+    { [ os winnt? ] [ "io.monitors.windows.nt" require ] }
+    { [ os bsd? ] [ ] }
 } cond
index fba879a6d278c26dbf855e8f848cd405dd6fd3c6..ace93ace4434615e08e73ef569baa642a1793354 100644 (file)
@@ -1,6 +1,7 @@
 USING: accessors math kernel namespaces continuations
 io.files io.monitors io.monitors.recursive io.backend
-concurrency.mailboxes tools.test destructors ;
+concurrency.mailboxes tools.test destructors io.files.info
+io.pathnames io.files.temp io.directories.hierarchy ;
 IN: io.monitors.recursive.tests
 
 \ pump-thread must-infer
index a96c6f04f14123723d0d97133b374bc1e4b700d5..943345bf1831e1ff5edc134c7413b1fe589e4f35 100644 (file)
@@ -1,9 +1,9 @@
-! Copyright (C) 2008 Slava Pestov.
+! Copyright (C) 2008, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors sequences assocs arrays continuations
 destructors combinators kernel threads concurrency.messaging
-concurrency.mailboxes concurrency.promises io.files io.monitors
-debugger fry ;
+concurrency.mailboxes concurrency.promises io.files io.files.info
+io.directories io.pathnames io.monitors debugger fry ;
 IN: io.monitors.recursive
 
 ! Simulate recursive monitors on platforms that don't have them
@@ -45,12 +45,11 @@ M: recursive-monitor dispose*
     bi ;
 
 : stop-pump ( -- )
-    monitor tget children>> [ nip dispose ] assoc-each ;
+    monitor tget children>> values dispose-each ;
 
 : pump-step ( msg -- )
-    first3 path>> swap [ prepend-path ] dip monitor tget 3array
-    monitor tget queue>>
-    mailbox-put ;
+    [ [ monitor>> path>> ] [ path>> ] bi append-path ] [ changed>> ] bi
+    monitor tget queue-change ;
 
 : child-added ( path monitor -- )
     path>> prepend-path add-child-monitor ;
@@ -59,7 +58,7 @@ M: recursive-monitor dispose*
     path>> prepend-path remove-child-monitor ;
 
 : update-hierarchy ( msg -- )
-    first3 swap [
+    [ path>> ] [ monitor>> ] [ changed>> ] tri [
         {
             { +add-file+ [ child-added ] }
             { +remove-file+ [ child-removed ] }
diff --git a/basis/io/monitors/windows/nt/authors.txt b/basis/io/monitors/windows/nt/authors.txt
new file mode 100755 (executable)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/basis/io/monitors/windows/nt/nt-tests.factor b/basis/io/monitors/windows/nt/nt-tests.factor
new file mode 100644 (file)
index 0000000..79cd7e9
--- /dev/null
@@ -0,0 +1,4 @@
+IN: io.monitors.windows.nt.tests\r
+USING: io.monitors.windows.nt tools.test ;\r
+\r
+\ fill-queue-thread must-infer\r
diff --git a/basis/io/monitors/windows/nt/nt.factor b/basis/io/monitors/windows/nt/nt.factor
new file mode 100755 (executable)
index 0000000..d2408a3
--- /dev/null
@@ -0,0 +1,106 @@
+! Copyright (C) 2008 Doug Coleman, Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: alien alien.c-types alien.strings libc destructors locals
+kernel math assocs namespaces make continuations sequences
+hashtables sorting arrays combinators math.bitwise strings
+system accessors threads splitting io.backend io.backend.windows
+io.backend.windows.nt io.files.windows.nt io.monitors io.ports
+io.buffers io.files io.timeouts io.encodings.string
+io.encodings.utf16n io windows windows.kernel32 windows.types
+io.pathnames ;
+IN: io.monitors.windows.nt
+
+: open-directory ( path -- handle )
+    normalize-path
+    FILE_LIST_DIRECTORY
+    share-mode
+    f
+    OPEN_EXISTING
+    { FILE_FLAG_BACKUP_SEMANTICS FILE_FLAG_OVERLAPPED } flags
+    f
+    CreateFile opened-file ;
+
+TUPLE: win32-monitor-port < input-port recursive ;
+
+TUPLE: win32-monitor < monitor port ;
+
+: begin-reading-changes ( port -- overlapped )
+    {
+        [ handle>> handle>> ]
+        [ buffer>> ptr>> ]
+        [ buffer>> size>> ]
+        [ recursive>> 1 0 ? ]
+    } cleave
+    FILE_NOTIFY_CHANGE_ALL
+    0 <uint>
+    (make-overlapped)
+    [ f ReadDirectoryChangesW win32-error=0/f ] keep ;
+
+: read-changes ( port -- bytes-transferred )
+    [
+        [ begin-reading-changes ] [ twiddle-thumbs ] bi
+    ] with-destructors ;
+
+: parse-action ( action -- changed )
+    {
+        { FILE_ACTION_ADDED [ +add-file+ ] }
+        { FILE_ACTION_REMOVED [ +remove-file+ ] }
+        { FILE_ACTION_MODIFIED [ +modify-file+ ] }
+        { FILE_ACTION_RENAMED_OLD_NAME [ +rename-file+ ] }
+        { FILE_ACTION_RENAMED_NEW_NAME [ +rename-file+ ] }
+        [ drop +modify-file+ ]
+    } case 1array ;
+
+: memory>u16-string ( alien len -- string )
+    memory>byte-array utf16n decode ;
+
+: parse-notify-record ( buffer -- path changed )
+    [
+        [ FILE_NOTIFY_INFORMATION-FileName ]
+        [ FILE_NOTIFY_INFORMATION-FileNameLength ]
+        bi memory>u16-string
+    ]
+    [ FILE_NOTIFY_INFORMATION-Action parse-action ] bi ;
+
+: (file-notify-records) ( buffer -- buffer )
+    dup ,
+    dup FILE_NOTIFY_INFORMATION-NextEntryOffset zero? [
+        [ FILE_NOTIFY_INFORMATION-NextEntryOffset ] keep <displaced-alien>
+        (file-notify-records)
+    ] unless ;
+
+: file-notify-records ( buffer -- seq )
+    [ (file-notify-records) drop ] { } make ;
+
+:: parse-notify-records ( monitor buffer -- )
+    buffer file-notify-records [
+        parse-notify-record
+        [ monitor path>> prepend-path normalize-path ] dip
+        monitor queue-change
+    ] each ;
+
+: fill-queue ( monitor -- )
+    dup port>> dup check-disposed
+    [ buffer>> ptr>> ] [ read-changes zero? ] bi
+    [ 2dup parse-notify-records ] unless
+    2drop ;
+
+: (fill-queue-thread) ( monitor -- )
+    dup fill-queue (fill-queue-thread) ;
+
+: fill-queue-thread ( monitor -- )
+    [ dup fill-queue (fill-queue-thread) ]
+    [ dup already-disposed? [ 2drop ] [ rethrow ] if ] recover ;
+
+M:: winnt (monitor) ( path recursive? mailbox -- monitor )
+    [
+        path normalize-path mailbox win32-monitor new-monitor
+            path open-directory \ win32-monitor-port <buffered-port>
+                recursive? >>recursive
+            >>port
+        dup [ fill-queue-thread ] curry
+        "Windows monitor thread" spawn drop
+    ] with-destructors ;
+
+M: win32-monitor dispose
+    port>> dispose ;
diff --git a/basis/io/monitors/windows/nt/tags.txt b/basis/io/monitors/windows/nt/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/paths/authors.txt b/basis/io/paths/authors.txt
deleted file mode 100755 (executable)
index 7c1b2f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/basis/io/paths/paths-tests.factor b/basis/io/paths/paths-tests.factor
deleted file mode 100644 (file)
index 01763ce..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-USING: io.paths kernel tools.test io.files.unique sequences
-io.files namespaces sorting ;
-IN: io.paths.tests
-
-[ t ] [
-    [
-        10 [ "io.paths.test" "gogogo" make-unique-file* ] replicate
-        current-directory get t [ ] find-all-files
-    ] with-unique-directory
-    [ natural-sort ] bi@ =
-] unit-test
diff --git a/basis/io/paths/paths.factor b/basis/io/paths/paths.factor
deleted file mode 100755 (executable)
index 212ba9e..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays deques dlists io.files
-kernel sequences system vocabs.loader fry continuations ;
-IN: io.paths
-
-TUPLE: directory-iterator path bfs queue ;
-
-<PRIVATE
-
-: qualified-directory ( path -- seq )
-    dup directory-files [ append-path ] with map ;
-
-: push-directory ( path iter -- )
-    [ qualified-directory ] dip [
-        dup queue>> swap bfs>>
-        [ push-front ] [ push-back ] if
-    ] curry each ;
-
-: <directory-iterator> ( path bfs? -- iterator )
-    <dlist> directory-iterator boa
-    dup path>> over push-directory ;
-
-: next-file ( iter -- file/f )
-    dup queue>> deque-empty? [ drop f ] [
-        dup queue>> pop-back dup link-info directory?
-        [ over push-directory next-file ] [ nip ] if
-    ] if ;
-
-: iterate-directory ( iter quot: ( obj -- ? ) -- obj )
-    over next-file [
-        over call
-        [ 2nip ] [ iterate-directory ] if*
-    ] [
-        2drop f
-    ] if* ; inline recursive
-
-PRIVATE>
-
-: find-file ( path bfs? quot: ( obj -- ? ) -- path/f )
-    [ <directory-iterator> ] dip
-    [ keep and ] curry iterate-directory ; inline
-
-: each-file ( path bfs? quot: ( obj -- ? ) -- )
-    [ <directory-iterator> ] dip
-    [ f ] compose iterate-directory drop ; inline
-
-: find-all-files ( path bfs? quot: ( obj -- ? ) -- paths )
-    [ <directory-iterator> ] dip
-    pusher [ [ f ] compose iterate-directory drop ] dip ; inline
-
-: recursive-directory ( path bfs? -- paths )
-    [ ] accumulator [ each-file ] dip ;
-
-: find-in-directories ( directories bfs? quot -- path' )
-    '[ _ _ find-file ] attempt-all ; inline
-
-os windows? [ "io.paths.windows" require ] when
diff --git a/basis/io/paths/windows/authors.txt b/basis/io/paths/windows/authors.txt
deleted file mode 100644 (file)
index 7c1b2f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/basis/io/paths/windows/tags.txt b/basis/io/paths/windows/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/paths/windows/windows.factor b/basis/io/paths/windows/windows.factor
deleted file mode 100644 (file)
index b4858aa..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: arrays continuations fry io.files io.paths
-kernel windows.shell32 sequences ;
-IN: io.paths.windows
-
-: program-files-directories ( -- array )
-    program-files program-files-x86 2array ; inline
-
-: find-in-program-files ( base-directory bfs? quot -- path )
-    [
-        [ program-files-directories ] dip '[ _ append-path ] map
-    ] 2dip find-in-directories ; inline
index 221cce1dbe55c0a8fdcb5bb08604c974e8ef4f3a..1ba3c05a6a7631363ee19926967db68acacf43b3 100644 (file)
@@ -29,7 +29,7 @@ HELP: run-pipeline
     }
 }
 { $examples
-    "Print the lines of a log file which contain the string ``error'', sort them and filter out duplicates, using Unix shell commands only:"
+    "Print the lines of a log file which contain the string â€œerrorâ€, sort them and filter out duplicates, using Unix shell commands only:"
     { $code "{ \"cat log.txt\" \"grep error\" \"sort\" \"uniq\" } run-pipeline" }
 } ;
 
index 3a7fa5a2e09366cf8163919729ae4c4578a7c639..9cadb3f6cc2b6df7eb3917e5f27b348b363b0617 100644 (file)
@@ -53,7 +53,7 @@ PRIVATE>
     ] 2parallel-map ;
 
 {
-    { [ os unix? ] [ "io.unix.pipes" require ] }
-    { [ os winnt? ] [ "io.windows.nt.pipes" require ] }
+    { [ os unix? ] [ "io.pipes.unix" require ] }
+    { [ os winnt? ] [ "io.pipes.windows.nt" require ] }
     [ ]
 } cond
diff --git a/basis/io/pipes/unix/pipes-tests.factor b/basis/io/pipes/unix/pipes-tests.factor
new file mode 100644 (file)
index 0000000..ce3f155
--- /dev/null
@@ -0,0 +1,17 @@
+USING: tools.test io.pipes io.pipes.unix io.encodings.utf8
+io.encodings io namespaces sequences ;
+IN: io.pipes.unix.tests
+
+[ { 0 0 } ] [ { "ls" "grep ." } run-pipeline ] unit-test
+
+[ { 0 f 0 } ] [
+    {
+        "ls"
+        [
+            input-stream [ utf8 <decoder> ] change
+            output-stream [ utf8 <encoder> ] change
+            input-stream get lines reverse [ print ] each f
+        ]
+        "grep ."
+    } run-pipeline
+] unit-test
diff --git a/basis/io/pipes/unix/tags.txt b/basis/io/pipes/unix/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/pipes/unix/unix.factor b/basis/io/pipes/unix/unix.factor
new file mode 100644 (file)
index 0000000..6a00150
--- /dev/null
@@ -0,0 +1,11 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: system kernel unix math sequences
+io.backend.unix io.ports specialized-arrays.int accessors ;
+IN: io.pipes.unix
+QUALIFIED: io.pipes
+
+M: unix io.pipes:(pipe) ( -- pair )
+    2 <int-array>
+    [ underlying>> pipe io-error ]
+    [ first2 [ <fd> init-fd ] bi@ io.pipes:pipe boa ] bi ;
diff --git a/basis/io/pipes/windows/nt/authors.txt b/basis/io/pipes/windows/nt/authors.txt
new file mode 100755 (executable)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/basis/io/pipes/windows/nt/nt.factor b/basis/io/pipes/windows/nt/nt.factor
new file mode 100644 (file)
index 0000000..cec03cf
--- /dev/null
@@ -0,0 +1,46 @@
+! Copyright (C) 2007, 2008 Doug Coleman, Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: alien alien.c-types arrays destructors io io.backend.windows libc
+windows.types math.bitwise windows.kernel32 windows namespaces
+make kernel sequences windows.errors assocs math.parser system
+random combinators accessors io.pipes io.ports ;
+IN: io.pipes.windows.nt
+
+! This code is based on
+! http://twistedmatrix.com/trac/browser/trunk/twisted/internet/iocpreactor/process.py
+
+: create-named-pipe ( name -- handle )
+    { PIPE_ACCESS_INBOUND FILE_FLAG_OVERLAPPED } flags
+    PIPE_TYPE_BYTE
+    1
+    4096
+    4096
+    0
+    default-security-attributes
+    CreateNamedPipe opened-file ;
+
+: open-other-end ( name -- handle )
+    GENERIC_WRITE
+    { FILE_SHARE_READ FILE_SHARE_WRITE } flags
+    default-security-attributes
+    OPEN_EXISTING
+    FILE_FLAG_OVERLAPPED
+    f
+    CreateFile opened-file ;
+
+: unique-pipe-name ( -- string )
+    [
+        "\\\\.\\pipe\\factor-" %
+        pipe counter #
+        "-" %
+        32 random-bits #
+        "-" %
+        micros #
+    ] "" make ;
+
+M: winnt (pipe) ( -- pipe )
+    [
+        unique-pipe-name
+        [ create-named-pipe ] [ open-other-end ] bi
+        pipe boa
+    ] with-destructors ;
diff --git a/basis/io/pipes/windows/nt/tags.txt b/basis/io/pipes/windows/nt/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
index 6eb61a24a7e829f8b751677e5e01006f3772cf5f..1fe717d5ee662d46b02ee1e02a93414de33f4f6e 100644 (file)
@@ -99,7 +99,7 @@ TUPLE: output-port < buffered-port ;
     output-port <buffered-port> ;
 
 : wait-to-write ( len port -- )
-    tuck buffer>> buffer-capacity <=
+    [ nip ] [ buffer>> buffer-capacity <= ] 2bi
     [ drop ] [ stream-flush ] if ; inline
 
 M: output-port stream-write1
index 60402c37ea0073923bcd09735eb480cbdf2b0b9a..0326969e4fbc0bca3543b9e867043738ad38f16d 100644 (file)
@@ -1,10 +1,10 @@
 ! Copyright (C) 2007, 2008, Slava Pestov, Elie CHAFTARI.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors byte-arrays kernel sequences
-namespaces math math.order combinators init alien alien.c-types
-alien.strings libc continuations destructors summary
-splitting assocs random math.parser locals unicode.case openssl
-openssl.libcrypto openssl.libssl io.backend io.ports io.files
+USING: accessors byte-arrays kernel sequences namespaces math
+math.order combinators init alien alien.c-types alien.strings
+libc continuations destructors summary splitting assocs random
+math.parser locals unicode.case openssl openssl.libcrypto
+openssl.libssl io.backend io.ports io.pathnames
 io.encodings.8-bit io.timeouts io.sockets.secure ;
 IN: io.sockets.secure.openssl
 
index 01f64dfccfd061175de6b07a578ad377e0996e4e..5dd4fe6b405043ed84f4a3090560c05b6d506fb3 100644 (file)
@@ -86,7 +86,7 @@ ARTICLE: "ssl-contexts" "Secure socket contexts"
 HELP: secure
 { $class-description "The class of secure socket addresses." } ;
 
-HELP: <secure> ( addrspec -- secure )
+HELP: <secure>
 { $values { "addrspec" "an address specifier" } { "secure" secure } }
 { $description "Creates a new secure socket address, which can then be passed to " { $link <client> } " or " { $link <server> } "." } ;
 
index e752e7c328d02d86425a7bfdc0ae3275afc3319a..c4a1475f4871b5c76cada33ddfafc1b18cb078ff 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors kernel symbols namespaces continuations
+USING: accessors kernel namespaces continuations
 destructors io debugger io.sockets sequences summary calendar
 delegate system vocabs.loader combinators present ;
 IN: io.sockets.secure
@@ -97,6 +97,6 @@ HOOK: send-secure-handshake secure-socket-backend ( -- )
 HOOK: accept-secure-handshake secure-socket-backend ( -- )
 
 {
-    { [ os unix? ] [ "io.unix.sockets.secure" require ] }
+    { [ os unix? ] [ "io.sockets.secure.unix" require ] }
     { [ os windows? ] [ "openssl" require ] }
 } cond
diff --git a/basis/io/sockets/secure/unix/debug/debug.factor b/basis/io/sockets/secure/unix/debug/debug.factor
new file mode 100644 (file)
index 0000000..d32cdee
--- /dev/null
@@ -0,0 +1,11 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors io.sockets.secure kernel ;
+IN: io.sockets.secure.unix.debug
+
+: with-test-context ( quot -- )
+    <secure-config>
+        "resource:basis/openssl/test/server.pem" >>key-file
+        "resource:basis/openssl/test/dh1024.pem" >>dh-file
+        "password" >>password
+    swap with-secure-context ; inline
diff --git a/basis/io/sockets/secure/unix/tags.txt b/basis/io/sockets/secure/unix/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/sockets/secure/unix/unix-tests.factor b/basis/io/sockets/secure/unix/unix-tests.factor
new file mode 100644 (file)
index 0000000..a3bfacc
--- /dev/null
@@ -0,0 +1,147 @@
+IN: io.sockets.secure.tests
+USING: accessors kernel namespaces io io.sockets
+io.sockets.secure io.encodings.ascii io.streams.duplex
+io.backend.unix classes words destructors threads tools.test
+concurrency.promises byte-arrays locals calendar io.timeouts
+io.sockets.secure.unix.debug ;
+
+\ <secure-config> must-infer
+{ 1 0 } [ [ ] with-secure-context ] must-infer-as
+
+[ ] [ <promise> "port" set ] unit-test
+
+:: server-test ( quot -- )
+    [
+        [
+            "127.0.0.1" 0 <inet4> <secure> ascii <server> [
+                dup addr>> addrspec>> port>> "port" get fulfill
+                accept [
+                    quot call
+                ] curry with-stream
+            ] with-disposal
+        ] with-test-context
+    ] "SSL server test" spawn drop ;
+
+: client-test ( -- string )
+    <secure-config> [
+        "127.0.0.1" "port" get ?promise <inet4> <secure> ascii <client> drop contents
+    ] with-secure-context ;
+
+[ ] [ [ class name>> write ] server-test ] unit-test
+
+[ "secure" ] [ client-test ] unit-test
+
+! Now, see what happens if the server closes the connection prematurely
+[ ] [ <promise> "port" set ] unit-test
+
+[ ] [
+    [
+        drop
+        "hello" write flush
+        input-stream get stream>> handle>> f >>connected drop
+    ] server-test
+] unit-test
+
+[ client-test ] [ premature-close? ] must-fail-with
+
+! Now, try validating the certificate. This should fail because its
+! actually an invalid certificate
+[ ] [ <promise> "port" set ] unit-test
+
+[ ] [ [ drop "hi" write ] server-test ] unit-test
+
+[
+    <secure-config> [
+        "localhost" "port" get ?promise <inet> <secure> ascii
+        <client> drop dispose
+    ] with-secure-context
+] [ certificate-verify-error? ] must-fail-with
+
+! Client-side handshake timeout
+[ ] [ <promise> "port" set ] unit-test
+
+[ ] [
+    [
+        "127.0.0.1" 0 <inet4> ascii <server> [
+            dup addr>> port>> "port" get fulfill
+            accept drop 1 minutes sleep dispose
+        ] with-disposal
+    ] "Silly server" spawn drop
+] unit-test
+
+[
+    1 seconds secure-socket-timeout [
+        client-test
+    ] with-variable
+] [ io-timeout? ] must-fail-with
+
+! Server-side handshake timeout
+[ ] [ <promise> "port" set ] unit-test
+
+[ ] [
+    [
+        "127.0.0.1" "port" get ?promise
+        <inet4> ascii <client> drop 1 minutes sleep dispose
+    ] "Silly client" spawn drop
+] unit-test
+
+[
+    1 seconds secure-socket-timeout [
+        [
+            "127.0.0.1" 0 <inet4> <secure> ascii <server> [
+                dup addr>> addrspec>> port>> "port" get fulfill
+                accept drop dup stream-read1 drop dispose
+            ] with-disposal
+        ] with-test-context
+    ] with-variable
+] [ io-timeout? ] must-fail-with
+
+! Client socket shutdown timeout
+
+! Until I sort out two-stage handshaking, I can't do much here
+[
+    [ ] [ <promise> "port" set ] unit-test
+    
+    [ ] [
+        [
+            [
+                "127.0.0.1" 0 <inet4> <secure> ascii <server> [
+                    dup addr>> addrspec>> port>> "port" get fulfill
+                    accept drop 1 minutes sleep dispose
+                ] with-disposal
+            ] with-test-context
+        ] "Silly server" spawn drop
+    ] unit-test
+    
+    [
+        1 seconds secure-socket-timeout [
+            <secure-config> [
+                "127.0.0.1" "port" get ?promise <inet4> <secure>
+                ascii <client> drop dispose
+            ] with-secure-context
+        ] with-variable
+    ] [ io-timeout? ] must-fail-with
+    
+    ! Server socket shutdown timeout
+    [ ] [ <promise> "port" set ] unit-test
+    
+    [ ] [
+        [
+            [
+                "127.0.0.1" "port" get ?promise
+                <inet4> <secure> ascii <client> drop 1 minutes sleep dispose
+            ] with-test-context
+        ] "Silly client" spawn drop
+    ] unit-test
+    
+    [
+        1 seconds secure-socket-timeout [
+            [
+                "127.0.0.1" 0 <inet4> <secure> ascii <server> [
+                    dup addr>> addrspec>> port>> "port" get fulfill
+                    accept drop dispose
+                ] with-disposal
+            ] with-test-context
+        ] with-variable
+    ] [ io-timeout? ] must-fail-with
+] drop
diff --git a/basis/io/sockets/secure/unix/unix.factor b/basis/io/sockets/secure/unix/unix.factor
new file mode 100644 (file)
index 0000000..8419246
--- /dev/null
@@ -0,0 +1,200 @@
+! Copyright (C) 2007, 2008, Slava Pestov, Elie CHAFTARI.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors unix byte-arrays kernel sequences
+namespaces math math.order combinators init alien alien.c-types
+alien.strings libc continuations destructors openssl
+openssl.libcrypto openssl.libssl io io.files io.ports
+io.backend.unix io.sockets.unix io.encodings.ascii io.buffers
+io.sockets io.sockets.secure io.sockets.secure.openssl
+io.timeouts system summary fry ;
+IN: io.sockets.secure.unix
+
+M: ssl-handle handle-fd file>> handle-fd ;
+
+: syscall-error ( r -- * )
+    ERR_get_error dup zero? [
+        drop
+        {
+            { -1 [ err_no ECONNRESET = [ premature-close ] [ (io-error) ] if ] }
+            { 0 [ premature-close ] }
+        } case
+    ] [ nip (ssl-error) ] if ;
+
+: check-accept-response ( handle r -- event )
+    over handle>> over SSL_get_error
+    {
+        { SSL_ERROR_NONE [ 2drop f ] }
+        { SSL_ERROR_WANT_READ [ 2drop +input+ ] }
+        { SSL_ERROR_WANT_ACCEPT [ 2drop +input+ ] }
+        { SSL_ERROR_WANT_WRITE [ 2drop +output+ ] }
+        { SSL_ERROR_SYSCALL [ syscall-error ] }
+        { SSL_ERROR_ZERO_RETURN [ (ssl-error) ] }
+        { SSL_ERROR_SSL [ (ssl-error) ] }
+    } case ;
+
+: do-ssl-accept ( ssl-handle -- )
+    dup dup handle>> SSL_accept check-accept-response dup
+    [ [ dup file>> ] dip wait-for-fd do-ssl-accept ] [ 2drop ] if ;
+
+: maybe-handshake ( ssl-handle -- )
+    dup connected>> [ drop ] [
+        t >>connected
+        [ do-ssl-accept ] with-timeout
+    ] if ;
+
+: check-response ( port r -- port r n )
+    over handle>> handle>> over SSL_get_error ; inline
+
+! Input ports
+: check-read-response ( port r -- event )
+    check-response
+    {
+        { SSL_ERROR_NONE [ swap buffer>> n>buffer f ] }
+        { SSL_ERROR_ZERO_RETURN [ 2drop f ] }
+        { SSL_ERROR_WANT_READ [ 2drop +input+ ] }
+        { SSL_ERROR_WANT_WRITE [ 2drop +output+ ] }
+        { SSL_ERROR_SYSCALL [ syscall-error ] }
+        { SSL_ERROR_SSL [ (ssl-error) ] }
+    } case ;
+
+M: ssl-handle refill
+    dup maybe-handshake
+    handle>> ! ssl
+    over buffer>>
+    [ buffer-end ] ! buf
+    [ buffer-capacity ] bi ! len
+    SSL_read
+    check-read-response ;
+
+! Output ports
+: check-write-response ( port r -- event )
+    check-response
+    {
+        { SSL_ERROR_NONE [ swap buffer>> buffer-consume f ] }
+        { SSL_ERROR_WANT_READ [ 2drop +input+ ] }
+        { SSL_ERROR_WANT_WRITE [ 2drop +output+ ] }
+        { SSL_ERROR_SYSCALL [ syscall-error ] }
+        { SSL_ERROR_SSL [ (ssl-error) ] }
+    } case ;
+
+M: ssl-handle drain
+    dup maybe-handshake
+    handle>> ! ssl
+    over buffer>>
+    [ buffer@ ] ! buf
+    [ buffer-length ] bi ! len
+    SSL_write
+    check-write-response ;
+
+M: ssl-handle cancel-operation
+    file>> cancel-operation ;
+
+M: ssl-handle timeout
+    drop secure-socket-timeout get ;
+
+! Client sockets
+: <ssl-socket> ( fd -- ssl )
+    [ fd>> BIO_NOCLOSE BIO_new_socket dup ssl-error ] keep <ssl-handle>
+    [ handle>> swap dup SSL_set_bio ] keep ;
+
+M: secure ((client)) ( addrspec -- handle )
+    addrspec>> ((client)) <ssl-socket> ;
+
+M: secure parse-sockaddr addrspec>> parse-sockaddr <secure> ;
+
+M: secure (get-local-address) addrspec>> (get-local-address) ;
+
+: check-connect-response ( ssl-handle r -- event )
+    over handle>> over SSL_get_error
+    {
+        { SSL_ERROR_NONE [ 2drop f ] }
+        { SSL_ERROR_WANT_READ [ 2drop +input+ ] }
+        { SSL_ERROR_WANT_WRITE [ 2drop +output+ ] }
+        { SSL_ERROR_SYSCALL [ syscall-error ] }
+        { SSL_ERROR_SSL [ (ssl-error) ] }
+    } case ;
+
+: do-ssl-connect ( ssl-handle -- )
+    dup dup handle>> SSL_connect check-connect-response dup
+    [ dupd wait-for-fd do-ssl-connect ] [ 2drop ] if ;
+
+: resume-session ( ssl-handle ssl-session -- )
+    [ [ handle>> ] dip SSL_set_session ssl-error ]
+    [ drop do-ssl-connect ]
+    2bi ;
+
+: begin-session ( ssl-handle addrspec -- )
+    [ drop do-ssl-connect ]
+    [ [ handle>> SSL_get1_session ] dip save-session ]
+    2bi ;
+
+: secure-connection ( client-out addrspec -- )
+    [ handle>> ] dip
+    [
+        '[
+            _ dup get-session
+            [ resume-session ] [ begin-session ] ?if
+        ] with-timeout
+    ] [ drop t >>connected drop ] 2bi ;
+
+M: secure establish-connection ( client-out remote -- )
+    addrspec>> [ establish-connection ] [ secure-connection ] 2bi ;
+
+M: secure (server) addrspec>> (server) ;
+
+M: secure (accept)
+    [
+        addrspec>> (accept) [ |dispose <ssl-socket> ] dip
+    ] with-destructors ;
+
+: check-shutdown-response ( handle r -- event )
+    #! We don't do two-step shutdown here because I couldn't
+    #! figure out how to do it with non-blocking BIOs. Also, it
+    #! seems that SSL_shutdown always returns 0 -- this sounds
+    #! like a bug
+    over handle>> over SSL_get_error
+    {
+        { SSL_ERROR_NONE [ 2drop f ] }
+        { SSL_ERROR_WANT_READ [ 2drop +input+ ] }
+        { SSL_ERROR_WANT_WRITE [ 2drop +output+ ] }
+        { SSL_ERROR_SYSCALL [ dup zero? [ 2drop f ] [ syscall-error ] if ] }
+        { SSL_ERROR_SSL [ (ssl-error) ] }
+    } case ;
+
+: (shutdown) ( handle -- )
+    dup dup handle>> SSL_shutdown check-shutdown-response
+    dup [ dupd wait-for-fd (shutdown) ] [ 2drop ] if ;
+
+M: ssl-handle shutdown
+    dup connected>> [
+        f >>connected [ (shutdown) ] with-timeout
+    ] [ drop ] if ;
+
+: check-buffer ( port -- port )
+    dup buffer>> buffer-empty? [ upgrade-buffers-full ] unless ;
+
+: input/output-ports ( -- input output )
+    input-stream output-stream
+    [ get underlying-port check-buffer ] bi@
+    2dup [ handle>> ] bi@ eq? [ upgrade-on-non-socket ] unless ;
+
+: make-input/output-secure ( input output -- )
+    dup handle>> fd? [ upgrade-on-non-socket ] unless
+    [ <ssl-socket> ] change-handle
+    handle>> >>handle drop ;
+
+: (send-secure-handshake) ( output -- )
+    remote-address get [ upgrade-on-non-socket ] unless*
+    secure-connection ;
+
+M: openssl send-secure-handshake
+    input/output-ports
+    [ make-input/output-secure ] keep
+    [ (send-secure-handshake) ] keep
+    remote-address get dup inet? [
+        host>> swap handle>> check-certificate
+    ] [ 2drop ] if ;
+
+M: openssl accept-secure-handshake
+    input/output-ports
+    make-input/output-secure ;
index cfc33a02f6a29b0658cf276679cf14e44a2cea08..a66ed1d0c008feccada997d1ca3a351e3432529d 100644 (file)
@@ -3,11 +3,20 @@ strings byte-arrays continuations destructors quotations ;
 IN: io.sockets
 
 ARTICLE: "network-addressing" "Address specifiers"
-"The networking words are quite general and work with " { $emphasis "address specifiers" } " rather than concrete concepts such as host names. There are four types of address specifiers:"
+"The networking words are quite general and work with " { $emphasis "address specifiers" } " rather than concrete concepts such as host names. There are four types of address specifiers."
+$nl
+"Unix domain sockets:"
 { $subsection local }
+{ $subsection <local> }
+"Internet host name/port number pairs; the host name is resolved to an IPv4 or IPv6 address using the operating system's resolver:"
 { $subsection inet }
+{ $subsection <inet> }
+"IPv4 addresses, with no host name resolution:"
 { $subsection inet4 }
+{ $subsection <inet4> }
+"IPv6 addresses, with no host name resolution:"
 { $subsection inet6 }
+{ $subsection <inet6> }
 "While the " { $link inet } " addressing specifier is capable of performing name lookups when passed to " { $link <client> } ", sometimes it is necessary to look up a host name without making a connection:"
 { $subsection resolve-host } ;
 
@@ -73,34 +82,42 @@ HELP: inet
     "This address specifier is only supported by " { $link <client> } ", which calls " { $link resolve-host }  " to obtain a list of IP addresses associated with the host name, and attempts a connection to each one in turn until one succeeds. Other network words do not accept this address specifier, and " { $link resolve-host } " must be called directly; it is then up to the application to pick the correct address from the (possibly several) addresses associated to the host name."
 }
 { $examples
-    { $code "\"www.apple.com\" \"http\" <inet>" }
-    { $code "\"localhost\" 8080 <inet>" }
+    { $code "\"www.apple.com\" 80 <inet>" }
 } ;
 
+HELP: <inet>
+{ $values { "host" "a host name" } { "port" "a port number" } { "inet" inet } }
+{ $description "Creates a new " { $link inet } " address specifier." } ;
+
 HELP: inet4
 { $class-description "IPv4 address/port number specifier for TCP/IP and UDP/IP connections. The " { $snippet "host" } " and " { $snippet "port" } " slots hold the IPv4 address and port number, respectively. New instances are created by calling " { $link <inet4> } "." }
-{ $notes
-"Most applications do not operate on IPv4 addresses directly, and instead should use " { $link resolve-host } " to look up the address associated to a host name. Also, try to support IPv6 where possible."
-}
+{ $notes "Most applications do not operate on IPv4 addresses directly, and instead should use the " { $link inet } " address specifier, or call " { $link resolve-host } "." }
 { $examples
     { $code "\"127.0.0.1\" 8080 <inet4>" }
 } ;
 
+HELP: <inet4>
+{ $values { "host" "an IPv4 address" } { "port" "a port number" } { "inet4" inet4 } }
+{ $description "Creates a new " { $link inet4 } " address specifier." } ;
+
 HELP: inet6
 { $class-description "IPv6 address/port number specifier for TCP/IP and UDP/IP connections. The " { $snippet "host" } " and " { $snippet "port" } " slots hold the IPv6 address and port number, respectively. New instances are created by calling " { $link <inet6> } "." }
-{ $notes
-"Most applications do not operate on IPv6 addresses directly, and instead should use " { $link resolve-host } " to look up the address associated to a host name." }
+{ $notes "Most applications do not operate on IPv6 addresses directly, and instead should use the " { $link inet } " address specifier, or call " { $link resolve-host } "." }
 { $examples
     { $code "\"::1\" 8080 <inet6>" }
 } ;
 
+HELP: <inet6>
+{ $values { "host" "an IPv6 address" } { "port" "a port number" } { "inet6" inet6 } }
+{ $description "Creates a new " { $link inet6 } " address specifier." } ;
+
 HELP: <client>
 { $values { "remote" "an address specifier" } { "encoding" "an encding descriptor" } { "stream" "a bidirectional stream" } { "local" "an address specifier" } }
 { $description "Opens a network connection and outputs a bidirectional stream using the given encoding, together with the local address the socket was bound to." }
 { $errors "Throws an error if the connection cannot be established." }
 { $notes "The " { $link with-client } " word is easier to use in most situations." }
 { $examples
-    { $code "\"www.apple.com\" \"http\" <inet> utf8 <client>" }
+    { $code "\"www.apple.com\" 80 <inet> utf8 <client>" }
 } ;
 
 HELP: with-client
index 4b95a31512ff524822db6c404ae0fc549e48d707..dc0c698699b8d68b940cf4296018d20c38fdd08f 100644 (file)
@@ -33,6 +33,9 @@ concurrency.promises threads io.streams.string ;
 [ B{ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } ]
 [ "::1" T{ inet6 } inet-pton ] unit-test
 
+[ B{ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 } ]
+[ "::100" T{ inet6 } inet-pton ] unit-test
+
 [ B{ 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 2 } ]
 [ "1::2" T{ inet6 } inet-pton ] unit-test
 
@@ -45,6 +48,9 @@ concurrency.promises threads io.streams.string ;
 [ "1:2:0:0:0:0:3:4" ]
 [ B{ 0 1 0 2 0 0 0 0 0 0 0 0 0 3 0 4 } T{ inet6 } inet-ntop ] unit-test
 
+[ "2001:6f8:37a:5:0:0:0:1" ]
+[ "2001:6f8:37a:5::1" T{ inet6 } [ inet-pton ] [ inet-ntop ] bi ] unit-test
+
 [ t ] [ "localhost" 80 <inet> resolve-host length 1 >= ] unit-test
 
 ! Smoke-test UDP
index 597aa61138903251a11dd084f58c72d4d809bf17..8dce5275531aa0f218122220a4d70c2dfb1e55e9 100644 (file)
@@ -6,7 +6,7 @@ sequences arrays io.encodings io.ports io.streams.duplex
 io.encodings.ascii alien.strings io.binary accessors destructors
 classes byte-arrays system combinators parser
 alien.c-types math.parser splitting grouping math assocs summary
-system vocabs.loader combinators present fry ;
+system vocabs.loader combinators present fry vocabs.parser ;
 IN: io.sockets
 
 << {
@@ -109,7 +109,7 @@ M: invalid-inet6 summary drop "Invalid IPv6 address" ;
     [ f ] [
         ":" split [
             hex> [ "Component not a number" throw ] unless*
-        ] B{ } map-as
+        ] { } map-as
     ] if-empty ;
 
 : pad-inet6 ( string1 string2 -- seq )
@@ -318,7 +318,6 @@ M: inet (server)
     invalid-inet-server ;
 
 {
-    { [ os unix? ] [ "io.unix.sockets" require ] }
-    { [ os winnt? ] [ "io.windows.nt.sockets" require ] }
-    { [ os wince? ] [ "io.windows.ce.sockets" require ] }
+    { [ os unix? ] [ "io.sockets.unix" require ] }
+    { [ os winnt? ] [ "io.sockets.windows.nt" require ] }
 } cond
diff --git a/basis/io/sockets/unix/authors.txt b/basis/io/sockets/unix/authors.txt
new file mode 100644 (file)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/basis/io/sockets/unix/summary.txt b/basis/io/sockets/unix/summary.txt
new file mode 100644 (file)
index 0000000..22342ec
--- /dev/null
@@ -0,0 +1 @@
+Implementation of TCP/IP and UDP/IP sockets on Unix-like systems
diff --git a/basis/io/sockets/unix/tags.txt b/basis/io/sockets/unix/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/sockets/unix/unix.factor b/basis/io/sockets/unix/unix.factor
new file mode 100644 (file)
index 0000000..f209df5
--- /dev/null
@@ -0,0 +1,155 @@
+! Copyright (C) 2004, 2008 Slava Pestov, Ivan Tikhonov. 
+! See http://factorcode.org/license.txt for BSD license.
+USING: alien alien.c-types alien.strings generic kernel math
+namespaces threads sequences byte-arrays io.ports
+io.binary io.backend.unix io.streams.duplex
+io.backend io.ports io.pathnames io.files.private
+io.encodings.utf8 math.parser continuations libc combinators
+system accessors destructors unix locals init ;
+
+EXCLUDE: io => read write close ;
+EXCLUDE: io.sockets => accept ;
+
+IN: io.sockets.unix
+
+: socket-fd ( domain type -- fd )
+    0 socket dup io-error <fd> init-fd |dispose ;
+
+: set-socket-option ( fd level opt -- )
+    [ handle-fd ] 2dip 1 <int> "int" heap-size setsockopt io-error ;
+
+M: unix addrinfo-error ( n -- )
+    dup zero? [ drop ] [ gai_strerror throw ] if ;
+
+! Client sockets - TCP and Unix domain
+M: object (get-local-address) ( handle remote -- sockaddr )
+    [ handle-fd ] dip empty-sockaddr/size <int>
+    [ getsockname io-error ] 2keep drop ;
+
+M: object (get-remote-address) ( handle local -- sockaddr )
+    [ handle-fd ] dip empty-sockaddr/size <int>
+    [ getpeername io-error ] 2keep drop ;
+
+: init-client-socket ( fd -- )
+    SOL_SOCKET SO_OOBINLINE set-socket-option ;
+
+: wait-to-connect ( port -- )
+    dup handle>> handle-fd f 0 write
+    {
+        { [ 0 = ] [ drop ] }
+        { [ err_no EAGAIN = ] [ dup +output+ wait-for-port wait-to-connect ] }
+        { [ err_no EINTR = ] [ wait-to-connect ] }
+        [ (io-error) ]
+    } cond ;
+
+M: object establish-connection ( client-out remote -- )
+    [ drop ] [ [ handle>> handle-fd ] [ make-sockaddr/size ] bi* connect ] 2bi
+    {
+        { [ 0 = ] [ drop ] }
+        { [ err_no EINPROGRESS = ] [
+            [ +output+ wait-for-port ] [ wait-to-connect ] bi
+        ] }
+        [ (io-error) ]
+    } cond ;
+
+M: object ((client)) ( addrspec -- fd )
+    protocol-family SOCK_STREAM socket-fd dup init-client-socket ;
+
+! Server sockets - TCP and Unix domain
+: init-server-socket ( fd -- )
+    SOL_SOCKET SO_REUSEADDR set-socket-option ;
+
+: server-socket-fd ( addrspec type -- fd )
+    [ dup protocol-family ] dip socket-fd
+    dup init-server-socket
+    dup handle-fd rot make-sockaddr/size bind io-error ;
+
+M: object (server) ( addrspec -- handle )
+    [
+        SOCK_STREAM server-socket-fd
+        dup handle-fd 128 listen io-error
+    ] with-destructors ;
+
+: do-accept ( server addrspec -- fd sockaddr )
+    [ handle>> handle-fd ] [ empty-sockaddr/size <int> ] bi*
+    [ accept ] 2keep drop ; inline
+
+M: object (accept) ( server addrspec -- fd sockaddr )
+    2dup do-accept
+    {
+        { [ over 0 >= ] [ [ 2nip <fd> init-fd ] dip ] }
+        { [ err_no EINTR = ] [ 2drop (accept) ] }
+        { [ err_no EAGAIN = ] [
+            2drop
+            [ drop +input+ wait-for-port ]
+            [ (accept) ]
+            2bi
+        ] }
+        [ (io-error) ]
+    } cond ;
+
+! Datagram sockets - UDP and Unix domain
+M: unix (datagram)
+    [ SOCK_DGRAM server-socket-fd ] with-destructors ;
+
+SYMBOL: receive-buffer
+
+: packet-size 65536 ; inline
+
+[ packet-size malloc receive-buffer set-global ] "io.sockets.unix" add-init-hook
+
+:: do-receive ( port -- packet sockaddr )
+    port addr>> empty-sockaddr/size [| sockaddr len |
+        port handle>> handle-fd ! s
+        receive-buffer get-global ! buf
+        packet-size ! nbytes
+        0 ! flags
+        sockaddr ! from
+        len <int> ! fromlen
+        recvfrom dup 0 >= [
+            receive-buffer get-global swap memory>byte-array sockaddr
+        ] [
+            drop f f
+        ] if
+    ] call ;
+
+M: unix (receive) ( datagram -- packet sockaddr )
+    dup do-receive dup [ [ drop ] 2dip ] [
+        2drop [ +input+ wait-for-port ] [ (receive) ] bi
+    ] if ;
+
+:: do-send ( packet sockaddr len socket datagram -- )
+    socket handle-fd packet dup length 0 sockaddr len sendto
+    0 < [
+        err_no EINTR = [
+            packet sockaddr len socket datagram do-send
+        ] [
+            err_no EAGAIN = [
+                datagram +output+ wait-for-port
+                packet sockaddr len socket datagram do-send
+            ] [
+                (io-error)
+            ] if
+        ] if
+    ] when ;
+
+M: unix (send) ( packet addrspec datagram -- )
+    [ make-sockaddr/size ] [ [ handle>> ] keep ] bi* do-send ;
+
+! Unix domain sockets
+M: local protocol-family drop PF_UNIX ;
+
+M: local sockaddr-size drop "sockaddr-un" heap-size ;
+
+M: local empty-sockaddr drop "sockaddr-un" <c-object> ;
+
+M: local make-sockaddr
+    path>> (normalize-path)
+    dup length 1 + max-un-path > [ "Path too long" throw ] when
+    "sockaddr-un" <c-object>
+    AF_UNIX over set-sockaddr-un-family
+    dup sockaddr-un-path rot utf8 string>alien dup length memcpy ;
+
+M: local parse-sockaddr
+    drop
+    sockaddr-un-path utf8 alien>string <local> ;
diff --git a/basis/io/sockets/windows/nt/authors.txt b/basis/io/sockets/windows/nt/authors.txt
new file mode 100755 (executable)
index 0000000..026f4cd
--- /dev/null
@@ -0,0 +1,3 @@
+Doug Coleman
+Slava Pestov
+Mackenzie Straight
diff --git a/basis/io/sockets/windows/nt/nt.factor b/basis/io/sockets/windows/nt/nt.factor
new file mode 100644 (file)
index 0000000..49a1b2a
--- /dev/null
@@ -0,0 +1,216 @@
+USING: alien alien.accessors alien.c-types byte-arrays
+continuations destructors io.ports io.timeouts io.sockets
+io.sockets io namespaces io.streams.duplex io.backend.windows
+io.sockets.windows io.backend.windows.nt windows.winsock kernel
+libc math sequences threads system combinators accessors ;
+IN: io.sockets.windows.nt
+
+: malloc-int ( object -- object )
+    "int" heap-size malloc [ nip ] [ 0 set-alien-signed-4 ] 2bi ; inline
+
+M: winnt WSASocket-flags ( -- DWORD )
+    WSA_FLAG_OVERLAPPED ;
+
+: get-ConnectEx-ptr ( socket -- void* )
+    SIO_GET_EXTENSION_FUNCTION_POINTER
+    WSAID_CONNECTEX
+    "GUID" heap-size
+    "void*" <c-object>
+    [
+        "void*" heap-size
+        "DWORD" <c-object>
+        f
+        f
+        WSAIoctl SOCKET_ERROR = [
+            winsock-error-string throw
+        ] when
+    ] keep *void* ;
+
+TUPLE: ConnectEx-args port
+    s name namelen lpSendBuffer dwSendDataLength
+    lpdwBytesSent lpOverlapped ptr ;
+
+: wait-for-socket ( args -- n )
+    [ lpOverlapped>> ] [ port>> ] bi twiddle-thumbs ; inline
+
+: <ConnectEx-args> ( sockaddr size -- ConnectEx )
+    ConnectEx-args new
+        swap >>namelen
+        swap >>name
+        f >>lpSendBuffer
+        0 >>dwSendDataLength
+        f >>lpdwBytesSent
+        (make-overlapped) >>lpOverlapped ; inline
+
+: call-ConnectEx ( ConnectEx -- )
+    {
+        [ s>> ]
+        [ name>> ]
+        [ namelen>> ]
+        [ lpSendBuffer>> ]
+        [ dwSendDataLength>> ]
+        [ lpdwBytesSent>> ]
+        [ lpOverlapped>> ]
+        [ ptr>> ]
+    } cleave
+    "int"
+    { "SOCKET" "sockaddr_in*" "int" "PVOID" "DWORD" "LPDWORD" "void*" }
+    "stdcall" alien-indirect drop
+    winsock-error-string [ throw ] when* ; inline
+
+M: object establish-connection ( client-out remote -- )
+    make-sockaddr/size <ConnectEx-args>
+        swap >>port
+        dup port>> handle>> handle>> >>s
+        dup s>> get-ConnectEx-ptr >>ptr
+        dup call-ConnectEx
+        wait-for-socket drop ;
+
+TUPLE: AcceptEx-args port
+    sListenSocket sAcceptSocket lpOutputBuffer dwReceiveDataLength
+    dwLocalAddressLength dwRemoteAddressLength lpdwBytesReceived lpOverlapped ;
+
+: init-accept-buffer ( addr AcceptEx -- )
+    swap sockaddr-size 16 +
+        [ >>dwLocalAddressLength ] [ >>dwRemoteAddressLength ] bi
+        dup dwLocalAddressLength>> 2 * malloc &free >>lpOutputBuffer
+        drop ; inline
+
+: <AcceptEx-args> ( server addr -- AcceptEx )
+    AcceptEx-args new
+        2dup init-accept-buffer
+        swap SOCK_STREAM open-socket |dispose handle>> >>sAcceptSocket
+        over handle>> handle>> >>sListenSocket
+        swap >>port
+        0 >>dwReceiveDataLength
+        f >>lpdwBytesReceived
+        (make-overlapped) >>lpOverlapped ; inline
+
+: call-AcceptEx ( AcceptEx -- )
+    {
+        [ sListenSocket>> ]
+        [ sAcceptSocket>> ]
+        [ lpOutputBuffer>> ]
+        [ dwReceiveDataLength>> ]
+        [ dwLocalAddressLength>> ]
+        [ dwRemoteAddressLength>> ]
+        [ lpdwBytesReceived>> ]
+        [ lpOverlapped>> ]
+    } cleave AcceptEx drop
+    winsock-error-string [ throw ] when* ; inline
+
+: extract-remote-address ( AcceptEx -- sockaddr )
+    {
+        [ lpOutputBuffer>> ]
+        [ dwReceiveDataLength>> ]
+        [ dwLocalAddressLength>> ]
+        [ dwRemoteAddressLength>> ]
+    } cleave
+    f <void*>
+    0 <int>
+    f <void*>
+    [ 0 <int> GetAcceptExSockaddrs ] keep *void* ; inline
+
+M: object (accept) ( server addr -- handle sockaddr )
+    [
+        <AcceptEx-args>
+        {
+            [ call-AcceptEx ]
+            [ wait-for-socket drop ]
+            [ sAcceptSocket>> <win32-socket> ]
+            [ extract-remote-address ]
+        } cleave
+    ] with-destructors ;
+
+TUPLE: WSARecvFrom-args port
+       s lpBuffers dwBufferCount lpNumberOfBytesRecvd
+       lpFlags lpFrom lpFromLen lpOverlapped lpCompletionRoutine ;
+
+: make-receive-buffer ( -- WSABUF )
+    "WSABUF" malloc-object &free
+    default-buffer-size get over set-WSABUF-len
+    default-buffer-size get malloc &free over set-WSABUF-buf ; inline
+
+: <WSARecvFrom-args> ( datagram -- WSARecvFrom )
+    WSARecvFrom-args new
+        swap >>port
+        dup port>> handle>> handle>> >>s
+        dup port>> addr>> sockaddr-size
+            [ malloc &free >>lpFrom ]
+            [ malloc-int &free >>lpFromLen ] bi
+        make-receive-buffer >>lpBuffers
+        1 >>dwBufferCount
+        0 malloc-int &free >>lpFlags
+        0 malloc-int &free >>lpNumberOfBytesRecvd
+        (make-overlapped) >>lpOverlapped ; inline
+
+: call-WSARecvFrom ( WSARecvFrom -- )
+    {
+        [ s>> ]
+        [ lpBuffers>> ]
+        [ dwBufferCount>> ]
+        [ lpNumberOfBytesRecvd>> ]
+        [ lpFlags>> ]
+        [ lpFrom>> ]
+        [ lpFromLen>> ]
+        [ lpOverlapped>> ]
+        [ lpCompletionRoutine>> ]
+    } cleave WSARecvFrom socket-error* ; inline
+
+: parse-WSARecvFrom ( n WSARecvFrom -- packet sockaddr )
+    [ lpBuffers>> WSABUF-buf swap memory>byte-array ]
+    [ [ lpFrom>> ] [ lpFromLen>> *int ] bi memory>byte-array ] bi ; inline
+
+M: winnt (receive) ( datagram -- packet addrspec )
+    [
+        <WSARecvFrom-args>
+        [ call-WSARecvFrom ]
+        [ wait-for-socket ]
+        [ parse-WSARecvFrom ]
+        tri
+    ] with-destructors ;
+
+TUPLE: WSASendTo-args port
+       s lpBuffers dwBufferCount lpNumberOfBytesSent
+       dwFlags lpTo iToLen lpOverlapped lpCompletionRoutine ;
+
+: make-send-buffer ( packet -- WSABUF )
+    "WSABUF" malloc-object &free
+    [ [ malloc-byte-array &free ] dip set-WSABUF-buf ]
+    [ [ length ] dip set-WSABUF-len ]
+    [ nip ]
+    2tri ; inline
+
+: <WSASendTo-args> ( packet addrspec datagram -- WSASendTo )
+    WSASendTo-args new
+        swap >>port
+        dup port>> handle>> handle>> >>s
+        swap make-sockaddr/size
+            [ malloc-byte-array &free ] dip
+            [ >>lpTo ] [ >>iToLen ] bi*
+        swap make-send-buffer >>lpBuffers
+        1 >>dwBufferCount
+        0 >>dwFlags
+        0 <uint> >>lpNumberOfBytesSent
+        (make-overlapped) >>lpOverlapped ; inline
+
+: call-WSASendTo ( WSASendTo -- )
+    {
+        [ s>> ]
+        [ lpBuffers>> ]
+        [ dwBufferCount>> ]
+        [ lpNumberOfBytesSent>> ]
+        [ dwFlags>> ]
+        [ lpTo>> ]
+        [ iToLen>> ]
+        [ lpOverlapped>> ]
+        [ lpCompletionRoutine>> ]
+    } cleave WSASendTo socket-error* ; inline
+
+M: winnt (send) ( packet addrspec datagram -- )
+    [
+        <WSASendTo-args>
+        [ call-WSASendTo ]
+        [ wait-for-socket drop ]
+        bi
+    ] with-destructors ;
diff --git a/basis/io/sockets/windows/nt/tags.txt b/basis/io/sockets/windows/nt/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/sockets/windows/tags.txt b/basis/io/sockets/windows/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/basis/io/sockets/windows/windows.factor b/basis/io/sockets/windows/windows.factor
new file mode 100644 (file)
index 0000000..2900940
--- /dev/null
@@ -0,0 +1,61 @@
+USING: kernel accessors io.sockets io.backend.windows io.backend\r
+windows.winsock system destructors alien.c-types ;\r
+IN: io.sockets.windows\r
+\r
+HOOK: WSASocket-flags io-backend ( -- DWORD )\r
+\r
+TUPLE: win32-socket < win32-file ;\r
+\r
+: <win32-socket> ( handle -- win32-socket )\r
+    win32-socket new-win32-handle ;\r
+\r
+M: win32-socket dispose ( stream -- )\r
+    handle>> closesocket drop ;\r
+\r
+: unspecific-sockaddr/size ( addrspec -- sockaddr len )\r
+    [ empty-sockaddr/size ] [ protocol-family ] bi\r
+    pick set-sockaddr-in-family ;\r
+\r
+: opened-socket ( handle -- win32-socket )\r
+    <win32-socket> |dispose dup add-completion ;\r
+\r
+: open-socket ( addrspec type -- win32-socket )\r
+    [ protocol-family ] dip\r
+    0 f 0 WSASocket-flags WSASocket\r
+    dup socket-error\r
+    opened-socket ;\r
+\r
+M: object (get-local-address) ( socket addrspec -- sockaddr )\r
+    [ handle>> ] dip empty-sockaddr/size <int>\r
+    [ getsockname socket-error ] 2keep drop ;\r
+\r
+M: object (get-remote-address) ( socket addrspec -- sockaddr )\r
+    [ handle>> ] dip empty-sockaddr/size <int>\r
+    [ getpeername socket-error ] 2keep drop ;\r
+\r
+: bind-socket ( win32-socket sockaddr len -- )\r
+    [ handle>> ] 2dip bind socket-error ;\r
+\r
+M: object ((client)) ( addrspec -- handle )\r
+    [ SOCK_STREAM open-socket ] keep\r
+    [ unspecific-sockaddr/size bind-socket ] [ drop ] 2bi ;\r
+\r
+: server-socket ( addrspec type -- fd )\r
+    [ open-socket ] [ drop ] 2bi\r
+    [ make-sockaddr/size bind-socket ] [ drop ] 2bi ;\r
+\r
+! http://support.microsoft.com/kb/127144\r
+! NOTE: Possibly tweak this because of SYN flood attacks\r
+: listen-backlog ( -- n ) HEX: 7fffffff ; inline\r
+\r
+M: object (server) ( addrspec -- handle )\r
+    [\r
+        SOCK_STREAM server-socket\r
+        dup handle>> listen-backlog listen winsock-return-check\r
+    ] with-destructors ;\r
+\r
+M: windows (datagram) ( addrspec -- handle )\r
+    [ SOCK_DGRAM server-socket ] with-destructors ;\r
+\r
+M: windows addrinfo-error ( n -- )\r
+    winsock-return-check ;\r
index ca4f424fb6cadf1751d081bc67b21f3d631e54c0..5bf33e9002b265d8c9ddd27d4697d0136f4c161d 100644 (file)
@@ -15,16 +15,16 @@ HELP: duplex-stream
 { $class-description "A bidirectional stream wrapping an input and output stream." } ;
 
 HELP: <duplex-stream>
-{ $values { "in" "an input stream" } { "out" "an output stream" } { "stream" " a duplex stream" } }
+{ $values { "in" "an input stream" } { "out" "an output stream" } { "duplex-stream" duplex-stream } }
 { $description "Creates a duplex stream. Writing to a duplex stream will write to " { $snippet "out" } ", and reading from a duplex stream will read from " { $snippet "in" } ". Closing a duplex stream closes both the input and output streams." } ;
 
 HELP: with-stream
 { $values { "stream" duplex-stream } { "quot" quotation } }
-{ $description "Calls the quotation in a new dynamic scope, with both " { $link input-stream } " and " { $link output-stream } " rebound to  " { $snippet "stream" } ". The stream is closed if the quotation returns or throws an error." } ;
+{ $description "Calls the quotation in a new dynamic scope, with both " { $link input-stream } " and " { $link output-stream } " rebound to " { $snippet "stream" } ", which must be a duplex stream. The stream is closed if the quotation returns or throws an error." } ;
 
 HELP: with-stream*
 { $values { "stream" duplex-stream } { "quot" quotation } }
-{ $description "Calls the quotation in a new dynamic scope, with both " { $link input-stream } " and " { $link output-stream } " rebound to  " { $snippet "stream" } "." }
+{ $description "Calls the quotation in a new dynamic scope, with both " { $link input-stream } " and " { $link output-stream } " rebound to " { $snippet "stream" } ", which must be a duplex stream." }
 { $notes "This word does not close the stream. Compare with " { $link with-stream } "." } ;
 
 HELP: <encoder-duplex>
diff --git a/basis/io/streams/limited/limited-docs.factor b/basis/io/streams/limited/limited-docs.factor
new file mode 100755 (executable)
index 0000000..fac1232
--- /dev/null
@@ -0,0 +1,90 @@
+! Copyright (C) 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax kernel math io ;
+IN: io.streams.limited
+
+HELP: <limited-stream>
+{ $values
+     { "stream" "an input stream" } { "limit" integer } { "mode" "a " { $link limited-stream } " mode singleton" }
+     { "stream'" "an input stream" }
+}
+{ $description "Constructs a new " { $link limited-stream } " from an existing stream. User code should use " { $link limit } " or " { $link limit-input } "." } ;
+
+HELP: limit
+{ $values
+     { "stream" "an input stream" } { "limit" integer } { "mode" "a " { $link limited-stream } " mode singleton" }
+     { "stream'" "a stream" }
+}
+{ $description "Changes a decoder's stream to be a limited stream, or wraps " { $snippet "stream" } " in a " { $link limited-stream } "." }
+{ $examples "Throwing an exception:"
+    { $example
+        "USING: continuations io io.streams.limited io.streams.string"
+        "kernel prettyprint ;"
+        "["
+        "    \"123456\" <string-reader> 3 stream-throws limit"
+        "    100 swap stream-read ."
+        "] [ ] recover ."
+        "T{ limit-exceeded }"
+    }
+    "Returning " { $link f } " on exhaustion:"
+    { $example
+        "USING: accessors continuations io io.streams.limited"
+        "io.streams.string kernel prettyprint ;"
+        "\"123456\" <string-reader> 3 stream-eofs limit"
+        "100 swap stream-read ."
+        "\"123\""
+    }
+} ;
+
+HELP: unlimit
+{ $values
+     { "stream" "an input stream" }
+     { "stream'" "a stream" }
+}
+{ $description "Returns the underlying stream of a limited stream." } ;
+
+HELP: limited-stream
+{ $values
+    { "value" "a limited-stream class" }
+}
+{ $description "Limited streams wrap other streams, changing their behavior to throw an exception or return " { $link f } " upon exhaustion." } ;
+
+HELP: limit-input
+{ $values
+     { "limit" integer } { "mode" "a " { $link limited-stream } " mode singleton" }
+}
+{ $description "Wraps the current " { $link input-stream } " in a " { $link limited-stream } "." } ;
+
+HELP: unlimit-input
+{ $description "Returns the underlying stream of the limited-stream stored in " { $link input-stream } "." } ;
+
+HELP: stream-eofs
+{ $values
+    { "value" "a " { $link limited-stream } " mode singleton" }
+}
+{ $description "If the " { $slot "mode" } " of a limited stream is set to this singleton, the stream will return " { $link f } " upon exhaustion." } ;
+
+HELP: stream-throws
+{ $values
+    { "value" "a " { $link limited-stream } " mode singleton" }
+}
+{ $description "If the " { $slot "mode" } " of a limited stream is set to this singleton, the stream will throw " { $link limit-exceeded } " upon exhaustion." } ;
+
+{ stream-eofs stream-throws } related-words
+
+ARTICLE: "io.streams.limited" "Limited input streams"
+"The " { $vocab-link "io.streams.limited" } " vocabulary wraps a stream to behave as if it had only a limited number of bytes, either throwing an error or returning " { $link f } " upon reaching the end." $nl
+"Wrap a stream in a limited stream:"
+{ $subsection limit }
+"Wrap the current " { $link input-stream } " in a limited stream:"
+{ $subsection limit-input }
+"Unlimits a limited stream:"
+{ $subsection unlimit }
+"Unlimits the current " { $link input-stream } ":"
+{ $subsection unlimit-input }
+"Make a limited stream throw an exception on exhaustion:"
+{ $subsection stream-throws }
+"Make a limited stream return " { $link f } " on exhaustion:"
+{ $subsection stream-eofs } ;
+
+ABOUT: "io.streams.limited"
index eb5b9212607a3fb8cac46d9dd3bea444c04f6fbd..feddc130e933d228a96581e1974a773a0d0dd051 100644 (file)
@@ -1,14 +1,15 @@
-IN: io.streams.limited.tests
 USING: io io.streams.limited io.encodings io.encodings.string
 io.encodings.ascii io.encodings.binary io.streams.byte-array
-namespaces tools.test strings kernel ;
+namespaces tools.test strings kernel io.streams.string accessors
+io.encodings.utf8 io.files destructors ;
+IN: io.streams.limited.tests
 
 [ ] [
     "hello world\nhow are you today\nthis is a very long line indeed"
     ascii encode binary <byte-reader> "data" set
 ] unit-test
 
-[ ] [ "data" get 24 <limited-stream> "limited" set ] unit-test
+[ ] [ "data" get 24 stream-throws <limited-stream> "limited" set ] unit-test
 
 [ CHAR: h ] [ "limited" get stream-read1 ] unit-test
 
@@ -25,7 +26,7 @@ namespaces tools.test strings kernel ;
     ascii encode binary <byte-reader> "data" set
 ] unit-test
 
-[ ] [ "data" get 7 <limited-stream> "limited" set ] unit-test
+[ ] [ "data" get 7 stream-throws <limited-stream> "limited" set ] unit-test
 
 [ "abc" CHAR: \n ] [ "\n" "limited" get stream-read-until [ >string ] dip ] unit-test
 
@@ -34,7 +35,44 @@ namespaces tools.test strings kernel ;
 [ "he" CHAR: l ] [
     B{ CHAR: h CHAR: e CHAR: l CHAR: l CHAR: o }
     ascii <byte-reader> [
-        5 limit-input
+        5 stream-throws limit-input
         "l" read-until
     ] with-input-stream
 ] unit-test
+
+[ CHAR: a ]
+[ "a" <string-reader> 1 stream-eofs <limited-stream> stream-read1 ] unit-test
+
+[ "abc" ]
+[
+    "abc" <string-reader> 3 stream-eofs <limited-stream>
+    4 swap stream-read
+] unit-test
+
+[ f ]
+[
+    "abc" <string-reader> 3 stream-eofs <limited-stream>
+    4 over stream-read drop 10 swap stream-read
+] unit-test
+
+[ t ]
+[
+    "abc" <string-reader> 3 stream-eofs limit unlimit
+    "abc" <string-reader> =
+] unit-test
+
+[ t ]
+[
+    "abc" <string-reader> 3 stream-eofs limit unlimit
+    "abc" <string-reader> =
+] unit-test
+
+[ t ]
+[
+    [
+        "resource:license.txt" utf8 <file-reader> &dispose
+        3 stream-eofs limit unlimit
+        "resource:license.txt" utf8 <file-reader> &dispose
+        [ decoder? ] both?
+    ] with-destructors
+] unit-test
old mode 100644 (file)
new mode 100755 (executable)
index ecc4992..1237b3a
@@ -1,45 +1,91 @@
-! Copyright (C) 2008 Slava Pestov
+! Copyright (C) 2008 Slava Pestov.
+! Copyright (C) 2009 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel math io io.encodings destructors accessors
-sequences namespaces byte-vectors ;
+sequences namespaces byte-vectors fry combinators ;
 IN: io.streams.limited
 
-TUPLE: limited-stream stream count limit ;
+TUPLE: limited-stream stream count limit mode stack ;
 
-: <limited-stream> ( stream limit -- stream' )
+SINGLETONS: stream-throws stream-eofs ;
+
+: <limited-stream> ( stream limit mode -- stream' )
     limited-stream new
+        swap >>mode
         swap >>limit
         swap >>stream
         0 >>count ;
 
-GENERIC# limit 1 ( stream limit -- stream' )
+GENERIC# limit 2 ( stream limit mode -- stream' )
+
+M: decoder limit ( stream limit mode -- stream' )
+    [ clone ] 2dip '[ _ _ limit ] change-stream ;
+
+M: object limit ( stream limit mode -- stream' )
+    <limited-stream> ;
+
+GENERIC: unlimit ( stream -- stream' )
+
+M: decoder unlimit ( stream -- stream' )
+    [ stream>> ] change-stream ;
+
+M: object unlimit ( stream -- stream' )
+    stream>> stream>> ;
+
+: limit-input ( limit mode -- ) input-stream [ -rot limit ] change ;
 
-M: decoder limit [ clone ] dip [ limit ] curry change-stream ;
+: unlimit-input ( -- ) input-stream [ unlimit ] change ;
 
-M: object limit <limited-stream> ;
+: with-unlimited-stream ( stream quot -- )
+    [ clone unlimit ] dip call ; inline
 
-: limit-input ( limit -- ) input-stream [ swap limit ] change ;
+: with-limited-stream ( stream limit mode quot -- )
+    [ limit ] dip call ; inline
 
 ERROR: limit-exceeded ;
 
-: check-limit ( n stream -- )
-    [ + ] change-count
-    [ count>> ] [ limit>> ] bi >=
-    [ limit-exceeded ] when ; inline
+ERROR: bad-stream-mode mode ;
+
+<PRIVATE
+
+: adjust-limit ( n stream -- n' stream )
+    2dup [ + ] change-count
+    [ count>> ] [ limit>> ] bi >
+    [
+        dup mode>> {
+            { stream-throws [ limit-exceeded ] }
+            { stream-eofs [ 
+                dup [ count>> ] [ limit>> ] bi -
+                '[ _ - ] dip
+            ] }
+            [ bad-stream-mode ]
+        } case
+    ] when ; inline
+
+: maybe-read ( n limited-stream quot: ( n stream -- seq/f ) -- seq/f )
+    [ adjust-limit ] dip
+    pick 0 <= [ 3drop f ] [ [ stream>> ] dip call ] if ; inline
+
+PRIVATE>
 
 M: limited-stream stream-read1
-    1 over check-limit stream>> stream-read1 ;
+    1 swap 
+    [ nip stream-read1 ] maybe-read ;
 
 M: limited-stream stream-read
-    2dup check-limit stream>> stream-read ;
+    [ stream-read ] maybe-read ;
 
 M: limited-stream stream-read-partial
-    2dup check-limit stream>> stream-read-partial ;
+    [ stream-read-partial ] maybe-read ;
+
+<PRIVATE
 
 : (read-until) ( stream seps buf -- stream seps buf sep/f )
     3dup [ [ stream-read1 dup ] dip memq? ] dip
     swap [ drop ] [ push (read-until) ] if ;
 
+PRIVATE>
+
 M: limited-stream stream-read-until
     swap BV{ } clone (read-until) [ 2nip B{ } like ] dip ;
 
diff --git a/basis/io/streams/null/authors.txt b/basis/io/streams/null/authors.txt
deleted file mode 100755 (executable)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/io/streams/null/null.factor b/basis/io/streams/null/null.factor
deleted file mode 100644 (file)
index 191c8dc..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-! Copyright (C) 2007 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-IN: io.streams.null
-USING: kernel io io.timeouts io.streams.duplex destructors ;
-
-TUPLE: null-stream ;
-
-M: null-stream dispose drop ;
-M: null-stream set-timeout 2drop ;
-
-TUPLE: null-reader < null-stream ;
-
-M: null-reader stream-readln drop f ;
-M: null-reader stream-read1 drop f ;
-M: null-reader stream-read-until 2drop f f ;
-M: null-reader stream-read 2drop f ;
-
-TUPLE: null-writer < null-stream ;
-
-M: null-writer stream-write1 2drop ;
-M: null-writer stream-write 2drop ;
-M: null-writer stream-nl drop ;
-M: null-writer stream-flush drop ;
-M: null-writer stream-format 3drop ;
-M: null-writer make-span-stream nip ;
-M: null-writer make-block-stream nip ;
-M: null-writer make-cell-stream nip ;
-M: null-writer stream-write-table 3drop ;
-
-: with-null-reader ( quot -- )
-    T{ null-reader } swap with-input-stream* ; inline
-
-: with-null-writer ( quot -- )
-    T{ null-writer } swap with-output-stream* ; inline
-
-: with-null-stream ( quot -- )
-    T{ duplex-stream f T{ null-reader } T{ null-writer } }
-    swap with-stream* ; inline
index febec6573a104221787751e48df6c4b91ce068d5..82f5de3d709cc8de33466da9ae39feacec28cecf 100644 (file)
@@ -1,7 +1,116 @@
 USING: help.markup help.syntax io.streams.plain io strings
-hashtables ;
+hashtables kernel quotations ;
 IN: io.styles
 
+HELP: stream-format
+{ $values { "str" string } { "style" "a hashtable" } { "stream" "an output stream" } }
+{ $contract "Writes formatted text to the stream. If the stream does buffering, output may not be performed immediately; use " { $link stream-flush } " to force output."
+$nl
+"The " { $snippet "style" } " hashtable holds character style information. See " { $link "character-styles" } "." }
+{ $notes "Most code only works on one stream at a time and should instead use " { $link format } "; see " { $link "stdio" } "." }
+$io-error ;
+
+HELP: make-block-stream
+{ $values { "style" "a hashtable" } { "stream" "an output stream" } { "stream'" "an output stream" } }
+{ $contract "Creates an output stream which wraps " { $snippet "stream" } " and adds " { $snippet "style" } " on calls to " { $link stream-write } " and " { $link stream-format } "."
+$nl
+"Unlike " { $link make-span-stream } ", this creates a new paragraph block in the output."
+$nl
+"The " { $snippet "style" } " hashtable holds paragraph style information. See " { $link "paragraph-styles" } "." }
+{ $notes "Most code only works on one stream at a time and should instead use " { $link with-nesting } "; see " { $link "stdio" } "." }
+$io-error ;
+
+HELP: stream-write-table
+{ $values { "table-cells" "a sequence of sequences of table cells" } { "style" "a hashtable" } { "stream" "an output stream" } }
+{ $contract "Prints a table of cells produced by " { $link with-cell } "."
+$nl
+"The " { $snippet "style" } " hashtable holds table style information. See " { $link "table-styles" } "." }
+{ $notes "Most code only works on one stream at a time and should instead use " { $link tabular-output } "; see " { $link "stdio" } "." }
+$io-error ;
+
+HELP: make-cell-stream
+{ $values { "style" hashtable } { "stream" "an output stream" } { "stream'" object } }
+{ $contract "Creates an output stream which writes to a table cell object." }
+{ $notes "Most code only works on one stream at a time and should instead use " { $link with-cell } "; see " { $link "stdio" } "." }
+$io-error ;
+
+HELP: make-span-stream
+{ $values { "style" "a hashtable" } { "stream" "an output stream" } { "stream'" "an output stream" } }
+{ $contract "Creates an output stream which wraps " { $snippet "stream" } " and adds " { $snippet "style" } " on calls to " { $link stream-write } " and " { $link stream-format } "."
+$nl
+"Unlike " { $link make-block-stream } ", the stream output is inline, and not nested in a paragraph block." }
+{ $notes "Most code only works on one stream at a time and should instead use " { $link with-style } "; see " { $link "stdio" } "." }
+$io-error ;
+
+HELP: format
+{ $values { "str" string } { "style" "a hashtable" } }
+{ $description "Writes formatted text to " { $link output-stream } ". If the stream does buffering, output may not be performed immediately; use " { $link flush } " to force output." }
+{ $notes "Details are in the documentation for " { $link stream-format } "." }
+$io-error ;
+
+HELP: with-nesting
+{ $values { "style" "a hashtable" } { "quot" quotation } }
+{ $description "Calls the quotation in a new dynamic scope with " { $link output-stream } " rebound to a nested paragraph stream, with formatting information applied." }
+{ $notes "Details are in the documentation for " { $link make-block-stream } "." }
+$io-error ;
+
+HELP: tabular-output
+{ $values { "style" "a hashtable" } { "quot" quotation } }
+{ $description "Calls a quotation which emits a series of equal-length table rows using " { $link with-row } ". The results are laid out in a tabular fashion on " { $link output-stream } "."
+$nl
+"The " { $snippet "style" } " hashtable holds table style information. See " { $link "table-styles" } "." }
+{ $examples
+    { $code
+        "{ { 1 2 } { 3 4 } }"
+        "H{ { table-gap { 10 10 } } } ["
+        "    [ [ [ [ . ] with-cell ] each ] with-row ] each"
+        "] tabular-output"
+    }
+}
+$io-error ;
+
+HELP: with-row
+{ $values { "quot" quotation } }
+{ $description "Calls a quotation which emits a series of table cells using " { $link with-cell } ". This word can only be called inside the quotation given to " { $link tabular-output } "." }
+$io-error ;
+
+HELP: with-cell
+{ $values { "quot" quotation } }
+{ $description "Calls a quotation in a new scope with " { $link output-stream } " rebound. Output performed by the quotation is displayed in a table cell. This word can only be called inside the quotation given to " { $link with-row } "." }
+$io-error ;
+
+HELP: write-cell
+{ $values { "str" string } }
+{ $description "Outputs a table cell containing a single string. This word can only be called inside the quotation given to " { $link with-row } "." }
+$io-error ;
+
+HELP: with-style
+{ $values { "style" "a hashtable" } { "quot" quotation } }
+{ $description "Calls the quotation in a new dynamic scope where calls to " { $link write } ", " { $link format } " and other stream output words automatically inherit style settings from " { $snippet "style" } "." }
+{ $notes "Details are in the documentation for " { $link make-span-stream } "." }
+$io-error ;
+
+ARTICLE: "formatted-stream-protocol" "Formatted stream protocol"
+"The " { $vocab-link "io.styles" } " vocabulary defines a protocol for output streams that support rich text."
+{ $subsection stream-format }
+{ $subsection make-span-stream }
+{ $subsection make-block-stream }
+{ $subsection make-cell-stream }
+{ $subsection stream-write-table } ;
+
+ARTICLE: "formatted-stdout" "Formatted output on the default stream"
+"The below words perform formatted output on " { $link output-stream } "."
+$nl
+"Formatted output:"
+{ $subsection format }
+{ $subsection with-style }
+{ $subsection with-nesting }
+"Tabular output:"
+{ $subsection tabular-output }
+{ $subsection with-row }
+{ $subsection with-cell }
+{ $subsection write-cell } ;
+
 ARTICLE: "character-styles" "Character styles"
 "Character styles for " { $link stream-format } " and " { $link with-style } ":"
 { $subsection foreground }
@@ -33,7 +142,7 @@ ARTICLE: "presentations" "Presentations"
 "The " { $link presented } " style can be used to emit clickable objects. A utility word for outputting this style:"
 { $subsection write-object } ;
 
-ARTICLE: "styles" "Formatted output"
+ARTICLE: "styles" "Styled text"
 "The " { $link stream-format } ", " { $link with-style } ", " { $link with-nesting } " and " { $link tabular-output } " words take a hashtable of style attributes. Output stream implementations are free to ignore style information."
 $nl
 "Style hashtables are keyed by symbols from the " { $vocab-link "io.styles" } " vocabulary."
@@ -42,7 +151,13 @@ $nl
 { $subsection "table-styles" }
 { $subsection "presentations" } ;
 
-ABOUT: "styles"
+ARTICLE: "io.styles" "Formatted output"
+"The " { $vocab-link "io.styles" } " vocabulary defines a protocol for formatted output. This is used by the prettyprinter, help system, and various developer tools. Implementations include " { $vocab-link "ui.gadgets.panes" } ", " { $vocab-link "html.streams" } ", and " { $vocab-link "io.streams.plain" } "."
+{ $subsection "formatted-stream-protocol" }
+{ $subsection "formatted-stdout" }
+{ $subsection "styles" } ;
+
+ABOUT: "io.styles"
 
 HELP: plain
 { $description "A value for the " { $link font-style } " character style denoting plain text." } ;
@@ -150,10 +265,19 @@ HELP: input
     { $code "\"2 3 + .\" dup <input> write-object nl" }
 } ;
 
-HELP: <input> ( string -- input )
+HELP: <input>
 { $values { "string" string } { "input" input } }
 { $description "Creates a new " { $link input } "." } ;
 
 HELP: standard-table-style
 { $values { "style" hashtable } }
 { $description "Outputs a table style where cells are separated by 5-pixel gaps and framed by a light gray border. This style can be passed to " { $link tabular-output } "." } ;
+
+ARTICLE: "io.streams.plain" "Plain writer streams"
+"Plain writer streams wrap an underlying stream and provide a default implementation of "
+{ $link stream-nl } ", "
+{ $link stream-format } ", "
+{ $link make-span-stream } ", "
+{ $link make-block-stream } " and "
+{ $link make-cell-stream } "."
+{ $subsection plain-writer } ;
\ No newline at end of file
diff --git a/basis/io/styles/styles-tests.factor b/basis/io/styles/styles-tests.factor
new file mode 100644 (file)
index 0000000..86c3681
--- /dev/null
@@ -0,0 +1,8 @@
+IN: io.styles.tests
+USING: io.styles tools.test ;
+
+\ stream-format must-infer
+\ stream-write-table must-infer
+\ make-span-stream must-infer
+\ make-block-stream must-infer
+\ make-cell-stream must-infer
\ No newline at end of file
index e07753c64076990032f20991523f05ac79f12cdc..0e07c8bda9f04fd68e451e249259723b77754d3d 100644 (file)
@@ -1,9 +1,139 @@
-! Copyright (C) 2005, 2008 Slava Pestov.
+! Copyright (C) 2005, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: hashtables io colors summary make accessors splitting
-kernel ;
+USING: hashtables io io.streams.plain io.streams.string
+colors summary make accessors splitting math.order
+kernel namespaces assocs destructors strings sequences ;
 IN: io.styles
 
+GENERIC: stream-format ( str style stream -- )
+GENERIC: make-span-stream ( style stream -- stream' )
+GENERIC: make-block-stream ( style stream -- stream' )
+GENERIC: make-cell-stream ( style stream -- stream' )
+GENERIC: stream-write-table ( table-cells style stream -- )
+
+: format ( str style -- ) output-stream get stream-format ;
+
+: tabular-output ( style quot -- )
+    swap [ { } make ] dip output-stream get stream-write-table ; inline
+
+: with-row ( quot -- )
+    { } make , ; inline
+
+: with-cell ( quot -- )
+    H{ } output-stream get make-cell-stream
+    [ swap with-output-stream ] keep , ; inline
+
+: write-cell ( str -- )
+    [ write ] with-cell ; inline
+
+: with-style ( style quot -- )
+    swap dup assoc-empty? [
+        drop call
+    ] [
+        output-stream get make-span-stream swap with-output-stream
+    ] if ; inline
+
+: with-nesting ( style quot -- )
+    [ output-stream get make-block-stream ] dip
+    with-output-stream ; inline
+
+TUPLE: filter-writer stream ;
+
+M: filter-writer stream-format
+    stream>> stream-format ;
+
+M: filter-writer stream-write
+    stream>> stream-write ;
+
+M: filter-writer stream-write1
+    stream>> stream-write1 ;
+
+M: filter-writer make-span-stream
+    stream>> make-span-stream ;
+
+M: filter-writer make-block-stream
+    stream>> make-block-stream ;
+
+M: filter-writer make-cell-stream
+    stream>> make-cell-stream ;
+
+M: filter-writer stream-flush
+    stream>> stream-flush ;
+
+M: filter-writer stream-nl
+    stream>> stream-nl ;
+
+M: filter-writer stream-write-table
+    stream>> stream-write-table ;
+
+M: filter-writer dispose
+    stream>> dispose ;
+
+TUPLE: ignore-close-stream < filter-writer ;
+
+M: ignore-close-stream dispose drop ;
+
+C: <ignore-close-stream> ignore-close-stream
+
+TUPLE: style-stream < filter-writer style ;
+
+: do-nested-style ( style style-stream -- style stream )
+    [ style>> swap assoc-union ] [ stream>> ] bi ; inline
+
+C: <style-stream> style-stream
+
+M: style-stream stream-format
+    do-nested-style stream-format ;
+
+M: style-stream stream-write
+    [ style>> ] [ stream>> ] bi stream-format ;
+
+M: style-stream stream-write1
+    [ 1string ] dip stream-write ;
+
+M: style-stream make-span-stream
+    do-nested-style make-span-stream ;
+
+M: style-stream make-block-stream
+    [ do-nested-style make-block-stream ] [ style>> ] bi
+    <style-stream> ;
+
+M: style-stream make-cell-stream
+    [ do-nested-style make-cell-stream ] [ style>> ] bi
+    <style-stream> ;
+
+M: style-stream stream-write-table
+    [ [ [ stream>> ] map ] map ] [ ] [ stream>> ] tri*
+    stream-write-table ;
+
+M: plain-writer stream-format
+    nip stream-write ;
+
+M: plain-writer make-span-stream
+    swap <style-stream> <ignore-close-stream> ;
+
+M: plain-writer make-block-stream
+    nip <ignore-close-stream> ;
+
+: format-column ( seq ? -- seq )
+    [
+        [ 0 [ length max ] reduce ] keep
+        swap [ CHAR: \s pad-right ] curry map
+    ] unless ;
+
+: map-last ( seq quot -- seq )
+    [ dup length <reversed> ] dip [ 0 = ] prepose 2map ; inline
+
+: format-table ( table -- seq )
+    flip [ format-column ] map-last
+    flip [ " " join ] map ;
+
+M: plain-writer stream-write-table
+    [ drop format-table [ print ] each ] with-output-stream* ;
+
+M: plain-writer make-cell-stream 2drop <string-writer> ;
+
+! Font styles
 SYMBOL: plain
 SYMBOL: bold
 SYMBOL: italic
index fe86ba9e3dbe996a0c065c3cbc7f5c3d39283c36..7589d4918ec29fff8fe0231269b201b9d8a48713 100644 (file)
@@ -1,14 +1,20 @@
 ! Copyright (C) 2008 Slava Pestov.\r
 ! See http://factorcode.org/license.txt for BSD license.\r
+USING: threads io.backend namespaces init math kernel ;\r
 IN: io.thread\r
-USING: threads io.backend namespaces init math ;\r
+\r
+! The Cocoa UI backend stops the I/O thread and takes over\r
+! completely.\r
+SYMBOL: io-thread-running?\r
 \r
 : io-thread ( -- )\r
     sleep-time io-multiplex yield ;\r
 \r
 : start-io-thread ( -- )\r
-    [ io-thread t ]\r
-    "I/O wait" spawn-server\r
-    \ io-thread set-global ;\r
+    [ [ io-thread-running? get-global ] [ io-thread ] [ ] while ]\r
+    "I/O wait" spawn drop ;\r
 \r
-[ start-io-thread ] "io.thread" add-init-hook\r
+[\r
+    t io-thread-running? set-global\r
+    start-io-thread\r
+] "io.thread" add-init-hook\r
old mode 100644 (file)
new mode 100755 (executable)
index fd1b14d..8e69983
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov, Doug Coleman\r
 ! See http://factorcode.org/license.txt for BSD license.\r
 USING: kernel calendar alarms io io.encodings accessors\r
-namespaces fry ;\r
+namespaces fry io.streams.null ;\r
 IN: io.timeouts\r
 \r
 GENERIC: timeout ( obj -- dt/f )\r
@@ -27,3 +27,5 @@ GENERIC: cancel-operation ( obj -- )
 : timeouts ( dt -- )\r
     [ input-stream get set-timeout ]\r
     [ output-stream get set-timeout ] bi ;\r
+\r
+M: null-stream set-timeout 2drop ;\r
diff --git a/basis/io/unix/authors.txt b/basis/io/unix/authors.txt
deleted file mode 100644 (file)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/io/unix/backend/authors.txt b/basis/io/unix/backend/authors.txt
deleted file mode 100644 (file)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/io/unix/backend/backend.factor b/basis/io/unix/backend/backend.factor
deleted file mode 100644 (file)
index 41bd03a..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-! Copyright (C) 2004, 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: alien alien.c-types alien.syntax generic assocs kernel
-kernel.private math io.ports sequences strings sbufs threads
-unix vectors io.buffers io.backend io.encodings math.parser
-continuations system libc qualified namespaces make io.timeouts
-io.encodings.utf8 destructors accessors summary combinators
-locals unix.time fry io.unix.multiplexers ;
-QUALIFIED: io
-IN: io.unix.backend
-
-GENERIC: handle-fd ( handle -- fd )
-
-TUPLE: fd fd disposed ;
-
-: init-fd ( fd -- fd )
-    [
-        |dispose
-        dup fd>> F_SETFL O_NONBLOCK fcntl io-error
-        dup fd>> F_SETFD FD_CLOEXEC fcntl io-error
-    ] with-destructors ;
-
-: <fd> ( n -- fd )
-    #! We drop the error code rather than calling io-error,
-    #! since on OS X 10.3, this operation fails from init-io
-    #! when running the Factor.app (presumably because fd 0 and
-    #! 1 are closed).
-    f fd boa ;
-
-M: fd dispose
-    dup disposed>> [ drop ] [
-        [ cancel-operation ]
-        [ t >>disposed drop ]
-        [ fd>> close-file ]
-        tri
-    ] if ;
-
-M: fd handle-fd dup check-disposed fd>> ;
-
-M: fd cancel-operation ( fd -- )
-    dup disposed>> [ drop ] [
-        fd>>
-        mx get-global
-        [ remove-input-callbacks [ t swap resume-with ] each ]
-        [ remove-output-callbacks [ t swap resume-with ] each ]
-        2bi
-    ] if ;
-
-SYMBOL: +retry+ ! just try the operation again without blocking
-SYMBOL: +input+
-SYMBOL: +output+
-
-ERROR: io-timeout ;
-
-M: io-timeout summary drop "I/O operation timed out" ;
-
-: wait-for-fd ( handle event -- )
-    dup +retry+ eq? [ 2drop ] [
-        '[
-            swap handle-fd mx get-global _ {
-                { +input+ [ add-input-callback ] }
-                { +output+ [ add-output-callback ] }
-            } case
-        ] "I/O" suspend nip [ io-timeout ] when
-    ] if ;
-
-: wait-for-port ( port event -- )
-    '[ handle>> _ wait-for-fd ] with-timeout ;
-
-! Some general stuff
-: file-mode OCT: 0666 ;
-! Readers
-: (refill) ( port -- n )
-    [ handle>> ]
-    [ buffer>> buffer-end ]
-    [ buffer>> buffer-capacity ] tri read ;
-
-! Returns an event to wait for which will ensure completion of
-! this request
-GENERIC: refill ( port handle -- event/f )
-
-M: fd refill
-    fd>> over buffer>> [ buffer-end ] [ buffer-capacity ] bi read
-    {
-        { [ dup 0 >= ] [ swap buffer>> n>buffer f ] }
-        { [ err_no EINTR = ] [ 2drop +retry+ ] }
-        { [ err_no EAGAIN = ] [ 2drop +input+ ] }
-        [ (io-error) ]
-    } cond ;
-
-M: unix (wait-to-read) ( port -- )
-    dup
-    dup handle>> dup check-disposed refill dup
-    [ dupd wait-for-port (wait-to-read) ] [ 2drop ] if ;
-
-! Writers
-GENERIC: drain ( port handle -- event/f )
-
-M: fd drain
-    fd>> over buffer>> [ buffer@ ] [ buffer-length ] bi write
-    {
-        { [ dup 0 >= ] [
-            over buffer>> buffer-consume
-            buffer>> buffer-empty? f +output+ ?
-        ] }
-        { [ err_no EINTR = ] [ 2drop +retry+ ] }
-        { [ err_no EAGAIN = ] [ 2drop +output+ ] }
-        [ (io-error) ]
-    } cond ;
-
-M: unix (wait-to-write) ( port -- )
-    dup
-    dup handle>> dup check-disposed drain
-    dup [ wait-for-port ] [ 2drop ] if ;
-
-M: unix io-multiplex ( ms/f -- )
-    mx get-global wait-for-events ;
-
-! On Unix, you're not supposed to set stdin to non-blocking
-! because the fd might be shared with another process (either
-! parent or child). So what we do is have the VM start a thread
-! which pumps data from the real stdin to a pipe. We set the
-! pipe to non-blocking, and read from it instead of the real
-! stdin. Very crufty, but it will suffice until we get native
-! threading support at the language level.
-TUPLE: stdin control size data disposed ;
-
-M: stdin dispose*
-    [
-        [ control>> &dispose drop ]
-        [ size>> &dispose drop ]
-        [ data>> &dispose drop ]
-        tri
-    ] with-destructors ;
-
-: wait-for-stdin ( stdin -- n )
-    [ control>> CHAR: X over io:stream-write1 io:stream-flush ]
-    [ size>> "ssize_t" heap-size swap io:stream-read *int ]
-    bi ;
-
-:: refill-stdin ( buffer stdin size -- )
-    stdin data>> handle-fd buffer buffer-end size read
-    dup 0 < [
-        drop
-        err_no EINTR = [ buffer stdin size refill-stdin ] [ (io-error) ] if
-    ] [
-        size = [ "Error reading stdin pipe" throw ] unless
-        size buffer n>buffer
-    ] if ;
-
-M: stdin refill
-    [ buffer>> ] [ dup wait-for-stdin ] bi* refill-stdin f ;
-
-: control-write-fd ( -- fd ) &: control_write *uint ;
-
-: size-read-fd ( -- fd ) &: size_read *uint ;
-
-: data-read-fd ( -- fd ) &: stdin_read *uint ;
-
-: <stdin> ( -- stdin )
-    stdin new
-        control-write-fd <fd> <output-port> >>control
-        size-read-fd <fd> init-fd <input-port> >>size
-        data-read-fd <fd> >>data ;
-
-M: unix (init-stdio) ( -- )
-    <stdin> <input-port>
-    1 <fd> <output-port>
-    2 <fd> <output-port> ;
-
-! mx io-task for embedding an fd-based mx inside another mx
-TUPLE: mx-port < port mx ;
-
-: <mx-port> ( mx -- port )
-    dup fd>> mx-port <port> swap >>mx ;
-
-: multiplexer-error ( n -- n )
-    dup 0 < [
-        err_no [ EAGAIN = ] [ EINTR = ] bi or
-        [ drop 0 ] [ (io-error) ] if
-    ] when ;
-
-: ?flag ( n mask symbol -- n )
-    pick rot bitand 0 > [ , ] [ drop ] if ;
diff --git a/basis/io/unix/backend/summary.txt b/basis/io/unix/backend/summary.txt
deleted file mode 100644 (file)
index 8f66d88..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Non-blocking I/O and sockets on Unix-like systems
diff --git a/basis/io/unix/backend/tags.txt b/basis/io/unix/backend/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/bsd/authors.txt b/basis/io/unix/bsd/authors.txt
deleted file mode 100755 (executable)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/io/unix/bsd/bsd.factor b/basis/io/unix/bsd/bsd.factor
deleted file mode 100644 (file)
index 83f063d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: namespaces system kernel accessors assocs continuations
-unix io.backend io.unix.backend io.unix.multiplexers
-io.unix.multiplexers.kqueue ;
-IN: io.unix.bsd
-
-M: bsd init-io ( -- )
-    <kqueue-mx> mx set-global ;
-
-! M: bsd (monitor) ( path recursive? mailbox -- )
-!     swap [ "Recursive kqueue monitors not supported" throw ] when
-!     <vnode-monitor> ;
diff --git a/basis/io/unix/bsd/tags.txt b/basis/io/unix/bsd/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/epoll/authors.txt b/basis/io/unix/epoll/authors.txt
deleted file mode 100755 (executable)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/io/unix/epoll/epoll.factor b/basis/io/unix/epoll/epoll.factor
deleted file mode 100644 (file)
index 93d0b4a..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors alien.c-types kernel io.ports io.unix.backend
-bit-arrays sequences assocs struct-arrays math namespaces locals
-fry unix unix.linux.epoll unix.time ;
-IN: io.unix.epoll
-
-TUPLE: epoll-mx < mx events ;
-
-: max-events ( -- n )
-    #! We read up to 256 events at a time. This is an arbitrary
-    #! constant...
-    256 ; inline
-
-: <epoll-mx> ( -- mx )
-    epoll-mx new-mx
-        max-events epoll_create dup io-error >>fd
-        max-events "epoll-event" <struct-array> >>events ;
-
-: make-event ( fd events -- event )
-    "epoll-event" <c-object>
-    [ set-epoll-event-events ] keep
-    [ set-epoll-event-fd ] keep ;
-
-:: do-epoll-ctl ( fd mx what events -- )
-    mx fd>> what fd fd events make-event epoll_ctl io-error ;
-
-: do-epoll-add ( fd mx events -- )
-    EPOLL_CTL_ADD swap EPOLLONESHOT bitor do-epoll-ctl ;
-
-: do-epoll-del ( fd mx events -- )
-    EPOLL_CTL_DEL swap do-epoll-ctl ;
-
-M: epoll-mx add-input-callback ( thread fd mx -- )
-    [ EPOLLIN do-epoll-add ] [ call-next-method ] 2bi ;
-
-M: epoll-mx add-output-callback ( thread fd mx -- )
-    [ EPOLLOUT do-epoll-add ] [ call-next-method ] 2bi ;
-
-M: epoll-mx remove-input-callbacks ( fd mx -- seq )
-    2dup reads>> key? [
-        [ call-next-method ] [ EPOLLIN do-epoll-del ] 2bi
-    ] [ 2drop f ] if ;
-
-M: epoll-mx remove-output-callbacks ( fd mx -- seq )
-    2dup writes>> key? [
-        [ EPOLLOUT do-epoll-del ] [ call-next-method ] 2bi
-    ] [ 2drop f ] if ;
-
-: wait-event ( mx us -- n )
-    [ [ fd>> ] [ events>> ] bi [ underlying>> ] [ length ] bi ] [ 1000 /i ] bi*
-    epoll_wait multiplexer-error ;
-
-: handle-event ( event mx -- )
-    [ epoll-event-fd ] dip
-    [ EPOLLIN EPOLLOUT bitor do-epoll-del ]
-    [ input-available ] [ output-available ] 2tri ;
-
-: handle-events ( mx n -- )
-    [ dup events>> ] dip head-slice swap '[ _ handle-event ] each ;
-
-M: epoll-mx wait-for-events ( us mx -- )
-    swap 60000000 or dupd wait-event handle-events ;
diff --git a/basis/io/unix/epoll/tags.txt b/basis/io/unix/epoll/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/files/authors.txt b/basis/io/unix/files/authors.txt
deleted file mode 100644 (file)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/io/unix/files/bsd/bsd.factor b/basis/io/unix/files/bsd/bsd.factor
deleted file mode 100644 (file)
index 3c94baa..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: kernel alien.syntax math io.unix.files system
-unix.stat accessors combinators calendar.unix ;
-IN: io.unix.files.bsd
-
-TUPLE: bsd-file-info < unix-file-info birth-time flags gen ;
-
-M: bsd new-file-info ( -- class ) bsd-file-info new ;
-
-M: bsd stat>file-info ( stat -- file-info )
-    [ call-next-method ] keep
-    {
-        [ stat-st_flags >>flags ]
-        [ stat-st_gen >>gen ]
-        [
-            stat-st_birthtimespec timespec>unix-time
-            >>birth-time
-        ]
-    } cleave ;
diff --git a/basis/io/unix/files/bsd/tags.txt b/basis/io/unix/files/bsd/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/files/files-docs.factor b/basis/io/unix/files/files-docs.factor
deleted file mode 100644 (file)
index 3798380..0000000
+++ /dev/null
@@ -1,277 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: classes help.markup help.syntax io.streams.string
-strings math calendar io.files ;
-IN: io.unix.files
-
-HELP: file-group-id
-{ $values
-     { "path" "a pathname string" }
-     { "gid" integer } }
-{ $description "Returns the group id for a given file." } ;
-
-HELP: file-group-name
-{ $values
-     { "path" "a pathname string" }
-     { "string" string } }
-{ $description "Returns the group name for a given file." } ;
-
-HELP: file-permissions
-{ $values
-     { "path" "a pathname string" }
-     { "n" integer } }
-{ $description "Returns the Unix file permissions for a given file." } ;
-
-HELP: file-username
-{ $values
-     { "path" "a pathname string" }
-     { "string" string } }
-{ $description "Returns the username for a given file." } ;
-
-HELP: file-user-id
-{ $values
-     { "path" "a pathname string" }
-     { "uid" integer } }
-{ $description "Returns the user id for a given file." } ;
-
-HELP: group-execute?
-{ $values
-     { "obj" "a pathname string or an integer" }
-     { "?" "a boolean" } }
-{ $description "Tests whether the " { $snippet "group execute" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
-
-HELP: group-read?
-{ $values
-     { "obj" "a pathname string, file-info object, or an integer" }
-     { "?" "a boolean" } }
-{ $description "Tests whether the " { $snippet "group read" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
-
-HELP: group-write?
-{ $values
-     { "obj" "a pathname string, file-info object, or an integer" }
-     { "?" "a boolean" } }
-{ $description "Tests whether the " { $snippet "group write" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
-
-HELP: other-execute?
-{ $values
-     { "obj" "a pathname string, file-info object, or an integer" }
-     { "?" "a boolean" } }
-{ $description "Tests whether the " { $snippet "other execute" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
-
-HELP: other-read?
-{ $values
-     { "obj" "a pathname string, file-info object, or an integer" }
-     { "?" "a boolean" } }
-{ $description "Tests whether the " { $snippet "other read" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
-
-HELP: other-write?
-{ $values
-     { "obj" "a pathname string, file-info object, or an integer" }
-     { "?" "a boolean" } }
-{ $description "Tests whether the " { $snippet "other write" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
-
-HELP: set-file-access-time
-{ $values
-     { "path" "a pathname string" } { "timestamp" timestamp } }
-{ $description "Sets a file's last access timestamp." } ;
-
-HELP: set-file-group
-{ $values
-     { "path" "a pathname string" } { "string/id" "a string or a group id" } }
-{ $description "Sets a file's group id from the given group id or group name." } ;
-
-HELP: set-file-ids
-{ $values
-     { "path" "a pathname string" } { "uid" integer } { "gid" integer } }
-{ $description "Sets the user id and group id of a file with a single library call." } ;
-
-HELP: set-file-permissions
-{ $values
-     { "path" "a pathname string" } { "n" "an integer, interepreted as a string of bits" } }
-{ $description "Sets the file permissions for a given file with the supplied Unix permissions integer. Supplying an octal number with " { $link POSTPONE: OCT: } " is recommended." }
-{ $examples "Using the tradidional octal value:"
-    { $unchecked-example "USING: io.unix.files kernel ;"
-        "\"resource:license.txt\" OCT: 755 set-file-permissions"
-        ""
-    }
-    "Higher-level, setting named bits:"
-    { $unchecked-example "USING: io.unix.files kernel math.bitwise ;"
-    "\"resource:license.txt\""
-    "{ USER-ALL GROUP-READ GROUP-EXECUTE OTHER-READ OTHER-EXECUTE }"
-    "flags set-file-permissions"
-    "" }
-} ;
-
-HELP: set-file-times
-{ $values
-     { "path" "a pathname string" } { "timestamps" "an array of two timestamps" } }
-{ $description "Sets the access and write timestamps for a file as provided in the input array. A value of " { $link f } " provided for either of the timestamps will not change that timestamp." } ;
-
-HELP: set-file-user
-{ $values
-     { "path" "a pathname string" } { "string/id" "a string or a user id" } }
-{ $description "Sets a file's user id from the given user id or username." } ;
-
-HELP: set-file-modified-time
-{ $values
-     { "path" "a pathname string" } { "timestamp" timestamp } }
-{ $description "Sets a file's last modified timestamp, or write timestamp." } ;
-
-HELP: set-gid
-{ $values
-     { "path" "a pathname string" } { "?" "a boolean" } }
-{ $description "Sets the " { $snippet "gid" } " bit of a file to true or false." } ;
-
-HELP: gid?
-{ $values
-     { "obj" "a pathname string, file-info object, or an integer" }
-     { "?" "a boolean" } }
-{ $description "Tests whether the " { $snippet "gid" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
-
-HELP: set-group-execute
-{ $values
-     { "path" "a pathname string" } { "?" "a boolean" } }
-{ $description "Sets the " { $snippet "group execute" } " bit of a file to true or false." } ;
-
-HELP: set-group-read
-{ $values
-     { "path" "a pathname string" } { "?" "a boolean" } }
-{ $description "Sets the " { $snippet "group read" } " bit of a file to true or false." } ;
-
-HELP: set-group-write
-{ $values
-     { "path" "a pathname string" } { "?" "a boolean" } }
-{ $description "Sets the " { $snippet "group write" } " bit of a file to true or false." } ;
-
-HELP: set-other-execute
-{ $values
-     { "path" "a pathname string" } { "?" "a boolean" } }
-{ $description "Sets the " { $snippet "other execute" } " bit of a file to true or false." } ;
-
-HELP: set-other-read
-{ $values
-     { "path" "a pathname string" } { "?" "a boolean" } }
-{ $description "Sets the " { $snippet "other read" } " bit of a file to true or false." } ;
-
-HELP: set-other-write
-{ $values
-     { "path" "a pathname string" } { "?" "a boolean" } }
-{ $description "Sets the " { $snippet "other execute" } " bit of a file to true or false." } ;
-
-HELP: set-sticky
-{ $values
-     { "path" "a pathname string" } { "?" "a boolean" } }
-{ $description "Sets the " { $snippet "sticky" } " bit of a file to true or false." } ;
-
-HELP: sticky?
-{ $values
-     { "obj" "a pathname string, file-info object, or an integer" }
-     { "?" "a boolean" } }
-{ $description "Tests whether the " { $snippet "sticky" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
-
-HELP: set-uid
-{ $values
-     { "path" "a pathname string" } { "?" "a boolean" } }
-{ $description "Sets the " { $snippet "uid" } " bit of a file to true or false." } ;
-
-HELP: uid?
-{ $values
-     { "obj" "a pathname string, file-info object, or an integer" }
-     { "?" "a boolean" } }
-{ $description "Tests whether the " { $snippet "uid" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
-
-HELP: set-user-execute
-{ $values
-     { "path" "a pathname string" } { "?" "a boolean" } }
-{ $description "Sets the " { $snippet "user execute" } " bit of a file to true or false." } ;
-
-HELP: set-user-read
-{ $values
-     { "path" "a pathname string" } { "?" "a boolean" } }
-{ $description "Sets the " { $snippet "user read" } " bit of a file to true or false." } ;
-
-HELP: set-user-write
-{ $values
-     { "path" "a pathname string" } { "?" "a boolean" } }
-{ $description "Sets the " { $snippet "user write" } " bit of a file to true or false." } ;
-
-HELP: user-execute?
-{ $values
-     { "obj" "a pathname string, file-info object, or an integer" }
-     { "?" "a boolean" } }
-{ $description "Tests whether the " { $snippet "user execute" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
-
-HELP: user-read?
-{ $values
-     { "obj" "a pathname string, file-info object, or an integer" }
-     { "?" "a boolean" } }
-{ $description "Tests whether the " { $snippet "user read" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
-
-HELP: user-write?
-{ $values
-     { "obj" "a pathname string, file-info object, or an integer" }
-     { "?" "a boolean" } }
-{ $description "Tests whether the " { $snippet "user write" } " bit is set on a file, " { $link file-info } ", or an integer." } ;
-
-ARTICLE: "unix-file-permissions" "Unix file permissions"
-"Reading all file permissions:"
-{ $subsection file-permissions }
-"Reading individual file permissions:"
-{ $subsection uid? }
-{ $subsection gid? }
-{ $subsection sticky? }
-{ $subsection user-read? }
-{ $subsection user-write? }
-{ $subsection user-execute? }
-{ $subsection group-read? }
-{ $subsection group-write? }
-{ $subsection group-execute? }
-{ $subsection other-read? }
-{ $subsection other-write? }
-{ $subsection other-execute? }
-"Writing all file permissions:"
-{ $subsection set-file-permissions }
-"Writing individual file permissions:"
-{ $subsection set-uid }
-{ $subsection set-gid }
-{ $subsection set-sticky }
-{ $subsection set-user-read }
-{ $subsection set-user-write }
-{ $subsection set-user-execute }
-{ $subsection set-group-read }
-{ $subsection set-group-write }
-{ $subsection set-group-execute }
-{ $subsection set-other-read }
-{ $subsection set-other-write }
-{ $subsection set-other-execute } ;
-
-ARTICLE: "unix-file-timestamps" "Unix file timestamps"
-"To read file times, use the accessors on the object returned by the " { $link file-info } " word." $nl
-"Setting multiple file times:"
-{ $subsection set-file-times }
-"Setting just the last access time:"
-{ $subsection set-file-access-time }
-"Setting just the last modified time:"
-{ $subsection set-file-modified-time } ;
-
-
-ARTICLE: "unix-file-ids" "Unix file user and group ids"
-"Reading file user data:"
-{ $subsection file-user-id }
-{ $subsection file-username }
-"Setting file user data:"
-{ $subsection set-file-user }
-"Reading file group data:"
-{ $subsection file-group-id }
-{ $subsection file-group-name }
-"Setting file group data:"
-{ $subsection set-file-group } ;
-
-
-ARTICLE: "io.unix.files" "Unix file attributes"
-"The " { $vocab-link "io.unix.files" } " vocabulary implements the Unix backend for opening files and provides a high-level way to set permissions, timestamps, and user and group ids for files."
-{ $subsection "unix-file-permissions" }
-{ $subsection "unix-file-timestamps" }
-{ $subsection "unix-file-ids" } ;
-
-ABOUT: "io.unix.files"
diff --git a/basis/io/unix/files/files-tests.factor b/basis/io/unix/files/files-tests.factor
deleted file mode 100644 (file)
index 78a80ad..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-USING: tools.test io.files continuations kernel io.unix.files
-math.bitwise calendar accessors math.functions math unix.users
-unix.groups arrays sequences ;
-IN: io.unix.files.tests
-
-[ "/usr/libexec/" ] [ "/usr/libexec/awk/" parent-directory ] unit-test
-[ "/etc/" ] [ "/etc/passwd" parent-directory ] unit-test
-[ "/" ] [ "/etc/" parent-directory ] unit-test
-[ "/" ] [ "/etc" parent-directory ] unit-test
-[ "/" ] [ "/" parent-directory ] unit-test
-
-[ f ] [ "" root-directory? ] unit-test
-[ t ] [ "/" root-directory? ] unit-test
-[ t ] [ "//" root-directory? ] unit-test
-[ t ] [ "///////" root-directory? ] unit-test
-
-[ "/" ] [ "/" file-name ] unit-test
-[ "///" ] [ "///" file-name ] unit-test
-
-[ "/" ] [ "/" "../.." append-path ] unit-test
-[ "/" ] [ "/" "../../" append-path ] unit-test
-[ "/lib" ] [ "/" "../lib" append-path ] unit-test
-[ "/lib/" ] [ "/" "../lib/" append-path ] unit-test
-[ "/lib" ] [ "/" "../../lib" append-path ] unit-test
-[ "/lib/" ] [ "/" "../../lib/" append-path ] unit-test
-
-[ "/lib" ] [ "/usr/" "/lib" append-path ] unit-test
-[ "/lib/" ] [ "/usr/" "/lib/" append-path ] unit-test
-[ "/lib/bux" ] [ "/usr" "/lib/bux" append-path ] unit-test
-[ "/lib/bux/" ] [ "/usr" "/lib/bux/" append-path ] unit-test
-[ t ] [ "/foo" absolute-path? ] unit-test
-
-: test-file ( -- path )
-    "permissions" temp-file ;
-
-: prepare-test-file ( -- )
-    [ test-file delete-file ] ignore-errors
-    test-file touch-file ;
-
-: perms ( -- n )
-    test-file file-permissions OCT: 7777 mask ;
-
-prepare-test-file
-
-[ t ]
-[ test-file { USER-ALL GROUP-ALL OTHER-ALL } flags set-file-permissions perms OCT: 777 = ] unit-test
-
-[ t ] [ test-file user-read? ] unit-test
-[ t ] [ test-file user-write? ] unit-test
-[ t ] [ test-file user-execute? ] unit-test
-[ t ] [ test-file group-read? ] unit-test
-[ t ] [ test-file group-write? ] unit-test
-[ t ] [ test-file group-execute? ] unit-test
-[ t ] [ test-file other-read? ] unit-test
-[ t ] [ test-file other-write? ] unit-test
-[ t ] [ test-file other-execute? ] unit-test
-
-[ t ] [ test-file f set-other-execute perms OCT: 776 = ] unit-test
-[ f ] [ test-file file-info other-execute? ] unit-test
-
-[ t ] [ test-file f set-other-write perms OCT: 774 = ] unit-test
-[ f ] [ test-file file-info other-write? ] unit-test
-
-[ t ] [ test-file f set-other-read perms OCT: 770 = ] unit-test
-[ f ] [ test-file file-info other-read? ] unit-test
-
-[ t ] [ test-file f set-group-execute perms OCT: 760 = ] unit-test
-[ f ] [ test-file file-info group-execute? ] unit-test
-
-[ t ] [ test-file f set-group-write perms OCT: 740 = ] unit-test
-[ f ] [ test-file file-info group-write? ] unit-test
-
-[ t ] [ test-file f set-group-read perms OCT: 700 = ] unit-test
-[ f ] [ test-file file-info group-read? ] unit-test
-
-[ t ] [ test-file f set-user-execute perms OCT: 600 = ] unit-test
-[ f ] [ test-file file-info other-execute? ] unit-test
-
-[ t ] [ test-file f set-user-write perms OCT: 400 = ] unit-test
-[ f ] [ test-file file-info other-write? ] unit-test
-
-[ t ] [ test-file f set-user-read perms OCT: 000 = ] unit-test
-[ f ] [ test-file file-info other-read? ] unit-test
-
-[ t ]
-[ test-file { USER-ALL GROUP-ALL OTHER-EXECUTE } flags set-file-permissions perms OCT: 771 = ] unit-test
-
-prepare-test-file
-
-[ t ]
-[
-    test-file now
-    [ set-file-access-time ] 2keep
-    [ file-info accessed>> ]
-    [ [ [ truncate >integer ] change-second ] bi@ ] bi* =
-] unit-test
-
-[ t ]
-[
-    test-file now
-    [ set-file-modified-time ] 2keep
-    [ file-info modified>> ]
-    [ [ [ truncate >integer ] change-second ] bi@ ] bi* =
-] unit-test
-
-[ t ]
-[
-    test-file now [ dup 2array set-file-times ] 2keep
-    [ file-info [ modified>> ] [ accessed>> ] bi ] dip
-    3array
-    [ [ truncate >integer ] change-second ] map all-equal?
-] unit-test
-
-[ ] [ test-file f now 2array set-file-times ] unit-test
-[ ] [ test-file now f 2array set-file-times ] unit-test
-[ ] [ test-file f f 2array set-file-times ] unit-test
-
-
-[ ] [ test-file real-username set-file-user ] unit-test
-[ ] [ test-file real-user-id set-file-user ] unit-test
-[ ] [ test-file real-group-name set-file-group ] unit-test
-[ ] [ test-file real-group-id set-file-group ] unit-test
-
-[ t ] [ test-file file-username real-username = ] unit-test
-[ t ] [ test-file file-group-name real-group-name = ] unit-test
-
-[ ]
-[ test-file real-user-id real-group-id set-file-ids ] unit-test
-
-[ ]
-[ test-file f real-group-id set-file-ids ] unit-test
-
-[ ]
-[ test-file real-user-id f set-file-ids ] unit-test
-
-[ ]
-[ test-file f f set-file-ids ] unit-test
-
-[ t ] [ OCT: 4000 uid? ] unit-test
-[ t ] [ OCT: 2000 gid? ] unit-test
-[ t ] [ OCT: 1000 sticky? ] unit-test
-[ t ] [ OCT: 400 user-read? ] unit-test
-[ t ] [ OCT: 200 user-write? ] unit-test
-[ t ] [ OCT: 100 user-execute? ] unit-test
-[ t ] [ OCT: 040 group-read? ] unit-test
-[ t ] [ OCT: 020 group-write? ] unit-test
-[ t ] [ OCT: 010 group-execute? ] unit-test
-[ t ] [ OCT: 004 other-read? ] unit-test
-[ t ] [ OCT: 002 other-write? ] unit-test
-[ t ] [ OCT: 001 other-execute? ] unit-test
-
-[ f ] [ 0 uid? ] unit-test
-[ f ] [ 0 gid? ] unit-test
-[ f ] [ 0 sticky? ] unit-test
-[ f ] [ 0 user-read? ] unit-test
-[ f ] [ 0 user-write? ] unit-test
-[ f ] [ 0 user-execute? ] unit-test
-[ f ] [ 0 group-read? ] unit-test
-[ f ] [ 0 group-write? ] unit-test
-[ f ] [ 0 group-execute? ] unit-test
-[ f ] [ 0 other-read? ] unit-test
-[ f ] [ 0 other-write? ] unit-test
-[ f ] [ 0 other-execute? ] unit-test
diff --git a/basis/io/unix/files/files.factor b/basis/io/unix/files/files.factor
deleted file mode 100644 (file)
index 1fc5fe9..0000000
+++ /dev/null
@@ -1,371 +0,0 @@
-! Copyright (C) 2005, 2008 Slava Pestov, Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: io.backend io.ports io.unix.backend io.files io
-unix unix.stat unix.time kernel math continuations
-math.bitwise byte-arrays alien combinators calendar
-io.encodings.binary accessors sequences strings system
-io.files.private destructors vocabs.loader calendar.unix
-unix.stat alien.c-types arrays unix.users unix.groups
-environment fry io.encodings.utf8 alien.strings
-combinators.short-circuit ;
-IN: io.unix.files
-
-M: unix cwd ( -- path )
-    MAXPATHLEN [ <byte-array> ] keep getcwd
-    [ (io-error) ] unless* ;
-
-M: unix cd ( path -- ) [ chdir ] unix-system-call drop ;
-
-: read-flags O_RDONLY ; inline
-
-: open-read ( path -- fd ) O_RDONLY file-mode open-file ;
-
-M: unix (file-reader) ( path -- stream )
-    open-read <fd> init-fd <input-port> ;
-
-: write-flags { O_WRONLY O_CREAT O_TRUNC } flags ; inline
-
-: open-write ( path -- fd )
-    write-flags file-mode open-file ;
-
-M: unix (file-writer) ( path -- stream )
-    open-write <fd> init-fd <output-port> ;
-
-: append-flags { O_WRONLY O_APPEND O_CREAT } flags ; inline
-
-: open-append ( path -- fd )
-    [
-        append-flags file-mode open-file |dispose
-        dup 0 SEEK_END lseek io-error
-    ] with-destructors ;
-
-M: unix (file-appender) ( path -- stream )
-    open-append <fd> init-fd <output-port> ;
-
-: touch-mode ( -- n )
-    { O_WRONLY O_APPEND O_CREAT O_EXCL } flags ; foldable
-
-M: unix touch-file ( path -- )
-    normalize-path
-    dup exists? [ touch ] [
-        touch-mode file-mode open-file close-file
-    ] if ;
-
-M: unix move-file ( from to -- )
-    [ normalize-path ] bi@ rename io-error ;
-
-M: unix delete-file ( path -- ) normalize-path unlink-file ;
-
-M: unix make-directory ( path -- )
-    normalize-path OCT: 777 mkdir io-error ;
-
-M: unix delete-directory ( path -- )
-    normalize-path rmdir io-error ;
-
-: (copy-file) ( from to -- )
-    dup parent-directory make-directories
-    binary <file-writer> [
-        swap binary <file-reader> [
-            swap stream-copy
-        ] with-disposal
-    ] with-disposal ;
-
-M: unix copy-file ( from to -- )
-    [ normalize-path ] bi@
-    [ (copy-file) ]
-    [ swap file-info permissions>> chmod io-error ]
-    2bi ;
-
-TUPLE: unix-file-system-info < file-system-info
-block-size preferred-block-size
-blocks blocks-free blocks-available
-files files-free files-available
-name-max flags id ;
-
-HOOK: new-file-system-info os ( --  file-system-info )
-
-M: unix new-file-system-info ( -- ) unix-file-system-info new ;
-
-HOOK: file-system-statfs os ( path -- statfs )
-
-M: unix file-system-statfs drop f ;
-
-HOOK: file-system-statvfs os ( path -- statvfs )
-
-M: unix file-system-statvfs drop f ;
-
-HOOK: statfs>file-system-info os ( file-system-info statfs -- file-system-info' )
-
-M: unix statfs>file-system-info drop ;
-
-HOOK: statvfs>file-system-info os ( file-system-info statvfs -- file-system-info' )
-
-M: unix statvfs>file-system-info drop ;
-
-: file-system-calculations ( file-system-info -- file-system-info' )
-    {
-        [ dup [ blocks-available>> ] [ block-size>> ] bi * >>available-space drop ]
-        [ dup [ blocks-free>> ] [ block-size>> ] bi * >>free-space drop ]
-        [ dup [ blocks>> ] [ block-size>> ] bi * >>total-space drop ]
-        [ dup [ total-space>> ] [ free-space>> ] bi - >>used-space drop ]
-        [ ]
-    } cleave ;
-
-M: unix file-system-info
-    normalize-path
-    [ new-file-system-info ] dip
-    [ file-system-statfs statfs>file-system-info ]
-    [ file-system-statvfs statvfs>file-system-info ] bi
-    file-system-calculations ;
-
-os {
-    { linux   [ "io.unix.files.linux"   require ] }
-    { macosx  [ "io.unix.files.macosx"  require ] }
-    { freebsd [ "io.unix.files.freebsd" require ] }
-    { netbsd  [ "io.unix.files.netbsd"  require ] }
-    { openbsd [ "io.unix.files.openbsd" require ] }
-} case
-
-TUPLE: unix-file-info < file-info uid gid dev ino
-nlink rdev blocks blocksize ;
-
-HOOK: new-file-info os ( -- file-info )
-
-HOOK: stat>file-info os ( stat -- file-info )
-
-HOOK: stat>type os ( stat -- file-info )
-
-M: unix file-info ( path -- info )
-    normalize-path file-status stat>file-info ;
-
-M: unix link-info ( path -- info )
-    normalize-path link-status stat>file-info ;
-
-M: unix make-link ( path1 path2 -- )
-    normalize-path symlink io-error ;
-
-M: unix read-link ( path -- path' )
-   normalize-path read-symbolic-link ;
-
-M: unix new-file-info ( -- class ) unix-file-info new ;
-
-M: unix stat>file-info ( stat -- file-info )
-    [ new-file-info ] dip
-    {
-        [ stat>type >>type ]
-        [ stat-st_size >>size ]
-        [ stat-st_mode >>permissions ]
-        [ stat-st_ctimespec timespec>unix-time >>created ]
-        [ stat-st_mtimespec timespec>unix-time >>modified ]
-        [ stat-st_atimespec timespec>unix-time >>accessed ]
-        [ stat-st_uid >>uid ]
-        [ stat-st_gid >>gid ]
-        [ stat-st_dev >>dev ]
-        [ stat-st_ino >>ino ]
-        [ stat-st_nlink >>nlink ]
-        [ stat-st_rdev >>rdev ]
-        [ stat-st_blocks >>blocks ]
-        [ stat-st_blksize >>blocksize ]
-    } cleave ;
-
-: n>file-type ( n -- type )
-    S_IFMT bitand {
-        { S_IFREG [ +regular-file+ ] }
-        { S_IFDIR [ +directory+ ] }
-        { S_IFCHR [ +character-device+ ] }
-        { S_IFBLK [ +block-device+ ] }
-        { S_IFIFO [ +fifo+ ] }
-        { S_IFLNK [ +symbolic-link+ ] }
-        { S_IFSOCK [ +socket+ ] }
-        [ drop +unknown+ ]
-    } case ;
-
-M: unix stat>type ( stat -- type )
-    stat-st_mode n>file-type ;
-
-! Linux has no extra fields in its stat struct
-os {
-    { macosx  [ "io.unix.files.bsd" require ] }
-    { netbsd  [ "io.unix.files.bsd" require ] }
-    { openbsd  [ "io.unix.files.bsd" require ] }
-    { freebsd  [ "io.unix.files.bsd" require ] }
-    { linux [ ] }
-} case
-
-: with-unix-directory ( path quot -- )
-    [ opendir dup [ (io-error) ] unless ] dip
-    dupd curry swap '[ _ closedir io-error ] [ ] cleanup ; inline
-
-: find-next-file ( DIR* -- byte-array )
-    "dirent" <c-object>
-    f <void*>
-    [ readdir_r 0 = [ (io-error) ] unless ] 2keep
-    *void* [ drop f ] unless ;
-
-M: unix >directory-entry ( byte-array -- directory-entry )
-    [ dirent-d_name utf8 alien>string ]
-    [ dirent-d_type dirent-type>file-type ] bi directory-entry boa ;
-
-M: unix (directory-entries) ( path -- seq )
-    [
-        '[ _ find-next-file dup ]
-        [ >directory-entry ]
-        [ drop ] produce
-    ] with-unix-directory ;
-
-<PRIVATE
-
-: stat-mode ( path -- mode )
-    normalize-path file-status stat-st_mode ;
-
-: chmod-set-bit ( path mask ? -- )
-    [ dup stat-mode ] 2dip
-    [ bitor ] [ unmask ] if chmod io-error ;
-
-GENERIC# file-mode? 1 ( obj mask -- ? )
-
-M: integer file-mode? mask? ;
-M: string file-mode? [ stat-mode ] dip mask? ;
-M: file-info file-mode? [ permissions>> ] dip mask? ;
-
-PRIVATE>
-
-: ch>file-type ( ch -- type )
-    {
-        { CHAR: b [ +block-device+ ] }
-        { CHAR: c [ +character-device+ ] }
-        { CHAR: d [ +directory+ ] }
-        { CHAR: l [ +symbolic-link+ ] }
-        { CHAR: s [ +socket+ ] }
-        { CHAR: p [ +fifo+ ] }
-        { CHAR: - [ +regular-file+ ] }
-        [ drop +unknown+ ]
-    } case ;
-
-: file-type>ch ( type -- string )
-    {
-        { +block-device+ [ CHAR: b ] }
-        { +character-device+ [ CHAR: c ] }
-        { +directory+ [ CHAR: d ] }
-        { +symbolic-link+ [ CHAR: l ] }
-        { +socket+ [ CHAR: s ] }
-        { +fifo+ [ CHAR: p ] }
-        { +regular-file+ [ CHAR: - ] }
-        [ drop CHAR: - ]
-    } case ;
-
-: UID           OCT: 0004000 ; inline
-: GID           OCT: 0002000 ; inline
-: STICKY        OCT: 0001000 ; inline
-: USER-ALL      OCT: 0000700 ; inline
-: USER-READ     OCT: 0000400 ; inline
-: USER-WRITE    OCT: 0000200 ; inline
-: USER-EXECUTE  OCT: 0000100 ; inline
-: GROUP-ALL     OCT: 0000070 ; inline
-: GROUP-READ    OCT: 0000040 ; inline
-: GROUP-WRITE   OCT: 0000020 ; inline
-: GROUP-EXECUTE OCT: 0000010 ; inline
-: OTHER-ALL     OCT: 0000007 ; inline
-: OTHER-READ    OCT: 0000004 ; inline
-: OTHER-WRITE   OCT: 0000002 ; inline
-: OTHER-EXECUTE OCT: 0000001 ; inline
-
-: uid? ( obj -- ? ) UID file-mode? ;
-: gid? ( obj -- ? ) GID file-mode? ;
-: sticky? ( obj -- ? ) STICKY file-mode? ;
-: user-read? ( obj -- ? ) USER-READ file-mode? ;
-: user-write? ( obj -- ? ) USER-WRITE file-mode? ;
-: user-execute? ( obj -- ? ) USER-EXECUTE file-mode? ;
-: group-read? ( obj -- ? ) GROUP-READ file-mode? ;
-: group-write? ( obj -- ? ) GROUP-WRITE file-mode? ;
-: group-execute? ( obj -- ? ) GROUP-EXECUTE file-mode? ;
-: other-read? ( obj -- ? ) OTHER-READ file-mode? ;
-: other-write? ( obj -- ? ) OTHER-WRITE file-mode? ;
-: other-execute? ( obj -- ? ) OTHER-EXECUTE file-mode? ;
-
-: any-read? ( obj -- ? )
-    { [ user-read? ] [ group-read? ] [ other-read? ] } 1|| ;
-
-: any-write? ( obj -- ? )
-    { [ user-write? ] [ group-write? ] [ other-write? ] } 1|| ;
-
-: any-execute? ( obj -- ? )
-    { [ user-execute? ] [ group-execute? ] [ other-execute? ] } 1|| ;
-
-: set-uid ( path ? -- ) UID swap chmod-set-bit ;
-: set-gid ( path ? -- ) GID swap chmod-set-bit ;
-: set-sticky ( path ? -- ) STICKY swap chmod-set-bit ;
-: set-user-read ( path ? -- ) USER-READ swap chmod-set-bit ;
-: set-user-write ( path ? -- ) USER-WRITE swap chmod-set-bit ;
-: set-user-execute ( path ? -- ) USER-EXECUTE swap chmod-set-bit ;
-: set-group-read ( path ? -- ) GROUP-READ swap chmod-set-bit ;
-: set-group-write ( path ? -- ) GROUP-WRITE swap chmod-set-bit ;
-: set-group-execute ( path ? -- ) GROUP-EXECUTE swap chmod-set-bit ;
-: set-other-read ( path ? -- ) OTHER-READ swap chmod-set-bit ;
-: set-other-write ( path ? -- ) OTHER-WRITE swap chmod-set-bit ;
-: set-other-execute ( path ? -- ) OTHER-EXECUTE swap chmod-set-bit ;
-
-: set-file-permissions ( path n -- )
-    [ normalize-path ] dip chmod io-error ;
-
-: file-permissions ( path -- n )
-    normalize-path file-info permissions>> ;
-
-<PRIVATE
-
-: make-timeval-array ( array -- byte-array )
-    [ [ "timeval" <c-object> ] unless* ] map concat ;
-
-: timestamp>timeval ( timestamp -- timeval )
-    unix-1970 time- duration>microseconds make-timeval ;
-
-: timestamps>byte-array ( timestamps -- byte-array )
-    [ dup [ timestamp>timeval ] when ] map make-timeval-array ;
-
-PRIVATE>
-
-: set-file-times ( path timestamps -- )
-    #! set access, write
-    [ normalize-path ] dip
-    timestamps>byte-array utimes io-error ;
-
-: set-file-access-time ( path timestamp -- )
-    f 2array set-file-times ;
-
-: set-file-modified-time ( path timestamp -- )
-    f swap 2array set-file-times ;
-
-: set-file-ids ( path uid gid -- )
-    [ normalize-path ] 2dip
-    [ [ -1 ] unless* ] bi@ chown io-error ;
-
-GENERIC: set-file-user ( path string/id -- )
-
-GENERIC: set-file-group ( path string/id -- )
-
-M: integer set-file-user ( path uid -- )
-    f set-file-ids ;
-
-M: string set-file-user ( path string -- )
-    user-id f set-file-ids ;
-
-M: integer set-file-group ( path gid -- )
-    f swap set-file-ids ;
-
-M: string set-file-group ( path string -- )
-    group-id
-    f swap set-file-ids ;
-
-: file-user-id ( path -- uid )
-    normalize-path file-info uid>> ;
-
-: file-username ( path -- string )
-    file-user-id username ;
-
-: file-group-id ( path -- gid )
-    normalize-path file-info gid>> ;
-
-: file-group-name ( path -- string )
-    file-group-id group-name ;
-
-M: unix home "HOME" os-env ;
diff --git a/basis/io/unix/files/freebsd/freebsd.factor b/basis/io/unix/files/freebsd/freebsd.factor
deleted file mode 100644 (file)
index eaf217a..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors alien.c-types alien.syntax combinators
-io.backend io.files io.unix.files kernel math system unix
-unix.statfs.freebsd unix.statvfs.freebsd unix.getfsstat.freebsd
-sequences grouping alien.strings io.encodings.utf8
-specialized-arrays.direct.uint arrays ;
-IN: io.unix.files.freebsd
-
-TUPLE: freebsd-file-system-info < unix-file-system-info
-version io-size owner syncreads syncwrites asyncreads asyncwrites ;
-
-M: freebsd new-file-system-info freebsd-file-system-info new ;
-
-M: freebsd file-system-statfs ( path -- byte-array )
-    "statfs" <c-object> tuck statfs io-error ;
-
-M: freebsd statfs>file-system-info ( file-system-info statvfs -- file-system-info )
-    {
-        [ statfs-f_version >>version ]
-        [ statfs-f_type >>type ]
-        [ statfs-f_flags >>flags ]
-        [ statfs-f_bsize >>block-size ]
-        [ statfs-f_iosize >>io-size ]
-        [ statfs-f_blocks >>blocks ]
-        [ statfs-f_bfree >>blocks-free ]
-        [ statfs-f_bavail >>blocks-available ]
-        [ statfs-f_files >>files ]
-        [ statfs-f_ffree >>files-free ]
-        [ statfs-f_syncwrites >>syncwrites ]
-        [ statfs-f_asyncwrites >>asyncwrites ]
-        [ statfs-f_syncreads >>syncreads ]
-        [ statfs-f_asyncreads >>asyncreads ]
-        [ statfs-f_namemax >>name-max ]
-        [ statfs-f_owner >>owner ]
-        [ statfs-f_fsid 2 <direct-uint-array> >array >>id ]
-        [ statfs-f_fstypename utf8 alien>string >>type ]
-        [ statfs-f_mntfromname utf8 alien>string >>device-name ]
-        [ statfs-f_mntonname utf8 alien>string >>mount-point ]
-    } cleave ;
-
-M: freebsd file-system-statvfs ( path -- byte-array )
-    "statvfs" <c-object> tuck statvfs io-error ;
-
-M: freebsd statvfs>file-system-info ( file-system-info statvfs -- file-system-info )
-    {
-        [ statvfs-f_favail >>files-available ]
-        [ statvfs-f_frsize >>preferred-block-size ]
-    } cleave ;
-
-M: freebsd file-systems ( -- array )
-    f 0 0 getfsstat dup io-error
-    "statfs" <c-array> dup dup length 0 getfsstat io-error
-    "statfs" heap-size group
-    [ statfs-f_mntonname alien>native-string file-system-info ] map ;
diff --git a/basis/io/unix/files/freebsd/tags.txt b/basis/io/unix/files/freebsd/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/files/linux/linux.factor b/basis/io/unix/files/linux/linux.factor
deleted file mode 100644 (file)
index c30855c..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors alien.c-types alien.syntax combinators csv
-io.backend io.encodings.utf8 io.files io.streams.string
-io.unix.files kernel math.order namespaces sequences sorting
-system unix unix.statfs.linux unix.statvfs.linux
-specialized-arrays.direct.uint arrays ;
-IN: io.unix.files.linux
-
-TUPLE: linux-file-system-info < unix-file-system-info
-namelen ;
-
-M: linux new-file-system-info linux-file-system-info new ;
-
-M: linux file-system-statfs ( path -- byte-array )
-    "statfs64" <c-object> tuck statfs64 io-error ;
-
-M: linux statfs>file-system-info ( struct -- statfs )
-    {
-        [ statfs64-f_type >>type ]
-        [ statfs64-f_bsize >>block-size ]
-        [ statfs64-f_blocks >>blocks ]
-        [ statfs64-f_bfree >>blocks-free ]
-        [ statfs64-f_bavail >>blocks-available ]
-        [ statfs64-f_files >>files ]
-        [ statfs64-f_ffree >>files-free ]
-        [ statfs64-f_fsid 2 <direct-uint-array> >array >>id ]
-        [ statfs64-f_namelen >>namelen ]
-        [ statfs64-f_frsize >>preferred-block-size ]
-        ! [ statfs64-f_spare >>spare ]
-    } cleave ;
-
-M: linux file-system-statvfs ( path -- byte-array )
-    "statvfs64" <c-object> tuck statvfs64 io-error ;
-
-M: linux statvfs>file-system-info ( struct -- statfs )
-    {
-        [ statvfs64-f_flag >>flags ]
-        [ statvfs64-f_namemax >>name-max ]
-    } cleave ;
-
-TUPLE: mtab-entry file-system-name mount-point type options
-frequency pass-number ;
-
-: mtab-csv>mtab-entry ( csv -- mtab-entry )
-    [ mtab-entry new ] dip
-    {
-        [ first >>file-system-name ]
-        [ second >>mount-point ]
-        [ third >>type ]
-        [ fourth <string-reader> csv first >>options ]
-        [ 4 swap nth >>frequency ]
-        [ 5 swap nth >>pass-number ]
-    } cleave ;
-
-: parse-mtab ( -- array )
-    [
-        "/etc/mtab" utf8 <file-reader>
-        CHAR: \s delimiter set csv
-    ] with-scope
-    [ mtab-csv>mtab-entry ] map ;
-
-M: linux file-systems
-    parse-mtab [
-        [ mount-point>> file-system-info ] keep
-        {
-            [ file-system-name>> >>device-name ]
-            [ mount-point>> >>mount-point ]
-            [ type>> >>type ]
-        } cleave
-    ] map ;
-
-ERROR: file-system-not-found ;
-
-M: linux file-system-info ( path -- )
-    normalize-path
-    [
-        [ new-file-system-info ] dip
-        [ file-system-statfs statfs>file-system-info ]
-        [ file-system-statvfs statvfs>file-system-info ] bi
-        file-system-calculations
-    ] keep
-    
-    parse-mtab [ [ mount-point>> ] bi@ <=> invert-comparison ] sort
-    [ mount-point>> head? ] with find nip [ file-system-not-found ] unless*
-    {
-        [ file-system-name>> >>device-name drop ]
-        [ mount-point>> >>mount-point drop ]
-        [ type>> >>type ]
-    } 2cleave ;
diff --git a/basis/io/unix/files/linux/tags.txt b/basis/io/unix/files/linux/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/files/macosx/macosx.factor b/basis/io/unix/files/macosx/macosx.factor
deleted file mode 100644 (file)
index 397145c..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors alien.c-types alien.strings combinators
-grouping io.encodings.utf8 io.files kernel math sequences
-system unix io.unix.files specialized-arrays.direct.uint arrays
-unix.statfs.macosx unix.statvfs.macosx unix.getfsstat.macosx ;
-IN: io.unix.files.macosx
-
-TUPLE: macosx-file-system-info < unix-file-system-info
-io-size owner type-id filesystem-subtype ;
-
-M: macosx file-systems ( -- array )
-    f <void*> dup 0 getmntinfo64 dup io-error
-    [ *void* ] dip
-    "statfs64" heap-size [ * memory>byte-array ] keep group
-    [ statfs64-f_mntonname utf8 alien>string file-system-info ] map ;
-    ! [ [ new-file-system-info ] dip statfs>file-system-info ] map ;
-
-M: macosx new-file-system-info macosx-file-system-info new ;
-
-M: macosx file-system-statfs ( normalized-path -- statfs )
-    "statfs64" <c-object> tuck statfs64 io-error ;
-
-M: macosx file-system-statvfs ( normalized-path -- statvfs )
-    "statvfs" <c-object> tuck statvfs io-error ;
-
-M: macosx statfs>file-system-info ( file-system-info byte-array -- file-system-info' )
-    {
-        [ statfs64-f_bsize >>block-size ]
-        [ statfs64-f_iosize >>io-size ]
-        [ statfs64-f_blocks >>blocks ]
-        [ statfs64-f_bfree >>blocks-free ]
-        [ statfs64-f_bavail >>blocks-available ]
-        [ statfs64-f_files >>files ]
-        [ statfs64-f_ffree >>files-free ]
-        [ statfs64-f_fsid 2 <direct-uint-array> >array >>id ]
-        [ statfs64-f_owner >>owner ]
-        [ statfs64-f_type >>type-id ]
-        [ statfs64-f_flags >>flags ]
-        [ statfs64-f_fssubtype >>filesystem-subtype ]
-        [ statfs64-f_fstypename utf8 alien>string >>type ]
-        [ statfs64-f_mntonname utf8 alien>string >>mount-point ]
-        [ statfs64-f_mntfromname utf8 alien>string >>device-name ]
-    } cleave ;
-
-M: macosx statvfs>file-system-info ( file-system-info byte-array -- file-system-info' )
-    {
-        [ statvfs-f_frsize >>preferred-block-size ]
-        [ statvfs-f_favail >>files-available ]
-        [ statvfs-f_namemax >>name-max ]
-    } cleave ;
diff --git a/basis/io/unix/files/macosx/tags.txt b/basis/io/unix/files/macosx/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/files/netbsd/netbsd.factor b/basis/io/unix/files/netbsd/netbsd.factor
deleted file mode 100644 (file)
index 82ac3dc..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax kernel unix.stat math unix
-combinators system io.backend accessors alien.c-types
-io.encodings.utf8 alien.strings unix.types io.unix.files
-io.files unix.statvfs.netbsd unix.getfsstat.netbsd arrays
-grouping sequences io.encodings.utf8 specialized-arrays.direct.uint ;
-IN: io.unix.files.netbsd
-
-TUPLE: netbsd-file-system-info < unix-file-system-info
-blocks-reserved files-reserved
-owner io-size sync-reads sync-writes async-reads async-writes
-idx mount-from ;
-
-M: netbsd new-file-system-info netbsd-file-system-info new ;
-
-M: netbsd file-system-statvfs
-    "statvfs" <c-object> tuck statvfs io-error ;
-
-M: netbsd statvfs>file-system-info ( file-system-info statvfs -- file-system-info' )
-    {
-        [ statvfs-f_flag >>flags ]
-        [ statvfs-f_bsize >>block-size ]
-        [ statvfs-f_frsize >>preferred-block-size ]
-        [ statvfs-f_iosize >>io-size ]
-        [ statvfs-f_blocks >>blocks ]
-        [ statvfs-f_bfree >>blocks-free ]
-        [ statvfs-f_bavail >>blocks-available ]
-        [ statvfs-f_bresvd >>blocks-reserved ]
-        [ statvfs-f_files >>files ]
-        [ statvfs-f_ffree >>files-free ]
-        [ statvfs-f_favail >>files-available ]
-        [ statvfs-f_fresvd >>files-reserved ]
-        [ statvfs-f_syncreads >>sync-reads ]
-        [ statvfs-f_syncwrites >>sync-writes ]
-        [ statvfs-f_asyncreads >>async-reads ]
-        [ statvfs-f_asyncwrites >>async-writes ]
-        [ statvfs-f_fsidx 2 <direct-uint-array> >array >>idx ]
-        [ statvfs-f_fsid >>id ]
-        [ statvfs-f_namemax >>name-max ]
-        [ statvfs-f_owner >>owner ]
-        ! [ statvfs-f_spare >>spare ]
-        [ statvfs-f_fstypename utf8 alien>string >>type ]
-        [ statvfs-f_mntonname utf8 alien>string >>mount-point ]
-        [ statvfs-f_mntfromname utf8 alien>string >>device-name ]
-    } cleave ;
-
-M: netbsd file-systems ( -- array )
-    f 0 0 getvfsstat dup io-error
-    "statvfs" <c-array> dup dup length 0 getvfsstat io-error
-    "statvfs" heap-size group
-    [ statvfs-f_mntonname utf8 alien>string file-system-info ] map ;
diff --git a/basis/io/unix/files/netbsd/tags.txt b/basis/io/unix/files/netbsd/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/files/openbsd/openbsd.factor b/basis/io/unix/files/openbsd/openbsd.factor
deleted file mode 100644 (file)
index e5e18b2..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors alien.c-types alien.strings alien.syntax
-combinators io.backend io.files io.unix.files kernel math
-sequences system unix unix.getfsstat.openbsd grouping
-unix.statfs.openbsd unix.statvfs.openbsd unix.types
-specialized-arrays.direct.uint arrays ;
-IN: io.unix.files.openbsd
-
-TUPLE: freebsd-file-system-info < unix-file-system-info
-io-size sync-writes sync-reads async-writes async-reads 
-owner ;
-
-M: openbsd new-file-system-info freebsd-file-system-info new ;
-
-M: openbsd file-system-statfs
-    "statfs" <c-object> tuck statfs io-error ;
-
-M: openbsd statfs>file-system-info ( file-system-info statfs -- file-system-info' )
-    {
-        [ statfs-f_flags >>flags ]
-        [ statfs-f_bsize >>block-size ]
-        [ statfs-f_iosize >>io-size ]
-        [ statfs-f_blocks >>blocks ]
-        [ statfs-f_bfree >>blocks-free ]
-        [ statfs-f_bavail >>blocks-available ]
-        [ statfs-f_files >>files ]
-        [ statfs-f_ffree >>files-free ]
-        [ statfs-f_favail >>files-available ]
-        [ statfs-f_syncwrites >>sync-writes ]
-        [ statfs-f_syncreads >>sync-reads ]
-        [ statfs-f_asyncwrites >>async-writes ]
-        [ statfs-f_asyncreads >>async-reads ]
-        [ statfs-f_fsid 2 <direct-uint-array> >array >>id ]
-        [ statfs-f_namemax >>name-max ]
-        [ statfs-f_owner >>owner ]
-        ! [ statfs-f_spare >>spare ]
-        [ statfs-f_fstypename alien>native-string >>type ]
-        [ statfs-f_mntonname alien>native-string >>mount-point ]
-        [ statfs-f_mntfromname alien>native-string >>device-name ]
-    } cleave ;
-
-M: openbsd file-system-statvfs ( normalized-path -- statvfs )
-    "statvfs" <c-object> tuck statvfs io-error ;
-
-M: openbsd statvfs>file-system-info ( file-system-info statvfs -- file-system-info' )
-    {
-        [ statvfs-f_frsize >>preferred-block-size ]
-    } cleave ;
-
-M: openbsd file-systems ( -- seq )
-    f 0 0 getfsstat dup io-error
-    "statfs" <c-array> dup dup length 0 getfsstat io-error 
-    "statfs" heap-size group 
-    [ statfs-f_mntonname alien>native-string file-system-info ] map ;
diff --git a/basis/io/unix/files/openbsd/tags.txt b/basis/io/unix/files/openbsd/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/files/summary.txt b/basis/io/unix/files/summary.txt
deleted file mode 100644 (file)
index 57527be..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Implementation of reading and writing files on Unix-like systems
diff --git a/basis/io/unix/files/tags.txt b/basis/io/unix/files/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/files/unique/tags.txt b/basis/io/unix/files/unique/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/files/unique/unique.factor b/basis/io/unix/files/unique/unique.factor
deleted file mode 100644 (file)
index 24dcdcb..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: kernel io.ports io.unix.backend math.bitwise
-unix system io.files.unique ;
-IN: io.unix.files.unique
-
-: open-unique-flags ( -- flags )
-    { O_RDWR O_CREAT O_EXCL } flags ;
-
-M: unix touch-unique-file ( path -- )
-    open-unique-flags file-mode open-file close-file ;
-
-M: unix temporary-path ( -- path ) "/tmp" ;
diff --git a/basis/io/unix/freebsd/freebsd.factor b/basis/io/unix/freebsd/freebsd.factor
deleted file mode 100644 (file)
index 49fbc9a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USING: io.unix.bsd io.backend system ;
-
-freebsd set-io-backend
diff --git a/basis/io/unix/freebsd/tags.txt b/basis/io/unix/freebsd/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/kqueue/authors.txt b/basis/io/unix/kqueue/authors.txt
deleted file mode 100755 (executable)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/io/unix/kqueue/kqueue.factor b/basis/io/unix/kqueue/kqueue.factor
deleted file mode 100644 (file)
index be99d17..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors alien.c-types combinators io.unix.backend
-kernel math.bitwise sequences struct-arrays unix unix.kqueue
-unix.time assocs ;
-IN: io.unix.kqueue
-
-TUPLE: kqueue-mx < mx events ;
-
-: max-events ( -- n )
-    #! We read up to 256 events at a time. This is an arbitrary
-    #! constant...
-    256 ; inline
-
-: <kqueue-mx> ( -- mx )
-    kqueue-mx new-mx
-        kqueue dup io-error >>fd
-        max-events "kevent" <struct-array> >>events ;
-
-: make-kevent ( fd filter flags -- event )
-    "kevent" <c-object>
-    [ set-kevent-flags ] keep
-    [ set-kevent-filter ] keep
-    [ set-kevent-ident ] keep ;
-
-: register-kevent ( kevent mx -- )
-    fd>> swap 1 f 0 f kevent io-error ;
-
-M: kqueue-mx add-input-callback ( thread fd mx -- )
-    [ call-next-method ] [
-        [ EVFILT_READ { EV_ADD EV_ONESHOT } flags make-kevent ] dip
-        register-kevent
-    ] 2bi ;
-
-M: kqueue-mx add-output-callback ( thread fd mx -- )
-    [ call-next-method ] [
-        [ EVFILT_WRITE { EV_ADD EV_ONESHOT } flags make-kevent ] dip
-        register-kevent
-    ] 2bi ;
-
-M: kqueue-mx remove-input-callbacks ( fd mx -- seq )
-    2dup reads>> key? [
-        [ call-next-method ] [
-            [ EVFILT_READ EV_DELETE make-kevent ] dip
-            register-kevent
-        ] 2bi
-    ] [ 2drop f ] if ;
-
-M: kqueue-mx remove-output-callbacks ( fd mx -- seq )
-    2dup writes>> key? [
-        [
-            [ EVFILT_WRITE EV_DELETE make-kevent ] dip
-            register-kevent
-        ] [ call-next-method ] 2bi
-    ] [ 2drop f ] if ;
-
-: wait-kevent ( mx timespec -- n )
-    [
-        [ fd>> f 0 ]
-        [ events>> [ underlying>> ] [ length ] bi ] bi
-    ] dip kevent multiplexer-error ;
-
-: handle-kevent ( mx kevent -- )
-    [ kevent-ident swap ] [ kevent-filter ] bi {
-        { EVFILT_READ [ input-available ] }
-        { EVFILT_WRITE [ output-available ] }
-    } case ;
-
-: handle-kevents ( mx n -- )
-    [ dup events>> ] dip head-slice [ handle-kevent ] with each ;
-
-M: kqueue-mx wait-for-events ( us mx -- )
-    swap dup [ make-timespec ] when
-    dupd wait-kevent handle-kevents ;
diff --git a/basis/io/unix/kqueue/tags.txt b/basis/io/unix/kqueue/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/launcher/authors.txt b/basis/io/unix/launcher/authors.txt
deleted file mode 100755 (executable)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/io/unix/launcher/launcher-tests.factor b/basis/io/unix/launcher/launcher-tests.factor
deleted file mode 100644 (file)
index 68ca821..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-IN: io.unix.launcher.tests
-USING: io.files tools.test io.launcher arrays io namespaces
-continuations math io.encodings.binary io.encodings.ascii
-accessors kernel sequences io.encodings.utf8 destructors
-io.streams.duplex locals concurrency.promises threads
-unix.process ;
-
-[ ] [
-    [ "launcher-test-1" temp-file delete-file ] ignore-errors
-] unit-test
-
-[ ] [
-    "touch"
-    "launcher-test-1" temp-file
-    2array
-    try-process
-] unit-test
-
-[ t ] [ "launcher-test-1" temp-file exists? ] unit-test
-
-[ ] [
-    [ "launcher-test-1" temp-file delete-file ] ignore-errors
-] unit-test
-
-[ ] [
-    <process>
-        "echo Hello" >>command
-        "launcher-test-1" temp-file >>stdout
-    try-process
-] unit-test
-
-[ "Hello\n" ] [
-    "cat"
-    "launcher-test-1" temp-file
-    2array
-    ascii <process-reader> contents
-] unit-test
-
-[ ] [
-    [ "launcher-test-1" temp-file delete-file ] ignore-errors
-] unit-test
-
-[ ] [
-    <process>
-        "cat" >>command
-        +closed+ >>stdin
-        "launcher-test-1" temp-file >>stdout
-    try-process
-] unit-test
-
-[ f ] [
-    "cat"
-    "launcher-test-1" temp-file
-    2array
-    ascii <process-reader> contents
-] unit-test
-
-[ ] [
-    2 [
-        "launcher-test-1" temp-file binary <file-appender> [
-            <process>
-                swap >>stdout
-                "echo Hello" >>command
-            try-process
-        ] with-disposal
-    ] times
-] unit-test
-
-[ "Hello\nHello\n" ] [
-    "cat"
-    "launcher-test-1" temp-file
-    2array
-    ascii <process-reader> contents
-] unit-test
-
-[ t ] [
-    <process>
-        "env" >>command
-        { { "A" "B" } } >>environment
-    ascii <process-reader> lines
-    "A=B" swap member?
-] unit-test
-
-[ { "A=B" } ] [
-    <process>
-        "env" >>command
-        { { "A" "B" } } >>environment
-        +replace-environment+ >>environment-mode
-    ascii <process-reader> lines
-] unit-test
-
-[ "hi\n" ] [
-    temp-directory [
-        [ "aloha" delete-file ] ignore-errors
-        <process>
-            { "echo" "hi" } >>command
-            "aloha" >>stdout
-        try-process
-    ] with-directory
-    temp-directory "aloha" append-path
-    utf8 file-contents
-] unit-test
-
-[ "append-test" temp-file delete-file ] ignore-errors
-
-[ "hi\nhi\n" ] [
-    2 [
-        <process>
-            "echo hi" >>command
-            "append-test" temp-file <appender> >>stdout
-        try-process
-    ] times
-    "append-test" temp-file utf8 file-contents
-] unit-test
-
-[ t ] [ "ls" utf8 <process-stream> contents >boolean ] unit-test
-
-[ "Hello world.\n" ] [
-    "cat" utf8 <process-stream> [
-        "Hello world.\n" write
-        output-stream get dispose
-        input-stream get contents
-    ] with-stream
-] unit-test
-
-! Killed processes were exiting with code 0 on FreeBSD
-[ f ] [
-    [let | p [ <promise> ]
-           s [ <promise> ] |
-       [
-           "sleep 1000" run-detached
-           [ p fulfill ] [ wait-for-process s fulfill ] bi
-       ] in-thread
-
-       p ?promise handle>> 9 kill drop
-       s ?promise 0 =
-    ]
-] unit-test
diff --git a/basis/io/unix/launcher/launcher.factor b/basis/io/unix/launcher/launcher.factor
deleted file mode 100644 (file)
index 729c154..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-! Copyright (C) 2007, 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: kernel namespaces math system sequences
-continuations arrays assocs combinators alien.c-types strings
-threads accessors environment
-io io.backend io.launcher io.ports io.files
-io.files.private io.unix.files io.unix.backend
-io.unix.launcher.parser
-unix unix.process ;
-IN: io.unix.launcher
-
-! Search unix first
-USE: unix
-
-: get-arguments ( process -- seq )
-    command>> dup string? [ tokenize-command ] when ;
-
-: assoc>env ( assoc -- env )
-    [ "=" glue ] { } assoc>map ;
-
-: setup-priority ( process -- process )
-    dup priority>> [
-        H{
-            { +lowest-priority+ 20 }
-            { +low-priority+ 10 }
-            { +normal-priority+ 0 }
-            { +high-priority+ -10 }
-            { +highest-priority+ -20 }
-            { +realtime-priority+ -20 }
-        } at set-priority
-    ] when* ;
-
-: reset-fd ( fd -- )
-    [ F_SETFL 0 fcntl io-error ] [ F_SETFD 0 fcntl io-error ] bi ;
-
-: redirect-fd ( oldfd fd -- )
-    2dup = [ 2drop ] [ dup2 io-error ] if ;
-
-: redirect-file ( obj mode fd -- )
-    [ [ normalize-path ] dip file-mode open-file ] dip redirect-fd ;
-
-: redirect-file-append ( obj mode fd -- )
-    [ drop path>> normalize-path open-append ] dip redirect-fd ;
-
-: redirect-closed ( obj mode fd -- )
-    [ drop "/dev/null" ] 2dip redirect-file ;
-
-: redirect ( obj mode fd -- )
-    {
-        { [ pick not ] [ 3drop ] }
-        { [ pick string? ] [ redirect-file ] }
-        { [ pick appender? ] [ redirect-file-append ] }
-        { [ pick +closed+ eq? ] [ redirect-closed ] }
-        { [ pick fd? ] [ [ drop fd>> dup reset-fd ] dip redirect-fd ] }
-        [ [ underlying-handle ] 2dip redirect ]
-    } cond ;
-
-: ?closed ( obj -- obj' )
-    dup +closed+ eq? [ drop "/dev/null" ] when ;
-
-: setup-redirection ( process -- process )
-    dup stdin>> ?closed read-flags 0 redirect
-    dup stdout>> ?closed write-flags 1 redirect
-    dup stderr>> dup +stdout+ eq? [
-        drop 1 2 dup2 io-error
-    ] [
-        ?closed write-flags 2 redirect
-    ] if ;
-
-: setup-environment ( process -- process )
-    dup pass-environment? [
-        dup get-environment set-os-envs
-    ] when ;
-
-: spawn-process ( process -- * )
-    [ setup-priority ] [ 250 _exit ] recover
-    [ setup-redirection ] [ 251 _exit ] recover
-    [ current-directory get (normalize-path) cd ] [ 252 _exit ] recover
-    [ setup-environment ] [ 253 _exit ] recover
-    [ get-arguments exec-args-with-path ] [ 254 _exit ] recover
-    255 _exit ;
-
-M: unix current-process-handle ( -- handle ) getpid ;
-
-M: unix run-process* ( process -- pid )
-    [ spawn-process ] curry [ ] with-fork ;
-
-M: unix kill-process* ( pid -- )
-    SIGTERM kill io-error ;
-
-: find-process ( handle -- process )
-    processes get swap [ nip swap handle>> = ] curry
-    assoc-find 2drop ;
-
-TUPLE: signal n ;
-
-: code>status ( code -- obj )
-    dup WIFEXITED [ WEXITSTATUS ] [ WTERMSIG signal boa ] if ;
-
-M: unix wait-for-processes ( -- ? )
-    -1 0 <int> tuck WNOHANG waitpid
-    dup 0 <= [
-        2drop t
-    ] [
-        find-process dup
-        [ swap *int code>status notify-exit f ] [ 2drop f ] if
-    ] if ;
diff --git a/basis/io/unix/launcher/parser/parser-tests.factor b/basis/io/unix/launcher/parser/parser-tests.factor
deleted file mode 100644 (file)
index 63aadca..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-IN: io.unix.launcher.parser.tests
-USING: io.unix.launcher.parser tools.test ;
-
-[ "" tokenize-command ] must-fail
-[ "   " tokenize-command ] must-fail
-[ V{ "a" } ] [ "a" tokenize-command ] unit-test
-[ V{ "abc" } ] [ "abc" tokenize-command ] unit-test
-[ V{ "abc" } ] [ "abc   " tokenize-command ] unit-test
-[ V{ "abc" } ] [ "   abc" tokenize-command ] unit-test
-[ V{ "abc" "def" } ] [ "abc def" tokenize-command ] unit-test
-[ V{ "abc def" } ] [ "abc\\ def" tokenize-command ] unit-test
-[ V{ "abc\\" "def" } ] [ "abc\\\\ def" tokenize-command ] unit-test
-[ V{ "abc\\ def" } ] [ "'abc\\\\ def'" tokenize-command ] unit-test
-[ V{ "abc\\ def" } ] [ "  'abc\\\\ def'" tokenize-command ] unit-test
-[ V{ "abc\\ def" "hey" } ] [ "'abc\\\\ def' hey" tokenize-command ] unit-test
-[ V{ "abc def" "hey" } ] [ "'abc def' \"hey\"" tokenize-command ] unit-test
-[ "'abc def' \"hey" tokenize-command ] must-fail
-[ "'abc def" tokenize-command ] must-fail
-[ V{ "abc def" "h\"ey" } ] [ "'abc def' \"h\\\"ey\"  " tokenize-command ] unit-test
-
-[
-    V{
-        "Hello world.app/Contents/MacOS/hello-ui"
-        "-i=boot.macosx-ppc.image"
-        "-include= math compiler ui"
-        "-deploy-vocab=hello-ui"
-        "-output-image=Hello world.app/Contents/Resources/hello-ui.image"
-        "-no-stack-traces"
-        "-no-user-init"
-    }
-] [
-    "\"Hello world.app/Contents/MacOS/hello-ui\" -i=boot.macosx-ppc.image \"-include= math compiler ui\" -deploy-vocab=hello-ui \"-output-image=Hello world.app/Contents/Resources/hello-ui.image\" -no-stack-traces -no-user-init" tokenize-command
-] unit-test
diff --git a/basis/io/unix/launcher/parser/parser.factor b/basis/io/unix/launcher/parser/parser.factor
deleted file mode 100644 (file)
index 276ed45..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-! Copyright (C) 2008 Slava Pestov
-! See http://factorcode.org/license.txt for BSD license.
-USING: peg peg.parsers kernel sequences strings words ;
-IN: io.unix.launcher.parser
-
-! Our command line parser. Supported syntax:
-! foo bar baz -- simple tokens
-! foo\ bar -- escaping the space
-! 'foo bar' -- quotation
-! "foo bar" -- quotation
-: 'escaped-char' ( -- parser )
-    "\\" token any-char 2seq [ second ] action ;
-
-: 'quoted-char' ( delimiter -- parser' )
-    'escaped-char'
-    swap [ member? not ] curry satisfy
-    2choice ; inline
-
-: 'quoted' ( delimiter -- parser )
-    dup 'quoted-char' repeat0 swap dup surrounded-by ;
-
-: 'unquoted' ( -- parser ) " '\"" 'quoted-char' repeat1 ;
-
-: 'argument' ( -- parser )
-    "\"" 'quoted'
-    "'" 'quoted'
-    'unquoted' 3choice
-    [ >string ] action ;
-
-PEG: tokenize-command ( command -- ast/f )
-    'argument' " " token repeat1 list-of
-    " " token repeat0 tuck pack
-    just ;
diff --git a/basis/io/unix/launcher/parser/tags.txt b/basis/io/unix/launcher/parser/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/launcher/tags.txt b/basis/io/unix/launcher/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/linux/authors.txt b/basis/io/unix/linux/authors.txt
deleted file mode 100755 (executable)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/io/unix/linux/linux.factor b/basis/io/unix/linux/linux.factor
deleted file mode 100644 (file)
index fd24e0a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: kernel system namespaces io.backend io.unix.backend
-io.unix.multiplexers io.unix.multiplexers.epoll ;
-IN: io.unix.linux
-
-M: linux init-io ( -- )
-    <epoll-mx> mx set-global ;
-
-linux set-io-backend
diff --git a/basis/io/unix/linux/monitors/monitors-tests.factor b/basis/io/unix/linux/monitors/monitors-tests.factor
deleted file mode 100644 (file)
index 42c5009..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-IN: io.unix.linux.monitors.tests
-USING: io.monitors tools.test io.files system sequences
-continuations namespaces concurrency.count-downs kernel io
-threads calendar prettyprint destructors io.timeouts ;
-
-! On Linux, a notification on the directory itself would report an invalid
-! path name
-[
-    [ ] [ "monitor-test-self" temp-file make-directories ] unit-test
-    
-    ! Non-recursive
-    [ ] [ "monitor-test-self" temp-file f <monitor> "m" set ] unit-test
-    [ ] [ 3 seconds "m" get set-timeout ] unit-test
-
-    [ ] [ "monitor-test-self" temp-file touch-file ] unit-test
-
-    [ t ] [
-        "m" get next-change drop
-        [ "" = ] [ "monitor-test-self" temp-file = ] bi or
-    ] unit-test
-
-    [ ] [ "m" get dispose ] unit-test
-    
-    ! Recursive
-    [ ] [ "monitor-test-self" temp-file t <monitor> "m" set ] unit-test
-    [ ] [ 3 seconds "m" get set-timeout ] unit-test
-
-    [ ] [ "monitor-test-self" temp-file touch-file ] unit-test
-
-    [ t ] [
-        "m" get next-change drop
-        [ "" = ] [ "monitor-test-self" temp-file = ] bi or
-    ] unit-test
-
-    [ ] [ "m" get dispose ] unit-test
-] with-monitors
diff --git a/basis/io/unix/linux/monitors/monitors.factor b/basis/io/unix/linux/monitors/monitors.factor
deleted file mode 100644 (file)
index 3964a25..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: kernel io.backend io.monitors io.monitors.recursive
-io.files io.buffers io.monitors io.ports io.timeouts
-io.unix.backend io.encodings.utf8 unix.linux.inotify assocs
-namespaces make threads continuations init math math.bitwise
-sets alien alien.strings alien.c-types vocabs.loader accessors
-system hashtables destructors unix ;
-IN: io.unix.linux.monitors
-
-SYMBOL: watches
-
-SYMBOL: inotify
-
-TUPLE: linux-monitor < monitor wd inotify watches disposed ;
-
-: <linux-monitor> ( wd path mailbox -- monitor )
-    linux-monitor new-monitor
-        inotify get >>inotify
-        watches get >>watches
-        swap >>wd ;
-
-: wd>monitor ( wd -- monitor ) watches get at ;
-
-: <inotify> ( -- port/f )
-    inotify_init dup 0 < [ drop f ] [ <fd> init-fd <input-port> ] if ;
-
-: inotify-fd ( -- fd ) inotify get handle>> handle-fd ;
-
-: check-existing ( wd -- )
-    watches get key? [
-        "Cannot open multiple monitors for the same file" throw
-    ] when ;
-
-: (add-watch) ( path mask -- wd )
-    inotify-fd -rot inotify_add_watch dup io-error dup check-existing ;
-
-: add-watch ( path mask mailbox -- monitor )
-    [ [ (normalize-path) ] dip [ (add-watch) ] [ drop ] 2bi ] dip
-    <linux-monitor> [ ] [ ] [ wd>> ] tri watches get set-at ;
-
-: check-inotify ( -- )
-    inotify get [
-        "Calling <monitor> outside with-monitors" throw
-    ] unless ;
-
-M: linux (monitor) ( path recursive? mailbox -- monitor )
-    swap [
-        <recursive-monitor>
-    ] [
-        check-inotify
-        IN_CHANGE_EVENTS swap add-watch
-    ] if ;
-
-M: linux-monitor dispose* ( monitor -- )
-    [ [ wd>> ] [ watches>> ] bi delete-at ]
-    [
-        dup inotify>> disposed>> [ drop ] [
-            [ inotify>> handle>> handle-fd ] [ wd>> ] bi
-            inotify_rm_watch io-error
-        ] if
-    ] bi ;
-
-: ignore-flags? ( mask -- ? )
-    {
-        IN_DELETE_SELF
-        IN_MOVE_SELF
-        IN_UNMOUNT
-        IN_Q_OVERFLOW
-        IN_IGNORED
-    } flags bitand 0 > ;
-
-: parse-action ( mask -- changed )
-    [
-        IN_CREATE +add-file+ ?flag
-        IN_DELETE +remove-file+ ?flag
-        IN_MODIFY +modify-file+ ?flag
-        IN_ATTRIB +modify-file+ ?flag
-        IN_MOVED_FROM +rename-file-old+ ?flag
-        IN_MOVED_TO +rename-file-new+ ?flag
-        drop
-    ] { } make prune ;
-
-: parse-event-name ( event -- name )
-    dup inotify-event-len zero?
-    [ drop "" ] [ inotify-event-name utf8 alien>string ] if ;
-
-: parse-file-notify ( buffer -- path changed )
-    dup inotify-event-mask ignore-flags? [
-        drop f f
-    ] [
-        [ parse-event-name ] [ inotify-event-mask parse-action ] bi
-    ] if ;
-
-: events-exhausted? ( i buffer -- ? )
-    fill>> >= ;
-
-: inotify-event@ ( i buffer -- alien )
-    ptr>> <displaced-alien> ;
-
-: next-event ( i buffer -- i buffer )
-    2dup inotify-event@
-    inotify-event-len "inotify-event" heap-size +
-    swap [ + ] dip ;
-
-: parse-file-notifications ( i buffer -- )
-    2dup events-exhausted? [ 2drop ] [
-        2dup inotify-event@ dup inotify-event-wd wd>monitor
-        [ parse-file-notify ] dip queue-change
-        next-event parse-file-notifications
-    ] if ;
-
-: inotify-read-loop ( port -- )
-    dup check-disposed
-    dup wait-to-read drop
-    0 over buffer>> parse-file-notifications
-    0 over buffer>> buffer-reset
-    inotify-read-loop ;
-
-: inotify-read-thread ( port -- )
-    [ inotify-read-loop ] curry ignore-errors ;
-
-M: linux init-monitors
-    H{ } clone watches set
-    <inotify> [
-        [ inotify set ]
-        [
-            [ inotify-read-thread ] curry
-            "Linux monitor thread" spawn drop
-        ] bi
-    ] [
-        "Linux kernel version is too old" throw
-    ] if* ;
-
-M: linux dispose-monitors
-    inotify get dispose ;
diff --git a/basis/io/unix/linux/monitors/tags.txt b/basis/io/unix/linux/monitors/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/linux/tags.txt b/basis/io/unix/linux/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/macosx/macosx.factor b/basis/io/unix/macosx/macosx.factor
deleted file mode 100644 (file)
index 75f42b7..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: io.backend system namespaces io.unix.multiplexers
-io.unix.multiplexers.run-loop ;
-IN: io.unix.macosx
-
-M: macosx init-io ( -- )
-    <run-loop-mx> mx set-global ;
-
-macosx set-io-backend
diff --git a/basis/io/unix/macosx/monitors/monitors.factor b/basis/io/unix/macosx/monitors/monitors.factor
deleted file mode 100644 (file)
index cde1d63..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: io.backend io.monitors
-core-foundation.fsevents continuations kernel sequences
-namespaces arrays system locals accessors destructors fry ;
-IN: io.unix.macosx.monitors
-
-TUPLE: macosx-monitor < monitor handle ;
-
-: enqueue-notifications ( triples monitor -- )
-    '[ first { +modify-file+ } _ queue-change ] each ;
-
-M:: macosx (monitor) ( path recursive? mailbox -- monitor )
-    [let | path [ path normalize-path ] |
-        path mailbox macosx-monitor new-monitor
-        dup [ enqueue-notifications ] curry
-        path 1array 0 0 <event-stream> >>handle
-    ] ;
-
-M: macosx-monitor dispose
-    handle>> dispose ;
-
-macosx set-io-backend
diff --git a/basis/io/unix/macosx/monitors/tags.txt b/basis/io/unix/macosx/monitors/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/macosx/tags.txt b/basis/io/unix/macosx/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/mmap/authors.txt b/basis/io/unix/mmap/authors.txt
deleted file mode 100755 (executable)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/io/unix/mmap/mmap.factor b/basis/io/unix/mmap/mmap.factor
deleted file mode 100644 (file)
index d5dcda9..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-! Copyright (C) 2007 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: alien io io.files kernel math math.bitwise system unix
-io.unix.backend io.ports io.mmap destructors locals accessors ;
-IN: io.unix.mmap
-
-: open-r/w ( path -- fd ) O_RDWR file-mode open-file ;
-
-:: mmap-open ( path length prot flags -- alien fd )
-    [
-        f length prot flags
-        path open-r/w |dispose
-        [ 0 mmap dup MAP_FAILED = [ (io-error) ] when ] keep
-    ] with-destructors ;
-
-M: unix (mapped-file)
-    { PROT_READ PROT_WRITE } flags
-    { MAP_FILE MAP_SHARED } flags
-    mmap-open ;
-
-M: unix close-mapped-file ( mmap -- )
-    [ [ address>> ] [ length>> ] bi munmap io-error ]
-    [ handle>> close-file ]
-    bi ;
diff --git a/basis/io/unix/mmap/tags.txt b/basis/io/unix/mmap/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/multiplexers/epoll/authors.txt b/basis/io/unix/multiplexers/epoll/authors.txt
deleted file mode 100755 (executable)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/io/unix/multiplexers/epoll/epoll.factor b/basis/io/unix/multiplexers/epoll/epoll.factor
deleted file mode 100644 (file)
index 08e20d4..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors alien.c-types kernel destructors bit-arrays
-sequences assocs struct-arrays math namespaces locals fry unix
-unix.linux.epoll unix.time io.ports io.unix.backend
-io.unix.multiplexers ;
-IN: io.unix.multiplexers.epoll
-
-TUPLE: epoll-mx < mx events ;
-
-: max-events ( -- n )
-    #! We read up to 256 events at a time. This is an arbitrary
-    #! constant...
-    256 ; inline
-
-: <epoll-mx> ( -- mx )
-    epoll-mx new-mx
-        max-events epoll_create dup io-error >>fd
-        max-events "epoll-event" <struct-array> >>events ;
-
-M: epoll-mx dispose fd>> close-file ;
-
-: make-event ( fd events -- event )
-    "epoll-event" <c-object>
-    [ set-epoll-event-events ] keep
-    [ set-epoll-event-fd ] keep ;
-
-:: do-epoll-ctl ( fd mx what events -- )
-    mx fd>> what fd fd events make-event epoll_ctl io-error ;
-
-: do-epoll-add ( fd mx events -- )
-    EPOLL_CTL_ADD swap EPOLLONESHOT bitor do-epoll-ctl ;
-
-: do-epoll-del ( fd mx events -- )
-    EPOLL_CTL_DEL swap do-epoll-ctl ;
-
-M: epoll-mx add-input-callback ( thread fd mx -- )
-    [ EPOLLIN do-epoll-add ] [ call-next-method ] 2bi ;
-
-M: epoll-mx add-output-callback ( thread fd mx -- )
-    [ EPOLLOUT do-epoll-add ] [ call-next-method ] 2bi ;
-
-M: epoll-mx remove-input-callbacks ( fd mx -- seq )
-    2dup reads>> key? [
-        [ call-next-method ] [ EPOLLIN do-epoll-del ] 2bi
-    ] [ 2drop f ] if ;
-
-M: epoll-mx remove-output-callbacks ( fd mx -- seq )
-    2dup writes>> key? [
-        [ EPOLLOUT do-epoll-del ] [ call-next-method ] 2bi
-    ] [ 2drop f ] if ;
-
-: wait-event ( mx us -- n )
-    [ [ fd>> ] [ events>> ] bi [ underlying>> ] [ length ] bi ] [ 1000 /i ] bi*
-    epoll_wait multiplexer-error ;
-
-: handle-event ( event mx -- )
-    [ epoll-event-fd ] dip
-    [ EPOLLIN EPOLLOUT bitor do-epoll-del ]
-    [ input-available ] [ output-available ] 2tri ;
-
-: handle-events ( mx n -- )
-    [ dup events>> ] dip head-slice swap '[ _ handle-event ] each ;
-
-M: epoll-mx wait-for-events ( us mx -- )
-    swap 60000000 or dupd wait-event handle-events ;
diff --git a/basis/io/unix/multiplexers/epoll/tags.txt b/basis/io/unix/multiplexers/epoll/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/multiplexers/kqueue/authors.txt b/basis/io/unix/multiplexers/kqueue/authors.txt
deleted file mode 100755 (executable)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/io/unix/multiplexers/kqueue/kqueue.factor b/basis/io/unix/multiplexers/kqueue/kqueue.factor
deleted file mode 100644 (file)
index a66e86a..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors alien.c-types combinators destructors
-io.unix.backend kernel math.bitwise sequences struct-arrays unix
-unix.kqueue unix.time assocs io.unix.multiplexers ;
-IN: io.unix.multiplexers.kqueue
-
-TUPLE: kqueue-mx < mx events ;
-
-: max-events ( -- n )
-    #! We read up to 256 events at a time. This is an arbitrary
-    #! constant...
-    256 ; inline
-
-: <kqueue-mx> ( -- mx )
-    kqueue-mx new-mx
-        kqueue dup io-error >>fd
-        max-events "kevent" <struct-array> >>events ;
-
-M: kqueue-mx dispose fd>> close-file ;
-
-: make-kevent ( fd filter flags -- event )
-    "kevent" <c-object>
-    [ set-kevent-flags ] keep
-    [ set-kevent-filter ] keep
-    [ set-kevent-ident ] keep ;
-
-: register-kevent ( kevent mx -- )
-    fd>> swap 1 f 0 f kevent io-error ;
-
-M: kqueue-mx add-input-callback ( thread fd mx -- )
-    [ call-next-method ] [
-        [ EVFILT_READ { EV_ADD EV_ONESHOT } flags make-kevent ] dip
-        register-kevent
-    ] 2bi ;
-
-M: kqueue-mx add-output-callback ( thread fd mx -- )
-    [ call-next-method ] [
-        [ EVFILT_WRITE { EV_ADD EV_ONESHOT } flags make-kevent ] dip
-        register-kevent
-    ] 2bi ;
-
-M: kqueue-mx remove-input-callbacks ( fd mx -- seq )
-    2dup reads>> key? [
-        [ call-next-method ] [
-            [ EVFILT_READ EV_DELETE make-kevent ] dip
-            register-kevent
-        ] 2bi
-    ] [ 2drop f ] if ;
-
-M: kqueue-mx remove-output-callbacks ( fd mx -- seq )
-    2dup writes>> key? [
-        [
-            [ EVFILT_WRITE EV_DELETE make-kevent ] dip
-            register-kevent
-        ] [ call-next-method ] 2bi
-    ] [ 2drop f ] if ;
-
-: wait-kevent ( mx timespec -- n )
-    [
-        [ fd>> f 0 ]
-        [ events>> [ underlying>> ] [ length ] bi ] bi
-    ] dip kevent multiplexer-error ;
-
-: handle-kevent ( mx kevent -- )
-    [ kevent-ident swap ] [ kevent-filter ] bi {
-        { EVFILT_READ [ input-available ] }
-        { EVFILT_WRITE [ output-available ] }
-    } case ;
-
-: handle-kevents ( mx n -- )
-    [ dup events>> ] dip head-slice [ handle-kevent ] with each ;
-
-M: kqueue-mx wait-for-events ( us mx -- )
-    swap dup [ make-timespec ] when
-    dupd wait-kevent handle-kevents ;
diff --git a/basis/io/unix/multiplexers/kqueue/tags.txt b/basis/io/unix/multiplexers/kqueue/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/multiplexers/multiplexers.factor b/basis/io/unix/multiplexers/multiplexers.factor
deleted file mode 100644 (file)
index 1c9fb13..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: kernel accessors assocs sequences threads ;
-IN: io.unix.multiplexers
-
-TUPLE: mx fd reads writes ;
-
-: new-mx ( class -- obj )
-    new
-        H{ } clone >>reads
-        H{ } clone >>writes ; inline
-
-GENERIC: add-input-callback ( thread fd mx -- )
-
-M: mx add-input-callback reads>> push-at ;
-
-GENERIC: add-output-callback ( thread fd mx -- )
-
-M: mx add-output-callback writes>> push-at ;
-
-GENERIC: remove-input-callbacks ( fd mx -- callbacks )
-
-M: mx remove-input-callbacks reads>> delete-at* drop ;
-
-GENERIC: remove-output-callbacks ( fd mx -- callbacks )
-
-M: mx remove-output-callbacks writes>> delete-at* drop ;
-
-GENERIC: wait-for-events ( ms mx -- )
-
-: input-available ( fd mx -- )
-    reads>> delete-at* drop [ resume ] each ;
-
-: output-available ( fd mx -- )
-    writes>> delete-at* drop [ resume ] each ;
diff --git a/basis/io/unix/multiplexers/run-loop/run-loop-tests.factor b/basis/io/unix/multiplexers/run-loop/run-loop-tests.factor
deleted file mode 100644 (file)
index 5f249c6..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-USING: io.unix.multiplexers.run-loop tools.test
-destructors ;
-IN: io.unix.multiplexers.run-loop.tests
-
-[ ] [ <run-loop-mx> dispose ] unit-test
diff --git a/basis/io/unix/multiplexers/run-loop/run-loop.factor b/basis/io/unix/multiplexers/run-loop/run-loop.factor
deleted file mode 100644 (file)
index 7b80e46..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: kernel namespaces math accessors threads alien locals
-destructors combinators io.unix.multiplexers
-io.unix.multiplexers.kqueue core-foundation
-core-foundation.run-loop core-foundation.file-descriptors ;
-IN: io.unix.multiplexers.run-loop
-
-TUPLE: run-loop-mx kqueue-mx fd source ;
-
-: kqueue-callback ( -- callback )
-    "void" { "CFFileDescriptorRef" "CFOptionFlags" "void*" }
-    "cdecl" [
-        3drop
-        0 mx get kqueue-mx>> wait-for-events
-        mx get fd>> enable-all-callbacks
-        yield
-    ]
-    alien-callback ;
-
-SYMBOL: kqueue-run-loop-source
-
-: create-kqueue-source ( fd -- source )
-    f swap 0 CFFileDescriptorCreateRunLoopSource ;
-
-: add-kqueue-to-run-loop ( mx -- )
-    CFRunLoopGetMain swap source>> CFRunLoopDefaultMode CFRunLoopAddSource ;
-
-: remove-kqueue-from-run-loop ( source -- )
-    CFRunLoopGetMain swap source>> CFRunLoopDefaultMode CFRunLoopRemoveSource ;
-
-: <run-loop-mx> ( -- mx )
-    [
-        <kqueue-mx> |dispose
-        dup fd>> kqueue-callback <CFFileDescriptor> |dispose
-        dup create-kqueue-source run-loop-mx boa
-        dup add-kqueue-to-run-loop
-    ] with-destructors ;
-
-M: run-loop-mx dispose
-    [
-        {
-            [ fd>> &CFRelease drop ]
-            [ source>> &CFRelease drop ]
-            [ remove-kqueue-from-run-loop ]
-            [ kqueue-mx>> &dispose drop ]
-        } cleave
-    ] with-destructors ;
-
-M: run-loop-mx add-input-callback kqueue-mx>> add-input-callback ;
-M: run-loop-mx add-output-callback kqueue-mx>> add-output-callback ;
-M: run-loop-mx remove-input-callbacks kqueue-mx>> remove-input-callbacks ;
-M: run-loop-mx remove-output-callbacks kqueue-mx>> remove-output-callbacks ;
-
-M:: run-loop-mx wait-for-events ( us mx -- )
-    mx fd>> enable-all-callbacks
-    CFRunLoopDefaultMode us [ 1000000 /f ] [ 60 ] if* t CFRunLoopRunInMode
-    kCFRunLoopRunHandledSource = [ 0 mx wait-for-events ] when ;
diff --git a/basis/io/unix/multiplexers/run-loop/tags.txt b/basis/io/unix/multiplexers/run-loop/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/multiplexers/select/authors.txt b/basis/io/unix/multiplexers/select/authors.txt
deleted file mode 100755 (executable)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/io/unix/multiplexers/select/select.factor b/basis/io/unix/multiplexers/select/select.factor
deleted file mode 100644 (file)
index 915daac..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-! Copyright (C) 2004, 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: alien.c-types kernel bit-arrays sequences assocs unix
-math namespaces accessors math.order locals unix.time fry
-io.ports io.unix.backend io.unix.multiplexers ;
-IN: io.unix.multiplexers.select
-
-TUPLE: select-mx < mx read-fdset write-fdset ;
-
-! Factor's bit-arrays are an array of bytes, OS X expects
-! FD_SET to be an array of cells, so we have to account for
-! byte order differences on big endian platforms
-: munge ( i -- i' )
-    little-endian? [ BIN: 11000 bitxor ] unless ; inline
-
-: <select-mx> ( -- mx )
-    select-mx new-mx
-        FD_SETSIZE 8 * <bit-array> >>read-fdset
-        FD_SETSIZE 8 * <bit-array> >>write-fdset ;
-
-: clear-nth ( n seq -- ? )
-    [ nth ] [ [ f ] 2dip set-nth ] 2bi ;
-
-:: check-fd ( fd fdset mx quot -- )
-    fd munge fdset clear-nth [ fd mx quot call ] when ; inline
-
-: check-fdset ( fds fdset mx quot -- )
-    [ check-fd ] 3curry each ; inline
-
-: init-fdset ( fds fdset -- )
-    '[ t swap munge _ set-nth ] each ;
-
-: read-fdset/tasks ( mx -- seq fdset )
-    [ reads>> keys ] [ read-fdset>> ] bi ;
-
-: write-fdset/tasks ( mx -- seq fdset )
-    [ writes>> keys ] [ write-fdset>> ] bi ;
-
-: max-fd ( assoc -- n )
-    dup assoc-empty? [ drop 0 ] [ keys supremum ] if ;
-
-: num-fds ( mx -- n )
-    [ reads>> max-fd ] [ writes>> max-fd ] bi max 1+ ;
-
-: init-fdsets ( mx -- nfds read write except )
-    [ num-fds ]
-    [ read-fdset/tasks [ init-fdset ] [ underlying>> ] bi ]
-    [ write-fdset/tasks [ init-fdset ] [ underlying>> ] bi ] tri
-    f ;
-
-M:: select-mx wait-for-events ( us mx -- )
-    mx
-    [ init-fdsets us dup [ make-timeval ] when select multiplexer-error drop ]
-    [ [ read-fdset/tasks ] keep [ input-available ] check-fdset ]
-    [ [ write-fdset/tasks ] keep [ output-available ] check-fdset ]
-    tri ;
diff --git a/basis/io/unix/multiplexers/select/tags.txt b/basis/io/unix/multiplexers/select/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/netbsd/netbsd.factor b/basis/io/unix/netbsd/netbsd.factor
deleted file mode 100644 (file)
index ed13478..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USING: io.unix.bsd io.backend system ;
-
-netbsd set-io-backend
diff --git a/basis/io/unix/netbsd/tags.txt b/basis/io/unix/netbsd/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/openbsd/openbsd.factor b/basis/io/unix/openbsd/openbsd.factor
deleted file mode 100644 (file)
index dfc466f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USING: io.unix.bsd io.backend system ;
-
-openbsd set-io-backend
diff --git a/basis/io/unix/openbsd/tags.txt b/basis/io/unix/openbsd/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/pipes/pipes-tests.factor b/basis/io/unix/pipes/pipes-tests.factor
deleted file mode 100644 (file)
index 6ea7404..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-USING: tools.test io.pipes io.unix.pipes io.encodings.utf8
-io.encodings io namespaces sequences ;
-IN: io.unix.pipes.tests
-
-[ { 0 0 } ] [ { "ls" "grep ." } run-pipeline ] unit-test
-
-[ { 0 f 0 } ] [
-    {
-        "ls"
-        [
-            input-stream [ utf8 <decoder> ] change
-            output-stream [ utf8 <encoder> ] change
-            input-stream get lines reverse [ print ] each f
-        ]
-        "grep ."
-    } run-pipeline
-] unit-test
diff --git a/basis/io/unix/pipes/pipes.factor b/basis/io/unix/pipes/pipes.factor
deleted file mode 100644 (file)
index a28738e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: system kernel unix math sequences qualified
-io.unix.backend io.ports specialized-arrays.int accessors ;
-IN: io.unix.pipes
-QUALIFIED: io.pipes
-
-M: unix io.pipes:(pipe) ( -- pair )
-    2 <int-array>
-    [ underlying>> pipe io-error ]
-    [ first2 [ <fd> init-fd ] bi@ io.pipes:pipe boa ] bi ;
diff --git a/basis/io/unix/pipes/tags.txt b/basis/io/unix/pipes/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/select/authors.txt b/basis/io/unix/select/authors.txt
deleted file mode 100755 (executable)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/io/unix/select/select.factor b/basis/io/unix/select/select.factor
deleted file mode 100644 (file)
index a6b6100..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-! Copyright (C) 2004, 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: alien.c-types kernel io.ports io.unix.backend
-bit-arrays sequences assocs unix math namespaces
-accessors math.order locals unix.time fry ;
-IN: io.unix.select
-
-TUPLE: select-mx < mx read-fdset write-fdset ;
-
-! Factor's bit-arrays are an array of bytes, OS X expects
-! FD_SET to be an array of cells, so we have to account for
-! byte order differences on big endian platforms
-: munge ( i -- i' )
-    little-endian? [ BIN: 11000 bitxor ] unless ; inline
-
-: <select-mx> ( -- mx )
-    select-mx new-mx
-        FD_SETSIZE 8 * <bit-array> >>read-fdset
-        FD_SETSIZE 8 * <bit-array> >>write-fdset ;
-
-: clear-nth ( n seq -- ? )
-    [ nth ] [ [ f ] 2dip set-nth ] 2bi ;
-
-:: check-fd ( fd fdset mx quot -- )
-    fd munge fdset clear-nth [ fd mx quot call ] when ; inline
-
-: check-fdset ( fds fdset mx quot -- )
-    [ check-fd ] 3curry each ; inline
-
-: init-fdset ( fds fdset -- )
-    '[ t swap munge _ set-nth ] each ;
-
-: read-fdset/tasks ( mx -- seq fdset )
-    [ reads>> keys ] [ read-fdset>> ] bi ;
-
-: write-fdset/tasks ( mx -- seq fdset )
-    [ writes>> keys ] [ write-fdset>> ] bi ;
-
-: max-fd ( assoc -- n )
-    dup assoc-empty? [ drop 0 ] [ keys supremum ] if ;
-
-: num-fds ( mx -- n )
-    [ reads>> max-fd ] [ writes>> max-fd ] bi max 1+ ;
-
-: init-fdsets ( mx -- nfds read write except )
-    [ num-fds ]
-    [ read-fdset/tasks [ init-fdset ] [ underlying>> ] bi ]
-    [ write-fdset/tasks [ init-fdset ] [ underlying>> ] bi ] tri
-    f ;
-
-M:: select-mx wait-for-events ( us mx -- )
-    mx
-    [ init-fdsets us dup [ make-timeval ] when select multiplexer-error drop ]
-    [ [ read-fdset/tasks ] keep [ input-available ] check-fdset ]
-    [ [ write-fdset/tasks ] keep [ output-available ] check-fdset ]
-    tri ;
diff --git a/basis/io/unix/select/tags.txt b/basis/io/unix/select/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/sockets/authors.txt b/basis/io/unix/sockets/authors.txt
deleted file mode 100644 (file)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/io/unix/sockets/secure/debug/debug.factor b/basis/io/unix/sockets/secure/debug/debug.factor
deleted file mode 100644 (file)
index cd5353e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors io.sockets.secure kernel ;
-IN: io.unix.sockets.secure.debug
-
-: with-test-context ( quot -- )
-    <secure-config>
-        "resource:basis/openssl/test/server.pem" >>key-file
-        "resource:basis/openssl/test/dh1024.pem" >>dh-file
-        "password" >>password
-    swap with-secure-context ; inline
diff --git a/basis/io/unix/sockets/secure/secure-tests.factor b/basis/io/unix/sockets/secure/secure-tests.factor
deleted file mode 100644 (file)
index 0816dd2..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-IN: io.sockets.secure.tests
-USING: accessors kernel namespaces io io.sockets
-io.sockets.secure io.encodings.ascii io.streams.duplex
-io.unix.backend classes words destructors threads tools.test
-concurrency.promises byte-arrays locals calendar io.timeouts
-io.unix.sockets.secure.debug ;
-
-\ <secure-config> must-infer
-{ 1 0 } [ [ ] with-secure-context ] must-infer-as
-
-[ ] [ <promise> "port" set ] unit-test
-
-:: server-test ( quot -- )
-    [
-        [
-            "127.0.0.1" 0 <inet4> <secure> ascii <server> [
-                dup addr>> addrspec>> port>> "port" get fulfill
-                accept [
-                    quot call
-                ] curry with-stream
-            ] with-disposal
-        ] with-test-context
-    ] "SSL server test" spawn drop ;
-
-: client-test ( -- string )
-    <secure-config> [
-        "127.0.0.1" "port" get ?promise <inet4> <secure> ascii <client> drop contents
-    ] with-secure-context ;
-
-[ ] [ [ class name>> write ] server-test ] unit-test
-
-[ "secure" ] [ client-test ] unit-test
-
-! Now, see what happens if the server closes the connection prematurely
-[ ] [ <promise> "port" set ] unit-test
-
-[ ] [
-    [
-        drop
-        "hello" write flush
-        input-stream get stream>> handle>> f >>connected drop
-    ] server-test
-] unit-test
-
-[ client-test ] [ premature-close? ] must-fail-with
-
-! Now, try validating the certificate. This should fail because its
-! actually an invalid certificate
-[ ] [ <promise> "port" set ] unit-test
-
-[ ] [ [ drop "hi" write ] server-test ] unit-test
-
-[
-    <secure-config> [
-        "localhost" "port" get ?promise <inet> <secure> ascii
-        <client> drop dispose
-    ] with-secure-context
-] [ certificate-verify-error? ] must-fail-with
-
-! Client-side handshake timeout
-[ ] [ <promise> "port" set ] unit-test
-
-[ ] [
-    [
-        "127.0.0.1" 0 <inet4> ascii <server> [
-            dup addr>> port>> "port" get fulfill
-            accept drop 1 minutes sleep dispose
-        ] with-disposal
-    ] "Silly server" spawn drop
-] unit-test
-
-[
-    1 seconds secure-socket-timeout [
-        client-test
-    ] with-variable
-] [ io-timeout? ] must-fail-with
-
-! Server-side handshake timeout
-[ ] [ <promise> "port" set ] unit-test
-
-[ ] [
-    [
-        "127.0.0.1" "port" get ?promise
-        <inet4> ascii <client> drop 1 minutes sleep dispose
-    ] "Silly client" spawn drop
-] unit-test
-
-[
-    1 seconds secure-socket-timeout [
-        [
-            "127.0.0.1" 0 <inet4> <secure> ascii <server> [
-                dup addr>> addrspec>> port>> "port" get fulfill
-                accept drop dup stream-read1 drop dispose
-            ] with-disposal
-        ] with-test-context
-    ] with-variable
-] [ io-timeout? ] must-fail-with
-
-! Client socket shutdown timeout
-
-! Until I sort out two-stage handshaking, I can't do much here
-[
-    [ ] [ <promise> "port" set ] unit-test
-    
-    [ ] [
-        [
-            [
-                "127.0.0.1" 0 <inet4> <secure> ascii <server> [
-                    dup addr>> addrspec>> port>> "port" get fulfill
-                    accept drop 1 minutes sleep dispose
-                ] with-disposal
-            ] with-test-context
-        ] "Silly server" spawn drop
-    ] unit-test
-    
-    [
-        1 seconds secure-socket-timeout [
-            <secure-config> [
-                "127.0.0.1" "port" get ?promise <inet4> <secure>
-                ascii <client> drop dispose
-            ] with-secure-context
-        ] with-variable
-    ] [ io-timeout? ] must-fail-with
-    
-    ! Server socket shutdown timeout
-    [ ] [ <promise> "port" set ] unit-test
-    
-    [ ] [
-        [
-            [
-                "127.0.0.1" "port" get ?promise
-                <inet4> <secure> ascii <client> drop 1 minutes sleep dispose
-            ] with-test-context
-        ] "Silly client" spawn drop
-    ] unit-test
-    
-    [
-        1 seconds secure-socket-timeout [
-            [
-                "127.0.0.1" 0 <inet4> <secure> ascii <server> [
-                    dup addr>> addrspec>> port>> "port" get fulfill
-                    accept drop dispose
-                ] with-disposal
-            ] with-test-context
-        ] with-variable
-    ] [ io-timeout? ] must-fail-with
-] drop
diff --git a/basis/io/unix/sockets/secure/secure.factor b/basis/io/unix/sockets/secure/secure.factor
deleted file mode 100644 (file)
index 106b656..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-! Copyright (C) 2007, 2008, Slava Pestov, Elie CHAFTARI.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors unix byte-arrays kernel sequences
-namespaces math math.order combinators init alien alien.c-types
-alien.strings libc continuations destructors openssl
-openssl.libcrypto openssl.libssl io io.files io.ports
-io.unix.backend io.unix.sockets io.encodings.ascii io.buffers
-io.sockets io.sockets.secure io.sockets.secure.openssl
-io.timeouts system summary fry ;
-IN: io.unix.sockets.secure
-
-M: ssl-handle handle-fd file>> handle-fd ;
-
-: syscall-error ( r -- * )
-    ERR_get_error dup zero? [
-        drop
-        {
-            { -1 [ err_no ECONNRESET = [ premature-close ] [ (io-error) ] if ] }
-            { 0 [ premature-close ] }
-        } case
-    ] [ nip (ssl-error) ] if ;
-
-: check-accept-response ( handle r -- event )
-    over handle>> over SSL_get_error
-    {
-        { SSL_ERROR_NONE [ 2drop f ] }
-        { SSL_ERROR_WANT_READ [ 2drop +input+ ] }
-        { SSL_ERROR_WANT_ACCEPT [ 2drop +input+ ] }
-        { SSL_ERROR_WANT_WRITE [ 2drop +output+ ] }
-        { SSL_ERROR_SYSCALL [ syscall-error ] }
-        { SSL_ERROR_ZERO_RETURN [ (ssl-error) ] }
-        { SSL_ERROR_SSL [ (ssl-error) ] }
-    } case ;
-
-: do-ssl-accept ( ssl-handle -- )
-    dup dup handle>> SSL_accept check-accept-response dup
-    [ [ dup file>> ] dip wait-for-fd do-ssl-accept ] [ 2drop ] if ;
-
-: maybe-handshake ( ssl-handle -- )
-    dup connected>> [ drop ] [
-        t >>connected
-        [ do-ssl-accept ] with-timeout
-    ] if ;
-
-: check-response ( port r -- port r n )
-    over handle>> handle>> over SSL_get_error ; inline
-
-! Input ports
-: check-read-response ( port r -- event )
-    check-response
-    {
-        { SSL_ERROR_NONE [ swap buffer>> n>buffer f ] }
-        { SSL_ERROR_ZERO_RETURN [ 2drop f ] }
-        { SSL_ERROR_WANT_READ [ 2drop +input+ ] }
-        { SSL_ERROR_WANT_WRITE [ 2drop +output+ ] }
-        { SSL_ERROR_SYSCALL [ syscall-error ] }
-        { SSL_ERROR_SSL [ (ssl-error) ] }
-    } case ;
-
-M: ssl-handle refill
-    dup maybe-handshake
-    handle>> ! ssl
-    over buffer>>
-    [ buffer-end ] ! buf
-    [ buffer-capacity ] bi ! len
-    SSL_read
-    check-read-response ;
-
-! Output ports
-: check-write-response ( port r -- event )
-    check-response
-    {
-        { SSL_ERROR_NONE [ swap buffer>> buffer-consume f ] }
-        { SSL_ERROR_WANT_READ [ 2drop +input+ ] }
-        { SSL_ERROR_WANT_WRITE [ 2drop +output+ ] }
-        { SSL_ERROR_SYSCALL [ syscall-error ] }
-        { SSL_ERROR_SSL [ (ssl-error) ] }
-    } case ;
-
-M: ssl-handle drain
-    dup maybe-handshake
-    handle>> ! ssl
-    over buffer>>
-    [ buffer@ ] ! buf
-    [ buffer-length ] bi ! len
-    SSL_write
-    check-write-response ;
-
-M: ssl-handle cancel-operation
-    file>> cancel-operation ;
-
-M: ssl-handle timeout
-    drop secure-socket-timeout get ;
-
-! Client sockets
-: <ssl-socket> ( fd -- ssl )
-    [ fd>> BIO_NOCLOSE BIO_new_socket dup ssl-error ] keep <ssl-handle>
-    [ handle>> swap dup SSL_set_bio ] keep ;
-
-M: secure ((client)) ( addrspec -- handle )
-    addrspec>> ((client)) <ssl-socket> ;
-
-M: secure parse-sockaddr addrspec>> parse-sockaddr <secure> ;
-
-M: secure (get-local-address) addrspec>> (get-local-address) ;
-
-: check-connect-response ( ssl-handle r -- event )
-    over handle>> over SSL_get_error
-    {
-        { SSL_ERROR_NONE [ 2drop f ] }
-        { SSL_ERROR_WANT_READ [ 2drop +input+ ] }
-        { SSL_ERROR_WANT_WRITE [ 2drop +output+ ] }
-        { SSL_ERROR_SYSCALL [ syscall-error ] }
-        { SSL_ERROR_SSL [ (ssl-error) ] }
-    } case ;
-
-: do-ssl-connect ( ssl-handle -- )
-    dup dup handle>> SSL_connect check-connect-response dup
-    [ dupd wait-for-fd do-ssl-connect ] [ 2drop ] if ;
-
-: resume-session ( ssl-handle ssl-session -- )
-    [ [ handle>> ] dip SSL_set_session ssl-error ]
-    [ drop do-ssl-connect ]
-    2bi ;
-
-: begin-session ( ssl-handle addrspec -- )
-    [ drop do-ssl-connect ]
-    [ [ handle>> SSL_get1_session ] dip save-session ]
-    2bi ;
-
-: secure-connection ( client-out addrspec -- )
-    [ handle>> ] dip
-    [
-        '[
-            _ dup get-session
-            [ resume-session ] [ begin-session ] ?if
-        ] with-timeout
-    ] [ drop t >>connected drop ] 2bi ;
-
-M: secure establish-connection ( client-out remote -- )
-    addrspec>> [ establish-connection ] [ secure-connection ] 2bi ;
-
-M: secure (server) addrspec>> (server) ;
-
-M: secure (accept)
-    [
-        addrspec>> (accept) [ |dispose <ssl-socket> ] dip
-    ] with-destructors ;
-
-: check-shutdown-response ( handle r -- event )
-    #! We don't do two-step shutdown here because I couldn't
-    #! figure out how to do it with non-blocking BIOs. Also, it
-    #! seems that SSL_shutdown always returns 0 -- this sounds
-    #! like a bug
-    over handle>> over SSL_get_error
-    {
-        { SSL_ERROR_NONE [ 2drop f ] }
-        { SSL_ERROR_WANT_READ [ 2drop +input+ ] }
-        { SSL_ERROR_WANT_WRITE [ 2drop +output+ ] }
-        { SSL_ERROR_SYSCALL [ dup zero? [ 2drop f ] [ syscall-error ] if ] }
-        { SSL_ERROR_SSL [ (ssl-error) ] }
-    } case ;
-
-: (shutdown) ( handle -- )
-    dup dup handle>> SSL_shutdown check-shutdown-response
-    dup [ dupd wait-for-fd (shutdown) ] [ 2drop ] if ;
-
-M: ssl-handle shutdown
-    dup connected>> [
-        f >>connected [ (shutdown) ] with-timeout
-    ] [ drop ] if ;
-
-: check-buffer ( port -- port )
-    dup buffer>> buffer-empty? [ upgrade-buffers-full ] unless ;
-
-: input/output-ports ( -- input output )
-    input-stream output-stream
-    [ get underlying-port check-buffer ] bi@
-    2dup [ handle>> ] bi@ eq? [ upgrade-on-non-socket ] unless ;
-
-: make-input/output-secure ( input output -- )
-    dup handle>> fd? [ upgrade-on-non-socket ] unless
-    [ <ssl-socket> ] change-handle
-    handle>> >>handle drop ;
-
-: (send-secure-handshake) ( output -- )
-    remote-address get [ upgrade-on-non-socket ] unless*
-    secure-connection ;
-
-M: openssl send-secure-handshake
-    input/output-ports
-    [ make-input/output-secure ] keep
-    [ (send-secure-handshake) ] keep
-    remote-address get dup inet? [
-        host>> swap handle>> check-certificate
-    ] [ 2drop ] if ;
-
-M: openssl accept-secure-handshake
-    input/output-ports
-    make-input/output-secure ;
diff --git a/basis/io/unix/sockets/secure/tags.txt b/basis/io/unix/sockets/secure/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/sockets/sockets.factor b/basis/io/unix/sockets/sockets.factor
deleted file mode 100644 (file)
index 5fba7ba..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-! Copyright (C) 2004, 2008 Slava Pestov, Ivan Tikhonov. 
-! See http://factorcode.org/license.txt for BSD license.
-USING: alien alien.c-types alien.strings generic kernel math
-namespaces threads sequences byte-arrays io.ports
-io.binary io.unix.backend io.streams.duplex
-io.backend io.ports io.files io.files.private
-io.encodings.utf8 math.parser continuations libc combinators
-system accessors qualified destructors unix locals init ;
-
-EXCLUDE: io => read write close ;
-EXCLUDE: io.sockets => accept ;
-
-IN: io.unix.sockets
-
-: socket-fd ( domain type -- fd )
-    0 socket dup io-error <fd> init-fd |dispose ;
-
-: set-socket-option ( fd level opt -- )
-    [ handle-fd ] 2dip 1 <int> "int" heap-size setsockopt io-error ;
-
-M: unix addrinfo-error ( n -- )
-    dup zero? [ drop ] [ gai_strerror throw ] if ;
-
-! Client sockets - TCP and Unix domain
-M: object (get-local-address) ( handle remote -- sockaddr )
-    [ handle-fd ] dip empty-sockaddr/size <int>
-    [ getsockname io-error ] 2keep drop ;
-
-M: object (get-remote-address) ( handle local -- sockaddr )
-    [ handle-fd ] dip empty-sockaddr/size <int>
-    [ getpeername io-error ] 2keep drop ;
-
-: init-client-socket ( fd -- )
-    SOL_SOCKET SO_OOBINLINE set-socket-option ;
-
-: wait-to-connect ( port -- )
-    dup handle>> handle-fd f 0 write
-    {
-        { [ 0 = ] [ drop ] }
-        { [ err_no EAGAIN = ] [ dup +output+ wait-for-port wait-to-connect ] }
-        { [ err_no EINTR = ] [ wait-to-connect ] }
-        [ (io-error) ]
-    } cond ;
-
-M: object establish-connection ( client-out remote -- )
-    [ drop ] [ [ handle>> handle-fd ] [ make-sockaddr/size ] bi* connect ] 2bi
-    {
-        { [ 0 = ] [ drop ] }
-        { [ err_no EINPROGRESS = ] [
-            [ +output+ wait-for-port ] [ wait-to-connect ] bi
-        ] }
-        [ (io-error) ]
-    } cond ;
-
-M: object ((client)) ( addrspec -- fd )
-    protocol-family SOCK_STREAM socket-fd dup init-client-socket ;
-
-! Server sockets - TCP and Unix domain
-: init-server-socket ( fd -- )
-    SOL_SOCKET SO_REUSEADDR set-socket-option ;
-
-: server-socket-fd ( addrspec type -- fd )
-    [ dup protocol-family ] dip socket-fd
-    dup init-server-socket
-    dup handle-fd rot make-sockaddr/size bind io-error ;
-
-M: object (server) ( addrspec -- handle )
-    [
-        SOCK_STREAM server-socket-fd
-        dup handle-fd 128 listen io-error
-    ] with-destructors ;
-
-: do-accept ( server addrspec -- fd sockaddr )
-    [ handle>> handle-fd ] [ empty-sockaddr/size <int> ] bi*
-    [ accept ] 2keep drop ; inline
-
-M: object (accept) ( server addrspec -- fd sockaddr )
-    2dup do-accept
-    {
-        { [ over 0 >= ] [ [ 2nip <fd> init-fd ] dip ] }
-        { [ err_no EINTR = ] [ 2drop (accept) ] }
-        { [ err_no EAGAIN = ] [
-            2drop
-            [ drop +input+ wait-for-port ]
-            [ (accept) ]
-            2bi
-        ] }
-        [ (io-error) ]
-    } cond ;
-
-! Datagram sockets - UDP and Unix domain
-M: unix (datagram)
-    [ SOCK_DGRAM server-socket-fd ] with-destructors ;
-
-SYMBOL: receive-buffer
-
-: packet-size 65536 ; inline
-
-[ packet-size malloc receive-buffer set-global ] "io.unix.sockets" add-init-hook
-
-:: do-receive ( port -- packet sockaddr )
-    port addr>> empty-sockaddr/size [| sockaddr len |
-        port handle>> handle-fd ! s
-        receive-buffer get-global ! buf
-        packet-size ! nbytes
-        0 ! flags
-        sockaddr ! from
-        len <int> ! fromlen
-        recvfrom dup 0 >= [
-            receive-buffer get-global swap memory>byte-array sockaddr
-        ] [
-            drop f f
-        ] if
-    ] call ;
-
-M: unix (receive) ( datagram -- packet sockaddr )
-    dup do-receive dup [ [ drop ] 2dip ] [
-        2drop [ +input+ wait-for-port ] [ (receive) ] bi
-    ] if ;
-
-:: do-send ( packet sockaddr len socket datagram -- )
-    socket handle-fd packet dup length 0 sockaddr len sendto
-    0 < [
-        err_no EINTR = [
-            packet sockaddr len socket datagram do-send
-        ] [
-            err_no EAGAIN = [
-                datagram +output+ wait-for-port
-                packet sockaddr len socket datagram do-send
-            ] [
-                (io-error)
-            ] if
-        ] if
-    ] when ;
-
-M: unix (send) ( packet addrspec datagram -- )
-    [ make-sockaddr/size ] [ [ handle>> ] keep ] bi* do-send ;
-
-! Unix domain sockets
-M: local protocol-family drop PF_UNIX ;
-
-M: local sockaddr-size drop "sockaddr-un" heap-size ;
-
-M: local empty-sockaddr drop "sockaddr-un" <c-object> ;
-
-M: local make-sockaddr
-    path>> (normalize-path)
-    dup length 1 + max-un-path > [ "Path too long" throw ] when
-    "sockaddr-un" <c-object>
-    AF_UNIX over set-sockaddr-un-family
-    dup sockaddr-un-path rot utf8 string>alien dup length memcpy ;
-
-M: local parse-sockaddr
-    drop
-    sockaddr-un-path utf8 alien>string <local> ;
diff --git a/basis/io/unix/sockets/summary.txt b/basis/io/unix/sockets/summary.txt
deleted file mode 100644 (file)
index 22342ec..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Implementation of TCP/IP and UDP/IP sockets on Unix-like systems
diff --git a/basis/io/unix/sockets/tags.txt b/basis/io/unix/sockets/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/summary.txt b/basis/io/unix/summary.txt
deleted file mode 100644 (file)
index 8f66d88..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Non-blocking I/O and sockets on Unix-like systems
diff --git a/basis/io/unix/tags.txt b/basis/io/unix/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/unix/unix-tests.factor b/basis/io/unix/unix-tests.factor
deleted file mode 100644 (file)
index df61420..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-USING: io.files io.sockets io kernel threads
-namespaces tools.test continuations strings byte-arrays
-sequences prettyprint system io.encodings.binary io.encodings.ascii
-io.streams.duplex destructors make ;
-IN: io.unix.tests
-
-! Unix domain stream sockets
-: socket-server "unix-domain-socket-test" temp-file ;
-
-[
-    [ socket-server delete-file ] ignore-errors
-
-    socket-server <local>
-    ascii <server> [
-        accept drop [
-            "Hello world" print flush
-            readln "XYZ" = "FOO" "BAR" ? print flush
-        ] with-stream
-    ] with-disposal
-
-    socket-server delete-file
-] "Test" spawn drop
-
-yield
-
-[ { "Hello world" "FOO" } ] [
-    [
-        socket-server <local> ascii [
-            readln ,
-            "XYZ" print flush
-            readln ,
-        ] with-client
-    ] { } make
-] unit-test
-
-: datagram-server "unix-domain-datagram-test" temp-file ;
-: datagram-client "unix-domain-datagram-test-2" temp-file ;
-
-! Unix domain datagram sockets
-[ datagram-server delete-file ] ignore-errors
-[ datagram-client delete-file ] ignore-errors
-
-[
-    [
-        datagram-server <local> <datagram> "d" set
-
-        "Receive 1" print
-
-        "d" get receive [ reverse ] dip
-        
-        "Send 1" print
-        dup .
-
-        "d" get send
-
-        "Receive 2" print
-
-        "d" get receive [ " world" append ] dip
-        
-        "Send 1" print
-        dup .
-
-         "d" get send
-
-        "d" get dispose
-
-        "Done" print
-
-        datagram-server delete-file
-    ] with-scope
-] "Test" spawn drop
-
-yield
-
-[ datagram-client delete-file ] ignore-errors
-
-datagram-client <local> <datagram>
-"d" set
-
-[ ] [
-    "hello" >byte-array
-    datagram-server <local>
-    "d" get send
-] unit-test
-
-[ "olleh" t ] [
-    "d" get receive
-    datagram-server <local> =
-    [ >string ] dip
-] unit-test
-
-[ ] [
-    "hello" >byte-array
-    datagram-server <local>
-    "d" get send
-] unit-test
-
-[ "hello world" t ] [
-    "d" get receive
-    datagram-server <local> =
-    [ >string ] dip
-] unit-test
-
-[ ] [ "d" get dispose ] unit-test
-
-! Test error behavior
-: another-datagram "unix-domain-datagram-test-3" temp-file ;
-
-[ another-datagram delete-file ] ignore-errors
-
-datagram-client delete-file
-
-[ ] [ datagram-client <local> <datagram> "d" set ] unit-test
-
-[ B{ 1 2 3 } another-datagram <local> "d" get send ] must-fail
-
-[ ] [ "d" get dispose ] unit-test
-
-! See what happens on send/receive after close
-
-[ "d" get receive ] must-fail
-
-[ B{ 1 2 } datagram-server <local> "d" get send ] must-fail
-
-! Invalid parameter tests
-
-[
-    image binary [ input-stream get accept ] with-file-reader
-] must-fail
-
-[
-    image binary [ input-stream get receive ] with-file-reader
-] must-fail
-
-[
-    image binary [
-        B{ 1 2 } datagram-server <local>
-        input-stream get send
-    ] with-file-reader
-] must-fail
diff --git a/basis/io/unix/unix.factor b/basis/io/unix/unix.factor
deleted file mode 100644 (file)
index 93b5fa6..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-USING: accessors system words sequences vocabs.loader
-io.unix.backend io.unix.files ;
-
-"io.unix." os name>> append require
diff --git a/basis/io/windows/authors.txt b/basis/io/windows/authors.txt
deleted file mode 100644 (file)
index 781acc2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Doug Coleman
-Mackenzie Straight
diff --git a/basis/io/windows/files/files.factor b/basis/io/windows/files/files.factor
deleted file mode 100755 (executable)
index 664727d..0000000
+++ /dev/null
@@ -1,378 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: alien.c-types io.binary io.backend io.files io.buffers
-io.encodings.utf16n io.ports io.windows kernel math splitting
-fry alien.strings windows windows.kernel32 windows.time calendar
-combinators math.functions sequences namespaces make words
-symbols system destructors accessors math.bitwise continuations
-windows.errors arrays byte-arrays generalizations ;
-IN: io.windows.files
-
-: open-file ( path access-mode create-mode flags -- handle )
-    [
-        [ share-mode default-security-attributes ] 2dip
-        CreateFile-flags f CreateFile opened-file
-    ] with-destructors ;
-
-: open-pipe-r/w ( path -- win32-file )
-    { GENERIC_READ GENERIC_WRITE } flags
-    OPEN_EXISTING 0 open-file ;
-
-: open-read ( path -- win32-file )
-    GENERIC_READ OPEN_EXISTING 0 open-file 0 >>ptr ;
-
-: open-write ( path -- win32-file )
-    GENERIC_WRITE CREATE_ALWAYS 0 open-file 0 >>ptr ;
-
-: (open-append) ( path -- win32-file )
-    GENERIC_WRITE OPEN_ALWAYS 0 open-file ;
-
-: open-existing ( path -- win32-file )
-    { GENERIC_READ GENERIC_WRITE } flags
-    share-mode
-    f
-    OPEN_EXISTING
-    FILE_FLAG_BACKUP_SEMANTICS
-    f CreateFileW dup win32-error=0/f <win32-file> ;
-
-: maybe-create-file ( path -- win32-file ? )
-    #! return true if file was just created
-    { GENERIC_READ GENERIC_WRITE } flags
-    share-mode
-    f
-    OPEN_ALWAYS
-    0 CreateFile-flags
-    f CreateFileW dup win32-error=0/f <win32-file>
-    GetLastError ERROR_ALREADY_EXISTS = not ;
-
-: set-file-pointer ( handle length method -- )
-    [ dupd d>w/w <uint> ] dip SetFilePointer
-    INVALID_SET_FILE_POINTER = [
-        CloseHandle "SetFilePointer failed" throw
-    ] when drop ;
-
-HOOK: open-append os ( path -- win32-file )
-
-TUPLE: FileArgs
-    hFile lpBuffer nNumberOfBytesToRead
-    lpNumberOfBytesRet lpOverlapped ;
-
-C: <FileArgs> FileArgs
-
-: make-FileArgs ( port -- <FileArgs> )
-    {
-        [ handle>> check-disposed ]
-        [ handle>> handle>> ]
-        [ buffer>> ]
-        [ buffer>> buffer-length ]
-        [ drop "DWORD" <c-object> ]
-        [ FileArgs-overlapped ]
-    } cleave <FileArgs> ;
-
-: setup-read ( <FileArgs> -- hFile lpBuffer nNumberOfBytesToRead lpNumberOfBytesRead lpOverlapped )
-    {
-        [ hFile>> ]
-        [ lpBuffer>> buffer-end ]
-        [ lpBuffer>> buffer-capacity ]
-        [ lpNumberOfBytesRet>> ]
-        [ lpOverlapped>> ]
-    } cleave ;
-
-: setup-write ( <FileArgs> -- hFile lpBuffer nNumberOfBytesToWrite lpNumberOfBytesWritten lpOverlapped )
-    {
-        [ hFile>> ]
-        [ lpBuffer>> buffer@ ]
-        [ lpBuffer>> buffer-length ]
-        [ lpNumberOfBytesRet>> ]
-        [ lpOverlapped>> ]
-    } cleave ;
-
-M: windows (file-reader) ( path -- stream )
-    open-read <input-port> ;
-
-M: windows (file-writer) ( path -- stream )
-    open-write <output-port> ;
-
-M: windows (file-appender) ( path -- stream )
-    open-append <output-port> ;
-
-M: windows move-file ( from to -- )
-    [ normalize-path ] bi@ MoveFile win32-error=0/f ;
-
-M: windows delete-file ( path -- )
-    normalize-path DeleteFile win32-error=0/f ;
-
-M: windows copy-file ( from to -- )
-    dup parent-directory make-directories
-    [ normalize-path ] bi@ 0 CopyFile win32-error=0/f ;
-
-M: windows make-directory ( path -- )
-    normalize-path
-    f CreateDirectory win32-error=0/f ;
-
-M: windows delete-directory ( path -- )
-    normalize-path
-    RemoveDirectory win32-error=0/f ;
-
-: find-first-file ( path -- WIN32_FIND_DATA handle )
-    "WIN32_FIND_DATA" <c-object> tuck
-    FindFirstFile
-    [ INVALID_HANDLE_VALUE = [ win32-error-string throw ] when ] keep ;
-
-: find-next-file ( path -- WIN32_FIND_DATA/f )
-    "WIN32_FIND_DATA" <c-object> tuck
-    FindNextFile 0 = [
-        GetLastError ERROR_NO_MORE_FILES = [
-            win32-error
-        ] unless drop f
-    ] when ;
-
-M: windows (directory-entries) ( path -- seq )
-    "\\" ?tail drop "\\*" append
-    find-first-file [ >directory-entry ] dip
-    [
-        '[
-            [ _ find-next-file dup ]
-            [ >directory-entry ]
-            [ drop ] produce
-            over name>> "." = [ nip ] [ swap prefix ] if
-        ]
-    ] [ '[ _ FindClose win32-error=0/f ] ] bi [ ] cleanup ;
-
-SYMBOLS: +read-only+ +hidden+ +system+
-+archive+ +device+ +normal+ +temporary+
-+sparse-file+ +reparse-point+ +compressed+ +offline+
-+not-content-indexed+ +encrypted+ ;
-
-TUPLE: windows-file-info < file-info attributes ;
-
-: win32-file-attribute ( n attr symbol -- )
-    rot mask? [ , ] [ drop ] if ;
-
-: win32-file-attributes ( n -- seq )
-    [
-        {
-            [ +read-only+ FILE_ATTRIBUTE_READONLY win32-file-attribute ]
-            [ +hidden+ FILE_ATTRIBUTE_HIDDEN win32-file-attribute ]
-            [ +system+ FILE_ATTRIBUTE_SYSTEM win32-file-attribute ]
-            [ +directory+ FILE_ATTRIBUTE_DIRECTORY win32-file-attribute ]
-            [ +archive+ FILE_ATTRIBUTE_ARCHIVE win32-file-attribute ]
-            [ +device+ FILE_ATTRIBUTE_DEVICE win32-file-attribute ]
-            [ +normal+ FILE_ATTRIBUTE_NORMAL win32-file-attribute ]
-            [ +temporary+ FILE_ATTRIBUTE_TEMPORARY win32-file-attribute ]
-            [ +sparse-file+ FILE_ATTRIBUTE_SPARSE_FILE win32-file-attribute ]
-            [ +reparse-point+ FILE_ATTRIBUTE_REPARSE_POINT win32-file-attribute ]
-            [ +compressed+ FILE_ATTRIBUTE_COMPRESSED win32-file-attribute ]
-            [ +offline+ FILE_ATTRIBUTE_OFFLINE win32-file-attribute ]
-            [ +not-content-indexed+ FILE_ATTRIBUTE_NOT_CONTENT_INDEXED win32-file-attribute ]
-            [ +encrypted+ FILE_ATTRIBUTE_ENCRYPTED win32-file-attribute ]
-        } cleave
-    ] { } make ;
-
-: win32-file-type ( n -- symbol )
-    FILE_ATTRIBUTE_DIRECTORY mask? +directory+ +regular-file+ ? ;
-
-TUPLE: windows-directory-entry < directory-entry attributes ;
-
-M: windows >directory-entry ( byte-array -- directory-entry )
-    [ WIN32_FIND_DATA-cFileName utf16n alien>string ]
-    [ WIN32_FIND_DATA-dwFileAttributes win32-file-type ]
-    [ WIN32_FIND_DATA-dwFileAttributes win32-file-attributes ]
-    tri
-    dupd remove windows-directory-entry boa ;
-
-: WIN32_FIND_DATA>file-info ( WIN32_FIND_DATA -- file-info )
-    [ \ windows-file-info new ] dip
-    {
-        [ WIN32_FIND_DATA-dwFileAttributes win32-file-type >>type ]
-        [ WIN32_FIND_DATA-dwFileAttributes win32-file-attributes >>attributes ]
-        [
-            [ WIN32_FIND_DATA-nFileSizeLow ]
-            [ WIN32_FIND_DATA-nFileSizeHigh ] bi >64bit >>size
-        ]
-        [ WIN32_FIND_DATA-dwFileAttributes >>permissions ]
-        [ WIN32_FIND_DATA-ftCreationTime FILETIME>timestamp >>created ]
-        [ WIN32_FIND_DATA-ftLastWriteTime FILETIME>timestamp >>modified ]
-        [ WIN32_FIND_DATA-ftLastAccessTime FILETIME>timestamp >>accessed ]
-    } cleave ;
-
-: find-first-file-stat ( path -- WIN32_FIND_DATA )
-    "WIN32_FIND_DATA" <c-object> [
-        FindFirstFile
-        [ INVALID_HANDLE_VALUE = [ win32-error ] when ] keep
-        FindClose win32-error=0/f
-    ] keep ;
-
-: BY_HANDLE_FILE_INFORMATION>file-info ( HANDLE_FILE_INFORMATION -- file-info )
-    [ \ windows-file-info new ] dip
-    {
-        [ BY_HANDLE_FILE_INFORMATION-dwFileAttributes win32-file-type >>type ]
-        [ BY_HANDLE_FILE_INFORMATION-dwFileAttributes win32-file-attributes >>attributes ]
-        [
-            [ BY_HANDLE_FILE_INFORMATION-nFileSizeLow ]
-            [ BY_HANDLE_FILE_INFORMATION-nFileSizeHigh ] bi >64bit >>size
-        ]
-        [ BY_HANDLE_FILE_INFORMATION-dwFileAttributes >>permissions ]
-        [
-            BY_HANDLE_FILE_INFORMATION-ftCreationTime
-            FILETIME>timestamp >>created
-        ]
-        [
-            BY_HANDLE_FILE_INFORMATION-ftLastWriteTime
-            FILETIME>timestamp >>modified
-        ]
-        [
-            BY_HANDLE_FILE_INFORMATION-ftLastAccessTime
-            FILETIME>timestamp >>accessed
-        ]
-        ! [ BY_HANDLE_FILE_INFORMATION-nNumberOfLinks ]
-        ! [
-          ! [ BY_HANDLE_FILE_INFORMATION-nFileIndexLow ]
-          ! [ BY_HANDLE_FILE_INFORMATION-nFileIndexHigh ] bi >64bit
-        ! ]
-    } cleave ;
-
-: get-file-information ( handle -- BY_HANDLE_FILE_INFORMATION )
-    [
-        "BY_HANDLE_FILE_INFORMATION" <c-object>
-        [ GetFileInformationByHandle win32-error=0/f ] keep
-    ] keep CloseHandle win32-error=0/f ;
-
-: get-file-information-stat ( path -- BY_HANDLE_FILE_INFORMATION )
-    dup
-    GENERIC_READ FILE_SHARE_READ f
-    OPEN_EXISTING FILE_FLAG_BACKUP_SEMANTICS f
-    CreateFileW dup INVALID_HANDLE_VALUE = [
-        drop find-first-file-stat WIN32_FIND_DATA>file-info
-    ] [
-        nip
-        get-file-information BY_HANDLE_FILE_INFORMATION>file-info
-    ] if ;
-
-M: winnt file-info ( path -- info )
-    normalize-path get-file-information-stat ;
-
-M: winnt link-info ( path -- info )
-    file-info ;
-
-HOOK: root-directory os ( string -- string' )
-
-: volume-information ( normalized-path -- volume-name volume-serial max-component flags type )
-    MAX_PATH 1+ [ <byte-array> ] keep
-    "DWORD" <c-object>
-    "DWORD" <c-object>
-    "DWORD" <c-object>
-    MAX_PATH 1+ [ <byte-array> ] keep
-    [ GetVolumeInformation win32-error=0/f ] 7 nkeep
-    drop 5 nrot drop
-    [ utf16n alien>string ] 4 ndip
-    utf16n alien>string ;
-
-: file-system-space ( normalized-path -- available-space total-space free-space )
-    "ULARGE_INTEGER" <c-object>
-    "ULARGE_INTEGER" <c-object>
-    "ULARGE_INTEGER" <c-object>
-    [ GetDiskFreeSpaceEx win32-error=0/f ] 3keep ;
-
-: calculate-file-system-info ( file-system-info -- file-system-info' )
-    {
-        [ dup [ total-space>> ] [ free-space>> ] bi - >>used-space drop ]
-        [ ]
-    } cleave ;
-
-TUPLE: win32-file-system-info < file-system-info max-component flags device-serial ;
-
-M: winnt file-system-info ( path -- file-system-info )
-    normalize-path root-directory
-    dup [ volume-information ] [ file-system-space ] bi
-    \ win32-file-system-info new
-        swap *ulonglong >>free-space
-        swap *ulonglong >>total-space
-        swap *ulonglong >>available-space
-        swap >>type
-        swap *uint >>flags
-        swap *uint >>max-component
-        swap *uint >>device-serial
-        swap >>device-name
-        swap >>mount-point
-    calculate-file-system-info ;
-
-: volume>paths ( string -- array )
-    16384 "ushort" <c-array> tuck dup length
-    0 <uint> dup [ GetVolumePathNamesForVolumeName 0 = ] dip swap [
-        win32-error-string throw
-    ] [
-        *uint "ushort" heap-size * head
-        utf16n alien>string CHAR: \0 split
-    ] if ;
-
-: find-first-volume ( -- string handle )
-    MAX_PATH 1+ [ <byte-array> ] keep
-    dupd
-    FindFirstVolume dup win32-error=0/f
-    [ utf16n alien>string ] dip ;
-
-: find-next-volume ( handle -- string/f )
-    MAX_PATH 1+ [ <byte-array> tuck ] keep
-    FindNextVolume 0 = [
-        GetLastError ERROR_NO_MORE_FILES =
-        [ drop f ] [ win32-error-string throw ] if
-    ] [
-        utf16n alien>string
-    ] if ;
-
-: find-volumes ( -- array )
-    find-first-volume
-    [
-        '[
-            [ _ find-next-volume dup ]
-            [ ]
-            [ drop ] produce
-            swap prefix
-        ]
-    ] [ '[ _ FindVolumeClose win32-error=0/f ] ] bi [ ] cleanup ;
-
-M: winnt file-systems ( -- array )
-    find-volumes [ volume>paths ] map
-    concat [
-        [ file-system-info ]
-        [ drop \ file-system-info new swap >>mount-point ] recover
-    ] map ;
-
-: file-times ( path -- timestamp timestamp timestamp )
-    [
-        normalize-path open-existing &dispose handle>>
-        "FILETIME" <c-object>
-        "FILETIME" <c-object>
-        "FILETIME" <c-object>
-        [ GetFileTime win32-error=0/f ] 3keep
-        [ FILETIME>timestamp >local-time ] tri@
-    ] with-destructors ;
-
-: (set-file-times) ( handle timestamp/f timestamp/f timestamp/f -- )
-    [ timestamp>FILETIME ] tri@
-    SetFileTime win32-error=0/f ;
-
-: set-file-times ( path timestamp/f timestamp/f timestamp/f -- )
-    #! timestamp order: creation access write
-    [
-        [
-            normalize-path open-existing &dispose handle>>
-        ] 3dip (set-file-times)
-    ] with-destructors ;
-
-: set-file-create-time ( path timestamp -- )
-    f f set-file-times ;
-
-: set-file-access-time ( path timestamp -- )
-    [ f ] dip f set-file-times ;
-
-: set-file-write-time ( path timestamp -- )
-    [ f f ] dip set-file-times ;
-
-M: winnt touch-file ( path -- )
-    [
-        normalize-path
-        maybe-create-file [ &dispose ] dip
-        [ drop ] [ handle>> f now dup (set-file-times) ] if
-    ] with-destructors ;
diff --git a/basis/io/windows/files/tags.txt b/basis/io/windows/files/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/windows/files/unique/tags.txt b/basis/io/windows/files/unique/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/windows/files/unique/unique.factor b/basis/io/windows/files/unique/unique.factor
deleted file mode 100644 (file)
index ab99bf2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-USING: kernel system windows.kernel32 io.windows
-io.windows.files io.ports windows destructors environment
-io.files.unique ;
-IN: io.windows.files.unique
-
-M: windows touch-unique-file ( path -- )
-    GENERIC_WRITE CREATE_NEW 0 open-file dispose ;
-
-M: windows temporary-path ( -- path )
-    "TEMP" os-env ;
diff --git a/basis/io/windows/launcher/authors.txt b/basis/io/windows/launcher/authors.txt
deleted file mode 100755 (executable)
index 5674120..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Doug Coleman
-Slava Pestov
diff --git a/basis/io/windows/launcher/launcher-tests.factor b/basis/io/windows/launcher/launcher-tests.factor
deleted file mode 100644 (file)
index 1dba8bd..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-IN: io.windows.launcher.tests\r
-USING: tools.test io.windows.launcher ;\r
-\r
-[ "hello world" ] [ { "hello" "world" } join-arguments ] unit-test\r
-\r
-[ "bob \"mac arthur\"" ] [ { "bob" "mac arthur" } join-arguments ] unit-test\r
-\r
-[ "bob mac\\\\arthur" ] [ { "bob" "mac\\\\arthur" } join-arguments ] unit-test\r
-\r
-[ "bob \"mac arthur\\\\\"" ] [ { "bob" "mac arthur\\" } join-arguments ] unit-test\r
diff --git a/basis/io/windows/launcher/launcher.factor b/basis/io/windows/launcher/launcher.factor
deleted file mode 100644 (file)
index fd31ca9..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-! Copyright (C) 2007, 2008 Doug Coleman, Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: alien alien.c-types arrays continuations io
-io.windows io.windows.nt.pipes libc io.ports
-windows.types math windows.kernel32
-namespaces make io.launcher kernel sequences windows.errors
-splitting system threads init strings combinators
-io.backend accessors concurrency.flags io.files assocs
-io.files.private windows destructors specialized-arrays.ushort
-specialized-arrays.alien ;
-IN: io.windows.launcher
-
-TUPLE: CreateProcess-args
-       lpApplicationName
-       lpCommandLine
-       lpProcessAttributes
-       lpThreadAttributes
-       bInheritHandles
-       dwCreateFlags
-       lpEnvironment
-       lpCurrentDirectory
-       lpStartupInfo
-       lpProcessInformation ;
-
-: default-CreateProcess-args ( -- obj )
-    CreateProcess-args new
-    "STARTUPINFO" <c-object>
-    "STARTUPINFO" heap-size over set-STARTUPINFO-cb >>lpStartupInfo
-    "PROCESS_INFORMATION" <c-object> >>lpProcessInformation
-    TRUE >>bInheritHandles
-    0 >>dwCreateFlags ;
-
-: call-CreateProcess ( CreateProcess-args -- )
-    {
-        [ lpApplicationName>> ]
-        [ lpCommandLine>> ]
-        [ lpProcessAttributes>> ]
-        [ lpThreadAttributes>> ]
-        [ bInheritHandles>> ]
-        [ dwCreateFlags>> ]
-        [ lpEnvironment>> ]
-        [ lpCurrentDirectory>> ]
-        [ lpStartupInfo>> ]
-        [ lpProcessInformation>> ]
-    } cleave
-    CreateProcess win32-error=0/f ;
-
-: count-trailing-backslashes ( str n -- str n )
-    [ "\\" ?tail ] dip swap [
-        1+ count-trailing-backslashes
-    ] when ;
-
-: fix-trailing-backslashes ( str -- str' )
-    0 count-trailing-backslashes
-    2 * CHAR: \\ <repetition> append ;
-
-: escape-argument ( str -- newstr )
-    CHAR: \s over member? [
-        fix-trailing-backslashes "\"" dup surround
-    ] when ;
-
-: join-arguments ( args -- cmd-line )
-    [ escape-argument ] map " " join ;
-
-: lookup-priority ( process -- n )
-    priority>> {
-        { +lowest-priority+ [ IDLE_PRIORITY_CLASS ] }
-        { +low-priority+ [ BELOW_NORMAL_PRIORITY_CLASS ] }
-        { +normal-priority+ [ NORMAL_PRIORITY_CLASS ] }
-        { +high-priority+ [ ABOVE_NORMAL_PRIORITY_CLASS ] }
-        { +highest-priority+ [ HIGH_PRIORITY_CLASS ] }
-        { +realtime-priority+ [ REALTIME_PRIORITY_CLASS ] }
-        [ drop f ]
-    } case ;
-
-: app-name/cmd-line ( process -- app-name cmd-line )
-    command>> dup string? [
-        " " split1
-    ] [
-        unclip swap join-arguments
-    ] if ;
-
-: cmd-line ( process -- cmd-line )
-    command>> dup string? [ join-arguments ] unless ;
-
-: fill-lpApplicationName ( process args -- process args )
-    over app-name/cmd-line
-    [ >>lpApplicationName ] [ >>lpCommandLine ] bi* ;
-
-: fill-lpCommandLine ( process args -- process args )
-    over cmd-line >>lpCommandLine ;
-
-: fill-dwCreateFlags ( process args -- process args )
-    0
-    pick pass-environment? [ CREATE_UNICODE_ENVIRONMENT bitor ] when
-    pick detached>> os winnt? and [ DETACHED_PROCESS bitor ] when
-    pick lookup-priority [ bitor ] when*
-    >>dwCreateFlags ;
-
-: fill-lpEnvironment ( process args -- process args )
-    over pass-environment? [
-        [
-            over get-environment
-            [ swap % "=" % % "\0" % ] assoc-each
-            "\0" %
-        ] ushort-array{ } make underlying>>
-        >>lpEnvironment
-    ] when ;
-
-: fill-startup-info ( process args -- process args )
-    STARTF_USESTDHANDLES over lpStartupInfo>> set-STARTUPINFO-dwFlags ;
-
-HOOK: fill-redirection io-backend ( process args -- )
-
-M: wince fill-redirection 2drop ;
-
-: make-CreateProcess-args ( process -- args )
-    default-CreateProcess-args
-    os wince? [ fill-lpApplicationName ] [ fill-lpCommandLine ] if
-    fill-dwCreateFlags
-    fill-lpEnvironment
-    fill-startup-info
-    nip ;
-
-M: windows current-process-handle ( -- handle )
-    GetCurrentProcessId ;
-
-M: windows run-process* ( process -- handle )
-    [
-        current-directory get (normalize-path) cd
-
-        dup make-CreateProcess-args
-        tuck fill-redirection
-        dup call-CreateProcess
-        lpProcessInformation>>
-    ] with-destructors ;
-
-M: windows kill-process* ( handle -- )
-    PROCESS_INFORMATION-hProcess
-    255 TerminateProcess win32-error=0/f ;
-
-: dispose-process ( process-information -- )
-    #! From MSDN: "Handles in PROCESS_INFORMATION must be closed
-    #! with CloseHandle when they are no longer needed."
-    dup PROCESS_INFORMATION-hProcess [ CloseHandle drop ] when*
-    PROCESS_INFORMATION-hThread [ CloseHandle drop ] when* ;
-
-: exit-code ( process -- n )
-    PROCESS_INFORMATION-hProcess
-    0 <ulong> [ GetExitCodeProcess ] keep *ulong
-    swap win32-error=0/f ;
-
-: process-exited ( process -- )
-    dup handle>> exit-code
-    over handle>> dispose-process
-    notify-exit ;
-
-M: windows wait-for-processes ( -- ? )
-    processes get keys dup
-    [ handle>> PROCESS_INFORMATION-hProcess ] void*-array{ } map-as
-    [ length ] [ underlying>> ] bi 0 0
-    WaitForMultipleObjects
-    dup HEX: ffffffff = [ win32-error ] when
-    dup WAIT_TIMEOUT = [ 2drop t ] [ swap nth process-exited f ] if ;
diff --git a/basis/io/windows/launcher/tags.txt b/basis/io/windows/launcher/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/windows/mmap/authors.txt b/basis/io/windows/mmap/authors.txt
deleted file mode 100755 (executable)
index 7c1b2f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/basis/io/windows/mmap/mmap.factor b/basis/io/windows/mmap/mmap.factor
deleted file mode 100644 (file)
index e5b0d10..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-USING: alien alien.c-types arrays destructors generic io.mmap
-io.ports io.windows io.windows.files io.windows.privileges
-kernel libc math math.bitwise namespaces quotations sequences
-windows windows.advapi32 windows.kernel32 io.backend system
-accessors locals ;
-IN: io.windows.mmap
-
-: create-file-mapping ( hFile lpAttributes flProtect dwMaximumSizeHigh dwMaximumSizeLow lpName -- HANDLE )
-    CreateFileMapping [ win32-error=0/f ] keep <win32-handle> ;
-
-: map-view-of-file ( hFileMappingObject dwDesiredAccess dwFileOffsetHigh dwFileOffsetLow dwNumberOfBytesToMap -- HANDLE )
-    MapViewOfFile [ win32-error=0/f ] keep ;
-
-:: mmap-open ( path length access-mode create-mode protect access -- handle handle address )
-    [let | lo [ length HEX: ffffffff bitand ]
-           hi [ length -32 shift HEX: ffffffff bitand ] |
-        { "SeCreateGlobalPrivilege" "SeLockMemoryPrivilege" } [
-            path access-mode create-mode 0 open-file |dispose
-            dup handle>> f protect hi lo f create-file-mapping |dispose
-            dup handle>> access 0 0 0 map-view-of-file
-        ] with-privileges
-    ] ;
-
-TUPLE: win32-mapped-file file mapping ;
-
-M: win32-mapped-file dispose
-    [ file>> dispose ] [ mapping>> dispose ] bi ;
-
-C: <win32-mapped-file> win32-mapped-file
-
-M: windows (mapped-file)
-    [
-        { GENERIC_WRITE GENERIC_READ } flags
-        OPEN_ALWAYS
-        { PAGE_READWRITE SEC_COMMIT } flags
-        FILE_MAP_ALL_ACCESS mmap-open
-        -rot <win32-mapped-file>
-    ] with-destructors ;
-
-M: windows close-mapped-file ( mapped-file -- )
-    [
-        [ handle>> &dispose drop ]
-        [ address>> UnmapViewOfFile win32-error=0/f ] bi
-    ] with-destructors ;
diff --git a/basis/io/windows/mmap/tags.txt b/basis/io/windows/mmap/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/windows/nt/authors.txt b/basis/io/windows/nt/authors.txt
deleted file mode 100644 (file)
index 781acc2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Doug Coleman
-Mackenzie Straight
diff --git a/basis/io/windows/nt/backend/authors.txt b/basis/io/windows/nt/backend/authors.txt
deleted file mode 100755 (executable)
index 026f4cd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Doug Coleman
-Slava Pestov
-Mackenzie Straight
diff --git a/basis/io/windows/nt/backend/backend.factor b/basis/io/windows/nt/backend/backend.factor
deleted file mode 100644 (file)
index 8035bd6..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-USING: alien alien.c-types arrays assocs combinators
-continuations destructors io io.backend io.ports io.timeouts
-io.windows io.windows.files io.files io.buffers io.streams.c
-libc kernel math namespaces sequences threads windows
-windows.errors windows.kernel32 strings splitting qualified
-ascii system accessors locals ;
-QUALIFIED: windows.winsock
-IN: io.windows.nt.backend
-
-! Global variable with assoc mapping overlapped to threads
-SYMBOL: pending-overlapped
-
-TUPLE: io-callback port thread ;
-
-C: <io-callback> io-callback
-
-: (make-overlapped) ( -- overlapped-ext )
-    "OVERLAPPED" malloc-object &free ;
-
-: make-overlapped ( port -- overlapped-ext )
-    [ (make-overlapped) ] dip
-    handle>> ptr>> [ over set-OVERLAPPED-offset ] when* ;
-
-: <completion-port> ( handle existing -- handle )
-     f 1 CreateIoCompletionPort dup win32-error=0/f ;
-
-SYMBOL: master-completion-port
-
-: <master-completion-port> ( -- handle )
-    INVALID_HANDLE_VALUE f <completion-port> ;
-
-M: winnt add-completion ( win32-handle -- )
-    handle>> master-completion-port get-global <completion-port> drop ;
-
-: eof? ( error -- ? )
-    [ ERROR_HANDLE_EOF = ] [ ERROR_BROKEN_PIPE = ] bi or ;
-
-: twiddle-thumbs ( overlapped port -- bytes-transferred )
-    [
-        drop
-        [ pending-overlapped get-global set-at ] curry "I/O" suspend
-        {
-            { [ dup integer? ] [ ] }
-            { [ dup array? ] [
-                first dup eof?
-                [ drop 0 ] [ (win32-error-string) throw ] if
-            ] }
-        } cond
-    ] with-timeout ;
-
-:: wait-for-overlapped ( us -- bytes-transferred overlapped error? )
-    master-completion-port get-global
-    0 <int> [ ! bytes
-        f <void*> ! key
-        f <void*> [ ! overlapped
-            us [ 1000 /i ] [ INFINITE ] if* ! timeout
-            GetQueuedCompletionStatus zero?
-        ] keep *void*
-    ] keep *int spin ;
-
-: resume-callback ( result overlapped -- )
-    pending-overlapped get-global delete-at* drop resume-with ;
-
-: handle-overlapped ( us -- ? )
-    wait-for-overlapped [
-        dup [
-            [ drop GetLastError 1array ] dip resume-callback t
-        ] [ 2drop f ] if
-    ] [ resume-callback t ] if ;
-
-M: win32-handle cancel-operation
-    [ check-disposed ] [ handle>> CancelIo drop ] bi ;
-
-M: winnt io-multiplex ( us -- )
-    handle-overlapped [ 0 io-multiplex ] when ;
-
-M: winnt init-io ( -- )
-    <master-completion-port> master-completion-port set-global
-    H{ } clone pending-overlapped set-global
-    windows.winsock:init-winsock ;
-
-: file-error? ( n -- eof? )
-    zero? [
-        GetLastError {
-            { [ dup expected-io-error? ] [ drop f ] }
-            { [ dup eof? ] [ drop t ] }
-            [ (win32-error-string) throw ]
-        } cond
-    ] [ f ] if ;
-
-: wait-for-file ( FileArgs n port -- n )
-    swap file-error?
-    [ 2drop 0 ] [ [ lpOverlapped>> ] dip twiddle-thumbs ] if ;
-
-: update-file-ptr ( n port -- )
-    handle>> dup ptr>> [ rot + >>ptr drop ] [ 2drop ] if* ;
-
-: finish-write ( n port -- )
-    [ update-file-ptr ] [ buffer>> buffer-consume ] 2bi ;
-
-M: winnt (wait-to-write)
-    [
-        [ make-FileArgs dup setup-write WriteFile ]
-        [ wait-for-file ]
-        [ finish-write ]
-        tri
-    ] with-destructors ;
-
-: finish-read ( n port -- )
-    [ update-file-ptr ] [ buffer>> n>buffer ] 2bi ;
-
-M: winnt (wait-to-read) ( port -- )
-    [
-        [ make-FileArgs dup setup-read ReadFile ]
-        [ wait-for-file ]
-        [ finish-read ]
-        tri
-    ] with-destructors ;
-
-M: winnt (init-stdio) init-c-stdio ;
diff --git a/basis/io/windows/nt/backend/tags.txt b/basis/io/windows/nt/backend/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/windows/nt/files/authors.txt b/basis/io/windows/nt/files/authors.txt
deleted file mode 100755 (executable)
index 026f4cd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Doug Coleman
-Slava Pestov
-Mackenzie Straight
diff --git a/basis/io/windows/nt/files/files-tests.factor b/basis/io/windows/nt/files/files-tests.factor
deleted file mode 100644 (file)
index 6620dd6..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-USING: io.files kernel tools.test io.backend
-io.windows.nt.files splitting sequences ;
-IN: io.windows.nt.files.tests
-
-[ f ] [ "\\foo" absolute-path? ] unit-test
-[ t ] [ "\\\\?\\c:\\foo" absolute-path? ] unit-test
-[ t ] [ "\\\\?\\c:\\" absolute-path? ] unit-test
-[ t ] [ "\\\\?\\c:" absolute-path? ] unit-test
-[ t ] [ "c:\\foo" absolute-path? ] unit-test
-[ t ] [ "c:" absolute-path? ] unit-test
-[ t ] [ "c:\\" absolute-path? ] unit-test
-[ f ] [ "/cygdrive/c/builds" absolute-path? ] unit-test
-
-[ "c:\\foo\\" ] [ "c:\\foo\\bar" parent-directory ] unit-test
-[ "c:\\" ] [ "c:\\foo\\" parent-directory ] unit-test
-[ "c:\\" ] [ "c:\\foo" parent-directory ] unit-test
-! { "c:" "c:\\" "c:/" } [ directory ] each -- all do the same thing
-[ "c:\\" ] [ "c:\\" parent-directory ] unit-test
-[ "Z:\\" ] [ "Z:\\" parent-directory ] unit-test
-[ "c:" ] [ "c:" parent-directory ] unit-test
-[ "Z:" ] [ "Z:" parent-directory ] unit-test
-
-[ f ] [ "" root-directory? ] unit-test
-[ t ] [ "\\" root-directory? ] unit-test
-[ t ] [ "\\\\" root-directory? ] unit-test
-[ t ] [ "/" root-directory? ] unit-test
-[ t ] [ "//" root-directory? ] unit-test
-[ t ] [ "c:\\" trim-right-separators root-directory? ] unit-test
-[ t ] [ "Z:\\" trim-right-separators root-directory? ] unit-test
-[ f ] [ "c:\\foo" root-directory? ] unit-test
-[ f ] [ "." root-directory? ] unit-test
-[ f ] [ ".." root-directory? ] unit-test
-[ t ] [ "\\\\?\\c:\\" root-directory? ] unit-test
-[ t ] [ "\\\\?\\c:" root-directory? ] unit-test
-[ f ] [ "\\\\?\\c:\\bar" root-directory? ] unit-test
-
-[ "\\foo\\bar" ] [ "/foo/bar" normalize-path ":" split1 nip ] unit-test
-
-[ "\\\\?\\C:\\builds\\factor\\log.txt" ] [
-    "C:\\builds\\factor\\12345\\"
-    "..\\log.txt" append-path normalize-path
-] unit-test
-
-[ "\\\\?\\C:\\builds\\" ] [
-    "C:\\builds\\factor\\12345\\"
-    "..\\.." append-path normalize-path
-] unit-test
-
-[ "\\\\?\\C:\\builds\\" ] [
-    "C:\\builds\\factor\\12345\\"
-    "..\\.." append-path normalize-path
-] unit-test
-
-[ "c:\\blah" ] [ "c:\\foo\\bar" "\\blah" append-path ] unit-test
-[ t ] [ "" resource-path 2 tail exists? ] unit-test
diff --git a/basis/io/windows/nt/files/files.factor b/basis/io/windows/nt/files/files.factor
deleted file mode 100755 (executable)
index 892a5c4..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-USING: continuations destructors io.buffers io.files io.backend
-io.timeouts io.ports io.files.private io.windows
-io.windows.files io.windows.nt.backend io.encodings.utf16n
-windows windows.kernel32 kernel libc math threads system
-environment alien.c-types alien.arrays alien.strings sequences
-combinators combinators.short-circuit ascii splitting alien
-strings assocs namespaces make accessors tr ;
-IN: io.windows.nt.files
-
-M: winnt cwd
-    MAX_UNICODE_PATH dup "ushort" <c-array>
-    [ GetCurrentDirectory win32-error=0/f ] keep
-    utf16n alien>string ;
-
-M: winnt cd
-    SetCurrentDirectory win32-error=0/f ;
-
-: unicode-prefix ( -- seq )
-    "\\\\?\\" ; inline
-
-M: winnt root-directory? ( path -- ? )
-    {
-        { [ dup empty? ] [ drop f ] }
-        { [ dup [ path-separator? ] all? ] [ drop t ] }
-        { [ dup trim-right-separators { [ length 2 = ]
-          [ second CHAR: : = ] } 1&& ] [ drop t ] }
-        { [ dup unicode-prefix head? ]
-          [ trim-right-separators length unicode-prefix length 2 + = ] }
-        [ drop f ]
-    } cond ;
-
-ERROR: not-absolute-path ;
-
-M: winnt root-directory ( string -- string' )
-    unicode-prefix ?head drop
-    dup {
-        [ length 2 >= ]
-        [ second CHAR: : = ]
-        [ first Letter? ]
-    } 1&& [ 2 head "\\" append ] [ not-absolute-path ] if ;
-
-: prepend-prefix ( string -- string' )
-    dup unicode-prefix head? [
-        unicode-prefix prepend
-    ] unless ;
-
-TR: normalize-separators "/" "\\" ;
-
-M: winnt normalize-path ( string -- string' )
-    (normalize-path)
-    normalize-separators
-    prepend-prefix ;
-
-M: winnt CreateFile-flags ( DWORD -- DWORD )
-    FILE_FLAG_OVERLAPPED bitor ;
-
-M: winnt FileArgs-overlapped ( port -- overlapped )
-    make-overlapped ;
-
-M: winnt open-append
-    [ dup file-info size>> ] [ drop 0 ] recover
-    [ (open-append) ] dip >>ptr ;
-
-M: winnt home "USERPROFILE" os-env ;
diff --git a/basis/io/windows/nt/files/tags.txt b/basis/io/windows/nt/files/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/windows/nt/launcher/authors.txt b/basis/io/windows/nt/launcher/authors.txt
deleted file mode 100755 (executable)
index 026f4cd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Doug Coleman
-Slava Pestov
-Mackenzie Straight
diff --git a/basis/io/windows/nt/launcher/launcher-tests.factor b/basis/io/windows/nt/launcher/launcher-tests.factor
deleted file mode 100644 (file)
index cbae2f5..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-USING: io.launcher tools.test calendar accessors environment
-namespaces kernel system arrays io io.files io.encodings.ascii
-sequences parser assocs hashtables math continuations eval ;
-IN: io.windows.launcher.nt.tests
-
-[ ] [
-    <process>
-        "notepad" >>command
-        1/2 seconds >>timeout
-    "notepad" set
-] unit-test
-
-[ f ] [ "notepad" get process-running? ] unit-test
-
-[ f ] [ "notepad" get process-started? ] unit-test
-
-[ ] [ "notepad" [ run-detached ] change ] unit-test
-
-[ "notepad" get wait-for-process ] must-fail
-
-[ t ] [ "notepad" get killed>> ] unit-test
-
-[ f ] [ "notepad" get process-running? ] unit-test
-
-[ ] [
-    <process>
-        vm "-quiet" "-run=hello-world" 3array >>command
-        "out.txt" temp-file >>stdout
-    try-process
-] unit-test
-
-[ "Hello world" ] [
-    "out.txt" temp-file ascii file-lines first
-] unit-test
-
-[ ] [
-    <process>
-        vm "-run=listener" 2array >>command
-        +closed+ >>stdin
-    try-process
-] unit-test
-
-[ ] [
-    "resource:basis/io/windows/nt/launcher/test" [
-        <process>
-            vm "-script" "stderr.factor" 3array >>command
-            "out.txt" temp-file >>stdout
-            "err.txt" temp-file >>stderr
-        try-process
-    ] with-directory
-] unit-test
-
-[ "output" ] [
-    "out.txt" temp-file ascii file-lines first
-] unit-test
-
-[ "error" ] [
-    "err.txt" temp-file ascii file-lines first
-] unit-test
-
-[ ] [
-    "resource:basis/io/windows/nt/launcher/test" [
-        <process>
-            vm "-script" "stderr.factor" 3array >>command
-            "out.txt" temp-file >>stdout
-            +stdout+ >>stderr
-        try-process
-    ] with-directory
-] unit-test
-
-[ "outputerror" ] [
-    "out.txt" temp-file ascii file-lines first
-] unit-test
-
-[ "output" ] [
-    "resource:basis/io/windows/nt/launcher/test" [
-        <process>
-            vm "-script" "stderr.factor" 3array >>command
-            "err2.txt" temp-file >>stderr
-        ascii <process-reader> lines first
-    ] with-directory
-] unit-test
-
-[ "error" ] [
-    "err2.txt" temp-file ascii file-lines first
-] unit-test
-
-[ t ] [
-    "resource:basis/io/windows/nt/launcher/test" [
-        <process>
-            vm "-script" "env.factor" 3array >>command
-        ascii <process-reader> contents
-    ] with-directory eval
-
-    os-envs =
-] unit-test
-
-[ t ] [
-    "resource:basis/io/windows/nt/launcher/test" [
-        <process>
-            vm "-script" "env.factor" 3array >>command
-            +replace-environment+ >>environment-mode
-            os-envs >>environment
-        ascii <process-reader> contents
-    ] with-directory eval
-    
-    os-envs =
-] unit-test
-
-[ "B" ] [
-    "resource:basis/io/windows/nt/launcher/test" [
-        <process>
-            vm "-script" "env.factor" 3array >>command
-            { { "A" "B" } } >>environment
-        ascii <process-reader> contents
-    ] with-directory eval
-
-    "A" swap at
-] unit-test
-
-[ f ] [
-    "resource:basis/io/windows/nt/launcher/test" [
-        <process>
-            vm "-script" "env.factor" 3array >>command
-            { { "USERPROFILE" "XXX" } } >>environment
-            +prepend-environment+ >>environment-mode
-        ascii <process-reader> contents
-    ] with-directory eval
-
-    "USERPROFILE" swap at "XXX" =
-] unit-test
-
-2 [
-    [ ] [
-        <process>
-            "cmd.exe /c dir" >>command
-            "dir.txt" temp-file >>stdout
-        try-process
-    ] unit-test
-
-    [ ] [ "dir.txt" temp-file delete-file ] unit-test
-] times
-
-[ "append-test" temp-file delete-file ] ignore-errors
-
-[ "Hello appender\r\nHello appender\r\n" ] [
-    2 [
-        "resource:basis/io/windows/nt/launcher/test" [
-            <process>
-                vm "-script" "append.factor" 3array >>command
-                "append-test" temp-file <appender> >>stdout
-            try-process
-        ] with-directory
-    ] times
-   
-    "append-test" temp-file ascii file-contents
-] unit-test
diff --git a/basis/io/windows/nt/launcher/launcher.factor b/basis/io/windows/nt/launcher/launcher.factor
deleted file mode 100644 (file)
index de4fb99..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-! Copyright (C) 2007, 2008 Doug Coleman, Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: alien alien.c-types arrays continuations destructors io
-io.windows libc io.ports io.pipes windows.types math
-windows.kernel32 windows namespaces make io.launcher kernel
-sequences windows.errors assocs splitting system strings
-io.windows.launcher io.windows.files io.backend io.files
-io.files.private combinators shuffle accessors locals ;
-IN: io.windows.nt.launcher
-
-: duplicate-handle ( handle -- handle' )
-    GetCurrentProcess ! source process
-    swap ! handle
-    GetCurrentProcess ! target process
-    f <void*> [ ! target handle
-        DUPLICATE_SAME_ACCESS ! desired access
-        TRUE ! inherit handle
-        DUPLICATE_CLOSE_SOURCE ! options
-        DuplicateHandle win32-error=0/f
-    ] keep *void* ;
-
-! /dev/null simulation
-: null-input ( -- pipe )
-    (pipe) [ in>> handle>> ] [ out>> dispose ] bi ;
-
-: null-output ( -- pipe )
-    (pipe) [ in>> dispose ] [ out>> handle>> ] bi ;
-
-: null-pipe ( mode -- pipe )
-    {
-        { GENERIC_READ [ null-input ] }
-        { GENERIC_WRITE [ null-output ] }
-    } case ;
-
-! The below code is based on the example given in
-! http://msdn2.microsoft.com/en-us/library/ms682499.aspx
-
-: redirect-default ( obj access-mode create-mode -- handle )
-    3drop f ;
-
-: redirect-closed ( obj access-mode create-mode -- handle )
-    drop nip null-pipe ;
-
-:: redirect-file ( path access-mode create-mode -- handle )
-    path normalize-path
-    access-mode
-    share-mode
-    default-security-attributes
-    create-mode
-    FILE_ATTRIBUTE_NORMAL ! flags and attributes
-    f ! template file
-    CreateFile dup invalid-handle? <win32-file> &dispose handle>> ;
-
-: redirect-append ( path access-mode create-mode -- handle )
-    [ path>> ] 2dip
-    drop OPEN_ALWAYS
-    redirect-file
-    dup 0 FILE_END set-file-pointer ;
-
-: redirect-handle ( handle access-mode create-mode -- handle )
-    2drop handle>> duplicate-handle ;
-
-: redirect-stream ( stream access-mode create-mode -- handle )
-    [ underlying-handle handle>> ] 2dip redirect-handle ;
-
-: redirect ( obj access-mode create-mode -- handle )
-    {
-        { [ pick not ] [ redirect-default ] }
-        { [ pick +closed+ eq? ] [ redirect-closed ] }
-        { [ pick string? ] [ redirect-file ] }
-        { [ pick appender? ] [ redirect-append ] }
-        { [ pick win32-file? ] [ redirect-handle ] }
-        [ redirect-stream ]
-    } cond
-    dup [ dup t set-inherit ] when ;
-
-: redirect-stdout ( process args -- handle )
-    drop
-    stdout>>
-    GENERIC_WRITE
-    CREATE_ALWAYS
-    redirect
-    STD_OUTPUT_HANDLE GetStdHandle or ;
-
-: redirect-stderr ( process args -- handle )
-    over stderr>> +stdout+ eq? [
-        nip
-        lpStartupInfo>> STARTUPINFO-hStdOutput
-    ] [
-        drop
-        stderr>>
-        GENERIC_WRITE
-        CREATE_ALWAYS
-        redirect
-        STD_ERROR_HANDLE GetStdHandle or
-    ] if ;
-
-: redirect-stdin ( process args -- handle )
-    drop
-    stdin>>
-    GENERIC_READ
-    OPEN_EXISTING
-    redirect
-    STD_INPUT_HANDLE GetStdHandle or ;
-
-M: winnt fill-redirection ( process args -- )
-    [ 2dup redirect-stdout ] keep lpStartupInfo>> set-STARTUPINFO-hStdOutput
-    [ 2dup redirect-stderr ] keep lpStartupInfo>> set-STARTUPINFO-hStdError
-    [ 2dup redirect-stdin  ] keep lpStartupInfo>> set-STARTUPINFO-hStdInput
-    2drop ;
diff --git a/basis/io/windows/nt/launcher/tags.txt b/basis/io/windows/nt/launcher/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/windows/nt/launcher/test/append.factor b/basis/io/windows/nt/launcher/test/append.factor
deleted file mode 100644 (file)
index 4c1de0c..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-USE: io\r
-"Hello appender" print\r
diff --git a/basis/io/windows/nt/launcher/test/env.factor b/basis/io/windows/nt/launcher/test/env.factor
deleted file mode 100644 (file)
index 503ca7d..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-USE: system
-USE: prettyprint
-USE: environment
-os-envs .
diff --git a/basis/io/windows/nt/launcher/test/stderr.factor b/basis/io/windows/nt/launcher/test/stderr.factor
deleted file mode 100644 (file)
index f22f50e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-USE: io\r
-USE: namespaces\r
-\r
-"output" write flush\r
-"error" error-stream get stream-write error-stream get stream-flush\r
diff --git a/basis/io/windows/nt/monitors/authors.txt b/basis/io/windows/nt/monitors/authors.txt
deleted file mode 100755 (executable)
index 7c1b2f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/basis/io/windows/nt/monitors/monitors-tests.factor b/basis/io/windows/nt/monitors/monitors-tests.factor
deleted file mode 100644 (file)
index ef36bae..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-IN: io.windows.nt.monitors.tests\r
-USING: io.windows.nt.monitors tools.test ;\r
-\r
-\ fill-queue-thread must-infer\r
diff --git a/basis/io/windows/nt/monitors/monitors.factor b/basis/io/windows/nt/monitors/monitors.factor
deleted file mode 100755 (executable)
index a2b7c4f..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-! Copyright (C) 2008 Doug Coleman, Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: alien alien.c-types alien.strings libc destructors locals
-kernel math assocs namespaces make continuations sequences
-hashtables sorting arrays combinators math.bitwise strings
-system accessors threads splitting io.backend io.windows
-io.windows.nt.backend io.windows.nt.files io.monitors io.ports
-io.buffers io.files io.timeouts io.encodings.string
-io.encodings.utf16n io windows windows.kernel32 windows.types ;
-IN: io.windows.nt.monitors
-
-: open-directory ( path -- handle )
-    normalize-path
-    FILE_LIST_DIRECTORY
-    share-mode
-    f
-    OPEN_EXISTING
-    { FILE_FLAG_BACKUP_SEMANTICS FILE_FLAG_OVERLAPPED } flags
-    f
-    CreateFile opened-file ;
-
-TUPLE: win32-monitor-port < input-port recursive ;
-
-TUPLE: win32-monitor < monitor port ;
-
-: begin-reading-changes ( port -- overlapped )
-    {
-        [ handle>> handle>> ]
-        [ buffer>> ptr>> ]
-        [ buffer>> size>> ]
-        [ recursive>> 1 0 ? ]
-    } cleave
-    FILE_NOTIFY_CHANGE_ALL
-    0 <uint>
-    (make-overlapped)
-    [ f ReadDirectoryChangesW win32-error=0/f ] keep ;
-
-: read-changes ( port -- bytes-transferred )
-    [
-        [ begin-reading-changes ] [ twiddle-thumbs ] bi
-    ] with-destructors ;
-
-: parse-action ( action -- changed )
-    {
-        { FILE_ACTION_ADDED [ +add-file+ ] }
-        { FILE_ACTION_REMOVED [ +remove-file+ ] }
-        { FILE_ACTION_MODIFIED [ +modify-file+ ] }
-        { FILE_ACTION_RENAMED_OLD_NAME [ +rename-file+ ] }
-        { FILE_ACTION_RENAMED_NEW_NAME [ +rename-file+ ] }
-        [ drop +modify-file+ ]
-    } case 1array ;
-
-: memory>u16-string ( alien len -- string )
-    memory>byte-array utf16n decode ;
-
-: parse-notify-record ( buffer -- path changed )
-    [
-        [ FILE_NOTIFY_INFORMATION-FileName ]
-        [ FILE_NOTIFY_INFORMATION-FileNameLength ]
-        bi memory>u16-string
-    ]
-    [ FILE_NOTIFY_INFORMATION-Action parse-action ] bi ;
-
-: (file-notify-records) ( buffer -- buffer )
-    dup ,
-    dup FILE_NOTIFY_INFORMATION-NextEntryOffset zero? [
-        [ FILE_NOTIFY_INFORMATION-NextEntryOffset ] keep <displaced-alien>
-        (file-notify-records)
-    ] unless ;
-
-: file-notify-records ( buffer -- seq )
-    [ (file-notify-records) drop ] { } make ;
-
-:: parse-notify-records ( monitor buffer -- )
-    buffer file-notify-records [
-        parse-notify-record
-        [ monitor path>> prepend-path normalize-path ] dip
-        monitor queue-change
-    ] each ;
-
-: fill-queue ( monitor -- )
-    dup port>> dup check-disposed
-    [ buffer>> ptr>> ] [ read-changes zero? ] bi
-    [ 2dup parse-notify-records ] unless
-    2drop ;
-
-: (fill-queue-thread) ( monitor -- )
-    dup fill-queue (fill-queue-thread) ;
-
-: fill-queue-thread ( monitor -- )
-    [ dup fill-queue (fill-queue-thread) ]
-    [ dup already-disposed? [ 2drop ] [ rethrow ] if ] recover ;
-
-M:: winnt (monitor) ( path recursive? mailbox -- monitor )
-    [
-        path normalize-path mailbox win32-monitor new-monitor
-            path open-directory \ win32-monitor-port <buffered-port>
-                recursive? >>recursive
-            >>port
-        dup [ fill-queue-thread ] curry
-        "Windows monitor thread" spawn drop
-    ] with-destructors ;
-
-M: win32-monitor dispose
-    port>> dispose ;
diff --git a/basis/io/windows/nt/monitors/tags.txt b/basis/io/windows/nt/monitors/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/windows/nt/nt.factor b/basis/io/windows/nt/nt.factor
deleted file mode 100644 (file)
index efde4f4..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-! Copyright (C) 2004, 2008 Mackenzie Straight, Doug Coleman,
-! Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: vocabs.loader io.windows io.windows.nt.backend
-io.windows.nt.files io.windows.files io.backend system ;
-
-winnt set-io-backend
diff --git a/basis/io/windows/nt/pipes/authors.txt b/basis/io/windows/nt/pipes/authors.txt
deleted file mode 100755 (executable)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/basis/io/windows/nt/pipes/pipes.factor b/basis/io/windows/nt/pipes/pipes.factor
deleted file mode 100644 (file)
index d498875..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-! Copyright (C) 2007, 2008 Doug Coleman, Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: alien alien.c-types arrays destructors io io.windows libc
-windows.types math.bitwise windows.kernel32 windows namespaces
-make kernel sequences windows.errors assocs math.parser system
-random combinators accessors io.pipes io.ports ;
-IN: io.windows.nt.pipes
-
-! This code is based on
-! http://twistedmatrix.com/trac/browser/trunk/twisted/internet/iocpreactor/process.py
-
-: create-named-pipe ( name -- handle )
-    { PIPE_ACCESS_INBOUND FILE_FLAG_OVERLAPPED } flags
-    PIPE_TYPE_BYTE
-    1
-    4096
-    4096
-    0
-    default-security-attributes
-    CreateNamedPipe opened-file ;
-
-: open-other-end ( name -- handle )
-    GENERIC_WRITE
-    { FILE_SHARE_READ FILE_SHARE_WRITE } flags
-    default-security-attributes
-    OPEN_EXISTING
-    FILE_FLAG_OVERLAPPED
-    f
-    CreateFile opened-file ;
-
-: unique-pipe-name ( -- string )
-    [
-        "\\\\.\\pipe\\factor-" %
-        pipe counter #
-        "-" %
-        32 random-bits #
-        "-" %
-        micros #
-    ] "" make ;
-
-M: winnt (pipe) ( -- pipe )
-    [
-        unique-pipe-name
-        [ create-named-pipe ] [ open-other-end ] bi
-        pipe boa
-    ] with-destructors ;
diff --git a/basis/io/windows/nt/pipes/tags.txt b/basis/io/windows/nt/pipes/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/windows/nt/privileges/privileges.factor b/basis/io/windows/nt/privileges/privileges.factor
deleted file mode 100755 (executable)
index 264f337..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-USING: alien alien.c-types alien.syntax arrays continuations\r
-destructors generic io.mmap io.ports io.windows io.windows.files\r
-kernel libc math math.bitwise namespaces quotations sequences windows\r
-windows.advapi32 windows.kernel32 io.backend system accessors\r
-io.windows.privileges ;\r
-IN: io.windows.nt.privileges\r
-\r
-TYPEDEF: TOKEN_PRIVILEGES* PTOKEN_PRIVILEGES\r
-\r
-! Security tokens\r
-!  http://msdn.microsoft.com/msdnmag/issues/05/03/TokenPrivileges/\r
-\r
-: (open-process-token) ( handle -- handle )\r
-    { TOKEN_ADJUST_PRIVILEGES TOKEN_QUERY } flags "PHANDLE" <c-object>\r
-    [ OpenProcessToken win32-error=0/f ] keep *void* ;\r
-\r
-: open-process-token ( -- handle )\r
-    #! remember to CloseHandle\r
-    GetCurrentProcess (open-process-token) ;\r
-\r
-: with-process-token ( quot -- )\r
-    #! quot: ( token-handle -- token-handle )\r
-    [ open-process-token ] dip\r
-    [ keep ] curry\r
-    [ CloseHandle drop ] [ ] cleanup ; inline\r
-\r
-: lookup-privilege ( string -- luid )\r
-    [ f ] dip "LUID" <c-object>\r
-    [ LookupPrivilegeValue win32-error=0/f ] keep ;\r
-\r
-: make-token-privileges ( name ? -- obj )\r
-    "TOKEN_PRIVILEGES" <c-object>\r
-    1 [ over set-TOKEN_PRIVILEGES-PrivilegeCount ] keep\r
-    "LUID_AND_ATTRIBUTES" malloc-array &free\r
-    over set-TOKEN_PRIVILEGES-Privileges\r
-\r
-    swap [\r
-        SE_PRIVILEGE_ENABLED over TOKEN_PRIVILEGES-Privileges\r
-        set-LUID_AND_ATTRIBUTES-Attributes\r
-    ] when\r
-\r
-    [ lookup-privilege ] dip\r
-    [\r
-        TOKEN_PRIVILEGES-Privileges\r
-        set-LUID_AND_ATTRIBUTES-Luid\r
-    ] keep ;\r
-\r
-M: winnt set-privilege ( name ? -- )\r
-    [\r
-        -rot 0 -rot make-token-privileges\r
-        dup length f f AdjustTokenPrivileges win32-error=0/f\r
-    ] with-process-token ;\r
diff --git a/basis/io/windows/nt/privileges/tags.txt b/basis/io/windows/nt/privileges/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/windows/nt/sockets/authors.txt b/basis/io/windows/nt/sockets/authors.txt
deleted file mode 100755 (executable)
index 026f4cd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Doug Coleman
-Slava Pestov
-Mackenzie Straight
diff --git a/basis/io/windows/nt/sockets/sockets.factor b/basis/io/windows/nt/sockets/sockets.factor
deleted file mode 100644 (file)
index ecd9ea9..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-USING: alien alien.accessors alien.c-types byte-arrays
-continuations destructors io.ports io.timeouts io.sockets
-io.sockets io namespaces io.streams.duplex io.windows
-io.windows.sockets io.windows.nt.backend windows.winsock kernel
-libc math sequences threads system combinators accessors ;
-IN: io.windows.nt.sockets
-
-: malloc-int ( object -- object )
-    "int" heap-size malloc tuck 0 set-alien-signed-4 ; inline
-
-M: winnt WSASocket-flags ( -- DWORD )
-    WSA_FLAG_OVERLAPPED ;
-
-: get-ConnectEx-ptr ( socket -- void* )
-    SIO_GET_EXTENSION_FUNCTION_POINTER
-    WSAID_CONNECTEX
-    "GUID" heap-size
-    "void*" <c-object>
-    [
-        "void*" heap-size
-        "DWORD" <c-object>
-        f
-        f
-        WSAIoctl SOCKET_ERROR = [
-            winsock-error-string throw
-        ] when
-    ] keep *void* ;
-
-TUPLE: ConnectEx-args port
-    s name namelen lpSendBuffer dwSendDataLength
-    lpdwBytesSent lpOverlapped ptr ;
-
-: wait-for-socket ( args -- n )
-    [ lpOverlapped>> ] [ port>> ] bi twiddle-thumbs ; inline
-
-: <ConnectEx-args> ( sockaddr size -- ConnectEx )
-    ConnectEx-args new
-        swap >>namelen
-        swap >>name
-        f >>lpSendBuffer
-        0 >>dwSendDataLength
-        f >>lpdwBytesSent
-        (make-overlapped) >>lpOverlapped ; inline
-
-: call-ConnectEx ( ConnectEx -- )
-    {
-        [ s>> ]
-        [ name>> ]
-        [ namelen>> ]
-        [ lpSendBuffer>> ]
-        [ dwSendDataLength>> ]
-        [ lpdwBytesSent>> ]
-        [ lpOverlapped>> ]
-        [ ptr>> ]
-    } cleave
-    "int"
-    { "SOCKET" "sockaddr_in*" "int" "PVOID" "DWORD" "LPDWORD" "void*" }
-    "stdcall" alien-indirect drop
-    winsock-error-string [ throw ] when* ; inline
-
-M: object establish-connection ( client-out remote -- )
-    make-sockaddr/size <ConnectEx-args>
-        swap >>port
-        dup port>> handle>> handle>> >>s
-        dup s>> get-ConnectEx-ptr >>ptr
-        dup call-ConnectEx
-        wait-for-socket drop ;
-
-TUPLE: AcceptEx-args port
-    sListenSocket sAcceptSocket lpOutputBuffer dwReceiveDataLength
-    dwLocalAddressLength dwRemoteAddressLength lpdwBytesReceived lpOverlapped ;
-
-: init-accept-buffer ( addr AcceptEx -- )
-    swap sockaddr-size 16 +
-        [ >>dwLocalAddressLength ] [ >>dwRemoteAddressLength ] bi
-        dup dwLocalAddressLength>> 2 * malloc &free >>lpOutputBuffer
-        drop ; inline
-
-: <AcceptEx-args> ( server addr -- AcceptEx )
-    AcceptEx-args new
-        2dup init-accept-buffer
-        swap SOCK_STREAM open-socket |dispose handle>> >>sAcceptSocket
-        over handle>> handle>> >>sListenSocket
-        swap >>port
-        0 >>dwReceiveDataLength
-        f >>lpdwBytesReceived
-        (make-overlapped) >>lpOverlapped ; inline
-
-: call-AcceptEx ( AcceptEx -- )
-    {
-        [ sListenSocket>> ]
-        [ sAcceptSocket>> ]
-        [ lpOutputBuffer>> ]
-        [ dwReceiveDataLength>> ]
-        [ dwLocalAddressLength>> ]
-        [ dwRemoteAddressLength>> ]
-        [ lpdwBytesReceived>> ]
-        [ lpOverlapped>> ]
-    } cleave AcceptEx drop
-    winsock-error-string [ throw ] when* ; inline
-
-: extract-remote-address ( AcceptEx -- sockaddr )
-    {
-        [ lpOutputBuffer>> ]
-        [ dwReceiveDataLength>> ]
-        [ dwLocalAddressLength>> ]
-        [ dwRemoteAddressLength>> ]
-    } cleave
-    f <void*>
-    0 <int>
-    f <void*>
-    [ 0 <int> GetAcceptExSockaddrs ] keep *void* ; inline
-
-M: object (accept) ( server addr -- handle sockaddr )
-    [
-        <AcceptEx-args>
-        {
-            [ call-AcceptEx ]
-            [ wait-for-socket drop ]
-            [ sAcceptSocket>> <win32-socket> ]
-            [ extract-remote-address ]
-        } cleave
-    ] with-destructors ;
-
-TUPLE: WSARecvFrom-args port
-       s lpBuffers dwBufferCount lpNumberOfBytesRecvd
-       lpFlags lpFrom lpFromLen lpOverlapped lpCompletionRoutine ;
-
-: make-receive-buffer ( -- WSABUF )
-    "WSABUF" malloc-object &free
-    default-buffer-size get over set-WSABUF-len
-    default-buffer-size get malloc &free over set-WSABUF-buf ; inline
-
-: <WSARecvFrom-args> ( datagram -- WSARecvFrom )
-    WSARecvFrom-args new
-        swap >>port
-        dup port>> handle>> handle>> >>s
-        dup port>> addr>> sockaddr-size
-            [ malloc &free >>lpFrom ]
-            [ malloc-int &free >>lpFromLen ] bi
-        make-receive-buffer >>lpBuffers
-        1 >>dwBufferCount
-        0 malloc-int &free >>lpFlags
-        0 malloc-int &free >>lpNumberOfBytesRecvd
-        (make-overlapped) >>lpOverlapped ; inline
-
-: call-WSARecvFrom ( WSARecvFrom -- )
-    {
-        [ s>> ]
-        [ lpBuffers>> ]
-        [ dwBufferCount>> ]
-        [ lpNumberOfBytesRecvd>> ]
-        [ lpFlags>> ]
-        [ lpFrom>> ]
-        [ lpFromLen>> ]
-        [ lpOverlapped>> ]
-        [ lpCompletionRoutine>> ]
-    } cleave WSARecvFrom socket-error* ; inline
-
-: parse-WSARecvFrom ( n WSARecvFrom -- packet sockaddr )
-    [ lpBuffers>> WSABUF-buf swap memory>byte-array ]
-    [ [ lpFrom>> ] [ lpFromLen>> *int ] bi memory>byte-array ] bi ; inline
-
-M: winnt (receive) ( datagram -- packet addrspec )
-    [
-        <WSARecvFrom-args>
-        [ call-WSARecvFrom ]
-        [ wait-for-socket ]
-        [ parse-WSARecvFrom ]
-        tri
-    ] with-destructors ;
-
-TUPLE: WSASendTo-args port
-       s lpBuffers dwBufferCount lpNumberOfBytesSent
-       dwFlags lpTo iToLen lpOverlapped lpCompletionRoutine ;
-
-: make-send-buffer ( packet -- WSABUF )
-    "WSABUF" malloc-object &free
-    [ [ malloc-byte-array &free ] dip set-WSABUF-buf ]
-    [ [ length ] dip set-WSABUF-len ]
-    [ nip ]
-    2tri ; inline
-
-: <WSASendTo-args> ( packet addrspec datagram -- WSASendTo )
-    WSASendTo-args new
-        swap >>port
-        dup port>> handle>> handle>> >>s
-        swap make-sockaddr/size
-            [ malloc-byte-array &free ] dip
-            [ >>lpTo ] [ >>iToLen ] bi*
-        swap make-send-buffer >>lpBuffers
-        1 >>dwBufferCount
-        0 >>dwFlags
-        0 <uint> >>lpNumberOfBytesSent
-        (make-overlapped) >>lpOverlapped ; inline
-
-: call-WSASendTo ( WSASendTo -- )
-    {
-        [ s>> ]
-        [ lpBuffers>> ]
-        [ dwBufferCount>> ]
-        [ lpNumberOfBytesSent>> ]
-        [ dwFlags>> ]
-        [ lpTo>> ]
-        [ iToLen>> ]
-        [ lpOverlapped>> ]
-        [ lpCompletionRoutine>> ]
-    } cleave WSASendTo socket-error* ; inline
-
-M: winnt (send) ( packet addrspec datagram -- )
-    [
-        <WSASendTo-args>
-        [ call-WSASendTo ]
-        [ wait-for-socket drop ]
-        bi
-    ] with-destructors ;
diff --git a/basis/io/windows/nt/sockets/tags.txt b/basis/io/windows/nt/sockets/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/windows/nt/summary.txt b/basis/io/windows/nt/summary.txt
deleted file mode 100644 (file)
index 0e1b3e2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Microsoft Windows XP/Vista native I/O implementation
diff --git a/basis/io/windows/nt/tags.txt b/basis/io/windows/nt/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/windows/privileges/privileges.factor b/basis/io/windows/privileges/privileges.factor
deleted file mode 100644 (file)
index e169bdf..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-USING: io.backend kernel continuations sequences\r
-system vocabs.loader combinators ;\r
-IN: io.windows.privileges\r
-\r
-HOOK: set-privilege io-backend ( name ? -- ) inline\r
-\r
-: with-privileges ( seq quot -- )\r
-    over [ [ t set-privilege ] each ] curry compose\r
-    swap [ [ f set-privilege ] each ] curry [ ] cleanup ; inline\r
-\r
-{\r
-    { [ os winnt? ] [ "io.windows.nt.privileges" require ] }\r
-    { [ os wince? ] [ "io.windows.ce.privileges" require ] }\r
-} cond\r
diff --git a/basis/io/windows/privileges/tags.txt b/basis/io/windows/privileges/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/windows/sockets/sockets.factor b/basis/io/windows/sockets/sockets.factor
deleted file mode 100644 (file)
index 809af60..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-USING: kernel accessors io.sockets io.windows io.backend\r
-windows.winsock system destructors alien.c-types ;\r
-IN: io.windows.sockets\r
-\r
-HOOK: WSASocket-flags io-backend ( -- DWORD )\r
-\r
-TUPLE: win32-socket < win32-file ;\r
-\r
-: <win32-socket> ( handle -- win32-socket )\r
-    win32-socket new-win32-handle ;\r
-\r
-M: win32-socket dispose ( stream -- )\r
-    handle>> closesocket drop ;\r
-\r
-: unspecific-sockaddr/size ( addrspec -- sockaddr len )\r
-    [ empty-sockaddr/size ] [ protocol-family ] bi\r
-    pick set-sockaddr-in-family ;\r
-\r
-: opened-socket ( handle -- win32-socket )\r
-    <win32-socket> |dispose dup add-completion ;\r
-\r
-: open-socket ( addrspec type -- win32-socket )\r
-    [ protocol-family ] dip\r
-    0 f 0 WSASocket-flags WSASocket\r
-    dup socket-error\r
-    opened-socket ;\r
-\r
-M: object (get-local-address) ( socket addrspec -- sockaddr )\r
-    [ handle>> ] dip empty-sockaddr/size <int>\r
-    [ getsockname socket-error ] 2keep drop ;\r
-\r
-M: object (get-remote-address) ( socket addrspec -- sockaddr )\r
-    [ handle>> ] dip empty-sockaddr/size <int>\r
-    [ getpeername socket-error ] 2keep drop ;\r
-\r
-: bind-socket ( win32-socket sockaddr len -- )\r
-    [ handle>> ] 2dip bind socket-error ;\r
-\r
-M: object ((client)) ( addrspec -- handle )\r
-    [ SOCK_STREAM open-socket ] keep\r
-    [ unspecific-sockaddr/size bind-socket ] [ drop ] 2bi ;\r
-\r
-: server-socket ( addrspec type -- fd )\r
-    [ open-socket ] [ drop ] 2bi\r
-    [ make-sockaddr/size bind-socket ] [ drop ] 2bi ;\r
-\r
-! http://support.microsoft.com/kb/127144\r
-! NOTE: Possibly tweak this because of SYN flood attacks\r
-: listen-backlog ( -- n ) HEX: 7fffffff ; inline\r
-\r
-M: object (server) ( addrspec -- handle )\r
-    [\r
-        SOCK_STREAM server-socket\r
-        dup handle>> listen-backlog listen winsock-return-check\r
-    ] with-destructors ;\r
-\r
-M: windows (datagram) ( addrspec -- handle )\r
-    [ SOCK_DGRAM server-socket ] with-destructors ;\r
-\r
-M: windows addrinfo-error ( n -- )\r
-    winsock-return-check ;\r
diff --git a/basis/io/windows/sockets/tags.txt b/basis/io/windows/sockets/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/windows/summary.txt b/basis/io/windows/summary.txt
deleted file mode 100644 (file)
index 2a2d544..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Microsoft Windows native I/O implementation
diff --git a/basis/io/windows/tags.txt b/basis/io/windows/tags.txt
deleted file mode 100755 (executable)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/io/windows/windows.factor b/basis/io/windows/windows.factor
deleted file mode 100755 (executable)
index 94304ed..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-! Copyright (C) 2004, 2008 Mackenzie Straight, Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: alien alien.c-types arrays destructors io io.backend
-io.buffers io.files io.ports io.binary io.timeouts
-windows.errors strings kernel math namespaces sequences windows
-windows.kernel32 windows.shell32 windows.types windows.winsock
-splitting continuations math.bitwise system accessors ;
-IN: io.windows
-
-: set-inherit ( handle ? -- )
-    [ HANDLE_FLAG_INHERIT ] dip
-    >BOOLEAN SetHandleInformation win32-error=0/f ;
-
-TUPLE: win32-handle handle disposed ;
-
-: new-win32-handle ( handle class -- win32-handle )
-    new swap [ >>handle ] [ f set-inherit ] bi ;
-
-: <win32-handle> ( handle -- win32-handle )
-    win32-handle new-win32-handle ;
-
-M: win32-handle dispose* ( handle -- )
-    handle>> CloseHandle drop ;
-
-TUPLE: win32-file < win32-handle ptr ;
-
-: <win32-file> ( handle -- win32-file )
-    win32-file new-win32-handle ;
-
-M: win32-file dispose
-    dup disposed>> [ drop ] [
-        [ cancel-operation ] [ call-next-method ] bi
-    ] if ;
-
-HOOK: CreateFile-flags io-backend ( DWORD -- DWORD )
-HOOK: FileArgs-overlapped io-backend ( port -- overlapped/f )
-HOOK: add-completion io-backend ( port -- )
-
-: opened-file ( handle -- win32-file )
-    dup invalid-handle?
-    <win32-file> |dispose
-    dup add-completion ;
-
-: share-mode ( -- fixnum )
-    {
-        FILE_SHARE_READ
-        FILE_SHARE_WRITE
-        FILE_SHARE_DELETE
-    } flags ; foldable
-
-: default-security-attributes ( -- obj )
-    "SECURITY_ATTRIBUTES" <c-object>
-    "SECURITY_ATTRIBUTES" heap-size
-    over set-SECURITY_ATTRIBUTES-nLength ;
diff --git a/basis/lcs/diff2html/diff2html-tests.factor b/basis/lcs/diff2html/diff2html-tests.factor
new file mode 100644 (file)
index 0000000..0c2ed34
--- /dev/null
@@ -0,0 +1,6 @@
+! Copyright (C) 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: lcs.diff2html lcs kernel tools.test strings sequences xml.writer ;
+IN: lcs.diff2html.tests
+
+[ ] [ "hello" "heyo" [ 1string ] { } map-as diff htmlize-diff xml>string drop ] unit-test
index b92eeb12502ac8f6c0962581418ad0e750145488..ee303cc5a5868d067dc9d77dba202fe4b03acfd2 100644 (file)
@@ -1,44 +1,42 @@
 ! Copyright (C) 2008 Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
-USING: lcs html.elements kernel qualified ;
+USING: lcs xml.interpolate xml.writer kernel strings ;
 FROM: accessors => item>> ;
 FROM: io => write ;
-FROM: sequences => each if-empty ;
-FROM: xml.entities => escape-string ;
+FROM: sequences => each if-empty when-empty map ;
 IN: lcs.diff2html
 
-GENERIC: diff-line ( obj -- )
+GENERIC: diff-line ( obj -- xml )
 
-: write-item ( item -- )
-    item>> [ "&nbsp;" ] [ escape-string ] if-empty write ;
+: item-string ( item -- string )
+    item>> [ CHAR: no-break-space 1string ] when-empty ;
 
 M: retain diff-line
-    <tr>
-        dup [
-            <td "retain" =class td>
-                write-item
-            </td>
-        ] bi@
-    </tr> ;
+    item-string
+    [XML <td class="retain"><-></td> XML]
+    dup [XML <tr><-><-></tr> XML] ;
 
 M: insert diff-line
-    <tr>
-        <td> </td>
-        <td "insert" =class td>
-            write-item
-        </td>
-    </tr> ;
+    item-string [XML
+        <tr>
+            <td> </td>
+            <td class="insert"><-></td>
+        </tr>
+    XML] ;
 
 M: delete diff-line
-    <tr>
-        <td "delete" =class td>
-            write-item
-        </td>
-        <td> </td>
-    </tr> ;
+    item-string [XML
+        <tr>
+            <td class="delete"><-></td>
+            <td> </td>
+        </tr>
+    XML] ;
 
-: htmlize-diff ( diff -- )
-    <table "100%" =width "comparison" =class table>
-        <tr> <th> "Old" write </th> <th> "New" write </th> </tr>
-        [ diff-line ] each
-    </table> ;
+: htmlize-diff ( diff -- xml )
+    [ diff-line ] map
+    [XML
+        <table width="100%" class="comparison">
+            <tr><th>Old</th><th>New</th></tr>
+            <->
+        </table>
+    XML] ;
index 759e923a34b8eae56f203e9e68705864198dbff5..8c67590697a603698d9a9ac48736efce9204ca57 100644 (file)
@@ -5,7 +5,7 @@ IN: lcs
 \r
 <PRIVATE\r
 : levenshtein-step ( insert delete change same? -- next )\r
-    0 1 ? + >r [ 1+ ] bi@ r> min min ;\r
+    0 1 ? + [ [ 1+ ] bi@ ] dip min min ;\r
 \r
 : lcs-step ( insert delete change same? -- next )\r
     1 -1./0. ? + max max ; ! -1./0. is -inf (float)\r
index e681bac3145061290e42d2f3ca7c3e2d57494c00..61aa3239245824e73b0735f4defc59a8981ffe03 100644 (file)
@@ -1,6 +1,6 @@
 USING: io io.streams.string io.streams.duplex listener
 tools.test parser math namespaces continuations vocabs kernel
-compiler.units eval ;
+compiler.units eval vocabs.parser ;
 IN: listener.tests
 
 : hello "Hi" print ; parsing
index f60403055e563cbad7ee910f30e0a447b972c963..88a90b72e21f92bd3c45456a8adca6e886ee347b 100644 (file)
@@ -4,7 +4,7 @@ USING: arrays hashtables io kernel math math.parser memory
 namespaces parser lexer sequences strings io.styles
 vectors words generic system combinators continuations debugger
 definitions compiler.units accessors colors prettyprint fry
-sets ;
+sets vocabs.parser ;
 IN: listener
 
 GENERIC: stream-read-quot ( stream -- quot/f )
index ece5c1d20021617643364ccacc569c77fc8ccc9e..1c1f288797924b5428463c32733c5ff0814ee100 100644 (file)
@@ -3,6 +3,6 @@
 USING: slots.private ;
 IN: locals.backend
 
-: local-value 2 slot ; inline
+: local-value ( box -- value ) 2 slot ; inline
 
-: set-local-value 2 set-slot ; inline
+: set-local-value ( value box -- ) 2 set-slot ; inline
index 77b87d1b49f2969d944f7a9cfad37f8614112782..a4a9ca448bdd756743c3227c68ca0ea076042769 100644 (file)
@@ -113,7 +113,7 @@ HELP: MEMO::
 
 { POSTPONE: MEMO: POSTPONE: MEMO:: } related-words
 
-ARTICLE: "locals-literals" "Locals in array and hashtable literals"
+ARTICLE: "locals-literals" "Locals in literals"
 "Certain data type literals are permitted to contain free variables. Any such literals are written into code which constructs an instance of the type with the free variable values spliced in. Conceptually, this is similar to the transformation applied to quotations containing free variables."
 $nl
 "The data types which receive this special handling are the following:"
@@ -122,7 +122,9 @@ $nl
     { $link "hashtables" }
     { $link "vectors" }
     { $link "tuples" }
+    { $link "wrappers" }
 }
+{ $heading "Object identity" }
 "This feature changes the semantics of literal object identity. An ordinary word containing a literal pushes the same literal on the stack every time it is invoked:"
 { $example
     "IN: scratchpad"
@@ -134,6 +136,7 @@ $nl
 }
 "In a word with locals, literals expand into code which constructs the literal, and so every invocation pushes a new object:"
 { $example
+    "USE: locals"
     "IN: scratchpad"
     "TUPLE: person first-name last-name ;"
     ":: ordinary-word-test ( -- tuple )"
@@ -142,7 +145,7 @@ $nl
     "f"
 }
 "One exception to the above rule is that array instances containing no free variables do retain identity. This allows macros such as " { $link cond } " to recognize that the array is constant and expand at compile-time."
-$nl
+{ $heading "Example" }
 "For example, here is an implementation of the " { $link 3array } " word which uses this feature:"
 { $code ":: 3array ( x y z -- array ) { x y z } ;" } ;
 
@@ -166,7 +169,7 @@ $nl
 "Recall that the following two code snippets are equivalent:"
 { $code "'[ sq _ + ]" }
 { $code "[ [ sq ] dip + ] curry" }
-"The semantics of " { $link dip } " and " { $link curry } " are such that the first example behaves as if the top of the stack as ``inserted'' in the ``hole'' in the quotation's second element."
+"The semantics of " { $link dip } " and " { $link curry } " are such that the first example behaves as if the top of the stack as â€œinserted†in the â€œhole†in the quotation's second element."
 $nl
 "Conceptually, " { $link curry } " is defined so that the following two code snippets are equivalent:"
 { $code "3 [ - ] curry" }
@@ -179,7 +182,7 @@ $nl
 { $code "'[ [| a | a - ] curry ] call" }
 "Instead, the first line above expands into something like the following:"
 { $code "[ [ swap [| a | a - ] ] curry call ]" }
-"This ensures that the fried value appears ``underneath'' the local variable " { $snippet "a" } " when the quotation calls."
+"This ensures that the fried value appears â€œunderneath†the local variable " { $snippet "a" } " when the quotation calls."
 $nl
 "The precise behavior is the following. When frying a lambda, a stack shuffle (" { $link mnswap } ") is prepended to the lambda so that the " { $snippet "m" } " curried values, which start off at the top of the stack, are transposed with the " { $snippet "n" } " inputs to the lambda." ;
 
index b5c201a5d9887860052c952f05178babca06e715..bd9e7cf1030f097fcd5cd7254faa60abc917fa98 100644 (file)
@@ -2,7 +2,7 @@ USING: locals math sequences tools.test hashtables words kernel
 namespaces arrays strings prettyprint io.streams.string parser
 accessors generic eval combinators combinators.short-circuit
 combinators.short-circuit.smart math.order math.functions
-definitions compiler.units fry lexer ;
+definitions compiler.units fry lexer words.symbol ;
 IN: locals.tests
 
 :: foo ( a b -- a a ) a a ;
@@ -490,4 +490,14 @@ M:: integer lambda-method-forget-test ( a -- b ) ;
 
 [ 10 ] [
     [| | 0 '[ [let | A [ 10 ] | A _ + ] ] call ] call
-] unit-test
\ No newline at end of file
+] unit-test
+
+! Discovered by littledan
+[ "bar" ] [ [let | a [ [let | foo [ "bar" ] | foo ] ] | a ] ] unit-test
+[ 10 ] [ [let | a [ 10 ] | [let | b [ a ] | b ] ] ] unit-test
+
+[ { \ + } ] [ [let | x [ \ + ] | { \ x } ] ] unit-test
+
+[ { \ + 3 } ] [ [let | a [ 3 ] | { \ + a } ] ] unit-test
+
+[ 3 ] [ [let | a [ \ + ] | 1 2 [ \ a execute ] ] call ] unit-test
\ No newline at end of file
index e6ab6c003c700d8a572561cfe5dbd99e95e026e0..f6baaf9ba707a0ad2193482895da33d20eacf76d 100644 (file)
@@ -1,9 +1,9 @@
-! Copyright (C) 2007, 2008 Slava Pestov, Eduardo Cavazos.
+! Copyright (C) 2007, 2009 Slava Pestov, Eduardo Cavazos.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays combinators effects.parser
-generic.parser kernel lexer locals.errors
+generic.parser kernel lexer locals.errors fry
 locals.rewrite.closures locals.types make namespaces parser
-quotations sequences splitting words ;
+quotations sequences splitting words vocabs.parser ;
 IN: locals.parser
 
 : make-local ( name -- word )
@@ -56,19 +56,21 @@ SYMBOL: in-lambda?
         (parse-bindings)
     ] [ 2drop ] if ;
 
+: with-bindings ( quot -- words assoc )
+    '[
+        in-lambda? on
+        _ H{ } make-assoc
+    ] { } make swap ; inline
+
 : parse-bindings ( end -- bindings vars )
-    [
-        [ (parse-bindings) ] H{ } make-assoc
-    ] { } make swap ;
+    [ (parse-bindings) ] with-bindings ;
 
 : parse-bindings* ( end -- words assoc )
     [
-        [
-            namespace push-locals
-            (parse-bindings)
-            namespace pop-locals
-        ] { } make-assoc
-    ] { } make swap ;
+        namespace push-locals
+        (parse-bindings)
+        namespace pop-locals
+    ] with-bindings ;
 
 : (parse-wbindings) ( end -- )
     dup parse-binding dup [
@@ -77,9 +79,7 @@ SYMBOL: in-lambda?
     ] [ 2drop ] if ;
 
 : parse-wbindings ( end -- bindings vars )
-    [
-        [ (parse-wbindings) ] H{ } make-assoc
-    ] { } make swap ;
+    [ (parse-wbindings) ] with-bindings ;
 
 : parse-locals ( -- vars assoc )
     "(" expect ")" parse-effect
@@ -88,8 +88,8 @@ SYMBOL: in-lambda?
 
 : parse-locals-definition ( word -- word quot )
     parse-locals \ ; (parse-lambda) <lambda>
-    2dup "lambda" set-word-prop
-    rewrite-closures dup length 1 = [ first ] [ bad-lambda-rewrite ] if ;
+    [ "lambda" set-word-prop ]
+    [ rewrite-closures dup length 1 = [ first ] [ bad-lambda-rewrite ] if ] 2bi ;
 
 : (::) ( -- word def ) CREATE-WORD parse-locals-definition ;
 
index bd322bfff32f102ececdca7b2bb0dafe5c1921d6..33e0f4d3b330d2b7ed8bf45952c2b2ec52402ef7 100644 (file)
@@ -30,7 +30,10 @@ M: local-writer localize
     read-local-quot [ set-local-value ] append ;
 
 M: def localize
-    local>> [ prefix ] [ local-reader? [ 1array >r ] [ >r ] ? ] bi ;
+    local>>
+    [ prefix ]
+    [ local-reader? [ 1array load-local ] [ load-local ] ? ]
+    bi ;
 
 M: object localize 1quotation ;
 
index 05b1e2345e687160e5a5a37a68cae8098e4d7369..515473c467c83db87bcb00b29b7c1caf2317b723 100644 (file)
@@ -37,7 +37,7 @@ M: array rewrite-literal? [ rewrite-literal? ] contains? ;
 
 M: quotation rewrite-literal? [ rewrite-literal? ] contains? ;
 
-M: wrapper rewrite-literal? drop t ;
+M: wrapper rewrite-literal? wrapped>> rewrite-literal? ;
 
 M: hashtable rewrite-literal? drop t ;
 
@@ -53,7 +53,7 @@ GENERIC: rewrite-element ( obj -- )
     [ rewrite-element ] each ;
 
 : rewrite-sequence ( seq -- )
-    [ rewrite-elements ] [ length , ] [ 0 head , ] tri \ nsequence , ;
+    [ rewrite-elements ] [ length ] [ 0 head ] tri '[ _ _ nsequence ] % ;
 
 M: array rewrite-element
     dup rewrite-literal? [ rewrite-sequence ] [ , ] if ;
@@ -63,7 +63,7 @@ M: vector rewrite-element rewrite-sequence ;
 M: hashtable rewrite-element >alist rewrite-sequence \ >hashtable , ;
 
 M: tuple rewrite-element
-    [ tuple-slots rewrite-elements ] [ class literalize , ] bi \ boa , ;
+    [ tuple-slots rewrite-elements ] [ class ] bi '[ _ boa ] % ;
 
 M: quotation rewrite-element rewrite-sugar* ;
 
@@ -81,10 +81,14 @@ M: local-writer rewrite-element
 M: local-word rewrite-element
     local-word-in-literal-error ;
 
-M: word rewrite-element literalize , ;
+M: word rewrite-element <wrapper> , ;
+
+: rewrite-wrapper ( wrapper -- )
+    dup rewrite-literal?
+    [ wrapped>> rewrite-element ] [ , ] if ;
 
 M: wrapper rewrite-element
-    dup rewrite-literal? [ wrapped>> rewrite-element ] [ , ] if ;
+    rewrite-wrapper \ <wrapper> , ;
 
 M: object rewrite-element , ;
 
@@ -98,10 +102,11 @@ M: def rewrite-sugar* , ;
 
 M: hashtable rewrite-sugar* rewrite-element ;
 
-M: wrapper rewrite-sugar* rewrite-element ;
+M: wrapper rewrite-sugar*
+    rewrite-wrapper ;
 
 M: word rewrite-sugar*
-    dup { >r r> load-locals get-local drop-locals } memq?
+    dup { load-locals get-local drop-locals } memq?
     [ >r/r>-in-lambda-error ] [ call-next-method ] if ;
 
 M: object rewrite-sugar* , ;
index 7a8dac19472e2007101e0eec9addbe353626bbe9..3ed753e094c9cda310b37fde12adf41f56c6f991 100644 (file)
@@ -1,6 +1,7 @@
-! Copyright (C) 2007, 2008 Slava Pestov, Eduardo Cavazos.
+! Copyright (C) 2007, 2009 Slava Pestov, Eduardo Cavazos.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors combinators kernel sequences words ;
+USING: accessors combinators kernel sequences words
+quotations ;
 IN: locals.types
 
 TUPLE: lambda vars body ;
@@ -38,6 +39,8 @@ PREDICATE: local < word "local?" word-prop ;
     f <word>
     dup t "local?" set-word-prop ;
 
+M: local literalize ;
+
 PREDICATE: local-word < word "local-word?" word-prop ;
 
 : <local-word> ( name -- word )
@@ -49,6 +52,8 @@ PREDICATE: local-reader < word "local-reader?" word-prop ;
     f <word>
     dup t "local-reader?" set-word-prop ;
 
+M: local-reader literalize ;
+
 PREDICATE: local-writer < word "local-writer?" word-prop ;
 
 : <local-writer> ( reader -- word )
index 7c1db5b7c0ca85cbddc3db4b7c830e47466e5c50..91baae631f507dfdeea5f92fac3c954e3d1762cd 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.\r
 USING: logging.analysis logging.server logging smtp kernel\r
 io.files io.streams.string namespaces make alarms assocs\r
-io.encodings.utf8 accessors calendar sequences qualified ;\r
+io.encodings.utf8 accessors calendar sequences ;\r
 QUALIFIED: io.sockets\r
 IN: logging.insomniac\r
 \r
index 47de8805598411d4423597c7b38089b5ad5f6c65..6769932c886ab54b2a65690115fea9bb1c45bc94 100644 (file)
@@ -4,7 +4,7 @@ USING: logging.server sequences namespaces concurrency.messaging
 words kernel arrays shuffle tools.annotations\r
 prettyprint.config prettyprint debugger io.streams.string\r
 splitting continuations effects generalizations parser strings\r
-quotations fry symbols accessors ;\r
+quotations fry accessors ;\r
 IN: logging\r
 \r
 SYMBOLS: DEBUG NOTICE WARNING ERROR CRITICAL ;\r
@@ -61,7 +61,7 @@ PRIVATE>
     [ dup ] 2dip 2curry annotate ;\r
 \r
 : call-logging-quot ( quot word level -- quot' )\r
-    "called" -rot [ log-message ] 3curry prepose ;\r
+    [ "called" ] 2dip [ log-message ] 3curry prepose ;\r
 \r
 : add-logging ( word level -- )\r
     [ call-logging-quot ] (define-logging) ;\r
index 76c7ab6c90498912f6d5e68bfc362fbfef2fd4d6..7ab1ad388379f39507130dfad2b9f2191a092505 100644 (file)
@@ -13,7 +13,7 @@ HELP: parse-log
 } ;
 
 ARTICLE: "logging.parser" "Log file parser"
-"The " { $vocab-link "logging.parser" } " vocabulary parses log files output by the " { $vocab-link "logging" } " vocabulary. It is used by " { $link "logging.analysis" } " and " { $link "logging.insomniac" } " to analyze logs."
+"The " { $vocab-link "logging.parser" } " vocabulary parses log files output by the " { $vocab-link "logging" } " vocabulary. It is used by " { $link "logging.analysis" } " and " { $vocab-link "logging.insomniac" } " to analyze logs."
 $nl
 "There is only one primary entry point:"
 { $subsection parse-log } ;
index 1872bb0af2045b8646b6186d360d2cbb4319df7a..618dba544cb8637e7d7e92b367735803350600b7 100644 (file)
@@ -1,10 +1,10 @@
 ! Copyright (C) 2008 Slava Pestov.\r
 ! See http://factorcode.org/license.txt for BSD license.\r
-USING: namespaces kernel io calendar sequences io.files\r
-io.sockets continuations destructors prettyprint assocs\r
-math.parser words debugger math combinators\r
-concurrency.messaging threads arrays init math.ranges strings\r
-calendar.format io.encodings.utf8 ;\r
+USING: namespaces kernel io io.files io.pathnames io.directories\r
+io.sockets io.encodings.utf8\r
+calendar calendar.format sequences continuations destructors\r
+prettyprint assocs math.parser words debugger math combinators\r
+concurrency.messaging threads arrays init math.ranges strings ;\r
 IN: logging.server\r
 \r
 : log-root ( -- string )\r
@@ -28,7 +28,7 @@ SYMBOL: log-files
 \r
 : multiline-header ( -- string ) 20 CHAR: - <string> ; foldable\r
 \r
-: (write-message) ( msg name>> level multi? -- )\r
+: (write-message) ( msg word-name level multi? -- )\r
     [\r
         "[" write multiline-header write "] " write\r
     ] [\r
@@ -36,18 +36,19 @@ SYMBOL: log-files
     ] if\r
     write bl write ": " write print ;\r
 \r
-: write-message ( msg name>> level -- )\r
-    rot harvest {\r
-        { [ dup empty? ] [ 3drop ] }\r
-        { [ dup length 1 = ] [ first -rot f (write-message) ] }\r
+: write-message ( msg word-name level -- )\r
+    [ harvest ] 2dip {\r
+        { [ pick empty? ] [ 3drop ] }\r
+        { [ pick length 1 = ] [ [ first ] 2dip f (write-message) ] }\r
         [\r
-            [ first -rot f (write-message) ] 3keep\r
-            rest -rot [ t (write-message) ] 2curry each\r
+            [ [ first ] 2dip f (write-message) ]\r
+            [ [ rest ] 2dip [ t (write-message) ] 2curry each ]\r
+            3bi\r
         ]\r
     } cond ;\r
 \r
 : (log-message) ( msg -- )\r
-    #! msg: { msg name>> level service }\r
+    #! msg: { msg word-name level service }\r
     first4 log-stream [ write-message flush ] with-output-stream* ;\r
 \r
 : try-dispose ( stream -- )\r
index 7d393dadc9a2bab92567ec252275d2009915e97c..3846dea3be6317944c30690230c60c36daca12cf 100644 (file)
@@ -47,7 +47,7 @@ MACRO: match-cond ( assoc -- )
     [ "Fall-through in match-cond" throw ]
     [
         first2
-        >r [ dupd match ] curry r>
+        [ [ dupd match ] curry ] dip
         [ bind ] curry rot
         [ ?if ] 2curry append
     ] reduce ;
@@ -80,7 +80,7 @@ MACRO: match-cond ( assoc -- )
     (match-first) drop ;
 
 : (match-all) ( seq pattern-seq -- )
-    tuck (match-first) swap 
+    [ nip ] [ (match-first) swap ] 2bi
     [ 
         , [ swap (match-all) ] [ drop ] if* 
     ] [ 2drop ] if* ;
index 979c62dcfbdd6f0daff316229fd38f1ed219a593..40eb20642c55cc19e34234f56958d48de828ce4c 100644 (file)
@@ -32,3 +32,7 @@ IN: math.bitwise.tests
 
 [ 8 ] [ 0 3 toggle-bit ] unit-test
 [ 0 ] [ 8 3 toggle-bit ] unit-test
+
+[ 4 ] [ BIN: 1010101 bit-count ] unit-test
+[ 0 ] [ BIN: 0 bit-count ] unit-test
+[ 1 ] [ BIN: 1 bit-count ] unit-test
old mode 100644 (file)
new mode 100755 (executable)
index 89a21b6..e60815b
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays kernel math math.functions sequences
 sequences.private words namespaces macros hints
-combinators fry io.binary ;
+combinators fry io.binary combinators.smart ;
 IN: math.bitwise
 
 ! utilities
@@ -66,19 +66,24 @@ DEFER: byte-bit-count
 \ byte-bit-count
 256 [
     0 swap [ [ 1+ ] when ] each-bit
-] B{ } map-as '[ HEX: ff bitand _ nth-unsafe ] define-inline
+] B{ } map-as '[ HEX: ff bitand _ nth-unsafe ]
+(( byte -- table )) define-declared
+
+\ byte-bit-count make-inline
 
 >>
 
 GENERIC: (bit-count) ( x -- n )
 
 M: fixnum (bit-count)
-    {
-        [           byte-bit-count ]
-        [ -8  shift byte-bit-count ]
-        [ -16 shift byte-bit-count ]
-        [ -24 shift byte-bit-count ]
-    } cleave + + + ;
+    [
+        {
+            [           byte-bit-count ]
+            [ -8  shift byte-bit-count ]
+            [ -16 shift byte-bit-count ]
+            [ -24 shift byte-bit-count ]
+        } cleave
+    ] sum-outputs ;
 
 M: bignum (bit-count)
     dup 0 = [ drop 0 ] [
diff --git a/basis/math/blas/cblas/authors.txt b/basis/math/blas/cblas/authors.txt
new file mode 100644 (file)
index 0000000..f13c9c1
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
diff --git a/basis/math/blas/cblas/cblas.factor b/basis/math/blas/cblas/cblas.factor
new file mode 100644 (file)
index 0000000..4c0a88f
--- /dev/null
@@ -0,0 +1,559 @@
+USING: alien alien.c-types alien.syntax kernel system combinators ;
+IN: math.blas.cblas
+
+<< "cblas" {
+    { [ os macosx? ] [ "libblas.dylib" "cdecl" add-library ] }
+    { [ os windows? ] [ "blas.dll" "cdecl" add-library ] }
+    { [ os openbsd? ] [ "libcblas.so" "cdecl" add-library ] }
+    { [ os freebsd? ] [ "libcblas.so" "cdecl" add-library ] }
+    [ "libblas.so" "cdecl" add-library ]
+} cond >>
+
+LIBRARY: cblas
+
+TYPEDEF: int CBLAS_ORDER
+: CblasRowMajor 101 ; inline
+: CblasColMajor 102 ; inline
+
+TYPEDEF: int CBLAS_TRANSPOSE
+: CblasNoTrans   111 ; inline
+: CblasTrans     112 ; inline
+: CblasConjTrans 113 ; inline
+
+TYPEDEF: int CBLAS_UPLO
+: CblasUpper 121 ; inline
+: CblasLower 122 ; inline
+
+TYPEDEF: int CBLAS_DIAG
+: CblasNonUnit 131 ; inline
+: CblasUnit    132 ; inline
+
+TYPEDEF: int CBLAS_SIDE
+: CblasLeft  141 ; inline
+: CblasRight 142 ; inline
+
+TYPEDEF: int CBLAS_INDEX
+
+C-STRUCT: float-complex
+    { "float" "real" }
+    { "float" "imag" } ;
+C-STRUCT: double-complex
+    { "double" "real" }
+    { "double" "imag" } ;
+
+! Level 1 BLAS (scalar-vector and vector-vector)
+
+FUNCTION: float  cblas_sdsdot
+    ( int N, float    alpha, float*   X, int incX, float*   Y, int incY ) ;
+FUNCTION: double cblas_dsdot
+    ( int N,                 float*   X, int incX, float*   Y, int incY ) ;
+FUNCTION: float  cblas_sdot
+    ( int N,                 float*   X, int incX, float*   Y, int incY ) ;
+FUNCTION: double cblas_ddot
+    ( int N,                 double*  X, int incX, double*  Y, int incY ) ;
+
+FUNCTION: void   cblas_cdotu_sub
+    ( int N,                 void*    X, int incX, void*    Y, int incY, void*    dotu ) ;
+FUNCTION: void   cblas_cdotc_sub
+    ( int N,                 void*    X, int incX, void*    Y, int incY, void*    dotc ) ;
+
+FUNCTION: void   cblas_zdotu_sub
+    ( int N,                 void*    X, int incX, void*    Y, int incY, void*    dotu ) ;
+FUNCTION: void   cblas_zdotc_sub
+    ( int N,                 void*    X, int incX, void*    Y, int incY, void*    dotc ) ;
+
+FUNCTION: float  cblas_snrm2
+    ( int N,                 float*   X, int incX ) ;
+FUNCTION: float  cblas_sasum
+    ( int N,                 float*   X, int incX ) ;
+
+FUNCTION: double cblas_dnrm2
+    ( int N,                 double*  X, int incX ) ;
+FUNCTION: double cblas_dasum
+    ( int N,                 double*  X, int incX ) ;
+
+FUNCTION: float  cblas_scnrm2
+    ( int N,                 void*    X, int incX ) ;
+FUNCTION: float  cblas_scasum
+    ( int N,                 void*    X, int incX ) ;
+
+FUNCTION: double cblas_dznrm2
+    ( int N,                 void*    X, int incX ) ;
+FUNCTION: double cblas_dzasum
+    ( int N,                 void*    X, int incX ) ;
+
+FUNCTION: CBLAS_INDEX cblas_isamax
+    ( int N,                 float*   X, int incX ) ;
+FUNCTION: CBLAS_INDEX cblas_idamax
+    ( int N,                 double*  X, int incX ) ;
+FUNCTION: CBLAS_INDEX cblas_icamax
+    ( int N,                 void*    X, int incX ) ;
+FUNCTION: CBLAS_INDEX cblas_izamax
+    ( int N,                 void*    X, int incX ) ;
+
+FUNCTION: void cblas_sswap
+    ( int N,                 float*   X, int incX, float*   Y, int incY ) ;
+FUNCTION: void cblas_scopy
+    ( int N,                 float*   X, int incX, float*   Y, int incY ) ;
+FUNCTION: void cblas_saxpy
+    ( int N, float    alpha, float*   X, int incX, float*   Y, int incY ) ;
+
+FUNCTION: void cblas_dswap
+    ( int N,                 double*  X, int incX, double*  Y, int incY ) ;
+FUNCTION: void cblas_dcopy
+    ( int N,                 double*  X, int incX, double*  Y, int incY ) ;
+FUNCTION: void cblas_daxpy
+    ( int N, double   alpha, double*  X, int incX, double*  Y, int incY ) ;
+
+FUNCTION: void cblas_cswap
+    ( int N,                 void*    X, int incX, void*    Y, int incY ) ;
+FUNCTION: void cblas_ccopy
+    ( int N,                 void*    X, int incX, void*    Y, int incY ) ;
+FUNCTION: void cblas_caxpy
+    ( int N, void*    alpha, void*    X, int incX, void*    Y, int incY ) ;
+
+FUNCTION: void cblas_zswap
+    ( int N,                 void*    X, int incX, void*    Y, int incY ) ;
+FUNCTION: void cblas_zcopy
+    ( int N,                 void*    X, int incX, void*    Y, int incY ) ;
+FUNCTION: void cblas_zaxpy
+    ( int N, void*    alpha, void*    X, int incX, void*    Y, int incY ) ;
+
+FUNCTION: void cblas_sscal
+    ( int N, float    alpha, float*   X, int incX ) ;
+FUNCTION: void cblas_dscal
+    ( int N, double   alpha, double*  X, int incX ) ;
+FUNCTION: void cblas_cscal
+    ( int N, void*    alpha, void*    X, int incX ) ;
+FUNCTION: void cblas_zscal
+    ( int N, void*    alpha, void*    X, int incX ) ;
+FUNCTION: void cblas_csscal
+    ( int N, float    alpha, void*    X, int incX ) ;
+FUNCTION: void cblas_zdscal
+    ( int N, double   alpha, void*    X, int incX ) ;
+
+FUNCTION: void cblas_srotg
+    ( float* a, float* b, float* c, float* s ) ;
+FUNCTION: void cblas_srotmg
+    ( float* d1, float* d2, float* b1, float b2, float* P ) ;
+FUNCTION: void cblas_srot
+    ( int N, float* X, int incX, float* Y, int incY, float c, float s ) ;
+FUNCTION: void cblas_srotm
+    ( int N, float* X, int incX, float* Y, int incY, float* P ) ;
+
+FUNCTION: void cblas_drotg
+    ( double* a, double* b, double* c, double* s ) ;
+FUNCTION: void cblas_drotmg
+    ( double* d1, double* d2, double* b1, double b2, double* P ) ;
+FUNCTION: void cblas_drot
+    ( int N, double* X, int incX, double* Y, int incY, double c, double s ) ;
+FUNCTION: void cblas_drotm
+    ( int N, double* X, int incX, double* Y, int incY, double* P ) ;
+! Level 2 BLAS (matrix-vector)
+
+FUNCTION: void cblas_sgemv ( CBLAS_ORDER Order,
+                 CBLAS_TRANSPOSE TransA, int M, int N,
+                 float alpha, float* A, int lda,
+                 float* X, int incX, float beta,
+                 float* Y, int incY ) ;
+FUNCTION: void cblas_sgbmv ( CBLAS_ORDER Order,
+                 CBLAS_TRANSPOSE TransA, int M, int N,
+                 int KL, int KU, float alpha,
+                 float* A, int lda, float* X,
+                 int incX, float beta, float* Y, int incY ) ;
+FUNCTION: void cblas_strmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, float* A, int lda,
+                 float* X, int incX ) ;
+FUNCTION: void cblas_stbmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, int K, float* A, int lda,
+                 float* X, int incX ) ;
+FUNCTION: void cblas_stpmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, float* Ap, float* X, int incX ) ;
+FUNCTION: void cblas_strsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, float* A, int lda, float* X,
+                 int incX ) ;
+FUNCTION: void cblas_stbsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, int K, float* A, int lda,
+                 float* X, int incX ) ;
+FUNCTION: void cblas_stpsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, float* Ap, float* X, int incX ) ;
+
+FUNCTION: void cblas_dgemv ( CBLAS_ORDER Order,
+                 CBLAS_TRANSPOSE TransA, int M, int N,
+                 double alpha, double* A, int lda,
+                 double* X, int incX, double beta,
+                 double* Y, int incY ) ;
+FUNCTION: void cblas_dgbmv ( CBLAS_ORDER Order,
+                 CBLAS_TRANSPOSE TransA, int M, int N,
+                 int KL, int KU, double alpha,
+                 double* A, int lda, double* X,
+                 int incX, double beta, double* Y, int incY ) ;
+FUNCTION: void cblas_dtrmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, double* A, int lda,
+                 double* X, int incX ) ;
+FUNCTION: void cblas_dtbmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, int K, double* A, int lda,
+                 double* X, int incX ) ;
+FUNCTION: void cblas_dtpmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, double* Ap, double* X, int incX ) ;
+FUNCTION: void cblas_dtrsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, double* A, int lda, double* X,
+                 int incX ) ;
+FUNCTION: void cblas_dtbsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, int K, double* A, int lda,
+                 double* X, int incX ) ;
+FUNCTION: void cblas_dtpsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, double* Ap, double* X, int incX ) ;
+
+FUNCTION: void cblas_cgemv ( CBLAS_ORDER Order,
+                 CBLAS_TRANSPOSE TransA, int M, int N,
+                 void* alpha, void* A, int lda,
+                 void* X, int incX, void* beta,
+                 void* Y, int incY ) ;
+FUNCTION: void cblas_cgbmv ( CBLAS_ORDER Order,
+                 CBLAS_TRANSPOSE TransA, int M, int N,
+                 int KL, int KU, void* alpha,
+                 void* A, int lda, void* X,
+                 int incX, void* beta, void* Y, int incY ) ;
+FUNCTION: void cblas_ctrmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, void* A, int lda,
+                 void* X, int incX ) ;
+FUNCTION: void cblas_ctbmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, int K, void* A, int lda,
+                 void* X, int incX ) ;
+FUNCTION: void cblas_ctpmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, void* Ap, void* X, int incX ) ;
+FUNCTION: void cblas_ctrsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, void* A, int lda, void* X,
+                 int incX ) ;
+FUNCTION: void cblas_ctbsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, int K, void* A, int lda,
+                 void* X, int incX ) ;
+FUNCTION: void cblas_ctpsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, void* Ap, void* X, int incX ) ;
+
+FUNCTION: void cblas_zgemv ( CBLAS_ORDER Order,
+                 CBLAS_TRANSPOSE TransA, int M, int N,
+                 void* alpha, void* A, int lda,
+                 void* X, int incX, void* beta,
+                 void* Y, int incY ) ;
+FUNCTION: void cblas_zgbmv ( CBLAS_ORDER Order,
+                 CBLAS_TRANSPOSE TransA, int M, int N,
+                 int KL, int KU, void* alpha,
+                 void* A, int lda, void* X,
+                 int incX, void* beta, void* Y, int incY ) ;
+FUNCTION: void cblas_ztrmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, void* A, int lda,
+                 void* X, int incX ) ;
+FUNCTION: void cblas_ztbmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, int K, void* A, int lda,
+                 void* X, int incX ) ;
+FUNCTION: void cblas_ztpmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, void* Ap, void* X, int incX ) ;
+FUNCTION: void cblas_ztrsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, void* A, int lda, void* X,
+                 int incX ) ;
+FUNCTION: void cblas_ztbsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, int K, void* A, int lda,
+                 void* X, int incX ) ;
+FUNCTION: void cblas_ztpsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+                 int N, void* Ap, void* X, int incX ) ;
+
+
+FUNCTION: void cblas_ssymv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 int N, float alpha, float* A,
+                 int lda, float* X, int incX,
+                 float beta, float* Y, int incY ) ;
+FUNCTION: void cblas_ssbmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 int N, int K, float alpha, float* A,
+                 int lda, float* X, int incX,
+                 float beta, float* Y, int incY ) ;
+FUNCTION: void cblas_sspmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 int N, float alpha, float* Ap,
+                 float* X, int incX,
+                 float beta, float* Y, int incY ) ;
+FUNCTION: void cblas_sger ( CBLAS_ORDER Order, int M, int N,
+                float alpha, float* X, int incX,
+                float* Y, int incY, float* A, int lda ) ;
+FUNCTION: void cblas_ssyr ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                int N, float alpha, float* X,
+                int incX, float* A, int lda ) ;
+FUNCTION: void cblas_sspr ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                int N, float alpha, float* X,
+                int incX, float* Ap ) ;
+FUNCTION: void cblas_ssyr2 ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                int N, float alpha, float* X,
+                int incX, float* Y, int incY, float* A,
+                int lda ) ;
+FUNCTION: void cblas_sspr2 ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                int N, float alpha, float* X,
+                int incX, float* Y, int incY, float* A ) ;
+
+FUNCTION: void cblas_dsymv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 int N, double alpha, double* A,
+                 int lda, double* X, int incX,
+                 double beta, double* Y, int incY ) ;
+FUNCTION: void cblas_dsbmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 int N, int K, double alpha, double* A,
+                 int lda, double* X, int incX,
+                 double beta, double* Y, int incY ) ;
+FUNCTION: void cblas_dspmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 int N, double alpha, double* Ap,
+                 double* X, int incX,
+                 double beta, double* Y, int incY ) ;
+FUNCTION: void cblas_dger ( CBLAS_ORDER Order, int M, int N,
+                double alpha, double* X, int incX,
+                double* Y, int incY, double* A, int lda ) ;
+FUNCTION: void cblas_dsyr ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                int N, double alpha, double* X,
+                int incX, double* A, int lda ) ;
+FUNCTION: void cblas_dspr ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                int N, double alpha, double* X,
+                int incX, double* Ap ) ;
+FUNCTION: void cblas_dsyr2 ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                int N, double alpha, double* X,
+                int incX, double* Y, int incY, double* A,
+                int lda ) ;
+FUNCTION: void cblas_dspr2 ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                int N, double alpha, double* X,
+                int incX, double* Y, int incY, double* A ) ;
+
+
+FUNCTION: void cblas_chemv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 int N, void* alpha, void* A,
+                 int lda, void* X, int incX,
+                 void* beta, void* Y, int incY ) ;
+FUNCTION: void cblas_chbmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 int N, int K, void* alpha, void* A,
+                 int lda, void* X, int incX,
+                 void* beta, void* Y, int incY ) ;
+FUNCTION: void cblas_chpmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 int N, void* alpha, void* Ap,
+                 void* X, int incX,
+                 void* beta, void* Y, int incY ) ;
+FUNCTION: void cblas_cgeru ( CBLAS_ORDER Order, int M, int N,
+                 void* alpha, void* X, int incX,
+                 void* Y, int incY, void* A, int lda ) ;
+FUNCTION: void cblas_cgerc ( CBLAS_ORDER Order, int M, int N,
+                 void* alpha, void* X, int incX,
+                 void* Y, int incY, void* A, int lda ) ;
+FUNCTION: void cblas_cher ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                int N, float alpha, void* X, int incX,
+                void* A, int lda ) ;
+FUNCTION: void cblas_chpr ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                int N, float alpha, void* X,
+                int incX, void* A ) ;
+FUNCTION: void cblas_cher2 ( CBLAS_ORDER Order, CBLAS_UPLO Uplo, int N,
+                void* alpha, void* X, int incX,
+                void* Y, int incY, void* A, int lda ) ;
+FUNCTION: void cblas_chpr2 ( CBLAS_ORDER Order, CBLAS_UPLO Uplo, int N,
+                void* alpha, void* X, int incX,
+                void* Y, int incY, void* Ap ) ;
+
+FUNCTION: void cblas_zhemv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 int N, void* alpha, void* A,
+                 int lda, void* X, int incX,
+                 void* beta, void* Y, int incY ) ;
+FUNCTION: void cblas_zhbmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 int N, int K, void* alpha, void* A,
+                 int lda, void* X, int incX,
+                 void* beta, void* Y, int incY ) ;
+FUNCTION: void cblas_zhpmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 int N, void* alpha, void* Ap,
+                 void* X, int incX,
+                 void* beta, void* Y, int incY ) ;
+FUNCTION: void cblas_zgeru ( CBLAS_ORDER Order, int M, int N,
+                 void* alpha, void* X, int incX,
+                 void* Y, int incY, void* A, int lda ) ;
+FUNCTION: void cblas_zgerc ( CBLAS_ORDER Order, int M, int N,
+                 void* alpha, void* X, int incX,
+                 void* Y, int incY, void* A, int lda ) ;
+FUNCTION: void cblas_zher ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                int N, double alpha, void* X, int incX,
+                void* A, int lda ) ;
+FUNCTION: void cblas_zhpr ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                int N, double alpha, void* X,
+                int incX, void* A ) ;
+FUNCTION: void cblas_zher2 ( CBLAS_ORDER Order, CBLAS_UPLO Uplo, int N,
+                void* alpha, void* X, int incX,
+                void* Y, int incY, void* A, int lda ) ;
+FUNCTION: void cblas_zhpr2 ( CBLAS_ORDER Order, CBLAS_UPLO Uplo, int N,
+                void* alpha, void* X, int incX,
+                void* Y, int incY, void* Ap ) ;
+
+! Level 3 BLAS (matrix-matrix) 
+
+FUNCTION: void cblas_sgemm ( CBLAS_ORDER Order, CBLAS_TRANSPOSE TransA,
+                 CBLAS_TRANSPOSE TransB, int M, int N,
+                 int K, float alpha, float* A,
+                 int lda, float* B, int ldb,
+                 float beta, float* C, int ldc ) ;
+FUNCTION: void cblas_ssymm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
+                 CBLAS_UPLO Uplo, int M, int N,
+                 float alpha, float* A, int lda,
+                 float* B, int ldb, float beta,
+                 float* C, int ldc ) ;
+FUNCTION: void cblas_ssyrk ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE Trans, int N, int K,
+                 float alpha, float* A, int lda,
+                 float beta, float* C, int ldc ) ;
+FUNCTION: void cblas_ssyr2k ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                  CBLAS_TRANSPOSE Trans, int N, int K,
+                  float alpha, float* A, int lda,
+                  float* B, int ldb, float beta,
+                  float* C, int ldc ) ;
+FUNCTION: void cblas_strmm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
+                 CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
+                 CBLAS_DIAG Diag, int M, int N,
+                 float alpha, float* A, int lda,
+                 float* B, int ldb ) ;
+FUNCTION: void cblas_strsm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
+                 CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
+                 CBLAS_DIAG Diag, int M, int N,
+                 float alpha, float* A, int lda,
+                 float* B, int ldb ) ;
+
+FUNCTION: void cblas_dgemm ( CBLAS_ORDER Order, CBLAS_TRANSPOSE TransA,
+                 CBLAS_TRANSPOSE TransB, int M, int N,
+                 int K, double alpha, double* A,
+                 int lda, double* B, int ldb,
+                 double beta, double* C, int ldc ) ;
+FUNCTION: void cblas_dsymm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
+                 CBLAS_UPLO Uplo, int M, int N,
+                 double alpha, double* A, int lda,
+                 double* B, int ldb, double beta,
+                 double* C, int ldc ) ;
+FUNCTION: void cblas_dsyrk ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE Trans, int N, int K,
+                 double alpha, double* A, int lda,
+                 double beta, double* C, int ldc ) ;
+FUNCTION: void cblas_dsyr2k ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                  CBLAS_TRANSPOSE Trans, int N, int K,
+                  double alpha, double* A, int lda,
+                  double* B, int ldb, double beta,
+                  double* C, int ldc ) ;
+FUNCTION: void cblas_dtrmm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
+                 CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
+                 CBLAS_DIAG Diag, int M, int N,
+                 double alpha, double* A, int lda,
+                 double* B, int ldb ) ;
+FUNCTION: void cblas_dtrsm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
+                 CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
+                 CBLAS_DIAG Diag, int M, int N,
+                 double alpha, double* A, int lda,
+                 double* B, int ldb ) ;
+
+FUNCTION: void cblas_cgemm ( CBLAS_ORDER Order, CBLAS_TRANSPOSE TransA,
+                 CBLAS_TRANSPOSE TransB, int M, int N,
+                 int K, void* alpha, void* A,
+                 int lda, void* B, int ldb,
+                 void* beta, void* C, int ldc ) ;
+FUNCTION: void cblas_csymm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
+                 CBLAS_UPLO Uplo, int M, int N,
+                 void* alpha, void* A, int lda,
+                 void* B, int ldb, void* beta,
+                 void* C, int ldc ) ;
+FUNCTION: void cblas_csyrk ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE Trans, int N, int K,
+                 void* alpha, void* A, int lda,
+                 void* beta, void* C, int ldc ) ;
+FUNCTION: void cblas_csyr2k ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                  CBLAS_TRANSPOSE Trans, int N, int K,
+                  void* alpha, void* A, int lda,
+                  void* B, int ldb, void* beta,
+                  void* C, int ldc ) ;
+FUNCTION: void cblas_ctrmm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
+                 CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
+                 CBLAS_DIAG Diag, int M, int N,
+                 void* alpha, void* A, int lda,
+                 void* B, int ldb ) ;
+FUNCTION: void cblas_ctrsm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
+                 CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
+                 CBLAS_DIAG Diag, int M, int N,
+                 void* alpha, void* A, int lda,
+                 void* B, int ldb ) ;
+
+FUNCTION: void cblas_zgemm ( CBLAS_ORDER Order, CBLAS_TRANSPOSE TransA,
+                 CBLAS_TRANSPOSE TransB, int M, int N,
+                 int K, void* alpha, void* A,
+                 int lda, void* B, int ldb,
+                 void* beta, void* C, int ldc ) ;
+FUNCTION: void cblas_zsymm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
+                 CBLAS_UPLO Uplo, int M, int N,
+                 void* alpha, void* A, int lda,
+                 void* B, int ldb, void* beta,
+                 void* C, int ldc ) ;
+FUNCTION: void cblas_zsyrk ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE Trans, int N, int K,
+                 void* alpha, void* A, int lda,
+                 void* beta, void* C, int ldc ) ;
+FUNCTION: void cblas_zsyr2k ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                  CBLAS_TRANSPOSE Trans, int N, int K,
+                  void* alpha, void* A, int lda,
+                  void* B, int ldb, void* beta,
+                  void* C, int ldc ) ;
+FUNCTION: void cblas_ztrmm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
+                 CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
+                 CBLAS_DIAG Diag, int M, int N,
+                 void* alpha, void* A, int lda,
+                 void* B, int ldb ) ;
+FUNCTION: void cblas_ztrsm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
+                 CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
+                 CBLAS_DIAG Diag, int M, int N,
+                 void* alpha, void* A, int lda,
+                 void* B, int ldb ) ;
+
+FUNCTION: void cblas_chemm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
+                 CBLAS_UPLO Uplo, int M, int N,
+                 void* alpha, void* A, int lda,
+                 void* B, int ldb, void* beta,
+                 void* C, int ldc ) ;
+FUNCTION: void cblas_cherk ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE Trans, int N, int K,
+                 float alpha, void* A, int lda,
+                 float beta, void* C, int ldc ) ;
+FUNCTION: void cblas_cher2k ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                  CBLAS_TRANSPOSE Trans, int N, int K,
+                  void* alpha, void* A, int lda,
+                  void* B, int ldb, float beta,
+                  void* C, int ldc ) ;
+FUNCTION: void cblas_zhemm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
+                 CBLAS_UPLO Uplo, int M, int N,
+                 void* alpha, void* A, int lda,
+                 void* B, int ldb, void* beta,
+                 void* C, int ldc ) ;
+FUNCTION: void cblas_zherk ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                 CBLAS_TRANSPOSE Trans, int N, int K,
+                 double alpha, void* A, int lda,
+                 double beta, void* C, int ldc ) ;
+FUNCTION: void cblas_zher2k ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
+                  CBLAS_TRANSPOSE Trans, int N, int K,
+                  void* alpha, void* A, int lda,
+                  void* B, int ldb, double beta,
+                  void* C, int ldc ) ;
+
diff --git a/basis/math/blas/cblas/summary.txt b/basis/math/blas/cblas/summary.txt
new file mode 100644 (file)
index 0000000..c72e78e
--- /dev/null
@@ -0,0 +1 @@
+Low-level bindings to the C Basic Linear Algebra Subroutines (BLAS) library
diff --git a/basis/math/blas/cblas/tags.txt b/basis/math/blas/cblas/tags.txt
new file mode 100644 (file)
index 0000000..241ec1e
--- /dev/null
@@ -0,0 +1,2 @@
+math
+bindings
diff --git a/basis/math/blas/matrices/authors.txt b/basis/math/blas/matrices/authors.txt
new file mode 100644 (file)
index 0000000..f13c9c1
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
diff --git a/basis/math/blas/matrices/matrices-docs.factor b/basis/math/blas/matrices/matrices-docs.factor
new file mode 100644 (file)
index 0000000..01e0997
--- /dev/null
@@ -0,0 +1,245 @@
+USING: alien byte-arrays help.markup help.syntax math math.blas.vectors sequences strings ;
+IN: math.blas.matrices
+
+ARTICLE: "math.blas-summary" "Basic Linear Algebra Subroutines (BLAS) interface"
+"Factor provides an interface to high-performance vector and matrix math routines available in the system's BLAS library. A set of specialized types are provided for handling packed, unboxed vector data:"
+{ $subsection "math.blas-types" }
+"Scalar-vector and vector-vector operations are available in the " { $vocab-link "math.blas.vectors" } " vocabulary:"
+{ $subsection "math.blas.vectors" }
+"Vector-matrix and matrix-matrix operations are available in the " { $vocab-link "math.blas.matrices" } " vocabulary:"
+{ $subsection "math.blas.matrices" }
+"The low-level BLAS C interface can be accessed directly through the " { $vocab-link "math.blas.cblas" } " vocabulary." ;
+
+ARTICLE: "math.blas-types" "BLAS interface types"
+"BLAS vectors come in single- and double-precision, real and complex flavors:"
+{ $subsection float-blas-vector }
+{ $subsection double-blas-vector }
+{ $subsection float-complex-blas-vector }
+{ $subsection double-complex-blas-vector }
+"These vector types all follow the " { $link sequence } " protocol. In addition, there are corresponding types for matrix data:"
+{ $subsection float-blas-matrix }
+{ $subsection double-blas-matrix }
+{ $subsection float-complex-blas-matrix }
+{ $subsection double-complex-blas-matrix } 
+"Syntax words are provided for constructing literal vectors and matrices in the " { $vocab-link "math.blas.syntax" } " vocabulary:"
+{ $subsection "math.blas.syntax" }
+"There are BOA constructors for all vector and matrix types, which provide the most flexibility in specifying memory layout:"
+{ $subsection <float-blas-vector> }
+{ $subsection <double-blas-vector> }
+{ $subsection <float-complex-blas-vector> }
+{ $subsection <double-complex-blas-vector> }
+{ $subsection <float-blas-matrix> }
+{ $subsection <double-blas-matrix> }
+{ $subsection <float-complex-blas-matrix> }
+{ $subsection <double-complex-blas-matrix> }
+"For the simple case of creating a dense, zero-filled vector or matrix, simple empty object constructors are provided:"
+{ $subsection <empty-vector> }
+{ $subsection <empty-matrix> }
+"BLAS vectors and matrices can also be constructed from other Factor sequences:"
+{ $subsection >float-blas-vector }
+{ $subsection >double-blas-vector }
+{ $subsection >float-complex-blas-vector }
+{ $subsection >double-complex-blas-vector }
+{ $subsection >float-blas-matrix }
+{ $subsection >double-blas-matrix }
+{ $subsection >float-complex-blas-matrix }
+{ $subsection >double-complex-blas-matrix } ;
+
+ARTICLE: "math.blas.matrices" "BLAS interface matrix operations"
+"Transposing and slicing matrices:"
+{ $subsection Mtranspose }
+{ $subsection Mrows }
+{ $subsection Mcols }
+{ $subsection Msub }
+"Matrix-vector products:"
+{ $subsection n*M.V+n*V! }
+{ $subsection n*M.V+n*V }
+{ $subsection n*M.V }
+{ $subsection M.V }
+"Vector outer products:"
+{ $subsection n*V(*)V+M! }
+{ $subsection n*V(*)Vconj+M! }
+{ $subsection n*V(*)V+M }
+{ $subsection n*V(*)Vconj+M }
+{ $subsection n*V(*)V }
+{ $subsection n*V(*)Vconj }
+{ $subsection V(*) }
+{ $subsection V(*)conj }
+"Matrix products:"
+{ $subsection n*M.M+n*M! }
+{ $subsection n*M.M+n*M }
+{ $subsection n*M.M }
+{ $subsection M. }
+"Scalar-matrix products:"
+{ $subsection n*M! }
+{ $subsection n*M }
+{ $subsection M*n }
+{ $subsection M/n } ;
+
+ABOUT: "math.blas.matrices"
+
+HELP: blas-matrix-base
+{ $class-description "The base class for all BLAS matrix types. Objects of this type should not be created directly; instead, instantiate one of the typed subclasses:"
+{ $list
+    { { $link float-blas-matrix } }
+    { { $link double-blas-matrix } }
+    { { $link float-complex-blas-matrix } }
+    { { $link double-complex-blas-matrix } }
+}
+"All of these subclasses share the same tuple layout:"
+{ $list
+    { { $snippet "underlying" } " contains an alien pointer referencing or byte-array containing a packed, column-major array of float, double, float complex, or double complex values;" }
+    { { $snippet "ld" } " indicates the distance, in elements, between matrix columns;" }
+    { { $snippet "rows" } " and " { $snippet "cols" } " indicate the number of significant rows and columns in the matrix;" }
+    { "and " { $snippet "transpose" } ", if set to a true value, indicates that the matrix should be treated as transposed relative to its in-memory representation." }
+} } ;
+
+{ blas-vector-base blas-matrix-base } related-words
+
+HELP: float-blas-matrix
+{ $class-description "A matrix of single-precision floating-point values. For details on the tuple layout, see " { $link blas-matrix-base } "." } ;
+HELP: double-blas-matrix
+{ $class-description "A matrix of double-precision floating-point values. For details on the tuple layout, see " { $link blas-matrix-base } "." } ;
+HELP: float-complex-blas-matrix
+{ $class-description "A matrix of single-precision floating-point complex values. Complex values are stored in memory as two consecutive float values, real part then imaginary part. For details on the tuple layout, see " { $link blas-matrix-base } "." } ;
+HELP: double-complex-blas-matrix
+{ $class-description "A matrix of double-precision floating-point complex values. Complex values are stored in memory as two consecutive float values, real part then imaginary part. For details on the tuple layout, see " { $link blas-matrix-base } "." } ;
+
+{
+    float-blas-matrix double-blas-matrix float-complex-blas-matrix double-complex-blas-matrix
+    float-blas-vector double-blas-vector float-complex-blas-vector double-complex-blas-vector
+} related-words
+
+HELP: Mwidth
+{ $values { "matrix" blas-matrix-base } { "width" integer } }
+{ $description "Returns the number of columns in " { $snippet "matrix" } "." } ;
+
+HELP: Mheight
+{ $values { "matrix" blas-matrix-base } { "height" integer } }
+{ $description "Returns the number of rows in " { $snippet "matrix" } "." } ;
+
+{ Mwidth Mheight } related-words
+
+HELP: n*M.V+n*V!
+{ $values { "alpha" number } { "A" blas-matrix-base } { "x" blas-vector-base } { "beta" number } { "y" blas-vector-base } { "y=alpha*A.x+b*y" blas-vector-base } }
+{ $description "Calculate the matrix-vector product " { $snippet "αAx + Î²y" } ", and overwrite the current contents of " { $snippet "y" } " with the result. The width of " { $snippet "A" } " must match the length of " { $snippet "x" } ", and the height must match the length of " { $snippet "y" } ". Corresponds to the xGEMV routines in BLAS." }
+{ $side-effects "y" } ;
+
+HELP: n*V(*)V+M!
+{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "A" blas-matrix-base } { "A=alpha*x(*)y+A" blas-matrix-base } }
+{ $description "Calculate the outer product " { $snippet "αx⊗y + A" } " and overwrite the current contents of A with the result. The width of " { $snippet "A" } " must match the length of " { $snippet "y" } ", and its height must match the length of " { $snippet "x" } ". Corresponds to the xGER and xGERU routines in BLAS." }
+{ $side-effects "A" } ;
+
+HELP: n*V(*)Vconj+M!
+{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "A" blas-matrix-base } { "A=alpha*x(*)yconj+A" blas-matrix-base } }
+{ $description "Calculate the conjugate outer product " { $snippet "αx⊗yÌ… + A" } " and overwrite the current contents of A with the result. The width of " { $snippet "A" } " must match the length of " { $snippet "y" } ", and its height must match the length of " { $snippet "x" } ". Corresponds to the xGERC routines in BLAS." }
+{ $side-effects "A" } ;
+
+HELP: n*M.M+n*M!
+{ $values { "alpha" number } { "A" blas-matrix-base } { "B" blas-matrix-base } { "beta" number } { "C" blas-matrix-base } { "C=alpha*A.B+beta*C" blas-matrix-base } }
+{ $description "Calculate the matrix product " { $snippet "αAB + Î²C" } " and overwrite the current contents of C with the result. The width of " { $snippet "A" } " and the height of " { $snippet "B" } " must match, as must the heights of " { $snippet "A" } " and " { $snippet "C" } ", and the widths of " { $snippet "B" } " and " { $snippet "C" } ". Corresponds to the xGEMM routines in BLAS." }
+{ $side-effects "C" } ;
+
+HELP: <empty-matrix>
+{ $values { "rows" integer } { "cols" integer } { "exemplar" blas-vector-base blas-matrix-base } { "matrix" blas-matrix-base } }
+{ $description "Create a matrix of all zeros with the given dimensions and the same element type as " { $snippet "exemplar" } "." } ;
+
+{ <zero-vector> <empty-vector> <empty-matrix> } related-words
+
+HELP: n*M.V+n*V
+{ $values { "alpha" number } { "A" blas-matrix-base } { "x" blas-vector-base } { "beta" number } { "y" blas-vector-base } { "alpha*A.x+b*y" blas-vector-base } }
+{ $description "Calculate the matrix-vector product " { $snippet "αAx + Î²y" } " and return a freshly allocated vector containing the result. The width of " { $snippet "A" } " must match the length of " { $snippet "x" } ", and the height must match the length of " { $snippet "y" } ". The returned vector will have the same length as " { $snippet "y" } ". Corresponds to the xGEMV routines in BLAS." } ;
+
+HELP: n*V(*)V+M
+{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "A" blas-matrix-base } { "alpha*x(*)y+A" blas-matrix-base } }
+{ $description "Calculate the outer product " { $snippet "αx⊗y + A" } " and return a freshly allocated matrix containing the result. The width of " { $snippet "A" } " must match the length of " { $snippet "y" } ", and its height must match the length of " { $snippet "x" } ". The returned matrix will have the same dimensions as " { $snippet "A" } ". Corresponds to the xGER and xGERU routines in BLAS." } ;
+
+HELP: n*V(*)Vconj+M
+{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "A" blas-matrix-base } { "alpha*x(*)yconj+A" blas-matrix-base } }
+{ $description "Calculate the conjugate outer product " { $snippet "αx⊗yÌ… + A" } " and return a freshly allocated matrix containing the result. The width of " { $snippet "A" } " must match the length of " { $snippet "y" } ", and its height must match the length of " { $snippet "x" } ". The returned matrix will have the same dimensions as " { $snippet "A" } ". Corresponds to the xGERC routines in BLAS." } ;
+
+HELP: n*M.M+n*M
+{ $values { "alpha" number } { "A" blas-matrix-base } { "B" blas-matrix-base } { "beta" number } { "C" blas-matrix-base } { "alpha*A.B+beta*C" blas-matrix-base } }
+{ $description "Calculate the matrix product " { $snippet "αAB + Î²C" } " and overwrite the current contents of C with the result. The width of " { $snippet "A" } " and the height of " { $snippet "B" } " must match, as must the heights of " { $snippet "A" } " and " { $snippet "C" } ", and the widths of " { $snippet "B" } " and " { $snippet "C" } ". Corresponds to the xGEMM routines in BLAS." } ;
+
+HELP: n*M.V
+{ $values { "alpha" number } { "A" blas-matrix-base } { "x" blas-vector-base } { "alpha*A.x" blas-vector-base } }
+{ $description "Calculate the matrix-vector product " { $snippet "αAx" } " and return a freshly allocated vector containing the result. The width of " { $snippet "A" } " must match the length of " { $snippet "x" } ". The length of the returned vector will match the height of " { $snippet "A" } ". Corresponds to the xGEMV routines in BLAS." } ;
+
+HELP: M.V
+{ $values { "A" blas-matrix-base } { "x" blas-vector-base } { "A.x" blas-vector-base } }
+{ $description "Calculate the matrix-vector product " { $snippet "Ax" } " and return a freshly allocated vector containing the result. The width of " { $snippet "A" } " must match the length of " { $snippet "x" } ". The length of the returned vector will match the height of " { $snippet "A" } ". Corresponds to the xGEMV routines in BLAS." } ;
+
+{ n*M.V+n*V! n*M.V+n*V n*M.V M.V } related-words
+
+HELP: n*V(*)V
+{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "alpha*x(*)y" blas-matrix-base } }
+{ $description "Calculate the outer product " { $snippet "αx⊗y" } " and return a freshly allocated matrix containing the result. The returned matrix's height will match the length of " { $snippet "x" } ", and its width will match the length of " { $snippet "y" } ". Corresponds to the xGER and xGERU routines in BLAS." } ;
+
+HELP: n*V(*)Vconj
+{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "alpha*x(*)yconj" blas-matrix-base } }
+{ $description "Calculate the outer product " { $snippet "αx⊗yÌ…" } " and return a freshly allocated matrix containing the result. The returned matrix's height will match the length of " { $snippet "x" } ", and its width will match the length of " { $snippet "y" } ". Corresponds to the xGERC routines in BLAS." } ;
+
+HELP: V(*)
+{ $values { "x" blas-vector-base } { "y" blas-vector-base } { "x(*)y" blas-matrix-base } }
+{ $description "Calculate the outer product " { $snippet "x⊗y" } " and return a freshly allocated matrix containing the result. The returned matrix's height will match the length of " { $snippet "x" } ", and its width will match the length of " { $snippet "y" } ". Corresponds to the xGER and xGERU routines in BLAS." } ;
+
+HELP: V(*)conj
+{ $values { "x" blas-vector-base } { "y" blas-vector-base } { "x(*)yconj" blas-matrix-base } }
+{ $description "Calculate the conjugate outer product " { $snippet "x⊗yÌ…" } " and return a freshly allocated matrix containing the result. The returned matrix's height will match the length of " { $snippet "x" } ", and its width will match the length of " { $snippet "y" } ". Corresponds to the xGERC routines in BLAS." } ;
+
+{ n*V(*)V+M! n*V(*)Vconj+M! n*V(*)V+M n*V(*)Vconj+M n*V(*)V n*V(*)Vconj V(*) V(*)conj V. V.conj } related-words
+
+HELP: n*M.M
+{ $values { "alpha" number } { "A" blas-matrix-base } { "B" blas-matrix-base } { "alpha*A.B" blas-matrix-base } }
+{ $description "Calculate the matrix product " { $snippet "αAB" } " and return a freshly allocated matrix containing the result. The width of " { $snippet "A" } " and the height of " { $snippet "B" } " must match. The returned matrix's height will be the same as " { $snippet "A" } "'s, and its width will match " { $snippet "B" } "'s. Corresponds to the xGEMM routines in BLAS." } ;
+
+HELP: M.
+{ $values { "A" blas-matrix-base } { "B" blas-matrix-base } { "A.B" blas-matrix-base } }
+{ $description "Calculate the matrix product " { $snippet "AB" } " and return a freshly allocated matrix containing the result. The width of " { $snippet "A" } " and the height of " { $snippet "B" } " must match. The returned matrix's height will be the same as " { $snippet "A" } "'s, and its width will match " { $snippet "B" } "'s. Corresponds to the xGEMM routines in BLAS." } ;
+
+{ n*M.M+n*M! n*M.M+n*M n*M.M M. } related-words
+
+HELP: Msub
+{ $values { "matrix" blas-matrix-base } { "row" integer } { "col" integer } { "height" integer } { "width" integer } { "sub" blas-matrix-base } }
+{ $description "Select a rectangular submatrix of " { $snippet "matrix" } " with the given dimensions. The returned submatrix will share the parent matrix's storage." } ;
+
+HELP: Mrows
+{ $values { "A" blas-matrix-base } { "rows" sequence } }
+{ $description "Return a sequence of BLAS vectors representing the rows of " { $snippet "matrix" } ". Each vector will share the parent matrix's storage." } ;
+
+HELP: Mcols
+{ $values { "A" blas-matrix-base } { "cols" sequence } }
+{ $description "Return a sequence of BLAS vectors representing the columns of " { $snippet "matrix" } ". Each vector will share the parent matrix's storage." } ;
+
+HELP: n*M!
+{ $values { "n" number } { "A" blas-matrix-base } { "A=n*A" blas-matrix-base } }
+{ $description "Calculate the scalar-matrix product " { $snippet "nA" } " and overwrite the current contents of A with the result." }
+{ $side-effects "A" } ;
+
+HELP: n*M
+{ $values { "n" number } { "A" blas-matrix-base } { "n*A" blas-matrix-base } }
+{ $description "Calculate the scalar-matrix product " { $snippet "nA" } " and return a freshly allocated matrix with the same dimensions as " { $snippet "A" } " containing the result." } ;
+
+HELP: M*n
+{ $values { "A" blas-matrix-base } { "n" number } { "A*n" blas-matrix-base } }
+{ $description "Calculate the scalar-matrix product " { $snippet "nA" } " and return a freshly allocated matrix with the same dimensions as " { $snippet "A" } " containing the result." } ;
+
+HELP: M/n
+{ $values { "A" blas-matrix-base } { "n" number } { "A/n" blas-matrix-base } }
+{ $description "Calculate the scalar-matrix product " { $snippet "(1/n)A" } " and return a freshly allocated matrix with the same dimensions as " { $snippet "A" } " containing the result." } ;
+
+{ n*M! n*M M*n M/n } related-words
+
+HELP: Mtranspose
+{ $values { "matrix" blas-matrix-base } { "matrix^T" blas-matrix-base } }
+{ $description "Returns the transpose of " { $snippet "matrix" } ". The returned matrix shares storage with the original matrix." } ;
+
+HELP: element-type
+{ $values { "v" blas-vector-base blas-matrix-base } { "type" string } }
+{ $description "Return the C type of the elements in the given BLAS vector or matrix." } ;
+
+HELP: <empty-vector>
+{ $values { "length" "The length of the new vector" } { "exemplar" blas-vector-base blas-matrix-base } { "vector" blas-vector-base } }
+{ $description "Return a vector of zeros with the given " { $snippet "length" } " and the same element type as " { $snippet "v" } "." } ;
+
diff --git a/basis/math/blas/matrices/matrices-tests.factor b/basis/math/blas/matrices/matrices-tests.factor
new file mode 100644 (file)
index 0000000..dabf3c3
--- /dev/null
@@ -0,0 +1,710 @@
+USING: kernel math.blas.matrices math.blas.vectors math.blas.syntax
+sequences tools.test ;
+IN: math.blas.matrices.tests
+
+! clone
+
+[ smatrix{
+    { 1.0 2.0 3.0 }
+    { 4.0 5.0 6.0 }
+    { 7.0 8.0 9.0 }
+} ] [
+    smatrix{
+        { 1.0 2.0 3.0 }
+        { 4.0 5.0 6.0 }
+        { 7.0 8.0 9.0 }
+    } clone
+] unit-test
+[ f ] [
+    smatrix{
+        { 1.0 2.0 3.0 }
+        { 4.0 5.0 6.0 }
+        { 7.0 8.0 9.0 }
+    } dup clone eq?
+] unit-test
+
+[ dmatrix{
+    { 1.0 2.0 3.0 }
+    { 4.0 5.0 6.0 }
+    { 7.0 8.0 9.0 }
+} ] [
+    dmatrix{
+        { 1.0 2.0 3.0 }
+        { 4.0 5.0 6.0 }
+        { 7.0 8.0 9.0 }
+    } clone
+] unit-test
+[ f ] [
+    dmatrix{
+        { 1.0 2.0 3.0 }
+        { 4.0 5.0 6.0 }
+        { 7.0 8.0 9.0 }
+    } dup clone eq?
+] unit-test
+
+[ cmatrix{
+    { C{ 1.0 1.0 } 2.0          3.0          }
+    { 4.0          C{ 5.0 2.0 } 6.0          }
+    { 7.0          8.0          C{ 9.0 3.0 } }
+} ] [
+    cmatrix{
+        { C{ 1.0 1.0 } 2.0          3.0          }
+        { 4.0          C{ 5.0 2.0 } 6.0          }
+        { 7.0          8.0          C{ 9.0 3.0 } }
+    } clone
+] unit-test
+[ f ] [
+    cmatrix{
+        { C{ 1.0 1.0 } 2.0          3.0          }
+        { 4.0          C{ 5.0 2.0 } 6.0          }
+        { 7.0          8.0          C{ 9.0 3.0 } }
+    } dup clone eq?
+] unit-test
+
+[ zmatrix{
+    { C{ 1.0 1.0 } 2.0          3.0          }
+    { 4.0          C{ 5.0 2.0 } 6.0          }
+    { 7.0          8.0          C{ 9.0 3.0 } }
+} ] [
+    zmatrix{
+        { C{ 1.0 1.0 } 2.0          3.0          }
+        { 4.0          C{ 5.0 2.0 } 6.0          }
+        { 7.0          8.0          C{ 9.0 3.0 } }
+    } clone
+] unit-test
+[ f ] [
+    zmatrix{
+        { C{ 1.0 1.0 } 2.0          3.0          }
+        { 4.0          C{ 5.0 2.0 } 6.0          }
+        { 7.0          8.0          C{ 9.0 3.0 } }
+    } dup clone eq?
+] unit-test
+
+! M.V
+
+[ svector{ 3.0 1.0 6.0 } ] [
+    smatrix{
+        {  0.0 1.0 0.0 1.0 }
+        { -1.0 0.0 0.0 2.0 }
+        {  0.0 0.0 1.0 3.0 }
+    }
+    svector{ 1.0 2.0 3.0 1.0 }
+    M.V
+] unit-test 
+[ svector{ -2.0 1.0 3.0 14.0 } ] [
+    smatrix{
+        {  0.0 1.0 0.0 1.0 }
+        { -1.0 0.0 0.0 2.0 }
+        {  0.0 0.0 1.0 3.0 }
+    } Mtranspose
+    svector{ 1.0 2.0 3.0 }
+    M.V
+] unit-test 
+
+[ dvector{ 3.0 1.0 6.0 } ] [
+    dmatrix{
+        {  0.0 1.0 0.0 1.0 }
+        { -1.0 0.0 0.0 2.0 }
+        {  0.0 0.0 1.0 3.0 }
+    }
+    dvector{ 1.0 2.0 3.0 1.0 }
+    M.V
+] unit-test 
+[ dvector{ -2.0 1.0 3.0 14.0 } ] [
+    dmatrix{
+        {  0.0 1.0 0.0 1.0 }
+        { -1.0 0.0 0.0 2.0 }
+        {  0.0 0.0 1.0 3.0 }
+    } Mtranspose
+    dvector{ 1.0 2.0 3.0 }
+    M.V
+] unit-test 
+
+[ cvector{ 3.0 C{ 1.0 2.0 } 6.0 } ] [
+    cmatrix{
+        {  0.0 1.0          0.0 1.0 }
+        { -1.0 C{ 0.0 1.0 } 0.0 2.0 }
+        {  0.0 0.0          1.0 3.0 }
+    }
+    cvector{ 1.0 2.0 3.0 1.0 }
+    M.V
+] unit-test 
+[ cvector{ -2.0 C{ 1.0 2.0 } 3.0 14.0 } ] [
+    cmatrix{
+        {  0.0 1.0          0.0 1.0 }
+        { -1.0 C{ 0.0 1.0 } 0.0 2.0 }
+        {  0.0 0.0          1.0 3.0 }
+    } Mtranspose
+    cvector{ 1.0 2.0 3.0 }
+    M.V
+] unit-test 
+
+[ zvector{ 3.0 C{ 1.0 2.0 } 6.0 } ] [
+    zmatrix{
+        {  0.0 1.0          0.0 1.0 }
+        { -1.0 C{ 0.0 1.0 } 0.0 2.0 }
+        {  0.0 0.0          1.0 3.0 }
+    }
+    zvector{ 1.0 2.0 3.0 1.0 }
+    M.V
+] unit-test
+[ zvector{ -2.0 C{ 1.0 2.0 } 3.0 14.0 } ] [
+    zmatrix{
+        {  0.0 1.0          0.0 1.0 }
+        { -1.0 C{ 0.0 1.0 } 0.0 2.0 }
+        {  0.0 0.0          1.0 3.0 }
+    } Mtranspose
+    zvector{ 1.0 2.0 3.0 }
+    M.V
+] unit-test 
+
+! V(*)
+
+[ smatrix{
+    { 1.0 2.0 3.0  4.0 }
+    { 2.0 4.0 6.0  8.0 }
+    { 3.0 6.0 9.0 12.0 }
+} ] [
+    svector{ 1.0 2.0 3.0 } svector{ 1.0 2.0 3.0 4.0 } V(*)
+] unit-test
+
+[ dmatrix{
+    { 1.0 2.0 3.0  4.0 }
+    { 2.0 4.0 6.0  8.0 }
+    { 3.0 6.0 9.0 12.0 }
+} ] [
+    dvector{ 1.0 2.0 3.0 } dvector{ 1.0 2.0 3.0 4.0 } V(*)
+] unit-test
+
+[ cmatrix{
+    { 1.0          2.0          C{ 3.0 -3.0 } 4.0            }
+    { 2.0          4.0          C{ 6.0 -6.0 } 8.0            }
+    { C{ 3.0 3.0 } C{ 6.0 6.0 } 18.0          C{ 12.0 12.0 } }
+} ] [
+    cvector{ 1.0 2.0 C{ 3.0 3.0 } } cvector{ 1.0 2.0 C{ 3.0 -3.0 } 4.0 } V(*)
+] unit-test
+
+[ zmatrix{
+    { 1.0          2.0          C{ 3.0 -3.0 } 4.0            }
+    { 2.0          4.0          C{ 6.0 -6.0 } 8.0            }
+    { C{ 3.0 3.0 } C{ 6.0 6.0 } 18.0          C{ 12.0 12.0 } }
+} ] [
+    zvector{ 1.0 2.0 C{ 3.0 3.0 } } zvector{ 1.0 2.0 C{ 3.0 -3.0 } 4.0 } V(*)
+] unit-test
+
+! M.
+
+[ smatrix{
+    { 1.0 0.0  0.0 4.0  0.0 }
+    { 0.0 0.0 -3.0 0.0  0.0 }
+    { 0.0 4.0  0.0 0.0 10.0 }
+    { 0.0 0.0  0.0 0.0  0.0 }
+} ] [
+    smatrix{
+        { 1.0 0.0  0.0 }
+        { 0.0 0.0 -1.0 }
+        { 0.0 2.0  0.0 }
+        { 0.0 0.0  0.0 }
+    } smatrix{
+        { 1.0 0.0 0.0 4.0 0.0 }
+        { 0.0 2.0 0.0 0.0 5.0 }
+        { 0.0 0.0 3.0 0.0 0.0 }
+    } M.
+] unit-test
+
+[ smatrix{
+    { 1.0  0.0  0.0 0.0 }
+    { 0.0  0.0  4.0 0.0 }
+    { 0.0 -3.0  0.0 0.0 }
+    { 4.0  0.0  0.0 0.0 }
+    { 0.0  0.0 10.0 0.0 }
+} ] [
+    smatrix{
+        { 1.0 0.0 0.0 4.0 0.0 }
+        { 0.0 2.0 0.0 0.0 5.0 }
+        { 0.0 0.0 3.0 0.0 0.0 }
+    } Mtranspose smatrix{
+        { 1.0 0.0  0.0 }
+        { 0.0 0.0 -1.0 }
+        { 0.0 2.0  0.0 }
+        { 0.0 0.0  0.0 }
+    } Mtranspose M.
+] unit-test
+
+[ dmatrix{
+    { 1.0 0.0  0.0 4.0  0.0 }
+    { 0.0 0.0 -3.0 0.0  0.0 }
+    { 0.0 4.0  0.0 0.0 10.0 }
+    { 0.0 0.0  0.0 0.0  0.0 }
+} ] [
+    dmatrix{
+        { 1.0 0.0  0.0 }
+        { 0.0 0.0 -1.0 }
+        { 0.0 2.0  0.0 }
+        { 0.0 0.0  0.0 }
+    } dmatrix{
+        { 1.0 0.0 0.0 4.0 0.0 }
+        { 0.0 2.0 0.0 0.0 5.0 }
+        { 0.0 0.0 3.0 0.0 0.0 }
+    } M.
+] unit-test
+
+[ dmatrix{
+    { 1.0  0.0  0.0 0.0 }
+    { 0.0  0.0  4.0 0.0 }
+    { 0.0 -3.0  0.0 0.0 }
+    { 4.0  0.0  0.0 0.0 }
+    { 0.0  0.0 10.0 0.0 }
+} ] [
+    dmatrix{
+        { 1.0 0.0 0.0 4.0 0.0 }
+        { 0.0 2.0 0.0 0.0 5.0 }
+        { 0.0 0.0 3.0 0.0 0.0 }
+    } Mtranspose dmatrix{
+        { 1.0 0.0  0.0 }
+        { 0.0 0.0 -1.0 }
+        { 0.0 2.0  0.0 }
+        { 0.0 0.0  0.0 }
+    } Mtranspose M.
+] unit-test
+
+[ cmatrix{
+    { 1.0 0.0            0.0 4.0  0.0 }
+    { 0.0 0.0           -3.0 0.0  0.0 }
+    { 0.0 C{ 4.0 -4.0 }  0.0 0.0 10.0 }
+    { 0.0 0.0            0.0 0.0  0.0 }
+} ] [
+    cmatrix{
+        { 1.0 0.0  0.0 }
+        { 0.0 0.0 -1.0 }
+        { 0.0 2.0  0.0 }
+        { 0.0 0.0  0.0 }
+    } cmatrix{
+        { 1.0 0.0           0.0 4.0 0.0 }
+        { 0.0 C{ 2.0 -2.0 } 0.0 0.0 5.0 }
+        { 0.0 0.0           3.0 0.0 0.0 }
+    } M.
+] unit-test
+
+[ cmatrix{
+    { 1.0  0.0  0.0          0.0 }
+    { 0.0  0.0 C{ 4.0 -4.0 } 0.0 }
+    { 0.0 -3.0  0.0          0.0 }
+    { 4.0  0.0  0.0          0.0 }
+    { 0.0  0.0 10.0          0.0 }
+} ] [
+    cmatrix{
+        { 1.0 0.0           0.0 4.0 0.0 }
+        { 0.0 C{ 2.0 -2.0 } 0.0 0.0 5.0 }
+        { 0.0 0.0           3.0 0.0 0.0 }
+    } Mtranspose cmatrix{
+        { 1.0 0.0  0.0 }
+        { 0.0 0.0 -1.0 }
+        { 0.0 2.0  0.0 }
+        { 0.0 0.0  0.0 }
+    } Mtranspose M.
+] unit-test
+
+[ zmatrix{
+    { 1.0 0.0            0.0 4.0  0.0 }
+    { 0.0 0.0           -3.0 0.0  0.0 }
+    { 0.0 C{ 4.0 -4.0 }  0.0 0.0 10.0 }
+    { 0.0 0.0            0.0 0.0  0.0 }
+} ] [
+    zmatrix{
+        { 1.0 0.0  0.0 }
+        { 0.0 0.0 -1.0 }
+        { 0.0 2.0  0.0 }
+        { 0.0 0.0  0.0 }
+    } zmatrix{
+        { 1.0 0.0           0.0 4.0 0.0 }
+        { 0.0 C{ 2.0 -2.0 } 0.0 0.0 5.0 }
+        { 0.0 0.0           3.0 0.0 0.0 }
+    } M.
+] unit-test
+
+[ zmatrix{
+    { 1.0  0.0  0.0          0.0 }
+    { 0.0  0.0 C{ 4.0 -4.0 } 0.0 }
+    { 0.0 -3.0  0.0          0.0 }
+    { 4.0  0.0  0.0          0.0 }
+    { 0.0  0.0 10.0          0.0 }
+} ] [
+    zmatrix{
+        { 1.0 0.0           0.0 4.0 0.0 }
+        { 0.0 C{ 2.0 -2.0 } 0.0 0.0 5.0 }
+        { 0.0 0.0           3.0 0.0 0.0 }
+    } Mtranspose zmatrix{
+        { 1.0 0.0  0.0 }
+        { 0.0 0.0 -1.0 }
+        { 0.0 2.0  0.0 }
+        { 0.0 0.0  0.0 }
+    } Mtranspose M.
+] unit-test
+
+! n*M
+
+[ smatrix{
+    { 2.0 0.0 }
+    { 0.0 2.0 }
+} ] [
+    2.0 smatrix{
+        { 1.0 0.0 }
+        { 0.0 1.0 }
+    } n*M
+] unit-test
+
+[ dmatrix{
+    { 2.0 0.0 }
+    { 0.0 2.0 }
+} ] [
+    2.0 dmatrix{
+        { 1.0 0.0 }
+        { 0.0 1.0 }
+    } n*M
+] unit-test
+
+[ cmatrix{
+    { C{ 2.0 1.0 } 0.0           }
+    { 0.0          C{ -1.0 2.0 } }
+} ] [
+    C{ 2.0 1.0 } cmatrix{
+        { 1.0 0.0          }
+        { 0.0 C{ 0.0 1.0 } }
+    } n*M
+] unit-test
+
+[ zmatrix{
+    { C{ 2.0 1.0 } 0.0           }
+    { 0.0          C{ -1.0 2.0 } }
+} ] [
+    C{ 2.0 1.0 } zmatrix{
+        { 1.0 0.0          }
+        { 0.0 C{ 0.0 1.0 } }
+    } n*M
+] unit-test
+
+! Mrows, Mcols
+
+[ svector{ 3.0 3.0 3.0 } ] [
+    2 smatrix{
+        { 1.0 2.0 3.0 4.0 }
+        { 2.0 2.0 3.0 4.0 }
+        { 3.0 2.0 3.0 4.0 }
+    } Mcols nth
+] unit-test
+[ svector{ 3.0 2.0 3.0 4.0 } ] [
+    2 smatrix{
+        { 1.0 2.0 3.0 4.0 }
+        { 2.0 2.0 3.0 4.0 }
+        { 3.0 2.0 3.0 4.0 }
+    } Mrows nth
+] unit-test
+[ 3 ] [
+    smatrix{
+        { 1.0 2.0 3.0 4.0 }
+        { 2.0 2.0 3.0 4.0 }
+        { 3.0 2.0 3.0 4.0 }
+    } Mrows length
+] unit-test
+[ 4 ] [
+    smatrix{
+        { 1.0 2.0 3.0 4.0 }
+        { 2.0 2.0 3.0 4.0 }
+        { 3.0 2.0 3.0 4.0 }
+    } Mcols length
+] unit-test
+[ svector{ 3.0 3.0 3.0 } ] [
+    2 smatrix{
+        { 1.0 2.0 3.0 4.0 }
+        { 2.0 2.0 3.0 4.0 }
+        { 3.0 2.0 3.0 4.0 }
+    } Mtranspose Mrows nth
+] unit-test
+[ svector{ 3.0 2.0 3.0 4.0 } ] [
+    2 smatrix{
+        { 1.0 2.0 3.0 4.0 }
+        { 2.0 2.0 3.0 4.0 }
+        { 3.0 2.0 3.0 4.0 }
+    } Mtranspose Mcols nth
+] unit-test
+[ 3 ] [
+    smatrix{
+        { 1.0 2.0 3.0 4.0 }
+        { 2.0 2.0 3.0 4.0 }
+        { 3.0 2.0 3.0 4.0 }
+    } Mtranspose Mcols length
+] unit-test
+[ 4 ] [
+    smatrix{
+        { 1.0 2.0 3.0 4.0 }
+        { 2.0 2.0 3.0 4.0 }
+        { 3.0 2.0 3.0 4.0 }
+    } Mtranspose Mrows length
+] unit-test
+
+[ dvector{ 3.0 3.0 3.0 } ] [
+    2 dmatrix{
+        { 1.0 2.0 3.0 4.0 }
+        { 2.0 2.0 3.0 4.0 }
+        { 3.0 2.0 3.0 4.0 }
+    } Mcols nth
+] unit-test
+[ dvector{ 3.0 2.0 3.0 4.0 } ] [
+    2 dmatrix{
+        { 1.0 2.0 3.0 4.0 }
+        { 2.0 2.0 3.0 4.0 }
+        { 3.0 2.0 3.0 4.0 }
+    } Mrows nth
+] unit-test
+[ 3 ] [
+    dmatrix{
+        { 1.0 2.0 3.0 4.0 }
+        { 2.0 2.0 3.0 4.0 }
+        { 3.0 2.0 3.0 4.0 }
+    } Mrows length
+] unit-test
+[ 4 ] [
+    dmatrix{
+        { 1.0 2.0 3.0 4.0 }
+        { 2.0 2.0 3.0 4.0 }
+        { 3.0 2.0 3.0 4.0 }
+    } Mcols length
+] unit-test
+[ dvector{ 3.0 3.0 3.0 } ] [
+    2 dmatrix{
+        { 1.0 2.0 3.0 4.0 }
+        { 2.0 2.0 3.0 4.0 }
+        { 3.0 2.0 3.0 4.0 }
+    } Mtranspose Mrows nth
+] unit-test
+[ dvector{ 3.0 2.0 3.0 4.0 } ] [
+    2 dmatrix{
+        { 1.0 2.0 3.0 4.0 }
+        { 2.0 2.0 3.0 4.0 }
+        { 3.0 2.0 3.0 4.0 }
+    } Mtranspose Mcols nth
+] unit-test
+[ 3 ] [
+    dmatrix{
+        { 1.0 2.0 3.0 4.0 }
+        { 2.0 2.0 3.0 4.0 }
+        { 3.0 2.0 3.0 4.0 }
+    } Mtranspose Mcols length
+] unit-test
+[ 4 ] [
+    dmatrix{
+        { 1.0 2.0 3.0 4.0 }
+        { 2.0 2.0 3.0 4.0 }
+        { 3.0 2.0 3.0 4.0 }
+    } Mtranspose Mrows length
+] unit-test
+
+[ cvector{ C{ 3.0 1.0 } C{ 3.0 2.0 } C{ 3.0 3.0 } } ] [
+    2 cmatrix{
+        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
+        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
+        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
+    } Mcols nth
+] unit-test
+[ cvector{ C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } } ] [
+    2 cmatrix{
+        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
+        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
+        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
+    } Mrows nth
+] unit-test
+[ 3 ] [
+    cmatrix{
+        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
+        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
+        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
+    } Mrows length
+] unit-test
+[ 4 ] [
+    cmatrix{
+        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
+        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
+        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
+    } Mcols length
+] unit-test
+[ cvector{ C{ 3.0 1.0 } C{ 3.0 2.0 } C{ 3.0 3.0 } } ] [
+    2 cmatrix{
+        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
+        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
+        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
+    } Mtranspose Mrows nth
+] unit-test
+[ cvector{ C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } } ] [
+    2 cmatrix{
+        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
+        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
+        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
+    } Mtranspose Mcols nth
+] unit-test
+[ 3 ] [
+    cmatrix{
+        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
+        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
+        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
+    } Mtranspose Mcols length
+] unit-test
+[ 4 ] [
+    cmatrix{
+        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
+        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
+        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
+    } Mtranspose Mrows length
+] unit-test
+
+[ zvector{ C{ 3.0 1.0 } C{ 3.0 2.0 } C{ 3.0 3.0 } } ] [
+    2 zmatrix{
+        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
+        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
+        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
+    } Mcols nth
+] unit-test
+[ zvector{ C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } } ] [
+    2 zmatrix{
+        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
+        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
+        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
+    } Mrows nth
+] unit-test
+[ 3 ] [
+    zmatrix{
+        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
+        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
+        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
+    } Mrows length
+] unit-test
+[ 4 ] [
+    zmatrix{
+        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
+        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
+        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
+    } Mcols length
+] unit-test
+[ zvector{ C{ 3.0 1.0 } C{ 3.0 2.0 } C{ 3.0 3.0 } } ] [
+    2 zmatrix{
+        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
+        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
+        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
+    } Mtranspose Mrows nth
+] unit-test
+[ zvector{ C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } } ] [
+    2 zmatrix{
+        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
+        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
+        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
+    } Mtranspose Mcols nth
+] unit-test
+[ 3 ] [
+    zmatrix{
+        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
+        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
+        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
+    } Mtranspose Mcols length
+] unit-test
+[ 4 ] [
+    zmatrix{
+        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
+        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
+        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
+    } Mtranspose Mrows length
+] unit-test
+
+! Msub
+
+[ smatrix{
+    { 3.0 2.0 1.0 }
+    { 0.0 1.0 0.0 }
+} ] [
+    smatrix{
+        { 0.0 1.0 2.0 3.0 2.0 }
+        { 1.0 0.0 3.0 2.0 1.0 }
+        { 2.0 3.0 0.0 1.0 0.0 }
+    } 1 2 2 3 Msub
+] unit-test
+
+[ smatrix{
+    { 3.0 0.0 }
+    { 2.0 1.0 }
+    { 1.0 0.0 }
+} ] [
+    smatrix{
+        { 0.0 1.0 2.0 3.0 2.0 }
+        { 1.0 0.0 3.0 2.0 1.0 }
+        { 2.0 3.0 0.0 1.0 0.0 }
+    } Mtranspose 2 1 3 2 Msub
+] unit-test
+
+[ dmatrix{
+    { 3.0 2.0 1.0 }
+    { 0.0 1.0 0.0 }
+} ] [
+    dmatrix{
+        { 0.0 1.0 2.0 3.0 2.0 }
+        { 1.0 0.0 3.0 2.0 1.0 }
+        { 2.0 3.0 0.0 1.0 0.0 }
+    } 1 2 2 3 Msub
+] unit-test
+
+[ dmatrix{
+    { 3.0 0.0 }
+    { 2.0 1.0 }
+    { 1.0 0.0 }
+} ] [
+    dmatrix{
+        { 0.0 1.0 2.0 3.0 2.0 }
+        { 1.0 0.0 3.0 2.0 1.0 }
+        { 2.0 3.0 0.0 1.0 0.0 }
+    } Mtranspose 2 1 3 2 Msub
+] unit-test
+
+[ cmatrix{
+    { C{ 3.0 3.0 } 2.0 1.0 }
+    { 0.0          1.0 0.0 }
+} ] [
+    cmatrix{
+        { 0.0 1.0 2.0          3.0 2.0 }
+        { 1.0 0.0 C{ 3.0 3.0 } 2.0 1.0 }
+        { 2.0 3.0 0.0          1.0 0.0 }
+    } 1 2 2 3 Msub
+] unit-test
+
+[ cmatrix{
+    { C{ 3.0 3.0 } 0.0 }
+    { 2.0          1.0 }
+    { 1.0          0.0 }
+} ] [
+    cmatrix{
+        { 0.0 1.0 2.0          3.0 2.0 }
+        { 1.0 0.0 C{ 3.0 3.0 } 2.0 1.0 }
+        { 2.0 3.0 0.0          1.0 0.0 }
+    } Mtranspose 2 1 3 2 Msub
+] unit-test
+
+[ zmatrix{
+    { C{ 3.0 3.0 } 2.0 1.0 }
+    { 0.0          1.0 0.0 }
+} ] [
+    zmatrix{
+        { 0.0 1.0 2.0          3.0 2.0 }
+        { 1.0 0.0 C{ 3.0 3.0 } 2.0 1.0 }
+        { 2.0 3.0 0.0          1.0 0.0 }
+    } 1 2 2 3 Msub
+] unit-test
+
+[ zmatrix{
+    { C{ 3.0 3.0 } 0.0 }
+    { 2.0          1.0 }
+    { 1.0          0.0 }
+} ] [
+    zmatrix{
+        { 0.0 1.0 2.0          3.0 2.0 }
+        { 1.0 0.0 C{ 3.0 3.0 } 2.0 1.0 }
+        { 2.0 3.0 0.0          1.0 0.0 }
+    } Mtranspose 2 1 3 2 Msub
+] unit-test
+
diff --git a/basis/math/blas/matrices/matrices.factor b/basis/math/blas/matrices/matrices.factor
new file mode 100755 (executable)
index 0000000..f6b98e3
--- /dev/null
@@ -0,0 +1,307 @@
+USING: accessors alien alien.c-types arrays byte-arrays combinators
+combinators.short-circuit fry kernel locals macros
+math math.blas.cblas math.blas.vectors math.blas.vectors.private
+math.complex math.functions math.order functors words
+sequences sequences.merged sequences.private shuffle
+specialized-arrays.direct.float specialized-arrays.direct.double
+specialized-arrays.float specialized-arrays.double ;
+IN: math.blas.matrices
+
+TUPLE: blas-matrix-base underlying ld rows cols transpose ;
+
+: Mtransposed? ( matrix -- ? )
+    transpose>> ; inline
+: Mwidth ( matrix -- width )
+    dup Mtransposed? [ rows>> ] [ cols>> ] if ; inline
+: Mheight ( matrix -- height )
+    dup Mtransposed? [ cols>> ] [ rows>> ] if ; inline
+
+GENERIC: n*M.V+n*V! ( alpha A x beta y -- y=alpha*A.x+b*y )
+GENERIC: n*V(*)V+M! ( alpha x y A -- A=alpha*x(*)y+A )
+GENERIC: n*V(*)Vconj+M! ( alpha x y A -- A=alpha*x(*)yconj+A )
+GENERIC: n*M.M+n*M! ( alpha A B beta C -- C=alpha*A.B+beta*C )
+
+<PRIVATE
+
+: (blas-transpose) ( matrix -- integer )
+    transpose>> [ CblasTrans ] [ CblasNoTrans ] if ;
+
+GENERIC: (blas-matrix-like) ( data ld rows cols transpose exemplar -- matrix )
+
+: (validate-gemv) ( A x y -- )
+    {
+        [ drop [ Mwidth  ] [ length>> ] bi* = ]
+        [ nip  [ Mheight ] [ length>> ] bi* = ]
+    } 3&&
+    [ "Mismatched matrix and vectors in matrix-vector multiplication" throw ]
+    unless ;
+
+:: (prepare-gemv)
+    ( alpha A x beta y >c-arg -- order A-trans m n alpha A-data A-ld x-data x-inc beta y-data y-inc
+                                 y )
+    A x y (validate-gemv)
+    CblasColMajor
+    A (blas-transpose)
+    A rows>>
+    A cols>>
+    alpha >c-arg call
+    A underlying>>
+    A ld>>
+    x underlying>>
+    x inc>>
+    beta >c-arg call
+    y underlying>>
+    y inc>>
+    y ; inline
+
+: (validate-ger) ( x y A -- )
+    {
+        [ nip  [ length>> ] [ Mheight ] bi* = ]
+        [ nipd [ length>> ] [ Mwidth  ] bi* = ]
+    } 3&&
+    [ "Mismatched vertices and matrix in vector outer product" throw ]
+    unless ;
+
+:: (prepare-ger)
+    ( alpha x y A >c-arg -- order m n alpha x-data x-inc y-data y-inc A-data A-ld
+                            A )
+    x y A (validate-ger)
+    CblasColMajor
+    A rows>>
+    A cols>>
+    alpha >c-arg call
+    x underlying>>
+    x inc>>
+    y underlying>>
+    y inc>>
+    A underlying>>
+    A ld>>
+    A f >>transpose ; inline
+
+: (validate-gemm) ( A B C -- )
+    {
+        [ drop [ Mwidth  ] [ Mheight ] bi* = ]
+        [ nip  [ Mheight ] bi@ = ]
+        [ nipd [ Mwidth  ] bi@ = ]
+    } 3&&
+    [ "Mismatched matrices in matrix multiplication" throw ]
+    unless ;
+
+:: (prepare-gemm)
+    ( alpha A B beta C >c-arg -- order A-trans B-trans m n k alpha A-data A-ld B-data B-ld beta C-data C-ld
+                                 C )
+    A B C (validate-gemm)
+    CblasColMajor
+    A (blas-transpose)
+    B (blas-transpose)
+    C rows>>
+    C cols>>
+    A Mwidth
+    alpha >c-arg call
+    A underlying>>
+    A ld>>
+    B underlying>>
+    B ld>>
+    beta >c-arg call
+    C underlying>>
+    C ld>>
+    C f >>transpose ; inline
+
+: (>matrix) ( arrays >c-array -- c-array ld rows cols transpose )
+    '[ <merged> @ ] [ length dup ] [ first length ] tri f ; inline
+
+PRIVATE>
+
+! XXX should do a dense clone
+M: blas-matrix-base clone
+    [ 
+        [ {
+            [ underlying>> ]
+            [ ld>> ]
+            [ cols>> ]
+            [ element-type heap-size ]
+        } cleave * * memory>byte-array ]
+        [ {
+            [ ld>> ]
+            [ rows>> ]
+            [ cols>> ]
+            [ transpose>> ]
+        } cleave ]
+        bi
+    ] keep (blas-matrix-like) ;
+
+! XXX try rounding stride to next 128 bit bound for better vectorizin'
+: <empty-matrix> ( rows cols exemplar -- matrix )
+    [ element-type [ * ] dip <c-array> ]
+    [ 2drop ]
+    [ f swap (blas-matrix-like) ] 3tri ;
+
+: n*M.V+n*V ( alpha A x beta y -- alpha*A.x+b*y )
+    clone n*M.V+n*V! ;
+: n*V(*)V+M ( alpha x y A -- alpha*x(*)y+A )
+    clone n*V(*)V+M! ;
+: n*V(*)Vconj+M ( alpha x y A -- alpha*x(*)yconj+A )
+    clone n*V(*)Vconj+M! ;
+: n*M.M+n*M ( alpha A B beta C -- alpha*A.B+beta*C )
+    clone n*M.M+n*M! ;
+
+: n*M.V ( alpha A x -- alpha*A.x )
+    1.0 2over [ Mheight ] dip <empty-vector>
+    n*M.V+n*V! ; inline
+
+: M.V ( A x -- A.x )
+    1.0 -rot n*M.V ; inline
+
+: n*V(*)V ( alpha x y -- alpha*x(*)y )
+    2dup [ length>> ] bi@ pick <empty-matrix>
+    n*V(*)V+M! ;
+: n*V(*)Vconj ( alpha x y -- alpha*x(*)yconj )
+    2dup [ length>> ] bi@ pick <empty-matrix>
+    n*V(*)Vconj+M! ;
+
+: V(*) ( x y -- x(*)y )
+    1.0 -rot n*V(*)V ; inline
+: V(*)conj ( x y -- x(*)yconj )
+    1.0 -rot n*V(*)Vconj ; inline
+
+: n*M.M ( alpha A B -- alpha*A.B )
+    2dup [ Mheight ] [ Mwidth ] bi* pick <empty-matrix> 
+    1.0 swap n*M.M+n*M! ;
+
+: M. ( A B -- A.B )
+    1.0 -rot n*M.M ; inline
+
+:: (Msub) ( matrix row col height width -- data ld rows cols )
+    matrix ld>> col * row + matrix element-type heap-size *
+    matrix underlying>> <displaced-alien>
+    matrix ld>>
+    height
+    width ;
+
+:: Msub ( matrix row col height width -- sub )
+    matrix dup transpose>>
+    [ col row width height ]
+    [ row col height width ] if (Msub)
+    matrix transpose>> matrix (blas-matrix-like) ;
+
+TUPLE: blas-matrix-rowcol-sequence
+    parent inc rowcol-length rowcol-jump length ;
+C: <blas-matrix-rowcol-sequence> blas-matrix-rowcol-sequence
+
+INSTANCE: blas-matrix-rowcol-sequence sequence
+
+M: blas-matrix-rowcol-sequence length
+    length>> ;
+M: blas-matrix-rowcol-sequence nth-unsafe
+    {
+        [
+            [ rowcol-jump>> ]
+            [ parent>> element-type heap-size ]
+            [ parent>> underlying>> ] tri
+            [ * * ] dip <displaced-alien>
+        ]
+        [ rowcol-length>> ]
+        [ inc>> ]
+        [ parent>> ]
+    } cleave (blas-vector-like) ;
+
+: (Mcols) ( A -- columns )
+    { [ ] [ drop 1 ] [ rows>> ] [ ld>> ] [ cols>> ] }
+    cleave <blas-matrix-rowcol-sequence> ;
+: (Mrows) ( A -- rows )
+    { [ ] [ ld>> ] [ cols>> ] [ drop 1 ] [ rows>> ] }
+    cleave <blas-matrix-rowcol-sequence> ;
+
+: Mrows ( A -- rows )
+    dup transpose>> [ (Mcols) ] [ (Mrows) ] if ;
+: Mcols ( A -- cols )
+    dup transpose>> [ (Mrows) ] [ (Mcols) ] if ;
+
+: n*M! ( n A -- A=n*A )
+    [ (Mcols) [ n*V! drop ] with each ] keep ;
+
+: n*M ( n A -- n*A )
+    clone n*M! ; inline
+
+: M*n ( A n -- A*n )
+    swap n*M ; inline
+: M/n ( A n -- A/n )
+    recip swap n*M ; inline
+
+: Mtranspose ( matrix -- matrix^T )
+    [ {
+        [ underlying>> ]
+        [ ld>> ] [ rows>> ]
+        [ cols>> ]
+        [ transpose>> not ]
+    } cleave ] keep (blas-matrix-like) ;
+
+M: blas-matrix-base equal?
+    {
+        [ [ Mwidth ] bi@ = ]
+        [ [ Mcols ] bi@ [ = ] 2all? ]
+    } 2&& ;
+
+<<
+
+FUNCTOR: (define-blas-matrix) ( TYPE T U C -- )
+
+VECTOR      IS ${TYPE}-blas-vector
+<VECTOR>    IS <${TYPE}-blas-vector>
+>ARRAY      IS >${TYPE}-array
+TYPE>ARG    IS ${TYPE}>arg
+XGEMV       IS cblas_${T}gemv
+XGEMM       IS cblas_${T}gemm
+XGERU       IS cblas_${T}ger${U}
+XGERC       IS cblas_${T}ger${C}
+
+MATRIX      DEFINES ${TYPE}-blas-matrix
+<MATRIX>    DEFINES <${TYPE}-blas-matrix>
+>MATRIX     DEFINES >${TYPE}-blas-matrix
+
+WHERE
+
+TUPLE: MATRIX < blas-matrix-base ;
+: <MATRIX> ( underlying ld rows cols transpose -- matrix )
+    MATRIX boa ; inline
+
+M: MATRIX element-type
+    drop TYPE ;
+M: MATRIX (blas-matrix-like)
+    drop <MATRIX> ;
+M: VECTOR (blas-matrix-like)
+    drop <MATRIX> ;
+M: MATRIX (blas-vector-like)
+    drop <VECTOR> ;
+
+: >MATRIX ( arrays -- matrix )
+    [ >ARRAY underlying>> ] (>matrix)
+    <MATRIX> ;
+
+M: VECTOR n*M.V+n*V!
+    [ TYPE>ARG ] (prepare-gemv)
+    [ XGEMV ] dip ;
+M: MATRIX n*M.M+n*M!
+    [ TYPE>ARG ] (prepare-gemm)
+    [ XGEMM ] dip ;
+M: MATRIX n*V(*)V+M!
+    [ TYPE>ARG ] (prepare-ger)
+    [ XGERU ] dip ;
+M: MATRIX n*V(*)Vconj+M!
+    [ TYPE>ARG ] (prepare-ger)
+    [ XGERC ] dip ;
+
+;FUNCTOR
+
+
+: define-real-blas-matrix ( TYPE T -- )
+    "" "" (define-blas-matrix) ;
+: define-complex-blas-matrix ( TYPE T -- )
+    "u" "c" (define-blas-matrix) ;
+
+"float"          "s" define-real-blas-matrix
+"double"         "d" define-real-blas-matrix
+"float-complex"  "c" define-complex-blas-matrix
+"double-complex" "z" define-complex-blas-matrix
+
+>>
diff --git a/basis/math/blas/matrices/summary.txt b/basis/math/blas/matrices/summary.txt
new file mode 100644 (file)
index 0000000..4cc5684
--- /dev/null
@@ -0,0 +1 @@
+BLAS level 2 and 3 matrix-vector and matrix-matrix operations
diff --git a/basis/math/blas/matrices/tags.txt b/basis/math/blas/matrices/tags.txt
new file mode 100644 (file)
index 0000000..241ec1e
--- /dev/null
@@ -0,0 +1,2 @@
+math
+bindings
diff --git a/basis/math/blas/syntax/authors.txt b/basis/math/blas/syntax/authors.txt
new file mode 100644 (file)
index 0000000..f13c9c1
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
diff --git a/basis/math/blas/syntax/summary.txt b/basis/math/blas/syntax/summary.txt
new file mode 100644 (file)
index 0000000..a71bebb
--- /dev/null
@@ -0,0 +1 @@
+Literal syntax for BLAS vectors and matrices
diff --git a/basis/math/blas/syntax/syntax-docs.factor b/basis/math/blas/syntax/syntax-docs.factor
new file mode 100644 (file)
index 0000000..6b58df7
--- /dev/null
@@ -0,0 +1,78 @@
+USING: help.markup help.syntax math.blas.matrices math.blas.vectors multiline ;
+IN: math.blas.syntax
+
+ARTICLE: "math.blas.syntax" "BLAS interface literal syntax"
+"Vectors:"
+{ $subsection POSTPONE: svector{ }
+{ $subsection POSTPONE: dvector{ }
+{ $subsection POSTPONE: cvector{ }
+{ $subsection POSTPONE: zvector{ }
+"Matrices:"
+{ $subsection POSTPONE: smatrix{ }
+{ $subsection POSTPONE: dmatrix{ }
+{ $subsection POSTPONE: cmatrix{ }
+{ $subsection POSTPONE: zmatrix{ } ;
+
+ABOUT: "math.blas.syntax"
+
+HELP: svector{
+{ $syntax "svector{ 1.0 -2.0 3.0 }" }
+{ $description "Construct a literal " { $link float-blas-vector } "." } ;
+
+HELP: dvector{
+{ $syntax "dvector{ 1.0 -2.0 3.0 }" }
+{ $description "Construct a literal " { $link double-blas-vector } "." } ;
+
+HELP: cvector{
+{ $syntax "cvector{ 1.0 -2.0 C{ 3.0 -1.0 } }" }
+{ $description "Construct a literal " { $link float-complex-blas-vector } "." } ;
+
+HELP: zvector{
+{ $syntax "dvector{ 1.0 -2.0 C{ 3.0 -1.0 } }" }
+{ $description "Construct a literal " { $link double-complex-blas-vector } "." } ;
+
+{
+    POSTPONE: svector{ POSTPONE: dvector{
+    POSTPONE: cvector{ POSTPONE: zvector{
+} related-words
+
+HELP: smatrix{
+{ $syntax <" smatrix{
+    { 1.0 0.0 0.0 1.0 }
+    { 0.0 1.0 0.0 2.0 }
+    { 0.0 0.0 1.0 3.0 }
+    { 0.0 0.0 0.0 1.0 }
+} "> }
+{ $description "Construct a literal " { $link float-blas-matrix } ". Note that although BLAS matrices are stored in column-major order, the literal is specified in row-major order." } ;
+
+HELP: dmatrix{
+{ $syntax <" dmatrix{
+    { 1.0 0.0 0.0 1.0 }
+    { 0.0 1.0 0.0 2.0 }
+    { 0.0 0.0 1.0 3.0 }
+    { 0.0 0.0 0.0 1.0 }
+} "> }
+{ $description "Construct a literal " { $link double-blas-matrix } ". Note that although BLAS matrices are stored in column-major order, the literal is specified in row-major order." } ;
+
+HELP: cmatrix{
+{ $syntax <" cmatrix{
+    { 1.0 0.0           0.0 1.0           }
+    { 0.0 C{ 0.0 1.0 }  0.0 2.0           }
+    { 0.0 0.0          -1.0 3.0           }
+    { 0.0 0.0           0.0 C{ 0.0 -1.0 } }
+} "> }
+{ $description "Construct a literal " { $link float-complex-blas-matrix } ". Note that although BLAS matrices are stored in column-major order, the literal is specified in row-major order." } ;
+
+HELP: zmatrix{
+{ $syntax <" zmatrix{
+    { 1.0 0.0           0.0 1.0           }
+    { 0.0 C{ 0.0 1.0 }  0.0 2.0           }
+    { 0.0 0.0          -1.0 3.0           }
+    { 0.0 0.0           0.0 C{ 0.0 -1.0 } }
+} "> }
+{ $description "Construct a literal " { $link double-complex-blas-matrix } ". Note that although BLAS matrices are stored in column-major order, the literal is specified in row-major order." } ;
+
+{
+    POSTPONE: smatrix{ POSTPONE: dmatrix{
+    POSTPONE: cmatrix{ POSTPONE: zmatrix{
+} related-words
diff --git a/basis/math/blas/syntax/syntax.factor b/basis/math/blas/syntax/syntax.factor
new file mode 100644 (file)
index 0000000..2d171a8
--- /dev/null
@@ -0,0 +1,44 @@
+USING: kernel math.blas.vectors math.blas.matrices parser
+arrays prettyprint.backend prettyprint.custom sequences ;
+IN: math.blas.syntax
+
+: svector{
+    \ } [ >float-blas-vector ] parse-literal ; parsing
+: dvector{
+    \ } [ >double-blas-vector ] parse-literal ; parsing
+: cvector{
+    \ } [ >float-complex-blas-vector ] parse-literal ; parsing
+: zvector{
+    \ } [ >double-complex-blas-vector ] parse-literal ; parsing
+
+: smatrix{
+    \ } [ >float-blas-matrix ] parse-literal ; parsing
+: dmatrix{
+    \ } [ >double-blas-matrix ] parse-literal ; parsing
+: cmatrix{
+    \ } [ >float-complex-blas-matrix ] parse-literal ; parsing
+: zmatrix{
+    \ } [ >double-complex-blas-matrix ] parse-literal ; parsing
+
+M: float-blas-vector pprint-delims
+    drop \ svector{ \ } ;
+M: double-blas-vector pprint-delims
+    drop \ dvector{ \ } ;
+M: float-complex-blas-vector pprint-delims
+    drop \ cvector{ \ } ;
+M: double-complex-blas-vector pprint-delims
+    drop \ zvector{ \ } ;
+
+M: float-blas-matrix pprint-delims
+    drop \ smatrix{ \ } ;
+M: double-blas-matrix pprint-delims
+    drop \ dmatrix{ \ } ;
+M: float-complex-blas-matrix pprint-delims
+    drop \ cmatrix{ \ } ;
+M: double-complex-blas-matrix pprint-delims
+    drop \ zmatrix{ \ } ;
+
+M: blas-vector-base >pprint-sequence ;
+M: blas-vector-base pprint* pprint-object ;
+M: blas-matrix-base >pprint-sequence Mrows ;
+M: blas-matrix-base pprint* pprint-object ;
diff --git a/basis/math/blas/syntax/tags.txt b/basis/math/blas/syntax/tags.txt
new file mode 100644 (file)
index 0000000..ede10ab
--- /dev/null
@@ -0,0 +1 @@
+math
diff --git a/basis/math/blas/vectors/authors.txt b/basis/math/blas/vectors/authors.txt
new file mode 100644 (file)
index 0000000..f13c9c1
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
diff --git a/basis/math/blas/vectors/summary.txt b/basis/math/blas/vectors/summary.txt
new file mode 100644 (file)
index 0000000..f983e85
--- /dev/null
@@ -0,0 +1 @@
+BLAS level 1 vector operations
diff --git a/basis/math/blas/vectors/tags.txt b/basis/math/blas/vectors/tags.txt
new file mode 100644 (file)
index 0000000..ede10ab
--- /dev/null
@@ -0,0 +1 @@
+math
diff --git a/basis/math/blas/vectors/vectors-docs.factor b/basis/math/blas/vectors/vectors-docs.factor
new file mode 100644 (file)
index 0000000..cb26d67
--- /dev/null
@@ -0,0 +1,131 @@
+USING: alien byte-arrays help.markup help.syntax math sequences ;
+IN: math.blas.vectors
+
+ARTICLE: "math.blas.vectors" "BLAS interface vector operations"
+"Slicing vectors:"
+{ $subsection Vsub }
+"Taking the norm (magnitude) of a vector:"
+{ $subsection Vnorm }
+"Summing and taking the maximum of elements:"
+{ $subsection Vasum }
+{ $subsection Viamax }
+{ $subsection Vamax }
+"Scalar-vector products:"
+{ $subsection n*V! }
+{ $subsection n*V }
+{ $subsection V*n }
+{ $subsection V/n }
+{ $subsection Vneg }
+"Vector addition:" 
+{ $subsection n*V+V! }
+{ $subsection n*V+V }
+{ $subsection V+ }
+{ $subsection V- }
+"Vector inner products:"
+{ $subsection V. }
+{ $subsection V.conj } ;
+
+ABOUT: "math.blas.vectors"
+
+HELP: blas-vector-base
+{ $class-description "The base class for all BLAS vector types. Objects of this type should not be created directly; instead, instantiate one of the typed subclasses:"
+{ $list
+    { { $link float-blas-vector } }
+    { { $link double-blas-vector } }
+    { { $link float-complex-blas-vector } }
+    { { $link double-complex-blas-vector } }
+}
+"All of these subclasses share the same tuple layout:"
+{ $list
+    { { $snippet "underlying" } " contains an alien pointer referencing or byte-array containing a packed array of float, double, float complex, or double complex values;" }
+    { { $snippet "length" } " indicates the length of the vector;" }
+    { "and " { $snippet "inc" } " indicates the distance, in elements, between elements." }
+} } ;
+
+HELP: float-blas-vector
+{ $class-description "A vector of single-precision floating-point values. For details on the tuple layout, see " { $link blas-vector-base } "." } ;
+HELP: double-blas-vector
+{ $class-description "A vector of double-precision floating-point values. For details on the tuple layout, see " { $link blas-vector-base } "." } ;
+HELP: float-complex-blas-vector
+{ $class-description "A vector of single-precision floating-point complex values. Complex values are stored in memory as two consecutive float values, real part then imaginary part. For details on the tuple layout, see " { $link blas-vector-base } "." } ;
+HELP: double-complex-blas-vector
+{ $class-description "A vector of single-precision floating-point complex values. Complex values are stored in memory as two consecutive float values, real part then imaginary part. For details on the tuple layout, see " { $link blas-vector-base } "." } ;
+
+HELP: n*V+V!
+{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "y=alpha*x+y" blas-vector-base } }
+{ $description "Calculate the vector sum " { $snippet "αx + y" } " and replace the existing contents of y with the result. Corresponds to the xAXPY routines in BLAS." }
+{ $side-effects "y" } ;
+
+HELP: n*V!
+{ $values { "alpha" number } { "x" blas-vector-base } { "x=alpha*x" blas-vector-base } }
+{ $description "Calculate the scalar-vector product " { $snippet "αx" } " and replace the existing contents of x with the result. Corresponds to the xSCAL routines in BLAS." }
+{ $side-effects "x" } ;
+
+HELP: V.
+{ $values { "x" blas-vector-base } { "y" blas-vector-base } { "x.y" number } }
+{ $description "Calculate the inner product " { $snippet "xâ‹…y" } ". Corresponds to the xDOT and xDOTU routines in BLAS." } ;
+
+HELP: V.conj
+{ $values { "x" blas-vector-base } { "y" blas-vector-base } { "xconj.y" number } }
+{ $description "Calculate the conjugate inner product " { $snippet "xÌ…â‹…y" } ". Corresponds to the xDOTC routines in BLAS." } ;
+
+HELP: Vnorm
+{ $values { "x" blas-vector-base } { "norm" number } }
+{ $description "Calculate the norm-2, i.e., the magnitude or absolute value, of " { $snippet "x" } " (" { $snippet "‖x‖₂" } "). Corresponds to the xNRM2 routines in BLAS." } ;
+
+HELP: Vasum
+{ $values { "x" blas-vector-base } { "sum" number } }
+{ $description "Calculate the sum of the norm-1s of the elements of " { $snippet "x" } " (" { $snippet "Σ â€–xᵢ‖â‚" } "). Corresponds to the xASUM routines in BLAS." } ;
+
+HELP: Vswap
+{ $values { "x" blas-vector-base } { "y" blas-vector-base } { "x=y" blas-vector-base } { "y=x" blas-vector-base } }
+{ $description "Swap the contents of " { $snippet "x" } " and " { $snippet "y" } " in place. Corresponds to the xSWAP routines in BLAS." }
+{ $side-effects "x" "y" } ;
+
+HELP: Viamax
+{ $values { "x" blas-vector-base } { "max-i" integer } }
+{ $description "Return the index of the element in " { $snippet "x" } " with the largest norm-1. If more than one element has the same norm-1, returns the smallest index. Corresponds to the IxAMAX routines in BLAS." } ;
+
+HELP: Vamax
+{ $values { "x" blas-vector-base } { "max" number } }
+{ $description "Return the value of the element in " { $snippet "x" } " with the largest norm-1. If more than one element has the same norm-1, returns the first element. Corresponds to the IxAMAX routines in BLAS." } ;
+
+{ Viamax Vamax } related-words
+
+HELP: <zero-vector>
+{ $values { "exemplar" blas-vector-base } { "zero" blas-vector-base } }
+{ $description "Return a vector of zeros with the same length and element type as " { $snippet "v" } ". The vector is constructed with an " { $snippet "inc" } " of zero, so it is not suitable for receiving results from BLAS functions; it is intended to be used as a term in other vector calculations. To construct an empty vector that can be used to receive results, see " { $link <empty-vector> } "." } ;
+
+HELP: n*V+V
+{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "alpha*x+y" blas-vector-base } }
+{ $description "Calculate the vector sum " { $snippet "αx + y" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " and " { $snippet "y" } " containing the result. Corresponds to the xAXPY routines in BLAS." } ;
+
+HELP: n*V
+{ $values { "alpha" "a number" } { "x" blas-vector-base } { "alpha*x" blas-vector-base } }
+{ $description "Calculate the scalar-vector product " { $snippet "αx" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " containing the result. Corresponds to the xSCAL routines in BLAS." } ;
+
+HELP: V+
+{ $values { "x" blas-vector-base } { "y" blas-vector-base } { "x+y" blas-vector-base } }
+{ $description "Calculate the vector sum " { $snippet "x + y" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " and " { $snippet "y" } " containing the result. Corresponds to the xAXPY routines in BLAS." } ;
+
+HELP: V-
+{ $values { "x" blas-vector-base } { "y" blas-vector-base } { "x-y" blas-vector-base } }
+{ $description "Calculate the vector difference " { $snippet "x â€“ y" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " and " { $snippet "y" } " containing the result. Corresponds to the xAXPY routines in BLAS." } ;
+
+HELP: Vneg
+{ $values { "x" blas-vector-base } { "-x" blas-vector-base } }
+{ $description "Negate the elements of " { $snippet "x" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " containing the result." } ;
+
+HELP: V*n
+{ $values { "x" blas-vector-base } { "alpha" number } { "x*alpha" blas-vector-base } }
+{ $description "Calculate the scalar-vector product " { $snippet "αx" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " containing the result. Corresponds to the xSCAL routines in BLAS." } ;
+
+HELP: V/n
+{ $values { "x" blas-vector-base } { "alpha" number } { "x/alpha" blas-vector-base } }
+{ $description "Calculate the scalar-vector product " { $snippet "(1/α)x" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " containing the result. Corresponds to the xSCAL routines in BLAS." } ;
+
+{ n*V+V! n*V! n*V+V n*V V+ V- Vneg V*n V/n } related-words
+
+HELP: Vsub
+{ $values { "v" blas-vector-base } { "start" integer } { "length" integer } { "sub" blas-vector-base } }
+{ $description "Slice a subvector out of " { $snippet "v" } " starting at " { $snippet "start" } " with the given " { $snippet "length" } ". The subvector will share storage with the parent vector." } ;
diff --git a/basis/math/blas/vectors/vectors-tests.factor b/basis/math/blas/vectors/vectors-tests.factor
new file mode 100644 (file)
index 0000000..5f9e8fd
--- /dev/null
@@ -0,0 +1,180 @@
+USING: kernel math.blas.vectors math.blas.syntax sequences tools.test ;
+IN: math.blas.vectors.tests
+
+! clone
+
+[ svector{ 1.0 2.0 3.0 } ] [ svector{ 1.0 2.0 3.0 } clone ] unit-test
+[ f ] [ svector{ 1.0 2.0 3.0 } dup clone eq? ] unit-test
+[ dvector{ 1.0 2.0 3.0 } ] [ dvector{ 1.0 2.0 3.0 } clone ] unit-test
+[ f ] [ dvector{ 1.0 2.0 3.0 } dup clone eq? ] unit-test
+[ cvector{ 1.0 C{ 2.0 3.0 } 4.0 } ] [ cvector{ 1.0 C{ 2.0 3.0 } 4.0 } clone ] unit-test
+[ f ] [ cvector{ 1.0 C{ 2.0 3.0 } 4.0 } dup clone eq? ] unit-test
+[ zvector{ 1.0 C{ 2.0 3.0 } 4.0 } ] [ zvector{ 1.0 C{ 2.0 3.0 } 4.0 } clone ] unit-test
+[ f ] [ zvector{ 1.0 C{ 2.0 3.0 } 4.0 } dup clone eq? ] unit-test
+
+! nth
+
+[ 1.0 ] [ 2 svector{ 3.0 2.0 1.0 } nth ] unit-test
+[ 1.0 ] [ 2 dvector{ 3.0 2.0 1.0 } nth ] unit-test
+
+[ C{ 1.0 2.0 } ]
+[ 2 cvector{ C{ -3.0 -2.0 } C{ -1.0 0.0 } C{ 1.0 2.0 } } nth ] unit-test
+
+[ C{ 1.0 2.0 } ]
+[ 2 zvector{ C{ -3.0 -2.0 } C{ -1.0 0.0 } C{ 1.0 2.0 } } nth ] unit-test
+
+! set-nth
+
+[ svector{ 3.0 2.0 0.0 } ] [ 0.0 2 svector{ 3.0 2.0 1.0 } [ set-nth ] keep ] unit-test
+[ dvector{ 3.0 2.0 0.0 } ] [ 0.0 2 dvector{ 3.0 2.0 1.0 } [ set-nth ] keep ] unit-test
+
+[ cvector{ C{ -3.0 -2.0 } C{ -1.0 0.0 } C{ 3.0 4.0 } } ] [
+    C{ 3.0 4.0 } 2
+    cvector{ C{ -3.0 -2.0 } C{ -1.0 0.0 } C{ 1.0 2.0 } }
+    [ set-nth ] keep
+] unit-test
+[ zvector{ C{ -3.0 -2.0 } C{ -1.0 0.0 } C{ 3.0 4.0 } } ] [
+    C{ 3.0 4.0 } 2
+    zvector{ C{ -3.0 -2.0 } C{ -1.0 0.0 } C{ 1.0 2.0 } }
+    [ set-nth ] keep
+] unit-test
+
+! V+
+
+[ svector{ 11.0 22.0 } ] [ svector{ 1.0 2.0 } svector{ 10.0 20.0 } V+ ] unit-test
+[ dvector{ 11.0 22.0 } ] [ dvector{ 1.0 2.0 } dvector{ 10.0 20.0 } V+ ] unit-test
+
+[ cvector{ 11.0 C{ 22.0 33.0 } } ]
+[ cvector{ 1.0 C{ 2.0 3.0 } } cvector{ 10.0 C{ 20.0 30.0 } } V+ ]
+unit-test
+
+[ zvector{ 11.0 C{ 22.0 33.0 } } ]
+[ zvector{ 1.0 C{ 2.0 3.0 } } zvector{ 10.0 C{ 20.0 30.0 } } V+ ]
+unit-test
+
+! V-
+
+[ svector{ 9.0 18.0 } ] [ svector{ 10.0 20.0 } svector{ 1.0 2.0 } V- ] unit-test
+[ dvector{ 9.0 18.0 } ] [ dvector{ 10.0 20.0 } dvector{ 1.0 2.0 } V- ] unit-test
+
+[ cvector{ 9.0 C{ 18.0 27.0 } } ]
+[ cvector{ 10.0 C{ 20.0 30.0 } } cvector{ 1.0 C{ 2.0 3.0 } } V- ]
+unit-test
+
+[ zvector{ 9.0 C{ 18.0 27.0 } } ]
+[ zvector{ 10.0 C{ 20.0 30.0 } } zvector{ 1.0 C{ 2.0 3.0 } } V- ]
+unit-test
+
+! Vneg
+
+[ svector{ 1.0 -2.0 } ] [ svector{ -1.0 2.0 } Vneg ] unit-test
+[ dvector{ 1.0 -2.0 } ] [ dvector{ -1.0 2.0 } Vneg ] unit-test
+
+[ cvector{ 1.0 C{ -2.0 3.0 } } ] [ cvector{ -1.0 C{ 2.0 -3.0 } } Vneg ] unit-test
+[ zvector{ 1.0 C{ -2.0 3.0 } } ] [ zvector{ -1.0 C{ 2.0 -3.0 } } Vneg ] unit-test
+
+! n*V
+
+[ svector{ 100.0 200.0 } ] [ 10.0 svector{ 10.0 20.0 } n*V ] unit-test
+[ dvector{ 100.0 200.0 } ] [ 10.0 dvector{ 10.0 20.0 } n*V ] unit-test
+
+[ cvector{ C{ 20.0 4.0 } C{ 8.0 12.0 } } ]
+[ C{ 10.0 2.0 } cvector{ 2.0 C{ 1.0 1.0 } } n*V ]
+unit-test
+
+[ zvector{ C{ 20.0 4.0 } C{ 8.0 12.0 } } ]
+[ C{ 10.0 2.0 } zvector{ 2.0 C{ 1.0 1.0 } } n*V ]
+unit-test
+
+! V*n
+
+[ svector{ 100.0 200.0 } ] [ svector{ 10.0 20.0 } 10.0 V*n ] unit-test
+[ dvector{ 100.0 200.0 } ] [ dvector{ 10.0 20.0 } 10.0 V*n ] unit-test
+
+[ cvector{ C{ 20.0 4.0 } C{ 8.0 12.0 } } ]
+[ cvector{ 2.0 C{ 1.0 1.0 } } C{ 10.0 2.0 } V*n ]
+unit-test
+
+[ zvector{ C{ 20.0 4.0 } C{ 8.0 12.0 } } ]
+[ zvector{ 2.0 C{ 1.0 1.0 } } C{ 10.0 2.0 } V*n ]
+unit-test
+
+! V/n
+
+[ svector{ 1.0 2.0 } ] [ svector{ 4.0 8.0 } 4.0 V/n ] unit-test
+[ dvector{ 1.0 2.0 } ] [ dvector{ 4.0 8.0 } 4.0 V/n ] unit-test
+
+[ cvector{ C{ 0.0 -4.0 } 1.0 } ]
+[ cvector{ C{ 4.0 -4.0 } C{ 1.0 1.0 } } C{ 1.0 1.0 } V/n ]
+unit-test
+
+[ zvector{ C{ 0.0 -4.0 } 1.0 } ]
+[ zvector{ C{ 4.0 -4.0 } C{ 1.0 1.0 } } C{ 1.0 1.0 } V/n ]
+unit-test
+
+! V.
+
+[ 7.0 ] [ svector{ 1.0 2.5 } svector{ 2.0 2.0 } V. ] unit-test
+[ 7.0 ] [ dvector{ 1.0 2.5 } dvector{ 2.0 2.0 } V. ] unit-test
+[ C{ 7.0 7.0 } ] [ cvector{ C{ 1.0 1.0 } 2.5 } cvector{ 2.0 C{ 2.0 2.0 } } V. ] unit-test
+[ C{ 7.0 7.0 } ] [ zvector{ C{ 1.0 1.0 } 2.5 } zvector{ 2.0 C{ 2.0 2.0 } } V. ] unit-test
+
+! V.conj
+
+[ C{ 7.0 3.0 } ] [ cvector{ C{ 1.0 1.0 } 2.5 } cvector{ 2.0 C{ 2.0 2.0 } } V.conj ] unit-test
+[ C{ 7.0 3.0 } ] [ zvector{ C{ 1.0 1.0 } 2.5 } zvector{ 2.0 C{ 2.0 2.0 } } V.conj ] unit-test
+
+! Vnorm
+
+[ 5.0 ] [ svector{ 3.0 4.0 } Vnorm ] unit-test
+[ 5.0 ] [ dvector{ 3.0 4.0 } Vnorm ] unit-test
+
+[ 13.0 ] [ cvector{ C{ 3.0 4.0 } 12.0 } Vnorm ] unit-test
+[ 13.0 ] [ zvector{ C{ 3.0 4.0 } 12.0 } Vnorm ] unit-test
+
+! Vasum
+
+[ 6.0 ] [ svector{ 1.0 2.0 -3.0 } Vasum ] unit-test
+[ 6.0 ] [ dvector{ 1.0 2.0 -3.0 } Vasum ] unit-test
+
+[ 15.0 ] [ cvector{ 1.0 C{ -2.0 3.0 } C{ 4.0 -5.0 } } Vasum ] unit-test
+[ 15.0 ] [ zvector{ 1.0 C{ -2.0 3.0 } C{ 4.0 -5.0 } } Vasum ] unit-test
+
+! Vswap
+
+[ svector{ 2.0 2.0 } svector{ 1.0 1.0 } ]
+[ svector{ 1.0 1.0 } svector{ 2.0 2.0 } Vswap ]
+unit-test
+
+[ dvector{ 2.0 2.0 } dvector{ 1.0 1.0 } ]
+[ dvector{ 1.0 1.0 } dvector{ 2.0 2.0 } Vswap ]
+unit-test
+
+[ cvector{ 2.0 C{ 2.0 2.0 } } cvector{ C{ 1.0 1.0 } 1.0 } ]
+[ cvector{ C{ 1.0 1.0 } 1.0 } cvector{ 2.0 C{ 2.0 2.0 } } Vswap ]
+unit-test
+
+[ zvector{ 2.0 C{ 2.0 2.0 } } zvector{ C{ 1.0 1.0 } 1.0 } ]
+[ zvector{ C{ 1.0 1.0 } 1.0 } zvector{ 2.0 C{ 2.0 2.0 } } Vswap ]
+unit-test
+
+! Viamax
+
+[ 3 ] [ svector{ 1.0 -5.0 4.0 -6.0 -1.0 } Viamax ] unit-test
+[ 3 ] [ dvector{ 1.0 -5.0 4.0 -6.0 -1.0 } Viamax ] unit-test
+[ 0 ] [ cvector{ C{ 2.0 -5.0 } 4.0 -6.0 -1.0 } Viamax ] unit-test
+[ 0 ] [ zvector{ C{ 2.0 -5.0 } 4.0 -6.0 -1.0 } Viamax ] unit-test
+
+! Vamax
+
+[ -6.0 ] [ svector{ 1.0 -5.0 4.0 -6.0 -1.0 } Vamax ] unit-test
+[ -6.0 ] [ dvector{ 1.0 -5.0 4.0 -6.0 -1.0 } Vamax ] unit-test
+[ C{ 2.0 -5.0 } ] [ cvector{ C{ 2.0 -5.0 } 4.0 -6.0 -1.0 } Vamax ] unit-test
+[ C{ 2.0 -5.0 } ] [ zvector{ C{ 2.0 -5.0 } 4.0 -6.0 -1.0 } Vamax ] unit-test
+
+! Vsub
+
+[ svector{ -5.0 4.0 -6.0 } ] [ svector{ 1.0 -5.0 4.0 -6.0 -1.0 } 1 3 Vsub ] unit-test
+[ dvector{ -5.0 4.0 -6.0 } ] [ dvector{ 1.0 -5.0 4.0 -6.0 -1.0 } 1 3 Vsub ] unit-test
+[ cvector{ -5.0 C{ 4.0 3.0 } -6.0 } ] [ cvector{ 1.0 -5.0 C{ 4.0 3.0 } -6.0 -1.0 } 1 3 Vsub ] unit-test
+[ zvector{ -5.0 C{ 4.0 3.0 } -6.0 } ] [ zvector{ 1.0 -5.0 C{ 4.0 3.0 } -6.0 -1.0 } 1 3 Vsub ] unit-test
diff --git a/basis/math/blas/vectors/vectors.factor b/basis/math/blas/vectors/vectors.factor
new file mode 100755 (executable)
index 0000000..c86fa30
--- /dev/null
@@ -0,0 +1,272 @@
+USING: accessors alien alien.c-types arrays byte-arrays combinators
+combinators.short-circuit fry kernel math math.blas.cblas
+math.complex math.functions math.order sequences.complex
+sequences.complex-components sequences sequences.private
+functors words locals
+specialized-arrays.float specialized-arrays.double
+specialized-arrays.direct.float specialized-arrays.direct.double ;
+IN: math.blas.vectors
+
+TUPLE: blas-vector-base underlying length inc ;
+
+INSTANCE: blas-vector-base virtual-sequence
+
+GENERIC: element-type ( v -- type )
+
+GENERIC: n*V+V! ( alpha x y -- y=alpha*x+y )
+GENERIC: n*V!   ( alpha x -- x=alpha*x )
+GENERIC: V. ( x y -- x.y )
+GENERIC: V.conj ( x y -- xconj.y )
+GENERIC: Vnorm ( x -- norm )
+GENERIC: Vasum ( x -- sum )
+GENERIC: Vswap ( x y -- x=y y=x )
+GENERIC: Viamax ( x -- max-i )
+
+<PRIVATE
+
+GENERIC: (blas-vector-like) ( data length inc exemplar -- vector )
+
+GENERIC: (blas-direct-array) ( blas-vector -- direct-array )
+
+: shorter-length ( v1 v2 -- length )
+    [ length>> ] bi@ min ; inline
+: data-and-inc ( v -- data inc )
+    [ underlying>> ] [ inc>> ] bi ; inline
+: datas-and-incs ( v1 v2 -- v1-data v1-inc v2-data v2-inc )
+    [ data-and-inc ] bi@ ; inline
+
+:: (prepare-copy)
+    ( v element-size -- length v-data v-inc v-dest-data v-dest-inc
+                        copy-data copy-length copy-inc )
+    v [ length>> ] [ data-and-inc ] bi
+    v length>> element-size * <byte-array>
+    1 
+    over v length>> 1 ;
+
+: (prepare-swap)
+    ( v1 v2 -- length v1-data v1-inc v2-data v2-inc
+               v1 v2 )
+    [ shorter-length ] [ datas-and-incs ] [ ] 2tri ;
+
+:: (prepare-axpy)
+    ( n v1 v2 -- length n v1-data v1-inc v2-data v2-inc
+                 v2 )
+    v1 v2 shorter-length
+    n
+    v1 v2 datas-and-incs
+    v2 ;
+
+:: (prepare-scal)
+    ( n v -- length n v-data v-inc
+             v )
+    v length>>
+    n
+    v data-and-inc
+    v ;
+
+: (prepare-dot) ( v1 v2 -- length v1-data v1-inc v2-data v2-inc )
+    [ shorter-length ] [ datas-and-incs ] 2bi ;
+
+: (prepare-nrm2) ( v -- length data inc )
+    [ length>> ] [ data-and-inc ] bi ;
+
+PRIVATE>
+
+: n*V+V ( alpha x y -- alpha*x+y ) clone n*V+V! ; inline
+: n*V ( alpha x -- alpha*x ) clone n*V! ; inline
+
+: V+ ( x y -- x+y )
+    1.0 -rot n*V+V ; inline
+: V- ( x y -- x-y )
+    -1.0 spin n*V+V ; inline
+
+: Vneg ( x -- -x )
+    -1.0 swap n*V ; inline
+
+: V*n ( x alpha -- x*alpha )
+    swap n*V ; inline
+: V/n ( x alpha -- x/alpha )
+    recip swap n*V ; inline
+
+: Vamax ( x -- max )
+    [ Viamax ] keep nth ; inline
+
+:: Vsub ( v start length -- sub )
+    v inc>> start * v element-type heap-size *
+    v underlying>> <displaced-alien>
+    length v inc>> v (blas-vector-like) ;
+
+: <zero-vector> ( exemplar -- zero )
+    [ element-type <c-object> ]
+    [ length>> 0 ]
+    [ (blas-vector-like) ] tri ;
+
+: <empty-vector> ( length exemplar -- vector )
+    [ element-type <c-array> ]
+    [ 1 swap ] 2bi
+    (blas-vector-like) ;
+
+M: blas-vector-base equal?
+    {
+        [ [ length ] bi@ = ]
+        [ [ = ] 2all? ]
+    } 2&& ;
+
+M: blas-vector-base length
+    length>> ;
+M: blas-vector-base virtual-seq
+    (blas-direct-array) ;
+M: blas-vector-base virtual@
+    [ inc>> * ] [ nip (blas-direct-array) ] 2bi ;
+
+: float>arg ( f -- f ) ; inline
+: double>arg ( f -- f ) ; inline
+: arg>float ( f -- f ) ; inline
+: arg>double ( f -- f ) ; inline
+
+<<
+
+FUNCTOR: (define-blas-vector) ( TYPE T -- )
+
+<DIRECT-ARRAY> IS <direct-${TYPE}-array>
+>ARRAY         IS >${TYPE}-array
+XCOPY          IS cblas_${T}copy
+XSWAP          IS cblas_${T}swap
+IXAMAX         IS cblas_i${T}amax
+
+VECTOR         DEFINES ${TYPE}-blas-vector
+<VECTOR>       DEFINES <${TYPE}-blas-vector>
+>VECTOR        DEFINES >${TYPE}-blas-vector
+
+WHERE
+
+TUPLE: VECTOR < blas-vector-base ;
+: <VECTOR> ( underlying length inc -- vector ) VECTOR boa ; inline
+
+: >VECTOR ( seq -- v )
+    [ >ARRAY underlying>> ] [ length ] bi 1 <VECTOR> ;
+
+M: VECTOR clone
+    TYPE heap-size (prepare-copy)
+    [ XCOPY ] 3dip <VECTOR> ;
+
+M: VECTOR element-type
+    drop TYPE ;
+M: VECTOR Vswap
+    (prepare-swap) [ XSWAP ] 2dip ;
+M: VECTOR Viamax
+    (prepare-nrm2) IXAMAX ;
+
+M: VECTOR (blas-vector-like)
+    drop <VECTOR> ;
+
+M: VECTOR (blas-direct-array)
+    [ underlying>> ]
+    [ [ length>> ] [ inc>> ] bi * ] bi
+    <DIRECT-ARRAY> ;
+
+;FUNCTOR
+
+
+FUNCTOR: (define-real-blas-vector) ( TYPE T -- )
+
+VECTOR         IS ${TYPE}-blas-vector
+XDOT           IS cblas_${T}dot
+XNRM2          IS cblas_${T}nrm2
+XASUM          IS cblas_${T}asum
+XAXPY          IS cblas_${T}axpy
+XSCAL          IS cblas_${T}scal
+
+WHERE
+
+M: VECTOR V.
+    (prepare-dot) XDOT ;
+M: VECTOR V.conj
+    (prepare-dot) XDOT ;
+M: VECTOR Vnorm
+    (prepare-nrm2) XNRM2 ;
+M: VECTOR Vasum
+    (prepare-nrm2) XASUM ;
+M: VECTOR n*V+V!
+    (prepare-axpy) [ XAXPY ] dip ;
+M: VECTOR n*V!
+    (prepare-scal) [ XSCAL ] dip ;
+
+;FUNCTOR
+
+
+FUNCTOR: (define-complex-helpers) ( TYPE -- )
+
+<DIRECT-COMPLEX-ARRAY> DEFINES <direct-${TYPE}-complex-array>
+>COMPLEX-ARRAY         DEFINES >${TYPE}-complex-array
+ARG>COMPLEX            DEFINES arg>${TYPE}-complex
+COMPLEX>ARG            DEFINES ${TYPE}-complex>arg
+<DIRECT-ARRAY>         IS      <direct-${TYPE}-array>
+>ARRAY                 IS      >${TYPE}-array
+
+WHERE
+
+: <DIRECT-COMPLEX-ARRAY> ( alien len -- sequence )
+    1 shift <DIRECT-ARRAY> <complex-sequence> ;
+: >COMPLEX-ARRAY ( sequence -- sequence )
+    <complex-components> >ARRAY ;
+: COMPLEX>ARG ( complex -- alien )
+    >rect 2array >ARRAY underlying>> ;
+: ARG>COMPLEX ( alien -- complex )
+    2 <DIRECT-ARRAY> first2 rect> ;
+
+;FUNCTOR
+
+
+FUNCTOR: (define-complex-blas-vector) ( TYPE C S -- )
+
+VECTOR         IS ${TYPE}-blas-vector
+XDOTU_SUB      IS cblas_${C}dotu_sub
+XDOTC_SUB      IS cblas_${C}dotc_sub
+XXNRM2         IS cblas_${S}${C}nrm2
+XXASUM         IS cblas_${S}${C}asum
+XAXPY          IS cblas_${C}axpy
+XSCAL          IS cblas_${C}scal
+TYPE>ARG       IS ${TYPE}>arg
+ARG>TYPE       IS arg>${TYPE}
+
+WHERE
+
+M: VECTOR V.
+    (prepare-dot) TYPE <c-object>
+    [ XDOTU_SUB ] keep
+    ARG>TYPE ;
+M: VECTOR V.conj
+    (prepare-dot) TYPE <c-object>
+    [ XDOTC_SUB ] keep
+    ARG>TYPE ;
+M: VECTOR Vnorm
+    (prepare-nrm2) XXNRM2 ;
+M: VECTOR Vasum
+    (prepare-nrm2) XXASUM ;
+M: VECTOR n*V+V!
+    [ TYPE>ARG ] 2dip
+    (prepare-axpy) [ XAXPY ] dip ;
+M: VECTOR n*V!
+    [ TYPE>ARG ] dip
+    (prepare-scal) [ XSCAL ] dip ;
+
+;FUNCTOR
+
+
+: define-real-blas-vector ( TYPE T -- )
+    [ (define-blas-vector) ]
+    [ (define-real-blas-vector) ] 2bi ;
+:: define-complex-blas-vector ( TYPE C S -- )
+    TYPE (define-complex-helpers)
+    TYPE "-complex" append
+    [ C (define-blas-vector) ]
+    [ C S (define-complex-blas-vector) ] bi ;
+
+"float"  "s" define-real-blas-vector
+"double" "d" define-real-blas-vector
+"float"  "c" "s" define-complex-blas-vector
+"double" "z" "d" define-complex-blas-vector
+
+>>
+
index bed3a655b18ab3e8c6e010430e4997cd3ec45390..1fcc1ead13a39f6fb66558a6f7a8f54712faae26 100644 (file)
@@ -6,7 +6,7 @@ ARTICLE: "complex-numbers-zero" "Embedding of real numbers in complex numbers"
 "Constructing a complex number with an imaginary component equal to an integer zero simply returns the real number corresponding to the real component:"
 { $example "USING: math prettyprint ;" "C{ 1 2 } C{ 3 -2 } + ." "4" }
 "Constructing a complex number with an imaginary component equal to floating point zero will still output a new complex number, however:"
-{ $example "USING: math prettyprint ;" "C{ 0.0 2.0 } C{ 0.0 1.0 } * ." "C{ 2.0 0.0 }" }
+{ $example "USING: math prettyprint ;" "C{ 0.0 2.0 } C{ 0.0 1.0 } * ." "C{ -2.0 0.0 }" }
 "Unlike math, where all real numbers are also complex numbers, Factor only considers a number to be a complex number if its imaginary part is non-zero. However, complex number operations are fully supported for real numbers; they are treated as having an imaginary part of zero." ;
 
 ARTICLE: "complex-numbers" "Complex numbers"
index 90713cd40fe7aa07102c40a0e39424561a553483..620a6c3bab2f5f0b53127bb7451e4d972e855ccc 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2006, 2008 Slava Pestov.
+! Copyright (C) 2006, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors kernel kernel.private math math.private
 math.libm math.functions arrays math.functions.private sequences
@@ -47,3 +47,9 @@ M: complex sqrt >polar [ fsqrt ] [ 2.0 / ] bi* polar> ;
 IN: syntax
 
 : C{ \ } [ first2 rect> ] parse-literal ; parsing
+
+USE: prettyprint.custom
+
+M: complex pprint* pprint-object ;
+M: complex pprint-delims drop \ C{ \ } ;
+M: complex >pprint-sequence >rect 2array ;
\ No newline at end of file
diff --git a/basis/math/complex/prettyprint/prettyprint.factor b/basis/math/complex/prettyprint/prettyprint.factor
deleted file mode 100644 (file)
index 09eeb80..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: math math.functions arrays prettyprint.custom kernel ;
-IN: math.complex.prettyprint
-
-M: complex pprint* pprint-object ;
-M: complex pprint-delims drop \ C{ \ } ;
-M: complex >pprint-sequence >rect 2array ;
index a06a67e4a11facbd5026aacf71f27594d70a587e..cf0ce5f0bb5642b7f72e84fa6022a50eca9f9473 100644 (file)
@@ -97,7 +97,7 @@ IN: math.functions.tests
 
 : verify-gcd ( a b -- ? )
     2dup gcd
-    >r rot * swap rem r> = ; 
+    [ rot * swap rem ] dip = ; 
 
 [ t ] [ 123 124 verify-gcd ] unit-test
 [ t ] [ 50 120 verify-gcd ] unit-test
index 8411baf94ca310e063e7a68150985ab9d725b773..85b4d711ac045e1bf726c8e0828a0ec933e0d087 100644 (file)
@@ -46,7 +46,8 @@ M: real sqrt
 
 GENERIC# ^n 1 ( z w -- z^w )
 
-: (^n) 1 swap [ [ dupd * ] when [ sq ] dip ] each-bit nip ; inline
+: (^n) ( z w -- z^w )
+    1 swap [ [ dupd * ] when [ sq ] dip ] each-bit nip ; inline
 
 M: integer ^n
     [ factor-2s ] dip [ (^n) ] keep rot * shift ;
@@ -121,11 +122,9 @@ PRIVATE>
     [ * ] 2keep gcd nip /i ; foldable
 
 : mod-inv ( x n -- y )
-    tuck gcd 1 = [
-        dup 0 < [ + ] [ nip ] if
-    ] [
-        "Non-trivial divisor found" throw
-    ] if ; foldable
+    [ nip ] [ gcd 1 = ] 2bi
+    [ dup 0 < [ + ] [ nip ] if ]
+    [ "Non-trivial divisor found" throw ] if ; foldable
 
 : ^mod ( x y n -- z )
     over 0 < [
index 31c9e44b1d3337979ceeafe9dc035092850bee78..2077d82b70454623348d569b0ae14af486745ced 100644 (file)
@@ -11,7 +11,7 @@ HELP: rect
     "Rectangles are constructed by calling " { $link <rect> } " and " { $link <extent-rect> } "."
 } ;
 
-HELP: <rect> ( loc dim -- rect )
+HELP: <rect>
 { $values { "loc" "a pair of integers" } { "dim" "a pair of integers" } { "rect" "a new " { $link rect } } }
 { $description "Creates a new rectangle with the specified top-left location and dimensions." } ;
 
@@ -23,7 +23,7 @@ HELP: rect-bounds
 
 { rect-bounds rect-extent } related-words
 
-HELP: <extent-rect> ( loc ext -- rect )
+HELP: <extent-rect>
 { $values { "loc" "a pair of integers" } { "ext" "a pair of integers" } { "rect" "a new " { $link rect } } }
 { $description "Creates a new rectangle with the specified top-left and bottom-right corner locations." } ;
 
index d8a80340ba5773375e323039eef5a552d89ebc8a..4be8dcc9a734413676d045615b684d1c84d820ae 100644 (file)
@@ -93,7 +93,7 @@ $nl
 $nl
 "Intervals are created by calling " { $link [a,b] } ", " { $link (a,b) } ", " { $link [a,b) } ", " { $link (a,b] } " or " { $link [a,a] } "." } ;
 
-HELP: <interval> ( from to -- interval )
+HELP: <interval>
 { $values { "from" "a " { $snippet "{ point included? }" } " pair" } { "to" "a " { $snippet "{ point included? }" } " pair" } { "interval" interval } }
 { $description "Creates a new interval. Usually it is more convenient to create intervals using one of the following words instead:"
     { $list
index 8c29171a57dd31a153383d4cd16668a70498abfd..378ca2fb4b0cbb99774c8f35b93d03a68270e58a 100644 (file)
@@ -255,8 +255,7 @@ IN: math.intervals.tests
     0 pick interval-contains? over first \ recip eq? and [
         2drop t
     ] [
-        [ >r random-element ! dup .
-        r> first execute ] 2keep
+        [ [ random-element ] dip first execute ] 2keep
         second execute interval-contains?
     ] if ;
 
@@ -287,8 +286,7 @@ IN: math.intervals.tests
     0 pick interval-contains? over first { / /i mod rem } member? and [
         3drop t
     ] [
-        [ >r [ random-element ] bi@ ! 2dup . .
-        r> first execute ] 3keep
+        [ [ [ random-element ] bi@ ] dip first execute ] 3keep
         second execute interval-contains?
     ] if ;
 
@@ -304,7 +302,7 @@ IN: math.intervals.tests
 
 : comparison-test ( -- ? )
     random-interval random-interval random-comparison
-    [ >r [ random-element ] bi@ r> first execute ] 3keep
+    [ [ [ random-element ] bi@ ] dip first execute ] 3keep
     second execute dup incomparable eq? [ 2drop t ] [ = ] if ;
 
 [ t ] [ 40000 [ drop comparison-test ] all? ] unit-test
index ed76ccaedd1e6cc6a6d0f9181537bfe8cb069556..86c3b0de0b70bd009ba0fa0391d8b6dae2a6b9b3 100644 (file)
@@ -11,7 +11,7 @@ SYMBOL: full-interval
 
 TUPLE: interval { from read-only } { to read-only } ;
 
-: <interval> ( from to -- int )
+: <interval> ( from to -- interval )
     2dup [ first ] bi@ {
         { [ 2dup > ] [ 2drop 2drop empty-interval ] }
         { [ 2dup = ] [
index 1fe565ee00d6b9f8e3e54359f0f6cabeee91e5a2..72c114487b1fcecbad9e07bbbfb632a81e8185a7 100644 (file)
@@ -5,8 +5,8 @@ ARTICLE: "math.libm" "C standard library math functions"
 "The words in the " { $vocab-link "math.libm" } " vocabulary call C standard library math functions. They are used to implement words in the " { $vocab-link "math.functions" } " vocabulary."
 $nl
 "They can be called directly, however there is little reason to do so, since they only implement real-valued functions, and in some cases place restrictions on the domain:"
-{ $example "2 acos ." "C{ 0.0 1.316957896924817 }" }
-{ $example "2 facos ." "0.0/0.0" }
+{ $example "USE: math.functions" "2 acos ." "C{ 0.0 1.316957896924817 }" }
+{ $example "USE: math.libm" "2 facos ." "0.0/0.0" }
 "Trigonometric functions:"
 { $subsection fcos }
 { $subsection fsin }
diff --git a/basis/math/miller-rabin/authors.txt b/basis/math/miller-rabin/authors.txt
new file mode 100755 (executable)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/basis/math/miller-rabin/miller-rabin-tests.factor b/basis/math/miller-rabin/miller-rabin-tests.factor
new file mode 100644 (file)
index 0000000..9ca85ea
--- /dev/null
@@ -0,0 +1,10 @@
+USING: math.miller-rabin tools.test ;
+IN: math.miller-rabin.tests
+
+[ f ] [ 473155932665450549999756893736999469773678960651272093993257221235459777950185377130233556540099119926369437865330559863 miller-rabin ] unit-test
+[ t ] [ 2 miller-rabin ] unit-test
+[ t ] [ 3 miller-rabin ] unit-test
+[ f ] [ 36 miller-rabin ] unit-test
+[ t ] [ 37 miller-rabin ] unit-test
+[ 101 ] [ 100 next-prime ] unit-test
+[ 100000000000031 ] [ 100000000000000 next-prime ] unit-test
diff --git a/basis/math/miller-rabin/miller-rabin.factor b/basis/math/miller-rabin/miller-rabin.factor
new file mode 100755 (executable)
index 0000000..8c237d0
--- /dev/null
@@ -0,0 +1,76 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: combinators kernel locals math math.functions math.ranges
+random sequences sets ;
+IN: math.miller-rabin
+
+<PRIVATE
+
+: >odd ( n -- int ) dup even? [ 1+ ] when ; foldable
+
+TUPLE: positive-even-expected n ;
+
+:: (miller-rabin) ( n trials -- ? )
+    [let | r [ n 1- factor-2s drop ]
+           s [ n 1- factor-2s nip ]
+           prime?! [ t ]
+           a! [ 0 ]
+           count! [ 0 ] |
+        trials [
+            n 1- [1,b] random a!
+            a s n ^mod 1 = [
+                0 count!
+                r [
+                    2^ s * a swap n ^mod n - -1 =
+                    [ count 1+ count! r + ] when
+                ] each
+                count zero? [ f prime?! trials + ] when
+            ] unless drop
+        ] each prime? ] ;
+
+PRIVATE>
+
+: next-odd ( m -- n ) dup even? [ 1+ ] [ 2 + ] if ;
+
+: miller-rabin* ( n numtrials -- ? )
+    over {
+        { [ dup 1 <= ] [ 3drop f ] }
+        { [ dup 2 = ] [ 3drop t ] }
+        { [ dup even? ] [ 3drop f ] }
+        [ drop (miller-rabin) ]
+    } cond ;
+
+: miller-rabin ( n -- ? ) 10 miller-rabin* ;
+
+: next-prime ( n -- p )
+    next-odd dup miller-rabin [ next-prime ] unless ;
+
+: random-prime ( numbits -- p )
+    random-bits next-prime ;
+
+ERROR: no-relative-prime n ;
+
+<PRIVATE
+
+: (find-relative-prime) ( n guess -- p )
+    over 1 <= [ over no-relative-prime ] when
+    dup 1 <= [ drop 3 ] when
+    2dup gcd nip 1 > [ 2 + (find-relative-prime) ] [ nip ] if ;
+
+PRIVATE>
+
+: find-relative-prime* ( n guess -- p )
+    #! find a prime relative to n with initial guess
+    >odd (find-relative-prime) ;
+
+: find-relative-prime ( n -- p )
+    dup random find-relative-prime* ;
+
+ERROR: too-few-primes ;
+
+: unique-primes ( numbits n -- seq )
+    #! generate two primes
+    swap
+    dup 5 < [ too-few-primes ] when
+    2dup [ random-prime ] curry replicate
+    dup all-unique? [ 2nip ] [ drop unique-primes ] if ;
diff --git a/basis/math/miller-rabin/summary.txt b/basis/math/miller-rabin/summary.txt
new file mode 100644 (file)
index 0000000..b2591a3
--- /dev/null
@@ -0,0 +1 @@
+Miller-Rabin probabilistic primality test
index 13090b64866e9314b3ff888f03b0f039789f9815..5783dfdf4125a4ef5ba9c144d1c9aaa577e0ced4 100644 (file)
@@ -68,7 +68,8 @@ PRIVATE>
     dup V{ 0 } clone p= [
         drop nip
     ] [
-        tuck p/mod [ pick p* swap [ swapd p- ] dip ] dip (pgcd)
+        [ nip ] [ p/mod ] 2bi
+        [ pick p* swap [ swapd p- ] dip ] dip (pgcd)
     ] if ;
 
 PRIVATE>
diff --git a/basis/math/primes/authors.txt b/basis/math/primes/authors.txt
new file mode 100644 (file)
index 0000000..f3b0233
--- /dev/null
@@ -0,0 +1 @@
+Samuel Tardieu
diff --git a/basis/math/primes/erato/authors.txt b/basis/math/primes/erato/authors.txt
new file mode 100644 (file)
index 0000000..f3b0233
--- /dev/null
@@ -0,0 +1 @@
+Samuel Tardieu
diff --git a/basis/math/primes/erato/erato-docs.factor b/basis/math/primes/erato/erato-docs.factor
new file mode 100644 (file)
index 0000000..b12ea45
--- /dev/null
@@ -0,0 +1,12 @@
+USING: help.markup help.syntax ;
+IN: math.primes.erato
+
+HELP: sieve
+{ $values { "n" "the greatest odd number to consider" } { "arr" "a bit array" } }
+{ $description "Return a bit array containing a primality bit for every odd number between 3 and " { $snippet "n" } " (inclusive). " { $snippet ">index" } " can be used to retrieve the index of an odd number to be tested." } ;
+
+HELP: >index
+{ $values { "n" "an odd number" } { "i" "the corresponding index" } }
+{ $description "Retrieve the index corresponding to the odd number on the stack." } ;
+
+{ sieve >index } related-words
diff --git a/basis/math/primes/erato/erato-tests.factor b/basis/math/primes/erato/erato-tests.factor
new file mode 100644 (file)
index 0000000..917824c
--- /dev/null
@@ -0,0 +1,3 @@
+USING: bit-arrays math.primes.erato tools.test ;
+
+[ ?{ t t t f t t f t t f t f f t } ] [ 29 sieve ] unit-test
diff --git a/basis/math/primes/erato/erato.factor b/basis/math/primes/erato/erato.factor
new file mode 100644 (file)
index 0000000..70a9c10
--- /dev/null
@@ -0,0 +1,25 @@
+! Copyright (C) 2009 Samuel Tardieu.
+! See http://factorcode.org/license.txt for BSD license.
+USING: bit-arrays kernel math math.functions math.ranges sequences ;
+IN: math.primes.erato
+
+: >index ( n -- i )
+    3 - 2 /i ; inline
+
+: index> ( i -- n )
+    2 * 3 + ; inline
+
+: mark-multiples ( i arr -- )
+    [ index> [ sq >index ] keep ] dip
+    [ length 1 - swap <range> f swap ] keep
+    [ set-nth ] curry with each ;
+
+: maybe-mark-multiples ( i arr -- )
+    2dup nth [ mark-multiples ] [ 2drop ] if ;
+
+: init-sieve ( n -- arr )
+    >index 1 + <bit-array> dup set-bits ;
+
+: sieve ( n -- arr )
+    [ init-sieve ] [ sqrt >index [0,b] ] bi
+    over [ maybe-mark-multiples ] curry each ; foldable
diff --git a/basis/math/primes/erato/summary.txt b/basis/math/primes/erato/summary.txt
new file mode 100644 (file)
index 0000000..6ecb893
--- /dev/null
@@ -0,0 +1 @@
+Eratosthene sieve
diff --git a/basis/math/primes/factors/authors.txt b/basis/math/primes/factors/authors.txt
new file mode 100644 (file)
index 0000000..f3b0233
--- /dev/null
@@ -0,0 +1 @@
+Samuel Tardieu
diff --git a/basis/math/primes/factors/factors-docs.factor b/basis/math/primes/factors/factors-docs.factor
new file mode 100644 (file)
index 0000000..f9fe4d5
--- /dev/null
@@ -0,0 +1,23 @@
+USING: help.markup help.syntax math sequences ;
+IN: math.primes.factors
+
+{ factors group-factors unique-factors } related-words
+
+HELP: factors
+{ $values { "n" "a positive integer" } { "seq" sequence } }
+{ $description { "Return an ordered list of a number's prime factors, possibly repeated." } }
+{ $examples { $example "USING: math.primes.factors prettyprint ;" "300 factors ." "{ 2 2 3 5 5 }" } } ;
+
+HELP: group-factors
+{ $values { "n" "a positive integer" } { "seq" sequence } }
+{ $description { "Return a sequence of pairs representing each prime factor in the number and its corresponding power (multiplicity)." } }
+{ $examples { $example "USING: math.primes.factors prettyprint ;" "300 group-factors ." "{ { 2 2 } { 3 1 } { 5 2 } }" } } ;
+
+HELP: unique-factors
+{ $values { "n" "a positive integer" } { "seq" sequence } }
+{ $description { "Return an ordered list of a number's unique prime factors." } }
+{ $examples { $example "USING: math.primes.factors prettyprint ;" "300 unique-factors ." "{ 2 3 5 }" } } ;
+
+HELP: totient
+{ $values { "n" "a positive integer" } { "t" integer } }
+{ $description { "Return the number of integers between 1 and " { $snippet "n-1" } " that are relatively prime to " { $snippet "n" } "." } } ;
diff --git a/basis/math/primes/factors/factors-tests.factor b/basis/math/primes/factors/factors-tests.factor
new file mode 100644 (file)
index 0000000..f247683
--- /dev/null
@@ -0,0 +1,8 @@
+USING: math.primes.factors tools.test ;
+
+{ { 999983 999983 1000003 } } [ 999969000187000867 factors ] unit-test
+{ { } } [ -5 factors ] unit-test
+{ { { 999983 2 } { 1000003 1 } } } [ 999969000187000867 group-factors ] unit-test
+{ { 999983 1000003 } } [ 999969000187000867 unique-factors ] unit-test
+{ 999967000236000612 } [ 999969000187000867 totient ] unit-test
+{ 0 } [ 1 totient ] unit-test
diff --git a/basis/math/primes/factors/factors.factor b/basis/math/primes/factors/factors.factor
new file mode 100644 (file)
index 0000000..05d6b26
--- /dev/null
@@ -0,0 +1,29 @@
+! Copyright (C) 2007-2009 Samuel Tardieu.
+! See http://factorcode.org/license.txt for BSD license.
+USING: arrays combinators kernel make math math.primes sequences ;
+IN: math.primes.factors
+
+<PRIVATE
+
+: count-factor ( n d -- n' c )
+    [ 1 ] 2dip [ /i ] keep
+    [ dupd /mod zero? ] curry [ nip [ 1+ ] dip ] [ drop ] while
+    swap ;
+
+: write-factor ( n d -- n' d )
+    2dup mod zero? [ [ [ count-factor ] keep swap 2array , ] keep ] when ;
+
+PRIVATE>
+
+: group-factors ( n -- seq )
+    [ 2 [ over 1 > ] [ write-factor next-prime ] [ ] while 2drop ] { } make ;
+
+: unique-factors ( n -- seq ) group-factors [ first ] map ;
+
+: factors ( n -- seq ) group-factors [ first2 swap <array> ] map concat ;
+
+: totient ( n -- t )
+    {
+        { [ dup 2 < ] [ drop 0 ] }
+        [ dup unique-factors [ 1 [ 1- * ] reduce ] [ product ] bi / * ]
+    } cond ; foldable
diff --git a/basis/math/primes/factors/summary.txt b/basis/math/primes/factors/summary.txt
new file mode 100644 (file)
index 0000000..1440ddd
--- /dev/null
@@ -0,0 +1 @@
+Prime factors decomposition
diff --git a/basis/math/primes/primes-docs.factor b/basis/math/primes/primes-docs.factor
new file mode 100644 (file)
index 0000000..c7dbc95
--- /dev/null
@@ -0,0 +1,22 @@
+USING: help.markup help.syntax ;
+IN: math.primes
+
+{ next-prime prime? } related-words
+
+HELP: next-prime
+{ $values { "n" "an integer not smaller than 2" } { "p" "a prime number" } }
+{ $description "Return the next prime number greater than " { $snippet "n" } "." } ;
+
+HELP: prime?
+{ $values { "n" "an integer" } { "?" "a boolean" } }
+{ $description "Test if an integer is a prime number." } ;
+
+{ primes-upto primes-between } related-words
+
+HELP: primes-upto
+{ $values { "n" "an integer" } { "seq" "a sequence" } }
+{ $description "Return a sequence containing all the prime numbers smaller or equal to " { $snippet "n" } "." } ;
+
+HELP: primes-between
+{ $values { "low" "an integer" } { "high" "an integer" } { "seq" "a sequence" } }
+{ $description "Return a sequence containing all the prime numbers between " { $snippet "low" } " and " { $snippet "high" } "." } ;
diff --git a/basis/math/primes/primes-tests.factor b/basis/math/primes/primes-tests.factor
new file mode 100644 (file)
index 0000000..db73839
--- /dev/null
@@ -0,0 +1,9 @@
+USING: arrays math.primes tools.test ;
+
+{ 1237 } [ 1234 next-prime ] unit-test
+{ f t } [ 1234 prime? 1237 prime? ] unit-test
+{ { 2 3 5 7 } } [ 10 primes-upto >array ] unit-test
+{ { 999983 1000003 } } [ 999982 1000010 primes-between >array ] unit-test
+
+{ { 4999963 4999999 5000011 5000077 5000081 } }
+[ 4999962 5000082 primes-between >array ] unit-test
diff --git a/basis/math/primes/primes.factor b/basis/math/primes/primes.factor
new file mode 100644 (file)
index 0000000..807ebf0
--- /dev/null
@@ -0,0 +1,33 @@
+! Copyright (C) 2007-2009 Samuel Tardieu.
+! See http://factorcode.org/license.txt for BSD license.
+USING: combinators kernel math math.functions math.miller-rabin
+math.order math.primes.erato math.ranges sequences ;
+IN: math.primes
+
+<PRIVATE
+
+: look-in-bitmap ( n -- ? ) >index 4999999 sieve nth ;
+
+: really-prime? ( n -- ? )
+    dup 5000000 < [ look-in-bitmap ] [ miller-rabin ] if ; foldable
+
+PRIVATE>
+
+: prime? ( n -- ? )
+    {
+        { [ dup 2 < ] [ drop f ] }
+        { [ dup even? ] [ 2 = ] }
+        [ really-prime? ]
+    } cond ; foldable
+
+: next-prime ( n -- p )
+    next-odd [ dup really-prime? ] [ 2 + ] [ ] until ; foldable
+
+: primes-between ( low high -- seq )
+    [ dup 3 max dup even? [ 1 + ] when ] dip
+    2 <range> [ prime? ] filter
+    swap 3 < [ 2 prefix ] when ;
+
+: primes-upto ( n -- seq ) 2 swap primes-between ;
+
+: coprime? ( a b -- ? ) gcd nip 1 = ; foldable
diff --git a/basis/math/primes/summary.txt b/basis/math/primes/summary.txt
new file mode 100644 (file)
index 0000000..41b4197
--- /dev/null
@@ -0,0 +1,2 @@
+Prime numbers test and generation
+
index bb0d025dc6a6d919edddda62ca5330a00dbbdc3c..bc6da9f5643360c50f8cb6100bd212a987cc738c 100755 (executable)
@@ -10,7 +10,7 @@ IN: math.quaternions
 
 <PRIVATE
 
-: ** conjugate * ; inline
+: ** ( x y -- z ) conjugate * ; inline
 
 : 2q ( u v -- u' u'' v' v'' ) [ first2 ] bi@ ; inline
 
index 825c68d1b9ed4d2f0849c289729452ad7bda6442..aedd2f7933b774dd897c2b35d0c2dfba833a220b 100644 (file)
@@ -1,4 +1,4 @@
-USING: math.ranges sequences tools.test arrays ;
+USING: math math.ranges sequences sets tools.test arrays ;
 IN: math.ranges.tests
 
 [ { } ] [ 1 1 (a,b) >array ] unit-test
@@ -11,7 +11,7 @@ IN: math.ranges.tests
 [ { 1 } ] [ 1 2 [a,b) >array ] unit-test
 [ { 1 2 } ] [ 1 2 [a,b] >array ] unit-test
 
-[ { }  ] [ 2 1 (a,b) >array ] unit-test
+[ { } ] [ 2 1 (a,b) >array ] unit-test
 [ { 1 } ] [ 2 1 (a,b] >array ] unit-test
 [ { 2 } ] [ 2 1 [a,b) >array ] unit-test
 [ { 2 1 } ] [ 2 1 [a,b] >array ] unit-test
@@ -32,3 +32,7 @@ IN: math.ranges.tests
 [ 0 ] [ -1 5 [0,b] clamp-to-range ] unit-test
 [ 5 ] [ 6 5 [0,b] clamp-to-range ] unit-test
 [ { 0 1 2 3 4 } ] [ 5 sequence-index-range >array ] unit-test
+
+[ 100 ] [
+    1 100 [a,b] [ 2^ [1,b] ] map prune length
+] unit-test
\ No newline at end of file
index f7b3b37e257c5ba6c19681ae17dd234ae5a2f633..068f599b6ff2c72bdd3619452ffdd2ace962355b 100644 (file)
@@ -1,7 +1,7 @@
-! Copyright (C) 2008 Slava Pestov.
+! Copyright (C) 2008, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel layouts math math.order namespaces sequences
-sequences.private accessors ;
+sequences.private accessors classes.tuple arrays ;
 IN: math.ranges
 
 TUPLE: range
@@ -18,13 +18,19 @@ M: range length ( seq -- n )
 M: range nth-unsafe ( n range -- obj )
     [ step>> * ] keep from>> + ;
 
+! For ranges with many elements, the default element-wise methods
+! sequences define are unsuitable because they're O(n)
+M: range equal? over range? [ tuple= ] [ 2drop f ] if ;
+
+M: range hashcode* tuple-hashcode ;
+
 INSTANCE: range immutable-sequence
 
-: twiddle 2dup > -1 1 ? ; inline
+: twiddle ( a b -- a b step ) 2dup > -1 1 ? ; inline
 
-: (a, dup [ + ] curry 2dip ; inline
+: (a, ( a b step -- a' b' step ) dup [ + ] curry 2dip ; inline
 
-: ,b) dup [ - ] curry dip ; inline
+: ,b) ( a b step -- a' b' step ) dup [ - ] curry dip ; inline
 
 : [a,b] ( a b -- range ) twiddle <range> ; inline
 
index 81294d29f74cb6c942bd8b4a8fd110ebf7d4d4f6..e44dbd1a757f8e01fe4c5e0d8522185ca7437497 100644 (file)
@@ -24,7 +24,7 @@ M: integer /
         "Division by zero" throw
     ] [
         dup 0 < [ [ neg ] bi@ ] when
-        2dup gcd nip tuck /i [ /i ] dip fraction>
+        2dup gcd nip tuck [ /i ] 2bi@ fraction>
     ] if ;
 
 M: ratio hashcode*
@@ -50,11 +50,11 @@ M: ratio <= scale <= ;
 M: ratio > scale > ;
 M: ratio >= scale >= ;
 
-M: ratio + 2dup scale + -rot ratio+d / ;
-M: ratio - 2dup scale - -rot ratio+d / ;
-M: ratio * 2>fraction * [ * ] dip / ;
+M: ratio + [ scale + ] [ ratio+d ] 2bi / ;
+M: ratio - [ scale - ] [ ratio+d ] 2bi / ;
+M: ratio * 2>fraction [ * ] 2bi@ / ;
 M: ratio / scale / ;
 M: ratio /i scale /i ;
 M: ratio /f scale /f ;
-M: ratio mod [ /i ] 2keep rot * - ;
+M: ratio mod 2dup /i * - ;
 M: ratio /mod [ /i ] 2keep mod ;
index d2494ee32a7fdb28dcd6927a98b973ca8b4dfdd0..09caebcf0757bd81bcaf39194133002c45ae8907 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Doug Coleman, Michael Judge.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: arrays combinators kernel math math.analysis math.functions sequences
-    sequences.lib sorting ;
+USING: arrays combinators kernel math math.analysis
+math.functions math.order sequences sorting ;
 IN: math.statistics
 
 : mean ( seq -- n )
@@ -20,6 +20,10 @@ IN: math.statistics
         [ midpoint@ ] keep nth
     ] if ;
 
+: minmax ( seq -- min max )
+    #! find the min and max of a seq in one pass
+    [ 1/0. -1/0. ] dip [ tuck [ min ] [ max ] 2bi* ] each ;
+
 : range ( seq -- n )
     minmax swap - ;
 
index 1445af8309e38566c8442944224ac9c824d92fa9..d91e31cca22875a58f119b3a864d72674fbb74b3 100644 (file)
-USING: accessors checksums checksums.md5 io io.encodings.ascii
-io.encodings.binary io.files io.streams.byte-array
-io.streams.string kernel make mime.multipart
-mime.multipart.private multiline sequences strings tools.test ;
+! Copyright (C) 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: io.encodings.ascii io.files io.files.unique kernel
+mime.multipart tools.test io.streams.duplex io multiline
+assocs accessors ;
 IN: mime.multipart.tests
 
-[ { "a" } ] [
-    [
-        "azzbzzczzdzz" <string-reader> "z" <multipart-stream> 1 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
-] unit-test
-
-[ { "a" } ] [
-    [
-        "azzbzzczzdzz" <string-reader> "z" <multipart-stream> 2 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
-] unit-test
-
-[ { "a" } ] [
-    [
-        "azzbzzczzdzz" <string-reader> "z" <multipart-stream> 3 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
-] unit-test
-
-[ { "a" } ] [
-    [
-        "azzbzzczzdzz" <string-reader> "z" <multipart-stream> 4 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
-] unit-test
-
-[ { "a" } ] [
-    [
-        "azzbzzczzdzz" <string-reader> "z" <multipart-stream> 5 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
-] unit-test
-
-
-[ { "a" "a" } ] [
-    [
-        "aazzbzzczzdzz" <string-reader> "z" <multipart-stream> 1 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
-] unit-test
-
-[ { "aa" } ] [
-    [
-        "aazzbzzczzdzz" <string-reader> "z" <multipart-stream> 2 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
-] unit-test
-
-[ { "aa" } ] [
-    [
-        "aazzbzzczzdzz" <string-reader> "z" <multipart-stream> 3 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
-] unit-test
-
-[ { "aa" } ] [
-    [
-        "aazzbzzczzdzz" <string-reader> "z" <multipart-stream> 4 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
-] unit-test
-
-[ { "aa" } ] [
-    [
-        "aazzbzzczzdzz" <string-reader> "z" <multipart-stream> 5 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
-] unit-test
+: upload-separator ( -- seq )
+   "----WebKitFormBoundary6odjpVPXIighAE2L" ;
 
+: upload ( -- seq )
+   "------WebKitFormBoundary6odjpVPXIighAE2L\r\nContent-Disposition: form-data; name=\"file1\"; filename=\"up.txt\"\r\nContent-Type: text/plain\r\n\r\nuploaded!\n\r\n------WebKitFormBoundary6odjpVPXIighAE2L\r\nContent-Disposition: form-data; name=\"file2\"; filename=\"\"\r\n\r\n\r\n------WebKitFormBoundary6odjpVPXIighAE2L\r\nContent-Disposition: form-data; name=\"file3\"; filename=\"\"\r\n\r\n\r\n------WebKitFormBoundary6odjpVPXIighAE2L\r\nContent-Disposition: form-data; name=\"text1\"\r\n\r\nlol\r\n------WebKitFormBoundary6odjpVPXIighAE2L--\r\n" ;
 
+: mime-test-stream ( -- stream )
+   upload
+   "mime" "test" make-unique-file ascii
+   [ set-file-contents ] [ <file-reader> ] 2bi ;
 
-[ { "a" } ] [
-    [
-        "azzbzzczzdzz" <string-reader> "zz" <multipart-stream> 1 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
-] unit-test
-
-[ { "a" "z" "z" "b" "z" "z" "c" "z" "z" "d" "zz" } ] [
-    [
-        "azzbzzczzdzz" <string-reader> "zzz" <multipart-stream> 1 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
-] unit-test
-
-[ { "a" "z" "z" "b" "z" "z" "c" "z" "z" "d" } ] [
-    [
-        "azzbzzczzdzzz" <string-reader> "zzz" <multipart-stream> 1 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
-] unit-test
-
-[ { "az" "zb" "zz" "cz" "zd" } ] [
-    [
-        "azzbzzczzdzzz" <string-reader> "zzz" <multipart-stream> 2 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
-] unit-test
+[ ] [ mime-test-stream [ ] with-input-stream ] unit-test
 
-[ { "a" "zzb" "zzc" "zzd" } ] [
-    [
-        "azzbzzczzdzzz" <string-reader> "zzz" <multipart-stream> 3 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
+[ t ] [
+    mime-test-stream [ upload-separator parse-multipart ] with-input-stream
+    "file1" swap key?
 ] unit-test
 
-[ { "az" "zbzz" "czzd" } ] [
-    [
-        "azzbzzczzdzzz" <string-reader> "zzz" <multipart-stream> 4 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
+[ t ] [
+    mime-test-stream [ upload-separator parse-multipart ] with-input-stream
+    "file1" swap key?
 ] unit-test
 
-[ { "azz" "bzzcz" "zd" } ] [
-    [
-        "azzbzzczzdzzz" <string-reader> "zzz" <multipart-stream> 5 >>n
-        [ , ] multipart-step-loop drop
-    ] { } make
+[ t ] [
+    mime-test-stream [ upload-separator parse-multipart ] with-input-stream
+    "file1" swap at filename>> "up.txt" =
 ] unit-test
 
-
-
-: dog-test-empty-bytes-safari ( -- bytes )
-    B{
-        45 45 45 45 45 45 87 101 98 75 105 116 70 111 114 109 66
-        111 117 110 100 97 114 121 74 57 98 119 65 87 115 51 121
-        110 112 113 115 72 53 75 13 10 67 111 110 116 101 110 116
-        45 68 105 115 112 111 115 105 116 105 111 110 58 32 102 111
-        114 109 45 100 97 116 97 59 32 110 97 109 101 61 34 102 105
-        108 101 49 34 59 32 102 105 108 101 110 97 109 101 61 34
-        100 111 103 46 106 112 103 34 13 10 67 111 110 116 101 110
-        116 45 84 121 112 101 58 32 105 109 97 103 101 47 106 112
-        101 103 13 10 13 10 255 216 255 224 0 16 74 70 73 70 0 1 1
-        0 0 1 0 1 0 0 255 219 0 67 0 5 3 4 4 4 3 5 4 4 4 5 5 5 6 7
-        12 8 7 7 7 7 15 11 11 9 12 17 15 18 18 17 15 17 17 19 22 28
-        23 19 20 26 21 17 17 24 33 24 26 29 29 31 31 31 19 23 34 36
-        34 30 36 28 30 31 30 255 219 0 67 1 5 5 5 7 6 7 14 8 8 14
-        30 20 17 20 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
-        30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
-        30 30 30 30 30 30 30 30 30 30 30 30 30 30 255 192 0 17 8 1
-        49 1 64 3 1 34 0 2 17 1 3 17 1 255 196 0 29 0 0 2 2 3 1 1 1
-        0 0 0 0 0 0 0 0 0 4 5 6 7 2 3 8 0 1 9 255 196 0 74 16 0 2 1
-        3 3 2 4 4 3 4 5 10 5 3 5 1 1 2 3 0 4 17 5 18 33 6 49 19 34
-        65 81 7 50 97 113 20 35 129 21 51 66 82 36 52 145 161 177 8
-        53 83 98 114 115 147 178 193 209 22 37 67 116 241 99 130
-        240 23 68 84 100 146 225 255 196 0 25 1 0 3 1 1 1 0 0 0 0 0
-        0 0 0 0 0 0 1 2 3 0 4 5 255 196 0 39 17 0 2 2 2 2 3 0 2 1 5
-        1 0 0 0 0 0 0 1 2 17 3 33 18 49 34 50 65 19 81 4 5 20 35 66
-        97 82 255 218 0 12 3 1 0 2 17 3 17 0 63 0 228 200 149 136
-        219 131 200 207 233 68 196 145 112 60 21 45 234 91 181 57
-        177 178 138 75 56 95 111 152 196 51 250 209 11 167 198 14
-        118 138 22 138 153 104 150 118 82 46 217 45 161 98 79 242
-        102 157 38 151 98 174 64 211 237 72 247 49 46 104 11 8 140
-        111 229 247 166 194 70 137 12 146 112 61 235 57 36 172 31
-        82 7 154 199 78 244 176 178 255 0 132 41 100 195 76 15 183
-        240 118 60 31 244 85 237 126 241 237 237 157 213 176 113
-        197 66 158 254 234 82 74 49 45 187 144 42 49 155 158 217
-        108 152 99 21 68 214 88 116 217 83 17 218 218 171 250 109
-        138 180 254 6 221 83 205 109 1 199 115 225 10 141 90 106 23
-        106 187 95 59 73 239 237 77 44 111 89 79 136 24 186 250 131
-        235 86 199 166 71 143 20 52 181 211 237 24 143 232 150 236
-        61 140 66 155 65 167 233 251 64 252 5 158 127 221 45 3 99
-        42 220 42 186 240 79 247 83 139 38 86 92 21 57 20 76 246
-        140 78 155 98 88 31 217 246 125 191 209 45 108 253 159 97
-        255 0 240 44 255 0 225 45 22 216 200 199 181 99 88 74 98 77
-        99 78 178 69 111 14 194 213 23 28 226 48 15 246 212 30 242
-        21 252 105 8 145 170 103 178 213 137 172 121 162 127 181 87
-        151 141 182 247 31 235 210 180 216 209 28 88 217 219 120 99
-        250 52 100 255 0 172 155 168 248 108 109 11 103 240 208 127
-        194 173 118 82 71 225 47 148 246 163 11 169 30 74 81 140
-        102 182 178 35 203 97 104 62 162 46 104 41 45 109 119 127
-        86 131 254 21 48 144 225 9 198 104 105 198 24 118 53 76 77
-        81 141 73 105 109 143 234 176 127 193 21 146 89 219 110 63
-        209 97 255 0 131 69 65 183 110 15 39 218 182 144 160 159 41
-        6 169 102 5 22 54 138 114 109 45 216 123 24 184 53 177 45
-        44 137 231 79 179 237 254 138 179 118 101 112 167 159 181
-        102 131 140 212 35 236 99 95 224 172 119 143 252 190 207
-        254 21 18 186 125 129 92 254 2 207 254 16 172 15 148 230
-        182 71 46 225 198 106 178 78 204 40 213 237 109 83 33 45
-        224 237 223 195 199 247 214 189 30 222 222 69 45 37 165 187
-        156 227 12 161 177 245 230 143 214 212 8 75 123 138 15 69
-        96 7 220 214 159 169 135 31 129 177 192 198 159 102 120 255
-        0 68 181 240 216 217 12 15 217 214 156 246 252 165 230 137
-        139 205 235 128 7 204 123 80 183 154 148 118 202 66 225 156
-        118 62 148 169 174 38 91 55 193 167 233 191 60 214 22 96 14
-        249 137 107 84 199 69 137 246 174 157 100 255 0 65 18 210
-        43 237 82 105 148 188 108 64 254 31 102 164 243 223 204 146
-        249 155 39 233 73 38 50 84 137 156 112 233 19 200 4 118 54
-        201 238 22 33 68 54 153 166 52 96 173 149 163 15 115 16 205
-        66 244 189 77 141 226 40 115 143 90 155 91 73 192 116 245
-        29 141 77 233 140 177 169 46 64 109 167 88 45 203 31 217
-        246 92 127 244 171 19 97 99 226 16 218 125 152 227 63 186
-        20 100 204 56 247 245 175 66 84 145 191 147 235 246 174 140
-        125 18 180 125 183 211 108 72 7 246 125 158 63 221 45 109
-        151 77 177 219 254 111 179 255 0 132 180 68 76 163 133 206
-        51 197 103 43 0 184 166 158 144 72 133 244 54 113 220 5 91
-        120 50 59 254 77 7 120 109 188 48 22 8 1 207 242 98 152 106
-        170 191 137 45 239 218 149 93 41 97 129 239 73 97 143 96 19
-        172 103 204 161 23 232 181 164 71 152 93 143 173 110 117
-        101 67 90 142 239 195 55 165 97 229 251 37 122 124 138 182
-        48 118 253 210 81 66 116 250 82 123 2 205 103 108 55 30 99
-        31 221 218 140 134 63 56 221 200 169 147 26 90 229 159 56
-        20 109 242 171 89 16 217 251 80 214 190 80 49 197 110 212
-        63 168 147 234 107 74 62 44 166 36 156 209 17 234 235 140
-        193 26 170 182 230 227 21 40 248 113 208 240 234 214 169 53
-        194 224 63 166 57 168 167 85 55 136 34 5 87 126 124 170 123
-        26 233 15 129 214 42 221 59 108 123 112 51 27 14 223 90 142
-        61 68 233 206 227 249 58 35 7 224 252 57 252 133 141 91 25
-        82 71 24 255 0 189 44 212 254 21 222 99 16 171 120 139 234
-        160 97 171 165 99 81 143 5 145 74 142 199 29 171 239 225 99
-        121 138 149 80 127 133 241 205 22 229 96 121 19 84 145 199
-        250 231 77 106 61 62 210 25 35 114 189 212 1 198 43 237 133
-        210 72 71 24 56 228 125 107 167 186 179 163 236 245 93 61
-        149 35 76 148 42 43 154 186 195 167 175 58 123 85 149 9 37
-        67 103 63 74 117 39 123 37 151 26 110 226 20 14 64 53 246
-        132 211 174 22 234 21 216 217 111 83 69 22 80 72 197 89 245
-        103 61 238 128 117 60 155 121 15 174 218 174 239 8 23 141
-        158 251 170 192 213 36 219 11 175 169 28 85 123 169 237 93
-        64 240 57 52 99 32 142 45 89 191 15 229 231 154 46 201 155
-        60 214 141 48 43 69 141 163 24 162 109 227 61 199 21 57 118
-        96 244 57 92 227 52 43 198 219 143 126 244 68 18 3 88 202
-        172 141 134 108 147 205 8 107 64 62 65 223 145 131 239 91
-        25 188 199 39 38 181 163 99 191 122 250 112 199 118 59 213
-        83 160 114 54 59 46 211 239 89 39 203 90 93 89 88 115 197
-        110 64 74 113 83 138 169 5 59 62 183 35 214 189 16 193 197
-        124 109 202 123 154 251 19 13 199 35 38 170 242 69 62 194
-        105 214 255 0 171 138 85 166 169 82 204 164 237 60 103 235
-        77 181 129 226 66 184 98 163 220 82 155 73 24 202 45 34 81
-        201 239 75 44 138 141 7 114 72 110 146 203 36 73 12 42 207
-        150 193 197 73 52 191 135 215 186 168 241 220 180 113 177
-        206 49 200 90 153 124 40 248 122 110 151 241 183 65 66 12
-        48 207 191 189 94 54 186 61 165 156 94 28 123 10 149 10 78
-        59 138 231 109 252 58 163 8 163 159 236 254 19 73 53 176 86
-        80 176 175 171 1 197 107 185 248 77 101 105 103 51 204 187
-        36 199 24 25 39 255 0 249 93 18 176 195 18 157 177 168 30
-        212 191 85 132 201 109 39 134 138 204 227 110 8 160 175 232
-        210 227 196 226 14 170 210 27 66 215 60 46 54 110 5 72 31
-        227 82 141 57 214 72 145 137 198 64 237 70 127 148 13 146
-        219 107 208 145 150 5 240 91 211 245 165 58 75 237 130 48
-        72 36 47 117 237 71 39 113 4 23 248 216 202 224 96 100 114
-        107 24 148 183 126 62 213 182 101 57 231 145 89 70 6 7 2
-        174 221 35 133 71 102 248 84 40 245 172 110 57 38 182 175 3
-        140 86 19 1 142 194 145 182 199 34 250 129 197 226 100 241
-        154 211 52 121 77 194 182 234 67 117 238 223 236 162 150 17
-        248 81 218 138 116 52 72 228 225 183 246 21 241 148 126 30
-        79 76 46 234 62 234 16 27 181 7 34 55 135 55 63 250 116 232
-        210 118 168 117 167 172 127 132 183 220 224 15 13 127 187
-        189 16 10 135 194 144 69 43 176 144 155 88 23 212 71 70 32
-        110 251 129 165 170 25 99 99 139 78 127 182 179 213 220 199
-        167 141 190 86 35 191 189 42 241 228 132 174 50 65 246 162
-        53 9 89 172 227 221 158 212 178 151 139 54 61 100 68 118
-        241 86 227 89 182 132 121 247 72 1 2 186 187 225 157 184
-        131 70 182 143 28 162 128 203 234 167 235 92 181 211 246 87
-        23 221 92 145 198 173 133 144 121 192 249 107 170 250 103
-        242 236 35 241 147 194 157 84 6 99 252 85 36 169 34 249 98
-        229 34 100 89 89 139 43 6 97 192 35 211 233 95 94 86 17 2
-        199 56 238 105 119 226 188 171 223 183 39 222 190 27 172 16
-        95 113 79 95 173 16 199 30 134 246 242 11 133 60 242 59 212
-        75 226 103 77 91 235 58 101 204 138 159 154 145 147 145 235
-        78 97 152 171 248 145 200 10 31 65 222 138 155 100 200 21
-        178 222 167 29 171 5 87 211 144 110 214 109 31 80 240 36
-        111 32 39 57 244 57 237 77 224 152 92 69 226 174 49 142 126
-        149 105 124 86 232 27 125 70 22 187 178 132 9 2 229 177 247
-        53 76 66 38 209 181 65 109 48 111 8 156 18 123 81 229 20
-        170 201 101 196 253 163 208 94 161 14 251 105 27 217 106
-        189 213 20 11 226 125 51 138 177 181 70 205 153 104 249 87
-        28 85 117 117 253 117 247 251 241 84 87 240 231 26 233 108
-        192 5 3 131 77 145 78 243 74 180 213 193 7 138 115 18 229
-        137 172 227 33 27 48 183 64 24 26 202 126 13 108 140 169
-        242 142 9 236 79 106 26 92 150 228 250 209 140 93 140 124
-        254 48 107 34 195 39 154 215 255 0 231 122 247 191 253 234
-        188 65 196 223 27 151 24 144 101 253 40 152 179 130 49 233
-        90 109 85 29 124 217 163 226 218 19 28 98 163 123 176 165
-        64 46 219 13 122 22 223 39 28 147 216 86 219 133 4 19 90 1
-        240 161 50 28 131 252 52 91 131 219 55 144 62 189 56 91 68
-        133 88 110 245 30 213 37 248 49 210 178 106 58 188 51 73
-        144 138 119 19 233 140 208 189 61 210 211 245 12 232 193 79
-        204 57 32 226 186 51 161 250 90 195 65 211 161 138 8 255 0
-        51 104 46 125 106 115 146 78 145 124 17 113 143 146 37 26
-        85 188 122 109 132 113 68 184 96 49 159 165 125 185 185 85
-        59 90 64 119 124 198 180 205 43 5 43 156 31 79 181 10 178
-        36 44 26 70 222 205 223 30 148 165 210 177 139 150 149 10
-        227 98 142 192 250 214 155 147 253 28 199 177 88 122 238
-        244 250 208 171 52 155 134 88 98 133 150 237 164 36 46 112
-        15 53 129 56 190 145 65 255 0 148 77 158 235 69 153 118 182
-        199 218 54 118 239 154 175 116 73 72 181 129 135 204 203
-        218 174 31 142 22 18 234 26 36 203 2 72 21 60 229 64 253
-        225 207 106 165 244 67 38 194 37 36 178 240 51 90 91 175
-        248 104 234 13 18 169 228 221 230 127 46 43 5 151 196 228
-        214 55 127 186 221 238 43 85 187 100 227 158 213 94 71 20
-        180 232 103 23 43 197 125 145 84 168 201 230 176 135 182 43
-        100 156 40 165 9 22 212 144 45 249 247 163 161 254 174 40
-        93 79 157 67 62 153 166 22 234 166 1 197 96 53 98 235 149
-        12 167 222 147 234 3 242 102 81 220 71 82 41 99 12 59 129
-        74 117 91 114 45 167 117 31 250 103 251 169 148 140 129 45
-        55 44 17 99 253 29 23 12 204 28 6 3 20 20 19 127 71 139 159
-        253 42 223 28 129 136 7 156 154 103 208 255 0 153 177 205
-        170 120 204 3 12 12 240 69 111 213 199 134 145 66 163 36
-        143 90 246 154 141 148 231 143 74 203 89 138 67 123 11 6 57
-        199 21 63 134 139 243 68 211 224 110 159 102 218 140 243
-        189 188 178 60 152 249 192 192 171 213 173 128 140 176 141
-        15 25 193 244 168 39 193 43 63 15 79 19 76 7 140 199 206
-        184 171 30 250 50 146 43 42 228 48 193 168 219 163 177 55
-        200 71 226 254 97 228 140 28 99 210 183 69 117 30 226 31
-        105 30 222 148 46 161 152 75 141 229 148 156 226 149 60 140
-        70 248 137 80 189 241 75 143 34 186 101 158 54 201 25 102
-        241 55 70 35 3 216 118 162 108 39 87 144 66 242 108 61 243
-        239 244 168 180 119 82 49 253 233 136 123 10 206 207 82 89
-        36 88 174 150 38 195 121 37 76 247 250 213 123 36 224 214
-        201 204 169 20 145 60 61 148 240 72 245 170 127 227 23 70
-        172 150 134 226 214 223 107 103 141 130 173 155 70 86 183
-        66 28 179 3 250 26 58 242 194 43 232 66 92 66 187 79 189
-        115 201 108 56 230 163 105 156 115 105 60 208 196 214 23 80
-        148 145 71 5 135 122 132 235 145 201 29 249 42 188 22 245
-        174 164 248 151 240 207 198 70 212 45 21 81 145 142 204 10
-        160 186 163 71 154 222 77 183 49 8 157 84 246 254 35 239 93
-        112 206 180 145 203 60 93 201 116 37 211 39 10 0 126 41 220
-        119 81 1 144 213 22 120 174 35 92 237 226 135 146 250 234
-        33 235 143 65 87 228 217 13 50 87 226 199 254 144 126 149
-        245 166 141 200 243 10 133 46 162 232 115 146 72 172 206
-        175 41 238 191 223 67 147 9 51 12 132 227 114 214 82 120
-        106 56 113 80 209 170 72 88 5 76 31 189 20 215 178 152 212
-        149 201 197 50 102 37 118 211 195 242 150 227 222 140 18 71
-        129 181 137 168 84 119 151 1 73 197 49 180 191 153 148 110
-        200 199 106 231 250 104 246 74 29 148 174 230 227 29 177 89
-        232 58 77 246 183 172 195 20 112 177 141 125 135 6 153 244
-        151 75 234 157 65 36 113 136 241 9 0 230 186 15 162 250 19
-        79 208 225 79 42 25 145 130 183 31 74 76 146 138 71 84 49
-        211 183 209 143 68 244 245 174 149 167 6 252 56 86 28 246
-        169 45 207 130 182 134 66 222 30 61 187 214 251 192 182 235
-        26 15 40 39 210 144 107 247 22 176 249 46 37 36 124 193 127
-        155 233 83 91 118 86 172 214 151 14 236 220 228 103 130 222
-        213 147 204 138 164 48 86 39 185 168 228 218 149 196 206 56
-        17 91 129 133 81 243 17 88 53 227 180 137 28 114 56 92 122
-        247 170 27 241 177 225 187 24 231 251 171 43 85 241 50 170
-        14 15 36 154 87 109 34 151 27 134 121 167 54 108 225 129 12
-        118 251 82 185 168 151 112 226 129 250 130 194 222 77 30
-        118 120 247 237 140 250 122 215 48 107 54 169 103 169 201
-        224 163 129 188 240 195 138 235 187 203 101 109 50 82 205
-        130 227 143 181 115 71 197 11 55 183 214 228 88 219 17 239
-        224 1 244 162 157 171 57 102 252 68 107 48 54 234 27 24 175
-        68 15 114 49 158 213 166 218 19 37 160 207 38 140 137 120
-        10 220 145 86 198 173 108 227 123 9 130 182 203 218 181 195
-        216 240 59 214 215 70 49 131 73 244 196 91 80 99 248 197 62
-        230 152 193 145 111 145 75 245 24 207 226 147 159 90 109
-        103 31 244 97 158 115 84 140 28 140 40 184 185 117 148 100
-        12 118 173 183 172 143 165 92 48 193 34 39 175 186 149 168
-        14 24 142 49 64 220 201 183 78 157 87 129 225 61 43 84 232
-        196 94 55 155 195 207 134 216 61 168 155 89 101 241 16 108
-        61 232 168 236 220 219 161 11 198 208 223 219 91 173 172
-        157 100 86 32 119 166 109 80 30 201 95 79 166 228 30 245
-        150 187 129 127 18 255 0 101 110 209 23 195 43 246 175 107
-        136 5 253 171 30 119 29 181 54 44 125 209 127 252 28 119
-        147 73 72 230 142 40 215 60 31 122 156 223 199 182 38 200
-        192 3 32 212 119 225 21 138 174 131 12 155 67 115 220 84
-        183 91 141 148 97 89 64 199 32 251 84 228 244 119 67 216
-        175 53 163 38 215 30 25 199 112 213 29 69 63 48 152 73 159
-        65 233 83 13 65 48 37 1 124 167 249 170 55 61 169 40 20 109
-        200 254 90 129 218 4 247 78 190 70 24 83 220 214 80 238 154
-        69 16 176 14 14 87 234 104 11 230 104 238 90 118 5 84 252
-        202 125 190 148 126 152 158 21 202 220 69 135 4 103 13 217
-        215 233 250 215 70 55 226 38 88 187 39 154 13 208 252 34
-        163 33 141 193 243 231 212 251 211 251 121 149 85 1 97 130
-        112 191 90 135 90 206 197 188 64 27 45 201 207 127 214 134
-        215 181 195 98 143 189 138 237 77 203 207 99 70 147 236 131
-        99 174 169 234 43 123 77 62 84 37 70 88 247 53 203 223 20
-        122 138 214 234 127 203 100 102 12 71 7 177 230 180 252 80
-        248 131 123 168 93 92 217 90 92 48 143 126 11 3 85 179 199
-        52 132 72 237 36 140 199 144 125 105 163 26 232 132 230 210
-        164 48 75 217 26 50 178 31 175 216 86 192 177 179 120 114
-        70 67 241 199 223 181 123 78 176 141 158 25 60 57 29 36 94
-        123 112 125 170 77 160 116 237 205 192 152 92 70 3 69 180
-        142 14 72 30 149 94 150 201 70 42 93 246 70 127 3 111 32 5
-        156 28 246 30 245 190 13 46 213 184 24 7 252 106 204 181
-        232 39 188 134 25 214 2 158 110 1 167 211 252 45 149 128
-        217 22 112 6 10 158 230 167 249 25 79 192 83 113 90 218 43
-        149 217 141 188 156 214 187 150 139 38 69 97 207 165 90 154
-        223 195 91 168 237 85 150 18 178 103 7 158 226 163 250 159
-        68 74 152 183 104 138 133 245 230 154 51 108 73 97 165 178
-        2 110 35 93 185 140 228 246 250 214 22 218 145 75 144 79 49
-        169 237 237 76 239 180 139 136 30 225 167 183 116 136 113
-        19 250 19 244 164 87 118 130 221 66 140 239 113 150 255 0
-        84 123 26 210 236 17 199 79 146 58 87 225 47 85 90 20 133
-        99 120 217 252 48 184 7 154 188 44 181 72 110 33 115 28 138
-        189 178 107 243 247 73 212 245 13 34 238 43 139 91 150 86
-        86 224 103 130 43 161 190 21 117 252 218 133 187 199 52 195
-        196 199 42 79 57 169 101 130 173 150 89 37 47 133 243 123
-        62 27 184 205 66 250 153 228 158 87 72 219 242 128 203 31
-        230 250 83 11 125 67 241 86 98 67 184 239 92 140 119 20 179
-        85 146 97 108 214 246 225 124 118 236 237 217 7 169 53 139
-        136 77 210 199 8 240 215 106 142 5 122 9 94 225 177 34 149
-        251 208 119 94 29 164 113 164 108 89 229 206 11 127 16 254
-        111 181 21 167 69 35 196 145 178 183 3 230 247 165 148 171
-        163 166 41 164 130 109 86 72 238 147 99 239 32 246 21 50
-        208 67 51 13 202 70 225 138 143 217 91 1 54 246 198 79 106
-        149 105 49 31 46 210 1 250 210 91 125 141 149 166 135 114
-        167 244 87 221 194 162 96 31 173 115 103 199 23 118 190 241
-        36 82 160 55 148 159 90 234 47 194 238 179 39 25 59 121 246
-        174 109 255 0 40 116 120 110 193 194 99 119 97 84 199 217
-        231 101 232 129 88 15 19 77 12 127 74 223 28 124 80 182 50
-        40 176 133 70 70 70 236 125 40 181 124 40 198 106 216 211
-        226 206 89 109 155 34 93 166 136 112 118 10 12 51 23 28 26
-        222 242 16 170 190 227 251 40 168 180 18 63 170 115 121 30
-        61 233 149 159 238 69 44 213 124 179 41 200 224 209 54 210
-        55 130 49 197 27 163 25 220 166 238 105 102 167 24 91 9 200
-        239 225 63 20 222 94 35 207 189 5 169 47 244 9 255 0 221 61
-        43 70 54 233 208 175 236 235 101 33 79 228 35 103 244 175
-        52 113 171 249 177 244 197 37 178 189 151 240 22 235 26 231
-        108 64 22 250 14 212 76 115 74 236 190 76 156 214 148 120
-        148 135 25 116 137 30 154 114 195 142 115 199 181 103 212 2
-        69 22 211 42 134 41 38 15 181 97 165 135 104 187 109 230
-        137 213 70 52 183 247 83 145 247 160 73 170 154 103 65 124
-        33 150 245 186 106 18 99 120 198 121 199 106 156 223 50 181
-        177 103 80 95 24 21 0 248 17 121 29 215 79 197 27 206 216 7
-        154 178 245 45 63 242 188 72 206 83 28 87 61 118 206 200 63
-        34 5 170 47 149 155 113 35 212 123 82 11 169 21 163 11 24
-        218 71 114 106 73 171 90 72 204 237 27 21 199 124 122 212
-        102 246 53 149 138 188 133 0 61 197 37 89 217 29 136 53 75
-        171 111 21 13 192 196 108 112 91 218 137 211 97 109 58 34
-        151 18 135 183 97 186 25 129 206 207 245 126 212 171 82 145
-        33 117 180 155 5 91 129 159 74 81 38 165 119 166 23 181 185
-        13 36 64 111 140 154 120 107 68 242 77 217 59 186 215 99
-        183 178 109 201 135 81 232 121 199 215 235 84 183 196 238
-        182 55 119 18 90 219 202 225 135 145 142 107 221 79 213 32
-        192 235 24 33 241 140 3 233 239 85 212 183 17 202 254 44
-        222 116 39 42 87 230 253 106 177 77 156 83 157 61 31 45 237
-        237 239 1 102 27 100 118 207 29 137 246 21 186 210 206 226
-        234 117 88 99 32 227 102 0 229 79 210 134 131 114 220 179
-        91 169 147 235 31 106 184 62 29 116 188 215 205 14 160 145
-        168 115 141 216 236 79 184 250 85 23 138 217 40 183 116 197
-        93 13 210 179 94 74 18 230 213 114 14 72 92 240 106 230 233
-        14 149 201 182 205 143 49 182 210 72 249 254 245 48 233 30
-        132 176 210 209 47 24 174 233 57 97 252 167 218 167 186 85
-        149 188 100 34 145 133 57 28 122 212 102 220 186 58 97 20
-        182 200 190 129 210 227 194 72 103 183 201 140 229 192 28
-        17 78 83 165 195 162 4 143 96 7 111 126 245 58 210 108 148
-        90 143 40 231 191 214 137 154 200 237 77 168 54 171 110 34
-        137 185 113 123 101 115 115 210 176 184 101 150 223 113 81
-        198 106 35 212 61 46 204 146 44 118 104 3 38 204 227 176
-        247 251 213 241 45 180 101 119 0 9 35 251 41 14 173 104 170
-        73 101 10 153 224 208 119 240 50 148 89 202 157 87 210 48
-        77 60 202 214 110 145 193 229 140 1 199 222 169 174 161 208
-        175 22 242 86 75 117 218 95 31 252 215 114 106 218 69 181
-        227 52 71 111 57 46 113 223 138 169 250 227 225 231 131 110
-        90 216 198 94 224 22 231 209 126 149 162 223 45 154 81 168
-        156 164 246 105 35 152 164 140 41 67 203 122 15 160 172 244
-        205 66 77 47 82 51 89 54 17 78 55 19 203 125 233 247 94 105
-        223 178 174 22 205 16 237 44 124 64 125 90 162 182 234 136
-        155 102 138 70 62 137 31 173 94 124 90 57 84 156 54 116 39
-        195 190 179 134 247 78 137 124 92 52 99 12 24 250 84 190
-        125 74 222 228 22 13 148 35 12 7 241 125 15 210 185 131 65
-        214 164 211 239 247 12 162 231 205 138 181 180 30 166 140
-        66 173 183 114 133 221 180 251 251 212 163 217 104 57 61
-        217 45 187 183 48 52 154 150 161 34 137 37 242 67 26 246 81
-        232 61 233 182 153 49 100 85 229 112 63 90 138 45 212 147
-        203 251 79 82 37 80 183 229 102 164 26 9 252 67 120 146 72
-        85 91 145 72 227 114 59 160 237 18 88 219 116 161 128 194
-        250 98 164 218 66 175 145 152 176 31 74 141 233 144 188 234
-        35 221 177 148 246 247 169 118 137 110 210 97 23 142 49 73
-        246 131 54 146 29 92 206 230 219 109 190 115 183 140 251 87
-        51 255 0 148 20 183 13 170 120 78 170 124 221 249 174 164
-        185 130 27 123 23 50 76 82 69 143 129 239 92 167 241 178
-        239 241 93 84 144 43 29 170 196 55 214 169 141 83 103 14 94
-        136 60 113 50 75 18 174 79 229 246 52 94 226 2 231 223 154
-        250 84 199 50 150 228 142 7 218 177 118 12 221 171 162 18
-        75 71 56 79 139 25 101 81 243 99 244 172 165 198 194 27 185
-        239 143 74 24 174 210 24 112 43 207 32 216 41 219 179 8 181
-        86 62 48 237 222 143 178 93 208 45 3 170 168 241 215 143 90
-        105 166 46 97 24 246 169 72 198 115 174 16 41 251 208 58
-        145 99 167 93 28 124 176 57 31 217 76 167 70 35 147 64 234
-        8 223 179 47 121 255 0 246 207 255 0 45 82 49 209 133 58
-        116 91 236 237 155 215 195 163 214 53 35 105 60 208 186 71
-        245 59 111 247 99 251 232 167 39 120 199 189 115 61 187 58
-        49 244 62 211 27 106 40 244 11 138 206 245 131 90 52 110
-        112 15 124 250 80 182 59 150 60 230 183 93 131 52 5 27 128
-        123 98 175 195 198 206 121 123 23 111 194 141 25 19 165 163
-        146 25 150 25 163 228 146 123 213 139 166 235 6 72 132 55
-        16 182 244 227 196 61 136 170 231 225 154 76 186 12 22 208
-        179 49 99 134 250 138 156 221 168 180 182 82 216 81 234 125
-        123 87 36 175 164 117 198 187 96 58 228 214 203 59 186 202
-        20 145 242 147 193 53 1 215 181 21 183 159 204 200 184 60
-        224 240 43 87 94 245 125 134 157 20 166 73 17 216 118 25
-        230 168 174 178 235 171 237 81 90 222 215 114 199 158 72
-        239 250 86 132 91 208 207 34 142 209 51 235 190 160 181 86
-        120 81 64 43 192 57 245 168 68 189 85 123 61 177 130 95 57
-        67 149 63 78 212 133 26 107 169 12 183 147 177 200 245 61
-        205 1 113 118 200 204 145 224 15 173 118 67 29 171 100 178
-        229 182 25 125 127 150 37 188 197 251 168 238 15 189 39 185
-        59 88 239 96 227 233 90 204 153 36 243 156 250 214 80 71 44
-        242 42 170 239 102 56 81 158 230 153 164 142 87 119 100 211
-        225 206 159 38 163 172 70 24 180 11 24 192 157 144 149 39
-        254 181 215 159 13 186 114 107 91 40 63 18 33 155 114 143
-        204 72 246 156 125 126 149 76 255 0 147 198 143 171 90 193
-        29 212 150 211 92 187 159 201 137 149 118 238 29 192 231 57
-        31 95 210 186 179 67 253 204 19 79 111 28 23 17 128 94 51
-        243 21 255 0 10 231 148 172 183 14 42 205 194 198 51 182 56
-        212 246 239 76 244 141 60 52 109 25 57 246 62 245 140 23
-        182 18 93 21 158 101 66 237 144 163 184 167 169 60 62 42
-        219 197 177 155 211 111 183 189 78 154 232 101 145 208 77
-        140 91 97 53 181 215 56 86 224 19 201 175 182 255 0 153 207
-        99 244 237 88 207 34 169 11 131 222 155 95 72 74 219 179 99
-        70 54 96 118 28 10 87 127 110 100 144 112 118 47 115 77 147
-        204 156 80 119 141 180 129 42 159 15 233 220 208 119 240
-        104 57 39 178 37 117 96 85 213 147 200 51 198 125 105 102
-        187 166 69 54 157 34 149 46 249 193 30 255 0 74 152 93 203
-        101 248 35 47 136 164 33 198 65 165 111 61 188 182 243 165
-        187 70 230 70 249 143 96 43 36 238 217 105 100 109 81 202
-        255 0 26 122 94 231 240 119 19 36 177 69 30 60 177 32 36
-        177 255 0 189 115 30 160 38 130 83 13 194 52 108 59 6 24 56
-        175 208 63 136 208 223 92 105 207 21 134 158 207 19 103 243
-        21 87 43 199 98 73 239 92 75 241 71 69 212 236 122 138 225
-        174 109 229 104 249 35 198 24 32 125 72 227 251 234 139 100
-        114 69 209 22 180 152 162 121 78 1 245 167 218 70 173 115
-        107 34 186 254 98 142 224 122 138 138 6 100 227 248 79 106
-        221 5 228 177 159 47 98 49 85 171 22 46 145 97 69 213 51 92
-        95 197 248 179 182 5 249 99 61 254 245 105 116 222 187 111
-        113 98 30 50 170 84 236 7 61 207 181 115 221 153 241 206
-        226 88 47 185 244 52 108 26 166 163 165 220 175 225 238 11
-        170 182 229 0 240 77 35 196 213 179 170 57 18 143 103 91
-        244 253 212 110 23 116 170 167 102 50 125 13 77 116 75 168
-        109 109 131 33 103 25 229 147 214 185 131 161 190 34 36 211
-        8 175 36 104 229 7 140 227 7 251 234 246 233 77 90 222 254
-        213 26 9 55 2 61 235 145 220 101 208 202 74 107 178 77 121
-        113 115 170 188 145 70 36 181 135 30 99 47 241 253 171 159
-        62 46 90 90 218 245 34 77 104 193 54 183 0 213 253 169 91
-        200 150 203 113 19 96 168 36 227 218 185 235 226 187 51 106
-        194 86 112 70 227 192 239 84 199 53 100 178 105 82 35 18 57
-        99 90 7 239 43 4 155 33 91 156 123 86 107 203 110 174 142
-        36 101 166 19 130 0 200 199 21 237 170 121 39 154 248 155
-        177 230 32 214 71 129 156 142 105 210 179 8 245 140 248 163
-        138 109 163 200 162 223 130 51 138 85 173 224 74 87 190 61
-        69 29 163 254 235 244 161 40 152 57 183 51 103 6 131 213 8
-        93 58 247 60 127 71 127 249 104 238 62 180 22 177 183 246
-        101 239 127 234 239 255 0 45 20 233 24 85 167 73 26 216 65
-        158 254 18 86 70 100 50 129 159 90 89 104 199 240 86 236
-        199 63 150 63 186 178 133 100 146 225 112 199 147 197 69 37
-        101 99 145 116 137 133 143 154 42 223 50 31 8 149 228 138
-        209 167 127 87 0 247 94 9 162 157 136 78 14 51 222 171 242
-        136 228 246 39 127 8 122 155 193 211 165 220 219 222 54 192
-        218 113 254 52 71 92 124 78 134 206 23 182 242 187 28 252
-        196 228 113 244 170 88 223 220 219 207 44 80 206 241 239
-        239 180 227 38 144 234 211 205 121 49 73 228 101 63 206 79
-        45 244 169 180 145 73 78 162 107 234 29 90 235 92 212 101
-        113 39 229 150 254 34 104 102 133 173 146 56 230 104 163 6
-        61 202 249 206 107 11 155 118 183 143 115 52 123 72 227 117
-        42 184 144 147 183 57 35 142 15 24 167 142 136 115 114 14
-        212 175 140 155 18 48 170 23 212 122 208 18 51 72 219 155
-        143 181 124 141 89 188 217 237 82 45 15 165 239 239 228 64
-        35 220 172 50 60 164 211 60 180 168 122 182 34 182 181 150
-        105 22 52 83 150 56 21 119 124 40 232 61 22 11 120 117 14
-        162 91 71 193 223 137 156 141 163 244 168 207 76 244 169
-        183 63 136 212 18 225 18 57 54 168 100 219 185 135 63 225
-        91 58 183 90 125 107 82 255 0 195 61 62 206 225 188 133 223
-        130 120 244 164 82 82 209 69 162 234 185 248 149 211 250 36
-        150 134 27 173 53 90 60 43 62 205 196 168 237 185 135 124
-        122 30 226 143 31 29 52 104 209 202 95 254 32 5 27 100 36
-        236 45 159 148 10 175 236 62 14 116 119 78 233 49 106 29
-        125 173 188 6 78 209 228 140 254 148 143 173 126 25 244 255
-        0 254 31 184 234 111 135 186 191 237 75 11 33 253 58 212
-        252 240 131 193 111 211 138 203 18 248 105 41 203 127 11 55
-        77 248 167 13 230 169 52 150 247 62 32 50 141 165 57 219
-        192 206 71 176 171 175 165 122 166 5 180 105 218 238 57 174
-        14 11 190 120 198 63 135 233 92 19 209 178 53 191 80 219
-        134 145 158 37 96 36 8 112 28 122 30 61 49 87 123 245 75
-        105 182 99 207 52 183 69 118 195 26 0 16 169 237 74 213 104
-        10 171 71 82 105 125 92 178 27 168 173 231 133 252 12 41 37
-        143 45 235 68 75 172 79 115 181 162 5 128 229 177 233 84
-        103 195 200 167 142 199 241 23 49 151 121 21 93 163 36 242
-        199 230 63 165 90 218 115 72 203 28 109 148 86 95 48 30 130
-        163 46 131 68 134 62 164 146 22 88 78 21 152 231 46 120 197
-        44 126 179 134 226 226 72 124 104 153 146 79 13 129 39 0
-        251 253 170 55 212 64 44 102 54 86 40 36 33 28 158 7 21 76
-        245 62 169 115 211 218 200 159 30 37 165 208 49 206 224 240
-        62 181 88 250 152 177 62 34 245 140 58 102 239 2 121 12 14
-        222 120 80 249 147 237 244 168 54 141 241 163 78 211 141
-        197 165 197 196 110 210 203 184 16 199 40 158 223 78 113
-        222 160 191 17 53 127 196 104 134 75 123 167 145 74 17 20
-        217 230 63 175 255 0 62 245 82 116 190 137 169 117 70 175
-        107 165 233 240 120 183 183 79 225 199 158 199 156 150 111
-        160 28 213 97 20 214 197 201 168 218 58 99 87 248 221 161
-        73 107 36 48 234 16 164 172 70 232 230 77 202 62 162 133
-        213 239 186 63 173 172 13 173 252 186 108 175 26 9 160 13
-        46 213 115 245 3 147 81 85 248 123 240 135 79 184 58 54 177
-        212 210 207 171 96 36 146 110 10 187 253 64 250 103 181 70
-        126 35 124 48 190 232 99 6 191 161 221 181 213 145 243 70
-        249 7 2 179 138 55 41 69 121 116 68 62 34 244 106 232 154
-        139 73 100 209 61 179 246 17 146 66 253 179 80 146 152 39
-        131 199 28 213 195 105 171 105 157 87 161 143 26 59 165 188
-        183 127 13 178 23 185 254 44 14 194 162 250 143 68 106 158
-        61 204 107 110 234 144 30 119 14 228 250 214 186 216 120
-        166 66 226 186 146 33 181 64 42 79 57 166 150 183 81 221 67
-        28 108 18 34 131 27 135 115 75 245 13 58 230 209 218 57 151
-        105 30 148 26 50 169 243 12 143 106 111 201 100 165 221 14
-        110 45 100 30 29 202 108 93 231 201 176 249 179 245 169 239
-        195 46 190 155 65 116 134 233 140 202 14 56 39 138 173 172
-        165 241 167 102 114 65 246 205 29 45 139 162 248 204 228
-        123 82 154 13 217 214 154 111 94 193 127 103 35 13 219 89
-        59 103 214 170 30 176 184 55 250 195 158 200 28 241 237 81
-        14 158 212 46 196 42 137 52 136 163 140 3 222 158 137 55
-        121 155 204 199 185 62 181 62 153 119 177 106 33 86 39 146
-        15 247 81 80 227 28 214 137 102 84 57 35 143 81 91 33 60 96
-        250 242 42 184 246 182 77 236 45 72 53 242 65 229 28 154
-        249 12 110 20 229 189 107 50 141 142 244 244 97 14 171 216
-        100 246 245 166 26 88 99 0 35 218 130 215 35 41 149 62 180
-        126 145 34 139 101 76 115 75 35 4 237 124 253 43 70 167 206
-        153 122 63 254 179 255 0 203 71 73 185 87 191 122 7 80 255
-        0 54 94 255 0 237 223 254 90 41 42 48 158 198 216 61 132 13
-        234 34 76 10 223 4 91 101 25 226 129 180 188 95 192 192 168
-        74 159 13 123 253 40 136 174 55 56 243 115 92 231 71 24 168
-        162 77 103 194 133 29 143 173 23 183 3 142 104 29 53 183 69
-        159 173 28 161 137 32 48 31 122 183 250 156 242 236 132 107
-        158 77 85 199 161 245 165 154 157 228 75 20 143 224 147 38
-        208 160 254 180 95 83 57 138 255 0 123 28 143 97 222 163 23
-        119 6 86 113 187 3 28 3 64 73 118 105 188 158 75 137 188 71
-        96 196 142 62 149 164 43 30 194 155 233 90 68 247 146 69 24
-        134 76 56 200 101 82 71 247 84 150 223 225 254 169 117 125
-        13 172 54 206 217 30 128 228 208 177 150 50 61 211 246 17
-        93 221 197 19 50 151 102 24 78 228 254 149 210 29 55 105 99
-        164 244 220 104 153 154 237 211 1 35 143 5 190 134 190 116
-        95 193 91 125 52 67 53 238 212 144 12 22 9 206 126 149 105
-        216 232 54 58 126 158 27 240 202 229 60 161 207 115 250 84
-        178 100 101 225 138 145 205 127 16 35 235 141 54 194 107
-        169 173 82 194 202 102 43 28 64 121 177 238 126 181 183 252
-        152 180 184 110 186 206 59 139 153 55 120 114 255 0 23 124
-        138 184 254 36 90 166 177 166 141 46 104 35 142 4 39 108
-        140 60 196 227 176 199 115 84 102 142 215 157 3 174 165 245
-        152 155 98 49 145 210 65 182 66 185 239 131 86 197 41 73 81
-        57 175 22 75 126 54 92 222 106 189 105 168 45 206 80 193 62
-        200 131 127 20 127 74 19 225 245 222 151 210 147 38 181 113
-        169 69 121 103 125 101 56 212 44 99 102 221 6 60 168 178
-        103 131 158 249 20 247 171 250 255 0 225 55 87 218 197 168
-        106 38 238 29 67 24 153 33 139 7 31 169 239 80 253 42 199
-        77 234 9 221 244 173 34 120 116 93 223 60 242 238 146 225
-        135 191 176 197 36 63 140 227 147 155 122 59 223 245 28 95
-        218 44 42 62 68 123 167 116 185 33 117 214 20 71 109 12 210
-        51 36 95 197 180 158 0 171 51 165 244 73 181 27 215 191 191
-        183 154 71 150 61 177 2 56 219 239 254 213 35 135 77 93 99
-        94 75 88 99 72 173 161 199 135 10 231 9 138 187 122 35 69
-        184 136 199 113 225 112 23 204 91 181 105 61 158 122 116
-        182 109 183 177 142 215 72 137 99 152 44 139 202 169 238
-        135 220 211 173 10 247 84 145 37 105 49 49 72 240 127 183
-        230 20 195 195 180 216 86 107 115 34 158 225 69 108 183 146
-        21 220 177 126 90 40 200 92 115 82 158 217 76 73 209 23 188
-        188 186 187 184 17 77 43 73 110 173 231 66 57 205 36 235 93
-        26 222 248 180 239 3 92 196 188 182 206 202 49 86 11 61 188
-        190 105 20 200 254 158 80 48 43 69 253 168 184 183 219 28
-        107 27 24 246 133 127 95 236 162 131 61 28 197 173 216 222
-        88 217 13 44 226 43 73 31 242 89 255 0 139 239 65 124 52
-        190 183 232 190 169 212 34 186 137 37 188 186 211 165 252
-        20 241 182 10 183 7 106 159 114 1 171 31 226 39 74 188 150
-        165 68 82 126 72 47 156 241 159 165 66 44 180 219 125 107
-        79 75 123 168 137 187 181 36 199 112 14 10 48 237 131 86
-        134 153 9 78 169 175 217 28 191 211 109 173 111 109 205 190
-        165 6 167 45 196 98 226 89 34 13 152 157 143 40 229 191 136
-        122 213 219 240 252 182 169 240 123 92 211 245 15 204 134
-        221 191 163 153 62 94 59 129 85 78 147 168 244 85 173 233
-        139 172 44 181 29 51 80 138 76 59 194 229 163 155 253 110
-        121 201 246 169 111 88 252 86 233 143 252 53 7 76 244 23
-        143 35 72 140 37 121 34 218 50 125 205 8 97 148 95 43 61 95
-        231 255 0 59 22 124 80 140 35 180 82 80 254 51 75 234 219
-        152 244 185 25 31 199 17 162 17 228 111 191 210 174 222 139
-        139 169 109 103 71 234 59 16 208 73 134 91 132 28 99 218
-        162 191 15 58 89 110 181 4 213 181 39 113 32 199 134 93 114
-        142 255 0 82 43 162 180 147 22 161 107 2 222 219 198 147
-        162 132 64 7 148 175 189 35 200 250 103 18 132 111 179 158
-        126 54 232 182 47 178 234 216 143 12 182 230 34 169 75 216
-        226 86 62 11 7 25 238 43 184 58 167 161 44 181 120 36 73 6
-        204 140 99 195 4 19 238 42 138 248 143 240 98 250 192 126
-        51 78 18 73 30 114 219 87 3 251 40 197 162 83 195 78 202 44
-        103 52 211 78 187 145 54 164 135 122 127 47 168 167 119 125
-        31 117 14 158 39 146 60 72 6 74 169 228 212 106 230 9 109
-        91 44 172 185 28 110 20 233 139 199 137 59 211 30 223 194 6
-        21 216 9 228 123 154 117 19 21 183 101 35 181 68 58 114 224
-        52 41 184 147 232 64 247 169 58 179 120 108 164 130 77 35
-        236 22 8 208 254 98 209 16 202 21 112 8 197 15 63 136 172 6
-        112 125 43 234 35 110 238 0 255 0 173 87 23 65 24 66 236
-        121 193 197 109 144 238 21 170 15 42 121 151 28 214 213 59
-        184 170 24 79 174 144 84 145 216 246 173 250 79 238 135 218
-        133 214 206 213 17 144 115 69 105 35 49 45 99 12 223 228
-        160 245 15 243 101 239 254 217 255 0 229 163 101 24 10 191
-        74 11 81 227 77 189 255 0 219 191 252 181 140 66 237 225
-        152 136 216 103 105 143 138 42 222 57 150 117 57 39 154 107
-        103 110 162 194 219 10 63 171 171 126 167 189 98 177 159 20
-        10 230 67 56 162 65 166 16 176 15 122 57 202 178 141 172
-        115 64 88 198 124 49 205 27 28 101 92 179 114 41 211 177 27
-        43 190 181 38 61 66 76 115 159 127 74 142 91 196 102 157 87
-        146 88 212 151 174 163 111 198 6 254 126 212 171 167 182
-        166 169 24 144 2 50 57 62 156 208 151 236 120 165 106 206
-        132 248 59 209 94 38 135 22 165 116 100 87 219 133 80 70 49
-        138 180 58 43 73 68 189 154 226 52 220 241 182 23 35 56 160
-        58 34 72 173 250 58 47 54 209 225 129 24 247 207 173 79 186
-        31 77 16 218 248 219 67 25 6 226 42 13 203 224 242 236 123
-        167 216 226 13 203 26 128 188 231 57 255 0 26 95 212 86 203
-        14 38 0 224 17 188 125 42 75 20 6 20 41 26 240 252 40 164
-        186 234 187 174 24 60 133 78 89 87 218 149 187 209 148 221
-        236 138 245 22 157 60 140 183 218 74 1 34 249 247 204 160
-        162 241 142 213 79 245 47 72 111 89 117 61 99 84 182 187
-        158 103 33 174 166 206 10 255 0 42 133 245 251 213 175 213
-        218 164 50 217 172 77 44 214 192 54 8 65 153 36 250 40 165
-        235 164 216 95 233 145 223 73 17 140 91 201 143 195 177 220
-        227 244 236 198 173 6 250 55 37 118 206 124 181 232 213 212
-        181 136 196 118 238 246 80 74 54 160 1 90 97 239 159 229
-        171 3 81 179 134 222 91 125 63 77 88 108 247 70 21 97 132
-        238 43 245 53 45 120 119 180 159 135 218 145 202 124 24 230
-        10 1 96 59 138 144 116 239 76 219 104 202 250 174 165 4 101
-        194 238 201 94 91 218 157 201 213 11 26 91 162 47 209 221
-        26 52 117 23 55 18 44 146 183 32 241 146 126 181 97 105 233
-        20 118 239 243 120 107 243 2 121 52 161 18 107 251 179 117
-        35 164 17 70 249 66 107 125 213 247 138 230 59 119 1 148
-        224 149 236 106 118 51 105 187 99 27 235 207 20 237 133 85
-        51 237 90 163 140 144 27 36 55 175 214 176 176 141 3 171 57
-        220 128 242 222 212 213 32 181 101 44 179 99 53 59 41 141
-        241 20 200 230 41 119 134 56 245 197 31 105 121 29 194 42
-        177 193 3 134 254 42 198 107 120 2 16 178 100 251 210 153
-        213 161 184 13 20 228 145 243 173 50 86 9 53 123 50 234 11
-        11 107 132 41 134 60 99 35 4 255 0 125 85 157 71 210 82 232
-        87 15 123 4 237 225 49 203 32 28 15 92 241 86 153 120 245
-        40 4 33 140 12 220 54 239 152 214 173 37 225 148 75 165 223
-        70 178 197 38 80 59 12 213 185 19 139 75 225 77 117 119 76
-        218 117 23 78 199 47 225 99 146 248 121 146 242 54 243 3
-        252 172 191 245 164 29 51 210 246 205 122 209 95 27 104 110
-        162 249 76 132 248 83 143 117 43 87 61 247 76 54 135 118
-        243 89 248 81 68 91 43 159 95 113 205 124 211 116 235 59
-        199 54 23 81 195 110 249 202 133 64 54 122 231 39 248 104
-        114 98 73 236 91 209 125 35 169 105 98 107 75 29 66 7 178
-        150 60 155 57 0 59 121 244 39 154 176 161 130 56 45 161 131
-        240 242 36 164 237 44 221 179 244 168 206 172 145 216 106
-        169 111 43 77 19 68 121 184 135 229 199 250 223 79 168 169
-        93 165 218 234 150 209 172 106 222 64 48 87 215 30 166 167
-        40 219 177 137 5 164 77 225 36 102 48 236 7 36 210 254 160
-        178 221 27 70 208 171 41 249 151 210 159 105 140 205 10 22
-        12 209 109 192 217 232 126 191 90 251 119 110 165 6 236 183
-        213 187 209 72 45 183 217 69 183 75 195 125 121 61 155 100
-        5 30 184 205 115 207 198 174 155 151 68 213 222 32 25 161
-        83 228 98 7 34 186 207 88 181 139 79 234 23 149 155 247 220
-        10 163 255 0 202 41 80 99 115 120 135 178 3 252 67 6 155 28
-        147 208 117 84 202 79 164 121 159 185 198 123 26 153 3 129
-        233 81 14 155 253 250 152 252 188 224 129 233 82 233 50 23
-        235 76 227 178 79 197 31 83 243 62 113 147 239 69 69 10 17
-        207 56 237 66 70 234 20 224 115 68 71 56 0 125 120 167 197
-        209 141 160 49 250 250 86 74 25 125 43 234 28 14 56 205 101
-        147 239 84 48 155 89 82 249 46 54 159 165 109 209 219 49
-        125 171 29 96 150 206 121 226 190 232 192 180 71 21 140 53
-        145 153 136 192 29 168 109 70 54 253 151 120 205 192 54 207
-        255 0 45 18 119 46 57 244 172 117 94 116 59 175 253 179 255
-        0 202 107 24 142 89 51 27 24 6 15 238 146 183 163 13 224
-        100 103 53 170 197 15 224 160 237 251 164 175 174 140 178
-        175 110 245 199 99 146 109 59 247 127 173 22 85 73 60 208
-        90 110 68 32 159 122 34 114 206 190 203 233 142 245 117 29
-        89 39 221 16 158 179 54 177 220 6 150 54 101 29 212 54 9
-        253 107 111 65 52 119 55 208 199 14 159 167 164 123 191 120
-        209 111 147 191 189 1 214 76 222 33 221 130 113 71 252 41
-        88 255 0 104 199 36 165 130 171 100 227 214 150 79 84 58
-        126 71 78 217 170 67 162 91 71 31 38 76 42 17 235 86 191 71
-        218 226 40 183 157 227 104 3 30 245 85 116 252 107 47 224
-        147 147 26 121 176 106 212 209 200 68 130 221 153 131 103
-        118 229 237 138 136 242 236 147 52 74 210 101 92 7 94 113
-        81 206 163 180 146 65 45 212 115 0 66 224 212 170 13 172 85
-        149 148 48 60 230 163 157 92 118 146 241 130 177 200 118 96
-        251 227 63 244 167 125 0 170 250 146 107 143 26 41 174 154
-        105 32 81 183 100 67 37 142 104 141 62 226 225 44 37 156
-        192 167 127 149 93 184 194 251 154 34 85 150 107 205 145
-        176 9 27 121 178 56 175 107 55 45 34 236 114 145 219 47 4
-        142 9 164 10 179 239 79 89 193 97 27 94 77 34 162 47 152 51
-        30 13 9 170 235 147 234 243 24 80 18 177 156 130 61 69 71
-        239 239 159 88 188 88 85 21 45 226 60 5 39 154 51 80 158
-        223 65 182 73 37 184 54 225 70 230 4 14 70 59 81 76 106 190
-        198 23 55 145 91 233 127 141 105 132 48 198 48 238 199 3
-        255 0 154 174 58 155 227 6 147 167 135 139 69 183 123 233
-        84 238 241 230 249 11 85 101 241 47 174 53 30 162 190 154
-        40 100 123 125 56 54 216 237 225 111 46 51 220 253 106 53
-        162 195 249 223 155 143 15 235 70 43 147 7 137 100 15 139
-        93 115 122 210 203 111 115 4 1 223 248 98 193 3 233 91 224
-        235 142 190 159 44 117 201 23 112 254 17 66 244 246 143 9
-        132 58 170 159 165 53 93 29 113 226 5 35 43 144 0 167 81
-        127 161 185 68 15 255 0 212 47 136 86 174 118 234 178 76 23
-        130 28 113 138 249 167 124 105 234 91 59 198 143 87 180 181
-        188 182 99 229 35 190 62 148 116 154 76 126 31 238 219 44
-        57 200 168 119 85 233 118 246 170 74 40 12 79 4 246 20 90
-        111 224 27 139 46 222 152 235 237 19 169 151 109 140 198
-        218 240 156 61 180 237 134 79 246 126 181 34 212 21 229 41
-        26 161 241 147 204 8 244 250 215 29 239 158 206 100 158 41
-        36 142 88 206 229 120 216 130 167 220 123 213 223 240 171
-        175 165 212 172 19 76 214 36 205 194 174 216 238 9 229 135
-        177 164 118 129 73 244 93 58 63 80 195 169 35 105 23 135
-        108 177 46 6 238 198 129 182 183 146 199 89 146 65 27 74
-        210 38 207 15 196 194 129 244 164 122 189 171 181 132 55 80
-        183 134 20 238 18 47 175 222 138 210 117 111 218 67 240 247
-        18 5 184 78 3 10 91 12 83 110 168 207 85 150 225 110 90 222
-        68 144 6 95 202 42 60 195 234 79 173 72 186 125 111 38 252
-        53 180 146 166 118 124 222 189 251 26 213 115 190 234 201 0
-        88 214 88 142 85 241 233 68 116 235 184 34 119 145 222 69
-        109 187 113 253 244 108 220 75 31 72 181 120 160 48 25 4
-        128 12 144 43 116 176 199 248 15 13 99 98 8 230 182 105 222
-        91 96 164 129 43 97 183 30 216 199 106 209 172 188 98 216
-        198 172 195 234 180 91 36 221 58 43 158 186 142 72 46 32
-        154 67 149 13 159 189 85 31 25 237 148 233 226 85 240 156
-        21 220 168 235 184 30 61 69 91 221 94 127 21 104 95 4 140
-        121 126 149 89 245 117 172 87 90 116 126 59 200 27 105 92
-        142 64 21 37 26 118 91 134 172 230 221 62 226 221 53 16 143
-        103 28 110 78 73 133 246 47 255 0 230 164 55 238 134 37 218
-        70 61 57 165 29 89 165 92 104 218 195 188 136 230 34 124
-        178 122 99 222 178 134 224 188 74 172 114 64 239 86 82 100
-        166 188 67 34 108 46 115 69 71 38 229 238 41 100 47 199 122
-        54 221 129 166 140 184 137 45 58 24 219 252 167 62 245 183
-        156 103 210 180 68 234 171 94 150 96 20 14 106 139 34 97 0
-        213 121 25 29 141 124 210 37 111 8 166 59 26 245 243 6 77
-        163 248 123 159 122 195 70 238 212 121 196 195 144 196 247
-        21 163 84 35 246 77 208 245 17 57 63 109 180 65 27 87 60 80
-        154 145 255 0 203 111 127 246 207 254 24 173 206 38 21 233
-        188 216 219 159 254 146 127 133 110 4 9 121 25 161 108 37
-        85 177 183 95 85 140 110 250 226 136 143 243 36 7 208 26
-        228 41 30 199 214 25 240 78 71 173 109 150 64 16 143 95 65
-        239 88 90 16 109 248 227 28 86 139 146 119 231 60 142 213
-        107 124 73 201 121 16 206 172 95 26 80 23 191 175 210 166
-        191 9 186 121 141 170 220 180 51 57 39 129 129 239 222 144
-        217 105 82 234 218 199 131 179 11 184 110 53 209 157 23 211
-        214 182 122 44 81 201 48 241 182 0 61 49 74 24 251 14 122
-        66 214 229 94 48 208 133 80 63 139 189 88 90 72 96 192 54
-        56 236 105 7 78 88 164 31 52 129 163 94 88 231 204 79 181
-        74 32 134 75 123 116 196 68 156 118 110 226 145 143 46 198
-        179 58 65 18 179 74 219 207 112 59 84 115 170 46 217 180
-        249 95 121 44 62 81 237 245 251 209 183 119 81 180 108 184
-        238 42 25 212 90 162 174 228 102 93 157 155 119 96 41 152
-        42 207 186 29 184 107 71 154 87 35 185 99 238 106 35 214 90
-        132 78 5 157 187 22 99 232 41 157 222 169 44 26 83 52 101
-        76 44 48 54 118 53 26 208 109 228 190 214 33 145 162 12 12
-        152 25 246 164 47 12 111 76 155 124 53 233 149 16 45 197
-        218 110 64 114 115 235 84 239 199 221 101 78 177 123 102
-        140 26 56 188 160 102 186 123 67 179 75 123 51 101 8 13 193
-        12 127 147 235 92 107 241 198 27 139 126 176 212 98 152 146
-        230 124 159 246 105 148 28 132 134 68 242 52 200 12 48 44
-        118 198 237 149 195 183 37 15 202 62 213 165 53 63 1 131 60
-        39 195 251 84 155 168 46 180 217 180 109 62 218 212 51 92
-        54 12 161 7 205 247 165 87 82 89 54 159 36 87 22 142 140 62
-        94 59 85 34 168 156 161 110 209 97 124 56 215 45 245 8 28
-        170 12 227 145 237 86 5 215 225 226 75 113 12 108 254 77
-        217 110 56 170 35 225 13 243 91 235 38 53 243 161 111 238
-        171 123 169 245 84 91 139 104 17 137 65 24 17 253 15 181
-        116 66 105 160 113 67 109 70 91 88 173 214 118 0 239 5 72
-        81 218 169 78 186 234 56 127 27 45 154 167 136 55 144 49
-        222 173 110 160 212 29 58 101 228 42 5 202 198 66 12 122
-        123 215 62 233 243 164 250 255 0 141 116 60 92 49 242 142
-        237 247 161 55 72 220 80 93 188 222 50 8 230 132 164 141
-        199 110 5 49 209 255 0 242 221 97 24 23 216 28 40 223 199
-        127 181 107 189 186 73 119 50 219 202 189 176 224 114 121
-        166 125 93 62 159 113 248 25 172 29 213 196 65 164 200 238
-        213 12 177 114 141 153 73 69 209 212 95 8 26 223 168 186 54
-        104 166 219 35 68 72 81 246 21 27 234 77 54 125 23 88 18
-        236 216 132 242 69 51 255 0 37 139 27 166 208 175 174 74
-        150 141 66 149 95 114 123 212 179 226 94 151 227 217 181
-        196 42 36 98 114 19 249 126 149 25 174 40 188 50 46 64 61
-        45 117 107 170 89 51 69 38 14 57 7 189 109 179 111 194 245
-        10 13 196 46 60 195 211 25 168 15 76 222 92 88 234 70 5 5
-        73 60 113 145 82 150 213 51 126 143 112 34 19 99 128 135
-        119 30 249 255 0 165 104 116 52 210 79 69 167 109 119 185
-        17 22 66 87 119 13 235 138 35 83 11 140 198 229 199 166 106
-        45 162 220 120 138 36 207 25 230 164 81 75 226 40 88 227
-        223 143 74 214 115 53 228 70 181 136 157 225 117 141 64 227
-        133 53 93 235 150 179 52 130 23 132 62 14 0 95 191 173 90
-        250 196 56 152 49 219 150 249 75 118 6 161 215 246 48 139
-        215 146 105 24 130 48 71 240 211 36 55 39 209 207 127 20 33
-        179 180 212 101 79 6 102 89 24 46 201 62 82 113 220 84 6 88
-        22 44 52 44 206 159 94 226 174 175 140 58 47 137 104 38 179
-        101 148 71 150 81 184 6 83 244 205 83 54 30 42 72 232 246
-        243 3 159 48 200 110 126 244 64 246 104 220 241 131 186 137
-        182 184 64 57 110 107 102 161 110 172 9 141 65 30 254 212
-        166 104 218 35 156 253 42 148 128 210 100 129 46 99 63 197
-        95 39 148 99 200 115 72 34 149 193 201 99 138 221 248 229
-        67 207 106 87 20 128 208 222 233 129 143 30 222 190 245 142
-        151 235 247 165 175 125 226 2 84 226 143 210 100 5 194 255
-        0 53 40 7 133 191 44 80 90 144 206 153 122 114 127 171 61
-        109 150 224 46 87 219 138 26 250 101 109 34 233 189 225 112
-        126 213 168 70 221 137 52 247 111 194 91 140 28 136 249 166
-        118 114 121 192 160 116 224 166 24 71 111 203 163 173 194
-        248 234 5 98 204 146 89 170 152 115 187 239 66 223 99 5 148
-        225 63 157 62 106 105 99 25 48 42 199 183 39 190 104 203
-        189 29 230 179 1 21 83 112 249 143 111 238 172 37 48 14 133
-        210 188 109 107 241 144 164 50 46 209 151 99 130 13 116 78
-        131 56 158 218 20 150 81 189 80 13 158 131 235 85 223 195
-        94 156 59 143 226 99 12 217 225 135 21 108 90 233 166 36 79
-        10 30 0 239 88 172 152 218 198 23 133 149 225 96 185 238
-        126 148 254 207 12 187 34 137 143 243 63 165 35 182 146 88
-        80 35 67 128 79 239 15 240 253 41 148 55 50 71 3 198 155
-        223 63 59 227 185 250 86 20 246 175 9 49 238 137 75 194 7
-        14 59 26 171 122 185 101 146 252 170 221 70 138 79 57 171
-        19 90 190 184 150 223 207 136 198 60 160 85 91 173 91 79
-        121 123 35 126 42 20 85 57 229 143 253 169 39 236 52 59 21
-        95 71 52 120 85 189 141 19 24 193 61 254 181 38 232 109 62
-        56 84 95 120 139 52 177 12 70 23 208 251 210 8 45 33 102 62
-        35 69 113 183 143 43 28 138 150 244 28 129 53 1 12 177 109
-        133 56 69 30 223 90 89 71 145 87 58 90 44 222 153 135 108
-        45 112 24 137 64 59 200 35 39 138 160 63 202 143 164 236
-        110 35 77 90 16 177 220 71 31 157 207 118 63 203 255 0 95
-        210 186 59 76 240 101 45 113 224 67 10 200 219 34 218 152
-        57 168 199 95 116 226 234 154 109 212 19 66 158 32 207 206
-        14 8 193 237 93 81 141 66 145 199 109 202 217 193 218 38
-        143 125 172 92 206 182 82 120 115 194 3 167 250 199 216 81
-        186 229 182 179 114 195 76 184 142 52 153 64 252 208 57 63
-        83 79 238 108 238 58 51 172 102 142 72 93 32 119 36 100 119
-        25 197 72 174 109 109 245 43 132 213 172 128 119 83 202 159
-        81 83 166 116 173 171 43 142 148 209 167 210 53 87 186 109
-        225 20 130 8 29 254 212 255 0 168 117 88 99 189 18 151 121
-        75 184 112 15 163 10 115 169 205 104 214 160 109 219 47 168
-        3 24 168 70 191 34 35 161 50 198 74 190 79 218 171 23 76 95
-        199 68 203 87 214 37 213 236 26 53 97 28 146 199 220 255 0
-        102 42 186 135 166 111 237 101 123 191 50 170 19 133 35 150
-        251 84 183 68 104 4 177 177 98 112 6 125 170 84 82 27 248
-        197 189 188 97 156 253 56 169 202 77 176 113 118 65 83 78
-        215 58 130 206 36 216 150 214 208 121 188 131 131 250 210
-        254 157 210 219 80 215 226 210 252 97 8 241 48 197 189 106
-        194 214 117 11 77 19 76 125 54 215 30 57 82 9 28 3 79 255 0
-        201 219 162 228 212 181 51 171 222 70 35 241 27 10 204 14
-        59 131 237 70 9 216 217 101 20 182 116 135 194 61 10 223 71
-        233 107 107 59 21 100 11 15 159 61 137 250 208 157 71 12 97
-        154 215 143 1 137 222 171 83 13 26 218 43 88 139 75 108 35
-        139 110 197 57 225 143 189 38 234 185 161 181 211 101 183
-        48 140 177 224 142 226 182 98 56 211 178 137 234 75 3 103
-        126 235 13 210 69 179 144 73 173 130 222 67 20 99 241 145
-        191 102 220 13 27 168 199 28 215 18 77 53 184 93 195 130 79
-        106 16 88 52 155 213 111 32 12 167 182 227 255 0 106 132
-        186 59 155 209 97 116 84 108 85 3 72 36 56 192 34 167 80 70
-        200 128 172 81 179 175 24 61 234 176 232 167 154 223 242
-        154 101 45 191 131 159 165 88 208 95 93 44 106 165 81 128
-        31 50 250 211 199 212 228 105 169 108 211 171 31 16 177 142
-        51 27 145 202 159 74 142 94 195 25 140 200 192 22 94 114 87
-        52 250 250 105 35 117 104 83 45 234 27 185 165 119 214 183
-        19 184 62 25 85 110 227 183 52 76 85 255 0 17 132 154 166
-        147 37 186 248 46 20 21 7 110 222 125 170 129 155 79 252 60
-        230 39 32 182 79 145 107 171 122 135 68 142 75 86 221 25 92
-        100 146 59 26 162 186 143 167 38 135 88 220 138 165 119 28
-        30 107 24 133 203 14 207 44 159 150 79 240 175 99 75 110 45
-        85 216 243 83 62 164 210 229 135 108 166 18 138 125 248 34
-        163 110 129 92 228 86 17 232 71 37 152 0 226 130 158 215
-        239 82 48 136 202 124 190 180 37 197 190 92 129 142 244 105
-        152 143 205 19 33 242 127 109 63 233 213 252 149 242 146
-        217 228 214 155 139 85 10 78 40 189 15 8 59 113 154 120 166
-        96 249 147 50 29 220 26 211 168 68 19 72 186 62 190 11 147
-        246 162 174 15 230 134 247 21 167 84 255 0 50 221 55 24 107
-        119 24 162 97 14 159 36 102 218 32 205 180 248 116 198 213
-        226 87 83 188 147 154 81 107 167 220 53 140 18 7 35 242 249
-        163 44 237 37 105 17 119 28 131 147 82 28 156 233 82 143 18
-        49 232 69 79 180 187 75 121 32 92 220 73 28 184 249 68 69
-        133 65 186 106 197 231 158 36 49 201 38 61 87 210 174 190
-        145 211 94 68 137 95 195 66 171 140 177 231 245 172 97 191
-        72 233 106 109 6 103 93 195 186 142 230 167 58 110 155 149
-        2 36 4 1 146 204 199 138 15 167 44 108 128 241 124 25 230
-        127 226 240 71 203 82 107 123 49 34 172 113 248 241 71 156
-        226 65 131 88 87 42 6 22 110 1 241 219 196 92 121 84 129
-        138 211 5 149 227 238 88 149 84 19 252 93 170 65 111 103
-        146 84 149 104 151 251 65 172 166 82 241 42 66 205 41 31
-        194 220 17 253 148 44 28 209 92 245 109 181 212 113 110 220
-        74 129 192 30 181 84 206 151 127 141 151 198 194 3 192 4
-        213 229 213 154 108 146 218 14 114 49 230 95 229 174 127
-        235 72 166 211 53 41 87 12 242 147 223 39 129 83 156 188
-        139 225 142 218 26 233 208 201 11 157 171 16 82 114 78 78
-        106 95 211 141 17 148 180 69 153 211 137 31 248 84 253 106
-        187 210 229 27 98 154 234 102 10 87 29 253 106 99 211 247
-        50 71 229 137 138 237 243 73 143 226 31 90 220 138 100 73
-        45 23 31 79 177 184 177 104 84 141 225 195 120 141 198 71
-        208 83 253 66 55 75 114 242 175 137 43 240 0 25 207 21 16
-        233 137 18 107 104 217 110 11 55 0 15 166 123 84 230 250
-        120 225 136 200 204 200 137 128 8 25 197 118 65 218 60 188
-        146 119 163 156 190 49 244 36 186 173 171 92 181 143 225
-        228 44 85 153 187 143 94 42 128 158 223 90 233 105 158 56
-        219 198 133 143 215 143 181 117 247 196 9 154 123 217 165
-        105 34 104 200 206 194 249 195 127 241 84 31 89 91 238 184
-        157 99 133 30 82 55 40 29 143 214 169 197 23 199 41 112 162
-        186 185 214 103 186 102 123 219 95 57 239 33 24 3 251 42 61
-        172 120 51 36 69 109 119 3 47 206 61 78 15 21 33 184 142
-        230 221 222 9 70 84 15 54 125 169 116 176 205 24 93 141 132
-        241 6 6 59 26 159 17 249 72 198 214 241 98 108 27 117 4 224
-        149 92 211 111 252 65 168 64 98 75 43 87 17 129 229 44 56
-        199 233 205 3 107 110 99 99 52 152 50 150 56 99 237 154 123
-        211 176 77 38 160 37 101 223 31 177 237 70 43 246 110 82 10
-        232 190 141 212 53 205 71 241 87 143 28 140 88 121 125 43
-        171 254 26 232 50 233 22 137 111 248 16 144 42 133 223 142
-        9 170 163 225 212 126 10 143 13 109 192 115 128 31 230 253
-        42 249 232 235 223 11 77 134 25 36 73 90 110 236 15 57 166
-        215 194 25 174 84 55 189 178 97 21 188 74 235 225 15 54 210
-        121 53 5 235 9 86 234 105 118 131 187 119 150 33 243 84 243
-        168 21 134 153 148 145 35 216 255 0 49 238 56 170 163 172
-        110 246 221 148 183 185 203 147 193 90 134 99 163 9 14 213
-        90 57 49 224 176 111 230 87 226 144 79 4 139 52 147 43 196
-        140 253 129 124 12 209 122 205 212 6 227 198 110 1 242 103
-        63 197 239 81 141 94 238 226 25 194 40 87 70 244 127 81 244
-        174 103 45 29 138 28 145 48 233 15 198 27 192 146 18 27 119
-        163 2 63 76 85 189 164 89 221 73 26 42 185 200 28 131 85
-        191 195 29 42 75 141 146 194 172 24 159 144 255 0 15 30 149
-        113 233 150 55 16 170 135 252 206 60 210 123 85 99 234 114
-        229 146 230 1 29 155 9 135 226 87 9 252 254 162 190 157 54
-        73 150 76 206 179 156 121 119 112 64 253 42 68 34 23 10 4
-        109 226 159 76 208 151 54 110 238 87 196 43 32 237 232 7
-        222 137 62 104 132 107 26 118 99 219 226 136 152 14 121 205
-        86 125 99 167 175 237 5 105 110 23 96 62 102 65 87 101 229
-        188 101 30 59 139 121 159 159 51 70 50 13 67 181 253 46 209
-        204 177 194 198 53 217 156 74 7 6 176 201 217 68 117 172 48
-        8 222 72 228 50 38 223 33 116 108 230 160 19 129 180 62 59
-        174 113 87 71 94 233 47 38 158 234 139 184 43 97 86 169 187
-        184 158 34 241 200 48 85 138 129 236 43 2 74 221 128 250
-        103 222 176 101 39 229 25 53 159 210 179 135 230 170 115 85
-        64 52 201 22 80 150 24 56 161 172 78 217 8 0 119 166 23 142
-        190 27 113 233 75 237 10 155 130 2 253 105 224 237 24 105
-        58 110 10 223 74 18 255 0 63 178 110 193 244 129 218 143
-        149 149 99 11 142 72 160 117 31 243 85 217 61 204 78 15 218
-        131 236 193 186 90 198 116 139 76 50 159 232 201 254 21 240
-        8 214 109 220 18 57 24 165 154 124 231 246 109 170 238 218
-        22 221 20 215 212 185 118 155 195 29 189 234 35 147 62 151
-        185 63 180 227 85 109 196 243 145 232 125 170 240 233 87
-        154 98 130 117 42 224 113 159 90 231 254 159 141 77 220 110
-        210 109 243 14 213 208 95 13 174 45 209 81 90 100 44 23 203
-        187 146 127 178 177 139 91 167 68 45 106 163 233 147 24 238
-        194 164 246 194 223 193 93 177 201 193 236 190 159 122 65
-        161 25 226 95 204 138 16 51 198 79 27 105 254 159 226 186
-        121 152 39 60 39 253 105 146 178 13 219 8 84 102 112 4 112
-        237 246 207 52 108 80 71 23 155 240 209 243 245 175 145 32
-        81 150 82 62 181 181 229 80 128 114 126 212 234 128 38 234
-        59 17 121 1 113 181 118 131 149 240 176 107 157 254 36 105
-        145 172 225 132 94 57 82 119 47 168 174 150 190 241 164 6
-        72 31 195 35 212 142 106 176 235 237 5 174 124 86 101 12
-        216 221 187 24 57 164 156 20 138 96 157 62 69 19 13 184 134
-        214 71 243 120 132 102 52 147 248 105 222 141 61 221 194
-        172 215 18 131 50 12 125 90 134 154 19 103 168 120 18 237
-        96 217 0 125 104 103 241 173 101 252 106 134 27 79 111 74
-        229 105 166 119 57 114 90 45 126 140 184 86 180 102 55 40 8
-        237 205 78 191 31 60 86 95 135 107 229 220 190 111 47 36
-        241 242 213 27 163 234 202 176 41 241 140 81 191 112 123
-        211 185 186 180 219 217 198 209 221 168 144 143 56 99 206
-        43 167 30 95 140 228 201 141 223 67 62 185 190 0 22 88 89
-        78 194 89 166 24 85 62 245 68 234 173 20 200 146 120 151 15
-        39 140 216 192 249 177 223 21 100 234 93 81 167 222 233 242
-        121 135 138 27 206 9 24 97 75 172 109 244 123 201 222 118
-        186 72 146 21 59 6 6 11 55 106 235 82 137 57 41 69 21 69
-        244 107 60 211 93 169 222 178 249 75 55 4 26 2 230 55 93
-        145 140 130 91 129 142 245 120 75 240 222 29 147 220 75 118
-        30 222 100 81 28 157 134 226 70 72 166 215 191 0 76 154 124
-        23 81 107 2 210 70 149 7 157 187 131 233 218 133 196 73 100
-        226 172 231 200 35 12 21 130 144 9 218 51 234 105 173 147
-        53 180 47 106 237 55 154 81 38 213 29 143 181 92 250 183
-        193 155 93 2 226 207 241 55 27 217 230 97 184 158 15 181 0
-        157 15 107 160 194 127 107 93 71 0 157 155 135 97 207 177
-        173 113 30 18 114 86 36 232 155 166 181 212 229 142 20 15
-        143 149 27 248 143 181 95 61 33 125 178 213 99 141 94 2 163
-        115 73 32 242 131 237 84 149 189 254 147 167 202 177 171
-        167 138 174 4 135 0 227 235 82 24 186 206 56 238 36 138 210
-        113 176 227 37 143 31 165 36 164 146 26 172 183 53 139 233
-        37 145 47 13 228 65 72 33 147 61 170 172 234 89 213 239 76
-        97 195 43 49 243 10 217 127 212 139 61 152 48 202 93 149
-        124 192 17 222 162 154 181 244 173 190 4 254 177 41 201 39
-        176 251 87 62 73 166 138 98 139 176 77 70 226 105 110 227
-        128 248 50 89 41 255 0 238 31 106 9 108 115 118 169 36 98
-        88 216 249 95 209 13 31 102 134 210 220 137 35 60 142 239
-        220 83 222 137 209 164 212 174 195 188 108 235 158 0 251
-        215 53 72 232 121 20 116 139 19 225 174 154 190 12 107 17
-        119 219 130 199 244 255 0 10 182 236 213 161 183 40 171 147
-        237 81 142 150 210 174 172 237 217 18 40 227 82 0 5 187 212
-        174 22 216 118 158 113 234 59 26 234 132 93 108 243 231 92
-        172 209 53 180 127 188 240 78 87 156 30 213 161 217 164 25
-        154 48 24 118 49 242 113 76 193 89 99 56 237 67 205 20 120
-        199 202 125 13 55 16 8 111 196 76 140 161 37 39 25 203 14
-        213 1 234 117 1 164 101 229 74 96 55 189 88 23 183 19 70
-        204 138 137 142 217 62 181 21 215 72 134 54 150 70 183 84
-        245 221 158 63 186 183 18 176 119 162 142 235 107 139 179
-        101 112 48 74 131 149 250 213 55 169 21 153 101 109 195 118
-        226 49 87 143 197 11 59 89 172 228 240 238 163 86 11 193 86
-        242 213 7 168 41 183 153 227 13 189 119 119 20 133 31 26 4
-        138 53 225 183 114 56 162 35 249 141 99 16 93 166 190 134
-        10 199 218 177 51 11 207 221 183 218 128 179 230 224 227
-        154 97 117 242 31 181 45 179 202 206 87 215 189 82 14 145
-        135 197 65 136 103 142 40 13 74 48 116 219 220 28 255 0 70
-        122 48 73 249 67 52 22 160 196 88 93 242 60 240 56 20 89
-        132 246 173 33 176 131 211 242 147 181 25 98 164 202 55 122
-        241 90 172 99 38 202 223 63 232 146 141 137 10 48 53 33 195
-        237 36 17 76 55 59 140 28 241 86 191 194 221 82 71 187 85
-        134 86 137 241 229 144 138 169 145 73 66 203 220 28 154 150
-        252 57 214 154 199 83 71 134 72 163 97 235 39 106 198 58
-        223 67 121 30 205 68 246 178 34 103 201 57 60 49 250 84 166
-        202 250 59 114 171 42 153 28 140 2 7 97 80 110 157 214 5
-        238 147 18 27 150 57 60 113 156 126 149 55 208 161 152 66
-        38 143 136 200 198 120 57 63 173 89 164 186 57 199 169 35
-        72 23 119 0 142 213 189 35 81 233 199 181 13 8 118 33 179
-        192 224 209 101 148 32 227 154 6 62 50 174 119 99 129 233
-        74 122 130 205 110 173 152 236 11 246 29 233 163 72 161 114
-        71 21 131 48 145 10 178 239 83 233 237 65 179 45 20 167 88
-        244 52 211 91 27 203 104 80 178 18 119 122 231 218 171 11
-        187 123 200 110 31 78 189 93 162 67 243 123 87 79 107 176
-        53 157 147 186 43 75 17 238 139 232 125 234 136 248 146 177
-        73 114 100 84 96 155 185 13 195 126 181 25 70 203 225 156
-        147 164 35 210 116 152 166 184 16 52 171 42 149 202 236 247
-        170 207 226 54 139 175 105 90 204 242 61 196 190 11 28 198
-        83 149 219 237 83 222 151 214 197 133 218 194 100 240 225
-        249 67 96 114 61 170 196 212 52 152 117 189 17 90 56 209
-        212 12 238 35 56 21 60 77 73 157 83 132 226 185 72 228 251
-        45 112 139 146 26 86 59 20 134 4 156 22 162 52 205 98 226
-        222 203 242 166 62 57 186 18 54 227 193 3 211 237 83 78 185
-        248 112 99 190 184 149 45 13 188 32 231 116 125 152 213 121
-        169 104 183 182 101 130 238 0 252 153 238 5 116 62 206 120
-        228 82 123 39 58 151 88 245 117 197 134 159 165 75 124 86
-        218 24 205 202 70 184 218 7 177 53 60 215 254 43 117 237
-        199 75 232 182 247 182 18 89 199 225 44 214 243 173 187 21
-        184 10 123 130 51 199 189 115 249 107 184 36 221 151 221
-        141 188 156 241 237 82 109 7 226 31 89 104 177 71 109 109
-        172 94 4 130 217 160 129 50 8 138 54 238 160 17 218 154 133
-        88 87 254 139 31 226 175 196 126 181 234 43 13 48 94 88 61
-        132 70 63 26 222 88 247 33 125 191 196 51 233 144 106 29
-        212 157 103 212 58 189 165 140 186 165 244 83 35 32 88 176
-        131 32 47 114 126 181 19 213 186 147 168 117 153 33 159 81
-        212 174 238 154 217 12 80 120 178 110 240 211 249 71 211
-        147 66 44 55 19 90 71 181 75 159 155 25 236 115 90 135 73
-        46 221 140 238 53 67 251 78 238 95 20 178 77 146 50 121 205
-        104 210 245 75 139 217 34 181 134 232 137 3 16 192 3 154 47
-        67 232 251 173 64 201 227 187 71 35 225 148 14 248 207 106
-        185 62 27 244 16 178 195 61 132 105 48 148 18 242 96 22 95
-        214 132 163 171 4 230 170 162 7 208 29 47 125 30 141 53 238
-        172 242 178 203 251 188 30 64 199 253 232 177 103 28 123
-        100 241 137 149 120 84 110 199 239 83 126 177 191 182 208
-        237 37 183 143 116 44 56 85 36 55 24 244 170 238 202 83 123
-        118 94 66 67 19 148 106 228 116 203 168 73 18 94 153 233
-        253 83 95 144 76 202 76 46 112 163 31 227 87 31 73 116 153
-        210 204 49 204 170 14 1 194 210 111 135 23 11 20 34 8 35
-        145 159 56 201 3 21 104 90 90 27 93 175 36 126 35 176 206
-        242 79 31 74 233 199 7 86 206 60 143 97 118 241 133 77 187
-        118 129 233 239 91 90 53 199 28 125 171 21 155 60 50 225
-        171 238 252 119 170 217 42 53 58 136 187 51 42 250 129 65
-        234 23 94 12 69 100 143 35 221 123 138 60 149 151 229 20 27
-        169 71 219 252 62 223 90 1 35 215 115 43 40 113 32 251 55
-        124 84 47 171 100 186 49 179 184 154 201 65 231 124 91 149
-        170 85 173 98 202 233 252 103 42 224 121 152 199 145 223
-        251 170 186 248 147 214 183 90 125 177 91 107 171 105 7 250
-        223 246 53 138 68 162 190 47 107 186 95 138 214 49 248 190
-        48 28 73 25 198 223 211 181 87 209 0 214 161 139 51 100 247
-        110 244 87 94 106 67 88 234 55 186 240 194 31 92 113 154 14
-        73 213 85 87 233 82 4 244 244 124 133 130 190 211 235 68 52
-        89 229 73 52 2 183 155 121 163 109 174 50 160 131 233 88 17
-        102 171 131 149 35 233 75 163 27 110 179 76 238 20 96 210
-        213 254 179 85 198 149 14 54 149 179 26 231 142 61 41 102
-        163 41 252 21 194 142 194 39 166 50 168 48 131 244 165 151
-        202 63 5 63 251 167 162 251 17 183 102 122 48 63 179 160
-        224 254 233 43 126 71 137 143 90 203 72 79 252 174 220 129
-        222 36 197 18 45 198 75 17 81 101 227 217 227 251 146 61 77
-        15 111 122 246 87 65 149 118 227 187 30 213 235 171 133 141
-        128 57 237 90 226 219 121 34 110 71 40 7 56 28 154 186 143
-        40 137 47 99 167 126 4 117 157 174 161 167 172 63 153 44
-        136 120 24 171 231 78 212 65 81 225 218 249 118 231 115 28
-        0 107 144 190 28 89 173 188 130 77 54 89 34 32 231 105 56
-        39 237 138 178 180 238 161 234 84 87 102 17 76 136 48 6 9
-        199 215 154 14 60 65 197 51 163 45 102 103 1 100 216 170
-        121 5 78 69 99 169 220 54 192 163 201 236 199 214 170 77 11
-        171 245 39 17 71 112 168 23 28 248 35 183 223 62 181 53 209
-        175 226 185 45 33 153 131 255 0 44 188 98 164 251 19 36 117
-        72 147 192 159 42 72 164 38 120 62 244 112 27 80 5 35 111
-        160 165 118 19 120 142 1 96 223 202 1 230 152 44 168 80 110
-        202 243 142 105 211 64 173 30 154 21 153 25 100 25 82 48 69
-        84 255 0 18 122 82 19 35 155 101 32 179 100 10 183 3 46 56
-        96 104 109 66 202 27 200 240 200 140 222 153 173 40 218 27
-        28 169 232 228 91 238 152 186 91 147 43 63 135 20 71 60 142
-        255 0 74 125 211 93 69 117 98 88 93 200 22 221 92 4 207 160
-        171 91 173 250 76 108 150 72 227 80 51 187 143 106 165 250
-        146 41 68 141 111 29 187 8 213 253 185 205 113 188 124 37
-        103 124 36 178 42 147 44 121 46 108 53 205 177 220 69 249
-        108 155 65 247 250 212 119 170 190 23 217 155 104 37 134
-        225 10 63 203 143 240 164 218 37 252 214 58 188 112 204 228
-        64 202 48 79 189 89 90 93 253 188 177 237 89 214 103 253
-        214 210 123 15 113 245 170 71 43 229 103 52 177 46 52 138
-        27 93 248 99 116 151 210 44 86 251 160 69 196 44 163 211
-        220 84 30 247 64 107 107 182 140 171 56 31 46 7 173 118 133
-        237 180 90 149 144 93 194 54 141 118 57 42 57 250 138 137
-        106 125 33 167 197 120 100 88 86 104 216 96 101 107 174 50
-        199 37 105 28 235 179 155 116 14 140 186 212 193 240 55 51
-        49 206 208 188 226 167 125 55 240 195 54 203 45 210 186 72
-        143 198 70 55 15 122 186 52 46 153 179 177 138 55 182 217
-        20 217 228 99 140 83 173 90 104 225 84 141 97 141 86 49 134
-        36 96 181 53 165 234 138 37 201 144 171 110 135 210 116 79
-        10 226 121 20 205 225 229 4 124 130 107 238 173 212 150 246
-        54 203 105 24 72 156 55 151 216 241 254 53 171 169 181 136
-        109 237 36 219 112 30 68 114 145 166 114 77 87 147 73 121
-        168 91 139 182 87 46 210 121 71 176 174 73 101 116 209 214
-        176 213 51 45 96 106 26 245 227 195 122 216 99 204 45 232 5
-        54 233 30 147 152 202 177 205 147 199 3 20 227 163 244 134
-        213 30 40 228 140 164 138 70 25 187 26 185 250 111 167 99
-        183 132 60 209 70 37 3 154 92 80 79 108 76 217 56 233 25
-        116 63 79 219 217 233 161 221 79 138 125 79 165 74 23 229
-        25 227 28 115 88 194 137 12 33 19 140 119 175 179 58 38 55
-        56 31 90 233 163 142 105 182 99 58 163 46 230 96 160 118
-        165 215 146 52 67 197 102 150 48 222 168 51 69 207 44 126
-        25 60 176 250 14 212 174 246 96 84 171 178 178 5 200 32 240
-        69 103 163 40 114 26 137 15 135 230 81 199 203 187 179 80
-        83 95 73 202 136 33 56 255 0 91 154 134 235 29 68 108 99 48
-        219 9 166 0 124 199 24 63 110 106 11 172 117 110 189 53 203
-        197 225 196 233 140 169 112 114 181 135 88 210 44 46 168
-        215 33 143 79 157 228 73 85 84 16 222 249 250 87 37 124 96
-        235 11 91 205 78 75 11 75 153 21 131 19 137 70 56 171 39 86
-        212 53 237 70 57 32 188 185 82 161 14 28 13 187 87 254 188
-        213 69 213 58 29 188 241 201 42 67 113 123 118 92 225 136 0
-        99 251 107 112 79 232 106 136 45 172 37 228 105 14 112 123
-        31 122 33 161 221 231 60 55 108 125 40 217 99 104 81 97 112
-        145 183 177 239 65 22 96 73 244 237 74 218 163 27 60 53 9
-        206 43 43 104 195 112 57 172 21 183 33 251 215 212 98 157
-        142 13 32 12 175 65 7 145 74 155 137 197 57 148 111 83 187
-        154 73 38 127 24 71 165 60 69 147 25 187 226 49 142 120 165
-        247 103 117 189 217 247 183 113 250 209 172 165 163 31 106
-        22 244 40 211 231 199 205 225 62 105 133 25 233 30 109 42
-        213 113 140 198 159 225 154 57 216 44 44 48 59 119 160 52
-        103 85 211 44 148 142 76 8 127 93 180 85 196 171 225 242 42
-        71 74 116 70 181 2 242 94 14 113 199 97 247 169 87 65 219
-        36 215 177 195 40 220 8 228 47 113 253 180 141 109 252 107
-        213 37 60 184 239 237 83 174 143 211 149 39 87 0 110 35 200
-        195 131 138 180 102 170 137 190 236 187 58 103 166 236 35
-        48 52 114 32 24 221 133 249 170 91 107 165 194 210 5 148 4
-        24 192 56 168 247 77 204 176 89 68 222 55 138 83 229 76 14
-        126 149 52 209 238 55 145 226 76 129 217 126 87 3 129 90 82
-        85 70 74 194 44 116 24 227 153 78 119 103 182 208 48 71 214
-        155 92 104 236 214 174 17 76 111 252 203 220 211 109 38 72
-        100 140 6 240 164 218 118 249 123 230 152 203 11 109 9 28
-        140 152 244 32 100 84 69 110 136 158 149 251 66 218 111 194
-        218 184 47 158 78 114 5 72 45 159 86 128 156 172 114 40 93
-        204 199 57 253 41 93 196 81 199 127 137 15 131 38 120 34
-        155 219 106 64 58 195 28 121 80 57 111 115 72 60 23 137 178
-        29 74 89 38 86 154 45 171 252 195 176 251 209 173 121 8 5
-        150 64 9 249 72 245 173 55 48 174 4 182 234 178 49 30 104
-        207 111 191 222 180 189 188 19 219 238 145 124 39 95 238
-        166 78 76 87 75 160 203 219 113 121 98 20 190 254 57 35 214
-        161 183 93 11 13 220 146 220 54 84 224 236 80 7 38 165 58
-        35 53 189 185 93 199 104 244 166 73 134 1 135 108 230 179
-        175 160 230 215 69 41 170 244 5 221 179 37 204 176 248 171
-        17 59 84 14 231 235 81 248 244 109 67 78 159 196 11 34 144
-        251 184 245 174 141 101 220 140 49 201 239 154 73 168 104
-        208 238 105 240 173 207 153 113 72 240 193 236 172 103 162
-        162 147 168 46 237 252 56 132 78 217 143 156 131 205 101
-        107 212 23 37 89 165 134 70 77 222 78 15 53 53 189 211 108
-        154 225 166 107 120 194 42 144 191 65 65 219 221 104 214 54
-        107 248 235 88 252 36 82 219 206 125 234 111 148 53 101 249
-        127 194 40 122 138 227 204 86 41 3 231 142 15 106 211 125
-        123 169 234 176 162 109 146 54 3 146 163 189 74 236 166 211
-        53 75 176 109 97 70 129 135 151 138 145 105 90 109 177 111
-        195 248 9 145 242 253 41 146 151 105 153 78 190 21 78 149
-        210 55 151 72 200 33 98 31 141 199 146 15 189 75 116 79 135
-        114 8 209 111 35 196 123 118 140 119 31 90 179 52 205 54 27
-        24 246 140 125 168 227 207 113 84 73 62 200 203 249 18 122
-        100 95 167 186 102 29 46 97 225 64 133 23 213 187 231 222
-        164 83 203 28 108 25 164 31 111 122 251 43 108 224 71 147
-        239 154 80 109 218 109 77 228 152 17 30 121 25 239 77 72
-        156 83 126 193 247 23 107 26 144 60 205 232 40 24 111 174
-        166 111 14 8 145 142 78 75 103 138 222 87 50 5 130 208 2 59
-        190 79 21 153 11 103 110 207 18 6 62 173 236 105 28 218 10
-        236 85 123 38 178 45 252 88 165 81 144 67 32 30 148 134 222
-        198 235 80 184 114 210 22 10 249 108 30 62 195 233 79 46 46
-        86 123 98 100 102 137 7 30 94 228 214 26 28 69 220 52 56 95
-        109 180 109 181 108 51 175 245 23 221 104 208 203 25 13 31
-        229 129 194 251 210 27 221 6 56 84 182 239 46 120 12 163 2
-        172 115 20 110 160 110 19 183 169 110 21 62 216 168 230 179
-        52 101 156 43 64 138 157 234 170 104 69 127 74 251 80 209
-        225 184 180 144 51 194 168 14 15 166 106 191 234 221 39 75
-        179 211 165 184 146 21 154 112 126 84 98 23 245 171 39 87
-        185 202 186 49 71 82 114 25 71 106 174 122 230 37 156 40 50
-        77 55 180 64 0 15 246 86 228 53 20 87 81 74 130 251 153 35
-        67 39 101 143 36 99 238 104 9 50 234 54 142 213 35 235 13
-        19 195 45 36 96 65 27 252 170 57 231 245 168 229 186 201 20
-        4 73 195 103 24 247 20 128 122 116 122 47 148 253 235 9 178
-        172 72 247 172 226 32 3 159 122 215 63 53 128 213 133 195
-        34 136 200 60 253 233 61 209 254 151 156 12 102 155 69 26
-        176 198 222 244 166 249 130 92 5 250 211 196 70 168 105 11
-        47 131 230 224 80 87 255 0 212 238 63 221 191 248 86 208
-        219 160 3 210 133 190 99 248 41 249 255 0 210 122 167 17 92
-        141 118 127 137 253 159 1 207 30 18 86 196 51 186 156 182
-        87 212 211 13 50 12 216 64 27 31 186 76 140 246 162 217 225
-        136 120 123 80 41 224 115 206 106 40 232 98 43 123 241 111
-        55 242 128 113 147 235 86 7 70 235 76 246 230 31 197 68 140
-        195 200 164 237 96 62 135 214 163 182 90 28 218 158 99 130
-        221 164 59 178 0 198 15 235 239 83 110 151 232 9 102 141 45
-        238 237 102 138 39 28 156 252 191 98 41 210 160 39 68 255 0
-        165 250 138 212 58 193 170 73 178 233 134 228 73 134 1 30
-        245 97 104 186 198 154 206 169 103 118 214 236 71 158 25
-        198 232 228 63 70 244 168 62 133 208 169 21 164 118 179 70
-        211 148 27 99 71 200 199 234 65 53 34 178 233 77 74 194 47
-        232 114 58 143 68 151 133 31 99 89 171 11 157 178 203 176
-        99 185 30 56 210 54 198 74 171 102 50 61 193 247 166 203
-        120 56 63 32 61 188 78 23 244 53 94 105 26 213 214 151 34
-        65 172 88 220 66 190 147 198 165 215 63 92 122 84 202 206
-        234 75 168 188 68 219 34 158 79 151 1 190 191 74 70 19 118
-        187 11 222 67 44 177 177 18 6 220 184 239 75 186 90 250 71
-        102 183 153 124 225 176 64 244 250 211 153 97 142 226 50
-        193 164 82 7 96 188 138 91 106 39 134 247 250 138 202 231
-        141 231 130 71 181 35 84 131 21 240 154 167 49 34 238 13
-        199 24 160 103 45 29 214 214 82 84 247 241 56 81 69 217 110
-        49 40 48 52 89 28 140 19 254 21 246 250 214 73 151 104 141
-        217 125 8 28 212 219 108 77 38 107 71 120 216 109 66 69 16
-        38 82 128 134 28 156 80 86 73 58 66 99 117 124 158 57 70
-        255 0 181 100 201 60 78 89 81 153 49 200 8 114 63 186 130
-        116 48 99 44 138 63 45 178 123 226 132 186 185 120 226 220
-        97 102 63 196 69 97 52 178 170 171 68 178 242 57 204 109
-        255 0 106 85 169 92 92 179 21 69 112 185 231 32 138 22 195
-        24 41 50 63 213 151 154 140 182 87 118 246 208 73 27 225
-        138 101 126 149 203 122 183 93 117 30 165 38 161 167 94 204
-        208 248 19 164 109 30 48 78 61 8 174 179 185 188 189 92 25
-        97 105 87 248 252 157 197 85 223 17 250 3 72 234 125 66 13
-        98 214 217 180 157 71 112 23 37 99 32 78 61 73 24 239 79 39
-        25 157 120 230 177 233 171 1 248 55 105 213 17 233 144 222
-        220 248 50 217 52 132 194 7 204 23 255 0 154 187 244 141 66
-        229 131 52 208 177 193 218 131 28 154 143 104 115 197 97
-        103 13 142 159 96 237 28 40 168 143 225 156 240 63 252 52
-        217 46 47 152 134 48 50 182 253 196 178 145 71 81 68 114 91
-        118 137 97 184 157 190 85 49 159 102 172 252 67 180 110 96
-        88 154 77 109 119 50 219 170 24 228 45 252 71 109 24 101
-        102 64 162 57 11 247 225 73 197 73 79 147 209 37 141 160
-        167 186 40 14 197 220 115 130 7 165 7 113 54 223 48 243 159
-        85 126 194 182 71 11 42 110 109 229 255 0 216 108 127 133
-        105 72 101 150 243 196 145 88 133 236 2 54 15 247 83 59 176
-        85 5 105 241 55 134 93 243 188 118 52 46 171 34 67 3 185
-        145 93 199 101 3 36 83 68 142 84 92 172 100 125 233 38 189
-        36 203 4 135 240 108 231 30 163 138 165 94 128 145 12 135
-        241 90 158 160 99 86 111 12 54 91 105 201 21 39 134 85 183
-        137 98 82 177 198 6 60 79 251 82 189 46 217 152 134 104 12
-        1 142 78 208 114 104 235 213 217 228 142 57 60 188 6 101
-        237 246 166 173 81 154 62 94 77 44 150 225 83 42 23 213 199
-        155 244 21 29 213 174 34 181 133 247 220 69 1 3 45 52 190
-        103 31 65 255 0 106 47 91 215 45 44 81 252 95 21 220 29 171
-        26 33 44 199 219 21 16 190 126 161 214 8 240 109 13 165 190
-        237 202 146 99 113 250 241 154 41 1 161 62 179 175 104 240
-        69 36 239 49 42 23 205 52 173 134 99 238 61 170 187 215 53
-        233 37 34 230 214 241 150 215 186 60 131 195 76 125 9 239
-        86 14 163 209 114 73 40 146 238 54 109 195 45 189 72 254
-        193 138 135 117 47 195 150 190 148 93 78 178 76 35 253 216
-        201 217 143 246 79 21 130 138 135 172 58 169 217 198 39 142
-        64 252 43 3 197 34 211 238 191 16 134 70 238 220 131 232 69
-        75 117 206 133 188 138 228 205 37 140 174 15 206 242 112
-        168 61 197 71 36 129 44 93 193 85 69 221 181 85 152 3 143
-        240 166 143 96 146 189 131 187 237 63 74 196 29 195 53 186
-        102 73 6 236 167 232 192 255 0 133 106 85 227 140 99 239 79
-        45 128 38 30 212 162 251 139 174 120 230 156 64 8 250 15
-        189 1 168 70 11 124 188 147 223 35 20 189 9 35 116 37 90
-        223 5 128 29 243 65 234 18 255 0 67 184 255 0 116 244 90 41
-        16 1 142 195 222 151 106 24 252 61 194 110 27 188 54 227 61
-        179 78 165 162 110 34 139 47 220 55 251 165 160 238 251 175
-        251 85 234 245 73 118 116 190 131 109 63 174 219 83 53 253
-        234 126 181 234 245 80 80 139 143 222 15 189 122 95 221 143
-        189 122 189 88 198 235 207 234 95 253 163 252 107 86 155
-        251 179 246 175 87 169 31 209 144 77 191 121 255 0 217 173
-        49 127 90 95 246 133 122 189 74 198 143 99 214 236 104 22
-        253 243 125 235 213 234 148 69 126 198 211 251 197 175 79
-        251 179 94 175 80 8 60 191 187 95 181 100 191 184 74 245
-        122 153 244 62 46 204 26 180 183 239 79 218 189 94 166 47
-        30 205 144 126 248 81 147 250 215 171 213 136 100 236 244
-        63 45 125 184 253 239 255 0 109 122 189 80 143 177 51 91
-        252 181 157 167 205 94 175 85 95 208 154 161 175 147 126
-        234 111 246 63 235 94 175 83 46 204 129 173 191 131 237 91
-        117 15 221 138 245 122 156 192 58 215 249 246 111 247 149
-        242 127 221 39 251 85 234 245 17 88 116 223 212 135 218 148
-        220 254 224 87 171 212 16 77 109 253 105 105 76 159 214 222
-        189 94 162 140 205 87 255 0 50 255 0 179 88 71 242 10 245
-        122 156 64 133 253 217 161 174 254 85 255 0 106 189 94 165
-        125 139 35 47 253 58 105 99 253 68 255 0 186 175 87 168 174
-        133 63 255 217 13 10 45 45 45 45 45 45 87 101 98 75 105 116
-        70 111 114 109 66 111 117 110 100 97 114 121 74 57 98 119
-        65 87 115 51 121 110 112 113 115 72 53 75 13 10 67 111 110
-        116 101 110 116 45 68 105 115 112 111 115 105 116 105 111
-        110 58 32 102 111 114 109 45 100 97 116 97 59 32 110 97 109
-        101 61 34 102 105 108 101 50 34 59 32 102 105 108 101 110
-        97 109 101 61 34 116 101 115 116 46 116 120 116 34 13 10 67
-        111 110 116 101 110 116 45 84 121 112 101 58 32 116 101 120
-        116 47 112 108 97 105 110 13 10 13 10 116 101 115 116 10 13
-        10 45 45 45 45 45 45 87 101 98 75 105 116 70 111 114 109 66
-        111 117 110 100 97 114 121 74 57 98 119 65 87 115 51 121
-        110 112 113 115 72 53 75 13 10 67 111 110 116 101 110 116
-        45 68 105 115 112 111 115 105 116 105 111 110 58 32 102 111
-        114 109 45 100 97 116 97 59 32 110 97 109 101 61 34 102 105
-        108 101 51 34 59 32 102 105 108 101 110 97 109 101 61 34 34
-        13 10 13 10 13 10 45 45 45 45 45 45 87 101 98 75 105 116 70
-        111 114 109 66 111 117 110 100 97 114 121 74 57 98 119 65
-        87 115 51 121 110 112 113 115 72 53 75 45 45 13 10
-    } ;
-
-: dog-test-empty-bytes-firefox ( -- bytes )
-    B{
-        45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45
-        45 45 45 45 45 45 45 45 45 49 49 51 55 53 50 50 53 48 51 49
-        52 52 49 50 56 50 51 50 55 49 54 53 51 49 55 50 57 13 10 67
-        111 110 116 101 110 116 45 68 105 115 112 111 115 105 116
-        105 111 110 58 32 102 111 114 109 45 100 97 116 97 59 32
-        110 97 109 101 61 34 102 105 108 101 49 34 59 32 102 105
-        108 101 110 97 109 101 61 34 100 111 103 46 106 112 103 34
-        13 10 67 111 110 116 101 110 116 45 84 121 112 101 58 32
-        105 109 97 103 101 47 106 112 101 103 13 10 13 10 255 216
-        255 224 0 16 74 70 73 70 0 1 1 0 0 1 0 1 0 0 255 219 0 67 0
-        5 3 4 4 4 3 5 4 4 4 5 5 5 6 7 12 8 7 7 7 7 15 11 11 9 12 17
-        15 18 18 17 15 17 17 19 22 28 23 19 20 26 21 17 17 24 33 24
-        26 29 29 31 31 31 19 23 34 36 34 30 36 28 30 31 30 255 219
-        0 67 1 5 5 5 7 6 7 14 8 8 14 30 20 17 20 30 30 30 30 30 30
-        30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
-        30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
-        30 30 30 30 255 192 0 17 8 1 49 1 64 3 1 34 0 2 17 1 3 17 1
-        255 196 0 29 0 0 2 2 3 1 1 1 0 0 0 0 0 0 0 0 0 4 5 6 7 2 3
-        8 0 1 9 255 196 0 74 16 0 2 1 3 3 2 4 4 3 4 5 10 5 3 5 1 1
-        2 3 0 4 17 5 18 33 6 49 19 34 65 81 7 50 97 113 20 35 129
-        21 51 66 82 36 52 145 161 177 8 53 83 98 114 115 147 178
-        193 209 22 37 67 116 241 99 130 240 23 68 84 100 146 225
-        255 196 0 25 1 0 3 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 2 3 0 4 5
-        255 196 0 39 17 0 2 2 2 2 3 0 2 1 5 1 0 0 0 0 0 0 1 2 17 3
-        33 18 49 34 50 65 19 81 4 5 20 35 66 97 82 255 218 0 12 3 1
-        0 2 17 3 17 0 63 0 228 200 149 136 219 131 200 207 233 68
-        196 145 112 60 21 45 234 91 181 57 177 178 138 75 56 95 111
-        152 196 51 250 209 11 167 198 14 118 138 22 138 153 104 150
-        118 82 46 217 45 161 98 79 242 102 157 38 151 98 174 64 211
-        237 72 247 49 46 104 11 8 140 111 229 247 166 194 70 137 12
-        146 112 61 235 57 36 172 31 82 7 154 199 78 244 176 178 255
-        0 132 41 100 195 76 15 183 240 118 60 31 244 85 237 126 241
-        237 237 157 213 176 113 197 66 158 254 234 82 74 49 45 187
-        144 42 49 155 158 217 108 152 99 21 68 214 88 116 217 83 17
-        218 218 171 250 109 138 180 254 6 221 83 205 109 1 199 115
-        225 10 141 90 106 23 106 187 95 59 73 239 237 77 44 111 89
-        79 136 24 186 250 131 235 86 199 166 71 143 20 52 181 211
-        237 24 143 232 150 236 61 140 66 155 65 167 233 251 64 252
-        5 158 127 221 45 3 99 42 220 42 186 240 79 247 83 139 38 86
-        92 21 57 20 76 246 140 78 155 98 88 31 217 246 125 191 209
-        45 108 253 159 97 255 0 240 44 255 0 225 45 22 216 200 199
-        181 99 88 74 98 77 99 78 178 69 111 14 194 213 23 28 226 48
-        15 246 212 30 242 21 252 105 8 145 170 103 178 213 137 172
-        121 162 127 181 87 151 141 182 247 31 235 210 180 216 209
-        28 88 217 219 120 99 250 52 100 255 0 172 155 168 248 108
-        109 11 103 240 208 127 194 173 118 82 71 225 47 148 246 163
-        11 169 30 74 81 140 102 182 178 35 203 97 104 62 162 46 104
-        41 45 109 119 127 86 131 254 21 48 144 225 9 198 104 105
-        198 24 118 53 76 77 81 141 73 105 109 143 234 176 127 193
-        21 146 89 219 110 63 209 97 255 0 131 69 65 183 110 15 39
-        218 182 144 160 159 41 6 169 102 5 22 54 138 114 109 45 216
-        123 24 184 53 177 45 44 137 231 79 179 237 254 138 179 118
-        101 112 167 159 181 102 131 140 212 35 236 99 95 224 172
-        119 143 252 190 207 254 21 18 186 125 129 92 254 2 207 254
-        16 172 15 148 230 182 71 46 225 198 106 178 78 204 40 213
-        237 109 83 33 45 224 237 223 195 199 247 214 189 30 222 222
-        69 45 37 165 187 156 227 12 161 177 245 230 143 214 212 8
-        75 123 138 15 69 96 7 220 214 159 169 135 31 129 177 192
-        198 159 102 120 255 0 68 181 240 216 217 12 15 217 214 156
-        246 252 165 230 137 139 205 235 128 7 204 123 80 183 154
-        148 118 202 66 225 156 118 62 148 169 174 38 91 55 193 167
-        233 191 60 214 22 96 14 249 137 107 84 199 69 137 246 174
-        157 100 255 0 65 18 210 43 237 82 105 148 188 108 64 254 31
-        102 164 243 223 204 146 249 155 39 233 73 38 50 84 137 156
-        112 233 19 200 4 118 54 201 238 22 33 68 54 153 166 52 96
-        173 149 163 15 115 16 205 66 244 189 77 141 226 40 115 143
-        90 155 91 73 192 116 245 29 141 77 233 140 177 169 46 64
-        109 167 88 45 203 31 217 246 92 127 244 171 19 97 99 226 16
-        218 125 152 227 63 186 20 100 204 56 247 245 175 66 84 145
-        191 147 235 246 174 140 125 18 180 125 183 211 108 72 7 246
-        125 158 63 221 45 109 151 77 177 219 254 111 179 255 0 132
-        180 68 76 163 133 206 51 197 103 43 0 184 166 158 144 72
-        133 244 54 113 220 5 91 120 50 59 254 77 7 120 109 188 48
-        22 8 1 207 242 98 152 106 170 191 137 45 239 218 149 93 41
-        97 129 239 73 97 143 96 19 172 103 204 161 23 232 181 164
-        71 152 93 143 173 110 117 101 67 90 142 239 195 55 165 97
-        229 251 37 122 124 138 182 48 118 253 210 81 66 116 250 82
-        123 2 205 103 108 55 30 99 31 221 218 140 134 63 56 221 200
-        169 147 26 90 229 159 56 20 109 242 171 89 16 217 251 80
-        214 190 80 49 197 110 212 63 168 147 234 107 74 62 44 166
-        36 156 209 17 234 235 140 193 26 170 182 230 227 21 40 248
-        113 208 240 234 214 169 53 194 224 63 166 57 168 167 85 55
-        136 34 5 87 126 124 170 123 26 233 15 129 214 42 221 59 108
-        123 112 51 27 14 223 90 142 61 68 233 206 227 249 58 35 7
-        224 252 57 252 133 141 91 25 82 71 24 255 0 189 44 212 254
-        21 222 99 16 171 120 139 234 160 97 171 165 99 81 143 5 145
-        74 142 199 29 171 239 225 99 121 138 149 80 127 133 241 205
-        22 229 96 121 19 84 145 199 250 231 77 106 61 62 210 25 35
-        114 189 212 1 198 43 237 133 210 72 71 24 56 228 125 107
-        167 186 179 163 236 245 93 61 149 35 76 148 42 43 154 186
-        195 167 175 58 123 85 149 9 37 67 103 63 74 117 39 123 37
-        151 26 110 226 20 14 64 53 246 132 211 174 22 234 21 216
-        217 111 83 69 22 80 72 197 89 245 103 61 238 128 117 60 155
-        121 15 174 218 174 239 8 23 141 158 251 170 192 213 36 219
-        11 175 169 28 85 123 169 237 93 64 240 57 52 99 32 142 45
-        89 191 15 229 231 154 46 201 155 60 214 141 48 43 69 141
-        163 24 162 109 227 61 199 21 57 118 96 244 57 92 227 52 43
-        198 219 143 126 244 68 18 3 88 202 172 141 134 108 147 205
-        8 107 64 62 65 223 145 131 239 91 25 188 199 39 38 181 163
-        99 191 122 250 112 199 118 59 213 83 160 114 54 59 46 211
-        239 89 39 203 90 93 89 88 115 197 110 64 74 113 83 138 169
-        5 59 62 183 35 214 189 16 193 197 124 109 202 123 154 251
-        19 13 199 35 38 170 242 69 62 194 105 214 255 0 171 138 85
-        166 169 82 204 164 237 60 103 235 77 181 129 226 66 184 98
-        163 220 82 155 73 24 202 45 34 81 201 239 75 44 138 141 7
-        114 72 110 146 203 36 73 12 42 207 150 193 197 73 52 191
-        135 215 186 168 241 220 180 113 177 206 49 200 90 153 124
-        40 248 122 110 151 241 183 65 66 12 48 207 191 189 94 54
-        186 61 165 156 94 28 123 10 149 10 78 59 138 231 109 252 58
-        163 8 163 159 236 254 19 73 53 176 86 80 176 175 171 1 197
-        107 185 248 77 101 105 103 51 204 187 36 199 24 25 39 255 0
-        249 93 18 176 195 18 157 177 168 30 212 191 85 132 201 109
-        39 134 138 204 227 110 8 160 175 232 210 227 196 226 14 170
-        210 27 66 215 60 46 54 110 5 72 31 227 82 141 57 214 72 145
-        137 198 64 237 70 127 148 13 146 219 107 208 145 150 5 240
-        91 211 245 165 58 75 237 130 48 72 36 47 117 237 71 39 113
-        4 23 248 216 202 224 96 100 114 107 24 148 183 126 62 213
-        182 101 57 231 145 89 70 6 7 2 174 221 35 133 71 102 248 84
-        40 245 172 110 57 38 182 175 3 140 86 19 1 142 194 145 182
-        199 34 250 129 197 226 100 241 154 211 52 121 77 194 182
-        234 67 117 238 223 236 162 150 17 248 81 218 138 116 52 72
-        228 225 183 246 21 241 148 126 30 79 76 46 234 62 234 16 27
-        181 7 34 55 135 55 63 250 116 232 210 118 168 117 167 172
-        127 132 183 220 224 15 13 127 187 189 16 10 135 194 144 69
-        43 176 144 155 88 23 212 71 70 32 110 251 129 165 170 25 99
-        99 139 78 127 182 179 213 220 199 167 141 190 86 35 191 189
-        42 241 228 132 174 50 65 246 162 53 9 89 172 227 221 158
-        212 178 151 139 54 61 100 68 118 241 86 227 89 182 132 121
-        247 72 1 2 186 187 225 157 184 131 70 182 143 28 162 128
-        203 234 167 235 92 181 211 246 87 23 221 92 145 198 173 133
-        144 121 192 249 107 170 250 103 242 236 35 241 147 194 157
-        84 6 99 252 85 36 169 34 249 98 229 34 100 89 89 139 43 6
-        97 192 35 211 233 95 94 86 17 2 199 56 238 105 119 226 188
-        171 223 183 39 222 190 27 172 16 95 113 79 95 173 16 199 30
-        134 246 242 11 133 60 242 59 212 75 226 103 77 91 235 58
-        101 204 138 159 154 145 147 145 235 78 97 152 171 248 145
-        200 10 31 65 222 138 155 100 200 21 178 222 167 29 171 5 87
-        211 144 110 214 109 31 80 240 36 111 32 39 57 244 57 237 77
-        224 152 92 69 226 174 49 142 126 149 105 124 86 232 27 125
-        70 22 187 178 132 9 2 229 177 247 53 76 66 38 209 181 65
-        109 48 111 8 156 18 123 81 229 20 170 201 101 196 253 163
-        208 94 161 14 251 105 27 217 106 189 213 20 11 226 125 51
-        138 177 181 70 205 153 104 249 87 28 85 117 117 253 117 247
-        251 241 84 87 240 231 26 233 108 192 5 3 131 77 145 78 243
-        74 180 213 193 7 138 115 18 229 137 172 227 33 27 48 183 64
-        24 26 202 126 13 108 140 169 242 142 9 236 79 106 26 92 150
-        228 250 209 140 93 140 124 254 48 107 34 195 39 154 215 255
-        0 231 122 247 191 253 234 188 65 196 223 27 151 24 144 101
-        253 40 152 179 130 49 233 90 109 85 29 124 217 163 226 218
-        19 28 98 163 123 176 165 64 46 219 13 122 22 223 39 28 147
-        216 86 219 133 4 19 90 1 240 161 50 28 131 252 52 91 131
-        219 55 144 62 189 56 91 68 133 88 110 245 30 213 37 248 49
-        210 178 106 58 188 51 73 144 138 119 19 233 140 208 189 61
-        210 211 245 12 232 193 79 204 57 32 226 186 51 161 250 90
-        195 65 211 161 138 8 255 0 51 104 46 125 106 115 146 78 145
-        124 17 113 143 146 37 26 85 188 122 109 132 113 68 184 96
-        49 159 165 125 185 185 85 59 90 64 119 124 198 180 205 43 5
-        43 156 31 79 181 10 178 36 44 26 70 222 205 223 30 148 165
-        210 177 139 150 149 10 227 98 142 192 250 214 155 147 253
-        28 199 177 88 122 238 244 250 208 171 52 155 134 88 98 133
-        150 237 164 36 46 112 15 53 129 56 190 145 65 255 0 148 77
-        158 235 69 153 118 182 199 218 54 118 239 154 175 116 73 72
-        181 129 135 204 203 218 174 31 142 22 18 234 26 36 203 2 72
-        21 60 229 64 253 225 207 106 165 244 67 38 194 37 36 178
-        240 51 90 91 175 248 104 234 13 18 169 228 221 230 127 46
-        43 5 151 196 228 214 55 127 186 221 238 43 85 187 100 227
-        158 213 94 71 20 180 232 103 23 43 197 125 145 84 168 201
-        230 176 135 182 43 100 156 40 165 9 22 212 144 45 249 247
-        163 161 254 174 40 93 79 157 67 62 153 166 22 234 166 1 197
-        96 53 98 235 149 12 167 222 147 234 3 242 102 81 220 71 82
-        41 99 12 59 129 74 117 91 114 45 167 117 31 250 103 251 169
-        148 140 129 45 55 44 17 99 253 29 23 12 204 28 6 3 20 20 19
-        127 71 139 159 253 42 223 28 129 136 7 156 154 103 208 255
-        0 153 177 205 170 120 204 3 12 12 240 69 111 213 199 134
-        145 66 163 36 143 90 246 154 141 148 231 143 74 203 89 138
-        67 123 11 6 57 199 21 63 134 139 243 68 211 224 110 159 102
-        218 140 243 189 188 178 60 152 249 192 192 171 213 173 128
-        140 176 141 15 25 193 244 168 39 193 43 63 15 79 19 76 7
-        140 199 206 184 171 30 250 50 146 43 42 228 48 193 168 219
-        163 177 55 200 71 226 254 97 228 140 28 99 210 183 69 117
-        30 226 31 105 30 222 148 46 161 152 75 141 229 148 156 226
-        149 60 140 70 248 137 80 189 241 75 143 34 186 101 158 54
-        201 25 102 241 55 70 35 3 216 118 162 108 39 87 144 66 242
-        108 61 243 239 244 168 180 119 82 49 253 233 136 123 10 206
-        207 82 89 36 88 174 150 38 195 121 37 76 247 250 213 123 36
-        224 214 201 204 169 20 145 60 61 148 240 72 245 170 127 227
-        23 70 172 150 134 226 214 223 107 103 141 130 173 155 70 86
-        183 66 28 179 3 250 26 58 242 194 43 232 66 92 66 187 79
-        189 115 201 108 56 230 163 105 156 115 105 60 208 196 214
-        23 80 148 145 71 5 135 122 132 235 145 201 29 249 42 188 22
-        245 174 164 248 151 240 207 198 70 212 45 21 81 145 142 204
-        10 160 186 163 71 154 222 77 183 49 8 157 84 246 254 35 239
-        93 112 206 180 145 203 60 93 201 116 37 211 39 10 0 126 41
-        220 119 81 1 144 213 22 120 174 35 92 237 226 135 146 250
-        234 33 235 143 65 87 228 217 13 50 87 226 199 254 144 126
-        149 245 166 141 200 243 10 133 46 162 232 115 146 72 172
-        206 175 41 238 191 223 67 147 9 51 12 132 227 114 214 82
-        120 106 56 113 80 209 170 72 88 5 76 31 189 20 215 178 152
-        212 149 201 197 50 102 37 118 211 195 242 150 227 222 140
-        18 71 129 181 137 168 84 119 151 1 73 197 49 180 191 153
-        148 110 200 199 106 231 250 104 246 74 29 148 174 230 227
-        29 177 89 232 58 77 246 183 172 195 20 112 177 141 125 135
-        6 153 244 151 75 234 157 65 36 113 136 241 9 0 230 186 15
-        162 250 19 79 208 225 79 42 25 145 130 183 31 74 76 146 138
-        71 84 49 211 183 209 143 68 244 245 174 149 167 6 252 56 86
-        28 246 169 45 207 130 182 134 66 222 30 61 187 214 251 192
-        182 235 26 15 40 39 210 144 107 247 22 176 249 46 37 36 124
-        193 127 155 233 83 91 118 86 172 214 151 14 236 220 228 103
-        130 222 213 147 204 138 164 48 86 39 185 168 228 218 149
-        196 206 56 17 91 129 133 81 243 17 88 53 227 180 137 28 114
-        56 92 122 247 170 27 241 177 225 187 24 231 251 171 43 85
-        241 50 170 14 15 36 154 87 109 34 151 27 134 121 167 54 108
-        225 129 12 118 251 82 185 168 151 112 226 129 250 130 194
-        222 77 30 118 120 247 237 140 250 122 215 48 107 54 169 103
-        169 201 224 163 129 188 240 195 138 235 187 203 101 109 50
-        82 205 130 227 143 181 115 71 197 11 55 183 214 228 88 219
-        17 239 224 1 244 162 157 171 57 102 252 68 107 48 54 234 27
-        24 175 68 15 114 49 158 213 166 218 19 37 160 207 38 140
-        137 120 10 220 145 86 198 173 108 227 123 9 130 182 203 218
-        181 195 216 240 59 214 215 70 49 131 73 244 196 91 80 99
-        248 197 62 230 152 193 145 111 145 75 245 24 207 226 147
-        159 90 109 103 31 244 97 158 115 84 140 28 140 40 184 185
-        117 148 100 12 118 173 183 172 143 165 92 48 193 34 39 175
-        186 149 168 14 24 142 49 64 220 201 183 78 157 87 129 225
-        61 43 84 232 196 94 55 155 195 207 134 216 61 168 155 89
-        101 241 16 108 61 232 168 236 220 219 161 11 198 208 223
-        219 91 173 172 157 100 86 32 119 166 109 80 30 201 95 79
-        166 228 30 245 150 187 129 127 18 255 0 101 110 209 23 195
-        43 246 175 107 136 5 253 171 30 119 29 181 54 44 125 209
-        127 252 28 119 147 73 72 230 142 40 215 60 31 122 156 223
-        199 182 38 200 192 3 32 212 119 225 21 138 174 131 12 155
-        67 115 220 84 183 91 141 148 97 89 64 199 32 251 84 228 244
-        119 67 216 175 53 163 38 215 30 25 199 112 213 29 69 63 48
-        152 73 159 65 233 83 13 65 48 37 1 124 167 249 170 55 61
-        169 40 20 109 200 254 90 129 218 4 247 78 190 70 24 83 220
-        214 80 238 154 69 16 176 14 14 87 234 104 11 230 104 238 90
-        118 5 84 252 202 125 190 148 126 152 158 21 202 220 69 135
-        4 103 13 217 215 233 250 215 70 55 226 38 88 187 39 154 13
-        208 252 34 163 33 141 193 243 231 212 251 211 251 121 149
-        85 1 97 130 112 191 90 135 90 206 197 188 64 27 45 201 207
-        127 214 134 215 181 195 98 143 189 138 237 77 203 207 99 70
-        147 236 131 99 174 169 234 43 123 77 62 84 37 70 88 247 53
-        203 223 20 122 138 214 234 127 203 100 102 12 71 7 177 230
-        180 252 80 248 131 123 168 93 92 217 90 92 48 143 126 11 3
-        85 179 199 52 132 72 237 36 140 199 144 125 105 163 26 232
-        132 230 210 164 48 75 217 26 50 178 31 175 216 86 192 177
-        179 120 114 70 67 241 199 223 181 123 78 176 141 158 25 60
-        57 29 36 94 123 112 125 170 77 160 116 237 205 192 152 92
-        70 3 69 180 142 14 72 30 149 94 150 201 70 42 93 246 70 127
-        3 111 32 5 156 28 246 30 245 190 13 46 213 184 24 7 252 106
-        204 181 232 39 188 134 25 214 2 158 110 1 167 211 252 45
-        149 128 217 22 112 6 10 158 230 167 249 25 79 192 83 113 90
-        218 43 149 217 141 188 156 214 187 150 139 38 69 97 207 165
-        90 154 223 195 91 168 237 85 150 18 178 103 7 158 226 163
-        250 159 68 74 152 183 104 138 133 245 230 154 51 108 73 97
-        165 178 2 110 35 93 185 140 228 246 250 214 22 218 145 75
-        144 79 49 169 237 237 76 239 180 139 136 30 225 167 183 116
-        136 113 19 250 19 244 164 87 118 130 221 66 140 239 113 150
-        255 0 84 123 26 210 236 17 199 79 146 58 87 225 47 85 90 20
-        133 99 120 217 252 48 184 7 154 188 44 181 72 110 33 115 28
-        138 189 178 107 243 247 73 212 245 13 34 238 43 139 91 150
-        86 86 224 103 130 43 161 190 21 117 252 218 133 187 199 52
-        195 196 199 42 79 57 169 101 130 173 150 89 37 47 133 243
-        123 62 27 184 205 66 250 153 228 158 87 72 219 242 128 203
-        31 230 250 83 11 125 67 241 86 98 67 184 239 92 140 119 20
-        179 85 146 97 108 214 246 225 124 118 236 237 217 7 169 53
-        139 136 77 210 199 8 240 215 106 142 5 122 9 94 225 177 34
-        149 251 208 119 94 29 164 113 164 108 89 229 206 11 127 16
-        254 111 181 21 167 69 35 196 145 178 183 3 230 247 165 148
-        171 163 166 41 164 130 109 86 72 238 147 99 239 32 246 21
-        50 208 67 51 13 202 70 225 138 143 217 91 1 54 246 198 79
-        106 149 105 49 31 46 210 1 250 210 91 125 141 149 166 135
-        114 167 244 87 221 194 162 96 31 173 115 103 199 23 118 190
-        241 36 82 160 55 148 159 90 234 47 194 238 179 39 25 59 121
-        246 174 109 255 0 40 116 120 110 193 194 99 119 97 84 199
-        217 231 101 232 129 88 15 19 77 12 127 74 223 28 124 80 182
-        50 40 176 133 70 70 70 236 125 40 181 124 40 198 106 216
-        211 226 206 89 109 155 34 93 166 136 112 118 10 12 51 23 28
-        26 222 242 16 170 190 227 251 40 168 180 18 63 170 115 121
-        30 61 233 149 159 238 69 44 213 124 179 41 200 224 209 54
-        210 55 130 49 197 27 163 25 220 166 238 105 102 167 24 91 9
-        200 239 225 63 20 222 94 35 207 189 5 169 47 244 9 255 0
-        221 61 43 70 54 233 208 175 236 235 101 33 79 228 35 103
-        244 175 52 113 171 249 177 244 197 37 178 189 151 240 22
-        235 26 231 108 64 22 250 14 212 76 115 74 236 190 76 156
-        214 148 120 148 135 25 116 137 30 154 114 195 142 115 199
-        181 103 212 2 69 22 211 42 134 41 38 15 181 97 165 135 104
-        187 109 230 137 213 70 52 183 247 83 145 247 160 73 170 154
-        103 65 124 33 150 245 186 106 18 99 120 198 121 199 106 156
-        223 50 181 177 103 80 95 24 21 0 248 17 121 29 215 79 197
-        27 206 216 7 154 178 245 45 63 242 188 72 206 83 28 87 61
-        118 206 200 63 34 5 170 47 149 155 113 35 212 123 82 11 169
-        21 163 11 24 218 71 114 106 73 171 90 72 204 237 27 21 199
-        124 122 212 102 246 53 149 138 188 133 0 61 197 37 89 217
-        29 136 53 75 171 111 21 13 192 196 108 112 91 218 137 211
-        97 109 58 34 151 18 135 183 97 186 25 129 206 207 245 126
-        212 171 82 145 33 117 180 155 5 91 129 159 74 81 38 165 119
-        166 23 181 185 13 36 64 111 140 154 120 107 68 242 77 217
-        59 186 215 99 183 178 109 201 135 81 232 121 199 215 235 84
-        183 196 238 182 55 119 18 90 219 202 225 135 145 142 107
-        221 79 213 32 192 235 24 33 241 140 3 233 239 85 212 183 17
-        202 254 44 222 116 39 42 87 230 253 106 177 77 156 83 157
-        61 31 45 237 237 239 1 102 27 100 118 207 29 137 246 21 186
-        210 206 226 234 117 88 99 32 227 102 0 229 79 210 134 131
-        114 220 179 91 169 147 235 31 106 184 62 29 116 188 215 205
-        14 160 145 168 115 141 216 236 79 184 250 85 23 138 217 40
-        183 116 197 93 13 210 179 94 74 18 230 213 114 14 72 92 240
-        106 230 233 14 149 201 182 205 143 49 182 210 72 249 254
-        245 48 233 30 132 176 210 209 47 24 174 233 57 97 252 167
-        218 167 186 85 149 188 100 34 145 133 57 28 122 212 102 220
-        186 58 97 20 182 200 190 129 210 227 194 72 103 183 201 140
-        229 192 28 17 78 83 165 195 162 4 143 96 7 111 126 245 58
-        210 108 148 90 143 40 231 191 214 137 154 200 237 77 168 54
-        171 110 34 137 185 113 123 101 115 115 210 176 184 101 150
-        223 113 81 198 106 35 212 61 46 204 146 44 118 104 3 38 204
-        227 176 247 251 213 241 45 180 101 119 0 9 35 251 41 14 173
-        104 170 73 101 10 153 224 208 119 240 50 148 89 202 157 87
-        210 48 77 60 202 214 110 145 193 229 140 1 199 222 169 174
-        161 208 175 22 242 86 75 117 218 95 31 252 215 114 106 218
-        69 181 227 52 71 111 57 46 113 223 138 169 250 227 225 231
-        131 110 90 216 198 94 224 22 231 209 126 149 162 223 45 154
-        81 168 156 164 246 105 35 152 164 140 41 67 203 122 15 160
-        172 244 205 66 77 47 82 51 89 54 17 78 55 19 203 125 233
-        247 94 105 223 178 174 22 205 16 237 44 124 64 125 90 162
-        182 234 136 155 102 138 70 62 137 31 173 94 124 90 57 84
-        156 54 116 39 195 190 179 134 247 78 137 124 92 52 99 12 24
-        250 84 190 125 74 222 228 22 13 148 35 12 7 241 125 15 210
-        185 131 65 214 164 211 239 247 12 162 231 205 138 181 180
-        30 166 140 66 173 183 114 133 221 180 251 251 212 163 217
-        104 57 61 217 45 187 183 48 52 154 150 161 34 137 37 242 67
-        26 246 81 232 61 233 182 153 49 100 85 229 112 63 90 138 45
-        212 147 203 251 79 82 37 80 183 229 102 164 26 9 252 67 120
-        146 72 85 91 145 72 227 114 59 160 237 18 88 219 116 161
-        128 194 250 98 164 218 66 175 145 152 176 31 74 141 233 144
-        188 234 35 221 177 148 246 247 169 118 137 110 210 97 23
-        142 49 73 246 131 54 146 29 92 206 230 219 109 190 115 183
-        140 251 87 51 255 0 148 20 183 13 170 120 78 170 124 221
-        249 174 164 185 130 27 123 23 50 76 82 69 143 129 239 92
-        167 241 178 239 241 93 84 144 43 29 170 196 55 214 169 141
-        83 103 14 94 136 60 113 50 75 18 174 79 229 246 52 94 226 2
-        231 223 154 250 84 199 50 150 228 142 7 218 177 118 12 221
-        171 162 18 75 71 56 79 139 25 101 81 243 99 244 172 165 198
-        194 27 185 239 143 74 24 174 210 24 112 43 207 32 216 41
-        219 179 8 181 86 62 48 237 222 143 178 93 208 45 3 170 168
-        241 215 143 90 105 166 46 97 24 246 169 72 198 115 174 16
-        41 251 208 58 145 99 167 93 28 124 176 57 31 217 76 167 70
-        35 147 64 234 8 223 179 47 121 255 0 246 207 255 0 45 82 49
-        209 133 58 116 91 236 237 155 215 195 163 214 53 35 105 60
-        208 186 71 245 59 111 247 99 251 232 167 39 120 199 189 115
-        61 187 58 49 244 62 211 27 106 40 244 11 138 206 245 131 90
-        52 110 112 15 124 250 80 182 59 150 60 230 183 93 131 52 5
-        27 128 123 98 175 195 198 206 121 123 23 111 194 141 25 19
-        165 163 146 25 150 25 163 228 146 123 213 139 166 235 6 72
-        132 55 16 182 244 227 196 61 136 170 231 225 154 76 186 12
-        22 208 179 49 99 134 250 138 156 221 168 180 182 82 216 81
-        234 125 123 87 36 175 164 117 198 187 96 58 228 214 203 59
-        186 202 20 145 242 147 193 53 1 215 181 21 183 159 204 200
-        184 60 224 240 43 87 94 245 125 134 157 20 166 73 17 216
-        118 25 230 168 174 178 235 171 237 81 90 222 215 114 199
-        158 72 239 250 86 132 91 208 207 34 142 209 51 235 190 160
-        181 86 120 81 64 43 192 57 245 168 68 189 85 123 61 177 130
-        95 57 67 149 63 78 212 133 26 107 169 12 183 147 177 200
-        245 61 205 1 113 118 200 204 145 224 15 173 118 67 29 171
-        100 178 229 182 25 125 127 150 37 188 197 251 168 238 15
-        189 39 185 59 88 239 96 227 233 90 204 153 36 243 156 250
-        214 80 71 44 242 42 170 239 102 56 81 158 230 153 164 142
-        87 119 100 211 225 206 159 38 163 172 70 24 180 11 24 192
-        157 144 149 39 254 181 215 159 13 186 114 107 91 40 63 18
-        33 155 114 143 204 72 246 156 125 126 149 76 255 0 147 198
-        143 171 90 193 29 212 150 211 92 187 159 201 137 149 118
-        238 29 192 231 57 31 95 210 186 179 67 253 204 19 79 111 28
-        23 17 128 94 51 243 21 255 0 10 231 148 172 183 14 42 205
-        194 198 51 182 56 212 246 239 76 244 141 60 52 109 25 57
-        246 62 245 140 23 182 18 93 21 158 101 66 237 144 163 184
-        167 169 60 62 42 219 197 177 155 211 111 183 189 78 154 232
-        101 145 208 77 140 91 97 53 181 215 56 86 224 19 201 175
-        182 255 0 153 207 99 244 237 88 207 34 169 11 131 222 155
-        95 72 74 219 179 99 70 54 96 118 28 10 87 127 110 100 144
-        112 118 47 115 77 147 204 156 80 119 141 180 129 42 159 15
-        233 220 208 119 240 104 57 39 178 37 117 96 85 213 147 200
-        51 198 125 105 102 187 166 69 54 157 34 149 46 249 193 30
-        255 0 74 152 93 203 101 248 35 47 136 164 33 198 65 165 111
-        61 188 182 243 165 187 70 230 70 249 143 96 43 36 238 217
-        105 100 109 81 202 255 0 26 122 94 231 240 119 19 36 177 69
-        30 60 177 32 36 177 255 0 189 115 30 160 38 130 83 13 194
-        52 108 59 6 24 56 175 208 63 136 208 223 92 105 207 21 134
-        158 207 19 103 243 21 87 43 199 98 73 239 92 75 241 71 69
-        212 236 122 138 225 174 109 229 104 249 35 198 24 32 125 72
-        227 251 234 139 100 114 69 209 22 180 152 162 121 78 1 245
-        167 218 70 173 115 107 34 186 254 98 142 224 122 138 138 6
-        100 227 248 79 106 221 5 228 177 159 47 98 49 85 171 22 46
-        145 97 69 213 51 92 95 197 248 179 182 5 249 99 61 254 245
-        105 116 222 187 111 113 98 30 50 170 84 236 7 61 207 181
-        115 221 153 241 206 226 88 47 185 244 52 108 26 166 163 165
-        220 175 225 238 11 170 182 229 0 240 77 35 196 213 179 170
-        57 18 143 103 91 244 253 212 110 23 116 170 167 102 50 125
-        13 77 116 75 168 109 109 131 33 103 25 229 147 214 185 131
-        161 190 34 36 211 8 175 36 104 229 7 140 227 7 251 234 246
-        233 77 90 222 254 213 26 9 55 2 61 235 145 220 101 208 202
-        74 107 178 77 121 113 115 170 188 145 70 36 181 135 30 99
-        47 241 253 171 159 62 46 90 90 218 245 34 77 104 193 54 183
-        0 213 253 169 91 200 150 203 113 19 96 168 36 227 218 185
-        235 226 187 51 106 194 86 112 70 227 192 239 84 199 53 100
-        178 105 82 35 18 57 99 90 7 239 43 4 155 33 91 156 123 86
-        107 203 110 174 142 36 101 166 19 130 0 200 199 21 237 170
-        121 39 154 248 155 177 230 32 214 71 129 156 142 105 210
-        179 8 245 140 248 163 138 109 163 200 162 223 130 51 138 85
-        173 224 74 87 190 61 69 29 163 254 235 244 161 40 152 57
-        183 51 103 6 131 213 8 93 58 247 60 127 71 127 249 104 238
-        62 180 22 177 183 246 101 239 127 234 239 255 0 45 20 233
-        24 85 167 73 26 216 65 158 254 18 86 70 100 50 129 159 90
-        89 104 199 240 86 236 199 63 150 63 186 178 133 100 146 225
-        112 199 147 197 69 37 101 99 145 116 137 133 143 154 42 223
-        50 31 8 149 228 138 209 167 127 87 0 247 94 9 162 157 136
-        78 14 51 222 171 242 136 228 246 39 127 8 122 155 193 211
-        165 220 219 222 54 192 218 113 254 52 71 92 124 78 134 206
-        23 182 242 187 28 252 196 228 113 244 170 88 223 220 219
-        207 44 80 206 241 239 239 180 227 38 144 234 211 205 121 49
-        73 228 101 63 206 79 45 244 169 180 145 73 78 162 107 234
-        29 90 235 92 212 101 113 39 229 150 254 34 104 102 133 173
-        146 56 230 104 163 6 61 202 249 206 107 11 155 118 183 143
-        115 52 123 72 227 117 42 184 144 147 183 57 35 142 15 24
-        167 142 136 115 114 14 212 175 140 155 18 48 170 23 212 122
-        208 18 51 72 219 155 143 181 124 141 89 188 217 237 82 45
-        15 165 239 239 228 64 35 220 172 50 60 164 211 60 180 168
-        122 182 34 182 181 150 105 22 52 83 150 56 21 119 124 40
-        232 61 22 11 120 117 14 162 91 71 193 223 137 156 141 163
-        244 168 207 76 244 169 183 63 136 212 18 225 18 57 54 168
-        100 219 185 135 63 225 91 58 183 90 125 107 82 255 0 195 61
-        62 206 225 188 133 223 130 120 244 164 82 82 209 69 162 234
-        185 248 149 211 250 36 150 134 27 173 53 90 60 43 62 205
-        196 168 237 185 135 124 122 30 226 143 31 29 52 104 209 202
-        95 254 32 5 27 100 36 236 45 159 148 10 175 236 62 14 116
-        119 78 233 49 106 29 125 173 188 6 78 209 228 140 254 148
-        143 173 126 25 244 255 0 254 31 184 234 111 135 186 191 237
-        75 11 33 253 58 212 252 240 131 193 111 211 138 203 18 248
-        105 41 203 127 11 55 77 248 167 13 230 169 52 150 247 62 32
-        50 141 165 57 219 192 206 71 176 171 175 165 122 166 5 180
-        105 218 238 57 174 14 11 190 120 198 63 135 233 92 19 209
-        178 53 191 80 219 134 145 158 37 96 36 8 112 28 122 30 61
-        49 87 123 245 75 105 182 99 207 52 183 69 118 195 26 0 16
-        169 237 74 213 104 10 171 71 82 105 125 92 178 27 168 173
-        231 133 252 12 41 37 143 45 235 68 75 172 79 115 181 162 5
-        128 229 177 233 84 103 195 200 167 142 199 241 23 49 151
-        121 21 93 163 36 242 199 230 63 165 90 218 115 72 203 28
-        109 148 86 95 48 30 130 163 46 131 68 134 62 164 146 22 88
-        78 21 152 231 46 120 197 44 126 179 134 226 226 72 124 104
-        153 146 79 13 129 39 0 251 253 170 55 212 64 44 102 54 86
-        40 36 33 28 158 7 21 76 245 62 169 115 211 218 200 159 30
-        37 165 208 49 206 224 240 62 181 88 250 152 177 62 34 245
-        140 58 102 239 2 121 12 14 222 120 80 249 147 237 244 168
-        54 141 241 163 78 211 141 197 165 197 196 110 210 203 184
-        16 199 40 158 223 78 113 222 160 191 17 53 127 196 104 134
-        75 123 167 145 74 17 20 217 230 63 175 255 0 62 245 82 116
-        190 137 169 117 70 175 107 165 233 240 120 183 183 79 225
-        199 158 199 156 150 111 160 28 213 97 20 214 197 201 168
-        218 58 99 87 248 221 161 73 107 36 48 234 16 164 172 70 232
-        230 77 202 62 162 133 213 239 186 63 173 172 13 173 252 186
-        108 175 26 9 160 13 46 213 115 245 3 147 81 85 248 123 240
-        135 79 184 58 54 177 212 210 207 171 96 36 146 110 10 187
-        253 64 250 103 181 70 126 35 124 48 190 232 99 6 191 161
-        221 181 213 145 243 70 249 7 2 179 138 55 41 69 121 116 68
-        62 34 244 106 232 154 139 73 100 209 61 179 246 17 146 66
-        253 179 80 146 152 39 131 199 28 213 195 105 171 105 157 87
-        161 143 26 59 165 188 183 127 13 178 23 185 254 44 14 194
-        162 250 143 68 106 158 61 204 107 110 234 144 30 119 14 228
-        250 214 186 216 120 166 66 226 186 146 33 181 64 42 79 57
-        166 150 183 81 221 67 28 108 18 34 131 27 135 115 75 245 13
-        58 230 209 218 57 151 105 30 148 26 50 169 243 12 143 106
-        111 201 100 165 221 14 110 45 100 30 29 202 108 93 231 201
-        176 249 179 245 169 239 195 46 190 155 65 116 134 233 140
-        202 14 56 39 138 173 172 165 241 167 102 114 65 246 205 29
-        45 139 162 248 204 228 123 82 154 13 217 214 154 111 94 193
-        127 103 35 13 219 89 59 103 214 170 30 176 184 55 250 195
-        158 200 28 241 237 81 14 158 212 46 196 42 137 52 136 163
-        140 3 222 158 137 55 121 155 204 199 185 62 181 62 153 119
-        177 106 33 86 39 146 15 247 81 80 227 28 214 137 102 84 57
-        35 143 81 91 33 60 96 250 242 42 184 246 182 77 236 45 72
-        53 242 65 229 28 154 249 12 110 20 229 189 107 50 141 142
-        244 244 97 14 171 216 100 246 245 166 26 88 99 0 35 218 130
-        215 35 41 149 62 180 126 145 34 139 101 76 115 75 35 4 237
-        124 253 43 70 167 206 153 122 63 254 179 255 0 203 71 73
-        185 87 191 122 7 80 255 0 54 94 255 0 237 223 254 90 41 42
-        48 158 198 216 61 132 13 234 34 76 10 223 4 91 101 25 226
-        129 180 188 95 192 192 168 74 159 13 123 253 40 136 174 55
-        56 243 115 92 231 71 24 168 162 77 103 194 133 29 143 173
-        23 183 3 142 104 29 53 183 69 159 173 28 161 137 32 48 31
-        122 183 250 156 242 236 132 107 158 77 85 199 161 245 165
-        154 157 228 75 20 143 224 147 38 208 160 254 180 95 83 57
-        138 255 0 123 28 143 97 222 163 23 119 6 86 113 187 3 28 3
-        64 73 118 105 188 158 75 137 188 71 96 196 142 62 149 164
-        43 30 194 155 233 90 68 247 146 69 24 134 76 56 200 101 82
-        71 247 84 150 223 225 254 169 117 125 13 172 54 206 217 30
-        128 228 208 177 150 50 61 211 246 17 93 221 197 19 50 151
-        102 24 78 228 254 149 210 29 55 105 99 164 244 220 104 153
-        154 237 211 1 35 143 5 190 134 190 116 95 193 91 125 52 67
-        53 238 212 144 12 22 9 206 126 149 105 216 232 54 58 126
-        158 27 240 202 229 60 161 207 115 250 84 178 100 101 225
-        138 145 205 127 16 35 235 141 54 194 107 169 173 82 194 202
-        102 43 28 64 121 177 238 126 181 183 252 152 180 184 110
-        186 206 59 139 153 55 120 114 255 0 23 124 138 184 254 36
-        90 166 177 166 141 46 104 35 142 4 39 108 140 60 196 227
-        176 199 115 84 102 142 215 157 3 174 165 245 152 155 98 49
-        145 210 65 182 66 185 239 131 86 197 41 73 81 57 175 22 75
-        126 54 92 222 106 189 105 168 45 206 80 193 62 200 131 127
-        20 127 74 19 225 245 222 151 210 147 38 181 113 169 69 121
-        103 125 101 56 212 44 99 102 221 6 60 168 178 103 131 158
-        249 20 247 171 250 255 0 225 55 87 218 197 168 106 38 238
-        29 67 24 153 33 139 7 31 169 239 80 253 42 199 77 234 9 221
-        244 173 34 120 116 93 223 60 242 238 146 225 135 191 176
-        197 36 63 140 227 147 155 122 59 223 245 28 95 218 44 42 62
-        68 123 167 116 185 33 117 214 20 71 109 12 210 51 36 95 197
-        180 158 0 171 51 165 244 73 181 27 215 191 191 183 154 71
-        150 61 177 2 56 219 239 254 213 35 135 77 93 99 94 75 88 99
-        72 173 161 199 135 10 231 9 138 187 122 35 69 184 136 199
-        113 225 112 23 204 91 181 105 61 158 122 116 182 109 183
-        177 142 215 72 137 99 152 44 139 202 169 238 135 220 211
-        173 10 247 84 145 37 105 49 49 72 240 127 183 230 20 195
-        195 180 216 86 107 115 34 158 225 69 108 183 146 21 220 177
-        126 90 40 200 92 115 82 158 217 76 73 209 23 188 188 186
-        187 184 17 77 43 73 110 173 231 66 57 205 36 235 93 26 222
-        248 180 239 3 92 196 188 182 206 202 49 86 11 61 188 190
-        105 20 200 254 158 80 48 43 69 253 168 184 183 219 28 107
-        27 24 246 133 127 95 236 162 131 61 28 197 173 216 222 88
-        217 13 44 226 43 73 31 242 89 255 0 139 239 65 124 52 190
-        183 232 190 169 212 34 186 137 37 188 186 211 165 252 20
-        241 182 10 183 7 106 159 114 1 171 31 226 39 74 188 150 165
-        68 82 126 72 47 156 241 159 165 66 44 180 219 125 107 79 75
-        123 168 137 187 181 36 199 112 14 10 48 237 131 86 134 153
-        9 78 169 175 217 28 191 211 109 173 111 109 205 190 165 6
-        167 45 196 98 226 89 34 13 152 157 143 40 229 191 136 122
-        213 219 240 252 182 169 240 123 92 211 245 15 204 134 221
-        191 163 153 62 94 59 129 85 78 147 168 244 85 173 233 139
-        172 44 181 29 51 80 138 76 59 194 229 163 155 253 110 121
-        201 246 169 111 88 252 86 233 143 252 53 7 76 244 23 143 35
-        72 140 37 121 34 218 50 125 205 8 97 148 95 43 61 95 231
-        255 0 59 22 124 80 140 35 180 82 80 254 51 75 234 219 152
-        244 185 25 31 199 17 162 17 228 111 191 210 174 222 139 139
-        169 109 103 71 234 59 16 208 73 134 91 132 28 99 218 162
-        191 15 58 89 110 181 4 213 181 39 113 32 199 134 93 114 142
-        255 0 82 43 162 180 147 22 161 107 2 222 219 198 147 162
-        132 64 7 148 175 189 35 200 250 103 18 132 111 179 158 126
-        54 232 182 47 178 234 216 143 12 182 230 34 169 75 216 226
-        86 62 11 7 25 238 43 184 58 167 161 44 181 120 36 73 6 204
-        140 99 195 4 19 238 42 138 248 143 240 98 250 192 126 51 78
-        18 73 30 114 219 87 3 251 40 197 162 83 195 78 202 44 103
-        52 211 78 187 145 54 164 135 122 127 47 168 167 119 125 31
-        117 14 158 39 146 60 72 6 74 169 228 212 106 230 9 109 91
-        44 172 185 28 110 20 233 139 199 137 59 211 30 223 194 6 21
-        216 9 228 123 154 117 19 21 183 101 35 181 68 58 114 224 52
-        41 184 147 232 64 247 169 58 179 120 108 164 130 77 35 236
-        22 8 208 254 98 209 16 202 21 112 8 197 15 63 136 172 6 112
-        125 43 234 35 110 238 0 255 0 173 87 23 65 24 66 236 121
-        193 197 109 144 238 21 170 15 42 121 151 28 214 213 59 184
-        170 24 79 174 144 84 145 216 246 173 250 79 238 135 218 133
-        214 206 213 17 144 115 69 105 35 49 45 99 12 223 228 160
-        245 15 243 101 239 254 217 255 0 229 163 101 24 10 191 74
-        11 81 227 77 189 255 0 219 191 252 181 140 66 237 225 152
-        136 216 103 105 143 138 42 222 57 150 117 57 39 154 107 103
-        110 162 194 219 10 63 171 171 126 167 189 98 177 159 20 10
-        230 67 56 162 65 166 16 176 15 122 57 202 178 141 172 115
-        64 88 198 124 49 205 27 28 101 92 179 114 41 211 177 27 43
-        190 181 38 61 66 76 115 159 127 74 142 91 196 102 157 87
-        146 88 212 151 174 163 111 198 6 254 126 212 171 167 182
-        166 169 24 144 2 50 57 62 156 208 151 236 120 165 106 206
-        132 248 59 209 94 38 135 22 165 116 100 87 219 133 80 70 49
-        138 180 58 43 73 68 189 154 226 52 220 241 182 23 35 56 160
-        58 34 72 173 250 58 47 54 209 225 129 24 247 207 173 79 186
-        31 77 16 218 248 219 67 25 6 226 42 13 203 224 242 236 123
-        167 216 226 13 203 26 128 188 231 57 255 0 26 95 212 86 203
-        14 38 0 224 17 188 125 42 75 20 6 20 41 26 240 252 40 164
-        186 234 187 174 24 60 133 78 89 87 218 149 187 209 148 221
-        236 138 245 22 157 60 140 183 218 74 1 34 249 247 204 160
-        162 241 142 213 79 245 47 72 111 89 117 61 99 84 182 187
-        158 103 33 174 166 206 10 255 0 42 133 245 251 213 175 213
-        218 164 50 217 172 77 44 214 192 54 8 65 153 36 250 40 165
-        235 164 216 95 233 145 223 73 17 140 91 201 143 195 177 220
-        227 244 236 198 173 6 250 55 37 118 206 124 181 232 213 212
-        181 136 196 118 238 246 80 74 54 160 1 90 97 239 159 229
-        171 3 81 179 134 222 91 125 63 77 88 108 247 70 21 97 132
-        238 43 245 53 45 120 119 180 159 135 218 145 202 124 24 230
-        10 1 96 59 138 144 116 239 76 219 104 202 250 174 165 4 101
-        194 238 201 94 91 218 157 201 213 11 26 91 162 47 209 221
-        26 52 117 23 55 18 44 146 183 32 241 146 126 181 97 105 233
-        20 118 239 243 120 107 243 2 121 52 161 18 107 251 179 117
-        35 164 17 70 249 66 107 125 213 247 138 230 59 119 1 148
-        224 149 236 106 118 51 105 187 99 27 235 207 20 237 133 85
-        51 237 90 163 140 144 27 36 55 175 214 176 176 141 3 171 57
-        220 128 242 222 212 213 32 181 101 44 179 99 53 59 41 141
-        241 20 200 230 41 119 134 56 245 197 31 105 121 29 194 42
-        177 193 3 134 254 42 198 107 120 2 16 178 100 251 210 153
-        213 161 184 13 20 228 145 243 173 50 86 9 53 123 50 234 11
-        11 107 132 41 134 60 99 35 4 255 0 125 85 157 71 210 82 232
-        87 15 123 4 237 225 49 203 32 28 15 92 241 86 153 120 245
-        40 4 33 140 12 220 54 239 152 214 173 37 225 148 75 165 223
-        70 178 197 38 80 59 12 213 185 19 139 75 225 77 117 119 76
-        218 117 23 78 199 47 225 99 146 248 121 146 242 54 243 3
-        252 172 191 245 164 29 51 210 246 205 122 209 95 27 104 110
-        162 249 76 132 248 83 143 117 43 87 61 247 76 54 135 118
-        243 89 248 81 68 91 43 159 95 113 205 124 211 116 235 59
-        199 54 23 81 195 110 249 202 133 64 54 122 231 39 248 104
-        114 98 73 236 91 209 125 35 169 105 98 107 75 29 66 7 178
-        150 60 155 57 0 59 121 244 39 154 176 161 130 56 45 161 131
-        240 242 36 164 237 44 221 179 244 168 206 172 145 216 106
-        169 111 43 77 19 68 121 184 135 229 199 250 223 79 168 169
-        93 165 218 234 150 209 172 106 222 64 48 87 215 30 166 167
-        40 219 177 137 5 164 77 225 36 102 48 236 7 36 210 254 160
-        178 221 27 70 208 171 41 249 151 210 159 105 140 205 10 22
-        12 209 109 192 217 232 126 191 90 251 119 110 165 6 236 183
-        213 187 209 72 45 183 217 69 183 75 195 125 121 61 155 100
-        5 30 184 205 115 207 198 174 155 151 68 213 222 32 25 161
-        83 228 98 7 34 186 207 88 181 139 79 234 23 149 155 247 220
-        10 163 255 0 202 41 80 99 115 120 135 178 3 252 67 6 155 28
-        147 208 117 84 202 79 164 121 159 185 198 123 26 153 3 129
-        233 81 14 155 253 250 152 252 188 224 129 233 82 233 50 23
-        235 76 227 178 79 197 31 83 243 62 113 147 239 69 69 10 17
-        207 56 237 66 70 234 20 224 115 68 71 56 0 125 120 167 197
-        209 141 160 49 250 250 86 74 25 125 43 234 28 14 56 205 101
-        147 239 84 48 155 89 82 249 46 54 159 165 109 209 219 49
-        125 171 29 96 150 206 121 226 190 232 192 180 71 21 140 53
-        145 153 136 192 29 168 109 70 54 253 151 120 205 192 54 207
-        255 0 45 18 119 46 57 244 172 117 94 116 59 175 253 179 255
-        0 202 107 24 142 89 51 27 24 6 15 238 146 183 163 13 224
-        100 103 53 170 197 15 224 160 237 251 164 175 174 140 178
-        175 110 245 199 99 146 109 59 247 127 173 22 85 73 60 208
-        90 110 68 32 159 122 34 114 206 190 203 233 142 245 117 29
-        89 39 221 16 158 179 54 177 220 6 150 54 101 29 212 54 9
-        253 107 111 65 52 119 55 208 199 14 159 167 164 123 191 120
-        209 111 147 191 189 1 214 76 222 33 221 130 113 71 252 41
-        88 255 0 104 199 36 165 130 171 100 227 214 150 79 84 58
-        126 71 78 217 170 67 162 91 71 31 38 76 42 17 235 86 191 71
-        218 226 40 183 157 227 104 3 30 245 85 116 252 107 47 224
-        147 147 26 121 176 106 212 209 200 68 130 221 153 131 103
-        118 229 237 138 136 242 236 147 52 74 210 101 92 7 94 113
-        81 206 163 180 146 65 45 212 115 0 66 224 212 170 13 172 85
-        149 148 48 60 230 163 157 92 118 146 241 130 177 200 118 96
-        251 227 63 244 167 125 0 170 250 146 107 143 26 41 174 154
-        105 32 81 183 100 67 37 142 104 141 62 226 225 44 37 156
-        192 167 127 149 93 184 194 251 154 34 85 150 107 205 145
-        176 9 27 121 178 56 175 107 55 45 34 236 114 145 219 47 4
-        142 9 164 10 179 239 79 89 193 97 27 94 77 34 162 47 152 51
-        30 13 9 170 235 147 234 243 24 80 18 177 156 130 61 69 71
-        239 239 159 88 188 88 85 21 45 226 60 5 39 154 51 80 158
-        223 65 182 73 37 184 54 225 70 230 4 14 70 59 81 76 106 190
-        198 23 55 145 91 233 127 141 105 132 48 198 48 238 199 3
-        255 0 154 174 58 155 227 6 147 167 135 139 69 183 123 233
-        84 238 241 230 249 11 85 101 241 47 174 53 30 162 190 154
-        40 100 123 125 56 54 216 237 225 111 46 51 220 253 106 53
-        162 195 249 223 155 143 15 235 70 43 147 7 137 100 15 139
-        93 115 122 210 203 111 115 4 1 223 248 98 193 3 233 91 224
-        235 142 190 159 44 117 201 23 112 254 17 66 244 246 143 9
-        132 58 170 159 165 53 93 29 113 226 5 35 43 144 0 167 81
-        127 161 185 68 15 255 0 212 47 136 86 174 118 234 178 76 23
-        130 28 113 138 249 167 124 105 234 91 59 198 143 87 180 181
-        188 182 99 229 35 190 62 148 116 154 76 126 31 238 219 44
-        57 200 168 119 85 233 118 246 170 74 40 12 79 4 246 20 90
-        111 224 27 139 46 222 152 235 237 19 169 151 109 140 198
-        218 240 156 61 180 237 134 79 246 126 181 34 212 21 229 41
-        26 161 241 147 204 8 244 250 215 29 239 158 206 100 158 41
-        36 142 88 206 229 120 216 130 167 220 123 213 223 240 171
-        175 165 212 172 19 76 214 36 205 194 174 216 238 9 229 135
-        177 164 118 129 73 244 93 58 63 80 195 169 35 105 23 135
-        108 177 46 6 238 198 129 182 183 146 199 89 146 65 27 74
-        210 38 207 15 196 194 129 244 164 122 189 171 181 132 55 80
-        183 134 20 238 18 47 175 222 138 210 117 111 218 67 240 247
-        18 5 184 78 3 10 91 12 83 110 168 207 85 150 225 110 90 222
-        68 144 6 95 202 42 60 195 234 79 173 72 186 125 111 38 252
-        53 180 146 166 118 124 222 189 251 26 213 115 190 234 201 0
-        88 214 88 142 85 241 233 68 116 235 184 34 119 145 222 69
-        109 187 113 253 244 108 220 75 31 72 181 120 160 48 25 4
-        128 12 144 43 116 176 199 248 15 13 99 98 8 230 182 105 222
-        91 96 164 129 43 97 183 30 216 199 106 209 172 188 98 216
-        198 172 195 234 180 91 36 221 58 43 158 186 142 72 46 32
-        154 67 149 13 159 189 85 31 25 237 148 233 226 85 240 156
-        21 220 168 235 184 30 61 69 91 221 94 127 21 104 95 4 140
-        121 126 149 89 245 117 172 87 90 116 126 59 200 27 105 92
-        142 64 21 37 26 118 91 134 172 230 221 62 226 221 53 16 143
-        103 28 110 78 73 133 246 47 255 0 230 164 55 238 134 37 218
-        70 61 57 165 29 89 165 92 104 218 195 188 136 230 34 124
-        178 122 99 222 178 134 224 188 74 172 114 64 239 86 82 100
-        166 188 67 34 108 46 115 69 71 38 229 238 41 100 47 199 122
-        54 221 129 166 140 184 137 45 58 24 219 252 167 62 245 183
-        156 103 210 180 68 234 171 94 150 96 20 14 106 139 34 97 0
-        213 121 25 29 141 124 210 37 111 8 166 59 26 245 243 6 77
-        163 248 123 159 122 195 70 238 212 121 196 195 144 196 247
-        21 163 84 35 246 77 208 245 17 57 63 109 180 65 27 87 60 80
-        154 145 255 0 203 111 127 246 207 254 24 173 206 38 21 233
-        188 216 219 159 254 146 127 133 110 4 9 121 25 161 108 37
-        85 177 183 95 85 140 110 250 226 136 143 243 36 7 208 26
-        228 41 30 199 214 25 240 78 71 173 109 150 64 16 143 95 65
-        239 88 90 16 109 248 227 28 86 139 146 119 231 60 142 213
-        107 124 73 201 121 16 206 172 95 26 80 23 191 175 210 166
-        191 9 186 121 141 170 220 180 51 57 39 129 129 239 222 144
-        217 105 82 234 218 199 131 179 11 184 110 53 209 157 23 211
-        214 182 122 44 81 201 48 241 182 0 61 49 74 24 251 14 122
-        66 214 229 94 48 208 133 80 63 139 189 88 90 72 96 192 54
-        56 236 105 7 78 88 164 31 52 129 163 94 88 231 204 79 181
-        74 32 134 75 123 116 196 68 156 118 110 226 145 143 46 198
-        179 58 65 18 179 74 219 207 112 59 84 115 170 46 217 180
-        249 95 121 44 62 81 237 245 251 209 183 119 81 180 108 184
-        238 42 25 212 90 162 174 228 102 93 157 155 119 96 41 152
-        42 207 186 29 184 107 71 154 87 35 185 99 238 106 35 214 90
-        132 78 5 157 187 22 99 232 41 157 222 169 44 26 83 52 101
-        76 44 48 54 118 53 26 208 109 228 190 214 33 145 162 12 12
-        152 25 246 164 47 12 111 76 155 124 53 233 149 16 45 197
-        218 110 64 114 115 235 84 239 199 221 101 78 177 123 102
-        140 26 56 188 160 102 186 123 67 179 75 123 51 101 8 13 193
-        12 127 147 235 92 107 241 198 27 139 126 176 212 98 152 146
-        230 124 159 246 105 148 28 132 134 68 242 52 200 12 48 44
-        118 198 237 149 195 183 37 15 202 62 213 165 53 63 1 131 60
-        39 195 251 84 155 168 46 180 217 180 109 62 218 212 51 92
-        54 12 161 7 205 247 165 87 82 89 54 159 36 87 22 142 140 62
-        94 59 85 34 168 156 161 110 209 97 124 56 215 45 245 8 28
-        170 12 227 145 237 86 5 215 225 226 75 113 12 108 254 77
-        217 110 56 170 35 225 13 243 91 235 38 53 243 161 111 238
-        171 123 169 245 84 91 139 104 17 137 65 24 17 253 15 181
-        116 66 105 160 113 67 109 70 91 88 173 214 118 0 239 5 72
-        81 218 169 78 186 234 56 127 27 45 154 167 136 55 144 49
-        222 173 110 160 212 29 58 101 228 42 5 202 198 66 12 122
-        123 215 62 233 243 164 250 255 0 141 116 60 92 49 242 142
-        237 247 161 55 72 220 80 93 188 222 50 8 230 132 164 141
-        199 110 5 49 209 255 0 242 221 97 24 23 216 28 40 223 199
-        127 181 107 189 186 73 119 50 219 202 189 176 224 114 121
-        166 125 93 62 159 113 248 25 172 29 213 196 65 164 200 238
-        213 12 177 114 141 153 73 69 209 212 95 8 26 223 168 186 54
-        104 166 219 35 68 72 81 246 21 27 234 77 54 125 23 88 18
-        236 216 132 242 69 51 255 0 37 139 27 166 208 175 174 74
-        150 141 66 149 95 114 123 212 179 226 94 151 227 217 181
-        196 42 36 98 114 19 249 126 149 25 174 40 188 50 46 64 61
-        45 117 107 170 89 51 69 38 14 57 7 189 109 179 111 194 245
-        10 13 196 46 60 195 211 25 168 15 76 222 92 88 234 70 5 5
-        73 60 113 145 82 150 213 51 126 143 112 34 19 99 128 135
-        119 30 249 255 0 165 104 116 52 210 79 69 167 109 119 185
-        17 22 66 87 119 13 235 138 35 83 11 140 198 229 199 166 106
-        45 162 220 120 138 36 207 25 230 164 81 75 226 40 88 227
-        223 143 74 214 115 53 228 70 181 136 157 225 117 141 64 227
-        133 53 93 235 150 179 52 130 23 132 62 14 0 95 191 173 90
-        250 196 56 152 49 219 150 249 75 118 6 161 215 246 48 139
-        215 146 105 24 130 48 71 240 211 36 55 39 209 207 127 20 33
-        179 180 212 101 79 6 102 89 24 46 201 62 82 113 220 84 6 88
-        22 44 52 44 206 159 94 226 174 175 140 58 47 137 104 38 179
-        101 148 71 150 81 184 6 83 244 205 83 54 30 42 72 232 246
-        243 3 159 48 200 110 126 244 64 246 104 220 241 131 186 137
-        182 184 64 57 110 107 102 161 110 172 9 141 65 30 254 212
-        166 104 218 35 156 253 42 148 128 210 100 129 46 99 63 197
-        95 39 148 99 200 115 72 34 149 193 201 99 138 221 248 229
-        67 207 106 87 20 128 208 222 233 129 143 30 222 190 245 142
-        151 235 247 165 175 125 226 2 84 226 143 210 100 5 194 255
-        0 53 40 7 133 191 44 80 90 144 206 153 122 114 127 171 61
-        109 150 224 46 87 219 138 26 250 101 109 34 233 189 225 112
-        126 213 168 70 221 137 52 247 111 194 91 140 28 136 249 166
-        118 114 121 192 160 116 224 166 24 71 111 203 163 173 194
-        248 234 5 98 204 146 89 170 152 115 187 239 66 223 99 5 148
-        225 63 157 62 106 105 99 25 48 42 199 183 39 190 104 203
-        189 29 230 179 1 21 83 112 249 143 111 238 172 37 48 14 133
-        210 188 109 107 241 144 164 50 46 209 151 99 130 13 116 78
-        131 56 158 218 20 150 81 189 80 13 158 131 235 85 223 195
-        94 156 59 143 226 99 12 217 225 135 21 108 90 233 166 36 79
-        10 30 0 239 88 172 152 218 198 23 133 149 225 96 185 238
-        126 148 254 207 12 187 34 137 143 243 63 165 35 182 146 88
-        80 35 67 128 79 239 15 240 253 41 148 55 50 71 3 198 155
-        223 63 59 227 185 250 86 20 246 175 9 49 238 137 75 194 7
-        14 59 26 171 122 185 101 146 252 170 221 70 138 79 57 171
-        19 90 190 184 150 223 207 136 198 60 160 85 91 173 91 79
-        121 123 35 126 42 20 85 57 229 143 253 169 39 236 52 59 21
-        95 71 52 120 85 189 141 19 24 193 61 254 181 38 232 109 62
-        56 84 95 120 139 52 177 12 70 23 208 251 210 8 45 33 102 62
-        35 69 113 183 143 43 28 138 150 244 28 129 53 1 12 177 109
-        133 56 69 30 223 90 89 71 145 87 58 90 44 222 153 135 108
-        45 112 24 137 64 59 200 35 39 138 160 63 202 143 164 236
-        110 35 77 90 16 177 220 71 31 157 207 118 63 203 255 0 95
-        210 186 59 76 240 101 45 113 224 67 10 200 219 34 218 152
-        57 168 199 95 116 226 234 154 109 212 19 66 158 32 207 206
-        14 8 193 237 93 81 141 66 145 199 109 202 217 193 218 38
-        143 125 172 92 206 182 82 120 115 194 3 167 250 199 216 81
-        186 229 182 179 114 195 76 184 142 52 153 64 252 208 57 63
-        83 79 238 108 238 58 51 172 102 142 72 93 32 119 36 100 119
-        25 197 72 174 109 109 245 43 132 213 172 128 119 83 202 159
-        81 83 166 116 173 171 43 142 148 209 167 210 53 87 186 109
-        225 20 130 8 29 254 212 255 0 168 117 88 99 189 18 151 121
-        75 184 112 15 163 10 115 169 205 104 214 160 109 219 47 168
-        3 24 168 70 191 34 35 161 50 198 74 190 79 218 171 23 76 95
-        199 68 203 87 214 37 213 236 26 53 97 28 146 199 220 255 0
-        102 42 186 135 166 111 237 101 123 191 50 170 19 133 35 150
-        251 84 183 68 104 4 177 177 98 112 6 125 170 84 82 27 248
-        197 189 188 97 156 253 56 169 202 77 176 113 118 65 83 78
-        215 58 130 206 36 216 150 214 208 121 188 131 131 250 210
-        254 157 210 219 80 215 226 210 252 97 8 241 48 197 189 106
-        194 214 117 11 77 19 76 125 54 215 30 57 82 9 28 3 79 255 0
-        201 219 162 228 212 181 51 171 222 70 35 241 27 10 204 14
-        59 131 237 70 9 216 217 101 20 182 116 135 194 61 10 223 71
-        233 107 107 59 21 100 11 15 159 61 137 250 208 157 71 12 97
-        154 215 143 1 137 222 171 83 13 26 218 43 88 139 75 108 35
-        139 110 197 57 225 143 189 38 234 185 161 181 211 101 183
-        48 140 177 224 142 226 182 98 56 211 178 137 234 75 3 103
-        126 235 13 210 69 179 144 73 173 130 222 67 20 99 241 145
-        191 102 220 13 27 168 199 28 215 18 77 53 184 93 195 130 79
-        106 16 88 52 155 213 111 32 12 167 182 227 255 0 106 132
-        186 59 155 209 97 116 84 108 85 3 72 36 56 192 34 167 80 70
-        200 128 172 81 179 175 24 61 234 176 232 167 154 223 242
-        154 101 45 191 131 159 165 88 208 95 93 44 106 165 81 128
-        31 50 250 211 199 212 228 105 169 108 211 171 31 16 177 142
-        51 27 145 202 159 74 142 94 195 25 140 200 192 22 94 114 87
-        52 250 250 105 35 117 104 83 45 234 27 185 165 119 214 183
-        19 184 62 25 85 110 227 183 52 76 85 255 0 17 132 154 166
-        147 37 186 248 46 20 21 7 110 222 125 170 129 155 79 252 60
-        230 39 32 182 79 145 107 171 122 135 68 142 75 86 221 25 92
-        100 146 59 26 162 186 143 167 38 135 88 220 138 165 119 28
-        30 107 24 133 203 14 207 44 159 150 79 240 175 99 75 110 45
-        85 216 243 83 62 164 210 229 135 108 166 18 138 125 248 34
-        163 110 129 92 228 86 17 232 71 37 152 0 226 130 158 215
-        239 82 48 136 202 124 190 180 37 197 190 92 129 142 244 105
-        152 143 205 19 33 242 127 109 63 233 213 252 149 242 146
-        217 228 214 155 139 85 10 78 40 189 15 8 59 113 154 120 166
-        96 249 147 50 29 220 26 211 168 68 19 72 186 62 190 11 147
-        246 162 174 15 230 134 247 21 167 84 255 0 50 221 55 24 107
-        119 24 162 97 14 159 36 102 218 32 205 180 248 116 198 213
-        226 87 83 188 147 154 81 107 167 220 53 140 18 7 35 242 249
-        163 44 237 37 105 17 119 28 131 147 82 28 156 233 82 143 18
-        49 232 69 79 180 187 75 121 32 92 220 73 28 184 249 68 69
-        133 65 186 106 197 231 158 36 49 201 38 61 87 210 174 190
-        145 211 94 68 137 95 195 66 171 140 177 231 245 172 97 191
-        72 233 106 109 6 103 93 195 186 142 230 167 58 110 155 149
-        2 36 4 1 146 204 199 138 15 167 44 108 128 241 124 25 230
-        127 226 240 71 203 82 107 123 49 34 172 113 248 241 71 156
-        226 65 131 88 87 42 6 22 110 1 241 219 196 92 121 84 129
-        138 211 5 149 227 238 88 149 84 19 252 93 170 65 111 103
-        146 84 149 104 151 251 65 172 166 82 241 42 66 205 41 31
-        194 220 17 253 148 44 28 209 92 245 109 181 212 113 110 220
-        74 129 192 30 181 84 206 151 127 141 151 198 194 3 192 4
-        213 229 213 154 108 146 218 14 114 49 230 95 229 174 127
-        235 72 166 211 53 41 87 12 242 147 223 39 129 83 156 188
-        139 225 142 218 26 233 208 201 11 157 171 16 82 114 78 78
-        106 95 211 141 17 148 180 69 153 211 137 31 248 84 253 106
-        187 210 229 27 98 154 234 102 10 87 29 253 106 99 211 247
-        50 71 229 137 138 237 243 73 143 226 31 90 220 138 100 73
-        45 23 31 79 177 184 177 104 84 141 225 195 120 141 198 71
-        208 83 253 66 55 75 114 242 175 137 43 240 0 25 207 21 16
-        233 137 18 107 104 217 110 11 55 0 15 166 123 84 230 250
-        120 225 136 200 204 200 137 128 8 25 197 118 65 218 60 188
-        146 119 163 156 190 49 244 36 186 173 171 92 181 143 225
-        228 44 85 153 187 143 94 42 128 158 223 90 233 105 158 56
-        219 198 133 143 215 143 181 117 247 196 9 154 123 217 165
-        105 34 104 200 206 194 249 195 127 241 84 31 89 91 238 184
-        157 99 133 30 82 55 40 29 143 214 169 197 23 199 41 112 162
-        186 185 214 103 186 102 123 219 95 57 239 33 24 3 251 42 61
-        172 120 51 36 69 109 119 3 47 206 61 78 15 21 33 184 142
-        230 221 222 9 70 84 15 54 125 169 116 176 205 24 93 141 132
-        241 6 6 59 26 159 17 249 72 198 214 241 98 108 27 117 4 224
-        149 92 211 111 252 65 168 64 98 75 43 87 17 129 229 44 56
-        199 233 205 3 107 110 99 99 52 152 50 150 56 99 237 154 123
-        211 176 77 38 160 37 101 223 31 177 237 70 43 246 110 82 10
-        232 190 141 212 53 205 71 241 87 143 28 140 88 121 125 43
-        171 254 26 232 50 233 22 137 111 248 16 144 42 133 223 142
-        9 170 163 225 212 126 10 143 13 109 192 115 128 31 230 253
-        42 249 232 235 223 11 77 134 25 36 73 90 110 236 15 57 166
-        215 194 25 174 84 55 189 178 97 21 188 74 235 225 15 54 210
-        121 53 5 235 9 86 234 105 118 131 187 119 150 33 243 84 243
-        168 21 134 153 148 145 35 216 255 0 49 238 56 170 163 172
-        110 246 221 148 183 185 203 147 193 90 134 99 163 9 14 213
-        90 57 49 224 176 111 230 87 226 144 79 4 139 52 147 43 196
-        140 253 129 124 12 209 122 205 212 6 227 198 110 1 242 103
-        63 197 239 81 141 94 238 226 25 194 40 87 70 244 127 81 244
-        174 103 45 29 138 28 145 48 233 15 198 27 192 146 18 27 119
-        163 2 63 76 85 189 164 89 221 73 26 42 185 200 28 131 85
-        191 195 29 42 75 141 146 194 172 24 159 144 255 0 15 30 149
-        113 233 150 55 16 170 135 252 206 60 210 123 85 99 234 114
-        229 146 230 1 29 155 9 135 226 87 9 252 254 162 190 157 54
-        73 150 76 206 179 156 121 119 112 64 253 42 68 34 23 10 4
-        109 226 159 76 208 151 54 110 238 87 196 43 32 237 232 7
-        222 137 62 104 132 107 26 118 99 219 226 136 152 14 121 205
-        86 125 99 167 175 237 5 105 110 23 96 62 102 65 87 101 229
-        188 101 30 59 139 121 159 159 51 70 50 13 67 181 253 46 209
-        204 177 194 198 53 217 156 74 7 6 176 201 217 68 117 172 48
-        8 222 72 228 50 38 223 33 116 108 230 160 19 129 180 62 59
-        174 113 87 71 94 233 47 38 158 234 139 184 43 97 86 169 187
-        184 158 34 241 200 48 85 138 129 236 43 2 74 221 128 250
-        103 222 176 101 39 229 25 53 159 210 179 135 230 170 115 85
-        64 52 201 22 80 150 24 56 161 172 78 217 8 0 119 166 23 142
-        190 27 113 233 75 237 10 155 130 2 253 105 224 237 24 105
-        58 110 10 223 74 18 255 0 63 178 110 193 244 129 218 143
-        149 149 99 11 142 72 160 117 31 243 85 217 61 204 78 15 218
-        131 236 193 186 90 198 116 139 76 50 159 232 201 254 21 240
-        8 214 109 220 18 57 24 165 154 124 231 246 109 170 238 218
-        22 221 20 215 212 185 118 155 195 29 189 234 35 147 62 151
-        185 63 180 227 85 109 196 243 145 232 125 170 240 233 87
-        154 98 130 117 42 224 113 159 90 231 254 159 141 77 220 110
-        210 109 243 14 213 208 95 13 174 45 209 81 90 100 44 23 203
-        187 146 127 178 177 139 91 167 68 45 106 163 233 147 24 238
-        194 164 246 194 223 193 93 177 201 193 236 190 159 122 65
-        161 25 226 95 204 138 16 51 198 79 27 105 254 159 226 186
-        121 152 39 60 39 253 105 146 178 13 219 8 84 102 112 4 112
-        237 246 207 52 108 80 71 23 155 240 209 243 245 175 145 32
-        81 150 82 62 181 181 229 80 128 114 126 212 234 128 38 234
-        59 17 121 1 113 181 118 131 149 240 176 107 157 254 36 105
-        145 172 225 132 94 57 82 119 47 168 174 150 190 241 164 6
-        72 31 195 35 212 142 106 176 235 237 5 174 124 86 101 12
-        216 221 187 24 57 164 156 20 138 96 157 62 69 19 13 184 134
-        214 71 243 120 132 102 52 147 248 105 222 141 61 221 194
-        172 215 18 131 50 12 125 90 134 154 19 103 168 120 18 237
-        96 217 0 125 104 103 241 173 101 252 106 134 27 79 111 74
-        229 105 166 119 57 114 90 45 126 140 184 86 180 102 55 40 8
-        237 205 78 191 31 60 86 95 135 107 229 220 190 111 47 36
-        241 242 213 27 163 234 202 176 41 241 140 81 191 112 123
-        211 185 186 180 219 217 198 209 221 168 144 143 56 99 206
-        43 167 30 95 140 228 201 141 223 67 62 185 190 0 22 88 89
-        78 194 89 166 24 85 62 245 68 234 173 20 200 146 120 151 15
-        39 140 216 192 249 177 223 21 100 234 93 81 167 222 233 242
-        121 135 138 27 206 9 24 97 75 172 109 244 123 201 222 118
-        186 72 146 21 59 6 6 11 55 106 235 82 137 57 41 69 21 69
-        244 107 60 211 93 169 222 178 249 75 55 4 26 2 230 55 93
-        145 140 130 91 129 142 245 120 75 240 222 29 147 220 75 118
-        30 222 100 81 28 157 134 226 70 72 166 215 191 0 76 154 124
-        23 81 107 2 210 70 149 7 157 187 131 233 218 133 196 73 100
-        226 172 231 200 35 12 21 130 144 9 218 51 234 105 173 147
-        53 180 47 106 237 55 154 81 38 213 29 143 181 92 250 183
-        193 155 93 2 226 207 241 55 27 217 230 97 184 158 15 181 0
-        157 15 107 160 194 127 107 93 71 0 157 155 135 97 207 177
-        173 113 30 18 114 86 36 232 155 166 181 212 229 142 20 15
-        143 149 27 248 143 181 95 61 33 125 178 213 99 141 94 2 163
-        115 73 32 242 131 237 84 149 189 254 147 167 202 177 171
-        167 138 174 4 135 0 227 235 82 24 186 206 56 238 36 138 210
-        113 176 227 37 143 31 165 36 164 146 26 172 183 53 139 233
-        37 145 47 13 228 65 72 33 147 61 170 172 234 89 213 239 76
-        97 195 43 49 243 10 217 127 212 139 61 152 48 202 93 149
-        124 192 17 222 162 154 181 244 173 190 4 254 177 41 201 39
-        176 251 87 62 73 166 138 98 139 176 77 70 226 105 110 227
-        128 248 50 89 41 255 0 238 31 106 9 108 115 118 169 36 98
-        88 216 249 95 209 13 31 102 134 210 220 137 35 60 142 239
-        220 83 222 137 209 164 212 174 195 188 108 235 158 0 251
-        215 53 72 232 121 20 116 139 19 225 174 154 190 12 107 17
-        119 219 130 199 244 255 0 10 182 236 213 161 183 40 171 147
-        237 81 142 150 210 174 172 237 217 18 40 227 82 0 5 187 212
-        174 22 216 118 158 113 234 59 26 234 132 93 108 243 231 92
-        172 209 53 180 127 188 240 78 87 156 30 213 161 217 164 25
-        154 48 24 118 49 242 113 76 193 89 99 56 237 67 205 20 120
-        199 202 125 13 55 16 8 111 196 76 140 161 37 39 25 203 14
-        213 1 234 117 1 164 101 229 74 96 55 189 88 23 183 19 70
-        204 138 137 142 217 62 181 21 215 72 134 54 150 70 183 84
-        245 221 158 63 186 183 18 176 119 162 142 235 107 139 179
-        101 112 48 74 131 149 250 213 55 169 21 153 101 109 195 118
-        226 49 87 143 197 11 59 89 172 228 240 238 163 86 11 193 86
-        242 213 7 168 41 183 153 227 13 189 119 119 20 133 31 26 4
-        138 53 225 183 114 56 162 35 249 141 99 16 93 166 190 134
-        10 199 218 177 51 11 207 221 183 218 128 179 230 224 227
-        154 97 117 242 31 181 45 179 202 206 87 215 189 82 14 145
-        135 197 65 136 103 142 40 13 74 48 116 219 220 28 255 0 70
-        122 48 73 249 67 52 22 160 196 88 93 242 60 240 56 20 89
-        132 246 173 33 176 131 211 242 147 181 25 98 164 202 55 122
-        241 90 172 99 38 202 223 63 232 146 141 137 10 48 53 33 195
-        237 36 17 76 55 59 140 28 241 86 191 194 221 82 71 187 85
-        134 86 137 241 229 144 138 169 145 73 66 203 220 28 154 150
-        252 57 214 154 199 83 71 134 72 163 97 235 39 106 198 58
-        223 67 121 30 205 68 246 178 34 103 201 57 60 49 250 84 166
-        202 250 59 114 171 42 153 28 140 2 7 97 80 110 157 214 5
-        238 147 18 27 150 57 60 113 156 126 149 55 208 161 152 66
-        38 143 136 200 198 120 57 63 173 89 164 186 57 199 169 35
-        72 23 119 0 142 213 189 35 81 233 199 181 13 8 118 33 179
-        192 224 209 101 148 32 227 154 6 62 50 174 119 99 129 233
-        74 122 130 205 110 173 152 236 11 246 29 233 163 72 161 114
-        71 21 131 48 145 10 178 239 83 233 237 65 179 45 20 167 88
-        244 52 211 91 27 203 104 80 178 18 119 122 231 218 171 11
-        187 123 200 110 31 78 189 93 162 67 243 123 87 79 107 176
-        53 157 147 186 43 75 17 238 139 232 125 234 136 248 146 177
-        73 114 100 84 96 155 185 13 195 126 181 25 70 203 225 156
-        147 164 35 210 116 152 166 184 16 52 171 42 149 202 236 247
-        170 207 226 54 139 175 105 90 204 242 61 196 190 11 28 198
-        83 149 219 237 83 222 151 214 197 133 218 194 100 240 225
-        249 67 96 114 61 170 196 212 52 152 117 189 17 90 56 209
-        212 12 238 35 56 21 60 77 73 157 83 132 226 185 72 228 251
-        45 112 139 146 26 86 59 20 134 4 156 22 162 52 205 98 226
-        222 203 242 166 62 57 186 18 54 227 193 3 211 237 83 78 185
-        248 112 99 190 184 149 45 13 188 32 231 116 125 152 213 121
-        169 104 183 182 101 130 238 0 252 153 238 5 116 62 206 120
-        228 82 123 39 58 151 88 245 117 197 134 159 165 75 124 86
-        218 24 205 202 70 184 218 7 177 53 60 215 254 43 117 237
-        199 75 232 182 247 182 18 89 199 225 44 214 243 173 187 21
-        184 10 123 130 51 199 189 115 249 107 184 36 221 151 221
-        141 188 156 241 237 82 109 7 226 31 89 104 177 71 109 109
-        172 94 4 130 217 160 129 50 8 138 54 238 160 17 218 154 133
-        88 87 254 139 31 226 175 196 126 181 234 43 13 48 94 88 61
-        132 70 63 26 222 88 247 33 125 191 196 51 233 144 106 29
-        212 157 103 212 58 189 165 140 186 165 244 83 35 32 88 176
-        131 32 47 114 126 181 19 213 186 147 168 117 153 33 159 81
-        212 174 238 154 217 12 80 120 178 110 240 211 249 71 211
-        147 66 44 55 19 90 71 181 75 159 155 25 236 115 90 135 73
-        46 221 140 238 53 67 251 78 238 95 20 178 77 146 50 121 205
-        104 210 245 75 139 217 34 181 134 232 137 3 16 192 3 154 47
-        67 232 251 173 64 201 227 187 71 35 225 148 14 248 207 106
-        185 62 27 244 16 178 195 61 132 105 48 148 18 242 96 22 95
-        214 132 163 171 4 230 170 162 7 208 29 47 125 30 141 53 238
-        172 242 178 203 251 188 30 64 199 253 232 177 103 28 123
-        100 241 137 149 120 84 110 199 239 83 126 177 191 182 208
-        237 37 183 143 116 44 56 85 36 55 24 244 170 238 202 83 123
-        118 94 66 67 19 148 106 228 116 203 168 73 18 94 153 233
-        253 83 95 144 76 202 76 46 112 163 31 227 87 31 73 116 153
-        210 204 49 204 170 14 1 194 210 111 135 23 11 20 34 8 35
-        145 159 56 201 3 21 104 90 90 27 93 175 36 126 35 176 206
-        242 79 31 74 233 199 7 86 206 60 143 97 118 241 133 77 187
-        118 129 233 239 91 90 53 199 28 125 171 21 155 60 50 225
-        171 238 252 119 170 217 42 53 58 136 187 51 42 250 129 65
-        234 23 94 12 69 100 143 35 221 123 138 60 149 151 229 20 27
-        169 71 219 252 62 223 90 1 35 215 115 43 40 113 32 251 55
-        124 84 47 171 100 186 49 179 184 154 201 65 231 124 91 149
-        170 85 173 98 202 233 252 103 42 224 121 152 199 145 223
-        251 170 186 248 147 214 183 90 125 177 91 107 171 105 7 250
-        223 246 53 138 68 162 190 47 107 186 95 138 214 49 248 190
-        48 28 73 25 198 223 211 181 87 209 0 214 161 139 51 100 247
-        110 244 87 94 106 67 88 234 55 186 240 194 31 92 113 154 14
-        73 213 85 87 233 82 4 244 244 124 133 130 190 211 235 68 52
-        89 229 73 52 2 183 155 121 163 109 174 50 160 131 233 88 17
-        102 171 131 149 35 233 75 163 27 110 179 76 238 20 96 210
-        213 254 179 85 198 149 14 54 149 179 26 231 142 61 41 102
-        163 41 252 21 194 142 194 39 166 50 168 48 131 244 165 151
-        202 63 5 63 251 167 162 251 17 183 102 122 48 63 179 160
-        224 254 233 43 126 71 137 143 90 203 72 79 252 174 220 129
-        222 36 197 18 45 198 75 17 81 101 227 217 227 251 146 61 77
-        15 111 122 246 87 65 149 118 227 187 30 213 235 171 133 141
-        128 57 237 90 226 219 121 34 110 71 40 7 56 28 154 186 143
-        40 137 47 99 167 126 4 117 157 174 161 167 172 63 153 44
-        136 120 24 171 231 78 212 65 81 225 218 249 118 231 115 28
-        0 107 144 190 28 89 173 188 130 77 54 89 34 32 231 105 56
-        39 237 138 178 180 238 161 234 84 87 102 17 76 136 48 6 9
-        199 215 154 14 60 65 197 51 163 45 102 103 1 100 216 170
-        121 5 78 69 99 169 220 54 192 163 201 236 199 214 170 77 11
-        171 245 39 17 71 112 168 23 28 248 35 183 223 62 181 53 209
-        175 226 185 45 33 153 131 255 0 44 188 98 164 251 19 36 117
-        72 147 192 159 42 72 164 38 120 62 244 112 27 80 5 35 111
-        160 165 118 19 120 142 1 96 223 202 1 230 152 44 168 80 110
-        202 243 142 105 211 64 173 30 154 21 153 25 100 25 82 48 69
-        84 255 0 18 122 82 19 35 155 101 32 179 100 10 183 3 46 56
-        96 104 109 66 202 27 200 240 200 140 222 153 173 40 218 27
-        28 169 232 228 91 238 152 186 91 147 43 63 135 20 71 60 142
-        255 0 74 125 211 93 69 117 98 88 93 200 22 221 92 4 207 160
-        171 91 173 250 76 108 150 72 227 80 51 187 143 106 165 250
-        146 41 68 141 111 29 187 8 213 253 185 205 113 188 124 37
-        103 124 36 178 42 147 44 121 46 108 53 205 177 220 69 249
-        108 155 65 247 250 212 119 170 190 23 217 155 104 37 134
-        225 10 63 203 143 240 164 218 37 252 214 58 188 112 204 228
-        64 202 48 79 189 89 90 93 253 188 177 237 89 214 103 253
-        214 210 123 15 113 245 170 71 43 229 103 52 177 46 52 138
-        27 93 248 99 116 151 210 44 86 251 160 69 196 44 163 211
-        220 84 30 247 64 107 107 182 140 171 56 31 46 7 173 118 133
-        237 180 90 149 144 93 194 54 141 118 57 42 57 250 138 137
-        106 125 33 167 197 120 100 88 86 104 216 96 101 107 174 50
-        199 37 105 28 235 179 155 116 14 140 186 212 193 240 55 51
-        49 206 208 188 226 167 125 55 240 195 54 203 45 210 186 72
-        143 198 70 55 15 122 186 52 46 153 179 177 138 55 182 217
-        20 217 228 99 140 83 173 90 104 225 84 141 97 141 86 49 134
-        36 96 181 53 165 234 138 37 201 144 171 110 135 210 116 79
-        10 226 121 20 205 225 229 4 124 130 107 238 173 212 150 246
-        54 203 105 24 72 156 55 151 216 241 254 53 171 169 181 136
-        109 237 36 219 112 30 68 114 145 166 114 77 87 147 73 121
-        168 91 139 182 87 46 210 121 71 176 174 73 101 116 209 214
-        176 213 51 45 96 106 26 245 227 195 122 216 99 204 45 232 5
-        54 233 30 147 152 202 177 205 147 199 3 20 227 163 244 134
-        213 30 40 228 140 164 138 70 25 187 26 185 250 111 167 99
-        183 132 60 209 70 37 3 154 92 80 79 108 76 217 56 233 25
-        116 63 79 219 217 233 161 221 79 138 125 79 165 74 23 229
-        25 227 28 115 88 194 137 12 33 19 140 119 175 179 58 38 55
-        56 31 90 233 163 142 105 182 99 58 163 46 230 96 160 118
-        165 215 146 52 67 197 102 150 48 222 168 51 69 207 44 126
-        25 60 176 250 14 212 174 246 96 84 171 178 178 5 200 32 240
-        69 103 163 40 114 26 137 15 135 230 81 199 203 187 179 80
-        83 95 73 202 136 33 56 255 0 91 154 134 235 29 68 108 99 48
-        219 9 166 0 124 199 24 63 110 106 11 172 117 110 189 53 203
-        197 225 196 233 140 169 112 114 181 135 88 210 44 46 168
-        215 33 143 79 157 228 73 85 84 16 222 249 250 87 37 124 96
-        235 11 91 205 78 75 11 75 153 21 131 19 137 70 56 171 39 86
-        212 53 237 70 57 32 188 185 82 161 14 28 13 187 87 254 188
-        213 69 213 58 29 188 241 201 42 67 113 123 118 92 225 136 0
-        99 251 107 112 79 232 106 136 45 172 37 228 105 14 112 123
-        31 122 33 161 221 231 60 55 108 125 40 217 99 104 81 97 112
-        145 183 177 239 65 22 96 73 244 237 74 218 163 27 60 53 9
-        206 43 43 104 195 112 57 172 21 183 33 251 215 212 98 157
-        142 13 32 12 175 65 7 145 74 155 137 197 57 148 111 83 187
-        154 73 38 127 24 71 165 60 69 147 25 187 226 49 142 120 165
-        247 103 117 189 217 247 183 113 250 209 172 165 163 31 106
-        22 244 40 211 231 199 205 225 62 105 133 25 233 30 109 42
-        213 113 140 198 159 225 154 57 216 44 44 48 59 119 160 52
-        103 85 211 44 148 142 76 8 127 93 180 85 196 171 225 242 42
-        71 74 116 70 181 2 242 94 14 113 199 97 247 169 87 65 219
-        36 215 177 195 40 220 8 228 47 113 253 180 141 109 252 107
-        213 37 60 184 239 237 83 174 143 211 149 39 87 0 110 35 200
-        195 131 138 180 102 170 137 190 236 187 58 103 166 236 35
-        48 52 114 32 24 221 133 249 170 91 107 165 194 210 5 148 4
-        24 192 56 168 247 77 204 176 89 68 222 55 138 83 229 76 14
-        126 149 52 209 238 55 145 226 76 129 217 126 87 3 129 90 82
-        85 70 74 194 44 116 24 227 153 78 119 103 182 208 48 71 214
-        155 92 104 236 214 174 17 76 111 252 203 220 211 109 38 72
-        100 140 6 240 164 218 118 249 123 230 152 203 11 109 9 28
-        140 152 244 32 100 84 69 110 136 158 149 251 66 218 111 194
-        218 184 47 158 78 114 5 72 45 159 86 128 156 172 114 40 93
-        204 199 57 253 41 93 196 81 199 127 137 15 131 38 120 34
-        155 219 106 64 58 195 28 121 80 57 111 115 72 60 23 137 178
-        29 74 89 38 86 154 45 171 252 195 176 251 209 173 121 8 5
-        150 64 9 249 72 245 173 55 48 174 4 182 234 178 49 30 104
-        207 111 191 222 180 189 188 19 219 238 145 124 39 95 238
-        166 78 76 87 75 160 203 219 113 121 98 20 190 254 57 35 214
-        161 183 93 11 13 220 146 220 54 84 224 236 80 7 38 165 58
-        35 53 189 185 93 199 104 244 166 73 134 1 135 108 230 179
-        175 160 230 215 69 41 170 244 5 221 179 37 204 176 248 171
-        17 59 84 14 231 235 81 248 244 109 67 78 159 196 11 34 144
-        251 184 245 174 141 101 220 140 49 201 239 154 73 168 104
-        208 238 105 240 173 207 153 113 72 240 193 236 172 103 162
-        162 147 168 46 237 252 56 132 78 217 143 156 131 205 101
-        107 212 23 37 89 165 134 70 77 222 78 15 53 53 189 211 108
-        154 225 166 107 120 194 42 144 191 65 65 219 221 104 214 54
-        107 248 235 88 252 36 82 219 206 125 234 111 148 53 101 249
-        127 194 40 122 138 227 204 86 41 3 231 142 15 106 211 125
-        123 169 234 176 162 109 146 54 3 146 163 189 74 236 166 211
-        53 75 176 109 97 70 129 135 151 138 145 105 90 109 177 111
-        195 248 9 145 242 253 41 146 151 105 153 78 190 21 78 149
-        210 55 151 72 200 33 98 31 141 199 146 15 189 75 116 79 135
-        114 8 209 111 35 196 123 118 140 119 31 90 179 52 205 54 27
-        24 246 140 125 168 227 207 113 84 73 62 200 203 249 18 122
-        100 95 167 186 102 29 46 97 225 64 133 23 213 187 231 222
-        164 83 203 28 108 25 164 31 111 122 251 43 108 224 71 147
-        239 154 80 109 218 109 77 228 152 17 30 121 25 239 77 72
-        156 83 126 193 247 23 107 26 144 60 205 232 40 24 111 174
-        166 111 14 8 145 142 78 75 103 138 222 87 50 5 130 208 2 59
-        190 79 21 153 11 103 110 207 18 6 62 173 236 105 28 218 10
-        236 85 123 38 178 45 252 88 165 81 144 67 32 30 148 134 222
-        198 235 80 184 114 210 22 10 249 108 30 62 195 233 79 46 46
-        86 123 98 100 102 137 7 30 94 228 214 26 28 69 220 52 56 95
-        109 180 109 181 108 51 175 245 23 221 104 208 203 25 13 31
-        229 129 194 251 210 27 221 6 56 84 182 239 46 120 12 163 2
-        172 115 20 110 160 110 19 183 169 110 21 62 216 168 230 179
-        52 101 156 43 64 138 157 234 170 104 69 127 74 251 80 209
-        225 184 180 144 51 194 168 14 15 166 106 191 234 221 39 75
-        179 211 165 184 146 21 154 112 126 84 98 23 245 171 39 87
-        185 202 186 49 71 82 114 25 71 106 174 122 230 37 156 40 50
-        77 55 180 64 0 15 246 86 228 53 20 87 81 74 130 251 153 35
-        67 39 101 143 36 99 238 104 9 50 234 54 142 213 35 235 13
-        19 195 45 36 96 65 27 252 170 57 231 245 168 229 186 201 20
-        4 73 195 103 24 247 20 128 122 116 122 47 148 253 235 9 178
-        172 72 247 172 226 32 3 159 122 215 63 53 128 213 133 195
-        34 136 200 60 253 233 61 209 254 151 156 12 102 155 69 26
-        176 198 222 244 166 249 130 92 5 250 211 196 70 168 105 11
-        47 131 230 224 80 87 255 0 212 238 63 221 191 248 86 208
-        219 160 3 210 133 190 99 248 41 249 255 0 210 122 167 17 92
-        141 118 127 137 253 159 1 207 30 18 86 196 51 186 156 182
-        87 212 211 13 50 12 216 64 27 31 186 76 140 246 162 217 225
-        136 120 123 80 41 224 115 206 106 40 232 98 43 123 241 111
-        55 242 128 113 147 235 86 7 70 235 76 246 230 31 197 68 140
-        195 200 164 237 96 62 135 214 163 182 90 28 218 158 99 130
-        221 164 59 178 0 198 15 235 239 83 110 151 232 9 102 141 45
-        238 237 102 138 39 28 156 252 191 98 41 210 160 39 68 255 0
-        165 250 138 212 58 193 170 73 178 233 134 228 73 134 1 30
-        245 97 104 186 198 154 206 169 103 118 214 236 71 158 25
-        198 232 228 63 70 244 168 62 133 208 169 21 164 118 179 70
-        211 148 27 99 71 200 199 234 65 53 34 178 233 77 74 194 47
-        232 114 58 143 68 151 133 31 99 89 171 11 157 178 203 176
-        99 185 30 56 210 54 198 74 171 102 50 61 193 247 166 203
-        120 56 63 32 61 188 78 23 244 53 94 105 26 213 214 151 34
-        65 172 88 220 66 190 147 198 165 215 63 92 122 84 202 206
-        234 75 168 188 68 219 34 158 79 151 1 190 191 74 70 19 118
-        187 11 222 67 44 177 177 18 6 220 184 239 75 186 90 250 71
-        102 183 153 124 225 176 64 244 250 211 153 97 142 226 50
-        193 164 82 7 96 188 138 91 106 39 134 247 250 138 202 231
-        141 231 130 71 181 35 84 131 21 240 154 167 49 34 238 13
-        199 24 160 103 45 29 214 214 82 84 247 241 56 81 69 217 110
-        49 40 48 52 89 28 140 19 254 21 246 250 214 73 151 104 141
-        217 125 8 28 212 219 108 77 38 107 71 120 216 109 66 69 16
-        38 82 128 134 28 156 80 86 73 58 66 99 117 124 158 57 70
-        255 0 181 100 201 60 78 89 81 153 49 200 8 114 63 186 130
-        116 48 99 44 138 63 45 178 123 226 132 186 185 120 226 220
-        97 102 63 196 69 97 52 178 170 171 68 178 242 57 204 109
-        255 0 106 85 169 92 92 179 21 69 112 185 231 32 138 22 195
-        24 41 50 63 213 151 154 140 182 87 118 246 208 73 27 225
-        138 101 126 149 203 122 183 93 117 30 165 38 161 167 94 204
-        208 248 19 164 109 30 48 78 61 8 174 179 185 188 189 92 25
-        97 105 87 248 252 157 197 85 223 17 250 3 72 234 125 66 13
-        98 214 217 180 157 71 112 23 37 99 32 78 61 73 24 239 79 39
-        25 157 120 230 177 233 171 1 248 55 105 213 17 233 144 222
-        220 248 50 217 52 132 194 7 204 23 255 0 154 187 244 141 66
-        229 131 52 208 177 193 218 131 28 154 143 104 115 197 97
-        103 13 142 159 96 237 28 40 168 143 225 156 240 63 252 52
-        217 46 47 152 134 48 50 182 253 196 178 145 71 81 68 114 91
-        118 137 97 184 157 190 85 49 159 102 172 252 67 180 110 96
-        88 154 77 109 119 50 219 170 24 228 45 252 71 109 24 101
-        102 64 162 57 11 247 225 73 197 73 79 147 209 37 141 160
-        167 186 40 14 197 220 115 130 7 165 7 113 54 223 48 243 159
-        85 126 194 182 71 11 42 110 109 229 255 0 216 108 127 133
-        105 72 101 150 243 196 145 88 133 236 2 54 15 247 83 59 176
-        85 5 105 241 55 134 93 243 188 118 52 46 171 34 67 3 185
-        145 93 199 101 3 36 83 68 142 84 92 172 100 125 233 38 189
-        36 203 4 135 240 108 231 30 163 138 165 94 128 145 12 135
-        241 90 158 160 99 86 111 12 54 91 105 201 21 39 134 85 183
-        137 98 82 177 198 6 60 79 251 82 189 46 217 152 134 104 12
-        1 142 78 208 114 104 235 213 217 228 142 57 60 188 6 101
-        237 246 166 173 81 154 62 94 77 44 150 225 83 42 23 213 199
-        155 244 21 29 213 174 34 181 133 247 220 69 1 3 45 52 190
-        103 31 65 255 0 106 47 91 215 45 44 81 252 95 21 220 29 171
-        26 33 44 199 219 21 16 190 126 161 214 8 240 109 13 165 190
-        237 202 146 99 113 250 241 154 41 1 161 62 179 175 104 240
-        69 36 239 49 42 23 205 52 173 134 99 238 61 170 187 215 53
-        233 37 34 230 214 241 150 215 186 60 131 195 76 125 9 239
-        86 14 163 209 114 73 40 146 238 54 109 195 45 189 72 254
-        193 138 135 117 47 195 150 190 148 93 78 178 76 35 253 216
-        201 217 143 246 79 21 130 138 135 172 58 169 217 198 39 142
-        64 252 43 3 197 34 211 238 191 16 134 70 238 220 131 232 69
-        75 117 206 133 188 138 228 205 37 140 174 15 206 242 112
-        168 61 197 71 36 129 44 93 193 85 69 221 181 85 152 3 143
-        240 166 143 96 146 189 131 187 237 63 74 196 29 195 53 186
-        102 73 6 236 167 232 192 255 0 133 106 85 227 140 99 239 79
-        45 128 38 30 212 162 251 139 174 120 230 156 64 8 250 15
-        189 1 168 70 11 124 188 147 223 35 20 189 9 35 116 37 90
-        223 5 128 29 243 65 234 18 255 0 67 184 255 0 116 244 90 41
-        16 1 142 195 222 151 106 24 252 61 194 110 27 188 54 227 61
-        179 78 165 162 110 34 139 47 220 55 251 165 160 238 251 175
-        251 85 234 245 73 118 116 190 131 109 63 174 219 83 53 253
-        234 126 181 234 245 80 80 139 143 222 15 189 122 95 221 143
-        189 122 189 88 198 235 207 234 95 253 163 252 107 86 155
-        251 179 246 175 87 169 31 209 144 77 191 121 255 0 217 173
-        49 127 90 95 246 133 122 189 74 198 143 99 214 236 104 22
-        253 243 125 235 213 234 148 69 126 198 211 251 197 175 79
-        251 179 94 175 80 8 60 191 187 95 181 100 191 184 74 245
-        122 153 244 62 46 204 26 180 183 239 79 218 189 94 166 47
-        30 205 144 126 248 81 147 250 215 171 213 136 100 236 244
-        63 45 125 184 253 239 255 0 109 122 189 80 143 177 51 91
-        252 181 157 167 205 94 175 85 95 208 154 161 175 147 126
-        234 111 246 63 235 94 175 83 46 204 129 173 191 131 237 91
-        117 15 221 138 245 122 156 192 58 215 249 246 111 247 149
-        242 127 221 39 251 85 234 245 17 88 116 223 212 135 218 148
-        220 254 224 87 171 212 16 77 109 253 105 105 76 159 214 222
-        189 94 162 140 205 87 255 0 50 255 0 179 88 71 242 10 245
-        122 156 64 133 253 217 161 174 254 85 255 0 106 189 94 165
-        125 139 35 47 253 58 105 99 253 68 255 0 186 175 87 168 174
-        133 63 255 217 13 10 45 45 45 45 45 45 45 45 45 45 45 45 45
-        45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 49 49 51 55
-        53 50 50 53 48 51 49 52 52 49 50 56 50 51 50 55 49 54 53 51
-        49 55 50 57 13 10 67 111 110 116 101 110 116 45 68 105 115
-        112 111 115 105 116 105 111 110 58 32 102 111 114 109 45
-        100 97 116 97 59 32 110 97 109 101 61 34 102 105 108 101 50
-        34 59 32 102 105 108 101 110 97 109 101 61 34 116 101 115
-        116 46 116 120 116 34 13 10 67 111 110 116 101 110 116 45
-        84 121 112 101 58 32 116 101 120 116 47 112 108 97 105 110
-        13 10 13 10 116 101 115 116 10 13 10 45 45 45 45 45 45 45
-        45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45
-        45 45 49 49 51 55 53 50 50 53 48 51 49 52 52 49 50 56 50 51
-        50 55 49 54 53 51 49 55 50 57 13 10 67 111 110 116 101 110
-        116 45 68 105 115 112 111 115 105 116 105 111 110 58 32 102
-        111 114 109 45 100 97 116 97 59 32 110 97 109 101 61 34 102
-        105 108 101 51 34 59 32 102 105 108 101 110 97 109 101 61
-        34 34 13 10 67 111 110 116 101 110 116 45 84 121 112 101 58
-        32 97 112 112 108 105 99 97 116 105 111 110 47 111 99 116
-        101 116 45 115 116 114 101 97 109 13 10 13 10 13 10 45 45
-        45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45
-        45 45 45 45 45 45 45 49 49 51 55 53 50 50 53 48 51 49 52 52
-        49 50 56 50 51 50 55 49 54 53 51 49 55 50 57 45 45 13 10
-    } ;
-
-: test-file ( bytes -- seq )
-    binary <byte-reader> parse-multipart ;
-
-: test-file1 ( bytes -- ? )
-    test-file
-    first [ filename>> "dog.jpg" = ] [ name>> "file1" = ]
-    [ path>> md5 checksum-file B{ 172 192 179 2 18 210 155 156 115 186 169 30 147 51 91 82 } = ] tri and and ;
-
-: test-file2 ( bytes -- ? )
-    test-file
-    second [ filename>> "test.txt" = ] [ name>> "file2" = ]
-    [ path>> ascii file-contents "test\n" = ] tri and and ;
-
-: test-file3 ( bytes -- ? )
-    test-file
-    third [ filename>> "" = ]
-    [ name>> "file3" = ]
-    [ path>> file-info size>> 0 = ] tri and and ;
-
-[ t ] [ dog-test-empty-bytes-firefox test-file1 ] unit-test
-[ t ] [ dog-test-empty-bytes-firefox test-file2 ] unit-test
-[ t ] [ dog-test-empty-bytes-firefox test-file3 ] unit-test
-
-[ t ] [ dog-test-empty-bytes-safari test-file1 ] unit-test
-[ t ] [ dog-test-empty-bytes-safari test-file2 ] unit-test
-[ t ] [ dog-test-empty-bytes-safari test-file3 ] unit-test
old mode 100644 (file)
new mode 100755 (executable)
index 3e44f16..fc3024b
-! Copyright (C) 2008 Doug Coleman.
+! Copyright (C) 2009 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors combinators io kernel locals math multiline
-sequences splitting prettyprint namespaces http.parsers
-ascii assocs unicode.case io.files.unique io.files io.encodings.binary
-byte-arrays io.encodings make fry ;
+USING: multiline kernel sequences io splitting fry namespaces
+http.parsers hashtables assocs combinators ascii io.files.unique
+accessors io.encodings.binary io.files byte-arrays math
+io.streams.string combinators.short-circuit strings math.order ;
 IN: mime.multipart
 
-TUPLE: multipart-stream stream n leftover separator ;
+CONSTANT: buffer-size 65536
+CONSTANT: separator-prefix "\r\n--"
 
-: <multipart-stream> ( stream separator -- multipart-stream )
-    multipart-stream new
-        swap >>separator
-        swap >>stream
-        16 2^ >>n ;
+TUPLE: multipart
+end-of-stream?
+current-separator mime-separator
+header
+content-disposition bytes
+filename temp-file
+name name-content
+mime-parts ;
 
-<PRIVATE
+TUPLE: mime-file headers filename temporary-path ;
+TUPLE: mime-variable headers key value ;
 
-: ?append ( seq1 seq2 -- newseq/seq2 )
-    over [ append ] [ nip ] if ;
+: <multipart> ( mime-separator -- multipart )
+    multipart new
+        swap >>mime-separator
+        H{ } clone >>mime-parts ;
 
-: ?cut* ( seq n -- before after )
-    over length over <= [ drop f swap ] [ cut* ] if ;
-    
-: read-n ( stream -- bytes end-stream? )
-    [ f ] change-leftover
-    [ n>> ] [ stream>> ] bi stream-read [ ?append ] keep not ;
+ERROR: bad-header bytes ;
 
-: multipart-split ( bytes separator -- before after seq=? )
-    2dup sequence= [ 2drop f f t ] [ split1 f ] if ;
+: mime-write ( sequence -- )
+    >byte-array write ;
 
-:: multipart-step-found ( bytes stream quot: ( bytes -- ) -- ? )
-    bytes [ quot unless-empty ]
-    [ stream (>>leftover) quot unless-empty ] if-empty f ; inline
+: parse-headers ( string -- hashtable )
+    string-lines harvest [ parse-header-line ] map >hashtable ;
 
-:: multipart-step-not-found ( bytes stream end-stream? separator quot: ( bytes -- ) -- ? )
-    bytes end-stream? [
-        quot unless-empty f
-    ] [
-        separator length 1- ?cut* stream (>>leftover)
-        quot unless-empty t
-    ] if ; inline
-
-:: multipart-step ( stream bytes end-stream? separator quot: ( bytes -- ) -- ? end-stream? )
-    #! return t to loop again
-    bytes separator multipart-split
-    [ 2drop f ]
-    [
-        [ stream quot multipart-step-found ]
-        [ stream end-stream? separator quot multipart-step-not-found ] if*
-    ] if stream leftover>> end-stream? not or >boolean ;
+ERROR: end-of-stream multipart ;
 
+: fill-bytes ( multipart -- multipart )
+    buffer-size read
+    [ '[ _ append ] change-bytes ]
+    [ t >>end-of-stream? ] if* ;
 
-:: multipart-step-loop ( stream quot1: ( bytes -- ) -- ? )
-    stream dup [ read-n ] [ separator>> ] bi quot1 multipart-step
-    swap [ drop stream quot1 multipart-step-loop ] when ; inline recursive
+: maybe-fill-bytes ( multipart -- multipart )
+    dup bytes>> [ fill-bytes ] unless  ;
 
-SYMBOL: header
-SYMBOL: parsed-header
-SYMBOL: magic-separator
+: split-bytes ( bytes separator -- leftover-bytes safe-to-dump )
+    dupd [ length ] bi@ 1- - short cut-slice swap ;
 
-: trim-blanks ( str -- str' ) [ blank? ] trim ;
+: dump-until-separator ( multipart -- multipart )
+    dup
+    [ current-separator>> ] [ bytes>> ] bi
+    [ nip ] [ start ] 2bi [
+        cut-slice
+        [ mime-write ]
+        [ over current-separator>> length short tail-slice >>bytes ] bi*
+    ] [
+        drop
+        dup [ bytes>> ] [ current-separator>> ] bi split-bytes mime-write
+        >>bytes fill-bytes dup end-of-stream?>> [ dump-until-separator ] unless
+    ] if* ;
+
+: dump-string ( multipart separator -- multipart string )
+    >>current-separator
+    [ dump-until-separator ] with-string-writer ;
+
+: read-header ( multipart -- multipart )
+    dup bytes>> "--\r\n" sequence= [
+        t >>end-of-stream?
+    ] [
+        "\r\n\r\n" dump-string parse-headers >>header
+    ] if ;
 
-: trim-quotes ( str -- str' )
-    [ [ CHAR: " = ] [ CHAR: ' = ] bi or ] trim ;
+: empty-name? ( string -- ? )
+    { "''" "\"\"" "" f } member? ;
 
-: parse-content-disposition ( str -- content-disposition hash )
-    ";" split [ first ] [ rest-slice ] bi [ "=" split ] map
-    [ [ trim-blanks ] [ trim-quotes ] bi* ] H{ } assoc-map-as ;
+: quote? ( ch -- ? ) "'\"" member? ;
 
-: parse-multipart-header ( string -- headers )
-    "\r\n" split harvest
-    [ parse-header-line first2 ] H{ } map>assoc ;
+: quoted? ( str -- ? )
+    {
+        [ length 1 > ]
+        [ first quote? ]
+        [ [ first ] [ peek ] bi = ]
+    } 1&& ;
 
-ERROR: expected-file ;
+: unquote ( str -- newstr )
+    dup quoted? [ but-last-slice rest-slice >string ] when ;
 
-TUPLE: uploaded-file path filename name ;
+: save-uploaded-file ( multipart -- )
+    dup filename>> empty-name? [
+        drop
+    ] [
+        [ [ header>> ] [ filename>> ] [ temp-file>> ] tri mime-file boa ]
+        [ content-disposition>> "name" swap at unquote ]
+        [ mime-parts>> set-at ] tri
+    ] if ;
 
-: (parse-multipart) ( stream -- ? )
-    "\r\n\r\n" >>separator
-    header off
-    dup [ header [ prepend ] change ] multipart-step-loop drop
-    header get dup magic-separator get [ length ] bi@ < [
-        2drop f
+: save-mime-part ( multipart -- )
+    dup name>> empty-name? [
+        drop
     ] [
-        parse-multipart-header
-        parsed-header set
-        "\r\n" magic-separator get append >>separator
-        "factor-upload" "httpd" make-unique-file tuck
-        binary [ [ write ] multipart-step-loop ] with-file-writer swap
-        "content-disposition" parsed-header get at parse-content-disposition
-        nip [ "filename" swap at ] [ "name" swap at ] bi
-        uploaded-file boa ,
+        [ [ header>> ] [ name>> unquote ] [ name-content>> ] tri mime-variable boa ]
+        [ name>> unquote ]
+        [ mime-parts>> set-at ] tri
     ] if ;
 
-PRIVATE>
+: dump-mime-file ( multipart filename -- multipart )
+    binary <file-writer> [
+        dup mime-separator>> >>current-separator dump-until-separator
+    ] with-output-stream ;
+
+: dump-file ( multipart -- multipart )
+    "factor-" "-upload" make-unique-file
+    [ >>temp-file ] [ dump-mime-file ] bi ;
+
+: parse-content-disposition-form-data ( string -- hashtable )
+    ";" split
+    [ "=" split1 [ [ blank? ] trim ] bi@ ] H{ } map>assoc ;
 
-: parse-multipart ( stream -- array )
-    [
-        "\r\n" <multipart-stream>
-        magic-separator off
-        dup [ magic-separator [ prepend ] change ]
-            multipart-step-loop drop
-        '[ [ _ (parse-multipart) ] loop ] { } make
-    ] with-scope ;
+: lookup-disposition ( multipart string -- multipart value/f )
+    over content-disposition>> at ;
+
+ERROR: unknown-content-disposition multipart ;
+
+: parse-form-data ( multipart -- multipart )
+    "filename" lookup-disposition [
+        unquote
+        >>filename
+        [ dump-file ] [ save-uploaded-file ] bi
+    ] [
+        "name" lookup-disposition [
+            [ dup mime-separator>> dump-string >>name-content ] dip
+            >>name dup save-mime-part
+        ] [
+             unknown-content-disposition
+        ] if*
+    ] if* ;
+
+ERROR: no-content-disposition multipart ;
+
+: process-header ( multipart -- multipart )
+    "content-disposition" over header>> at ";" split1 swap {
+        { "form-data" [
+            parse-content-disposition-form-data >>content-disposition
+            parse-form-data
+        ] }
+        [ no-content-disposition ]
+    } case ;
+
+: assert-sequence= ( a b -- )
+    2dup sequence= [ 2drop ] [ assert ] if ;
+
+: read-assert-sequence= ( sequence -- )
+    [ length read ] keep assert-sequence= ;
+
+: parse-beginning ( multipart -- multipart )
+    "--" read-assert-sequence=
+    dup mime-separator>>
+    [ read-assert-sequence= ]
+    [ separator-prefix prepend >>mime-separator ] bi ;
+
+: parse-multipart-loop ( multipart -- multipart )
+    read-header
+    dup end-of-stream?>> [ process-header parse-multipart-loop ] unless ;
+
+: parse-multipart ( separator -- mime-parts )
+    <multipart> parse-beginning fill-bytes parse-multipart-loop
+    mime-parts>> ;
index bb0d674f23b2995e61782a9690933bb0b9a5f53e..ac5233c543292b16e764aa966ed2622bc5ba2e11 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2004, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io.files io.encodings.ascii assocs sequences splitting
-kernel namespaces fry memoize ;
+USING: io.pathnames io.files io.encodings.ascii assocs sequences
+splitting kernel namespaces fry memoize ;
 IN: mime.types
 
 MEMO: mime-db ( -- seq )
index d6a8d51fbebfb5d8cfd6a2ad0a3755addb84793e..e498919f1178e0f484d221d4271538a656593a77 100644 (file)
@@ -20,7 +20,7 @@ $nl
 $nl
 "Mirrors are created by calling " { $link <mirror> } " or " { $link make-mirror } "." } ;
 
-HELP: <mirror> ( object -- mirror )
+HELP: <mirror>
 { $values { "object" object } { "mirror" mirror } } 
 { $description "Creates a " { $link mirror } " reflecting an object." }
 { $examples
index d3d6dbdb04259aa32577c60cf23b4af5615c3cc8..25486d127deb83c5bfc1ebd8b6e6d53ee545a139 100644 (file)
@@ -32,7 +32,7 @@ M: mirror set-at ( val key mirror -- )
     swap set-slot ;
 
 M: mirror delete-at ( key mirror -- )
-    f -rot set-at ;
+    [ f ] 2dip set-at ;
 
 M: mirror clear-assoc ( mirror -- )
     [ object>> ] [ object-slots ] bi [
index 16a5ab339c7284927ccc3c8c0a29cc0ab9d71b2c..0644bb68411ba93e7ae7241903a560bfdc138888 100644 (file)
@@ -1,5 +1,5 @@
 USING: arrays generic kernel math models namespaces sequences assocs\r
-tools.test models.compose accessors ;\r
+tools.test models.compose accessors locals ;\r
 IN: models.compose.tests\r
 \r
 ! Test compose\r
@@ -22,3 +22,25 @@ IN: models.compose.tests
 [ { 4 5 } ] [ "c" get value>> ] unit-test\r
 \r
 [ ] [ "c" get deactivate-model ] unit-test\r
+\r
+TUPLE: an-observer { i integer } ;\r
+\r
+M: an-observer model-changed nip [ 1+ ] change-i drop ;\r
+\r
+[ 1 0 ] [\r
+    [let* | m1 [ 1 <model> ]\r
+            m2 [ 2 <model> ]\r
+            c [ { m1 m2 } <compose> ]\r
+            o1 [ an-observer new ]\r
+            o2 [ an-observer new ] |\r
+        \r
+        o1 m1 add-connection\r
+        o2 m2 add-connection\r
+\r
+        c activate-model\r
+    \r
+        "OH HAI" m1 set-model\r
+        o1 i>>\r
+        o2 i>>\r
+    ]\r
+] unit-test
\ No newline at end of file
index a2c3385248bcc1fae857c403a95575016c767a8a..386a06781df121390e3e9cb17cc7cdad0dbf1de3 100644 (file)
@@ -18,7 +18,8 @@ TUPLE: compose < model ;
 \r
 M: compose model-changed\r
     nip\r
-    [ [ value>> ] composed-value ] keep set-model ;\r
+    dup [ value>> ] composed-value >>value\r
+    notify-connections ;\r
 \r
 M: compose model-activated dup model-changed ;\r
 \r
index 357fd2cb6c15069100bd4e1b10169d764ae540da..153b6cedbe7b3709bd0c999bfb535725b7915e18 100644 (file)
@@ -14,3 +14,8 @@ bar
 
 [ "hello\nworld" ] [ <" hello
 world"> ] unit-test
+
+[ "hello" "world" ] [ <" hello"> <" world"> ] unit-test
+
+[ "\nhi" ] [ <"
+hi"> ] unit-test
index 64d4b1a041ef0aebf1fc4fdc5e16579845690665..53c2789c50b669eb8355c5a30eebfb48a9b2b015 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2007 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
 USING: namespaces make parser lexer kernel sequences words
-quotations math accessors ;
+quotations math accessors locals ;
 IN: multiline
 
 <PRIVATE
@@ -22,25 +22,42 @@ PRIVATE>
 
 : STRING:
     CREATE-WORD
-    parse-here 1quotation define-inline ; parsing
+    parse-here 1quotation
+    (( -- string )) define-inline ; parsing
 
 <PRIVATE
-: (parse-multiline-string) ( start-index end-text -- end-index )
-    lexer get line-text>> [
-        2dup start
-        [ rot dupd [ swap subseq % ] 2dip length + ] [
-            rot tail % "\n" % 0
-            lexer get next-line swap (parse-multiline-string)
+
+:: (parse-multiline-string) ( i end -- j )
+    lexer get line-text>> :> text
+    text [
+        end text i start* [| j |
+            i j text subseq % j end length +
+        ] [
+            text i short tail % CHAR: \n ,
+            lexer get next-line
+            0 end (parse-multiline-string)
         ] if*
-    ] [ nip unexpected-eof ] if* ;
+    ] [ end unexpected-eof ] if ;
+        
 PRIVATE>
 
 : parse-multiline-string ( end-text -- str )
     [
-        lexer get [ swap (parse-multiline-string) ] change-column drop
-    ] "" make rest ;
+        lexer get
+        [ 1+ swap (parse-multiline-string) ]
+        change-column drop
+    ] "" make ;
 
 : <"
     "\">" parse-multiline-string parsed ; parsing
 
+: <'
+    "'>" parse-multiline-string parsed ; parsing
+
+: {'
+    "'}" parse-multiline-string parsed ; parsing
+
+: {"
+    "\"}" parse-multiline-string parsed ; parsing
+
 : /* "*/" parse-multiline-string drop ; parsing
index 82643bef154a72488ca922931ef95acb344eeb05..d1ab0a34c1c50fa3384a7f1d5678ca88165f539a 100644 (file)
@@ -12,7 +12,7 @@ TUPLE: nibble-array
 
 : nibble BIN: 1111 ; inline
 
-: nibbles>bytes 1 + 2/ ; inline
+: nibbles>bytes ( m -- n ) 1 + 2/ ; inline
 
 : byte/nibble ( n -- shift n' )
     [ 1 bitand 2 shift ] [ -1 shift ] bi ; inline
diff --git a/basis/opengl/capabilities/authors.txt b/basis/opengl/capabilities/authors.txt
new file mode 100644 (file)
index 0000000..6a0dc72
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
\ No newline at end of file
diff --git a/basis/opengl/capabilities/capabilities-docs.factor b/basis/opengl/capabilities/capabilities-docs.factor
new file mode 100644 (file)
index 0000000..f5424e1
--- /dev/null
@@ -0,0 +1,59 @@
+USING: help.markup help.syntax io kernel math quotations
+opengl.gl multiline assocs ;
+IN: opengl.capabilities
+
+HELP: gl-version
+{ $values { "version" "The version string from the OpenGL implementation" } }
+{ $description "Wrapper for " { $snippet "GL_VERSION glGetString" } " that removes the vendor-specific information from the version string." } ;
+
+HELP: gl-vendor-version
+{ $values { "version" "The vendor-specific version information from the OpenGL implementation" } }
+{ $description "Wrapper for " { $snippet "GL_VERSION glGetString" } " that returns only the vendor-specific information from the version string." } ;
+
+HELP: has-gl-version?
+{ $values { "version" "A version string" } { "?" "A boolean value" } }
+{ $description "Compares the version string returned by " { $link gl-version } " to " { $snippet "version" } ". Returns true if the implementation version meets or exceeds " { $snippet "version" } "." } ;
+
+HELP: require-gl-version
+{ $values { "version" "A version string" } }
+{ $description "Throws an exception if " { $link has-gl-version? } " returns false for " { $snippet "version" } "." } ;
+
+HELP: glsl-version
+{ $values { "version" "The GLSL version string from the OpenGL implementation" } }
+{ $description "Wrapper for " { $snippet "GL_SHADING_LANGUAGE_VERSION glGetString" } " that removes the vendor-specific information from the version string." } ;
+
+HELP: glsl-vendor-version
+{ $values { "version" "The vendor-specific GLSL version information from the OpenGL implementation" } }
+{ $description "Wrapper for " { $snippet "GL_SHADING_LANGUAGE_VERSION glGetString" } " that returns only the vendor-specific information from the version string." } ;
+
+HELP: has-glsl-version?
+{ $values { "version" "A version string" } { "?" "A boolean value" } }
+{ $description "Compares the version string returned by " { $link glsl-version } " to " { $snippet "version" } ". Returns true if the implementation version meets or exceeds " { $snippet "version" } "." } ;
+
+HELP: require-glsl-version
+{ $values { "version" "A version string" } }
+{ $description "Throws an exception if " { $link has-glsl-version? } " returns false for " { $snippet "version" } "." } ;
+
+HELP: gl-extensions
+{ $values { "seq" "A sequence of strings naming the implementation-supported OpenGL extensions" } }
+{ $description "Wrapper for " { $snippet "GL_EXTENSIONS glGetString" } " that returns a sequence of extension names supported by the OpenGL implementation." } ;
+
+HELP: has-gl-extensions?
+{ $values { "extensions" "A sequence of extension name strings" } { "?" "A boolean value" } }
+{ $description "Returns true if the set of " { $snippet "extensions" } " is a subset of the implementation-supported extensions returned by " { $link gl-extensions } "." } ;
+
+HELP: has-gl-version-or-extensions?
+{ $values { "version" "A version string" } { "extensions" "A sequence of extension name strings" } { "?" "a boolean" } }
+{ $description "Returns true if either " { $link has-gl-version? } " or " { $link has-gl-extensions? } " returns true for " { $snippet "version" } " or " { $snippet "extensions" } ", respectively. Intended for use when required OpenGL functionality can be verified either by a minimum version or a set of equivalent extensions." } ;
+
+HELP: require-gl-extensions
+{ $values { "extensions" "A sequence of extension name strings" } }
+{ $description "Throws an exception if " { $link has-gl-extensions? } " returns false for " { $snippet "extensions" } "." } ;
+
+HELP: require-gl-version-or-extensions
+{ $values { "version" "A version string" } { "extensions" "A sequence of extension name strings" } }
+{ $description "Throws an exception if neither " { $link has-gl-version? } " nor " { $link has-gl-extensions? } " returns true for " { $snippet "version" } " or " { $snippet "extensions" } ", respectively. Intended for use when required OpenGL functionality can be verified either by a minimum version or a set of equivalent extensions." } ;
+
+{ require-gl-version require-glsl-version require-gl-extensions require-gl-version-or-extensions has-gl-version? has-glsl-version? has-gl-extensions? has-gl-version-or-extensions? gl-version glsl-version gl-extensions } related-words
+
+ABOUT: "gl-utilities"
diff --git a/basis/opengl/capabilities/capabilities.factor b/basis/opengl/capabilities/capabilities.factor
new file mode 100755 (executable)
index 0000000..09d49b3
--- /dev/null
@@ -0,0 +1,64 @@
+! Copyright (C) 2008 Joe Groff.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel namespaces make sequences splitting opengl.gl
+continuations math.parser math arrays sets math.order fry ;
+IN: opengl.capabilities
+
+: (require-gl) ( thing require-quot make-error-quot -- )
+    [ dupd call [ drop ] ] dip '[ _ " " make throw ] if ; inline
+
+: gl-extensions ( -- seq )
+    GL_EXTENSIONS glGetString " " split ;
+: has-gl-extensions? ( extensions -- ? )
+    gl-extensions swap [ over member? ] all? nip ;
+: (make-gl-extensions-error) ( required-extensions -- )
+    gl-extensions diff
+    "Required OpenGL extensions not supported:\n" %
+    [ "    " % % "\n" % ] each ;
+: require-gl-extensions ( extensions -- )
+    [ has-gl-extensions? ]
+    [ (make-gl-extensions-error) ]
+    (require-gl) ;
+
+: version-seq ( version-string -- version-seq )
+    "." split [ string>number ] map ;
+
+: version-before? ( version1 version2 -- ? )
+    swap version-seq swap version-seq before=? ;
+
+: (gl-version) ( -- version vendor )
+    GL_VERSION glGetString " " split1 ;
+: gl-version ( -- version )
+    (gl-version) drop ;
+: gl-vendor-version ( -- version )
+    (gl-version) nip ;
+: has-gl-version? ( version -- ? )
+    gl-version version-before? ;
+: (make-gl-version-error) ( required-version -- )
+    "Required OpenGL version " % % " not supported (" % gl-version % " available)" % ;
+: require-gl-version ( version -- )
+    [ has-gl-version? ]
+    [ (make-gl-version-error) ]
+    (require-gl) ;
+
+: (glsl-version) ( -- version vendor )
+    GL_SHADING_LANGUAGE_VERSION glGetString " " split1 ;
+: glsl-version ( -- version )
+    (glsl-version) drop ;
+: glsl-vendor-version ( -- version )
+    (glsl-version) nip ;
+: has-glsl-version? ( version -- ? )
+    glsl-version version-before? ;
+: require-glsl-version ( version -- )
+    [ has-glsl-version? ]
+    [ "Required GLSL version " % % " not supported (" % glsl-version % " available)" % ]
+    (require-gl) ;
+
+: has-gl-version-or-extensions? ( version extensions -- ? )
+    has-gl-extensions? swap has-gl-version? or ;
+
+: require-gl-version-or-extensions ( version extensions -- )
+    2array [ first2 has-gl-version-or-extensions? ] [
+        dup first (make-gl-version-error) "\n" %
+        second (make-gl-extensions-error) "\n" %
+    ] (require-gl) ;
diff --git a/basis/opengl/capabilities/summary.txt b/basis/opengl/capabilities/summary.txt
new file mode 100644 (file)
index 0000000..d31b63b
--- /dev/null
@@ -0,0 +1 @@
+Testing for OpenGL versions and extensions
\ No newline at end of file
diff --git a/basis/opengl/capabilities/tags.txt b/basis/opengl/capabilities/tags.txt
new file mode 100644 (file)
index 0000000..77282be
--- /dev/null
@@ -0,0 +1,2 @@
+opengl
+bindings
diff --git a/basis/opengl/framebuffers/authors.txt b/basis/opengl/framebuffers/authors.txt
new file mode 100644 (file)
index 0000000..6a0dc72
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
\ No newline at end of file
diff --git a/basis/opengl/framebuffers/framebuffers-docs.factor b/basis/opengl/framebuffers/framebuffers-docs.factor
new file mode 100644 (file)
index 0000000..c5507dc
--- /dev/null
@@ -0,0 +1,35 @@
+USING: help.markup help.syntax io kernel math quotations
+opengl.gl multiline assocs ;
+IN: opengl.framebuffers
+
+HELP: gen-framebuffer
+{ $values { "id" integer } }
+{ $description "Wrapper for " { $link glGenFramebuffersEXT } " to handle the common case of generating a single framebuffer ID." } ;
+
+HELP: gen-renderbuffer
+{ $values { "id" integer } }
+{ $description "Wrapper for " { $link glGenRenderbuffersEXT } " to handle the common case of generating a single render buffer ID." } ;
+
+HELP: delete-framebuffer
+{ $values { "id" integer } }
+{ $description "Wrapper for " { $link glDeleteFramebuffersEXT } " to handle the common case of deleting a single framebuffer ID." } ;
+
+HELP: delete-renderbuffer
+{ $values { "id" integer } }
+{ $description "Wrapper for " { $link glDeleteRenderbuffersEXT } " to handle the common case of deleting a single render buffer ID." } ;
+
+{ gen-framebuffer delete-framebuffer } related-words
+{ gen-renderbuffer delete-renderbuffer } related-words
+
+HELP: framebuffer-incomplete?
+{ $values { "status/f" "The framebuffer error code, or " { $snippet "f" } " if the framebuffer is render-complete." } }
+{ $description "Checks the framebuffer currently bound by " { $link glBindFramebufferEXT } " or " { $link with-framebuffer } " to see if it is incomplete, i.e., it is not ready to be rendered to." } ;
+
+HELP: check-framebuffer
+{ $description "Checks the framebuffer currently bound by " { $link glBindFramebufferEXT } " or " { $link with-framebuffer } " with " { $link framebuffer-incomplete? } ", and throws a descriptive error if the framebuffer is incomplete." } ;
+
+HELP: with-framebuffer
+{ $values { "id" "The id of a framebuffer object." } { "quot" "a quotation" } }
+{ $description "Binds framebuffer " { $snippet "id" } " in the dynamic extent of " { $snippet "quot" } ", restoring the window framebuffer when finished." } ;
+
+ABOUT: "gl-utilities"
\ No newline at end of file
diff --git a/basis/opengl/framebuffers/framebuffers.factor b/basis/opengl/framebuffers/framebuffers.factor
new file mode 100644 (file)
index 0000000..346789e
--- /dev/null
@@ -0,0 +1,43 @@
+! Copyright (C) 2008 Joe Groff.
+! See http://factorcode.org/license.txt for BSD license.
+USING: opengl opengl.gl combinators continuations kernel
+alien.c-types ;
+IN: opengl.framebuffers
+
+: gen-framebuffer ( -- id )
+    [ glGenFramebuffersEXT ] (gen-gl-object) ;
+: gen-renderbuffer ( -- id )
+    [ glGenRenderbuffersEXT ] (gen-gl-object) ;
+
+: delete-framebuffer ( id -- )
+    [ glDeleteFramebuffersEXT ] (delete-gl-object) ;
+: delete-renderbuffer ( id -- )
+    [ glDeleteRenderbuffersEXT ] (delete-gl-object) ;
+
+: framebuffer-incomplete? ( -- status/f )
+    GL_FRAMEBUFFER_EXT glCheckFramebufferStatusEXT
+    dup GL_FRAMEBUFFER_COMPLETE_EXT = f rot ? ;
+
+: framebuffer-error ( status -- * )
+    { 
+        { GL_FRAMEBUFFER_COMPLETE_EXT [ "framebuffer complete" ] }
+        { GL_FRAMEBUFFER_UNSUPPORTED_EXT [ "framebuffer configuration unsupported" ] }
+        { GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT [ "framebuffer incomplete (incomplete attachment)" ] }
+        { GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT [ "framebuffer incomplete (missing attachment)" ] }
+        { GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT [ "framebuffer incomplete (dimension mismatch)" ] }
+        { GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT [ "framebuffer incomplete (format mismatch)" ] }
+        { GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT [ "framebuffer incomplete (draw buffer(s) have no attachment)" ] }
+        { GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT [ "framebuffer incomplete (read buffer has no attachment)" ] }
+        [ drop gl-error "unknown framebuffer error" ]
+    } case throw ;
+
+: check-framebuffer ( -- )
+    framebuffer-incomplete? [ framebuffer-error ] when* ;
+
+: with-framebuffer ( id quot -- )
+    GL_FRAMEBUFFER_EXT rot glBindFramebufferEXT
+    [ GL_FRAMEBUFFER_EXT 0 glBindFramebufferEXT ] [ ] cleanup ; inline
+
+: framebuffer-attachment ( attachment -- id )
+    GL_FRAMEBUFFER_EXT swap GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT
+    0 <uint> [ glGetFramebufferAttachmentParameterivEXT ] keep *uint ;
diff --git a/basis/opengl/framebuffers/summary.txt b/basis/opengl/framebuffers/summary.txt
new file mode 100644 (file)
index 0000000..3ef713a
--- /dev/null
@@ -0,0 +1 @@
+Rendering to offscreen textures using the GL_EXT_framebuffer_object extension
\ No newline at end of file
diff --git a/basis/opengl/framebuffers/tags.txt b/basis/opengl/framebuffers/tags.txt
new file mode 100644 (file)
index 0000000..77282be
--- /dev/null
@@ -0,0 +1,2 @@
+opengl
+bindings
index ea37829d0ee13537cbf78a8993b602a4cfe2546e..fb2ddfaf3e411498e22f449a7fb13d98d5e9c74b 100644 (file)
@@ -1,6 +1,6 @@
 USING: alien alien.syntax alien.parser combinators
 kernel parser sequences system words namespaces hashtables init
-math arrays assocs continuations lexer fry locals ;
+math arrays assocs continuations lexer fry locals vocabs.parser ;
 IN: opengl.gl.extensions
 
 ERROR: unknown-gl-platform ;
index 59b2422d731e1c1333689e48b3ed393bc144595e..c32f62bf33d1815e1fd5ec4420906bdaf74a3f9c 100644 (file)
@@ -27,603 +27,599 @@ TYPEDEF: void*   GLvoid*
 ! Constants
 
 ! Boolean values
-: GL_FALSE                          HEX: 0 ; inline
-: GL_TRUE                           HEX: 1 ; inline
+CONSTANT: GL_FALSE                          HEX: 0
+CONSTANT: GL_TRUE                           HEX: 1
 
 ! Data types
-: GL_BYTE                           HEX: 1400 ; inline
-: GL_UNSIGNED_BYTE                  HEX: 1401 ; inline
-: GL_SHORT                          HEX: 1402 ; inline
-: GL_UNSIGNED_SHORT                 HEX: 1403 ; inline
-: GL_INT                            HEX: 1404 ; inline
-: GL_UNSIGNED_INT                   HEX: 1405 ; inline
-: GL_FLOAT                          HEX: 1406 ; inline
-: GL_2_BYTES                        HEX: 1407 ; inline
-: GL_3_BYTES                        HEX: 1408 ; inline
-: GL_4_BYTES                        HEX: 1409 ; inline
-: GL_DOUBLE                         HEX: 140A ; inline
+CONSTANT: GL_BYTE                           HEX: 1400
+CONSTANT: GL_UNSIGNED_BYTE                  HEX: 1401
+CONSTANT: GL_SHORT                          HEX: 1402
+CONSTANT: GL_UNSIGNED_SHORT                 HEX: 1403
+CONSTANT: GL_INT                            HEX: 1404
+CONSTANT: GL_UNSIGNED_INT                   HEX: 1405
+CONSTANT: GL_FLOAT                          HEX: 1406
+CONSTANT: GL_2_BYTES                        HEX: 1407
+CONSTANT: GL_3_BYTES                        HEX: 1408
+CONSTANT: GL_4_BYTES                        HEX: 1409
+CONSTANT: GL_DOUBLE                         HEX: 140A
 
 ! Primitives
-: GL_POINTS                         HEX: 0000 ; inline
-: GL_LINES                          HEX: 0001 ; inline
-: GL_LINE_LOOP                      HEX: 0002 ; inline
-: GL_LINE_STRIP                     HEX: 0003 ; inline
-: GL_TRIANGLES                      HEX: 0004 ; inline
-: GL_TRIANGLE_STRIP                 HEX: 0005 ; inline
-: GL_TRIANGLE_FAN                   HEX: 0006 ; inline
-: GL_QUADS                          HEX: 0007 ; inline
-: GL_QUAD_STRIP                     HEX: 0008 ; inline
-: GL_POLYGON                        HEX: 0009 ; inline
+CONSTANT: GL_POINTS                         HEX: 0000
+CONSTANT: GL_LINES                          HEX: 0001
+CONSTANT: GL_LINE_LOOP                      HEX: 0002
+CONSTANT: GL_LINE_STRIP                     HEX: 0003
+CONSTANT: GL_TRIANGLES                      HEX: 0004
+CONSTANT: GL_TRIANGLE_STRIP                 HEX: 0005
+CONSTANT: GL_TRIANGLE_FAN                   HEX: 0006
+CONSTANT: GL_QUADS                          HEX: 0007
+CONSTANT: GL_QUAD_STRIP                     HEX: 0008
+CONSTANT: GL_POLYGON                        HEX: 0009
 
 ! Vertex arrays
-: GL_VERTEX_ARRAY                   HEX: 8074 ; inline
-: GL_NORMAL_ARRAY                   HEX: 8075 ; inline
-: GL_COLOR_ARRAY                    HEX: 8076 ; inline
-: GL_INDEX_ARRAY                    HEX: 8077 ; inline
-: GL_TEXTURE_COORD_ARRAY            HEX: 8078 ; inline
-: GL_EDGE_FLAG_ARRAY                HEX: 8079 ; inline
-: GL_VERTEX_ARRAY_SIZE              HEX: 807A ; inline
-: GL_VERTEX_ARRAY_TYPE              HEX: 807B ; inline
-: GL_VERTEX_ARRAY_STRIDE            HEX: 807C ; inline
-: GL_NORMAL_ARRAY_TYPE              HEX: 807E ; inline
-: GL_NORMAL_ARRAY_STRIDE            HEX: 807F ; inline
-: GL_COLOR_ARRAY_SIZE               HEX: 8081 ; inline
-: GL_COLOR_ARRAY_TYPE               HEX: 8082 ; inline
-: GL_COLOR_ARRAY_STRIDE             HEX: 8083 ; inline
-: GL_INDEX_ARRAY_TYPE               HEX: 8085 ; inline
-: GL_INDEX_ARRAY_STRIDE             HEX: 8086 ; inline
-: GL_TEXTURE_COORD_ARRAY_SIZE       HEX: 8088 ; inline
-: GL_TEXTURE_COORD_ARRAY_TYPE       HEX: 8089 ; inline
-: GL_TEXTURE_COORD_ARRAY_STRIDE     HEX: 808A ; inline
-: GL_EDGE_FLAG_ARRAY_STRIDE         HEX: 808C ; inline
-: GL_VERTEX_ARRAY_POINTER           HEX: 808E ; inline
-: GL_NORMAL_ARRAY_POINTER           HEX: 808F ; inline
-: GL_COLOR_ARRAY_POINTER            HEX: 8090 ; inline
-: GL_INDEX_ARRAY_POINTER            HEX: 8091 ; inline
-: GL_TEXTURE_COORD_ARRAY_POINTER    HEX: 8092 ; inline
-: GL_EDGE_FLAG_ARRAY_POINTER        HEX: 8093 ; inline
-: GL_V2F                            HEX: 2A20 ; inline
-: GL_V3F                            HEX: 2A21 ; inline
-: GL_C4UB_V2F                       HEX: 2A22 ; inline
-: GL_C4UB_V3F                       HEX: 2A23 ; inline
-: GL_C3F_V3F                        HEX: 2A24 ; inline
-: GL_N3F_V3F                        HEX: 2A25 ; inline
-: GL_C4F_N3F_V3F                    HEX: 2A26 ; inline
-: GL_T2F_V3F                        HEX: 2A27 ; inline
-: GL_T4F_V4F                        HEX: 2A28 ; inline
-: GL_T2F_C4UB_V3F                   HEX: 2A29 ; inline
-: GL_T2F_C3F_V3F                    HEX: 2A2A ; inline
-: GL_T2F_N3F_V3F                    HEX: 2A2B ; inline
-: GL_T2F_C4F_N3F_V3F                HEX: 2A2C ; inline
-: GL_T4F_C4F_N3F_V4F                HEX: 2A2D ; inline
+CONSTANT: GL_VERTEX_ARRAY                   HEX: 8074
+CONSTANT: GL_NORMAL_ARRAY                   HEX: 8075
+CONSTANT: GL_COLOR_ARRAY                    HEX: 8076
+CONSTANT: GL_INDEX_ARRAY                    HEX: 8077
+CONSTANT: GL_TEXTURE_COORD_ARRAY            HEX: 8078
+CONSTANT: GL_EDGE_FLAG_ARRAY                HEX: 8079
+CONSTANT: GL_VERTEX_ARRAY_SIZE              HEX: 807A
+CONSTANT: GL_VERTEX_ARRAY_TYPE              HEX: 807B
+CONSTANT: GL_VERTEX_ARRAY_STRIDE            HEX: 807C
+CONSTANT: GL_NORMAL_ARRAY_TYPE              HEX: 807E
+CONSTANT: GL_NORMAL_ARRAY_STRIDE            HEX: 807F
+CONSTANT: GL_COLOR_ARRAY_SIZE               HEX: 8081
+CONSTANT: GL_COLOR_ARRAY_TYPE               HEX: 8082
+CONSTANT: GL_COLOR_ARRAY_STRIDE             HEX: 8083
+CONSTANT: GL_INDEX_ARRAY_TYPE               HEX: 8085
+CONSTANT: GL_INDEX_ARRAY_STRIDE             HEX: 8086
+CONSTANT: GL_TEXTURE_COORD_ARRAY_SIZE       HEX: 8088
+CONSTANT: GL_TEXTURE_COORD_ARRAY_TYPE       HEX: 8089
+CONSTANT: GL_TEXTURE_COORD_ARRAY_STRIDE     HEX: 808A
+CONSTANT: GL_EDGE_FLAG_ARRAY_STRIDE         HEX: 808C
+CONSTANT: GL_VERTEX_ARRAY_POINTER           HEX: 808E
+CONSTANT: GL_NORMAL_ARRAY_POINTER           HEX: 808F
+CONSTANT: GL_COLOR_ARRAY_POINTER            HEX: 8090
+CONSTANT: GL_INDEX_ARRAY_POINTER            HEX: 8091
+CONSTANT: GL_TEXTURE_COORD_ARRAY_POINTER    HEX: 8092
+CONSTANT: GL_EDGE_FLAG_ARRAY_POINTER        HEX: 8093
+CONSTANT: GL_V2F                            HEX: 2A20
+CONSTANT: GL_V3F                            HEX: 2A21
+CONSTANT: GL_C4UB_V2F                       HEX: 2A22
+CONSTANT: GL_C4UB_V3F                       HEX: 2A23
+CONSTANT: GL_C3F_V3F                        HEX: 2A24
+CONSTANT: GL_N3F_V3F                        HEX: 2A25
+CONSTANT: GL_C4F_N3F_V3F                    HEX: 2A26
+CONSTANT: GL_T2F_V3F                        HEX: 2A27
+CONSTANT: GL_T4F_V4F                        HEX: 2A28
+CONSTANT: GL_T2F_C4UB_V3F                   HEX: 2A29
+CONSTANT: GL_T2F_C3F_V3F                    HEX: 2A2A
+CONSTANT: GL_T2F_N3F_V3F                    HEX: 2A2B
+CONSTANT: GL_T2F_C4F_N3F_V3F                HEX: 2A2C
+CONSTANT: GL_T4F_C4F_N3F_V4F                HEX: 2A2D
 
 ! Matrix mode
-: GL_MATRIX_MODE                    HEX: 0BA0 ; inline
-: GL_MODELVIEW                      HEX: 1700 ; inline
-: GL_PROJECTION                     HEX: 1701 ; inline
-: GL_TEXTURE                        HEX: 1702 ; inline
+CONSTANT: GL_MATRIX_MODE                    HEX: 0BA0
+CONSTANT: GL_MODELVIEW                      HEX: 1700
+CONSTANT: GL_PROJECTION                     HEX: 1701
+CONSTANT: GL_TEXTURE                        HEX: 1702
 
 ! Points
-: GL_POINT_SMOOTH                   HEX: 0B10 ; inline
-: GL_POINT_SIZE                     HEX: 0B11 ; inline
-: GL_POINT_SIZE_GRANULARITY         HEX: 0B13 ; inline
-: GL_POINT_SIZE_RANGE               HEX: 0B12 ; inline
+CONSTANT: GL_POINT_SMOOTH                   HEX: 0B10
+CONSTANT: GL_POINT_SIZE                     HEX: 0B11
+CONSTANT: GL_POINT_SIZE_GRANULARITY         HEX: 0B13
+CONSTANT: GL_POINT_SIZE_RANGE               HEX: 0B12
 
 ! Lines
-: GL_LINE_SMOOTH                    HEX: 0B20 ; inline
-: GL_LINE_STIPPLE                   HEX: 0B24 ; inline
-: GL_LINE_STIPPLE_PATTERN           HEX: 0B25 ; inline
-: GL_LINE_STIPPLE_REPEAT            HEX: 0B26 ; inline
-: GL_LINE_WIDTH                     HEX: 0B21 ; inline
-: GL_LINE_WIDTH_GRANULARITY         HEX: 0B23 ; inline
-: GL_LINE_WIDTH_RANGE               HEX: 0B22 ; inline
+CONSTANT: GL_LINE_SMOOTH                    HEX: 0B20
+CONSTANT: GL_LINE_STIPPLE                   HEX: 0B24
+CONSTANT: GL_LINE_STIPPLE_PATTERN           HEX: 0B25
+CONSTANT: GL_LINE_STIPPLE_REPEAT            HEX: 0B26
+CONSTANT: GL_LINE_WIDTH                     HEX: 0B21
+CONSTANT: GL_LINE_WIDTH_GRANULARITY         HEX: 0B23
+CONSTANT: GL_LINE_WIDTH_RANGE               HEX: 0B22
 
 ! Polygons
-: GL_POINT                          HEX: 1B00 ; inline
-: GL_LINE                           HEX: 1B01 ; inline
-: GL_FILL                           HEX: 1B02 ; inline
-: GL_CW                             HEX: 0900 ; inline
-: GL_CCW                            HEX: 0901 ; inline
-: GL_FRONT                          HEX: 0404 ; inline
-: GL_BACK                           HEX: 0405 ; inline
-: GL_POLYGON_MODE                   HEX: 0B40 ; inline
-: GL_POLYGON_SMOOTH                 HEX: 0B41 ; inline
-: GL_POLYGON_STIPPLE                HEX: 0B42 ; inline
-: GL_EDGE_FLAG                      HEX: 0B43 ; inline
-: GL_CULL_FACE                      HEX: 0B44 ; inline
-: GL_CULL_FACE_MODE                 HEX: 0B45 ; inline
-: GL_FRONT_FACE                     HEX: 0B46 ; inline
-: GL_POLYGON_OFFSET_FACTOR          HEX: 8038 ; inline
-: GL_POLYGON_OFFSET_UNITS           HEX: 2A00 ; inline
-: GL_POLYGON_OFFSET_POINT           HEX: 2A01 ; inline
-: GL_POLYGON_OFFSET_LINE            HEX: 2A02 ; inline
-: GL_POLYGON_OFFSET_FILL            HEX: 8037 ; inline
+CONSTANT: GL_POINT                          HEX: 1B00
+CONSTANT: GL_LINE                           HEX: 1B01
+CONSTANT: GL_FILL                           HEX: 1B02
+CONSTANT: GL_CW                             HEX: 0900
+CONSTANT: GL_CCW                            HEX: 0901
+CONSTANT: GL_FRONT                          HEX: 0404
+CONSTANT: GL_BACK                           HEX: 0405
+CONSTANT: GL_POLYGON_MODE                   HEX: 0B40
+CONSTANT: GL_POLYGON_SMOOTH                 HEX: 0B41
+CONSTANT: GL_POLYGON_STIPPLE                HEX: 0B42
+CONSTANT: GL_EDGE_FLAG                      HEX: 0B43
+CONSTANT: GL_CULL_FACE                      HEX: 0B44
+CONSTANT: GL_CULL_FACE_MODE                 HEX: 0B45
+CONSTANT: GL_FRONT_FACE                     HEX: 0B46
+CONSTANT: GL_POLYGON_OFFSET_FACTOR          HEX: 8038
+CONSTANT: GL_POLYGON_OFFSET_UNITS           HEX: 2A00
+CONSTANT: GL_POLYGON_OFFSET_POINT           HEX: 2A01
+CONSTANT: GL_POLYGON_OFFSET_LINE            HEX: 2A02
+CONSTANT: GL_POLYGON_OFFSET_FILL            HEX: 8037
 
 ! Display Lists
-: GL_COMPILE                        HEX: 1300 ; inline
-: GL_COMPILE_AND_EXECUTE            HEX: 1301 ; inline
-: GL_LIST_BASE                      HEX: 0B32 ; inline
-: GL_LIST_INDEX                     HEX: 0B33 ; inline
-: GL_LIST_MODE                      HEX: 0B30 ; inline
+CONSTANT: GL_COMPILE                        HEX: 1300
+CONSTANT: GL_COMPILE_AND_EXECUTE            HEX: 1301
+CONSTANT: GL_LIST_BASE                      HEX: 0B32
+CONSTANT: GL_LIST_INDEX                     HEX: 0B33
+CONSTANT: GL_LIST_MODE                      HEX: 0B30
 
 ! Depth buffer
-: GL_NEVER                          HEX: 0200 ; inline
-: GL_LESS                           HEX: 0201 ; inline
-: GL_EQUAL                          HEX: 0202 ; inline
-: GL_LEQUAL                         HEX: 0203 ; inline
-: GL_GREATER                        HEX: 0204 ; inline
-: GL_NOTEQUAL                       HEX: 0205 ; inline
-: GL_GEQUAL                         HEX: 0206 ; inline
-: GL_ALWAYS                         HEX: 0207 ; inline
-: GL_DEPTH_TEST                     HEX: 0B71 ; inline
-: GL_DEPTH_BITS                     HEX: 0D56 ; inline
-: GL_DEPTH_CLEAR_VALUE              HEX: 0B73 ; inline
-: GL_DEPTH_FUNC                     HEX: 0B74 ; inline
-: GL_DEPTH_RANGE                    HEX: 0B70 ; inline
-: GL_DEPTH_WRITEMASK                HEX: 0B72 ; inline
-: GL_DEPTH_COMPONENT                HEX: 1902 ; inline
+CONSTANT: GL_NEVER                          HEX: 0200
+CONSTANT: GL_LESS                           HEX: 0201
+CONSTANT: GL_EQUAL                          HEX: 0202
+CONSTANT: GL_LEQUAL                         HEX: 0203
+CONSTANT: GL_GREATER                        HEX: 0204
+CONSTANT: GL_NOTEQUAL                       HEX: 0205
+CONSTANT: GL_GEQUAL                         HEX: 0206
+CONSTANT: GL_ALWAYS                         HEX: 0207
+CONSTANT: GL_DEPTH_TEST                     HEX: 0B71
+CONSTANT: GL_DEPTH_BITS                     HEX: 0D56
+CONSTANT: GL_DEPTH_CLEAR_VALUE              HEX: 0B73
+CONSTANT: GL_DEPTH_FUNC                     HEX: 0B74
+CONSTANT: GL_DEPTH_RANGE                    HEX: 0B70
+CONSTANT: GL_DEPTH_WRITEMASK                HEX: 0B72
+CONSTANT: GL_DEPTH_COMPONENT                HEX: 1902
 
 ! Lighting
-: GL_LIGHTING                       HEX: 0B50 ; inline
-: GL_LIGHT0                         HEX: 4000 ; inline
-: GL_LIGHT1                         HEX: 4001 ; inline
-: GL_LIGHT2                         HEX: 4002 ; inline
-: GL_LIGHT3                         HEX: 4003 ; inline
-: GL_LIGHT4                         HEX: 4004 ; inline
-: GL_LIGHT5                         HEX: 4005 ; inline
-: GL_LIGHT6                         HEX: 4006 ; inline
-: GL_LIGHT7                         HEX: 4007 ; inline
-: GL_SPOT_EXPONENT                  HEX: 1205 ; inline
-: GL_SPOT_CUTOFF                    HEX: 1206 ; inline
-: GL_CONSTANT_ATTENUATION           HEX: 1207 ; inline
-: GL_LINEAR_ATTENUATION             HEX: 1208 ; inline
-: GL_QUADRATIC_ATTENUATION          HEX: 1209 ; inline
-: GL_AMBIENT                        HEX: 1200 ; inline
-: GL_DIFFUSE                        HEX: 1201 ; inline
-: GL_SPECULAR                       HEX: 1202 ; inline
-: GL_SHININESS                      HEX: 1601 ; inline
-: GL_EMISSION                       HEX: 1600 ; inline
-: GL_POSITION                       HEX: 1203 ; inline
-: GL_SPOT_DIRECTION                 HEX: 1204 ; inline
-: GL_AMBIENT_AND_DIFFUSE            HEX: 1602 ; inline
-: GL_COLOR_INDEXES                  HEX: 1603 ; inline
-: GL_LIGHT_MODEL_TWO_SIDE           HEX: 0B52 ; inline
-: GL_LIGHT_MODEL_LOCAL_VIEWER       HEX: 0B51 ; inline
-: GL_LIGHT_MODEL_AMBIENT            HEX: 0B53 ; inline
-: GL_FRONT_AND_BACK                 HEX: 0408 ; inline
-: GL_SHADE_MODEL                    HEX: 0B54 ; inline
-: GL_FLAT                           HEX: 1D00 ; inline
-: GL_SMOOTH                         HEX: 1D01 ; inline
-: GL_COLOR_MATERIAL                 HEX: 0B57 ; inline
-: GL_COLOR_MATERIAL_FACE            HEX: 0B55 ; inline
-: GL_COLOR_MATERIAL_PARAMETER       HEX: 0B56 ; inline
-: GL_NORMALIZE                      HEX: 0BA1 ; inline
+CONSTANT: GL_LIGHTING                       HEX: 0B50
+CONSTANT: GL_LIGHT0                         HEX: 4000
+CONSTANT: GL_LIGHT1                         HEX: 4001
+CONSTANT: GL_LIGHT2                         HEX: 4002
+CONSTANT: GL_LIGHT3                         HEX: 4003
+CONSTANT: GL_LIGHT4                         HEX: 4004
+CONSTANT: GL_LIGHT5                         HEX: 4005
+CONSTANT: GL_LIGHT6                         HEX: 4006
+CONSTANT: GL_LIGHT7                         HEX: 4007
+CONSTANT: GL_SPOT_EXPONENT                  HEX: 1205
+CONSTANT: GL_SPOT_CUTOFF                    HEX: 1206
+CONSTANT: GL_CONSTANT_ATTENUATION           HEX: 1207
+CONSTANT: GL_LINEAR_ATTENUATION             HEX: 1208
+CONSTANT: GL_QUADRATIC_ATTENUATION          HEX: 1209
+CONSTANT: GL_AMBIENT                        HEX: 1200
+CONSTANT: GL_DIFFUSE                        HEX: 1201
+CONSTANT: GL_SPECULAR                       HEX: 1202
+CONSTANT: GL_SHININESS                      HEX: 1601
+CONSTANT: GL_EMISSION                       HEX: 1600
+CONSTANT: GL_POSITION                       HEX: 1203
+CONSTANT: GL_SPOT_DIRECTION                 HEX: 1204
+CONSTANT: GL_AMBIENT_AND_DIFFUSE            HEX: 1602
+CONSTANT: GL_COLOR_INDEXES                  HEX: 1603
+CONSTANT: GL_LIGHT_MODEL_TWO_SIDE           HEX: 0B52
+CONSTANT: GL_LIGHT_MODEL_LOCAL_VIEWER       HEX: 0B51
+CONSTANT: GL_LIGHT_MODEL_AMBIENT            HEX: 0B53
+CONSTANT: GL_FRONT_AND_BACK                 HEX: 0408
+CONSTANT: GL_SHADE_MODEL                    HEX: 0B54
+CONSTANT: GL_FLAT                           HEX: 1D00
+CONSTANT: GL_SMOOTH                         HEX: 1D01
+CONSTANT: GL_COLOR_MATERIAL                 HEX: 0B57
+CONSTANT: GL_COLOR_MATERIAL_FACE            HEX: 0B55
+CONSTANT: GL_COLOR_MATERIAL_PARAMETER       HEX: 0B56
+CONSTANT: GL_NORMALIZE                      HEX: 0BA1
 
 ! User clipping planes
-: GL_CLIP_PLANE0                    HEX: 3000 ; inline
-: GL_CLIP_PLANE1                    HEX: 3001 ; inline
-: GL_CLIP_PLANE2                    HEX: 3002 ; inline
-: GL_CLIP_PLANE3                    HEX: 3003 ; inline
-: GL_CLIP_PLANE4                    HEX: 3004 ; inline
-: GL_CLIP_PLANE5                    HEX: 3005 ; inline
+CONSTANT: GL_CLIP_PLANE0                    HEX: 3000
+CONSTANT: GL_CLIP_PLANE1                    HEX: 3001
+CONSTANT: GL_CLIP_PLANE2                    HEX: 3002
+CONSTANT: GL_CLIP_PLANE3                    HEX: 3003
+CONSTANT: GL_CLIP_PLANE4                    HEX: 3004
+CONSTANT: GL_CLIP_PLANE5                    HEX: 3005
 
 ! Accumulation buffer
-: GL_ACCUM_RED_BITS                 HEX: 0D58 ; inline
-: GL_ACCUM_GREEN_BITS               HEX: 0D59 ; inline
-: GL_ACCUM_BLUE_BITS                HEX: 0D5A ; inline
-: GL_ACCUM_ALPHA_BITS               HEX: 0D5B ; inline
-: GL_ACCUM_CLEAR_VALUE              HEX: 0B80 ; inline
-: GL_ACCUM                          HEX: 0100 ; inline
-: GL_ADD                            HEX: 0104 ; inline
-: GL_LOAD                           HEX: 0101 ; inline
-: GL_MULT                           HEX: 0103 ; inline
-: GL_RETURN                         HEX: 0102 ; inline
+CONSTANT: GL_ACCUM_RED_BITS                 HEX: 0D58
+CONSTANT: GL_ACCUM_GREEN_BITS               HEX: 0D59
+CONSTANT: GL_ACCUM_BLUE_BITS                HEX: 0D5A
+CONSTANT: GL_ACCUM_ALPHA_BITS               HEX: 0D5B
+CONSTANT: GL_ACCUM_CLEAR_VALUE              HEX: 0B80
+CONSTANT: GL_ACCUM                          HEX: 0100
+CONSTANT: GL_ADD                            HEX: 0104
+CONSTANT: GL_LOAD                           HEX: 0101
+CONSTANT: GL_MULT                           HEX: 0103
+CONSTANT: GL_RETURN                         HEX: 0102
 
 ! Alpha testing
-: GL_ALPHA_TEST                     HEX: 0BC0 ; inline
-: GL_ALPHA_TEST_REF                 HEX: 0BC2 ; inline
-: GL_ALPHA_TEST_FUNC                HEX: 0BC1 ; inline
+CONSTANT: GL_ALPHA_TEST                     HEX: 0BC0
+CONSTANT: GL_ALPHA_TEST_REF                 HEX: 0BC2
+CONSTANT: GL_ALPHA_TEST_FUNC                HEX: 0BC1
 
 ! Blending
-: GL_BLEND                          HEX: 0BE2 ; inline
-: GL_BLEND_SRC                      HEX: 0BE1 ; inline
-: GL_BLEND_DST                      HEX: 0BE0 ; inline
-: GL_ZERO                           HEX: 0 ;  inline
-: GL_ONE                            HEX: 1 ;  inline
-: GL_SRC_COLOR                      HEX: 0300 ; inline
-: GL_ONE_MINUS_SRC_COLOR            HEX: 0301 ; inline
-: GL_SRC_ALPHA                      HEX: 0302 ; inline
-: GL_ONE_MINUS_SRC_ALPHA            HEX: 0303 ; inline
-: GL_DST_ALPHA                      HEX: 0304 ; inline
-: GL_ONE_MINUS_DST_ALPHA            HEX: 0305 ; inline
-: GL_DST_COLOR                      HEX: 0306 ; inline
-: GL_ONE_MINUS_DST_COLOR            HEX: 0307 ; inline
-: GL_SRC_ALPHA_SATURATE             HEX: 0308 ; inline
+CONSTANT: GL_BLEND                          HEX: 0BE2
+CONSTANT: GL_BLEND_SRC                      HEX: 0BE1
+CONSTANT: GL_BLEND_DST                      HEX: 0BE0
+CONSTANT: GL_ZERO                           HEX: 0
+CONSTANT: GL_ONE                            HEX: 1
+CONSTANT: GL_SRC_COLOR                      HEX: 0300
+CONSTANT: GL_ONE_MINUS_SRC_COLOR            HEX: 0301
+CONSTANT: GL_SRC_ALPHA                      HEX: 0302
+CONSTANT: GL_ONE_MINUS_SRC_ALPHA            HEX: 0303
+CONSTANT: GL_DST_ALPHA                      HEX: 0304
+CONSTANT: GL_ONE_MINUS_DST_ALPHA            HEX: 0305
+CONSTANT: GL_DST_COLOR                      HEX: 0306
+CONSTANT: GL_ONE_MINUS_DST_COLOR            HEX: 0307
+CONSTANT: GL_SRC_ALPHA_SATURATE             HEX: 0308
 
 ! Render Mode
-: GL_FEEDBACK                       HEX: 1C01 ; inline
-: GL_RENDER                         HEX: 1C00 ; inline
-: GL_SELECT                         HEX: 1C02 ; inline
+CONSTANT: GL_FEEDBACK                       HEX: 1C01
+CONSTANT: GL_RENDER                         HEX: 1C00
+CONSTANT: GL_SELECT                         HEX: 1C02
 
 ! Feedback
-: GL_2D                             HEX: 0600 ; inline
-: GL_3D                             HEX: 0601 ; inline
-: GL_3D_COLOR                       HEX: 0602 ; inline
-: GL_3D_COLOR_TEXTURE               HEX: 0603 ; inline
-: GL_4D_COLOR_TEXTURE               HEX: 0604 ; inline
-: GL_POINT_TOKEN                    HEX: 0701 ; inline
-: GL_LINE_TOKEN                     HEX: 0702 ; inline
-: GL_LINE_RESET_TOKEN               HEX: 0707 ; inline
-: GL_POLYGON_TOKEN                  HEX: 0703 ; inline
-: GL_BITMAP_TOKEN                   HEX: 0704 ; inline
-: GL_DRAW_PIXEL_TOKEN               HEX: 0705 ; inline
-: GL_COPY_PIXEL_TOKEN               HEX: 0706 ; inline
-: GL_PASS_THROUGH_TOKEN             HEX: 0700 ; inline
-: GL_FEEDBACK_BUFFER_POINTER        HEX: 0DF0 ; inline
-: GL_FEEDBACK_BUFFER_SIZE           HEX: 0DF1 ; inline
-: GL_FEEDBACK_BUFFER_TYPE           HEX: 0DF2 ; inline
+CONSTANT: GL_2D                             HEX: 0600
+CONSTANT: GL_3D                             HEX: 0601
+CONSTANT: GL_3D_COLOR                       HEX: 0602
+CONSTANT: GL_3D_COLOR_TEXTURE               HEX: 0603
+CONSTANT: GL_4D_COLOR_TEXTURE               HEX: 0604
+CONSTANT: GL_POINT_TOKEN                    HEX: 0701
+CONSTANT: GL_LINE_TOKEN                     HEX: 0702
+CONSTANT: GL_LINE_RESET_TOKEN               HEX: 0707
+CONSTANT: GL_POLYGON_TOKEN                  HEX: 0703
+CONSTANT: GL_BITMAP_TOKEN                   HEX: 0704
+CONSTANT: GL_DRAW_PIXEL_TOKEN               HEX: 0705
+CONSTANT: GL_COPY_PIXEL_TOKEN               HEX: 0706
+CONSTANT: GL_PASS_THROUGH_TOKEN             HEX: 0700
+CONSTANT: GL_FEEDBACK_BUFFER_POINTER        HEX: 0DF0
+CONSTANT: GL_FEEDBACK_BUFFER_SIZE           HEX: 0DF1
+CONSTANT: GL_FEEDBACK_BUFFER_TYPE           HEX: 0DF2
 
 ! Selection
-: GL_SELECTION_BUFFER_POINTER       HEX: 0DF3 ; inline
-: GL_SELECTION_BUFFER_SIZE          HEX: 0DF4 ; inline
+CONSTANT: GL_SELECTION_BUFFER_POINTER       HEX: 0DF3
+CONSTANT: GL_SELECTION_BUFFER_SIZE          HEX: 0DF4
 
 ! Fog
-: GL_FOG                            HEX: 0B60 ; inline
-: GL_FOG_MODE                       HEX: 0B65 ; inline
-: GL_FOG_DENSITY                    HEX: 0B62 ; inline
-: GL_FOG_COLOR                      HEX: 0B66 ; inline
-: GL_FOG_INDEX                      HEX: 0B61 ; inline
-: GL_FOG_START                      HEX: 0B63 ; inline
-: GL_FOG_END                        HEX: 0B64 ; inline
-: GL_LINEAR                         HEX: 2601 ; inline
-: GL_EXP                            HEX: 0800 ; inline
-: GL_EXP2                           HEX: 0801 ; inline
+CONSTANT: GL_FOG                            HEX: 0B60
+CONSTANT: GL_FOG_MODE                       HEX: 0B65
+CONSTANT: GL_FOG_DENSITY                    HEX: 0B62
+CONSTANT: GL_FOG_COLOR                      HEX: 0B66
+CONSTANT: GL_FOG_INDEX                      HEX: 0B61
+CONSTANT: GL_FOG_START                      HEX: 0B63
+CONSTANT: GL_FOG_END                        HEX: 0B64
+CONSTANT: GL_LINEAR                         HEX: 2601
+CONSTANT: GL_EXP                            HEX: 0800
+CONSTANT: GL_EXP2                           HEX: 0801
 
 ! Logic Ops
-: GL_LOGIC_OP                       HEX: 0BF1 ; inline
-: GL_INDEX_LOGIC_OP                 HEX: 0BF1 ; inline
-: GL_COLOR_LOGIC_OP                 HEX: 0BF2 ; inline
-: GL_LOGIC_OP_MODE                  HEX: 0BF0 ; inline
-: GL_CLEAR                          HEX: 1500 ; inline
-: GL_SET                            HEX: 150F ; inline
-: GL_COPY                           HEX: 1503 ; inline
-: GL_COPY_INVERTED                  HEX: 150C ; inline
-: GL_NOOP                           HEX: 1505 ; inline
-: GL_INVERT                         HEX: 150A ; inline
-: GL_AND                            HEX: 1501 ; inline
-: GL_NAND                           HEX: 150E ; inline
-: GL_OR                             HEX: 1507 ; inline
-: GL_NOR                            HEX: 1508 ; inline
-: GL_XOR                            HEX: 1506 ; inline
-: GL_EQUIV                          HEX: 1509 ; inline
-: GL_AND_REVERSE                    HEX: 1502 ; inline
-: GL_AND_INVERTED                   HEX: 1504 ; inline
-: GL_OR_REVERSE                     HEX: 150B ; inline
-: GL_OR_INVERTED                    HEX: 150D ; inline
+CONSTANT: GL_LOGIC_OP                       HEX: 0BF1
+CONSTANT: GL_INDEX_LOGIC_OP                 HEX: 0BF1
+CONSTANT: GL_COLOR_LOGIC_OP                 HEX: 0BF2
+CONSTANT: GL_LOGIC_OP_MODE                  HEX: 0BF0
+CONSTANT: GL_CLEAR                          HEX: 1500
+CONSTANT: GL_SET                            HEX: 150F
+CONSTANT: GL_COPY                           HEX: 1503
+CONSTANT: GL_COPY_INVERTED                  HEX: 150C
+CONSTANT: GL_NOOP                           HEX: 1505
+CONSTANT: GL_INVERT                         HEX: 150A
+CONSTANT: GL_AND                            HEX: 1501
+CONSTANT: GL_NAND                           HEX: 150E
+CONSTANT: GL_OR                             HEX: 1507
+CONSTANT: GL_NOR                            HEX: 1508
+CONSTANT: GL_XOR                            HEX: 1506
+CONSTANT: GL_EQUIV                          HEX: 1509
+CONSTANT: GL_AND_REVERSE                    HEX: 1502
+CONSTANT: GL_AND_INVERTED                   HEX: 1504
+CONSTANT: GL_OR_REVERSE                     HEX: 150B
+CONSTANT: GL_OR_INVERTED                    HEX: 150D
 
 ! Stencil
-: GL_STENCIL_TEST                   HEX: 0B90 ; inline
-: GL_STENCIL_WRITEMASK              HEX: 0B98 ; inline
-: GL_STENCIL_BITS                   HEX: 0D57 ; inline
-: GL_STENCIL_FUNC                   HEX: 0B92 ; inline
-: GL_STENCIL_VALUE_MASK             HEX: 0B93 ; inline
-: GL_STENCIL_REF                    HEX: 0B97 ; inline
-: GL_STENCIL_FAIL                   HEX: 0B94 ; inline
-: GL_STENCIL_PASS_DEPTH_PASS        HEX: 0B96 ; inline
-: GL_STENCIL_PASS_DEPTH_FAIL        HEX: 0B95 ; inline
-: GL_STENCIL_CLEAR_VALUE            HEX: 0B91 ; inline
-: GL_STENCIL_INDEX                  HEX: 1901 ; inline
-: GL_KEEP                           HEX: 1E00 ; inline
-: GL_REPLACE                        HEX: 1E01 ; inline
-: GL_INCR                           HEX: 1E02 ; inline
-: GL_DECR                           HEX: 1E03 ; inline
+CONSTANT: GL_STENCIL_TEST                   HEX: 0B90
+CONSTANT: GL_STENCIL_WRITEMASK              HEX: 0B98
+CONSTANT: GL_STENCIL_BITS                   HEX: 0D57
+CONSTANT: GL_STENCIL_FUNC                   HEX: 0B92
+CONSTANT: GL_STENCIL_VALUE_MASK             HEX: 0B93
+CONSTANT: GL_STENCIL_REF                    HEX: 0B97
+CONSTANT: GL_STENCIL_FAIL                   HEX: 0B94
+CONSTANT: GL_STENCIL_PASS_DEPTH_PASS        HEX: 0B96
+CONSTANT: GL_STENCIL_PASS_DEPTH_FAIL        HEX: 0B95
+CONSTANT: GL_STENCIL_CLEAR_VALUE            HEX: 0B91
+CONSTANT: GL_STENCIL_INDEX                  HEX: 1901
+CONSTANT: GL_KEEP                           HEX: 1E00
+CONSTANT: GL_REPLACE                        HEX: 1E01
+CONSTANT: GL_INCR                           HEX: 1E02
+CONSTANT: GL_DECR                           HEX: 1E03
 
 ! Buffers, Pixel Drawing/Reading
-: GL_NONE                           HEX:    0 ; inline
-: GL_LEFT                           HEX: 0406 ; inline
-: GL_RIGHT                          HEX: 0407 ; inline
-! defined elsewhere
-! GL_FRONT                          HEX: 0404
-! GL_BACK                           HEX: 0405
-! GL_FRONT_AND_BACK                 HEX: 0408
-: GL_FRONT_LEFT                     HEX: 0400 ; inline
-: GL_FRONT_RIGHT                    HEX: 0401 ; inline
-: GL_BACK_LEFT                      HEX: 0402 ; inline
-: GL_BACK_RIGHT                     HEX: 0403 ; inline
-: GL_AUX0                           HEX: 0409 ; inline
-: GL_AUX1                           HEX: 040A ; inline
-: GL_AUX2                           HEX: 040B ; inline
-: GL_AUX3                           HEX: 040C ; inline
-: GL_COLOR_INDEX                    HEX: 1900 ; inline
-: GL_RED                            HEX: 1903 ; inline
-: GL_GREEN                          HEX: 1904 ; inline
-: GL_BLUE                           HEX: 1905 ; inline
-: GL_ALPHA                          HEX: 1906 ; inline
-: GL_LUMINANCE                      HEX: 1909 ; inline
-: GL_LUMINANCE_ALPHA                HEX: 190A ; inline
-: GL_ALPHA_BITS                     HEX: 0D55 ; inline
-: GL_RED_BITS                       HEX: 0D52 ; inline
-: GL_GREEN_BITS                     HEX: 0D53 ; inline
-: GL_BLUE_BITS                      HEX: 0D54 ; inline
-: GL_INDEX_BITS                     HEX: 0D51 ; inline
-: GL_SUBPIXEL_BITS                  HEX: 0D50 ; inline
-: GL_AUX_BUFFERS                    HEX: 0C00 ; inline
-: GL_READ_BUFFER                    HEX: 0C02 ; inline
-: GL_DRAW_BUFFER                    HEX: 0C01 ; inline
-: GL_DOUBLEBUFFER                   HEX: 0C32 ; inline
-: GL_STEREO                         HEX: 0C33 ; inline
-: GL_BITMAP                         HEX: 1A00 ; inline
-: GL_COLOR                          HEX: 1800 ; inline
-: GL_DEPTH                          HEX: 1801 ; inline
-: GL_STENCIL                        HEX: 1802 ; inline
-: GL_DITHER                         HEX: 0BD0 ; inline
-: GL_RGB                            HEX: 1907 ; inline
-: GL_RGBA                           HEX: 1908 ; inline
+CONSTANT: GL_NONE                           HEX:    0
+CONSTANT: GL_LEFT                           HEX: 0406
+CONSTANT: GL_RIGHT                          HEX: 0407
+
+CONSTANT: GL_FRONT_RIGHT                    HEX: 0401
+CONSTANT: GL_BACK_LEFT                      HEX: 0402
+CONSTANT: GL_BACK_RIGHT                     HEX: 0403
+CONSTANT: GL_AUX0                           HEX: 0409
+CONSTANT: GL_AUX1                           HEX: 040A
+CONSTANT: GL_AUX2                           HEX: 040B
+CONSTANT: GL_AUX3                           HEX: 040C
+CONSTANT: GL_COLOR_INDEX                    HEX: 1900
+CONSTANT: GL_RED                            HEX: 1903
+CONSTANT: GL_GREEN                          HEX: 1904
+CONSTANT: GL_BLUE                           HEX: 1905
+CONSTANT: GL_ALPHA                          HEX: 1906
+CONSTANT: GL_LUMINANCE                      HEX: 1909
+CONSTANT: GL_LUMINANCE_ALPHA                HEX: 190A
+CONSTANT: GL_ALPHA_BITS                     HEX: 0D55
+CONSTANT: GL_RED_BITS                       HEX: 0D52
+CONSTANT: GL_GREEN_BITS                     HEX: 0D53
+CONSTANT: GL_BLUE_BITS                      HEX: 0D54
+CONSTANT: GL_INDEX_BITS                     HEX: 0D51
+CONSTANT: GL_SUBPIXEL_BITS                  HEX: 0D50
+CONSTANT: GL_AUX_BUFFERS                    HEX: 0C00
+CONSTANT: GL_READ_BUFFER                    HEX: 0C02
+CONSTANT: GL_DRAW_BUFFER                    HEX: 0C01
+CONSTANT: GL_DOUBLEBUFFER                   HEX: 0C32
+CONSTANT: GL_STEREO                         HEX: 0C33
+CONSTANT: GL_BITMAP                         HEX: 1A00
+CONSTANT: GL_COLOR                          HEX: 1800
+CONSTANT: GL_DEPTH                          HEX: 1801
+CONSTANT: GL_STENCIL                        HEX: 1802
+CONSTANT: GL_DITHER                         HEX: 0BD0
+CONSTANT: GL_RGB                            HEX: 1907
+CONSTANT: GL_RGBA                           HEX: 1908
 
 ! Implementation limits
-: GL_MAX_LIST_NESTING               HEX: 0B31 ; inline
-: GL_MAX_ATTRIB_STACK_DEPTH         HEX: 0D35 ; inline
-: GL_MAX_MODELVIEW_STACK_DEPTH      HEX: 0D36 ; inline
-: GL_MAX_NAME_STACK_DEPTH           HEX: 0D37 ; inline
-: GL_MAX_PROJECTION_STACK_DEPTH     HEX: 0D38 ; inline
-: GL_MAX_TEXTURE_STACK_DEPTH        HEX: 0D39 ; inline
-: GL_MAX_EVAL_ORDER                 HEX: 0D30 ; inline
-: GL_MAX_LIGHTS                     HEX: 0D31 ; inline
-: GL_MAX_CLIP_PLANES                HEX: 0D32 ; inline
-: GL_MAX_TEXTURE_SIZE               HEX: 0D33 ; inline
-: GL_MAX_PIXEL_MAP_TABLE            HEX: 0D34 ; inline
-: GL_MAX_VIEWPORT_DIMS              HEX: 0D3A ; inline
-: GL_MAX_CLIENT_ATTRIB_STACK_DEPTH  HEX: 0D3B ; inline
+CONSTANT: GL_MAX_LIST_NESTING               HEX: 0B31
+CONSTANT: GL_MAX_ATTRIB_STACK_DEPTH         HEX: 0D35
+CONSTANT: GL_MAX_MODELVIEW_STACK_DEPTH      HEX: 0D36
+CONSTANT: GL_MAX_NAME_STACK_DEPTH           HEX: 0D37
+CONSTANT: GL_MAX_PROJECTION_STACK_DEPTH     HEX: 0D38
+CONSTANT: GL_MAX_TEXTURE_STACK_DEPTH        HEX: 0D39
+CONSTANT: GL_MAX_EVAL_ORDER                 HEX: 0D30
+CONSTANT: GL_MAX_LIGHTS                     HEX: 0D31
+CONSTANT: GL_MAX_CLIP_PLANES                HEX: 0D32
+CONSTANT: GL_MAX_TEXTURE_SIZE               HEX: 0D33
+CONSTANT: GL_MAX_PIXEL_MAP_TABLE            HEX: 0D34
+CONSTANT: GL_MAX_VIEWPORT_DIMS              HEX: 0D3A
+CONSTANT: GL_MAX_CLIENT_ATTRIB_STACK_DEPTH  HEX: 0D3B
 
 ! Gets
-: GL_ATTRIB_STACK_DEPTH             HEX: 0BB0 ; inline
-: GL_CLIENT_ATTRIB_STACK_DEPTH      HEX: 0BB1 ; inline
-: GL_COLOR_CLEAR_VALUE              HEX: 0C22 ; inline
-: GL_COLOR_WRITEMASK                HEX: 0C23 ; inline
-: GL_CURRENT_INDEX                  HEX: 0B01 ; inline
-: GL_CURRENT_COLOR                  HEX: 0B00 ; inline
-: GL_CURRENT_NORMAL                 HEX: 0B02 ; inline
-: GL_CURRENT_RASTER_COLOR           HEX: 0B04 ; inline
-: GL_CURRENT_RASTER_DISTANCE        HEX: 0B09 ; inline
-: GL_CURRENT_RASTER_INDEX           HEX: 0B05 ; inline
-: GL_CURRENT_RASTER_POSITION        HEX: 0B07 ; inline
-: GL_CURRENT_RASTER_TEXTURE_COORDS  HEX: 0B06 ; inline
-: GL_CURRENT_RASTER_POSITION_VALID  HEX: 0B08 ; inline
-: GL_CURRENT_TEXTURE_COORDS         HEX: 0B03 ; inline
-: GL_INDEX_CLEAR_VALUE              HEX: 0C20 ; inline
-: GL_INDEX_MODE                     HEX: 0C30 ; inline
-: GL_INDEX_WRITEMASK                HEX: 0C21 ; inline
-: GL_MODELVIEW_MATRIX               HEX: 0BA6 ; inline
-: GL_MODELVIEW_STACK_DEPTH          HEX: 0BA3 ; inline
-: GL_NAME_STACK_DEPTH               HEX: 0D70 ; inline
-: GL_PROJECTION_MATRIX              HEX: 0BA7 ; inline
-: GL_PROJECTION_STACK_DEPTH         HEX: 0BA4 ; inline
-: GL_RENDER_MODE                    HEX: 0C40 ; inline
-: GL_RGBA_MODE                      HEX: 0C31 ; inline
-: GL_TEXTURE_MATRIX                 HEX: 0BA8 ; inline
-: GL_TEXTURE_STACK_DEPTH            HEX: 0BA5 ; inline
-: GL_VIEWPORT                       HEX: 0BA2 ; inline
+CONSTANT: GL_ATTRIB_STACK_DEPTH             HEX: 0BB0
+CONSTANT: GL_CLIENT_ATTRIB_STACK_DEPTH      HEX: 0BB1
+CONSTANT: GL_COLOR_CLEAR_VALUE              HEX: 0C22
+CONSTANT: GL_COLOR_WRITEMASK                HEX: 0C23
+CONSTANT: GL_CURRENT_INDEX                  HEX: 0B01
+CONSTANT: GL_CURRENT_COLOR                  HEX: 0B00
+CONSTANT: GL_CURRENT_NORMAL                 HEX: 0B02
+CONSTANT: GL_CURRENT_RASTER_COLOR           HEX: 0B04
+CONSTANT: GL_CURRENT_RASTER_DISTANCE        HEX: 0B09
+CONSTANT: GL_CURRENT_RASTER_INDEX           HEX: 0B05
+CONSTANT: GL_CURRENT_RASTER_POSITION        HEX: 0B07
+CONSTANT: GL_CURRENT_RASTER_TEXTURE_COORDS  HEX: 0B06
+CONSTANT: GL_CURRENT_RASTER_POSITION_VALID  HEX: 0B08
+CONSTANT: GL_CURRENT_TEXTURE_COORDS         HEX: 0B03
+CONSTANT: GL_INDEX_CLEAR_VALUE              HEX: 0C20
+CONSTANT: GL_INDEX_MODE                     HEX: 0C30
+CONSTANT: GL_INDEX_WRITEMASK                HEX: 0C21
+CONSTANT: GL_MODELVIEW_MATRIX               HEX: 0BA6
+CONSTANT: GL_MODELVIEW_STACK_DEPTH          HEX: 0BA3
+CONSTANT: GL_NAME_STACK_DEPTH               HEX: 0D70
+CONSTANT: GL_PROJECTION_MATRIX              HEX: 0BA7
+CONSTANT: GL_PROJECTION_STACK_DEPTH         HEX: 0BA4
+CONSTANT: GL_RENDER_MODE                    HEX: 0C40
+CONSTANT: GL_RGBA_MODE                      HEX: 0C31
+CONSTANT: GL_TEXTURE_MATRIX                 HEX: 0BA8
+CONSTANT: GL_TEXTURE_STACK_DEPTH            HEX: 0BA5
+CONSTANT: GL_VIEWPORT                       HEX: 0BA2
 
 ! Evaluators inline
-: GL_AUTO_NORMAL                    HEX: 0D80 ; inline
-: GL_MAP1_COLOR_4                   HEX: 0D90 ; inline
-: GL_MAP1_INDEX                     HEX: 0D91 ; inline
-: GL_MAP1_NORMAL                    HEX: 0D92 ; inline
-: GL_MAP1_TEXTURE_COORD_1           HEX: 0D93 ; inline
-: GL_MAP1_TEXTURE_COORD_2           HEX: 0D94 ; inline
-: GL_MAP1_TEXTURE_COORD_3           HEX: 0D95 ; inline
-: GL_MAP1_TEXTURE_COORD_4           HEX: 0D96 ; inline
-: GL_MAP1_VERTEX_3                  HEX: 0D97 ; inline
-: GL_MAP1_VERTEX_4                  HEX: 0D98 ; inline
-: GL_MAP2_COLOR_4                   HEX: 0DB0 ; inline
-: GL_MAP2_INDEX                     HEX: 0DB1 ; inline
-: GL_MAP2_NORMAL                    HEX: 0DB2 ; inline
-: GL_MAP2_TEXTURE_COORD_1           HEX: 0DB3 ; inline
-: GL_MAP2_TEXTURE_COORD_2           HEX: 0DB4 ; inline
-: GL_MAP2_TEXTURE_COORD_3           HEX: 0DB5 ; inline
-: GL_MAP2_TEXTURE_COORD_4           HEX: 0DB6 ; inline
-: GL_MAP2_VERTEX_3                  HEX: 0DB7 ; inline
-: GL_MAP2_VERTEX_4                  HEX: 0DB8 ; inline
-: GL_MAP1_GRID_DOMAIN               HEX: 0DD0 ; inline
-: GL_MAP1_GRID_SEGMENTS             HEX: 0DD1 ; inline
-: GL_MAP2_GRID_DOMAIN               HEX: 0DD2 ; inline
-: GL_MAP2_GRID_SEGMENTS             HEX: 0DD3 ; inline
-: GL_COEFF                          HEX: 0A00 ; inline
-: GL_DOMAIN                         HEX: 0A02 ; inline
-: GL_ORDER                          HEX: 0A01 ; inline
+CONSTANT: GL_AUTO_NORMAL                    HEX: 0D80
+CONSTANT: GL_MAP1_COLOR_4                   HEX: 0D90
+CONSTANT: GL_MAP1_INDEX                     HEX: 0D91
+CONSTANT: GL_MAP1_NORMAL                    HEX: 0D92
+CONSTANT: GL_MAP1_TEXTURE_COORD_1           HEX: 0D93
+CONSTANT: GL_MAP1_TEXTURE_COORD_2           HEX: 0D94
+CONSTANT: GL_MAP1_TEXTURE_COORD_3           HEX: 0D95
+CONSTANT: GL_MAP1_TEXTURE_COORD_4           HEX: 0D96
+CONSTANT: GL_MAP1_VERTEX_3                  HEX: 0D97
+CONSTANT: GL_MAP1_VERTEX_4                  HEX: 0D98
+CONSTANT: GL_MAP2_COLOR_4                   HEX: 0DB0
+CONSTANT: GL_MAP2_INDEX                     HEX: 0DB1
+CONSTANT: GL_MAP2_NORMAL                    HEX: 0DB2
+CONSTANT: GL_MAP2_TEXTURE_COORD_1           HEX: 0DB3
+CONSTANT: GL_MAP2_TEXTURE_COORD_2           HEX: 0DB4
+CONSTANT: GL_MAP2_TEXTURE_COORD_3           HEX: 0DB5
+CONSTANT: GL_MAP2_TEXTURE_COORD_4           HEX: 0DB6
+CONSTANT: GL_MAP2_VERTEX_3                  HEX: 0DB7
+CONSTANT: GL_MAP2_VERTEX_4                  HEX: 0DB8
+CONSTANT: GL_MAP1_GRID_DOMAIN               HEX: 0DD0
+CONSTANT: GL_MAP1_GRID_SEGMENTS             HEX: 0DD1
+CONSTANT: GL_MAP2_GRID_DOMAIN               HEX: 0DD2
+CONSTANT: GL_MAP2_GRID_SEGMENTS             HEX: 0DD3
+CONSTANT: GL_COEFF                          HEX: 0A00
+CONSTANT: GL_DOMAIN                         HEX: 0A02
+CONSTANT: GL_ORDER                          HEX: 0A01
 
 ! Hints inline
-: GL_FOG_HINT                       HEX: 0C54 ; inline
-: GL_LINE_SMOOTH_HINT               HEX: 0C52 ; inline
-: GL_PERSPECTIVE_CORRECTION_HINT    HEX: 0C50 ; inline
-: GL_POINT_SMOOTH_HINT              HEX: 0C51 ; inline
-: GL_POLYGON_SMOOTH_HINT            HEX: 0C53 ; inline
-: GL_DONT_CARE                      HEX: 1100 ; inline
-: GL_FASTEST                        HEX: 1101 ; inline
-: GL_NICEST                         HEX: 1102 ; inline
+CONSTANT: GL_FOG_HINT                       HEX: 0C54
+CONSTANT: GL_LINE_SMOOTH_HINT               HEX: 0C52
+CONSTANT: GL_PERSPECTIVE_CORRECTION_HINT    HEX: 0C50
+CONSTANT: GL_POINT_SMOOTH_HINT              HEX: 0C51
+CONSTANT: GL_POLYGON_SMOOTH_HINT            HEX: 0C53
+CONSTANT: GL_DONT_CARE                      HEX: 1100
+CONSTANT: GL_FASTEST                        HEX: 1101
+CONSTANT: GL_NICEST                         HEX: 1102
 
 ! Scissor box inline
-: GL_SCISSOR_TEST                   HEX: 0C11 ; inline
-: GL_SCISSOR_BOX                    HEX: 0C10 ; inline
+CONSTANT: GL_SCISSOR_TEST                   HEX: 0C11
+CONSTANT: GL_SCISSOR_BOX                    HEX: 0C10
 
 ! Pixel Mode / Transfer inline
-: GL_MAP_COLOR                      HEX: 0D10 ; inline
-: GL_MAP_STENCIL                    HEX: 0D11 ; inline
-: GL_INDEX_SHIFT                    HEX: 0D12 ; inline
-: GL_INDEX_OFFSET                   HEX: 0D13 ; inline
-: GL_RED_SCALE                      HEX: 0D14 ; inline
-: GL_RED_BIAS                       HEX: 0D15 ; inline
-: GL_GREEN_SCALE                    HEX: 0D18 ; inline
-: GL_GREEN_BIAS                     HEX: 0D19 ; inline
-: GL_BLUE_SCALE                     HEX: 0D1A ; inline
-: GL_BLUE_BIAS                      HEX: 0D1B ; inline
-: GL_ALPHA_SCALE                    HEX: 0D1C ; inline
-: GL_ALPHA_BIAS                     HEX: 0D1D ; inline
-: GL_DEPTH_SCALE                    HEX: 0D1E ; inline
-: GL_DEPTH_BIAS                     HEX: 0D1F ; inline
-: GL_PIXEL_MAP_S_TO_S_SIZE          HEX: 0CB1 ; inline
-: GL_PIXEL_MAP_I_TO_I_SIZE          HEX: 0CB0 ; inline
-: GL_PIXEL_MAP_I_TO_R_SIZE          HEX: 0CB2 ; inline
-: GL_PIXEL_MAP_I_TO_G_SIZE          HEX: 0CB3 ; inline
-: GL_PIXEL_MAP_I_TO_B_SIZE          HEX: 0CB4 ; inline
-: GL_PIXEL_MAP_I_TO_A_SIZE          HEX: 0CB5 ; inline
-: GL_PIXEL_MAP_R_TO_R_SIZE          HEX: 0CB6 ; inline
-: GL_PIXEL_MAP_G_TO_G_SIZE          HEX: 0CB7 ; inline
-: GL_PIXEL_MAP_B_TO_B_SIZE          HEX: 0CB8 ; inline
-: GL_PIXEL_MAP_A_TO_A_SIZE          HEX: 0CB9 ; inline
-: GL_PIXEL_MAP_S_TO_S               HEX: 0C71 ; inline
-: GL_PIXEL_MAP_I_TO_I               HEX: 0C70 ; inline
-: GL_PIXEL_MAP_I_TO_R               HEX: 0C72 ; inline
-: GL_PIXEL_MAP_I_TO_G               HEX: 0C73 ; inline
-: GL_PIXEL_MAP_I_TO_B               HEX: 0C74 ; inline
-: GL_PIXEL_MAP_I_TO_A               HEX: 0C75 ; inline
-: GL_PIXEL_MAP_R_TO_R               HEX: 0C76 ; inline
-: GL_PIXEL_MAP_G_TO_G               HEX: 0C77 ; inline
-: GL_PIXEL_MAP_B_TO_B               HEX: 0C78 ; inline
-: GL_PIXEL_MAP_A_TO_A               HEX: 0C79 ; inline
-: GL_PACK_ALIGNMENT                 HEX: 0D05 ; inline
-: GL_PACK_LSB_FIRST                 HEX: 0D01 ; inline
-: GL_PACK_ROW_LENGTH                HEX: 0D02 ; inline
-: GL_PACK_SKIP_PIXELS               HEX: 0D04 ; inline
-: GL_PACK_SKIP_ROWS                 HEX: 0D03 ; inline
-: GL_PACK_SWAP_BYTES                HEX: 0D00 ; inline
-: GL_UNPACK_ALIGNMENT               HEX: 0CF5 ; inline
-: GL_UNPACK_LSB_FIRST               HEX: 0CF1 ; inline
-: GL_UNPACK_ROW_LENGTH              HEX: 0CF2 ; inline
-: GL_UNPACK_SKIP_PIXELS             HEX: 0CF4 ; inline
-: GL_UNPACK_SKIP_ROWS               HEX: 0CF3 ; inline
-: GL_UNPACK_SWAP_BYTES              HEX: 0CF0 ; inline
-: GL_ZOOM_X                         HEX: 0D16 ; inline
-: GL_ZOOM_Y                         HEX: 0D17 ; inline
+CONSTANT: GL_MAP_COLOR                      HEX: 0D10
+CONSTANT: GL_MAP_STENCIL                    HEX: 0D11
+CONSTANT: GL_INDEX_SHIFT                    HEX: 0D12
+CONSTANT: GL_INDEX_OFFSET                   HEX: 0D13
+CONSTANT: GL_RED_SCALE                      HEX: 0D14
+CONSTANT: GL_RED_BIAS                       HEX: 0D15
+CONSTANT: GL_GREEN_SCALE                    HEX: 0D18
+CONSTANT: GL_GREEN_BIAS                     HEX: 0D19
+CONSTANT: GL_BLUE_SCALE                     HEX: 0D1A
+CONSTANT: GL_BLUE_BIAS                      HEX: 0D1B
+CONSTANT: GL_ALPHA_SCALE                    HEX: 0D1C
+CONSTANT: GL_ALPHA_BIAS                     HEX: 0D1D
+CONSTANT: GL_DEPTH_SCALE                    HEX: 0D1E
+CONSTANT: GL_DEPTH_BIAS                     HEX: 0D1F
+CONSTANT: GL_PIXEL_MAP_S_TO_S_SIZE          HEX: 0CB1
+CONSTANT: GL_PIXEL_MAP_I_TO_I_SIZE          HEX: 0CB0
+CONSTANT: GL_PIXEL_MAP_I_TO_R_SIZE          HEX: 0CB2
+CONSTANT: GL_PIXEL_MAP_I_TO_G_SIZE          HEX: 0CB3
+CONSTANT: GL_PIXEL_MAP_I_TO_B_SIZE          HEX: 0CB4
+CONSTANT: GL_PIXEL_MAP_I_TO_A_SIZE          HEX: 0CB5
+CONSTANT: GL_PIXEL_MAP_R_TO_R_SIZE          HEX: 0CB6
+CONSTANT: GL_PIXEL_MAP_G_TO_G_SIZE          HEX: 0CB7
+CONSTANT: GL_PIXEL_MAP_B_TO_B_SIZE          HEX: 0CB8
+CONSTANT: GL_PIXEL_MAP_A_TO_A_SIZE          HEX: 0CB9
+CONSTANT: GL_PIXEL_MAP_S_TO_S               HEX: 0C71
+CONSTANT: GL_PIXEL_MAP_I_TO_I               HEX: 0C70
+CONSTANT: GL_PIXEL_MAP_I_TO_R               HEX: 0C72
+CONSTANT: GL_PIXEL_MAP_I_TO_G               HEX: 0C73
+CONSTANT: GL_PIXEL_MAP_I_TO_B               HEX: 0C74
+CONSTANT: GL_PIXEL_MAP_I_TO_A               HEX: 0C75
+CONSTANT: GL_PIXEL_MAP_R_TO_R               HEX: 0C76
+CONSTANT: GL_PIXEL_MAP_G_TO_G               HEX: 0C77
+CONSTANT: GL_PIXEL_MAP_B_TO_B               HEX: 0C78
+CONSTANT: GL_PIXEL_MAP_A_TO_A               HEX: 0C79
+CONSTANT: GL_PACK_ALIGNMENT                 HEX: 0D05
+CONSTANT: GL_PACK_LSB_FIRST                 HEX: 0D01
+CONSTANT: GL_PACK_ROW_LENGTH                HEX: 0D02
+CONSTANT: GL_PACK_SKIP_PIXELS               HEX: 0D04
+CONSTANT: GL_PACK_SKIP_ROWS                 HEX: 0D03
+CONSTANT: GL_PACK_SWAP_BYTES                HEX: 0D00
+CONSTANT: GL_UNPACK_ALIGNMENT               HEX: 0CF5
+CONSTANT: GL_UNPACK_LSB_FIRST               HEX: 0CF1
+CONSTANT: GL_UNPACK_ROW_LENGTH              HEX: 0CF2
+CONSTANT: GL_UNPACK_SKIP_PIXELS             HEX: 0CF4
+CONSTANT: GL_UNPACK_SKIP_ROWS               HEX: 0CF3
+CONSTANT: GL_UNPACK_SWAP_BYTES              HEX: 0CF0
+CONSTANT: GL_ZOOM_X                         HEX: 0D16
+CONSTANT: GL_ZOOM_Y                         HEX: 0D17
 
 ! Texture mapping inline
-: GL_TEXTURE_ENV                    HEX: 2300 ; inline
-: GL_TEXTURE_ENV_MODE               HEX: 2200 ; inline
-: GL_TEXTURE_1D                     HEX: 0DE0 ; inline
-: GL_TEXTURE_2D                     HEX: 0DE1 ; inline
-: GL_TEXTURE_WRAP_S                 HEX: 2802 ; inline
-: GL_TEXTURE_WRAP_T                 HEX: 2803 ; inline
-: GL_TEXTURE_MAG_FILTER             HEX: 2800 ; inline
-: GL_TEXTURE_MIN_FILTER             HEX: 2801 ; inline
-: GL_TEXTURE_ENV_COLOR              HEX: 2201 ; inline
-: GL_TEXTURE_GEN_S                  HEX: 0C60 ; inline
-: GL_TEXTURE_GEN_T                  HEX: 0C61 ; inline
-: GL_TEXTURE_GEN_MODE               HEX: 2500 ; inline
-: GL_TEXTURE_BORDER_COLOR           HEX: 1004 ; inline
-: GL_TEXTURE_WIDTH                  HEX: 1000 ; inline
-: GL_TEXTURE_HEIGHT                 HEX: 1001 ; inline
-: GL_TEXTURE_BORDER                 HEX: 1005 ; inline
-: GL_TEXTURE_COMPONENTS             HEX: 1003 ; inline
-: GL_TEXTURE_RED_SIZE               HEX: 805C ; inline
-: GL_TEXTURE_GREEN_SIZE             HEX: 805D ; inline
-: GL_TEXTURE_BLUE_SIZE              HEX: 805E ; inline
-: GL_TEXTURE_ALPHA_SIZE             HEX: 805F ; inline
-: GL_TEXTURE_LUMINANCE_SIZE         HEX: 8060 ; inline
-: GL_TEXTURE_INTENSITY_SIZE         HEX: 8061 ; inline
-: GL_NEAREST_MIPMAP_NEAREST         HEX: 2700 ; inline
-: GL_NEAREST_MIPMAP_LINEAR          HEX: 2702 ; inline
-: GL_LINEAR_MIPMAP_NEAREST          HEX: 2701 ; inline
-: GL_LINEAR_MIPMAP_LINEAR           HEX: 2703 ; inline
-: GL_OBJECT_LINEAR                  HEX: 2401 ; inline
-: GL_OBJECT_PLANE                   HEX: 2501 ; inline
-: GL_EYE_LINEAR                     HEX: 2400 ; inline
-: GL_EYE_PLANE                      HEX: 2502 ; inline
-: GL_SPHERE_MAP                     HEX: 2402 ; inline
-: GL_DECAL                          HEX: 2101 ; inline
-: GL_MODULATE                       HEX: 2100 ; inline
-: GL_NEAREST                        HEX: 2600 ; inline
-: GL_REPEAT                         HEX: 2901 ; inline
-: GL_CLAMP                          HEX: 2900 ; inline
-: GL_S                              HEX: 2000 ; inline
-: GL_T                              HEX: 2001 ; inline
-: GL_R                              HEX: 2002 ; inline
-: GL_Q                              HEX: 2003 ; inline
-: GL_TEXTURE_GEN_R                  HEX: 0C62 ; inline
-: GL_TEXTURE_GEN_Q                  HEX: 0C63 ; inline
+CONSTANT: GL_TEXTURE_ENV                    HEX: 2300
+CONSTANT: GL_TEXTURE_ENV_MODE               HEX: 2200
+CONSTANT: GL_TEXTURE_1D                     HEX: 0DE0
+CONSTANT: GL_TEXTURE_2D                     HEX: 0DE1
+CONSTANT: GL_TEXTURE_WRAP_S                 HEX: 2802
+CONSTANT: GL_TEXTURE_WRAP_T                 HEX: 2803
+CONSTANT: GL_TEXTURE_MAG_FILTER             HEX: 2800
+CONSTANT: GL_TEXTURE_MIN_FILTER             HEX: 2801
+CONSTANT: GL_TEXTURE_ENV_COLOR              HEX: 2201
+CONSTANT: GL_TEXTURE_GEN_S                  HEX: 0C60
+CONSTANT: GL_TEXTURE_GEN_T                  HEX: 0C61
+CONSTANT: GL_TEXTURE_GEN_MODE               HEX: 2500
+CONSTANT: GL_TEXTURE_BORDER_COLOR           HEX: 1004
+CONSTANT: GL_TEXTURE_WIDTH                  HEX: 1000
+CONSTANT: GL_TEXTURE_HEIGHT                 HEX: 1001
+CONSTANT: GL_TEXTURE_BORDER                 HEX: 1005
+CONSTANT: GL_TEXTURE_COMPONENTS             HEX: 1003
+CONSTANT: GL_TEXTURE_RED_SIZE               HEX: 805C
+CONSTANT: GL_TEXTURE_GREEN_SIZE             HEX: 805D
+CONSTANT: GL_TEXTURE_BLUE_SIZE              HEX: 805E
+CONSTANT: GL_TEXTURE_ALPHA_SIZE             HEX: 805F
+CONSTANT: GL_TEXTURE_LUMINANCE_SIZE         HEX: 8060
+CONSTANT: GL_TEXTURE_INTENSITY_SIZE         HEX: 8061
+CONSTANT: GL_NEAREST_MIPMAP_NEAREST         HEX: 2700
+CONSTANT: GL_NEAREST_MIPMAP_LINEAR          HEX: 2702
+CONSTANT: GL_LINEAR_MIPMAP_NEAREST          HEX: 2701
+CONSTANT: GL_LINEAR_MIPMAP_LINEAR           HEX: 2703
+CONSTANT: GL_OBJECT_LINEAR                  HEX: 2401
+CONSTANT: GL_OBJECT_PLANE                   HEX: 2501
+CONSTANT: GL_EYE_LINEAR                     HEX: 2400
+CONSTANT: GL_EYE_PLANE                      HEX: 2502
+CONSTANT: GL_SPHERE_MAP                     HEX: 2402
+CONSTANT: GL_DECAL                          HEX: 2101
+CONSTANT: GL_MODULATE                       HEX: 2100
+CONSTANT: GL_NEAREST                        HEX: 2600
+CONSTANT: GL_REPEAT                         HEX: 2901
+CONSTANT: GL_CLAMP                          HEX: 2900
+CONSTANT: GL_S                              HEX: 2000
+CONSTANT: GL_T                              HEX: 2001
+CONSTANT: GL_R                              HEX: 2002
+CONSTANT: GL_Q                              HEX: 2003
+CONSTANT: GL_TEXTURE_GEN_R                  HEX: 0C62
+CONSTANT: GL_TEXTURE_GEN_Q                  HEX: 0C63
 
 ! Utility inline
-: GL_VENDOR                         HEX: 1F00 ; inline
-: GL_RENDERER                       HEX: 1F01 ; inline
-: GL_VERSION                        HEX: 1F02 ; inline
-: GL_EXTENSIONS                     HEX: 1F03 ; inline
+CONSTANT: GL_VENDOR                         HEX: 1F00
+CONSTANT: GL_RENDERER                       HEX: 1F01
+CONSTANT: GL_VERSION                        HEX: 1F02
+CONSTANT: GL_EXTENSIONS                     HEX: 1F03
 
 ! Errors inline
-: GL_NO_ERROR                       HEX:    0 ; inline
-: GL_INVALID_VALUE                  HEX: 0501 ; inline
-: GL_INVALID_ENUM                   HEX: 0500 ; inline
-: GL_INVALID_OPERATION              HEX: 0502 ; inline
-: GL_STACK_OVERFLOW                 HEX: 0503 ; inline
-: GL_STACK_UNDERFLOW                HEX: 0504 ; inline
-: GL_OUT_OF_MEMORY                  HEX: 0505 ; inline
+CONSTANT: GL_NO_ERROR                       HEX:    0
+CONSTANT: GL_INVALID_VALUE                  HEX: 0501
+CONSTANT: GL_INVALID_ENUM                   HEX: 0500
+CONSTANT: GL_INVALID_OPERATION              HEX: 0502
+CONSTANT: GL_STACK_OVERFLOW                 HEX: 0503
+CONSTANT: GL_STACK_UNDERFLOW                HEX: 0504
+CONSTANT: GL_OUT_OF_MEMORY                  HEX: 0505
 
 ! glPush/PopAttrib bits
-: GL_CURRENT_BIT                    HEX: 00000001 ; inline
-: GL_POINT_BIT                      HEX: 00000002 ; inline
-: GL_LINE_BIT                       HEX: 00000004 ; inline
-: GL_POLYGON_BIT                    HEX: 00000008 ; inline
-: GL_POLYGON_STIPPLE_BIT            HEX: 00000010 ; inline
-: GL_PIXEL_MODE_BIT                 HEX: 00000020 ; inline
-: GL_LIGHTING_BIT                   HEX: 00000040 ; inline
-: GL_FOG_BIT                        HEX: 00000080 ; inline
-: GL_DEPTH_BUFFER_BIT               HEX: 00000100 ; inline
-: GL_ACCUM_BUFFER_BIT               HEX: 00000200 ; inline
-: GL_STENCIL_BUFFER_BIT             HEX: 00000400 ; inline
-: GL_VIEWPORT_BIT                   HEX: 00000800 ; inline
-: GL_TRANSFORM_BIT                  HEX: 00001000 ; inline
-: GL_ENABLE_BIT                     HEX: 00002000 ; inline
-: GL_COLOR_BUFFER_BIT               HEX: 00004000 ; inline
-: GL_HINT_BIT                       HEX: 00008000 ; inline
-: GL_EVAL_BIT                       HEX: 00010000 ; inline
-: GL_LIST_BIT                       HEX: 00020000 ; inline
-: GL_TEXTURE_BIT                    HEX: 00040000 ; inline
-: GL_SCISSOR_BIT                    HEX: 00080000 ; inline
-: GL_ALL_ATTRIB_BITS                HEX: 000FFFFF ; inline
+CONSTANT: GL_CURRENT_BIT                    HEX: 00000001
+CONSTANT: GL_POINT_BIT                      HEX: 00000002
+CONSTANT: GL_LINE_BIT                       HEX: 00000004
+CONSTANT: GL_POLYGON_BIT                    HEX: 00000008
+CONSTANT: GL_POLYGON_STIPPLE_BIT            HEX: 00000010
+CONSTANT: GL_PIXEL_MODE_BIT                 HEX: 00000020
+CONSTANT: GL_LIGHTING_BIT                   HEX: 00000040
+CONSTANT: GL_FOG_BIT                        HEX: 00000080
+CONSTANT: GL_DEPTH_BUFFER_BIT               HEX: 00000100
+CONSTANT: GL_ACCUM_BUFFER_BIT               HEX: 00000200
+CONSTANT: GL_STENCIL_BUFFER_BIT             HEX: 00000400
+CONSTANT: GL_VIEWPORT_BIT                   HEX: 00000800
+CONSTANT: GL_TRANSFORM_BIT                  HEX: 00001000
+CONSTANT: GL_ENABLE_BIT                     HEX: 00002000
+CONSTANT: GL_COLOR_BUFFER_BIT               HEX: 00004000
+CONSTANT: GL_HINT_BIT                       HEX: 00008000
+CONSTANT: GL_EVAL_BIT                       HEX: 00010000
+CONSTANT: GL_LIST_BIT                       HEX: 00020000
+CONSTANT: GL_TEXTURE_BIT                    HEX: 00040000
+CONSTANT: GL_SCISSOR_BIT                    HEX: 00080000
+CONSTANT: GL_ALL_ATTRIB_BITS                HEX: 000FFFFF
 
 ! OpenGL 1.1
-: GL_PROXY_TEXTURE_1D               HEX: 8063 ; inline
-: GL_PROXY_TEXTURE_2D               HEX: 8064 ; inline
-: GL_TEXTURE_PRIORITY               HEX: 8066 ; inline
-: GL_TEXTURE_RESIDENT               HEX: 8067 ; inline
-: GL_TEXTURE_BINDING_1D             HEX: 8068 ; inline
-: GL_TEXTURE_BINDING_2D             HEX: 8069 ; inline
-: GL_TEXTURE_INTERNAL_FORMAT        HEX: 1003 ; inline
-: GL_ALPHA4                         HEX: 803B ; inline
-: GL_ALPHA8                         HEX: 803C ; inline
-: GL_ALPHA12                        HEX: 803D ; inline
-: GL_ALPHA16                        HEX: 803E ; inline
-: GL_LUMINANCE4                     HEX: 803F ; inline
-: GL_LUMINANCE8                     HEX: 8040 ; inline
-: GL_LUMINANCE12                    HEX: 8041 ; inline
-: GL_LUMINANCE16                    HEX: 8042 ; inline
-: GL_LUMINANCE4_ALPHA4              HEX: 8043 ; inline
-: GL_LUMINANCE6_ALPHA2              HEX: 8044 ; inline
-: GL_LUMINANCE8_ALPHA8              HEX: 8045 ; inline
-: GL_LUMINANCE12_ALPHA4             HEX: 8046 ; inline
-: GL_LUMINANCE12_ALPHA12            HEX: 8047 ; inline
-: GL_LUMINANCE16_ALPHA16            HEX: 8048 ; inline
-: GL_INTENSITY                      HEX: 8049 ; inline
-: GL_INTENSITY4                     HEX: 804A ; inline
-: GL_INTENSITY8                     HEX: 804B ; inline
-: GL_INTENSITY12                    HEX: 804C ; inline
-: GL_INTENSITY16                    HEX: 804D ; inline
-: GL_R3_G3_B2                       HEX: 2A10 ; inline
-: GL_RGB4                           HEX: 804F ; inline
-: GL_RGB5                           HEX: 8050 ; inline
-: GL_RGB8                           HEX: 8051 ; inline
-: GL_RGB10                          HEX: 8052 ; inline
-: GL_RGB12                          HEX: 8053 ; inline
-: GL_RGB16                          HEX: 8054 ; inline
-: GL_RGBA2                          HEX: 8055 ; inline
-: GL_RGBA4                          HEX: 8056 ; inline
-: GL_RGB5_A1                        HEX: 8057 ; inline
-: GL_RGBA8                          HEX: 8058 ; inline
-: GL_RGB10_A2                       HEX: 8059 ; inline
-: GL_RGBA12                         HEX: 805A ; inline
-: GL_RGBA16                         HEX: 805B ; inline
-: GL_CLIENT_PIXEL_STORE_BIT         HEX: 00000001 ; inline
-: GL_CLIENT_VERTEX_ARRAY_BIT        HEX: 00000002 ; inline
-: GL_ALL_CLIENT_ATTRIB_BITS         HEX: FFFFFFFF ; inline
-: GL_CLIENT_ALL_ATTRIB_BITS         HEX: FFFFFFFF ; inline
+CONSTANT: GL_PROXY_TEXTURE_1D               HEX: 8063
+CONSTANT: GL_PROXY_TEXTURE_2D               HEX: 8064
+CONSTANT: GL_TEXTURE_PRIORITY               HEX: 8066
+CONSTANT: GL_TEXTURE_RESIDENT               HEX: 8067
+CONSTANT: GL_TEXTURE_BINDING_1D             HEX: 8068
+CONSTANT: GL_TEXTURE_BINDING_2D             HEX: 8069
+CONSTANT: GL_TEXTURE_INTERNAL_FORMAT        HEX: 1003
+CONSTANT: GL_ALPHA4                         HEX: 803B
+CONSTANT: GL_ALPHA8                         HEX: 803C
+CONSTANT: GL_ALPHA12                        HEX: 803D
+CONSTANT: GL_ALPHA16                        HEX: 803E
+CONSTANT: GL_LUMINANCE4                     HEX: 803F
+CONSTANT: GL_LUMINANCE8                     HEX: 8040
+CONSTANT: GL_LUMINANCE12                    HEX: 8041
+CONSTANT: GL_LUMINANCE16                    HEX: 8042
+CONSTANT: GL_LUMINANCE4_ALPHA4              HEX: 8043
+CONSTANT: GL_LUMINANCE6_ALPHA2              HEX: 8044
+CONSTANT: GL_LUMINANCE8_ALPHA8              HEX: 8045
+CONSTANT: GL_LUMINANCE12_ALPHA4             HEX: 8046
+CONSTANT: GL_LUMINANCE12_ALPHA12            HEX: 8047
+CONSTANT: GL_LUMINANCE16_ALPHA16            HEX: 8048
+CONSTANT: GL_INTENSITY                      HEX: 8049
+CONSTANT: GL_INTENSITY4                     HEX: 804A
+CONSTANT: GL_INTENSITY8                     HEX: 804B
+CONSTANT: GL_INTENSITY12                    HEX: 804C
+CONSTANT: GL_INTENSITY16                    HEX: 804D
+CONSTANT: GL_R3_G3_B2                       HEX: 2A10
+CONSTANT: GL_RGB4                           HEX: 804F
+CONSTANT: GL_RGB5                           HEX: 8050
+CONSTANT: GL_RGB8                           HEX: 8051
+CONSTANT: GL_RGB10                          HEX: 8052
+CONSTANT: GL_RGB12                          HEX: 8053
+CONSTANT: GL_RGB16                          HEX: 8054
+CONSTANT: GL_RGBA2                          HEX: 8055
+CONSTANT: GL_RGBA4                          HEX: 8056
+CONSTANT: GL_RGB5_A1                        HEX: 8057
+CONSTANT: GL_RGBA8                          HEX: 8058
+CONSTANT: GL_RGB10_A2                       HEX: 8059
+CONSTANT: GL_RGBA12                         HEX: 805A
+CONSTANT: GL_RGBA16                         HEX: 805B
+CONSTANT: GL_CLIENT_PIXEL_STORE_BIT         HEX: 00000001
+CONSTANT: GL_CLIENT_VERTEX_ARRAY_BIT        HEX: 00000002
+CONSTANT: GL_ALL_CLIENT_ATTRIB_BITS         HEX: FFFFFFFF
+CONSTANT: GL_CLIENT_ALL_ATTRIB_BITS         HEX: FFFFFFFF
 
 LIBRARY: gl
 
@@ -1123,47 +1119,47 @@ FUNCTION: void glPopName ( ) ;
 
 ! OpenGL 1.2
 
-: GL_SMOOTH_POINT_SIZE_RANGE HEX: 0B12 ; inline
-: GL_SMOOTH_POINT_SIZE_GRANULARITY HEX: 0B13 ; inline
-: GL_SMOOTH_LINE_WIDTH_RANGE HEX: 0B22 ; inline
-: GL_SMOOTH_LINE_WIDTH_GRANULARITY HEX: 0B23 ; inline
-: GL_UNSIGNED_BYTE_3_3_2 HEX: 8032 ; inline
-: GL_UNSIGNED_SHORT_4_4_4_4 HEX: 8033 ; inline
-: GL_UNSIGNED_SHORT_5_5_5_1 HEX: 8034 ; inline
-: GL_UNSIGNED_INT_8_8_8_8 HEX: 8035 ; inline
-: GL_UNSIGNED_INT_10_10_10_2 HEX: 8036 ; inline
-: GL_RESCALE_NORMAL HEX: 803A ; inline
-: GL_TEXTURE_BINDING_3D HEX: 806A ; inline
-: GL_PACK_SKIP_IMAGES HEX: 806B ; inline
-: GL_PACK_IMAGE_HEIGHT HEX: 806C ; inline
-: GL_UNPACK_SKIP_IMAGES HEX: 806D ; inline
-: GL_UNPACK_IMAGE_HEIGHT HEX: 806E ; inline
-: GL_TEXTURE_3D HEX: 806F ; inline
-: GL_PROXY_TEXTURE_3D HEX: 8070 ; inline
-: GL_TEXTURE_DEPTH HEX: 8071 ; inline
-: GL_TEXTURE_WRAP_R HEX: 8072 ; inline
-: GL_MAX_3D_TEXTURE_SIZE HEX: 8073 ; inline
-: GL_BGR HEX: 80E0 ; inline
-: GL_BGRA HEX: 80E1 ; inline
-: GL_MAX_ELEMENTS_VERTICES HEX: 80E8 ; inline
-: GL_MAX_ELEMENTS_INDICES HEX: 80E9 ; inline
-: GL_CLAMP_TO_EDGE HEX: 812F ; inline
-: GL_TEXTURE_MIN_LOD HEX: 813A ; inline
-: GL_TEXTURE_MAX_LOD HEX: 813B ; inline
-: GL_TEXTURE_BASE_LEVEL HEX: 813C ; inline
-: GL_TEXTURE_MAX_LEVEL HEX: 813D ; inline
-: GL_LIGHT_MODEL_COLOR_CONTROL HEX: 81F8 ; inline
-: GL_SINGLE_COLOR HEX: 81F9 ; inline
-: GL_SEPARATE_SPECULAR_COLOR HEX: 81FA ; inline
-: GL_UNSIGNED_BYTE_2_3_3_REV HEX: 8362 ; inline
-: GL_UNSIGNED_SHORT_5_6_5 HEX: 8363 ; inline
-: GL_UNSIGNED_SHORT_5_6_5_REV HEX: 8364 ; inline
-: GL_UNSIGNED_SHORT_4_4_4_4_REV HEX: 8365 ; inline
-: GL_UNSIGNED_SHORT_1_5_5_5_REV HEX: 8366 ; inline
-: GL_UNSIGNED_INT_8_8_8_8_REV HEX: 8367 ; inline
-: GL_UNSIGNED_INT_2_10_10_10_REV HEX: 8368 ; inline
-: GL_ALIASED_POINT_SIZE_RANGE HEX: 846D ; inline
-: GL_ALIASED_LINE_WIDTH_RANGE HEX: 846E ; inline
+CONSTANT: GL_SMOOTH_POINT_SIZE_RANGE HEX: 0B12
+CONSTANT: GL_SMOOTH_POINT_SIZE_GRANULARITY HEX: 0B13
+CONSTANT: GL_SMOOTH_LINE_WIDTH_RANGE HEX: 0B22
+CONSTANT: GL_SMOOTH_LINE_WIDTH_GRANULARITY HEX: 0B23
+CONSTANT: GL_UNSIGNED_BYTE_3_3_2 HEX: 8032
+CONSTANT: GL_UNSIGNED_SHORT_4_4_4_4 HEX: 8033
+CONSTANT: GL_UNSIGNED_SHORT_5_5_5_1 HEX: 8034
+CONSTANT: GL_UNSIGNED_INT_8_8_8_8 HEX: 8035
+CONSTANT: GL_UNSIGNED_INT_10_10_10_2 HEX: 8036
+CONSTANT: GL_RESCALE_NORMAL HEX: 803A
+CONSTANT: GL_TEXTURE_BINDING_3D HEX: 806A
+CONSTANT: GL_PACK_SKIP_IMAGES HEX: 806B
+CONSTANT: GL_PACK_IMAGE_HEIGHT HEX: 806C
+CONSTANT: GL_UNPACK_SKIP_IMAGES HEX: 806D
+CONSTANT: GL_UNPACK_IMAGE_HEIGHT HEX: 806E
+CONSTANT: GL_TEXTURE_3D HEX: 806F
+CONSTANT: GL_PROXY_TEXTURE_3D HEX: 8070
+CONSTANT: GL_TEXTURE_DEPTH HEX: 8071
+CONSTANT: GL_TEXTURE_WRAP_R HEX: 8072
+CONSTANT: GL_MAX_3D_TEXTURE_SIZE HEX: 8073
+CONSTANT: GL_BGR HEX: 80E0
+CONSTANT: GL_BGRA HEX: 80E1
+CONSTANT: GL_MAX_ELEMENTS_VERTICES HEX: 80E8
+CONSTANT: GL_MAX_ELEMENTS_INDICES HEX: 80E9
+CONSTANT: GL_CLAMP_TO_EDGE HEX: 812F
+CONSTANT: GL_TEXTURE_MIN_LOD HEX: 813A
+CONSTANT: GL_TEXTURE_MAX_LOD HEX: 813B
+CONSTANT: GL_TEXTURE_BASE_LEVEL HEX: 813C
+CONSTANT: GL_TEXTURE_MAX_LEVEL HEX: 813D
+CONSTANT: GL_LIGHT_MODEL_COLOR_CONTROL HEX: 81F8
+CONSTANT: GL_SINGLE_COLOR HEX: 81F9
+CONSTANT: GL_SEPARATE_SPECULAR_COLOR HEX: 81FA
+CONSTANT: GL_UNSIGNED_BYTE_2_3_3_REV HEX: 8362
+CONSTANT: GL_UNSIGNED_SHORT_5_6_5 HEX: 8363
+CONSTANT: GL_UNSIGNED_SHORT_5_6_5_REV HEX: 8364
+CONSTANT: GL_UNSIGNED_SHORT_4_4_4_4_REV HEX: 8365
+CONSTANT: GL_UNSIGNED_SHORT_1_5_5_5_REV HEX: 8366
+CONSTANT: GL_UNSIGNED_INT_8_8_8_8_REV HEX: 8367
+CONSTANT: GL_UNSIGNED_INT_2_10_10_10_REV HEX: 8368
+CONSTANT: GL_ALIASED_POINT_SIZE_RANGE HEX: 846D
+CONSTANT: GL_ALIASED_LINE_WIDTH_RANGE HEX: 846E
 
 GL-FUNCTION: void glCopyTexSubImage3D { glCopyTexSubImage3DEXT } ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) ;
 GL-FUNCTION: void glDrawRangeElements { glDrawRangeElementsEXT } ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLvoid* indices ) ;
@@ -1174,102 +1170,102 @@ GL-FUNCTION: void glTexSubImage3D { glTexSubImage3DEXT } ( GLenum target, GLint
 ! OpenGL 1.3
 
 
-: GL_MULTISAMPLE HEX: 809D ; inline
-: GL_SAMPLE_ALPHA_TO_COVERAGE HEX: 809E ; inline
-: GL_SAMPLE_ALPHA_TO_ONE HEX: 809F ; inline
-: GL_SAMPLE_COVERAGE HEX: 80A0 ; inline
-: GL_SAMPLE_BUFFERS HEX: 80A8 ; inline
-: GL_SAMPLES HEX: 80A9 ; inline
-: GL_SAMPLE_COVERAGE_VALUE HEX: 80AA ; inline
-: GL_SAMPLE_COVERAGE_INVERT HEX: 80AB ; inline
-: GL_CLAMP_TO_BORDER HEX: 812D ; inline
-: GL_TEXTURE0 HEX: 84C0 ; inline
-: GL_TEXTURE1 HEX: 84C1 ; inline
-: GL_TEXTURE2 HEX: 84C2 ; inline
-: GL_TEXTURE3 HEX: 84C3 ; inline
-: GL_TEXTURE4 HEX: 84C4 ; inline
-: GL_TEXTURE5 HEX: 84C5 ; inline
-: GL_TEXTURE6 HEX: 84C6 ; inline
-: GL_TEXTURE7 HEX: 84C7 ; inline
-: GL_TEXTURE8 HEX: 84C8 ; inline
-: GL_TEXTURE9 HEX: 84C9 ; inline
-: GL_TEXTURE10 HEX: 84CA ; inline
-: GL_TEXTURE11 HEX: 84CB ; inline
-: GL_TEXTURE12 HEX: 84CC ; inline
-: GL_TEXTURE13 HEX: 84CD ; inline
-: GL_TEXTURE14 HEX: 84CE ; inline
-: GL_TEXTURE15 HEX: 84CF ; inline
-: GL_TEXTURE16 HEX: 84D0 ; inline
-: GL_TEXTURE17 HEX: 84D1 ; inline
-: GL_TEXTURE18 HEX: 84D2 ; inline
-: GL_TEXTURE19 HEX: 84D3 ; inline
-: GL_TEXTURE20 HEX: 84D4 ; inline
-: GL_TEXTURE21 HEX: 84D5 ; inline
-: GL_TEXTURE22 HEX: 84D6 ; inline
-: GL_TEXTURE23 HEX: 84D7 ; inline
-: GL_TEXTURE24 HEX: 84D8 ; inline
-: GL_TEXTURE25 HEX: 84D9 ; inline
-: GL_TEXTURE26 HEX: 84DA ; inline
-: GL_TEXTURE27 HEX: 84DB ; inline
-: GL_TEXTURE28 HEX: 84DC ; inline
-: GL_TEXTURE29 HEX: 84DD ; inline
-: GL_TEXTURE30 HEX: 84DE ; inline
-: GL_TEXTURE31 HEX: 84DF ; inline
-: GL_ACTIVE_TEXTURE HEX: 84E0 ; inline
-: GL_CLIENT_ACTIVE_TEXTURE HEX: 84E1 ; inline
-: GL_MAX_TEXTURE_UNITS HEX: 84E2 ; inline
-: GL_TRANSPOSE_MODELVIEW_MATRIX HEX: 84E3 ; inline
-: GL_TRANSPOSE_PROJECTION_MATRIX HEX: 84E4 ; inline
-: GL_TRANSPOSE_TEXTURE_MATRIX HEX: 84E5 ; inline
-: GL_TRANSPOSE_COLOR_MATRIX HEX: 84E6 ; inline
-: GL_SUBTRACT HEX: 84E7 ; inline
-: GL_COMPRESSED_ALPHA HEX: 84E9 ; inline
-: GL_COMPRESSED_LUMINANCE HEX: 84EA ; inline
-: GL_COMPRESSED_LUMINANCE_ALPHA HEX: 84EB ; inline
-: GL_COMPRESSED_INTENSITY HEX: 84EC ; inline
-: GL_COMPRESSED_RGB HEX: 84ED ; inline
-: GL_COMPRESSED_RGBA HEX: 84EE ; inline
-: GL_TEXTURE_COMPRESSION_HINT HEX: 84EF ; inline
-: GL_NORMAL_MAP HEX: 8511 ; inline
-: GL_REFLECTION_MAP HEX: 8512 ; inline
-: GL_TEXTURE_CUBE_MAP HEX: 8513 ; inline
-: GL_TEXTURE_BINDING_CUBE_MAP HEX: 8514 ; inline
-: GL_TEXTURE_CUBE_MAP_POSITIVE_X HEX: 8515 ; inline
-: GL_TEXTURE_CUBE_MAP_NEGATIVE_X HEX: 8516 ; inline
-: GL_TEXTURE_CUBE_MAP_POSITIVE_Y HEX: 8517 ; inline
-: GL_TEXTURE_CUBE_MAP_NEGATIVE_Y HEX: 8518 ; inline
-: GL_TEXTURE_CUBE_MAP_POSITIVE_Z HEX: 8519 ; inline
-: GL_TEXTURE_CUBE_MAP_NEGATIVE_Z HEX: 851A ; inline
-: GL_PROXY_TEXTURE_CUBE_MAP HEX: 851B ; inline
-: GL_MAX_CUBE_MAP_TEXTURE_SIZE HEX: 851C ; inline
-: GL_COMBINE HEX: 8570 ; inline
-: GL_COMBINE_RGB HEX: 8571 ; inline
-: GL_COMBINE_ALPHA HEX: 8572 ; inline
-: GL_RGB_SCALE HEX: 8573 ; inline
-: GL_ADD_SIGNED HEX: 8574 ; inline
-: GL_INTERPOLATE HEX: 8575 ; inline
-: GL_CONSTANT HEX: 8576 ; inline
-: GL_PRIMARY_COLOR HEX: 8577 ; inline
-: GL_PREVIOUS HEX: 8578 ; inline
-: GL_SOURCE0_RGB HEX: 8580 ; inline
-: GL_SOURCE1_RGB HEX: 8581 ; inline
-: GL_SOURCE2_RGB HEX: 8582 ; inline
-: GL_SOURCE0_ALPHA HEX: 8588 ; inline
-: GL_SOURCE1_ALPHA HEX: 8589 ; inline
-: GL_SOURCE2_ALPHA HEX: 858A ; inline
-: GL_OPERAND0_RGB HEX: 8590 ; inline
-: GL_OPERAND1_RGB HEX: 8591 ; inline
-: GL_OPERAND2_RGB HEX: 8592 ; inline
-: GL_OPERAND0_ALPHA HEX: 8598 ; inline
-: GL_OPERAND1_ALPHA HEX: 8599 ; inline
-: GL_OPERAND2_ALPHA HEX: 859A ; inline
-: GL_TEXTURE_COMPRESSED_IMAGE_SIZE HEX: 86A0 ; inline
-: GL_TEXTURE_COMPRESSED HEX: 86A1 ; inline
-: GL_NUM_COMPRESSED_TEXTURE_FORMATS HEX: 86A2 ; inline
-: GL_COMPRESSED_TEXTURE_FORMATS HEX: 86A3 ; inline
-: GL_DOT3_RGB HEX: 86AE ; inline
-: GL_DOT3_RGBA HEX: 86AF ; inline
-: GL_MULTISAMPLE_BIT HEX: 20000000 ; inline
+CONSTANT: GL_MULTISAMPLE HEX: 809D
+CONSTANT: GL_SAMPLE_ALPHA_TO_COVERAGE HEX: 809E
+CONSTANT: GL_SAMPLE_ALPHA_TO_ONE HEX: 809F
+CONSTANT: GL_SAMPLE_COVERAGE HEX: 80A0
+CONSTANT: GL_SAMPLE_BUFFERS HEX: 80A8
+CONSTANT: GL_SAMPLES HEX: 80A9
+CONSTANT: GL_SAMPLE_COVERAGE_VALUE HEX: 80AA
+CONSTANT: GL_SAMPLE_COVERAGE_INVERT HEX: 80AB
+CONSTANT: GL_CLAMP_TO_BORDER HEX: 812D
+CONSTANT: GL_TEXTURE0 HEX: 84C0
+CONSTANT: GL_TEXTURE1 HEX: 84C1
+CONSTANT: GL_TEXTURE2 HEX: 84C2
+CONSTANT: GL_TEXTURE3 HEX: 84C3
+CONSTANT: GL_TEXTURE4 HEX: 84C4
+CONSTANT: GL_TEXTURE5 HEX: 84C5
+CONSTANT: GL_TEXTURE6 HEX: 84C6
+CONSTANT: GL_TEXTURE7 HEX: 84C7
+CONSTANT: GL_TEXTURE8 HEX: 84C8
+CONSTANT: GL_TEXTURE9 HEX: 84C9
+CONSTANT: GL_TEXTURE10 HEX: 84CA
+CONSTANT: GL_TEXTURE11 HEX: 84CB
+CONSTANT: GL_TEXTURE12 HEX: 84CC
+CONSTANT: GL_TEXTURE13 HEX: 84CD
+CONSTANT: GL_TEXTURE14 HEX: 84CE
+CONSTANT: GL_TEXTURE15 HEX: 84CF
+CONSTANT: GL_TEXTURE16 HEX: 84D0
+CONSTANT: GL_TEXTURE17 HEX: 84D1
+CONSTANT: GL_TEXTURE18 HEX: 84D2
+CONSTANT: GL_TEXTURE19 HEX: 84D3
+CONSTANT: GL_TEXTURE20 HEX: 84D4
+CONSTANT: GL_TEXTURE21 HEX: 84D5
+CONSTANT: GL_TEXTURE22 HEX: 84D6
+CONSTANT: GL_TEXTURE23 HEX: 84D7
+CONSTANT: GL_TEXTURE24 HEX: 84D8
+CONSTANT: GL_TEXTURE25 HEX: 84D9
+CONSTANT: GL_TEXTURE26 HEX: 84DA
+CONSTANT: GL_TEXTURE27 HEX: 84DB
+CONSTANT: GL_TEXTURE28 HEX: 84DC
+CONSTANT: GL_TEXTURE29 HEX: 84DD
+CONSTANT: GL_TEXTURE30 HEX: 84DE
+CONSTANT: GL_TEXTURE31 HEX: 84DF
+CONSTANT: GL_ACTIVE_TEXTURE HEX: 84E0
+CONSTANT: GL_CLIENT_ACTIVE_TEXTURE HEX: 84E1
+CONSTANT: GL_MAX_TEXTURE_UNITS HEX: 84E2
+CONSTANT: GL_TRANSPOSE_MODELVIEW_MATRIX HEX: 84E3
+CONSTANT: GL_TRANSPOSE_PROJECTION_MATRIX HEX: 84E4
+CONSTANT: GL_TRANSPOSE_TEXTURE_MATRIX HEX: 84E5
+CONSTANT: GL_TRANSPOSE_COLOR_MATRIX HEX: 84E6
+CONSTANT: GL_SUBTRACT HEX: 84E7
+CONSTANT: GL_COMPRESSED_ALPHA HEX: 84E9
+CONSTANT: GL_COMPRESSED_LUMINANCE HEX: 84EA
+CONSTANT: GL_COMPRESSED_LUMINANCE_ALPHA HEX: 84EB
+CONSTANT: GL_COMPRESSED_INTENSITY HEX: 84EC
+CONSTANT: GL_COMPRESSED_RGB HEX: 84ED
+CONSTANT: GL_COMPRESSED_RGBA HEX: 84EE
+CONSTANT: GL_TEXTURE_COMPRESSION_HINT HEX: 84EF
+CONSTANT: GL_NORMAL_MAP HEX: 8511
+CONSTANT: GL_REFLECTION_MAP HEX: 8512
+CONSTANT: GL_TEXTURE_CUBE_MAP HEX: 8513
+CONSTANT: GL_TEXTURE_BINDING_CUBE_MAP HEX: 8514
+CONSTANT: GL_TEXTURE_CUBE_MAP_POSITIVE_X HEX: 8515
+CONSTANT: GL_TEXTURE_CUBE_MAP_NEGATIVE_X HEX: 8516
+CONSTANT: GL_TEXTURE_CUBE_MAP_POSITIVE_Y HEX: 8517
+CONSTANT: GL_TEXTURE_CUBE_MAP_NEGATIVE_Y HEX: 8518
+CONSTANT: GL_TEXTURE_CUBE_MAP_POSITIVE_Z HEX: 8519
+CONSTANT: GL_TEXTURE_CUBE_MAP_NEGATIVE_Z HEX: 851A
+CONSTANT: GL_PROXY_TEXTURE_CUBE_MAP HEX: 851B
+CONSTANT: GL_MAX_CUBE_MAP_TEXTURE_SIZE HEX: 851C
+CONSTANT: GL_COMBINE HEX: 8570
+CONSTANT: GL_COMBINE_RGB HEX: 8571
+CONSTANT: GL_COMBINE_ALPHA HEX: 8572
+CONSTANT: GL_RGB_SCALE HEX: 8573
+CONSTANT: GL_ADD_SIGNED HEX: 8574
+CONSTANT: GL_INTERPOLATE HEX: 8575
+CONSTANT: GL_CONSTANT HEX: 8576
+CONSTANT: GL_PRIMARY_COLOR HEX: 8577
+CONSTANT: GL_PREVIOUS HEX: 8578
+CONSTANT: GL_SOURCE0_RGB HEX: 8580
+CONSTANT: GL_SOURCE1_RGB HEX: 8581
+CONSTANT: GL_SOURCE2_RGB HEX: 8582
+CONSTANT: GL_SOURCE0_ALPHA HEX: 8588
+CONSTANT: GL_SOURCE1_ALPHA HEX: 8589
+CONSTANT: GL_SOURCE2_ALPHA HEX: 858A
+CONSTANT: GL_OPERAND0_RGB HEX: 8590
+CONSTANT: GL_OPERAND1_RGB HEX: 8591
+CONSTANT: GL_OPERAND2_RGB HEX: 8592
+CONSTANT: GL_OPERAND0_ALPHA HEX: 8598
+CONSTANT: GL_OPERAND1_ALPHA HEX: 8599
+CONSTANT: GL_OPERAND2_ALPHA HEX: 859A
+CONSTANT: GL_TEXTURE_COMPRESSED_IMAGE_SIZE HEX: 86A0
+CONSTANT: GL_TEXTURE_COMPRESSED HEX: 86A1
+CONSTANT: GL_NUM_COMPRESSED_TEXTURE_FORMATS HEX: 86A2
+CONSTANT: GL_COMPRESSED_TEXTURE_FORMATS HEX: 86A3
+CONSTANT: GL_DOT3_RGB HEX: 86AE
+CONSTANT: GL_DOT3_RGBA HEX: 86AF
+CONSTANT: GL_MULTISAMPLE_BIT HEX: 20000000
 
 GL-FUNCTION: void glActiveTexture { glActiveTextureARB } ( GLenum texture ) ;
 GL-FUNCTION: void glClientActiveTexture { glClientActiveTextureARB } ( GLenum texture ) ;
@@ -1322,45 +1318,45 @@ GL-FUNCTION: void glSampleCoverage { glSampleCoverageARB } ( GLclampf value, GLb
 ! OpenGL 1.4
 
 
-: GL_BLEND_DST_RGB HEX: 80C8 ; inline
-: GL_BLEND_SRC_RGB HEX: 80C9 ; inline
-: GL_BLEND_DST_ALPHA HEX: 80CA ; inline
-: GL_BLEND_SRC_ALPHA HEX: 80CB ; inline
-: GL_POINT_SIZE_MIN HEX: 8126 ; inline
-: GL_POINT_SIZE_MAX HEX: 8127 ; inline
-: GL_POINT_FADE_THRESHOLD_SIZE HEX: 8128 ; inline
-: GL_POINT_DISTANCE_ATTENUATION HEX: 8129 ; inline
-: GL_GENERATE_MIPMAP HEX: 8191 ; inline
-: GL_GENERATE_MIPMAP_HINT HEX: 8192 ; inline
-: GL_DEPTH_COMPONENT16 HEX: 81A5 ; inline
-: GL_DEPTH_COMPONENT24 HEX: 81A6 ; inline
-: GL_DEPTH_COMPONENT32 HEX: 81A7 ; inline
-: GL_MIRRORED_REPEAT HEX: 8370 ; inline
-: GL_FOG_COORDINATE_SOURCE HEX: 8450 ; inline
-: GL_FOG_COORDINATE HEX: 8451 ; inline
-: GL_FRAGMENT_DEPTH HEX: 8452 ; inline
-: GL_CURRENT_FOG_COORDINATE HEX: 8453 ; inline
-: GL_FOG_COORDINATE_ARRAY_TYPE HEX: 8454 ; inline
-: GL_FOG_COORDINATE_ARRAY_STRIDE HEX: 8455 ; inline
-: GL_FOG_COORDINATE_ARRAY_POINTER HEX: 8456 ; inline
-: GL_FOG_COORDINATE_ARRAY HEX: 8457 ; inline
-: GL_COLOR_SUM HEX: 8458 ; inline
-: GL_CURRENT_SECONDARY_COLOR HEX: 8459 ; inline
-: GL_SECONDARY_COLOR_ARRAY_SIZE HEX: 845A ; inline
-: GL_SECONDARY_COLOR_ARRAY_TYPE HEX: 845B ; inline
-: GL_SECONDARY_COLOR_ARRAY_STRIDE HEX: 845C ; inline
-: GL_SECONDARY_COLOR_ARRAY_POINTER HEX: 845D ; inline
-: GL_SECONDARY_COLOR_ARRAY HEX: 845E ; inline
-: GL_MAX_TEXTURE_LOD_BIAS HEX: 84FD ; inline
-: GL_TEXTURE_FILTER_CONTROL HEX: 8500 ; inline
-: GL_TEXTURE_LOD_BIAS HEX: 8501 ; inline
-: GL_INCR_WRAP HEX: 8507 ; inline
-: GL_DECR_WRAP HEX: 8508 ; inline
-: GL_TEXTURE_DEPTH_SIZE HEX: 884A ; inline
-: GL_DEPTH_TEXTURE_MODE HEX: 884B ; inline
-: GL_TEXTURE_COMPARE_MODE HEX: 884C ; inline
-: GL_TEXTURE_COMPARE_FUNC HEX: 884D ; inline
-: GL_COMPARE_R_TO_TEXTURE HEX: 884E ; inline
+CONSTANT: GL_BLEND_DST_RGB HEX: 80C8
+CONSTANT: GL_BLEND_SRC_RGB HEX: 80C9
+CONSTANT: GL_BLEND_DST_ALPHA HEX: 80CA
+CONSTANT: GL_BLEND_SRC_ALPHA HEX: 80CB
+CONSTANT: GL_POINT_SIZE_MIN HEX: 8126
+CONSTANT: GL_POINT_SIZE_MAX HEX: 8127
+CONSTANT: GL_POINT_FADE_THRESHOLD_SIZE HEX: 8128
+CONSTANT: GL_POINT_DISTANCE_ATTENUATION HEX: 8129
+CONSTANT: GL_GENERATE_MIPMAP HEX: 8191
+CONSTANT: GL_GENERATE_MIPMAP_HINT HEX: 8192
+CONSTANT: GL_DEPTH_COMPONENT16 HEX: 81A5
+CONSTANT: GL_DEPTH_COMPONENT24 HEX: 81A6
+CONSTANT: GL_DEPTH_COMPONENT32 HEX: 81A7
+CONSTANT: GL_MIRRORED_REPEAT HEX: 8370
+CONSTANT: GL_FOG_COORDINATE_SOURCE HEX: 8450
+CONSTANT: GL_FOG_COORDINATE HEX: 8451
+CONSTANT: GL_FRAGMENT_DEPTH HEX: 8452
+CONSTANT: GL_CURRENT_FOG_COORDINATE HEX: 8453
+CONSTANT: GL_FOG_COORDINATE_ARRAY_TYPE HEX: 8454
+CONSTANT: GL_FOG_COORDINATE_ARRAY_STRIDE HEX: 8455
+CONSTANT: GL_FOG_COORDINATE_ARRAY_POINTER HEX: 8456
+CONSTANT: GL_FOG_COORDINATE_ARRAY HEX: 8457
+CONSTANT: GL_COLOR_SUM HEX: 8458
+CONSTANT: GL_CURRENT_SECONDARY_COLOR HEX: 8459
+CONSTANT: GL_SECONDARY_COLOR_ARRAY_SIZE HEX: 845A
+CONSTANT: GL_SECONDARY_COLOR_ARRAY_TYPE HEX: 845B
+CONSTANT: GL_SECONDARY_COLOR_ARRAY_STRIDE HEX: 845C
+CONSTANT: GL_SECONDARY_COLOR_ARRAY_POINTER HEX: 845D
+CONSTANT: GL_SECONDARY_COLOR_ARRAY HEX: 845E
+CONSTANT: GL_MAX_TEXTURE_LOD_BIAS HEX: 84FD
+CONSTANT: GL_TEXTURE_FILTER_CONTROL HEX: 8500
+CONSTANT: GL_TEXTURE_LOD_BIAS HEX: 8501
+CONSTANT: GL_INCR_WRAP HEX: 8507
+CONSTANT: GL_DECR_WRAP HEX: 8508
+CONSTANT: GL_TEXTURE_DEPTH_SIZE HEX: 884A
+CONSTANT: GL_DEPTH_TEXTURE_MODE HEX: 884B
+CONSTANT: GL_TEXTURE_COMPARE_MODE HEX: 884C
+CONSTANT: GL_TEXTURE_COMPARE_FUNC HEX: 884D
+CONSTANT: GL_COMPARE_R_TO_TEXTURE HEX: 884E
 
 GL-FUNCTION: void glBlendColor { glBlendColorEXT } ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) ;
 GL-FUNCTION: void glBlendEquation { glBlendEquationEXT } ( GLenum mode ) ;
@@ -1410,56 +1406,56 @@ GL-FUNCTION: void glWindowPos3sv { glWindowPos3svARB } ( GLshort* p ) ;
 
 ! OpenGL 1.5
 
-: GL_BUFFER_SIZE HEX: 8764 ; inline
-: GL_BUFFER_USAGE HEX: 8765 ; inline
-: GL_QUERY_COUNTER_BITS HEX: 8864 ; inline
-: GL_CURRENT_QUERY HEX: 8865 ; inline
-: GL_QUERY_RESULT HEX: 8866 ; inline
-: GL_QUERY_RESULT_AVAILABLE HEX: 8867 ; inline
-: GL_ARRAY_BUFFER HEX: 8892 ; inline
-: GL_ELEMENT_ARRAY_BUFFER HEX: 8893 ; inline
-: GL_ARRAY_BUFFER_BINDING HEX: 8894 ; inline
-: GL_ELEMENT_ARRAY_BUFFER_BINDING HEX: 8895 ; inline
-: GL_VERTEX_ARRAY_BUFFER_BINDING HEX: 8896 ; inline
-: GL_NORMAL_ARRAY_BUFFER_BINDING HEX: 8897 ; inline
-: GL_COLOR_ARRAY_BUFFER_BINDING HEX: 8898 ; inline
-: GL_INDEX_ARRAY_BUFFER_BINDING HEX: 8899 ; inline
-: GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING HEX: 889A ; inline
-: GL_EDGE_FLAG_ARRAY_BUFFER_BINDING HEX: 889B ; inline
-: GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING HEX: 889C ; inline
-: GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING HEX: 889D ; inline
-: GL_WEIGHT_ARRAY_BUFFER_BINDING HEX: 889E ; inline
-: GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING HEX: 889F ; inline
-: GL_READ_ONLY HEX: 88B8 ; inline
-: GL_WRITE_ONLY HEX: 88B9 ; inline
-: GL_READ_WRITE HEX: 88BA ; inline
-: GL_BUFFER_ACCESS HEX: 88BB ; inline
-: GL_BUFFER_MAPPED HEX: 88BC ; inline
-: GL_BUFFER_MAP_POINTER HEX: 88BD ; inline
-: GL_STREAM_DRAW HEX: 88E0 ; inline
-: GL_STREAM_READ HEX: 88E1 ; inline
-: GL_STREAM_COPY HEX: 88E2 ; inline
-: GL_STATIC_DRAW HEX: 88E4 ; inline
-: GL_STATIC_READ HEX: 88E5 ; inline
-: GL_STATIC_COPY HEX: 88E6 ; inline
-: GL_DYNAMIC_DRAW HEX: 88E8 ; inline
-: GL_DYNAMIC_READ HEX: 88E9 ; inline
-: GL_DYNAMIC_COPY HEX: 88EA ; inline
-: GL_SAMPLES_PASSED HEX: 8914 ; inline
-: GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE ; inline
-: GL_FOG_COORD GL_FOG_COORDINATE ; inline
-: GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY ; inline
-: GL_SRC0_RGB GL_SOURCE0_RGB ; inline
-: GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER ; inline
-: GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE ; inline
-: GL_SRC1_ALPHA GL_SOURCE1_ALPHA ; inline
-: GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE ; inline
-: GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE ; inline
-: GL_SRC0_ALPHA GL_SOURCE0_ALPHA ; inline
-: GL_SRC1_RGB GL_SOURCE1_RGB ; inline
-: GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING ; inline
-: GL_SRC2_ALPHA GL_SOURCE2_ALPHA ; inline
-: GL_SRC2_RGB GL_SOURCE2_RGB ; inline
+CONSTANT: GL_BUFFER_SIZE HEX: 8764
+CONSTANT: GL_BUFFER_USAGE HEX: 8765
+CONSTANT: GL_QUERY_COUNTER_BITS HEX: 8864
+CONSTANT: GL_CURRENT_QUERY HEX: 8865
+CONSTANT: GL_QUERY_RESULT HEX: 8866
+CONSTANT: GL_QUERY_RESULT_AVAILABLE HEX: 8867
+CONSTANT: GL_ARRAY_BUFFER HEX: 8892
+CONSTANT: GL_ELEMENT_ARRAY_BUFFER HEX: 8893
+CONSTANT: GL_ARRAY_BUFFER_BINDING HEX: 8894
+CONSTANT: GL_ELEMENT_ARRAY_BUFFER_BINDING HEX: 8895
+CONSTANT: GL_VERTEX_ARRAY_BUFFER_BINDING HEX: 8896
+CONSTANT: GL_NORMAL_ARRAY_BUFFER_BINDING HEX: 8897
+CONSTANT: GL_COLOR_ARRAY_BUFFER_BINDING HEX: 8898
+CONSTANT: GL_INDEX_ARRAY_BUFFER_BINDING HEX: 8899
+CONSTANT: GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING HEX: 889A
+CONSTANT: GL_EDGE_FLAG_ARRAY_BUFFER_BINDING HEX: 889B
+CONSTANT: GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING HEX: 889C
+CONSTANT: GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING HEX: 889D
+CONSTANT: GL_WEIGHT_ARRAY_BUFFER_BINDING HEX: 889E
+CONSTANT: GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING HEX: 889F
+CONSTANT: GL_READ_ONLY HEX: 88B8
+CONSTANT: GL_WRITE_ONLY HEX: 88B9
+CONSTANT: GL_READ_WRITE HEX: 88BA
+CONSTANT: GL_BUFFER_ACCESS HEX: 88BB
+CONSTANT: GL_BUFFER_MAPPED HEX: 88BC
+CONSTANT: GL_BUFFER_MAP_POINTER HEX: 88BD
+CONSTANT: GL_STREAM_DRAW HEX: 88E0
+CONSTANT: GL_STREAM_READ HEX: 88E1
+CONSTANT: GL_STREAM_COPY HEX: 88E2
+CONSTANT: GL_STATIC_DRAW HEX: 88E4
+CONSTANT: GL_STATIC_READ HEX: 88E5
+CONSTANT: GL_STATIC_COPY HEX: 88E6
+CONSTANT: GL_DYNAMIC_DRAW HEX: 88E8
+CONSTANT: GL_DYNAMIC_READ HEX: 88E9
+CONSTANT: GL_DYNAMIC_COPY HEX: 88EA
+CONSTANT: GL_SAMPLES_PASSED HEX: 8914
+ALIAS: GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
+ALIAS: GL_FOG_COORD GL_FOG_COORDINATE
+ALIAS: GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY
+ALIAS: GL_SRC0_RGB GL_SOURCE0_RGB
+ALIAS: GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER
+ALIAS: GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE
+ALIAS: GL_SRC1_ALPHA GL_SOURCE1_ALPHA
+ALIAS: GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE
+ALIAS: GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE
+ALIAS: GL_SRC0_ALPHA GL_SOURCE0_ALPHA
+ALIAS: GL_SRC1_RGB GL_SOURCE1_RGB
+ALIAS: GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
+ALIAS: GL_SRC2_ALPHA GL_SOURCE2_ALPHA
+ALIAS: GL_SRC2_RGB GL_SOURCE2_RGB
 
 TYPEDEF: ptrdiff_t GLsizeiptr
 TYPEDEF: ptrdiff_t GLintptr
@@ -1488,91 +1484,91 @@ GL-FUNCTION: GLboolean glUnmapBuffer { glUnmapBufferARB } ( GLenum target ) ;
 ! OpenGL 2.0
 
 
-: GL_VERTEX_ATTRIB_ARRAY_ENABLED HEX: 8622 ; inline
-: GL_VERTEX_ATTRIB_ARRAY_SIZE HEX: 8623 ; inline
-: GL_VERTEX_ATTRIB_ARRAY_STRIDE HEX: 8624 ; inline
-: GL_VERTEX_ATTRIB_ARRAY_TYPE HEX: 8625 ; inline
-: GL_CURRENT_VERTEX_ATTRIB HEX: 8626 ; inline
-: GL_VERTEX_PROGRAM_POINT_SIZE HEX: 8642 ; inline
-: GL_VERTEX_PROGRAM_TWO_SIDE HEX: 8643 ; inline
-: GL_VERTEX_ATTRIB_ARRAY_POINTER HEX: 8645 ; inline
-: GL_STENCIL_BACK_FUNC HEX: 8800 ; inline
-: GL_STENCIL_BACK_FAIL HEX: 8801 ; inline
-: GL_STENCIL_BACK_PASS_DEPTH_FAIL HEX: 8802 ; inline
-: GL_STENCIL_BACK_PASS_DEPTH_PASS HEX: 8803 ; inline
-: GL_MAX_DRAW_BUFFERS HEX: 8824 ; inline
-: GL_DRAW_BUFFER0 HEX: 8825 ; inline
-: GL_DRAW_BUFFER1 HEX: 8826 ; inline
-: GL_DRAW_BUFFER2 HEX: 8827 ; inline
-: GL_DRAW_BUFFER3 HEX: 8828 ; inline
-: GL_DRAW_BUFFER4 HEX: 8829 ; inline
-: GL_DRAW_BUFFER5 HEX: 882A ; inline
-: GL_DRAW_BUFFER6 HEX: 882B ; inline
-: GL_DRAW_BUFFER7 HEX: 882C ; inline
-: GL_DRAW_BUFFER8 HEX: 882D ; inline
-: GL_DRAW_BUFFER9 HEX: 882E ; inline
-: GL_DRAW_BUFFER10 HEX: 882F ; inline
-: GL_DRAW_BUFFER11 HEX: 8830 ; inline
-: GL_DRAW_BUFFER12 HEX: 8831 ; inline
-: GL_DRAW_BUFFER13 HEX: 8832 ; inline
-: GL_DRAW_BUFFER14 HEX: 8833 ; inline
-: GL_DRAW_BUFFER15 HEX: 8834 ; inline
-: GL_BLEND_EQUATION_ALPHA HEX: 883D ; inline
-: GL_POINT_SPRITE HEX: 8861 ; inline
-: GL_COORD_REPLACE HEX: 8862 ; inline
-: GL_MAX_VERTEX_ATTRIBS HEX: 8869 ; inline
-: GL_VERTEX_ATTRIB_ARRAY_NORMALIZED HEX: 886A ; inline
-: GL_MAX_TEXTURE_COORDS HEX: 8871 ; inline
-: GL_MAX_TEXTURE_IMAGE_UNITS HEX: 8872 ; inline
-: GL_FRAGMENT_SHADER HEX: 8B30 ; inline
-: GL_VERTEX_SHADER HEX: 8B31 ; inline
-: GL_MAX_FRAGMENT_UNIFORM_COMPONENTS HEX: 8B49 ; inline
-: GL_MAX_VERTEX_UNIFORM_COMPONENTS HEX: 8B4A ; inline
-: GL_MAX_VARYING_FLOATS HEX: 8B4B ; inline
-: GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS HEX: 8B4C ; inline
-: GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS HEX: 8B4D ; inline
-: GL_SHADER_TYPE HEX: 8B4F ; inline
-: GL_FLOAT_VEC2 HEX: 8B50 ; inline
-: GL_FLOAT_VEC3 HEX: 8B51 ; inline
-: GL_FLOAT_VEC4 HEX: 8B52 ; inline
-: GL_INT_VEC2 HEX: 8B53 ; inline
-: GL_INT_VEC3 HEX: 8B54 ; inline
-: GL_INT_VEC4 HEX: 8B55 ; inline
-: GL_BOOL HEX: 8B56 ; inline
-: GL_BOOL_VEC2 HEX: 8B57 ; inline
-: GL_BOOL_VEC3 HEX: 8B58 ; inline
-: GL_BOOL_VEC4 HEX: 8B59 ; inline
-: GL_FLOAT_MAT2 HEX: 8B5A ; inline
-: GL_FLOAT_MAT3 HEX: 8B5B ; inline
-: GL_FLOAT_MAT4 HEX: 8B5C ; inline
-: GL_SAMPLER_1D HEX: 8B5D ; inline
-: GL_SAMPLER_2D HEX: 8B5E ; inline
-: GL_SAMPLER_3D HEX: 8B5F ; inline
-: GL_SAMPLER_CUBE HEX: 8B60 ; inline
-: GL_SAMPLER_1D_SHADOW HEX: 8B61 ; inline
-: GL_SAMPLER_2D_SHADOW HEX: 8B62 ; inline
-: GL_DELETE_STATUS HEX: 8B80 ; inline
-: GL_COMPILE_STATUS HEX: 8B81 ; inline
-: GL_LINK_STATUS HEX: 8B82 ; inline
-: GL_VALIDATE_STATUS HEX: 8B83 ; inline
-: GL_INFO_LOG_LENGTH HEX: 8B84 ; inline
-: GL_ATTACHED_SHADERS HEX: 8B85 ; inline
-: GL_ACTIVE_UNIFORMS HEX: 8B86 ; inline
-: GL_ACTIVE_UNIFORM_MAX_LENGTH HEX: 8B87 ; inline
-: GL_SHADER_SOURCE_LENGTH HEX: 8B88 ; inline
-: GL_ACTIVE_ATTRIBUTES HEX: 8B89 ; inline
-: GL_ACTIVE_ATTRIBUTE_MAX_LENGTH HEX: 8B8A ; inline
-: GL_FRAGMENT_SHADER_DERIVATIVE_HINT HEX: 8B8B ; inline
-: GL_SHADING_LANGUAGE_VERSION HEX: 8B8C ; inline
-: GL_CURRENT_PROGRAM HEX: 8B8D ; inline
-: GL_POINT_SPRITE_COORD_ORIGIN HEX: 8CA0 ; inline
-: GL_LOWER_LEFT HEX: 8CA1 ; inline
-: GL_UPPER_LEFT HEX: 8CA2 ; inline
-: GL_STENCIL_BACK_REF HEX: 8CA3 ; inline
-: GL_STENCIL_BACK_VALUE_MASK HEX: 8CA4 ; inline
-: GL_STENCIL_BACK_WRITEMASK HEX: 8CA5 ; inline
-: GL_BLEND_EQUATION HEX: 8009 ; inline
-: GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION ; inline
+CONSTANT: GL_VERTEX_ATTRIB_ARRAY_ENABLED HEX: 8622
+CONSTANT: GL_VERTEX_ATTRIB_ARRAY_SIZE HEX: 8623
+CONSTANT: GL_VERTEX_ATTRIB_ARRAY_STRIDE HEX: 8624
+CONSTANT: GL_VERTEX_ATTRIB_ARRAY_TYPE HEX: 8625
+CONSTANT: GL_CURRENT_VERTEX_ATTRIB HEX: 8626
+CONSTANT: GL_VERTEX_PROGRAM_POINT_SIZE HEX: 8642
+CONSTANT: GL_VERTEX_PROGRAM_TWO_SIDE HEX: 8643
+CONSTANT: GL_VERTEX_ATTRIB_ARRAY_POINTER HEX: 8645
+CONSTANT: GL_STENCIL_BACK_FUNC HEX: 8800
+CONSTANT: GL_STENCIL_BACK_FAIL HEX: 8801
+CONSTANT: GL_STENCIL_BACK_PASS_DEPTH_FAIL HEX: 8802
+CONSTANT: GL_STENCIL_BACK_PASS_DEPTH_PASS HEX: 8803
+CONSTANT: GL_MAX_DRAW_BUFFERS HEX: 8824
+CONSTANT: GL_DRAW_BUFFER0 HEX: 8825
+CONSTANT: GL_DRAW_BUFFER1 HEX: 8826
+CONSTANT: GL_DRAW_BUFFER2 HEX: 8827
+CONSTANT: GL_DRAW_BUFFER3 HEX: 8828
+CONSTANT: GL_DRAW_BUFFER4 HEX: 8829
+CONSTANT: GL_DRAW_BUFFER5 HEX: 882A
+CONSTANT: GL_DRAW_BUFFER6 HEX: 882B
+CONSTANT: GL_DRAW_BUFFER7 HEX: 882C
+CONSTANT: GL_DRAW_BUFFER8 HEX: 882D
+CONSTANT: GL_DRAW_BUFFER9 HEX: 882E
+CONSTANT: GL_DRAW_BUFFER10 HEX: 882F
+CONSTANT: GL_DRAW_BUFFER11 HEX: 8830
+CONSTANT: GL_DRAW_BUFFER12 HEX: 8831
+CONSTANT: GL_DRAW_BUFFER13 HEX: 8832
+CONSTANT: GL_DRAW_BUFFER14 HEX: 8833
+CONSTANT: GL_DRAW_BUFFER15 HEX: 8834
+CONSTANT: GL_BLEND_EQUATION_ALPHA HEX: 883D
+CONSTANT: GL_POINT_SPRITE HEX: 8861
+CONSTANT: GL_COORD_REPLACE HEX: 8862
+CONSTANT: GL_MAX_VERTEX_ATTRIBS HEX: 8869
+CONSTANT: GL_VERTEX_ATTRIB_ARRAY_NORMALIZED HEX: 886A
+CONSTANT: GL_MAX_TEXTURE_COORDS HEX: 8871
+CONSTANT: GL_MAX_TEXTURE_IMAGE_UNITS HEX: 8872
+CONSTANT: GL_FRAGMENT_SHADER HEX: 8B30
+CONSTANT: GL_VERTEX_SHADER HEX: 8B31
+CONSTANT: GL_MAX_FRAGMENT_UNIFORM_COMPONENTS HEX: 8B49
+CONSTANT: GL_MAX_VERTEX_UNIFORM_COMPONENTS HEX: 8B4A
+CONSTANT: GL_MAX_VARYING_FLOATS HEX: 8B4B
+CONSTANT: GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS HEX: 8B4C
+CONSTANT: GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS HEX: 8B4D
+CONSTANT: GL_SHADER_TYPE HEX: 8B4F
+CONSTANT: GL_FLOAT_VEC2 HEX: 8B50
+CONSTANT: GL_FLOAT_VEC3 HEX: 8B51
+CONSTANT: GL_FLOAT_VEC4 HEX: 8B52
+CONSTANT: GL_INT_VEC2 HEX: 8B53
+CONSTANT: GL_INT_VEC3 HEX: 8B54
+CONSTANT: GL_INT_VEC4 HEX: 8B55
+CONSTANT: GL_BOOL HEX: 8B56
+CONSTANT: GL_BOOL_VEC2 HEX: 8B57
+CONSTANT: GL_BOOL_VEC3 HEX: 8B58
+CONSTANT: GL_BOOL_VEC4 HEX: 8B59
+CONSTANT: GL_FLOAT_MAT2 HEX: 8B5A
+CONSTANT: GL_FLOAT_MAT3 HEX: 8B5B
+CONSTANT: GL_FLOAT_MAT4 HEX: 8B5C
+CONSTANT: GL_SAMPLER_1D HEX: 8B5D
+CONSTANT: GL_SAMPLER_2D HEX: 8B5E
+CONSTANT: GL_SAMPLER_3D HEX: 8B5F
+CONSTANT: GL_SAMPLER_CUBE HEX: 8B60
+CONSTANT: GL_SAMPLER_1D_SHADOW HEX: 8B61
+CONSTANT: GL_SAMPLER_2D_SHADOW HEX: 8B62
+CONSTANT: GL_DELETE_STATUS HEX: 8B80
+CONSTANT: GL_COMPILE_STATUS HEX: 8B81
+CONSTANT: GL_LINK_STATUS HEX: 8B82
+CONSTANT: GL_VALIDATE_STATUS HEX: 8B83
+CONSTANT: GL_INFO_LOG_LENGTH HEX: 8B84
+CONSTANT: GL_ATTACHED_SHADERS HEX: 8B85
+CONSTANT: GL_ACTIVE_UNIFORMS HEX: 8B86
+CONSTANT: GL_ACTIVE_UNIFORM_MAX_LENGTH HEX: 8B87
+CONSTANT: GL_SHADER_SOURCE_LENGTH HEX: 8B88
+CONSTANT: GL_ACTIVE_ATTRIBUTES HEX: 8B89
+CONSTANT: GL_ACTIVE_ATTRIBUTE_MAX_LENGTH HEX: 8B8A
+CONSTANT: GL_FRAGMENT_SHADER_DERIVATIVE_HINT HEX: 8B8B
+CONSTANT: GL_SHADING_LANGUAGE_VERSION HEX: 8B8C
+CONSTANT: GL_CURRENT_PROGRAM HEX: 8B8D
+CONSTANT: GL_POINT_SPRITE_COORD_ORIGIN HEX: 8CA0
+CONSTANT: GL_LOWER_LEFT HEX: 8CA1
+CONSTANT: GL_UPPER_LEFT HEX: 8CA2
+CONSTANT: GL_STENCIL_BACK_REF HEX: 8CA3
+CONSTANT: GL_STENCIL_BACK_VALUE_MASK HEX: 8CA4
+CONSTANT: GL_STENCIL_BACK_WRITEMASK HEX: 8CA5
+CONSTANT: GL_BLEND_EQUATION HEX: 8009
+ALIAS: GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
 
 TYPEDEF: char GLchar
 
@@ -1674,23 +1670,23 @@ GL-FUNCTION: void glVertexAttribPointer { glVertexAttribPointerARB } ( GLuint in
 ! OpenGL 2.1
 
 
-: GL_CURRENT_RASTER_SECONDARY_COLOR HEX: 845F ; inline
-: GL_PIXEL_PACK_BUFFER HEX: 88EB ; inline
-: GL_PIXEL_UNPACK_BUFFER HEX: 88EC ; inline
-: GL_PIXEL_PACK_BUFFER_BINDING HEX: 88ED ; inline
-: GL_PIXEL_UNPACK_BUFFER_BINDING HEX: 88EF ; inline
-: GL_SRGB HEX: 8C40 ; inline
-: GL_SRGB8 HEX: 8C41 ; inline
-: GL_SRGB_ALPHA HEX: 8C42 ; inline
-: GL_SRGB8_ALPHA8 HEX: 8C43 ; inline
-: GL_SLUMINANCE_ALPHA HEX: 8C44 ; inline
-: GL_SLUMINANCE8_ALPHA8 HEX: 8C45 ; inline
-: GL_SLUMINANCE HEX: 8C46 ; inline
-: GL_SLUMINANCE8 HEX: 8C47 ; inline
-: GL_COMPRESSED_SRGB HEX: 8C48 ; inline
-: GL_COMPRESSED_SRGB_ALPHA HEX: 8C49 ; inline
-: GL_COMPRESSED_SLUMINANCE HEX: 8C4A ; inline
-: GL_COMPRESSED_SLUMINANCE_ALPHA HEX: 8C4B ; inline
+CONSTANT: GL_CURRENT_RASTER_SECONDARY_COLOR HEX: 845F
+CONSTANT: GL_PIXEL_PACK_BUFFER HEX: 88EB
+CONSTANT: GL_PIXEL_UNPACK_BUFFER HEX: 88EC
+CONSTANT: GL_PIXEL_PACK_BUFFER_BINDING HEX: 88ED
+CONSTANT: GL_PIXEL_UNPACK_BUFFER_BINDING HEX: 88EF
+CONSTANT: GL_SRGB HEX: 8C40
+CONSTANT: GL_SRGB8 HEX: 8C41
+CONSTANT: GL_SRGB_ALPHA HEX: 8C42
+CONSTANT: GL_SRGB8_ALPHA8 HEX: 8C43
+CONSTANT: GL_SLUMINANCE_ALPHA HEX: 8C44
+CONSTANT: GL_SLUMINANCE8_ALPHA8 HEX: 8C45
+CONSTANT: GL_SLUMINANCE HEX: 8C46
+CONSTANT: GL_SLUMINANCE8 HEX: 8C47
+CONSTANT: GL_COMPRESSED_SRGB HEX: 8C48
+CONSTANT: GL_COMPRESSED_SRGB_ALPHA HEX: 8C49
+CONSTANT: GL_COMPRESSED_SLUMINANCE HEX: 8C4A
+CONSTANT: GL_COMPRESSED_SLUMINANCE_ALPHA HEX: 8C4B
 
 GL-FUNCTION: void glUniformMatrix2x3fv { } ( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) ;
 GL-FUNCTION: void glUniformMatrix2x4fv { } ( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) ;
@@ -1703,57 +1699,57 @@ GL-FUNCTION: void glUniformMatrix4x3fv { } ( GLint location, GLsizei count, GLbo
 ! GL_EXT_framebuffer_object
 
 
-: GL_INVALID_FRAMEBUFFER_OPERATION_EXT HEX: 0506 ; inline
-: GL_MAX_RENDERBUFFER_SIZE_EXT HEX: 84E8 ; inline
-: GL_FRAMEBUFFER_BINDING_EXT HEX: 8CA6 ; inline
-: GL_RENDERBUFFER_BINDING_EXT HEX: 8CA7 ; inline
-: GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT HEX: 8CD0 ; inline
-: GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT HEX: 8CD1 ; inline
-: GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT HEX: 8CD2 ; inline
-: GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT HEX: 8CD3 ; inline
-: GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT HEX: 8CD4 ; inline
-: GL_FRAMEBUFFER_COMPLETE_EXT HEX: 8CD5 ; inline
-: GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT HEX: 8CD6 ; inline
-: GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT HEX: 8CD7 ; inline
-: GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT HEX: 8CD9 ; inline
-: GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT HEX: 8CDA ; inline
-: GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT HEX: 8CDB ; inline
-: GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT HEX: 8CDC ; inline
-: GL_FRAMEBUFFER_UNSUPPORTED_EXT HEX: 8CDD ; inline
-: GL_MAX_COLOR_ATTACHMENTS_EXT HEX: 8CDF ; inline
-: GL_COLOR_ATTACHMENT0_EXT HEX: 8CE0 ; inline
-: GL_COLOR_ATTACHMENT1_EXT HEX: 8CE1 ; inline
-: GL_COLOR_ATTACHMENT2_EXT HEX: 8CE2 ; inline
-: GL_COLOR_ATTACHMENT3_EXT HEX: 8CE3 ; inline
-: GL_COLOR_ATTACHMENT4_EXT HEX: 8CE4 ; inline
-: GL_COLOR_ATTACHMENT5_EXT HEX: 8CE5 ; inline
-: GL_COLOR_ATTACHMENT6_EXT HEX: 8CE6 ; inline
-: GL_COLOR_ATTACHMENT7_EXT HEX: 8CE7 ; inline
-: GL_COLOR_ATTACHMENT8_EXT HEX: 8CE8 ; inline
-: GL_COLOR_ATTACHMENT9_EXT HEX: 8CE9 ; inline
-: GL_COLOR_ATTACHMENT10_EXT HEX: 8CEA ; inline
-: GL_COLOR_ATTACHMENT11_EXT HEX: 8CEB ; inline
-: GL_COLOR_ATTACHMENT12_EXT HEX: 8CEC ; inline
-: GL_COLOR_ATTACHMENT13_EXT HEX: 8CED ; inline
-: GL_COLOR_ATTACHMENT14_EXT HEX: 8CEE ; inline
-: GL_COLOR_ATTACHMENT15_EXT HEX: 8CEF ; inline
-: GL_DEPTH_ATTACHMENT_EXT HEX: 8D00 ; inline
-: GL_STENCIL_ATTACHMENT_EXT HEX: 8D20 ; inline
-: GL_FRAMEBUFFER_EXT HEX: 8D40 ; inline
-: GL_RENDERBUFFER_EXT HEX: 8D41 ; inline
-: GL_RENDERBUFFER_WIDTH_EXT HEX: 8D42 ; inline
-: GL_RENDERBUFFER_HEIGHT_EXT HEX: 8D43 ; inline
-: GL_RENDERBUFFER_INTERNAL_FORMAT_EXT HEX: 8D44 ; inline
-: GL_STENCIL_INDEX1_EXT HEX: 8D46 ; inline
-: GL_STENCIL_INDEX4_EXT HEX: 8D47 ; inline
-: GL_STENCIL_INDEX8_EXT HEX: 8D48 ; inline
-: GL_STENCIL_INDEX16_EXT HEX: 8D49 ; inline
-: GL_RENDERBUFFER_RED_SIZE_EXT HEX: 8D50 ; inline
-: GL_RENDERBUFFER_GREEN_SIZE_EXT HEX: 8D51 ; inline
-: GL_RENDERBUFFER_BLUE_SIZE_EXT HEX: 8D52 ; inline
-: GL_RENDERBUFFER_ALPHA_SIZE_EXT HEX: 8D53 ; inline
-: GL_RENDERBUFFER_DEPTH_SIZE_EXT HEX: 8D54 ; inline
-: GL_RENDERBUFFER_STENCIL_SIZE_EXT HEX: 8D55 ; inline
+CONSTANT: GL_INVALID_FRAMEBUFFER_OPERATION_EXT HEX: 0506
+CONSTANT: GL_MAX_RENDERBUFFER_SIZE_EXT HEX: 84E8
+CONSTANT: GL_FRAMEBUFFER_BINDING_EXT HEX: 8CA6
+CONSTANT: GL_RENDERBUFFER_BINDING_EXT HEX: 8CA7
+CONSTANT: GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT HEX: 8CD0
+CONSTANT: GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT HEX: 8CD1
+CONSTANT: GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT HEX: 8CD2
+CONSTANT: GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT HEX: 8CD3
+CONSTANT: GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT HEX: 8CD4
+CONSTANT: GL_FRAMEBUFFER_COMPLETE_EXT HEX: 8CD5
+CONSTANT: GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT HEX: 8CD6
+CONSTANT: GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT HEX: 8CD7
+CONSTANT: GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT HEX: 8CD9
+CONSTANT: GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT HEX: 8CDA
+CONSTANT: GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT HEX: 8CDB
+CONSTANT: GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT HEX: 8CDC
+CONSTANT: GL_FRAMEBUFFER_UNSUPPORTED_EXT HEX: 8CDD
+CONSTANT: GL_MAX_COLOR_ATTACHMENTS_EXT HEX: 8CDF
+CONSTANT: GL_COLOR_ATTACHMENT0_EXT HEX: 8CE0
+CONSTANT: GL_COLOR_ATTACHMENT1_EXT HEX: 8CE1
+CONSTANT: GL_COLOR_ATTACHMENT2_EXT HEX: 8CE2
+CONSTANT: GL_COLOR_ATTACHMENT3_EXT HEX: 8CE3
+CONSTANT: GL_COLOR_ATTACHMENT4_EXT HEX: 8CE4
+CONSTANT: GL_COLOR_ATTACHMENT5_EXT HEX: 8CE5
+CONSTANT: GL_COLOR_ATTACHMENT6_EXT HEX: 8CE6
+CONSTANT: GL_COLOR_ATTACHMENT7_EXT HEX: 8CE7
+CONSTANT: GL_COLOR_ATTACHMENT8_EXT HEX: 8CE8
+CONSTANT: GL_COLOR_ATTACHMENT9_EXT HEX: 8CE9
+CONSTANT: GL_COLOR_ATTACHMENT10_EXT HEX: 8CEA
+CONSTANT: GL_COLOR_ATTACHMENT11_EXT HEX: 8CEB
+CONSTANT: GL_COLOR_ATTACHMENT12_EXT HEX: 8CEC
+CONSTANT: GL_COLOR_ATTACHMENT13_EXT HEX: 8CED
+CONSTANT: GL_COLOR_ATTACHMENT14_EXT HEX: 8CEE
+CONSTANT: GL_COLOR_ATTACHMENT15_EXT HEX: 8CEF
+CONSTANT: GL_DEPTH_ATTACHMENT_EXT HEX: 8D00
+CONSTANT: GL_STENCIL_ATTACHMENT_EXT HEX: 8D20
+CONSTANT: GL_FRAMEBUFFER_EXT HEX: 8D40
+CONSTANT: GL_RENDERBUFFER_EXT HEX: 8D41
+CONSTANT: GL_RENDERBUFFER_WIDTH_EXT HEX: 8D42
+CONSTANT: GL_RENDERBUFFER_HEIGHT_EXT HEX: 8D43
+CONSTANT: GL_RENDERBUFFER_INTERNAL_FORMAT_EXT HEX: 8D44
+CONSTANT: GL_STENCIL_INDEX1_EXT HEX: 8D46
+CONSTANT: GL_STENCIL_INDEX4_EXT HEX: 8D47
+CONSTANT: GL_STENCIL_INDEX8_EXT HEX: 8D48
+CONSTANT: GL_STENCIL_INDEX16_EXT HEX: 8D49
+CONSTANT: GL_RENDERBUFFER_RED_SIZE_EXT HEX: 8D50
+CONSTANT: GL_RENDERBUFFER_GREEN_SIZE_EXT HEX: 8D51
+CONSTANT: GL_RENDERBUFFER_BLUE_SIZE_EXT HEX: 8D52
+CONSTANT: GL_RENDERBUFFER_ALPHA_SIZE_EXT HEX: 8D53
+CONSTANT: GL_RENDERBUFFER_DEPTH_SIZE_EXT HEX: 8D54
+CONSTANT: GL_RENDERBUFFER_STENCIL_SIZE_EXT HEX: 8D55
 
 GL-FUNCTION: void glBindFramebufferEXT { } ( GLenum target, GLuint framebuffer ) ;
 GL-FUNCTION: void glBindRenderbufferEXT { } ( GLenum target, GLuint renderbuffer ) ;
@@ -1777,24 +1773,24 @@ GL-FUNCTION: void glRenderbufferStorageEXT { } ( GLenum target, GLenum internalf
 ! GL_ARB_texture_float
 
 
-: GL_RGBA32F_ARB HEX: 8814 ; inline
-: GL_RGB32F_ARB HEX: 8815 ; inline
-: GL_ALPHA32F_ARB HEX: 8816 ; inline
-: GL_INTENSITY32F_ARB HEX: 8817 ; inline
-: GL_LUMINANCE32F_ARB HEX: 8818 ; inline
-: GL_LUMINANCE_ALPHA32F_ARB HEX: 8819 ; inline
-: GL_RGBA16F_ARB HEX: 881A ; inline
-: GL_RGB16F_ARB HEX: 881B ; inline
-: GL_ALPHA16F_ARB HEX: 881C ; inline
-: GL_INTENSITY16F_ARB HEX: 881D ; inline
-: GL_LUMINANCE16F_ARB HEX: 881E ; inline
-: GL_LUMINANCE_ALPHA16F_ARB HEX: 881F ; inline
-: GL_TEXTURE_RED_TYPE_ARB HEX: 8C10 ; inline
-: GL_TEXTURE_GREEN_TYPE_ARB HEX: 8C11 ; inline
-: GL_TEXTURE_BLUE_TYPE_ARB HEX: 8C12 ; inline
-: GL_TEXTURE_ALPHA_TYPE_ARB HEX: 8C13 ; inline
-: GL_TEXTURE_LUMINANCE_TYPE_ARB HEX: 8C14 ; inline
-: GL_TEXTURE_INTENSITY_TYPE_ARB HEX: 8C15 ; inline
-: GL_TEXTURE_DEPTH_TYPE_ARB HEX: 8C16 ; inline
-: GL_UNSIGNED_NORMALIZED_ARB HEX: 8C17 ; inline
+CONSTANT: GL_RGBA32F_ARB HEX: 8814
+CONSTANT: GL_RGB32F_ARB HEX: 8815
+CONSTANT: GL_ALPHA32F_ARB HEX: 8816
+CONSTANT: GL_INTENSITY32F_ARB HEX: 8817
+CONSTANT: GL_LUMINANCE32F_ARB HEX: 8818
+CONSTANT: GL_LUMINANCE_ALPHA32F_ARB HEX: 8819
+CONSTANT: GL_RGBA16F_ARB HEX: 881A
+CONSTANT: GL_RGB16F_ARB HEX: 881B
+CONSTANT: GL_ALPHA16F_ARB HEX: 881C
+CONSTANT: GL_INTENSITY16F_ARB HEX: 881D
+CONSTANT: GL_LUMINANCE16F_ARB HEX: 881E
+CONSTANT: GL_LUMINANCE_ALPHA16F_ARB HEX: 881F
+CONSTANT: GL_TEXTURE_RED_TYPE_ARB HEX: 8C10
+CONSTANT: GL_TEXTURE_GREEN_TYPE_ARB HEX: 8C11
+CONSTANT: GL_TEXTURE_BLUE_TYPE_ARB HEX: 8C12
+CONSTANT: GL_TEXTURE_ALPHA_TYPE_ARB HEX: 8C13
+CONSTANT: GL_TEXTURE_LUMINANCE_TYPE_ARB HEX: 8C14
+CONSTANT: GL_TEXTURE_INTENSITY_TYPE_ARB HEX: 8C15
+CONSTANT: GL_TEXTURE_DEPTH_TYPE_ARB HEX: 8C16
+CONSTANT: GL_UNSIGNED_NORMALIZED_ARB HEX: 8C17
 
index 10f9c57a838129b54e34012f34b452a35f6b36fb..f5868ee7a13ee0732ece4bfd9103cc16fe83b198 100644 (file)
@@ -6,7 +6,7 @@ USING: alien alien.c-types continuations kernel libc math macros
 namespaces math.vectors math.constants math.functions
 math.parser opengl.gl opengl.glu combinators arrays sequences
 splitting words byte-arrays assocs colors accessors
-generalizations locals specialized-arrays.float
+generalizations locals fry specialized-arrays.float
 specialized-arrays.uint ;
 IN: opengl
 
@@ -154,19 +154,21 @@ MACRO: all-enabled-client-state ( seq quot -- )
 : delete-gl-buffer ( id -- )
     [ glDeleteBuffers ] (delete-gl-object) ;
 
-: with-gl-buffer ( binding id quot -- )
-    -rot dupd glBindBuffer
-    [ slip ] [ 0 glBindBuffer ] [ ] cleanup ; inline
+:: with-gl-buffer ( binding id quot -- )
+    binding id glBindBuffer
+    quot [ binding 0 glBindBuffer ] [ ] cleanup ; inline
 
 : with-array-element-buffers ( array-buffer element-buffer quot -- )
-    -rot GL_ELEMENT_ARRAY_BUFFER swap [
-        swap GL_ARRAY_BUFFER -rot with-gl-buffer
+    [ GL_ELEMENT_ARRAY_BUFFER ] 2dip '[
+        GL_ARRAY_BUFFER swap _ with-gl-buffer
     ] with-gl-buffer ; inline
 
 : <gl-buffer> ( target data hint -- id )
-    pick gen-gl-buffer [ [
-        [ dup byte-length swap ] dip glBufferData
-    ] with-gl-buffer ] keep ;
+    pick gen-gl-buffer [
+        [
+            [ [ byte-length ] keep ] dip glBufferData
+        ] with-gl-buffer
+    ] keep ;
 
 : buffer-offset ( int -- alien )
     <alien> ; inline
diff --git a/basis/opengl/shaders/authors.txt b/basis/opengl/shaders/authors.txt
new file mode 100644 (file)
index 0000000..6a0dc72
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
\ No newline at end of file
diff --git a/basis/opengl/shaders/shaders-docs.factor b/basis/opengl/shaders/shaders-docs.factor
new file mode 100644 (file)
index 0000000..1a10071
--- /dev/null
@@ -0,0 +1,101 @@
+USING: help.markup help.syntax io kernel math quotations
+opengl.gl multiline assocs strings ;
+IN: opengl.shaders
+
+HELP: gl-shader
+{ $class-description { $snippet "gl-shader" } " is a predicate class comprising values returned by OpenGL to represent shader objects. The following words are provided for creating and manipulating these objects:"
+    { $list
+        { { $link <gl-shader> } " - Compile GLSL code into a shader object" }
+        { { $link gl-shader-ok? } " - Check whether a shader object compiled successfully" }
+        { { $link check-gl-shader } " - Throw an error unless a shader object compiled successfully" }
+        { { $link gl-shader-info-log } " - Retrieve the info log of messages generated by the GLSL compiler" }
+        { { $link delete-gl-shader } " - Invalidate a shader object" }
+    }
+  "The derived predicate classes " { $link vertex-shader } " and " { $link fragment-shader } " are also defined for the two standard kinds of shader defined by the OpenGL specification." } ;
+
+HELP: vertex-shader
+{ $class-description { $snippet "vertex-shader" } " is the predicate class of " { $link gl-shader } " objects that refer to shaders of type " { $snippet "GL_VERTEX_SHADER" } ". In addition to the " { $snippet "gl-shader" } " words, the following vertex shader-specific functions are defined:"
+    { $list
+        { { $link <vertex-shader> } " - Compile GLSL code into a vertex shader object "}
+    }
+} ;
+
+HELP: fragment-shader
+{ $class-description { $snippet "fragment-shader" } " is the predicate class of " { $link gl-shader } " objects that refer to shaders of type " { $snippet "GL_FRAGMENT_SHADER" } ". In addition to the " { $snippet "gl-shader" } " words, the following fragment shader-specific functions are defined:"
+    { $list
+        { { $link <fragment-shader> } " - Compile GLSL code into a fragment shader object "}
+    }
+} ;
+
+HELP: <gl-shader>
+{ $values { "source" "The GLSL source code to compile" } { "kind" "The kind of shader to compile, such as " { $snippet "GL_VERTEX_SHADER" } " or " { $snippet "GL_FRAGMENT_SHADER" } } { "shader" "a new " { $link gl-shader } } }
+{ $description "Tries to compile the given GLSL source into a shader object. The returned object can be checked for validity by " { $link check-gl-shader } " or " { $link gl-shader-ok? } ". Errors and warnings generated by the GLSL compiler will be collected in the info log, available from " { $link gl-shader-info-log } ".\n\nWhen the shader object is no longer needed, it should be deleted using " { $link delete-gl-shader } " or else be attached to a " { $link gl-program } " object deleted using " { $link delete-gl-program } "." } ;
+
+HELP: <vertex-shader>
+{ $values { "source" "The GLSL source code to compile" } { "vertex-shader" "a new " { $link vertex-shader } } }
+{ $description "Tries to compile the given GLSL source into a vertex shader object. Equivalent to " { $snippet "GL_VERTEX_SHADER <gl-shader>" } "." } ;
+
+HELP: <fragment-shader>
+{ $values { "source" "The GLSL source code to compile" } { "fragment-shader" "a new " { $link fragment-shader } } }
+{ $description "Tries to compile the given GLSL source into a fragment shader object. Equivalent to " { $snippet "GL_FRAGMENT_SHADER <gl-shader>" } "." } ;
+
+HELP: gl-shader-ok?
+{ $values { "shader" "A " { $link gl-shader } " object" } { "?" "a boolean" } }
+{ $description "Returns a boolean value indicating whether the given shader object compiled successfully. Compilation errors and warnings are available in the shader's info log, which can be gotten using " { $link gl-shader-info-log } "." } ;
+
+HELP: check-gl-shader
+{ $values { "shader" "A " { $link gl-shader } " object" } }
+{ $description "Throws an error containing the " { $link gl-shader-info-log } " for the shader object if it failed to compile. Otherwise, the shader object is left on the stack." } ;
+
+HELP: delete-gl-shader
+{ $values { "shader" "A " { $link gl-shader } " object" } }
+{ $description "Deletes the shader object, invalidating it and releasing any resources allocated for it by the OpenGL implementation." } ;
+
+HELP: gl-shader-info-log
+{ $values { "shader" "A " { $link gl-shader } " object" } { "shader" "a new " { $link gl-shader } } { "log" string } }
+{ $description "Retrieves the info log for " { $snippet "shader" } ", including any errors or warnings generated in compiling the shader object." } ;
+
+HELP: gl-program
+{ $class-description { $snippet "gl-program" } " is a predicate class comprising values returned by OpenGL to represent proram objects. The following words are provided for creating and manipulating these objects:"
+    { $list
+        { { $link <gl-program> } ", " { $link <simple-gl-program> } " - Link a set of shaders into a GLSL program" }
+        { { $link gl-program-ok? } " - Check whether a program object linked successfully" }
+        { { $link check-gl-program } " - Throw an error unless a program object linked successfully" }
+        { { $link gl-program-info-log } " - Retrieve the info log of messages generated by the GLSL linker" }
+        { { $link gl-program-shaders } " - Retrieve the set of shader objects composing the GLSL program" }
+        { { $link delete-gl-program } " - Invalidate a program object and all its attached shaders" }
+        { { $link with-gl-program } " - Use a program object" }
+    }
+} ;
+
+HELP: <gl-program>
+{ $values { "shaders" "A sequence of " { $link gl-shader } " objects." } { "program" "a new " { $link gl-program } } } 
+{ $description "Creates a new GLSL program object, attaches all the shader objects in the " { $snippet "shaders" } " sequence, and attempts to link them. The returned object can be checked for validity by " { $link check-gl-program } " or " { $link gl-program-ok? } ". Errors and warnings generated by the GLSL linker will be collected in the info log, available from " { $link gl-program-info-log } ".\n\nWhen the program object and its attached shaders are no longer needed, it should be deleted using " { $link delete-gl-program } "." } ;
+
+HELP: <simple-gl-program>
+{ $values { "vertex-shader-source" "A string containing GLSL vertex shader source" } { "fragment-shader-source" "A string containing GLSL fragment shader source" } { "program" "a new " { $link gl-program } } }
+{ $description "Wrapper for " { $link <gl-program> } " for the simple case of compiling a single vertex shader and fragment shader and linking them into a GLSL program. Throws an exception if compiling or linking fails." } ;
+
+{ <gl-program> <simple-gl-program> } related-words
+
+HELP: gl-program-ok?
+{ $values { "program" "A " { $link gl-program } " object" } { "?" "a boolean" } }
+{ $description "Returns a boolean value indicating whether the given program object linked successfully. Link errors and warnings are available in the program's info log, which can be gotten using " { $link gl-program-info-log } "." } ;
+
+HELP: check-gl-program
+{ $values { "program" "A " { $link gl-program } " object" } }
+{ $description "Throws an error containing the " { $link gl-program-info-log } " for the program object if it failed to link. Otherwise, the program object is left on the stack." } ;
+
+HELP: gl-program-info-log
+{ $values { "program" "A " { $link gl-program } " object" } { "log" string } }
+{ $description "Retrieves the info log for " { $snippet "program" } ", including any errors or warnings generated in linking the program object." } ;
+
+HELP: delete-gl-program
+{ $values { "program" "A " { $link gl-program } " object" } }
+{ $description "Deletes the program object, invalidating it and releasing any resources allocated for it by the OpenGL implementation. Any attached " { $link gl-shader } "s are also deleted.\n\nIf the shader objects should be preserved, they should each be detached using " { $link detach-gl-program-shader } ". The program object can then be destroyed alone using " { $link delete-gl-program-only } "." } ;
+
+HELP: with-gl-program
+{ $values { "program" "A " { $link gl-program } " object" } { "quot" "A quotation with stack effect " { $snippet "( program -- )" } } }
+{ $description "Enables " { $snippet "program" } " for all OpenGL calls made in the dynamic extent of " { $snippet "quot" } ". " { $snippet "program" } " is left on the top of the stack when " { $snippet "quot" } " is called. The fixed-function pipeline is restored at the end of " { $snippet "quot" } "." } ;
+
+ABOUT: "gl-utilities"
diff --git a/basis/opengl/shaders/shaders.factor b/basis/opengl/shaders/shaders.factor
new file mode 100755 (executable)
index 0000000..eb5bbb0
--- /dev/null
@@ -0,0 +1,121 @@
+! Copyright (C) 2008 Joe Groff.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel opengl.gl alien.c-types continuations namespaces
+assocs alien alien.strings libc opengl math sequences combinators
+macros arrays io.encodings.ascii fry specialized-arrays.uint
+destructors accessors ;
+IN: opengl.shaders
+
+: with-gl-shader-source-ptr ( string quot -- )
+    swap ascii malloc-string [ <void*> swap call ] keep free ; inline
+
+: <gl-shader> ( source kind -- shader )
+    glCreateShader dup rot
+    [ 1 swap f glShaderSource ] with-gl-shader-source-ptr
+    [ glCompileShader ] keep
+    gl-error ;
+
+: (gl-shader?) ( object -- ? )
+    dup integer? [ glIsShader c-bool> ] [ drop f ] if ;
+
+: gl-shader-get-int ( shader enum -- value )
+    0 <int> [ glGetShaderiv ] keep *int ;
+
+: gl-shader-ok? ( shader -- ? )
+    GL_COMPILE_STATUS gl-shader-get-int c-bool> ;
+
+: <vertex-shader> ( source -- vertex-shader )
+    GL_VERTEX_SHADER <gl-shader> ; inline
+
+: (vertex-shader?) ( object -- ? )
+    dup (gl-shader?)
+    [ GL_SHADER_TYPE gl-shader-get-int GL_VERTEX_SHADER = ]
+    [ drop f ] if ;
+
+: <fragment-shader> ( source -- fragment-shader )
+    GL_FRAGMENT_SHADER <gl-shader> ; inline
+
+: (fragment-shader?) ( object -- ? )
+    dup (gl-shader?)
+    [ GL_SHADER_TYPE gl-shader-get-int GL_FRAGMENT_SHADER = ]
+    [ drop f ] if ;
+
+: gl-shader-info-log-length ( shader -- log-length )
+    GL_INFO_LOG_LENGTH gl-shader-get-int ; inline
+
+: gl-shader-info-log ( shader -- log )
+    dup gl-shader-info-log-length dup [
+        1 calloc &free
+        [ 0 <int> swap glGetShaderInfoLog ] keep
+        ascii alien>string
+    ] with-destructors ;
+
+: check-gl-shader ( shader -- shader )
+    dup gl-shader-ok? [ dup gl-shader-info-log throw ] unless ;
+
+: delete-gl-shader ( shader -- ) glDeleteShader ; inline
+
+PREDICATE: gl-shader < integer (gl-shader?) ;
+PREDICATE: vertex-shader < gl-shader (vertex-shader?) ;
+PREDICATE: fragment-shader < gl-shader (fragment-shader?) ;
+
+! Programs
+
+: <gl-program> ( shaders -- program )
+    glCreateProgram swap
+    [ dupd glAttachShader ] each
+    [ glLinkProgram ] keep
+    gl-error ;
+    
+: (gl-program?) ( object -- ? )
+    dup integer? [ glIsProgram c-bool> ] [ drop f ] if ;
+
+: gl-program-get-int ( program enum -- value )
+    0 <int> [ glGetProgramiv ] keep *int ;
+
+: gl-program-ok? ( program -- ? )
+    GL_LINK_STATUS gl-program-get-int c-bool> ;
+
+: gl-program-info-log-length ( program -- log-length )
+    GL_INFO_LOG_LENGTH gl-program-get-int ; inline
+
+: gl-program-info-log ( program -- log )
+    dup gl-program-info-log-length dup [
+        1 calloc &free
+        [ 0 <int> swap glGetProgramInfoLog ] keep
+        ascii alien>string
+    ] with-destructors ;
+
+: check-gl-program ( program -- program )
+    dup gl-program-ok? [ dup gl-program-info-log throw ] unless ;
+
+: gl-program-shaders-length ( program -- shaders-length )
+    GL_ATTACHED_SHADERS gl-program-get-int ; inline
+
+: gl-program-shaders ( program -- shaders )
+    dup gl-program-shaders-length
+    0 <int>
+    over <uint-array>
+    [ underlying>> glGetAttachedShaders ] keep ;
+
+: delete-gl-program-only ( program -- )
+    glDeleteProgram ; inline
+
+: detach-gl-program-shader ( program shader -- )
+    glDetachShader ; inline
+
+: delete-gl-program ( program -- )
+    dup gl-program-shaders [
+        2dup detach-gl-program-shader delete-gl-shader
+    ] each delete-gl-program-only ;
+
+: with-gl-program ( program quot -- )
+    over glUseProgram [ 0 glUseProgram ] [ ] cleanup ; inline
+
+PREDICATE: gl-program < integer (gl-program?) ;
+
+: <simple-gl-program> ( vertex-shader-source fragment-shader-source -- program )
+    [ <vertex-shader> check-gl-shader ]
+    [ <fragment-shader> check-gl-shader ] bi*
+    2array <gl-program> check-gl-program ;
+
diff --git a/basis/opengl/shaders/summary.txt b/basis/opengl/shaders/summary.txt
new file mode 100644 (file)
index 0000000..c55f766
--- /dev/null
@@ -0,0 +1 @@
+OpenGL Shading Language (GLSL) support
\ No newline at end of file
diff --git a/basis/opengl/shaders/tags.txt b/basis/opengl/shaders/tags.txt
new file mode 100755 (executable)
index 0000000..21154b6
--- /dev/null
@@ -0,0 +1,2 @@
+opengl
+bindings
\ No newline at end of file
index 30501a61056979e1b3938acf6f4a094e4e62c170..e512e3134c66e644de062a9e8826fc1c02c2ab48 100644 (file)
@@ -13,64 +13,64 @@ IN: openssl.libssl
     { [ os unix? ] [ "libssl" "libssl.so" "cdecl" add-library ] }
 } cond >>
 
-: X509_FILETYPE_PEM       1 ; inline
-: X509_FILETYPE_ASN1      2 ; inline
-: X509_FILETYPE_DEFAULT   3 ; inline
-
-: SSL_FILETYPE_ASN1  X509_FILETYPE_ASN1 ; inline
-: SSL_FILETYPE_PEM   X509_FILETYPE_PEM ; inline
-
-: SSL_CTRL_NEED_TMP_RSA             1 ; inline
-: SSL_CTRL_SET_TMP_RSA              2 ; inline
-: SSL_CTRL_SET_TMP_DH               3 ; inline
-: SSL_CTRL_SET_TMP_RSA_CB           4 ; inline
-: SSL_CTRL_SET_TMP_DH_CB            5 ; inline
-
-: SSL_CTRL_GET_SESSION_REUSED       6 ; inline
-: SSL_CTRL_GET_CLIENT_CERT_REQUEST  7 ; inline
-: SSL_CTRL_GET_NUM_RENEGOTIATIONS   8 ; inline
-: SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 9 ; inline
-: SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 10 ; inline
-: SSL_CTRL_GET_FLAGS                11 ; inline
-: SSL_CTRL_EXTRA_CHAIN_CERT         12 ; inline
-
-: SSL_CTRL_SET_MSG_CALLBACK         13 ; inline
-: SSL_CTRL_SET_MSG_CALLBACK_ARG     14 ; inline
-
-: SSL_CTRL_SESS_NUMBER              20 ; inline
-: SSL_CTRL_SESS_CONNECT             21 ; inline
-: SSL_CTRL_SESS_CONNECT_GOOD        22 ; inline
-: SSL_CTRL_SESS_CONNECT_RENEGOTIATE 23 ; inline
-: SSL_CTRL_SESS_ACCEPT              24 ; inline
-: SSL_CTRL_SESS_ACCEPT_GOOD         25 ; inline
-: SSL_CTRL_SESS_ACCEPT_RENEGOTIATE  26 ; inline
-: SSL_CTRL_SESS_HIT                 27 ; inline
-: SSL_CTRL_SESS_CB_HIT              28 ; inline
-: SSL_CTRL_SESS_MISSES              29 ; inline
-: SSL_CTRL_SESS_TIMEOUTS            30 ; inline
-: SSL_CTRL_SESS_CACHE_FULL          31 ; inline
-: SSL_CTRL_OPTIONS                  32 ; inline
-: SSL_CTRL_MODE                     33 ; inline
-
-: SSL_CTRL_GET_READ_AHEAD           40 ; inline
-: SSL_CTRL_SET_READ_AHEAD           41 ; inline
-: SSL_CTRL_SET_SESS_CACHE_SIZE      42 ; inline
-: SSL_CTRL_GET_SESS_CACHE_SIZE      43 ; inline
-: SSL_CTRL_SET_SESS_CACHE_MODE      44 ; inline
-: SSL_CTRL_GET_SESS_CACHE_MODE      45 ; inline
-
-: SSL_CTRL_GET_MAX_CERT_LIST        50 ; inline
-: SSL_CTRL_SET_MAX_CERT_LIST        51 ; inline
-
-: SSL_ERROR_NONE             0 ; inline
-: SSL_ERROR_SSL              1 ; inline
-: SSL_ERROR_WANT_READ        2 ; inline
-: SSL_ERROR_WANT_WRITE       3 ; inline
-: SSL_ERROR_WANT_X509_LOOKUP 4 ; inline
-: SSL_ERROR_SYSCALL          5 ; inline ! consult errno for details
-: SSL_ERROR_ZERO_RETURN      6 ; inline
-: SSL_ERROR_WANT_CONNECT     7 ; inline
-: SSL_ERROR_WANT_ACCEPT      8 ; inline
+CONSTANT: X509_FILETYPE_PEM       1
+CONSTANT: X509_FILETYPE_ASN1      2
+CONSTANT: X509_FILETYPE_DEFAULT   3
+
+ALIAS: SSL_FILETYPE_ASN1 X509_FILETYPE_ASN1
+ALIAS: SSL_FILETYPE_PEM  X509_FILETYPE_PEM
+
+CONSTANT: SSL_CTRL_NEED_TMP_RSA   1
+CONSTANT: SSL_CTRL_SET_TMP_RSA    2
+CONSTANT: SSL_CTRL_SET_TMP_DH     3
+CONSTANT: SSL_CTRL_SET_TMP_RSA_CB 4
+CONSTANT: SSL_CTRL_SET_TMP_DH_CB  5
+
+CONSTANT: SSL_CTRL_GET_SESSION_REUSED       6 
+CONSTANT: SSL_CTRL_GET_CLIENT_CERT_REQUEST  7 
+CONSTANT: SSL_CTRL_GET_NUM_RENEGOTIATIONS   8 
+CONSTANT: SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 9 
+CONSTANT: SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 10
+CONSTANT: SSL_CTRL_GET_FLAGS                11
+CONSTANT: SSL_CTRL_EXTRA_CHAIN_CERT         12
+
+CONSTANT: SSL_CTRL_SET_MSG_CALLBACK         13
+CONSTANT: SSL_CTRL_SET_MSG_CALLBACK_ARG     14
+
+CONSTANT: SSL_CTRL_SESS_NUMBER              20
+CONSTANT: SSL_CTRL_SESS_CONNECT             21
+CONSTANT: SSL_CTRL_SESS_CONNECT_GOOD        22
+CONSTANT: SSL_CTRL_SESS_CONNECT_RENEGOTIATE 23
+CONSTANT: SSL_CTRL_SESS_ACCEPT              24
+CONSTANT: SSL_CTRL_SESS_ACCEPT_GOOD         25
+CONSTANT: SSL_CTRL_SESS_ACCEPT_RENEGOTIATE  26
+CONSTANT: SSL_CTRL_SESS_HIT                 27
+CONSTANT: SSL_CTRL_SESS_CB_HIT              28
+CONSTANT: SSL_CTRL_SESS_MISSES              29
+CONSTANT: SSL_CTRL_SESS_TIMEOUTS            30
+CONSTANT: SSL_CTRL_SESS_CACHE_FULL          31
+CONSTANT: SSL_CTRL_OPTIONS                  32
+CONSTANT: SSL_CTRL_MODE                     33
+
+CONSTANT: SSL_CTRL_GET_READ_AHEAD           40
+CONSTANT: SSL_CTRL_SET_READ_AHEAD           41
+CONSTANT: SSL_CTRL_SET_SESS_CACHE_SIZE      42
+CONSTANT: SSL_CTRL_GET_SESS_CACHE_SIZE      43
+CONSTANT: SSL_CTRL_SET_SESS_CACHE_MODE      44
+CONSTANT: SSL_CTRL_GET_SESS_CACHE_MODE      45
+
+CONSTANT: SSL_CTRL_GET_MAX_CERT_LIST        50
+CONSTANT: SSL_CTRL_SET_MAX_CERT_LIST        51
+
+CONSTANT: SSL_ERROR_NONE             0
+CONSTANT: SSL_ERROR_SSL              1
+CONSTANT: SSL_ERROR_WANT_READ        2
+CONSTANT: SSL_ERROR_WANT_WRITE       3
+CONSTANT: SSL_ERROR_WANT_X509_LOOKUP 4
+CONSTANT: SSL_ERROR_SYSCALL          5 ! consult errno for details
+CONSTANT: SSL_ERROR_ZERO_RETURN      6
+CONSTANT: SSL_ERROR_WANT_CONNECT     7
+CONSTANT: SSL_ERROR_WANT_ACCEPT      8
 
 ! Error messages table
 : error-messages ( -- hash )
@@ -157,8 +157,8 @@ FUNCTION: int SSL_read ( SSL* ssl, void* buf, int num ) ;
 
 FUNCTION: int SSL_shutdown ( SSL* ssl ) ;
 
-: SSL_SENT_SHUTDOWN 1 ;
-: SSL_RECEIVED_SHUTDOWN 2 ;
+CONSTANT: SSL_SENT_SHUTDOWN 1
+CONSTANT: SSL_RECEIVED_SHUTDOWN 2
 
 FUNCTION: int SSL_get_shutdown ( SSL* ssl ) ;
 
@@ -172,10 +172,10 @@ FUNCTION: void SSL_SESSION_free ( SSL_SESSION* ses ) ;
 
 FUNCTION: int SSL_want ( SSL* ssl ) ;
 
-: SSL_NOTHING 1 ; inline
-: SSL_WRITING 2 ; inline
-: SSL_READING 3 ; inline
-: SSL_X509_LOOKUP 4 ; inline
+CONSTANT: SSL_NOTHING 1
+CONSTANT: SSL_WRITING 2
+CONSTANT: SSL_READING 3
+CONSTANT: SSL_X509_LOOKUP 4
 
 FUNCTION: long SSL_get_verify_result ( SSL* ssl ) ;
 
@@ -199,10 +199,10 @@ FUNCTION: int SSL_CTX_load_verify_locations ( SSL_CTX* ctx, char* CAfile,
 
 FUNCTION: int SSL_CTX_set_default_verify_paths ( SSL_CTX* ctx ) ;
 
-: SSL_VERIFY_NONE 0 ; inline
-: SSL_VERIFY_PEER 1 ; inline
-: SSL_VERIFY_FAIL_IF_NO_PEER_CERT 2 ; inline
-: SSL_VERIFY_CLIENT_ONCE 4 ; inline
+CONSTANT: SSL_VERIFY_NONE 0
+CONSTANT: SSL_VERIFY_PEER 1
+CONSTANT: SSL_VERIFY_FAIL_IF_NO_PEER_CERT 2
+CONSTANT: SSL_VERIFY_CLIENT_ONCE 4
 
 FUNCTION: void SSL_CTX_set_verify ( SSL_CTX* ctx, int mode, void* callback ) ;
 
@@ -242,16 +242,16 @@ FUNCTION: void* BIO_f_ssl (  ) ;
 : SSL_CTX_set_session_cache_mode ( ctx mode -- n )
     [ SSL_CTRL_SET_SESS_CACHE_MODE ] dip f SSL_CTX_ctrl ;
 
-: SSL_SESS_CACHE_OFF                      HEX: 0000 ; inline
-: SSL_SESS_CACHE_CLIENT                   HEX: 0001 ; inline
-: SSL_SESS_CACHE_SERVER                   HEX: 0002 ; inline
+CONSTANT: SSL_SESS_CACHE_OFF    HEX: 0000
+CONSTANT: SSL_SESS_CACHE_CLIENT HEX: 0001
+CONSTANT: SSL_SESS_CACHE_SERVER HEX: 0002
 
 : SSL_SESS_CACHE_BOTH ( -- n )
     { SSL_SESS_CACHE_CLIENT SSL_SESS_CACHE_SERVER } flags ; inline
 
-: SSL_SESS_CACHE_NO_AUTO_CLEAR            HEX: 0080 ; inline
-: SSL_SESS_CACHE_NO_INTERNAL_LOOKUP       HEX: 0100 ; inline
-: SSL_SESS_CACHE_NO_INTERNAL_STORE        HEX: 0200 ; inline
+CONSTANT: SSL_SESS_CACHE_NO_AUTO_CLEAR      HEX: 0080
+CONSTANT: SSL_SESS_CACHE_NO_INTERNAL_LOOKUP HEX: 0100
+CONSTANT: SSL_SESS_CACHE_NO_INTERNAL_STORE  HEX: 0200
 
 : SSL_SESS_CACHE_NO_INTERNAL ( -- n )
     { SSL_SESS_CACHE_NO_INTERNAL_LOOKUP SSL_SESS_CACHE_NO_INTERNAL_STORE } flags ; inline
@@ -282,8 +282,9 @@ H{ } clone verify-messages set-global
 : X509_V_:
     scan "X509_V_" prepend create-in
     scan-word
-    [ 1quotation define-inline ]
-    [ verify-messages get set-at ] 2bi ; parsing
+    [ 1quotation (( -- value )) define-inline ]
+    [ verify-messages get set-at ]
+    2bi ; parsing
 
 >>
 
@@ -333,4 +334,4 @@ X509_V_: ERR_APPLICATION_VERIFICATION 50
 ! obj_mac.h
 ! ===============================================
 
-: NID_commonName 13 ; inline
+CONSTANT: NID_commonName 13
diff --git a/basis/pack/authors.txt b/basis/pack/authors.txt
new file mode 100644 (file)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/basis/pack/pack-tests.factor b/basis/pack/pack-tests.factor
new file mode 100755 (executable)
index 0000000..999a952
--- /dev/null
@@ -0,0 +1,54 @@
+USING: io io.streams.string kernel namespaces make
+pack strings tools.test pack.private ;
+IN: pack.tests
+
+[ B{ 1 0 2 0 0 3 0 0 0 4 0 0 0 0 0 0 0 5 } ] [
+    { 1 2 3 4 5 }
+    "cstiq" pack-be
+] unit-test
+
+[ { 1 2 3 4 5 } ] [
+    { 1 2 3 4 5 }
+    "cstiq" [ pack-be ] keep unpack-be
+] unit-test
+
+[ B{ 1 2 0 3 0 0 4 0 0 0 5 0 0 0 0 0 0 0 } ] [
+    [
+        { 1 2 3 4 5 } "cstiq" pack-le
+    ] with-scope
+] unit-test
+
+[ { 1 2 3 4 5 } ] [
+    { 1 2 3 4 5 }
+    "cstiq" [ pack-le ] keep unpack-le
+] unit-test
+
+[ { -1 -2 -3 -4 -5 } ] [
+    { -1 -2 -3 -4 -5 }
+    "cstiq" [ pack-le ] keep unpack-le
+] unit-test
+
+[ { -1 -2 -3 -4 -5 3.14 } ] [
+    { -1 -2 -3 -4 -5 3.14 }
+    "cstiqd" [ pack-be ] keep unpack-be
+] unit-test
+
+[ { -1 -2 -3 -4 -5 } ] [
+    { -1 -2 -3 -4 -5 }
+    "cstiq" [ pack-native ] keep unpack-native
+] unit-test
+
+[ 9 ] [ "iic" packed-length ] unit-test
+[ "iii" read-packed-le ] must-infer
+[ "iii" read-packed-be ] must-infer
+[ "iii" read-packed-native ] must-infer
+[ "iii" unpack-le ] must-infer
+[ "iii" unpack-be ] must-infer
+[ "iii" unpack-native ] must-infer
+[ "iii" pack ] must-infer
+[ "iii" unpack ] must-infer
+
+: test-pack ( str -- ba )
+    "iii" pack ;
+
+[ test-pack ] must-infer
diff --git a/basis/pack/pack.factor b/basis/pack/pack.factor
new file mode 100755 (executable)
index 0000000..aec4414
--- /dev/null
@@ -0,0 +1,179 @@
+! Copyright (C) 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: alien alien.c-types arrays assocs byte-arrays io
+io.binary io.streams.string kernel math math.parser namespaces
+make parser prettyprint quotations sequences strings vectors
+words macros math.functions math.bitwise fry generalizations
+combinators.smart io.streams.byte-array io.encodings.binary
+math.vectors combinators multiline ;
+IN: pack
+
+SYMBOL: big-endian
+
+: big-endian? ( -- ? )
+    1 <int> *char zero? ;
+
+<PRIVATE
+
+: set-big-endian ( -- )
+    big-endian? big-endian set ; inline
+
+PRIVATE>
+
+: >signed ( x n -- y )
+    2dup neg 1+ shift 1 = [ 2^ - ] [ drop ] if ;
+
+: >endian ( obj n -- str )
+    big-endian get [ >be ] [ >le ] if ; inline
+
+: unsigned-endian> ( obj -- str )
+    big-endian get [ be> ] [ le> ] if ; inline
+
+: signed-endian> ( obj n -- str )
+    [ unsigned-endian> ] dip >signed ;
+
+GENERIC: >n-byte-array ( obj n -- byte-array )
+
+M: integer >n-byte-array ( m n -- byte-array ) >endian ;
+
+! for doing native, platform-dependent sized values
+M: string >n-byte-array ( n string -- byte-array ) heap-size >n-byte-array ;
+
+: s8>byte-array ( n -- byte-array ) 1 >n-byte-array ;
+: u8>byte-array ( n -- byte-array ) 1 >n-byte-array ;
+: s16>byte-array ( n -- byte-array ) 2 >n-byte-array ;
+: u16>byte-array ( n -- byte-array ) 2 >n-byte-array ;
+: s24>byte-array ( n -- byte-array ) 3 >n-byte-array ;
+: u24>byte-array ( n -- byte-array ) 3 >n-byte-array ;
+: s32>byte-array ( n -- byte-array ) 4 >n-byte-array ;
+: u32>byte-array ( n -- byte-array ) 4 >n-byte-array ;
+: s64>byte-array ( n -- byte-array ) 8 >n-byte-array ;
+: u64>byte-array ( n -- byte-array ) 8 >n-byte-array ;
+: s128>byte-array ( n -- byte-array ) 16 >n-byte-array ;
+: u128>byte-array ( n -- byte-array ) 16 >n-byte-array ;
+: write-float ( n -- byte-array ) float>bits 4 >n-byte-array ;
+: write-double ( n -- byte-array ) double>bits 8 >n-byte-array ;
+: write-c-string ( byte-array -- byte-array ) { 0 } B{ } append-as ;
+
+<PRIVATE
+
+CONSTANT: pack-table
+    H{
+        { CHAR: c s8>byte-array }
+        { CHAR: C u8>byte-array }
+        { CHAR: s s16>byte-array }
+        { CHAR: S u16>byte-array }
+        { CHAR: t s24>byte-array }
+        { CHAR: T u24>byte-array }
+        { CHAR: i s32>byte-array }
+        { CHAR: I u32>byte-array }
+        { CHAR: q s64>byte-array }
+        { CHAR: Q u64>byte-array }
+        { CHAR: f write-float }
+        { CHAR: F write-float }
+        { CHAR: d write-double }
+        { CHAR: D write-double }
+    }
+
+CONSTANT: unpack-table
+    H{
+        { CHAR: c [ 8 signed-endian> ] }
+        { CHAR: C [ unsigned-endian> ] }
+        { CHAR: s [ 16 signed-endian> ] }
+        { CHAR: S [ unsigned-endian> ] }
+        { CHAR: t [ 24 signed-endian> ] }
+        { CHAR: T [ unsigned-endian> ] }
+        { CHAR: i [ 32 signed-endian> ] }
+        { CHAR: I [ unsigned-endian> ] }
+        { CHAR: q [ 64 signed-endian> ] }
+        { CHAR: Q [ unsigned-endian> ] }
+        { CHAR: f [ unsigned-endian> bits>float ] }
+        { CHAR: F [ unsigned-endian> bits>float ] }
+        { CHAR: d [ unsigned-endian> bits>double ] }
+        { CHAR: D [ unsigned-endian> bits>double ] }
+    }
+
+CONSTANT: packed-length-table
+    H{
+        { CHAR: c 1 }
+        { CHAR: C 1 }
+        { CHAR: s 2 }
+        { CHAR: S 2 }
+        { CHAR: t 3 }
+        { CHAR: T 3 }
+        { CHAR: i 4 }
+        { CHAR: I 4 }
+        { CHAR: q 8 }
+        { CHAR: Q 8 }
+        { CHAR: f 4 }
+        { CHAR: F 4 }
+        { CHAR: d 8 }
+        { CHAR: D 8 }
+    }
+
+MACRO: pack ( str -- quot )
+    [ pack-table at '[ _ execute ] ] { } map-as
+    '[ _ spread ]
+    '[ _ input<sequence ]
+    '[ _ B{ } append-outputs-as ] ;
+
+PRIVATE>
+
+: ch>packed-length ( ch -- n )
+    packed-length-table at ; inline
+
+: packed-length ( str -- n )
+    [ ch>packed-length ] sigma ;
+: pack-native ( seq str -- seq )
+    [ set-big-endian pack ] with-scope ; inline
+
+: pack-be ( seq str -- seq )
+    [ big-endian on pack ] with-scope ; inline
+
+: pack-le ( seq str -- seq )
+    [ big-endian off pack ] with-scope ; inline
+
+<PRIVATE
+
+: start/end ( seq -- seq1 seq2 )
+    [ 0 [ + ] accumulate nip dup ] keep v+ ; inline
+
+MACRO: unpack ( str -- quot )
+    [ [ ch>packed-length ] { } map-as start/end ]
+    [ [ unpack-table at '[ @ ] ] { } map-as ] bi
+    [ '[ [ _ _ ] dip <slice> @ ] ] 3map
+    '[ _ cleave ] '[ _ output>array ] ;
+
+PRIVATE>
+
+: unpack-native ( seq str -- seq )
+    [ set-big-endian unpack ] with-scope ; inline
+
+: unpack-be ( seq str -- seq )
+    [ big-endian on unpack ] with-scope ; inline
+
+: unpack-le ( seq str -- seq )
+    [ big-endian off unpack ] with-scope ; inline
+
+ERROR: packed-read-fail str bytes ;
+
+<PRIVATE
+
+: read-packed-bytes ( str -- bytes )
+    dup packed-length [ read dup length ] keep =
+    [ nip ] [ packed-read-fail ] if ; inline
+
+PRIVATE>
+
+: read-packed ( str quot -- seq )
+    [ read-packed-bytes ] swap bi ; inline
+
+: read-packed-le ( str -- seq )
+    [ unpack-le ] read-packed ; inline
+
+: read-packed-be ( str -- seq )
+    [ unpack-be ] read-packed ; inline
+
+: read-packed-native ( str -- seq )
+    [ unpack-native ] read-packed ; inline
index 7434ca6a7a21873c4bd13ee01736edb2108ce0a2..a9fb3668121afc7f28a8f4df732bb2486667a26b 100644 (file)
@@ -51,8 +51,7 @@ PRIVATE>
   dup zero? [
     2drop epsilon
   ] [
-    2dup exactly-n
-    -rot 1- at-most-n 2choice
+    [ exactly-n ] [ 1- at-most-n ] 2bi 2choice
   ] if ;
 
 : at-least-n ( parser n -- parser' )
index 2d7e2a81ac392d90b675823e541a15ffd9da0944..9a15dd210575ffc9f6629fbb9e66c252c8aaee44 100644 (file)
@@ -2,9 +2,11 @@
 ! See http://factorcode.org/license.txt for BSD license.
 !
 USING: kernel tools.test strings namespaces make arrays sequences 
-       peg peg.private accessors words math accessors ;
+       peg peg.private peg.parsers accessors words math accessors ;
 IN: peg.tests
 
+[ ] [ reset-pegs ] unit-test
+
 [
   "endbegin" "begin" token parse
 ] must-fail
@@ -193,4 +195,16 @@ IN: peg.tests
   "B" [ drop t ] satisfy [ 66 >= ] semantic parse
 ] unit-test
 
-{ f } [ \ + T{ parser f f f } equal? ] unit-test
\ No newline at end of file
+{ f } [ \ + T{ parser f f f } equal? ] unit-test
+
+USE: compiler
+
+[ ] [ disable-compiler ] unit-test
+
+[ ] [ "" epsilon parse drop ] unit-test
+
+[ ] [ enable-compiler ] unit-test
+
+[ [ ] ] [ "" epsilon [ drop [ [ ] ] call ] action parse ] unit-test
+  
+[ [ ] ] [ "" epsilon [ drop [ [ ] ] ] action [ call ] action parse ] unit-test
\ No newline at end of file
index 3fc6fec8edc060d75b6647d239ed635f64368bf5..206a054d3540389ea963e5be58f51cd02439820a 100644 (file)
@@ -373,7 +373,7 @@ TUPLE: range-parser min max ;
   pick empty? [ 
     3drop f 
   ] [
-    pick first -rot between? [
+    [ dup first ] 2dip between? [
       unclip-slice <parse-result>
     ] [ 
       drop f
index 83c4a196d90c8e779d5e6c528e7c7aa1027d7188..be63d807b9796aca54e38fdb224b88795c63b095 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyback (C) 2008 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel accessors math qualified ;
+USING: kernel accessors math ;
 QUALIFIED: sequences
 IN: persistent.deques
 
@@ -14,7 +14,7 @@ C: <cons> cons
 
 : each ( list quot: ( elt -- ) -- )
     over
-    [ [ >r car>> r> call ] [ >r cdr>> r> ] 2bi each ]
+    [ [ [ car>> ] dip call ] [ [ cdr>> ] dip ] 2bi each ]
     [ 2drop ] if ; inline recursive
 
 : reduce ( list start quot -- end )
@@ -27,7 +27,7 @@ C: <cons> cons
     0 [ drop 1+ ] reduce ;
 
 : cut ( list index -- back front-reversed )
-    f swap [ >r [ cdr>> ] [ car>> ] bi r> <cons> ] times ;
+    f swap [ [ [ cdr>> ] [ car>> ] bi ] dip <cons> ] times ;
 
 : split-reverse ( list -- back-reversed front )
     dup length 2/ cut [ reverse ] bi@ ;
@@ -41,7 +41,7 @@ TUPLE: deque { front read-only } { back read-only } ;
     [ back>> ] [ front>> ] bi deque boa ;
 
 : flipped ( deque quot -- newdeque )
-    >r flip r> call flip ;
+    [ flip ] dip call flip ;
 PRIVATE>
 
 : deque-empty? ( deque -- ? )
index 3419e8387fc9bb748063b183a81f05fc4230ed21..94174d566704019b34a6c976b27d3546f8791616 100644 (file)
@@ -6,7 +6,8 @@ persistent.hashtables.nodes ;
 IN: persistent.hashtables.nodes.leaf
 
 : matching-key? ( key hashcode leaf-node -- ? )
-    tuck hashcode>> eq? [ key>> = ] [ 2drop f ] if ; inline
+    [ nip ] [ hashcode>> eq? ] 2bi
+    [ key>> = ] [ 2drop f ] if ; inline
 
 M: leaf-node (entry-at) [ matching-key? ] keep and ;
 
index 6381b91dc31c3aa37dd4753d21effe71f6b43d74..f6d38b5b2504a578e31c46b127a953fc25bdf87c 100644 (file)
@@ -32,7 +32,7 @@ PRIVATE>
     [ >branch< swap remove-left -rot [ <branch> ] 2dip rot ] if ;
 
 : both-with? ( obj a b quot -- ? )
-   swap >r with r> swap both? ; inline
+   swap [ with ] dip swap both? ; inline
 
 GENERIC: sift-down ( value prio left right -- heap )
 
index 986b16c737d7f1a3e7324fb063a98a34b2953231..6928d03f5555a1ebc7de7f1e28819d41628b388b 100644 (file)
@@ -14,7 +14,7 @@ HELP: ppop
 { $contract "Persistent analogue of " { $link pop* } ". Outputs a new sequence with all elements of " { $snippet "seq" } " except for the final element." } ;
 
 ARTICLE: "persistent.sequences" "Persistent sequence protocol"
-"The persistent sequence protocol consists of the non-mutating sequence protocol words, such as  " { $link length } " and " { $link nth } ", together with the following operations:"
+"The persistent sequence protocol consists of the non-mutating sequence protocol words, such as " { $link length } " and " { $link nth } ", together with the following operations:"
 { $subsection new-nth }
 { $subsection ppush }
 { $subsection ppop }
index cd8e7c49e0b29c090c3e9b9f8fc6868e907522a1..554db08e703890f2feb6f8f7e187a3b45dce7add 100644 (file)
@@ -22,9 +22,9 @@ M: persistent-vector length count>> ;
 
 : node-size 32 ; inline
 
-: node-mask node-size mod ; inline
+: node-mask ( m -- n ) node-size mod ; inline
 
-: node-shift -5 * shift ; inline
+: node-shift ( m n -- x ) -5 * shift ; inline
 
 : node-nth ( i node -- obj )
     [ node-mask ] [ children>> ] bi* nth ;
diff --git a/basis/porter-stemmer/authors.txt b/basis/porter-stemmer/authors.txt
new file mode 100644 (file)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/basis/porter-stemmer/porter-stemmer-docs.factor b/basis/porter-stemmer/porter-stemmer-docs.factor
new file mode 100644 (file)
index 0000000..e16190f
--- /dev/null
@@ -0,0 +1,74 @@
+IN: porter-stemmer
+USING: help.markup help.syntax ;
+
+HELP: step1a
+{ $values { "str" "a string" } { "newstr" "a new string" } }
+{ $description "Gets rid of plurals." }
+{ $examples
+    { $table
+        { "Input:" "Output:" }
+        { "caresses" "caress" }
+        { "ponies" "poni" }
+        { "ties" "ti" }
+        { "caress" "caress" }
+        { "cats" "cat" }
+    }
+} ;
+
+HELP: step1b
+{ $values { "str" "a string" } { "newstr" "a new string" } }
+{ $description "Gets rid of \"-ed\" and \"-ing\" suffixes." }
+{ $examples
+    { $table
+        { "Input:" "Output:" }
+        { "feed"  "feed" }
+        { "agreed"  "agree" }
+        { "disabled"  "disable" }
+        { "matting"  "mat" }
+        { "mating"  "mate" }
+        { "meeting"  "meet" }
+        { "milling"  "mill" }
+        { "messing"  "mess" }
+        { "meetings"  "meet" }
+    }
+} ;
+
+HELP: step1c
+{ $values { "str" "a string" } { "newstr" "a new string" } }
+{ $description "Turns a terminal y to i when there is another vowel in the stem." } ;
+
+HELP: step2
+{ $values { "str" "a string" } { "newstr" "a new string" } }
+{ $description "Maps double suffices to single ones. so -ization maps to -ize etc. note that the string before the suffix must give positive " { $link consonant-seq } "." } ;
+
+HELP: step3
+{ $values { "str" "a string" } { "newstr" "a new string" } }
+{ $description "Deals with -c-, -full, -ness, etc. Similar strategy to " { $link step2 } "." } ;
+
+HELP: step5
+{ $values { "str" "a string" } { "newstr" "a new string" } }
+{ $description "Removes a final -e and changes a final -ll to -l if " { $link consonant-seq } " is greater than 1," } ;
+
+HELP: stem
+{ $values { "str" "a string" } { "newstr" "a new string" } }
+{ $description "Applies the Porter stemming algorithm to the input string." } ;
+
+ARTICLE: "porter-stemmer" "Porter stemming algorithm"
+"The help system uses the Porter stemming algorithm to normalize words when building the full-text search index."
+$nl
+"The Factor implementation of the algorithm is based on the Common Lisp version, which was hand-translated from ANSI C by Steven M. Haflich. The original ANSI C was written by Martin Porter."
+$nl
+"A detailed description of the algorithm, along with implementations in various languages, can be at in " { $url "http://www.tartarus.org/~martin/PorterStemmer" } "."
+$nl
+"The main word of the algorithm takes an English word as input and outputs its stem:"
+{ $subsection stem }
+"The algorithm consists of a number of steps:"
+{ $subsection step1a }
+{ $subsection step1b }
+{ $subsection step1c }
+{ $subsection step2 }
+{ $subsection step3 }
+{ $subsection step4 }
+{ $subsection step5 } ;
+
+ABOUT: "porter-stemmer"
diff --git a/basis/porter-stemmer/porter-stemmer-tests.factor b/basis/porter-stemmer/porter-stemmer-tests.factor
new file mode 100644 (file)
index 0000000..72bf5c0
--- /dev/null
@@ -0,0 +1,64 @@
+IN: porter-stemmer.tests
+USING: arrays io kernel porter-stemmer sequences tools.test
+io.files io.encodings.utf8 ;
+
+[ 0 ] [ "xa" consonant-seq ] unit-test
+[ 0 ] [ "xxaa" consonant-seq ] unit-test
+[ 1 ] [ "xaxa" consonant-seq ] unit-test
+[ 2 ] [ "xaxaxa" consonant-seq ] unit-test
+[ 3 ] [ "xaxaxaxa" consonant-seq ] unit-test
+[ 3 ] [ "zzzzxaxaxaxaeee" consonant-seq ] unit-test
+
+[ t ] [ 0 "fish" consonant? ] unit-test
+[ f ] [ 0 "and" consonant? ] unit-test
+[ t ] [ 0 "yes" consonant? ] unit-test
+[ f ] [ 1 "gym" consonant? ] unit-test
+
+[ t ] [ 5 "splitting" double-consonant? ] unit-test
+[ f ] [ 2 "feel" double-consonant? ] unit-test
+
+[ f ] [ "xxxz" stem-vowel? ] unit-test
+[ t ] [ "baobab" stem-vowel? ] unit-test
+
+[ t ] [ "hop" cvc? ] unit-test
+[ t ] [ "cav" cvc? ] unit-test
+[ t ] [ "lov" cvc? ] unit-test
+[ t ] [ "crim" cvc? ] unit-test
+[ f ] [ "show" cvc? ] unit-test
+[ f ] [ "box" cvc? ] unit-test
+[ f ] [ "tray" cvc? ] unit-test
+[ f ] [ "meet" cvc? ] unit-test
+
+[ "caress" ] [ "caresses" step1a step1b "" like ] unit-test
+[ "poni" ] [ "ponies" step1a step1b "" like ] unit-test
+[ "ti" ] [ "ties" step1a step1b "" like ] unit-test
+[ "caress" ] [ "caress" step1a step1b "" like ] unit-test
+[ "cat" ] [ "cats" step1a step1b "" like ] unit-test
+[ "feed" ] [ "feed" step1a step1b "" like ] unit-test
+[ "agree" ] [ "agreed" step1a step1b "" like ] unit-test
+[ "disable" ] [ "disabled" step1a step1b "" like ] unit-test
+[ "mat" ] [ "matting" step1a step1b "" like ] unit-test
+[ "mate" ] [ "mating" step1a step1b "" like ] unit-test
+[ "meet" ] [ "meeting" step1a step1b "" like ] unit-test
+[ "mill" ] [ "milling" step1a step1b "" like ] unit-test
+[ "mess" ] [ "messing" step1a step1b "" like ] unit-test
+[ "meet" ] [ "meetings" step1a step1b "" like ] unit-test
+
+[ "fishi" ] [ "fishy" step1c ] unit-test
+[ "by" ] [ "by" step1c ] unit-test
+
+[ "realizat" ] [ "realization" step4 ] unit-test
+[ "ion" ] [ "ion" step4 ] unit-test
+[ "able" ] [ "able" step4 ] unit-test
+
+[ "fear" ] [ "feare" step5 "" like ] unit-test
+[ "mate" ] [ "mate" step5 "" like ] unit-test
+[ "hell" ] [ "hell" step5 "" like ] unit-test
+[ "mate" ] [ "mate" step5 "" like ] unit-test
+
+[ { } ] [
+    "resource:basis/porter-stemmer/test/voc.txt" utf8 file-lines
+    [ stem ] map
+    "resource:basis/porter-stemmer/test/output.txt" utf8 file-lines
+    [ 2array ] 2map [ first2 = not ] filter
+] unit-test
diff --git a/basis/porter-stemmer/porter-stemmer.factor b/basis/porter-stemmer/porter-stemmer.factor
new file mode 100644 (file)
index 0000000..b6eb0ff
--- /dev/null
@@ -0,0 +1,219 @@
+IN: porter-stemmer
+USING: kernel math parser sequences combinators splitting ;
+
+: consonant? ( i str -- ? )
+    2dup nth dup "aeiou" member? [
+        3drop f
+    ] [
+        CHAR: y = [
+            over zero?
+            [ 2drop t ] [ [ 1- ] dip consonant? not ] if
+        ] [
+            2drop t
+        ] if
+    ] if ;
+
+: skip-vowels ( i str -- i str )
+    2dup bounds-check? [
+        2dup consonant? [ [ 1+ ] dip skip-vowels ] unless
+    ] when ;
+
+: skip-consonants ( i str -- i str )
+    2dup bounds-check? [
+        2dup consonant? [ [ 1+ ] dip skip-consonants ] when
+    ] when ;
+
+: (consonant-seq) ( n i str -- n )
+    skip-vowels
+    2dup bounds-check? [
+        [ 1+ ] [ 1+ ] [ ] tri* skip-consonants [ 1+ ] dip
+        (consonant-seq)
+    ] [
+        2drop
+    ] if ;
+
+: consonant-seq ( str -- n )
+    0 0 rot skip-consonants (consonant-seq) ;
+
+: stem-vowel? ( str -- ? )
+    [ length ] keep [ consonant? ] curry all? not ;
+
+: double-consonant? ( i str -- ? )
+    over 1 < [
+        2drop f
+    ] [
+        2dup nth [ over 1- over nth ] dip = [
+            consonant?
+        ] [
+            2drop f
+        ] if
+    ] if ;
+
+: consonant-end? ( n seq -- ? )
+    [ length swap - ] keep consonant? ;
+
+: last-is? ( str possibilities -- ? ) [ peek ] dip member? ;
+
+: cvc? ( str -- ? )
+    {
+        { [ dup length 3 < ] [ drop f ] }
+        { [ 1 over consonant-end? not ] [ drop f ] }
+        { [ 2 over consonant-end? ] [ drop f ] }
+        { [ 3 over consonant-end? not ] [ drop f ] }
+        [ "wxy" last-is? not ]
+    } cond ;
+
+: r ( str oldsuffix newsuffix -- str )
+    pick consonant-seq 0 > [ nip ] [ drop ] if append ;
+
+: step1a ( str -- newstr )
+    dup peek CHAR: s = [
+        {
+            { [ "sses" ?tail ] [ "ss" append ] }
+            { [ "ies" ?tail ] [ "i" append ] }
+            { [ dup "ss" tail? ] [ ] }
+            { [ "s" ?tail ] [ ] }
+            [ ]
+        } cond
+    ] when ;
+
+: -eed ( str -- str )
+    dup consonant-seq 0 > "ee" "eed" ? append ;
+
+: -ed ( str -- str ? )
+    dup stem-vowel? [ [ "ed" append ] unless ] keep ;
+
+: -ing ( str -- str ? )
+    dup stem-vowel? [ [ "ing" append ] unless ] keep ;
+
+: -ed/ing ( str -- str )
+    {
+        { [ "at" ?tail ] [ "ate" append ] }
+        { [ "bl" ?tail ] [ "ble" append ] }
+        { [ "iz" ?tail ] [ "ize" append ] }
+        {
+            [ dup length 1- over double-consonant? ]
+            [ dup "lsz" last-is? [ but-last-slice ] unless ]
+        }
+        {
+            [ t ]
+            [
+                dup consonant-seq 1 = over cvc? and
+                [ "e" append ] when
+            ]
+        }
+    } cond ;
+
+: step1b ( str -- newstr )
+    {
+        { [ "eed" ?tail ] [ -eed ] }
+        {
+            [
+                {
+                    { [ "ed" ?tail ] [ -ed ] }
+                    { [ "ing" ?tail ] [ -ing ] }
+                    [ f ]
+                } cond
+            ] [ -ed/ing ]
+        }
+        [ ]
+    } cond ;
+
+: step1c ( str -- newstr )
+    dup but-last-slice stem-vowel? [
+        "y" ?tail [ "i" append ] when
+    ] when ;
+
+: step2 ( str -- newstr )
+    {
+        { [ "ational" ?tail ] [ "ational" "ate"  r ] }
+        { [ "tional"  ?tail ] [ "tional"  "tion" r ] }
+        { [ "enci"    ?tail ] [ "enci"    "ence" r ] }
+        { [ "anci"    ?tail ] [ "anci"    "ance" r ] }
+        { [ "izer"    ?tail ] [ "izer"    "ize"  r ] }
+        { [ "bli"     ?tail ] [ "bli"     "ble"  r ] }
+        { [ "alli"    ?tail ] [ "alli"    "al"   r ] }
+        { [ "entli"   ?tail ] [ "entli"   "ent"  r ] }
+        { [ "eli"     ?tail ] [ "eli"     "e"    r ] }
+        { [ "ousli"   ?tail ] [ "ousli"   "ous"  r ] }
+        { [ "ization" ?tail ] [ "ization" "ize"  r ] }
+        { [ "ation"   ?tail ] [ "ation"   "ate"  r ] }
+        { [ "ator"    ?tail ] [ "ator"    "ate"  r ] }
+        { [ "alism"   ?tail ] [ "alism"   "al"   r ] }
+        { [ "iveness" ?tail ] [ "iveness" "ive"  r ] }
+        { [ "fulness" ?tail ] [ "fulness" "ful"  r ] }
+        { [ "ousness" ?tail ] [ "ousness" "ous"  r ] }
+        { [ "aliti"   ?tail ] [ "aliti"   "al"   r ] }
+        { [ "iviti"   ?tail ] [ "iviti"   "ive"  r ] }
+        { [ "biliti"  ?tail ] [ "biliti"  "ble"  r ] }
+        { [ "logi"    ?tail ] [ "logi"    "log"  r ] }
+        [ ]
+    } cond ;
+
+: step3 ( str -- newstr )
+    {
+        { [ "icate" ?tail ] [ "icate" "ic" r ] }
+        { [ "ative" ?tail ] [ "ative" ""   r ] }
+        { [ "alize" ?tail ] [ "alize" "al" r ] }
+        { [ "iciti" ?tail ] [ "iciti" "ic" r ] }
+        { [ "ical"  ?tail ] [ "ical"  "ic" r ] }
+        { [ "ful"   ?tail ] [ "ful"   ""   r ] }
+        { [ "ness"  ?tail ] [ "ness"  ""   r ] }
+        [ ]
+    } cond ;
+
+: -ion ( str -- newstr )
+    [
+        "ion"
+    ] [
+        dup "st" last-is? [ "ion" append ] unless
+    ] if-empty ;
+
+: step4 ( str -- newstr )
+    dup {
+        { [ "al"    ?tail ] [ ] }
+        { [ "ance"  ?tail ] [ ] }
+        { [ "ence"  ?tail ] [ ] }
+        { [ "er"    ?tail ] [ ] }
+        { [ "ic"    ?tail ] [ ] }
+        { [ "able"  ?tail ] [ ] }
+        { [ "ible"  ?tail ] [ ] }
+        { [ "ant"   ?tail ] [ ] }
+        { [ "ement" ?tail ] [ ] }
+        { [ "ment"  ?tail ] [ ] }
+        { [ "ent"   ?tail ] [ ] }
+        { [ "ion"   ?tail ] [ -ion ] }
+        { [ "ou"    ?tail ] [ ] }
+        { [ "ism"   ?tail ] [ ] }
+        { [ "ate"   ?tail ] [ ] }
+        { [ "iti"   ?tail ] [ ] }
+        { [ "ous"   ?tail ] [ ] }
+        { [ "ive"   ?tail ] [ ] }
+        { [ "ize"   ?tail ] [ ] }
+        [ ]
+    } cond dup consonant-seq 1 > [ nip ] [ drop ] if ;
+
+: remove-e? ( str -- ? )
+    dup consonant-seq dup 1 >
+    [ 2drop t ]
+    [ 1 = [ but-last-slice cvc? not ] [ drop f ] if ] if ;
+
+: remove-e ( str -- newstr )
+    dup peek CHAR: e = [
+        dup remove-e? [ but-last-slice ] when
+    ] when ;
+
+: ll->l ( str -- newstr )
+    {
+        { [ dup peek CHAR: l = not ] [ ] }
+        { [ dup length 1- over double-consonant? not ] [ ] }
+        { [ dup consonant-seq 1 > ] [ but-last-slice ] }
+        [ ]
+    } cond ;
+
+: step5 ( str -- newstr ) remove-e ll->l ;
+
+: stem ( str -- newstr )
+    dup length 2 <= [
+        step1a step1b step1c step2 step3 step4 step5 "" like
+    ] unless ;
diff --git a/basis/porter-stemmer/summary.txt b/basis/porter-stemmer/summary.txt
new file mode 100644 (file)
index 0000000..dd7746b
--- /dev/null
@@ -0,0 +1 @@
+Porter stemming algorithm
diff --git a/basis/porter-stemmer/test/output.txt b/basis/porter-stemmer/test/output.txt
new file mode 100644 (file)
index 0000000..595cb67
--- /dev/null
@@ -0,0 +1,23531 @@
+a
+aaron
+abaissiez
+abandon
+abandon
+abas
+abash
+abat
+abat
+abat
+abat
+abat
+abbess
+abbei
+abbei
+abbomin
+abbot
+abbot
+abbrevi
+ab
+abel
+aberga
+abergavenni
+abet
+abet
+abhomin
+abhor
+abhorr
+abhor
+abhor
+abhor
+abhorson
+abid
+abid
+abil
+abil
+abject
+abjectli
+abject
+abjur
+abjur
+abl
+abler
+aboard
+abod
+abod
+abod
+abod
+abomin
+abomin
+abomin
+abort
+abort
+abound
+abound
+about
+abov
+abr
+abraham
+abram
+abreast
+abridg
+abridg
+abridg
+abridg
+abroach
+abroad
+abrog
+abrook
+abrupt
+abrupt
+abruptli
+absenc
+absent
+absei
+absolut
+absolut
+absolv
+absolv
+abstain
+abstemi
+abstin
+abstract
+absurd
+absyrtu
+abund
+abund
+abundantli
+abu
+abus
+abus
+abus
+abus
+abus
+abut
+abi
+abysm
+ac
+academ
+academ
+accent
+accent
+accept
+accept
+accept
+accept
+accept
+access
+accessari
+access
+accid
+accid
+accident
+accident
+accid
+accit
+accit
+accit
+acclam
+accommod
+accommod
+accommod
+accommod
+accommodo
+accompani
+accompani
+accompani
+accomplic
+accomplish
+accomplish
+accomplish
+accomplish
+accompt
+accord
+accord
+accord
+accordeth
+accord
+accordingli
+accord
+accost
+accost
+account
+account
+account
+account
+accoutr
+accoutr
+accoutr
+accru
+accumul
+accumul
+accumul
+accur
+accurs
+accurst
+accu
+accus
+accus
+accus
+accusativo
+accus
+accus
+accus
+accus
+accus
+accuseth
+accus
+accustom
+accustom
+ac
+acerb
+ach
+acheron
+ach
+achiev
+achiev
+achiev
+achiev
+achiev
+achiev
+achiev
+achiev
+achil
+ach
+achitophel
+acknowledg
+acknowledg
+acknowledg
+acknowledg
+acknown
+acold
+aconitum
+acordo
+acorn
+acquaint
+acquaint
+acquaint
+acquaint
+acquir
+acquir
+acquisit
+acquit
+acquitt
+acquitt
+acquit
+acr
+acr
+across
+act
+actaeon
+act
+act
+action
+action
+actium
+activ
+activ
+activ
+actor
+actor
+act
+actual
+actur
+acut
+acut
+ad
+adag
+adalla
+adam
+adam
+add
+ad
+adder
+adder
+addeth
+addict
+addict
+addict
+ad
+addit
+addit
+addl
+address
+address
+addrest
+add
+adher
+adher
+adieu
+adieu
+adjac
+adjoin
+adjoin
+adjourn
+adjudg
+adjudg
+adjunct
+administ
+administr
+admir
+admir
+admir
+admir
+admir
+admir
+admir
+admir
+admiringli
+admiss
+admit
+admit
+admitt
+admit
+admit
+admonish
+admonish
+admonish
+admonish
+admonit
+ado
+adoni
+adopt
+adopt
+adoptedli
+adopt
+adopti
+adopt
+ador
+ador
+ador
+ador
+ador
+ador
+adorest
+adoreth
+ador
+adorn
+adorn
+adorn
+adorn
+adorn
+adown
+adramadio
+adrian
+adriana
+adriano
+adriat
+adsum
+adul
+adulter
+adulter
+adulter
+adulteress
+adulteri
+adulter
+adulteri
+adultress
+advanc
+advanc
+advanc
+advanc
+advanc
+advanc
+advanc
+advantag
+advantag
+advantag
+advantag
+advantag
+advantag
+advent
+adventur
+adventur
+adventur
+adventur
+adventur
+adventur
+adversari
+adversari
+advers
+advers
+advers
+advers
+adverti
+advertis
+advertis
+advertis
+advertis
+advic
+advi
+advis
+advis
+advisedli
+advis
+advis
+advoc
+advoc
+aeacida
+aeacid
+aedil
+aedil
+aegeon
+aegion
+aegl
+aemelia
+aemilia
+aemiliu
+aenea
+aeolu
+aer
+aerial
+aeri
+aesculapiu
+aeson
+aesop
+aetna
+afar
+afear
+afeard
+affabl
+affabl
+affair
+affair
+affair
+affect
+affect
+affect
+affect
+affectedli
+affecteth
+affect
+affect
+affection
+affection
+affect
+affect
+affeer
+affianc
+affianc
+affianc
+affi
+affin
+affin
+affin
+affirm
+affirm
+affirm
+afflict
+afflict
+afflict
+afflict
+afflict
+afford
+affordeth
+afford
+affrai
+affright
+affright
+affright
+affront
+affront
+affi
+afield
+afir
+afloat
+afoot
+afor
+aforehand
+aforesaid
+afraid
+afresh
+afric
+africa
+african
+afront
+after
+afternoon
+afterward
+afterward
+ag
+again
+against
+agamemmon
+agamemnon
+agat
+agaz
+ag
+ag
+agenor
+agent
+agent
+ag
+aggrav
+aggrief
+agil
+agincourt
+agit
+aglet
+agniz
+ago
+agon
+agoni
+agre
+agre
+agre
+agreement
+agre
+agrippa
+aground
+agu
+aguecheek
+agu
+aguefac
+agu
+ah
+aha
+ahungri
+ai
+aialvolio
+aiaria
+aid
+aidanc
+aidant
+aid
+aid
+aidless
+aid
+ail
+aim
+aim
+aimest
+aim
+aim
+ainsi
+aio
+air
+air
+airless
+air
+airi
+ajax
+akil
+al
+alabast
+alack
+alacr
+alarbu
+alarm
+alarm
+alarum
+alarum
+ala
+alb
+alban
+alban
+albani
+albeit
+albion
+alchemist
+alchemi
+alcibiad
+alcid
+alder
+alderman
+aldermen
+al
+alecto
+alehous
+alehous
+alencon
+alengon
+aleppo
+al
+alewif
+alexand
+alexand
+alexandria
+alexandrian
+alexa
+alia
+alic
+alien
+aliena
+alight
+alight
+alight
+alii
+alik
+alisand
+aliv
+all
+alla
+allai
+allai
+allai
+allay
+allay
+allai
+alleg
+alleg
+alleg
+alleg
+allegi
+allegi
+allei
+allei
+allhallowma
+allianc
+allicholi
+alli
+alli
+allig
+allig
+allon
+allot
+allot
+allot
+allotteri
+allow
+allow
+allow
+allow
+allow
+allur
+allur
+allur
+allur
+allus
+alli
+allycholli
+almain
+almanac
+almanack
+almanac
+almighti
+almond
+almost
+alm
+almsman
+alo
+aloft
+alon
+along
+alonso
+aloof
+aloud
+alphabet
+alphabet
+alphonso
+alp
+alreadi
+also
+alt
+altar
+altar
+alter
+alter
+alter
+alter
+althaea
+although
+altitud
+altogeth
+alton
+alwai
+alwai
+am
+amaimon
+amain
+amak
+amamon
+amaz
+amaz
+amaz
+amazedli
+amazed
+amaz
+amaz
+amazeth
+amaz
+amazon
+amazonian
+amazon
+ambassador
+ambassador
+amber
+ambiguid
+ambigu
+ambigu
+ambit
+ambit
+ambiti
+ambiti
+ambl
+ambl
+ambl
+ambl
+ambo
+ambuscado
+ambush
+amen
+amend
+amend
+amend
+amend
+amerc
+america
+am
+amiabl
+amid
+amidst
+amien
+ami
+amiss
+amiti
+amiti
+amnipot
+among
+amongst
+amor
+amor
+amort
+amount
+amount
+amour
+amphimacu
+ampl
+ampler
+amplest
+amplifi
+amplifi
+ampli
+ampthil
+amurath
+amynta
+an
+anatomiz
+anatom
+anatomi
+ancestor
+ancestor
+ancestri
+anchis
+anchor
+anchorag
+anchor
+anchor
+anchor
+anchovi
+ancient
+ancientri
+ancient
+ancu
+and
+andiron
+andpholu
+andren
+andrew
+andromach
+andronici
+andronicu
+anew
+ang
+angel
+angelica
+angel
+angelo
+angel
+anger
+angerli
+anger
+ang
+angier
+angl
+anglai
+angl
+angler
+angleterr
+anglia
+angl
+anglish
+angrili
+angri
+anguish
+angu
+anim
+anim
+animi
+anjou
+ankl
+anna
+annal
+ann
+annex
+annex
+annexion
+annex
+annothan
+announc
+annoi
+annoy
+annoi
+annual
+anoint
+anoint
+anon
+anoth
+anselmo
+answer
+answer
+answer
+answerest
+answer
+answer
+ant
+ant
+antenor
+antenorid
+anteroom
+anthem
+anthem
+anthoni
+anthropophagi
+anthropophaginian
+antiat
+antic
+anticip
+anticip
+anticipatest
+anticip
+anticip
+antick
+anticli
+antic
+antidot
+antidot
+antigonu
+antiopa
+antipathi
+antipholu
+antipholus
+antipod
+antiquari
+antiqu
+antiqu
+antium
+antoniad
+antonio
+antoniu
+antoni
+antr
+anvil
+ani
+anybodi
+anyon
+anyth
+anywher
+ap
+apac
+apart
+apart
+apart
+ap
+apemantu
+apennin
+ap
+apiec
+apish
+apollinem
+apollo
+apollodoru
+apolog
+apoplex
+apoplexi
+apostl
+apostl
+apostropha
+apoth
+apothecari
+appal
+appal
+appal
+appal
+apparel
+apparel
+apparel
+appar
+appar
+apparit
+apparit
+appeach
+appeal
+appeal
+appear
+appear
+appear
+appeareth
+appear
+appear
+appea
+appeas
+appeas
+appel
+appel
+appele
+appel
+appelez
+appel
+appel
+appelon
+appendix
+apperil
+appertain
+appertain
+appertain
+appertain
+appertin
+appertin
+appetit
+appetit
+applaud
+applaud
+applaud
+applaus
+applaus
+appl
+appl
+appletart
+applianc
+applianc
+applic
+appli
+appli
+appli
+appli
+appoint
+appoint
+appoint
+appoint
+appoint
+apprehend
+apprehend
+apprehend
+apprehens
+apprehens
+apprehens
+apprendr
+apprenn
+apprenticehood
+appri
+approach
+approach
+approach
+approacheth
+approach
+approb
+approof
+appropri
+approv
+approv
+approv
+approv
+approv
+appurten
+appurten
+apricock
+april
+apron
+apron
+apt
+apter
+aptest
+aptli
+apt
+aqua
+aquilon
+aquitain
+arabia
+arabian
+arais
+arbitr
+arbitr
+arbitr
+arbitr
+arbor
+arbour
+arc
+arch
+archbishop
+archbishopr
+archdeacon
+arch
+archelau
+archer
+archer
+archeri
+archibald
+archidamu
+architect
+arcu
+ard
+arden
+ardent
+ardour
+ar
+argal
+argier
+argo
+argosi
+argosi
+argu
+argu
+argu
+argu
+argu
+argument
+argument
+argu
+ariachn
+ariadn
+ariel
+ari
+aright
+arinado
+arini
+arion
+aris
+aris
+ariseth
+aris
+aristod
+aristotl
+arithmet
+arithmetician
+ark
+arm
+arma
+armado
+armado
+armagnac
+arm
+arm
+armenia
+armi
+armigero
+arm
+armipot
+armor
+armour
+armour
+armour
+armour
+armouri
+arm
+armi
+arn
+aroint
+aros
+arous
+arous
+arragon
+arraign
+arraign
+arraign
+arraign
+arrant
+arra
+arrai
+arrearag
+arrest
+arrest
+arrest
+arriv
+arriv
+arriv
+arriv
+arriv
+arriv
+arriv
+arrog
+arrog
+arrog
+arrow
+arrow
+art
+artemidoru
+arteri
+arthur
+articl
+articl
+articul
+artific
+artifici
+artilleri
+artir
+artist
+artist
+artless
+artoi
+art
+artu
+arviragu
+as
+asaph
+ascaniu
+ascend
+ascend
+ascendeth
+ascend
+ascens
+ascent
+ascrib
+ascrib
+ash
+asham
+asham
+asher
+ash
+ashford
+ashor
+ashout
+ashi
+asia
+asid
+ask
+askanc
+ask
+asker
+asketh
+ask
+ask
+aslant
+asleep
+asmath
+asp
+aspect
+aspect
+aspen
+aspers
+aspic
+aspici
+aspic
+aspir
+aspir
+aspir
+aspir
+asquint
+ass
+assail
+assail
+assail
+assail
+assail
+assaileth
+assail
+assail
+assassin
+assault
+assault
+assault
+assai
+assai
+assai
+assembl
+assembl
+assembl
+assembl
+assembl
+assent
+ass
+assez
+assign
+assign
+assign
+assinico
+assist
+assist
+assist
+assist
+assist
+assist
+assist
+associ
+associ
+associ
+assuag
+assubjug
+assum
+assum
+assum
+assumpt
+assur
+assur
+assur
+assur
+assuredli
+assur
+assyrian
+astonish
+astonish
+astraea
+astrai
+astrea
+astronom
+astronom
+astronom
+astronomi
+asund
+at
+atalanta
+at
+at
+athenian
+athenian
+athen
+athol
+athversari
+athwart
+atla
+atomi
+atomi
+aton
+aton
+aton
+atropo
+attach
+attach
+attach
+attain
+attaind
+attain
+attaint
+attaint
+attaintur
+attempt
+attempt
+attempt
+attempt
+attempt
+attend
+attend
+attend
+attend
+attend
+attend
+attendeth
+attend
+attend
+attent
+attent
+attent
+attentiven
+attest
+attest
+attir
+attir
+attir
+attir
+attornei
+attornei
+attornei
+attorneyship
+attract
+attract
+attract
+attract
+attribut
+attribut
+attribut
+attribut
+attribut
+atwain
+au
+aubrei
+auburn
+aucun
+audaci
+audaci
+audac
+audibl
+audienc
+audi
+audit
+auditor
+auditor
+auditori
+audr
+audrei
+aufidiu
+aufidius
+auger
+aught
+augment
+augment
+augment
+augment
+augur
+augur
+augur
+augur
+augur
+auguri
+august
+augustu
+auld
+aumerl
+aunchient
+aunt
+aunt
+auricular
+aurora
+auspici
+aussi
+auster
+auster
+auster
+auster
+austria
+aut
+authent
+author
+author
+author
+author
+author
+author
+autolycu
+autr
+autumn
+auvergn
+avail
+avail
+avaric
+avarici
+avaunt
+av
+aveng
+aveng
+aveng
+aver
+avert
+av
+avez
+avi
+avoid
+avoid
+avoid
+avoid
+avoirdupoi
+avouch
+avouch
+avouch
+avouch
+avow
+aw
+await
+await
+awak
+awak
+awak
+awaken
+awaken
+awaken
+awak
+awak
+award
+award
+awasi
+awai
+aw
+aweari
+aweless
+aw
+awhil
+awkward
+awl
+awoo
+awork
+awri
+ax
+axl
+axletre
+ay
+ay
+ayez
+ayli
+azur
+azur
+b
+ba
+baa
+babbl
+babbl
+babbl
+babe
+babe
+babi
+baboon
+baboon
+babi
+babylon
+bacar
+bacchan
+bacchu
+bach
+bachelor
+bachelor
+back
+backbit
+backbitten
+back
+back
+backward
+backwardli
+backward
+bacon
+bacon
+bad
+bade
+badg
+badg
+badg
+badli
+bad
+bae
+baffl
+baffl
+baffl
+bag
+baggag
+bagot
+bagpip
+bag
+bail
+bailiff
+baillez
+baili
+baisant
+baise
+baiser
+bait
+bait
+bait
+bait
+bait
+bajazet
+bak
+bake
+bake
+baker
+baker
+bake
+bake
+bal
+balanc
+balanc
+balconi
+bald
+baldrick
+bale
+bale
+balk
+ball
+ballad
+ballad
+ballast
+ballast
+ballet
+ballow
+ball
+balm
+balm
+balmi
+balsam
+balsamum
+balth
+balthasar
+balthazar
+bame
+ban
+banburi
+band
+bandi
+band
+bandit
+banditti
+banditto
+band
+bandi
+bandi
+bane
+bane
+bang
+bangor
+banish
+banish
+banish
+banish
+banist
+bank
+bankrout
+bankrupt
+bankrupt
+bank
+banner
+banneret
+banner
+ban
+bann
+banquet
+banquet
+banquet
+banquet
+banquo
+ban
+baptism
+baptista
+baptiz
+bar
+barbarian
+barbarian
+barbar
+barbar
+barbari
+barbason
+barb
+barber
+barbermong
+bard
+bardolph
+bard
+bare
+bare
+barefac
+barefac
+barefoot
+barehead
+bare
+bare
+bar
+bargain
+bargain
+barg
+bargulu
+bare
+bark
+bark
+barkloughli
+bark
+barki
+barlei
+barm
+barn
+barnacl
+barnardin
+barn
+barn
+barnet
+barn
+baron
+baron
+baroni
+barr
+barraba
+barrel
+barrel
+barren
+barrenli
+barren
+barricado
+barricado
+barrow
+bar
+barson
+barter
+bartholomew
+ba
+basan
+base
+baseless
+base
+base
+baser
+base
+basest
+bash
+bash
+basilisco
+basilisk
+basilisk
+basimecu
+basin
+basingstok
+basin
+basi
+bask
+basket
+basket
+bass
+bassanio
+basset
+bassianu
+basta
+bastard
+bastard
+bastardli
+bastard
+bastardi
+bast
+bast
+bastinado
+bast
+bat
+batail
+batch
+bate
+bate
+bate
+bath
+bath
+bath
+bath
+bath
+bate
+batler
+bat
+batt
+battalia
+battalion
+batten
+batter
+batter
+batter
+batteri
+battl
+battl
+battlefield
+battlement
+battl
+batti
+baubl
+baubl
+baubl
+baulk
+bavin
+bawcock
+bawd
+bawdri
+bawd
+bawdi
+bawl
+bawl
+bai
+bai
+baynard
+bayonn
+bai
+be
+beach
+beach
+beachi
+beacon
+bead
+bead
+beadl
+beadl
+bead
+beadsmen
+beagl
+beagl
+beak
+beak
+beam
+beam
+beam
+bean
+bean
+bear
+beard
+beard
+beardless
+beard
+bearer
+bearer
+bearest
+beareth
+bear
+bear
+beast
+beastliest
+beastli
+beastli
+beast
+beat
+beat
+beaten
+beat
+beatric
+beat
+beau
+beaufort
+beaumond
+beaumont
+beauteou
+beauti
+beauti
+beautifi
+beauti
+beautifi
+beauti
+beaver
+beaver
+becam
+becaus
+bechanc
+bechanc
+bechanc
+beck
+beckon
+beckon
+beck
+becom
+becom
+becom
+becom
+becom
+becom
+bed
+bedabbl
+bedash
+bedaub
+bedazzl
+bedchamb
+bedcloth
+bed
+bedeck
+bedeck
+bedew
+bedfellow
+bedfellow
+bedford
+bedlam
+bedrench
+bedrid
+bed
+bedtim
+bedward
+bee
+beef
+beef
+beehiv
+been
+beer
+bee
+beest
+beetl
+beetl
+beev
+befal
+befallen
+befal
+befel
+befit
+befit
+befit
+befor
+befor
+beforehand
+befortun
+befriend
+befriend
+befriend
+beg
+began
+beget
+beget
+beget
+begg
+beggar
+beggar
+beggarli
+beggarman
+beggar
+beggari
+beg
+begin
+beginn
+begin
+begin
+begin
+begnawn
+begon
+begot
+begotten
+begrim
+beg
+beguil
+beguil
+beguil
+beguil
+beguil
+begun
+behalf
+behalf
+behav
+behav
+behavedst
+behavior
+behavior
+behaviour
+behaviour
+behead
+behead
+beheld
+behest
+behest
+behind
+behold
+behold
+behold
+beholdest
+behold
+behold
+behoof
+behoofful
+behoov
+behov
+behov
+behowl
+be
+bel
+belariu
+belch
+belch
+beldam
+beldam
+beldam
+bele
+belgia
+beli
+beli
+belief
+beliest
+believ
+believ
+believ
+believ
+believest
+believ
+belik
+bell
+bellario
+bell
+belli
+belli
+bellman
+bellona
+bellow
+bellow
+bellow
+bellow
+bell
+belli
+belly
+belman
+belmont
+belock
+belong
+belong
+belong
+belong
+belov
+belov
+belov
+below
+belt
+belzebub
+bemad
+bemet
+bemet
+bemoan
+bemoan
+bemock
+bemoil
+bemonst
+ben
+bench
+bencher
+bench
+bend
+bend
+bend
+bend
+bene
+beneath
+benedicit
+benedick
+benedict
+benedictu
+benefactor
+benefic
+benefici
+benefit
+benefit
+benefit
+benet
+benevol
+benevol
+beni
+benison
+bennet
+bent
+bentii
+bentivolii
+bent
+benumb
+benvolio
+bepaint
+beprai
+bequeath
+bequeath
+bequeath
+bequest
+ber
+berard
+berattl
+berai
+bere
+bereav
+bereav
+bereav
+bereft
+bergamo
+bergomask
+berhym
+berhym
+berkelei
+bermooth
+bernardo
+berod
+berown
+berri
+berri
+berrord
+berri
+bertram
+berwick
+bescreen
+beseech
+beseech
+beseech
+beseech
+beseek
+beseem
+beseemeth
+beseem
+beseem
+beset
+beshrew
+besid
+besid
+besieg
+besieg
+besieg
+beslubb
+besmear
+besmear
+besmirch
+besom
+besort
+besot
+bespak
+bespeak
+bespic
+bespok
+bespot
+bess
+bessi
+best
+bestain
+best
+bestial
+bestir
+bestirr
+bestow
+bestow
+bestow
+bestow
+bestraught
+bestrew
+bestrid
+bestrid
+bestrid
+bet
+betak
+beteem
+bethink
+bethought
+bethroth
+bethump
+betid
+betid
+betideth
+betim
+betim
+betoken
+betook
+betoss
+betrai
+betrai
+betrai
+betrai
+betrim
+betroth
+betroth
+betroth
+bett
+bet
+better
+better
+better
+better
+bet
+bettr
+between
+betwixt
+bevel
+beverag
+bevi
+bevi
+bewail
+bewail
+bewail
+bewail
+bewar
+bewast
+beweep
+bewept
+bewet
+bewhor
+bewitch
+bewitch
+bewitch
+bewrai
+beyond
+bezonian
+bezonian
+bianca
+bianco
+bia
+bibbl
+bicker
+bid
+bidden
+bid
+bid
+biddi
+bide
+bide
+bide
+bid
+bien
+bier
+bifold
+big
+bigami
+biggen
+bigger
+big
+bigot
+bilberri
+bilbo
+bilbo
+bilbow
+bill
+billet
+billet
+billiard
+bill
+billow
+billow
+bill
+bin
+bind
+bindeth
+bind
+bind
+biondello
+birch
+bird
+bird
+birdlim
+bird
+birnam
+birth
+birthdai
+birthdom
+birthplac
+birthright
+birthright
+birth
+bi
+biscuit
+bishop
+bishop
+bisson
+bit
+bitch
+bite
+biter
+bite
+bite
+bit
+bitt
+bitten
+bitter
+bitterest
+bitterli
+bitter
+blab
+blabb
+blab
+blab
+black
+blackamoor
+blackamoor
+blackberri
+blackberri
+blacker
+blackest
+blackfriar
+blackheath
+blackmer
+black
+black
+bladder
+bladder
+blade
+blade
+blade
+blain
+blam
+blame
+blame
+blame
+blameless
+blame
+blanc
+blanca
+blanch
+blank
+blanket
+blank
+blasphem
+blasphem
+blasphem
+blasphemi
+blast
+blast
+blast
+blastment
+blast
+blaz
+blaze
+blaze
+blaze
+blazon
+blazon
+blazon
+bleach
+bleach
+bleak
+blear
+blear
+bleat
+bleat
+bleat
+bled
+bleed
+bleedest
+bleedeth
+bleed
+bleed
+blemish
+blemish
+blench
+blench
+blend
+blend
+blent
+bless
+bless
+blessedli
+blessed
+bless
+blesseth
+bless
+bless
+blest
+blew
+blind
+blind
+blindfold
+blind
+blindli
+blind
+blind
+blink
+blink
+bliss
+blist
+blister
+blister
+blith
+blithild
+bloat
+block
+blockish
+block
+bloi
+blood
+blood
+bloodhound
+bloodi
+bloodier
+bloodiest
+bloodili
+bloodless
+blood
+bloodsh
+bloodshed
+bloodstain
+bloodi
+bloom
+bloom
+blossom
+blossom
+blossom
+blot
+blot
+blot
+blot
+blount
+blow
+blow
+blower
+blowest
+blow
+blown
+blow
+blows
+blubb
+blubber
+blubber
+blue
+bluecap
+bluest
+blunt
+blunt
+blunter
+bluntest
+blunt
+bluntli
+blunt
+blunt
+blur
+blurr
+blur
+blush
+blush
+blushest
+blush
+blust
+bluster
+bluster
+bluster
+bo
+boar
+board
+board
+board
+board
+boarish
+boar
+boast
+boast
+boast
+boast
+boast
+boat
+boat
+boatswain
+bob
+bobb
+boblibindo
+bobtail
+bocchu
+bode
+bode
+bodement
+bode
+bodg
+bodi
+bodi
+bodiless
+bodili
+bode
+bodkin
+bodi
+bodykin
+bog
+boggl
+boggler
+bog
+bohemia
+bohemian
+bohun
+boil
+boil
+boil
+boist
+boister
+boister
+boitier
+bold
+bolden
+bolder
+boldest
+boldli
+bold
+bold
+bolingbrok
+bolster
+bolt
+bolt
+bolter
+bolter
+bolt
+bolt
+bombard
+bombard
+bombast
+bon
+bona
+bond
+bondag
+bond
+bondmaid
+bondman
+bondmen
+bond
+bondslav
+bone
+boneless
+bone
+bonfir
+bonfir
+bonjour
+bonn
+bonnet
+bonnet
+bonni
+bono
+bonto
+bonvil
+bood
+book
+bookish
+book
+boon
+boor
+boorish
+boor
+boot
+boot
+booti
+bootless
+boot
+booti
+bor
+bora
+borachio
+bordeaux
+border
+border
+border
+border
+bore
+borea
+bore
+bore
+born
+born
+borough
+borough
+borrow
+borrow
+borrow
+borrow
+borrow
+bosko
+bosko
+boski
+bosom
+bosom
+boson
+boss
+bosworth
+botch
+botcher
+botch
+botchi
+both
+bot
+bottl
+bottl
+bottl
+bottom
+bottomless
+bottom
+bouciqualt
+boug
+bough
+bough
+bought
+bounc
+bounc
+bound
+bound
+bounden
+boundeth
+bound
+boundless
+bound
+bounteou
+bounteous
+bounti
+bounti
+bountifulli
+bounti
+bourbier
+bourbon
+bourchier
+bourdeaux
+bourn
+bout
+bout
+bove
+bow
+bowcas
+bow
+bowel
+bower
+bow
+bowl
+bowler
+bowl
+bowl
+bow
+bowsprit
+bowstr
+box
+box
+boi
+boyet
+boyish
+boi
+brabant
+brabantio
+brabbl
+brabbler
+brac
+brace
+bracelet
+bracelet
+brach
+braci
+brag
+bragg
+braggard
+braggard
+braggart
+braggart
+brag
+brag
+bragless
+brag
+braid
+braid
+brain
+brain
+brainford
+brainish
+brainless
+brain
+brainsick
+brainsickli
+brake
+brakenburi
+brake
+brambl
+bran
+branch
+branch
+branchless
+brand
+brand
+brandish
+brandon
+brand
+bra
+brass
+brassi
+brat
+brat
+brav
+brave
+brave
+brave
+braver
+braveri
+brave
+bravest
+brave
+brawl
+brawler
+brawl
+brawl
+brawn
+brawn
+brai
+brai
+braz
+brazen
+brazier
+breach
+breach
+bread
+breadth
+break
+breaker
+breakfast
+break
+break
+breast
+breast
+breast
+breastplat
+breast
+breath
+breath
+breath
+breather
+breather
+breath
+breathest
+breath
+breathless
+breath
+brecknock
+bred
+breech
+breech
+breech
+breed
+breeder
+breeder
+breed
+breed
+brees
+breez
+breff
+bretagn
+brethen
+bretheren
+brethren
+brevi
+breviti
+brew
+brewag
+brewer
+brewer
+brew
+brew
+briareu
+briar
+brib
+bribe
+briber
+bribe
+brick
+bricklay
+brick
+bridal
+bride
+bridegroom
+bridegroom
+bride
+bridg
+bridgenorth
+bridg
+bridget
+bridl
+bridl
+brief
+briefer
+briefest
+briefli
+brief
+brier
+brier
+brigandin
+bright
+brighten
+brightest
+brightli
+bright
+brim
+brim
+brim
+brimston
+brind
+brine
+bring
+bringer
+bringeth
+bring
+bring
+bring
+brinish
+brink
+brisk
+briski
+bristl
+bristl
+bristli
+bristol
+bristow
+britain
+britain
+britain
+british
+briton
+briton
+brittani
+brittl
+broach
+broach
+broad
+broader
+broadsid
+broca
+brock
+brogu
+broil
+broil
+broil
+broke
+broken
+brokenli
+broker
+broker
+broke
+broke
+brooch
+brooch
+brood
+brood
+brood
+brook
+brook
+broom
+broomstaff
+broth
+brothel
+brother
+brotherhood
+brotherhood
+brotherli
+brother
+broth
+brought
+brow
+brown
+browner
+brownist
+browni
+brow
+brows
+brows
+brui
+bruis
+bruis
+bruis
+bruis
+bruit
+bruit
+brundusium
+brunt
+brush
+brush
+brute
+brutish
+brutu
+bubbl
+bubbl
+bubbl
+bubukl
+buck
+bucket
+bucket
+buck
+buckingham
+buckl
+buckl
+buckler
+buckler
+bucklersburi
+buckl
+buckram
+buck
+bud
+bud
+bud
+budg
+budger
+budget
+bud
+buff
+buffet
+buffet
+buffet
+bug
+bugbear
+bugl
+bug
+build
+build
+buildeth
+build
+build
+build
+built
+bulk
+bulk
+bull
+bullcalf
+bullen
+bullen
+bullet
+bullet
+bullock
+bull
+bulli
+bulmer
+bulwark
+bulwark
+bum
+bumbast
+bump
+bumper
+bum
+bunch
+bunch
+bundl
+bung
+bunghol
+bungl
+bunt
+buoi
+bur
+burbolt
+burd
+burden
+burden
+burden
+burden
+burden
+burgh
+burgher
+burgher
+burglari
+burgomast
+burgonet
+burgundi
+burial
+buri
+burier
+buriest
+burli
+burn
+burn
+burnet
+burneth
+burn
+burnish
+burn
+burnt
+burr
+burrow
+bur
+burst
+burst
+burst
+burthen
+burthen
+burton
+buri
+buri
+bush
+bushel
+bush
+bushi
+busi
+busili
+busin
+busi
+busi
+buskin
+buski
+buss
+buss
+buss
+bustl
+bustl
+busi
+but
+butche
+butcher
+butcher
+butcheri
+butcherli
+butcher
+butcheri
+butler
+butt
+butter
+butter
+butterfli
+butterfli
+butterwoman
+butteri
+buttock
+buttock
+button
+buttonhol
+button
+buttress
+buttri
+butt
+buxom
+bui
+buyer
+bui
+bui
+buzz
+buzzard
+buzzard
+buzzer
+buzz
+by
+bye
+byzantium
+c
+ca
+cabbag
+cabilero
+cabin
+cabin
+cabl
+cabl
+cackl
+cacodemon
+caddi
+caddiss
+cade
+cadenc
+cadent
+cade
+cadmu
+caduceu
+cadwal
+cadwallad
+caeliu
+caelo
+caesar
+caesarion
+caesar
+cage
+cage
+cagion
+cain
+caith
+caitiff
+caitiff
+caiu
+cak
+cake
+cake
+calab
+calai
+calam
+calam
+calcha
+calcul
+calen
+calendar
+calendar
+calf
+caliban
+caliban
+calipoli
+caliti
+caliv
+call
+callat
+call
+callet
+call
+call
+calm
+calmest
+calmli
+calm
+calm
+calpurnia
+calumni
+calumni
+calumni
+calumni
+calv
+calv
+calv
+calveskin
+calydon
+cam
+cambio
+cambria
+cambric
+cambric
+cambridg
+cambys
+came
+camel
+camelot
+camel
+camest
+camillo
+camlet
+camomil
+camp
+campeiu
+camp
+camp
+can
+canakin
+canari
+canari
+cancel
+cancel
+cancel
+cancel
+cancel
+cancer
+candidatu
+candi
+candl
+candl
+candlestick
+candi
+canidiu
+cank
+canker
+cankerblossom
+canker
+cannib
+cannib
+cannon
+cannon
+cannon
+cannot
+canon
+canoniz
+canon
+canon
+canon
+canopi
+canopi
+canopi
+canst
+canstick
+canterburi
+cantl
+canton
+canu
+canva
+canvass
+canzonet
+cap
+capabl
+capabl
+capac
+capac
+caparison
+capdv
+cape
+capel
+capel
+caper
+caper
+capet
+caphi
+capilet
+capitain
+capit
+capit
+capitol
+capitul
+capocchia
+capon
+capon
+capp
+cappadocia
+capriccio
+caprici
+cap
+capt
+captain
+captain
+captainship
+captiou
+captiv
+captiv
+captiv
+captiv
+captiv
+captiv
+captum
+capuciu
+capulet
+capulet
+car
+carack
+carack
+carat
+carawai
+carbonado
+carbuncl
+carbuncl
+carbuncl
+carcanet
+carcas
+carcas
+carcass
+carcass
+card
+cardecu
+card
+carder
+cardin
+cardin
+cardin
+cardmak
+card
+carduu
+care
+care
+career
+career
+care
+carefulli
+careless
+carelessli
+careless
+care
+caret
+cargo
+carl
+carlisl
+carlot
+carman
+carmen
+carnal
+carnal
+carnarvonshir
+carnat
+carnat
+carol
+carou
+carous
+carous
+carous
+carous
+carp
+carpent
+carper
+carpet
+carpet
+carp
+carriag
+carriag
+carri
+carrier
+carrier
+carri
+carrion
+carrion
+carri
+carri
+car
+cart
+carter
+carthag
+cart
+carv
+carv
+carv
+carver
+carv
+carv
+ca
+casa
+casaer
+casca
+case
+casement
+casement
+case
+cash
+cashier
+case
+cask
+casket
+casket
+casket
+casqu
+casqu
+cassado
+cassandra
+cassibelan
+cassio
+cassiu
+cassock
+cast
+castalion
+castawai
+castawai
+cast
+caster
+castig
+castig
+castil
+castiliano
+cast
+castl
+castl
+cast
+casual
+casual
+casualti
+casualti
+cat
+cataian
+catalogu
+cataplasm
+cataract
+catarrh
+catastroph
+catch
+catcher
+catch
+catch
+cate
+catechis
+catech
+catech
+cater
+caterpillar
+cater
+caterwaul
+cate
+catesbi
+cathedr
+catlik
+catl
+catl
+cato
+cat
+cattl
+caucasu
+caudl
+cauf
+caught
+cauldron
+cau
+caus
+caus
+causeless
+causer
+caus
+causest
+causeth
+cautel
+cautel
+cautel
+cauter
+caution
+caution
+cavaleiro
+cavaleri
+cavali
+cave
+cavern
+cavern
+cave
+caveto
+caviari
+cavil
+cavil
+cawdor
+cawdron
+caw
+ce
+cea
+ceas
+ceas
+ceaseth
+cedar
+cedar
+cediu
+celebr
+celebr
+celebr
+celebr
+celer
+celesti
+celia
+cell
+cellar
+cellarag
+celsa
+cement
+censer
+censor
+censorinu
+censur
+censur
+censur
+censur
+censur
+censur
+centaur
+centaur
+centr
+cent
+centuri
+centurion
+centurion
+centuri
+cerberu
+cerecloth
+cerement
+ceremoni
+ceremoni
+ceremoni
+ceremoni
+ceremoni
+cere
+cern
+certain
+certain
+certainli
+certainti
+certainti
+cert
+certif
+certifi
+certifi
+certifi
+ce
+cesario
+cess
+cess
+cestern
+cetera
+cett
+chace
+chaf
+chafe
+chafe
+chafe
+chaff
+chaffless
+chafe
+chain
+chain
+chair
+chair
+chalic
+chalic
+chalic
+chalk
+chalk
+chalki
+challeng
+challeng
+challeng
+challeng
+challeng
+challeng
+cham
+chamber
+chamber
+chamberlain
+chamberlain
+chambermaid
+chambermaid
+chamber
+chameleon
+champ
+champagn
+champain
+champain
+champion
+champion
+chanc
+chanc
+chanc
+chancellor
+chanc
+chandler
+chang
+chang
+changeabl
+chang
+chang
+changel
+changel
+changer
+chang
+changest
+chang
+channel
+channel
+chanson
+chant
+chanticl
+chant
+chantri
+chantri
+chant
+chao
+chap
+chape
+chapel
+chapeless
+chapel
+chaplain
+chaplain
+chapless
+chaplet
+chapmen
+chap
+chapter
+charact
+charact
+characterless
+charact
+characteri
+charact
+charbon
+chare
+chare
+charg
+charg
+charg
+charg
+charg
+chargeth
+charg
+chariest
+chari
+chare
+chariot
+chariot
+charit
+charit
+chariti
+chariti
+charlemain
+charl
+charm
+charm
+charmer
+charmeth
+charmian
+charm
+charmingli
+charm
+charneco
+charnel
+charoloi
+charon
+charter
+charter
+chartreux
+chari
+charybdi
+cha
+chase
+chase
+chaser
+chaseth
+chase
+chast
+chast
+chasti
+chastis
+chastis
+chastis
+chastiti
+chat
+chatham
+chatillon
+chat
+chatt
+chattel
+chatter
+chatter
+chattl
+chaud
+chaunt
+chaw
+chawdron
+che
+cheap
+cheapen
+cheaper
+cheapest
+cheapli
+cheapsid
+cheat
+cheat
+cheater
+cheater
+cheat
+cheat
+check
+check
+checker
+check
+check
+cheek
+cheek
+cheer
+cheer
+cheerer
+cheer
+cheerfulli
+cheer
+cheerless
+cheerli
+cheer
+chees
+chequer
+cher
+cherish
+cherish
+cherish
+cherish
+cherish
+cherri
+cherri
+cherrypit
+chertsei
+cherub
+cherubim
+cherubin
+cherubin
+cheshu
+chess
+chest
+chester
+chestnut
+chestnut
+chest
+cheta
+chev
+cheval
+chevali
+chevali
+cheveril
+chew
+chew
+chewet
+chew
+chez
+chi
+chick
+chicken
+chicken
+chicurmurco
+chid
+chidden
+chide
+chider
+chide
+chide
+chief
+chiefest
+chiefli
+chien
+child
+child
+childer
+childhood
+childhood
+child
+childish
+childish
+childlik
+child
+children
+chill
+chill
+chime
+chime
+chimnei
+chimneypiec
+chimnei
+chimurcho
+chin
+china
+chine
+chine
+chink
+chink
+chin
+chipp
+chipper
+chip
+chiron
+chirp
+chirrah
+chirurgeonli
+chisel
+chitoph
+chivalr
+chivalri
+choic
+choic
+choicest
+choir
+choir
+chok
+choke
+choke
+choke
+choke
+choler
+choler
+choler
+chollor
+choos
+chooser
+choos
+chooseth
+choos
+chop
+chopin
+choplog
+chopp
+chop
+chop
+choppi
+chop
+chopt
+chor
+chorist
+choru
+chose
+chosen
+chough
+chough
+chrish
+christ
+christen
+christendom
+christendom
+christen
+christen
+christian
+christianlik
+christian
+christma
+christom
+christoph
+christophero
+chronicl
+chronicl
+chronicl
+chronicl
+chronicl
+chrysolit
+chuck
+chuck
+chud
+chuff
+church
+church
+churchman
+churchmen
+churchyard
+churchyard
+churl
+churlish
+churlishli
+churl
+churn
+chu
+cicatric
+cicatric
+cice
+cicero
+cicet
+ciel
+ciitzen
+cilicia
+cimber
+cimmerian
+cinabl
+cinctur
+cinder
+cine
+cinna
+cinqu
+cipher
+cipher
+circa
+circ
+circl
+circl
+circlet
+circl
+circuit
+circum
+circumcis
+circumfer
+circummur
+circumscrib
+circumscrib
+circumscript
+circumspect
+circumst
+circumstanc
+circumst
+circumstanti
+circumv
+circumvent
+cistern
+citadel
+cital
+cite
+cite
+cite
+citi
+cite
+citizen
+citizen
+cittern
+citi
+civet
+civil
+civil
+civilli
+clack
+clad
+claim
+claim
+claim
+clamb
+clamber
+clammer
+clamor
+clamor
+clamor
+clamour
+clamour
+clang
+clangor
+clap
+clapp
+clap
+clapper
+clap
+clap
+clare
+clarenc
+claret
+claribel
+clasp
+clasp
+clatter
+claud
+claudio
+claudiu
+claus
+claw
+claw
+claw
+claw
+clai
+clai
+clean
+cleanliest
+cleanli
+clean
+cleans
+cleans
+clear
+clearer
+clearest
+clearli
+clear
+clear
+cleav
+cleav
+clef
+cleft
+cleitu
+clemenc
+clement
+cleomen
+cleopatpa
+cleopatra
+clepeth
+clept
+clerestori
+clergi
+clergyman
+clergymen
+clerk
+clerkli
+clerk
+clew
+client
+client
+cliff
+clifford
+clifford
+cliff
+clifton
+climat
+climatur
+climb
+climb
+climber
+climbeth
+climb
+climb
+clime
+cling
+clink
+clink
+clinquant
+clip
+clipp
+clipper
+clippeth
+clip
+clipt
+clitu
+clo
+cloak
+cloakbag
+cloak
+clock
+clock
+clod
+cloddi
+clodpol
+clog
+clog
+clog
+cloister
+cloistress
+cloquenc
+clo
+close
+close
+close
+close
+closer
+close
+closest
+closet
+close
+closur
+cloten
+cloten
+cloth
+clothair
+clothariu
+cloth
+cloth
+clothier
+clothier
+cloth
+cloth
+clotpol
+clotpol
+cloud
+cloud
+cloudi
+cloud
+cloudi
+clout
+clout
+clout
+cloven
+clover
+clove
+clovest
+clowder
+clown
+clownish
+clown
+cloi
+cloi
+cloi
+cloyless
+cloyment
+cloi
+club
+club
+cluck
+clung
+clust
+cluster
+clutch
+clyster
+cneiu
+cnemi
+co
+coach
+coach
+coachmak
+coact
+coactiv
+coagul
+coal
+coal
+coars
+coars
+coast
+coast
+coast
+coat
+coat
+coat
+cobbl
+cobbl
+cobbler
+cobham
+cobloaf
+cobweb
+cobweb
+cock
+cockatric
+cockatric
+cockl
+cockl
+cocknei
+cockpit
+cock
+cocksur
+coctu
+cocytu
+cod
+cod
+codl
+codpiec
+codpiec
+cod
+coelestibu
+coesar
+coeur
+coffer
+coffer
+coffin
+coffin
+cog
+cog
+cogit
+cogit
+cognit
+cogniz
+cogscomb
+cohabit
+coher
+coher
+coher
+coher
+cohort
+coif
+coign
+coil
+coin
+coinag
+coiner
+coin
+coin
+col
+colbrand
+colcho
+cold
+colder
+coldest
+coldli
+cold
+coldspur
+colebrook
+colic
+collar
+collar
+collater
+colleagu
+collect
+collect
+collect
+colleg
+colleg
+colli
+collier
+collier
+collop
+collus
+colm
+colmekil
+coloquintida
+color
+color
+colossu
+colour
+colour
+colour
+colour
+colour
+colt
+colt
+colt
+columbin
+columbin
+colvil
+com
+comagen
+comart
+comb
+combat
+combat
+combat
+combat
+combat
+combin
+combin
+combin
+combin
+combin
+combless
+combust
+come
+comedian
+comedian
+comedi
+comeli
+come
+comer
+comer
+come
+comest
+comet
+cometh
+comet
+comfect
+comfit
+comfit
+comfort
+comfort
+comfort
+comfort
+comfort
+comfortless
+comfort
+comic
+comic
+come
+come
+cominiu
+comma
+command
+command
+command
+command
+command
+command
+command
+command
+command
+comm
+commenc
+commenc
+commenc
+commenc
+commenc
+commenc
+commend
+commend
+commend
+commend
+commend
+commend
+commend
+comment
+commentari
+comment
+comment
+commerc
+commingl
+commiser
+commiss
+commission
+commiss
+commit
+commit
+committ
+commit
+commit
+commix
+commix
+commixt
+commixtur
+commodi
+commod
+commod
+common
+commonalti
+common
+common
+commonli
+common
+commonw
+commonwealth
+commot
+commot
+commun
+communicat
+commun
+commun
+commun
+commun
+comonti
+compact
+compani
+companion
+companion
+companionship
+compani
+compar
+compar
+compar
+compar
+compar
+comparison
+comparison
+compartn
+compass
+compass
+compass
+compass
+compassion
+compeer
+compel
+compel
+compel
+compel
+compel
+compens
+compet
+compet
+compet
+competitor
+competitor
+compil
+compil
+compil
+complain
+complain
+complainest
+complain
+complain
+complain
+complaint
+complaint
+complement
+complement
+complet
+complexion
+complexion
+complexion
+complic
+compli
+compliment
+compliment
+compliment
+complot
+complot
+complot
+compli
+compo
+compos
+compos
+composit
+compost
+compostur
+composur
+compound
+compound
+compound
+comprehend
+comprehend
+comprehend
+compremis
+compri
+compris
+compromi
+compromis
+compt
+comptibl
+comptrol
+compulsatori
+compuls
+compuls
+compuncti
+comput
+comrad
+comrad
+comutu
+con
+concav
+concav
+conceal
+conceal
+conceal
+conceal
+conceal
+conceal
+conceit
+conceit
+conceitless
+conceit
+conceiv
+conceiv
+conceiv
+conceiv
+conceiv
+concept
+concept
+concepti
+concern
+concern
+concerneth
+concern
+concern
+concern
+conclav
+conclud
+conclud
+conclud
+conclud
+conclud
+conclus
+conclus
+concolinel
+concord
+concubin
+concupisc
+concupi
+concur
+concur
+concur
+condemn
+condemn
+condemn
+condemn
+condemn
+condescend
+condign
+condit
+condition
+condit
+condol
+condol
+condol
+conduc
+conduct
+conduct
+conduct
+conductor
+conduit
+conduit
+conect
+conei
+confect
+confectionari
+confect
+confederaci
+confeder
+confeder
+confer
+confer
+conferr
+confer
+confess
+confess
+confess
+confesseth
+confess
+confess
+confess
+confessor
+confid
+confid
+confid
+confin
+confin
+confin
+confineless
+confin
+confin
+confin
+confirm
+confirm
+confirm
+confirm
+confirm
+confirm
+confirm
+confirm
+confirm
+confisc
+confisc
+confisc
+confix
+conflict
+conflict
+conflict
+confluenc
+conflux
+conform
+conform
+confound
+confound
+confound
+confound
+confront
+confront
+confu
+confus
+confusedli
+confus
+confus
+confut
+confut
+congeal
+congeal
+congeal
+conge
+conger
+congest
+congi
+congratul
+congre
+congreet
+congreg
+congreg
+congreg
+congreg
+congruent
+congru
+coni
+conjectur
+conjectur
+conjectur
+conjoin
+conjoin
+conjoin
+conjointli
+conjunct
+conjunct
+conjunct
+conjur
+conjur
+conjur
+conjur
+conjur
+conjur
+conjur
+conjur
+conjur
+conjuro
+conn
+connect
+conniv
+conqu
+conquer
+conquer
+conquer
+conqueror
+conqueror
+conquer
+conquest
+conquest
+conqur
+conrad
+con
+consanguin
+consanguin
+conscienc
+conscienc
+conscienc
+conscion
+consecr
+consecr
+consecr
+consent
+consent
+consent
+consent
+consequ
+consequ
+consequ
+conserv
+conserv
+conserv
+consid
+consider
+consider
+consider
+consider
+consid
+consid
+consid
+consid
+consign
+consign
+consist
+consisteth
+consist
+consistori
+consist
+consol
+consol
+conson
+conson
+consort
+consort
+consortest
+conspectu
+conspir
+conspiraci
+conspir
+conspir
+conspir
+conspir
+conspir
+conspir
+conspir
+conspir
+constabl
+constabl
+constanc
+constanc
+constanc
+constant
+constantin
+constantinopl
+constantli
+constel
+constitut
+constrain
+constrain
+constraineth
+constrain
+constraint
+constr
+construct
+constru
+consul
+consul
+consulship
+consulship
+consult
+consult
+consult
+consum
+consum
+consum
+consum
+consum
+consumm
+consumm
+consumpt
+consumpt
+contagion
+contagi
+contain
+contain
+contain
+contamin
+contamin
+contemn
+contemn
+contemn
+contemn
+contempl
+contempl
+contempl
+contempt
+contempt
+contempt
+contemptu
+contemptu
+contend
+contend
+contend
+contendon
+content
+contenta
+content
+contenteth
+content
+contenti
+contentless
+contento
+content
+contest
+contest
+contin
+contin
+contin
+contin
+continu
+continu
+continu
+continu
+continuantli
+continu
+continu
+continu
+continu
+continu
+continu
+contract
+contract
+contract
+contract
+contradict
+contradict
+contradict
+contradict
+contrari
+contrarieti
+contrarieti
+contrari
+contrari
+contrari
+contr
+contribut
+contributor
+contrit
+contriv
+contriv
+contriv
+contriv
+contriv
+contriv
+control
+control
+control
+control
+control
+control
+controversi
+contumeli
+contumeli
+contum
+contus
+conveni
+conveni
+conveni
+conveni
+conveni
+convent
+conventicl
+convent
+conver
+convers
+convers
+convers
+convers
+convers
+convers
+convers
+convers
+convert
+convert
+convertest
+convert
+convertit
+convertit
+convert
+convei
+convey
+convey
+convey
+convei
+convict
+convict
+convinc
+convinc
+convinc
+conviv
+convoc
+convoi
+convuls
+coni
+cook
+cookeri
+cook
+cool
+cool
+cool
+cool
+coop
+coop
+cop
+copatain
+cope
+cophetua
+copi
+copi
+copiou
+copper
+copperspur
+coppic
+copul
+copul
+copi
+cor
+coragio
+coral
+coram
+corambu
+coranto
+coranto
+corbo
+cord
+cord
+cordelia
+cordial
+cordi
+cord
+core
+corin
+corinth
+corinthian
+coriolanu
+corioli
+cork
+corki
+cormor
+corn
+cornelia
+corneliu
+corner
+corner
+cornerston
+cornet
+cornish
+corn
+cornuto
+cornwal
+corollari
+coron
+coron
+coronet
+coronet
+corpor
+corpor
+corpor
+corps
+corpul
+correct
+correct
+correct
+correct
+correction
+correct
+correspond
+correspond
+correspond
+correspons
+corrig
+corriv
+corriv
+corrobor
+corros
+corrupt
+corrupt
+corrupt
+corrupt
+corrupt
+corrupt
+corrupt
+corrupt
+corruptli
+corrupt
+cors
+cors
+corslet
+cosmo
+cost
+costard
+costermong
+costlier
+costli
+cost
+cot
+cote
+cote
+cotsal
+cotsol
+cotswold
+cottag
+cottag
+cotu
+couch
+couch
+couch
+couch
+coud
+cough
+cough
+could
+couldst
+coulter
+council
+councillor
+council
+counsel
+counsel
+counsellor
+counsellor
+counselor
+counselor
+counsel
+count
+count
+countenanc
+counten
+counten
+counter
+counterchang
+countercheck
+counterfeit
+counterfeit
+counterfeit
+counterfeitli
+counterfeit
+countermand
+countermand
+countermin
+counterpart
+counterpoint
+counterpoi
+counterpois
+counter
+countervail
+countess
+countess
+counti
+count
+countless
+countri
+countrv
+countri
+countryman
+countrymen
+count
+counti
+couper
+coupl
+coupl
+couplement
+coupl
+couplet
+couplet
+cour
+courag
+courag
+courag
+courag
+courier
+courier
+couronn
+cour
+cours
+cours
+courser
+courser
+cours
+cours
+court
+court
+courteou
+courteous
+courtesan
+courtesi
+courtesi
+courtezan
+courtezan
+courtier
+courtier
+courtlik
+courtli
+courtnei
+court
+courtship
+cousin
+cousin
+couterfeit
+coutum
+coven
+coven
+covent
+coventri
+cover
+cover
+cover
+coverlet
+cover
+covert
+covertli
+covertur
+covet
+covet
+covet
+covet
+covet
+covet
+covet
+covet
+cow
+coward
+coward
+cowardic
+cowardli
+coward
+cowardship
+cowish
+cowl
+cowslip
+cowslip
+cox
+coxcomb
+coxcomb
+coi
+coystril
+coz
+cozen
+cozenag
+cozen
+cozen
+cozen
+cozen
+cozier
+crab
+crab
+crab
+crack
+crack
+cracker
+cracker
+crack
+crack
+cradl
+cradl
+cradl
+craft
+craft
+crafti
+craftier
+craftili
+craft
+craftsmen
+crafti
+cram
+cramm
+cramp
+cramp
+cram
+crank
+crank
+cranmer
+cranni
+cranni
+cranni
+crant
+crare
+crash
+crassu
+crav
+crave
+crave
+craven
+craven
+crave
+craveth
+crave
+crawl
+crawl
+crawl
+craz
+craze
+crazi
+creak
+cream
+creat
+creat
+creat
+creat
+creation
+creator
+creatur
+creatur
+credenc
+credent
+credibl
+credit
+creditor
+creditor
+credo
+credul
+credul
+creed
+creek
+creek
+creep
+creep
+creep
+crept
+crescent
+cresciv
+cresset
+cressid
+cressida
+cressid
+cressi
+crest
+crest
+crestfal
+crestless
+crest
+cretan
+crete
+crevic
+crew
+crew
+crib
+cribb
+crib
+cricket
+cricket
+cri
+criedst
+crier
+cri
+criest
+crieth
+crime
+crime
+crimeless
+crime
+crimin
+crimson
+cring
+crippl
+crisp
+crisp
+crispian
+crispianu
+crispin
+critic
+critic
+critic
+croak
+croak
+croak
+crocodil
+cromer
+cromwel
+crone
+crook
+crookback
+crook
+crook
+crop
+cropp
+crosbi
+cross
+cross
+cross
+crossest
+cross
+cross
+crossli
+cross
+crost
+crotchet
+crouch
+crouch
+crow
+crowd
+crowd
+crowd
+crowd
+crowflow
+crow
+crowkeep
+crown
+crown
+crowner
+crownet
+crownet
+crown
+crown
+crow
+crudi
+cruel
+cruell
+crueller
+cruelli
+cruel
+cruelti
+crum
+crumbl
+crumb
+crupper
+crusado
+crush
+crush
+crushest
+crush
+crust
+crust
+crusti
+crutch
+crutch
+cry
+cry
+crystal
+crystallin
+crystal
+cub
+cubbert
+cubiculo
+cubit
+cub
+cuckold
+cuckoldli
+cuckold
+cuckoo
+cucullu
+cudgel
+cudgel
+cudgel
+cudgel
+cudgel
+cue
+cue
+cuff
+cuff
+cuiqu
+cull
+cull
+cullion
+cullionli
+cullion
+culpabl
+culverin
+cum
+cumber
+cumberland
+cun
+cunningli
+cun
+cuor
+cup
+cupbear
+cupboard
+cupid
+cupid
+cuppel
+cup
+cur
+curan
+curat
+curb
+curb
+curb
+curb
+curd
+curdi
+curd
+cure
+cure
+cureless
+curer
+cure
+curfew
+cure
+curio
+curios
+curiou
+curious
+curl
+curl
+curl
+curl
+curranc
+currant
+current
+current
+currish
+curri
+cur
+curs
+curs
+curs
+cursi
+curs
+cursorari
+curst
+curster
+curstest
+curst
+cursi
+curtail
+curtain
+curtain
+curtal
+curti
+curtl
+curtsi
+curtsi
+curtsi
+curvet
+curvet
+cush
+cushion
+cushion
+custalorum
+custard
+custodi
+custom
+customari
+custom
+custom
+custom
+custom
+custur
+cut
+cutler
+cutpurs
+cutpurs
+cut
+cutter
+cut
+cuttl
+cxsar
+cyclop
+cydnu
+cygnet
+cygnet
+cym
+cymbal
+cymbelin
+cyme
+cynic
+cynthia
+cypress
+cypriot
+cypru
+cyru
+cytherea
+d
+dabbl
+dace
+dad
+daedalu
+daemon
+daff
+daf
+daffest
+daffodil
+dagger
+dagger
+dagonet
+daili
+daintier
+dainti
+daintiest
+daintili
+dainti
+daintri
+dainti
+daisi
+daisi
+daisi
+dale
+dallianc
+dalli
+dalli
+dalli
+dalli
+dalmatian
+dam
+damag
+damascu
+damask
+damask
+dame
+dame
+damm
+damn
+damnabl
+damnabl
+damnat
+damn
+damn
+damoisel
+damon
+damosella
+damp
+dam
+damsel
+damson
+dan
+danc
+danc
+dancer
+danc
+danc
+dandl
+dandi
+dane
+dang
+danger
+danger
+danger
+danger
+dangl
+daniel
+danish
+dank
+dankish
+dansker
+daphn
+dappl
+dappl
+dar
+dardan
+dardanian
+dardaniu
+dare
+dare
+dare
+dare
+darest
+dare
+dariu
+dark
+darken
+darken
+darken
+darker
+darkest
+darkl
+darkli
+dark
+darl
+darl
+darnel
+darraign
+dart
+dart
+darter
+dartford
+dart
+dart
+dash
+dash
+dash
+dastard
+dastard
+dat
+datchet
+date
+date
+dateless
+date
+daub
+daughter
+daughter
+daunt
+daunt
+dauntless
+dauphin
+daventri
+davi
+daw
+dawn
+dawn
+daw
+dai
+daylight
+dai
+dazzl
+dazzl
+dazzl
+de
+dead
+deadli
+deaf
+deaf
+deaf
+deaf
+deal
+dealer
+dealer
+dealest
+deal
+deal
+deal
+dealt
+dean
+deaneri
+dear
+dearer
+dearest
+dearli
+dear
+dear
+dearth
+dearth
+death
+deathb
+death
+death
+deathsman
+deathsmen
+debar
+debas
+debat
+debat
+debat
+debateth
+debat
+debauch
+debil
+debil
+debitor
+debonair
+deborah
+debosh
+debt
+debt
+debtor
+debtor
+debt
+debuti
+decai
+decai
+decay
+decai
+decai
+decea
+deceas
+deceas
+deceit
+deceit
+deceit
+deceiv
+deceiv
+deceiv
+deceiv
+deceiv
+deceiv
+deceiv
+deceivest
+deceiveth
+deceiv
+decemb
+decent
+decepti
+decern
+decid
+decid
+decim
+deciph
+deciph
+decis
+deciu
+deck
+deck
+deck
+deckt
+declar
+declar
+declens
+declens
+declin
+declin
+declin
+declin
+declin
+decoct
+decorum
+decrea
+decreas
+decreas
+decre
+decre
+decre
+decrepit
+dedic
+dedic
+dedic
+dedic
+deed
+deedless
+deed
+deem
+deem
+deep
+deeper
+deepest
+deepli
+deep
+deepvow
+deer
+deess
+defac
+defac
+defac
+defac
+defac
+defac
+defam
+default
+defeat
+defeat
+defeat
+defeatur
+defect
+defect
+defect
+defenc
+defenc
+defend
+defend
+defend
+defend
+defend
+defend
+defend
+defens
+defens
+defens
+defer
+deferr
+defianc
+defici
+defi
+defi
+defil
+defil
+defil
+defil
+defil
+defin
+defin
+definit
+definit
+definit
+deflow
+deflow
+deflow
+deform
+deform
+deform
+deform
+deftli
+defunct
+defunct
+defus
+defi
+defi
+degener
+degrad
+degre
+degre
+deifi
+deifi
+deign
+deign
+deiphobu
+deiti
+deiti
+deja
+deject
+deject
+delabreth
+delai
+delai
+delai
+delai
+delect
+deliber
+delic
+delic
+delici
+delici
+delight
+delight
+delight
+delight
+delinqu
+deliv
+deliv
+deliver
+deliv
+deliv
+deliv
+deliveri
+delpho
+delud
+delud
+delug
+delv
+delver
+delv
+demand
+demand
+demand
+demand
+demean
+demeanor
+demeanour
+demerit
+demesn
+demetriu
+demi
+demigod
+demis
+demoisel
+demon
+demonstr
+demonstr
+demonstr
+demonstr
+demonstr
+demonstr
+demur
+demur
+demur
+den
+denai
+deni
+denial
+denial
+deni
+denier
+deni
+deniest
+deni
+denmark
+denni
+denni
+denot
+denot
+denot
+denounc
+denounc
+denounc
+den
+denunci
+deni
+deni
+deo
+depart
+depart
+departest
+depart
+departur
+depech
+depend
+depend
+depend
+depend
+depend
+depend
+depend
+depend
+depend
+depend
+depend
+depend
+deplor
+deplor
+depopul
+depo
+depos
+depos
+depos
+depositari
+deprav
+deprav
+deprav
+deprav
+deprav
+depress
+depriv
+depriv
+depth
+depth
+deput
+deput
+deput
+deputi
+deput
+deputi
+deracin
+derbi
+derceta
+dere
+derid
+deris
+deriv
+deriv
+deriv
+deriv
+deriv
+deriv
+derog
+derog
+derog
+de
+desartless
+descant
+descend
+descend
+descend
+descend
+descens
+descent
+descent
+describ
+describ
+describ
+descri
+descript
+descript
+descri
+desdemon
+desdemona
+desert
+desert
+deserv
+deserv
+deserv
+deservedli
+deserv
+deserv
+deserv
+deservest
+deserv
+deserv
+design
+design
+design
+design
+desir
+desir
+desir
+desir
+desir
+desirest
+desir
+desir
+desist
+desk
+desol
+desol
+desp
+despair
+despair
+despair
+despatch
+desper
+desper
+desper
+despi
+despis
+despis
+despis
+despiseth
+despis
+despit
+despit
+despoil
+dest
+destin
+destin
+destini
+destini
+destitut
+destroi
+destroi
+destroy
+destroy
+destroi
+destroi
+destruct
+destruct
+det
+detain
+detain
+detect
+detect
+detect
+detect
+detector
+detect
+detent
+determin
+determin
+determin
+determin
+determin
+determin
+determin
+detest
+detest
+detest
+detest
+detest
+detract
+detract
+detract
+deucalion
+deuc
+deum
+deux
+devant
+devest
+devic
+devic
+devil
+devilish
+devil
+devi
+devis
+devis
+devis
+devis
+devoid
+devonshir
+devot
+devot
+devot
+devour
+devour
+devour
+devour
+devour
+devout
+devoutli
+dew
+dewberri
+dewdrop
+dewlap
+dewlapp
+dew
+dewi
+dexter
+dexteri
+dexter
+di
+diabl
+diablo
+diadem
+dial
+dialect
+dialogu
+dialogu
+dial
+diamet
+diamond
+diamond
+dian
+diana
+diaper
+dibbl
+dic
+dice
+dicer
+dich
+dick
+dicken
+dickon
+dicki
+dictat
+diction
+dictynna
+did
+diddl
+didest
+dido
+didst
+die
+di
+diedst
+di
+diest
+diet
+diet
+dieter
+dieu
+diff
+differ
+differ
+differ
+differ
+differ
+differ
+differ
+difficil
+difficult
+difficulti
+difficulti
+diffid
+diffid
+diffu
+diffus
+diffusest
+dig
+digest
+digest
+digest
+digest
+digg
+dig
+dighton
+dignifi
+dignifi
+dignifi
+digniti
+digniti
+digress
+digress
+digress
+dig
+digt
+dilat
+dilat
+dilat
+dilatori
+dild
+dildo
+dilemma
+dilemma
+dilig
+dilig
+diluculo
+dim
+dimens
+dimens
+diminish
+diminish
+diminut
+diminut
+diminut
+dimm
+dim
+dim
+dimpl
+dimpl
+dim
+din
+dine
+dine
+diner
+dine
+ding
+dine
+dinner
+dinner
+dinnertim
+dint
+diom
+diomed
+diomed
+dion
+dip
+dipp
+dip
+dip
+dir
+dire
+direct
+direct
+direct
+direct
+direct
+directitud
+direct
+directli
+direct
+dire
+dire
+direst
+dirg
+dirg
+dirt
+dirti
+di
+disabl
+disabl
+disabl
+disabl
+disadvantag
+disagre
+disallow
+disanim
+disannul
+disannul
+disappoint
+disarm
+disarm
+disarmeth
+disarm
+disast
+disast
+disastr
+disbench
+disbranch
+disburden
+disbur
+disburs
+disburs
+discandi
+discandi
+discard
+discard
+discas
+discas
+discern
+discern
+discern
+discern
+discern
+discharg
+discharg
+discharg
+discharg
+discipl
+discipl
+disciplin
+disciplin
+disciplin
+disciplin
+disclaim
+disclaim
+disclaim
+disclo
+disclos
+disclos
+disclos
+discolour
+discolour
+discolour
+discomfit
+discomfit
+discomfitur
+discomfort
+discomfort
+discommend
+disconsol
+discont
+discont
+discontentedli
+discont
+discont
+discontinu
+discontinu
+discord
+discord
+discord
+discours
+discours
+discours
+discours
+discours
+discourtesi
+discov
+discov
+discov
+discover
+discoveri
+discov
+discov
+discoveri
+discredit
+discredit
+discredit
+discreet
+discreetli
+discret
+discret
+discuss
+disdain
+disdain
+disdaineth
+disdain
+disdainfulli
+disdain
+disdain
+disdnguish
+disea
+diseas
+diseas
+diseas
+disedg
+disembark
+disfigur
+disfigur
+disfurnish
+disgorg
+disgrac
+disgrac
+disgrac
+disgrac
+disgrac
+disgrac
+disgraci
+disgui
+disguis
+disguis
+disguis
+disguis
+disguis
+dish
+dishabit
+dishclout
+dishearten
+dishearten
+dish
+dishonest
+dishonestli
+dishonesti
+dishonor
+dishonor
+dishonor
+dishonour
+dishonour
+dishonour
+dishonour
+disinherit
+disinherit
+disjoin
+disjoin
+disjoin
+disjoint
+disjunct
+dislik
+dislik
+disliken
+dislik
+dislimn
+disloc
+dislodg
+disloy
+disloyalti
+dismal
+dismantl
+dismantl
+dismask
+dismai
+dismai
+dismemb
+dismemb
+dism
+dismiss
+dismiss
+dismiss
+dismiss
+dismount
+dismount
+disnatur
+disobedi
+disobedi
+disobei
+disobei
+disorb
+disord
+disord
+disorderli
+disord
+disparag
+disparag
+disparag
+dispark
+dispatch
+dispens
+dispens
+dispens
+disper
+dispers
+dispers
+dispersedli
+dispers
+dispit
+displac
+displac
+displac
+displant
+displant
+displai
+displai
+displea
+displeas
+displeas
+displeas
+displeasur
+displeasur
+dispong
+disport
+disport
+dispo
+dispos
+dispos
+dispos
+dispos
+disposit
+disposit
+dispossess
+dispossess
+disprai
+disprais
+disprais
+dispraisingli
+disproperti
+disproport
+disproport
+disprov
+disprov
+disprov
+dispurs
+disput
+disput
+disput
+disput
+disput
+disput
+disput
+disquant
+disquiet
+disquietli
+disrelish
+disrob
+disseat
+dissembl
+dissembl
+dissembl
+dissembl
+dissembl
+dissembl
+dissens
+dissens
+dissenti
+dissev
+dissip
+dissolut
+dissolut
+dissolut
+dissolut
+dissolv
+dissolv
+dissolv
+dissolv
+dissuad
+dissuad
+distaff
+distaff
+distain
+distain
+distanc
+distant
+distast
+distast
+distast
+distemp
+distemp
+distemperatur
+distemperatur
+distemp
+distemp
+distil
+distil
+distil
+distil
+distil
+distil
+distinct
+distinct
+distinctli
+distingu
+distinguish
+distinguish
+distinguish
+distract
+distract
+distractedli
+distract
+distract
+distract
+distrain
+distraught
+distress
+distress
+distress
+distress
+distribut
+distribut
+distribut
+distrust
+distrust
+disturb
+disturb
+disturb
+disturb
+disunit
+disvalu
+disvouch
+dit
+ditch
+ditcher
+ditch
+dite
+ditti
+ditti
+diurnal
+div
+dive
+diver
+diver
+divers
+divers
+divert
+divert
+divert
+dive
+divest
+divid
+divid
+divid
+divid
+divid
+divideth
+divin
+divin
+divin
+divin
+divin
+divin
+divin
+divinest
+divin
+divin
+divis
+divis
+divorc
+divorc
+divorc
+divorc
+divorc
+divulg
+divulg
+divulg
+divulg
+dizi
+dizzi
+do
+doat
+dobbin
+dock
+dock
+doct
+doctor
+doctor
+doctrin
+document
+dodg
+doe
+doer
+doer
+doe
+doest
+doff
+dog
+dogberri
+dogfish
+dogg
+dog
+dog
+doigt
+do
+do
+doit
+doit
+dolabella
+dole
+dole
+doll
+dollar
+dollar
+dolor
+dolor
+dolour
+dolour
+dolphin
+dolt
+dolt
+domest
+domest
+domin
+domin
+domin
+domin
+domin
+domin
+domin
+dominion
+dominion
+domitiu
+dommelton
+don
+donalbain
+donat
+donc
+doncast
+done
+dong
+donn
+donn
+donner
+donnerai
+doom
+doomsdai
+door
+doorkeep
+door
+dorca
+doreu
+doricl
+dormous
+dorothi
+dorset
+dorsetshir
+dost
+dotag
+dotant
+dotard
+dotard
+dote
+dote
+doter
+dote
+doteth
+doth
+dote
+doubl
+doubl
+doubl
+doubler
+doublet
+doublet
+doubl
+doubli
+doubt
+doubt
+doubt
+doubtfulli
+doubt
+doubtless
+doubt
+doug
+dough
+doughti
+doughi
+dougla
+dout
+dout
+dout
+dove
+dovehous
+dover
+dove
+dow
+dowag
+dowdi
+dower
+dowerless
+dower
+dowla
+dowl
+down
+downfal
+downright
+down
+downstair
+downtrod
+downward
+downward
+downi
+dowri
+dowri
+dowsabel
+doxi
+doze
+dozen
+dozen
+dozi
+drab
+drab
+drab
+drachma
+drachma
+draff
+drag
+dragg
+drag
+drag
+dragon
+dragonish
+dragon
+drain
+drain
+drain
+drake
+dram
+dramati
+drank
+draught
+draught
+drave
+draw
+drawbridg
+drawer
+drawer
+draweth
+draw
+drawl
+drawn
+draw
+drayman
+draymen
+dread
+dread
+dread
+dreadfulli
+dread
+dread
+dream
+dreamer
+dreamer
+dream
+dream
+dreamt
+drearn
+dreari
+dreg
+dreg
+drench
+drench
+dress
+dress
+dresser
+dress
+dress
+drest
+drew
+dribbl
+dri
+drier
+dri
+drift
+drili
+drink
+drinketh
+drink
+drink
+drink
+driv
+drive
+drivel
+driven
+drive
+driveth
+drive
+drizzl
+drizzl
+drizzl
+droit
+drolleri
+dromio
+dromio
+drone
+drone
+droop
+droopeth
+droop
+droop
+drop
+dropheir
+droplet
+dropp
+dropper
+droppeth
+drop
+drop
+drop
+dropsi
+dropsi
+dropsi
+dropt
+dross
+drossi
+drought
+drove
+droven
+drovier
+drown
+drown
+drown
+drown
+drow
+drows
+drowsili
+drowsi
+drowsi
+drudg
+drudgeri
+drudg
+drug
+drugg
+drug
+drum
+drumbl
+drummer
+drum
+drum
+drunk
+drunkard
+drunkard
+drunken
+drunkenli
+drunken
+dry
+dryness
+dst
+du
+dub
+dubb
+ducat
+ducat
+ducdam
+duchess
+duchi
+duchi
+duck
+duck
+duck
+dudgeon
+due
+duellist
+duello
+duer
+due
+duff
+dug
+dug
+duke
+dukedom
+dukedom
+duke
+dulcet
+dulch
+dull
+dullard
+duller
+dullest
+dull
+dull
+dull
+dulli
+dul
+duli
+dumain
+dumb
+dumb
+dumbl
+dumb
+dump
+dump
+dun
+duncan
+dung
+dungeon
+dungeon
+dunghil
+dunghil
+dungi
+dunnest
+dunsinan
+dunsmor
+dunstabl
+dupp
+duranc
+dure
+durst
+duski
+dust
+dust
+dusti
+dutch
+dutchman
+duteou
+duti
+duti
+duti
+dwarf
+dwarfish
+dwell
+dweller
+dwell
+dwell
+dwelt
+dwindl
+dy
+dye
+dy
+dyer
+dy
+e
+each
+eager
+eagerli
+eager
+eagl
+eagl
+ean
+eanl
+ear
+ear
+earl
+earldom
+earlier
+earliest
+earli
+earl
+earli
+earn
+earn
+earnest
+earnestli
+earnest
+earn
+ear
+earth
+earthen
+earthlier
+earthli
+earthquak
+earthquak
+earthi
+ea
+eas
+eas
+eas
+eas
+easier
+easiest
+easiliest
+easili
+easi
+eas
+east
+eastcheap
+easter
+eastern
+eastward
+easi
+eat
+eaten
+eater
+eater
+eat
+eat
+eaux
+eav
+ebb
+eb
+ebb
+ebon
+eboni
+ebrew
+ecc
+echapp
+echo
+echo
+eclip
+eclips
+eclips
+ecoli
+ecoutez
+ecstaci
+ecstasi
+ecstasi
+ecu
+eden
+edg
+edgar
+edg
+edg
+edgeless
+edg
+edict
+edict
+edific
+edific
+edifi
+edifi
+edit
+edm
+edmund
+edmund
+edmundsburi
+educ
+educ
+educ
+edward
+eel
+eel
+effect
+effect
+effectless
+effect
+effectu
+effectu
+effemin
+effigi
+effu
+effus
+effus
+eftest
+egal
+egal
+eget
+egeu
+egg
+egg
+eggshel
+eglamour
+eglantin
+egma
+ego
+egregi
+egregi
+egress
+egypt
+egyptian
+egyptian
+eie
+eight
+eighteen
+eighth
+eightpenni
+eighti
+eisel
+either
+eject
+ek
+el
+elb
+elbow
+elbow
+eld
+elder
+elder
+eldest
+eleanor
+elect
+elect
+elect
+eleg
+elegi
+element
+element
+eleph
+eleph
+elev
+eleven
+eleventh
+elf
+elflock
+eliad
+elinor
+elizabeth
+ell
+ell
+ellen
+elm
+eloqu
+eloqu
+els
+elsewher
+elsinor
+eltham
+elv
+elvish
+eli
+elysium
+em
+embal
+embalm
+embalm
+embark
+embark
+embarqu
+embassad
+embassag
+embassi
+embassi
+embattail
+embattl
+embattl
+embai
+embellish
+ember
+emblaz
+emblem
+emblem
+embodi
+embold
+embolden
+emboss
+emboss
+embound
+embowel
+embowel
+embrac
+embrac
+embrac
+embrac
+embrac
+embrac
+embrac
+embrasur
+embroid
+embroideri
+emhrac
+emilia
+emin
+emin
+emin
+emmanuel
+emniti
+empal
+emper
+emperess
+emperi
+emperor
+emperi
+emphasi
+empir
+empir
+empiricut
+empleach
+emploi
+emploi
+employ
+employ
+employ
+empoison
+empress
+empti
+emptier
+empti
+empti
+empti
+empti
+emul
+emul
+emul
+emul
+emul
+en
+enact
+enact
+enact
+enactur
+enamel
+enamel
+enamour
+enamour
+enanmour
+encamp
+encamp
+encav
+enceladu
+enchaf
+enchaf
+enchant
+enchant
+enchant
+enchantingli
+enchant
+enchantress
+enchant
+encha
+encircl
+encircl
+enclo
+enclos
+enclos
+enclos
+encloseth
+enclos
+encloud
+encompass
+encompass
+encompasseth
+encompass
+encor
+encorpor
+encount
+encount
+encount
+encount
+encourag
+encourag
+encourag
+encrimson
+encroach
+encumb
+end
+endamag
+endamag
+endang
+endart
+endear
+endear
+endeavour
+endeavour
+end
+ender
+end
+end
+endit
+endless
+endow
+endow
+endow
+endow
+end
+endu
+endu
+endur
+endur
+endur
+endur
+endur
+endur
+endymion
+enea
+enemi
+enemi
+enerni
+enew
+enfeebl
+enfeebl
+enfeoff
+enfett
+enfold
+enforc
+enforc
+enforc
+enforcedli
+enforc
+enforc
+enforcest
+enfranch
+enfranchi
+enfranchis
+enfranchis
+enfranchis
+enfre
+enfreedom
+engag
+engag
+engag
+engag
+engag
+engaol
+engend
+engend
+engend
+engild
+engin
+engin
+engin
+engin
+engirt
+england
+english
+englishman
+englishmen
+englut
+englut
+engraf
+engraft
+engraft
+engrav
+engrav
+engross
+engross
+engrossest
+engross
+engross
+enguard
+enigma
+enigmat
+enjoin
+enjoin
+enjoi
+enjoi
+enjoy
+enjoi
+enjoi
+enkindl
+enkindl
+enlard
+enlarg
+enlarg
+enlarg
+enlarg
+enlargeth
+enlighten
+enlink
+enmesh
+enmiti
+enmiti
+ennobl
+ennobl
+enobarb
+enobarbu
+enon
+enorm
+enorm
+enough
+enow
+enpatron
+enpierc
+enquir
+enquir
+enquir
+enrag
+enrag
+enrag
+enrag
+enrank
+enrapt
+enrich
+enrich
+enrich
+enridg
+enr
+enrob
+enrob
+enrol
+enrol
+enroot
+enround
+enschedul
+ensconc
+ensconc
+enseam
+ensear
+enseign
+enseignez
+ensembl
+enshelt
+enshield
+enshrin
+ensign
+ensign
+enski
+ensman
+ensnar
+ensnar
+ensnareth
+ensteep
+ensu
+ensu
+ensu
+ensu
+ensu
+enswath
+ent
+entail
+entam
+entangl
+entangl
+entendr
+enter
+enter
+enter
+enterpris
+enterpris
+enter
+entertain
+entertain
+entertain
+entertain
+entertain
+entertain
+enthral
+enthral
+enthron
+enthron
+entic
+entic
+entic
+entir
+entir
+entitl
+entitl
+entitl
+entomb
+entomb
+entrail
+entranc
+entranc
+entrap
+entrapp
+entr
+entreat
+entreat
+entreati
+entreat
+entreat
+entreat
+entreati
+entrench
+entri
+entwist
+envelop
+envenom
+envenom
+envenom
+envi
+envi
+enviou
+envious
+environ
+environ
+envoi
+envi
+envi
+enwheel
+enwomb
+enwrap
+ephesian
+ephesian
+ephesu
+epicur
+epicurean
+epicur
+epicur
+epicuru
+epidamnum
+epidauru
+epigram
+epilepsi
+epilept
+epilogu
+epilogu
+epistl
+epistrophu
+epitaph
+epitaph
+epithet
+epitheton
+epithet
+epitom
+equal
+equal
+equal
+equal
+equal
+equal
+equal
+equinocti
+equinox
+equipag
+equiti
+equivoc
+equivoc
+equivoc
+equivoc
+equivoc
+er
+erbear
+erbear
+erbear
+erbeat
+erblow
+erboard
+erborn
+ercam
+ercast
+ercharg
+ercharg
+ercharg
+ercl
+ercom
+ercov
+ercrow
+erdo
+er
+erebu
+erect
+erect
+erect
+erect
+erect
+erewhil
+erflourish
+erflow
+erflow
+erflow
+erfraught
+erga
+ergal
+erglanc
+ergo
+ergon
+ergrow
+ergrown
+ergrowth
+erhang
+erhang
+erhasti
+erhear
+erheard
+eringo
+erjoi
+erleap
+erleap
+erleaven
+erlook
+erlook
+ermast
+ermengar
+ermount
+ern
+ernight
+ero
+erpaid
+erpart
+erpast
+erpai
+erpeer
+erperch
+erpictur
+erpingham
+erpost
+erpow
+erpress
+erpress
+err
+errand
+errand
+errant
+errat
+erraught
+erreach
+er
+errest
+er
+erron
+error
+error
+err
+errul
+errun
+erset
+ershad
+ershad
+ershin
+ershot
+ersiz
+erskip
+erslip
+erspread
+erst
+erstar
+erstep
+erstunk
+erswai
+erswai
+erswel
+erta
+ertak
+erteem
+erthrow
+erthrown
+erthrow
+ertook
+ertop
+ertop
+ertrip
+erturn
+erudit
+erupt
+erupt
+ervalu
+erwalk
+erwatch
+erween
+erween
+erweigh
+erweigh
+erwhelm
+erwhelm
+erworn
+es
+escalu
+escap
+escap
+escap
+escap
+eschew
+escot
+esil
+especi
+especi
+esper
+espial
+espi
+espi
+espou
+espous
+espi
+esquir
+esquir
+essai
+essai
+essenc
+essenti
+essenti
+ess
+essex
+est
+establish
+establish
+estat
+estat
+esteem
+esteem
+esteemeth
+esteem
+esteem
+estim
+estim
+estim
+estim
+estim
+estrang
+estridg
+estridg
+et
+etc
+etcetera
+et
+etern
+etern
+etern
+etern
+eterniz
+et
+ethiop
+ethiop
+ethiop
+ethiopian
+etna
+eton
+etr
+eunuch
+eunuch
+euphrat
+euphroniu
+euriphil
+europa
+europ
+ev
+evad
+evad
+evan
+evas
+evas
+ev
+even
+even
+evenli
+event
+event
+event
+ever
+everlast
+everlastingli
+evermor
+everi
+everyon
+everyth
+everywher
+evid
+evid
+evid
+evil
+evilli
+evil
+evit
+ew
+ewer
+ewer
+ew
+exact
+exact
+exactest
+exact
+exact
+exact
+exactli
+exact
+exalt
+exalt
+examin
+examin
+examin
+examin
+examin
+examin
+exampl
+exampl
+exampl
+exampl
+exasper
+exasper
+exce
+exceed
+exceedeth
+exceed
+exceedingli
+exce
+excel
+excel
+excel
+excel
+excel
+excel
+excel
+excel
+excel
+except
+except
+except
+except
+except
+exceptless
+excess
+excess
+exchang
+exchang
+exchang
+exchequ
+exchequ
+excit
+excit
+excit
+excit
+exclaim
+exclaim
+exclam
+exclam
+exclud
+excommun
+excommun
+excrement
+excrement
+excurs
+excurs
+excu
+excus
+excus
+excus
+excus
+excusez
+excus
+execr
+execr
+execut
+execut
+execut
+execut
+execution
+execution
+executor
+executor
+exempt
+exempt
+exequi
+exercis
+exercis
+exet
+exeunt
+exhal
+exhal
+exhal
+exhal
+exhal
+exhaust
+exhibit
+exhibit
+exhibit
+exhort
+exhort
+exig
+exil
+exil
+exil
+exion
+exist
+exist
+exit
+exit
+exorcis
+exorc
+exorcist
+expect
+expect
+expect
+expect
+expect
+expect
+expect
+expect
+expect
+expedi
+expedi
+expedi
+expedit
+expediti
+expel
+expel
+expel
+expel
+expend
+expens
+expens
+experienc
+experi
+experi
+experi
+experiment
+experi
+expert
+expert
+expiat
+expiat
+expir
+expir
+expir
+expir
+expir
+expir
+explic
+exploit
+exploit
+expo
+expos
+expos
+exposit
+expositor
+expostul
+expostul
+expostur
+exposur
+expound
+expound
+express
+express
+expresseth
+express
+express
+expressli
+expressur
+expul
+expuls
+exquisit
+exsuffl
+extant
+extempor
+extempor
+extempor
+extend
+extend
+extend
+extent
+extenu
+extenu
+extenu
+extenu
+exterior
+exteriorli
+exterior
+extermin
+extern
+extern
+extinct
+extinct
+extinctur
+extinguish
+extirp
+extirp
+extirp
+extol
+extol
+extol
+exton
+extort
+extort
+extort
+extort
+extra
+extract
+extract
+extract
+extraordinarili
+extraordinari
+extraught
+extravag
+extravag
+extrem
+extrem
+extrem
+extremest
+extrem
+extrem
+exuent
+exult
+exult
+ey
+eya
+eyas
+ey
+eyebal
+eyebal
+eyebrow
+eyebrow
+ei
+eyeless
+eyelid
+eyelid
+ey
+eyesight
+eyestr
+ei
+eyn
+eyri
+fa
+fabian
+fabl
+fabl
+fabric
+fabul
+fac
+face
+face
+facer
+face
+faciant
+facil
+facil
+facineri
+face
+facit
+fact
+faction
+factionari
+faction
+factiou
+factor
+factor
+faculti
+faculti
+fade
+fade
+fadeth
+fadg
+fade
+fade
+fadom
+fadom
+fagot
+fagot
+fail
+fail
+fail
+fain
+faint
+faint
+fainter
+faint
+faintli
+faint
+faint
+fair
+fairer
+fairest
+fairi
+fair
+fair
+fairli
+fair
+fair
+fairwel
+fairi
+fai
+fait
+fait
+faith
+faith
+faithful
+faithfulli
+faithless
+faith
+faitor
+fal
+falchion
+falcon
+falconbridg
+falcon
+falcon
+fall
+fallaci
+fallen
+falleth
+falliabl
+fallibl
+fall
+fallow
+fallow
+fall
+falli
+falor
+fals
+falsehood
+fals
+fals
+falser
+falsifi
+fals
+falstaff
+falstaff
+falter
+fam
+fame
+fame
+familiar
+familiar
+familiarli
+familiar
+famili
+famin
+famish
+famish
+famou
+famous
+famous
+fan
+fanat
+fanci
+fanci
+fane
+fane
+fang
+fangl
+fangless
+fang
+fann
+fan
+fan
+fantasi
+fantasi
+fantast
+fantast
+fantast
+fantastico
+fantasi
+fap
+far
+farborough
+farc
+fardel
+fardel
+fare
+fare
+farewel
+farewel
+farin
+fare
+farm
+farmer
+farmhous
+farm
+farr
+farrow
+farther
+farthest
+farth
+farthingal
+farthingal
+farth
+fartuou
+fa
+fashion
+fashion
+fashion
+fashion
+fast
+fast
+fasten
+fasten
+faster
+fastest
+fast
+fastli
+fastolf
+fast
+fat
+fatal
+fatal
+fate
+fate
+fate
+father
+father
+fatherless
+fatherli
+father
+fathom
+fathomless
+fathom
+fatig
+fat
+fat
+fat
+fatter
+fattest
+fat
+fatuu
+fauconbridg
+faulconbridg
+fault
+faulti
+faultless
+fault
+faulti
+fauss
+faust
+faustus
+faut
+favor
+favor
+favor
+favor
+favour
+favour
+favour
+favouredli
+favour
+favour
+favour
+favourit
+favourit
+favour
+favout
+fawn
+fawneth
+fawn
+fawn
+fai
+fe
+fealti
+fear
+fear
+fearest
+fear
+fearful
+fearfulli
+fear
+fear
+fearless
+fear
+feast
+feast
+feast
+feast
+feat
+feat
+feater
+feather
+feather
+feather
+featli
+feat
+featur
+featur
+featur
+featureless
+featur
+februari
+feck
+fed
+fedari
+federari
+fee
+feebl
+feebl
+feebl
+feebl
+feebli
+feed
+feeder
+feeder
+feedeth
+feed
+feed
+feel
+feeler
+feel
+feelingli
+feel
+fee
+feet
+fehement
+feign
+feign
+feign
+feil
+feith
+felicit
+felic
+fell
+fellest
+felli
+fellow
+fellowli
+fellow
+fellowship
+fellowship
+fell
+felon
+feloni
+feloni
+felt
+femal
+femal
+feminin
+fen
+fenc
+fenc
+fencer
+fenc
+fend
+fennel
+fenni
+fen
+fenton
+fer
+ferdinand
+fere
+fernse
+ferrara
+ferrer
+ferret
+ferri
+ferryman
+fertil
+fertil
+fervenc
+fervour
+feri
+fest
+fest
+fester
+festin
+festin
+festiv
+festiv
+fet
+fetch
+fetch
+fetch
+fetlock
+fetlock
+fett
+fetter
+fetter
+fetter
+fettl
+feu
+feud
+fever
+fever
+fever
+few
+fewer
+fewest
+few
+fickl
+fickl
+fico
+fiction
+fiddl
+fiddler
+fiddlestick
+fidel
+fidelicet
+fidel
+fidiu
+fie
+field
+field
+field
+fiend
+fiend
+fierc
+fierc
+fierc
+fieri
+fife
+fife
+fifteen
+fifteen
+fifteenth
+fifth
+fifti
+fiftyfold
+fig
+fight
+fighter
+fightest
+fighteth
+fight
+fight
+figo
+fig
+figur
+figur
+figur
+figur
+figur
+fike
+fil
+filbert
+filch
+filch
+filch
+file
+file
+file
+filial
+filiu
+fill
+fill
+fillet
+fill
+fillip
+fill
+filli
+film
+fil
+filth
+filth
+filthi
+fin
+final
+finch
+find
+finder
+findeth
+find
+find
+find
+fine
+fineless
+fine
+finem
+fine
+finer
+fine
+finest
+fing
+finger
+finger
+finger
+fingr
+fingr
+finic
+finish
+finish
+finish
+finless
+finn
+fin
+finsburi
+fir
+firago
+fire
+firebrand
+firebrand
+fire
+fire
+firework
+firework
+fire
+firk
+firm
+firmament
+firmli
+firm
+first
+firstl
+fish
+fisher
+fishermen
+fisher
+fish
+fishifi
+fishmong
+fishpond
+fisnomi
+fist
+fist
+fist
+fistula
+fit
+fitchew
+fit
+fitli
+fitment
+fit
+fit
+fit
+fitter
+fittest
+fitteth
+fit
+fitzwat
+five
+fivep
+five
+fix
+fix
+fix
+fixeth
+fix
+fixtur
+fl
+flag
+flag
+flagon
+flagon
+flag
+flail
+flake
+flaki
+flam
+flame
+flamen
+flamen
+flame
+flame
+flaminiu
+flander
+flannel
+flap
+flare
+flash
+flash
+flash
+flask
+flat
+flatli
+flat
+flat
+flatt
+flatter
+flatter
+flatter
+flatter
+flatterest
+flatteri
+flatter
+flatter
+flatteri
+flaunt
+flavio
+flaviu
+flaw
+flaw
+flax
+flaxen
+flai
+flai
+flea
+fleanc
+flea
+fleck
+fled
+fledg
+flee
+fleec
+fleec
+fleec
+fleer
+fleer
+fleer
+fleet
+fleeter
+fleet
+fleme
+flemish
+flesh
+flesh
+fleshli
+fleshment
+fleshmong
+flew
+flexibl
+flexur
+flibbertigibbet
+flicker
+flidg
+flier
+fli
+flieth
+flight
+flight
+flighti
+flinch
+fling
+flint
+flint
+flinti
+flirt
+float
+float
+float
+flock
+flock
+flood
+floodgat
+flood
+floor
+flora
+florenc
+florentin
+florentin
+florentiu
+florizel
+flote
+floulish
+flour
+flourish
+flourish
+flourisheth
+flourish
+flout
+flout
+flout
+flout
+flow
+flow
+flower
+floweret
+flower
+flow
+flown
+flow
+fluellen
+fluent
+flung
+flush
+flush
+fluster
+flute
+flute
+flutter
+flux
+fluxiv
+fly
+fly
+fo
+foal
+foal
+foam
+foam
+foam
+foam
+foami
+fob
+foc
+fodder
+foe
+foeman
+foemen
+foe
+fog
+foggi
+fog
+foh
+foi
+foil
+foil
+foil
+foin
+foin
+foin
+foi
+foison
+foison
+foist
+foix
+fold
+fold
+fold
+folio
+folk
+folk
+folli
+follow
+follow
+follow
+follow
+followest
+follow
+follow
+folli
+fond
+fonder
+fondli
+fond
+font
+fontibel
+food
+fool
+fooleri
+fooleri
+foolhardi
+fool
+foolish
+foolishli
+foolish
+fool
+foot
+footbal
+footboi
+footboi
+foot
+footfal
+foot
+footman
+footmen
+footpath
+footstep
+footstool
+fopp
+fop
+fopperi
+foppish
+fop
+for
+forag
+forag
+forbad
+forbear
+forbear
+forbear
+forbid
+forbidden
+forbiddenli
+forbid
+forbod
+forborn
+forc
+forc
+forc
+forc
+forceless
+forc
+forcibl
+forcibl
+forc
+ford
+fordid
+fordo
+fordo
+fordon
+fore
+forecast
+forefath
+forefath
+forefing
+forego
+foregon
+forehand
+forehead
+forehead
+forehors
+foreign
+foreign
+foreign
+foreknow
+foreknowledg
+foremost
+forenam
+forenoon
+forerun
+forerunn
+forerun
+forerun
+foresaid
+foresaw
+foresai
+forese
+forese
+forese
+foreshow
+foreskirt
+foresp
+forest
+forestal
+forestal
+forest
+forest
+forest
+foretel
+foretel
+foretel
+forethink
+forethought
+foretold
+forev
+foreward
+forewarn
+forewarn
+forewarn
+forfeit
+forfeit
+forfeit
+forfeit
+forfeit
+forfeitur
+forfeitur
+forfend
+forfend
+forg
+forgav
+forg
+forg
+forgeri
+forgeri
+forg
+forget
+forget
+forget
+forget
+forget
+forget
+forgiv
+forgiven
+forgiv
+forgo
+forgo
+forgon
+forgot
+forgotten
+fork
+fork
+fork
+forlorn
+form
+formal
+formal
+form
+former
+formerli
+formless
+form
+fornic
+fornic
+fornicatress
+forr
+forrest
+forsak
+forsaken
+forsaketh
+forslow
+forsook
+forsooth
+forspent
+forspok
+forswear
+forswear
+forswor
+forsworn
+fort
+fort
+forth
+forthcom
+forthlight
+forthright
+forthwith
+fortif
+fortif
+fortifi
+fortifi
+fortifi
+fortinbra
+fortitud
+fortnight
+fortress
+fortress
+fort
+fortun
+fortuna
+fortun
+fortun
+fortun
+fortun
+fortun
+fortward
+forti
+forum
+forward
+forward
+forward
+forward
+forweari
+fosset
+fost
+foster
+foster
+fought
+foughten
+foul
+fouler
+foulest
+foulli
+foul
+found
+foundat
+foundat
+found
+founder
+fount
+fountain
+fountain
+fount
+four
+fourscor
+fourteen
+fourth
+foutra
+fowl
+fowler
+fowl
+fowl
+fox
+fox
+foxship
+fract
+fraction
+fraction
+fragil
+fragment
+fragment
+fragrant
+frail
+frailer
+frailti
+frailti
+fram
+frame
+frame
+frame
+frampold
+fran
+francai
+franc
+franc
+franchis
+franchis
+franchis
+franchis
+francia
+franci
+francisca
+franciscan
+francisco
+frank
+franker
+frankfort
+franklin
+franklin
+frankli
+frank
+frantic
+franticli
+frateretto
+fratrum
+fraud
+fraud
+fraught
+fraughtag
+fraught
+frai
+frai
+freckl
+freckl
+freckl
+frederick
+free
+freed
+freedom
+freedom
+freeheart
+freelier
+freeli
+freeman
+freemen
+freeness
+freer
+free
+freeston
+freetown
+freez
+freez
+freez
+freez
+french
+frenchman
+frenchmen
+frenchwoman
+frenzi
+frequent
+frequent
+fresh
+fresher
+fresh
+freshest
+freshli
+fresh
+fret
+fret
+fret
+fret
+fretten
+fret
+friar
+friar
+fridai
+fridai
+friend
+friend
+friend
+friendless
+friendli
+friendli
+friend
+friendship
+friendship
+friez
+fright
+fright
+frighten
+fright
+fright
+fright
+fring
+fring
+fripperi
+frisk
+fritter
+frivol
+fro
+frock
+frog
+frogmor
+froissart
+frolic
+from
+front
+front
+frontier
+frontier
+front
+frontlet
+front
+frost
+frost
+frosti
+froth
+froward
+frown
+frown
+frowningli
+frown
+froze
+frozen
+fructifi
+frugal
+fruit
+fruiter
+fruit
+fruitfulli
+fruit
+fruition
+fruitless
+fruit
+frush
+frustrat
+frutifi
+fry
+fubb
+fuel
+fugit
+fulfil
+fulfil
+fulfil
+fulfil
+full
+fullam
+fuller
+fuller
+fullest
+full
+fulli
+ful
+fulsom
+fulvia
+fum
+fumbl
+fumbl
+fumblest
+fumbl
+fume
+fume
+fume
+fumit
+fumitori
+fun
+function
+function
+fundament
+funer
+funer
+fur
+furbish
+furi
+furiou
+furlong
+furnac
+furnac
+furnish
+furnish
+furnish
+furnitur
+furniv
+furor
+furr
+furrow
+furrow
+furrow
+furth
+further
+further
+further
+furthermor
+furthest
+furi
+furz
+furz
+fust
+fustian
+fustilarian
+fusti
+fut
+futur
+futur
+g
+gabbl
+gaberdin
+gabriel
+gad
+gad
+gad
+gadshil
+gag
+gage
+gage
+gagg
+gage
+gagn
+gain
+gain
+gainer
+gaingiv
+gain
+gainsaid
+gainsai
+gainsai
+gainsai
+gainst
+gait
+gait
+galath
+gale
+galen
+gale
+gall
+gallant
+gallantli
+gallantri
+gallant
+gall
+galleri
+gallei
+gallei
+gallia
+gallian
+galliard
+galliass
+gallimaufri
+gall
+gallon
+gallop
+gallop
+gallop
+gallow
+gallowai
+gallowglass
+gallow
+gallows
+gall
+gallu
+gam
+gambol
+gambold
+gambol
+gamboi
+game
+gamer
+game
+gamesom
+gamest
+game
+gammon
+gamut
+gan
+gangren
+ganymed
+gaol
+gaoler
+gaoler
+gaol
+gap
+gape
+gape
+gape
+gar
+garb
+garbag
+garboil
+garcon
+gard
+gard
+garden
+garden
+garden
+garden
+gardez
+gardin
+gardon
+gargantua
+gargrav
+garish
+garland
+garland
+garlic
+garment
+garment
+garmet
+garner
+garner
+garnish
+garnish
+garret
+garrison
+garrison
+gart
+garter
+garterd
+garter
+garter
+gasconi
+gash
+gash
+gaskin
+gasp
+gasp
+gast
+gast
+gat
+gate
+gate
+gate
+gath
+gather
+gather
+gather
+gather
+gatori
+gatori
+gaud
+gaudeo
+gaudi
+gaug
+gaul
+gaultre
+gaunt
+gauntlet
+gauntlet
+gav
+gave
+gavest
+gawd
+gawd
+gawsei
+gai
+gay
+gaz
+gaze
+gaze
+gazer
+gazer
+gaze
+gazeth
+gaze
+gear
+geck
+gees
+geffrei
+geld
+geld
+geld
+gelida
+gelidu
+gelt
+gem
+gemini
+gem
+gen
+gender
+gender
+gener
+gener
+gener
+gener
+gener
+gener
+generos
+gener
+genit
+genitivo
+geniu
+gennet
+genoa
+genoux
+gen
+gent
+gentilhomm
+gentil
+gentl
+gentlefolk
+gentleman
+gentlemanlik
+gentlemen
+gentl
+gentler
+gentl
+gentlest
+gentlewoman
+gentlewomen
+gentli
+gentri
+georg
+gerard
+germain
+germain
+german
+german
+german
+germani
+gertrud
+gest
+gest
+gestur
+gestur
+get
+getrud
+get
+getter
+get
+ghastli
+ghost
+ghost
+ghostli
+ghost
+gi
+giant
+giantess
+giantlik
+giant
+gib
+gibber
+gibbet
+gibbet
+gibe
+giber
+gibe
+gibe
+gibingli
+giddili
+giddi
+giddi
+gift
+gift
+gig
+giglet
+giglot
+gilbert
+gild
+gild
+gild
+gilliam
+gillian
+gill
+gillyvor
+gilt
+gimmal
+gimmer
+gin
+ging
+ginger
+gingerbread
+gingerli
+ginn
+gin
+gioucestershir
+gipe
+gipsi
+gipsi
+gird
+gird
+girdl
+girdl
+girdl
+girdl
+girl
+girl
+girt
+girth
+gi
+giv
+give
+given
+giver
+giver
+give
+givest
+giveth
+give
+give
+glad
+glad
+glad
+gladli
+glad
+glami
+glanc
+glanc
+glanc
+glanc
+glanc
+glander
+glansdal
+glare
+glare
+glass
+glass
+glassi
+glaz
+glaze
+gleam
+glean
+glean
+glean
+gleeful
+gleek
+gleek
+gleek
+glend
+glendow
+glib
+glide
+glide
+glide
+glideth
+glide
+glimmer
+glimmer
+glimmer
+glimps
+glimps
+glist
+glisten
+glister
+glister
+glister
+glitt
+glitter
+globe
+globe
+gloom
+gloomi
+glori
+glorifi
+glorifi
+gloriou
+glorious
+glori
+glose
+gloss
+gloss
+glou
+gloucest
+gloucest
+gloucestershir
+glove
+glover
+glove
+glow
+glow
+glow
+glowworm
+gloz
+gloze
+gloze
+glu
+glue
+glu
+glue
+glut
+glutt
+glut
+glutton
+glutton
+gluttoni
+gnarl
+gnarl
+gnat
+gnat
+gnaw
+gnaw
+gnawn
+gnaw
+go
+goad
+goad
+goad
+goal
+goat
+goatish
+goat
+gobbet
+gobbo
+goblet
+goblet
+goblin
+goblin
+god
+god
+godden
+goddess
+goddess
+goddild
+godfath
+godfath
+godhead
+godlik
+godli
+godli
+godmoth
+god
+godson
+goer
+goer
+goe
+goest
+goeth
+goff
+gog
+go
+gold
+golden
+goldenli
+goldsmith
+goldsmith
+golgotha
+golias
+goliath
+gon
+gondola
+gondoli
+gone
+goneril
+gong
+gonzago
+gonzalo
+good
+goodfellow
+goodlier
+goodliest
+goodli
+goodman
+good
+goodnight
+goodrig
+good
+goodwif
+goodwil
+goodwin
+goodwin
+goodyear
+goodyear
+goos
+gooseberri
+goosequil
+goot
+gor
+gorbelli
+gorboduc
+gordian
+gore
+gore
+gorg
+gorg
+gorgeou
+gorget
+gorg
+gorgon
+gormand
+gormand
+gori
+gosl
+gospel
+gospel
+goss
+gossam
+gossip
+gossip
+gossiplik
+gossip
+got
+goth
+goth
+gotten
+gourd
+gout
+gout
+gouti
+govern
+govern
+govern
+gover
+govern
+governor
+governor
+govern
+gower
+gown
+gown
+grac
+grace
+grace
+grace
+gracefulli
+graceless
+grace
+grace
+graciou
+gracious
+gradat
+graff
+graf
+graft
+graft
+grafter
+grain
+grain
+grain
+gramerci
+gramerci
+grammar
+grand
+grandam
+grandam
+grandchild
+grand
+grandeur
+grandfath
+grandjuror
+grandmoth
+grandpr
+grandsir
+grandsir
+grandsir
+grang
+grant
+grant
+grant
+grant
+grape
+grape
+grappl
+grappl
+grappl
+grasp
+grasp
+grasp
+grass
+grasshopp
+grassi
+grate
+grate
+grate
+grate
+gratiano
+gratifi
+gratii
+gratil
+grate
+grati
+gratitud
+gratul
+grav
+grave
+gravedigg
+gravel
+graveless
+gravel
+grave
+graven
+grave
+graver
+grave
+gravest
+graveston
+graviti
+graviti
+gravi
+grai
+graymalkin
+graz
+graze
+graze
+graze
+greas
+greas
+greasili
+greasi
+great
+greater
+greatest
+greatli
+great
+grecian
+grecian
+gree
+greec
+greed
+greedili
+greedi
+greedi
+gree
+greek
+greekish
+greek
+green
+greener
+greenli
+green
+greensleev
+greenwich
+greenwood
+greet
+greet
+greet
+greet
+greet
+greg
+gregori
+gremio
+grew
+grei
+greybeard
+greybeard
+greyhound
+greyhound
+grief
+grief
+griev
+grievanc
+grievanc
+griev
+griev
+griev
+grievest
+griev
+grievingli
+grievou
+grievous
+griffin
+griffith
+grim
+grime
+grimli
+grin
+grind
+grind
+grindston
+grin
+grip
+gripe
+gripe
+gripe
+grise
+grisli
+grissel
+grize
+grizzl
+grizzl
+groan
+groan
+groan
+groat
+groat
+groin
+groom
+groom
+grop
+grope
+gro
+gross
+grosser
+grossli
+gross
+ground
+ground
+groundl
+ground
+grove
+grovel
+grovel
+grove
+grow
+groweth
+grow
+grown
+grow
+growth
+grub
+grubb
+grub
+grudg
+grudg
+grudg
+grudg
+gruel
+grumbl
+grumblest
+grumbl
+grumbl
+grumio
+grund
+grunt
+gualtier
+guard
+guardag
+guardant
+guard
+guardian
+guardian
+guard
+guardsman
+gud
+gudgeon
+guerdon
+guerra
+guess
+guess
+guessingli
+guest
+guest
+guiana
+guichard
+guid
+guid
+guider
+guideriu
+guid
+guid
+guidon
+guienn
+guil
+guildenstern
+guilder
+guildford
+guildhal
+guil
+guil
+guil
+guilford
+guilt
+guiltian
+guiltier
+guiltili
+guilti
+guiltless
+guilt
+guilti
+guinea
+guinev
+guis
+gul
+gule
+gulf
+gulf
+gull
+gull
+gum
+gumm
+gum
+gun
+gunner
+gunpowd
+gun
+gurnet
+gurnei
+gust
+gust
+gusti
+gut
+gutter
+gui
+guyn
+guysor
+gypsi
+gyve
+gyve
+gyve
+h
+ha
+haberdash
+habili
+habili
+habit
+habit
+habit
+habit
+habitud
+hack
+hacket
+hacknei
+hack
+had
+hadst
+haec
+haer
+hag
+hagar
+haggard
+haggard
+haggish
+haggl
+hag
+hail
+hail
+hailston
+hailston
+hair
+hairless
+hair
+hairi
+hal
+halberd
+halberd
+halcyon
+hale
+hale
+hale
+half
+halfcan
+halfpenc
+halfpenni
+halfpennyworth
+halfwai
+halidom
+hall
+halloa
+hallo
+hallond
+halloo
+halloo
+hallow
+hallow
+hallowma
+hallown
+hal
+halt
+halter
+halter
+halt
+halt
+halv
+ham
+hame
+hamlet
+hammer
+hammer
+hammer
+hammer
+hamper
+hampton
+ham
+hamstr
+hand
+hand
+hand
+handicraft
+handicraftsmen
+hand
+handiwork
+handkerch
+handkerch
+handkerchief
+handl
+handl
+handl
+handless
+handlest
+handl
+handmaid
+handmaid
+hand
+handsaw
+handsom
+handsom
+handsom
+handwrit
+handi
+hang
+hang
+hanger
+hangeth
+hang
+hang
+hangman
+hangmen
+hang
+hannib
+hap
+hapless
+hapli
+happ
+happen
+happen
+happier
+happi
+happiest
+happili
+happi
+happi
+hap
+harbing
+harbing
+harbor
+harbour
+harbourag
+harbour
+harbour
+harcourt
+hard
+harder
+hardest
+hardiest
+hardiment
+hardi
+hardli
+hard
+hardock
+hardi
+hare
+harelip
+hare
+harfleur
+hark
+harlot
+harlotri
+harlot
+harm
+harm
+harm
+harm
+harmless
+harmoni
+harmoni
+harm
+har
+harp
+harper
+harpier
+harp
+harpi
+harri
+harrow
+harrow
+harri
+harsh
+harshli
+harsh
+hart
+hart
+harum
+harvest
+ha
+hast
+hast
+hast
+hasten
+hast
+hastili
+hast
+hast
+hasti
+hat
+hatch
+hatch
+hatchet
+hatch
+hatchment
+hate
+hate
+hate
+hater
+hater
+hate
+hateth
+hatfield
+hath
+hate
+hatr
+hat
+haud
+hauf
+haught
+haughti
+haughti
+haunch
+haunch
+haunt
+haunt
+haunt
+haunt
+hautboi
+hautboi
+have
+haven
+haven
+haver
+have
+have
+havior
+haviour
+havoc
+hawk
+hawk
+hawk
+hawthorn
+hawthorn
+hai
+hazard
+hazard
+hazard
+hazel
+hazelnut
+he
+head
+headborough
+head
+headier
+head
+headland
+headless
+headlong
+head
+headsman
+headstrong
+headi
+heal
+heal
+heal
+heal
+health
+health
+health
+healthsom
+healthi
+heap
+heap
+heap
+hear
+heard
+hearer
+hearer
+hearest
+heareth
+hear
+hear
+heark
+hearken
+hearken
+hear
+hearsai
+hears
+hears
+hearst
+heart
+heartach
+heartbreak
+heartbreak
+heart
+hearten
+hearth
+hearth
+heartili
+hearti
+heartless
+heartl
+heartli
+heart
+heartsick
+heartstr
+hearti
+heat
+heat
+heath
+heathen
+heathenish
+heat
+heat
+heauti
+heav
+heav
+heav
+heaven
+heavenli
+heaven
+heav
+heavier
+heaviest
+heavili
+heavi
+heav
+heav
+heavi
+hebona
+hebrew
+hecat
+hectic
+hector
+hector
+hecuba
+hedg
+hedg
+hedgehog
+hedgehog
+hedg
+heed
+heed
+heed
+heedful
+heedfulli
+heedless
+heel
+heel
+heft
+heft
+heifer
+heifer
+heigh
+height
+heighten
+heinou
+heinous
+heir
+heiress
+heirless
+heir
+held
+helen
+helena
+helenu
+helia
+helicon
+hell
+hellespont
+hellfir
+hellish
+helm
+helm
+helmet
+helmet
+helm
+help
+helper
+helper
+help
+help
+helpless
+help
+helter
+hem
+heme
+hemlock
+hemm
+hemp
+hempen
+hem
+hen
+henc
+henceforth
+henceforward
+henchman
+henri
+henricu
+henri
+hen
+hent
+henton
+her
+herald
+heraldri
+herald
+herb
+herbert
+herblet
+herb
+herculean
+hercul
+herd
+herd
+herdsman
+herdsmen
+here
+hereabout
+hereabout
+hereaft
+herebi
+hereditari
+hereford
+herefordshir
+herein
+hereof
+heresi
+heresi
+heret
+heret
+hereto
+hereupon
+heritag
+heriti
+herm
+hermia
+hermion
+hermit
+hermitag
+hermit
+hern
+hero
+herod
+herod
+hero
+heroic
+heroic
+her
+her
+her
+herself
+hesperid
+hesperu
+hest
+hest
+heur
+heureux
+hew
+hewgh
+hew
+hewn
+hew
+hei
+heydai
+hibocr
+hic
+hiccup
+hick
+hid
+hidden
+hide
+hideou
+hideous
+hideous
+hide
+hidest
+hide
+hie
+hi
+hiem
+hi
+hig
+high
+higher
+highest
+highli
+highmost
+high
+hight
+highwai
+highwai
+hild
+hild
+hill
+hillo
+hilloa
+hill
+hilt
+hilt
+hili
+him
+himself
+hinc
+hincklei
+hind
+hinder
+hinder
+hinder
+hindmost
+hind
+hing
+hing
+hing
+hint
+hip
+hipp
+hipparchu
+hippolyta
+hip
+hir
+hire
+hire
+hiren
+hirtiu
+hi
+hisperia
+hiss
+hiss
+hiss
+hist
+histor
+histori
+hit
+hither
+hitherto
+hitherward
+hitherward
+hit
+hit
+hive
+hive
+hizz
+ho
+hoa
+hoar
+hoard
+hoard
+hoard
+hoar
+hoars
+hoari
+hob
+hobbidid
+hobbi
+hobbyhors
+hobgoblin
+hobnail
+hoc
+hod
+hodg
+hog
+hog
+hogshead
+hogshead
+hoi
+hois
+hoist
+hoist
+hoist
+holborn
+hold
+holden
+holder
+holdeth
+holdfast
+hold
+hold
+hole
+hole
+holidam
+holidam
+holidai
+holidai
+holier
+holiest
+holili
+holi
+holla
+holland
+holland
+holland
+holloa
+holloa
+hollow
+hollowli
+hollow
+holli
+holmedon
+holofern
+holp
+holi
+homag
+homag
+home
+home
+home
+homespun
+homeward
+homeward
+homicid
+homicid
+homili
+hominem
+homm
+homo
+honest
+honest
+honestest
+honestli
+honesti
+honei
+honeycomb
+honei
+honeyless
+honeysuckl
+honeysuckl
+honi
+honneur
+honor
+honor
+honor
+honorato
+honorificabilitudinitatibu
+honor
+honour
+honour
+honour
+honour
+honourest
+honour
+honour
+honour
+hoo
+hood
+hood
+hoodman
+hood
+hoodwink
+hoof
+hoof
+hook
+hook
+hook
+hoop
+hoop
+hoot
+hoot
+hoot
+hoot
+hop
+hope
+hope
+hopeless
+hope
+hopest
+hope
+hopkin
+hopped
+hor
+horac
+horatio
+horizon
+horn
+hornbook
+horn
+horner
+horn
+hornpip
+horn
+horolog
+horribl
+horribl
+horrid
+horrid
+horridli
+horror
+horror
+hor
+hors
+horseback
+hors
+horsehair
+horseman
+horsemanship
+horsemen
+hors
+horsewai
+hors
+hortensio
+hortensiu
+horum
+hose
+hospit
+hospit
+hospit
+host
+hostag
+hostag
+hostess
+hostil
+hostil
+hostiliu
+host
+hot
+hotli
+hotspur
+hotter
+hottest
+hound
+hound
+hour
+hourli
+hour
+hou
+hous
+household
+household
+household
+household
+housekeep
+housekeep
+housekeep
+houseless
+hous
+housewif
+housewiferi
+housew
+hovel
+hover
+hover
+hover
+hover
+how
+howbeit
+how
+howeer
+howev
+howl
+howl
+howlet
+howl
+howl
+howso
+howsoev
+howsom
+hox
+hoi
+hoydai
+hubert
+huddl
+huddl
+hue
+hu
+hue
+hug
+huge
+huge
+huge
+hugg
+hugger
+hugh
+hug
+huju
+hulk
+hulk
+hull
+hull
+hullo
+hum
+human
+human
+human
+human
+humbl
+humbl
+humbl
+humbler
+humbl
+humblest
+humbl
+humbl
+hume
+humh
+humid
+humil
+hum
+humor
+humor
+humor
+humour
+humourist
+humour
+humphrei
+humphri
+hum
+hundr
+hundr
+hundredth
+hung
+hungarian
+hungari
+hunger
+hungerford
+hungerli
+hungri
+hunt
+hunt
+hunter
+hunter
+hunteth
+hunt
+huntington
+huntress
+hunt
+huntsman
+huntsmen
+hurdl
+hurl
+hurl
+hurl
+hurli
+hurlyburli
+hurricano
+hurricano
+hurri
+hurri
+hurri
+hurt
+hurt
+hurtl
+hurtless
+hurtl
+hurt
+husband
+husband
+husbandless
+husbandri
+husband
+hush
+hush
+husht
+husk
+huswif
+huswif
+hutch
+hybla
+hydra
+hyen
+hymen
+hymenaeu
+hymn
+hymn
+hyperbol
+hyperbol
+hyperion
+hypocrisi
+hypocrit
+hypocrit
+hyrcan
+hyrcania
+hyrcanian
+hyssop
+hysterica
+i
+iachimo
+iaculi
+iago
+iament
+ibat
+icaru
+ic
+iceland
+ici
+icicl
+icicl
+ici
+idea
+idea
+idem
+iden
+id
+idiot
+idiot
+idl
+idl
+idl
+idli
+idol
+idolatr
+idolatri
+ield
+if
+if
+igni
+ignobl
+ignobl
+ignomini
+ignomini
+ignomi
+ignor
+ignor
+ii
+iii
+iiii
+il
+ilbow
+ild
+ilion
+ilium
+ill
+illegitim
+illiter
+ill
+illo
+ill
+illum
+illumin
+illumin
+illumineth
+illus
+illus
+illustr
+illustr
+illustri
+illyria
+illyrian
+il
+im
+imag
+imageri
+imag
+imagin
+imaginari
+imagin
+imagin
+imagin
+imagin
+imagin
+imbar
+imbecil
+imbru
+imitari
+imit
+imit
+imit
+imit
+immacul
+imman
+immask
+immateri
+immediaci
+immedi
+immedi
+immin
+immin
+immoder
+immoder
+immodest
+immoment
+immort
+immortaliz
+immort
+immur
+immur
+immur
+imogen
+imp
+impaint
+impair
+impair
+impal
+impal
+impanel
+impart
+impart
+imparti
+impart
+impart
+impast
+impati
+impati
+impati
+impawn
+impeach
+impeach
+impeach
+impeach
+imped
+impedi
+impedi
+impenetr
+imper
+imperceiver
+imperfect
+imperfect
+imperfect
+imperfectli
+imperi
+imperi
+imperi
+impertin
+impertin
+impetico
+impetuos
+impetu
+impieti
+impieti
+impiou
+implac
+implement
+impli
+implor
+implor
+implor
+implor
+implor
+impon
+import
+import
+import
+import
+importantli
+import
+importeth
+import
+importless
+import
+importun
+importunaci
+importun
+importun
+importun
+importun
+impo
+impos
+impos
+imposit
+imposit
+imposs
+imposs
+imposs
+imposthum
+impostor
+impostor
+impot
+impot
+impound
+impregn
+impres
+impress
+impress
+impressest
+impress
+impressur
+imprimendum
+imprimi
+imprint
+imprint
+imprison
+imprison
+imprison
+imprison
+improb
+improp
+improv
+improvid
+impud
+impud
+impud
+impud
+impudiqu
+impugn
+impugn
+impur
+imput
+imput
+in
+inaccess
+inaid
+inaud
+inauspici
+incag
+incant
+incap
+incardin
+incarnadin
+incarn
+incarn
+incen
+incens
+incens
+incens
+incens
+incens
+incertain
+incertainti
+incertainti
+incess
+incessantli
+incest
+incestu
+inch
+incharit
+inch
+incid
+incid
+incis
+incit
+incit
+incivil
+incivil
+inclin
+inclin
+inclin
+inclin
+inclin
+inclin
+inclin
+inclip
+includ
+includ
+includ
+inclus
+incompar
+incomprehens
+inconsider
+inconst
+inconst
+incontin
+incontin
+incontin
+inconveni
+inconveni
+inconveni
+inconi
+incorpor
+incorp
+incorrect
+increa
+increas
+increas
+increaseth
+increas
+incred
+incredul
+incur
+incur
+incurr
+incur
+incurs
+ind
+ind
+indebt
+inde
+indent
+indent
+indentur
+indentur
+index
+index
+india
+indian
+indict
+indict
+indict
+indi
+indiffer
+indiffer
+indiffer
+indig
+indigest
+indigest
+indign
+indign
+indign
+indign
+indign
+indign
+indirect
+indirect
+indirect
+indirectli
+indiscreet
+indiscret
+indispo
+indisposit
+indissolubl
+indistinct
+indistinguish
+indistinguish
+indit
+individ
+indrench
+indu
+indubit
+induc
+induc
+induc
+induc
+induct
+induct
+indu
+indu
+indu
+indulg
+indulg
+indulg
+indur
+industri
+industri
+industri
+inequ
+inestim
+inevit
+inexecr
+inexor
+inexplic
+infal
+infal
+infamon
+infam
+infami
+infanc
+infant
+infant
+infect
+infect
+infect
+infect
+infect
+infecti
+infecti
+infect
+infer
+infer
+inferior
+inferior
+infern
+inferr
+inferreth
+infer
+infest
+infidel
+infidel
+infinit
+infinit
+infinit
+infirm
+infirm
+infirm
+infix
+infix
+inflam
+inflam
+inflam
+inflamm
+inflict
+inflict
+influenc
+influenc
+infold
+inform
+inform
+inform
+inform
+inform
+inform
+inform
+infortun
+infr
+infring
+infring
+infu
+infus
+infus
+infus
+infus
+ingen
+ingeni
+ingeni
+inglori
+ingot
+ingraf
+ingraft
+ingrat
+ingrat
+ingrat
+ingratitud
+ingratitud
+ingredi
+ingredi
+ingross
+inhabit
+inhabit
+inhabit
+inhabit
+inhabit
+inhears
+inhears
+inher
+inherit
+inherit
+inherit
+inherit
+inheritor
+inheritor
+inheritrix
+inherit
+inhibit
+inhibit
+inhoop
+inhuman
+iniqu
+iniqu
+initi
+injoint
+injunct
+injunct
+injur
+injur
+injur
+injuri
+injuri
+injuri
+injustic
+ink
+inkhorn
+inkl
+inkl
+inkl
+inki
+inlaid
+inland
+inlai
+inli
+inmost
+inn
+inner
+innkeep
+innoc
+innoc
+innoc
+innoc
+innov
+innov
+inn
+innumer
+inocul
+inordin
+inprimi
+inquir
+inquir
+inquiri
+inquisit
+inquisit
+inroad
+insan
+insani
+insati
+insconc
+inscrib
+inscript
+inscript
+inscrol
+inscrut
+insculp
+insculptur
+insens
+insepar
+insepar
+insert
+insert
+inset
+inshel
+inshipp
+insid
+insinew
+insinu
+insinuateth
+insinu
+insinu
+insist
+insist
+insistur
+insoci
+insol
+insol
+insomuch
+inspir
+inspir
+inspir
+inspir
+inspir
+instal
+instal
+instal
+instanc
+instanc
+instant
+instantli
+instat
+instead
+insteep
+instig
+instig
+instig
+instig
+instig
+instinct
+instinct
+institut
+institut
+instruct
+instruct
+instruct
+instruct
+instruct
+instrument
+instrument
+instrument
+insubstanti
+insuffici
+insuffici
+insult
+insult
+insult
+insult
+insult
+insupport
+insuppress
+insurrect
+insurrect
+int
+integ
+integrita
+integr
+intellect
+intellect
+intellectu
+intellig
+intelligenc
+intelligenc
+intellig
+intelligi
+intelligo
+intemper
+intemper
+intend
+intend
+intendeth
+intend
+intend
+intend
+inten
+intent
+intent
+intent
+intent
+inter
+intercept
+intercept
+intercept
+intercept
+intercept
+intercess
+intercessor
+interchain
+interchang
+interchang
+interchang
+interchang
+interchang
+interdict
+interest
+interim
+interim
+interior
+interject
+interjoin
+interlud
+intermingl
+intermiss
+intermiss
+intermit
+intermix
+intermix
+interpos
+interpos
+interpos
+interpret
+interpret
+interpret
+interpret
+interpret
+interpret
+interr
+inter
+interrogatori
+interrupt
+interrupt
+interrupt
+interruptest
+interrupt
+interrupt
+intertissu
+intervallum
+interview
+intest
+intestin
+intil
+intim
+intim
+intitl
+intitul
+into
+intoler
+intox
+intreasur
+intreat
+intrench
+intrench
+intric
+intrins
+intrins
+intrud
+intrud
+intrud
+intrus
+inund
+inur
+inurn
+invad
+invad
+invas
+invas
+invect
+invect
+inveigl
+invent
+invent
+invent
+invent
+inventor
+inventori
+inventori
+inventor
+inventori
+inver
+invert
+invest
+invest
+invest
+invest
+inveter
+invinc
+inviol
+invis
+invis
+invit
+invit
+invit
+invit
+invit
+inviti
+invoc
+invoc
+invok
+invok
+invulner
+inward
+inwardli
+inward
+inward
+ionia
+ionian
+ips
+ipswich
+ira
+ira
+ira
+ir
+ir
+ireland
+iri
+irish
+irishman
+irishmen
+irk
+irksom
+iron
+iron
+irreconcil
+irrecover
+irregular
+irregul
+irreligi
+irremov
+irrepar
+irresolut
+irrevoc
+is
+isabel
+isabella
+isbel
+isbel
+iscariot
+is
+ish
+isidor
+isi
+island
+island
+island
+island
+isl
+isl
+israel
+issu
+issu
+issu
+issueless
+issu
+issu
+ist
+ista
+it
+italian
+itali
+itch
+itch
+itch
+item
+item
+iter
+ithaca
+it
+itself
+itshal
+iv
+ivori
+ivi
+iwi
+ix
+j
+jacet
+jack
+jackanap
+jack
+jacksauc
+jackslav
+jacob
+jade
+jade
+jade
+jail
+jake
+jamani
+jame
+jami
+jane
+jangl
+jangl
+januari
+janu
+japhet
+jaquenetta
+jaqu
+jar
+jar
+jar
+jarteer
+jason
+jaunc
+jaunc
+jaundic
+jaundi
+jaw
+jawbon
+jaw
+jai
+jai
+jc
+je
+jealou
+jealousi
+jealousi
+jeer
+jeer
+jelli
+jenni
+jeopardi
+jephtha
+jephthah
+jerkin
+jerkin
+jerk
+jeronimi
+jerusalem
+jeshu
+jess
+jessica
+jest
+jest
+jester
+jester
+jest
+jest
+jesu
+jesu
+jet
+jet
+jew
+jewel
+jewel
+jewel
+jewess
+jewish
+jewri
+jew
+jezebel
+jig
+jig
+jill
+jill
+jingl
+joan
+job
+jockei
+jocund
+jog
+jog
+john
+john
+join
+joinder
+join
+joiner
+joineth
+join
+joint
+joint
+joint
+jointli
+jointress
+joint
+jointur
+jolliti
+jolli
+jolt
+jolthead
+jordan
+joseph
+joshua
+jot
+jour
+jourdain
+journal
+journei
+journei
+journeyman
+journeymen
+journei
+jove
+jovem
+jovial
+jowl
+jowl
+joi
+joi
+joy
+joyfulli
+joyless
+joyou
+joi
+juan
+jud
+juda
+judas
+jude
+judg
+judg
+judg
+judgement
+judg
+judgest
+judg
+judgment
+judgment
+judici
+jug
+juggl
+juggl
+juggler
+juggler
+juggl
+jug
+juic
+juic
+jul
+jule
+julia
+juliet
+julietta
+julio
+juliu
+juli
+jump
+jumpeth
+jump
+jump
+june
+june
+junior
+juniu
+junket
+juno
+jupit
+jure
+jurement
+jurisdict
+juror
+juror
+juri
+jurymen
+just
+justeiu
+justest
+justic
+justic
+justic
+justic
+justif
+justifi
+justifi
+justl
+justl
+justl
+justl
+justli
+just
+just
+jut
+jutti
+juven
+kam
+kate
+kate
+kate
+katharin
+katherina
+katherin
+kecksi
+keech
+keel
+keel
+keen
+keen
+keep
+keepdown
+keeper
+keeper
+keepest
+keep
+keep
+keiser
+ken
+kendal
+kennel
+kent
+kentish
+kentishman
+kentishmen
+kept
+kerchief
+kere
+kern
+kernal
+kernel
+kernel
+kern
+kersei
+kettl
+kettledrum
+kettledrum
+kei
+kei
+kibe
+kibe
+kick
+kick
+kickshaw
+kickshaws
+kicki
+kid
+kidnei
+kike
+kildar
+kill
+kill
+killer
+killeth
+kill
+killingworth
+kill
+kiln
+kimbolton
+kin
+kind
+kinder
+kindest
+kindl
+kindl
+kindless
+kindlier
+kindl
+kindli
+kind
+kind
+kindr
+kindr
+kind
+kine
+king
+kingdom
+kingdom
+kingli
+king
+kinr
+kin
+kinsman
+kinsmen
+kinswoman
+kirtl
+kirtl
+kiss
+kiss
+kiss
+kiss
+kitchen
+kitchen
+kite
+kite
+kitten
+kj
+kl
+klll
+knack
+knack
+knapp
+knav
+knave
+knaveri
+knaveri
+knave
+knavish
+knead
+knead
+knead
+knee
+kneel
+kneel
+kneel
+knee
+knell
+knew
+knewest
+knife
+knight
+knight
+knighthood
+knighthood
+knightli
+knight
+knit
+knit
+knitter
+knitteth
+knive
+knob
+knock
+knock
+knock
+knog
+knoll
+knot
+knot
+knot
+knotti
+know
+knower
+knowest
+know
+knowingli
+know
+knowledg
+known
+know
+l
+la
+laban
+label
+label
+labienu
+labio
+labor
+labor
+labor
+labour
+labour
+labour
+labour
+labour
+labour
+laboursom
+labra
+labyrinth
+lac
+lace
+lace
+lacedaemon
+lace
+laci
+lack
+lackbeard
+lack
+lackei
+lackei
+lackei
+lack
+lack
+lad
+ladder
+ladder
+lade
+laden
+ladi
+lade
+lad
+ladi
+ladybird
+ladyship
+ladyship
+laer
+laert
+lafeu
+lag
+lag
+laid
+lain
+laissez
+lake
+lake
+lakin
+lam
+lamb
+lambert
+lambkin
+lambkin
+lamb
+lame
+lame
+lame
+lament
+lament
+lament
+lament
+lament
+lament
+lament
+lament
+lament
+lame
+lame
+lamma
+lammastid
+lamound
+lamp
+lampass
+lamp
+lanc
+lancast
+lanc
+lanc
+lanceth
+lanch
+land
+land
+land
+landless
+landlord
+landmen
+land
+lane
+lane
+langag
+langlei
+langton
+languag
+languageless
+languag
+langu
+languish
+languish
+languish
+languish
+languish
+languish
+languor
+lank
+lantern
+lantern
+lanthorn
+lap
+lapi
+lapland
+lapp
+lap
+laps
+laps
+laps
+lapw
+laquai
+lard
+larder
+lard
+lard
+larg
+larg
+larg
+larger
+largess
+largest
+lark
+lark
+larron
+lartiu
+larum
+larum
+la
+lascivi
+lash
+lass
+lass
+last
+last
+last
+lastli
+last
+latch
+latch
+late
+late
+late
+later
+latest
+lath
+latin
+latten
+latter
+lattic
+laud
+laudabl
+laudi
+laugh
+laughabl
+laugh
+laugher
+laughest
+laugh
+laugh
+laughter
+launc
+launcelot
+launc
+launch
+laund
+laundress
+laundri
+laur
+laura
+laurel
+laurel
+laurenc
+lau
+lavach
+lave
+lave
+lavend
+lavina
+lavinia
+lavish
+lavishli
+lavolt
+lavolta
+law
+law
+lawfulli
+lawless
+lawlessli
+lawn
+lawn
+lawrenc
+law
+lawyer
+lawyer
+lai
+layer
+layest
+lai
+lai
+lazar
+lazar
+lazaru
+lazi
+lc
+ld
+ldst
+le
+lead
+leaden
+leader
+leader
+leadest
+lead
+lead
+leaf
+leagu
+leagu
+leagu
+leaguer
+leagu
+leah
+leak
+leaki
+lean
+leander
+leaner
+lean
+lean
+lean
+leap
+leap
+leap
+leap
+leapt
+lear
+learn
+learn
+learnedli
+learn
+learn
+learn
+learnt
+lea
+leas
+leas
+leash
+leas
+least
+leather
+leathern
+leav
+leav
+leaven
+leaven
+leaver
+leav
+leav
+leavi
+lecher
+lecher
+lecher
+lecheri
+lecon
+lectur
+lectur
+led
+leda
+leech
+leech
+leek
+leek
+leer
+leer
+lee
+lees
+leet
+leet
+left
+leg
+legaci
+legaci
+legat
+legatin
+lege
+leger
+lege
+legg
+legion
+legion
+legitim
+legitim
+leg
+leicest
+leicestershir
+leiger
+leiger
+leisur
+leisur
+leisur
+leman
+lemon
+lena
+lend
+lender
+lend
+lend
+lend
+length
+lengthen
+lengthen
+length
+leniti
+lennox
+lent
+lenten
+lentu
+leo
+leon
+leonardo
+leonati
+leonato
+leonatu
+leont
+leopard
+leopard
+leper
+leper
+lepidu
+leprosi
+lequel
+ler
+le
+less
+lessen
+lessen
+lesser
+lesson
+lesson
+lesson
+lest
+lestrak
+let
+lethargi
+lethargi
+lethargi
+leth
+let
+lett
+letter
+letter
+let
+lettuc
+leur
+leve
+level
+level
+level
+level
+leven
+lever
+leviathan
+leviathan
+levi
+levi
+leviti
+levi
+levi
+lewd
+lewdli
+lewd
+lewdster
+lewi
+liabl
+liar
+liar
+libbard
+libel
+libel
+liber
+liber
+libert
+liberti
+libertin
+libertin
+liberti
+librari
+libya
+licenc
+licen
+licens
+licenti
+licha
+licio
+lick
+lick
+licker
+lictor
+lid
+lid
+lie
+li
+lief
+liefest
+lieg
+liegeman
+liegemen
+lien
+li
+liest
+lieth
+lieu
+lieuten
+lieutenantri
+lieuten
+liev
+life
+lifeblood
+lifeless
+lifel
+lift
+lift
+lifter
+lifteth
+lift
+lift
+lig
+ligariu
+liggen
+light
+light
+lighten
+lighten
+lighter
+lightest
+lightli
+light
+lightn
+lightn
+light
+lik
+like
+like
+likeliest
+likelihood
+likelihood
+like
+like
+liker
+like
+likest
+likewis
+like
+like
+lili
+lili
+lim
+limand
+limb
+limbeck
+limbeck
+limber
+limbo
+limb
+lime
+lime
+limehous
+limekiln
+limit
+limit
+limit
+limit
+limn
+limp
+limp
+limp
+lin
+lincoln
+lincolnshir
+line
+lineal
+lineal
+lineament
+lineament
+line
+linen
+linen
+line
+ling
+lingar
+linger
+linger
+linger
+linguist
+line
+link
+link
+linsei
+linstock
+linta
+lion
+lionel
+lioness
+lion
+lip
+lipp
+lip
+lipsburi
+liquid
+liquor
+liquorish
+liquor
+lirra
+lisbon
+lisp
+lisp
+list
+listen
+listen
+list
+literatur
+lither
+litter
+littl
+littlest
+liv
+live
+live
+liveli
+livelihood
+livelong
+live
+liver
+liveri
+liver
+liveri
+live
+livest
+liveth
+livia
+live
+live
+lizard
+lizard
+ll
+lll
+llou
+lnd
+lo
+loa
+loach
+load
+loaden
+load
+load
+loaf
+loam
+loan
+loath
+loath
+loath
+loather
+loath
+loath
+loathli
+loath
+loathsom
+loathsom
+loathsomest
+loav
+lob
+lobbi
+lobbi
+local
+lochab
+lock
+lock
+lock
+lockram
+lock
+locust
+lode
+lodg
+lodg
+lodg
+lodger
+lodg
+lodg
+lodg
+lodovico
+lodowick
+lofti
+log
+logger
+loggerhead
+loggerhead
+logget
+logic
+log
+loin
+loiter
+loiter
+loiter
+loiter
+loll
+loll
+lombardi
+london
+london
+lone
+loneli
+lone
+long
+longavil
+longboat
+long
+longer
+longest
+longeth
+long
+long
+longli
+long
+longtail
+loo
+loof
+look
+look
+looker
+looker
+lookest
+look
+look
+loon
+loop
+loo
+loos
+loos
+loos
+loosen
+loos
+lop
+lopp
+loquitur
+lord
+lord
+lord
+lord
+lordli
+lordli
+lord
+lordship
+lordship
+lorenzo
+lorn
+lorrain
+lorship
+lo
+lose
+loser
+loser
+lose
+losest
+loseth
+lose
+loss
+loss
+lost
+lot
+lot
+lott
+lotteri
+loud
+louder
+loudli
+lour
+loureth
+lour
+lous
+lous
+lousi
+lout
+lout
+lout
+louvr
+lov
+love
+love
+lovedst
+lovel
+loveli
+loveli
+lovel
+love
+lover
+lover
+lover
+love
+lovest
+loveth
+love
+lovingli
+low
+low
+lower
+lowest
+low
+lowli
+lowli
+lown
+low
+loyal
+loyal
+loyalti
+loyalti
+lozel
+lt
+lubber
+lubberli
+luc
+luccico
+luce
+lucentio
+luce
+lucetta
+luciana
+lucianu
+lucif
+lucifi
+luciliu
+lucina
+lucio
+luciu
+luck
+luckier
+luckiest
+luckili
+luckless
+lucki
+lucr
+lucrec
+lucretia
+luculliu
+lucullu
+luci
+lud
+ludlow
+lug
+lugg
+luggag
+luke
+lukewarm
+lull
+lulla
+lullabi
+lull
+lumbert
+lump
+lumpish
+luna
+lunaci
+lunaci
+lunat
+lunat
+lune
+lung
+luperc
+lurch
+lure
+lurk
+lurketh
+lurk
+lurk
+lusciou
+lush
+lust
+lust
+luster
+lust
+lustier
+lustiest
+lustig
+lustihood
+lustili
+lustr
+lustrou
+lust
+lusti
+lute
+lute
+lutestr
+lutheran
+luxuri
+luxuri
+luxuri
+ly
+lycaonia
+lycurgus
+lydia
+lye
+lyen
+ly
+lym
+lymog
+lynn
+lysand
+m
+ma
+maan
+mab
+macbeth
+maccabaeu
+macdonwald
+macduff
+mace
+macedon
+mace
+machiavel
+machin
+machin
+machin
+mack
+macmorri
+macul
+macul
+mad
+madam
+madam
+madam
+madcap
+mad
+mad
+made
+madeira
+madli
+madman
+madmen
+mad
+madonna
+madrig
+mad
+maecena
+maggot
+maggot
+magic
+magic
+magician
+magistr
+magistr
+magnanim
+magnanim
+magni
+magnifi
+magnific
+magnific
+magnifico
+magnifico
+magnu
+mahomet
+mahu
+maid
+maiden
+maidenhead
+maidenhead
+maidenhood
+maidenhood
+maidenliest
+maidenli
+maiden
+maidhood
+maid
+mail
+mail
+mail
+maim
+maim
+maim
+main
+maincours
+main
+mainli
+mainmast
+main
+maintain
+maintain
+maintain
+mainten
+mai
+maison
+majesta
+majeste
+majest
+majest
+majest
+majesti
+majesti
+major
+major
+mak
+make
+makeless
+maker
+maker
+make
+makest
+maketh
+make
+make
+mal
+mala
+maladi
+maladi
+malapert
+malcolm
+malcont
+malcont
+male
+maledict
+malefact
+malefactor
+malefactor
+male
+malevol
+malevol
+malhecho
+malic
+malici
+malici
+malign
+malign
+malign
+malignantli
+malkin
+mall
+mallard
+mallet
+mallow
+malmsei
+malt
+maltworm
+malvolio
+mamilliu
+mammer
+mammet
+mammet
+mammock
+man
+manacl
+manacl
+manag
+manag
+manag
+manag
+manakin
+manchu
+mandat
+mandragora
+mandrak
+mandrak
+mane
+manent
+mane
+manet
+manfulli
+mangl
+mangl
+mangl
+mangl
+mangi
+manhood
+manhood
+manifest
+manifest
+manifest
+manifold
+manifoldli
+manka
+mankind
+manlik
+manli
+mann
+manna
+manner
+mannerli
+manner
+manningtre
+mannish
+manor
+manor
+man
+mansion
+mansionri
+mansion
+manslaught
+mantl
+mantl
+mantl
+mantua
+mantuan
+manual
+manur
+manur
+manu
+mani
+map
+mapp
+map
+mar
+marbl
+marbl
+marcad
+marcellu
+march
+march
+marcheth
+march
+marchio
+marchpan
+marcian
+marciu
+marcu
+mardian
+mare
+mare
+marg
+margarelon
+margaret
+marg
+margent
+margeri
+maria
+marian
+mariana
+mari
+marigold
+marin
+marin
+maritim
+marjoram
+mark
+mark
+market
+market
+marketplac
+market
+mark
+markman
+mark
+marl
+marl
+marmoset
+marquess
+marqui
+marr
+marriag
+marriag
+marri
+marri
+mar
+marrow
+marrowless
+marrow
+marri
+marri
+mar
+marseil
+marsh
+marshal
+marshalsea
+marshalship
+mart
+mart
+martem
+martext
+martial
+martin
+martino
+martiu
+martlema
+martlet
+mart
+martyr
+martyr
+marullu
+marv
+marvel
+marvel
+marvel
+marvel
+marvel
+mari
+ma
+masculin
+masham
+mask
+mask
+masker
+masker
+mask
+mask
+mason
+masonri
+mason
+masqu
+masquer
+masqu
+masqu
+mass
+massacr
+massacr
+mass
+massi
+mast
+mastcr
+master
+masterdom
+masterest
+masterless
+masterli
+masterpiec
+master
+mastership
+mastic
+mastiff
+mastiff
+mast
+match
+match
+matcheth
+match
+matchless
+mate
+mate
+mater
+materi
+mate
+mathemat
+matin
+matron
+matron
+matter
+matter
+matthew
+mattock
+mattress
+matur
+matur
+maud
+maudlin
+maugr
+maul
+maund
+mauri
+mauritania
+mauvai
+maw
+maw
+maxim
+mai
+maydai
+mayest
+mayor
+maypol
+mayst
+maz
+maze
+maze
+maze
+mazzard
+me
+meacock
+mead
+meadow
+meadow
+mead
+meagr
+meal
+meal
+meali
+mean
+meander
+meaner
+meanest
+meaneth
+mean
+mean
+meanli
+mean
+meant
+meantim
+meanwhil
+measl
+measur
+measur
+measur
+measur
+measureless
+measur
+measur
+meat
+meat
+mechan
+mechan
+mechan
+mechan
+mechant
+med
+medal
+meddl
+meddler
+meddl
+mede
+medea
+media
+mediat
+mediat
+medic
+medicin
+medicin
+medicin
+medit
+medit
+medit
+medit
+medit
+mediterranean
+mediterraneum
+medlar
+medlar
+meed
+meed
+meek
+meekli
+meek
+meet
+meeter
+meetest
+meet
+meet
+meetli
+meet
+meet
+meg
+mehercl
+meilleur
+meini
+meisen
+melancholi
+melancholi
+melford
+mell
+melliflu
+mellow
+mellow
+melodi
+melodi
+melt
+melt
+melteth
+melt
+melt
+melun
+member
+member
+memento
+memor
+memorandum
+memori
+memori
+memori
+memoriz
+memor
+memori
+memphi
+men
+menac
+menac
+menac
+menaphon
+mena
+mend
+mend
+mender
+mend
+mend
+menecr
+menelau
+meneniu
+mental
+menteith
+mention
+menti
+menton
+mephostophilu
+mer
+mercatant
+mercatio
+mercenari
+mercenari
+mercer
+merchandis
+merchand
+merchant
+merchant
+merci
+merci
+mercifulli
+merciless
+mercuri
+mercuri
+mercuri
+mercutio
+merci
+mere
+mere
+mere
+merest
+meridian
+merit
+merit
+meritori
+merit
+merlin
+mermaid
+mermaid
+merop
+merrier
+merriest
+merrili
+merriman
+merriment
+merriment
+merri
+merri
+mervail
+me
+mesh
+mesh
+mesopotamia
+mess
+messag
+messag
+messala
+messalin
+messeng
+messeng
+mess
+messina
+met
+metal
+metal
+metamorphi
+metamorphos
+metaphor
+metaphys
+metaphys
+mete
+metellu
+meteor
+meteor
+meteyard
+metheglin
+metheglin
+methink
+methink
+method
+method
+methought
+methought
+metr
+metr
+metropoli
+mett
+mettl
+mettl
+meu
+mew
+mew
+mewl
+mexico
+mi
+mice
+michael
+michaelma
+micher
+mich
+mickl
+microcosm
+mid
+mida
+middest
+middl
+middleham
+midnight
+midriff
+midst
+midsumm
+midwai
+midwif
+midwiv
+mienn
+might
+might
+mightier
+mightiest
+mightili
+mighti
+mightst
+mighti
+milan
+milch
+mild
+milder
+mildest
+mildew
+mildew
+mildli
+mild
+mile
+mile
+milford
+militarist
+militari
+milk
+milk
+milkmaid
+milk
+milksop
+milki
+mill
+mill
+miller
+millin
+million
+million
+million
+mill
+millston
+milo
+mimic
+minc
+minc
+minc
+minc
+mind
+mind
+mind
+mindless
+mind
+mine
+miner
+miner
+minerva
+mine
+mingl
+mingl
+mingl
+minikin
+minim
+minim
+minimo
+minimu
+mine
+minion
+minion
+minist
+minist
+minist
+ministr
+minnow
+minnow
+minola
+minor
+mino
+minotaur
+minstrel
+minstrel
+minstrelsi
+mint
+mint
+minut
+minut
+minut
+minx
+mio
+mir
+mirabl
+miracl
+miracl
+miracul
+miranda
+mire
+mirror
+mirror
+mirth
+mirth
+miri
+mi
+misadventur
+misadventur
+misanthropo
+misappli
+misbecam
+misbecom
+misbecom
+misbegot
+misbegotten
+misbeliev
+misbeliev
+misbhav
+miscal
+miscal
+miscarri
+miscarri
+miscarri
+miscarri
+mischanc
+mischanc
+mischief
+mischief
+mischiev
+misconceiv
+misconst
+misconst
+misconstruct
+misconstru
+misconstru
+miscreant
+miscreat
+misde
+misde
+misdemean
+misdemeanour
+misdoubt
+misdoubteth
+misdoubt
+misenum
+miser
+miser
+miser
+misericord
+miseri
+miser
+miseri
+misfortun
+misfortun
+misgiv
+misgiv
+misgiv
+misgovern
+misgovern
+misgraf
+misguid
+mishap
+mishap
+misheard
+misinterpret
+mislead
+mislead
+mislead
+mislead
+misl
+mislik
+misord
+misplac
+misplac
+misplac
+mispri
+mispris
+mispris
+mispriz
+misproud
+misquot
+misreport
+miss
+miss
+miss
+misshap
+misshapen
+missheath
+miss
+missingli
+mission
+missiv
+missiv
+misspok
+mist
+mista
+mistak
+mistak
+mistaken
+mistak
+mistaketh
+mistak
+mistak
+mistemp
+mistemp
+misterm
+mist
+misthink
+misthought
+mistleto
+mistook
+mistread
+mistress
+mistress
+mistresss
+mistriship
+mistrust
+mistrust
+mistrust
+mistrust
+mist
+misti
+misu
+misus
+misus
+misus
+mite
+mithrid
+mitig
+mitig
+mix
+mix
+mixtur
+mixtur
+mm
+mnd
+moan
+moan
+moat
+moat
+mobl
+mock
+mockabl
+mocker
+mockeri
+mocker
+mockeri
+mock
+mock
+mockvat
+mockwat
+model
+modena
+moder
+moder
+moder
+modern
+modest
+modesti
+modestli
+modesti
+modicum
+modo
+modul
+moe
+moi
+moieti
+moist
+moisten
+moistur
+moldwarp
+mole
+molehil
+mole
+molest
+molest
+mollif
+molli
+molten
+molto
+mome
+moment
+momentari
+mome
+mon
+monachum
+monarch
+monarchi
+monarch
+monarcho
+monarch
+monarchi
+monast
+monasteri
+monast
+mondai
+mond
+monei
+monei
+mong
+monger
+monger
+mong
+mongrel
+mongrel
+mongst
+monk
+monkei
+monkei
+monk
+monmouth
+monopoli
+mon
+monsieur
+monsieur
+monster
+monster
+monstrou
+monstrous
+monstrous
+monstruos
+montacut
+montag
+montagu
+montagu
+montano
+montant
+montez
+montferrat
+montgomeri
+month
+monthli
+month
+montjoi
+monument
+monument
+monument
+mood
+mood
+moodi
+moon
+moonbeam
+moonish
+moonlight
+moon
+moonshin
+moonshin
+moor
+moorfield
+moor
+moorship
+mop
+mope
+mope
+mop
+mopsa
+moral
+moral
+moral
+moral
+mordak
+more
+moreov
+more
+morgan
+mori
+morisco
+morn
+morn
+morn
+morocco
+morri
+morrow
+morrow
+morsel
+morsel
+mort
+mortal
+mortal
+mortal
+mortal
+mortar
+mortgag
+mortifi
+mortifi
+mortim
+mortim
+morti
+mortis
+morton
+mose
+moss
+mossgrown
+most
+mote
+moth
+mother
+mother
+moth
+motion
+motionless
+motion
+motiv
+motiv
+motlei
+mot
+mought
+mould
+mould
+mouldeth
+mould
+mouldi
+moult
+moulten
+mounch
+mounseur
+mounsieur
+mount
+mountain
+mountain
+mountain
+mountain
+mountain
+mountant
+mountanto
+mountebank
+mountebank
+mount
+mounteth
+mount
+mount
+mourn
+mourn
+mourner
+mourner
+mourn
+mournfulli
+mourn
+mourningli
+mourn
+mourn
+mou
+mous
+mousetrap
+mous
+mouth
+mouth
+mouth
+mov
+movabl
+move
+moveabl
+moveabl
+move
+mover
+mover
+move
+moveth
+move
+movingli
+movousu
+mow
+mowbrai
+mower
+mow
+mow
+moi
+moi
+moys
+mr
+much
+muck
+mud
+mud
+muddi
+muddi
+muffin
+muffl
+muffl
+muffl
+muffler
+muffl
+mugger
+mug
+mulberri
+mulberri
+mule
+mule
+mulet
+mulier
+mulier
+muliteu
+mull
+mulmutiu
+multipli
+multipli
+multipli
+multipot
+multitud
+multitud
+multitudin
+mum
+mumbl
+mumbl
+mummer
+mummi
+mun
+munch
+muniment
+munit
+murd
+murder
+murder
+murder
+murder
+murder
+murder
+murder
+mure
+murk
+murkiest
+murki
+murmur
+murmur
+murmur
+murrain
+murrai
+murrion
+murther
+murther
+murther
+murther
+murther
+murther
+mu
+muscadel
+muscovit
+muscovit
+muscovi
+muse
+muse
+mush
+mushroom
+music
+music
+musician
+musician
+music
+muse
+muse
+musk
+musket
+musket
+musko
+muss
+mussel
+mussel
+must
+mustachio
+mustard
+mustardse
+muster
+muster
+muster
+musti
+mutabl
+mutabl
+mutat
+mutat
+mute
+mute
+mutest
+mutin
+mutin
+mutin
+mutin
+mutini
+mutin
+mutini
+mutiu
+mutter
+mutter
+mutton
+mutton
+mutual
+mutual
+mutual
+muzzl
+muzzl
+muzzl
+mv
+mww
+my
+mynheer
+myrmidon
+myrmidon
+myrtl
+myself
+myst
+mysteri
+mysteri
+n
+nag
+nage
+nag
+naiad
+nail
+nail
+nak
+nake
+naked
+nal
+nam
+name
+name
+nameless
+name
+name
+namest
+name
+nan
+nanc
+nap
+nape
+nape
+napkin
+napkin
+napl
+napless
+nap
+nap
+narbon
+narcissu
+narin
+narrow
+narrowli
+naso
+nasti
+nathaniel
+natif
+nation
+nation
+nativ
+nativ
+natur
+natur
+natur
+natur
+natur
+natur
+natur
+natu
+naught
+naughtili
+naughti
+navarr
+nave
+navel
+navig
+navi
+nai
+nayward
+nayword
+nazarit
+ne
+neaf
+neamnoin
+neanmoin
+neapolitan
+neapolitan
+near
+nearer
+nearest
+nearli
+near
+neat
+neatli
+neb
+nebour
+nebuchadnezzar
+nec
+necessari
+necessarili
+necessari
+necess
+necess
+necess
+neck
+necklac
+neck
+nectar
+ned
+nedar
+need
+need
+needer
+need
+needful
+need
+needl
+needl
+needless
+needli
+need
+needi
+neer
+neez
+nefa
+negat
+neg
+neg
+neglect
+neglect
+neglect
+neglectingli
+neglect
+neglig
+neglig
+negoti
+negoti
+negro
+neigh
+neighbor
+neighbour
+neighbourhood
+neighbour
+neighbourli
+neighbour
+neigh
+neigh
+neither
+nell
+nemean
+nemesi
+neoptolemu
+nephew
+nephew
+neptun
+ner
+nereid
+nerissa
+nero
+nero
+ner
+nerv
+nerv
+nervii
+nervi
+nessu
+nest
+nestor
+nest
+net
+nether
+netherland
+net
+nettl
+nettl
+nettl
+neuter
+neutral
+nev
+never
+nevil
+nevil
+new
+newborn
+newer
+newest
+newgat
+newli
+new
+new
+newsmong
+newt
+newt
+next
+nibbl
+nicanor
+nice
+nice
+nice
+nicer
+niceti
+nichola
+nick
+nicknam
+nick
+niec
+niec
+niggard
+niggard
+niggardli
+nigh
+night
+nightcap
+nightcap
+night
+nightgown
+nightingal
+nightingal
+nightli
+nightmar
+night
+nightwork
+nihil
+nile
+nill
+nilu
+nimbl
+nimbl
+nimbler
+nimbl
+nine
+nineteen
+ning
+ningli
+ninni
+ninth
+ninu
+niob
+niob
+nip
+nipp
+nip
+nippl
+nip
+nit
+nly
+nnight
+nnight
+no
+noah
+nob
+nobil
+nobi
+nobl
+nobleman
+noblemen
+nobl
+nobler
+nobl
+nobless
+noblest
+nobli
+nobodi
+noce
+nod
+nod
+nod
+noddl
+noddl
+noddi
+nod
+noe
+noint
+noi
+nois
+noiseless
+noisemak
+nois
+noisom
+nole
+nomin
+nomin
+nomin
+nominativo
+non
+nonag
+nonc
+none
+nonino
+nonni
+nonpareil
+nonsuit
+noni
+nook
+nook
+noon
+noondai
+noontid
+nor
+norberi
+norfolk
+norman
+normandi
+norman
+north
+northampton
+northamptonshir
+northerli
+northern
+northgat
+northumberland
+northumberland
+northward
+norwai
+norwai
+norwegian
+norweyan
+no
+nose
+nosegai
+noseless
+nose
+noster
+nostra
+nostril
+nostril
+not
+notabl
+notabl
+notari
+notch
+note
+notebook
+note
+notedli
+note
+notest
+noteworthi
+noth
+noth
+notic
+notifi
+note
+notion
+notori
+notori
+notr
+notwithstand
+nought
+noun
+noun
+nourish
+nourish
+nourish
+nourish
+nourisheth
+nourish
+nourish
+nou
+novel
+novelti
+novelti
+noverb
+novi
+novic
+novic
+novum
+now
+nowher
+noyanc
+ns
+nt
+nubibu
+numa
+numb
+number
+number
+number
+numberless
+number
+numb
+nun
+nuncio
+nuncl
+nunneri
+nun
+nuntiu
+nuptial
+nur
+nurs
+nurs
+nurser
+nurseri
+nurs
+nurseth
+nursh
+nurs
+nurtur
+nurtur
+nut
+nuthook
+nutmeg
+nutmeg
+nutriment
+nut
+nutshel
+ny
+nym
+nymph
+nymph
+o
+oak
+oaken
+oak
+oar
+oar
+oatcak
+oaten
+oath
+oathabl
+oath
+oat
+ob
+obduraci
+obdur
+obedi
+obedi
+obeis
+oberon
+obei
+obei
+obei
+obei
+obidicut
+object
+object
+object
+object
+oblat
+oblat
+oblig
+oblig
+oblig
+obliqu
+oblivion
+oblivi
+obloqui
+obscen
+obscen
+obscur
+obscur
+obscur
+obscur
+obscur
+obscur
+obscur
+obsequi
+obsequi
+obsequi
+observ
+observ
+observ
+observ
+observ
+observ
+observ
+observ
+observ
+observ
+observ
+observ
+observingli
+obsqu
+obstacl
+obstacl
+obstinaci
+obstin
+obstin
+obstruct
+obstruct
+obstruct
+obtain
+obtain
+obtain
+occas
+occas
+occid
+occident
+occult
+occupat
+occup
+occup
+occupi
+occupi
+occupi
+occurr
+occurr
+occurr
+ocean
+ocean
+octavia
+octaviu
+ocular
+od
+odd
+oddest
+oddli
+odd
+od
+od
+odiou
+odorifer
+odor
+odour
+odour
+od
+oeillad
+oe
+oeuvr
+of
+ofephesu
+off
+offal
+offenc
+offenc
+offenc
+offend
+offend
+offendendo
+offend
+offend
+offendeth
+offend
+offendress
+offend
+offens
+offenseless
+offens
+offens
+offer
+offer
+offer
+offer
+offer
+offert
+offic
+offic
+offic
+offic
+offic
+offic
+offici
+offici
+offspr
+oft
+often
+often
+oftentim
+oh
+oil
+oil
+oili
+old
+oldcastl
+olden
+older
+oldest
+old
+oliv
+oliv
+oliv
+oliv
+olivia
+olympian
+olympu
+oman
+oman
+omen
+omin
+omiss
+omit
+omitt
+omit
+omit
+omn
+omn
+omnipot
+on
+onc
+on
+on
+oney
+ongl
+onion
+onion
+onli
+onset
+onward
+onward
+oo
+ooz
+ooz
+oozi
+op
+opal
+op
+open
+open
+open
+openli
+open
+open
+oper
+oper
+oper
+oper
+oper
+op
+oph
+ophelia
+opinion
+opinion
+opportun
+opportun
+opportun
+oppo
+oppos
+oppos
+opposeless
+oppos
+oppos
+oppos
+oppos
+opposit
+opposit
+opposit
+opposit
+oppress
+oppress
+oppress
+oppresseth
+oppress
+oppress
+oppressor
+opprest
+opprobri
+oppugn
+opul
+opul
+or
+oracl
+oracl
+orang
+orat
+orat
+orat
+oratori
+orb
+orb
+orb
+orchard
+orchard
+ord
+ordain
+ordain
+ordain
+order
+order
+order
+orderless
+orderli
+order
+ordin
+ordin
+ordinari
+ordinari
+ordnanc
+ord
+ordur
+or
+organ
+organ
+orgil
+orient
+orifex
+origin
+origin
+orison
+ork
+orlando
+orld
+orlean
+ornament
+ornament
+orod
+orphan
+orphan
+orpheu
+orsino
+ort
+orthographi
+ort
+oscorbidulcho
+osier
+osier
+osprei
+osr
+osric
+ossa
+ost
+ostent
+ostentar
+ostent
+ostent
+ostler
+ostler
+ostrich
+osw
+oswald
+othello
+other
+otherg
+other
+otherwher
+otherwhil
+otherwis
+otter
+ottoman
+ottomit
+oubli
+ouch
+ought
+oui
+ounc
+ounc
+ouph
+our
+our
+ourself
+ourselv
+ousel
+out
+outbid
+outbrav
+outbrav
+outbreak
+outcast
+outcri
+outcri
+outdar
+outdar
+outdar
+outdon
+outfac
+outfac
+outfac
+outfac
+outfli
+outfrown
+outgo
+outgo
+outgrown
+outjest
+outlaw
+outlawri
+outlaw
+outliv
+outliv
+outliv
+outliv
+outlook
+outlustr
+outpriz
+outrag
+outrag
+outrag
+outran
+outright
+outroar
+outrun
+outrun
+outrun
+outscold
+outscorn
+outsel
+outsel
+outsid
+outsid
+outspeak
+outsport
+outstar
+outstai
+outstood
+outstretch
+outstretch
+outstrik
+outstrip
+outstrip
+outswear
+outvenom
+outward
+outwardli
+outward
+outwear
+outweigh
+outwent
+outworn
+outworth
+oven
+over
+overaw
+overbear
+overblown
+overboard
+overbold
+overborn
+overbulk
+overbui
+overcam
+overcast
+overcharg
+overcharg
+overcom
+overcom
+overdon
+overearnest
+overfar
+overflow
+overflown
+overgl
+overgo
+overgon
+overgorg
+overgrown
+overhead
+overhear
+overheard
+overhold
+overjoi
+overkind
+overland
+overleath
+overl
+overlook
+overlook
+overlook
+overmast
+overmount
+overmuch
+overpass
+overp
+overp
+overplu
+overrul
+overrun
+overscutch
+overset
+overshad
+overshin
+overshin
+overshot
+oversight
+overspread
+overstain
+overswear
+overt
+overta
+overtak
+overtaketh
+overthrow
+overthrown
+overthrow
+overtook
+overtopp
+overtur
+overturn
+overwatch
+overween
+overween
+overweigh
+overwhelm
+overwhelm
+overworn
+ovid
+ovidiu
+ow
+ow
+ow
+owedst
+owen
+ow
+owest
+oweth
+ow
+owl
+owl
+own
+owner
+owner
+own
+own
+owi
+ox
+oxen
+oxford
+oxfordshir
+oxlip
+oy
+oyster
+p
+pabbl
+pabylon
+pac
+pace
+pace
+pace
+pacifi
+pacifi
+pace
+pack
+packet
+packet
+packhors
+pack
+pack
+pack
+packthread
+pacoru
+paction
+pad
+paddl
+paddl
+paddock
+padua
+pagan
+pagan
+page
+pageant
+pageant
+page
+pah
+paid
+pail
+pail
+pail
+pain
+pain
+pain
+painfulli
+pain
+paint
+paint
+painter
+paint
+paint
+paint
+pair
+pair
+pair
+pajock
+pal
+palabra
+palac
+palac
+palamed
+palat
+palat
+palatin
+palat
+pale
+pale
+pale
+paler
+pale
+palestin
+palfrei
+palfrei
+palisado
+pall
+pallabri
+palla
+pallet
+palm
+palmer
+palmer
+palm
+palmi
+palpabl
+palsi
+palsi
+palsi
+palt
+palter
+paltri
+pali
+pamp
+pamper
+pamphlet
+pan
+pancack
+pancak
+pancak
+pandar
+pandar
+pandaru
+pander
+panderli
+pander
+pandulph
+panel
+pang
+pang
+pang
+pannier
+pannonian
+pansa
+pansi
+pant
+pantaloon
+pant
+pantheon
+panther
+panthino
+pant
+pantingli
+pantler
+pantri
+pant
+pap
+papal
+paper
+paper
+paphlagonia
+papho
+papist
+pap
+par
+parabl
+paracelsu
+paradis
+paradox
+paradox
+paragon
+paragon
+parallel
+parallel
+paramour
+paramour
+parapet
+paraquito
+parasit
+parasit
+parca
+parcel
+parcel
+parcel
+parch
+parch
+parch
+parchment
+pard
+pardon
+pardona
+pardon
+pardon
+pardon
+pardonn
+pardonn
+pardonnez
+pardon
+pare
+pare
+parel
+parent
+parentag
+parent
+parfect
+pare
+pare
+pari
+parish
+parishion
+parisian
+paritor
+park
+park
+parl
+parler
+parl
+parlei
+parlez
+parliament
+parlor
+parlour
+parlou
+parmac
+parol
+parricid
+parricid
+parrot
+parrot
+parslei
+parson
+part
+partak
+partaken
+partak
+partak
+part
+parthia
+parthian
+parthian
+parti
+partial
+partial
+partial
+particip
+particip
+particl
+particular
+particular
+particular
+particularli
+particular
+parti
+part
+partisan
+partisan
+partit
+partizan
+partlet
+partli
+partner
+partner
+partridg
+part
+parti
+pa
+pash
+pash
+pash
+pass
+passabl
+passado
+passag
+passag
+passant
+pass
+passeng
+passeng
+pass
+passeth
+pass
+passio
+passion
+passion
+passion
+passion
+passiv
+passport
+passi
+past
+past
+pastern
+pasti
+pastim
+pastim
+pastor
+pastor
+pastor
+pastri
+pastur
+pastur
+pasti
+pat
+patai
+patch
+patcheri
+patch
+pate
+pate
+patent
+patent
+patern
+pate
+path
+pathet
+path
+pathwai
+pathwai
+patienc
+patient
+patient
+patient
+patin
+patrician
+patrician
+patrick
+patrimoni
+patroclu
+patron
+patronag
+patro
+patron
+patrum
+patter
+pattern
+pattern
+pattl
+pauca
+pauca
+paul
+paulina
+paunch
+paunch
+paus
+pauser
+paus
+pausingli
+pauvr
+pav
+pave
+pavement
+pavilion
+pavilion
+pavin
+paw
+pawn
+pawn
+paw
+pax
+pai
+payest
+pai
+payment
+payment
+pai
+paysan
+paysan
+pe
+peac
+peaceabl
+peaceabl
+peac
+peacemak
+peac
+peach
+peach
+peacock
+peacock
+peak
+peak
+peal
+peal
+pear
+peard
+pearl
+pearl
+pear
+pea
+peasant
+peasantri
+peasant
+peascod
+peas
+peaseblossom
+peat
+peaten
+peat
+pebbl
+pebbl
+pebbl
+peck
+peck
+peculiar
+pecu
+pedant
+pedant
+pedascul
+pede
+pedest
+pedigre
+pedlar
+pedlar
+pedro
+ped
+peel
+peep
+peep
+peep
+peep
+peer
+peereth
+peer
+peerless
+peer
+peesel
+peevish
+peevishli
+peflur
+peg
+pegasu
+peg
+peis
+peis
+peiz
+pelf
+pelican
+pelion
+pell
+pella
+pellet
+peloponnesu
+pelt
+pelt
+pembrok
+pen
+penalti
+penalti
+penanc
+penc
+pencil
+pencil
+pencil
+pendant
+pendent
+pendragon
+pendul
+penelop
+penetr
+penetr
+penetr
+penit
+penit
+penitenti
+penit
+penit
+penker
+penknif
+penn
+pen
+pen
+pennon
+penni
+pennyworth
+pennyworth
+pen
+pens
+pension
+pension
+pensiv
+pensiv
+pensiv
+pent
+pentecost
+penthesilea
+penthous
+penuri
+penuri
+peopl
+peopl
+peopl
+peopl
+pepin
+pepper
+peppercorn
+pepper
+per
+peradventur
+peradventur
+perceiv
+perceiv
+perceiv
+perceiv
+perceiveth
+perch
+perchanc
+perci
+percuss
+perci
+perdi
+perdita
+perdit
+perdonato
+perdu
+perdur
+perdur
+perdi
+pere
+peregrin
+peremptorili
+peremptori
+perfect
+perfect
+perfect
+perfectest
+perfect
+perfect
+perfectli
+perfect
+perfidi
+perfidi
+perforc
+perform
+perform
+perform
+perform
+perform
+perform
+perform
+perform
+perfum
+perfum
+perfum
+perfum
+perfum
+perg
+perhap
+periapt
+perigort
+perigouna
+peril
+peril
+peril
+period
+period
+perish
+perish
+perishest
+perisheth
+perish
+periwig
+perjur
+perjur
+perjur
+perjuri
+perjuri
+perk
+perk
+permafoi
+perman
+permiss
+permiss
+permit
+permit
+pernici
+pernici
+peror
+perpend
+perpendicular
+perpendicularli
+perpetu
+perpetu
+perpetu
+perplex
+perplex
+perplex
+per
+persecut
+persecut
+persecutor
+perseu
+persev
+persever
+persev
+persia
+persian
+persist
+persist
+persist
+persist
+persist
+person
+persona
+personag
+personag
+person
+person
+person
+person
+person
+person
+person
+perspect
+perspect
+perspect
+perspicu
+persuad
+persuad
+persuad
+persuad
+persuas
+persuas
+pert
+pertain
+pertain
+pertain
+pertaunt
+pertin
+pertli
+perturb
+perturb
+perturb
+perturb
+peru
+perus
+perus
+perus
+perus
+pervers
+pervers
+pervers
+pervert
+pervert
+peseech
+pest
+pester
+pestifer
+pestil
+pestil
+pet
+petar
+peter
+petit
+petit
+petitionari
+petition
+petition
+petit
+peto
+petrarch
+petruchio
+petter
+petticoat
+petticoat
+petti
+pettish
+pettito
+petti
+peu
+pew
+pewter
+pewter
+phaethon
+phaeton
+phantasim
+phantasim
+phantasma
+pharamond
+pharaoh
+pharsalia
+pheasant
+pheazar
+phebe
+phebe
+pheebu
+pheez
+phibbu
+philadelpho
+philario
+philarmonu
+philemon
+philip
+philippan
+philipp
+philippi
+phillida
+philo
+philomel
+philomela
+philosoph
+philosoph
+philosoph
+philosophi
+philostr
+philotu
+phlegmat
+phoeb
+phoebu
+phoenicia
+phoenician
+phoenix
+phorbu
+photinu
+phrase
+phraseless
+phrase
+phrygia
+phrygian
+phrynia
+physic
+physic
+physician
+physician
+physic
+pia
+pibbl
+pibl
+picardi
+pick
+pickax
+pickax
+pickbon
+pick
+picker
+pick
+pickl
+picklock
+pickpurs
+pick
+pickt
+pickthank
+pictur
+pictur
+pictur
+pictur
+pid
+pie
+piec
+piec
+piec
+piec
+pi
+pied
+pier
+pierc
+pierc
+pierc
+pierc
+pierceth
+pierc
+pierci
+pier
+pi
+pieti
+pig
+pigeon
+pigeon
+pight
+pigmi
+pigrogromitu
+pike
+pike
+pil
+pilat
+pilat
+pilcher
+pile
+pile
+pilf
+pilfer
+pilgrim
+pilgrimag
+pilgrim
+pill
+pillag
+pillag
+pillar
+pillar
+pillicock
+pillori
+pillow
+pillow
+pill
+pilot
+pilot
+pimpernel
+pin
+pinch
+pinch
+pinch
+pinch
+pindaru
+pine
+pine
+pine
+pinfold
+pine
+pinion
+pink
+pinn
+pinnac
+pin
+pins
+pint
+pintpot
+pion
+pioneer
+pioner
+pioner
+piou
+pip
+pipe
+piper
+piper
+pipe
+pipe
+pippin
+pippin
+pirat
+pirat
+pisa
+pisanio
+pish
+pismir
+piss
+piss
+pistol
+pistol
+pit
+pitch
+pitch
+pitcher
+pitcher
+pitchi
+piteou
+piteous
+pitfal
+pith
+pithless
+pithi
+piti
+piti
+piti
+piti
+pitifulli
+pitiless
+pit
+pittanc
+pitti
+pittikin
+piti
+piti
+piu
+plac
+place
+place
+placentio
+place
+placeth
+placid
+place
+plack
+placket
+placket
+plagu
+plagu
+plagu
+plagu
+plagu
+plagui
+plain
+plainer
+plainest
+plain
+plain
+plainli
+plain
+plain
+plainsong
+plaint
+plaintiff
+plaintiff
+plaint
+planch
+planet
+planetari
+planet
+plank
+plant
+plantag
+plantagenet
+plantagenet
+plantain
+plantat
+plant
+planteth
+plant
+plash
+plashi
+plast
+plaster
+plaster
+plat
+plate
+plate
+plate
+platform
+platform
+plat
+plat
+plausibl
+plausiv
+plautu
+plai
+plai
+player
+player
+playeth
+playfellow
+playfellow
+playhous
+plai
+plai
+plea
+pleach
+pleach
+plead
+plead
+pleader
+pleader
+plead
+plead
+plea
+pleasanc
+pleasant
+pleasantli
+pleas
+pleas
+pleaser
+pleaser
+pleas
+pleasest
+pleaseth
+pleas
+pleasur
+pleasur
+plebeian
+plebeii
+pleb
+pledg
+pledg
+plein
+plenitud
+plenteou
+plenteous
+plenti
+plenti
+plentifulli
+plenti
+pless
+pless
+pless
+pliant
+pli
+pli
+plight
+plight
+plighter
+plod
+plod
+plodder
+plod
+plod
+plood
+ploodi
+plot
+plot
+plot
+plotter
+plough
+plough
+ploughman
+ploughmen
+plow
+plow
+pluck
+pluck
+plucker
+pluck
+pluck
+plue
+plum
+plume
+plume
+plume
+plummet
+plump
+plumpi
+plum
+plung
+plung
+plung
+plural
+plurisi
+plu
+pluto
+plutu
+ply
+po
+pocket
+pocket
+pocket
+pocki
+podi
+poem
+poesi
+poet
+poetic
+poetri
+poet
+poictier
+poinard
+poin
+point
+pointblank
+point
+point
+point
+poi
+pois
+pois
+poison
+poison
+poison
+poison
+poison
+poison
+poke
+poke
+pol
+polack
+polack
+poland
+pold
+pole
+poleax
+polecat
+polecat
+polemon
+pole
+poli
+polici
+polici
+polish
+polish
+polit
+politician
+politician
+politicli
+polixen
+poll
+pollut
+pollut
+poloniu
+poltroon
+polus
+polydamu
+polydor
+polyxena
+pomand
+pomegran
+pomewat
+pomfret
+pomgarnet
+pommel
+pomp
+pompeiu
+pompei
+pompion
+pompou
+pomp
+pond
+ponder
+ponder
+pond
+poniard
+poniard
+pont
+pontic
+pontif
+ponton
+pooh
+pool
+pool
+poop
+poor
+poorer
+poorest
+poorli
+pop
+pope
+popedom
+popiliu
+popingai
+popish
+popp
+poppi
+pop
+popular
+popular
+popul
+porch
+porch
+pore
+pore
+pork
+porn
+porpentin
+porridg
+porring
+port
+portabl
+portag
+portal
+portanc
+portculli
+portend
+portend
+portent
+portent
+portent
+porter
+porter
+portia
+portion
+portli
+portotartarossa
+portrait
+portraitur
+port
+portug
+pose
+posi
+posi
+posit
+posit
+posit
+poss
+possess
+possess
+possess
+possesseth
+possess
+possess
+possess
+possessor
+posset
+posset
+possibl
+possibl
+possibl
+possibl
+possit
+post
+post
+post
+posterior
+posterior
+poster
+postern
+postern
+poster
+posthors
+posthors
+posthumu
+post
+postmast
+post
+postscript
+postur
+postur
+posi
+pot
+potabl
+potat
+potato
+potato
+potch
+potenc
+potent
+potent
+potenti
+potent
+potent
+pothecari
+pother
+potion
+potion
+potpan
+pot
+potter
+pot
+pottl
+pouch
+poulter
+poultic
+poultnei
+pouncet
+pound
+pound
+pour
+pourest
+pour
+pourquoi
+pour
+pout
+poverti
+pow
+powd
+powder
+power
+power
+powerfulli
+powerless
+power
+pox
+poi
+poysam
+prabbl
+practic
+practic
+practic
+practic
+practic
+practic
+practi
+practis
+practis
+practis
+practis
+practis
+practis
+praeclarissimu
+praemunir
+praetor
+praetor
+prag
+pragu
+prain
+prain
+prai
+prais
+prais
+prais
+praisest
+praiseworthi
+prais
+pranc
+prank
+prank
+prat
+prate
+prate
+prater
+prate
+prattl
+prattler
+prattl
+prave
+prawl
+prawn
+prai
+prayer
+prayer
+prai
+prai
+pre
+preach
+preach
+preacher
+preach
+preach
+preachment
+pread
+preambul
+preced
+preced
+preced
+precept
+precepti
+precept
+precinct
+preciou
+precious
+precipic
+precipit
+precipit
+precis
+precis
+precis
+precisian
+precor
+precurs
+precursor
+predeceas
+predecessor
+predecessor
+predestin
+predica
+predict
+predict
+predict
+predomin
+predomin
+predomin
+preech
+preemin
+prefac
+prefer
+prefer
+prefer
+preferr
+preferreth
+prefer
+prefer
+prefigur
+prefix
+prefix
+preform
+pregnanc
+pregnant
+pregnantli
+prejud
+prejudic
+prejudici
+prelat
+premedit
+premedit
+premis
+premis
+prenez
+prenomin
+prentic
+prentic
+preordin
+prepar
+prepar
+prepar
+prepar
+prepar
+preparedli
+prepar
+prepar
+prepost
+preposter
+preposter
+prerogatif
+prerog
+prerogativ
+presag
+presag
+presag
+presageth
+presag
+prescienc
+prescrib
+prescript
+prescript
+prescript
+prescript
+presenc
+presenc
+present
+present
+present
+present
+present
+presenteth
+present
+present
+present
+present
+preserv
+preserv
+preserv
+preserv
+preserv
+preserv
+preserv
+preserv
+presid
+press
+press
+presser
+press
+press
+pressur
+pressur
+prest
+prester
+presum
+presum
+presum
+presumpt
+presumptu
+presuppo
+pret
+pretenc
+pretenc
+pretend
+pretend
+pretend
+pretens
+pretext
+pretia
+prettier
+prettiest
+prettili
+pretti
+pretti
+prevail
+prevail
+prevaileth
+prevail
+prevail
+prevail
+prevent
+prevent
+prevent
+prevent
+prevent
+prei
+prey
+prei
+priam
+priami
+priamu
+pribbl
+price
+prick
+prick
+pricket
+prick
+prick
+pricksong
+pride
+pride
+pridg
+prie
+pri
+prief
+pri
+priest
+priesthood
+priest
+prig
+primal
+prime
+primer
+primero
+primest
+primit
+primo
+primogen
+primros
+primros
+primi
+princ
+princ
+princ
+princess
+princip
+princip
+princip
+principl
+principl
+princox
+pring
+print
+print
+print
+printless
+print
+prioress
+priori
+prioriti
+priori
+priscian
+prison
+prison
+prison
+prison
+prisonni
+prison
+pristin
+prith
+prithe
+privaci
+privat
+privat
+privat
+privilag
+privileg
+privileg
+privileg
+privileg
+privilegio
+privili
+priviti
+privi
+priz
+prize
+prize
+prizer
+prize
+prizest
+prize
+pro
+probabl
+probal
+probat
+proce
+proceed
+proceed
+proceed
+proceed
+proce
+process
+process
+proclaim
+proclaim
+proclaimeth
+proclaim
+proclam
+proclam
+proconsul
+procrastin
+procreant
+procreant
+procreat
+procru
+proculeiu
+procur
+procur
+procur
+procur
+procur
+procur
+prodig
+prodig
+prodig
+prodig
+prodigi
+prodigi
+prodigi
+prodigi
+proditor
+produc
+produc
+produc
+produc
+produc
+profac
+profan
+profan
+profan
+profan
+profan
+profan
+profan
+profan
+profess
+profess
+profess
+profess
+profess
+professor
+proffer
+proffer
+proffer
+proffer
+profici
+profit
+profit
+profit
+profit
+profit
+profitless
+profit
+profound
+profoundest
+profoundli
+progenitor
+progeni
+progn
+prognost
+prognost
+progress
+progress
+prohibit
+prohibit
+project
+project
+project
+prolixi
+prolix
+prologu
+prologu
+prolong
+prolong
+promethean
+prometheu
+promi
+promis
+promis
+promis
+promiseth
+promis
+promontori
+promot
+promot
+prompt
+prompt
+promptement
+prompter
+prompt
+prompt
+promptur
+promulg
+prone
+prononc
+prononcez
+pronoun
+pronounc
+pronounc
+pronounc
+pronounc
+pronoun
+proof
+proof
+prop
+propag
+propag
+propend
+propens
+proper
+proper
+properli
+properti
+properti
+properti
+propheci
+propheci
+prophesi
+prophesi
+prophesi
+prophesi
+prophet
+prophetess
+prophet
+prophet
+prophet
+propinqu
+propont
+proport
+proportion
+proport
+propo
+propos
+propos
+propos
+propos
+propos
+proposit
+proposit
+propound
+propp
+propr
+proprieti
+prop
+propugn
+prorogu
+prorogu
+proscript
+proscript
+prose
+prosecut
+prosecut
+proselyt
+proserpina
+prosp
+prospect
+prosper
+prosper
+prospero
+prosper
+prosper
+prosper
+prostitut
+prostrat
+protect
+protect
+protect
+protector
+protector
+protectorship
+protectress
+protect
+protest
+protest
+protest
+protest
+protest
+protest
+protest
+proteu
+protheu
+protract
+protract
+proud
+prouder
+proudest
+proudlier
+proudli
+proud
+prov
+provand
+prove
+prove
+provend
+proverb
+proverb
+prove
+proveth
+provid
+provid
+provid
+provid
+provid
+provid
+provid
+provinc
+provinc
+provinci
+prove
+provis
+proviso
+provoc
+provok
+provok
+provok
+provok
+provok
+provoketh
+provok
+provost
+prowess
+prudenc
+prudent
+prun
+prune
+prune
+prune
+pry
+pry
+psalm
+psalmist
+psalm
+psalteri
+ptolemi
+ptolemi
+public
+publican
+public
+publicli
+publicola
+publish
+publish
+publish
+publish
+publiu
+pucel
+puck
+pudder
+pud
+pud
+puddl
+puddl
+pudenc
+pueritia
+puff
+puf
+puff
+pug
+pui
+puissanc
+puissant
+puke
+puke
+pulcher
+pule
+pull
+puller
+pullet
+pull
+pull
+pulpit
+pulpit
+pulpit
+puls
+pulsidg
+pump
+pumpion
+pump
+pun
+punch
+punish
+punish
+punish
+punish
+punish
+punk
+punto
+puni
+pupil
+pupil
+puppet
+puppet
+puppi
+puppi
+pur
+purblind
+purcha
+purchas
+purchas
+purchas
+purchaseth
+purchas
+pure
+pure
+purer
+purest
+purg
+purgat
+purg
+purgatori
+purg
+purg
+purger
+purg
+purifi
+purifi
+puritan
+puriti
+purlieu
+purpl
+purpl
+purpl
+purport
+purpo
+purpos
+purpos
+purpos
+purpos
+purposeth
+purpos
+purr
+pur
+purs
+pursent
+purs
+pursu
+pursu
+pursu
+pursuer
+pursu
+pursuest
+pursueth
+pursu
+pursuit
+pursuiv
+pursuiv
+pursi
+puru
+purveyor
+push
+push
+pusillanim
+put
+putrefi
+putrifi
+put
+putter
+put
+puttock
+puzzel
+puzzl
+puzzl
+puzzl
+py
+pygmalion
+pygmi
+pygmi
+pyramid
+pyramid
+pyramid
+pyrami
+pyramis
+pyramu
+pyrenean
+pyrrhu
+pythagora
+qu
+quadrangl
+quae
+quaff
+quaf
+quagmir
+quail
+quail
+quail
+quaint
+quaintli
+quak
+quak
+quak
+qualif
+qualifi
+qualifi
+qualifi
+qualifi
+qualit
+qualiti
+qualiti
+qualm
+qualmish
+quam
+quand
+quando
+quantiti
+quantiti
+quar
+quarrel
+quarrel
+quarrel
+quarrel
+quarrel
+quarrel
+quarrelsom
+quarri
+quarri
+quart
+quarter
+quarter
+quarter
+quarter
+quart
+quasi
+quat
+quatch
+quai
+que
+quean
+quea
+queasi
+queasi
+queen
+queen
+quell
+queller
+quench
+quench
+quench
+quenchless
+quern
+quest
+questant
+question
+question
+question
+question
+questionless
+question
+questrist
+quest
+queubu
+qui
+quick
+quicken
+quicken
+quicker
+quicklier
+quickli
+quick
+quicksand
+quicksand
+quicksilverr
+quid
+quidditi
+quiddit
+quier
+quiet
+quieter
+quietli
+quiet
+quietu
+quill
+quillet
+quill
+quilt
+quinapalu
+quinc
+quinc
+quintain
+quintess
+quintu
+quip
+quip
+quir
+quir
+quirk
+quirk
+qui
+quit
+quit
+quit
+quittanc
+quit
+quit
+quiver
+quiver
+quiver
+quo
+quod
+quoif
+quoint
+quoit
+quoit
+quondam
+quoniam
+quot
+quot
+quot
+quoth
+quotidian
+r
+rabbit
+rabbl
+rabblement
+race
+rack
+racker
+racket
+racket
+rack
+rack
+radianc
+radiant
+radish
+rafe
+raft
+rag
+rage
+rage
+rageth
+ragg
+rag
+ragged
+rage
+ragozin
+rag
+rah
+rail
+rail
+railer
+railest
+raileth
+rail
+rail
+raiment
+rain
+rainbow
+raineth
+rain
+rainold
+rain
+raini
+rai
+rais
+rais
+rais
+rais
+raisin
+rak
+rake
+raker
+rake
+ral
+rald
+ralph
+ram
+rambur
+ramm
+rampallian
+rampant
+ramp
+rampir
+ramp
+ram
+ramsei
+ramston
+ran
+ranc
+rancor
+rancor
+rancour
+random
+rang
+rang
+rang
+ranger
+rang
+rang
+rank
+ranker
+rankest
+rank
+rankl
+rankli
+rank
+rank
+ransack
+ransack
+ransom
+ransom
+ransom
+ransomless
+ransom
+rant
+rant
+rap
+rape
+rape
+rapier
+rapier
+rapin
+rap
+rapt
+raptur
+raptur
+rar
+rare
+rare
+rare
+rarer
+rarest
+rariti
+rariti
+rascal
+rascalliest
+rascal
+rascal
+rase
+rash
+rasher
+rashli
+rash
+rat
+ratcatch
+ratcliff
+rate
+rate
+rate
+rate
+rather
+ratherest
+ratifi
+ratifi
+ratifi
+rate
+ration
+ratolorum
+rat
+ratsban
+rattl
+rattl
+rattl
+ratur
+raught
+rav
+rave
+ravel
+raven
+raven
+raven
+raven
+ravenspurgh
+rave
+ravin
+rave
+ravish
+ravish
+ravish
+ravish
+ravish
+raw
+rawer
+rawli
+raw
+rai
+rai
+rai
+raz
+raze
+raze
+raze
+razeth
+raze
+razor
+razor
+razor
+razur
+re
+reach
+reach
+reacheth
+reach
+read
+reader
+readiest
+readili
+readi
+read
+readin
+read
+readi
+real
+realli
+realm
+realm
+reap
+reaper
+reap
+reap
+rear
+rear
+rearward
+reason
+reason
+reason
+reason
+reason
+reasonless
+reason
+reav
+rebat
+rebato
+rebeck
+rebel
+rebel
+rebel
+rebellion
+rebelli
+rebel
+rebound
+rebuk
+rebuk
+rebuk
+rebuk
+rebuk
+rebu
+recal
+recant
+recant
+recant
+recant
+receipt
+receipt
+receiv
+receiv
+receiv
+receiv
+receiv
+receivest
+receiveth
+receiv
+receptacl
+rechat
+reciproc
+reciproc
+recit
+recit
+reciterai
+reck
+reck
+reckless
+reckon
+reckon
+reckon
+reckon
+reck
+reclaim
+reclaim
+reclus
+recogniz
+recogniz
+recoil
+recoil
+recollect
+recomfort
+recomfortur
+recommend
+recommend
+recommend
+recompen
+recompens
+reconcil
+reconcil
+reconcil
+reconcil
+reconcil
+reconcil
+reconcili
+record
+record
+record
+record
+record
+record
+recount
+recount
+recount
+recount
+recount
+recours
+recov
+recov
+recover
+recov
+recoveri
+recov
+recoveri
+recreant
+recreant
+recreat
+recreat
+rectifi
+rector
+rectorship
+recur
+recur
+red
+redbreast
+redder
+reddest
+rede
+redeem
+redeem
+redeem
+redeem
+redeem
+redeliv
+redempt
+redim
+red
+redoubl
+redoubt
+redound
+redress
+redress
+redress
+reduc
+reechi
+reed
+reed
+reek
+reek
+reek
+reeki
+reel
+reeleth
+reel
+reel
+refel
+refer
+refer
+referr
+refer
+refigur
+refin
+refin
+reflect
+reflect
+reflect
+reflex
+reform
+reform
+reform
+refractori
+refrain
+refresh
+refresh
+reft
+reft
+refug
+refu
+refus
+refus
+refus
+refusest
+refus
+reg
+regal
+regalia
+regan
+regard
+regard
+regard
+regardfulli
+regard
+regard
+regener
+regent
+regentship
+regia
+regiment
+regiment
+regina
+region
+region
+regist
+regist
+regist
+regreet
+regreet
+regress
+reguerdon
+regular
+rehear
+rehears
+rehears
+reign
+reign
+reignier
+reign
+reign
+rein
+reinforc
+reinforc
+reinforc
+rein
+reiter
+reject
+reject
+rejoic
+rejoic
+rejoic
+rejoiceth
+rejoic
+rejoicingli
+rejoindur
+rejourn
+rel
+relaps
+relat
+relat
+relat
+relat
+rel
+relea
+releas
+releas
+releas
+relent
+relent
+relent
+relianc
+relic
+relief
+reliev
+reliev
+reliev
+reliev
+reliev
+religion
+religion
+religi
+religi
+relinquish
+reliqu
+reliquit
+relish
+relum
+reli
+reli
+remain
+remaind
+remaind
+remain
+remaineth
+remain
+remain
+remark
+remark
+remedi
+remedi
+remedi
+remedi
+rememb
+rememb
+rememb
+rememb
+remembr
+remembranc
+remembr
+remercimen
+remiss
+remiss
+remiss
+remit
+remnant
+remnant
+remonstr
+remors
+remors
+remorseless
+remot
+remot
+remov
+remov
+remov
+removed
+remov
+remov
+remov
+remuner
+remuner
+renc
+rend
+render
+render
+render
+rendezv
+renegado
+reneg
+reneg
+renew
+renew
+renewest
+renounc
+renounc
+renounc
+renowm
+renown
+renown
+rent
+rent
+repaid
+repair
+repair
+repair
+repair
+repass
+repast
+repastur
+repai
+repai
+repai
+repeal
+repeal
+repeal
+repeat
+repeat
+repeat
+repeat
+repel
+repent
+repent
+repent
+repent
+repent
+repent
+repetit
+repetit
+repin
+repin
+repin
+replant
+replenish
+replenish
+replet
+replic
+repli
+repli
+repliest
+repli
+repli
+report
+report
+report
+reportest
+report
+reportingli
+report
+repos
+repos
+reposeth
+repos
+repossess
+reprehend
+reprehend
+reprehend
+repres
+repres
+repriev
+repriev
+repris
+reproach
+reproach
+reproach
+reproachfulli
+reprob
+reprob
+reproof
+reprov
+reprov
+reprov
+reprov
+reprov
+repugn
+repugn
+repugn
+repuls
+repuls
+repurcha
+repur
+reput
+reput
+reput
+reputeless
+reput
+reput
+request
+request
+request
+request
+requiem
+requir
+requir
+requir
+requir
+requireth
+requir
+requisit
+requisit
+requit
+requit
+requit
+requit
+requit
+rer
+rere
+rer
+rescu
+rescu
+rescu
+rescu
+rescu
+resembl
+resembl
+resembl
+resembl
+resembleth
+resembl
+reserv
+reserv
+reserv
+reserv
+reserv
+resid
+resid
+resid
+resid
+resid
+residu
+resign
+resign
+resist
+resist
+resist
+resist
+resist
+resolut
+resolut
+resolut
+resolut
+resolv
+resolv
+resolv
+resolvedli
+resolv
+resolveth
+resort
+resort
+resound
+resound
+respeak
+respect
+respect
+respect
+respect
+respect
+respect
+respic
+respit
+respit
+respons
+respos
+ress
+rest
+rest
+resteth
+rest
+rest
+restitut
+restless
+restor
+restor
+restor
+restor
+restor
+restor
+restor
+restrain
+restrain
+restrain
+restrain
+restraint
+rest
+resti
+resum
+resum
+resum
+resurrect
+retail
+retail
+retain
+retain
+retain
+retel
+retent
+retent
+retinu
+retir
+retir
+retir
+retir
+retir
+retir
+retold
+retort
+retort
+retourn
+retract
+retreat
+retrograd
+ret
+return
+return
+returnest
+returneth
+return
+return
+revania
+reveal
+reveal
+revel
+revel
+revel
+revel
+revel
+revel
+revelri
+revel
+reveng
+reveng
+reveng
+reveng
+reveng
+reveng
+reveng
+reveng
+reveng
+revengingli
+revenu
+revenu
+reverb
+reverber
+reverb
+reverenc
+rever
+reverend
+rever
+rever
+rever
+revers
+revers
+revert
+review
+reviewest
+revil
+revil
+revisit
+reviv
+reviv
+reviv
+reviv
+revok
+revok
+revok
+revolt
+revolt
+revolt
+revolt
+revolut
+revolut
+revolv
+revolv
+reward
+reward
+reward
+reward
+reward
+reword
+reword
+rex
+rei
+reynaldo
+rford
+rful
+rfull
+rhapsodi
+rheim
+rhenish
+rhesu
+rhetor
+rheum
+rheumat
+rheum
+rheumi
+rhinocero
+rhode
+rhodop
+rhubarb
+rhym
+rhyme
+rhymer
+rhyme
+rhyme
+rialto
+rib
+ribald
+riband
+riband
+ribaudr
+ribb
+rib
+ribbon
+ribbon
+rib
+rice
+rich
+richard
+richer
+rich
+richest
+richli
+richmond
+richmond
+rid
+riddanc
+ridden
+riddl
+riddl
+riddl
+ride
+rider
+rider
+ride
+ridest
+rideth
+ridg
+ridg
+ridicul
+ride
+rid
+rien
+ri
+rifl
+rift
+rift
+rig
+rigg
+riggish
+right
+righteou
+righteous
+right
+rightfulli
+rightli
+right
+rigol
+rigor
+rigor
+rigour
+ril
+rim
+rin
+rinaldo
+rind
+ring
+ring
+ringlead
+ringlet
+ring
+ringwood
+riot
+rioter
+riot
+riotou
+riot
+rip
+ripe
+ripe
+ripen
+ripen
+ripe
+ripen
+ripen
+riper
+ripest
+ripe
+ripp
+rip
+rise
+risen
+rise
+riseth
+rish
+rise
+rite
+rite
+rivag
+rival
+rival
+rival
+rival
+rive
+rive
+rivel
+river
+river
+rivet
+rivet
+rivet
+rivo
+rj
+rless
+road
+road
+roam
+roam
+roan
+roar
+roar
+roarer
+roar
+roar
+roast
+roast
+rob
+roba
+roba
+robb
+rob
+robber
+robber
+robberi
+rob
+robe
+robe
+robert
+robe
+robin
+rob
+robusti
+rochest
+rochford
+rock
+rock
+rocki
+rod
+rode
+roderigo
+rod
+roe
+roe
+roger
+rogero
+rogu
+rogueri
+rogu
+roguish
+roi
+roist
+roll
+roll
+roll
+roll
+rom
+romag
+roman
+romano
+romano
+roman
+rome
+romeo
+romish
+rondur
+ronyon
+rood
+roof
+roof
+rook
+rook
+rooki
+room
+room
+root
+root
+rootedli
+rooteth
+root
+root
+rope
+roperi
+rope
+rope
+ro
+rosalind
+rosalinda
+rosalind
+rosalin
+rosciu
+rose
+rose
+rosemari
+rosencrantz
+rose
+ross
+rosi
+rot
+rote
+rote
+rother
+rotherham
+rot
+rot
+rotten
+rotten
+rot
+rotund
+rouen
+rough
+rougher
+roughest
+roughli
+rough
+round
+round
+roundel
+rounder
+roundest
+round
+roundli
+round
+roundur
+rou
+rous
+rous
+rousillon
+rousli
+roussi
+rout
+rout
+rout
+rove
+rover
+row
+rowel
+rowland
+rowland
+roi
+royal
+royal
+royal
+royalti
+royalti
+roynish
+rs
+rt
+rub
+rubb
+rub
+rubbish
+rubi
+rubiou
+rub
+rubi
+rud
+rudand
+rudder
+ruddi
+ruddock
+ruddi
+rude
+rude
+rude
+ruder
+rudesbi
+rudest
+rudiment
+rue
+ru
+ruff
+ruffian
+ruffian
+ruffl
+ruffl
+ruff
+rug
+rugbi
+rugemount
+rug
+ruin
+ruinat
+ruin
+ruin
+ruinou
+ruin
+rul
+rule
+rule
+ruler
+ruler
+rule
+rule
+rumbl
+ruminai
+ruminat
+rumin
+rumin
+rumin
+rumin
+rumor
+rumour
+rumour
+rumour
+rump
+run
+runag
+runag
+runawai
+runawai
+rung
+runn
+runner
+runner
+run
+run
+ruptur
+ruptur
+rural
+rush
+rush
+rush
+rushl
+rushi
+russet
+russia
+russian
+russian
+rust
+rust
+rustic
+rustic
+rustic
+rustl
+rustl
+rust
+rusti
+rut
+ruth
+ruth
+ruthless
+rutland
+ruttish
+ry
+rye
+ryth
+s
+sa
+saba
+sabbath
+sabl
+sabl
+sack
+sackbut
+sackcloth
+sack
+sackerson
+sack
+sacrament
+sacr
+sacrif
+sacrific
+sacrific
+sacrific
+sacrifici
+sacrif
+sacrilegi
+sacr
+sad
+sadder
+saddest
+saddl
+saddler
+saddl
+sadli
+sad
+saf
+safe
+safeguard
+safe
+safer
+safest
+safeti
+safeti
+saffron
+sag
+sage
+sagittari
+said
+saidst
+sail
+sail
+sailmak
+sailor
+sailor
+sail
+sain
+saint
+saint
+saintlik
+saint
+saith
+sake
+sake
+sala
+salad
+salamand
+salari
+sale
+salerio
+salicam
+saliqu
+salisburi
+sall
+sallet
+sallet
+salli
+sallow
+salli
+salmon
+salmon
+salt
+salter
+saltier
+salt
+saltpetr
+salut
+salut
+salut
+salut
+salut
+saluteth
+salv
+salvat
+salv
+salv
+same
+samingo
+samp
+sampir
+sampl
+sampler
+sampson
+samson
+samson
+sancta
+sanctifi
+sanctifi
+sanctifi
+sanctimoni
+sanctimoni
+sanctimoni
+sanctiti
+sanctiti
+sanctuar
+sanctuari
+sand
+sandal
+sandbag
+sand
+sand
+sandi
+sandi
+sang
+sanguin
+sangui
+saniti
+san
+santrail
+sap
+sapient
+sapit
+sapless
+sapl
+sapphir
+sapphir
+saracen
+sarcenet
+sard
+sardian
+sardinia
+sardi
+sarum
+sat
+satan
+satchel
+sate
+sate
+satiat
+satieti
+satin
+satir
+satir
+sati
+satisfact
+satisfi
+satisfi
+satisfi
+satisfi
+saturdai
+saturdai
+saturn
+saturnin
+saturninu
+satyr
+satyr
+sauc
+sauc
+sauc
+saucer
+sauc
+saucili
+sauci
+sauci
+sauf
+saunder
+sav
+savag
+savag
+savag
+savageri
+savag
+save
+save
+save
+save
+saviour
+savori
+savour
+savour
+savour
+savouri
+savoi
+saw
+saw
+sawest
+sawn
+sawpit
+saw
+sawyer
+saxon
+saxoni
+saxton
+sai
+sayest
+sai
+sai
+sai
+sayst
+sblood
+sc
+scab
+scabbard
+scab
+scaffold
+scaffoldag
+scal
+scald
+scald
+scald
+scale
+scale
+scale
+scale
+scall
+scalp
+scalp
+scali
+scambl
+scambl
+scamel
+scan
+scandal
+scandaliz
+scandal
+scandi
+scann
+scant
+scant
+scanter
+scant
+scantl
+scant
+scap
+scape
+scape
+scape
+scapeth
+scar
+scarc
+scarc
+scarciti
+scare
+scarecrow
+scarecrow
+scarf
+scarf
+scarf
+scare
+scarlet
+scarr
+scarr
+scar
+scaru
+scath
+scath
+scath
+scatt
+scatter
+scatter
+scatter
+scatter
+scelera
+scelerisqu
+scene
+scene
+scent
+scent
+scept
+scepter
+sceptr
+sceptr
+sceptr
+schedul
+schedul
+scholar
+scholarli
+scholar
+school
+schoolboi
+schoolboi
+schoolfellow
+school
+schoolmast
+schoolmast
+school
+sciatica
+sciatica
+scienc
+scienc
+scimitar
+scion
+scion
+scissor
+scoff
+scoffer
+scof
+scoff
+scoggin
+scold
+scold
+scold
+sconc
+scone
+scope
+scope
+scorch
+scorch
+score
+score
+score
+score
+scorn
+scorn
+scorn
+scornfulli
+scorn
+scorn
+scorpion
+scorpion
+scot
+scotch
+scotch
+scotland
+scot
+scottish
+scoundrel
+scour
+scour
+scourg
+scourg
+scour
+scout
+scout
+scowl
+scrap
+scrape
+scrape
+scrap
+scratch
+scratch
+scratch
+scream
+scream
+screech
+screech
+screen
+screen
+screw
+screw
+scribbl
+scribbl
+scribe
+scribe
+scrimer
+scrip
+scrippag
+scriptur
+scriptur
+scriven
+scroll
+scroll
+scroop
+scrowl
+scroyl
+scrub
+scrupl
+scrupl
+scrupul
+scuffl
+scuffl
+scullion
+scull
+scum
+scurril
+scurril
+scurril
+scurvi
+scuse
+scut
+scutcheon
+scutcheon
+scylla
+scyth
+scyth
+scythia
+scythian
+sdeath
+se
+sea
+seacoal
+seafar
+seal
+seal
+seal
+seal
+seam
+seamen
+seami
+seaport
+sear
+searc
+search
+searcher
+search
+searcheth
+search
+sear
+sea
+seasick
+seasid
+season
+season
+season
+seat
+seat
+seat
+sebastian
+second
+secondarili
+secondari
+second
+second
+secreci
+secret
+secretari
+secretari
+secretli
+secret
+sect
+sectari
+sect
+secundo
+secur
+secur
+secur
+secur
+sedg
+sedg
+sedg
+sedgi
+sedit
+sediti
+seduc
+seduc
+seduc
+seduc
+seduc
+see
+seed
+seed
+seed
+seed
+seedsman
+seein
+see
+seek
+seek
+seek
+seel
+seel
+seeli
+seem
+seem
+seemer
+seemest
+seemeth
+seem
+seemingli
+seemli
+seem
+seen
+seer
+see
+sees
+seest
+seeth
+seeth
+seeth
+seet
+segreg
+seigneur
+seigneur
+seiz
+seiz
+seiz
+seiz
+seizeth
+seiz
+seizur
+seld
+seldom
+select
+seleucu
+self
+selfsam
+sell
+seller
+sell
+sell
+selv
+semblabl
+semblabl
+semblanc
+semblanc
+sembl
+semi
+semicircl
+semirami
+semper
+semproniu
+senat
+senat
+senat
+send
+sender
+sendeth
+send
+send
+seneca
+senior
+seniori
+seni
+sennet
+senoi
+sens
+senseless
+sens
+sensibl
+sensibl
+sensual
+sensual
+sent
+sentenc
+sentenc
+sentenc
+sententi
+sentinel
+sentinel
+separ
+separ
+separ
+separ
+separ
+septentrion
+sepulchr
+sepulchr
+sepulchr
+sequel
+sequenc
+sequent
+sequest
+sequest
+sequestr
+sere
+sereni
+serg
+sergeant
+seriou
+serious
+sermon
+sermon
+serpent
+serpentin
+serpent
+serpigo
+serv
+servant
+servant
+servant
+serv
+serv
+server
+serv
+serveth
+servic
+servic
+servic
+servil
+servil
+serviliu
+serv
+servingman
+servingmen
+serviteur
+servitor
+servitor
+servitud
+sessa
+session
+session
+sesto
+set
+setebo
+set
+setter
+set
+settl
+settl
+settlest
+settl
+sev
+seven
+sevenfold
+sevennight
+seventeen
+seventh
+seventi
+sever
+sever
+sever
+sever
+sever
+sever
+sever
+severest
+sever
+sever
+severn
+sever
+sew
+seward
+sewer
+sew
+sex
+sex
+sexton
+sextu
+seymour
+seyton
+sfoot
+sh
+shackl
+shackl
+shade
+shade
+shadow
+shadow
+shadow
+shadow
+shadowi
+shadi
+shafalu
+shaft
+shaft
+shag
+shak
+shake
+shake
+shaken
+shake
+shake
+shale
+shall
+shalleng
+shallow
+shallowest
+shallowli
+shallow
+shalt
+sham
+shambl
+shame
+shame
+shame
+shamefulli
+shameless
+shame
+shamest
+shame
+shank
+shank
+shap
+shape
+shape
+shapeless
+shapen
+shape
+shape
+shar
+shard
+shard
+shard
+share
+share
+sharer
+share
+share
+shark
+sharp
+sharpen
+sharpen
+sharpen
+sharper
+sharpest
+sharpli
+sharp
+sharp
+shatter
+shav
+shave
+shaven
+shaw
+she
+sheaf
+sheal
+shear
+shearer
+shear
+shearman
+shear
+sheath
+sheath
+sheath
+sheath
+sheath
+sheav
+sheav
+shed
+shed
+shed
+sheen
+sheep
+sheepcot
+sheepcot
+sheep
+sheepskin
+sheer
+sheet
+sheet
+sheet
+sheffield
+shelf
+shell
+shell
+shelt
+shelter
+shelter
+shelv
+shelv
+shelvi
+shent
+shepherd
+shepherd
+shepherdess
+shepherdess
+shepherd
+sher
+sheriff
+sherri
+she
+sheweth
+shield
+shield
+shield
+shift
+shift
+shift
+shift
+shill
+shill
+shin
+shine
+shine
+shineth
+shine
+shin
+shini
+ship
+shipboard
+shipman
+shipmast
+shipmen
+shipp
+ship
+ship
+ship
+shipt
+shipwreck
+shipwreck
+shipwright
+shipwright
+shire
+shirlei
+shirt
+shirt
+shive
+shiver
+shiver
+shiver
+shoal
+shoal
+shock
+shock
+shod
+shoe
+shoe
+shoemak
+shoe
+shog
+shone
+shook
+shoon
+shoot
+shooter
+shooti
+shoot
+shoot
+shop
+shop
+shore
+shore
+shorn
+short
+shortcak
+shorten
+shorten
+shorten
+shorter
+shortli
+short
+shot
+shotten
+shough
+should
+shoulder
+shoulder
+shoulder
+shouldst
+shout
+shout
+shout
+shout
+shov
+shove
+shovel
+shovel
+show
+show
+shower
+shower
+showest
+show
+shown
+show
+shred
+shrew
+shrewd
+shrewdli
+shrewd
+shrewish
+shrewishli
+shrewish
+shrew
+shrewsburi
+shriek
+shriek
+shriek
+shriev
+shrift
+shrill
+shriller
+shrill
+shrilli
+shrimp
+shrine
+shrink
+shrink
+shrink
+shriv
+shrive
+shriver
+shrive
+shrive
+shroud
+shroud
+shroud
+shroud
+shrove
+shrow
+shrow
+shrub
+shrub
+shrug
+shrug
+shrunk
+shudd
+shudder
+shuffl
+shuffl
+shuffl
+shuffl
+shun
+shunless
+shunn
+shun
+shun
+shun
+shut
+shut
+shuttl
+shy
+shylock
+si
+sibyl
+sibylla
+sibyl
+sicil
+sicilia
+sicilian
+siciliu
+sicil
+sicili
+siciniu
+sick
+sicken
+sicken
+sicker
+sickl
+sicklemen
+sickli
+sickli
+sickli
+sick
+sicl
+sicyon
+side
+side
+side
+sieg
+sieg
+sienna
+si
+siev
+sift
+sift
+sigeia
+sigh
+sigh
+sigh
+sigh
+sight
+sight
+sightless
+sightli
+sight
+sign
+signal
+signet
+signieur
+signific
+signific
+signifi
+signifi
+signifi
+signifi
+signior
+signiori
+signior
+signiori
+signor
+signori
+sign
+signum
+silenc
+silenc
+silenc
+silenc
+silent
+silent
+siliu
+silk
+silken
+silkman
+silk
+silliest
+silli
+sill
+silli
+silva
+silver
+silver
+silverli
+silvia
+silviu
+sima
+simil
+simil
+simoi
+simon
+simoni
+simp
+simpcox
+simpl
+simpl
+simpler
+simpl
+simplic
+simpli
+simular
+simul
+sin
+sinc
+sincer
+sincer
+sincer
+sinel
+sinew
+sinew
+sinew
+sinewi
+sin
+sinfulli
+sing
+sing
+sing
+singer
+sing
+singeth
+sing
+singl
+singl
+singl
+singli
+sing
+singular
+singularit
+singular
+singular
+singul
+sinist
+sink
+sink
+sink
+sinn
+sinner
+sinner
+sin
+sinon
+sin
+sip
+sip
+sir
+sire
+siren
+sirrah
+sir
+sist
+sister
+sisterhood
+sisterli
+sister
+sit
+sith
+sithenc
+sit
+sit
+situat
+situat
+situat
+siward
+six
+sixpenc
+sixpenc
+sixpenni
+sixteen
+sixth
+sixti
+siz
+size
+size
+sizzl
+skain
+skambl
+skein
+skelter
+ski
+skil
+skilfulli
+skill
+skilless
+skillet
+skill
+skill
+skim
+skimbl
+skin
+skinker
+skinni
+skin
+skip
+skipp
+skipper
+skip
+skirmish
+skirmish
+skirr
+skirt
+skirt
+skittish
+skulk
+skull
+skull
+sky
+skyei
+skyish
+slab
+slack
+slackli
+slack
+slain
+slake
+sland
+slander
+slander
+slander
+slander
+slander
+slander
+slander
+slash
+slaught
+slaughter
+slaughter
+slaughter
+slaughterman
+slaughtermen
+slaughter
+slaughter
+slave
+slaver
+slaveri
+slave
+slavish
+slai
+slayeth
+slai
+slai
+sleav
+sled
+sleek
+sleekli
+sleep
+sleeper
+sleeper
+sleepest
+sleep
+sleep
+sleepi
+sleev
+sleev
+sleid
+sleid
+sleight
+sleight
+slender
+slender
+slenderli
+slept
+slew
+slewest
+slice
+slid
+slide
+slide
+slide
+slight
+slight
+slightest
+slightli
+slight
+slight
+slili
+slime
+slimi
+sling
+slink
+slip
+slipp
+slipper
+slipper
+slipperi
+slip
+slish
+slit
+sliver
+slobb
+slomber
+slop
+slope
+slop
+sloth
+sloth
+slough
+slovenli
+slovenri
+slow
+slower
+slowli
+slow
+slubber
+slug
+sluggard
+sluggardiz
+sluggish
+sluic
+slumb
+slumber
+slumber
+slumberi
+slunk
+slut
+slut
+slutteri
+sluttish
+sluttish
+sly
+sly
+smack
+smack
+smack
+small
+smaller
+smallest
+small
+smalu
+smart
+smart
+smartli
+smatch
+smatter
+smear
+smell
+smell
+smell
+smelt
+smil
+smile
+smile
+smile
+smilest
+smilet
+smile
+smilingli
+smirch
+smirch
+smit
+smite
+smite
+smith
+smithfield
+smock
+smock
+smok
+smoke
+smoke
+smoke
+smoke
+smoki
+smooth
+smooth
+smooth
+smoothli
+smooth
+smooth
+smote
+smoth
+smother
+smother
+smother
+smug
+smulkin
+smutch
+snaffl
+snail
+snail
+snake
+snake
+snaki
+snap
+snapp
+snapper
+snar
+snare
+snare
+snarl
+snarleth
+snarl
+snatch
+snatcher
+snatch
+snatch
+sneak
+sneak
+sneap
+sneap
+sneck
+snip
+snipe
+snipt
+snore
+snore
+snore
+snort
+snout
+snow
+snowbal
+snow
+snowi
+snuff
+snuff
+snug
+so
+soak
+soak
+soak
+soar
+soar
+soar
+sob
+sob
+sober
+soberli
+sobrieti
+sob
+sociabl
+societi
+societi
+sock
+socrat
+sod
+sodden
+soe
+soever
+soft
+soften
+soften
+softer
+softest
+softli
+soft
+soil
+soil
+soilur
+soit
+sojourn
+sol
+sola
+solac
+solanio
+sold
+soldat
+solder
+soldest
+soldier
+soldier
+soldiership
+sole
+sole
+solem
+solemn
+solem
+solemn
+solemn
+solemniz
+solemn
+solemn
+solemnli
+sole
+solicit
+solicit
+solicit
+solicit
+solicit
+solicitor
+solicit
+solid
+solidar
+solid
+solinu
+solitari
+solomon
+solon
+solum
+solu
+solyman
+some
+somebodi
+someon
+somerset
+somervil
+someth
+sometim
+sometim
+somev
+somewhat
+somewher
+somewhith
+somm
+son
+sonanc
+song
+song
+sonnet
+sonnet
+sonnet
+son
+sont
+sonti
+soon
+sooner
+soonest
+sooth
+sooth
+soother
+sooth
+soothsai
+soothsay
+sooti
+sop
+sophist
+sophist
+sophi
+sop
+sorcer
+sorcer
+sorceress
+sorceri
+sorceri
+sore
+sorel
+sore
+sorer
+sore
+sorrier
+sorriest
+sorrow
+sorrow
+sorrowest
+sorrow
+sorrow
+sorrow
+sorri
+sort
+sortanc
+sort
+sort
+sort
+sossiu
+sot
+soto
+sot
+sottish
+soud
+sought
+soul
+sould
+soulless
+soul
+sound
+sound
+sounder
+soundest
+sound
+soundless
+soundli
+sound
+soundpost
+sound
+sour
+sourc
+sourc
+sourest
+sourli
+sour
+sou
+sous
+south
+southam
+southampton
+southerli
+southern
+southward
+southwark
+southwel
+souviendrai
+sov
+sovereign
+sovereignest
+sovereignli
+sovereignti
+sovereignvour
+sow
+sow
+sowl
+sowter
+space
+space
+spaciou
+spade
+spade
+spain
+spak
+spake
+spakest
+span
+spangl
+spangl
+spaniard
+spaniel
+spaniel
+spanish
+spann
+span
+spar
+spare
+spare
+spare
+sparingli
+spark
+sparkl
+sparkl
+sparkl
+spark
+sparrow
+sparrow
+sparta
+spartan
+spavin
+spavin
+spawn
+speak
+speaker
+speaker
+speakest
+speaketh
+speak
+speak
+spear
+speargrass
+spear
+special
+special
+special
+specialti
+specialti
+specifi
+specious
+spectacl
+spectacl
+spectacl
+spectat
+spectatorship
+specul
+specul
+specul
+sped
+speech
+speech
+speechless
+speed
+speed
+speedier
+speediest
+speedili
+speedi
+speed
+speed
+speedi
+speen
+spell
+spell
+spell
+spelt
+spencer
+spend
+spendest
+spend
+spend
+spendthrift
+spent
+sperato
+sperm
+spero
+sperr
+spher
+sphere
+sphere
+sphere
+spheric
+spheri
+sphinx
+spice
+spice
+spiceri
+spice
+spider
+spider
+spi
+spi
+spieth
+spightfulli
+spigot
+spill
+spill
+spill
+spilt
+spilth
+spin
+spinii
+spinner
+spinster
+spinster
+spire
+spirit
+spirit
+spiritless
+spirit
+spiritu
+spiritualti
+spirt
+spit
+spital
+spite
+spite
+spite
+spite
+spit
+spit
+spit
+splai
+spleen
+spleen
+spleen
+spleeni
+splendour
+splenit
+splinter
+splinter
+split
+split
+split
+split
+spoil
+spoil
+spok
+spoke
+spoken
+spoke
+spokesman
+spong
+spongi
+spoon
+spoon
+sport
+sport
+sport
+sportiv
+sport
+spot
+spotless
+spot
+spot
+spousal
+spous
+spout
+spout
+spout
+sprag
+sprang
+sprat
+sprawl
+sprai
+sprai
+spread
+spread
+spread
+spright
+spright
+sprightli
+sprig
+spring
+spring
+spring
+springeth
+springhalt
+spring
+spring
+springtim
+sprinkl
+sprinkl
+sprite
+sprite
+sprite
+sprite
+sprite
+sprout
+spruce
+sprung
+spun
+spur
+spurio
+spurn
+spurn
+spurr
+spurrer
+spur
+spur
+spy
+spy
+squabbl
+squadron
+squadron
+squand
+squar
+squar
+squarer
+squar
+squash
+squeak
+squeak
+squeal
+squeal
+squeez
+squeez
+squel
+squier
+squint
+squini
+squir
+squir
+squirrel
+st
+stab
+stabb
+stab
+stab
+stabl
+stabl
+stabl
+stablish
+stablish
+stab
+stack
+staff
+stafford
+stafford
+staffordshir
+stag
+stage
+stage
+stagger
+stagger
+stagger
+stag
+staid
+staider
+stain
+stain
+stain
+staineth
+stain
+stainless
+stain
+stair
+stair
+stake
+stake
+stale
+stale
+stalk
+stalk
+stalk
+stall
+stall
+stall
+stamford
+stammer
+stamp
+stamp
+stamp
+stanch
+stanchless
+stand
+standard
+standard
+stander
+stander
+standest
+standeth
+stand
+stand
+staniel
+stanlei
+stanz
+stanzo
+stanzo
+stapl
+stapl
+star
+stare
+stare
+stare
+stare
+stare
+stark
+starkli
+starlight
+starl
+starr
+starri
+star
+start
+start
+start
+startingli
+startl
+startl
+start
+starv
+starv
+starv
+starvelackei
+starvel
+starveth
+starv
+state
+stateli
+state
+state
+statesman
+statesmen
+statiliu
+station
+statist
+statist
+statu
+statu
+statur
+statur
+statut
+statut
+stave
+stave
+stai
+stai
+stayest
+stai
+stai
+stead
+stead
+steadfast
+steadier
+stead
+steal
+stealer
+stealer
+steal
+steal
+stealth
+stealthi
+steed
+steed
+steel
+steel
+steeli
+steep
+steep
+steepl
+steepl
+steep
+steepi
+steer
+steerag
+steer
+steer
+stell
+stem
+stem
+stench
+step
+stepdam
+stephano
+stephen
+stepmoth
+stepp
+step
+step
+steril
+steril
+sterl
+stern
+sternag
+sterner
+sternest
+stern
+steterat
+stew
+steward
+steward
+stewardship
+stew
+stew
+stick
+stick
+stickler
+stick
+stiff
+stiffen
+stiffli
+stifl
+stifl
+stifl
+stigmat
+stigmat
+stile
+still
+stiller
+stillest
+still
+stilli
+sting
+sting
+stingless
+sting
+stink
+stink
+stinkingli
+stink
+stint
+stint
+stint
+stir
+stirr
+stir
+stirrer
+stirrer
+stirreth
+stir
+stirrup
+stirrup
+stir
+stitcheri
+stitch
+stithi
+stithi
+stoccado
+stoccata
+stock
+stockfish
+stock
+stock
+stockish
+stock
+stog
+stog
+stoic
+stokesli
+stol
+stole
+stolen
+stolest
+stomach
+stomach
+stomach
+stomach
+ston
+stone
+stonecutt
+stone
+stonish
+stoni
+stood
+stool
+stool
+stoop
+stoop
+stoop
+stop
+stope
+stopp
+stop
+stop
+stop
+stor
+store
+storehous
+storehous
+store
+stori
+storm
+storm
+storm
+storm
+stormi
+stori
+stoup
+stoup
+stout
+stouter
+stoutli
+stout
+stover
+stow
+stowag
+stow
+strachi
+straggler
+straggl
+straight
+straightest
+straightwai
+strain
+strain
+strain
+strain
+strait
+strait
+straiter
+straitli
+strait
+strait
+strand
+strang
+strang
+strang
+stranger
+stranger
+strangest
+strangl
+strangl
+strangler
+strangl
+strangl
+strappado
+strap
+stratagem
+stratagem
+stratford
+strato
+straw
+strawberri
+strawberri
+straw
+strawi
+strai
+strai
+strai
+streak
+streak
+stream
+streamer
+stream
+stream
+strech
+street
+street
+strength
+strengthen
+strengthen
+strengthless
+strength
+stretch
+stretch
+stretch
+stretch
+strew
+strew
+strew
+strewment
+stricken
+strict
+stricter
+strictest
+strictli
+strictur
+stride
+stride
+stride
+strife
+strife
+strik
+strike
+striker
+strike
+strikest
+strike
+string
+stringless
+string
+strip
+stripe
+stripl
+stripl
+stripp
+strip
+striv
+strive
+strive
+strive
+strok
+stroke
+stroke
+strond
+strond
+strong
+stronger
+strongest
+strongli
+strook
+strosser
+strove
+strown
+stroi
+struck
+strucken
+struggl
+struggl
+struggl
+strumpet
+strumpet
+strumpet
+strung
+strut
+strut
+strut
+strut
+stubbl
+stubborn
+stubbornest
+stubbornli
+stubborn
+stuck
+stud
+student
+student
+studi
+studi
+studiou
+studious
+stud
+studi
+studi
+stuff
+stuf
+stuff
+stumbl
+stumbl
+stumblest
+stumbl
+stump
+stump
+stung
+stupefi
+stupid
+stupifi
+stuprum
+sturdi
+sty
+styga
+stygian
+styl
+style
+styx
+su
+sub
+subcontract
+subdu
+subdu
+subdu
+subduement
+subdu
+subdu
+subject
+subject
+subject
+subject
+submerg
+submiss
+submiss
+submit
+submit
+submit
+suborn
+suborn
+suborn
+subscrib
+subscrib
+subscrib
+subscrib
+subscript
+subsequ
+subsidi
+subsidi
+subsist
+subsist
+substanc
+substanc
+substanti
+substitut
+substitut
+substitut
+substitut
+subtil
+subtilli
+subtl
+subtleti
+subtleti
+subtli
+subtractor
+suburb
+subvers
+subvert
+succed
+succe
+succeed
+succeed
+succeed
+succe
+success
+successantli
+success
+success
+successfulli
+success
+success
+success
+successor
+successor
+succour
+succour
+such
+suck
+sucker
+sucker
+suck
+suckl
+suck
+sudden
+suddenli
+sue
+su
+suerli
+sue
+sueth
+suff
+suffer
+suffer
+suffer
+suffer
+suffer
+suffer
+suffic
+suffic
+suffic
+suffic
+sufficeth
+suffici
+suffici
+suffici
+suffic
+sufficit
+suffig
+suffoc
+suffoc
+suffoc
+suffolk
+suffrag
+suffrag
+sug
+sugar
+sugarsop
+suggest
+suggest
+suggest
+suggest
+suggest
+suggest
+sui
+suit
+suitabl
+suit
+suit
+suitor
+suitor
+suit
+suivez
+sullen
+sullen
+sulli
+sulli
+sulli
+sulph
+sulpher
+sulphur
+sulphur
+sultan
+sultri
+sum
+sumless
+summ
+summa
+summari
+summer
+summer
+summit
+summon
+summon
+summon
+sumpter
+sumptuou
+sumptuous
+sum
+sun
+sunbeam
+sunburn
+sunburnt
+sund
+sundai
+sundai
+sunder
+sunder
+sundri
+sung
+sunk
+sunken
+sunni
+sunris
+sun
+sunset
+sunshin
+sup
+super
+superfici
+superfici
+superflu
+superflu
+superflu
+superflux
+superior
+supern
+supernatur
+superprais
+superscript
+superscript
+superservic
+superstit
+superstiti
+superstiti
+supersubtl
+supervis
+supervisor
+supp
+supper
+supper
+suppertim
+sup
+supplant
+suppl
+suppler
+supplianc
+suppliant
+suppliant
+supplic
+supplic
+supplic
+suppli
+suppli
+suppli
+suppliest
+suppli
+supplyant
+suppli
+supplyment
+support
+support
+support
+support
+support
+support
+support
+supportor
+suppo
+suppos
+suppos
+suppos
+suppos
+supposest
+suppos
+supposit
+suppress
+suppress
+suppresseth
+supremaci
+suprem
+sup
+sur
+suranc
+surceas
+surd
+sure
+surecard
+sure
+surer
+surest
+sureti
+sureti
+surfeit
+surfeit
+surfeit
+surfeit
+surfeit
+surg
+surgeon
+surgeon
+surger
+surgeri
+surg
+surli
+surmi
+surmis
+surmis
+surmis
+surmount
+surmount
+surmount
+surnam
+surnam
+surnam
+surpasseth
+surpass
+surplic
+surplu
+surpri
+surpris
+surpris
+surrend
+surrei
+surrei
+survei
+surveyest
+survei
+surveyor
+surveyor
+survei
+surviv
+surviv
+survivor
+susan
+suspect
+suspect
+suspect
+suspect
+suspend
+suspens
+suspicion
+suspicion
+suspici
+suspir
+suspir
+sust
+sustain
+sustain
+sutler
+sutton
+suum
+swabber
+swaddl
+swag
+swagg
+swagger
+swagger
+swagger
+swagger
+swain
+swain
+swallow
+swallow
+swallow
+swallow
+swam
+swan
+swan
+sward
+sware
+swarm
+swarm
+swart
+swarth
+swarth
+swarthi
+swasher
+swash
+swath
+swath
+swathl
+swai
+swai
+swai
+swear
+swearer
+swearer
+swearest
+swear
+swear
+swear
+sweat
+sweaten
+sweat
+sweat
+sweati
+sweep
+sweeper
+sweep
+sweet
+sweeten
+sweeten
+sweeter
+sweetest
+sweetheart
+sweet
+sweetli
+sweetmeat
+sweet
+sweet
+swell
+swell
+swell
+swell
+swelter
+sweno
+swept
+swerv
+swerver
+swerv
+swift
+swifter
+swiftest
+swiftli
+swift
+swill
+swill
+swim
+swimmer
+swimmer
+swim
+swim
+swine
+swineherd
+swing
+swing
+swinish
+swinstead
+switch
+swit
+switzer
+swol
+swoll
+swoln
+swoon
+swoon
+swoon
+swoon
+swoop
+swoopstak
+swor
+sword
+sworder
+sword
+swore
+sworn
+swound
+swound
+swum
+swung
+sy
+sycamor
+sycorax
+sylla
+syllabl
+syllabl
+syllog
+symbol
+sympathis
+sympathiz
+sympath
+sympath
+sympathi
+synagogu
+synod
+synod
+syracus
+syracusian
+syracusian
+syria
+syrup
+t
+ta
+taber
+tabl
+tabl
+tabl
+tablet
+tabor
+tabor
+tabor
+tabourin
+taciturn
+tack
+tackl
+tackl
+tackl
+tackl
+tackl
+taddl
+tadpol
+taffeta
+taffeti
+tag
+tagrag
+tah
+tail
+tailor
+tailor
+tail
+taint
+taint
+taint
+taint
+taintur
+tak
+take
+taken
+taker
+take
+takest
+taketh
+take
+tal
+talbot
+talbotit
+talbot
+tale
+talent
+talent
+taleport
+tale
+talk
+talk
+talker
+talker
+talkest
+talk
+talk
+tall
+taller
+tallest
+talli
+tallow
+talli
+talon
+tam
+tambourin
+tame
+tame
+tame
+tame
+tamer
+tame
+tame
+tamora
+tamworth
+tan
+tang
+tangl
+tangl
+tank
+tanl
+tann
+tan
+tanner
+tanquam
+tanta
+tantaen
+tap
+tape
+taper
+taper
+tapestri
+tapestri
+taphous
+tapp
+tapster
+tapster
+tar
+tardi
+tardili
+tardi
+tardi
+tarentum
+targ
+targ
+target
+target
+tarpeian
+tarquin
+tarquin
+tarr
+tarr
+tarrianc
+tarri
+tarri
+tarri
+tarri
+tart
+tartar
+tartar
+tartli
+tart
+task
+tasker
+task
+task
+tassel
+tast
+tast
+tast
+tast
+tatt
+tatter
+tatter
+tatter
+tattl
+tattl
+tattl
+taught
+taunt
+taunt
+taunt
+tauntingli
+taunt
+tauru
+tavern
+tavern
+tavi
+tawdri
+tawni
+tax
+taxat
+taxat
+tax
+tax
+tc
+te
+teach
+teacher
+teacher
+teach
+teachest
+teacheth
+teach
+team
+tear
+tear
+tear
+tear
+tearsheet
+teat
+tediou
+tedious
+tedious
+teem
+teem
+teem
+teen
+teeth
+teipsum
+telamon
+telamoniu
+tell
+teller
+tell
+tell
+tellu
+temp
+temper
+temper
+temper
+temper
+temper
+temper
+tempest
+tempest
+tempestu
+templ
+templ
+tempor
+temporari
+temporiz
+tempor
+tempor
+temp
+tempt
+temptat
+temptat
+tempt
+tempter
+tempter
+tempteth
+tempt
+tempt
+ten
+tenabl
+tenant
+tenantiu
+tenantless
+tenant
+tench
+tend
+tendanc
+tend
+tender
+tender
+tenderli
+tender
+tender
+tend
+tend
+tenedo
+tenement
+tenement
+tenfold
+tenni
+tenour
+tenour
+ten
+tent
+tent
+tenth
+tenth
+tent
+tenur
+tenur
+tercel
+tereu
+term
+termag
+term
+termin
+termless
+term
+terra
+terrac
+terram
+terra
+terr
+terren
+terrestri
+terribl
+terribl
+territori
+territori
+terror
+terror
+tertian
+tertio
+test
+testament
+test
+tester
+testern
+testifi
+testimoni
+testimoni
+testimoni
+testi
+testril
+testi
+tetchi
+tether
+tetter
+tevil
+tewksburi
+text
+tgv
+th
+thae
+thame
+than
+thane
+thane
+thank
+thank
+thank
+thankfulli
+thank
+thank
+thank
+thankless
+thank
+thanksgiv
+thaso
+that
+thatch
+thaw
+thaw
+thaw
+the
+theatr
+theban
+thebe
+thee
+theft
+theft
+thein
+their
+their
+theis
+them
+theme
+theme
+themselv
+then
+thenc
+thenceforth
+theoric
+there
+thereabout
+thereabout
+thereaft
+thereat
+therebi
+therefor
+therein
+thereof
+thereon
+thereto
+thereunto
+thereupon
+therewith
+therewith
+thersit
+these
+theseu
+thessalian
+thessali
+theti
+thew
+thei
+thick
+thicken
+thicken
+thicker
+thickest
+thicket
+thickskin
+thief
+thieveri
+thiev
+thievish
+thigh
+thigh
+thimbl
+thimbl
+thin
+thine
+thing
+thing
+think
+thinkest
+think
+think
+think
+thinkst
+thinli
+third
+thirdli
+third
+thirst
+thirst
+thirst
+thirsti
+thirteen
+thirti
+thirtieth
+thirti
+thi
+thisbi
+thisn
+thistl
+thistl
+thither
+thitherward
+thoa
+thoma
+thorn
+thorn
+thorni
+thorough
+thoroughli
+those
+thou
+though
+thought
+thought
+thought
+thousand
+thousand
+thracian
+thraldom
+thrall
+thrall
+thrall
+thrash
+thrason
+thread
+threadbar
+threaden
+thread
+threat
+threaten
+threaten
+threaten
+threatest
+threat
+three
+threefold
+threepenc
+threepil
+three
+threescor
+thresher
+threshold
+threw
+thrice
+thrift
+thriftless
+thrift
+thrifti
+thrill
+thrill
+thrill
+thrive
+thrive
+thriver
+thrive
+thrive
+throat
+throat
+throb
+throb
+throca
+throe
+throe
+thromuldo
+thron
+throne
+throne
+throne
+throng
+throng
+throng
+throstl
+throttl
+through
+throughfar
+throughfar
+throughli
+throughout
+throw
+thrower
+throwest
+throw
+thrown
+throw
+thrum
+thrumm
+thrush
+thrust
+thrusteth
+thrust
+thrust
+thumb
+thumb
+thump
+thund
+thunder
+thunderbolt
+thunderbolt
+thunder
+thunder
+thunderston
+thunderstrok
+thurio
+thursdai
+thu
+thwack
+thwart
+thwart
+thwart
+thwart
+thy
+thyme
+thymu
+thyreu
+thyself
+ti
+tib
+tiber
+tiberio
+tibei
+tice
+tick
+tickl
+tickl
+tickl
+tickl
+tickl
+ticklish
+tiddl
+tide
+tide
+tide
+tidi
+tie
+ti
+ti
+tiff
+tiger
+tiger
+tight
+tightli
+tike
+til
+tile
+till
+tillag
+tilli
+tilt
+tilter
+tilth
+tilt
+tilt
+tiltyard
+tim
+timandra
+timber
+time
+timeless
+timeli
+time
+time
+timon
+timor
+timor
+timor
+tinct
+tinctur
+tinctur
+tinder
+tingl
+tinker
+tinker
+tinsel
+tini
+tip
+tipp
+tippl
+tip
+tipsi
+tipto
+tir
+tire
+tire
+tire
+tirest
+tire
+tirra
+tirrit
+ti
+tish
+tisick
+tissu
+titan
+titania
+tith
+tith
+tith
+titiniu
+titl
+titl
+titleless
+titl
+tittl
+tittl
+titular
+titu
+tn
+to
+toad
+toad
+toadstool
+toast
+toast
+toast
+toast
+toaz
+tobi
+tock
+tod
+todai
+todpol
+tod
+toe
+toe
+tofor
+toge
+toge
+togeth
+toil
+toil
+toil
+toil
+token
+token
+told
+toledo
+toler
+toll
+toll
+tom
+tomb
+tomb
+tomb
+tombless
+tomboi
+tomb
+tomorrow
+tomyri
+ton
+tong
+tongu
+tongu
+tongu
+tongueless
+tongu
+tonight
+too
+took
+tool
+tool
+tooth
+toothach
+toothpick
+toothpick
+top
+topa
+top
+topgal
+topless
+topmast
+topp
+top
+toppl
+toppl
+top
+topsail
+topsi
+torch
+torchbear
+torchbear
+torcher
+torch
+torchlight
+tore
+torment
+tormenta
+torment
+torment
+torment
+tormentor
+torment
+torn
+torrent
+tortiv
+tortois
+tortur
+tortur
+tortur
+tortur
+tortur
+tortur
+torturest
+tortur
+toryn
+toss
+toss
+tosseth
+toss
+tot
+total
+total
+tott
+totter
+totter
+tou
+touch
+touch
+touch
+toucheth
+touch
+touchston
+tough
+tougher
+tough
+tourain
+tournament
+tour
+tou
+tout
+touz
+tow
+toward
+towardli
+toward
+tower
+tower
+tower
+town
+town
+township
+townsman
+townsmen
+towton
+toi
+toi
+trace
+trace
+track
+tract
+tractabl
+trade
+trade
+trader
+trade
+tradesman
+tradesmen
+trade
+tradit
+tradit
+traduc
+traduc
+traduc
+traffic
+traffick
+traffic
+tragedian
+tragedian
+tragedi
+tragedi
+tragic
+tragic
+trail
+train
+train
+train
+train
+trait
+traitor
+traitorli
+traitor
+traitor
+traitor
+traitress
+traject
+trammel
+trampl
+trampl
+trampl
+tranc
+tranc
+tranio
+tranquil
+tranquil
+transcend
+transcend
+transfer
+transfigur
+transfix
+transform
+transform
+transform
+transform
+transgress
+transgress
+transgress
+transgress
+translat
+translat
+translat
+translat
+transmigr
+transmut
+transpar
+transport
+transport
+transport
+transport
+transport
+transpos
+transshap
+trap
+trapp
+trap
+trap
+trash
+travail
+travail
+travel
+travel
+travel
+travel
+travel
+travel
+travel
+travellest
+travel
+travel
+traver
+travers
+trai
+treacher
+treacher
+treacher
+treacheri
+tread
+tread
+tread
+treason
+treason
+treason
+treason
+treasur
+treasur
+treasur
+treasuri
+treasuri
+treat
+treati
+treatis
+treat
+treati
+trebl
+trebl
+trebl
+treboniu
+tree
+tree
+trembl
+trembl
+trembl
+tremblest
+trembl
+tremblingli
+tremor
+trempl
+trench
+trenchant
+trench
+trencher
+trencher
+trencherman
+trencher
+trench
+trench
+trent
+tre
+trespass
+trespass
+tressel
+tress
+trei
+trial
+trial
+trib
+tribe
+tribe
+tribul
+tribun
+tribun
+tribun
+tributari
+tributari
+tribut
+tribut
+trice
+trick
+trick
+trickl
+trick
+tricksi
+trident
+tri
+trier
+trifl
+trifl
+trifler
+trifl
+trifl
+trigon
+trill
+trim
+trimli
+trimm
+trim
+trim
+trim
+trinculo
+trinculo
+trinket
+trip
+tripartit
+tripe
+tripl
+triplex
+tripoli
+tripoli
+tripp
+trip
+trippingli
+trip
+trist
+triton
+triumph
+triumphant
+triumphantli
+triumpher
+triumpher
+triumph
+triumph
+triumvir
+triumvir
+triumvir
+triumviri
+trivial
+troat
+trod
+trodden
+troiant
+troien
+troilu
+troilus
+trojan
+trojan
+troll
+tromperi
+trompet
+troop
+troop
+troop
+trop
+trophi
+trophi
+tropic
+trot
+troth
+troth
+troth
+trot
+trot
+troubl
+troubl
+troubler
+troubl
+troublesom
+troublest
+troublou
+trough
+trout
+trout
+trovato
+trow
+trowel
+trowest
+troi
+troyan
+troyan
+truant
+truce
+truckl
+trudg
+true
+trueborn
+truepenni
+truer
+truest
+truie
+trull
+trull
+truli
+trump
+trumperi
+trumpet
+trumpet
+trumpet
+trumpet
+truncheon
+truncheon
+trundl
+trunk
+trunk
+trust
+trust
+truster
+truster
+trust
+trust
+trusti
+truth
+truth
+try
+ts
+tu
+tuae
+tub
+tubal
+tub
+tuck
+tucket
+tuesdai
+tuft
+tuft
+tug
+tugg
+tug
+tuition
+tullu
+tulli
+tumbl
+tumbl
+tumbler
+tumbl
+tumult
+tumultu
+tun
+tune
+tuneabl
+tune
+tuner
+tune
+tuni
+tun
+tup
+turban
+turban
+turbul
+turbul
+turd
+turf
+turfi
+turk
+turkei
+turkei
+turkish
+turk
+turlygod
+turmoil
+turmoil
+turn
+turnbul
+turncoat
+turncoat
+turn
+turneth
+turn
+turnip
+turn
+turph
+turpitud
+turquois
+turret
+turret
+turtl
+turtl
+turvi
+tuscan
+tush
+tut
+tutor
+tutor
+tutor
+tutto
+twain
+twang
+twangl
+twa
+twai
+tweak
+tween
+twelfth
+twelv
+twelvemonth
+twentieth
+twenti
+twere
+twice
+twig
+twiggen
+twig
+twilight
+twill
+twill
+twin
+twine
+twink
+twinkl
+twinkl
+twinkl
+twinn
+twin
+twire
+twist
+twist
+twit
+twit
+twit
+twixt
+two
+twofold
+twopenc
+twopenc
+two
+twould
+tyb
+tybalt
+tybalt
+tyburn
+ty
+tyke
+tymbria
+type
+type
+typhon
+tyrann
+tyrann
+tyrann
+tyrann
+tyranni
+tyrant
+tyrant
+tyrian
+tyrrel
+u
+ubiqu
+udder
+udg
+ud
+uglier
+ugliest
+ugli
+ulcer
+ulcer
+ulyss
+um
+umber
+umbra
+umbrag
+umfrevil
+umpir
+umpir
+un
+unabl
+unaccommod
+unaccompani
+unaccustom
+unach
+unacquaint
+unact
+unadvi
+unadvis
+unadvisedli
+unagre
+unanel
+unansw
+unappea
+unapprov
+unapt
+unapt
+unarm
+unarm
+unarm
+unassail
+unassail
+unattaint
+unattempt
+unattend
+unauspici
+unauthor
+unavoid
+unawar
+unback
+unbak
+unband
+unbar
+unbarb
+unbash
+unbat
+unbatt
+unbecom
+unbefit
+unbegot
+unbegotten
+unbeliev
+unbend
+unbent
+unbewail
+unbid
+unbidden
+unbind
+unbind
+unbit
+unbless
+unblest
+unbloodi
+unblown
+unbodi
+unbolt
+unbolt
+unbonnet
+unbookish
+unborn
+unbosom
+unbound
+unbound
+unbow
+unbow
+unbrac
+unbrac
+unbraid
+unbreath
+unbr
+unbreech
+unbridl
+unbrok
+unbrui
+unbruis
+unbuckl
+unbuckl
+unbuckl
+unbuild
+unburden
+unburden
+unburi
+unburnt
+unburthen
+unbutton
+unbutton
+uncap
+uncap
+uncas
+uncas
+uncaught
+uncertain
+uncertainti
+unchain
+unchang
+uncharg
+uncharg
+uncharit
+unchari
+unchast
+uncheck
+unchild
+uncivil
+unclaim
+unclasp
+uncl
+unclean
+uncleanli
+uncleanli
+unclean
+uncl
+unclew
+unclog
+uncoin
+uncolt
+uncomeli
+uncomfort
+uncompassion
+uncomprehens
+unconfin
+unconfirm
+unconfirm
+unconqu
+unconqu
+unconsid
+unconst
+unconstrain
+unconstrain
+uncontemn
+uncontrol
+uncorrect
+uncount
+uncoupl
+uncourt
+uncouth
+uncov
+uncov
+uncrop
+uncross
+uncrown
+unction
+unctuou
+uncuckold
+uncur
+uncurb
+uncurb
+uncurl
+uncurr
+uncurs
+undaunt
+undeaf
+undeck
+undeed
+under
+underbear
+underborn
+undercrest
+underfoot
+undergo
+undergo
+undergo
+undergon
+underground
+underhand
+underl
+undermin
+undermin
+underneath
+underpr
+underprop
+understand
+understandeth
+understand
+understand
+understand
+understood
+underta
+undertak
+undertak
+undertak
+undertak
+undertak
+undertak
+undertook
+undervalu
+undervalu
+underw
+underwrit
+underwrit
+undescri
+undeserv
+undeserv
+undeserv
+undeserv
+undetermin
+undid
+undint
+undiscern
+undiscov
+undishonour
+undispo
+undistinguish
+undistinguish
+undivid
+undivid
+undivulg
+undo
+undo
+undo
+undon
+undoubt
+undoubtedli
+undream
+undress
+undress
+undrown
+undut
+unduti
+un
+unear
+unearn
+unearthli
+uneasin
+uneasi
+uneath
+uneduc
+uneffectu
+unelect
+unequ
+uneven
+unexamin
+unexecut
+unexpect
+unexperienc
+unexperi
+unexpress
+unfair
+unfaith
+unfal
+unfam
+unfashion
+unfasten
+unfath
+unfath
+unf
+unfe
+unfeel
+unfeign
+unfeignedli
+unfellow
+unfelt
+unfenc
+unfili
+unfil
+unfinish
+unfirm
+unfit
+unfit
+unfix
+unfledg
+unfold
+unfold
+unfoldeth
+unfold
+unfold
+unfool
+unforc
+unforc
+unforfeit
+unfortifi
+unfortun
+unfought
+unfrequ
+unfriend
+unfurnish
+ungain
+ungal
+ungart
+ungart
+ungenitur
+ungentl
+ungentl
+ungent
+ungird
+ungodli
+ungor
+ungot
+ungotten
+ungovern
+ungraci
+ungrat
+ungrav
+ungrown
+unguard
+unguem
+unguid
+unhack
+unhair
+unhallow
+unhallow
+unhand
+unhandl
+unhandsom
+unhang
+unhappi
+unhappili
+unhappi
+unhappi
+unharden
+unharm
+unhatch
+unheard
+unheart
+unheed
+unheedfulli
+unheedi
+unhelp
+unhidden
+unholi
+unhop
+unhopefullest
+unhors
+unhospit
+unhou
+unhous
+unhurt
+unicorn
+unicorn
+unimprov
+uninhabit
+uninhabit
+unintellig
+union
+union
+unit
+unit
+uniti
+univers
+univers
+univers
+univers
+unjoint
+unjust
+unjustic
+unjustli
+unkennel
+unkept
+unkind
+unkindest
+unkindli
+unkind
+unk
+unkinglik
+unkiss
+unknit
+unknow
+unknown
+unlac
+unlaid
+unlaw
+unlawfulli
+unlearn
+unlearn
+unless
+unlesson
+unlett
+unlett
+unlick
+unlik
+unlik
+unlimit
+unlin
+unlink
+unload
+unload
+unload
+unload
+unlock
+unlock
+unlook
+unlook
+unloo
+unloos
+unlov
+unlov
+unluckili
+unlucki
+unmad
+unmak
+unmanli
+unmann
+unmann
+unmannerd
+unmannerli
+unmarri
+unmask
+unmask
+unmask
+unmask
+unmast
+unmatch
+unmatch
+unmatch
+unmeasur
+unmeet
+unmellow
+unmerci
+unmerit
+unmerit
+unmind
+unmindful
+unmingl
+unmitig
+unmitig
+unmix
+unmoan
+unmov
+unmov
+unmov
+unmuffl
+unmuffl
+unmus
+unmuzzl
+unmuzzl
+unnatur
+unnatur
+unnatur
+unnecessarili
+unnecessari
+unneighbourli
+unnerv
+unnobl
+unnot
+unnumb
+unnumb
+unow
+unpack
+unpaid
+unparagon
+unparallel
+unparti
+unpath
+unpav
+unpai
+unpeac
+unpeg
+unpeopl
+unpeopl
+unperfect
+unperfect
+unpick
+unpin
+unpink
+unpiti
+unpitifulli
+unplagu
+unplaus
+unplea
+unpleas
+unpleas
+unpolici
+unpolish
+unpolish
+unpollut
+unpossess
+unpossess
+unposs
+unpracti
+unpregn
+unpremedit
+unprepar
+unprepar
+unpress
+unprevail
+unprev
+unpriz
+unpriz
+unprofit
+unprofit
+unprop
+unproperli
+unproport
+unprovid
+unprovid
+unprovid
+unprovok
+unprun
+unprun
+unpublish
+unpurg
+unpurpo
+unqual
+unqueen
+unquest
+unquestion
+unquiet
+unquietli
+unquiet
+unrais
+unrak
+unread
+unreadi
+unreal
+unreason
+unreason
+unreclaim
+unreconcil
+unreconcili
+unrecount
+unrecur
+unregard
+unregist
+unrel
+unremov
+unremov
+unrepriev
+unresolv
+unrespect
+unrespect
+unrest
+unrestor
+unrestrain
+unreveng
+unreverend
+unrever
+unrev
+unreward
+unright
+unright
+unrip
+unripp
+unrival
+unrol
+unroof
+unroost
+unroot
+unrough
+unruli
+unsaf
+unsalut
+unsanctifi
+unsatisfi
+unsavouri
+unsai
+unscal
+unscann
+unscarr
+unschool
+unscorch
+unscour
+unscratch
+unseal
+unseam
+unsearch
+unseason
+unseason
+unseason
+unseason
+unsecond
+unsecret
+unseduc
+unse
+unseem
+unseemli
+unseen
+unseminar
+unsepar
+unservic
+unset
+unsettl
+unsettl
+unsev
+unsex
+unshak
+unshak
+unshaken
+unshap
+unshap
+unsheath
+unsheath
+unshorn
+unshout
+unshown
+unshrink
+unshrubb
+unshunn
+unshunn
+unsift
+unsightli
+unsinew
+unsist
+unskil
+unskilfulli
+unskil
+unslip
+unsmirch
+unsoil
+unsolicit
+unsort
+unsought
+unsound
+unsound
+unspeak
+unspeak
+unspeak
+unspher
+unspok
+unspoken
+unspot
+unsquar
+unstabl
+unstaid
+unstain
+unstain
+unstanch
+unstat
+unsteadfast
+unstoop
+unstring
+unstuff
+unsubstanti
+unsuit
+unsuit
+unsulli
+unsunn
+unsur
+unsur
+unsuspect
+unswai
+unsway
+unswai
+unswear
+unswept
+unsworn
+untaint
+untalk
+untangl
+untangl
+untast
+untaught
+untemp
+untend
+untent
+untent
+unthank
+unthank
+unthink
+unthought
+unthread
+unthrift
+unthrift
+unthrifti
+unti
+unti
+until
+untimb
+untim
+untir
+untir
+untir
+untitl
+unto
+untold
+untouch
+untoward
+untowardli
+untrad
+untrain
+untrain
+untread
+untreasur
+untri
+untrim
+untrod
+untrodden
+untroubl
+untru
+untruss
+untruth
+untruth
+untuck
+untun
+untun
+untun
+untutor
+untutor
+untwin
+unurg
+unu
+unus
+unusu
+unvalu
+unvanquish
+unvarnish
+unveil
+unveil
+unvener
+unvex
+unviol
+unvirtu
+unvisit
+unvulner
+unwar
+unwarili
+unwash
+unwatch
+unweari
+unw
+unwedg
+unweed
+unweigh
+unweigh
+unwelcom
+unwept
+unwhipp
+unwholesom
+unwieldi
+unwil
+unwillingli
+unwilling
+unwind
+unwip
+unwis
+unwis
+unwish
+unwish
+unwit
+unwittingli
+unwont
+unwoo
+unworthi
+unworthiest
+unworthili
+unworthi
+unworthi
+unwrung
+unyok
+unyok
+up
+upbraid
+upbraid
+upbraid
+upbraid
+uphoard
+uphold
+upholdeth
+uphold
+uphold
+uplift
+uplift
+upmost
+upon
+upper
+uprear
+uprear
+upright
+upright
+upright
+upris
+upris
+uproar
+uproar
+uprou
+upshoot
+upshot
+upsid
+upspr
+upstair
+upstart
+upturn
+upward
+upward
+urchin
+urchinfield
+urchin
+urg
+urg
+urg
+urgent
+urg
+urgest
+urg
+urin
+urin
+urin
+urn
+urn
+ur
+ursa
+urslei
+ursula
+urswick
+us
+usag
+usanc
+usanc
+us
+us
+us
+useless
+user
+us
+usest
+useth
+usher
+usher
+usher
+usher
+us
+usual
+usual
+usur
+usur
+usuri
+usur
+usurp
+usurp
+usurp
+usurp
+usurp
+usurp
+usurpingli
+usurp
+usuri
+ut
+utensil
+utensil
+util
+utmost
+utt
+utter
+utter
+utter
+uttereth
+utter
+utterli
+uttermost
+utter
+uy
+v
+va
+vacanc
+vacant
+vacat
+vade
+vagabond
+vagabond
+vagram
+vagrom
+vail
+vail
+vail
+vaillant
+vain
+vainer
+vainglori
+vainli
+vain
+vai
+valanc
+valanc
+vale
+valenc
+valentin
+valentinu
+valentio
+valeria
+valeriu
+vale
+valiant
+valiantli
+valiant
+valid
+vallant
+vallei
+vallei
+valli
+valor
+valor
+valor
+valour
+valu
+valuat
+valu
+valu
+valueless
+valu
+valu
+vane
+vanish
+vanish
+vanish
+vanishest
+vanish
+vaniti
+vaniti
+vanquish
+vanquish
+vanquish
+vanquishest
+vanquisheth
+vant
+vantag
+vantag
+vantbrac
+vapian
+vapor
+vapor
+vapour
+vapour
+vara
+variabl
+varianc
+variat
+variat
+vari
+variest
+varieti
+varld
+varlet
+varletri
+varlet
+varletto
+varnish
+varriu
+varro
+vari
+vari
+vassal
+vassalag
+vassal
+vast
+vastid
+vasti
+vat
+vater
+vaudemont
+vaughan
+vault
+vaultag
+vault
+vault
+vault
+vaulti
+vaumond
+vaunt
+vaunt
+vaunter
+vaunt
+vauntingli
+vaunt
+vauvado
+vaux
+vaward
+ve
+veal
+vede
+vehem
+vehem
+vehement
+vehor
+veil
+veil
+veil
+vein
+vein
+vell
+velur
+velutu
+velvet
+vendibl
+vener
+vener
+venetia
+venetian
+venetian
+venei
+veng
+vengeanc
+vengeanc
+veng
+veni
+venial
+venic
+venison
+venit
+venom
+venom
+venom
+vent
+ventag
+vent
+ventidiu
+ventricl
+vent
+ventur
+ventur
+ventur
+ventur
+ventur
+ventur
+venu
+venu
+venuto
+ver
+verb
+verba
+verbal
+verbatim
+verbos
+verdict
+verdun
+verdur
+vere
+verefor
+verg
+verg
+verger
+verg
+verier
+veriest
+verifi
+verifi
+verili
+verit
+verit
+veriti
+veriti
+vermilion
+vermin
+vernon
+verona
+veronesa
+versal
+vers
+vers
+vers
+vert
+veri
+vesper
+vessel
+vessel
+vestal
+vestment
+vestur
+vetch
+vetch
+veux
+vex
+vexat
+vexat
+vex
+vex
+vexest
+vexeth
+vex
+vi
+via
+vial
+vial
+viand
+viand
+vic
+vicar
+vice
+viceger
+vicentio
+viceroi
+viceroi
+vice
+vici
+viciou
+vicious
+vict
+victim
+victor
+victoress
+victori
+victori
+victor
+victori
+victual
+victual
+victual
+videlicet
+video
+vide
+videsn
+vidi
+vie
+vi
+vienna
+view
+viewest
+vieweth
+view
+viewless
+view
+vigil
+vigil
+vigil
+vigit
+vigour
+vii
+viii
+vile
+vile
+vile
+viler
+vilest
+vill
+villag
+villag
+villageri
+villag
+villain
+villaini
+villain
+villain
+villain
+villaini
+villani
+villan
+villani
+villiago
+villian
+villianda
+villian
+vinaigr
+vincentio
+vincer
+vindic
+vine
+vinegar
+vine
+vineyard
+vineyard
+vint
+vintner
+viol
+viola
+violat
+violat
+violat
+violat
+violat
+violenc
+violent
+violenta
+violenteth
+violent
+violet
+violet
+viper
+viper
+viper
+vir
+virgilia
+virgin
+virgin
+virginal
+virgin
+virginiu
+virgin
+virgo
+virtu
+virtu
+virtuou
+virtuous
+visag
+visag
+visag
+visard
+viscount
+visibl
+visibl
+vision
+vision
+visit
+visit
+visit
+visit
+visit
+visit
+visitor
+visitor
+visit
+visor
+vita
+vita
+vital
+vitement
+vitruvio
+vitx
+viva
+vivant
+vive
+vixen
+viz
+vizament
+vizard
+vizard
+vizard
+vizor
+vlout
+vocat
+vocativo
+vocatur
+voce
+voic
+voic
+voic
+void
+void
+void
+voke
+volabl
+volant
+volivorco
+vollei
+volquessen
+volsc
+volsc
+volscian
+volscian
+volt
+voltemand
+volubl
+volubl
+volum
+volum
+volumnia
+volumniu
+voluntari
+voluntari
+voluptu
+voluptu
+vomiss
+vomit
+vomit
+vor
+vore
+vortnight
+vot
+votari
+votarist
+votarist
+votari
+votr
+vouch
+voucher
+voucher
+vouch
+vouch
+vouchsaf
+vouchsaf
+vouchsaf
+vouchsaf
+vouchsaf
+voudrai
+vour
+vou
+voutsaf
+vow
+vow
+vowel
+vowel
+vow
+vow
+vox
+voyag
+voyag
+vraiment
+vulcan
+vulgar
+vulgarli
+vulgar
+vulgo
+vulner
+vultur
+vultur
+vurther
+w
+wad
+waddl
+wade
+wade
+wafer
+waft
+waftag
+waft
+waft
+wag
+wage
+wager
+wager
+wage
+wag
+waggish
+waggl
+waggon
+waggon
+wagon
+wagon
+wag
+wagtail
+wail
+wail
+wail
+wail
+wain
+wainrop
+wainscot
+waist
+wait
+wait
+waiter
+waiteth
+wait
+wait
+wak
+wake
+wake
+wakefield
+waken
+waken
+wake
+wakest
+wake
+wale
+walk
+walk
+walk
+walk
+wall
+wall
+wallet
+wallet
+wallon
+walloon
+wallow
+wall
+walnut
+walter
+wan
+wand
+wander
+wander
+wander
+wander
+wander
+wand
+wane
+wane
+wane
+wane
+wann
+want
+want
+wanteth
+want
+wanton
+wantonli
+wanton
+wanton
+want
+wappen
+war
+warbl
+warbl
+ward
+ward
+warden
+warder
+warder
+wardrob
+wardrop
+ward
+ware
+ware
+warili
+warkworth
+warlik
+warm
+warm
+warmer
+warm
+warm
+warmth
+warn
+warn
+warn
+warn
+warn
+warp
+warp
+warr
+warrant
+warrant
+warranteth
+warrantis
+warrant
+warrant
+warranti
+warren
+warren
+war
+warrior
+warrior
+war
+wart
+warwick
+warwickshir
+wari
+wa
+wash
+wash
+washer
+wash
+washford
+wash
+wasp
+waspish
+wasp
+wassail
+wassail
+wast
+wast
+wast
+wast
+waster
+wast
+wast
+wat
+watch
+watch
+watcher
+watch
+watch
+watch
+watch
+watchman
+watchmen
+watchword
+water
+waterdrop
+water
+waterfli
+waterford
+water
+waterish
+waterpot
+waterrug
+water
+waterton
+wateri
+wav
+wave
+wave
+waver
+waver
+waver
+wave
+wave
+waw
+wawl
+wax
+wax
+waxen
+wax
+wax
+wai
+waylaid
+waylai
+wai
+wayward
+wayward
+wayward
+we
+weak
+weaken
+weaken
+weaker
+weakest
+weakl
+weakli
+weak
+weal
+wealsmen
+wealth
+wealthiest
+wealthili
+wealthi
+wealtlli
+wean
+weapon
+weapon
+wear
+wearer
+wearer
+weari
+weari
+weariest
+wearili
+weari
+wear
+wearisom
+wear
+weari
+weasel
+weather
+weathercock
+weather
+weav
+weav
+weaver
+weaver
+weav
+weav
+web
+wed
+wed
+wed
+wedg
+wedg
+wedg
+wedlock
+wednesdai
+weed
+weed
+weeder
+weed
+weed
+weedi
+week
+week
+weekli
+week
+ween
+ween
+weep
+weeper
+weep
+weepingli
+weep
+weep
+weet
+weigh
+weigh
+weigh
+weigh
+weight
+weightier
+weightless
+weight
+weighti
+weird
+welcom
+welcom
+welcom
+welcom
+welcomest
+welfar
+welkin
+well
+well
+welsh
+welshman
+welshmen
+welshwomen
+wench
+wench
+wench
+wend
+went
+wept
+weradai
+were
+wert
+west
+western
+westminst
+westmoreland
+westward
+wet
+wether
+wet
+wezand
+whale
+whale
+wharf
+wharf
+what
+whate
+whatev
+whatso
+whatsoev
+whatsom
+whe
+wheat
+wheaten
+wheel
+wheel
+wheel
+wheer
+wheeson
+wheez
+whelk
+whelk
+whelm
+whelp
+whelp
+whelp
+when
+whena
+whenc
+whencesoev
+whene
+whenev
+whensoev
+where
+whereabout
+wherea
+whereat
+wherebi
+wherefor
+wherein
+whereinto
+whereof
+whereon
+whereout
+whereso
+whereso
+wheresoev
+wheresom
+whereto
+whereuntil
+whereunto
+whereupon
+wherev
+wherewith
+wherewith
+whet
+whether
+whetston
+whet
+whew
+whei
+which
+whiff
+whiffler
+while
+while
+whilst
+whin
+whine
+whine
+whinid
+whine
+whip
+whipp
+whipper
+whip
+whip
+whipster
+whipstock
+whipt
+whirl
+whirl
+whirligig
+whirl
+whirlpool
+whirl
+whirlwind
+whirlwind
+whisp
+whisper
+whisper
+whisper
+whisper
+whist
+whistl
+whistl
+whistl
+whit
+white
+whitehal
+white
+white
+whiter
+white
+whitest
+whither
+white
+whitmor
+whitster
+whitsun
+whittl
+whizz
+who
+whoa
+whoe
+whoever
+whole
+wholesom
+wholesom
+wholli
+whom
+whoobub
+whoop
+whoop
+whor
+whore
+whoremast
+whoremasterli
+whoremong
+whore
+whoreson
+whoreson
+whore
+whorish
+whose
+whoso
+whoso
+whosoev
+why
+wi
+wick
+wick
+wickedn
+wicked
+wicket
+wicki
+wid
+wide
+widen
+wider
+widow
+widow
+widow
+widowhood
+widow
+wield
+wife
+wight
+wight
+wild
+wildcat
+wilder
+wilder
+wildest
+wildfir
+wildli
+wild
+wild
+wile
+wil
+wilful
+wilfulli
+wilfuln
+wil
+will
+will
+willer
+willeth
+william
+william
+will
+willingli
+willing
+willoughbi
+willow
+will
+wilt
+wiltshir
+wimpl
+win
+winc
+winch
+winchest
+wincot
+wind
+wind
+windgal
+wind
+windlass
+windmil
+window
+window
+windpip
+wind
+windsor
+windi
+wine
+wing
+wing
+wingfield
+wingham
+wing
+wink
+wink
+wink
+winner
+winner
+win
+winnow
+winnow
+winnow
+win
+winter
+winterli
+winter
+wip
+wipe
+wipe
+wipe
+wipe
+wire
+wire
+wiri
+wisdom
+wisdom
+wise
+wiseli
+wise
+wiser
+wisest
+wish
+wish
+wisher
+wisher
+wish
+wishest
+wisheth
+wish
+wish
+wishtli
+wisp
+wist
+wit
+witb
+witch
+witchcraft
+witch
+witch
+with
+withal
+withdraw
+withdraw
+withdrawn
+withdrew
+wither
+wither
+wither
+wither
+withheld
+withhold
+withhold
+within
+withold
+without
+withstand
+withstand
+withstood
+witless
+wit
+wit
+witnesseth
+wit
+wit
+wit
+wittenberg
+wittiest
+wittili
+wit
+wittingli
+wittol
+wittolli
+witti
+wiv
+wive
+wive
+wive
+wive
+wizard
+wizard
+wo
+woe
+woeful
+woeful
+woefullest
+woe
+woful
+wolf
+wolfish
+wolsei
+wolv
+wolvish
+woman
+womanhood
+womanish
+womankind
+womanli
+womb
+womb
+wombi
+women
+won
+woncot
+wond
+wonder
+wonder
+wonder
+wonderfulli
+wonder
+wonder
+wondrou
+wondrous
+wont
+wont
+woo
+wood
+woodbin
+woodcock
+woodcock
+wooden
+woodland
+woodman
+woodmong
+wood
+woodstock
+woodvil
+woo
+wooer
+wooer
+wooe
+woof
+woo
+wooingli
+wool
+woollen
+woolli
+woolsack
+woolsei
+woolward
+woo
+wor
+worcest
+word
+word
+wore
+worin
+work
+worker
+work
+work
+workman
+workmanli
+workmanship
+workmen
+work
+worki
+world
+worldl
+worldli
+world
+worm
+worm
+wormwood
+wormi
+worn
+worri
+worri
+worri
+worri
+wors
+worser
+worship
+worship
+worshipfulli
+worshipp
+worshipp
+worshipp
+worshippest
+worship
+worst
+worst
+wort
+worth
+worthi
+worthier
+worthi
+worthiest
+worthili
+worthi
+worthless
+worth
+worthi
+wort
+wot
+wot
+wot
+wouid
+would
+wouldest
+wouldst
+wound
+wound
+wound
+wound
+woundless
+wound
+woun
+woven
+wow
+wrack
+wrack
+wrangl
+wrangler
+wrangler
+wrangl
+wrap
+wrapp
+wrap
+wrapt
+wrath
+wrath
+wrathfulli
+wrath
+wreak
+wreak
+wreak
+wreath
+wreath
+wreathen
+wreath
+wreck
+wreck
+wreck
+wren
+wrench
+wrench
+wren
+wrest
+wrest
+wrest
+wrestl
+wrestl
+wrestler
+wrestl
+wretch
+wretchcd
+wretch
+wretched
+wretch
+wring
+wringer
+wring
+wring
+wrinkl
+wrinkl
+wrinkl
+wrist
+wrist
+writ
+write
+writer
+writer
+write
+writhl
+write
+write
+writ
+written
+wrong
+wrong
+wronger
+wrong
+wrongfulli
+wrong
+wrongli
+wrong
+wronk
+wrote
+wroth
+wrought
+wrung
+wry
+wry
+wt
+wul
+wye
+x
+xanthipp
+xi
+xii
+xiii
+xiv
+xv
+y
+yard
+yard
+yare
+yare
+yarn
+yaughan
+yaw
+yawn
+yawn
+yclepe
+yclipe
+ye
+yea
+yead
+year
+yearli
+yearn
+yearn
+year
+yea
+yeast
+yedward
+yell
+yellow
+yellow
+yellow
+yellow
+yellow
+yell
+yelp
+yeoman
+yeomen
+yerk
+ye
+yesterdai
+yesterdai
+yesternight
+yesti
+yet
+yew
+yicld
+yield
+yield
+yielder
+yielder
+yield
+yield
+yok
+yoke
+yoke
+yokefellow
+yoke
+yoketh
+yon
+yond
+yonder
+yongrei
+yore
+yorick
+york
+yorkist
+york
+yorkshir
+you
+young
+younger
+youngest
+youngl
+youngl
+youngli
+younker
+your
+your
+yourself
+yourselv
+youth
+youth
+youth
+youtli
+zani
+zani
+zeal
+zealou
+zeal
+zed
+zenelophon
+zenith
+zephyr
+zir
+zo
+zodiac
+zodiac
+zone
+zound
+zwagger
diff --git a/basis/porter-stemmer/test/voc.txt b/basis/porter-stemmer/test/voc.txt
new file mode 100644 (file)
index 0000000..604ef40
--- /dev/null
@@ -0,0 +1,23531 @@
+a
+aaron
+abaissiez
+abandon
+abandoned
+abase
+abash
+abate
+abated
+abatement
+abatements
+abates
+abbess
+abbey
+abbeys
+abbominable
+abbot
+abbots
+abbreviated
+abed
+abel
+aberga
+abergavenny
+abet
+abetting
+abhominable
+abhor
+abhorr
+abhorred
+abhorring
+abhors
+abhorson
+abide
+abides
+abilities
+ability
+abject
+abjectly
+abjects
+abjur
+abjure
+able
+abler
+aboard
+abode
+aboded
+abodements
+aboding
+abominable
+abominably
+abominations
+abortive
+abortives
+abound
+abounding
+about
+above
+abr
+abraham
+abram
+abreast
+abridg
+abridge
+abridged
+abridgment
+abroach
+abroad
+abrogate
+abrook
+abrupt
+abruption
+abruptly
+absence
+absent
+absey
+absolute
+absolutely
+absolv
+absolver
+abstains
+abstemious
+abstinence
+abstract
+absurd
+absyrtus
+abundance
+abundant
+abundantly
+abus
+abuse
+abused
+abuser
+abuses
+abusing
+abutting
+aby
+abysm
+ac
+academe
+academes
+accent
+accents
+accept
+acceptable
+acceptance
+accepted
+accepts
+access
+accessary
+accessible
+accidence
+accident
+accidental
+accidentally
+accidents
+accite
+accited
+accites
+acclamations
+accommodate
+accommodated
+accommodation
+accommodations
+accommodo
+accompanied
+accompany
+accompanying
+accomplices
+accomplish
+accomplished
+accomplishing
+accomplishment
+accompt
+accord
+accordant
+accorded
+accordeth
+according
+accordingly
+accords
+accost
+accosted
+account
+accountant
+accounted
+accounts
+accoutred
+accoutrement
+accoutrements
+accrue
+accumulate
+accumulated
+accumulation
+accurs
+accursed
+accurst
+accus
+accusation
+accusations
+accusative
+accusativo
+accuse
+accused
+accuser
+accusers
+accuses
+accuseth
+accusing
+accustom
+accustomed
+ace
+acerb
+ache
+acheron
+aches
+achiev
+achieve
+achieved
+achievement
+achievements
+achiever
+achieves
+achieving
+achilles
+aching
+achitophel
+acknowledg
+acknowledge
+acknowledged
+acknowledgment
+acknown
+acold
+aconitum
+acordo
+acorn
+acquaint
+acquaintance
+acquainted
+acquaints
+acquir
+acquire
+acquisition
+acquit
+acquittance
+acquittances
+acquitted
+acre
+acres
+across
+act
+actaeon
+acted
+acting
+action
+actions
+actium
+active
+actively
+activity
+actor
+actors
+acts
+actual
+acture
+acute
+acutely
+ad
+adage
+adallas
+adam
+adamant
+add
+added
+adder
+adders
+addeth
+addict
+addicted
+addiction
+adding
+addition
+additions
+addle
+address
+addressing
+addrest
+adds
+adhere
+adheres
+adieu
+adieus
+adjacent
+adjoin
+adjoining
+adjourn
+adjudg
+adjudged
+adjunct
+administer
+administration
+admir
+admirable
+admiral
+admiration
+admire
+admired
+admirer
+admiring
+admiringly
+admission
+admit
+admits
+admittance
+admitted
+admitting
+admonish
+admonishing
+admonishment
+admonishments
+admonition
+ado
+adonis
+adopt
+adopted
+adoptedly
+adoption
+adoptious
+adopts
+ador
+adoration
+adorations
+adore
+adorer
+adores
+adorest
+adoreth
+adoring
+adorn
+adorned
+adornings
+adornment
+adorns
+adown
+adramadio
+adrian
+adriana
+adriano
+adriatic
+adsum
+adulation
+adulterate
+adulterates
+adulterers
+adulteress
+adulteries
+adulterous
+adultery
+adultress
+advanc
+advance
+advanced
+advancement
+advancements
+advances
+advancing
+advantage
+advantageable
+advantaged
+advantageous
+advantages
+advantaging
+advent
+adventur
+adventure
+adventures
+adventuring
+adventurous
+adventurously
+adversaries
+adversary
+adverse
+adversely
+adversities
+adversity
+advertis
+advertise
+advertised
+advertisement
+advertising
+advice
+advis
+advise
+advised
+advisedly
+advises
+advisings
+advocate
+advocation
+aeacida
+aeacides
+aedile
+aediles
+aegeon
+aegion
+aegles
+aemelia
+aemilia
+aemilius
+aeneas
+aeolus
+aer
+aerial
+aery
+aesculapius
+aeson
+aesop
+aetna
+afar
+afear
+afeard
+affability
+affable
+affair
+affaire
+affairs
+affect
+affectation
+affectations
+affected
+affectedly
+affecteth
+affecting
+affection
+affectionate
+affectionately
+affections
+affects
+affeer
+affianc
+affiance
+affianced
+affied
+affin
+affined
+affinity
+affirm
+affirmation
+affirmatives
+afflict
+afflicted
+affliction
+afflictions
+afflicts
+afford
+affordeth
+affords
+affray
+affright
+affrighted
+affrights
+affront
+affronted
+affy
+afield
+afire
+afloat
+afoot
+afore
+aforehand
+aforesaid
+afraid
+afresh
+afric
+africa
+african
+afront
+after
+afternoon
+afterward
+afterwards
+ag
+again
+against
+agamemmon
+agamemnon
+agate
+agaz
+age
+aged
+agenor
+agent
+agents
+ages
+aggravate
+aggrief
+agile
+agincourt
+agitation
+aglet
+agnize
+ago
+agone
+agony
+agree
+agreed
+agreeing
+agreement
+agrees
+agrippa
+aground
+ague
+aguecheek
+agued
+agueface
+agues
+ah
+aha
+ahungry
+ai
+aialvolio
+aiaria
+aid
+aidance
+aidant
+aided
+aiding
+aidless
+aids
+ail
+aim
+aimed
+aimest
+aiming
+aims
+ainsi
+aio
+air
+aired
+airless
+airs
+airy
+ajax
+akilling
+al
+alabaster
+alack
+alacrity
+alarbus
+alarm
+alarms
+alarum
+alarums
+alas
+alb
+alban
+albans
+albany
+albeit
+albion
+alchemist
+alchemy
+alcibiades
+alcides
+alder
+alderman
+aldermen
+ale
+alecto
+alehouse
+alehouses
+alencon
+alengon
+aleppo
+ales
+alewife
+alexander
+alexanders
+alexandria
+alexandrian
+alexas
+alias
+alice
+alien
+aliena
+alight
+alighted
+alights
+aliis
+alike
+alisander
+alive
+all
+alla
+allay
+allayed
+allaying
+allayment
+allayments
+allays
+allegation
+allegations
+allege
+alleged
+allegiance
+allegiant
+alley
+alleys
+allhallowmas
+alliance
+allicholy
+allied
+allies
+alligant
+alligator
+allons
+allot
+allots
+allotted
+allottery
+allow
+allowance
+allowed
+allowing
+allows
+allur
+allure
+allurement
+alluring
+allusion
+ally
+allycholly
+almain
+almanac
+almanack
+almanacs
+almighty
+almond
+almost
+alms
+almsman
+aloes
+aloft
+alone
+along
+alonso
+aloof
+aloud
+alphabet
+alphabetical
+alphonso
+alps
+already
+also
+alt
+altar
+altars
+alter
+alteration
+altered
+alters
+althaea
+although
+altitude
+altogether
+alton
+alway
+always
+am
+amaimon
+amain
+amaking
+amamon
+amaz
+amaze
+amazed
+amazedly
+amazedness
+amazement
+amazes
+amazeth
+amazing
+amazon
+amazonian
+amazons
+ambassador
+ambassadors
+amber
+ambiguides
+ambiguities
+ambiguous
+ambition
+ambitions
+ambitious
+ambitiously
+amble
+ambled
+ambles
+ambling
+ambo
+ambuscadoes
+ambush
+amen
+amend
+amended
+amendment
+amends
+amerce
+america
+ames
+amiable
+amid
+amidst
+amiens
+amis
+amiss
+amities
+amity
+amnipotent
+among
+amongst
+amorous
+amorously
+amort
+amount
+amounts
+amour
+amphimacus
+ample
+ampler
+amplest
+amplified
+amplify
+amply
+ampthill
+amurath
+amyntas
+an
+anatomiz
+anatomize
+anatomy
+ancestor
+ancestors
+ancestry
+anchises
+anchor
+anchorage
+anchored
+anchoring
+anchors
+anchovies
+ancient
+ancientry
+ancients
+ancus
+and
+andirons
+andpholus
+andren
+andrew
+andromache
+andronici
+andronicus
+anew
+ang
+angel
+angelica
+angelical
+angelo
+angels
+anger
+angerly
+angers
+anges
+angiers
+angl
+anglais
+angle
+angler
+angleterre
+angliae
+angling
+anglish
+angrily
+angry
+anguish
+angus
+animal
+animals
+animis
+anjou
+ankle
+anna
+annals
+anne
+annex
+annexed
+annexions
+annexment
+annothanize
+announces
+annoy
+annoyance
+annoying
+annual
+anoint
+anointed
+anon
+another
+anselmo
+answer
+answerable
+answered
+answerest
+answering
+answers
+ant
+ante
+antenor
+antenorides
+anteroom
+anthem
+anthems
+anthony
+anthropophagi
+anthropophaginian
+antiates
+antic
+anticipate
+anticipates
+anticipatest
+anticipating
+anticipation
+antick
+anticly
+antics
+antidote
+antidotes
+antigonus
+antiopa
+antipathy
+antipholus
+antipholuses
+antipodes
+antiquary
+antique
+antiquity
+antium
+antoniad
+antonio
+antonius
+antony
+antres
+anvil
+any
+anybody
+anyone
+anything
+anywhere
+ap
+apace
+apart
+apartment
+apartments
+ape
+apemantus
+apennines
+apes
+apiece
+apish
+apollinem
+apollo
+apollodorus
+apology
+apoplex
+apoplexy
+apostle
+apostles
+apostrophas
+apoth
+apothecary
+appal
+appall
+appalled
+appals
+apparel
+apparell
+apparelled
+apparent
+apparently
+apparition
+apparitions
+appeach
+appeal
+appeals
+appear
+appearance
+appeared
+appeareth
+appearing
+appears
+appeas
+appease
+appeased
+appelant
+appele
+appelee
+appeles
+appelez
+appellant
+appellants
+appelons
+appendix
+apperil
+appertain
+appertaining
+appertainings
+appertains
+appertinent
+appertinents
+appetite
+appetites
+applaud
+applauded
+applauding
+applause
+applauses
+apple
+apples
+appletart
+appliance
+appliances
+applications
+applied
+applies
+apply
+applying
+appoint
+appointed
+appointment
+appointments
+appoints
+apprehend
+apprehended
+apprehends
+apprehension
+apprehensions
+apprehensive
+apprendre
+apprenne
+apprenticehood
+appris
+approach
+approachers
+approaches
+approacheth
+approaching
+approbation
+approof
+appropriation
+approv
+approve
+approved
+approvers
+approves
+appurtenance
+appurtenances
+apricocks
+april
+apron
+aprons
+apt
+apter
+aptest
+aptly
+aptness
+aqua
+aquilon
+aquitaine
+arabia
+arabian
+araise
+arbitrate
+arbitrating
+arbitrator
+arbitrement
+arbors
+arbour
+arc
+arch
+archbishop
+archbishopric
+archdeacon
+arched
+archelaus
+archer
+archers
+archery
+archibald
+archidamus
+architect
+arcu
+arde
+arden
+ardent
+ardour
+are
+argal
+argier
+argo
+argosies
+argosy
+argu
+argue
+argued
+argues
+arguing
+argument
+arguments
+argus
+ariachne
+ariadne
+ariel
+aries
+aright
+arinado
+arinies
+arion
+arise
+arises
+ariseth
+arising
+aristode
+aristotle
+arithmetic
+arithmetician
+ark
+arm
+arma
+armado
+armadoes
+armagnac
+arme
+armed
+armenia
+armies
+armigero
+arming
+armipotent
+armor
+armour
+armourer
+armourers
+armours
+armoury
+arms
+army
+arn
+aroint
+arose
+arouse
+aroused
+arragon
+arraign
+arraigned
+arraigning
+arraignment
+arrant
+arras
+array
+arrearages
+arrest
+arrested
+arrests
+arriv
+arrival
+arrivance
+arrive
+arrived
+arrives
+arriving
+arrogance
+arrogancy
+arrogant
+arrow
+arrows
+art
+artemidorus
+arteries
+arthur
+article
+articles
+articulate
+artificer
+artificial
+artillery
+artire
+artist
+artists
+artless
+artois
+arts
+artus
+arviragus
+as
+asaph
+ascanius
+ascend
+ascended
+ascendeth
+ascends
+ascension
+ascent
+ascribe
+ascribes
+ash
+asham
+ashamed
+asher
+ashes
+ashford
+ashore
+ashouting
+ashy
+asia
+aside
+ask
+askance
+asked
+asker
+asketh
+asking
+asks
+aslant
+asleep
+asmath
+asp
+aspect
+aspects
+aspen
+aspersion
+aspic
+aspicious
+aspics
+aspir
+aspiration
+aspire
+aspiring
+asquint
+ass
+assail
+assailable
+assailant
+assailants
+assailed
+assaileth
+assailing
+assails
+assassination
+assault
+assaulted
+assaults
+assay
+assaying
+assays
+assemblance
+assemble
+assembled
+assemblies
+assembly
+assent
+asses
+assez
+assign
+assigned
+assigns
+assinico
+assist
+assistance
+assistances
+assistant
+assistants
+assisted
+assisting
+associate
+associated
+associates
+assuage
+assubjugate
+assum
+assume
+assumes
+assumption
+assur
+assurance
+assure
+assured
+assuredly
+assures
+assyrian
+astonish
+astonished
+astraea
+astray
+astrea
+astronomer
+astronomers
+astronomical
+astronomy
+asunder
+at
+atalanta
+ate
+ates
+athenian
+athenians
+athens
+athol
+athversary
+athwart
+atlas
+atomies
+atomy
+atone
+atonement
+atonements
+atropos
+attach
+attached
+attachment
+attain
+attainder
+attains
+attaint
+attainted
+attainture
+attempt
+attemptable
+attempted
+attempting
+attempts
+attend
+attendance
+attendant
+attendants
+attended
+attendents
+attendeth
+attending
+attends
+attent
+attention
+attentive
+attentivenes
+attest
+attested
+attir
+attire
+attired
+attires
+attorney
+attorneyed
+attorneys
+attorneyship
+attract
+attraction
+attractive
+attracts
+attribute
+attributed
+attributes
+attribution
+attributive
+atwain
+au
+aubrey
+auburn
+aucun
+audacious
+audaciously
+audacity
+audible
+audience
+audis
+audit
+auditor
+auditors
+auditory
+audre
+audrey
+aufidius
+aufidiuses
+auger
+aught
+augment
+augmentation
+augmented
+augmenting
+augurer
+augurers
+augures
+auguring
+augurs
+augury
+august
+augustus
+auld
+aumerle
+aunchient
+aunt
+aunts
+auricular
+aurora
+auspicious
+aussi
+austere
+austerely
+austereness
+austerity
+austria
+aut
+authentic
+author
+authorities
+authority
+authorized
+authorizing
+authors
+autolycus
+autre
+autumn
+auvergne
+avail
+avails
+avarice
+avaricious
+avaunt
+ave
+aveng
+avenge
+avenged
+averring
+avert
+aves
+avez
+avis
+avoid
+avoided
+avoiding
+avoids
+avoirdupois
+avouch
+avouched
+avouches
+avouchment
+avow
+aw
+await
+awaits
+awak
+awake
+awaked
+awaken
+awakened
+awakens
+awakes
+awaking
+award
+awards
+awasy
+away
+awe
+aweary
+aweless
+awful
+awhile
+awkward
+awl
+awooing
+awork
+awry
+axe
+axle
+axletree
+ay
+aye
+ayez
+ayli
+azur
+azure
+b
+ba
+baa
+babbl
+babble
+babbling
+babe
+babes
+babies
+baboon
+baboons
+baby
+babylon
+bacare
+bacchanals
+bacchus
+bach
+bachelor
+bachelors
+back
+backbite
+backbitten
+backing
+backs
+backward
+backwardly
+backwards
+bacon
+bacons
+bad
+bade
+badge
+badged
+badges
+badly
+badness
+baes
+baffl
+baffle
+baffled
+bag
+baggage
+bagot
+bagpipe
+bags
+bail
+bailiff
+baillez
+baily
+baisant
+baisees
+baiser
+bait
+baited
+baiting
+baitings
+baits
+bajazet
+bak
+bake
+baked
+baker
+bakers
+bakes
+baking
+bal
+balanc
+balance
+balcony
+bald
+baldrick
+bale
+baleful
+balk
+ball
+ballad
+ballads
+ballast
+ballasting
+ballet
+ballow
+balls
+balm
+balms
+balmy
+balsam
+balsamum
+balth
+balthasar
+balthazar
+bames
+ban
+banbury
+band
+bandied
+banding
+bandit
+banditti
+banditto
+bands
+bandy
+bandying
+bane
+banes
+bang
+bangor
+banish
+banished
+banishers
+banishment
+banister
+bank
+bankrout
+bankrupt
+bankrupts
+banks
+banner
+bannerets
+banners
+banning
+banns
+banquet
+banqueted
+banqueting
+banquets
+banquo
+bans
+baptism
+baptista
+baptiz
+bar
+barbarian
+barbarians
+barbarism
+barbarous
+barbary
+barbason
+barbed
+barber
+barbermonger
+bard
+bardolph
+bards
+bare
+bared
+barefac
+barefaced
+barefoot
+bareheaded
+barely
+bareness
+barful
+bargain
+bargains
+barge
+bargulus
+baring
+bark
+barking
+barkloughly
+barks
+barky
+barley
+barm
+barn
+barnacles
+barnardine
+barne
+barnes
+barnet
+barns
+baron
+barons
+barony
+barr
+barrabas
+barrel
+barrels
+barren
+barrenly
+barrenness
+barricado
+barricadoes
+barrow
+bars
+barson
+barter
+bartholomew
+bas
+basan
+base
+baseless
+basely
+baseness
+baser
+bases
+basest
+bashful
+bashfulness
+basilisco
+basilisk
+basilisks
+basimecu
+basin
+basingstoke
+basins
+basis
+bask
+basket
+baskets
+bass
+bassanio
+basset
+bassianus
+basta
+bastard
+bastardizing
+bastardly
+bastards
+bastardy
+basted
+bastes
+bastinado
+basting
+bat
+batailles
+batch
+bate
+bated
+bates
+bath
+bathe
+bathed
+bathing
+baths
+bating
+batler
+bats
+batt
+battalia
+battalions
+batten
+batter
+battering
+batters
+battery
+battle
+battled
+battlefield
+battlements
+battles
+batty
+bauble
+baubles
+baubling
+baulk
+bavin
+bawcock
+bawd
+bawdry
+bawds
+bawdy
+bawl
+bawling
+bay
+baying
+baynard
+bayonne
+bays
+be
+beach
+beached
+beachy
+beacon
+bead
+beaded
+beadle
+beadles
+beads
+beadsmen
+beagle
+beagles
+beak
+beaks
+beam
+beamed
+beams
+bean
+beans
+bear
+beard
+bearded
+beardless
+beards
+bearer
+bearers
+bearest
+beareth
+bearing
+bears
+beast
+beastliest
+beastliness
+beastly
+beasts
+beat
+beated
+beaten
+beating
+beatrice
+beats
+beau
+beaufort
+beaumond
+beaumont
+beauteous
+beautied
+beauties
+beautified
+beautiful
+beautify
+beauty
+beaver
+beavers
+became
+because
+bechanc
+bechance
+bechanced
+beck
+beckon
+beckons
+becks
+becom
+become
+becomed
+becomes
+becoming
+becomings
+bed
+bedabbled
+bedash
+bedaub
+bedazzled
+bedchamber
+bedclothes
+bedded
+bedeck
+bedecking
+bedew
+bedfellow
+bedfellows
+bedford
+bedlam
+bedrench
+bedrid
+beds
+bedtime
+bedward
+bee
+beef
+beefs
+beehives
+been
+beer
+bees
+beest
+beetle
+beetles
+beeves
+befall
+befallen
+befalls
+befell
+befits
+befitted
+befitting
+befor
+before
+beforehand
+befortune
+befriend
+befriended
+befriends
+beg
+began
+beget
+begets
+begetting
+begg
+beggar
+beggared
+beggarly
+beggarman
+beggars
+beggary
+begging
+begin
+beginners
+beginning
+beginnings
+begins
+begnawn
+begone
+begot
+begotten
+begrimed
+begs
+beguil
+beguile
+beguiled
+beguiles
+beguiling
+begun
+behalf
+behalfs
+behav
+behaved
+behavedst
+behavior
+behaviors
+behaviour
+behaviours
+behead
+beheaded
+beheld
+behest
+behests
+behind
+behold
+beholder
+beholders
+beholdest
+beholding
+beholds
+behoof
+behooffull
+behooves
+behove
+behoves
+behowls
+being
+bel
+belarius
+belch
+belching
+beldam
+beldame
+beldams
+belee
+belgia
+belie
+belied
+belief
+beliest
+believ
+believe
+believed
+believes
+believest
+believing
+belike
+bell
+bellario
+belle
+bellied
+bellies
+bellman
+bellona
+bellow
+bellowed
+bellowing
+bellows
+bells
+belly
+bellyful
+belman
+belmont
+belock
+belong
+belonging
+belongings
+belongs
+belov
+beloved
+beloving
+below
+belt
+belzebub
+bemadding
+bemet
+bemete
+bemoan
+bemoaned
+bemock
+bemoil
+bemonster
+ben
+bench
+bencher
+benches
+bend
+bended
+bending
+bends
+bene
+beneath
+benedicite
+benedick
+benediction
+benedictus
+benefactors
+benefice
+beneficial
+benefit
+benefited
+benefits
+benetted
+benevolence
+benevolences
+benied
+benison
+bennet
+bent
+bentii
+bentivolii
+bents
+benumbed
+benvolio
+bepaint
+bepray
+bequeath
+bequeathed
+bequeathing
+bequest
+ber
+berard
+berattle
+beray
+bere
+bereave
+bereaved
+bereaves
+bereft
+bergamo
+bergomask
+berhym
+berhyme
+berkeley
+bermoothes
+bernardo
+berod
+berowne
+berri
+berries
+berrord
+berry
+bertram
+berwick
+bescreen
+beseech
+beseeched
+beseechers
+beseeching
+beseek
+beseem
+beseemeth
+beseeming
+beseems
+beset
+beshrew
+beside
+besides
+besieg
+besiege
+besieged
+beslubber
+besmear
+besmeared
+besmirch
+besom
+besort
+besotted
+bespake
+bespeak
+bespice
+bespoke
+bespotted
+bess
+bessy
+best
+bestained
+bested
+bestial
+bestir
+bestirr
+bestow
+bestowed
+bestowing
+bestows
+bestraught
+bestrew
+bestrid
+bestride
+bestrides
+bet
+betake
+beteem
+bethink
+bethought
+bethrothed
+bethump
+betid
+betide
+betideth
+betime
+betimes
+betoken
+betook
+betossed
+betray
+betrayed
+betraying
+betrays
+betrims
+betroth
+betrothed
+betroths
+bett
+betted
+better
+bettered
+bettering
+betters
+betting
+bettre
+between
+betwixt
+bevel
+beverage
+bevis
+bevy
+bewail
+bewailed
+bewailing
+bewails
+beware
+bewasted
+beweep
+bewept
+bewet
+bewhored
+bewitch
+bewitched
+bewitchment
+bewray
+beyond
+bezonian
+bezonians
+bianca
+bianco
+bias
+bibble
+bickerings
+bid
+bidden
+bidding
+biddings
+biddy
+bide
+bides
+biding
+bids
+bien
+bier
+bifold
+big
+bigamy
+biggen
+bigger
+bigness
+bigot
+bilberry
+bilbo
+bilboes
+bilbow
+bill
+billeted
+billets
+billiards
+billing
+billow
+billows
+bills
+bin
+bind
+bindeth
+binding
+binds
+biondello
+birch
+bird
+birding
+birdlime
+birds
+birnam
+birth
+birthday
+birthdom
+birthplace
+birthright
+birthrights
+births
+bis
+biscuit
+bishop
+bishops
+bisson
+bit
+bitch
+bite
+biter
+bites
+biting
+bits
+bitt
+bitten
+bitter
+bitterest
+bitterly
+bitterness
+blab
+blabb
+blabbing
+blabs
+black
+blackamoor
+blackamoors
+blackberries
+blackberry
+blacker
+blackest
+blackfriars
+blackheath
+blackmere
+blackness
+blacks
+bladder
+bladders
+blade
+bladed
+blades
+blains
+blam
+blame
+blamed
+blameful
+blameless
+blames
+blanc
+blanca
+blanch
+blank
+blanket
+blanks
+blaspheme
+blaspheming
+blasphemous
+blasphemy
+blast
+blasted
+blasting
+blastments
+blasts
+blaz
+blaze
+blazes
+blazing
+blazon
+blazoned
+blazoning
+bleach
+bleaching
+bleak
+blear
+bleared
+bleat
+bleated
+bleats
+bled
+bleed
+bleedest
+bleedeth
+bleeding
+bleeds
+blemish
+blemishes
+blench
+blenches
+blend
+blended
+blent
+bless
+blessed
+blessedly
+blessedness
+blesses
+blesseth
+blessing
+blessings
+blest
+blew
+blind
+blinded
+blindfold
+blinding
+blindly
+blindness
+blinds
+blink
+blinking
+bliss
+blist
+blister
+blisters
+blithe
+blithild
+bloat
+block
+blockish
+blocks
+blois
+blood
+blooded
+bloodhound
+bloodied
+bloodier
+bloodiest
+bloodily
+bloodless
+bloods
+bloodshed
+bloodshedding
+bloodstained
+bloody
+bloom
+blooms
+blossom
+blossoming
+blossoms
+blot
+blots
+blotted
+blotting
+blount
+blow
+blowed
+blowers
+blowest
+blowing
+blown
+blows
+blowse
+blubb
+blubber
+blubbering
+blue
+bluecaps
+bluest
+blunt
+blunted
+blunter
+bluntest
+blunting
+bluntly
+bluntness
+blunts
+blur
+blurr
+blurs
+blush
+blushes
+blushest
+blushing
+blust
+bluster
+blusterer
+blusters
+bo
+boar
+board
+boarded
+boarding
+boards
+boarish
+boars
+boast
+boasted
+boastful
+boasting
+boasts
+boat
+boats
+boatswain
+bob
+bobb
+boblibindo
+bobtail
+bocchus
+bode
+boded
+bodements
+bodes
+bodg
+bodied
+bodies
+bodiless
+bodily
+boding
+bodkin
+body
+bodykins
+bog
+boggle
+boggler
+bogs
+bohemia
+bohemian
+bohun
+boil
+boiling
+boils
+boist
+boisterous
+boisterously
+boitier
+bold
+bolden
+bolder
+boldest
+boldly
+boldness
+bolds
+bolingbroke
+bolster
+bolt
+bolted
+bolter
+bolters
+bolting
+bolts
+bombard
+bombards
+bombast
+bon
+bona
+bond
+bondage
+bonded
+bondmaid
+bondman
+bondmen
+bonds
+bondslave
+bone
+boneless
+bones
+bonfire
+bonfires
+bonjour
+bonne
+bonnet
+bonneted
+bonny
+bonos
+bonto
+bonville
+bood
+book
+bookish
+books
+boon
+boor
+boorish
+boors
+boot
+booted
+booties
+bootless
+boots
+booty
+bor
+bora
+borachio
+bordeaux
+border
+bordered
+borderers
+borders
+bore
+boreas
+bores
+boring
+born
+borne
+borough
+boroughs
+borrow
+borrowed
+borrower
+borrowing
+borrows
+bosko
+boskos
+bosky
+bosom
+bosoms
+boson
+boss
+bosworth
+botch
+botcher
+botches
+botchy
+both
+bots
+bottle
+bottled
+bottles
+bottom
+bottomless
+bottoms
+bouciqualt
+bouge
+bough
+boughs
+bought
+bounce
+bouncing
+bound
+bounded
+bounden
+boundeth
+bounding
+boundless
+bounds
+bounteous
+bounteously
+bounties
+bountiful
+bountifully
+bounty
+bourbier
+bourbon
+bourchier
+bourdeaux
+bourn
+bout
+bouts
+bove
+bow
+bowcase
+bowed
+bowels
+bower
+bowing
+bowl
+bowler
+bowling
+bowls
+bows
+bowsprit
+bowstring
+box
+boxes
+boy
+boyet
+boyish
+boys
+brabant
+brabantio
+brabble
+brabbler
+brac
+brace
+bracelet
+bracelets
+brach
+bracy
+brag
+bragg
+braggardism
+braggards
+braggart
+braggarts
+bragged
+bragging
+bragless
+brags
+braid
+braided
+brain
+brained
+brainford
+brainish
+brainless
+brains
+brainsick
+brainsickly
+brake
+brakenbury
+brakes
+brambles
+bran
+branch
+branches
+branchless
+brand
+branded
+brandish
+brandon
+brands
+bras
+brass
+brassy
+brat
+brats
+brav
+brave
+braved
+bravely
+braver
+bravery
+braves
+bravest
+braving
+brawl
+brawler
+brawling
+brawls
+brawn
+brawns
+bray
+braying
+braz
+brazen
+brazier
+breach
+breaches
+bread
+breadth
+break
+breaker
+breakfast
+breaking
+breaks
+breast
+breasted
+breasting
+breastplate
+breasts
+breath
+breathe
+breathed
+breather
+breathers
+breathes
+breathest
+breathing
+breathless
+breaths
+brecknock
+bred
+breech
+breeches
+breeching
+breed
+breeder
+breeders
+breeding
+breeds
+breese
+breeze
+breff
+bretagne
+brethen
+bretheren
+brethren
+brevis
+brevity
+brew
+brewage
+brewer
+brewers
+brewing
+brews
+briareus
+briars
+brib
+bribe
+briber
+bribes
+brick
+bricklayer
+bricks
+bridal
+bride
+bridegroom
+bridegrooms
+brides
+bridge
+bridgenorth
+bridges
+bridget
+bridle
+bridled
+brief
+briefer
+briefest
+briefly
+briefness
+brier
+briers
+brigandine
+bright
+brighten
+brightest
+brightly
+brightness
+brim
+brimful
+brims
+brimstone
+brinded
+brine
+bring
+bringer
+bringeth
+bringing
+bringings
+brings
+brinish
+brink
+brisk
+brisky
+bristle
+bristled
+bristly
+bristol
+bristow
+britain
+britaine
+britaines
+british
+briton
+britons
+brittany
+brittle
+broach
+broached
+broad
+broader
+broadsides
+brocas
+brock
+brogues
+broil
+broiling
+broils
+broke
+broken
+brokenly
+broker
+brokers
+brokes
+broking
+brooch
+brooches
+brood
+brooded
+brooding
+brook
+brooks
+broom
+broomstaff
+broth
+brothel
+brother
+brotherhood
+brotherhoods
+brotherly
+brothers
+broths
+brought
+brow
+brown
+browner
+brownist
+browny
+brows
+browse
+browsing
+bruis
+bruise
+bruised
+bruises
+bruising
+bruit
+bruited
+brundusium
+brunt
+brush
+brushes
+brute
+brutish
+brutus
+bubble
+bubbles
+bubbling
+bubukles
+buck
+bucket
+buckets
+bucking
+buckingham
+buckle
+buckled
+buckler
+bucklers
+bucklersbury
+buckles
+buckram
+bucks
+bud
+budded
+budding
+budge
+budger
+budget
+buds
+buff
+buffet
+buffeting
+buffets
+bug
+bugbear
+bugle
+bugs
+build
+builded
+buildeth
+building
+buildings
+builds
+built
+bulk
+bulks
+bull
+bullcalf
+bullen
+bullens
+bullet
+bullets
+bullocks
+bulls
+bully
+bulmer
+bulwark
+bulwarks
+bum
+bumbast
+bump
+bumper
+bums
+bunch
+bunches
+bundle
+bung
+bunghole
+bungle
+bunting
+buoy
+bur
+burbolt
+burd
+burden
+burdened
+burdening
+burdenous
+burdens
+burgh
+burgher
+burghers
+burglary
+burgomasters
+burgonet
+burgundy
+burial
+buried
+burier
+buriest
+burly
+burn
+burned
+burnet
+burneth
+burning
+burnish
+burns
+burnt
+burr
+burrows
+burs
+burst
+bursting
+bursts
+burthen
+burthens
+burton
+bury
+burying
+bush
+bushels
+bushes
+bushy
+busied
+busily
+busines
+business
+businesses
+buskin
+busky
+buss
+busses
+bussing
+bustle
+bustling
+busy
+but
+butcheed
+butcher
+butchered
+butcheries
+butcherly
+butchers
+butchery
+butler
+butt
+butter
+buttered
+butterflies
+butterfly
+butterwoman
+buttery
+buttock
+buttocks
+button
+buttonhole
+buttons
+buttress
+buttry
+butts
+buxom
+buy
+buyer
+buying
+buys
+buzz
+buzzard
+buzzards
+buzzers
+buzzing
+by
+bye
+byzantium
+c
+ca
+cabbage
+cabileros
+cabin
+cabins
+cable
+cables
+cackling
+cacodemon
+caddis
+caddisses
+cade
+cadence
+cadent
+cades
+cadmus
+caduceus
+cadwal
+cadwallader
+caelius
+caelo
+caesar
+caesarion
+caesars
+cage
+caged
+cagion
+cain
+caithness
+caitiff
+caitiffs
+caius
+cak
+cake
+cakes
+calaber
+calais
+calamities
+calamity
+calchas
+calculate
+calen
+calendar
+calendars
+calf
+caliban
+calibans
+calipolis
+cality
+caliver
+call
+callat
+called
+callet
+calling
+calls
+calm
+calmest
+calmly
+calmness
+calms
+calpurnia
+calumniate
+calumniating
+calumnious
+calumny
+calve
+calved
+calves
+calveskins
+calydon
+cam
+cambio
+cambria
+cambric
+cambrics
+cambridge
+cambyses
+came
+camel
+camelot
+camels
+camest
+camillo
+camlet
+camomile
+camp
+campeius
+camping
+camps
+can
+canakin
+canaries
+canary
+cancel
+cancell
+cancelled
+cancelling
+cancels
+cancer
+candidatus
+candied
+candle
+candles
+candlesticks
+candy
+canidius
+cank
+canker
+cankerblossom
+cankers
+cannibally
+cannibals
+cannon
+cannoneer
+cannons
+cannot
+canon
+canoniz
+canonize
+canonized
+canons
+canopied
+canopies
+canopy
+canst
+canstick
+canterbury
+cantle
+cantons
+canus
+canvas
+canvass
+canzonet
+cap
+capability
+capable
+capacities
+capacity
+caparison
+capdv
+cape
+capel
+capels
+caper
+capers
+capet
+caphis
+capilet
+capitaine
+capital
+capite
+capitol
+capitulate
+capocchia
+capon
+capons
+capp
+cappadocia
+capriccio
+capricious
+caps
+capt
+captain
+captains
+captainship
+captious
+captivate
+captivated
+captivates
+captive
+captives
+captivity
+captum
+capucius
+capulet
+capulets
+car
+carack
+caracks
+carat
+caraways
+carbonado
+carbuncle
+carbuncled
+carbuncles
+carcanet
+carcase
+carcases
+carcass
+carcasses
+card
+cardecue
+carded
+carders
+cardinal
+cardinally
+cardinals
+cardmaker
+cards
+carduus
+care
+cared
+career
+careers
+careful
+carefully
+careless
+carelessly
+carelessness
+cares
+caret
+cargo
+carl
+carlisle
+carlot
+carman
+carmen
+carnal
+carnally
+carnarvonshire
+carnation
+carnations
+carol
+carous
+carouse
+caroused
+carouses
+carousing
+carp
+carpenter
+carper
+carpet
+carpets
+carping
+carriage
+carriages
+carried
+carrier
+carriers
+carries
+carrion
+carrions
+carry
+carrying
+cars
+cart
+carters
+carthage
+carts
+carv
+carve
+carved
+carver
+carves
+carving
+cas
+casa
+casaer
+casca
+case
+casement
+casements
+cases
+cash
+cashier
+casing
+cask
+casket
+casketed
+caskets
+casque
+casques
+cassado
+cassandra
+cassibelan
+cassio
+cassius
+cassocks
+cast
+castalion
+castaway
+castaways
+casted
+caster
+castigate
+castigation
+castile
+castiliano
+casting
+castle
+castles
+casts
+casual
+casually
+casualties
+casualty
+cat
+cataian
+catalogue
+cataplasm
+cataracts
+catarrhs
+catastrophe
+catch
+catcher
+catches
+catching
+cate
+catechising
+catechism
+catechize
+cater
+caterpillars
+caters
+caterwauling
+cates
+catesby
+cathedral
+catlike
+catling
+catlings
+cato
+cats
+cattle
+caucasus
+caudle
+cauf
+caught
+cauldron
+caus
+cause
+caused
+causeless
+causer
+causes
+causest
+causeth
+cautel
+cautelous
+cautels
+cauterizing
+caution
+cautions
+cavaleiro
+cavalery
+cavaliers
+cave
+cavern
+caverns
+caves
+caveto
+caviary
+cavil
+cavilling
+cawdor
+cawdron
+cawing
+ce
+ceas
+cease
+ceases
+ceaseth
+cedar
+cedars
+cedius
+celebrate
+celebrated
+celebrates
+celebration
+celerity
+celestial
+celia
+cell
+cellar
+cellarage
+celsa
+cement
+censer
+censor
+censorinus
+censur
+censure
+censured
+censurers
+censures
+censuring
+centaur
+centaurs
+centre
+cents
+centuries
+centurion
+centurions
+century
+cerberus
+cerecloth
+cerements
+ceremonial
+ceremonies
+ceremonious
+ceremoniously
+ceremony
+ceres
+cerns
+certain
+certainer
+certainly
+certainties
+certainty
+certes
+certificate
+certified
+certifies
+certify
+ces
+cesario
+cess
+cesse
+cestern
+cetera
+cette
+chaces
+chaf
+chafe
+chafed
+chafes
+chaff
+chaffless
+chafing
+chain
+chains
+chair
+chairs
+chalic
+chalice
+chalices
+chalk
+chalks
+chalky
+challeng
+challenge
+challenged
+challenger
+challengers
+challenges
+cham
+chamber
+chamberers
+chamberlain
+chamberlains
+chambermaid
+chambermaids
+chambers
+chameleon
+champ
+champagne
+champain
+champains
+champion
+champions
+chanc
+chance
+chanced
+chancellor
+chances
+chandler
+chang
+change
+changeable
+changed
+changeful
+changeling
+changelings
+changer
+changes
+changest
+changing
+channel
+channels
+chanson
+chant
+chanticleer
+chanting
+chantries
+chantry
+chants
+chaos
+chap
+chape
+chapel
+chapeless
+chapels
+chaplain
+chaplains
+chapless
+chaplet
+chapmen
+chaps
+chapter
+character
+charactered
+characterless
+characters
+charactery
+characts
+charbon
+chare
+chares
+charg
+charge
+charged
+chargeful
+charges
+chargeth
+charging
+chariest
+chariness
+charing
+chariot
+chariots
+charitable
+charitably
+charities
+charity
+charlemain
+charles
+charm
+charmed
+charmer
+charmeth
+charmian
+charming
+charmingly
+charms
+charneco
+charnel
+charolois
+charon
+charter
+charters
+chartreux
+chary
+charybdis
+chas
+chase
+chased
+chaser
+chaseth
+chasing
+chaste
+chastely
+chastis
+chastise
+chastised
+chastisement
+chastity
+chat
+chatham
+chatillon
+chats
+chatt
+chattels
+chatter
+chattering
+chattles
+chaud
+chaunted
+chaw
+chawdron
+che
+cheap
+cheapen
+cheaper
+cheapest
+cheaply
+cheapside
+cheat
+cheated
+cheater
+cheaters
+cheating
+cheats
+check
+checked
+checker
+checking
+checks
+cheek
+cheeks
+cheer
+cheered
+cheerer
+cheerful
+cheerfully
+cheering
+cheerless
+cheerly
+cheers
+cheese
+chequer
+cher
+cherish
+cherished
+cherisher
+cherishes
+cherishing
+cherries
+cherry
+cherrypit
+chertsey
+cherub
+cherubims
+cherubin
+cherubins
+cheshu
+chess
+chest
+chester
+chestnut
+chestnuts
+chests
+chetas
+chev
+cheval
+chevalier
+chevaliers
+cheveril
+chew
+chewed
+chewet
+chewing
+chez
+chi
+chick
+chicken
+chickens
+chicurmurco
+chid
+chidden
+chide
+chiders
+chides
+chiding
+chief
+chiefest
+chiefly
+chien
+child
+childed
+childeric
+childhood
+childhoods
+childing
+childish
+childishness
+childlike
+childness
+children
+chill
+chilling
+chime
+chimes
+chimney
+chimneypiece
+chimneys
+chimurcho
+chin
+china
+chine
+chines
+chink
+chinks
+chins
+chipp
+chipper
+chips
+chiron
+chirping
+chirrah
+chirurgeonly
+chisel
+chitopher
+chivalrous
+chivalry
+choice
+choicely
+choicest
+choir
+choirs
+chok
+choke
+choked
+chokes
+choking
+choler
+choleric
+cholers
+chollors
+choose
+chooser
+chooses
+chooseth
+choosing
+chop
+chopine
+choplogic
+chopp
+chopped
+chopping
+choppy
+chops
+chopt
+chor
+choristers
+chorus
+chose
+chosen
+chough
+choughs
+chrish
+christ
+christen
+christendom
+christendoms
+christening
+christenings
+christian
+christianlike
+christians
+christmas
+christom
+christopher
+christophero
+chronicle
+chronicled
+chronicler
+chroniclers
+chronicles
+chrysolite
+chuck
+chucks
+chud
+chuffs
+church
+churches
+churchman
+churchmen
+churchyard
+churchyards
+churl
+churlish
+churlishly
+churls
+churn
+chus
+cicatrice
+cicatrices
+cicely
+cicero
+ciceter
+ciel
+ciitzens
+cilicia
+cimber
+cimmerian
+cinable
+cincture
+cinders
+cine
+cinna
+cinque
+cipher
+ciphers
+circa
+circe
+circle
+circled
+circlets
+circling
+circuit
+circum
+circumcised
+circumference
+circummur
+circumscrib
+circumscribed
+circumscription
+circumspect
+circumstance
+circumstanced
+circumstances
+circumstantial
+circumvent
+circumvention
+cistern
+citadel
+cital
+cite
+cited
+cites
+cities
+citing
+citizen
+citizens
+cittern
+city
+civet
+civil
+civility
+civilly
+clack
+clad
+claim
+claiming
+claims
+clamb
+clamber
+clammer
+clamor
+clamorous
+clamors
+clamour
+clamours
+clang
+clangor
+clap
+clapp
+clapped
+clapper
+clapping
+claps
+clare
+clarence
+claret
+claribel
+clasp
+clasps
+clatter
+claud
+claudio
+claudius
+clause
+claw
+clawed
+clawing
+claws
+clay
+clays
+clean
+cleanliest
+cleanly
+cleans
+cleanse
+cleansing
+clear
+clearer
+clearest
+clearly
+clearness
+clears
+cleave
+cleaving
+clef
+cleft
+cleitus
+clemency
+clement
+cleomenes
+cleopatpa
+cleopatra
+clepeth
+clept
+clerestories
+clergy
+clergyman
+clergymen
+clerk
+clerkly
+clerks
+clew
+client
+clients
+cliff
+clifford
+cliffords
+cliffs
+clifton
+climate
+climature
+climb
+climbed
+climber
+climbeth
+climbing
+climbs
+clime
+cling
+clink
+clinking
+clinquant
+clip
+clipp
+clipper
+clippeth
+clipping
+clipt
+clitus
+clo
+cloak
+cloakbag
+cloaks
+clock
+clocks
+clod
+cloddy
+clodpole
+clog
+clogging
+clogs
+cloister
+cloistress
+cloquence
+clos
+close
+closed
+closely
+closeness
+closer
+closes
+closest
+closet
+closing
+closure
+cloten
+clotens
+cloth
+clothair
+clotharius
+clothe
+clothes
+clothier
+clothiers
+clothing
+cloths
+clotpoles
+clotpoll
+cloud
+clouded
+cloudiness
+clouds
+cloudy
+clout
+clouted
+clouts
+cloven
+clover
+cloves
+clovest
+clowder
+clown
+clownish
+clowns
+cloy
+cloyed
+cloying
+cloyless
+cloyment
+cloys
+club
+clubs
+cluck
+clung
+clust
+clusters
+clutch
+clyster
+cneius
+cnemies
+co
+coach
+coaches
+coachmakers
+coact
+coactive
+coagulate
+coal
+coals
+coarse
+coarsely
+coast
+coasting
+coasts
+coat
+coated
+coats
+cobble
+cobbled
+cobbler
+cobham
+cobloaf
+cobweb
+cobwebs
+cock
+cockatrice
+cockatrices
+cockle
+cockled
+cockney
+cockpit
+cocks
+cocksure
+coctus
+cocytus
+cod
+codding
+codling
+codpiece
+codpieces
+cods
+coelestibus
+coesar
+coeur
+coffer
+coffers
+coffin
+coffins
+cog
+cogging
+cogitation
+cogitations
+cognition
+cognizance
+cogscomb
+cohabitants
+coher
+cohere
+coherence
+coherent
+cohorts
+coif
+coign
+coil
+coin
+coinage
+coiner
+coining
+coins
+col
+colbrand
+colchos
+cold
+colder
+coldest
+coldly
+coldness
+coldspur
+colebrook
+colic
+collar
+collars
+collateral
+colleagued
+collect
+collected
+collection
+college
+colleges
+collied
+collier
+colliers
+collop
+collusion
+colme
+colmekill
+coloquintida
+color
+colors
+colossus
+colour
+colourable
+coloured
+colouring
+colours
+colt
+colted
+colts
+columbine
+columbines
+colville
+com
+comagene
+comart
+comb
+combat
+combatant
+combatants
+combated
+combating
+combin
+combinate
+combination
+combine
+combined
+combless
+combustion
+come
+comedian
+comedians
+comedy
+comeliness
+comely
+comer
+comers
+comes
+comest
+comet
+cometh
+comets
+comfect
+comfit
+comfits
+comfort
+comfortable
+comforted
+comforter
+comforting
+comfortless
+comforts
+comic
+comical
+coming
+comings
+cominius
+comma
+command
+commande
+commanded
+commander
+commanders
+commanding
+commandment
+commandments
+commands
+comme
+commenc
+commence
+commenced
+commencement
+commences
+commencing
+commend
+commendable
+commendation
+commendations
+commended
+commending
+commends
+comment
+commentaries
+commenting
+comments
+commerce
+commingled
+commiseration
+commission
+commissioners
+commissions
+commit
+commits
+committ
+committed
+committing
+commix
+commixed
+commixtion
+commixture
+commodious
+commodities
+commodity
+common
+commonalty
+commoner
+commoners
+commonly
+commons
+commonweal
+commonwealth
+commotion
+commotions
+commune
+communicat
+communicate
+communication
+communities
+community
+comonty
+compact
+companies
+companion
+companions
+companionship
+company
+compar
+comparative
+compare
+compared
+comparing
+comparison
+comparisons
+compartner
+compass
+compasses
+compassing
+compassion
+compassionate
+compeers
+compel
+compell
+compelled
+compelling
+compels
+compensation
+competence
+competency
+competent
+competitor
+competitors
+compil
+compile
+compiled
+complain
+complainer
+complainest
+complaining
+complainings
+complains
+complaint
+complaints
+complement
+complements
+complete
+complexion
+complexioned
+complexions
+complices
+complies
+compliment
+complimental
+compliments
+complot
+complots
+complotted
+comply
+compos
+compose
+composed
+composition
+compost
+composture
+composure
+compound
+compounded
+compounds
+comprehend
+comprehended
+comprehends
+compremises
+compris
+comprising
+compromis
+compromise
+compt
+comptible
+comptrollers
+compulsatory
+compulsion
+compulsive
+compunctious
+computation
+comrade
+comrades
+comutual
+con
+concave
+concavities
+conceal
+concealed
+concealing
+concealment
+concealments
+conceals
+conceit
+conceited
+conceitless
+conceits
+conceiv
+conceive
+conceived
+conceives
+conceiving
+conception
+conceptions
+conceptious
+concern
+concernancy
+concerneth
+concerning
+concernings
+concerns
+conclave
+conclud
+conclude
+concluded
+concludes
+concluding
+conclusion
+conclusions
+concolinel
+concord
+concubine
+concupiscible
+concupy
+concur
+concurring
+concurs
+condemn
+condemnation
+condemned
+condemning
+condemns
+condescend
+condign
+condition
+conditionally
+conditions
+condole
+condolement
+condoling
+conduce
+conduct
+conducted
+conducting
+conductor
+conduit
+conduits
+conected
+coney
+confection
+confectionary
+confections
+confederacy
+confederate
+confederates
+confer
+conference
+conferr
+conferring
+confess
+confessed
+confesses
+confesseth
+confessing
+confession
+confessions
+confessor
+confidence
+confident
+confidently
+confin
+confine
+confined
+confineless
+confiners
+confines
+confining
+confirm
+confirmation
+confirmations
+confirmed
+confirmer
+confirmers
+confirming
+confirmities
+confirms
+confiscate
+confiscated
+confiscation
+confixed
+conflict
+conflicting
+conflicts
+confluence
+conflux
+conform
+conformable
+confound
+confounded
+confounding
+confounds
+confront
+confronted
+confus
+confused
+confusedly
+confusion
+confusions
+confutation
+confutes
+congeal
+congealed
+congealment
+congee
+conger
+congest
+congied
+congratulate
+congreeing
+congreeted
+congregate
+congregated
+congregation
+congregations
+congruent
+congruing
+conies
+conjectural
+conjecture
+conjectures
+conjoin
+conjoined
+conjoins
+conjointly
+conjunct
+conjunction
+conjunctive
+conjur
+conjuration
+conjurations
+conjure
+conjured
+conjurer
+conjurers
+conjures
+conjuring
+conjuro
+conn
+connected
+connive
+conqu
+conquer
+conquered
+conquering
+conqueror
+conquerors
+conquers
+conquest
+conquests
+conquring
+conrade
+cons
+consanguineous
+consanguinity
+conscienc
+conscience
+consciences
+conscionable
+consecrate
+consecrated
+consecrations
+consent
+consented
+consenting
+consents
+consequence
+consequences
+consequently
+conserve
+conserved
+conserves
+consider
+considerance
+considerate
+consideration
+considerations
+considered
+considering
+considerings
+considers
+consign
+consigning
+consist
+consisteth
+consisting
+consistory
+consists
+consolate
+consolation
+consonancy
+consonant
+consort
+consorted
+consortest
+conspectuities
+conspir
+conspiracy
+conspirant
+conspirator
+conspirators
+conspire
+conspired
+conspirers
+conspires
+conspiring
+constable
+constables
+constance
+constancies
+constancy
+constant
+constantine
+constantinople
+constantly
+constellation
+constitution
+constrain
+constrained
+constraineth
+constrains
+constraint
+constring
+construction
+construe
+consul
+consuls
+consulship
+consulships
+consult
+consulting
+consults
+consum
+consume
+consumed
+consumes
+consuming
+consummate
+consummation
+consumption
+consumptions
+contagion
+contagious
+contain
+containing
+contains
+contaminate
+contaminated
+contemn
+contemned
+contemning
+contemns
+contemplate
+contemplation
+contemplative
+contempt
+contemptible
+contempts
+contemptuous
+contemptuously
+contend
+contended
+contending
+contendon
+content
+contenta
+contented
+contenteth
+contention
+contentious
+contentless
+contento
+contents
+contest
+contestation
+continence
+continency
+continent
+continents
+continu
+continual
+continually
+continuance
+continuantly
+continuate
+continue
+continued
+continuer
+continues
+continuing
+contract
+contracted
+contracting
+contraction
+contradict
+contradicted
+contradiction
+contradicts
+contraries
+contrarieties
+contrariety
+contrarious
+contrariously
+contrary
+contre
+contribution
+contributors
+contrite
+contriv
+contrive
+contrived
+contriver
+contrives
+contriving
+control
+controll
+controller
+controlling
+controlment
+controls
+controversy
+contumelious
+contumeliously
+contumely
+contusions
+convenience
+conveniences
+conveniency
+convenient
+conveniently
+convented
+conventicles
+convents
+convers
+conversant
+conversation
+conversations
+converse
+conversed
+converses
+conversing
+conversion
+convert
+converted
+convertest
+converting
+convertite
+convertites
+converts
+convey
+conveyance
+conveyances
+conveyers
+conveying
+convict
+convicted
+convince
+convinced
+convinces
+convive
+convocation
+convoy
+convulsions
+cony
+cook
+cookery
+cooks
+cool
+cooled
+cooling
+cools
+coop
+coops
+cop
+copatain
+cope
+cophetua
+copied
+copies
+copious
+copper
+copperspur
+coppice
+copulation
+copulatives
+copy
+cor
+coragio
+coral
+coram
+corambus
+coranto
+corantos
+corbo
+cord
+corded
+cordelia
+cordial
+cordis
+cords
+core
+corin
+corinth
+corinthian
+coriolanus
+corioli
+cork
+corky
+cormorant
+corn
+cornelia
+cornelius
+corner
+corners
+cornerstone
+cornets
+cornish
+corns
+cornuto
+cornwall
+corollary
+coronal
+coronation
+coronet
+coronets
+corporal
+corporals
+corporate
+corpse
+corpulent
+correct
+corrected
+correcting
+correction
+correctioner
+corrects
+correspondence
+correspondent
+corresponding
+corresponsive
+corrigible
+corrival
+corrivals
+corroborate
+corrosive
+corrupt
+corrupted
+corrupter
+corrupters
+corruptible
+corruptibly
+corrupting
+corruption
+corruptly
+corrupts
+corse
+corses
+corslet
+cosmo
+cost
+costard
+costermongers
+costlier
+costly
+costs
+cot
+cote
+coted
+cotsall
+cotsole
+cotswold
+cottage
+cottages
+cotus
+couch
+couched
+couching
+couchings
+coude
+cough
+coughing
+could
+couldst
+coulter
+council
+councillor
+councils
+counsel
+counsell
+counsellor
+counsellors
+counselor
+counselors
+counsels
+count
+counted
+countenanc
+countenance
+countenances
+counter
+counterchange
+countercheck
+counterfeit
+counterfeited
+counterfeiting
+counterfeitly
+counterfeits
+countermand
+countermands
+countermines
+counterpart
+counterpoints
+counterpois
+counterpoise
+counters
+countervail
+countess
+countesses
+counties
+counting
+countless
+countries
+countrv
+country
+countryman
+countrymen
+counts
+county
+couper
+couple
+coupled
+couplement
+couples
+couplet
+couplets
+cour
+courage
+courageous
+courageously
+courages
+courier
+couriers
+couronne
+cours
+course
+coursed
+courser
+coursers
+courses
+coursing
+court
+courted
+courteous
+courteously
+courtesan
+courtesies
+courtesy
+courtezan
+courtezans
+courtier
+courtiers
+courtlike
+courtly
+courtney
+courts
+courtship
+cousin
+cousins
+couterfeit
+coutume
+covenant
+covenants
+covent
+coventry
+cover
+covered
+covering
+coverlet
+covers
+covert
+covertly
+coverture
+covet
+coveted
+coveting
+covetings
+covetous
+covetously
+covetousness
+covets
+cow
+coward
+cowarded
+cowardice
+cowardly
+cowards
+cowardship
+cowish
+cowl
+cowslip
+cowslips
+cox
+coxcomb
+coxcombs
+coy
+coystrill
+coz
+cozen
+cozenage
+cozened
+cozener
+cozeners
+cozening
+coziers
+crab
+crabbed
+crabs
+crack
+cracked
+cracker
+crackers
+cracking
+cracks
+cradle
+cradled
+cradles
+craft
+crafted
+craftied
+craftier
+craftily
+crafts
+craftsmen
+crafty
+cram
+cramm
+cramp
+cramps
+crams
+cranking
+cranks
+cranmer
+crannied
+crannies
+cranny
+crants
+crare
+crash
+crassus
+crav
+crave
+craved
+craven
+cravens
+craves
+craveth
+craving
+crawl
+crawling
+crawls
+craz
+crazed
+crazy
+creaking
+cream
+create
+created
+creates
+creating
+creation
+creator
+creature
+creatures
+credence
+credent
+credible
+credit
+creditor
+creditors
+credo
+credulity
+credulous
+creed
+creek
+creeks
+creep
+creeping
+creeps
+crept
+crescent
+crescive
+cressets
+cressid
+cressida
+cressids
+cressy
+crest
+crested
+crestfall
+crestless
+crests
+cretan
+crete
+crevice
+crew
+crews
+crib
+cribb
+cribs
+cricket
+crickets
+cried
+criedst
+crier
+cries
+criest
+crieth
+crime
+crimeful
+crimeless
+crimes
+criminal
+crimson
+cringe
+cripple
+crisp
+crisped
+crispian
+crispianus
+crispin
+critic
+critical
+critics
+croak
+croaking
+croaks
+crocodile
+cromer
+cromwell
+crone
+crook
+crookback
+crooked
+crooking
+crop
+cropp
+crosby
+cross
+crossed
+crosses
+crossest
+crossing
+crossings
+crossly
+crossness
+crost
+crotchets
+crouch
+crouching
+crow
+crowd
+crowded
+crowding
+crowds
+crowflowers
+crowing
+crowkeeper
+crown
+crowned
+crowner
+crownet
+crownets
+crowning
+crowns
+crows
+crudy
+cruel
+cruell
+crueller
+cruelly
+cruels
+cruelty
+crum
+crumble
+crumbs
+crupper
+crusadoes
+crush
+crushed
+crushest
+crushing
+crust
+crusts
+crusty
+crutch
+crutches
+cry
+crying
+crystal
+crystalline
+crystals
+cub
+cubbert
+cubiculo
+cubit
+cubs
+cuckold
+cuckoldly
+cuckolds
+cuckoo
+cucullus
+cudgel
+cudgeled
+cudgell
+cudgelling
+cudgels
+cue
+cues
+cuff
+cuffs
+cuique
+cull
+culling
+cullion
+cullionly
+cullions
+culpable
+culverin
+cum
+cumber
+cumberland
+cunning
+cunningly
+cunnings
+cuore
+cup
+cupbearer
+cupboarding
+cupid
+cupids
+cuppele
+cups
+cur
+curan
+curate
+curb
+curbed
+curbing
+curbs
+curd
+curdied
+curds
+cure
+cured
+cureless
+curer
+cures
+curfew
+curing
+curio
+curiosity
+curious
+curiously
+curl
+curled
+curling
+curls
+currance
+currants
+current
+currents
+currish
+curry
+curs
+curse
+cursed
+curses
+cursies
+cursing
+cursorary
+curst
+curster
+curstest
+curstness
+cursy
+curtail
+curtain
+curtains
+curtal
+curtis
+curtle
+curtsied
+curtsies
+curtsy
+curvet
+curvets
+cushes
+cushion
+cushions
+custalorum
+custard
+custody
+custom
+customary
+customed
+customer
+customers
+customs
+custure
+cut
+cutler
+cutpurse
+cutpurses
+cuts
+cutter
+cutting
+cuttle
+cxsar
+cyclops
+cydnus
+cygnet
+cygnets
+cym
+cymbals
+cymbeline
+cyme
+cynic
+cynthia
+cypress
+cypriot
+cyprus
+cyrus
+cytherea
+d
+dabbled
+dace
+dad
+daedalus
+daemon
+daff
+daffed
+daffest
+daffodils
+dagger
+daggers
+dagonet
+daily
+daintier
+dainties
+daintiest
+daintily
+daintiness
+daintry
+dainty
+daisied
+daisies
+daisy
+dale
+dalliance
+dallied
+dallies
+dally
+dallying
+dalmatians
+dam
+damage
+damascus
+damask
+damasked
+dame
+dames
+damm
+damn
+damnable
+damnably
+damnation
+damned
+damns
+damoiselle
+damon
+damosella
+damp
+dams
+damsel
+damsons
+dan
+danc
+dance
+dancer
+dances
+dancing
+dandle
+dandy
+dane
+dang
+danger
+dangerous
+dangerously
+dangers
+dangling
+daniel
+danish
+dank
+dankish
+danskers
+daphne
+dappled
+dapples
+dar
+dardan
+dardanian
+dardanius
+dare
+dared
+dareful
+dares
+darest
+daring
+darius
+dark
+darken
+darkening
+darkens
+darker
+darkest
+darkling
+darkly
+darkness
+darling
+darlings
+darnel
+darraign
+dart
+darted
+darter
+dartford
+darting
+darts
+dash
+dashes
+dashing
+dastard
+dastards
+dat
+datchet
+date
+dated
+dateless
+dates
+daub
+daughter
+daughters
+daunt
+daunted
+dauntless
+dauphin
+daventry
+davy
+daw
+dawn
+dawning
+daws
+day
+daylight
+days
+dazzle
+dazzled
+dazzling
+de
+dead
+deadly
+deaf
+deafing
+deafness
+deafs
+deal
+dealer
+dealers
+dealest
+dealing
+dealings
+deals
+dealt
+dean
+deanery
+dear
+dearer
+dearest
+dearly
+dearness
+dears
+dearth
+dearths
+death
+deathbed
+deathful
+deaths
+deathsman
+deathsmen
+debarred
+debase
+debate
+debated
+debatement
+debateth
+debating
+debauch
+debile
+debility
+debitor
+debonair
+deborah
+debosh
+debt
+debted
+debtor
+debtors
+debts
+debuty
+decay
+decayed
+decayer
+decaying
+decays
+deceas
+decease
+deceased
+deceit
+deceitful
+deceits
+deceiv
+deceivable
+deceive
+deceived
+deceiver
+deceivers
+deceives
+deceivest
+deceiveth
+deceiving
+december
+decent
+deceptious
+decerns
+decide
+decides
+decimation
+decipher
+deciphers
+decision
+decius
+deck
+decking
+decks
+deckt
+declare
+declares
+declension
+declensions
+declin
+decline
+declined
+declines
+declining
+decoct
+decorum
+decreas
+decrease
+decreasing
+decree
+decreed
+decrees
+decrepit
+dedicate
+dedicated
+dedicates
+dedication
+deed
+deedless
+deeds
+deem
+deemed
+deep
+deeper
+deepest
+deeply
+deeps
+deepvow
+deer
+deesse
+defac
+deface
+defaced
+defacer
+defacers
+defacing
+defam
+default
+defeat
+defeated
+defeats
+defeatures
+defect
+defective
+defects
+defence
+defences
+defend
+defendant
+defended
+defender
+defenders
+defending
+defends
+defense
+defensible
+defensive
+defer
+deferr
+defiance
+deficient
+defied
+defies
+defil
+defile
+defiler
+defiles
+defiling
+define
+definement
+definite
+definitive
+definitively
+deflow
+deflower
+deflowered
+deform
+deformed
+deformities
+deformity
+deftly
+defunct
+defunction
+defuse
+defy
+defying
+degenerate
+degraded
+degree
+degrees
+deified
+deifying
+deign
+deigned
+deiphobus
+deities
+deity
+deja
+deject
+dejected
+delabreth
+delay
+delayed
+delaying
+delays
+delectable
+deliberate
+delicate
+delicates
+delicious
+deliciousness
+delight
+delighted
+delightful
+delights
+delinquents
+deliv
+deliver
+deliverance
+delivered
+delivering
+delivers
+delivery
+delphos
+deluded
+deluding
+deluge
+delve
+delver
+delves
+demand
+demanded
+demanding
+demands
+demean
+demeanor
+demeanour
+demerits
+demesnes
+demetrius
+demi
+demigod
+demise
+demoiselles
+demon
+demonstrable
+demonstrate
+demonstrated
+demonstrating
+demonstration
+demonstrative
+demure
+demurely
+demuring
+den
+denay
+deni
+denial
+denials
+denied
+denier
+denies
+deniest
+denis
+denmark
+dennis
+denny
+denote
+denoted
+denotement
+denounc
+denounce
+denouncing
+dens
+denunciation
+deny
+denying
+deo
+depart
+departed
+departest
+departing
+departure
+depeche
+depend
+dependant
+dependants
+depended
+dependence
+dependences
+dependency
+dependent
+dependents
+depender
+depending
+depends
+deplore
+deploring
+depopulate
+depos
+depose
+deposed
+deposing
+depositaries
+deprav
+depravation
+deprave
+depraved
+depraves
+depress
+depriv
+deprive
+depth
+depths
+deputation
+depute
+deputed
+deputies
+deputing
+deputy
+deracinate
+derby
+dercetas
+dere
+derides
+derision
+deriv
+derivation
+derivative
+derive
+derived
+derives
+derogate
+derogately
+derogation
+des
+desartless
+descant
+descend
+descended
+descending
+descends
+descension
+descent
+descents
+describe
+described
+describes
+descried
+description
+descriptions
+descry
+desdemon
+desdemona
+desert
+deserts
+deserv
+deserve
+deserved
+deservedly
+deserver
+deservers
+deserves
+deservest
+deserving
+deservings
+design
+designment
+designments
+designs
+desir
+desire
+desired
+desirers
+desires
+desirest
+desiring
+desirous
+desist
+desk
+desolate
+desolation
+desp
+despair
+despairing
+despairs
+despatch
+desperate
+desperately
+desperation
+despis
+despise
+despised
+despiser
+despiseth
+despising
+despite
+despiteful
+despoiled
+dest
+destin
+destined
+destinies
+destiny
+destitute
+destroy
+destroyed
+destroyer
+destroyers
+destroying
+destroys
+destruction
+destructions
+det
+detain
+detains
+detect
+detected
+detecting
+detection
+detector
+detects
+detention
+determin
+determinate
+determination
+determinations
+determine
+determined
+determines
+detest
+detestable
+detested
+detesting
+detests
+detract
+detraction
+detractions
+deucalion
+deuce
+deum
+deux
+devant
+devesting
+device
+devices
+devil
+devilish
+devils
+devis
+devise
+devised
+devises
+devising
+devoid
+devonshire
+devote
+devoted
+devotion
+devour
+devoured
+devourers
+devouring
+devours
+devout
+devoutly
+dew
+dewberries
+dewdrops
+dewlap
+dewlapp
+dews
+dewy
+dexter
+dexteriously
+dexterity
+di
+diable
+diablo
+diadem
+dial
+dialect
+dialogue
+dialogued
+dials
+diameter
+diamond
+diamonds
+dian
+diana
+diaper
+dibble
+dic
+dice
+dicers
+dich
+dick
+dickens
+dickon
+dicky
+dictator
+diction
+dictynna
+did
+diddle
+didest
+dido
+didst
+die
+died
+diedst
+dies
+diest
+diet
+dieted
+dieter
+dieu
+diff
+differ
+difference
+differences
+differency
+different
+differing
+differs
+difficile
+difficult
+difficulties
+difficulty
+diffidence
+diffidences
+diffus
+diffused
+diffusest
+dig
+digest
+digested
+digestion
+digestions
+digg
+digging
+dighton
+dignified
+dignifies
+dignify
+dignities
+dignity
+digress
+digressing
+digression
+digs
+digt
+dilate
+dilated
+dilations
+dilatory
+dild
+dildos
+dilemma
+dilemmas
+diligence
+diligent
+diluculo
+dim
+dimension
+dimensions
+diminish
+diminishing
+diminution
+diminutive
+diminutives
+dimm
+dimmed
+dimming
+dimpled
+dimples
+dims
+din
+dine
+dined
+diner
+dines
+ding
+dining
+dinner
+dinners
+dinnertime
+dint
+diomed
+diomede
+diomedes
+dion
+dip
+dipp
+dipping
+dips
+dir
+dire
+direct
+directed
+directing
+direction
+directions
+directitude
+directive
+directly
+directs
+direful
+direness
+direst
+dirge
+dirges
+dirt
+dirty
+dis
+disability
+disable
+disabled
+disabling
+disadvantage
+disagree
+disallow
+disanimates
+disannul
+disannuls
+disappointed
+disarm
+disarmed
+disarmeth
+disarms
+disaster
+disasters
+disastrous
+disbench
+disbranch
+disburdened
+disburs
+disburse
+disbursed
+discandy
+discandying
+discard
+discarded
+discase
+discased
+discern
+discerner
+discerning
+discernings
+discerns
+discharg
+discharge
+discharged
+discharging
+discipled
+disciples
+disciplin
+discipline
+disciplined
+disciplines
+disclaim
+disclaiming
+disclaims
+disclos
+disclose
+disclosed
+discloses
+discolour
+discoloured
+discolours
+discomfit
+discomfited
+discomfiture
+discomfort
+discomfortable
+discommend
+disconsolate
+discontent
+discontented
+discontentedly
+discontenting
+discontents
+discontinue
+discontinued
+discord
+discordant
+discords
+discourse
+discoursed
+discourser
+discourses
+discoursive
+discourtesy
+discov
+discover
+discovered
+discoverers
+discoveries
+discovering
+discovers
+discovery
+discredit
+discredited
+discredits
+discreet
+discreetly
+discretion
+discretions
+discuss
+disdain
+disdained
+disdaineth
+disdainful
+disdainfully
+disdaining
+disdains
+disdnguish
+diseas
+disease
+diseased
+diseases
+disedg
+disembark
+disfigure
+disfigured
+disfurnish
+disgorge
+disgrac
+disgrace
+disgraced
+disgraceful
+disgraces
+disgracing
+disgracious
+disguis
+disguise
+disguised
+disguiser
+disguises
+disguising
+dish
+dishabited
+dishclout
+dishearten
+disheartens
+dishes
+dishonest
+dishonestly
+dishonesty
+dishonor
+dishonorable
+dishonors
+dishonour
+dishonourable
+dishonoured
+dishonours
+disinherit
+disinherited
+disjoin
+disjoining
+disjoins
+disjoint
+disjunction
+dislik
+dislike
+disliken
+dislikes
+dislimns
+dislocate
+dislodg
+disloyal
+disloyalty
+dismal
+dismantle
+dismantled
+dismask
+dismay
+dismayed
+dismemb
+dismember
+dismes
+dismiss
+dismissed
+dismissing
+dismission
+dismount
+dismounted
+disnatur
+disobedience
+disobedient
+disobey
+disobeys
+disorb
+disorder
+disordered
+disorderly
+disorders
+disparage
+disparagement
+disparagements
+dispark
+dispatch
+dispensation
+dispense
+dispenses
+dispers
+disperse
+dispersed
+dispersedly
+dispersing
+dispiteous
+displac
+displace
+displaced
+displant
+displanting
+display
+displayed
+displeas
+displease
+displeased
+displeasing
+displeasure
+displeasures
+disponge
+disport
+disports
+dispos
+dispose
+disposed
+disposer
+disposing
+disposition
+dispositions
+dispossess
+dispossessing
+disprais
+dispraise
+dispraising
+dispraisingly
+dispropertied
+disproportion
+disproportioned
+disprov
+disprove
+disproved
+dispursed
+disputable
+disputation
+disputations
+dispute
+disputed
+disputes
+disputing
+disquantity
+disquiet
+disquietly
+disrelish
+disrobe
+disseat
+dissemble
+dissembled
+dissembler
+dissemblers
+dissembling
+dissembly
+dissension
+dissensions
+dissentious
+dissever
+dissipation
+dissolute
+dissolutely
+dissolution
+dissolutions
+dissolv
+dissolve
+dissolved
+dissolves
+dissuade
+dissuaded
+distaff
+distaffs
+distain
+distains
+distance
+distant
+distaste
+distasted
+distasteful
+distemp
+distemper
+distemperature
+distemperatures
+distempered
+distempering
+distil
+distill
+distillation
+distilled
+distills
+distilment
+distinct
+distinction
+distinctly
+distingue
+distinguish
+distinguishes
+distinguishment
+distract
+distracted
+distractedly
+distraction
+distractions
+distracts
+distrain
+distraught
+distress
+distressed
+distresses
+distressful
+distribute
+distributed
+distribution
+distrust
+distrustful
+disturb
+disturbed
+disturbers
+disturbing
+disunite
+disvalued
+disvouch
+dit
+ditch
+ditchers
+ditches
+dites
+ditties
+ditty
+diurnal
+div
+dive
+diver
+divers
+diversely
+diversity
+divert
+diverted
+diverts
+dives
+divest
+dividable
+dividant
+divide
+divided
+divides
+divideth
+divin
+divination
+divine
+divinely
+divineness
+diviner
+divines
+divinest
+divining
+divinity
+division
+divisions
+divorc
+divorce
+divorced
+divorcement
+divorcing
+divulg
+divulge
+divulged
+divulging
+dizy
+dizzy
+do
+doating
+dobbin
+dock
+docks
+doct
+doctor
+doctors
+doctrine
+document
+dodge
+doe
+doer
+doers
+does
+doest
+doff
+dog
+dogberry
+dogfish
+dogg
+dogged
+dogs
+doigts
+doing
+doings
+doit
+doits
+dolabella
+dole
+doleful
+doll
+dollar
+dollars
+dolor
+dolorous
+dolour
+dolours
+dolphin
+dolt
+dolts
+domestic
+domestics
+dominance
+dominations
+dominator
+domine
+domineer
+domineering
+dominical
+dominion
+dominions
+domitius
+dommelton
+don
+donalbain
+donation
+donc
+doncaster
+done
+dong
+donn
+donne
+donner
+donnerai
+doom
+doomsday
+door
+doorkeeper
+doors
+dorcas
+doreus
+doricles
+dormouse
+dorothy
+dorset
+dorsetshire
+dost
+dotage
+dotant
+dotard
+dotards
+dote
+doted
+doters
+dotes
+doteth
+doth
+doting
+double
+doubled
+doubleness
+doubler
+doublet
+doublets
+doubling
+doubly
+doubt
+doubted
+doubtful
+doubtfully
+doubting
+doubtless
+doubts
+doug
+dough
+doughty
+doughy
+douglas
+dout
+doute
+douts
+dove
+dovehouse
+dover
+doves
+dow
+dowager
+dowdy
+dower
+dowerless
+dowers
+dowlas
+dowle
+down
+downfall
+downright
+downs
+downstairs
+downtrod
+downward
+downwards
+downy
+dowries
+dowry
+dowsabel
+doxy
+dozed
+dozen
+dozens
+dozy
+drab
+drabbing
+drabs
+drachma
+drachmas
+draff
+drag
+dragg
+dragged
+dragging
+dragon
+dragonish
+dragons
+drain
+drained
+drains
+drake
+dram
+dramatis
+drank
+draught
+draughts
+drave
+draw
+drawbridge
+drawer
+drawers
+draweth
+drawing
+drawling
+drawn
+draws
+drayman
+draymen
+dread
+dreaded
+dreadful
+dreadfully
+dreading
+dreads
+dream
+dreamer
+dreamers
+dreaming
+dreams
+dreamt
+drearning
+dreary
+dreg
+dregs
+drench
+drenched
+dress
+dressed
+dresser
+dressing
+dressings
+drest
+drew
+dribbling
+dried
+drier
+dries
+drift
+drily
+drink
+drinketh
+drinking
+drinkings
+drinks
+driv
+drive
+drivelling
+driven
+drives
+driveth
+driving
+drizzle
+drizzled
+drizzles
+droit
+drollery
+dromio
+dromios
+drone
+drones
+droop
+droopeth
+drooping
+droops
+drop
+dropheir
+droplets
+dropp
+dropper
+droppeth
+dropping
+droppings
+drops
+dropsied
+dropsies
+dropsy
+dropt
+dross
+drossy
+drought
+drove
+droven
+drovier
+drown
+drowned
+drowning
+drowns
+drows
+drowse
+drowsily
+drowsiness
+drowsy
+drudge
+drudgery
+drudges
+drug
+drugg
+drugs
+drum
+drumble
+drummer
+drumming
+drums
+drunk
+drunkard
+drunkards
+drunken
+drunkenly
+drunkenness
+dry
+dryness
+dst
+du
+dub
+dubb
+ducat
+ducats
+ducdame
+duchess
+duchies
+duchy
+duck
+ducking
+ducks
+dudgeon
+due
+duellist
+duello
+duer
+dues
+duff
+dug
+dugs
+duke
+dukedom
+dukedoms
+dukes
+dulcet
+dulche
+dull
+dullard
+duller
+dullest
+dulling
+dullness
+dulls
+dully
+dulness
+duly
+dumain
+dumb
+dumbe
+dumbly
+dumbness
+dump
+dumps
+dun
+duncan
+dung
+dungeon
+dungeons
+dunghill
+dunghills
+dungy
+dunnest
+dunsinane
+dunsmore
+dunstable
+dupp
+durance
+during
+durst
+dusky
+dust
+dusted
+dusty
+dutch
+dutchman
+duteous
+duties
+dutiful
+duty
+dwarf
+dwarfish
+dwell
+dwellers
+dwelling
+dwells
+dwelt
+dwindle
+dy
+dye
+dyed
+dyer
+dying
+e
+each
+eager
+eagerly
+eagerness
+eagle
+eagles
+eaning
+eanlings
+ear
+earing
+earl
+earldom
+earlier
+earliest
+earliness
+earls
+early
+earn
+earned
+earnest
+earnestly
+earnestness
+earns
+ears
+earth
+earthen
+earthlier
+earthly
+earthquake
+earthquakes
+earthy
+eas
+ease
+eased
+easeful
+eases
+easier
+easiest
+easiliest
+easily
+easiness
+easing
+east
+eastcheap
+easter
+eastern
+eastward
+easy
+eat
+eaten
+eater
+eaters
+eating
+eats
+eaux
+eaves
+ebb
+ebbing
+ebbs
+ebon
+ebony
+ebrew
+ecce
+echapper
+echo
+echoes
+eclips
+eclipse
+eclipses
+ecolier
+ecoutez
+ecstacy
+ecstasies
+ecstasy
+ecus
+eden
+edg
+edgar
+edge
+edged
+edgeless
+edges
+edict
+edicts
+edifice
+edifices
+edified
+edifies
+edition
+edm
+edmund
+edmunds
+edmundsbury
+educate
+educated
+education
+edward
+eel
+eels
+effect
+effected
+effectless
+effects
+effectual
+effectually
+effeminate
+effigies
+effus
+effuse
+effusion
+eftest
+egal
+egally
+eget
+egeus
+egg
+eggs
+eggshell
+eglamour
+eglantine
+egma
+ego
+egregious
+egregiously
+egress
+egypt
+egyptian
+egyptians
+eie
+eight
+eighteen
+eighth
+eightpenny
+eighty
+eisel
+either
+eject
+eke
+el
+elbe
+elbow
+elbows
+eld
+elder
+elders
+eldest
+eleanor
+elect
+elected
+election
+elegancy
+elegies
+element
+elements
+elephant
+elephants
+elevated
+eleven
+eleventh
+elf
+elflocks
+eliads
+elinor
+elizabeth
+ell
+elle
+ellen
+elm
+eloquence
+eloquent
+else
+elsewhere
+elsinore
+eltham
+elves
+elvish
+ely
+elysium
+em
+emballing
+embalm
+embalms
+embark
+embarked
+embarquements
+embassade
+embassage
+embassies
+embassy
+embattailed
+embattl
+embattle
+embay
+embellished
+embers
+emblaze
+emblem
+emblems
+embodied
+embold
+emboldens
+emboss
+embossed
+embounded
+embowel
+embowell
+embrac
+embrace
+embraced
+embracement
+embracements
+embraces
+embracing
+embrasures
+embroider
+embroidery
+emhracing
+emilia
+eminence
+eminent
+eminently
+emmanuel
+emnity
+empale
+emperal
+emperess
+emperial
+emperor
+empery
+emphasis
+empire
+empirics
+empiricutic
+empleached
+employ
+employed
+employer
+employment
+employments
+empoison
+empress
+emptied
+emptier
+empties
+emptiness
+empty
+emptying
+emulate
+emulation
+emulations
+emulator
+emulous
+en
+enact
+enacted
+enacts
+enactures
+enamell
+enamelled
+enamour
+enamoured
+enanmour
+encamp
+encamped
+encave
+enceladus
+enchaf
+enchafed
+enchant
+enchanted
+enchanting
+enchantingly
+enchantment
+enchantress
+enchants
+enchas
+encircle
+encircled
+enclos
+enclose
+enclosed
+encloses
+encloseth
+enclosing
+enclouded
+encompass
+encompassed
+encompasseth
+encompassment
+encore
+encorporal
+encount
+encounter
+encountered
+encounters
+encourage
+encouraged
+encouragement
+encrimsoned
+encroaching
+encumb
+end
+endamage
+endamagement
+endanger
+endart
+endear
+endeared
+endeavour
+endeavours
+ended
+ender
+ending
+endings
+endite
+endless
+endow
+endowed
+endowments
+endows
+ends
+endu
+endue
+endur
+endurance
+endure
+endured
+endures
+enduring
+endymion
+eneas
+enemies
+enemy
+enernies
+enew
+enfeebled
+enfeebles
+enfeoff
+enfetter
+enfoldings
+enforc
+enforce
+enforced
+enforcedly
+enforcement
+enforces
+enforcest
+enfranched
+enfranchis
+enfranchise
+enfranchised
+enfranchisement
+enfreed
+enfreedoming
+engag
+engage
+engaged
+engagements
+engaging
+engaol
+engend
+engender
+engenders
+engilds
+engine
+engineer
+enginer
+engines
+engirt
+england
+english
+englishman
+englishmen
+engluts
+englutted
+engraffed
+engraft
+engrafted
+engrav
+engrave
+engross
+engrossed
+engrossest
+engrossing
+engrossments
+enguard
+enigma
+enigmatical
+enjoin
+enjoined
+enjoy
+enjoyed
+enjoyer
+enjoying
+enjoys
+enkindle
+enkindled
+enlard
+enlarg
+enlarge
+enlarged
+enlargement
+enlargeth
+enlighten
+enlink
+enmesh
+enmities
+enmity
+ennoble
+ennobled
+enobarb
+enobarbus
+enon
+enormity
+enormous
+enough
+enow
+enpatron
+enpierced
+enquir
+enquire
+enquired
+enrag
+enrage
+enraged
+enrages
+enrank
+enrapt
+enrich
+enriched
+enriches
+enridged
+enrings
+enrob
+enrobe
+enroll
+enrolled
+enrooted
+enrounded
+enschedul
+ensconce
+ensconcing
+enseamed
+ensear
+enseigne
+enseignez
+ensemble
+enshelter
+enshielded
+enshrines
+ensign
+ensigns
+enskied
+ensman
+ensnare
+ensnared
+ensnareth
+ensteep
+ensu
+ensue
+ensued
+ensues
+ensuing
+enswathed
+ent
+entail
+entame
+entangled
+entangles
+entendre
+enter
+entered
+entering
+enterprise
+enterprises
+enters
+entertain
+entertained
+entertainer
+entertaining
+entertainment
+entertainments
+enthrall
+enthralled
+enthron
+enthroned
+entice
+enticements
+enticing
+entire
+entirely
+entitle
+entitled
+entitling
+entomb
+entombed
+entrails
+entrance
+entrances
+entrap
+entrapp
+entre
+entreat
+entreated
+entreaties
+entreating
+entreatments
+entreats
+entreaty
+entrench
+entry
+entwist
+envelop
+envenom
+envenomed
+envenoms
+envied
+envies
+envious
+enviously
+environ
+environed
+envoy
+envy
+envying
+enwheel
+enwombed
+enwraps
+ephesian
+ephesians
+ephesus
+epicure
+epicurean
+epicures
+epicurism
+epicurus
+epidamnum
+epidaurus
+epigram
+epilepsy
+epileptic
+epilogue
+epilogues
+epistles
+epistrophus
+epitaph
+epitaphs
+epithet
+epitheton
+epithets
+epitome
+equal
+equalities
+equality
+equall
+equally
+equalness
+equals
+equinoctial
+equinox
+equipage
+equity
+equivocal
+equivocate
+equivocates
+equivocation
+equivocator
+er
+erbear
+erbearing
+erbears
+erbeat
+erblows
+erboard
+erborne
+ercame
+ercast
+ercharg
+ercharged
+ercharging
+ercles
+ercome
+ercover
+ercrows
+erdoing
+ere
+erebus
+erect
+erected
+erecting
+erection
+erects
+erewhile
+erflourish
+erflow
+erflowing
+erflows
+erfraught
+erga
+ergalled
+erglanced
+ergo
+ergone
+ergrow
+ergrown
+ergrowth
+erhang
+erhanging
+erhasty
+erhear
+erheard
+eringoes
+erjoy
+erleap
+erleaps
+erleavens
+erlook
+erlooking
+ermaster
+ermengare
+ermount
+ern
+ernight
+eros
+erpaid
+erparted
+erpast
+erpays
+erpeer
+erperch
+erpicturing
+erpingham
+erposting
+erpow
+erpress
+erpressed
+err
+errand
+errands
+errant
+errate
+erraught
+erreaches
+erred
+errest
+erring
+erroneous
+error
+errors
+errs
+errule
+errun
+erset
+ershade
+ershades
+ershine
+ershot
+ersized
+erskip
+erslips
+erspreads
+erst
+erstare
+erstep
+erstunk
+ersway
+ersways
+erswell
+erta
+ertake
+erteemed
+erthrow
+erthrown
+erthrows
+ertook
+ertop
+ertopping
+ertrip
+erturn
+erudition
+eruption
+eruptions
+ervalues
+erwalk
+erwatch
+erween
+erweens
+erweigh
+erweighs
+erwhelm
+erwhelmed
+erworn
+es
+escalus
+escap
+escape
+escaped
+escapes
+eschew
+escoted
+esill
+especial
+especially
+esperance
+espials
+espied
+espies
+espous
+espouse
+espy
+esquire
+esquires
+essay
+essays
+essence
+essential
+essentially
+esses
+essex
+est
+establish
+established
+estate
+estates
+esteem
+esteemed
+esteemeth
+esteeming
+esteems
+estimable
+estimate
+estimation
+estimations
+estime
+estranged
+estridge
+estridges
+et
+etc
+etceteras
+ete
+eternal
+eternally
+eterne
+eternity
+eterniz
+etes
+ethiop
+ethiope
+ethiopes
+ethiopian
+etna
+eton
+etre
+eunuch
+eunuchs
+euphrates
+euphronius
+euriphile
+europa
+europe
+ev
+evade
+evades
+evans
+evasion
+evasions
+eve
+even
+evening
+evenly
+event
+eventful
+events
+ever
+everlasting
+everlastingly
+evermore
+every
+everyone
+everything
+everywhere
+evidence
+evidences
+evident
+evil
+evilly
+evils
+evitate
+ewe
+ewer
+ewers
+ewes
+exact
+exacted
+exactest
+exacting
+exaction
+exactions
+exactly
+exacts
+exalt
+exalted
+examin
+examination
+examinations
+examine
+examined
+examines
+exampl
+example
+exampled
+examples
+exasperate
+exasperates
+exceed
+exceeded
+exceedeth
+exceeding
+exceedingly
+exceeds
+excel
+excelled
+excellence
+excellencies
+excellency
+excellent
+excellently
+excelling
+excels
+except
+excepted
+excepting
+exception
+exceptions
+exceptless
+excess
+excessive
+exchang
+exchange
+exchanged
+exchequer
+exchequers
+excite
+excited
+excitements
+excites
+exclaim
+exclaims
+exclamation
+exclamations
+excludes
+excommunicate
+excommunication
+excrement
+excrements
+excursion
+excursions
+excus
+excusable
+excuse
+excused
+excuses
+excusez
+excusing
+execrable
+execrations
+execute
+executed
+executing
+execution
+executioner
+executioners
+executor
+executors
+exempt
+exempted
+exequies
+exercise
+exercises
+exeter
+exeunt
+exhal
+exhalation
+exhalations
+exhale
+exhales
+exhaust
+exhibit
+exhibiters
+exhibition
+exhort
+exhortation
+exigent
+exil
+exile
+exiled
+exion
+exist
+exists
+exit
+exits
+exorciser
+exorcisms
+exorcist
+expect
+expectance
+expectancy
+expectation
+expectations
+expected
+expecters
+expecting
+expects
+expedience
+expedient
+expediently
+expedition
+expeditious
+expel
+expell
+expelling
+expels
+expend
+expense
+expenses
+experienc
+experience
+experiences
+experiment
+experimental
+experiments
+expert
+expertness
+expiate
+expiation
+expir
+expiration
+expire
+expired
+expires
+expiring
+explication
+exploit
+exploits
+expos
+expose
+exposing
+exposition
+expositor
+expostulate
+expostulation
+exposture
+exposure
+expound
+expounded
+express
+expressed
+expresseth
+expressing
+expressive
+expressly
+expressure
+expuls
+expulsion
+exquisite
+exsufflicate
+extant
+extemporal
+extemporally
+extempore
+extend
+extended
+extends
+extent
+extenuate
+extenuated
+extenuates
+extenuation
+exterior
+exteriorly
+exteriors
+extermin
+extern
+external
+extinct
+extincted
+extincture
+extinguish
+extirp
+extirpate
+extirped
+extol
+extoll
+extolment
+exton
+extort
+extorted
+extortion
+extortions
+extra
+extract
+extracted
+extracting
+extraordinarily
+extraordinary
+extraught
+extravagancy
+extravagant
+extreme
+extremely
+extremes
+extremest
+extremities
+extremity
+exuent
+exult
+exultation
+ey
+eyas
+eyases
+eye
+eyeball
+eyeballs
+eyebrow
+eyebrows
+eyed
+eyeless
+eyelid
+eyelids
+eyes
+eyesight
+eyestrings
+eying
+eyne
+eyrie
+fa
+fabian
+fable
+fables
+fabric
+fabulous
+fac
+face
+faced
+facere
+faces
+faciant
+facile
+facility
+facinerious
+facing
+facit
+fact
+faction
+factionary
+factions
+factious
+factor
+factors
+faculties
+faculty
+fade
+faded
+fadeth
+fadge
+fading
+fadings
+fadom
+fadoms
+fagot
+fagots
+fail
+failing
+fails
+fain
+faint
+fainted
+fainter
+fainting
+faintly
+faintness
+faints
+fair
+fairer
+fairest
+fairies
+fairing
+fairings
+fairly
+fairness
+fairs
+fairwell
+fairy
+fais
+fait
+faites
+faith
+faithful
+faithfull
+faithfully
+faithless
+faiths
+faitors
+fal
+falchion
+falcon
+falconbridge
+falconer
+falconers
+fall
+fallacy
+fallen
+falleth
+falliable
+fallible
+falling
+fallow
+fallows
+falls
+fally
+falorous
+false
+falsehood
+falsely
+falseness
+falser
+falsify
+falsing
+falstaff
+falstaffs
+falter
+fam
+fame
+famed
+familiar
+familiarity
+familiarly
+familiars
+family
+famine
+famish
+famished
+famous
+famoused
+famously
+fan
+fanatical
+fancies
+fancy
+fane
+fanes
+fang
+fangled
+fangless
+fangs
+fann
+fanning
+fans
+fantasied
+fantasies
+fantastic
+fantastical
+fantastically
+fantasticoes
+fantasy
+fap
+far
+farborough
+farced
+fardel
+fardels
+fare
+fares
+farewell
+farewells
+fariner
+faring
+farm
+farmer
+farmhouse
+farms
+farre
+farrow
+farther
+farthest
+farthing
+farthingale
+farthingales
+farthings
+fartuous
+fas
+fashion
+fashionable
+fashioning
+fashions
+fast
+fasted
+fasten
+fastened
+faster
+fastest
+fasting
+fastly
+fastolfe
+fasts
+fat
+fatal
+fatally
+fate
+fated
+fates
+father
+fathered
+fatherless
+fatherly
+fathers
+fathom
+fathomless
+fathoms
+fatigate
+fatness
+fats
+fatted
+fatter
+fattest
+fatting
+fatuus
+fauconbridge
+faulconbridge
+fault
+faultiness
+faultless
+faults
+faulty
+fausse
+fauste
+faustuses
+faut
+favor
+favorable
+favorably
+favors
+favour
+favourable
+favoured
+favouredly
+favourer
+favourers
+favouring
+favourite
+favourites
+favours
+favout
+fawn
+fawneth
+fawning
+fawns
+fay
+fe
+fealty
+fear
+feared
+fearest
+fearful
+fearfull
+fearfully
+fearfulness
+fearing
+fearless
+fears
+feast
+feasted
+feasting
+feasts
+feat
+feated
+feater
+feather
+feathered
+feathers
+featly
+feats
+featur
+feature
+featured
+featureless
+features
+february
+fecks
+fed
+fedary
+federary
+fee
+feeble
+feebled
+feebleness
+feebling
+feebly
+feed
+feeder
+feeders
+feedeth
+feeding
+feeds
+feel
+feeler
+feeling
+feelingly
+feels
+fees
+feet
+fehemently
+feign
+feigned
+feigning
+feil
+feith
+felicitate
+felicity
+fell
+fellest
+fellies
+fellow
+fellowly
+fellows
+fellowship
+fellowships
+fells
+felon
+felonious
+felony
+felt
+female
+females
+feminine
+fen
+fenc
+fence
+fencer
+fencing
+fends
+fennel
+fenny
+fens
+fenton
+fer
+ferdinand
+fere
+fernseed
+ferrara
+ferrers
+ferret
+ferry
+ferryman
+fertile
+fertility
+fervency
+fervour
+fery
+fest
+feste
+fester
+festinate
+festinately
+festival
+festivals
+fet
+fetch
+fetches
+fetching
+fetlock
+fetlocks
+fett
+fetter
+fettering
+fetters
+fettle
+feu
+feud
+fever
+feverous
+fevers
+few
+fewer
+fewest
+fewness
+fickle
+fickleness
+fico
+fiction
+fiddle
+fiddler
+fiddlestick
+fidele
+fidelicet
+fidelity
+fidius
+fie
+field
+fielded
+fields
+fiend
+fiends
+fierce
+fiercely
+fierceness
+fiery
+fife
+fifes
+fifteen
+fifteens
+fifteenth
+fifth
+fifty
+fiftyfold
+fig
+fight
+fighter
+fightest
+fighteth
+fighting
+fights
+figo
+figs
+figur
+figure
+figured
+figures
+figuring
+fike
+fil
+filberts
+filch
+filches
+filching
+file
+filed
+files
+filial
+filius
+fill
+filled
+fillet
+filling
+fillip
+fills
+filly
+film
+fils
+filth
+filths
+filthy
+fin
+finally
+finch
+find
+finder
+findeth
+finding
+findings
+finds
+fine
+fineless
+finely
+finem
+fineness
+finer
+fines
+finest
+fing
+finger
+fingering
+fingers
+fingre
+fingres
+finical
+finish
+finished
+finisher
+finless
+finn
+fins
+finsbury
+fir
+firago
+fire
+firebrand
+firebrands
+fired
+fires
+firework
+fireworks
+firing
+firk
+firm
+firmament
+firmly
+firmness
+first
+firstlings
+fish
+fisher
+fishermen
+fishers
+fishes
+fishified
+fishmonger
+fishpond
+fisnomy
+fist
+fisting
+fists
+fistula
+fit
+fitchew
+fitful
+fitly
+fitment
+fitness
+fits
+fitted
+fitter
+fittest
+fitteth
+fitting
+fitzwater
+five
+fivepence
+fives
+fix
+fixed
+fixes
+fixeth
+fixing
+fixture
+fl
+flag
+flagging
+flagon
+flagons
+flags
+flail
+flakes
+flaky
+flam
+flame
+flamen
+flamens
+flames
+flaming
+flaminius
+flanders
+flannel
+flap
+flaring
+flash
+flashes
+flashing
+flask
+flat
+flatly
+flatness
+flats
+flatt
+flatter
+flattered
+flatterer
+flatterers
+flatterest
+flatteries
+flattering
+flatters
+flattery
+flaunts
+flavio
+flavius
+flaw
+flaws
+flax
+flaxen
+flay
+flaying
+flea
+fleance
+fleas
+flecked
+fled
+fledge
+flee
+fleec
+fleece
+fleeces
+fleer
+fleering
+fleers
+fleet
+fleeter
+fleeting
+fleming
+flemish
+flesh
+fleshes
+fleshly
+fleshment
+fleshmonger
+flew
+flexible
+flexure
+flibbertigibbet
+flickering
+flidge
+fliers
+flies
+flieth
+flight
+flights
+flighty
+flinch
+fling
+flint
+flints
+flinty
+flirt
+float
+floated
+floating
+flock
+flocks
+flood
+floodgates
+floods
+floor
+flora
+florence
+florentine
+florentines
+florentius
+florizel
+flote
+floulish
+flour
+flourish
+flourishes
+flourisheth
+flourishing
+flout
+flouted
+flouting
+flouts
+flow
+flowed
+flower
+flowerets
+flowers
+flowing
+flown
+flows
+fluellen
+fluent
+flung
+flush
+flushing
+fluster
+flute
+flutes
+flutter
+flux
+fluxive
+fly
+flying
+fo
+foal
+foals
+foam
+foamed
+foaming
+foams
+foamy
+fob
+focative
+fodder
+foe
+foeman
+foemen
+foes
+fog
+foggy
+fogs
+foh
+foi
+foil
+foiled
+foils
+foin
+foining
+foins
+fois
+foison
+foisons
+foist
+foix
+fold
+folded
+folds
+folio
+folk
+folks
+follies
+follow
+followed
+follower
+followers
+followest
+following
+follows
+folly
+fond
+fonder
+fondly
+fondness
+font
+fontibell
+food
+fool
+fooleries
+foolery
+foolhardy
+fooling
+foolish
+foolishly
+foolishness
+fools
+foot
+football
+footboy
+footboys
+footed
+footfall
+footing
+footman
+footmen
+footpath
+footsteps
+footstool
+fopp
+fopped
+foppery
+foppish
+fops
+for
+forage
+foragers
+forbade
+forbear
+forbearance
+forbears
+forbid
+forbidden
+forbiddenly
+forbids
+forbod
+forborne
+forc
+force
+forced
+forceful
+forceless
+forces
+forcible
+forcibly
+forcing
+ford
+fordid
+fordo
+fordoes
+fordone
+fore
+forecast
+forefather
+forefathers
+forefinger
+forego
+foregone
+forehand
+forehead
+foreheads
+forehorse
+foreign
+foreigner
+foreigners
+foreknowing
+foreknowledge
+foremost
+forenamed
+forenoon
+forerun
+forerunner
+forerunning
+foreruns
+foresaid
+foresaw
+foresay
+foresee
+foreseeing
+foresees
+foreshow
+foreskirt
+forespent
+forest
+forestall
+forestalled
+forester
+foresters
+forests
+foretell
+foretelling
+foretells
+forethink
+forethought
+foretold
+forever
+foreward
+forewarn
+forewarned
+forewarning
+forfeit
+forfeited
+forfeiters
+forfeiting
+forfeits
+forfeiture
+forfeitures
+forfend
+forfended
+forg
+forgave
+forge
+forged
+forgeries
+forgery
+forges
+forget
+forgetful
+forgetfulness
+forgetive
+forgets
+forgetting
+forgive
+forgiven
+forgiveness
+forgo
+forgoing
+forgone
+forgot
+forgotten
+fork
+forked
+forks
+forlorn
+form
+formal
+formally
+formed
+former
+formerly
+formless
+forms
+fornication
+fornications
+fornicatress
+forres
+forrest
+forsake
+forsaken
+forsaketh
+forslow
+forsook
+forsooth
+forspent
+forspoke
+forswear
+forswearing
+forswore
+forsworn
+fort
+forted
+forth
+forthcoming
+forthlight
+forthright
+forthwith
+fortification
+fortifications
+fortified
+fortifies
+fortify
+fortinbras
+fortitude
+fortnight
+fortress
+fortresses
+forts
+fortun
+fortuna
+fortunate
+fortunately
+fortune
+fortuned
+fortunes
+fortward
+forty
+forum
+forward
+forwarding
+forwardness
+forwards
+forwearied
+fosset
+fost
+foster
+fostered
+fought
+foughten
+foul
+fouler
+foulest
+foully
+foulness
+found
+foundation
+foundations
+founded
+founder
+fount
+fountain
+fountains
+founts
+four
+fourscore
+fourteen
+fourth
+foutra
+fowl
+fowler
+fowling
+fowls
+fox
+foxes
+foxship
+fracted
+fraction
+fractions
+fragile
+fragment
+fragments
+fragrant
+frail
+frailer
+frailties
+frailty
+fram
+frame
+framed
+frames
+frampold
+fran
+francais
+france
+frances
+franchise
+franchised
+franchisement
+franchises
+franciae
+francis
+francisca
+franciscan
+francisco
+frank
+franker
+frankfort
+franklin
+franklins
+frankly
+frankness
+frantic
+franticly
+frateretto
+fratrum
+fraud
+fraudful
+fraught
+fraughtage
+fraughting
+fray
+frays
+freckl
+freckled
+freckles
+frederick
+free
+freed
+freedom
+freedoms
+freehearted
+freelier
+freely
+freeman
+freemen
+freeness
+freer
+frees
+freestone
+freetown
+freeze
+freezes
+freezing
+freezings
+french
+frenchman
+frenchmen
+frenchwoman
+frenzy
+frequent
+frequents
+fresh
+fresher
+freshes
+freshest
+freshly
+freshness
+fret
+fretful
+frets
+fretted
+fretten
+fretting
+friar
+friars
+friday
+fridays
+friend
+friended
+friending
+friendless
+friendliness
+friendly
+friends
+friendship
+friendships
+frieze
+fright
+frighted
+frightened
+frightful
+frighting
+frights
+fringe
+fringed
+frippery
+frisk
+fritters
+frivolous
+fro
+frock
+frog
+frogmore
+froissart
+frolic
+from
+front
+fronted
+frontier
+frontiers
+fronting
+frontlet
+fronts
+frost
+frosts
+frosty
+froth
+froward
+frown
+frowning
+frowningly
+frowns
+froze
+frozen
+fructify
+frugal
+fruit
+fruiterer
+fruitful
+fruitfully
+fruitfulness
+fruition
+fruitless
+fruits
+frush
+frustrate
+frutify
+fry
+fubb
+fuel
+fugitive
+fulfil
+fulfill
+fulfilling
+fulfils
+full
+fullam
+fuller
+fullers
+fullest
+fullness
+fully
+fulness
+fulsome
+fulvia
+fum
+fumble
+fumbles
+fumblest
+fumbling
+fume
+fumes
+fuming
+fumiter
+fumitory
+fun
+function
+functions
+fundamental
+funeral
+funerals
+fur
+furbish
+furies
+furious
+furlongs
+furnace
+furnaces
+furnish
+furnished
+furnishings
+furniture
+furnival
+furor
+furr
+furrow
+furrowed
+furrows
+furth
+further
+furtherance
+furtherer
+furthermore
+furthest
+fury
+furze
+furzes
+fust
+fustian
+fustilarian
+fusty
+fut
+future
+futurity
+g
+gabble
+gaberdine
+gabriel
+gad
+gadding
+gads
+gadshill
+gag
+gage
+gaged
+gagg
+gaging
+gagne
+gain
+gained
+gainer
+gaingiving
+gains
+gainsaid
+gainsay
+gainsaying
+gainsays
+gainst
+gait
+gaited
+galathe
+gale
+galen
+gales
+gall
+gallant
+gallantly
+gallantry
+gallants
+galled
+gallery
+galley
+galleys
+gallia
+gallian
+galliard
+galliasses
+gallimaufry
+galling
+gallons
+gallop
+galloping
+gallops
+gallow
+galloway
+gallowglasses
+gallows
+gallowses
+galls
+gallus
+gam
+gambol
+gambold
+gambols
+gamboys
+game
+gamers
+games
+gamesome
+gamester
+gaming
+gammon
+gamut
+gan
+gangren
+ganymede
+gaol
+gaoler
+gaolers
+gaols
+gap
+gape
+gapes
+gaping
+gar
+garb
+garbage
+garboils
+garcon
+gard
+garde
+garden
+gardener
+gardeners
+gardens
+gardez
+gardiner
+gardon
+gargantua
+gargrave
+garish
+garland
+garlands
+garlic
+garment
+garments
+garmet
+garner
+garners
+garnish
+garnished
+garret
+garrison
+garrisons
+gart
+garter
+garterd
+gartering
+garters
+gascony
+gash
+gashes
+gaskins
+gasp
+gasping
+gasted
+gastness
+gat
+gate
+gated
+gates
+gath
+gather
+gathered
+gathering
+gathers
+gatories
+gatory
+gaud
+gaudeo
+gaudy
+gauge
+gaul
+gaultree
+gaunt
+gauntlet
+gauntlets
+gav
+gave
+gavest
+gawded
+gawds
+gawsey
+gay
+gayness
+gaz
+gaze
+gazed
+gazer
+gazers
+gazes
+gazeth
+gazing
+gear
+geck
+geese
+geffrey
+geld
+gelded
+gelding
+gelida
+gelidus
+gelt
+gem
+geminy
+gems
+gen
+gender
+genders
+general
+generally
+generals
+generation
+generations
+generative
+generosity
+generous
+genitive
+genitivo
+genius
+gennets
+genoa
+genoux
+gens
+gent
+gentilhomme
+gentility
+gentle
+gentlefolks
+gentleman
+gentlemanlike
+gentlemen
+gentleness
+gentler
+gentles
+gentlest
+gentlewoman
+gentlewomen
+gently
+gentry
+george
+gerard
+germaines
+germains
+german
+germane
+germans
+germany
+gertrude
+gest
+gests
+gesture
+gestures
+get
+getrude
+gets
+getter
+getting
+ghastly
+ghost
+ghosted
+ghostly
+ghosts
+gi
+giant
+giantess
+giantlike
+giants
+gib
+gibber
+gibbet
+gibbets
+gibe
+giber
+gibes
+gibing
+gibingly
+giddily
+giddiness
+giddy
+gift
+gifts
+gig
+giglets
+giglot
+gilbert
+gild
+gilded
+gilding
+gilliams
+gillian
+gills
+gillyvors
+gilt
+gimmal
+gimmers
+gin
+ging
+ginger
+gingerbread
+gingerly
+ginn
+gins
+gioucestershire
+gipes
+gipsies
+gipsy
+gird
+girded
+girdle
+girdled
+girdles
+girdling
+girl
+girls
+girt
+girth
+gis
+giv
+give
+given
+giver
+givers
+gives
+givest
+giveth
+giving
+givings
+glad
+gladded
+gladding
+gladly
+gladness
+glamis
+glanc
+glance
+glanced
+glances
+glancing
+glanders
+glansdale
+glare
+glares
+glass
+glasses
+glassy
+glaz
+glazed
+gleams
+glean
+gleaned
+gleaning
+gleeful
+gleek
+gleeking
+gleeks
+glend
+glendower
+glib
+glide
+glided
+glides
+glideth
+gliding
+glimmer
+glimmering
+glimmers
+glimpse
+glimpses
+glist
+glistening
+glister
+glistering
+glisters
+glitt
+glittering
+globe
+globes
+glooming
+gloomy
+glories
+glorified
+glorify
+glorious
+gloriously
+glory
+glose
+gloss
+glosses
+glou
+glouceste
+gloucester
+gloucestershire
+glove
+glover
+gloves
+glow
+glowed
+glowing
+glowworm
+gloz
+gloze
+glozes
+glu
+glue
+glued
+glues
+glut
+glutt
+glutted
+glutton
+gluttoning
+gluttony
+gnarled
+gnarling
+gnat
+gnats
+gnaw
+gnawing
+gnawn
+gnaws
+go
+goad
+goaded
+goads
+goal
+goat
+goatish
+goats
+gobbets
+gobbo
+goblet
+goblets
+goblin
+goblins
+god
+godded
+godden
+goddess
+goddesses
+goddild
+godfather
+godfathers
+godhead
+godlike
+godliness
+godly
+godmother
+gods
+godson
+goer
+goers
+goes
+goest
+goeth
+goffe
+gogs
+going
+gold
+golden
+goldenly
+goldsmith
+goldsmiths
+golgotha
+goliases
+goliath
+gon
+gondola
+gondolier
+gone
+goneril
+gong
+gonzago
+gonzalo
+good
+goodfellow
+goodlier
+goodliest
+goodly
+goodman
+goodness
+goodnight
+goodrig
+goods
+goodwife
+goodwill
+goodwin
+goodwins
+goodyear
+goodyears
+goose
+gooseberry
+goosequills
+goot
+gor
+gorbellied
+gorboduc
+gordian
+gore
+gored
+gorg
+gorge
+gorgeous
+gorget
+gorging
+gorgon
+gormandize
+gormandizing
+gory
+gosling
+gospel
+gospels
+goss
+gossamer
+gossip
+gossiping
+gossiplike
+gossips
+got
+goth
+goths
+gotten
+gourd
+gout
+gouts
+gouty
+govern
+governance
+governed
+governess
+government
+governor
+governors
+governs
+gower
+gown
+gowns
+grac
+grace
+graced
+graceful
+gracefully
+graceless
+graces
+gracing
+gracious
+graciously
+gradation
+graff
+graffing
+graft
+grafted
+grafters
+grain
+grained
+grains
+gramercies
+gramercy
+grammar
+grand
+grandam
+grandame
+grandchild
+grande
+grandeur
+grandfather
+grandjurors
+grandmother
+grandpre
+grandsir
+grandsire
+grandsires
+grange
+grant
+granted
+granting
+grants
+grape
+grapes
+grapple
+grapples
+grappling
+grasp
+grasped
+grasps
+grass
+grasshoppers
+grassy
+grate
+grated
+grateful
+grates
+gratiano
+gratify
+gratii
+gratillity
+grating
+gratis
+gratitude
+gratulate
+grav
+grave
+gravediggers
+gravel
+graveless
+gravell
+gravely
+graven
+graveness
+graver
+graves
+gravest
+gravestone
+gravities
+gravity
+gravy
+gray
+graymalkin
+graz
+graze
+grazed
+grazing
+grease
+greases
+greasily
+greasy
+great
+greater
+greatest
+greatly
+greatness
+grecian
+grecians
+gree
+greece
+greed
+greedily
+greediness
+greedy
+greeing
+greek
+greekish
+greeks
+green
+greener
+greenly
+greens
+greensleeves
+greenwich
+greenwood
+greet
+greeted
+greeting
+greetings
+greets
+greg
+gregory
+gremio
+grew
+grey
+greybeard
+greybeards
+greyhound
+greyhounds
+grief
+griefs
+griev
+grievance
+grievances
+grieve
+grieved
+grieves
+grievest
+grieving
+grievingly
+grievous
+grievously
+griffin
+griffith
+grim
+grime
+grimly
+grin
+grind
+grinding
+grindstone
+grinning
+grip
+gripe
+gripes
+griping
+grise
+grisly
+grissel
+grize
+grizzle
+grizzled
+groan
+groaning
+groans
+groat
+groats
+groin
+groom
+grooms
+grop
+groping
+gros
+gross
+grosser
+grossly
+grossness
+ground
+grounded
+groundlings
+grounds
+grove
+grovel
+grovelling
+groves
+grow
+groweth
+growing
+grown
+grows
+growth
+grub
+grubb
+grubs
+grudge
+grudged
+grudges
+grudging
+gruel
+grumble
+grumblest
+grumbling
+grumblings
+grumio
+grund
+grunt
+gualtier
+guard
+guardage
+guardant
+guarded
+guardian
+guardians
+guards
+guardsman
+gud
+gudgeon
+guerdon
+guerra
+guess
+guesses
+guessingly
+guest
+guests
+guiana
+guichard
+guide
+guided
+guider
+guiderius
+guides
+guiding
+guidon
+guienne
+guil
+guildenstern
+guilders
+guildford
+guildhall
+guile
+guiled
+guileful
+guilfords
+guilt
+guiltian
+guiltier
+guiltily
+guiltiness
+guiltless
+guilts
+guilty
+guinea
+guinever
+guise
+gul
+gules
+gulf
+gulfs
+gull
+gulls
+gum
+gumm
+gums
+gun
+gunner
+gunpowder
+guns
+gurnet
+gurney
+gust
+gusts
+gusty
+guts
+gutter
+guy
+guynes
+guysors
+gypsy
+gyve
+gyved
+gyves
+h
+ha
+haberdasher
+habiliment
+habiliments
+habit
+habitation
+habited
+habits
+habitude
+hack
+hacket
+hackney
+hacks
+had
+hadst
+haec
+haeres
+hag
+hagar
+haggard
+haggards
+haggish
+haggled
+hags
+hail
+hailed
+hailstone
+hailstones
+hair
+hairless
+hairs
+hairy
+hal
+halberd
+halberds
+halcyon
+hale
+haled
+hales
+half
+halfcan
+halfpence
+halfpenny
+halfpennyworth
+halfway
+halidom
+hall
+halloa
+halloing
+hallond
+halloo
+hallooing
+hallow
+hallowed
+hallowmas
+hallown
+hals
+halt
+halter
+halters
+halting
+halts
+halves
+ham
+hames
+hamlet
+hammer
+hammered
+hammering
+hammers
+hamper
+hampton
+hams
+hamstring
+hand
+handed
+handful
+handicraft
+handicraftsmen
+handing
+handiwork
+handkercher
+handkerchers
+handkerchief
+handle
+handled
+handles
+handless
+handlest
+handling
+handmaid
+handmaids
+hands
+handsaw
+handsome
+handsomely
+handsomeness
+handwriting
+handy
+hang
+hanged
+hangers
+hangeth
+hanging
+hangings
+hangman
+hangmen
+hangs
+hannibal
+hap
+hapless
+haply
+happ
+happen
+happened
+happier
+happies
+happiest
+happily
+happiness
+happy
+haps
+harbinger
+harbingers
+harbor
+harbour
+harbourage
+harbouring
+harbours
+harcourt
+hard
+harder
+hardest
+hardiest
+hardiment
+hardiness
+hardly
+hardness
+hardocks
+hardy
+hare
+harelip
+hares
+harfleur
+hark
+harlot
+harlotry
+harlots
+harm
+harmed
+harmful
+harming
+harmless
+harmonious
+harmony
+harms
+harness
+harp
+harper
+harpier
+harping
+harpy
+harried
+harrow
+harrows
+harry
+harsh
+harshly
+harshness
+hart
+harts
+harum
+harvest
+has
+hast
+haste
+hasted
+hasten
+hastes
+hastily
+hasting
+hastings
+hasty
+hat
+hatch
+hatches
+hatchet
+hatching
+hatchment
+hate
+hated
+hateful
+hater
+haters
+hates
+hateth
+hatfield
+hath
+hating
+hatred
+hats
+haud
+hauf
+haught
+haughtiness
+haughty
+haunch
+haunches
+haunt
+haunted
+haunting
+haunts
+hautboy
+hautboys
+have
+haven
+havens
+haver
+having
+havings
+havior
+haviour
+havoc
+hawk
+hawking
+hawks
+hawthorn
+hawthorns
+hay
+hazard
+hazarded
+hazards
+hazel
+hazelnut
+he
+head
+headborough
+headed
+headier
+heading
+headland
+headless
+headlong
+heads
+headsman
+headstrong
+heady
+heal
+healed
+healing
+heals
+health
+healthful
+healths
+healthsome
+healthy
+heap
+heaping
+heaps
+hear
+heard
+hearer
+hearers
+hearest
+heareth
+hearing
+hearings
+heark
+hearken
+hearkens
+hears
+hearsay
+hearse
+hearsed
+hearst
+heart
+heartache
+heartbreak
+heartbreaking
+hearted
+hearten
+hearth
+hearths
+heartily
+heartiness
+heartless
+heartlings
+heartly
+hearts
+heartsick
+heartstrings
+hearty
+heat
+heated
+heath
+heathen
+heathenish
+heating
+heats
+heauties
+heav
+heave
+heaved
+heaven
+heavenly
+heavens
+heaves
+heavier
+heaviest
+heavily
+heaviness
+heaving
+heavings
+heavy
+hebona
+hebrew
+hecate
+hectic
+hector
+hectors
+hecuba
+hedg
+hedge
+hedgehog
+hedgehogs
+hedges
+heed
+heeded
+heedful
+heedfull
+heedfully
+heedless
+heel
+heels
+hefted
+hefts
+heifer
+heifers
+heigh
+height
+heighten
+heinous
+heinously
+heir
+heiress
+heirless
+heirs
+held
+helen
+helena
+helenus
+helias
+helicons
+hell
+hellespont
+hellfire
+hellish
+helm
+helmed
+helmet
+helmets
+helms
+help
+helper
+helpers
+helpful
+helping
+helpless
+helps
+helter
+hem
+heme
+hemlock
+hemm
+hemp
+hempen
+hems
+hen
+hence
+henceforth
+henceforward
+henchman
+henri
+henricus
+henry
+hens
+hent
+henton
+her
+herald
+heraldry
+heralds
+herb
+herbert
+herblets
+herbs
+herculean
+hercules
+herd
+herds
+herdsman
+herdsmen
+here
+hereabout
+hereabouts
+hereafter
+hereby
+hereditary
+hereford
+herefordshire
+herein
+hereof
+heresies
+heresy
+heretic
+heretics
+hereto
+hereupon
+heritage
+heritier
+hermes
+hermia
+hermione
+hermit
+hermitage
+hermits
+herne
+hero
+herod
+herods
+heroes
+heroic
+heroical
+herring
+herrings
+hers
+herself
+hesperides
+hesperus
+hest
+hests
+heure
+heureux
+hew
+hewgh
+hewing
+hewn
+hews
+hey
+heyday
+hibocrates
+hic
+hiccups
+hick
+hid
+hidden
+hide
+hideous
+hideously
+hideousness
+hides
+hidest
+hiding
+hie
+hied
+hiems
+hies
+hig
+high
+higher
+highest
+highly
+highmost
+highness
+hight
+highway
+highways
+hilding
+hildings
+hill
+hillo
+hilloa
+hills
+hilt
+hilts
+hily
+him
+himself
+hinc
+hinckley
+hind
+hinder
+hindered
+hinders
+hindmost
+hinds
+hing
+hinge
+hinges
+hint
+hip
+hipp
+hipparchus
+hippolyta
+hips
+hir
+hire
+hired
+hiren
+hirtius
+his
+hisperia
+hiss
+hisses
+hissing
+hist
+historical
+history
+hit
+hither
+hitherto
+hitherward
+hitherwards
+hits
+hitting
+hive
+hives
+hizzing
+ho
+hoa
+hoar
+hoard
+hoarded
+hoarding
+hoars
+hoarse
+hoary
+hob
+hobbididence
+hobby
+hobbyhorse
+hobgoblin
+hobnails
+hoc
+hod
+hodge
+hog
+hogs
+hogshead
+hogsheads
+hois
+hoise
+hoist
+hoisted
+hoists
+holborn
+hold
+holden
+holder
+holdeth
+holdfast
+holding
+holds
+hole
+holes
+holidam
+holidame
+holiday
+holidays
+holier
+holiest
+holily
+holiness
+holla
+holland
+hollander
+hollanders
+holloa
+holloaing
+hollow
+hollowly
+hollowness
+holly
+holmedon
+holofernes
+holp
+holy
+homage
+homager
+home
+homely
+homes
+homespuns
+homeward
+homewards
+homicide
+homicides
+homily
+hominem
+hommes
+homo
+honest
+honester
+honestest
+honestly
+honesty
+honey
+honeycomb
+honeying
+honeyless
+honeysuckle
+honeysuckles
+honi
+honneur
+honor
+honorable
+honorably
+honorato
+honorificabilitudinitatibus
+honors
+honour
+honourable
+honourably
+honoured
+honourest
+honourible
+honouring
+honours
+hoo
+hood
+hooded
+hoodman
+hoods
+hoodwink
+hoof
+hoofs
+hook
+hooking
+hooks
+hoop
+hoops
+hoot
+hooted
+hooting
+hoots
+hop
+hope
+hopeful
+hopeless
+hopes
+hopest
+hoping
+hopkins
+hoppedance
+hor
+horace
+horatio
+horizon
+horn
+hornbook
+horned
+horner
+horning
+hornpipes
+horns
+horologe
+horrible
+horribly
+horrid
+horrider
+horridly
+horror
+horrors
+hors
+horse
+horseback
+horsed
+horsehairs
+horseman
+horsemanship
+horsemen
+horses
+horseway
+horsing
+hortensio
+hortensius
+horum
+hose
+hospitable
+hospital
+hospitality
+host
+hostage
+hostages
+hostess
+hostile
+hostility
+hostilius
+hosts
+hot
+hotly
+hotspur
+hotter
+hottest
+hound
+hounds
+hour
+hourly
+hours
+hous
+house
+household
+householder
+householders
+households
+housekeeper
+housekeepers
+housekeeping
+houseless
+houses
+housewife
+housewifery
+housewives
+hovel
+hover
+hovered
+hovering
+hovers
+how
+howbeit
+howe
+howeer
+however
+howl
+howled
+howlet
+howling
+howls
+howsoe
+howsoever
+howsome
+hoxes
+hoy
+hoyday
+hubert
+huddled
+huddling
+hue
+hued
+hues
+hug
+huge
+hugely
+hugeness
+hugg
+hugger
+hugh
+hugs
+hujus
+hulk
+hulks
+hull
+hulling
+hullo
+hum
+human
+humane
+humanely
+humanity
+humble
+humbled
+humbleness
+humbler
+humbles
+humblest
+humbling
+humbly
+hume
+humh
+humidity
+humility
+humming
+humor
+humorous
+humors
+humour
+humourists
+humours
+humphrey
+humphry
+hums
+hundred
+hundreds
+hundredth
+hung
+hungarian
+hungary
+hunger
+hungerford
+hungerly
+hungry
+hunt
+hunted
+hunter
+hunters
+hunteth
+hunting
+huntington
+huntress
+hunts
+huntsman
+huntsmen
+hurdle
+hurl
+hurling
+hurls
+hurly
+hurlyburly
+hurricano
+hurricanoes
+hurried
+hurries
+hurry
+hurt
+hurting
+hurtled
+hurtless
+hurtling
+hurts
+husband
+husbanded
+husbandless
+husbandry
+husbands
+hush
+hushes
+husht
+husks
+huswife
+huswifes
+hutch
+hybla
+hydra
+hyen
+hymen
+hymenaeus
+hymn
+hymns
+hyperboles
+hyperbolical
+hyperion
+hypocrisy
+hypocrite
+hypocrites
+hyrcan
+hyrcania
+hyrcanian
+hyssop
+hysterica
+i
+iachimo
+iaculis
+iago
+iament
+ibat
+icarus
+ice
+iceland
+ici
+icicle
+icicles
+icy
+idea
+ideas
+idem
+iden
+ides
+idiot
+idiots
+idle
+idleness
+idles
+idly
+idol
+idolatrous
+idolatry
+ield
+if
+ifs
+ignis
+ignoble
+ignobly
+ignominious
+ignominy
+ignomy
+ignorance
+ignorant
+ii
+iii
+iiii
+il
+ilbow
+ild
+ilion
+ilium
+ill
+illegitimate
+illiterate
+illness
+illo
+ills
+illume
+illumin
+illuminate
+illumineth
+illusion
+illusions
+illustrate
+illustrated
+illustrious
+illyria
+illyrian
+ils
+im
+image
+imagery
+images
+imagin
+imaginary
+imagination
+imaginations
+imagine
+imagining
+imaginings
+imbar
+imbecility
+imbrue
+imitari
+imitate
+imitated
+imitation
+imitations
+immaculate
+immanity
+immask
+immaterial
+immediacy
+immediate
+immediately
+imminence
+imminent
+immoderate
+immoderately
+immodest
+immoment
+immortal
+immortaliz
+immortally
+immur
+immured
+immures
+imogen
+imp
+impaint
+impair
+impairing
+impale
+impaled
+impanelled
+impart
+imparted
+impartial
+impartment
+imparts
+impasted
+impatience
+impatient
+impatiently
+impawn
+impeach
+impeached
+impeachment
+impeachments
+impedes
+impediment
+impediments
+impenetrable
+imperator
+imperceiverant
+imperfect
+imperfection
+imperfections
+imperfectly
+imperial
+imperious
+imperiously
+impertinency
+impertinent
+impeticos
+impetuosity
+impetuous
+impieties
+impiety
+impious
+implacable
+implements
+implies
+implor
+implorators
+implore
+implored
+imploring
+impon
+import
+importance
+importancy
+important
+importantly
+imported
+importeth
+importing
+importless
+imports
+importun
+importunacy
+importunate
+importune
+importunes
+importunity
+impos
+impose
+imposed
+imposition
+impositions
+impossibilities
+impossibility
+impossible
+imposthume
+impostor
+impostors
+impotence
+impotent
+impounded
+impregnable
+imprese
+impress
+impressed
+impressest
+impression
+impressure
+imprimendum
+imprimis
+imprint
+imprinted
+imprison
+imprisoned
+imprisoning
+imprisonment
+improbable
+improper
+improve
+improvident
+impudence
+impudency
+impudent
+impudently
+impudique
+impugn
+impugns
+impure
+imputation
+impute
+in
+inaccessible
+inaidable
+inaudible
+inauspicious
+incaged
+incantations
+incapable
+incardinate
+incarnadine
+incarnate
+incarnation
+incens
+incense
+incensed
+incensement
+incenses
+incensing
+incertain
+incertainties
+incertainty
+incessant
+incessantly
+incest
+incestuous
+inch
+incharitable
+inches
+incidency
+incident
+incision
+incite
+incites
+incivil
+incivility
+inclin
+inclinable
+inclination
+incline
+inclined
+inclines
+inclining
+inclips
+include
+included
+includes
+inclusive
+incomparable
+incomprehensible
+inconsiderate
+inconstancy
+inconstant
+incontinency
+incontinent
+incontinently
+inconvenience
+inconveniences
+inconvenient
+incony
+incorporate
+incorps
+incorrect
+increas
+increase
+increases
+increaseth
+increasing
+incredible
+incredulous
+incur
+incurable
+incurr
+incurred
+incursions
+ind
+inde
+indebted
+indeed
+indent
+indented
+indenture
+indentures
+index
+indexes
+india
+indian
+indict
+indicted
+indictment
+indies
+indifferency
+indifferent
+indifferently
+indigent
+indigest
+indigested
+indign
+indignation
+indignations
+indigne
+indignities
+indignity
+indirect
+indirection
+indirections
+indirectly
+indiscreet
+indiscretion
+indispos
+indisposition
+indissoluble
+indistinct
+indistinguish
+indistinguishable
+indited
+individable
+indrench
+indu
+indubitate
+induc
+induce
+induced
+inducement
+induction
+inductions
+indue
+indued
+indues
+indulgence
+indulgences
+indulgent
+indurance
+industrious
+industriously
+industry
+inequality
+inestimable
+inevitable
+inexecrable
+inexorable
+inexplicable
+infallible
+infallibly
+infamonize
+infamous
+infamy
+infancy
+infant
+infants
+infect
+infected
+infecting
+infection
+infections
+infectious
+infectiously
+infects
+infer
+inference
+inferior
+inferiors
+infernal
+inferr
+inferreth
+inferring
+infest
+infidel
+infidels
+infinite
+infinitely
+infinitive
+infirm
+infirmities
+infirmity
+infixed
+infixing
+inflam
+inflame
+inflaming
+inflammation
+inflict
+infliction
+influence
+influences
+infold
+inform
+informal
+information
+informations
+informed
+informer
+informs
+infortunate
+infring
+infringe
+infringed
+infus
+infuse
+infused
+infusing
+infusion
+ingener
+ingenious
+ingeniously
+inglorious
+ingots
+ingraffed
+ingraft
+ingrate
+ingrated
+ingrateful
+ingratitude
+ingratitudes
+ingredient
+ingredients
+ingross
+inhabit
+inhabitable
+inhabitants
+inhabited
+inhabits
+inhearse
+inhearsed
+inherent
+inherit
+inheritance
+inherited
+inheriting
+inheritor
+inheritors
+inheritrix
+inherits
+inhibited
+inhibition
+inhoop
+inhuman
+iniquities
+iniquity
+initiate
+injointed
+injunction
+injunctions
+injur
+injure
+injurer
+injuries
+injurious
+injury
+injustice
+ink
+inkhorn
+inkle
+inkles
+inkling
+inky
+inlaid
+inland
+inlay
+inly
+inmost
+inn
+inner
+innkeeper
+innocence
+innocency
+innocent
+innocents
+innovation
+innovator
+inns
+innumerable
+inoculate
+inordinate
+inprimis
+inquir
+inquire
+inquiry
+inquisition
+inquisitive
+inroads
+insane
+insanie
+insatiate
+insconce
+inscrib
+inscription
+inscriptions
+inscroll
+inscrutable
+insculp
+insculpture
+insensible
+inseparable
+inseparate
+insert
+inserted
+inset
+inshell
+inshipp
+inside
+insinewed
+insinuate
+insinuateth
+insinuating
+insinuation
+insisted
+insisting
+insisture
+insociable
+insolence
+insolent
+insomuch
+inspir
+inspiration
+inspirations
+inspire
+inspired
+install
+installed
+instalment
+instance
+instances
+instant
+instantly
+instate
+instead
+insteeped
+instigate
+instigated
+instigation
+instigations
+instigator
+instinct
+instinctively
+institute
+institutions
+instruct
+instructed
+instruction
+instructions
+instructs
+instrument
+instrumental
+instruments
+insubstantial
+insufficience
+insufficiency
+insult
+insulted
+insulting
+insultment
+insults
+insupportable
+insuppressive
+insurrection
+insurrections
+int
+integer
+integritas
+integrity
+intellect
+intellects
+intellectual
+intelligence
+intelligencer
+intelligencing
+intelligent
+intelligis
+intelligo
+intemperance
+intemperate
+intend
+intended
+intendeth
+intending
+intendment
+intends
+intenible
+intent
+intention
+intentively
+intents
+inter
+intercept
+intercepted
+intercepter
+interception
+intercepts
+intercession
+intercessors
+interchained
+interchang
+interchange
+interchangeably
+interchangement
+interchanging
+interdiction
+interest
+interim
+interims
+interior
+interjections
+interjoin
+interlude
+intermingle
+intermission
+intermissive
+intermit
+intermix
+intermixed
+interpose
+interposer
+interposes
+interpret
+interpretation
+interpreted
+interpreter
+interpreters
+interprets
+interr
+interred
+interrogatories
+interrupt
+interrupted
+interrupter
+interruptest
+interruption
+interrupts
+intertissued
+intervallums
+interview
+intestate
+intestine
+intil
+intimate
+intimation
+intitled
+intituled
+into
+intolerable
+intoxicates
+intreasured
+intreat
+intrench
+intrenchant
+intricate
+intrinse
+intrinsicate
+intrude
+intruder
+intruding
+intrusion
+inundation
+inure
+inurn
+invade
+invades
+invasion
+invasive
+invectively
+invectives
+inveigled
+invent
+invented
+invention
+inventions
+inventor
+inventorially
+inventoried
+inventors
+inventory
+inverness
+invert
+invest
+invested
+investing
+investments
+inveterate
+invincible
+inviolable
+invised
+invisible
+invitation
+invite
+invited
+invites
+inviting
+invitis
+invocate
+invocation
+invoke
+invoked
+invulnerable
+inward
+inwardly
+inwardness
+inwards
+ionia
+ionian
+ipse
+ipswich
+ira
+irae
+iras
+ire
+ireful
+ireland
+iris
+irish
+irishman
+irishmen
+irks
+irksome
+iron
+irons
+irreconcil
+irrecoverable
+irregular
+irregulous
+irreligious
+irremovable
+irreparable
+irresolute
+irrevocable
+is
+isabel
+isabella
+isbel
+isbels
+iscariot
+ise
+ish
+isidore
+isis
+island
+islander
+islanders
+islands
+isle
+isles
+israel
+issu
+issue
+issued
+issueless
+issues
+issuing
+ist
+ista
+it
+italian
+italy
+itch
+itches
+itching
+item
+items
+iteration
+ithaca
+its
+itself
+itshall
+iv
+ivory
+ivy
+iwis
+ix
+j
+jacet
+jack
+jackanapes
+jacks
+jacksauce
+jackslave
+jacob
+jade
+jaded
+jades
+jail
+jakes
+jamany
+james
+jamy
+jane
+jangled
+jangling
+january
+janus
+japhet
+jaquenetta
+jaques
+jar
+jarring
+jars
+jarteer
+jasons
+jaunce
+jauncing
+jaundice
+jaundies
+jaw
+jawbone
+jaws
+jay
+jays
+jc
+je
+jealous
+jealousies
+jealousy
+jeer
+jeering
+jelly
+jenny
+jeopardy
+jephtha
+jephthah
+jerkin
+jerkins
+jerks
+jeronimy
+jerusalem
+jeshu
+jesses
+jessica
+jest
+jested
+jester
+jesters
+jesting
+jests
+jesu
+jesus
+jet
+jets
+jew
+jewel
+jeweller
+jewels
+jewess
+jewish
+jewry
+jews
+jezebel
+jig
+jigging
+jill
+jills
+jingling
+joan
+job
+jockey
+jocund
+jog
+jogging
+john
+johns
+join
+joinder
+joined
+joiner
+joineth
+joins
+joint
+jointed
+jointing
+jointly
+jointress
+joints
+jointure
+jollity
+jolly
+jolt
+joltheads
+jordan
+joseph
+joshua
+jot
+jour
+jourdain
+journal
+journey
+journeying
+journeyman
+journeymen
+journeys
+jove
+jovem
+jovial
+jowl
+jowls
+joy
+joyed
+joyful
+joyfully
+joyless
+joyous
+joys
+juan
+jud
+judas
+judases
+jude
+judg
+judge
+judged
+judgement
+judges
+judgest
+judging
+judgment
+judgments
+judicious
+jug
+juggle
+juggled
+juggler
+jugglers
+juggling
+jugs
+juice
+juiced
+jul
+jule
+julia
+juliet
+julietta
+julio
+julius
+july
+jump
+jumpeth
+jumping
+jumps
+june
+junes
+junior
+junius
+junkets
+juno
+jupiter
+jure
+jurement
+jurisdiction
+juror
+jurors
+jury
+jurymen
+just
+justeius
+justest
+justice
+justicer
+justicers
+justices
+justification
+justified
+justify
+justle
+justled
+justles
+justling
+justly
+justness
+justs
+jutting
+jutty
+juvenal
+kam
+kate
+kated
+kates
+katharine
+katherina
+katherine
+kecksies
+keech
+keel
+keels
+keen
+keenness
+keep
+keepdown
+keeper
+keepers
+keepest
+keeping
+keeps
+keiser
+ken
+kendal
+kennel
+kent
+kentish
+kentishman
+kentishmen
+kept
+kerchief
+kerely
+kern
+kernal
+kernel
+kernels
+kerns
+kersey
+kettle
+kettledrum
+kettledrums
+key
+keys
+kibe
+kibes
+kick
+kicked
+kickshaws
+kickshawses
+kicky
+kid
+kidney
+kikely
+kildare
+kill
+killed
+killer
+killeth
+killing
+killingworth
+kills
+kiln
+kimbolton
+kin
+kind
+kinder
+kindest
+kindle
+kindled
+kindless
+kindlier
+kindling
+kindly
+kindness
+kindnesses
+kindred
+kindreds
+kinds
+kine
+king
+kingdom
+kingdoms
+kingly
+kings
+kinred
+kins
+kinsman
+kinsmen
+kinswoman
+kirtle
+kirtles
+kiss
+kissed
+kisses
+kissing
+kitchen
+kitchens
+kite
+kites
+kitten
+kj
+kl
+klll
+knack
+knacks
+knapp
+knav
+knave
+knaveries
+knavery
+knaves
+knavish
+knead
+kneaded
+kneading
+knee
+kneel
+kneeling
+kneels
+knees
+knell
+knew
+knewest
+knife
+knight
+knighted
+knighthood
+knighthoods
+knightly
+knights
+knit
+knits
+knitters
+knitteth
+knives
+knobs
+knock
+knocking
+knocks
+knog
+knoll
+knot
+knots
+knotted
+knotty
+know
+knower
+knowest
+knowing
+knowingly
+knowings
+knowledge
+known
+knows
+l
+la
+laban
+label
+labell
+labienus
+labio
+labor
+laboring
+labors
+labour
+laboured
+labourer
+labourers
+labouring
+labours
+laboursome
+labras
+labyrinth
+lac
+lace
+laced
+lacedaemon
+laces
+lacies
+lack
+lackbeard
+lacked
+lackey
+lackeying
+lackeys
+lacking
+lacks
+lad
+ladder
+ladders
+lade
+laden
+ladies
+lading
+lads
+lady
+ladybird
+ladyship
+ladyships
+laer
+laertes
+lafeu
+lag
+lagging
+laid
+lain
+laissez
+lake
+lakes
+lakin
+lam
+lamb
+lambert
+lambkin
+lambkins
+lambs
+lame
+lamely
+lameness
+lament
+lamentable
+lamentably
+lamentation
+lamentations
+lamented
+lamenting
+lamentings
+laments
+lames
+laming
+lammas
+lammastide
+lamound
+lamp
+lampass
+lamps
+lanc
+lancaster
+lance
+lances
+lanceth
+lanch
+land
+landed
+landing
+landless
+landlord
+landmen
+lands
+lane
+lanes
+langage
+langley
+langton
+language
+languageless
+languages
+langues
+languish
+languished
+languishes
+languishing
+languishings
+languishment
+languor
+lank
+lantern
+lanterns
+lanthorn
+lap
+lapis
+lapland
+lapp
+laps
+lapse
+lapsed
+lapsing
+lapwing
+laquais
+larded
+larder
+larding
+lards
+large
+largely
+largeness
+larger
+largess
+largest
+lark
+larks
+larron
+lartius
+larum
+larums
+las
+lascivious
+lash
+lass
+lasses
+last
+lasted
+lasting
+lastly
+lasts
+latch
+latches
+late
+lated
+lately
+later
+latest
+lath
+latin
+latten
+latter
+lattice
+laud
+laudable
+laudis
+laugh
+laughable
+laughed
+laugher
+laughest
+laughing
+laughs
+laughter
+launce
+launcelot
+launces
+launch
+laund
+laundress
+laundry
+laur
+laura
+laurel
+laurels
+laurence
+laus
+lavache
+lave
+lavee
+lavender
+lavina
+lavinia
+lavish
+lavishly
+lavolt
+lavoltas
+law
+lawful
+lawfully
+lawless
+lawlessly
+lawn
+lawns
+lawrence
+laws
+lawyer
+lawyers
+lay
+layer
+layest
+laying
+lays
+lazar
+lazars
+lazarus
+lazy
+lc
+ld
+ldst
+le
+lead
+leaden
+leader
+leaders
+leadest
+leading
+leads
+leaf
+leagu
+league
+leagued
+leaguer
+leagues
+leah
+leak
+leaky
+lean
+leander
+leaner
+leaning
+leanness
+leans
+leap
+leaped
+leaping
+leaps
+leapt
+lear
+learn
+learned
+learnedly
+learning
+learnings
+learns
+learnt
+leas
+lease
+leases
+leash
+leasing
+least
+leather
+leathern
+leav
+leave
+leaven
+leavening
+leaver
+leaves
+leaving
+leavy
+lecher
+lecherous
+lechers
+lechery
+lecon
+lecture
+lectures
+led
+leda
+leech
+leeches
+leek
+leeks
+leer
+leers
+lees
+leese
+leet
+leets
+left
+leg
+legacies
+legacy
+legate
+legatine
+lege
+legerity
+leges
+legg
+legion
+legions
+legitimate
+legitimation
+legs
+leicester
+leicestershire
+leiger
+leigers
+leisure
+leisurely
+leisures
+leman
+lemon
+lena
+lend
+lender
+lending
+lendings
+lends
+length
+lengthen
+lengthens
+lengths
+lenity
+lennox
+lent
+lenten
+lentus
+leo
+leon
+leonardo
+leonati
+leonato
+leonatus
+leontes
+leopard
+leopards
+leper
+leperous
+lepidus
+leprosy
+lequel
+lers
+les
+less
+lessen
+lessens
+lesser
+lesson
+lessoned
+lessons
+lest
+lestrake
+let
+lethargied
+lethargies
+lethargy
+lethe
+lets
+lett
+letter
+letters
+letting
+lettuce
+leur
+leve
+level
+levell
+levelled
+levels
+leven
+levers
+leviathan
+leviathans
+levied
+levies
+levity
+levy
+levying
+lewd
+lewdly
+lewdness
+lewdsters
+lewis
+liable
+liar
+liars
+libbard
+libelling
+libels
+liberal
+liberality
+liberte
+liberties
+libertine
+libertines
+liberty
+library
+libya
+licence
+licens
+license
+licentious
+lichas
+licio
+lick
+licked
+licker
+lictors
+lid
+lids
+lie
+lied
+lief
+liefest
+liege
+liegeman
+liegemen
+lien
+lies
+liest
+lieth
+lieu
+lieutenant
+lieutenantry
+lieutenants
+lieve
+life
+lifeblood
+lifeless
+lifelings
+lift
+lifted
+lifter
+lifteth
+lifting
+lifts
+lig
+ligarius
+liggens
+light
+lighted
+lighten
+lightens
+lighter
+lightest
+lightly
+lightness
+lightning
+lightnings
+lights
+lik
+like
+liked
+likeliest
+likelihood
+likelihoods
+likely
+likeness
+liker
+likes
+likest
+likewise
+liking
+likings
+lilies
+lily
+lim
+limander
+limb
+limbeck
+limbecks
+limber
+limbo
+limbs
+lime
+limed
+limehouse
+limekilns
+limit
+limitation
+limited
+limits
+limn
+limp
+limping
+limps
+lin
+lincoln
+lincolnshire
+line
+lineal
+lineally
+lineament
+lineaments
+lined
+linen
+linens
+lines
+ling
+lingare
+linger
+lingered
+lingers
+linguist
+lining
+link
+links
+linsey
+linstock
+linta
+lion
+lionel
+lioness
+lions
+lip
+lipp
+lips
+lipsbury
+liquid
+liquor
+liquorish
+liquors
+lirra
+lisbon
+lisp
+lisping
+list
+listen
+listening
+lists
+literatured
+lither
+litter
+little
+littlest
+liv
+live
+lived
+livelier
+livelihood
+livelong
+lively
+liver
+liveries
+livers
+livery
+lives
+livest
+liveth
+livia
+living
+livings
+lizard
+lizards
+ll
+lll
+llous
+lnd
+lo
+loa
+loach
+load
+loaden
+loading
+loads
+loaf
+loam
+loan
+loath
+loathe
+loathed
+loather
+loathes
+loathing
+loathly
+loathness
+loathsome
+loathsomeness
+loathsomest
+loaves
+lob
+lobbies
+lobby
+local
+lochaber
+lock
+locked
+locking
+lockram
+locks
+locusts
+lode
+lodg
+lodge
+lodged
+lodgers
+lodges
+lodging
+lodgings
+lodovico
+lodowick
+lofty
+log
+logger
+loggerhead
+loggerheads
+loggets
+logic
+logs
+loins
+loiter
+loiterer
+loiterers
+loitering
+lolling
+lolls
+lombardy
+london
+londoners
+lone
+loneliness
+lonely
+long
+longaville
+longboat
+longed
+longer
+longest
+longeth
+longing
+longings
+longly
+longs
+longtail
+loo
+loof
+look
+looked
+looker
+lookers
+lookest
+looking
+looks
+loon
+loop
+loos
+loose
+loosed
+loosely
+loosen
+loosing
+lop
+lopp
+loquitur
+lord
+lorded
+lording
+lordings
+lordliness
+lordly
+lords
+lordship
+lordships
+lorenzo
+lorn
+lorraine
+lorship
+los
+lose
+loser
+losers
+loses
+losest
+loseth
+losing
+loss
+losses
+lost
+lot
+lots
+lott
+lottery
+loud
+louder
+loudly
+lour
+loureth
+louring
+louse
+louses
+lousy
+lout
+louted
+louts
+louvre
+lov
+love
+loved
+lovedst
+lovel
+lovelier
+loveliness
+lovell
+lovely
+lover
+lovered
+lovers
+loves
+lovest
+loveth
+loving
+lovingly
+low
+lowe
+lower
+lowest
+lowing
+lowliness
+lowly
+lown
+lowness
+loyal
+loyally
+loyalties
+loyalty
+lozel
+lt
+lubber
+lubberly
+luc
+luccicos
+luce
+lucentio
+luces
+lucetta
+luciana
+lucianus
+lucifer
+lucifier
+lucilius
+lucina
+lucio
+lucius
+luck
+luckier
+luckiest
+luckily
+luckless
+lucky
+lucre
+lucrece
+lucretia
+lucullius
+lucullus
+lucy
+lud
+ludlow
+lug
+lugg
+luggage
+luke
+lukewarm
+lull
+lulla
+lullaby
+lulls
+lumbert
+lump
+lumpish
+luna
+lunacies
+lunacy
+lunatic
+lunatics
+lunes
+lungs
+lupercal
+lurch
+lure
+lurk
+lurketh
+lurking
+lurks
+luscious
+lush
+lust
+lusted
+luster
+lustful
+lustier
+lustiest
+lustig
+lustihood
+lustily
+lustre
+lustrous
+lusts
+lusty
+lute
+lutes
+lutestring
+lutheran
+luxurious
+luxuriously
+luxury
+ly
+lycaonia
+lycurguses
+lydia
+lye
+lyen
+lying
+lym
+lymoges
+lynn
+lysander
+m
+ma
+maan
+mab
+macbeth
+maccabaeus
+macdonwald
+macduff
+mace
+macedon
+maces
+machiavel
+machination
+machinations
+machine
+mack
+macmorris
+maculate
+maculation
+mad
+madam
+madame
+madams
+madcap
+madded
+madding
+made
+madeira
+madly
+madman
+madmen
+madness
+madonna
+madrigals
+mads
+maecenas
+maggot
+maggots
+magic
+magical
+magician
+magistrate
+magistrates
+magnanimity
+magnanimous
+magni
+magnifi
+magnificence
+magnificent
+magnifico
+magnificoes
+magnus
+mahomet
+mahu
+maid
+maiden
+maidenhead
+maidenheads
+maidenhood
+maidenhoods
+maidenliest
+maidenly
+maidens
+maidhood
+maids
+mail
+mailed
+mails
+maim
+maimed
+maims
+main
+maincourse
+maine
+mainly
+mainmast
+mains
+maintain
+maintained
+maintains
+maintenance
+mais
+maison
+majestas
+majestee
+majestic
+majestical
+majestically
+majesties
+majesty
+major
+majority
+mak
+make
+makeless
+maker
+makers
+makes
+makest
+maketh
+making
+makings
+mal
+mala
+maladies
+malady
+malapert
+malcolm
+malcontent
+malcontents
+male
+maledictions
+malefactions
+malefactor
+malefactors
+males
+malevolence
+malevolent
+malhecho
+malice
+malicious
+maliciously
+malign
+malignancy
+malignant
+malignantly
+malkin
+mall
+mallard
+mallet
+mallows
+malmsey
+malt
+maltworms
+malvolio
+mamillius
+mammering
+mammet
+mammets
+mammock
+man
+manacle
+manacles
+manage
+managed
+manager
+managing
+manakin
+manchus
+mandate
+mandragora
+mandrake
+mandrakes
+mane
+manent
+manes
+manet
+manfully
+mangle
+mangled
+mangles
+mangling
+mangy
+manhood
+manhoods
+manifest
+manifested
+manifests
+manifold
+manifoldly
+manka
+mankind
+manlike
+manly
+mann
+manna
+manner
+mannerly
+manners
+manningtree
+mannish
+manor
+manors
+mans
+mansion
+mansionry
+mansions
+manslaughter
+mantle
+mantled
+mantles
+mantua
+mantuan
+manual
+manure
+manured
+manus
+many
+map
+mapp
+maps
+mar
+marble
+marbled
+marcade
+marcellus
+march
+marches
+marcheth
+marching
+marchioness
+marchpane
+marcians
+marcius
+marcus
+mardian
+mare
+mares
+marg
+margarelon
+margaret
+marge
+margent
+margery
+maria
+marian
+mariana
+maries
+marigold
+mariner
+mariners
+maritime
+marjoram
+mark
+marked
+market
+marketable
+marketplace
+markets
+marking
+markman
+marks
+marl
+marle
+marmoset
+marquess
+marquis
+marr
+marriage
+marriages
+married
+marries
+marring
+marrow
+marrowless
+marrows
+marry
+marrying
+mars
+marseilles
+marsh
+marshal
+marshalsea
+marshalship
+mart
+marted
+martem
+martext
+martial
+martin
+martino
+martius
+martlemas
+martlet
+marts
+martyr
+martyrs
+marullus
+marv
+marvel
+marvell
+marvellous
+marvellously
+marvels
+mary
+mas
+masculine
+masham
+mask
+masked
+masker
+maskers
+masking
+masks
+mason
+masonry
+masons
+masque
+masquers
+masques
+masquing
+mass
+massacre
+massacres
+masses
+massy
+mast
+mastcr
+master
+masterdom
+masterest
+masterless
+masterly
+masterpiece
+masters
+mastership
+mastic
+mastiff
+mastiffs
+masts
+match
+matches
+matcheth
+matching
+matchless
+mate
+mated
+mater
+material
+mates
+mathematics
+matin
+matron
+matrons
+matter
+matters
+matthew
+mattock
+mattress
+mature
+maturity
+maud
+maudlin
+maugre
+maul
+maund
+mauri
+mauritania
+mauvais
+maw
+maws
+maxim
+may
+mayday
+mayest
+mayor
+maypole
+mayst
+maz
+maze
+mazed
+mazes
+mazzard
+me
+meacock
+mead
+meadow
+meadows
+meads
+meagre
+meal
+meals
+mealy
+mean
+meanders
+meaner
+meanest
+meaneth
+meaning
+meanings
+meanly
+means
+meant
+meantime
+meanwhile
+measles
+measur
+measurable
+measure
+measured
+measureless
+measures
+measuring
+meat
+meats
+mechanic
+mechanical
+mechanicals
+mechanics
+mechante
+med
+medal
+meddle
+meddler
+meddling
+mede
+medea
+media
+mediation
+mediators
+medice
+medicinal
+medicine
+medicines
+meditate
+meditates
+meditating
+meditation
+meditations
+mediterranean
+mediterraneum
+medlar
+medlars
+meed
+meeds
+meek
+meekly
+meekness
+meet
+meeter
+meetest
+meeting
+meetings
+meetly
+meetness
+meets
+meg
+mehercle
+meilleur
+meiny
+meisen
+melancholies
+melancholy
+melford
+mell
+mellifluous
+mellow
+mellowing
+melodious
+melody
+melt
+melted
+melteth
+melting
+melts
+melun
+member
+members
+memento
+memorable
+memorandums
+memorial
+memorials
+memories
+memoriz
+memorize
+memory
+memphis
+men
+menac
+menace
+menaces
+menaphon
+menas
+mend
+mended
+mender
+mending
+mends
+menecrates
+menelaus
+menenius
+mental
+menteith
+mention
+mentis
+menton
+mephostophilus
+mer
+mercatante
+mercatio
+mercenaries
+mercenary
+mercer
+merchandise
+merchandized
+merchant
+merchants
+mercies
+merciful
+mercifully
+merciless
+mercurial
+mercuries
+mercury
+mercutio
+mercy
+mere
+mered
+merely
+merest
+meridian
+merit
+merited
+meritorious
+merits
+merlin
+mermaid
+mermaids
+merops
+merrier
+merriest
+merrily
+merriman
+merriment
+merriments
+merriness
+merry
+mervailous
+mes
+mesh
+meshes
+mesopotamia
+mess
+message
+messages
+messala
+messaline
+messenger
+messengers
+messes
+messina
+met
+metal
+metals
+metamorphis
+metamorphoses
+metaphor
+metaphysical
+metaphysics
+mete
+metellus
+meteor
+meteors
+meteyard
+metheglin
+metheglins
+methink
+methinks
+method
+methods
+methought
+methoughts
+metre
+metres
+metropolis
+mette
+mettle
+mettled
+meus
+mew
+mewed
+mewling
+mexico
+mi
+mice
+michael
+michaelmas
+micher
+miching
+mickle
+microcosm
+mid
+midas
+middest
+middle
+middleham
+midnight
+midriff
+midst
+midsummer
+midway
+midwife
+midwives
+mienne
+might
+mightful
+mightier
+mightiest
+mightily
+mightiness
+mightst
+mighty
+milan
+milch
+mild
+milder
+mildest
+mildew
+mildews
+mildly
+mildness
+mile
+miles
+milford
+militarist
+military
+milk
+milking
+milkmaid
+milks
+milksops
+milky
+mill
+mille
+miller
+milliner
+million
+millioned
+millions
+mills
+millstones
+milo
+mimic
+minc
+mince
+minces
+mincing
+mind
+minded
+minding
+mindless
+minds
+mine
+mineral
+minerals
+minerva
+mines
+mingle
+mingled
+mingling
+minikin
+minim
+minime
+minimo
+minimus
+mining
+minion
+minions
+minist
+minister
+ministers
+ministration
+minnow
+minnows
+minola
+minority
+minos
+minotaurs
+minstrel
+minstrels
+minstrelsy
+mint
+mints
+minute
+minutely
+minutes
+minx
+mio
+mir
+mirable
+miracle
+miracles
+miraculous
+miranda
+mire
+mirror
+mirrors
+mirth
+mirthful
+miry
+mis
+misadventur
+misadventure
+misanthropos
+misapplied
+misbecame
+misbecom
+misbecome
+misbegot
+misbegotten
+misbeliever
+misbelieving
+misbhav
+miscall
+miscalled
+miscarried
+miscarries
+miscarry
+miscarrying
+mischance
+mischances
+mischief
+mischiefs
+mischievous
+misconceived
+misconst
+misconster
+misconstruction
+misconstrued
+misconstrues
+miscreant
+miscreate
+misdeed
+misdeeds
+misdemean
+misdemeanours
+misdoubt
+misdoubteth
+misdoubts
+misenum
+miser
+miserable
+miserably
+misericorde
+miseries
+misers
+misery
+misfortune
+misfortunes
+misgive
+misgives
+misgiving
+misgoverned
+misgovernment
+misgraffed
+misguide
+mishap
+mishaps
+misheard
+misinterpret
+mislead
+misleader
+misleaders
+misleading
+misled
+mislike
+misord
+misplac
+misplaced
+misplaces
+mispris
+misprised
+misprision
+misprizing
+misproud
+misquote
+misreport
+miss
+missed
+misses
+misshap
+misshapen
+missheathed
+missing
+missingly
+missions
+missive
+missives
+misspoke
+mist
+mista
+mistak
+mistake
+mistaken
+mistakes
+mistaketh
+mistaking
+mistakings
+mistemp
+mistempered
+misterm
+mistful
+misthink
+misthought
+mistletoe
+mistook
+mistreadings
+mistress
+mistresses
+mistresss
+mistriship
+mistrust
+mistrusted
+mistrustful
+mistrusting
+mists
+misty
+misus
+misuse
+misused
+misuses
+mites
+mithridates
+mitigate
+mitigation
+mix
+mixed
+mixture
+mixtures
+mm
+mnd
+moan
+moans
+moat
+moated
+mobled
+mock
+mockable
+mocker
+mockeries
+mockers
+mockery
+mocking
+mocks
+mockvater
+mockwater
+model
+modena
+moderate
+moderately
+moderation
+modern
+modest
+modesties
+modestly
+modesty
+modicums
+modo
+module
+moe
+moi
+moiety
+moist
+moisten
+moisture
+moldwarp
+mole
+molehill
+moles
+molest
+molestation
+mollification
+mollis
+molten
+molto
+mome
+moment
+momentary
+moming
+mon
+monachum
+monarch
+monarchies
+monarchize
+monarcho
+monarchs
+monarchy
+monast
+monastery
+monastic
+monday
+monde
+money
+moneys
+mong
+monger
+mongers
+monging
+mongrel
+mongrels
+mongst
+monk
+monkey
+monkeys
+monks
+monmouth
+monopoly
+mons
+monsieur
+monsieurs
+monster
+monsters
+monstrous
+monstrously
+monstrousness
+monstruosity
+montacute
+montage
+montague
+montagues
+montano
+montant
+montez
+montferrat
+montgomery
+month
+monthly
+months
+montjoy
+monument
+monumental
+monuments
+mood
+moods
+moody
+moon
+moonbeams
+moonish
+moonlight
+moons
+moonshine
+moonshines
+moor
+moorfields
+moors
+moorship
+mop
+mope
+moping
+mopping
+mopsa
+moral
+moraler
+morality
+moralize
+mordake
+more
+moreover
+mores
+morgan
+mori
+morisco
+morn
+morning
+mornings
+morocco
+morris
+morrow
+morrows
+morsel
+morsels
+mort
+mortal
+mortality
+mortally
+mortals
+mortar
+mortgaged
+mortified
+mortifying
+mortimer
+mortimers
+mortis
+mortise
+morton
+mose
+moss
+mossgrown
+most
+mote
+moth
+mother
+mothers
+moths
+motion
+motionless
+motions
+motive
+motives
+motley
+mots
+mought
+mould
+moulded
+mouldeth
+moulds
+mouldy
+moult
+moulten
+mounch
+mounseur
+mounsieur
+mount
+mountain
+mountaineer
+mountaineers
+mountainous
+mountains
+mountant
+mountanto
+mountebank
+mountebanks
+mounted
+mounteth
+mounting
+mounts
+mourn
+mourned
+mourner
+mourners
+mournful
+mournfully
+mourning
+mourningly
+mournings
+mourns
+mous
+mouse
+mousetrap
+mousing
+mouth
+mouthed
+mouths
+mov
+movables
+move
+moveable
+moveables
+moved
+mover
+movers
+moves
+moveth
+moving
+movingly
+movousus
+mow
+mowbray
+mower
+mowing
+mows
+moy
+moys
+moyses
+mrs
+much
+muck
+mud
+mudded
+muddied
+muddy
+muffins
+muffl
+muffle
+muffled
+muffler
+muffling
+mugger
+mugs
+mulberries
+mulberry
+mule
+mules
+muleteers
+mulier
+mulieres
+muliteus
+mull
+mulmutius
+multiplied
+multiply
+multiplying
+multipotent
+multitude
+multitudes
+multitudinous
+mum
+mumble
+mumbling
+mummers
+mummy
+mun
+munch
+muniments
+munition
+murd
+murder
+murdered
+murderer
+murderers
+murdering
+murderous
+murders
+mure
+murk
+murkiest
+murky
+murmur
+murmurers
+murmuring
+murrain
+murray
+murrion
+murther
+murtherer
+murtherers
+murthering
+murtherous
+murthers
+mus
+muscadel
+muscovites
+muscovits
+muscovy
+muse
+muses
+mush
+mushrooms
+music
+musical
+musician
+musicians
+musics
+musing
+musings
+musk
+musket
+muskets
+muskos
+muss
+mussel
+mussels
+must
+mustachio
+mustard
+mustardseed
+muster
+mustering
+musters
+musty
+mutability
+mutable
+mutation
+mutations
+mute
+mutes
+mutest
+mutine
+mutineer
+mutineers
+mutines
+mutinies
+mutinous
+mutiny
+mutius
+mutter
+muttered
+mutton
+muttons
+mutual
+mutualities
+mutually
+muzzl
+muzzle
+muzzled
+mv
+mww
+my
+mynheers
+myrmidon
+myrmidons
+myrtle
+myself
+myst
+mysteries
+mystery
+n
+nag
+nage
+nags
+naiads
+nail
+nails
+nak
+naked
+nakedness
+nal
+nam
+name
+named
+nameless
+namely
+names
+namest
+naming
+nan
+nance
+nap
+nape
+napes
+napkin
+napkins
+naples
+napless
+napping
+naps
+narbon
+narcissus
+narines
+narrow
+narrowly
+naso
+nasty
+nathaniel
+natifs
+nation
+nations
+native
+nativity
+natur
+natural
+naturalize
+naturally
+nature
+natured
+natures
+natus
+naught
+naughtily
+naughty
+navarre
+nave
+navel
+navigation
+navy
+nay
+nayward
+nayword
+nazarite
+ne
+neaf
+neamnoins
+neanmoins
+neapolitan
+neapolitans
+near
+nearer
+nearest
+nearly
+nearness
+neat
+neatly
+neb
+nebour
+nebuchadnezzar
+nec
+necessaries
+necessarily
+necessary
+necessitied
+necessities
+necessity
+neck
+necklace
+necks
+nectar
+ned
+nedar
+need
+needed
+needer
+needful
+needfull
+needing
+needle
+needles
+needless
+needly
+needs
+needy
+neer
+neeze
+nefas
+negation
+negative
+negatives
+neglect
+neglected
+neglecting
+neglectingly
+neglection
+negligence
+negligent
+negotiate
+negotiations
+negro
+neigh
+neighbors
+neighbour
+neighbourhood
+neighbouring
+neighbourly
+neighbours
+neighing
+neighs
+neither
+nell
+nemean
+nemesis
+neoptolemus
+nephew
+nephews
+neptune
+ner
+nereides
+nerissa
+nero
+neroes
+ners
+nerve
+nerves
+nervii
+nervy
+nessus
+nest
+nestor
+nests
+net
+nether
+netherlands
+nets
+nettle
+nettled
+nettles
+neuter
+neutral
+nev
+never
+nevil
+nevils
+new
+newborn
+newer
+newest
+newgate
+newly
+newness
+news
+newsmongers
+newt
+newts
+next
+nibbling
+nicanor
+nice
+nicely
+niceness
+nicer
+nicety
+nicholas
+nick
+nickname
+nicks
+niece
+nieces
+niggard
+niggarding
+niggardly
+nigh
+night
+nightcap
+nightcaps
+nighted
+nightgown
+nightingale
+nightingales
+nightly
+nightmare
+nights
+nightwork
+nihil
+nile
+nill
+nilus
+nimble
+nimbleness
+nimbler
+nimbly
+nine
+nineteen
+ning
+ningly
+ninny
+ninth
+ninus
+niobe
+niobes
+nip
+nipp
+nipping
+nipple
+nips
+nit
+nly
+nnight
+nnights
+no
+noah
+nob
+nobility
+nobis
+noble
+nobleman
+noblemen
+nobleness
+nobler
+nobles
+noblesse
+noblest
+nobly
+nobody
+noces
+nod
+nodded
+nodding
+noddle
+noddles
+noddy
+nods
+noes
+nointed
+nois
+noise
+noiseless
+noisemaker
+noises
+noisome
+nole
+nominate
+nominated
+nomination
+nominativo
+non
+nonage
+nonce
+none
+nonino
+nonny
+nonpareil
+nonsuits
+nony
+nook
+nooks
+noon
+noonday
+noontide
+nor
+norbery
+norfolk
+norman
+normandy
+normans
+north
+northampton
+northamptonshire
+northerly
+northern
+northgate
+northumberland
+northumberlands
+northward
+norway
+norways
+norwegian
+norweyan
+nos
+nose
+nosegays
+noseless
+noses
+noster
+nostra
+nostril
+nostrils
+not
+notable
+notably
+notary
+notch
+note
+notebook
+noted
+notedly
+notes
+notest
+noteworthy
+nothing
+nothings
+notice
+notify
+noting
+notion
+notorious
+notoriously
+notre
+notwithstanding
+nought
+noun
+nouns
+nourish
+nourished
+nourisher
+nourishes
+nourisheth
+nourishing
+nourishment
+nous
+novel
+novelties
+novelty
+noverbs
+novi
+novice
+novices
+novum
+now
+nowhere
+noyance
+ns
+nt
+nubibus
+numa
+numb
+number
+numbered
+numbering
+numberless
+numbers
+numbness
+nun
+nuncio
+nuncle
+nunnery
+nuns
+nuntius
+nuptial
+nurs
+nurse
+nursed
+nurser
+nursery
+nurses
+nurseth
+nursh
+nursing
+nurtur
+nurture
+nut
+nuthook
+nutmeg
+nutmegs
+nutriment
+nuts
+nutshell
+ny
+nym
+nymph
+nymphs
+o
+oak
+oaken
+oaks
+oared
+oars
+oatcake
+oaten
+oath
+oathable
+oaths
+oats
+ob
+obduracy
+obdurate
+obedience
+obedient
+obeisance
+oberon
+obey
+obeyed
+obeying
+obeys
+obidicut
+object
+objected
+objections
+objects
+oblation
+oblations
+obligation
+obligations
+obliged
+oblique
+oblivion
+oblivious
+obloquy
+obscene
+obscenely
+obscur
+obscure
+obscured
+obscurely
+obscures
+obscuring
+obscurity
+obsequies
+obsequious
+obsequiously
+observ
+observance
+observances
+observancy
+observant
+observants
+observation
+observe
+observed
+observer
+observers
+observing
+observingly
+obsque
+obstacle
+obstacles
+obstinacy
+obstinate
+obstinately
+obstruct
+obstruction
+obstructions
+obtain
+obtained
+obtaining
+occasion
+occasions
+occident
+occidental
+occulted
+occupat
+occupation
+occupations
+occupied
+occupies
+occupy
+occurrence
+occurrences
+occurrents
+ocean
+oceans
+octavia
+octavius
+ocular
+od
+odd
+oddest
+oddly
+odds
+ode
+odes
+odious
+odoriferous
+odorous
+odour
+odours
+ods
+oeillades
+oes
+oeuvres
+of
+ofephesus
+off
+offal
+offence
+offenceful
+offences
+offend
+offended
+offendendo
+offender
+offenders
+offendeth
+offending
+offendress
+offends
+offense
+offenseless
+offenses
+offensive
+offer
+offered
+offering
+offerings
+offers
+offert
+offic
+office
+officed
+officer
+officers
+offices
+official
+officious
+offspring
+oft
+often
+oftener
+oftentimes
+oh
+oil
+oils
+oily
+old
+oldcastle
+olden
+older
+oldest
+oldness
+olive
+oliver
+olivers
+olives
+olivia
+olympian
+olympus
+oman
+omans
+omen
+ominous
+omission
+omit
+omittance
+omitted
+omitting
+omne
+omnes
+omnipotent
+on
+once
+one
+ones
+oneyers
+ongles
+onion
+onions
+only
+onset
+onward
+onwards
+oo
+ooze
+oozes
+oozy
+op
+opal
+ope
+open
+opener
+opening
+openly
+openness
+opens
+operant
+operate
+operation
+operations
+operative
+opes
+oph
+ophelia
+opinion
+opinions
+opportune
+opportunities
+opportunity
+oppos
+oppose
+opposed
+opposeless
+opposer
+opposers
+opposes
+opposing
+opposite
+opposites
+opposition
+oppositions
+oppress
+oppressed
+oppresses
+oppresseth
+oppressing
+oppression
+oppressor
+opprest
+opprobriously
+oppugnancy
+opulency
+opulent
+or
+oracle
+oracles
+orange
+oration
+orator
+orators
+oratory
+orb
+orbed
+orbs
+orchard
+orchards
+ord
+ordain
+ordained
+ordaining
+order
+ordered
+ordering
+orderless
+orderly
+orders
+ordinance
+ordinant
+ordinaries
+ordinary
+ordnance
+ords
+ordure
+ore
+organ
+organs
+orgillous
+orient
+orifex
+origin
+original
+orisons
+ork
+orlando
+orld
+orleans
+ornament
+ornaments
+orodes
+orphan
+orphans
+orpheus
+orsino
+ort
+orthography
+orts
+oscorbidulchos
+osier
+osiers
+osprey
+osr
+osric
+ossa
+ost
+ostent
+ostentare
+ostentation
+ostents
+ostler
+ostlers
+ostrich
+osw
+oswald
+othello
+other
+othergates
+others
+otherwhere
+otherwhiles
+otherwise
+otter
+ottoman
+ottomites
+oublie
+ouches
+ought
+oui
+ounce
+ounces
+ouphes
+our
+ours
+ourself
+ourselves
+ousel
+out
+outbids
+outbrave
+outbraves
+outbreak
+outcast
+outcries
+outcry
+outdar
+outdare
+outdares
+outdone
+outfac
+outface
+outfaced
+outfacing
+outfly
+outfrown
+outgo
+outgoes
+outgrown
+outjest
+outlaw
+outlawry
+outlaws
+outliv
+outlive
+outlives
+outliving
+outlook
+outlustres
+outpriz
+outrage
+outrageous
+outrages
+outran
+outright
+outroar
+outrun
+outrunning
+outruns
+outscold
+outscorn
+outsell
+outsells
+outside
+outsides
+outspeaks
+outsport
+outstare
+outstay
+outstood
+outstretch
+outstretched
+outstrike
+outstrip
+outstripped
+outswear
+outvenoms
+outward
+outwardly
+outwards
+outwear
+outweighs
+outwent
+outworn
+outworths
+oven
+over
+overawe
+overbear
+overblown
+overboard
+overbold
+overborne
+overbulk
+overbuys
+overcame
+overcast
+overcharg
+overcharged
+overcome
+overcomes
+overdone
+overearnest
+overfar
+overflow
+overflown
+overglance
+overgo
+overgone
+overgorg
+overgrown
+overhead
+overhear
+overheard
+overhold
+overjoyed
+overkind
+overland
+overleather
+overlive
+overlook
+overlooking
+overlooks
+overmaster
+overmounting
+overmuch
+overpass
+overpeer
+overpeering
+overplus
+overrul
+overrun
+overscutch
+overset
+overshades
+overshine
+overshines
+overshot
+oversights
+overspread
+overstain
+overswear
+overt
+overta
+overtake
+overtaketh
+overthrow
+overthrown
+overthrows
+overtook
+overtopp
+overture
+overturn
+overwatch
+overween
+overweening
+overweigh
+overwhelm
+overwhelming
+overworn
+ovid
+ovidius
+ow
+owe
+owed
+owedst
+owen
+owes
+owest
+oweth
+owing
+owl
+owls
+own
+owner
+owners
+owning
+owns
+owy
+ox
+oxen
+oxford
+oxfordshire
+oxlips
+oyes
+oyster
+p
+pabble
+pabylon
+pac
+pace
+paced
+paces
+pacified
+pacify
+pacing
+pack
+packet
+packets
+packhorses
+packing
+packings
+packs
+packthread
+pacorus
+paction
+pad
+paddle
+paddling
+paddock
+padua
+pagan
+pagans
+page
+pageant
+pageants
+pages
+pah
+paid
+pail
+pailfuls
+pails
+pain
+pained
+painful
+painfully
+pains
+paint
+painted
+painter
+painting
+paintings
+paints
+pair
+paired
+pairs
+pajock
+pal
+palabras
+palace
+palaces
+palamedes
+palate
+palates
+palatine
+palating
+pale
+paled
+paleness
+paler
+pales
+palestine
+palfrey
+palfreys
+palisadoes
+pall
+pallabris
+pallas
+pallets
+palm
+palmer
+palmers
+palms
+palmy
+palpable
+palsied
+palsies
+palsy
+palt
+palter
+paltry
+paly
+pamp
+pamper
+pamphlets
+pan
+pancackes
+pancake
+pancakes
+pandar
+pandars
+pandarus
+pander
+panderly
+panders
+pandulph
+panel
+pang
+panging
+pangs
+pannier
+pannonians
+pansa
+pansies
+pant
+pantaloon
+panted
+pantheon
+panther
+panthino
+panting
+pantingly
+pantler
+pantry
+pants
+pap
+papal
+paper
+papers
+paphlagonia
+paphos
+papist
+paps
+par
+parable
+paracelsus
+paradise
+paradox
+paradoxes
+paragon
+paragons
+parallel
+parallels
+paramour
+paramours
+parapets
+paraquito
+parasite
+parasites
+parca
+parcel
+parcell
+parcels
+parch
+parched
+parching
+parchment
+pard
+pardon
+pardona
+pardoned
+pardoner
+pardoning
+pardonne
+pardonner
+pardonnez
+pardons
+pare
+pared
+parel
+parent
+parentage
+parents
+parfect
+paring
+parings
+paris
+parish
+parishioners
+parisians
+paritors
+park
+parks
+parle
+parler
+parles
+parley
+parlez
+parliament
+parlors
+parlour
+parlous
+parmacity
+parolles
+parricide
+parricides
+parrot
+parrots
+parsley
+parson
+part
+partake
+partaken
+partaker
+partakers
+parted
+parthia
+parthian
+parthians
+parti
+partial
+partialize
+partially
+participate
+participation
+particle
+particular
+particularities
+particularize
+particularly
+particulars
+parties
+parting
+partisan
+partisans
+partition
+partizan
+partlet
+partly
+partner
+partners
+partridge
+parts
+party
+pas
+pash
+pashed
+pashful
+pass
+passable
+passado
+passage
+passages
+passant
+passed
+passenger
+passengers
+passes
+passeth
+passing
+passio
+passion
+passionate
+passioning
+passions
+passive
+passport
+passy
+past
+paste
+pasterns
+pasties
+pastime
+pastimes
+pastoral
+pastorals
+pastors
+pastry
+pasture
+pastures
+pasty
+pat
+patay
+patch
+patchery
+patches
+pate
+pated
+patent
+patents
+paternal
+pates
+path
+pathetical
+paths
+pathway
+pathways
+patience
+patient
+patiently
+patients
+patines
+patrician
+patricians
+patrick
+patrimony
+patroclus
+patron
+patronage
+patroness
+patrons
+patrum
+patter
+pattern
+patterns
+pattle
+pauca
+paucas
+paul
+paulina
+paunch
+paunches
+pause
+pauser
+pauses
+pausingly
+pauvres
+pav
+paved
+pavement
+pavilion
+pavilions
+pavin
+paw
+pawn
+pawns
+paws
+pax
+pay
+payest
+paying
+payment
+payments
+pays
+paysan
+paysans
+pe
+peace
+peaceable
+peaceably
+peaceful
+peacemakers
+peaces
+peach
+peaches
+peacock
+peacocks
+peak
+peaking
+peal
+peals
+pear
+peard
+pearl
+pearls
+pears
+peas
+peasant
+peasantry
+peasants
+peascod
+pease
+peaseblossom
+peat
+peaten
+peating
+pebble
+pebbled
+pebbles
+peck
+pecks
+peculiar
+pecus
+pedant
+pedantical
+pedascule
+pede
+pedestal
+pedigree
+pedlar
+pedlars
+pedro
+peds
+peel
+peep
+peeped
+peeping
+peeps
+peer
+peereth
+peering
+peerless
+peers
+peesel
+peevish
+peevishly
+peflur
+peg
+pegasus
+pegs
+peise
+peised
+peize
+pelf
+pelican
+pelion
+pell
+pella
+pelleted
+peloponnesus
+pelt
+pelting
+pembroke
+pen
+penalties
+penalty
+penance
+pence
+pencil
+pencill
+pencils
+pendant
+pendent
+pendragon
+pendulous
+penelope
+penetrable
+penetrate
+penetrative
+penitence
+penitent
+penitential
+penitently
+penitents
+penker
+penknife
+penn
+penned
+penning
+pennons
+penny
+pennyworth
+pennyworths
+pens
+pense
+pension
+pensioners
+pensive
+pensived
+pensively
+pent
+pentecost
+penthesilea
+penthouse
+penurious
+penury
+peopl
+people
+peopled
+peoples
+pepin
+pepper
+peppercorn
+peppered
+per
+peradventure
+peradventures
+perceiv
+perceive
+perceived
+perceives
+perceiveth
+perch
+perchance
+percies
+percussion
+percy
+perdie
+perdita
+perdition
+perdonato
+perdu
+perdurable
+perdurably
+perdy
+pere
+peregrinate
+peremptorily
+peremptory
+perfect
+perfected
+perfecter
+perfectest
+perfection
+perfections
+perfectly
+perfectness
+perfidious
+perfidiously
+perforce
+perform
+performance
+performances
+performed
+performer
+performers
+performing
+performs
+perfum
+perfume
+perfumed
+perfumer
+perfumes
+perge
+perhaps
+periapts
+perigort
+perigouna
+peril
+perilous
+perils
+period
+periods
+perish
+perished
+perishest
+perisheth
+perishing
+periwig
+perjur
+perjure
+perjured
+perjuries
+perjury
+perk
+perkes
+permafoy
+permanent
+permission
+permissive
+permit
+permitted
+pernicious
+perniciously
+peroration
+perpend
+perpendicular
+perpendicularly
+perpetual
+perpetually
+perpetuity
+perplex
+perplexed
+perplexity
+pers
+persecuted
+persecutions
+persecutor
+perseus
+persever
+perseverance
+persevers
+persia
+persian
+persist
+persisted
+persistency
+persistive
+persists
+person
+personae
+personage
+personages
+personal
+personally
+personate
+personated
+personates
+personating
+persons
+perspective
+perspectively
+perspectives
+perspicuous
+persuade
+persuaded
+persuades
+persuading
+persuasion
+persuasions
+pert
+pertain
+pertaining
+pertains
+pertaunt
+pertinent
+pertly
+perturb
+perturbation
+perturbations
+perturbed
+perus
+perusal
+peruse
+perused
+perusing
+perverse
+perversely
+perverseness
+pervert
+perverted
+peseech
+pest
+pester
+pestiferous
+pestilence
+pestilent
+pet
+petar
+peter
+petit
+petition
+petitionary
+petitioner
+petitioners
+petitions
+peto
+petrarch
+petruchio
+petter
+petticoat
+petticoats
+pettiness
+pettish
+pettitoes
+petty
+peu
+pew
+pewter
+pewterer
+phaethon
+phaeton
+phantasime
+phantasimes
+phantasma
+pharamond
+pharaoh
+pharsalia
+pheasant
+pheazar
+phebe
+phebes
+pheebus
+pheeze
+phibbus
+philadelphos
+philario
+philarmonus
+philemon
+philip
+philippan
+philippe
+philippi
+phillida
+philo
+philomel
+philomela
+philosopher
+philosophers
+philosophical
+philosophy
+philostrate
+philotus
+phlegmatic
+phoebe
+phoebus
+phoenicia
+phoenicians
+phoenix
+phorbus
+photinus
+phrase
+phraseless
+phrases
+phrygia
+phrygian
+phrynia
+physic
+physical
+physician
+physicians
+physics
+pia
+pibble
+pible
+picardy
+pick
+pickaxe
+pickaxes
+pickbone
+picked
+pickers
+picking
+pickle
+picklock
+pickpurse
+picks
+pickt
+pickthanks
+pictur
+picture
+pictured
+pictures
+pid
+pie
+piec
+piece
+pieces
+piecing
+pied
+piedness
+pier
+pierc
+pierce
+pierced
+pierces
+pierceth
+piercing
+piercy
+piers
+pies
+piety
+pig
+pigeon
+pigeons
+pight
+pigmy
+pigrogromitus
+pike
+pikes
+pil
+pilate
+pilates
+pilchers
+pile
+piles
+pilf
+pilfering
+pilgrim
+pilgrimage
+pilgrims
+pill
+pillage
+pillagers
+pillar
+pillars
+pillicock
+pillory
+pillow
+pillows
+pills
+pilot
+pilots
+pimpernell
+pin
+pinch
+pinched
+pinches
+pinching
+pindarus
+pine
+pined
+pines
+pinfold
+pining
+pinion
+pink
+pinn
+pinnace
+pins
+pinse
+pint
+pintpot
+pioned
+pioneers
+pioner
+pioners
+pious
+pip
+pipe
+piper
+pipers
+pipes
+piping
+pippin
+pippins
+pirate
+pirates
+pisa
+pisanio
+pish
+pismires
+piss
+pissing
+pistol
+pistols
+pit
+pitch
+pitched
+pitcher
+pitchers
+pitchy
+piteous
+piteously
+pitfall
+pith
+pithless
+pithy
+pitie
+pitied
+pities
+pitiful
+pitifully
+pitiless
+pits
+pittance
+pittie
+pittikins
+pity
+pitying
+pius
+plac
+place
+placed
+placentio
+places
+placeth
+placid
+placing
+plack
+placket
+plackets
+plagu
+plague
+plagued
+plagues
+plaguing
+plaguy
+plain
+plainer
+plainest
+plaining
+plainings
+plainly
+plainness
+plains
+plainsong
+plaintful
+plaintiff
+plaintiffs
+plaints
+planched
+planet
+planetary
+planets
+planks
+plant
+plantage
+plantagenet
+plantagenets
+plantain
+plantation
+planted
+planteth
+plants
+plash
+plashy
+plast
+plaster
+plasterer
+plat
+plate
+plated
+plates
+platform
+platforms
+plats
+platted
+plausible
+plausive
+plautus
+play
+played
+player
+players
+playeth
+playfellow
+playfellows
+playhouse
+playing
+plays
+plea
+pleach
+pleached
+plead
+pleaded
+pleader
+pleaders
+pleading
+pleads
+pleas
+pleasance
+pleasant
+pleasantly
+please
+pleased
+pleaser
+pleasers
+pleases
+pleasest
+pleaseth
+pleasing
+pleasure
+pleasures
+plebeians
+plebeii
+plebs
+pledge
+pledges
+pleines
+plenitude
+plenteous
+plenteously
+plenties
+plentiful
+plentifully
+plenty
+pless
+plessed
+plessing
+pliant
+plied
+plies
+plight
+plighted
+plighter
+plod
+plodded
+plodders
+plodding
+plods
+plood
+ploody
+plot
+plots
+plotted
+plotter
+plough
+ploughed
+ploughman
+ploughmen
+plow
+plows
+pluck
+plucked
+plucker
+plucking
+plucks
+plue
+plum
+plume
+plumed
+plumes
+plummet
+plump
+plumpy
+plums
+plung
+plunge
+plunged
+plural
+plurisy
+plus
+pluto
+plutus
+ply
+po
+pocket
+pocketing
+pockets
+pocky
+pody
+poem
+poesy
+poet
+poetical
+poetry
+poets
+poictiers
+poinards
+poins
+point
+pointblank
+pointed
+pointing
+points
+pois
+poise
+poising
+poison
+poisoned
+poisoner
+poisoning
+poisonous
+poisons
+poke
+poking
+pol
+polack
+polacks
+poland
+pold
+pole
+poleaxe
+polecat
+polecats
+polemon
+poles
+poli
+policies
+policy
+polish
+polished
+politic
+politician
+politicians
+politicly
+polixenes
+poll
+polluted
+pollution
+polonius
+poltroons
+polusion
+polydamus
+polydore
+polyxena
+pomander
+pomegranate
+pomewater
+pomfret
+pomgarnet
+pommel
+pomp
+pompeius
+pompey
+pompion
+pompous
+pomps
+pond
+ponder
+ponderous
+ponds
+poniard
+poniards
+pont
+pontic
+pontifical
+ponton
+pooh
+pool
+poole
+poop
+poor
+poorer
+poorest
+poorly
+pop
+pope
+popedom
+popilius
+popingay
+popish
+popp
+poppy
+pops
+popular
+popularity
+populous
+porch
+porches
+pore
+poring
+pork
+porn
+porpentine
+porridge
+porringer
+port
+portable
+portage
+portal
+portance
+portcullis
+portend
+portends
+portent
+portentous
+portents
+porter
+porters
+portia
+portion
+portly
+portotartarossa
+portrait
+portraiture
+ports
+portugal
+pose
+posied
+posies
+position
+positive
+positively
+posse
+possess
+possessed
+possesses
+possesseth
+possessing
+possession
+possessions
+possessor
+posset
+possets
+possibilities
+possibility
+possible
+possibly
+possitable
+post
+poste
+posted
+posterior
+posteriors
+posterity
+postern
+posterns
+posters
+posthorse
+posthorses
+posthumus
+posting
+postmaster
+posts
+postscript
+posture
+postures
+posy
+pot
+potable
+potations
+potato
+potatoes
+potch
+potency
+potent
+potentates
+potential
+potently
+potents
+pothecary
+pother
+potion
+potions
+potpan
+pots
+potter
+potting
+pottle
+pouch
+poulter
+poultice
+poultney
+pouncet
+pound
+pounds
+pour
+pourest
+pouring
+pourquoi
+pours
+pout
+poverty
+pow
+powd
+powder
+power
+powerful
+powerfully
+powerless
+powers
+pox
+poys
+poysam
+prabbles
+practic
+practice
+practiced
+practicer
+practices
+practicing
+practis
+practisants
+practise
+practiser
+practisers
+practises
+practising
+praeclarissimus
+praemunire
+praetor
+praetors
+pragging
+prague
+prain
+prains
+prais
+praise
+praised
+praises
+praisest
+praiseworthy
+praising
+prancing
+prank
+pranks
+prat
+prate
+prated
+prater
+prating
+prattle
+prattler
+prattling
+prave
+prawls
+prawns
+pray
+prayer
+prayers
+praying
+prays
+pre
+preach
+preached
+preachers
+preaches
+preaching
+preachment
+pread
+preambulate
+precedence
+precedent
+preceding
+precept
+preceptial
+precepts
+precinct
+precious
+preciously
+precipice
+precipitating
+precipitation
+precise
+precisely
+preciseness
+precisian
+precor
+precurse
+precursors
+predeceased
+predecessor
+predecessors
+predestinate
+predicament
+predict
+prediction
+predictions
+predominance
+predominant
+predominate
+preeches
+preeminence
+preface
+prefer
+preferment
+preferments
+preferr
+preferreth
+preferring
+prefers
+prefiguring
+prefix
+prefixed
+preformed
+pregnancy
+pregnant
+pregnantly
+prejudicates
+prejudice
+prejudicial
+prelate
+premeditated
+premeditation
+premised
+premises
+prenez
+prenominate
+prentice
+prentices
+preordinance
+prepar
+preparation
+preparations
+prepare
+prepared
+preparedly
+prepares
+preparing
+prepost
+preposterous
+preposterously
+prerogatifes
+prerogative
+prerogatived
+presage
+presagers
+presages
+presageth
+presaging
+prescience
+prescribe
+prescript
+prescription
+prescriptions
+prescripts
+presence
+presences
+present
+presentation
+presented
+presenter
+presenters
+presenteth
+presenting
+presently
+presentment
+presents
+preserv
+preservation
+preservative
+preserve
+preserved
+preserver
+preservers
+preserving
+president
+press
+pressed
+presser
+presses
+pressing
+pressure
+pressures
+prest
+prester
+presume
+presumes
+presuming
+presumption
+presumptuous
+presuppos
+pret
+pretence
+pretences
+pretend
+pretended
+pretending
+pretense
+pretext
+pretia
+prettier
+prettiest
+prettily
+prettiness
+pretty
+prevail
+prevailed
+prevaileth
+prevailing
+prevailment
+prevails
+prevent
+prevented
+prevention
+preventions
+prevents
+prey
+preyful
+preys
+priam
+priami
+priamus
+pribbles
+price
+prick
+pricked
+pricket
+pricking
+pricks
+pricksong
+pride
+prides
+pridge
+prie
+pried
+prief
+pries
+priest
+priesthood
+priests
+prig
+primal
+prime
+primer
+primero
+primest
+primitive
+primo
+primogenity
+primrose
+primroses
+primy
+prince
+princely
+princes
+princess
+principal
+principalities
+principality
+principle
+principles
+princox
+prings
+print
+printed
+printing
+printless
+prints
+prioress
+priories
+priority
+priory
+priscian
+prison
+prisoner
+prisoners
+prisonment
+prisonnier
+prisons
+pristine
+prithe
+prithee
+privacy
+private
+privately
+privates
+privilage
+privileg
+privilege
+privileged
+privileges
+privilegio
+privily
+privity
+privy
+priz
+prize
+prized
+prizer
+prizes
+prizest
+prizing
+pro
+probable
+probal
+probation
+proceed
+proceeded
+proceeders
+proceeding
+proceedings
+proceeds
+process
+procession
+proclaim
+proclaimed
+proclaimeth
+proclaims
+proclamation
+proclamations
+proconsul
+procrastinate
+procreant
+procreants
+procreation
+procrus
+proculeius
+procur
+procurator
+procure
+procured
+procures
+procuring
+prodigal
+prodigality
+prodigally
+prodigals
+prodigies
+prodigious
+prodigiously
+prodigy
+proditor
+produc
+produce
+produced
+produces
+producing
+proface
+profan
+profanation
+profane
+profaned
+profanely
+profaneness
+profaners
+profaning
+profess
+professed
+professes
+profession
+professions
+professors
+proffer
+proffered
+profferer
+proffers
+proficient
+profit
+profitable
+profitably
+profited
+profiting
+profitless
+profits
+profound
+profoundest
+profoundly
+progenitors
+progeny
+progne
+prognosticate
+prognostication
+progress
+progression
+prohibit
+prohibition
+project
+projection
+projects
+prolixious
+prolixity
+prologue
+prologues
+prolong
+prolongs
+promethean
+prometheus
+promis
+promise
+promised
+promises
+promiseth
+promising
+promontory
+promotion
+promotions
+prompt
+prompted
+promptement
+prompter
+prompting
+prompts
+prompture
+promulgate
+prone
+prononcer
+prononcez
+pronoun
+pronounc
+pronounce
+pronounced
+pronouncing
+pronouns
+proof
+proofs
+prop
+propagate
+propagation
+propend
+propension
+proper
+properer
+properly
+propertied
+properties
+property
+prophecies
+prophecy
+prophesied
+prophesier
+prophesy
+prophesying
+prophet
+prophetess
+prophetic
+prophetically
+prophets
+propinquity
+propontic
+proportion
+proportionable
+proportions
+propos
+propose
+proposed
+proposer
+proposes
+proposing
+proposition
+propositions
+propounded
+propp
+propre
+propriety
+props
+propugnation
+prorogue
+prorogued
+proscription
+proscriptions
+prose
+prosecute
+prosecution
+proselytes
+proserpina
+prosp
+prospect
+prosper
+prosperity
+prospero
+prosperous
+prosperously
+prospers
+prostitute
+prostrate
+protect
+protected
+protection
+protector
+protectors
+protectorship
+protectress
+protects
+protest
+protestation
+protestations
+protested
+protester
+protesting
+protests
+proteus
+protheus
+protract
+protractive
+proud
+prouder
+proudest
+proudlier
+proudly
+prouds
+prov
+provand
+prove
+proved
+provender
+proverb
+proverbs
+proves
+proveth
+provide
+provided
+providence
+provident
+providently
+provider
+provides
+province
+provinces
+provincial
+proving
+provision
+proviso
+provocation
+provok
+provoke
+provoked
+provoker
+provokes
+provoketh
+provoking
+provost
+prowess
+prudence
+prudent
+prun
+prune
+prunes
+pruning
+pry
+prying
+psalm
+psalmist
+psalms
+psalteries
+ptolemies
+ptolemy
+public
+publican
+publication
+publicly
+publicola
+publish
+published
+publisher
+publishing
+publius
+pucelle
+puck
+pudder
+pudding
+puddings
+puddle
+puddled
+pudency
+pueritia
+puff
+puffing
+puffs
+pugging
+puis
+puissance
+puissant
+puke
+puking
+pulcher
+puling
+pull
+puller
+pullet
+pulling
+pulls
+pulpit
+pulpiter
+pulpits
+pulse
+pulsidge
+pump
+pumpion
+pumps
+pun
+punched
+punish
+punished
+punishes
+punishment
+punishments
+punk
+punto
+puny
+pupil
+pupils
+puppet
+puppets
+puppies
+puppy
+pur
+purblind
+purchas
+purchase
+purchased
+purchases
+purchaseth
+purchasing
+pure
+purely
+purer
+purest
+purg
+purgation
+purgative
+purgatory
+purge
+purged
+purgers
+purging
+purifies
+purifying
+puritan
+purity
+purlieus
+purple
+purpled
+purples
+purport
+purpos
+purpose
+purposed
+purposely
+purposes
+purposeth
+purposing
+purr
+purs
+purse
+pursents
+purses
+pursu
+pursue
+pursued
+pursuers
+pursues
+pursuest
+pursueth
+pursuing
+pursuit
+pursuivant
+pursuivants
+pursy
+purus
+purveyor
+push
+pushes
+pusillanimity
+put
+putrefy
+putrified
+puts
+putter
+putting
+puttock
+puzzel
+puzzle
+puzzled
+puzzles
+py
+pygmalion
+pygmies
+pygmy
+pyramid
+pyramides
+pyramids
+pyramis
+pyramises
+pyramus
+pyrenean
+pyrrhus
+pythagoras
+qu
+quadrangle
+quae
+quaff
+quaffing
+quagmire
+quail
+quailing
+quails
+quaint
+quaintly
+quak
+quake
+quakes
+qualification
+qualified
+qualifies
+qualify
+qualifying
+qualite
+qualities
+quality
+qualm
+qualmish
+quam
+quand
+quando
+quantities
+quantity
+quare
+quarrel
+quarrell
+quarreller
+quarrelling
+quarrelous
+quarrels
+quarrelsome
+quarries
+quarry
+quart
+quarter
+quartered
+quartering
+quarters
+quarts
+quasi
+quat
+quatch
+quay
+que
+quean
+queas
+queasiness
+queasy
+queen
+queens
+quell
+queller
+quench
+quenched
+quenching
+quenchless
+quern
+quest
+questant
+question
+questionable
+questioned
+questioning
+questionless
+questions
+questrists
+quests
+queubus
+qui
+quick
+quicken
+quickens
+quicker
+quicklier
+quickly
+quickness
+quicksand
+quicksands
+quicksilverr
+quid
+quiddities
+quiddits
+quier
+quiet
+quieter
+quietly
+quietness
+quietus
+quill
+quillets
+quills
+quilt
+quinapalus
+quince
+quinces
+quintain
+quintessence
+quintus
+quip
+quips
+quire
+quiring
+quirk
+quirks
+quis
+quit
+quite
+quits
+quittance
+quitted
+quitting
+quiver
+quivering
+quivers
+quo
+quod
+quoifs
+quoint
+quoit
+quoits
+quondam
+quoniam
+quote
+quoted
+quotes
+quoth
+quotidian
+r
+rabbit
+rabble
+rabblement
+race
+rack
+rackers
+racket
+rackets
+racking
+racks
+radiance
+radiant
+radish
+rafe
+raft
+rag
+rage
+rages
+rageth
+ragg
+ragged
+raggedness
+raging
+ragozine
+rags
+rah
+rail
+railed
+railer
+railest
+raileth
+railing
+rails
+raiment
+rain
+rainbow
+raineth
+raining
+rainold
+rains
+rainy
+rais
+raise
+raised
+raises
+raising
+raisins
+rak
+rake
+rakers
+rakes
+ral
+rald
+ralph
+ram
+rambures
+ramm
+rampallian
+rampant
+ramping
+rampir
+ramps
+rams
+ramsey
+ramston
+ran
+rance
+rancorous
+rancors
+rancour
+random
+rang
+range
+ranged
+rangers
+ranges
+ranging
+rank
+ranker
+rankest
+ranking
+rankle
+rankly
+rankness
+ranks
+ransack
+ransacking
+ransom
+ransomed
+ransoming
+ransomless
+ransoms
+rant
+ranting
+rap
+rape
+rapes
+rapier
+rapiers
+rapine
+raps
+rapt
+rapture
+raptures
+rar
+rare
+rarely
+rareness
+rarer
+rarest
+rarities
+rarity
+rascal
+rascalliest
+rascally
+rascals
+rased
+rash
+rasher
+rashly
+rashness
+rat
+ratcatcher
+ratcliff
+rate
+rated
+rately
+rates
+rather
+ratherest
+ratified
+ratifiers
+ratify
+rating
+rational
+ratolorum
+rats
+ratsbane
+rattle
+rattles
+rattling
+rature
+raught
+rav
+rave
+ravel
+raven
+ravening
+ravenous
+ravens
+ravenspurgh
+raves
+ravin
+raving
+ravish
+ravished
+ravisher
+ravishing
+ravishments
+raw
+rawer
+rawly
+rawness
+ray
+rayed
+rays
+raz
+raze
+razed
+razes
+razeth
+razing
+razor
+razorable
+razors
+razure
+re
+reach
+reaches
+reacheth
+reaching
+read
+reader
+readiest
+readily
+readiness
+reading
+readins
+reads
+ready
+real
+really
+realm
+realms
+reap
+reapers
+reaping
+reaps
+rear
+rears
+rearward
+reason
+reasonable
+reasonably
+reasoned
+reasoning
+reasonless
+reasons
+reave
+rebate
+rebato
+rebeck
+rebel
+rebell
+rebelling
+rebellion
+rebellious
+rebels
+rebound
+rebuk
+rebuke
+rebukeable
+rebuked
+rebukes
+rebus
+recall
+recant
+recantation
+recanter
+recanting
+receipt
+receipts
+receiv
+receive
+received
+receiver
+receives
+receivest
+receiveth
+receiving
+receptacle
+rechate
+reciprocal
+reciprocally
+recite
+recited
+reciterai
+reck
+recking
+reckless
+reckon
+reckoned
+reckoning
+reckonings
+recks
+reclaim
+reclaims
+reclusive
+recognizance
+recognizances
+recoil
+recoiling
+recollected
+recomforted
+recomforture
+recommend
+recommended
+recommends
+recompens
+recompense
+reconcil
+reconcile
+reconciled
+reconcilement
+reconciler
+reconciles
+reconciliation
+record
+recordation
+recorded
+recorder
+recorders
+records
+recount
+recounted
+recounting
+recountments
+recounts
+recourse
+recov
+recover
+recoverable
+recovered
+recoveries
+recovers
+recovery
+recreant
+recreants
+recreate
+recreation
+rectify
+rector
+rectorship
+recure
+recured
+red
+redbreast
+redder
+reddest
+rede
+redeem
+redeemed
+redeemer
+redeeming
+redeems
+redeliver
+redemption
+redime
+redness
+redoubled
+redoubted
+redound
+redress
+redressed
+redresses
+reduce
+reechy
+reed
+reeds
+reek
+reeking
+reeks
+reeky
+reel
+reeleth
+reeling
+reels
+refell
+refer
+reference
+referr
+referred
+refigured
+refin
+refined
+reflect
+reflecting
+reflection
+reflex
+reform
+reformation
+reformed
+refractory
+refrain
+refresh
+refreshing
+reft
+refts
+refuge
+refus
+refusal
+refuse
+refused
+refusest
+refusing
+reg
+regal
+regalia
+regan
+regard
+regardance
+regarded
+regardfully
+regarding
+regards
+regenerate
+regent
+regentship
+regia
+regiment
+regiments
+regina
+region
+regions
+regist
+register
+registers
+regreet
+regreets
+regress
+reguerdon
+regular
+rehears
+rehearsal
+rehearse
+reign
+reigned
+reignier
+reigning
+reigns
+rein
+reinforc
+reinforce
+reinforcement
+reins
+reiterate
+reject
+rejected
+rejoic
+rejoice
+rejoices
+rejoiceth
+rejoicing
+rejoicingly
+rejoindure
+rejourn
+rel
+relapse
+relate
+relates
+relation
+relations
+relative
+releas
+release
+released
+releasing
+relent
+relenting
+relents
+reliances
+relics
+relief
+reliev
+relieve
+relieved
+relieves
+relieving
+religion
+religions
+religious
+religiously
+relinquish
+reliques
+reliquit
+relish
+relume
+rely
+relying
+remain
+remainder
+remainders
+remained
+remaineth
+remaining
+remains
+remark
+remarkable
+remediate
+remedied
+remedies
+remedy
+rememb
+remember
+remembered
+remembers
+remembrance
+remembrancer
+remembrances
+remercimens
+remiss
+remission
+remissness
+remit
+remnant
+remnants
+remonstrance
+remorse
+remorseful
+remorseless
+remote
+remotion
+remov
+remove
+removed
+removedness
+remover
+removes
+removing
+remunerate
+remuneration
+rence
+rend
+render
+rendered
+renders
+rendezvous
+renegado
+renege
+reneges
+renew
+renewed
+renewest
+renounce
+renouncement
+renouncing
+renowmed
+renown
+renowned
+rent
+rents
+repaid
+repair
+repaired
+repairing
+repairs
+repass
+repast
+repasture
+repay
+repaying
+repays
+repeal
+repealing
+repeals
+repeat
+repeated
+repeating
+repeats
+repel
+repent
+repentance
+repentant
+repented
+repenting
+repents
+repetition
+repetitions
+repin
+repine
+repining
+replant
+replenish
+replenished
+replete
+replication
+replied
+replies
+repliest
+reply
+replying
+report
+reported
+reporter
+reportest
+reporting
+reportingly
+reports
+reposal
+repose
+reposeth
+reposing
+repossess
+reprehend
+reprehended
+reprehending
+represent
+representing
+reprieve
+reprieves
+reprisal
+reproach
+reproaches
+reproachful
+reproachfully
+reprobate
+reprobation
+reproof
+reprov
+reprove
+reproveable
+reproves
+reproving
+repugn
+repugnancy
+repugnant
+repulse
+repulsed
+repurchas
+repured
+reputation
+repute
+reputed
+reputeless
+reputes
+reputing
+request
+requested
+requesting
+requests
+requiem
+requir
+require
+required
+requires
+requireth
+requiring
+requisite
+requisites
+requit
+requital
+requite
+requited
+requites
+rer
+rere
+rers
+rescu
+rescue
+rescued
+rescues
+rescuing
+resemblance
+resemble
+resembled
+resembles
+resembleth
+resembling
+reserv
+reservation
+reserve
+reserved
+reserves
+reside
+residence
+resident
+resides
+residing
+residue
+resign
+resignation
+resist
+resistance
+resisted
+resisting
+resists
+resolute
+resolutely
+resolutes
+resolution
+resolv
+resolve
+resolved
+resolvedly
+resolves
+resolveth
+resort
+resorted
+resounding
+resounds
+respeaking
+respect
+respected
+respecting
+respective
+respectively
+respects
+respice
+respite
+respites
+responsive
+respose
+ress
+rest
+rested
+resteth
+restful
+resting
+restitution
+restless
+restor
+restoration
+restorative
+restore
+restored
+restores
+restoring
+restrain
+restrained
+restraining
+restrains
+restraint
+rests
+resty
+resum
+resume
+resumes
+resurrections
+retail
+retails
+retain
+retainers
+retaining
+retell
+retention
+retentive
+retinue
+retir
+retire
+retired
+retirement
+retires
+retiring
+retold
+retort
+retorts
+retourne
+retract
+retreat
+retrograde
+rets
+return
+returned
+returnest
+returneth
+returning
+returns
+revania
+reveal
+reveals
+revel
+reveler
+revell
+reveller
+revellers
+revelling
+revelry
+revels
+reveng
+revenge
+revenged
+revengeful
+revengement
+revenger
+revengers
+revenges
+revenging
+revengingly
+revenue
+revenues
+reverb
+reverberate
+reverbs
+reverenc
+reverence
+reverend
+reverent
+reverently
+revers
+reverse
+reversion
+reverted
+review
+reviewest
+revil
+revile
+revisits
+reviv
+revive
+revives
+reviving
+revok
+revoke
+revokement
+revolt
+revolted
+revolting
+revolts
+revolution
+revolutions
+revolve
+revolving
+reward
+rewarded
+rewarder
+rewarding
+rewards
+reword
+reworded
+rex
+rey
+reynaldo
+rford
+rful
+rfull
+rhapsody
+rheims
+rhenish
+rhesus
+rhetoric
+rheum
+rheumatic
+rheums
+rheumy
+rhinoceros
+rhodes
+rhodope
+rhubarb
+rhym
+rhyme
+rhymers
+rhymes
+rhyming
+rialto
+rib
+ribald
+riband
+ribands
+ribaudred
+ribb
+ribbed
+ribbon
+ribbons
+ribs
+rice
+rich
+richard
+richer
+riches
+richest
+richly
+richmond
+richmonds
+rid
+riddance
+ridden
+riddle
+riddles
+riddling
+ride
+rider
+riders
+rides
+ridest
+rideth
+ridge
+ridges
+ridiculous
+riding
+rids
+rien
+ries
+rifle
+rift
+rifted
+rig
+rigg
+riggish
+right
+righteous
+righteously
+rightful
+rightfully
+rightly
+rights
+rigol
+rigorous
+rigorously
+rigour
+ril
+rim
+rin
+rinaldo
+rind
+ring
+ringing
+ringleader
+ringlets
+rings
+ringwood
+riot
+rioter
+rioting
+riotous
+riots
+rip
+ripe
+ripely
+ripen
+ripened
+ripeness
+ripening
+ripens
+riper
+ripest
+riping
+ripp
+ripping
+rise
+risen
+rises
+riseth
+rish
+rising
+rite
+rites
+rivage
+rival
+rivality
+rivall
+rivals
+rive
+rived
+rivelled
+river
+rivers
+rivet
+riveted
+rivets
+rivo
+rj
+rless
+road
+roads
+roam
+roaming
+roan
+roar
+roared
+roarers
+roaring
+roars
+roast
+roasted
+rob
+roba
+robas
+robb
+robbed
+robber
+robbers
+robbery
+robbing
+robe
+robed
+robert
+robes
+robin
+robs
+robustious
+rochester
+rochford
+rock
+rocks
+rocky
+rod
+rode
+roderigo
+rods
+roe
+roes
+roger
+rogero
+rogue
+roguery
+rogues
+roguish
+roi
+roisting
+roll
+rolled
+rolling
+rolls
+rom
+romage
+roman
+romano
+romanos
+romans
+rome
+romeo
+romish
+rondure
+ronyon
+rood
+roof
+roofs
+rook
+rooks
+rooky
+room
+rooms
+root
+rooted
+rootedly
+rooteth
+rooting
+roots
+rope
+ropery
+ropes
+roping
+ros
+rosalind
+rosalinda
+rosalinde
+rosaline
+roscius
+rose
+rosed
+rosemary
+rosencrantz
+roses
+ross
+rosy
+rot
+rote
+roted
+rother
+rotherham
+rots
+rotted
+rotten
+rottenness
+rotting
+rotundity
+rouen
+rough
+rougher
+roughest
+roughly
+roughness
+round
+rounded
+roundel
+rounder
+roundest
+rounding
+roundly
+rounds
+roundure
+rous
+rouse
+roused
+rousillon
+rously
+roussi
+rout
+routed
+routs
+rove
+rover
+row
+rowel
+rowland
+rowlands
+roy
+royal
+royalize
+royally
+royalties
+royalty
+roynish
+rs
+rt
+rub
+rubb
+rubbing
+rubbish
+rubies
+rubious
+rubs
+ruby
+rud
+rudand
+rudder
+ruddiness
+ruddock
+ruddy
+rude
+rudely
+rudeness
+ruder
+rudesby
+rudest
+rudiments
+rue
+rued
+ruff
+ruffian
+ruffians
+ruffle
+ruffling
+ruffs
+rug
+rugby
+rugemount
+rugged
+ruin
+ruinate
+ruined
+ruining
+ruinous
+ruins
+rul
+rule
+ruled
+ruler
+rulers
+rules
+ruling
+rumble
+ruminaies
+ruminat
+ruminate
+ruminated
+ruminates
+rumination
+rumor
+rumour
+rumourer
+rumours
+rump
+run
+runagate
+runagates
+runaway
+runaways
+rung
+runn
+runner
+runners
+running
+runs
+rupture
+ruptures
+rural
+rush
+rushes
+rushing
+rushling
+rushy
+russet
+russia
+russian
+russians
+rust
+rusted
+rustic
+rustically
+rustics
+rustle
+rustling
+rusts
+rusty
+rut
+ruth
+ruthful
+ruthless
+rutland
+ruttish
+ry
+rye
+rything
+s
+sa
+saba
+sabbath
+sable
+sables
+sack
+sackbuts
+sackcloth
+sacked
+sackerson
+sacks
+sacrament
+sacred
+sacrific
+sacrifice
+sacrificers
+sacrifices
+sacrificial
+sacrificing
+sacrilegious
+sacring
+sad
+sadder
+saddest
+saddle
+saddler
+saddles
+sadly
+sadness
+saf
+safe
+safeguard
+safely
+safer
+safest
+safeties
+safety
+saffron
+sag
+sage
+sagittary
+said
+saidst
+sail
+sailing
+sailmaker
+sailor
+sailors
+sails
+sain
+saint
+sainted
+saintlike
+saints
+saith
+sake
+sakes
+sala
+salad
+salamander
+salary
+sale
+salerio
+salicam
+salique
+salisbury
+sall
+sallet
+sallets
+sallies
+sallow
+sally
+salmon
+salmons
+salt
+salter
+saltiers
+saltness
+saltpetre
+salutation
+salutations
+salute
+saluted
+salutes
+saluteth
+salv
+salvation
+salve
+salving
+same
+samingo
+samp
+sampire
+sample
+sampler
+sampson
+samson
+samsons
+sancta
+sanctified
+sanctifies
+sanctify
+sanctimonies
+sanctimonious
+sanctimony
+sanctities
+sanctity
+sanctuarize
+sanctuary
+sand
+sandal
+sandbag
+sanded
+sands
+sandy
+sandys
+sang
+sanguine
+sanguis
+sanity
+sans
+santrailles
+sap
+sapient
+sapit
+sapless
+sapling
+sapphire
+sapphires
+saracens
+sarcenet
+sard
+sardians
+sardinia
+sardis
+sarum
+sat
+satan
+satchel
+sate
+sated
+satiate
+satiety
+satin
+satire
+satirical
+satis
+satisfaction
+satisfied
+satisfies
+satisfy
+satisfying
+saturday
+saturdays
+saturn
+saturnine
+saturninus
+satyr
+satyrs
+sauc
+sauce
+sauced
+saucers
+sauces
+saucily
+sauciness
+saucy
+sauf
+saunder
+sav
+savage
+savagely
+savageness
+savagery
+savages
+save
+saved
+saves
+saving
+saviour
+savory
+savour
+savouring
+savours
+savoury
+savoy
+saw
+sawed
+sawest
+sawn
+sawpit
+saws
+sawyer
+saxons
+saxony
+saxton
+say
+sayest
+saying
+sayings
+says
+sayst
+sblood
+sc
+scab
+scabbard
+scabs
+scaffold
+scaffoldage
+scal
+scald
+scalded
+scalding
+scale
+scaled
+scales
+scaling
+scall
+scalp
+scalps
+scaly
+scamble
+scambling
+scamels
+scan
+scandal
+scandaliz
+scandalous
+scandy
+scann
+scant
+scanted
+scanter
+scanting
+scantling
+scants
+scap
+scape
+scaped
+scapes
+scapeth
+scar
+scarce
+scarcely
+scarcity
+scare
+scarecrow
+scarecrows
+scarf
+scarfed
+scarfs
+scaring
+scarlet
+scarr
+scarre
+scars
+scarus
+scath
+scathe
+scathful
+scatt
+scatter
+scattered
+scattering
+scatters
+scelera
+scelerisque
+scene
+scenes
+scent
+scented
+scept
+scepter
+sceptre
+sceptred
+sceptres
+schedule
+schedules
+scholar
+scholarly
+scholars
+school
+schoolboy
+schoolboys
+schoolfellows
+schooling
+schoolmaster
+schoolmasters
+schools
+sciatica
+sciaticas
+science
+sciences
+scimitar
+scion
+scions
+scissors
+scoff
+scoffer
+scoffing
+scoffs
+scoggin
+scold
+scolding
+scolds
+sconce
+scone
+scope
+scopes
+scorch
+scorched
+score
+scored
+scores
+scoring
+scorn
+scorned
+scornful
+scornfully
+scorning
+scorns
+scorpion
+scorpions
+scot
+scotch
+scotches
+scotland
+scots
+scottish
+scoundrels
+scour
+scoured
+scourg
+scourge
+scouring
+scout
+scouts
+scowl
+scrap
+scrape
+scraping
+scraps
+scratch
+scratches
+scratching
+scream
+screams
+screech
+screeching
+screen
+screens
+screw
+screws
+scribbl
+scribbled
+scribe
+scribes
+scrimers
+scrip
+scrippage
+scripture
+scriptures
+scrivener
+scroll
+scrolls
+scroop
+scrowl
+scroyles
+scrubbed
+scruple
+scruples
+scrupulous
+scuffles
+scuffling
+scullion
+sculls
+scum
+scurril
+scurrility
+scurrilous
+scurvy
+scuse
+scut
+scutcheon
+scutcheons
+scylla
+scythe
+scythed
+scythia
+scythian
+sdeath
+se
+sea
+seacoal
+seafaring
+seal
+sealed
+sealing
+seals
+seam
+seamen
+seamy
+seaport
+sear
+searce
+search
+searchers
+searches
+searcheth
+searching
+seared
+seas
+seasick
+seaside
+season
+seasoned
+seasons
+seat
+seated
+seats
+sebastian
+second
+secondarily
+secondary
+seconded
+seconds
+secrecy
+secret
+secretaries
+secretary
+secretly
+secrets
+sect
+sectary
+sects
+secundo
+secure
+securely
+securing
+security
+sedg
+sedge
+sedges
+sedgy
+sedition
+seditious
+seduc
+seduce
+seduced
+seducer
+seducing
+see
+seed
+seeded
+seedness
+seeds
+seedsman
+seein
+seeing
+seek
+seeking
+seeks
+seel
+seeling
+seely
+seem
+seemed
+seemers
+seemest
+seemeth
+seeming
+seemingly
+seemly
+seems
+seen
+seer
+sees
+seese
+seest
+seethe
+seethes
+seething
+seeting
+segregation
+seigneur
+seigneurs
+seiz
+seize
+seized
+seizes
+seizeth
+seizing
+seizure
+seld
+seldom
+select
+seleucus
+self
+selfsame
+sell
+seller
+selling
+sells
+selves
+semblable
+semblably
+semblance
+semblances
+semblative
+semi
+semicircle
+semiramis
+semper
+sempronius
+senate
+senator
+senators
+send
+sender
+sendeth
+sending
+sends
+seneca
+senior
+seniory
+senis
+sennet
+senoys
+sense
+senseless
+senses
+sensible
+sensibly
+sensual
+sensuality
+sent
+sentenc
+sentence
+sentences
+sententious
+sentinel
+sentinels
+separable
+separate
+separated
+separates
+separation
+septentrion
+sepulchre
+sepulchres
+sepulchring
+sequel
+sequence
+sequent
+sequest
+sequester
+sequestration
+sere
+serenis
+serge
+sergeant
+serious
+seriously
+sermon
+sermons
+serpent
+serpentine
+serpents
+serpigo
+serv
+servant
+servanted
+servants
+serve
+served
+server
+serves
+serveth
+service
+serviceable
+services
+servile
+servility
+servilius
+serving
+servingman
+servingmen
+serviteur
+servitor
+servitors
+servitude
+sessa
+session
+sessions
+sestos
+set
+setebos
+sets
+setter
+setting
+settle
+settled
+settlest
+settling
+sev
+seven
+sevenfold
+sevennight
+seventeen
+seventh
+seventy
+sever
+several
+severally
+severals
+severe
+severed
+severely
+severest
+severing
+severity
+severn
+severs
+sew
+seward
+sewer
+sewing
+sex
+sexes
+sexton
+sextus
+seymour
+seyton
+sfoot
+sh
+shackle
+shackles
+shade
+shades
+shadow
+shadowed
+shadowing
+shadows
+shadowy
+shady
+shafalus
+shaft
+shafts
+shag
+shak
+shake
+shaked
+shaken
+shakes
+shaking
+shales
+shall
+shallenge
+shallow
+shallowest
+shallowly
+shallows
+shalt
+sham
+shambles
+shame
+shamed
+shameful
+shamefully
+shameless
+shames
+shamest
+shaming
+shank
+shanks
+shap
+shape
+shaped
+shapeless
+shapen
+shapes
+shaping
+shar
+shard
+sharded
+shards
+share
+shared
+sharers
+shares
+sharing
+shark
+sharp
+sharpen
+sharpened
+sharpens
+sharper
+sharpest
+sharply
+sharpness
+sharps
+shatter
+shav
+shave
+shaven
+shaw
+she
+sheaf
+sheal
+shear
+shearers
+shearing
+shearman
+shears
+sheath
+sheathe
+sheathed
+sheathes
+sheathing
+sheaved
+sheaves
+shed
+shedding
+sheds
+sheen
+sheep
+sheepcote
+sheepcotes
+sheeps
+sheepskins
+sheer
+sheet
+sheeted
+sheets
+sheffield
+shelf
+shell
+shells
+shelt
+shelter
+shelters
+shelves
+shelving
+shelvy
+shent
+shepherd
+shepherdes
+shepherdess
+shepherdesses
+shepherds
+sher
+sheriff
+sherris
+shes
+sheweth
+shield
+shielded
+shields
+shift
+shifted
+shifting
+shifts
+shilling
+shillings
+shin
+shine
+shines
+shineth
+shining
+shins
+shiny
+ship
+shipboard
+shipman
+shipmaster
+shipmen
+shipp
+shipped
+shipping
+ships
+shipt
+shipwreck
+shipwrecking
+shipwright
+shipwrights
+shire
+shirley
+shirt
+shirts
+shive
+shiver
+shivering
+shivers
+shoal
+shoals
+shock
+shocks
+shod
+shoe
+shoeing
+shoemaker
+shoes
+shog
+shone
+shook
+shoon
+shoot
+shooter
+shootie
+shooting
+shoots
+shop
+shops
+shore
+shores
+shorn
+short
+shortcake
+shorten
+shortened
+shortens
+shorter
+shortly
+shortness
+shot
+shotten
+shoughs
+should
+shoulder
+shouldering
+shoulders
+shouldst
+shout
+shouted
+shouting
+shouts
+shov
+shove
+shovel
+shovels
+show
+showed
+shower
+showers
+showest
+showing
+shown
+shows
+shreds
+shrew
+shrewd
+shrewdly
+shrewdness
+shrewish
+shrewishly
+shrewishness
+shrews
+shrewsbury
+shriek
+shrieking
+shrieks
+shrieve
+shrift
+shrill
+shriller
+shrills
+shrilly
+shrimp
+shrine
+shrink
+shrinking
+shrinks
+shriv
+shrive
+shriver
+shrives
+shriving
+shroud
+shrouded
+shrouding
+shrouds
+shrove
+shrow
+shrows
+shrub
+shrubs
+shrug
+shrugs
+shrunk
+shudd
+shudders
+shuffl
+shuffle
+shuffled
+shuffling
+shun
+shunless
+shunn
+shunned
+shunning
+shuns
+shut
+shuts
+shuttle
+shy
+shylock
+si
+sibyl
+sibylla
+sibyls
+sicil
+sicilia
+sicilian
+sicilius
+sicils
+sicily
+sicinius
+sick
+sicken
+sickens
+sicker
+sickle
+sicklemen
+sicklied
+sickliness
+sickly
+sickness
+sicles
+sicyon
+side
+sided
+sides
+siege
+sieges
+sienna
+sies
+sieve
+sift
+sifted
+sigeia
+sigh
+sighed
+sighing
+sighs
+sight
+sighted
+sightless
+sightly
+sights
+sign
+signal
+signet
+signieur
+significant
+significants
+signified
+signifies
+signify
+signifying
+signior
+signiories
+signiors
+signiory
+signor
+signories
+signs
+signum
+silenc
+silence
+silenced
+silencing
+silent
+silently
+silius
+silk
+silken
+silkman
+silks
+silliest
+silliness
+silling
+silly
+silva
+silver
+silvered
+silverly
+silvia
+silvius
+sima
+simile
+similes
+simois
+simon
+simony
+simp
+simpcox
+simple
+simpleness
+simpler
+simples
+simplicity
+simply
+simular
+simulation
+sin
+since
+sincere
+sincerely
+sincerity
+sinel
+sinew
+sinewed
+sinews
+sinewy
+sinful
+sinfully
+sing
+singe
+singeing
+singer
+singes
+singeth
+singing
+single
+singled
+singleness
+singly
+sings
+singular
+singulariter
+singularities
+singularity
+singuled
+sinister
+sink
+sinking
+sinks
+sinn
+sinner
+sinners
+sinning
+sinon
+sins
+sip
+sipping
+sir
+sire
+siren
+sirrah
+sirs
+sist
+sister
+sisterhood
+sisterly
+sisters
+sit
+sith
+sithence
+sits
+sitting
+situate
+situation
+situations
+siward
+six
+sixpence
+sixpences
+sixpenny
+sixteen
+sixth
+sixty
+siz
+size
+sizes
+sizzle
+skains
+skamble
+skein
+skelter
+skies
+skilful
+skilfully
+skill
+skilless
+skillet
+skillful
+skills
+skim
+skimble
+skin
+skinker
+skinny
+skins
+skip
+skipp
+skipper
+skipping
+skirmish
+skirmishes
+skirr
+skirted
+skirts
+skittish
+skulking
+skull
+skulls
+sky
+skyey
+skyish
+slab
+slack
+slackly
+slackness
+slain
+slake
+sland
+slander
+slandered
+slanderer
+slanderers
+slandering
+slanderous
+slanders
+slash
+slaught
+slaughter
+slaughtered
+slaughterer
+slaughterman
+slaughtermen
+slaughterous
+slaughters
+slave
+slaver
+slavery
+slaves
+slavish
+slay
+slayeth
+slaying
+slays
+sleave
+sledded
+sleek
+sleekly
+sleep
+sleeper
+sleepers
+sleepest
+sleeping
+sleeps
+sleepy
+sleeve
+sleeves
+sleid
+sleided
+sleight
+sleights
+slender
+slenderer
+slenderly
+slept
+slew
+slewest
+slice
+slid
+slide
+slides
+sliding
+slight
+slighted
+slightest
+slightly
+slightness
+slights
+slily
+slime
+slimy
+slings
+slink
+slip
+slipp
+slipper
+slippers
+slippery
+slips
+slish
+slit
+sliver
+slobb
+slomber
+slop
+slope
+slops
+sloth
+slothful
+slough
+slovenly
+slovenry
+slow
+slower
+slowly
+slowness
+slubber
+slug
+sluggard
+sluggardiz
+sluggish
+sluic
+slumb
+slumber
+slumbers
+slumbery
+slunk
+slut
+sluts
+sluttery
+sluttish
+sluttishness
+sly
+slys
+smack
+smacking
+smacks
+small
+smaller
+smallest
+smallness
+smalus
+smart
+smarting
+smartly
+smatch
+smatter
+smear
+smell
+smelling
+smells
+smelt
+smil
+smile
+smiled
+smiles
+smilest
+smilets
+smiling
+smilingly
+smirch
+smirched
+smit
+smite
+smites
+smith
+smithfield
+smock
+smocks
+smok
+smoke
+smoked
+smokes
+smoking
+smoky
+smooth
+smoothed
+smoothing
+smoothly
+smoothness
+smooths
+smote
+smoth
+smother
+smothered
+smothering
+smug
+smulkin
+smutch
+snaffle
+snail
+snails
+snake
+snakes
+snaky
+snap
+snapp
+snapper
+snar
+snare
+snares
+snarl
+snarleth
+snarling
+snatch
+snatchers
+snatches
+snatching
+sneak
+sneaking
+sneap
+sneaping
+sneck
+snip
+snipe
+snipt
+snore
+snores
+snoring
+snorting
+snout
+snow
+snowballs
+snowed
+snowy
+snuff
+snuffs
+snug
+so
+soak
+soaking
+soaks
+soar
+soaring
+soars
+sob
+sobbing
+sober
+soberly
+sobriety
+sobs
+sociable
+societies
+society
+socks
+socrates
+sod
+sodden
+soe
+soever
+soft
+soften
+softens
+softer
+softest
+softly
+softness
+soil
+soiled
+soilure
+soit
+sojourn
+sol
+sola
+solace
+solanio
+sold
+soldat
+solder
+soldest
+soldier
+soldiers
+soldiership
+sole
+solely
+solem
+solemn
+solemness
+solemnities
+solemnity
+solemniz
+solemnize
+solemnized
+solemnly
+soles
+solicit
+solicitation
+solicited
+soliciting
+solicitings
+solicitor
+solicits
+solid
+solidares
+solidity
+solinus
+solitary
+solomon
+solon
+solum
+solus
+solyman
+some
+somebody
+someone
+somerset
+somerville
+something
+sometime
+sometimes
+somever
+somewhat
+somewhere
+somewhither
+somme
+son
+sonance
+song
+songs
+sonnet
+sonneting
+sonnets
+sons
+sont
+sonties
+soon
+sooner
+soonest
+sooth
+soothe
+soothers
+soothing
+soothsay
+soothsayer
+sooty
+sop
+sophister
+sophisticated
+sophy
+sops
+sorcerer
+sorcerers
+sorceress
+sorceries
+sorcery
+sore
+sorel
+sorely
+sorer
+sores
+sorrier
+sorriest
+sorrow
+sorrowed
+sorrowest
+sorrowful
+sorrowing
+sorrows
+sorry
+sort
+sortance
+sorted
+sorting
+sorts
+sossius
+sot
+soto
+sots
+sottish
+soud
+sought
+soul
+sould
+soulless
+souls
+sound
+sounded
+sounder
+soundest
+sounding
+soundless
+soundly
+soundness
+soundpost
+sounds
+sour
+source
+sources
+sourest
+sourly
+sours
+sous
+souse
+south
+southam
+southampton
+southerly
+southern
+southward
+southwark
+southwell
+souviendrai
+sov
+sovereign
+sovereignest
+sovereignly
+sovereignty
+sovereignvours
+sow
+sowing
+sowl
+sowter
+space
+spaces
+spacious
+spade
+spades
+spain
+spak
+spake
+spakest
+span
+spangle
+spangled
+spaniard
+spaniel
+spaniels
+spanish
+spann
+spans
+spar
+spare
+spares
+sparing
+sparingly
+spark
+sparkle
+sparkles
+sparkling
+sparks
+sparrow
+sparrows
+sparta
+spartan
+spavin
+spavins
+spawn
+speak
+speaker
+speakers
+speakest
+speaketh
+speaking
+speaks
+spear
+speargrass
+spears
+special
+specialities
+specially
+specialties
+specialty
+specify
+speciously
+spectacle
+spectacled
+spectacles
+spectators
+spectatorship
+speculation
+speculations
+speculative
+sped
+speech
+speeches
+speechless
+speed
+speeded
+speedier
+speediest
+speedily
+speediness
+speeding
+speeds
+speedy
+speens
+spell
+spelling
+spells
+spelt
+spencer
+spend
+spendest
+spending
+spends
+spendthrift
+spent
+sperato
+sperm
+spero
+sperr
+spher
+sphere
+sphered
+spheres
+spherical
+sphery
+sphinx
+spice
+spiced
+spicery
+spices
+spider
+spiders
+spied
+spies
+spieth
+spightfully
+spigot
+spill
+spilling
+spills
+spilt
+spilth
+spin
+spinii
+spinners
+spinster
+spinsters
+spire
+spirit
+spirited
+spiritless
+spirits
+spiritual
+spiritualty
+spirt
+spit
+spital
+spite
+spited
+spiteful
+spites
+spits
+spitted
+spitting
+splay
+spleen
+spleenful
+spleens
+spleeny
+splendour
+splenitive
+splinter
+splinters
+split
+splits
+splitted
+splitting
+spoil
+spoils
+spok
+spoke
+spoken
+spokes
+spokesman
+sponge
+spongy
+spoon
+spoons
+sport
+sportful
+sporting
+sportive
+sports
+spot
+spotless
+spots
+spotted
+spousal
+spouse
+spout
+spouting
+spouts
+sprag
+sprang
+sprat
+sprawl
+spray
+sprays
+spread
+spreading
+spreads
+sprighted
+sprightful
+sprightly
+sprigs
+spring
+springe
+springes
+springeth
+springhalt
+springing
+springs
+springtime
+sprinkle
+sprinkles
+sprite
+sprited
+spritely
+sprites
+spriting
+sprout
+spruce
+sprung
+spun
+spur
+spurio
+spurn
+spurns
+spurr
+spurrer
+spurring
+spurs
+spy
+spying
+squabble
+squadron
+squadrons
+squand
+squar
+square
+squarer
+squares
+squash
+squeak
+squeaking
+squeal
+squealing
+squeezes
+squeezing
+squele
+squier
+squints
+squiny
+squire
+squires
+squirrel
+st
+stab
+stabb
+stabbed
+stabbing
+stable
+stableness
+stables
+stablish
+stablishment
+stabs
+stacks
+staff
+stafford
+staffords
+staffordshire
+stag
+stage
+stages
+stagger
+staggering
+staggers
+stags
+staid
+staider
+stain
+stained
+staines
+staineth
+staining
+stainless
+stains
+stair
+stairs
+stake
+stakes
+stale
+staled
+stalk
+stalking
+stalks
+stall
+stalling
+stalls
+stamford
+stammer
+stamp
+stamped
+stamps
+stanch
+stanchless
+stand
+standard
+standards
+stander
+standers
+standest
+standeth
+standing
+stands
+staniel
+stanley
+stanze
+stanzo
+stanzos
+staple
+staples
+star
+stare
+stared
+stares
+staring
+starings
+stark
+starkly
+starlight
+starling
+starr
+starry
+stars
+start
+started
+starting
+startingly
+startle
+startles
+starts
+starv
+starve
+starved
+starvelackey
+starveling
+starveth
+starving
+state
+statelier
+stately
+states
+statesman
+statesmen
+statilius
+station
+statist
+statists
+statue
+statues
+stature
+statures
+statute
+statutes
+stave
+staves
+stay
+stayed
+stayest
+staying
+stays
+stead
+steaded
+steadfast
+steadier
+steads
+steal
+stealer
+stealers
+stealing
+steals
+stealth
+stealthy
+steed
+steeds
+steel
+steeled
+steely
+steep
+steeped
+steeple
+steeples
+steeps
+steepy
+steer
+steerage
+steering
+steers
+stelled
+stem
+stemming
+stench
+step
+stepdame
+stephano
+stephen
+stepmothers
+stepp
+stepping
+steps
+sterile
+sterility
+sterling
+stern
+sternage
+sterner
+sternest
+sternness
+steterat
+stew
+steward
+stewards
+stewardship
+stewed
+stews
+stick
+sticking
+stickler
+sticks
+stiff
+stiffen
+stiffly
+stifle
+stifled
+stifles
+stigmatic
+stigmatical
+stile
+still
+stiller
+stillest
+stillness
+stilly
+sting
+stinging
+stingless
+stings
+stink
+stinking
+stinkingly
+stinks
+stint
+stinted
+stints
+stir
+stirr
+stirred
+stirrer
+stirrers
+stirreth
+stirring
+stirrup
+stirrups
+stirs
+stitchery
+stitches
+stithied
+stithy
+stoccadoes
+stoccata
+stock
+stockfish
+stocking
+stockings
+stockish
+stocks
+stog
+stogs
+stoics
+stokesly
+stol
+stole
+stolen
+stolest
+stomach
+stomachers
+stomaching
+stomachs
+ston
+stone
+stonecutter
+stones
+stonish
+stony
+stood
+stool
+stools
+stoop
+stooping
+stoops
+stop
+stope
+stopp
+stopped
+stopping
+stops
+stor
+store
+storehouse
+storehouses
+stores
+stories
+storm
+stormed
+storming
+storms
+stormy
+story
+stoup
+stoups
+stout
+stouter
+stoutly
+stoutness
+stover
+stow
+stowage
+stowed
+strachy
+stragglers
+straggling
+straight
+straightest
+straightway
+strain
+strained
+straining
+strains
+strait
+straited
+straiter
+straitly
+straitness
+straits
+strand
+strange
+strangely
+strangeness
+stranger
+strangers
+strangest
+strangle
+strangled
+strangler
+strangles
+strangling
+strappado
+straps
+stratagem
+stratagems
+stratford
+strato
+straw
+strawberries
+strawberry
+straws
+strawy
+stray
+straying
+strays
+streak
+streaks
+stream
+streamers
+streaming
+streams
+streching
+street
+streets
+strength
+strengthen
+strengthened
+strengthless
+strengths
+stretch
+stretched
+stretches
+stretching
+strew
+strewing
+strewings
+strewments
+stricken
+strict
+stricter
+strictest
+strictly
+stricture
+stride
+strides
+striding
+strife
+strifes
+strik
+strike
+strikers
+strikes
+strikest
+striking
+string
+stringless
+strings
+strip
+stripes
+stripling
+striplings
+stripp
+stripping
+striv
+strive
+strives
+striving
+strok
+stroke
+strokes
+strond
+stronds
+strong
+stronger
+strongest
+strongly
+strooke
+strossers
+strove
+strown
+stroy
+struck
+strucken
+struggle
+struggles
+struggling
+strumpet
+strumpeted
+strumpets
+strung
+strut
+struts
+strutted
+strutting
+stubble
+stubborn
+stubbornest
+stubbornly
+stubbornness
+stuck
+studded
+student
+students
+studied
+studies
+studious
+studiously
+studs
+study
+studying
+stuff
+stuffing
+stuffs
+stumble
+stumbled
+stumblest
+stumbling
+stump
+stumps
+stung
+stupefy
+stupid
+stupified
+stuprum
+sturdy
+sty
+styga
+stygian
+styl
+style
+styx
+su
+sub
+subcontracted
+subdu
+subdue
+subdued
+subduements
+subdues
+subduing
+subject
+subjected
+subjection
+subjects
+submerg
+submission
+submissive
+submit
+submits
+submitting
+suborn
+subornation
+suborned
+subscrib
+subscribe
+subscribed
+subscribes
+subscription
+subsequent
+subsidies
+subsidy
+subsist
+subsisting
+substance
+substances
+substantial
+substitute
+substituted
+substitutes
+substitution
+subtile
+subtilly
+subtle
+subtleties
+subtlety
+subtly
+subtractors
+suburbs
+subversion
+subverts
+succedant
+succeed
+succeeded
+succeeders
+succeeding
+succeeds
+success
+successantly
+successes
+successful
+successfully
+succession
+successive
+successively
+successor
+successors
+succour
+succours
+such
+suck
+sucker
+suckers
+sucking
+suckle
+sucks
+sudden
+suddenly
+sue
+sued
+suerly
+sues
+sueth
+suff
+suffer
+sufferance
+sufferances
+suffered
+suffering
+suffers
+suffic
+suffice
+sufficed
+suffices
+sufficeth
+sufficiency
+sufficient
+sufficiently
+sufficing
+sufficit
+suffigance
+suffocate
+suffocating
+suffocation
+suffolk
+suffrage
+suffrages
+sug
+sugar
+sugarsop
+suggest
+suggested
+suggesting
+suggestion
+suggestions
+suggests
+suis
+suit
+suitable
+suited
+suiting
+suitor
+suitors
+suits
+suivez
+sullen
+sullens
+sullied
+sullies
+sully
+sulph
+sulpherous
+sulphur
+sulphurous
+sultan
+sultry
+sum
+sumless
+summ
+summa
+summary
+summer
+summers
+summit
+summon
+summoners
+summons
+sumpter
+sumptuous
+sumptuously
+sums
+sun
+sunbeams
+sunburning
+sunburnt
+sund
+sunday
+sundays
+sunder
+sunders
+sundry
+sung
+sunk
+sunken
+sunny
+sunrising
+suns
+sunset
+sunshine
+sup
+super
+superficial
+superficially
+superfluity
+superfluous
+superfluously
+superflux
+superior
+supernal
+supernatural
+superpraise
+superscript
+superscription
+superserviceable
+superstition
+superstitious
+superstitiously
+supersubtle
+supervise
+supervisor
+supp
+supper
+suppers
+suppertime
+supping
+supplant
+supple
+suppler
+suppliance
+suppliant
+suppliants
+supplicant
+supplication
+supplications
+supplie
+supplied
+supplies
+suppliest
+supply
+supplyant
+supplying
+supplyment
+support
+supportable
+supportance
+supported
+supporter
+supporters
+supporting
+supportor
+suppos
+supposal
+suppose
+supposed
+supposes
+supposest
+supposing
+supposition
+suppress
+suppressed
+suppresseth
+supremacy
+supreme
+sups
+sur
+surance
+surcease
+surd
+sure
+surecard
+surely
+surer
+surest
+sureties
+surety
+surfeit
+surfeited
+surfeiter
+surfeiting
+surfeits
+surge
+surgeon
+surgeons
+surgere
+surgery
+surges
+surly
+surmis
+surmise
+surmised
+surmises
+surmount
+surmounted
+surmounts
+surnam
+surname
+surnamed
+surpasseth
+surpassing
+surplice
+surplus
+surpris
+surprise
+surprised
+surrender
+surrey
+surreys
+survey
+surveyest
+surveying
+surveyor
+surveyors
+surveys
+survive
+survives
+survivor
+susan
+suspect
+suspected
+suspecting
+suspects
+suspend
+suspense
+suspicion
+suspicions
+suspicious
+suspiration
+suspire
+sust
+sustain
+sustaining
+sutler
+sutton
+suum
+swabber
+swaddling
+swag
+swagg
+swagger
+swaggerer
+swaggerers
+swaggering
+swain
+swains
+swallow
+swallowed
+swallowing
+swallows
+swam
+swan
+swans
+sward
+sware
+swarm
+swarming
+swart
+swarth
+swarths
+swarthy
+swashers
+swashing
+swath
+swathing
+swathling
+sway
+swaying
+sways
+swear
+swearer
+swearers
+swearest
+swearing
+swearings
+swears
+sweat
+sweaten
+sweating
+sweats
+sweaty
+sweep
+sweepers
+sweeps
+sweet
+sweeten
+sweetens
+sweeter
+sweetest
+sweetheart
+sweeting
+sweetly
+sweetmeats
+sweetness
+sweets
+swell
+swelling
+swellings
+swells
+swelter
+sweno
+swept
+swerve
+swerver
+swerving
+swift
+swifter
+swiftest
+swiftly
+swiftness
+swill
+swills
+swim
+swimmer
+swimmers
+swimming
+swims
+swine
+swineherds
+swing
+swinge
+swinish
+swinstead
+switches
+swits
+switzers
+swol
+swoll
+swoln
+swoon
+swooned
+swooning
+swoons
+swoop
+swoopstake
+swor
+sword
+sworder
+swords
+swore
+sworn
+swounded
+swounds
+swum
+swung
+sy
+sycamore
+sycorax
+sylla
+syllable
+syllables
+syllogism
+symbols
+sympathise
+sympathiz
+sympathize
+sympathized
+sympathy
+synagogue
+synod
+synods
+syracuse
+syracusian
+syracusians
+syria
+syrups
+t
+ta
+taber
+table
+tabled
+tables
+tablet
+tabor
+taborer
+tabors
+tabourines
+taciturnity
+tack
+tackle
+tackled
+tackles
+tackling
+tacklings
+taddle
+tadpole
+taffeta
+taffety
+tag
+tagrag
+tah
+tail
+tailor
+tailors
+tails
+taint
+tainted
+tainting
+taints
+tainture
+tak
+take
+taken
+taker
+takes
+takest
+taketh
+taking
+tal
+talbot
+talbotites
+talbots
+tale
+talent
+talents
+taleporter
+tales
+talk
+talked
+talker
+talkers
+talkest
+talking
+talks
+tall
+taller
+tallest
+tallies
+tallow
+tally
+talons
+tam
+tambourines
+tame
+tamed
+tamely
+tameness
+tamer
+tames
+taming
+tamora
+tamworth
+tan
+tang
+tangle
+tangled
+tank
+tanlings
+tann
+tanned
+tanner
+tanquam
+tanta
+tantaene
+tap
+tape
+taper
+tapers
+tapestries
+tapestry
+taphouse
+tapp
+tapster
+tapsters
+tar
+tardied
+tardily
+tardiness
+tardy
+tarentum
+targe
+targes
+target
+targets
+tarpeian
+tarquin
+tarquins
+tarr
+tarre
+tarriance
+tarried
+tarries
+tarry
+tarrying
+tart
+tartar
+tartars
+tartly
+tartness
+task
+tasker
+tasking
+tasks
+tassel
+taste
+tasted
+tastes
+tasting
+tatt
+tatter
+tattered
+tatters
+tattle
+tattling
+tattlings
+taught
+taunt
+taunted
+taunting
+tauntingly
+taunts
+taurus
+tavern
+taverns
+tavy
+tawdry
+tawny
+tax
+taxation
+taxations
+taxes
+taxing
+tc
+te
+teach
+teacher
+teachers
+teaches
+teachest
+teacheth
+teaching
+team
+tear
+tearful
+tearing
+tears
+tearsheet
+teat
+tedious
+tediously
+tediousness
+teem
+teeming
+teems
+teen
+teeth
+teipsum
+telamon
+telamonius
+tell
+teller
+telling
+tells
+tellus
+temp
+temper
+temperality
+temperance
+temperate
+temperately
+tempers
+tempest
+tempests
+tempestuous
+temple
+temples
+temporal
+temporary
+temporiz
+temporize
+temporizer
+temps
+tempt
+temptation
+temptations
+tempted
+tempter
+tempters
+tempteth
+tempting
+tempts
+ten
+tenable
+tenant
+tenantius
+tenantless
+tenants
+tench
+tend
+tendance
+tended
+tender
+tendered
+tenderly
+tenderness
+tenders
+tending
+tends
+tenedos
+tenement
+tenements
+tenfold
+tennis
+tenour
+tenours
+tens
+tent
+tented
+tenth
+tenths
+tents
+tenure
+tenures
+tercel
+tereus
+term
+termagant
+termed
+terminations
+termless
+terms
+terra
+terrace
+terram
+terras
+terre
+terrene
+terrestrial
+terrible
+terribly
+territories
+territory
+terror
+terrors
+tertian
+tertio
+test
+testament
+tested
+tester
+testern
+testify
+testimonied
+testimonies
+testimony
+testiness
+testril
+testy
+tetchy
+tether
+tetter
+tevil
+tewksbury
+text
+tgv
+th
+thaes
+thames
+than
+thane
+thanes
+thank
+thanked
+thankful
+thankfully
+thankfulness
+thanking
+thankings
+thankless
+thanks
+thanksgiving
+thasos
+that
+thatch
+thaw
+thawing
+thaws
+the
+theatre
+theban
+thebes
+thee
+theft
+thefts
+thein
+their
+theirs
+theise
+them
+theme
+themes
+themselves
+then
+thence
+thenceforth
+theoric
+there
+thereabout
+thereabouts
+thereafter
+thereat
+thereby
+therefore
+therein
+thereof
+thereon
+thereto
+thereunto
+thereupon
+therewith
+therewithal
+thersites
+these
+theseus
+thessalian
+thessaly
+thetis
+thews
+they
+thick
+thicken
+thickens
+thicker
+thickest
+thicket
+thickskin
+thief
+thievery
+thieves
+thievish
+thigh
+thighs
+thimble
+thimbles
+thin
+thine
+thing
+things
+think
+thinkest
+thinking
+thinkings
+thinks
+thinkst
+thinly
+third
+thirdly
+thirds
+thirst
+thirsting
+thirsts
+thirsty
+thirteen
+thirties
+thirtieth
+thirty
+this
+thisby
+thisne
+thistle
+thistles
+thither
+thitherward
+thoas
+thomas
+thorn
+thorns
+thorny
+thorough
+thoroughly
+those
+thou
+though
+thought
+thoughtful
+thoughts
+thousand
+thousands
+thracian
+thraldom
+thrall
+thralled
+thralls
+thrash
+thrasonical
+thread
+threadbare
+threaden
+threading
+threat
+threaten
+threatening
+threatens
+threatest
+threats
+three
+threefold
+threepence
+threepile
+threes
+threescore
+thresher
+threshold
+threw
+thrice
+thrift
+thriftless
+thrifts
+thrifty
+thrill
+thrilling
+thrills
+thrive
+thrived
+thrivers
+thrives
+thriving
+throat
+throats
+throbbing
+throbs
+throca
+throe
+throes
+thromuldo
+thron
+throne
+throned
+thrones
+throng
+thronging
+throngs
+throstle
+throttle
+through
+throughfare
+throughfares
+throughly
+throughout
+throw
+thrower
+throwest
+throwing
+thrown
+throws
+thrum
+thrumm
+thrush
+thrust
+thrusteth
+thrusting
+thrusts
+thumb
+thumbs
+thump
+thund
+thunder
+thunderbolt
+thunderbolts
+thunderer
+thunders
+thunderstone
+thunderstroke
+thurio
+thursday
+thus
+thwack
+thwart
+thwarted
+thwarting
+thwartings
+thy
+thyme
+thymus
+thyreus
+thyself
+ti
+tib
+tiber
+tiberio
+tibey
+ticed
+tick
+tickl
+tickle
+tickled
+tickles
+tickling
+ticklish
+tiddle
+tide
+tides
+tidings
+tidy
+tie
+tied
+ties
+tiff
+tiger
+tigers
+tight
+tightly
+tike
+til
+tile
+till
+tillage
+tilly
+tilt
+tilter
+tilth
+tilting
+tilts
+tiltyard
+tim
+timandra
+timber
+time
+timeless
+timelier
+timely
+times
+timon
+timor
+timorous
+timorously
+tinct
+tincture
+tinctures
+tinder
+tingling
+tinker
+tinkers
+tinsel
+tiny
+tip
+tipp
+tippling
+tips
+tipsy
+tiptoe
+tir
+tire
+tired
+tires
+tirest
+tiring
+tirra
+tirrits
+tis
+tish
+tisick
+tissue
+titan
+titania
+tithe
+tithed
+tithing
+titinius
+title
+titled
+titleless
+titles
+tittle
+tittles
+titular
+titus
+tn
+to
+toad
+toads
+toadstool
+toast
+toasted
+toasting
+toasts
+toaze
+toby
+tock
+tod
+today
+todpole
+tods
+toe
+toes
+tofore
+toge
+toged
+together
+toil
+toiled
+toiling
+toils
+token
+tokens
+told
+toledo
+tolerable
+toll
+tolling
+tom
+tomb
+tombe
+tombed
+tombless
+tomboys
+tombs
+tomorrow
+tomyris
+ton
+tongs
+tongu
+tongue
+tongued
+tongueless
+tongues
+tonight
+too
+took
+tool
+tools
+tooth
+toothache
+toothpick
+toothpicker
+top
+topas
+topful
+topgallant
+topless
+topmast
+topp
+topping
+topple
+topples
+tops
+topsail
+topsy
+torch
+torchbearer
+torchbearers
+torcher
+torches
+torchlight
+tore
+torment
+tormenta
+tormente
+tormented
+tormenting
+tormentors
+torments
+torn
+torrent
+tortive
+tortoise
+tortur
+torture
+tortured
+torturer
+torturers
+tortures
+torturest
+torturing
+toryne
+toss
+tossed
+tosseth
+tossing
+tot
+total
+totally
+tott
+tottered
+totters
+tou
+touch
+touched
+touches
+toucheth
+touching
+touchstone
+tough
+tougher
+toughness
+touraine
+tournaments
+tours
+tous
+tout
+touze
+tow
+toward
+towardly
+towards
+tower
+towering
+towers
+town
+towns
+township
+townsman
+townsmen
+towton
+toy
+toys
+trace
+traces
+track
+tract
+tractable
+trade
+traded
+traders
+trades
+tradesman
+tradesmen
+trading
+tradition
+traditional
+traduc
+traduced
+traducement
+traffic
+traffickers
+traffics
+tragedian
+tragedians
+tragedies
+tragedy
+tragic
+tragical
+trail
+train
+trained
+training
+trains
+trait
+traitor
+traitorly
+traitorous
+traitorously
+traitors
+traitress
+traject
+trammel
+trample
+trampled
+trampling
+tranc
+trance
+tranio
+tranquil
+tranquillity
+transcendence
+transcends
+transferred
+transfigur
+transfix
+transform
+transformation
+transformations
+transformed
+transgress
+transgresses
+transgressing
+transgression
+translate
+translated
+translates
+translation
+transmigrates
+transmutation
+transparent
+transport
+transportance
+transported
+transporting
+transports
+transpose
+transshape
+trap
+trapp
+trappings
+traps
+trash
+travail
+travails
+travel
+traveler
+traveling
+travell
+travelled
+traveller
+travellers
+travellest
+travelling
+travels
+travers
+traverse
+tray
+treacherous
+treacherously
+treachers
+treachery
+tread
+treading
+treads
+treason
+treasonable
+treasonous
+treasons
+treasure
+treasurer
+treasures
+treasuries
+treasury
+treat
+treaties
+treatise
+treats
+treaty
+treble
+trebled
+trebles
+trebonius
+tree
+trees
+tremble
+trembled
+trembles
+tremblest
+trembling
+tremblingly
+tremor
+trempling
+trench
+trenchant
+trenched
+trencher
+trenchering
+trencherman
+trenchers
+trenches
+trenching
+trent
+tres
+trespass
+trespasses
+tressel
+tresses
+treys
+trial
+trials
+trib
+tribe
+tribes
+tribulation
+tribunal
+tribune
+tribunes
+tributaries
+tributary
+tribute
+tributes
+trice
+trick
+tricking
+trickling
+tricks
+tricksy
+trident
+tried
+trier
+trifle
+trifled
+trifler
+trifles
+trifling
+trigon
+trill
+trim
+trimly
+trimm
+trimmed
+trimming
+trims
+trinculo
+trinculos
+trinkets
+trip
+tripartite
+tripe
+triple
+triplex
+tripoli
+tripolis
+tripp
+tripping
+trippingly
+trips
+tristful
+triton
+triumph
+triumphant
+triumphantly
+triumpher
+triumphers
+triumphing
+triumphs
+triumvir
+triumvirate
+triumvirs
+triumviry
+trivial
+troat
+trod
+trodden
+troiant
+troien
+troilus
+troiluses
+trojan
+trojans
+troll
+tromperies
+trompet
+troop
+trooping
+troops
+trop
+trophies
+trophy
+tropically
+trot
+troth
+trothed
+troths
+trots
+trotting
+trouble
+troubled
+troubler
+troubles
+troublesome
+troublest
+troublous
+trough
+trout
+trouts
+trovato
+trow
+trowel
+trowest
+troy
+troyan
+troyans
+truant
+truce
+truckle
+trudge
+true
+trueborn
+truepenny
+truer
+truest
+truie
+trull
+trulls
+truly
+trump
+trumpery
+trumpet
+trumpeter
+trumpeters
+trumpets
+truncheon
+truncheoners
+trundle
+trunk
+trunks
+trust
+trusted
+truster
+trusters
+trusting
+trusts
+trusty
+truth
+truths
+try
+ts
+tu
+tuae
+tub
+tubal
+tubs
+tuck
+tucket
+tuesday
+tuft
+tufts
+tug
+tugg
+tugging
+tuition
+tullus
+tully
+tumble
+tumbled
+tumbler
+tumbling
+tumult
+tumultuous
+tun
+tune
+tuneable
+tuned
+tuners
+tunes
+tunis
+tuns
+tupping
+turban
+turbans
+turbulence
+turbulent
+turd
+turf
+turfy
+turk
+turkey
+turkeys
+turkish
+turks
+turlygod
+turmoil
+turmoiled
+turn
+turnbull
+turncoat
+turncoats
+turned
+turneth
+turning
+turnips
+turns
+turph
+turpitude
+turquoise
+turret
+turrets
+turtle
+turtles
+turvy
+tuscan
+tush
+tut
+tutor
+tutored
+tutors
+tutto
+twain
+twang
+twangling
+twas
+tway
+tweaks
+tween
+twelfth
+twelve
+twelvemonth
+twentieth
+twenty
+twere
+twice
+twig
+twiggen
+twigs
+twilight
+twill
+twilled
+twin
+twine
+twink
+twinkle
+twinkled
+twinkling
+twinn
+twins
+twire
+twist
+twisted
+twit
+twits
+twitting
+twixt
+two
+twofold
+twopence
+twopences
+twos
+twould
+tyb
+tybalt
+tybalts
+tyburn
+tying
+tyke
+tymbria
+type
+types
+typhon
+tyrannical
+tyrannically
+tyrannize
+tyrannous
+tyranny
+tyrant
+tyrants
+tyrian
+tyrrel
+u
+ubique
+udders
+udge
+uds
+uglier
+ugliest
+ugly
+ulcer
+ulcerous
+ulysses
+um
+umber
+umbra
+umbrage
+umfrevile
+umpire
+umpires
+un
+unable
+unaccommodated
+unaccompanied
+unaccustom
+unaching
+unacquainted
+unactive
+unadvis
+unadvised
+unadvisedly
+unagreeable
+unanel
+unanswer
+unappeas
+unapproved
+unapt
+unaptness
+unarm
+unarmed
+unarms
+unassail
+unassailable
+unattainted
+unattempted
+unattended
+unauspicious
+unauthorized
+unavoided
+unawares
+unback
+unbak
+unbanded
+unbar
+unbarb
+unbashful
+unbated
+unbatter
+unbecoming
+unbefitting
+unbegot
+unbegotten
+unbelieved
+unbend
+unbent
+unbewail
+unbid
+unbidden
+unbind
+unbinds
+unbitted
+unbless
+unblest
+unbloodied
+unblown
+unbodied
+unbolt
+unbolted
+unbonneted
+unbookish
+unborn
+unbosom
+unbound
+unbounded
+unbow
+unbowed
+unbrac
+unbraced
+unbraided
+unbreathed
+unbred
+unbreech
+unbridled
+unbroke
+unbruis
+unbruised
+unbuckle
+unbuckles
+unbuckling
+unbuild
+unburden
+unburdens
+unburied
+unburnt
+unburthen
+unbutton
+unbuttoning
+uncapable
+uncape
+uncase
+uncasing
+uncaught
+uncertain
+uncertainty
+unchain
+unchanging
+uncharge
+uncharged
+uncharitably
+unchary
+unchaste
+uncheck
+unchilded
+uncivil
+unclaim
+unclasp
+uncle
+unclean
+uncleanliness
+uncleanly
+uncleanness
+uncles
+unclew
+unclog
+uncoined
+uncolted
+uncomeliness
+uncomfortable
+uncompassionate
+uncomprehensive
+unconfinable
+unconfirm
+unconfirmed
+unconquer
+unconquered
+unconsidered
+unconstant
+unconstrain
+unconstrained
+uncontemn
+uncontroll
+uncorrected
+uncounted
+uncouple
+uncourteous
+uncouth
+uncover
+uncovered
+uncropped
+uncross
+uncrown
+unction
+unctuous
+uncuckolded
+uncurable
+uncurbable
+uncurbed
+uncurls
+uncurrent
+uncurse
+undaunted
+undeaf
+undeck
+undeeded
+under
+underbearing
+underborne
+undercrest
+underfoot
+undergo
+undergoes
+undergoing
+undergone
+underground
+underhand
+underlings
+undermine
+underminers
+underneath
+underprizing
+underprop
+understand
+understandeth
+understanding
+understandings
+understands
+understood
+underta
+undertake
+undertakeing
+undertaker
+undertakes
+undertaking
+undertakings
+undertook
+undervalu
+undervalued
+underwent
+underwrit
+underwrite
+undescried
+undeserved
+undeserver
+undeservers
+undeserving
+undetermin
+undid
+undinted
+undiscernible
+undiscover
+undishonoured
+undispos
+undistinguishable
+undistinguished
+undividable
+undivided
+undivulged
+undo
+undoes
+undoing
+undone
+undoubted
+undoubtedly
+undream
+undress
+undressed
+undrown
+unduteous
+undutiful
+une
+uneared
+unearned
+unearthly
+uneasines
+uneasy
+uneath
+uneducated
+uneffectual
+unelected
+unequal
+uneven
+unexamin
+unexecuted
+unexpected
+unexperienc
+unexperient
+unexpressive
+unfair
+unfaithful
+unfallible
+unfam
+unfashionable
+unfasten
+unfather
+unfathered
+unfed
+unfeed
+unfeeling
+unfeigned
+unfeignedly
+unfellowed
+unfelt
+unfenced
+unfilial
+unfill
+unfinish
+unfirm
+unfit
+unfitness
+unfix
+unfledg
+unfold
+unfolded
+unfoldeth
+unfolding
+unfolds
+unfool
+unforc
+unforced
+unforfeited
+unfortified
+unfortunate
+unfought
+unfrequented
+unfriended
+unfurnish
+ungain
+ungalled
+ungart
+ungarter
+ungenitur
+ungentle
+ungentleness
+ungently
+ungird
+ungodly
+ungor
+ungot
+ungotten
+ungovern
+ungracious
+ungrateful
+ungravely
+ungrown
+unguarded
+unguem
+unguided
+unhack
+unhair
+unhallow
+unhallowed
+unhand
+unhandled
+unhandsome
+unhang
+unhappied
+unhappily
+unhappiness
+unhappy
+unhardened
+unharm
+unhatch
+unheard
+unhearts
+unheedful
+unheedfully
+unheedy
+unhelpful
+unhidden
+unholy
+unhop
+unhopefullest
+unhorse
+unhospitable
+unhous
+unhoused
+unhurtful
+unicorn
+unicorns
+unimproved
+uninhabitable
+uninhabited
+unintelligent
+union
+unions
+unite
+united
+unity
+universal
+universe
+universities
+university
+unjointed
+unjust
+unjustice
+unjustly
+unkennel
+unkept
+unkind
+unkindest
+unkindly
+unkindness
+unking
+unkinglike
+unkiss
+unknit
+unknowing
+unknown
+unlace
+unlaid
+unlawful
+unlawfully
+unlearn
+unlearned
+unless
+unlesson
+unletter
+unlettered
+unlick
+unlike
+unlikely
+unlimited
+unlineal
+unlink
+unload
+unloaded
+unloading
+unloads
+unlock
+unlocks
+unlook
+unlooked
+unloos
+unloose
+unlov
+unloving
+unluckily
+unlucky
+unmade
+unmake
+unmanly
+unmann
+unmanner
+unmannerd
+unmannerly
+unmarried
+unmask
+unmasked
+unmasking
+unmasks
+unmast
+unmatch
+unmatchable
+unmatched
+unmeasurable
+unmeet
+unmellowed
+unmerciful
+unmeritable
+unmeriting
+unminded
+unmindfull
+unmingled
+unmitigable
+unmitigated
+unmix
+unmoan
+unmov
+unmoved
+unmoving
+unmuffles
+unmuffling
+unmusical
+unmuzzle
+unmuzzled
+unnatural
+unnaturally
+unnaturalness
+unnecessarily
+unnecessary
+unneighbourly
+unnerved
+unnoble
+unnoted
+unnumb
+unnumber
+unowed
+unpack
+unpaid
+unparagon
+unparallel
+unpartial
+unpath
+unpaved
+unpay
+unpeaceable
+unpeg
+unpeople
+unpeopled
+unperfect
+unperfectness
+unpick
+unpin
+unpink
+unpitied
+unpitifully
+unplagu
+unplausive
+unpleas
+unpleasant
+unpleasing
+unpolicied
+unpolish
+unpolished
+unpolluted
+unpossess
+unpossessing
+unpossible
+unpractis
+unpregnant
+unpremeditated
+unprepar
+unprepared
+unpress
+unprevailing
+unprevented
+unpriz
+unprizable
+unprofitable
+unprofited
+unproper
+unproperly
+unproportion
+unprovide
+unprovided
+unprovident
+unprovokes
+unprun
+unpruned
+unpublish
+unpurged
+unpurpos
+unqualitied
+unqueen
+unquestion
+unquestionable
+unquiet
+unquietly
+unquietness
+unraised
+unrak
+unread
+unready
+unreal
+unreasonable
+unreasonably
+unreclaimed
+unreconciled
+unreconciliable
+unrecounted
+unrecuring
+unregarded
+unregist
+unrelenting
+unremovable
+unremovably
+unreprievable
+unresolv
+unrespected
+unrespective
+unrest
+unrestor
+unrestrained
+unreveng
+unreverend
+unreverent
+unrevers
+unrewarded
+unrighteous
+unrightful
+unripe
+unripp
+unrivall
+unroll
+unroof
+unroosted
+unroot
+unrough
+unruly
+unsafe
+unsaluted
+unsanctified
+unsatisfied
+unsavoury
+unsay
+unscalable
+unscann
+unscarr
+unschool
+unscorch
+unscour
+unscratch
+unseal
+unseam
+unsearch
+unseason
+unseasonable
+unseasonably
+unseasoned
+unseconded
+unsecret
+unseduc
+unseeing
+unseeming
+unseemly
+unseen
+unseminar
+unseparable
+unserviceable
+unset
+unsettle
+unsettled
+unsever
+unsex
+unshak
+unshaked
+unshaken
+unshaped
+unshapes
+unsheath
+unsheathe
+unshorn
+unshout
+unshown
+unshrinking
+unshrubb
+unshunn
+unshunnable
+unsifted
+unsightly
+unsinew
+unsisting
+unskilful
+unskilfully
+unskillful
+unslipping
+unsmirched
+unsoil
+unsolicited
+unsorted
+unsought
+unsound
+unsounded
+unspeak
+unspeakable
+unspeaking
+unsphere
+unspoke
+unspoken
+unspotted
+unsquar
+unstable
+unstaid
+unstain
+unstained
+unstanched
+unstate
+unsteadfast
+unstooping
+unstringed
+unstuff
+unsubstantial
+unsuitable
+unsuiting
+unsullied
+unsunn
+unsur
+unsure
+unsuspected
+unsway
+unswayable
+unswayed
+unswear
+unswept
+unsworn
+untainted
+untalk
+untangle
+untangled
+untasted
+untaught
+untempering
+untender
+untent
+untented
+unthankful
+unthankfulness
+unthink
+unthought
+unthread
+unthrift
+unthrifts
+unthrifty
+untie
+untied
+until
+untimber
+untimely
+untir
+untirable
+untired
+untitled
+unto
+untold
+untouch
+untoward
+untowardly
+untraded
+untrain
+untrained
+untread
+untreasur
+untried
+untrimmed
+untrod
+untrodden
+untroubled
+untrue
+untrussing
+untruth
+untruths
+untucked
+untun
+untune
+untuneable
+untutor
+untutored
+untwine
+unurg
+unus
+unused
+unusual
+unvalued
+unvanquish
+unvarnish
+unveil
+unveiling
+unvenerable
+unvex
+unviolated
+unvirtuous
+unvisited
+unvulnerable
+unwares
+unwarily
+unwash
+unwatch
+unwearied
+unwed
+unwedgeable
+unweeded
+unweighed
+unweighing
+unwelcome
+unwept
+unwhipp
+unwholesome
+unwieldy
+unwilling
+unwillingly
+unwillingness
+unwind
+unwiped
+unwise
+unwisely
+unwish
+unwished
+unwitted
+unwittingly
+unwonted
+unwooed
+unworthier
+unworthiest
+unworthily
+unworthiness
+unworthy
+unwrung
+unyok
+unyoke
+up
+upbraid
+upbraided
+upbraidings
+upbraids
+uphoarded
+uphold
+upholdeth
+upholding
+upholds
+uplift
+uplifted
+upmost
+upon
+upper
+uprear
+upreared
+upright
+uprighteously
+uprightness
+uprise
+uprising
+uproar
+uproars
+uprous
+upshoot
+upshot
+upside
+upspring
+upstairs
+upstart
+upturned
+upward
+upwards
+urchin
+urchinfield
+urchins
+urg
+urge
+urged
+urgent
+urges
+urgest
+urging
+urinal
+urinals
+urine
+urn
+urns
+urs
+ursa
+ursley
+ursula
+urswick
+us
+usage
+usance
+usances
+use
+used
+useful
+useless
+user
+uses
+usest
+useth
+usher
+ushered
+ushering
+ushers
+using
+usual
+usually
+usurer
+usurers
+usuries
+usuring
+usurp
+usurpation
+usurped
+usurper
+usurpers
+usurping
+usurpingly
+usurps
+usury
+ut
+utensil
+utensils
+utility
+utmost
+utt
+utter
+utterance
+uttered
+uttereth
+uttering
+utterly
+uttermost
+utters
+uy
+v
+va
+vacancy
+vacant
+vacation
+vade
+vagabond
+vagabonds
+vagram
+vagrom
+vail
+vailed
+vailing
+vaillant
+vain
+vainer
+vainglory
+vainly
+vainness
+vais
+valanc
+valance
+vale
+valence
+valentine
+valentinus
+valentio
+valeria
+valerius
+vales
+valiant
+valiantly
+valiantness
+validity
+vallant
+valley
+valleys
+vally
+valor
+valorous
+valorously
+valour
+valu
+valuation
+value
+valued
+valueless
+values
+valuing
+vane
+vanish
+vanished
+vanishes
+vanishest
+vanishing
+vanities
+vanity
+vanquish
+vanquished
+vanquisher
+vanquishest
+vanquisheth
+vant
+vantage
+vantages
+vantbrace
+vapians
+vapor
+vaporous
+vapour
+vapours
+vara
+variable
+variance
+variation
+variations
+varied
+variest
+variety
+varld
+varlet
+varletry
+varlets
+varletto
+varnish
+varrius
+varro
+vary
+varying
+vassal
+vassalage
+vassals
+vast
+vastidity
+vasty
+vat
+vater
+vaudemont
+vaughan
+vault
+vaultages
+vaulted
+vaulting
+vaults
+vaulty
+vaumond
+vaunt
+vaunted
+vaunter
+vaunting
+vauntingly
+vaunts
+vauvado
+vaux
+vaward
+ve
+veal
+vede
+vehemence
+vehemency
+vehement
+vehor
+veil
+veiled
+veiling
+vein
+veins
+vell
+velure
+velutus
+velvet
+vendible
+venerable
+venereal
+venetia
+venetian
+venetians
+veneys
+venge
+vengeance
+vengeances
+vengeful
+veni
+venial
+venice
+venison
+venit
+venom
+venomous
+venomously
+vent
+ventages
+vented
+ventidius
+ventricle
+vents
+ventur
+venture
+ventured
+ventures
+venturing
+venturous
+venue
+venus
+venuto
+ver
+verb
+verba
+verbal
+verbatim
+verbosity
+verdict
+verdun
+verdure
+vere
+verefore
+verg
+verge
+vergers
+verges
+verier
+veriest
+verified
+verify
+verily
+veritable
+verite
+verities
+verity
+vermilion
+vermin
+vernon
+verona
+veronesa
+versal
+verse
+verses
+versing
+vert
+very
+vesper
+vessel
+vessels
+vestal
+vestments
+vesture
+vetch
+vetches
+veux
+vex
+vexation
+vexations
+vexed
+vexes
+vexest
+vexeth
+vexing
+vi
+via
+vial
+vials
+viand
+viands
+vic
+vicar
+vice
+vicegerent
+vicentio
+viceroy
+viceroys
+vices
+vici
+vicious
+viciousness
+vict
+victims
+victor
+victoress
+victories
+victorious
+victors
+victory
+victual
+victuall
+victuals
+videlicet
+video
+vides
+videsne
+vidi
+vie
+vied
+vienna
+view
+viewest
+vieweth
+viewing
+viewless
+views
+vigil
+vigilance
+vigilant
+vigitant
+vigour
+vii
+viii
+vile
+vilely
+vileness
+viler
+vilest
+vill
+village
+villager
+villagery
+villages
+villain
+villainies
+villainous
+villainously
+villains
+villainy
+villanies
+villanous
+villany
+villiago
+villian
+villianda
+villians
+vinaigre
+vincentio
+vincere
+vindicative
+vine
+vinegar
+vines
+vineyard
+vineyards
+vint
+vintner
+viol
+viola
+violate
+violated
+violates
+violation
+violator
+violence
+violent
+violenta
+violenteth
+violently
+violet
+violets
+viper
+viperous
+vipers
+vir
+virgilia
+virgin
+virginal
+virginalling
+virginity
+virginius
+virgins
+virgo
+virtue
+virtues
+virtuous
+virtuously
+visag
+visage
+visages
+visard
+viscount
+visible
+visibly
+vision
+visions
+visit
+visitation
+visitations
+visited
+visiting
+visitings
+visitor
+visitors
+visits
+visor
+vita
+vitae
+vital
+vitement
+vitruvio
+vitx
+viva
+vivant
+vive
+vixen
+viz
+vizaments
+vizard
+vizarded
+vizards
+vizor
+vlouting
+vocation
+vocativo
+vocatur
+voce
+voic
+voice
+voices
+void
+voided
+voiding
+voke
+volable
+volant
+volivorco
+volley
+volquessen
+volsce
+volsces
+volscian
+volscians
+volt
+voltemand
+volubility
+voluble
+volume
+volumes
+volumnia
+volumnius
+voluntaries
+voluntary
+voluptuously
+voluptuousness
+vomissement
+vomit
+vomits
+vor
+vore
+vortnight
+vot
+votaries
+votarist
+votarists
+votary
+votre
+vouch
+voucher
+vouchers
+vouches
+vouching
+vouchsaf
+vouchsafe
+vouchsafed
+vouchsafes
+vouchsafing
+voudrais
+vour
+vous
+voutsafe
+vow
+vowed
+vowel
+vowels
+vowing
+vows
+vox
+voyage
+voyages
+vraiment
+vulcan
+vulgar
+vulgarly
+vulgars
+vulgo
+vulnerable
+vulture
+vultures
+vurther
+w
+wad
+waddled
+wade
+waded
+wafer
+waft
+waftage
+wafting
+wafts
+wag
+wage
+wager
+wagers
+wages
+wagging
+waggish
+waggling
+waggon
+waggoner
+wagon
+wagoner
+wags
+wagtail
+wail
+wailful
+wailing
+wails
+wain
+wainropes
+wainscot
+waist
+wait
+waited
+waiter
+waiteth
+waiting
+waits
+wak
+wake
+waked
+wakefield
+waken
+wakened
+wakes
+wakest
+waking
+wales
+walk
+walked
+walking
+walks
+wall
+walled
+wallet
+wallets
+wallon
+walloon
+wallow
+walls
+walnut
+walter
+wan
+wand
+wander
+wanderer
+wanderers
+wandering
+wanders
+wands
+wane
+waned
+wanes
+waning
+wann
+want
+wanted
+wanteth
+wanting
+wanton
+wantonly
+wantonness
+wantons
+wants
+wappen
+war
+warble
+warbling
+ward
+warded
+warden
+warder
+warders
+wardrobe
+wardrop
+wards
+ware
+wares
+warily
+warkworth
+warlike
+warm
+warmed
+warmer
+warming
+warms
+warmth
+warn
+warned
+warning
+warnings
+warns
+warp
+warped
+warr
+warrant
+warranted
+warranteth
+warrantise
+warrantize
+warrants
+warranty
+warren
+warrener
+warring
+warrior
+warriors
+wars
+wart
+warwick
+warwickshire
+wary
+was
+wash
+washed
+washer
+washes
+washford
+washing
+wasp
+waspish
+wasps
+wassail
+wassails
+wast
+waste
+wasted
+wasteful
+wasters
+wastes
+wasting
+wat
+watch
+watched
+watchers
+watches
+watchful
+watching
+watchings
+watchman
+watchmen
+watchword
+water
+waterdrops
+watered
+waterfly
+waterford
+watering
+waterish
+waterpots
+waterrugs
+waters
+waterton
+watery
+wav
+wave
+waved
+waver
+waverer
+wavering
+waves
+waving
+waw
+wawl
+wax
+waxed
+waxen
+waxes
+waxing
+way
+waylaid
+waylay
+ways
+wayward
+waywarder
+waywardness
+we
+weak
+weaken
+weakens
+weaker
+weakest
+weakling
+weakly
+weakness
+weal
+wealsmen
+wealth
+wealthiest
+wealthily
+wealthy
+wealtlly
+wean
+weapon
+weapons
+wear
+wearer
+wearers
+wearied
+wearies
+weariest
+wearily
+weariness
+wearing
+wearisome
+wears
+weary
+weasel
+weather
+weathercock
+weathers
+weav
+weave
+weaver
+weavers
+weaves
+weaving
+web
+wed
+wedded
+wedding
+wedg
+wedged
+wedges
+wedlock
+wednesday
+weed
+weeded
+weeder
+weeding
+weeds
+weedy
+week
+weeke
+weekly
+weeks
+ween
+weening
+weep
+weeper
+weeping
+weepingly
+weepings
+weeps
+weet
+weigh
+weighed
+weighing
+weighs
+weight
+weightier
+weightless
+weights
+weighty
+weird
+welcom
+welcome
+welcomer
+welcomes
+welcomest
+welfare
+welkin
+well
+wells
+welsh
+welshman
+welshmen
+welshwomen
+wench
+wenches
+wenching
+wend
+went
+wept
+weraday
+were
+wert
+west
+western
+westminster
+westmoreland
+westward
+wet
+wether
+wetting
+wezand
+whale
+whales
+wharf
+wharfs
+what
+whate
+whatever
+whatsoe
+whatsoever
+whatsome
+whe
+wheat
+wheaten
+wheel
+wheeling
+wheels
+wheer
+wheeson
+wheezing
+whelk
+whelks
+whelm
+whelp
+whelped
+whelps
+when
+whenas
+whence
+whencesoever
+whene
+whenever
+whensoever
+where
+whereabout
+whereas
+whereat
+whereby
+wherefore
+wherein
+whereinto
+whereof
+whereon
+whereout
+whereso
+wheresoe
+wheresoever
+wheresome
+whereto
+whereuntil
+whereunto
+whereupon
+wherever
+wherewith
+wherewithal
+whet
+whether
+whetstone
+whetted
+whew
+whey
+which
+whiff
+whiffler
+while
+whiles
+whilst
+whin
+whine
+whined
+whinid
+whining
+whip
+whipp
+whippers
+whipping
+whips
+whipster
+whipstock
+whipt
+whirl
+whirled
+whirligig
+whirling
+whirlpool
+whirls
+whirlwind
+whirlwinds
+whisp
+whisper
+whispering
+whisperings
+whispers
+whist
+whistle
+whistles
+whistling
+whit
+white
+whitehall
+whitely
+whiteness
+whiter
+whites
+whitest
+whither
+whiting
+whitmore
+whitsters
+whitsun
+whittle
+whizzing
+who
+whoa
+whoe
+whoever
+whole
+wholesom
+wholesome
+wholly
+whom
+whoobub
+whoop
+whooping
+whor
+whore
+whoremaster
+whoremasterly
+whoremonger
+whores
+whoreson
+whoresons
+whoring
+whorish
+whose
+whoso
+whosoe
+whosoever
+why
+wi
+wick
+wicked
+wickednes
+wickedness
+wicket
+wicky
+wid
+wide
+widens
+wider
+widow
+widowed
+widower
+widowhood
+widows
+wield
+wife
+wight
+wights
+wild
+wildcats
+wilder
+wilderness
+wildest
+wildfire
+wildly
+wildness
+wilds
+wiles
+wilful
+wilfull
+wilfully
+wilfulnes
+wilfulness
+will
+willed
+willers
+willeth
+william
+williams
+willing
+willingly
+willingness
+willoughby
+willow
+wills
+wilt
+wiltshire
+wimpled
+win
+wince
+winch
+winchester
+wincot
+wind
+winded
+windgalls
+winding
+windlasses
+windmill
+window
+windows
+windpipe
+winds
+windsor
+windy
+wine
+wing
+winged
+wingfield
+wingham
+wings
+wink
+winking
+winks
+winner
+winners
+winning
+winnow
+winnowed
+winnows
+wins
+winter
+winterly
+winters
+wip
+wipe
+wiped
+wipes
+wiping
+wire
+wires
+wiry
+wisdom
+wisdoms
+wise
+wiselier
+wisely
+wiser
+wisest
+wish
+wished
+wisher
+wishers
+wishes
+wishest
+wisheth
+wishful
+wishing
+wishtly
+wisp
+wist
+wit
+witb
+witch
+witchcraft
+witches
+witching
+with
+withal
+withdraw
+withdrawing
+withdrawn
+withdrew
+wither
+withered
+withering
+withers
+withheld
+withhold
+withholds
+within
+withold
+without
+withstand
+withstanding
+withstood
+witless
+witness
+witnesses
+witnesseth
+witnessing
+wits
+witted
+wittenberg
+wittiest
+wittily
+witting
+wittingly
+wittol
+wittolly
+witty
+wiv
+wive
+wived
+wives
+wiving
+wizard
+wizards
+wo
+woe
+woeful
+woefull
+woefullest
+woes
+woful
+wolf
+wolfish
+wolsey
+wolves
+wolvish
+woman
+womanhood
+womanish
+womankind
+womanly
+womb
+wombs
+womby
+women
+won
+woncot
+wond
+wonder
+wondered
+wonderful
+wonderfully
+wondering
+wonders
+wondrous
+wondrously
+wont
+wonted
+woo
+wood
+woodbine
+woodcock
+woodcocks
+wooden
+woodland
+woodman
+woodmonger
+woods
+woodstock
+woodville
+wooed
+wooer
+wooers
+wooes
+woof
+wooing
+wooingly
+wool
+woollen
+woolly
+woolsack
+woolsey
+woolward
+woos
+wor
+worcester
+word
+words
+wore
+worins
+work
+workers
+working
+workings
+workman
+workmanly
+workmanship
+workmen
+works
+worky
+world
+worldlings
+worldly
+worlds
+worm
+worms
+wormwood
+wormy
+worn
+worried
+worries
+worry
+worrying
+worse
+worser
+worship
+worshipful
+worshipfully
+worshipp
+worshipper
+worshippers
+worshippest
+worships
+worst
+worsted
+wort
+worth
+worthied
+worthier
+worthies
+worthiest
+worthily
+worthiness
+worthless
+worths
+worthy
+worts
+wot
+wots
+wotting
+wouid
+would
+wouldest
+wouldst
+wound
+wounded
+wounding
+woundings
+woundless
+wounds
+wouns
+woven
+wow
+wrack
+wrackful
+wrangle
+wrangler
+wranglers
+wrangling
+wrap
+wrapp
+wraps
+wrapt
+wrath
+wrathful
+wrathfully
+wraths
+wreak
+wreakful
+wreaks
+wreath
+wreathed
+wreathen
+wreaths
+wreck
+wrecked
+wrecks
+wren
+wrench
+wrenching
+wrens
+wrest
+wrested
+wresting
+wrestle
+wrestled
+wrestler
+wrestling
+wretch
+wretchcd
+wretched
+wretchedness
+wretches
+wring
+wringer
+wringing
+wrings
+wrinkle
+wrinkled
+wrinkles
+wrist
+wrists
+writ
+write
+writer
+writers
+writes
+writhled
+writing
+writings
+writs
+written
+wrong
+wronged
+wronger
+wrongful
+wrongfully
+wronging
+wrongly
+wrongs
+wronk
+wrote
+wroth
+wrought
+wrung
+wry
+wrying
+wt
+wul
+wye
+x
+xanthippe
+xi
+xii
+xiii
+xiv
+xv
+y
+yard
+yards
+yare
+yarely
+yarn
+yaughan
+yaw
+yawn
+yawning
+ycleped
+ycliped
+ye
+yea
+yead
+year
+yearly
+yearn
+yearns
+years
+yeas
+yeast
+yedward
+yell
+yellow
+yellowed
+yellowing
+yellowness
+yellows
+yells
+yelping
+yeoman
+yeomen
+yerk
+yes
+yesterday
+yesterdays
+yesternight
+yesty
+yet
+yew
+yicld
+yield
+yielded
+yielder
+yielders
+yielding
+yields
+yok
+yoke
+yoked
+yokefellow
+yokes
+yoketh
+yon
+yond
+yonder
+yongrey
+yore
+yorick
+york
+yorkists
+yorks
+yorkshire
+you
+young
+younger
+youngest
+youngling
+younglings
+youngly
+younker
+your
+yours
+yourself
+yourselves
+youth
+youthful
+youths
+youtli
+zanies
+zany
+zeal
+zealous
+zeals
+zed
+zenelophon
+zenith
+zephyrs
+zir
+zo
+zodiac
+zodiacs
+zone
+zounds
+zwagger
index 92d039a15df894293dc23138870352ac9302820a..bcd91a4d942a5970be9c6c61f04e5ca71ae51638 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2003, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays byte-arrays generic hashtables io assocs
-kernel math namespaces make sequences strings sbufs io.styles
-vectors words prettyprint.config prettyprint.custom
-prettyprint.sections quotations io io.files math.parser effects
+kernel math namespaces make sequences strings sbufs vectors
+words prettyprint.config prettyprint.custom prettyprint.sections
+quotations io io.pathnames io.styles math.parser effects
 classes.tuple math.order classes.tuple.private classes
 combinators colors ;
 IN: prettyprint.backend
index 46d4e6e5ff5dbcd31ac4b78864effb8b585a41c2..1e372d7cc0250ecfd26875715b86918cde335fe5 100644 (file)
@@ -193,11 +193,11 @@ HELP: unparse
 
 HELP: pprint-short
 { $values { "obj" object } }
-{ $description "Prettyprints an object to " { $link output-stream } ". This word rebinds printer control variables to enforce ``shorter'' output. See " { $link "prettyprint-variables" } "." } ;
+{ $description "Prettyprints an object to " { $link output-stream } ". This word rebinds printer control variables to enforce â€œshorter†output. See " { $link "prettyprint-variables" } "." } ;
 
 HELP: short.
 { $values { "obj" object } }
-{ $description "Prettyprints an object to " { $link output-stream } " with a trailing line break. This word rebinds printer control variables to enforce ``shorter'' output." } ;
+{ $description "Prettyprints an object to " { $link output-stream } " with a trailing line break. This word rebinds printer control variables to enforce â€œshorter†output." } ;
 
 HELP: .b
 { $values { "n" "an integer" } }
index 648c7079677ac0dbbd45972ef30e893ce0ceac55..b1239086d7d74ec238695fe47d2b1c3fd0180a9d 100644 (file)
@@ -3,7 +3,7 @@ kernel math namespaces parser prettyprint prettyprint.config
 prettyprint.sections sequences tools.test vectors words
 effects splitting generic.standard prettyprint.private
 continuations generic compiler.units tools.walker eval
-accessors make ;
+accessors make vocabs.parser ;
 IN: prettyprint.tests
 
 [ "4" ] [ 4 unparse ] unit-test
index 9d5af9e6a5afaeb47499a88cd248460d884d16d2..95f05c21ffbdff0a24b9413ffd26dfa71ce62951 100644 (file)
@@ -2,13 +2,13 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays generic generic.standard assocs io kernel math
 namespaces make sequences strings io.styles io.streams.string
-vectors words prettyprint.backend prettyprint.custom
+vectors words words.symbol prettyprint.backend prettyprint.custom
 prettyprint.sections prettyprint.config sorting splitting
 grouping math.parser vocabs definitions effects classes.builtin
-classes.tuple io.files classes continuations hashtables
+classes.tuple io.pathnames classes continuations hashtables
 classes.mixin classes.union classes.intersection
 classes.predicate classes.singleton combinators quotations sets
-accessors colors parser summary ;
+accessors colors parser summary vocabs.parser ;
 IN: prettyprint
 
 : make-pprint ( obj quot -- block in use )
@@ -248,7 +248,8 @@ GENERIC: declarations. ( obj -- )
 M: object declarations. drop ;
 
 : declaration. ( word prop -- )
-    tuck name>> word-prop [ pprint-word ] [ drop ] if ;
+    [ nip ] [ name>> word-prop ] 2bi
+    [ pprint-word ] [ drop ] if ;
 
 M: word declarations.
     {
@@ -357,12 +358,12 @@ M: builtin-class see-class*
     ] when drop ;
 
 M: word see
-    dup see-class
-    dup class? over symbol? not and [
-        nl
-    ] when
-    dup [ class? ] [ symbol? ] bi and
-    [ drop ] [ call-next-method ] if ;
+    [ see-class ]
+    [ [ class? ] [ symbol? not ] bi and [ nl ] when ]
+    [
+        dup [ class? ] [ symbol? ] bi and
+        [ drop ] [ call-next-method ] if
+    ] tri ;
 
 : see-all ( seq -- )
     natural-sort [ nl ] [ see ] interleave ;
index 102d005f39e498682386f5d31a20db27b605b12c..faa254be6914688fc8afe28a9e2cfcf6b00142bc 100644 (file)
@@ -3,7 +3,7 @@
 USING: arrays generic hashtables io kernel math assocs
 namespaces make sequences strings io.styles vectors words
 prettyprint.config splitting classes continuations
-io.streams.nested accessors sets ;
+accessors sets ;
 IN: prettyprint.sections
 
 ! State
diff --git a/basis/qualified/authors.txt b/basis/qualified/authors.txt
deleted file mode 100644 (file)
index f990dd0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Daniel Ehrenberg
diff --git a/basis/qualified/qualified-docs.factor b/basis/qualified/qualified-docs.factor
deleted file mode 100644 (file)
index 828d811..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-USING: help.markup help.syntax ;
-IN: qualified
-
-HELP: QUALIFIED:
-{ $syntax "QUALIFIED: vocab" }
-{ $description "Similar to " { $link POSTPONE: USE: } " but loads vocabulary with prefix." }
-{ $examples { $example
-    "USING: prettyprint qualified ;"
-    "QUALIFIED: math"
-    "1 2 math:+ ." "3"
-} } ;
-
-HELP: QUALIFIED-WITH:
-{ $syntax "QUALIFIED-WITH: vocab word-prefix" }
-{ $description "Works like " { $link POSTPONE: QUALIFIED: } " but uses " { $snippet "word-prefix" } " as prefix." }
-{ $examples { $code
-    "USING: prettyprint qualified ;"
-    "QUALIFIED-WITH: math m"
-    "1 2 m:+ ."
-    "3"
-} } ;
-
-HELP: FROM:
-{ $syntax "FROM: vocab => words ... ;" }
-{ $description "Imports " { $snippet "words" } " from " { $snippet "vocab" } "." }
-{ $examples { $code
-    "FROM: math.parser => bin> hex> ; ! imports only bin> and hex>" } } ;
-
-HELP: EXCLUDE:
-{ $syntax "EXCLUDE: vocab => words ... ;" }
-{ $description "Imports everything from " { $snippet "vocab" } " excluding " { $snippet "words" } "." }
-{ $examples { $code
-    "EXCLUDE: math.parser => bin> hex> ; ! imports everything but bin> and hex>" } } ;
-
-HELP: RENAME:
-{ $syntax "RENAME: word vocab => newname " }
-{ $description "Imports " { $snippet "word" } " from " { $snippet "vocab" } ", but renamed to " { $snippet "newname" } "." }
-{ $examples { $example
-    "USING: prettyprint qualified ;"
-    "RENAME: + math => -"
-    "2 3 - ."
-    "5"
-} } ;
-
-ARTICLE: "qualified" "Qualified word lookup"
-"The " { $vocab-link "qualified" } " vocabulary provides a handful of parsing words which give more control over word lookup than is offered by " { $link POSTPONE: USE: } " and " { $link POSTPONE: USING: } "."
-$nl
-"These words are useful when there is no way to avoid using two vocabularies with identical word names in the same source file."
-{ $subsection POSTPONE: QUALIFIED: }
-{ $subsection POSTPONE: QUALIFIED-WITH: }
-{ $subsection POSTPONE: FROM: }
-{ $subsection POSTPONE: EXCLUDE: }
-{ $subsection POSTPONE: RENAME: } ;
-
-ABOUT: "qualified"
diff --git a/basis/qualified/qualified-tests.factor b/basis/qualified/qualified-tests.factor
deleted file mode 100644 (file)
index 78efec4..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-USING: tools.test qualified eval accessors parser ;
-IN: qualified.tests.foo
-: x 1 ;
-: y 5 ;
-IN: qualified.tests.bar
-: x 2 ;
-: y 4 ;
-IN: qualified.tests.baz
-: x 3 ;
-
-QUALIFIED: qualified.tests.foo
-QUALIFIED: qualified.tests.bar
-[ 1 2 3 ] [ qualified.tests.foo:x qualified.tests.bar:x x ] unit-test
-
-QUALIFIED-WITH: qualified.tests.bar p
-[ 2 ] [ p:x ] unit-test
-
-RENAME: x qualified.tests.baz => y
-[ 3 ] [ y ] unit-test
-
-FROM: qualified.tests.baz => x ;
-[ 3 ] [ x ] unit-test
-[ 3 ] [ y ] unit-test
-
-EXCLUDE: qualified.tests.bar => x ;
-[ 3 ] [ x ] unit-test
-[ 4 ] [ y ] unit-test
-
-[ "USE: qualified IN: qualified.tests FROM: qualified.tests => doesnotexist ;" eval ]
-[ error>> no-word-error? ] must-fail-with
-
-[ "USE: qualified IN: qualified.tests RENAME: doesnotexist qualified.tests => blah" eval ]
-[ error>> no-word-error? ] must-fail-with
diff --git a/basis/qualified/qualified.factor b/basis/qualified/qualified.factor
deleted file mode 100644 (file)
index 2cd64e9..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-! Copyright (C) 2007, 2008 Daniel Ehrenberg.
-! See http://factorcode.org/license.txt for BSD license.
-USING: kernel sequences assocs hashtables parser lexer
-vocabs words namespaces vocabs.loader sets fry ;
-IN: qualified
-
-: define-qualified ( vocab-name prefix-name -- )
-    [ load-vocab vocab-words ] [ CHAR: : suffix ] bi*
-    '[ [ [ _ ] dip append ] dip ] assoc-map
-    use get push ;
-
-: QUALIFIED:
-    #! Syntax: QUALIFIED: vocab
-    scan dup define-qualified ; parsing
-
-: QUALIFIED-WITH:
-    #! Syntax: QUALIFIED-WITH: vocab prefix
-    scan scan define-qualified ; parsing
-
-: partial-vocab ( words vocab -- assoc )
-    '[ dup _ lookup [ no-word-error ] unless* ]
-    { } map>assoc ;
-
-: FROM:
-    #! Syntax: FROM: vocab => words... ;
-    scan dup load-vocab drop "=>" expect
-    ";" parse-tokens swap partial-vocab use get push ; parsing
-
-: partial-vocab-excluding ( words vocab -- assoc )
-    [ load-vocab vocab-words keys swap diff ] keep partial-vocab ;
-
-: EXCLUDE:
-    #! Syntax: EXCLUDE: vocab => words ... ;
-    scan "=>" expect
-    ";" parse-tokens swap partial-vocab-excluding use get push ; parsing
-
-: RENAME:
-    #! Syntax: RENAME: word vocab => newname
-    scan scan dup load-vocab drop
-    dupd lookup [ ] [ no-word-error ] ?if
-    "=>" expect
-    scan associate use get push ; parsing
-
diff --git a/basis/qualified/summary.txt b/basis/qualified/summary.txt
deleted file mode 100644 (file)
index 94b44c6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Qualified naming for vocabularies
diff --git a/basis/qualified/tags.txt b/basis/qualified/tags.txt
deleted file mode 100644 (file)
index f427429..0000000
+++ /dev/null
@@ -1 +0,0 @@
-extensions
diff --git a/basis/quoted-printable/authors.txt b/basis/quoted-printable/authors.txt
new file mode 100644 (file)
index 0000000..f990dd0
--- /dev/null
@@ -0,0 +1 @@
+Daniel Ehrenberg
diff --git a/basis/quoted-printable/quoted-printable-docs.factor b/basis/quoted-printable/quoted-printable-docs.factor
new file mode 100644 (file)
index 0000000..81219a3
--- /dev/null
@@ -0,0 +1,27 @@
+! Copyright (C) 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax strings byte-arrays io.encodings.string ;
+IN: quoted-printable
+
+ABOUT: "quoted-printable"
+
+ARTICLE: "quoted-printable" "Quoted printable encoding"
+"The " { $vocab-link "quoted-printable" } " vocabulary implements RFC 2045 part 6.7, providing words for reading and generating quotable printed text."
+{ $subsection >quoted }
+{ $subsection >quoted-lines }
+{ $subsection quoted> } ;
+
+HELP: >quoted
+{ $values { "byte-array" byte-array } { "string" string } }
+{ $description "Encodes a byte array as quoted printable, on a single line." }
+{ $warning "To encode a string in quoted printable, first use the " { $link encode } " word." } ;
+
+HELP: >quoted-lines
+{ $values { "byte-array" byte-array } { "string" string } }
+{ $description "Encodes a byte array as quoted printable, with soft line breaks inserted so the output lines are no longer than 76 characters." }
+{ $warning "To encode a string in quoted printable, first use the " { $link encode } " word with a specific encoding." } ;
+
+HELP: quoted>
+{ $values { "string" string } { "byte-array" byte-array } }
+{ $description "Decodes a quoted printable string into an array of the bytes represented." }
+{ $warning "When decoding something in quoted printable form and using it as a string, be sure to use the " { $link decode } " word rather than simply converting the byte array to a string." } ;
diff --git a/basis/quoted-printable/quoted-printable-tests.factor b/basis/quoted-printable/quoted-printable-tests.factor
new file mode 100644 (file)
index 0000000..6f42a48
--- /dev/null
@@ -0,0 +1,30 @@
+! Copyright (C) 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: tools.test quoted-printable multiline io.encodings.string
+sequences io.encodings.8-bit splitting kernel ;
+IN: quoted-printable.tests
+
+[ <" José was the
+person who knew how to write the letters:
+    Å‘ and Ã¼ 
+and we didn't know hów tö do thât"> ]
+[ <" Jos=E9 was the
+person who knew how to write the letters:
+    =F5 and =FC=20
+and w=
+e didn't know h=F3w t=F6 do th=E2t"> quoted> latin2 decode ] unit-test
+
+[ <" Jos=E9 was the=0Aperson who knew how to write the letters:=0A    =F5 and =FC=0Aand we didn't know h=F3w t=F6 do th=E2t"> ]
+[ <" José was the
+person who knew how to write the letters:
+    Å‘ and Ã¼
+and we didn't know hów tö do thât"> latin2 encode >quoted ] unit-test
+
+: message ( -- str )
+    55 [ "hello" ] replicate concat ;
+
+[ f ] [ message >quoted "=\r\n" swap subseq? ] unit-test
+[ 1 ] [ message >quoted string-lines length ] unit-test
+[ t ] [ message >quoted-lines "=\r\n" swap subseq? ] unit-test
+[ 4 ] [ message >quoted-lines string-lines length ] unit-test
+[ "===o" ] [ message >quoted-lines string-lines [ peek ] "" map-as ] unit-test
diff --git a/basis/quoted-printable/quoted-printable.factor b/basis/quoted-printable/quoted-printable.factor
new file mode 100644 (file)
index 0000000..83fee52
--- /dev/null
@@ -0,0 +1,62 @@
+! Copyright (C) 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: sequences strings kernel io.encodings.string
+math.order ascii math io io.encodings.utf8 io.streams.string
+combinators.short-circuit math.parser arrays ;
+IN: quoted-printable
+
+! This implements RFC 2045 section 6.7
+
+<PRIVATE
+
+: assure-small ( ch -- ch )
+    dup 256 <
+    [ "Cannot quote a character greater than 255" throw ] unless ;
+
+: printable? ( ch -- ? )
+    {
+        [ CHAR: \s CHAR: < between? ]
+        [ CHAR: > CHAR: ~ between? ]
+        [ CHAR: \t = ]
+    } 1|| ;
+
+: char>quoted ( ch -- str )
+    dup printable? [ 1string ] [
+        assure-small >hex >upper
+        2 CHAR: 0 pad-left 
+        CHAR: = prefix
+    ] if ;
+
+: take-some ( seqs -- seqs seq )
+    0 over [ length + dup 76 >= ] find drop nip
+    [ 1- cut-slice swap ] [ f swap ] if* concat ;
+
+: divide-lines ( strings -- strings )
+    [ dup ] [ take-some ] [ ] produce nip ;
+
+PRIVATE>
+
+: >quoted ( byte-array -- string )
+    [ char>quoted ] { } map-as concat "" like ;
+
+: >quoted-lines ( byte-array -- string )
+    [ char>quoted ] { } map-as
+    divide-lines "=\r\n" join ;
+
+<PRIVATE
+
+: read-char ( byte -- ch )
+    dup CHAR: = = [
+       drop read1 dup CHAR: \n =
+       [ drop read1 read-char ]
+       [ read1 2array hex> ] if
+    ] when ;
+
+: read-quoted ( -- bytes )
+    [ read1 dup ] [ read-char ] [ drop ] B{ } produce-as ;
+
+PRIVATE>
+
+: quoted> ( string -- byte-array )
+    ! Input should already be normalized to make \r\n into \n
+    [ read-quoted ] with-string-reader ;
diff --git a/basis/quoted-printable/summary.txt b/basis/quoted-printable/summary.txt
new file mode 100644 (file)
index 0000000..c32ac1f
--- /dev/null
@@ -0,0 +1 @@
+Quoted printable encoding/decoding
diff --git a/basis/quoted-printable/tags.txt b/basis/quoted-printable/tags.txt
new file mode 100644 (file)
index 0000000..8fd3ecc
--- /dev/null
@@ -0,0 +1,2 @@
+parsing
+web
index 18c9ca781c5cae8ce46872f5c7b00e55f8023aa2..01b389c19ccc19ab76754fb2724ad9e947268cff 100755 (executable)
@@ -73,7 +73,7 @@ ARTICLE: "random-protocol" "Random protocol"
 ARTICLE: "random" "Generating random integers"
 "The " { $vocab-link "random" } " vocabulary contains a protocol for generating random or pseudorandom numbers."
 $nl
-"The ``Mersenne Twister'' pseudorandom number generator algorithm is the default generator stored in " { $link random-generator } "."
+"The â€œMersenne Twister†pseudorandom number generator algorithm is the default generator stored in " { $link random-generator } "."
 $nl
 "Generate a random object:"
 { $subsection random }
index 5c93606ab5eda41355a9feb93317b736c7f268b4..554ed5c96a8d85d807d070aedc6e5cf74daeafa6 100755 (executable)
@@ -2,7 +2,8 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien.c-types kernel math namespaces sequences
 io.backend io.binary combinators system vocabs.loader
-summary math.bitwise byte-vectors fry byte-arrays ;
+summary math.bitwise byte-vectors fry byte-arrays
+math.ranges ;
 IN: random
 
 SYMBOL: system-random-generator
@@ -51,6 +52,9 @@ PRIVATE>
         [ length random-integer ] keep nth
     ] if-empty ;
 
+: randomize ( seq -- seq' )
+    dup length 1 (a,b] [ dup random pick exchange ] each ;
+
 : delete-random ( seq -- elt )
     [ length random-integer ] keep [ nth ] 2keep delete-nth ;
 
index 0034b7e566df7be2462f36053b2eb0464dd1c540..b6f222cce98c6062f8f1da3d2c2b5f43fd729f4e 100644 (file)
@@ -14,7 +14,7 @@ ARTICLE: "refs" "References to assoc entries"
 "References to values:"
 { $subsection value-ref }
 { $subsection <value-ref> }
-"References are used by the inspector." ;
+"References are used by the UI inspector." ;
 
 ABOUT: "refs"
 
index 81a2338b8ffb477ddc4e3c89b19affba181c26d2..5f21dad7760c2dd91d153adcc6ca895016df9ab5 100644 (file)
@@ -5,7 +5,7 @@ IN: refs
 
 TUPLE: ref assoc key ;
 
-: >ref< [ key>> ] [ assoc>> ] bi ; inline
+: >ref< ( ref -- key value ) [ key>> ] [ assoc>> ] bi ; inline
 
 : delete-ref ( ref -- ) >ref< delete-at ;
 GENERIC: get-ref ( ref -- obj )
index eec0d309b15e93ac526c7d3a90ba9f1cffbca5ad..4a807fa51bbc0f815282c086e77d136517707b69 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors kernel math math.order symbols 
-words regexp.utils unicode.categories combinators.short-circuit ;
+USING: accessors kernel math math.order words regexp.utils
+unicode.categories combinators.short-circuit ;
 IN: regexp.classes
 
 SINGLETONS: any-char any-char-no-nl
index 0abd1c2edc5dc243c27c6634c686df9518495e7e..549669cab727328eabd5fd6244d247fb52495160 100644 (file)
@@ -57,7 +57,7 @@ IN: regexp.dfa
     dup
     [ nfa-table>> final-states>> keys ]
     [ dfa-table>> transitions>> states ] bi
-    [ intersect empty? not ] with filter
+    [ intersects? ] with filter
 
     swap dfa-table>> final-states>>
     [ conjoin ] curry each ;
@@ -72,7 +72,7 @@ IN: regexp.dfa
     dup
     [ nfa-traversal-flags>> ]
     [ dfa-table>> transitions>> keys ] bi
-    [ tuck [ swap at ] with map concat ] with H{ } map>assoc
+    [ [ nip ] [ [ swap at ] with map concat ] 2bi ] with H{ } map>assoc
     >>dfa-traversal-flags drop ;
 
 : construct-dfa ( regexp -- )
index 76206529487107df89bc84bd75d26c8fc480cd3e..537c85c2d3b20acfd305a3903bab4b27a3a08667 100644 (file)
@@ -3,9 +3,14 @@
 USING: accessors arrays assocs grouping kernel regexp.backend
 locals math namespaces regexp.parser sequences fry quotations
 math.order math.ranges vectors unicode.categories regexp.utils
-regexp.transition-tables words sets regexp.classes unicode.case ;
+regexp.transition-tables words sets regexp.classes unicode.case.private ;
+! This uses unicode.case.private for ch>upper and ch>lower
+! but case-insensitive matching should be done by case-folding everything
+! before processing starts
 IN: regexp.nfa
 
+ERROR: feature-is-broken feature ;
+
 SYMBOL: negation-mode
 : negated? ( -- ? ) negation-mode get 0 or odd? ; 
 
@@ -160,6 +165,8 @@ M: LETTER-class nfa-node ( node -- )
 
 M: character-class-range nfa-node ( node -- )
     case-insensitive option? [
+        ! This should be implemented for Unicode by case-folding
+        ! the input and all strings in the regexp.
         dup [ from>> ] [ to>> ] bi
         2dup [ Letter? ] bi@ and [
             rot drop
@@ -176,6 +183,7 @@ M: character-class-range nfa-node ( node -- )
     ] if ;
 
 M: capture-group nfa-node ( node -- )
+    "capture-groups" feature-is-broken
     eps literal-transition add-simple-entry
     capture-group-on add-traversal-flag
     term>> nfa-node
@@ -196,6 +204,7 @@ M: negation nfa-node ( node -- )
     negation-mode dec ;
 
 M: lookahead nfa-node ( node -- )
+    "lookahead" feature-is-broken
     eps literal-transition add-simple-entry
     lookahead-on add-traversal-flag
     term>> nfa-node
@@ -204,6 +213,7 @@ M: lookahead nfa-node ( node -- )
     2 [ concatenate-nodes ] times ;
 
 M: lookbehind nfa-node ( node -- )
+    "lookbehind" feature-is-broken
     eps literal-transition add-simple-entry
     lookbehind-on add-traversal-flag
     term>> nfa-node
index 4d8f3ddfbc7e29c96a7e20880a9b7d63b88a566d..377535eccd1aac074ac4b39bbfc18472c860bcc5 100644 (file)
@@ -1,10 +1,10 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays assocs combinators io io.streams.string
-kernel math math.parser namespaces qualified sets
-quotations sequences splitting symbols vectors math.order
-unicode.categories strings regexp.backend regexp.utils
-unicode.case words locals regexp.classes ;
+kernel math math.parser namespaces sets
+quotations sequences splitting vectors math.order
+strings regexp.backend regexp.utils
+unicode.case unicode.categories words locals regexp.classes ;
 IN: regexp.parser
 
 FROM: math.ranges => [a,b] ;
@@ -63,7 +63,7 @@ left-parenthesis pipe caret dash ;
 : cut-out ( vector n -- vector' vector ) cut rest ;
 ERROR: cut-stack-error ;
 : cut-stack ( obj vector -- vector' vector )
-    tuck last-index [ cut-stack-error ] unless* cut-out swap ;
+    [ nip ] [ last-index ] 2bi [ cut-stack-error ] unless* cut-out swap ;
 
 : <possessive-kleene-star> ( obj -- kleene ) possessive-kleene-star boa ;
 : <reluctant-kleene-star> ( obj -- kleene ) reluctant-kleene-star boa ;
@@ -261,7 +261,7 @@ ERROR: bad-escaped-literals seq ;
     parse-til-E
     drop1
     [ epsilon ] [
-        [ quot call <constant> ] V{ } map-as
+        quot call [ <constant> ] V{ } map-as
         first|concatenation
     ] if-empty ; inline
 
@@ -269,10 +269,10 @@ ERROR: bad-escaped-literals seq ;
     [ ] (parse-escaped-literals) ;
 
 : lower-case-literals ( -- obj )
-    [ ch>lower ] (parse-escaped-literals) ;
+    [ >lower ] (parse-escaped-literals) ;
 
 : upper-case-literals ( -- obj )
-    [ ch>upper ] (parse-escaped-literals) ;
+    [ >upper ] (parse-escaped-literals) ;
 
 : parse-escaped ( -- obj )
     read1
index 74f06ed65be1ef7daa9ba96058dbc1db088b033c..1cd9a2392efc87e1646eb52b17ec24fda88b67e1 100644 (file)
@@ -1,5 +1,5 @@
 USING: regexp tools.test kernel sequences regexp.parser
-regexp.traversal eval strings ;
+regexp.traversal eval strings multiline ;
 IN: regexp-tests
 
 \ <regexp> must-infer
@@ -76,6 +76,8 @@ IN: regexp-tests
 [ t ] [ "bar" "foo|bar" <regexp> matches? ] unit-test
 [ f ] [ "foobar" "foo|bar" <regexp> matches? ] unit-test
 
+/*
+! FIXME
 [ f ] [ "" "(a)" <regexp> matches? ] unit-test
 [ t ] [ "a" "(a)" <regexp> matches? ] unit-test
 [ f ] [ "aa" "(a)" <regexp> matches? ] unit-test
@@ -83,6 +85,7 @@ IN: regexp-tests
 
 [ f ] [ "aababaaabbac" "(a|b)+" <regexp> matches? ] unit-test
 [ t ] [ "ababaaabba" "(a|b)+" <regexp> matches? ] unit-test
+*/
 
 [ f ] [ "" "a{1}" <regexp> matches? ] unit-test
 [ t ] [ "a" "a{1}" <regexp> matches? ] unit-test
@@ -165,9 +168,12 @@ IN: regexp-tests
 [ f ] [ "0" "[^\\d]" <regexp> matches? ] unit-test
 [ t ] [ "a" "[^\\d]" <regexp> matches? ] unit-test
 
+/*
+! FIXME
 [ t ] [ "a" "[a-z]{1,}|[A-Z]{2,4}|b*|c|(f|g)*" <regexp> matches? ] unit-test
 [ t ] [ "a" "[a-z]{1,2}|[A-Z]{3,3}|b*|c|(f|g)*" <regexp> matches? ] unit-test
 [ t ] [ "a" "[a-z]{1,2}|[A-Z]{3,3}" <regexp> matches? ] unit-test
+*/
 
 [ t ] [ "1000" "\\d{4,6}" <regexp> matches? ] unit-test
 [ t ] [ "1000" "[0-9]{4,6}" <regexp> matches? ] unit-test
@@ -238,7 +244,7 @@ IN: regexp-tests
 
 [ t ] [ "abc" <reversed> R/ abc/r matches? ] unit-test
 [ t ] [ "abc" <reversed> R/ a[bB][cC]/r matches? ] unit-test
-[ t ] [ "adcbe" R/ a(?r)(bcd)(?-r)e/ matches? ] unit-test
+! [ t ] [ "adcbe" R/ a(?r)(bcd)(?-r)e/ matches? ] unit-test ! FIXME
 
 [ t ] [ "s@f" "[a-z.-]@[a-z]" <regexp> matches? ] unit-test
 [ f ] [ "a" "[a-z.-]@[a-z]" <regexp> matches? ] unit-test
@@ -247,6 +253,8 @@ IN: regexp-tests
 [ t ] [ "abc*" "[^\\*]*\\*" <regexp> matches? ] unit-test
 [ t ] [ "bca" "[^a]*a" <regexp> matches? ] unit-test
 
+/*
+! FIXME
 [ ] [
     "(0[lL]?|[1-9]\\d{0,9}(\\d{0,9}[lL])?|0[xX]\\p{XDigit}{1,8}(\\p{XDigit}{0,8}[lL])?|0[0-7]{1,11}([0-7]{0,11}[lL])?|([0-9]+\\.[0-9]*|\\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?|[0-9]+([eE][+-]?[0-9]+[fFdD]?|([eE][+-]?[0-9]+)?[fFdD]))"
     <regexp> drop
@@ -270,6 +278,7 @@ IN: regexp-tests
 [ "abc" ] [ "abc" "(ab|a)(bc)?" <regexp> first-match >string ] unit-test
 
 [ "b" ] [ "aaaaaaaaaaaaaaaaaaaaaaab" "((a*)*b)*b" <regexp> first-match >string ] unit-test
+*/
 
 ! [ t ] [ "a:b" ".+:?" <regexp> matches? ] unit-test
 
@@ -278,9 +287,13 @@ IN: regexp-tests
 [ { "1" "2" "3" "4" } ]
 [ "1ABC2DEF3GHI4" R/ [A-Z]+/ re-split [ >string ] map ] unit-test
 
-[ { "1" "2" "3" "4" } ]
+[ { "1" "2" "3" "4" "" } ]
 [ "1ABC2DEF3GHI4JK" R/ [A-Z]+/ re-split [ >string ] map ] unit-test
 
+[ { "" } ] [ "" R/ =/ re-split [ >string ] map ] unit-test
+
+[ { "a" "" } ] [ "a=" R/ =/ re-split [ >string ] map ] unit-test
+
 [ { "ABC" "DEF" "GHI" } ]
 [ "1ABC2DEF3GHI4" R/ [A-Z]+/ all-matches [ >string ] map ] unit-test
 
@@ -290,12 +303,16 @@ IN: regexp-tests
 [ 0 ]
 [ "123" R/ [A-Z]+/ count-matches ] unit-test
 
-[ "1.2.3.4" ]
+[ "1.2.3.4." ]
 [ "1ABC2DEF3GHI4JK" R/ [A-Z]+/ "." re-replace ] unit-test
+  
+[ "-- title --" ] [ "== title ==" R/ =/ "-" re-replace ] unit-test
 
+/*
+! FIXME
 [ f ] [ "ab" "a(?!b)" <regexp> first-match ] unit-test
 [ "a" ] [ "ac" "a(?!b)" <regexp> first-match >string ] unit-test
-[ t ] [ "fxxbar" "(?!foo).{3}bar" <regexp> matches? ] unit-test
+[ t ] [ "fxxbar" "(?!foo).{3}bar" <regexp> matches? ] unit-test
 [ f ] [ "foobar" "(?!foo).{3}bar" <regexp> matches? ] unit-test
 [ "a" ] [ "ab" "a(?=b)(?=b)" <regexp> first-match >string ] unit-test
 [ "a" ] [ "ba" "a(?<=b)(?<=b)" <regexp> first-match >string ] unit-test
@@ -303,9 +320,10 @@ IN: regexp-tests
 
 [ 3 ] [ "foobar" "foo(?=bar)" <regexp> match-head ] unit-test
 [ f ] [ "foobxr" "foo(?=bar)" <regexp> match-head ] unit-test
+*/
 
 ! Bug in parsing word
-[ t ] [ "a" R' a' matches?  ] unit-test
+[ t ] [ "a" R' a' matches? ] unit-test
 
 ! Convert to lowercase until E
 [ f ] [ "AA" R/ \LAA\E/ matches? ] unit-test
index c615719cc4da86e7cb3792965a63702c990274a4..86f978373b54fe31f42b08e4c0cb8f690e988bfa 100644 (file)
@@ -61,8 +61,11 @@ IN: regexp
     dupd first-match
     [ split1-slice swap ] [ "" like f swap ] if* ;
 
+: (re-split) ( string regexp -- )
+    over [ [ re-cut , ] keep (re-split) ] [ 2drop ] if ;
+
 : re-split ( string regexp -- seq )
-    [ dup length 0 > ] swap '[ _ re-cut ] [ ] produce nip ;
+    [ (re-split) ] { } make ;
 
 : re-replace ( string regexp replacement -- result )
     [ re-split ] dip join ;
index 5375d813e1bc719f3f9993674b5d93b7d3616db6..e5c31a54e0e40f4260e439030410069e36b99bc2 100644 (file)
@@ -35,7 +35,7 @@ TUPLE: transition-table transitions start-state final-states ;
         H{ } clone >>final-states ;
 
 : maybe-initialize-key ( key hashtable -- )
-    2dup key? [ 2drop ] [ H{ } clone -rot set-at ] if ;
+    2dup key? [ 2drop ] [ [ H{ } clone ] 2dip set-at ] if ;
 
 : set-transition ( transition hash -- )
     #! set the state as a key
diff --git a/basis/roman/authors.txt b/basis/roman/authors.txt
new file mode 100644 (file)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/basis/roman/roman-docs.factor b/basis/roman/roman-docs.factor
new file mode 100644 (file)
index 0000000..4a8197f
--- /dev/null
@@ -0,0 +1,120 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax kernel math ;
+IN: roman
+
+HELP: >roman
+{ $values { "n" "an integer" } { "str" "a string" } }
+{ $description "Converts a number to its lower-case Roman Numeral equivalent." }
+{ $notes "The range for this word is 1-3999, inclusive." }
+{ $examples 
+    { $example "USING: io roman ;"
+               "56 >roman print"
+               "lvi"
+    }
+} ;
+
+HELP: >ROMAN
+{ $values { "n" "an integer" } { "str" "a string" } }
+{ $description "Converts a number to its upper-case Roman numeral equivalent." }
+{ $notes "The range for this word is 1-3999, inclusive." }
+{ $examples 
+    { $example "USING: io roman ;"
+               "56 >ROMAN print"
+               "LVI"
+    }
+} ;
+
+HELP: roman>
+{ $values { "str" "a string" } { "n" "an integer" } }
+{ $description "Converts a Roman numeral to an integer." }
+{ $notes "The range for this word is i-mmmcmxcix, inclusive." }
+{ $examples 
+    { $example "USING: prettyprint roman ;"
+               "\"lvi\" roman> ."
+               "56"
+    }
+} ;
+
+{ >roman >ROMAN roman> } related-words
+
+HELP: roman+
+{ $values { "str1" "a string" } { "str2" "a string" } { "str3" "a string" } }
+{ $description "Adds two Roman numerals." }
+{ $examples 
+    { $example "USING: io roman ;"
+               "\"v\" \"v\" roman+ print"
+               "x"
+    }
+} ;
+
+HELP: roman-
+{ $values { "str1" "a string" } { "str2" "a string" } { "str3" "a string" } }
+{ $description "Subtracts two Roman numerals." }
+{ $examples 
+    { $example "USING: io roman ;"
+               "\"x\" \"v\" roman- print"
+               "v"
+    }
+} ;
+
+{ roman+ roman- } related-words
+
+HELP: roman*
+{ $values { "str1" "a string" } { "str2" "a string" } { "str3" "a string" } }
+{ $description "Multiplies two Roman numerals." }
+{ $examples 
+    { $example "USING: io roman ;"
+        "\"ii\" \"iii\" roman* print"
+        "vi"
+    }
+} ;
+
+HELP: roman/i
+{ $values { "str1" "a string" } { "str2" "a string" } { "str3" "a string" } }
+{ $description "Computes the integer division of two Roman numerals." }
+{ $examples 
+    { $example "USING: io roman ;"
+        "\"v\" \"iv\" roman/i print"
+        "i"
+    }
+} ;
+
+HELP: roman/mod
+{ $values { "str1" "a string" } { "str2" "a string" } { "str3" "a string" } { "str4" "a string" } }
+{ $description "Computes the quotient and remainder of two Roman numerals." }
+{ $examples 
+    { $example "USING: kernel io roman ;"
+        "\"v\" \"iv\" roman/mod [ print ] bi@"
+        "i\ni"
+    }
+} ;
+
+{ roman* roman/i roman/mod } related-words
+
+HELP: ROMAN:
+{ $description "A parsing word that reads the next token and converts it to an integer." }
+{ $examples 
+    { $example "USING: prettyprint roman ;"
+               "ROMAN: v ."
+               "5"
+    }
+} ;
+
+ARTICLE: "roman" "Roman numerals"
+"The " { $vocab-link "roman" } " vocabulary can convert numbers to and from the Roman numeral system and can perform arithmetic given Roman numerals as input." $nl
+"A parsing word for literal Roman numerals:"
+{ $subsection POSTPONE: ROMAN: }
+"Converting to Roman numerals:"
+{ $subsection >roman }
+{ $subsection >ROMAN }
+"Converting Roman numerals to integers:"
+{ $subsection roman> }
+"Roman numeral arithmetic:"
+{ $subsection roman+ }
+{ $subsection roman- }
+{ $subsection roman* }
+{ $subsection roman/i }
+{ $subsection roman/mod } ;
+
+ABOUT: "roman"
diff --git a/basis/roman/roman-tests.factor b/basis/roman/roman-tests.factor
new file mode 100644 (file)
index 0000000..82084e0
--- /dev/null
@@ -0,0 +1,40 @@
+USING: arrays kernel math roman roman.private sequences tools.test ;
+
+[ "i" ] [ 1 >roman ] unit-test
+[ "ii" ] [ 2 >roman ] unit-test
+[ "iii" ] [ 3 >roman ] unit-test
+[ "iv" ] [ 4 >roman ] unit-test
+[ "v" ] [ 5 >roman ] unit-test
+[ "vi" ] [ 6 >roman ] unit-test
+[ "vii" ] [ 7 >roman ] unit-test
+[ "viii" ] [ 8 >roman ] unit-test
+[ "ix" ] [ 9 >roman ] unit-test
+[ "x" ] [ 10 >roman ] unit-test
+[ "mdclxvi" ] [ 1666 >roman ] unit-test
+[ "mmmcdxliv" ] [ 3444 >roman ] unit-test
+[ "mmmcmxcix" ] [ 3999 >roman ] unit-test
+[ "MMMCMXCIX" ] [ 3999 >ROMAN ] unit-test
+[ 3999 ] [ 3999 >ROMAN roman> ] unit-test
+[ 1 ] [ 1 >roman roman> ] unit-test
+[ 2 ] [ 2 >roman roman> ] unit-test
+[ 3 ] [ 3 >roman roman> ] unit-test
+[ 4 ] [ 4 >roman roman> ] unit-test
+[ 5 ] [ 5 >roman roman> ] unit-test
+[ 6 ] [ 6 >roman roman> ] unit-test
+[ 7 ] [ 7 >roman roman> ] unit-test
+[ 8 ] [ 8 >roman roman> ] unit-test
+[ 9 ] [ 9 >roman roman> ] unit-test
+[ 10 ] [ 10 >roman roman> ] unit-test
+[ 1666 ] [ 1666 >roman roman> ] unit-test
+[ 3444 ] [ 3444 >roman roman> ] unit-test
+[ 3999 ] [ 3999 >roman roman> ] unit-test
+[ 0 >roman ] must-fail
+[ 4000 >roman ] must-fail
+[ "vi" ] [ "iii" "iii"  roman+ ] unit-test
+[ "viii" ] [ "x" "ii"  roman- ] unit-test
+[ "ix" ] [ "iii" "iii"  roman* ] unit-test
+[ "i" ] [ "iii" "ii" roman/i ] unit-test
+[ "i" "ii" ] [ "v" "iii"  roman/mod ] unit-test
+[ "iii" "iii"  roman- ] must-fail
+
+[ 30 ] [ ROMAN: xxx ] unit-test
diff --git a/basis/roman/roman.factor b/basis/roman/roman.factor
new file mode 100644 (file)
index 0000000..81a6d69
--- /dev/null
@@ -0,0 +1,77 @@
+! Copyright (C) 2007 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: arrays assocs kernel math math.order math.vectors
+namespaces make quotations sequences splitting.monotonic
+sequences.private strings unicode.case lexer parser
+grouping ;
+IN: roman
+
+<PRIVATE
+
+: roman-digits ( -- seq )
+    { "m" "cm" "d" "cd" "c" "xc" "l" "xl" "x" "ix" "v" "iv" "i" } ;
+
+: roman-values ( -- seq )
+    { 1000 900 500 400 100 90 50 40 10 9 5 4 1 } ;
+
+ERROR: roman-range-error n ;
+
+: roman-range-check ( n -- )
+    dup 1 3999 between? [ drop ] [ roman-range-error ] if ;
+
+: roman<= ( ch1 ch2 -- ? )
+    [ 1string roman-digits index ] bi@ >= ;
+
+: roman>n ( ch -- n )
+    1string roman-digits index roman-values nth ;
+
+: (>roman) ( n -- )
+    roman-values roman-digits [
+        [ /mod swap ] dip <repetition> concat %
+    ] 2each drop ;
+
+: (roman>) ( seq -- n )
+    dup [ roman>n ] map swap all-eq? [
+        sum
+    ] [
+        first2 swap -
+    ] if ;
+
+PRIVATE>
+
+: >roman ( n -- str )
+    dup roman-range-check
+    [ (>roman) ] "" make ;
+
+: >ROMAN ( n -- str ) >roman >upper ;
+
+: roman> ( str -- n )
+    >lower [ roman<= ] monotonic-split
+    [ (roman>) ] sigma ;
+
+<PRIVATE
+
+: 2roman> ( str1 str2 -- m n )
+    [ roman> ] bi@ ;
+
+: binary-roman-op ( str1 str2 quot -- str3 )
+    [ 2roman> ] dip call >roman ; inline
+
+PRIVATE>
+
+: roman+ ( str1 str2 -- str3 )
+    [ + ] binary-roman-op ;
+
+: roman- ( str1 str2 -- str3 )
+    [ - ] binary-roman-op ;
+
+: roman* ( str1 str2 -- str3 )
+    [ * ] binary-roman-op ;
+
+: roman/i ( str1 str2 -- str3 )
+    [ /i ] binary-roman-op ;
+
+: roman/mod ( str1 str2 -- str3 str4 )
+    [ /mod ] binary-roman-op [ >roman ] dip ;
+
+: ROMAN: scan roman> parsed ; parsing
diff --git a/basis/roman/summary.txt b/basis/roman/summary.txt
new file mode 100644 (file)
index 0000000..f6d018c
--- /dev/null
@@ -0,0 +1 @@
+Roman numerals library
diff --git a/basis/roman/tags.txt b/basis/roman/tags.txt
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
index fe0ce7c1574663add50091d6e97f8d7d29f3c1c6..c20e67d13c2d98d852c8818c79d2618afb58aa36 100644 (file)
@@ -10,6 +10,6 @@ $nl
 
 ABOUT: "search-deques"
 
-HELP: <search-deque> ( assoc deque -- search-deque )
+HELP: <search-deque>
 { $values { "assoc" assoc } { "deque" deque } { "search-deque" search-deque } }
 { $description "Creates a new " { $link search-deque } "." } ;
diff --git a/basis/sequences/complex-components/authors.txt b/basis/sequences/complex-components/authors.txt
new file mode 100644 (file)
index 0000000..f13c9c1
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
diff --git a/basis/sequences/complex-components/complex-components-docs.factor b/basis/sequences/complex-components/complex-components-docs.factor
new file mode 100644 (file)
index 0000000..386735a
--- /dev/null
@@ -0,0 +1,35 @@
+USING: help.markup help.syntax math multiline
+sequences sequences.complex-components ;
+IN: sequences.complex-components
+
+ARTICLE: "sequences.complex-components" "Complex component virtual sequences"
+"The " { $link complex-components } " class wraps a sequence of " { $link complex } " number values, presenting a sequence of " { $link real } " values made by interleaving the real and imaginary parts of the complex values in the original sequence."
+{ $subsection complex-components }
+{ $subsection <complex-components> } ;
+
+ABOUT: "sequences.complex-components"
+
+HELP: complex-components
+{ $class-description "Sequence wrapper class that transforms a sequence of " { $link complex } " number values into a sequence of " { $link real } " values, interleaving the real and imaginary parts of the complex values in the original sequence." }
+{ $examples { $example <"
+USING: prettyprint sequences arrays sequences.complex-components ;
+{ C{ 1.0 -1.0 } -2.0 C{ 3.0 1.0 } } <complex-components> >array .
+"> "{ 1.0 -1.0 -2.0 0 3.0 1.0 }" } } ;
+
+HELP: <complex-components>
+{ $values { "sequence" sequence } { "complex-components" complex-components } }
+{ $description "Wraps " { $snippet "sequence" } " in a " { $link complex-components } " wrapper." }
+{ $examples
+{ $example <"
+USING: prettyprint sequences arrays
+sequences.complex-components ;
+{ C{ 1.0 -1.0 } -2.0 C{ 3.0 1.0 } } <complex-components> third .
+"> "-2.0" }
+{ $example <"
+USING: prettyprint sequences arrays
+sequences.complex-components ;
+{ C{ 1.0 -1.0 } -2.0 C{ 3.0 1.0 } } <complex-components> fourth .
+"> "0" }
+} ;
+
+{ complex-components <complex-components> } related-words
diff --git a/basis/sequences/complex-components/complex-components-tests.factor b/basis/sequences/complex-components/complex-components-tests.factor
new file mode 100644 (file)
index 0000000..f0c8e92
--- /dev/null
@@ -0,0 +1,16 @@
+USING: sequences.complex-components
+kernel sequences tools.test arrays accessors ;
+IN: sequences.complex-components.tests
+
+: test-array ( -- x )
+    { C{ 1.0 2.0 } 3.0 C{ 5.0 6.0 } } <complex-components> ;
+
+[ 6 ] [ test-array length ] unit-test
+
+[ 1.0 ] [ test-array first  ] unit-test
+[ 2.0 ] [ test-array second ] unit-test
+[ 3.0 ] [ test-array third  ] unit-test
+[ 0   ] [ test-array fourth ] unit-test
+
+[ { 1.0 2.0 3.0 0 5.0 6.0 } ] [ test-array >array ] unit-test
+
diff --git a/basis/sequences/complex-components/complex-components.factor b/basis/sequences/complex-components/complex-components.factor
new file mode 100644 (file)
index 0000000..ae80897
--- /dev/null
@@ -0,0 +1,28 @@
+USING: accessors kernel math math.functions combinators
+sequences sequences.private ;
+IN: sequences.complex-components
+
+TUPLE: complex-components seq ;
+INSTANCE: complex-components sequence
+
+: <complex-components> ( sequence -- complex-components )
+    complex-components boa ; inline
+
+<PRIVATE
+
+: complex-components@ ( n seq -- remainder n' seq' )
+    [ [ 1 bitand ] [ -1 shift ] bi ] [ seq>> ] bi* ; inline
+: complex-component ( remainder complex -- component )
+    swap {
+        { 0 [ real-part ] }
+        { 1 [ imaginary-part ] }
+    } case ;
+
+PRIVATE>
+
+M: complex-components length
+    seq>> length 1 shift ;
+M: complex-components nth-unsafe
+    complex-components@ nth-unsafe complex-component ;
+M: complex-components set-nth-unsafe
+    immutable ;
diff --git a/basis/sequences/complex-components/summary.txt b/basis/sequences/complex-components/summary.txt
new file mode 100644 (file)
index 0000000..af00158
--- /dev/null
@@ -0,0 +1 @@
+Virtual sequence wrapper to convert complex values into real value pairs
diff --git a/basis/sequences/complex-components/tags.txt b/basis/sequences/complex-components/tags.txt
new file mode 100644 (file)
index 0000000..64cdcd9
--- /dev/null
@@ -0,0 +1,2 @@
+sequences
+math
diff --git a/basis/sequences/complex/authors.txt b/basis/sequences/complex/authors.txt
new file mode 100644 (file)
index 0000000..f13c9c1
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
diff --git a/basis/sequences/complex/complex-docs.factor b/basis/sequences/complex/complex-docs.factor
new file mode 100644 (file)
index 0000000..65dd520
--- /dev/null
@@ -0,0 +1,31 @@
+USING: help.markup help.syntax math multiline
+sequences sequences.complex ;
+IN: sequences.complex
+
+ARTICLE: "sequences.complex" "Complex virtual sequences"
+"The " { $link complex-sequence } " class wraps a sequence of " { $link real } " number values, presenting a sequence of " { $link complex } " values made by treating the underlying sequence as pairs of alternating real and imaginary values."
+{ $subsection complex-sequence }
+{ $subsection <complex-sequence> } ;
+
+ABOUT: "sequences.complex"
+
+HELP: complex-sequence
+{ $class-description "Sequence wrapper class that transforms a sequence of " { $link real } " number values into a sequence of " { $link complex } " values, treating the underlying sequence as pairs of alternating real and imaginary values."  }
+{ $examples { $example <"
+USING: prettyprint
+specialized-arrays.double sequences.complex
+sequences arrays ;
+double-array{ 1.0 -1.0 -2.0 2.0 3.0 0.0 } <complex-sequence> >array .
+"> "{ C{ 1.0 -1.0 } C{ -2.0 2.0 } C{ 3.0 0.0 } }" } } ;
+
+HELP: <complex-sequence>
+{ $values { "sequence" sequence } { "complex-sequence" complex-sequence } }
+{ $description "Wraps " { $snippet "sequence" } " in a " { $link complex-sequence } "." }
+{ $examples { $example <"
+USING: prettyprint
+specialized-arrays.double sequences.complex
+sequences arrays ;
+double-array{ 1.0 -1.0 -2.0 2.0 3.0 0.0 } <complex-sequence> second .
+"> "C{ -2.0 2.0 }" } } ;
+
+{ complex-sequence <complex-sequence> } related-words
diff --git a/basis/sequences/complex/complex-tests.factor b/basis/sequences/complex/complex-tests.factor
new file mode 100644 (file)
index 0000000..5861bc8
--- /dev/null
@@ -0,0 +1,26 @@
+USING: specialized-arrays.float sequences.complex
+kernel sequences tools.test arrays accessors ;
+IN: sequences.complex.tests
+
+: test-array ( -- x )
+    float-array{ 1.0 2.0 3.0 4.0 } clone <complex-sequence> ;
+: odd-length-test-array ( -- x )
+    float-array{ 1.0 2.0 3.0 4.0 5.0 } clone <complex-sequence> ;
+
+[ 2 ] [ test-array length ] unit-test
+[ 2 ] [ odd-length-test-array length ] unit-test
+
+[ C{ 1.0 2.0 } ] [ test-array first ] unit-test
+[ C{ 3.0 4.0 } ] [ test-array second ] unit-test
+
+[ { C{ 1.0 2.0 } C{ 3.0 4.0 } } ]
+[ test-array >array ] unit-test
+
+[ float-array{ 1.0 2.0 5.0 6.0 } ]
+[ test-array [ C{ 5.0 6.0 } 1 rot set-nth ] [ seq>> ] bi ]
+unit-test
+
+[ float-array{ 7.0 0.0 3.0 4.0 } ]
+[ test-array [ 7.0 0 rot set-nth ] [ seq>> ] bi ]
+unit-test
+
diff --git a/basis/sequences/complex/complex.factor b/basis/sequences/complex/complex.factor
new file mode 100644 (file)
index 0000000..93f9727
--- /dev/null
@@ -0,0 +1,25 @@
+USING: accessors kernel math math.functions
+sequences sequences.private ;
+IN: sequences.complex
+
+TUPLE: complex-sequence seq ;
+INSTANCE: complex-sequence sequence
+
+: <complex-sequence> ( sequence -- complex-sequence )
+    complex-sequence boa ; inline
+
+<PRIVATE
+
+: complex@ ( n seq -- n' seq' )
+    [ 1 shift ] [ seq>> ] bi* ; inline
+
+PRIVATE>
+
+M: complex-sequence length
+    seq>> length -1 shift ;
+M: complex-sequence nth-unsafe
+    complex@ [ nth-unsafe ] [ [ 1+ ] dip nth-unsafe ] 2bi rect> ;
+M: complex-sequence set-nth-unsafe
+    complex@
+    [ [ real-part      ] [    ] [ ] tri* set-nth-unsafe ]
+    [ [ imaginary-part ] [ 1+ ] [ ] tri* set-nth-unsafe ] 3bi ;
diff --git a/basis/sequences/complex/summary.txt b/basis/sequences/complex/summary.txt
new file mode 100644 (file)
index 0000000..d94c4ba
--- /dev/null
@@ -0,0 +1 @@
+Virtual sequence wrapper to convert real pairs into complex values
diff --git a/basis/sequences/complex/tags.txt b/basis/sequences/complex/tags.txt
new file mode 100644 (file)
index 0000000..64cdcd9
--- /dev/null
@@ -0,0 +1,2 @@
+sequences
+math
index f990dd0ed29ff1ada6887e18c53cbca2d40a2481..a07c427c988fa3d03d3581141483dfe092cdf39b 100644 (file)
@@ -1 +1,2 @@
 Daniel Ehrenberg
+Doug Coleman
index 522b5ecdf95a5f60472ba3773b327d4f8a0ee98d..2d3260f4279154a8cddb834b99efd2076a9bcad0 100644 (file)
@@ -24,3 +24,18 @@ IN: sequences.deep.tests
 [ "foo" ] [ "foo" [ string? ] deep-find ] unit-test
 
 [ { { 1 2 } 1 2 } ] [ [ { 1 2 } [ , ] deep-each ] { } make ] unit-test
+
+[ t ]
+[ { { 1 2 3 } 4 } { { { 1 { { 1 2 3 } 4 } } } 2 } deep-member? ] unit-test
+
+[ t ]
+[ { { 1 2 3 } 4 } { { { 1 2 3 } 4 } 2 } deep-member? ] unit-test
+
+[ f ]
+[ { 1 2 3 4 } { 1 2 3 { 4 } } deep-subseq? ] unit-test
+
+[ t ]
+[ { 1 2 3 4 } { 1 2 3 4 } deep-subseq? ] unit-test
+
+[ t ]
+[ { 1 2 3 4 } { { 1 2 3 4 } } deep-subseq? ] unit-test
index db572681a16c72f56d9721fbf3dc06aa5bf7a4c3..d942b3f4c4e66d6f76811b6d008cab6ad1400a76 100644 (file)
@@ -1,6 +1,6 @@
-! Copyright (C) 2007 Daniel Ehrenberg
+! Copyright (C) 2007, 2008 Daniel Ehrenberg, Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: sequences kernel strings math ;
+USING: sequences kernel strings math fry ;
 IN: sequences.deep
 
 ! All traversal goes in postorder
@@ -14,11 +14,11 @@ M: object branch? drop f ;
 
 : deep-each ( obj quot: ( elt -- ) -- )
     [ call ] 2keep over branch?
-    [ [ deep-each ] curry each ] [ 2drop ] if ; inline recursive
+    [ '[ _ deep-each ] each ] [ 2drop ] if ; inline recursive
 
 : deep-map ( obj quot: ( elt -- elt' ) -- newobj )
     [ call ] keep over branch?
-    [ [ deep-map ] curry map ] [ drop ] if ; inline recursive
+    [ '[ _ deep-map ] map ] [ drop ] if ; inline recursive
 
 : deep-filter ( obj quot: ( elt -- ? ) -- seq )
     over [ pusher [ deep-each ] dip ] dip
@@ -27,7 +27,7 @@ M: object branch? drop f ;
 : (deep-find) ( obj quot: ( elt -- ? ) -- elt ? )
     [ call ] 2keep rot [ drop t ] [
         over branch? [
-            f -rot [ [ nip ] dip (deep-find) ] curry find drop >boolean
+            [ f ] 2dip '[ nip _ (deep-find) ] find drop >boolean
         ] [ 2drop f f ] if  
     ] if ; inline recursive
 
@@ -36,11 +36,21 @@ M: object branch? drop f ;
 : deep-contains? ( obj quot -- ? ) (deep-find) nip ; inline
 
 : deep-all? ( obj quot -- ? )
-    [ not ] compose deep-contains? not ; inline
+    '[ @ not ] deep-contains? not ; inline
+
+: deep-member? ( obj seq -- ? )
+    swap '[
+        _ swap dup branch? [ member? ] [ 2drop f ] if
+    ] deep-find >boolean ;
+
+: deep-subseq? ( subseq seq -- ? )
+    swap '[
+        _ swap dup branch? [ subseq? ] [ 2drop f ] if
+    ] deep-find >boolean ;
 
 : deep-change-each ( obj quot: ( elt -- elt' ) -- )
     over branch? [
-        [ [ call ] keep over [ deep-change-each ] dip ] curry change-each
+        '[ _ [ call ] keep over [ deep-change-each ] dip ] change-each
     ] [ 2drop ] if ; inline recursive
 
 : flatten ( obj -- seq )
index a0a441ab50c63e4ff1e09818997e586c1dd1dfa0..19b406cc5878b142b788ccb2701df62b1aa1f668 100644 (file)
@@ -3,7 +3,8 @@ IN: sequences.next
 
 <PRIVATE
 
-: iterate-seq [ dup length swap ] dip ; inline
+: iterate-seq ( seq quot -- i seq quot )
+    [ [ length ] keep ] dip ; inline
 
 : (map-next) ( i seq quot -- )
     ! this uses O(n) more bounds checks than is really necessary
index f062548482edb8f5d5572a1936e6de05cd6e4b78..4a0d3777b82d0d8dbdc0ac5c9db01d6b7604b983 100644 (file)
@@ -70,9 +70,10 @@ M: id equal? over id? [ [ obj>> ] bi@ eq? ] [ 2drop f ] if ;
     } cond ;
 
 : serialize-shared ( obj quot -- )
-    >r dup object-id
-    [ CHAR: o write1 serialize-cell drop ]
-    r> if* ; inline
+    [
+        dup object-id
+        [ CHAR: o write1 serialize-cell drop ]
+    ] dip if* ; inline
 
 M: f (serialize) ( obj -- )
     drop CHAR: n write1 ;
@@ -220,8 +221,7 @@ SYMBOL: deserialized
     (deserialize) (deserialize) 2dup lookup
     dup [ 2nip ] [
         drop
-        "Unknown word: " -rot
-        2array unparse append throw
+        2array unparse "Unknown word: " prepend throw
     ] if ;
 
 : deserialize-gensym ( -- word )
@@ -256,7 +256,7 @@ SYMBOL: deserialized
     [ ] tri ;
 
 : copy-seq-to-tuple ( seq tuple -- )
-    >r dup length r> [ set-array-nth ] curry 2each ;
+    [ dup length ] dip [ set-array-nth ] curry 2each ;
 
 : deserialize-tuple ( -- array )
     #! Ugly because we have to intern the tuple before reading
index 7de22e9af9a3ccbd8ded2a29099c0bc30d3a2d46..5d7791292bc3db8dace2c11f816126705a1e5267 100644 (file)
@@ -4,7 +4,7 @@ USING: combinators kernel prettyprint io io.timeouts sequences
 namespaces io.sockets io.sockets.secure continuations calendar
 io.encodings.ascii io.streams.duplex destructors locals
 concurrency.promises threads accessors smtp.private
-io.unix.sockets.secure.debug ;
+io.sockets.secure.unix.debug io.crlf ;
 IN: smtp.server
 
 ! Mock SMTP server for testing purposes.
index 83b9287043fbf9882aba604f173037af74b9254c..8e344116040edd5b11e1d5d4eb97f5483784d221 100644 (file)
@@ -25,7 +25,7 @@ HELP: no-auth
 HELP: plain-auth
 { $class-description "If the " { $link smtp-auth } " variable is set to this value, plain authentication will be performed, with the username and password stored in the " { $slot "username" } " and " { $slot "password" } " slots of the tuple sent to the server as plain-text." } ;
 
-HELP: <plain-auth> ( username password -- plain-auth )
+HELP: <plain-auth>
 { $values { "username" string } { "password" string } { "plain-auth" plain-auth } }
 { $description "Creates a new " { $link plain-auth } " instance." } ;
 
index e3638bd96918fcb527f4448bf0270e6542cc7504..8a9107b905ff5a65cd85005fb17a3e531bd2d7ed 100644 (file)
@@ -15,7 +15,7 @@ IN: smtp.tests
 
 [ { "hello" "." "world" } validate-message ] must-fail
 
-[ "hello\r\nworld\r\n.\r\n" ] [
+[ "aGVsbG8Kd29ybGQ=\r\n.\r\n" ] [
     "hello\nworld" [ send-body ] with-string-writer
 ] unit-test
 
@@ -50,7 +50,10 @@ IN: smtp.tests
 
 [
     {
+        { "Content-Transfer-Encoding" "base64" }
+        { "Content-Type" "Text/plain; charset=utf-8" }
         { "From" "Doug <erg@factorcode.org>" }
+        { "MIME-Version" "1.0" }
         { "Subject" "Factor rules" }
         { "To" "Slava <slava@factorcode.org>, Ed <dharmatech@factorcode.org>" }
     }
index f689ad08586627d403e4149a9646e8499ee422dd..03b9d8af11d67a69631b38568fcb96fa5d887dfd 100644 (file)
@@ -6,7 +6,7 @@ io.encodings.utf8 io.timeouts io.sockets io.sockets.secure
 io.encodings.ascii kernel logging sequences combinators
 splitting assocs strings math.order math.parser random system
 calendar summary calendar.format accessors sets hashtables
-base64 debugger classes prettyprint ;
+base64 debugger classes prettyprint io.crlf ;
 IN: smtp
 
 SYMBOL: smtp-domain
@@ -50,12 +50,6 @@ TUPLE: email
 
 <PRIVATE
 
-: crlf ( -- ) "\r\n" write ;
-
-: read-crlf ( -- bytes )
-    "\r" read-until
-    [ CHAR: \r assert= read1 CHAR: \n assert= ] when* ;
-
 : command ( string -- ) write crlf flush ;
 
 \ command DEBUG add-input-logging
@@ -68,8 +62,8 @@ ERROR: bad-email-address email ;
 
 : validate-address ( string -- string' )
     #! Make sure we send funky stuff to the server by accident.
-    dup "\r\n>" intersect empty?
-    [ bad-email-address ] unless ;
+    dup "\r\n>" intersects?
+    [ bad-email-address ] when ;
 
 : mail-from ( fromaddr -- )
     validate-address
@@ -92,9 +86,8 @@ M: message-contains-dot summary ( obj -- string )
     [ message-contains-dot ] when ;
 
 : send-body ( body -- )
-    string-lines
-    validate-message
-    [ write crlf ] each
+    utf8 encode
+    >base64-lines write crlf
     "." command ;
 
 : quit ( -- )
@@ -102,7 +95,7 @@ M: message-contains-dot summary ( obj -- string )
 
 LOG: smtp-response DEBUG
 
-: multiline? ( response -- boolean )
+: multiline? ( response -- ? )
     3 swap ?nth CHAR: - = ;
 
 : (receive-response) ( -- )
@@ -167,15 +160,22 @@ M: plain-auth send-auth
 
 : auth ( -- ) smtp-auth get send-auth ;
 
+: encode-header ( string -- string' )
+    dup aux>> [
+        "=?utf-8?B?"
+        swap utf8 encode >base64
+        "?=" 3append
+    ] when ;
+
 ERROR: invalid-header-string string ;
 
 : validate-header ( string -- string' )
-    dup "\r\n" intersect empty?
-    [ invalid-header-string ] unless ;
+    dup "\r\n" intersects?
+    [ invalid-header-string ] when ;
 
 : write-header ( key value -- )
     [ validate-header write ]
-    [ ": " write validate-header write ] bi* crlf ;
+    [ ": " write validate-header encode-header write ] bi* crlf ;
 
 : write-headers ( assoc -- )
     [ write-header ] assoc-each ;
@@ -195,6 +195,13 @@ ERROR: invalid-header-string string ;
     ! This could be much smarter.
     " " split1-last swap or "<" ?head drop ">" ?tail drop ;
 
+: utf8-mime-header ( -- alist )
+    {
+        { "MIME-Version" "1.0" }
+        { "Content-Transfer-Encoding" "base64" }
+        { "Content-Type" "Text/plain; charset=utf-8" }
+    } ;
+
 : email>headers ( email -- hashtable )
     [
         {
@@ -205,7 +212,7 @@ ERROR: invalid-header-string string ;
         } cleave
         now timestamp>rfc822 "Date" set
         message-id "Message-Id" set
-    ] { } make-assoc ;
+    ] { } make-assoc utf8-mime-header append ;
 
 : (send-email) ( headers email -- )
     [
diff --git a/basis/sorting/human/human-docs.factor b/basis/sorting/human/human-docs.factor
new file mode 100644 (file)
index 0000000..5952b3e
--- /dev/null
@@ -0,0 +1,71 @@
+! Copyright (C) 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax kernel math.order quotations
+sequences strings ;
+IN: sorting.human
+
+HELP: find-numbers
+{ $values
+     { "string" string }
+     { "seq" sequence }
+}
+{ $description "Splits a string on numbers and returns a sequence of sequences and integers." } ;
+
+HELP: human<=>
+{ $values
+     { "obj1" object } { "obj2" object }
+     { "<=>" "an ordering specifier" }
+}
+{ $description "Compares two objects after converting numbers in the string into integers." } ;
+
+HELP: human>=<
+{ $values
+     { "obj1" object } { "obj2" object }
+     { ">=<" "an ordering specifier" }
+}
+{ $description "Compares two objects using the " { $link human<=> } " word and inverts the result." } ;
+
+HELP: human-compare
+{ $values
+     { "obj1" object } { "obj2" object } { "quot" quotation }
+     { "<=>" "an ordering specifier" }
+}
+{ $description "Compares the results of applying the quotation to both objects via <=>." } ;
+
+HELP: human-sort
+{ $values
+     { "seq" sequence }
+     { "seq'" sequence }
+}
+{ $description "Sorts a sequence of objects by comparing the magnitude of any integers in the input string using the <=> word." } ;
+
+HELP: human-sort-keys
+{ $values
+     { "seq" "an alist" }
+     { "sortedseq" "a new sorted sequence" }
+}
+{ $description "Sorts the elements comparing first elements of pairs using the " { $link human<=> } " word." } ;
+
+HELP: human-sort-values
+{ $values
+     { "seq" "an alist" }
+     { "sortedseq" "a new sorted sequence" }
+}
+{ $description "Sorts the elements comparing second elements of pairs using the " { $link human<=> } " word." } ;
+
+{ <=> >=< human-compare human-sort human-sort-keys human-sort-values } related-words
+
+ARTICLE: "sorting.human" "Human-friendly sorting"
+"The " { $vocab-link "sorting.human" } " vocabulary sorts by numbers as a human would -- by comparing their magnitudes -- rather than in a lexicographic way. For example, sorting a1, a10, a03, a2 with human sort returns a1, a2, a03, a10, while sorting with natural sort returns a03, a1, a10, a2." $nl
+"Comparing two objects:"
+{ $subsection human<=> }
+{ $subsection human>=< }
+{ $subsection human-compare }
+"Sort a sequence:"
+{ $subsection human-sort }
+{ $subsection human-sort-keys }
+{ $subsection human-sort-values }
+"Splitting a string into substrings and integers:"
+{ $subsection find-numbers } ;
+
+ABOUT: "sorting.human"
index 1c2ba419c75e230daf79911ac0b7db11008960f1..1c7392901b3857f394d2bc2da96c0fe2aa7f7978 100644 (file)
@@ -1,10 +1,22 @@
 ! Copyright (C) 2008 Doug Coleman, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: peg.ebnf math.parser kernel assocs sorting ;
+USING: peg.ebnf math.parser kernel assocs sorting fry
+math.order sequences ascii splitting.monotonic ;
 IN: sorting.human
 
 : find-numbers ( string -- seq )
     [EBNF Result = ([0-9]+ => [[ string>number ]] | (!([0-9]) .)+)* EBNF] ;
 
-: human-sort ( seq -- seq' )
-    [ dup find-numbers ] { } map>assoc sort-values keys ;
+: human<=> ( obj1 obj2 -- <=> ) [ find-numbers ] bi@ <=> ;
+
+: human>=< ( obj1 obj2 -- >=< ) human<=> invert-comparison ; inline
+
+: human-compare ( obj1 obj2 quot -- <=> ) bi@ human<=> ;
+
+: human-sort ( seq -- seq' ) [ human<=> ] sort ;
+
+: human-sort-keys ( seq -- sortedseq )
+    [ [ first ] human-compare ] sort ;
+
+: human-sort-values ( seq -- sortedseq )
+    [ [ second ] human-compare ] sort ;
diff --git a/basis/sorting/slots/authors.txt b/basis/sorting/slots/authors.txt
new file mode 100644 (file)
index 0000000..5674120
--- /dev/null
@@ -0,0 +1,2 @@
+Doug Coleman
+Slava Pestov
diff --git a/basis/sorting/slots/slots-docs.factor b/basis/sorting/slots/slots-docs.factor
new file mode 100644 (file)
index 0000000..a3bdbf9
--- /dev/null
@@ -0,0 +1,49 @@
+! Copyright (C) 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax kernel quotations math.order
+sequences ;
+IN: sorting.slots
+
+HELP: compare-slots
+{ $values
+     { "sort-specs" "a sequence of accessors ending with a comparator" }
+     { "<=>" { $link +lt+ } " " { $link +eq+ } " or " { $link +gt+ } }
+}
+{ $description "Compares two objects using a chain of intrinsic linear orders such that if two objects are " { $link +eq+ } ", then the next comparator is tried. The comparators are slot-name/comparator pairs." } ;
+
+HELP: sort-by-slots
+{ $values
+     { "seq" sequence } { "sort-specs" "a sequence of accessors ending with a comparator" }
+     { "seq'" sequence }
+}
+{ $description "Sorts a sequence of tuples by the sort-specs in " { $snippet "sort-spec" } ". A sort-spec is a sequence of slot accessors ending in a comparator." }
+{ $examples
+    "Sort by slot c, then b descending:"
+    { $example
+        "USING: accessors math.order prettyprint sorting.slots ;"
+        "IN: scratchpad"
+        "TUPLE: sort-me a b ;"
+        "{"
+        "    T{ sort-me f 2 3 } T{ sort-me f 3 2 }"
+        "    T{ sort-me f 4 3 } T{ sort-me f 2 1 }"
+        "}"
+        "{ { a>> <=> } { b>> >=< } } sort-by-slots ."
+        "{\n    T{ sort-me { a 2 } { b 3 } }\n    T{ sort-me { a 2 } { b 1 } }\n    T{ sort-me { a 3 } { b 2 } }\n    T{ sort-me { a 4 } { b 3 } }\n}"
+    }
+} ;
+
+HELP: split-by-slots
+{ $values
+     { "accessor-seqs" "a sequence of sequences of tuple accessors" }
+     { "quot" quotation }
+}
+{ $description "Splits a sequence of tuples into a sequence of slices of tuples that have the same values in all slots in the accessor sequence. This word is only useful for splitting a sorted sequence, but is more efficient than partitioning in such a case." } ;
+
+ARTICLE: "sorting.slots" "Sorting by slots"
+"The " { $vocab-link "sorting.slots" } " vocabulary can sort tuples by slot in ascending or descending order, using subsequent slots as tie-breakers." $nl
+"Comparing two objects by a sequence of slots:"
+{ $subsection compare-slots }
+"Sorting a sequence by a sequence of slots:"
+{ $subsection sort-by-slots } ;
+
+ABOUT: "sorting.slots"
diff --git a/basis/sorting/slots/slots-tests.factor b/basis/sorting/slots/slots-tests.factor
new file mode 100644 (file)
index 0000000..46824c6
--- /dev/null
@@ -0,0 +1,145 @@
+! Copyright (C) 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors math.order sorting.slots tools.test
+sorting.human arrays sequences kernel assocs multiline ;
+IN: sorting.literals.tests
+
+TUPLE: sort-test a b c tuple2 ;
+
+TUPLE: tuple2 d ;
+
+[
+    {
+        T{ sort-test { a 1 } { b 3 } { c 9 } }
+        T{ sort-test { a 1 } { b 1 } { c 10 } }
+        T{ sort-test { a 1 } { b 1 } { c 11 } }
+        T{ sort-test { a 2 } { b 5 } { c 2 } }
+        T{ sort-test { a 2 } { b 5 } { c 3 } }
+    }
+] [
+    {
+        T{ sort-test f 1 3 9 }
+        T{ sort-test f 1 1 10 }
+        T{ sort-test f 1 1 11 }
+        T{ sort-test f 2 5 3 }
+        T{ sort-test f 2 5 2 }
+    } { { a>> <=> } { b>> >=< } { c>> <=> } } sort-by-slots
+] unit-test
+
+[
+    {
+        T{ sort-test { a 1 } { b 3 } { c 9 } }
+        T{ sort-test { a 1 } { b 1 } { c 10 } }
+        T{ sort-test { a 1 } { b 1 } { c 11 } }
+        T{ sort-test { a 2 } { b 5 } { c 2 } }
+        T{ sort-test { a 2 } { b 5 } { c 3 } }
+    }
+] [
+    {
+        T{ sort-test f 1 3 9 }
+        T{ sort-test f 1 1 10 }
+        T{ sort-test f 1 1 11 }
+        T{ sort-test f 2 5 3 }
+        T{ sort-test f 2 5 2 }
+    } { { a>> human<=> } { b>> human>=< } { c>> <=> } } sort-by-slots
+] unit-test
+
+[
+    {
+        {
+            T{ sort-test { a 1 } { b 1 } { c 10 } }
+            T{ sort-test { a 1 } { b 1 } { c 11 } }
+        }
+        { T{ sort-test { a 1 } { b 3 } { c 9 } } }
+        {
+            T{ sort-test { a 2 } { b 5 } { c 3 } }
+            T{ sort-test { a 2 } { b 5 } { c 2 } }
+        }
+    }
+] [
+    {
+        T{ sort-test f 1 3 9 }
+        T{ sort-test f 1 1 10 }
+        T{ sort-test f 1 1 11 }
+        T{ sort-test f 2 5 3 }
+        T{ sort-test f 2 5 2 }
+    }
+    { { a>> human<=> } { b>> <=> } } [ sort-by-slots ] keep
+    [ but-last-slice ] map split-by-slots [ >array ] map
+] unit-test
+
+: split-test ( seq -- seq' )
+    { { a>> } { b>> } } split-by-slots ;
+
+[ split-test ] must-infer
+
+[ { } ]
+[ { } { { a>> <=> } { b>> >=< } { c>> <=> } } sort-by-slots ] unit-test
+
+[
+    {
+        T{ sort-test { a 6 } { tuple2 T{ tuple2 { d 1 } } } }
+        T{ sort-test { a 6 } { tuple2 T{ tuple2 { d 2 } } } }
+        T{ sort-test { a 5 } { tuple2 T{ tuple2 { d 3 } } } }
+        T{ sort-test { a 6 } { tuple2 T{ tuple2 { d 3 } } } }
+        T{ sort-test { a 6 } { tuple2 T{ tuple2 { d 3 } } } }
+        T{ sort-test { a 5 } { tuple2 T{ tuple2 { d 4 } } } }
+    }
+] [
+    {
+        T{ sort-test f 6 f f T{ tuple2 f 1 } }
+        T{ sort-test f 5 f f T{ tuple2 f 4 } }
+        T{ sort-test f 6 f f T{ tuple2 f 3 } }
+        T{ sort-test f 6 f f T{ tuple2 f 3 } }
+        T{ sort-test f 5 f f T{ tuple2 f 3 } }
+        T{ sort-test f 6 f f T{ tuple2 f 2 } }
+    } { { tuple2>> d>> <=> } { a>> <=> } } sort-by-slots
+] unit-test
+
+[
+    {
+        {
+            T{ sort-test
+                { a 6 }
+                { tuple2 T{ tuple2 { d 1 } } }
+            }
+        }
+        {
+            T{ sort-test
+                { a 6 }
+                { tuple2 T{ tuple2 { d 2 } } }
+            }
+        }
+        {
+            T{ sort-test
+                { a 5 }
+                { tuple2 T{ tuple2 { d 3 } } }
+            }
+        }
+        {
+            T{ sort-test
+                { a 6 }
+                { tuple2 T{ tuple2 { d 3 } } }
+            }
+            T{ sort-test
+                { a 6 }
+                { tuple2 T{ tuple2 { d 3 } } }
+            }
+        }
+        {
+            T{ sort-test
+                { a 5 }
+                { tuple2 T{ tuple2 { d 4 } } }
+            }
+        }
+    }
+] [
+    {
+        T{ sort-test { a 6 } { tuple2 T{ tuple2 { d 1 } } } }
+        T{ sort-test { a 6 } { tuple2 T{ tuple2 { d 2 } } } }
+        T{ sort-test { a 5 } { tuple2 T{ tuple2 { d 3 } } } }
+        T{ sort-test { a 6 } { tuple2 T{ tuple2 { d 3 } } } }
+        T{ sort-test { a 6 } { tuple2 T{ tuple2 { d 3 } } } }
+        T{ sort-test { a 5 } { tuple2 T{ tuple2 { d 4 } } } }
+    } { { tuple2>> d>> } { a>> } } split-by-slots [ >array ] map
+] unit-test
diff --git a/basis/sorting/slots/slots.factor b/basis/sorting/slots/slots.factor
new file mode 100644 (file)
index 0000000..56b6a11
--- /dev/null
@@ -0,0 +1,30 @@
+! Copyright (C) 2009 Slava Pestov, Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: combinators.short-circuit fry kernel macros math.order
+sequences words sorting sequences.deep assocs splitting.monotonic
+math ;
+IN: sorting.slots
+
+<PRIVATE
+
+: slot-comparator ( seq -- quot )
+    [
+        but-last-slice
+        [ '[ [ _ execute ] bi@ ] ] map concat
+    ] [
+        peek
+        '[ @ _ execute dup +eq+ eq? [ drop f ] when ]
+    ] bi ;
+
+PRIVATE>
+
+MACRO: compare-slots ( sort-specs -- <=> )
+    #! sort-spec: { accessors comparator }
+    [ slot-comparator ] map '[ _ 2|| +eq+ or ] ;
+
+: sort-by-slots ( seq sort-specs -- seq' )
+    '[ _ compare-slots ] sort ;
+
+MACRO: split-by-slots ( accessor-seqs -- quot )
+    [ [ '[ [ _ execute ] bi@ ] ] map concat [ = ] compose ] map
+    '[ [ _ 2&& ] slice monotonic-slice ] ;
diff --git a/basis/soundex/author.txt b/basis/soundex/author.txt
new file mode 100644 (file)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/basis/soundex/soundex-tests.factor b/basis/soundex/soundex-tests.factor
new file mode 100644 (file)
index 0000000..f4bd18e
--- /dev/null
@@ -0,0 +1,5 @@
+IN: soundex.tests
+USING: soundex tools.test ;
+
+[ "S162" ] [ "supercalifrag" soundex ] unit-test
+[ "M000" ] [ "M" soundex ] unit-test
diff --git a/basis/soundex/soundex.factor b/basis/soundex/soundex.factor
new file mode 100644 (file)
index 0000000..164f634
--- /dev/null
@@ -0,0 +1,32 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: sequences grouping assocs kernel ascii ascii tr ;
+IN: soundex
+
+TR: soundex-tr
+    ch>upper
+    "AEHIOUWYBFPVCGJKQSXZDTLMNR"
+    "00000000111122222222334556" ;
+
+: remove-duplicates ( seq -- seq' )
+    #! Remove _consecutive_ duplicates (unlike prune which removes
+    #! all duplicates).
+    [ 2 <clumps> [ = not ] assoc-filter values ] [ first ] bi prefix ;
+
+: first>upper ( seq -- seq' ) 1 head >upper ;
+: trim-first ( seq -- seq' ) dup first [ = ] curry trim-left ;
+: remove-zeroes ( seq -- seq' ) CHAR: 0 swap remove ;
+: remove-non-alpha ( seq -- seq' ) [ alpha? ] filter ;
+: pad-4 ( first seq -- seq' ) "000" 3append 4 head ;
+
+: soundex ( string -- soundex )
+    remove-non-alpha [ f ] [
+        [ first>upper ]
+        [
+            soundex-tr
+            [ "" ] [ trim-first ] if-empty
+            [ "" ] [ remove-duplicates ] if-empty
+            remove-zeroes
+        ] bi
+        pad-4
+    ] if-empty ;
diff --git a/basis/soundex/summary.txt b/basis/soundex/summary.txt
new file mode 100644 (file)
index 0000000..95a271d
--- /dev/null
@@ -0,0 +1 @@
+Soundex is a phonetic algorithm for indexing names by sound
index 14fb7399474e4216ed6971d23dbee8348274f354..ce23186fc6fd7c3b326f3c27d2dc948eea879386 100755 (executable)
@@ -27,8 +27,8 @@ TUPLE: A
 M: A length length>> ;
 M: A nth-unsafe underlying>> NTH call ;
 M: A set-nth-unsafe underlying>> SET-NTH call ;
-M: A like drop dup A instance? [ >A' execute ] unless ;
-M: A new-sequence drop <A'> execute ;
+M: A like drop dup A instance? [ >A' ] unless ;
+M: A new-sequence drop <A'> ;
 
 INSTANCE: A sequence
 
index 579da5b84a4dd783b2d7cc0523d2127e553b4325..9a56346be472a96953b48441646de1c3a421c689 100644 (file)
@@ -49,9 +49,9 @@ M: A set-nth-unsafe underlying>> SET-NTH call ;
 
 : >A ( seq -- specialized-array ) A new clone-like ; inline
 
-M: A like drop dup A instance? [ >A execute ] unless ;
+M: A like drop dup A instance? [ >A ] unless ;
 
-M: A new-sequence drop (A) execute ;
+M: A new-sequence drop (A) ;
 
 M: A equal? over A instance? [ sequence= ] [ 2drop f ] if ;
 
@@ -64,13 +64,13 @@ M: A resize
 
 M: A byte-length underlying>> length ;
 
-M: A pprint-delims drop A{ \ } ;
+M: A pprint-delims drop A{ \ } ;
 
 M: A >pprint-sequence ;
 
 M: A pprint* pprint-object ;
 
-: A{ \ } [ >A execute ] parse-literal ; parsing
+: A{ \ } [ >A ] parse-literal ; parsing
 
 INSTANCE: A sequence
 
index 8ba5354dc40c79f17783dc0493d630029de12f58..2410cc284ec1ab88c2f62fbcf3a4f2de910e8e6d 100644 (file)
@@ -18,28 +18,28 @@ WHERE
 
 TUPLE: V { underlying A } { length array-capacity } ;
 
-: <V> <A> execute 0 V boa ; inline
+: <V> ( capacity -- vector ) <A> 0 V boa ; inline
 
 M: V like
     drop dup V instance? [
-        dup A instance? [ dup length V boa ] [ >V execute ] if
+        dup A instance? [ dup length V boa ] [ >V ] if
     ] unless ;
 
-M: V new-sequence drop [ <A> execute ] [ >fixnum ] bi V boa ;
+M: V new-sequence drop [ <A> ] [ >fixnum ] bi V boa ;
 
-M: A new-resizable drop <V> execute ;
+M: A new-resizable drop <V> ;
 
 M: V equal? over V instance? [ sequence= ] [ 2drop f ] if ;
 
-: >V V new clone-like ; inline
+: >V ( seq -- vector ) V new clone-like ; inline
 
-M: V pprint-delims drop V{ \ } ;
+M: V pprint-delims drop V{ \ } ;
 
 M: V >pprint-sequence ;
 
 M: V pprint* pprint-object ;
 
-: V{ \ } [ >V execute ] parse-literal ; parsing
+: V{ \ } [ >V ] parse-literal ; parsing
 
 INSTANCE: V growable
 
diff --git a/basis/splitting/monotonic/authors.txt b/basis/splitting/monotonic/authors.txt
new file mode 100644 (file)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/basis/splitting/monotonic/monotonic-docs.factor b/basis/splitting/monotonic/monotonic-docs.factor
new file mode 100644 (file)
index 0000000..983c5b0
--- /dev/null
@@ -0,0 +1,109 @@
+! Copyright (C) 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax kernel quotations classes sequences
+multiline ;
+IN: splitting.monotonic
+
+HELP: monotonic-slice
+{ $values
+     { "seq" sequence } { "quot" quotation } { "class" class }
+     { "slices" "a sequence of slices" }
+}
+{ $description "Monotonically splits a sequence into slices of the type " { $snippet "class" } "." }
+{ $examples
+    { $example
+        "USING: splitting.monotonic math prettyprint ;"
+        "{ 1 2 3 2 3 4 } [ < ] upward-slice monotonic-slice ."
+        <" {
+    T{ upward-slice
+        { from 0 }
+        { to 3 }
+        { seq { 1 2 3 2 3 4 } }
+    }
+    T{ upward-slice
+        { from 3 }
+        { to 6 }
+        { seq { 1 2 3 2 3 4 } }
+    }
+}">
+    }
+} ;
+
+HELP: monotonic-split
+{ $values
+     { "seq" sequence } { "quot" quotation }
+     { "newseq" "a sequence of sequences" }
+}
+{ $description "Compares pairs of elements in a sequence and collects elements into sequences while they satisfy the predicate. Once the predicate fails, a new sequence is started, and all sequences are returned in a single sequence." }
+{ $examples
+    { $example
+        "USING: splitting.monotonic math prettyprint ;"
+        "{ 1 2 3 2 3 4 } [ < ] monotonic-split ."
+        "{ V{ 1 2 3 } V{ 2 3 4 } }"
+    }
+} ;
+
+HELP: downward-slices
+{ $values
+     { "seq" sequence }
+     { "slices" "a sequence of downward-slices" }
+}
+{ $description "Returns an array of monotonically decreasing slices of type " { $link downward-slice } ". Slices of one element are discarded." } ;
+
+HELP: stable-slices
+{ $values
+    { "seq" sequence }
+    { "slices" "a sequence of stable-slices" }
+}
+{ $description "Returns an array of monotonically decreasing slices of type " { $link downward-slice } ". Slices of one element are discarded." } ;
+
+HELP: upward-slices
+{ $values
+    { "seq" sequence }
+    { "slices" "a sequence of upward-slices" }
+}
+{ $description "Returns an array of monotonically increasing slices of type " { $link downward-slice } ". Slices of one element are discarded." } ;
+
+HELP: trends
+{ $values
+    { "seq" sequence }
+    { "slices" "a sequence of downward, stable, and upward slices" }
+}
+{ $description "Returns a sorted sequence of downward, stable, or upward slices. The endpoints of some slices may overlap with each other." }
+{ $examples
+    { $example
+        "USING: splitting.monotonic math prettyprint ;"
+        "{ 1 2 3 3 2 1 } trends ."
+        <" {
+    T{ upward-slice
+        { from 0 }
+        { to 3 }
+        { seq { 1 2 3 3 2 1 } }
+    }
+    T{ stable-slice
+        { from 2 }
+        { to 4 }
+        { seq { 1 2 3 3 2 1 } }
+    }
+    T{ downward-slice
+        { from 3 }
+        { to 6 }
+        { seq { 1 2 3 3 2 1 } }
+    }
+}">
+    }
+} ;
+
+ARTICLE: "splitting.monotonic" "Splitting trending sequences"
+"The " { $vocab-link "splitting.monotonic" } " vocabulary splits sequences that are trending downwards, upwards, or stably." $nl
+"Splitting into sequences:"
+{ $subsection monotonic-split }
+"Splitting into slices:"
+{ $subsection monotonic-slice }
+"Trending:"
+{ $subsection downward-slices }
+{ $subsection stable-slices }
+{ $subsection upward-slices }
+{ $subsection trends } ;
+
+ABOUT: "splitting.monotonic"
diff --git a/basis/splitting/monotonic/monotonic-tests.factor b/basis/splitting/monotonic/monotonic-tests.factor
new file mode 100644 (file)
index 0000000..2b44f42
--- /dev/null
@@ -0,0 +1,55 @@
+IN: splitting.monotonic
+USING: tools.test math arrays kernel sequences ;
+
+[ { { 1 } { -1 5 } { 2 4 } } ]
+[ { 1 -1 5 2 4 } [ < ] monotonic-split [ >array ] map ] unit-test
+[ { { 1 1 1 1 } { 2 2 } { 3 } { 4 } { 5 } { 6 6 6 } } ]
+[ { 1 1 1 1 2 2 3 4 5 6 6 6 } [ = ] monotonic-split [ >array ] map ] unit-test
+
+[ { } ]
+[ { } [ = ] slice monotonic-slice ] unit-test
+
+[ t ]
+[ { 1 } [ = ] slice monotonic-slice [ slice? ] all? ] unit-test
+
+[ { { 1 } } ]
+[ { 1 } [ = ] slice monotonic-slice [ >array ] map ] unit-test
+
+[ { 1 } [ = ] slice monotonic-slice ] must-infer
+
+[ t ]
+[ { 1 1 1 2 2 3 3 4 } [ = ] slice monotonic-slice [ slice? ] all? ] unit-test
+
+[ { { 1 1 1 } { 2 2 } { 3 3 } { 4 } } ]
+[ { 1 1 1 2 2 3 3 4 } [ = ] slice monotonic-slice [ >array ] map ] unit-test
+
+[ { { 3 3 } } ]
+[ { 3 3 } [ = ] slice monotonic-slice [ >array ] map ] unit-test
+
+[
+    {
+        T{ upward-slice { from 0 } { to 3 } { seq { 1 2 3 2 1 } } }
+        T{ downward-slice { from 2 } { to 5 } { seq { 1 2 3 2 1 } } }
+    }
+]
+[ { 1 2 3 2 1 } trends ] unit-test
+
+[
+    {
+        T{ upward-slice
+            { from 0 }
+            { to 3 }
+            { seq { 1 2 3 3 2 1 } }
+        }
+        T{ stable-slice
+            { from 2 }
+            { to 4 }
+            { seq { 1 2 3 3 2 1 } }
+        }
+        T{ downward-slice
+            { from 3 }
+            { to 6 }
+            { seq { 1 2 3 3 2 1 } }
+        }
+    }
+] [ { 1 2 3 3 2 1 } trends ] unit-test
diff --git a/basis/splitting/monotonic/monotonic.factor b/basis/splitting/monotonic/monotonic.factor
new file mode 100644 (file)
index 0000000..2e2ac74
--- /dev/null
@@ -0,0 +1,69 @@
+! Copyright (C) 2008, 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: make namespaces sequences kernel fry arrays compiler.utilities
+math accessors circular grouping combinators sorting math.order ;
+IN: splitting.monotonic
+
+<PRIVATE
+
+: ,, ( obj -- ) building get peek push ;
+: v, ( -- ) V{ } clone , ;
+: ,v ( -- ) building get dup peek empty? [ dup pop* ] when drop ;
+
+: (monotonic-split) ( seq quot -- newseq )
+    [
+        [ dup unclip suffix ] dip
+        v, '[ over ,, @ [ v, ] unless ] 2each ,v
+    ] { } make ; inline
+
+PRIVATE>
+
+: monotonic-split ( seq quot -- newseq )
+    over empty? [ 2drop { } ] [ (monotonic-split) ] if ; inline
+
+<PRIVATE
+
+: (monotonic-slice) ( seq quot class -- slices )
+    [
+        dupd '[
+            [ length ] [ ] [ <circular> 1 over change-circular-start ] tri
+            [ @ not [ , ] [ drop ] if ] 3each
+        ] { } make
+        dup empty? [ over length 1- prefix ] when -1 prefix 2 clump
+        swap
+    ] dip
+    '[ first2 [ 1+ ] bi@ _ _ boa ] map ; inline
+
+PRIVATE>
+
+: monotonic-slice ( seq quot class -- slices )
+    pick length {
+        { 0 [ 2drop ] }
+        { 1 [ nip [ 0 1 rot ] dip boa 1array ] }
+        [ drop (monotonic-slice) ]
+    } case ; inline
+
+TUPLE: downward-slice < slice ;
+TUPLE: stable-slice < slice ;
+TUPLE: upward-slice < slice ;
+
+: downward-slices ( seq -- slices )
+    [ > ] downward-slice monotonic-slice [ length 1 > ] filter ;
+
+: stable-slices ( seq -- slices )
+    [ = ] stable-slice monotonic-slice [ length 1 > ] filter ;
+
+: upward-slices ( seq -- slices )
+    [ < ] upward-slice monotonic-slice [ length 1 > ] filter ;
+
+: trends ( seq -- slices )
+    dup length {
+        { 0 [ ] }
+        { 1 [ [ 0 1 ] dip stable-slice boa ] }
+        [
+            drop
+            [ downward-slices ]
+            [ stable-slices ]
+            [ upward-slices ] tri 3append [ [ from>> ] compare ] sort
+        ]
+    } case ;
diff --git a/basis/splitting/monotonic/summary.txt b/basis/splitting/monotonic/summary.txt
new file mode 100644 (file)
index 0000000..6782bd0
--- /dev/null
@@ -0,0 +1 @@
+Split a sequence into monotonically-increasing subsequences
diff --git a/basis/splitting/monotonic/tags.txt b/basis/splitting/monotonic/tags.txt
new file mode 100644 (file)
index 0000000..d4c0877
--- /dev/null
@@ -0,0 +1,2 @@
+algorithms
+sequences
index 147749864d23d2daf5ef41923fb8ec8f72fb34b6..9516b8cd7d4c22a12d25c1c7935ca78dce1673cc 100644 (file)
@@ -145,7 +145,6 @@ M: object apply-object push-literal ;
 
 : effect-required? ( word -- ? )
     {
-        { [ dup inline? ] [ drop f ] }
         { [ dup deferred? ] [ drop f ] }
         { [ dup crossref? not ] [ drop f ] }
         [ def>> [ word? ] contains? ]
index e4c11960de90acd5dcdf8aa4d6fb1ccc80b20a73..aa179fe191a1806daf925eb2b6d877c9dfc4d884 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: fry vectors sequences assocs math accessors kernel
-combinators quotations namespaces stack-checker.state
+combinators quotations namespaces grouping stack-checker.state
 stack-checker.backend stack-checker.errors stack-checker.visitor
 stack-checker.values stack-checker.recursive-state ;
 IN: stack-checker.branches
index d4a074031dc319a92f996dd2c0e83977d2c87f36..c3b9797a363a42095dd052aeddb3b03ea121a434 100644 (file)
@@ -28,22 +28,10 @@ $nl
 } ;
 
 HELP: too-many->r
-{ $error-description "Thrown if inference notices a quotation pushing elements on the retain stack without popping them at the end." }
-{ $examples
-    { $code
-        ": too-many->r-example ( a b -- )"
-        "    >r 3 + >r ;"
-    }
-} ;
+{ $error-description "Thrown if inference notices a quotation pushing elements on the retain stack without popping them at the end." } ;
 
 HELP: too-many-r>
-{ $error-description "Thrown if inference notices a quotation popping elements from the return stack it did not place there." }
-{ $examples
-    { $code
-        ": too-many-r>-example ( a b -- )"
-        "    r> 3 + >r ;"
-    }
-} ;
+{ $error-description "Thrown if inference notices a quotation popping elements from the return stack it did not place there." } ;
 
 HELP: missing-effect
 { $error-description "Thrown when inference encounters a word lacking a stack effect declaration. Stack effects of words must be declared, with the exception of words which only push literals on the stack." }
index bce42f1456e325546fb781dec7333198dda1749e..7cdce301b5cf296d231522941417ccd0ba180003 100644 (file)
@@ -174,8 +174,6 @@ M: object infer-call*
 
 : infer-special ( word -- )
     {
-        { \ >r [ 1 infer->r ] }
-        { \ r> [ 1 infer-r> ] }
         { \ declare [ infer-declare ] }
         { \ call [ infer-call ] }
         { \ (call) [ infer-call ] }
@@ -194,6 +192,7 @@ M: object infer-call*
         { \ <tuple-boa> [ infer-<tuple-boa> ] }
         { \ (throw) [ infer-(throw) ] }
         { \ exit [ infer-exit ] }
+        { \ load-local [ 1 infer->r ] }
         { \ load-locals [ infer-load-locals ] }
         { \ get-local [ infer-get-local ] }
         { \ drop-locals [ infer-drop-locals ] }
@@ -213,9 +212,9 @@ M: object infer-call*
     "local-word-def" word-prop infer-quot-here ;
 
 {
-    >r r> declare call (call) slip 2slip 3slip dip 2dip 3dip
+    declare call (call) slip 2slip 3slip dip 2dip 3dip
     curry compose execute (execute) if dispatch <tuple-boa>
-    (throw) load-locals get-local drop-locals do-primitive
+    (throw) load-local load-locals get-local drop-locals do-primitive
     alien-invoke alien-indirect alien-callback
 } [ t "special" set-word-prop ] each
 
@@ -644,7 +643,7 @@ M: object infer-call*
 
 \ dll-valid? { object } { object } define-primitive
 
-\ modify-code-heap { array object } { } define-primitive
+\ modify-code-heap { array } { } define-primitive
 
 \ unimplemented { } { } define-primitive
 
index f208178b10f335d239341c46ba7c59983100c417..5b67cd9adc0970598213f2899fc434846633fce8 100644 (file)
@@ -21,7 +21,7 @@ $nl
 
 ARTICLE: "inference-combinators" "Combinator stack effects"
 "Without further information, one cannot say what the stack effect of " { $link call } " is; it depends on the given quotation. If the inferencer encounters a " { $link call } " without further information, a " { $link literal-expected } " error is raised."
-{ $example "[ dup call ] infer." "... an error ..." }
+{ $example "[ dup call ] infer." "Literal value expected\n\nType :help for debugging help." }
 "On the other hand, the stack effect of applying " { $link call } " to a literal quotation or a " { $link curry } " of a literal quotation is easy to compute; it behaves as if the quotation was substituted at that point:"
 { $example "[ [ 2 + ] call ] infer." "( object -- object )" }
 "Consider a combinator such as " { $link keep } ". The combinator itself does not have a stack effect, because it applies " { $link call } " to a potentially arbitrary quotation. However, since the combinator is declared " { $link POSTPONE: inline } ", a given usage of it can have a stack effect:"
@@ -35,7 +35,15 @@ $nl
 "Here is an example where the stack effect cannot be inferred:"
 { $code ": foo 0 [ + ] ;" "[ foo reduce ] infer." }
 "However if " { $snippet "foo" } " was declared " { $link POSTPONE: inline } ", everything would work, since the " { $link reduce } " combinator is also " { $link POSTPONE: inline } ", and the inferencer can see the literal quotation value at the point it is passed to " { $link call } ":"
-{ $example ": foo 0 [ + ] ; inline" "[ foo reduce ] infer." "( object -- object )" } ;
+{ $example ": foo 0 [ + ] ; inline" "[ foo reduce ] infer." "( object -- object )" }
+"Passing a literal quotation on the data stack through an inlined recursive combinator nullifies its literal status. For example, the following will not infer:"
+{ $example
+  "[ [ reverse ] swap [ reverse ] map swap call ] infer." "Literal value expected\n\nType :help for debugging help."
+}
+"To make this work, pass the quotation on the retain stack instead:"
+{ $example
+  "[ [ reverse ] [ [ reverse ] map ] dip call ] infer." "( object -- object )"
+} ;
 
 ARTICLE: "inference-branches" "Branch stack effects"
 "Conditionals such as " { $link if } " and combinators built on " { $link if } " present a problem, in that if the two branches leave the stack at a different height, it is not clear what the stack effect should be. In this case, inference throws a " { $link unbalanced-branches-error } "."
@@ -58,12 +66,14 @@ $nl
 $nl
 "If a recursive word takes quotation parameters from the stack and calls them, it must be declared " { $link POSTPONE: inline } " (as documented in " { $link "inference-combinators" } ") as well as " { $link POSTPONE: recursive } "."
 $nl
-"Furthermore, the input parameters which are quotations must be annotated in the stack effect. For example,"
-{ $see loop }
-"An inline recursive word cannot pass a quotation through the recursive call. For example, the following will not infer:"
-{ $code ": foo ( a b c -- d e f ) [ f foo drop ] when 2dup call ; inline" "[ 1 [ 1+ ] foo ] infer." }
+"Furthermore, the input parameters which are quotations must be annotated in the stack effect. For example, the following will not infer:"
+{ $example ": bad ( quot -- ) [ call ] keep foo ; inline recursive" "[ [ ] bad ] infer." "Literal value expected\n\nType :help for debugging help." }
+"The following is correct:"
+{ $example ": good ( quot: ( -- ) -- ) [ call ] keep good ; inline recursive" "[ [ ] good ] infer." "( -- )" }
+"An inline recursive word cannot pass a quotation on the data stack through the recursive call. For example, the following will not infer:"
+{ $example ": bad ( ? quot: ( ? -- ) -- ) 2dup [ not ] dip bad call ; inline recursive" "[ [ drop ] bad ] infer." "Literal value expected\n\nType :help for debugging help." }
 "However a small change can be made:"
-{ $example ": foo ( a b c -- d ) [ 2dup f foo drop ] when call ; inline" "[ 1 [ 1+ ] t foo ] infer." "( -- object )" }
+{ $example ": good ( ? quot: ( ? -- ) -- ) [ good ] 2keep [ not ] dip call ; inline recursive" "[ [ drop ] good ] infer." "( object -- )" }
 "An inline recursive word must have a fixed stack effect in its base case. The following will not infer:"
 { $code
     ": foo ( quot ? -- ) [ f foo ] [ call ] if ; inline"
index defcde53f034b0e32944f4151f85a17c4228d8c9..4d7295042c09c3a57624b0df80936bd9e1205b64 100644 (file)
@@ -6,7 +6,7 @@ quotations effects tools.test continuations generic.standard
 sorting assocs definitions prettyprint io inspector
 classes.tuple classes.union classes.predicate debugger
 threads.private io.streams.string io.timeouts io.thread
-sequences.private destructors combinators eval ;
+sequences.private destructors combinators eval locals.backend ;
 IN: stack-checker.tests
 
 \ infer. must-infer
@@ -218,7 +218,7 @@ DEFER: do-crap*
 MATH: xyz ( a b -- c )
 M: fixnum xyz 2array ;
 M: float xyz
-    [ 3 ] bi@ swapd >r 2array swap r> 2array swap ;
+    [ 3 ] bi@ swapd [ 2array swap ] dip 2array swap ;
 
 [ [ xyz ] infer ] [ inference-error? ] must-fail-with
 
@@ -320,7 +320,7 @@ DEFER: bar
 : bad-bin ( a b -- ) 5 [ 5 bad-bin bad-bin 5 ] [ 2drop ] if ;
 [ [ bad-bin ] infer ] must-fail
 
-[ [ r> ] infer ] [ inference-error? ] must-fail-with
+[ [ 1 drop-locals ] infer ] [ inference-error? ] must-fail-with
 
 ! Regression
 [ [ cleave ] infer ] [ inference-error? ] must-fail-with
@@ -416,12 +416,7 @@ DEFER: bar
 \ stream-write must-infer
 \ stream-write1 must-infer
 \ stream-nl must-infer
-\ stream-format must-infer
-\ stream-write-table must-infer
 \ stream-flush must-infer
-\ make-span-stream must-infer
-\ make-block-stream must-infer
-\ make-cell-stream must-infer
 
 ! Test stream utilities
 \ lines must-infer
@@ -480,7 +475,7 @@ DEFER: an-inline-word
     dup [ normal-word-2 ] when ;
 
 : an-inline-word ( obj quot -- )
-    >r normal-word r> call ; inline
+    [ normal-word ] dip call ; inline
 
 { 1 1 } [ [ 3 * ] an-inline-word ] must-infer-as
 
@@ -502,8 +497,8 @@ ERROR: custom-error ;
     [ custom-error inference-error ] infer
 ] unit-test
 
-[ T{ effect f 1 1 t } ] [
-    [ dup >r 3 throw r> ] infer
+[ T{ effect f 1 2 t } ] [
+    [ dup [ 3 throw ] dip ] infer
 ] unit-test
 
 ! This was a false trigger of the undecidable quotation
@@ -511,7 +506,7 @@ ERROR: custom-error ;
 { 2 1 } [ find-last-sep ] must-infer-as
 
 ! Regression
-: missing->r-check >r ;
+: missing->r-check 1 load-locals ;
 
 [ [ missing->r-check ] infer ] must-fail
 
@@ -548,7 +543,7 @@ M: object inference-invalidation-d inference-invalidation-c 2drop ;
 
 [ [ inference-invalidation-d ] infer ] must-fail
 
-: bad-recursion-3 ( -- ) dup [ >r bad-recursion-3 r> ] when ; inline
+: bad-recursion-3 ( -- ) dup [ [ bad-recursion-3 ] dip ] when ; inline
 [ [ bad-recursion-3 ] infer ] must-fail
 
 : bad-recursion-4 ( -- ) 4 [ dup call roll ] times ; inline
@@ -572,7 +567,7 @@ M: object inference-invalidation-d inference-invalidation-c 2drop ;
 
 DEFER: eee'
 : ddd' ( ? -- ) [ f eee' ] when ; inline recursive
-: eee' ( ? -- ) >r swap [ ] r> ddd' call ; inline recursive
+: eee' ( ? -- ) [ swap [ ] ] dip ddd' call ; inline recursive
 
 [ [ eee' ] infer ] [ inference-error? ] must-fail-with
 
diff --git a/basis/state-parser/authors.txt b/basis/state-parser/authors.txt
deleted file mode 100644 (file)
index f990dd0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Daniel Ehrenberg
diff --git a/basis/state-parser/state-parser-docs.factor b/basis/state-parser/state-parser-docs.factor
deleted file mode 100644 (file)
index 3027c01..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-USING: help.markup help.syntax ;
-IN: state-parser
-
-ABOUT: { "state-parser" "main" }
-
-ARTICLE: { "state-parser" "main" } "State-based parsing"
-    "This module defines a state-based parsing mechanism. It was originally created for libs/xml, but is also used in libs/csv and can be easily used in new libraries or applications."
-    { $subsection spot }
-    { $subsection skip-until }
-    { $subsection take-until }
-    { $subsection take-char }
-    { $subsection take-string }
-    { $subsection next }
-    { $subsection state-parse }
-    { $subsection get-char }
-    { $subsection take-rest }
-    { $subsection string-parse }
-    { $subsection expect }
-    { $subsection expect-string }
-    { $subsection parsing-error } ;
-
-HELP: get-char
-{ $values { "char" "the current character" } }
-{ $description "Accesses the current character of the stream that is being parsed" } ;
-
-HELP: take-rest
-{ $values { "string" "the rest of the parser input" } }
-{ $description "Exausts the stream of the parser input and returns a string representing the rest of the input" } ;
-
-HELP: string-parse
-{ $values { "input" "a string" } { "quot" "a quotation ( -- )" } }
-{ $description "Calls the given quotation using the given string as parser input" }
-{ $see-also state-parse } ;
-
-HELP: expect
-{ $values { "ch" "a number representing a character" } }
-{ $description "Asserts that the current character is the given ch, and moves to the next spot" }
-{ $see-also expect-string } ;
-
-HELP: expect-string
-{ $values { "string" "a string" } }
-{ $description "Asserts that the current parsing spot is followed by the given string, and skips the parser past that string" }
-{ $see-also expect } ;
-
-HELP: spot
-{ $var-description "This variable represents the location in the program. It is a tuple T{ spot f char column line next } where char is the current character, line is the line number, column is the column number, and line-str is the full contents of the line, as a string. The contents shouldn't be accessed directly but rather with the proxy words get-char set-char get-line etc." } ;
-
-HELP: skip-until
-{ $values { "quot" "a quotation ( -- ? )" } }
-{ $description "executes " { $link next } " until the quotation yields false. Usually, the quotation will call " { $link get-char } " in its test, but not always." }
-{ $see-also take-until } ;
-
-HELP: take-until
-{ $values { "quot" "a quotation ( -- ? )" } { "string" "a string" } }
-{ $description "like " { $link skip-until } " but records what it passes over and outputs the string." }
-{ $see-also skip-until take-char take-string } ;
-
-HELP: take-char
-{ $values { "ch" "a character" } { "string" "a string" } }
-{ $description "records the document from the current spot to the first instance of the given character. Outputs the content between those two points." }
-{ $see-also take-until take-string } ;
-
-HELP: take-string
-{ $values { "match" "a string to match" } { "string" "the portion of the XML document" } }
-{ $description "records the document from the current spot to the first instance of the given character. Outputs the content between those two points." }
-{ $notes "match may not contain a newline" } ;
-
-HELP: next
-{ $description "originally written as " { $code "spot inc" } ", code that would no longer run, this word moves the state of the XML parser to the next place in the source file, keeping track of appropriate debugging information." } ;
-
-HELP: parsing-error
-{ $class-description "class from which parsing errors inherit, containing information about which line and column the error occured on, and what the line was. Contains three slots, line, an integer, column, another integer, and line-str, a string" } ;
diff --git a/basis/state-parser/state-parser-tests.factor b/basis/state-parser/state-parser-tests.factor
deleted file mode 100644 (file)
index e0b274b..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-USING: tools.test state-parser kernel io strings ascii ;
-
-[ "hello" ] [ "hello" [ take-rest ] string-parse ] unit-test
-[ 2 4 ] [ "12\n123" [ take-rest drop get-line get-column ] string-parse ] unit-test
-[ "hi" " how are you?" ] [ "hi how are you?" [ [ get-char blank? ] take-until take-rest ] string-parse ] unit-test
-[ "foo" ";bar" ] [ "foo;bar" [ CHAR: ; take-char take-rest ] string-parse ] unit-test
-[ "foo " " bar" ] [ "foo and bar" [ "and" take-string take-rest ] string-parse ] unit-test
-[ "baz" ] [ " \n\t baz" [ pass-blank take-rest ] string-parse ] unit-test
diff --git a/basis/state-parser/state-parser.factor b/basis/state-parser/state-parser.factor
deleted file mode 100644 (file)
index 9341f39..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-! Copyright (C) 2005, 2006 Daniel Ehrenberg\r
-! See http://factorcode.org/license.txt for BSD license.\r
-USING: io io.streams.string kernel math namespaces sequences\r
-strings circular prettyprint debugger ascii sbufs fry summary\r
-accessors ;\r
-IN: state-parser\r
-\r
-! * Basic underlying words\r
-! Code stored in stdio\r
-! Spot is composite so it won't be lost in sub-scopes\r
-TUPLE: spot char line column next ;\r
-\r
-C: <spot> spot\r
-\r
-: get-char ( -- char ) spot get char>> ;\r
-: set-char ( char -- ) spot get swap >>char drop ;\r
-: get-line ( -- line ) spot get line>> ;\r
-: set-line ( line -- ) spot get swap >>line drop ;\r
-: get-column ( -- column ) spot get column>> ;\r
-: set-column ( column -- ) spot get swap >>column drop ;\r
-: get-next ( -- char ) spot get next>> ;\r
-: set-next ( char -- ) spot get swap >>next drop ;\r
-\r
-! * Errors\r
-TUPLE: parsing-error line column ;\r
-\r
-: parsing-error ( class -- obj )\r
-    new\r
-        get-line >>line\r
-        get-column >>column ;\r
-M: parsing-error summary ( obj -- str )\r
-    [\r
-        "Parsing error" print\r
-        "Line: " write dup line>> .\r
-        "Column: " write column>> .\r
-    ] with-string-writer ;\r
-\r
-TUPLE: expected < parsing-error should-be was ;\r
-: expected ( should-be was -- * )\r
-    \ expected parsing-error\r
-        swap >>was\r
-        swap >>should-be throw ;\r
-M: expected summary ( obj -- str )\r
-    [\r
-        dup call-next-method write\r
-        "Token expected: " write dup should-be>> print\r
-        "Token present: " write was>> print\r
-    ] with-string-writer ;\r
-\r
-TUPLE: unexpected-end < parsing-error ;\r
-: unexpected-end ( -- * ) \ unexpected-end parsing-error throw ;\r
-M: unexpected-end summary ( obj -- str )\r
-    [\r
-        call-next-method write\r
-        "File unexpectedly ended." print\r
-    ] with-string-writer ;\r
-\r
-TUPLE: missing-close < parsing-error ;\r
-: missing-close ( -- * ) \ missing-close parsing-error throw ;\r
-M: missing-close summary ( obj -- str )\r
-    [\r
-        call-next-method write\r
-        "Missing closing token." print\r
-    ] with-string-writer ;\r
-\r
-SYMBOL: prolog-data\r
-\r
-! * Basic utility words\r
-\r
-: record ( char -- )\r
-    CHAR: \n =\r
-    [ 0 get-line 1+ set-line ] [ get-column 1+ ] if\r
-    set-column ;\r
-\r
-! (next) normalizes \r\n and \r\r
-: (next) ( -- char )\r
-    get-next read1\r
-    2dup swap CHAR: \r = [\r
-        CHAR: \n =\r
-        [ nip read1 ] [ nip CHAR: \n swap ] if\r
-    ] [ drop ] if\r
-    set-next dup set-char ;\r
-\r
-: next ( -- )\r
-    #! Increment spot.\r
-    get-char [ unexpected-end ] unless (next) record ;\r
-\r
-: next* ( -- )\r
-    get-char [ (next) record ] when ;\r
-\r
-: skip-until ( quot: ( -- ? ) -- )\r
-    get-char [\r
-        [ call ] keep swap [ drop ] [\r
-            next skip-until\r
-        ] if\r
-    ] [ drop ] if ; inline recursive\r
-\r
-: take-until ( quot -- string )\r
-    #! Take the substring of a string starting at spot\r
-    #! from code until the quotation given is true and\r
-    #! advance spot to after the substring.\r
-    10 <sbuf> [\r
-        '[ @ [ t ] [ get-char _ push f ] if ] skip-until\r
-    ] keep >string ; inline\r
-\r
-: take-rest ( -- string )\r
-    [ f ] take-until ;\r
-\r
-: take-char ( ch -- string )\r
-    [ dup get-char = ] take-until nip ;\r
-\r
-TUPLE: not-enough-characters < parsing-error ;\r
-: not-enough-characters ( -- * )\r
-    \ not-enough-characters parsing-error throw ;\r
-M: not-enough-characters summary ( obj -- str )\r
-    [\r
-        call-next-method write\r
-        "Not enough characters" print\r
-    ] with-string-writer ;\r
-\r
-: take ( n -- string )\r
-    [ 1- ] [ <sbuf> ] bi [\r
-        '[ drop get-char [ next _ push f ] [ t ] if* ] contains? drop\r
-    ] keep get-char [ over push ] when* >string ;\r
-\r
-: pass-blank ( -- )\r
-    #! Advance code past any whitespace, including newlines\r
-    [ get-char blank? not ] skip-until ;\r
-\r
-: string-matches? ( string circular -- ? )\r
-    get-char over push-circular\r
-    sequence= ;\r
-\r
-: take-string ( match -- string )\r
-    dup length <circular-string>\r
-    [ 2dup string-matches? ] take-until nip\r
-    dup length rot length 1- - head\r
-    get-char [ missing-close ] unless next ;\r
-\r
-: expect ( ch -- )\r
-    get-char 2dup = [ 2drop ] [\r
-        [ 1string ] bi@ expected\r
-    ] if next ;\r
-\r
-: expect-string ( string -- )\r
-    dup [ get-char next ] replicate 2dup =\r
-    [ 2drop ] [ expected ] if ;\r
-\r
-: init-parser ( -- )\r
-    0 1 0 f <spot> spot set\r
-    read1 set-next next ;\r
-\r
-: state-parse ( stream quot -- )\r
-    ! with-input-stream implicitly creates a new scope which we use\r
-    swap [ init-parser call ] with-input-stream ; inline\r
-\r
-: string-parse ( input quot -- )\r
-    [ <string-reader> ] dip state-parse ; inline\r
diff --git a/basis/state-parser/summary.txt b/basis/state-parser/summary.txt
deleted file mode 100644 (file)
index 5d14290..0000000
+++ /dev/null
@@ -1 +0,0 @@
-State-machined based text parsing framework
index d2bf583b5aac311ac7675d07e1af9f9758e0a559..6f77e66cd2ac2ca5179fdbeaabfc63f5211d0014 100755 (executable)
@@ -1,6 +1,7 @@
 IN: struct-arrays.tests
 USING: struct-arrays tools.test kernel math sequences
-alien.syntax alien.c-types destructors libc accessors ;
+alien.syntax alien.c-types destructors libc accessors
+destructors ;
 
 C-STRUCT: test-struct
 { "int" "x" }
@@ -27,3 +28,12 @@ C-STRUCT: test-struct
         0 [ [ test-struct-x ] [ test-struct-y ] bi / + ] reduce
     ] with-destructors
 ] unit-test
+
+[ ] [ ALIEN: 123 10 "test-struct" <direct-struct-array> drop ] unit-test
+
+[ ] [
+    [
+        10 "test-struct" malloc-struct-array
+        underlying>> &free drop
+    ] with-destructors
+] unit-test
\ No newline at end of file
index 33a469d0c846273549d7ba14bad43bc6a0770272..ba0524009f0b6e1cb6e34ddf158c3b112730c12a 100755 (executable)
@@ -32,9 +32,9 @@ ERROR: bad-byte-array-length byte-array ;
     ] keep struct-array boa ; inline
 
 : <direct-struct-array> ( alien length c-type -- struct-array )
-    struct-array boa ; inline
+    heap-size struct-array boa ; inline
 
 : malloc-struct-array ( length c-type -- struct-array )
-    heap-size [ calloc ] 2keep <direct-struct-array> ;
+    [ heap-size calloc ] 2keep <direct-struct-array> ;
 
 INSTANCE: struct-array sequence
diff --git a/basis/symbols/authors.txt b/basis/symbols/authors.txt
deleted file mode 100644 (file)
index f372b57..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Slava Pestov
-Doug Coleman
diff --git a/basis/symbols/summary.txt b/basis/symbols/summary.txt
deleted file mode 100644 (file)
index 3093468..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Utility for defining multiple symbols at a time
diff --git a/basis/symbols/symbols-docs.factor b/basis/symbols/symbols-docs.factor
deleted file mode 100644 (file)
index 9f79b71..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-USING: help.markup help.syntax ;
-IN: symbols
-
-HELP: SYMBOLS:
-{ $syntax "SYMBOLS: words... ;" }
-{ $values { "words" "a sequence of new words to define" } }
-{ $description "Creates a new word for every token until the ';'." }
-{ $examples { $example "USING: prettyprint symbols ;" "IN: scratchpad" "SYMBOLS: foo bar baz ;\nfoo . bar . baz ." "foo\nbar\nbaz" } }
-{ $see-also POSTPONE: SYMBOL: } ;
diff --git a/basis/symbols/symbols-tests.factor b/basis/symbols/symbols-tests.factor
deleted file mode 100644 (file)
index 274c4de..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-USING: kernel symbols tools.test parser generic words accessors
-eval ;
-IN: symbols.tests
-
-[ ] [ SYMBOLS: a b c ; ] unit-test
-[ a ] [ a ] unit-test
-[ b ] [ b ] unit-test
-[ c ] [ c ] unit-test
-
-DEFER: blah
-
-[ ] [ "IN: symbols.tests GENERIC: blah" eval ] unit-test
-[ ] [ "IN: symbols.tests USE: symbols SYMBOLS: blah ;" eval ] unit-test
-
-[ f ] [ \ blah generic? ] unit-test
-[ t ] [ \ blah symbol? ] unit-test
-
-[ "IN: symbols.tests USE: symbols SINGLETONS: blah blah blah ;" eval ]
-[ error>> error>> def>> \ blah eq? ]
-must-fail-with
-
diff --git a/basis/symbols/symbols.factor b/basis/symbols/symbols.factor
deleted file mode 100644 (file)
index 6cf8eac..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: parser lexer sequences words kernel classes.singleton
-classes.parser ;
-IN: symbols
-
-: SYMBOLS:
-    ";" parse-tokens
-    [ create-in dup reset-generic define-symbol ] each ;
-    parsing
-
-: SINGLETONS:
-    ";" parse-tokens
-    [ create-class-in define-singleton-class ] each ;
-    parsing
diff --git a/basis/symbols/tags.txt b/basis/symbols/tags.txt
deleted file mode 100644 (file)
index f427429..0000000
+++ /dev/null
@@ -1 +0,0 @@
-extensions
index 1ddcbf809050653d1c561283d96b24730efac437..8cfdc9e1d54ddfa2e22ce867e486d28a703e5b64 100644 (file)
@@ -1,5 +1,5 @@
 USING: syndication io kernel io.files tools.test io.encodings.utf8
-calendar urls ;
+calendar urls xml.writer ;
 IN: syndication.tests
 
 \ download-feed must-infer
@@ -43,3 +43,4 @@ IN: syndication.tests
         }
     }
 } ] [ "resource:basis/syndication/test/atom.xml" load-news-file ] unit-test
+[ ] [ "resource:basis/syndication/test/atom.xml" load-news-file feed>xml xml>string drop ] unit-test
index a6eaff44926f7c3c4e9ce4dd4354c2ebfe1ed45c..b23910e2004361d87492e8e8ba55fcd8f36c9ca4 100644 (file)
@@ -1,15 +1,15 @@
 ! Copyright (C) 2006 Chris Double, Daniel Ehrenberg.
 ! Portions copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: xml.utilities kernel assocs xml.generator math.order
+USING: xml.utilities kernel assocs math.order
     strings sequences xml.data xml.writer
-    io.streams.string combinators xml xml.entities io.files io
-    http.client namespaces make xml.generator hashtables
+    io.streams.string combinators xml xml.entities.html io.files io
+    http.client namespaces make xml.interpolate hashtables
     calendar.format accessors continuations urls present ;
 IN: syndication
 
 : any-tag-named ( tag names -- tag-inside )
-    f -rot [ tag-named nip dup ] with find 2drop ;
+    [ f ] 2dip [ tag-named nip dup ] with find 2drop ;
 
 TUPLE: feed title url entries ;
 
@@ -70,8 +70,8 @@ TUPLE: entry title url description date ;
     tri ;
 
 : atom-entry-link ( tag -- url/f )
-    "link" tags-named [ "rel" swap at "alternate" = ] find nip
-    dup [ "href" swap at >url ] when ;
+    "link" tags-named [ "rel" attr "alternate" = ] find nip
+    dup [ "href" attr >url ] when ;
 
 : atom1.0-entry ( tag -- entry )
     entry new
@@ -81,7 +81,7 @@ TUPLE: entry title url description date ;
         [
             { "content" "summary" } any-tag-named
             dup children>> [ string? not ] contains?
-            [ children>> [ write-xml-chunk ] with-string-writer ]
+            [ children>> xml>string ]
             [ children>string ] if >>description
         ]
         [
@@ -95,7 +95,7 @@ TUPLE: entry title url description date ;
     feed new
     swap
     [ "title" tag-named children>string >>title ]
-    [ "link" tag-named "href" swap at >url >>url ]
+    [ "link" tag-named "href" attr >url >>url ]
     [ "entry" tags-named [ atom1.0-entry ] map set-entries ]
     tri ;
 
@@ -114,26 +114,31 @@ TUPLE: entry title url description date ;
     http-get nip string>feed ;
 
 ! Atom generation
-: simple-tag, ( content name -- )
-    [ , ] tag, ;
-
-: simple-tag*, ( content name attrs -- )
-    [ , ] tag*, ;
-
-: entry, ( entry -- )
-    "entry" [
-        {
-            [ title>> "title" { { "type" "html" } } simple-tag*, ]
-            [ url>> present "href" associate "link" swap contained*, ]
-            [ date>> timestamp>rfc3339 "published" simple-tag, ]
-            [ description>> [ "content" { { "type" "html" } } simple-tag*, ] when* ]
-        } cleave
-    ] tag, ;
+
+: entry>xml ( entry -- xml )
+    {
+        [ title>> ]
+        [ url>> present ]
+        [ date>> timestamp>rfc3339 ]
+        [ description>> ]
+    } cleave
+    [XML
+        <entry>
+            <title type="html"><-></title>
+            <link href=<-> />
+            <published><-></published>
+            <content type="html"><-></content>
+        </entry>
+    XML] ;
 
 : feed>xml ( feed -- xml )
-    "feed" { { "xmlns" "http://www.w3.org/2005/Atom" } } [
-        [ title>> "title" simple-tag, ]
-        [ url>> present "href" associate "link" swap contained*, ]
-        [ entries>> [ entry, ] each ]
-        tri
-    ] make-xml* ;
+    [ title>> ]
+    [ url>> present ]
+    [ entries>> [ entry>xml ] map ] tri
+    <XML
+        <feed xmlns="http://www.w3.org/2005/Atom">
+            <title><-></title>
+            <link href=<-> />
+            <->
+        </feed>
+    XML> ;
index a8cdf6f41c3e5705edc26fb87181bc14cbfdd1a5..9dd1895a6808b33a450eb6d53a17086903af64e6 100644 (file)
@@ -1,16 +1,18 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays cocoa.messages cocoa.runtime combinators
-prettyprint ;
+prettyprint combinators.smart ;
 IN: tools.cocoa
 
 : method. ( method -- )
-    {
-        [ method_getName sel_getName ]
-        [ method-return-type ]
-        [ method-arg-types ]
-        [ method_getImplementation ]
-    } cleave 4array . ;
+    [
+        {
+            [ method_getName sel_getName ]
+            [ method-return-type ]
+            [ method-arg-types ]
+            [ method_getImplementation ]
+        } cleave
+    ] output>array . ;
 
 : methods. ( class -- )
     [ method. ] each-method-in-class ;
index 5bf917f9062ae77a9ca01a3951702cce7fbf8739..e7e2e552593471d6de560259e4ebd1b51ea95c82 100644 (file)
@@ -1,5 +1,6 @@
-USING: math kernel sequences io.files tools.crossref tools.test
-parser namespaces source-files generic definitions ;
+USING: math kernel sequences io.files io.pathnames
+tools.crossref tools.test parser namespaces source-files generic
+definitions ;
 IN: tools.crossref.tests
 
 GENERIC: foo
index ee8615ac5a8119cd99a8c8b6ed816122d52d934d..636e44062e4a4b0c567d6f0677b18cceeed4a037 100644 (file)
@@ -4,9 +4,11 @@ USING: namespaces make continuations.private kernel.private init
 assocs kernel vocabs words sequences memory io system arrays
 continuations math definitions mirrors splitting parser classes
 summary layouts vocabs.loader prettyprint.config prettyprint
-debugger io.streams.c io.files io.backend quotations io.launcher
-words.private tools.deploy.config tools.deploy.config.editor
-bootstrap.image io.encodings.utf8 destructors accessors ;
+debugger io.streams.c io.files io.files.temp io.pathnames
+io.directories io.directories.hierarchy io.backend quotations
+io.launcher words.private tools.deploy.config
+tools.deploy.config.editor bootstrap.image io.encodings.utf8
+destructors accessors ;
 IN: tools.deploy.backend
 
 : copy-vm ( executable bundle-name extension -- vm )
index 2b5788adfcf722fd25761d0cb2c63a3cb0c3a201..ac89e3290bf024c4e32f3e9cc728674890e68ef3 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: assocs io.files kernel parser prettyprint sequences
+USING: assocs io.pathnames kernel parser prettyprint sequences
 splitting tools.deploy.config tools.vocabs vocabs.loader ;
 IN: tools.deploy.config.editor
 
index a390ce56c4437f4b16a74da051fde20cc7c98502..8b36947f439921ba0bebaa26220f95406290a2ca 100644 (file)
@@ -1,18 +1,10 @@
 IN: tools.deploy.tests\r
-USING: tools.test system io.files kernel tools.deploy.config\r
+USING: tools.test system io.pathnames io.files io.files.info\r
+io.files.temp kernel tools.deploy.config\r
 tools.deploy.config.editor tools.deploy.backend math sequences\r
 io.launcher arrays namespaces continuations layouts accessors\r
-io.encodings.ascii urls math.parser ;\r
-\r
-: shake-and-bake ( vocab -- )\r
-    [ "test.image" temp-file delete-file ] ignore-errors\r
-    "resource:" [\r
-        [ vm "test.image" temp-file ] dip\r
-        dup deploy-config make-deploy-image\r
-    ] with-directory ;\r
-\r
-: small-enough? ( n -- ? )\r
-    [ "test.image" temp-file file-info size>> ] [ cell 4 / * ] bi* <= ;\r
+io.encodings.ascii urls math.parser io.directories\r
+tools.deploy.test ;\r
 \r
 [ t ] [ "hello-world" shake-and-bake 500000 small-enough? ] unit-test\r
 \r
@@ -35,11 +27,6 @@ os macosx? [
     [ t ] [ "webkit-demo" shake-and-bake 500000 small-enough? ] unit-test\r
 ] when\r
 \r
-: run-temp-image ( -- )\r
-    vm\r
-    "-i=" "test.image" temp-file append\r
-    2array try-process ;\r
-\r
 {\r
     "tools.deploy.test.1"\r
     "tools.deploy.test.2"\r
@@ -112,3 +99,8 @@ M: quit-responder call-responder*
     "tools.deploy.test.9" shake-and-bake\r
     run-temp-image\r
 ] unit-test\r
+\r
+[ ] [\r
+    "tools.deploy.test.10" shake-and-bake\r
+    run-temp-image\r
+] unit-test\r
index 1f0e4824414f756134eb1cae2549a0a276c6ff10..91b4d603af9fcc85c93ee817b99d30963a254474 100644 (file)
@@ -1,10 +1,11 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io io.files kernel namespaces make sequences system
-tools.deploy.backend tools.deploy.config
+USING: io io.files io.files.info.unix io.pathnames
+io.directories io.directories.hierarchy kernel namespaces make
+sequences system tools.deploy.backend tools.deploy.config
 tools.deploy.config.editor assocs hashtables prettyprint
-io.unix.backend cocoa io.encodings.utf8 io.backend
-cocoa.application cocoa.classes cocoa.plists qualified
+io.backend.unix cocoa io.encodings.utf8 io.backend
+cocoa.application cocoa.classes cocoa.plists
 combinators ;
 IN: tools.deploy.macosx
 
@@ -12,7 +13,7 @@ IN: tools.deploy.macosx
     vm parent-directory parent-directory ;
 
 : copy-bundle-dir ( bundle-name dir -- )
-    bundle-dir over append-path -rot
+    [ bundle-dir prepend-path swap ] keep
     "Contents" prepend-path append-path copy-tree ;
 
 : app-plist ( executable bundle-name -- assoc )
@@ -53,7 +54,8 @@ IN: tools.deploy.macosx
         } cleave
     ]
     [ create-app-plist ]
-    [ "Contents/MacOS/" append-path "" copy-vm ] 2tri ;
+    [ "Contents/MacOS/" append-path "" copy-vm ] 2tri
+    dup OCT: 755 set-file-permissions ;
 
 : deploy.app-image ( vocab bundle-name -- str )
     [ % "/Contents/Resources/" % % ".image" % ] "" make ;
index 3d4944841d2ee642683f65db27c287d13aa21965..c894a8931b6462628113305de8a1a137f3de6e32 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors qualified io.backend io.streams.c init fry
+USING: accessors io.backend io.streams.c init fry
 namespaces make assocs kernel parser lexer strings.parser vocabs
 sequences words words.private memory kernel.private
 continuations io vocabs.loader system strings sets
@@ -365,6 +365,7 @@ SYMBOL: deploy-vocab
         init-hooks get values concat %
         ,
         strip-io? [ \ flush , ] unless
+        [ 0 exit ] %
     ] [ ] make
     set-boot-quot ;
 
index 773b2d0f3b5bae9ec439a536b0ea538a3bcf8013..df64443b7b1d88bcd1871f22c0264539af86f781 100644 (file)
@@ -19,12 +19,8 @@ IN: cocoa.application
 
 [ [ die ] 19 setenv ] "cocoa.application" add-init-hook
 
-"stop-after-last-window?" get
-
 H{ } clone \ pool [
     global [
-        "stop-after-last-window?" "ui" lookup set
-
         ! Only keeps those methods that we actually call
         sent-messages get super-sent-messages get assoc-union
         objc-methods [ assoc-intersect pool-values ] change
diff --git a/basis/tools/deploy/test/10/10-tests.factor b/basis/tools/deploy/test/10/10-tests.factor
new file mode 100644 (file)
index 0000000..ba6f354
--- /dev/null
@@ -0,0 +1,4 @@
+! Copyright (C) 2009 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: tools.test tools.deploy.test.10 ;
+IN: tools.deploy.test.10.tests
diff --git a/basis/tools/deploy/test/10/10.factor b/basis/tools/deploy/test/10/10.factor
new file mode 100644 (file)
index 0000000..95329ff
--- /dev/null
@@ -0,0 +1,8 @@
+! Copyright (C) 2009 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: prettyprint ;
+IN: tools.deploy.test.10
+
+: main ( -- ) C{ 0 1 } pprint ;
+
+MAIN: main
\ No newline at end of file
diff --git a/basis/tools/deploy/test/10/authors.txt b/basis/tools/deploy/test/10/authors.txt
new file mode 100644 (file)
index 0000000..d4f5d6b
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
\ No newline at end of file
diff --git a/basis/tools/deploy/test/10/deploy.factor b/basis/tools/deploy/test/10/deploy.factor
new file mode 100644 (file)
index 0000000..3f59406
--- /dev/null
@@ -0,0 +1,15 @@
+USING: tools.deploy.config ;
+H{
+    { deploy-reflection 3 }
+    { deploy-unicode? f }
+    { deploy-io 2 }
+    { deploy-word-props? f }
+    { deploy-compiler? f }
+    { deploy-threads? f }
+    { deploy-word-defs? f }
+    { "stop-after-last-window?" t }
+    { deploy-ui? f }
+    { deploy-math? t }
+    { deploy-c-types? f }
+    { deploy-name "tools.deploy.test.10" }
+}
diff --git a/basis/tools/deploy/test/test.factor b/basis/tools/deploy/test/test.factor
new file mode 100644 (file)
index 0000000..eb780e4
--- /dev/null
@@ -0,0 +1,19 @@
+USING: accessors arrays continuations io.directories io.files.info
+io.files.temp io.launcher kernel layouts math sequences system
+tools.deploy.backend tools.deploy.config.editor ;
+IN: tools.deploy.test
+
+: shake-and-bake ( vocab -- )
+    [ "test.image" temp-file delete-file ] ignore-errors
+    "resource:" [
+        [ vm "test.image" temp-file ] dip
+        dup deploy-config make-deploy-image
+    ] with-directory ;
+
+: small-enough? ( n -- ? )
+    [ "test.image" temp-file file-info size>> ] [ cell 4 / * ] bi* <= ;
+
+: run-temp-image ( -- )
+    vm
+    "-i=" "test.image" temp-file append
+    2array try-process ;
\ No newline at end of file
index bd49155e8442f4d7d48f33aeae815a54e0d06647..9e0bb8ac688398ef8a9ac4a8cf459834cef95439 100644 (file)
@@ -1,13 +1,15 @@
 ! Copyright (C) 2008 James Cash
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io io.files io.backend kernel namespaces make sequences
+USING: io io.pathnames io.directories io.files
+io.files.info.unix io.backend kernel namespaces make sequences
 system tools.deploy.backend tools.deploy.config
 tools.deploy.config.editor assocs hashtables prettyprint ;
 IN: tools.deploy.unix
 
 : create-app-dir ( vocab bundle-name -- vm )
     dup "" copy-fonts
-    "" copy-vm ;
+    "" copy-vm
+    dup OCT: 755 set-file-permissions ;
 
 : bundle-name ( -- str )
     deploy-name get ;
index 6188e78b0eb37e410c58841fa6d7b6a806044523..7ce635b1ba90623ffac6c0007a036d1f2ab648e4 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io io.files kernel namespaces sequences system
+USING: io io.files io.directories kernel namespaces sequences system
 tools.deploy.backend tools.deploy.config
 tools.deploy.config.editor assocs hashtables prettyprint
 combinators windows.shell32 windows.user32 ;
old mode 100644 (file)
new mode 100755 (executable)
index 65d0e2f..9076b67
@@ -1,9 +1,9 @@
 ! Copyright (C) 2008 Slava Pestov, Jorge Acereda Macia.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io.files io words alien kernel math.parser alien.syntax
-io.launcher system assocs arrays sequences namespaces make
-qualified system math io.encodings.ascii accessors
-tools.disassembler ;
+USING: io.files io.files.temp io words alien kernel math.parser
+alien.syntax io.launcher system assocs arrays sequences
+namespaces make system math io.encodings.ascii
+accessors tools.disassembler ;
 IN: tools.disassembler.gdb
 
 SINGLETON: gdb-disassembler
index c5b5c80d137661d514eac1bfd38a51a5e54f95ed..a915551263a78ca06c02439a0dfd67d857e660ab 100644 (file)
@@ -20,8 +20,9 @@ TYPEDEF: char[592] ud
 FUNCTION: void ud_translate_intel ( ud* u ) ;
 FUNCTION: void ud_translate_att ( ud* u ) ;
 
-: UD_SYN_INTEL    &: ud_translate_intel ; inline
-: UD_SYN_ATT      &: ud_translate_att ; inline
+: UD_SYN_INTEL ( -- addr ) &: ud_translate_intel ; inline
+: UD_SYN_ATT ( -- addr ) &: ud_translate_att ; inline
+
 : UD_EOI          -1 ; inline
 : UD_INP_CACHE_SZ 32 ; inline
 : UD_VENDOR_AMD   0 ; inline
index 6cbc7d192c5898c7cae4a5069810515797ce4dc0..aa4273f35fd606b14dcaacc654decbe4f49a84a9 100644 (file)
@@ -1,10 +1,8 @@
-! Copyright (C) 2008 Your name.
+! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: tools.test tools.files strings kernel ;
 IN: tools.files.tests
 
-\ directory. must-infer
-
 [ ] [ "" directory. ] unit-test
 
 [ ] [ file-systems. ] unit-test
index 7968639d47ff510987d6e1d3e6429ded5ad08735..936c68232248b8babc645db6f0e324613303b3ad 100755 (executable)
@@ -1,22 +1,29 @@
-! Copyright (C) 2008 Doug Coleman.
+! Copyright (C) 2008, 2009 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays combinators io io.files kernel
-math.parser sequences system vocabs.loader calendar math
-symbols fry prettyprint ;
+USING: accessors arrays calendar combinators fry io io.directories
+io.files.info kernel math math.parser prettyprint sequences system
+vocabs.loader sorting.slots calendar.format ;
 IN: tools.files
 
 <PRIVATE
 
-: ls-time ( timestamp -- string )
+: dir-or-size ( file-info -- str )
+    dup directory? [
+        drop "<DIR>" 20 CHAR: \s pad-right
+    ] [
+        size>> number>string 20 CHAR: \s pad-left
+    ] if ;
+
+: listing-time ( timestamp -- string )
     [ hour>> ] [ minute>> ] bi
     [ number>string 2 CHAR: 0 pad-left ] bi@ ":" glue ;
 
-: ls-timestamp ( timestamp -- string )
+: listing-date ( timestamp -- string )
     [ month>> month-abbreviation ]
     [ day>> number>string 2 CHAR: \s pad-left ]
     [
         dup year>> dup now year>> =
-        [ drop ls-time ] [ nip number>string ] if
+        [ drop listing-time ] [ nip number>string ] if
         5 CHAR: \s pad-left
     ] tri 3array " " join ;
 
@@ -26,12 +33,57 @@ IN: tools.files
 
 : execute>string ( ? -- string ) "x" "-" ? ; inline
 
-HOOK: (directory.) os ( path -- lines )
-
 PRIVATE>
 
-: directory. ( path -- )
-    [ (directory.) ] with-directory-files [ print ] each ;
+SYMBOLS: file-name file-name/type permissions file-type nlinks file-size
+file-date file-time file-datetime uid gid user group link-target unix-datetime
+directory-or-size ;
+
+TUPLE: listing-tool path specs sort ;
+
+TUPLE: file-listing directory-entry file-info ;
+
+C: <file-listing> file-listing
+
+: <listing-tool> ( path -- listing-tool )
+    listing-tool new
+        swap >>path
+        { file-name } >>specs ;
+
+: list-slow? ( listing-tool -- ? )
+    specs>> { file-name } sequence= not ;
+
+ERROR: unknown-file-spec symbol ;
+
+HOOK: file-spec>string os ( file-listing spec -- string )
+
+M: object file-spec>string ( file-listing spec -- string )
+    {
+        { file-name [ directory-entry>> name>> ] }
+        { directory-or-size [ file-info>> dir-or-size ] }
+        { file-size [ file-info>> size>> number>string ] }
+        { file-date [ file-info>> modified>> listing-date ] }
+        { file-time [ file-info>> modified>> listing-time ] }
+        { file-datetime [ file-info>> modified>> timestamp>ymdhms ] }
+        [ unknown-file-spec ]
+    } case ;
+
+: list-files-fast ( listing-tool -- array )
+    path>> [ [ name>> 1array ] map ] with-directory-entries ; inline
+
+: list-files-slow ( listing-tool -- array )
+    [ path>> ] [ sort>> ] [ specs>> ] tri '[
+            [ dup name>> file-info file-listing boa ] map
+            _ [ sort-by-slots ] when*
+            [ _ [ file-spec>string ] with map ] map
+    ] with-directory-entries ; inline
+
+: list-files ( listing-tool -- array ) 
+    dup list-slow? [ list-files-slow ] [ list-files-fast ] if ; inline
+
+HOOK: (directory.) os ( path -- lines )
+
+: directory. ( path -- ) (directory.) simple-table. ;
 
 SYMBOLS: device-name mount-point type
 available-space free-space used-space total-space
@@ -41,16 +93,16 @@ percent-used percent-free ;
 
 : file-system-spec ( file-system-info obj -- str )
     {
-        { device-name [ device-name>> [ "" ] unless* ] }
-        { mount-point [ mount-point>> [ "" ] unless* ] }
-        { type [ type>> [ "" ] unless* ] }
-        { available-space [ available-space>> [ 0 ] unless* ] }
-        { free-space [ free-space>> [ 0 ] unless* ] }
-        { used-space [ used-space>> [ 0 ] unless* ] }
-        { total-space [ total-space>> [ 0 ] unless* ] }
+        { device-name [ device-name>> "" or ] }
+        { mount-point [ mount-point>> "" or ] }
+        { type [ type>> "" or ] }
+        { available-space [ available-space>> 0 or ] }
+        { free-space [ free-space>> 0 or ] }
+        { used-space [ used-space>> 0 or ] }
+        { total-space [ total-space>> 0 or ] }
         { percent-used [
             [ used-space>> ] [ total-space>> ] bi
-            [ [ 0 ] unless* ] bi@ dup 0 =
+            [ 0 or ] bi@ dup 0 =
             [ 2drop 0 ] [ / percent ] if
         ] }
     } case ;
@@ -63,8 +115,10 @@ percent-used percent-free ;
     [ [ unparse ] map ] bi prefix simple-table. ;
 
 : file-systems. ( -- )
-    { device-name free-space used-space total-space percent-used mount-point }
-    print-file-systems ;
+    {
+        device-name available-space free-space used-space
+        total-space percent-used mount-point
+    } print-file-systems ;
 
 {
     { [ os unix? ] [ "tools.files.unix" ] }
index 184f371b1c1b7ed8ff1ac090de1395a99e874641..e63ab09076fdd1f99cec080effa7705f09812851 100755 (executable)
@@ -1,9 +1,10 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors combinators kernel system unicode.case
-io.unix.files tools.files generalizations strings
-arrays sequences io.files math.parser unix.groups unix.users
-tools.files.private unix.stat math ;
+USING: accessors combinators kernel system unicode.case io.files
+io.files.info io.files.info.unix generalizations
+strings arrays sequences math.parser unix.groups unix.users
+tools.files.private unix.stat math fry macros combinators.smart
+io.files.info.unix io tools.files math.order prettyprint ;
 IN: tools.files.unix
 
 <PRIVATE
@@ -17,18 +18,20 @@ IN: tools.files.unix
     } case ;
 
 : permissions-string ( permissions -- str )
-    {
-        [ type>> file-type>ch 1string ]
-        [ user-read? read>string ]
-        [ user-write? write>string ]
-        [ [ uid? ] [ user-execute? ] bi 2array "s" unix-execute>string ]
-        [ group-read? read>string ]
-        [ group-write? write>string ]
-        [ [ gid? ] [ group-execute? ] bi 2array "s" unix-execute>string ]
-        [ other-read? read>string ]
-        [ other-write? write>string ]
-        [ [ sticky? ] [ other-execute? ] bi 2array "t" unix-execute>string ]
-    } cleave 10 narray concat ;
+    [
+        {
+            [ type>> file-type>ch 1string ]
+            [ user-read? read>string ]
+            [ user-write? write>string ]
+            [ [ uid? ] [ user-execute? ] bi 2array "s" unix-execute>string ]
+            [ group-read? read>string ]
+            [ group-write? write>string ]
+            [ [ gid? ] [ group-execute? ] bi 2array "s" unix-execute>string ]
+            [ other-read? read>string ]
+            [ other-write? write>string ]
+            [ [ sticky? ] [ other-execute? ] bi 2array "t" unix-execute>string ]
+        } cleave
+    ] output>array concat ;
 
 : mode>symbol ( mode -- ch )
     S_IFMT bitand
@@ -43,18 +46,23 @@ IN: tools.files.unix
     } cond ;
 
 M: unix (directory.) ( path -- lines )
-    [ [
-        [
-            dup file-info
-            {
-                [ permissions-string ]
-                [ nlink>> number>string 3 CHAR: \s pad-left ]
-                ! [ uid>> ]
-                ! [ gid>> ]
-                [ size>> number>string 15 CHAR: \s pad-left ]
-                [ modified>> ls-timestamp ]
-            } cleave 4 narray swap suffix " " join
-        ] map
-    ] with-group-cache ] with-user-cache ;
+    <listing-tool>
+        { permissions nlinks user group file-size file-date file-name } >>specs
+        { { directory-entry>> name>> <=> } } >>sort
+    [ [ list-files ] with-group-cache ] with-user-cache ;
+
+M: unix file-spec>string ( file-listing spec -- string )
+    {
+        { file-name/type [
+            directory-entry>> [ name>> ] [ file-type>trailing ] bi append
+        ] }
+        { permissions [ file-info>> permissions-string ] }
+        { nlinks [ file-info>> nlink>> number>string ] }
+        { user [ file-info>> uid>> user-name ] }
+        { group [ file-info>> gid>> group-name ] }
+        { uid [ file-info>> uid>> number>string ] }
+        { gid [ file-info>> gid>> number>string ] }
+        [ call-next-method ]
+    } case ;
 
 PRIVATE>
index 76e6ea55907439cc3d86c2b97dbf68ab14e823d3..f321c2fc7f4507ffa2807c4777bff49e99a9fb60 100755 (executable)
@@ -2,24 +2,15 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors calendar.format combinators io.files
 kernel math.parser sequences splitting system tools.files
-generalizations tools.files.private ;
+generalizations tools.files.private io.files.info math.order ;
 IN: tools.files.windows
 
 <PRIVATE
 
-: directory-or-size ( file-info -- str )
-    dup directory? [
-        drop "<DIR>" 20 CHAR: \s pad-right
-    ] [
-        size>> number>string 20 CHAR: \s pad-left
-    ] if ;
-
 M: windows (directory.) ( entries -- lines )
-    [
-        dup file-info {
-            [ modified>> timestamp>ymdhms ]
-            [ directory-or-size ]
-        } cleave 2 narray swap suffix " " join
-    ] map ;
+    <listing-tool>
+        { file-datetime directory-or-size file-name } >>specs
+        { { directory-entry>> name>> <=> } } >>sort
+    list-files ;
 
 PRIVATE>
index 69edf1a7e0f6cabd5afe21adef663048ff281870..da9171cedf734c20a8ba800198db279a3880b9f9 100644 (file)
@@ -2,14 +2,18 @@ USING: tools.profiler.private tools.time help.markup help.syntax
 quotations io strings words definitions ;
 IN: tools.profiler
 
-ARTICLE: "profiling" "Profiling code" 
-"The " { $vocab-link "tools.profiler" } " vocabulary implements a simple call counting profiler. The profiler is completely accurate with words and methods which are compiled with the non-optimizing compiler. Some optimizations performed by the optimizing compiler can inhibit accurate call counting, however:"
+ARTICLE: "profiler-limitations" "Profiler limitations"
+"Certain optimizations performed by the compiler can inhibit accurate call counting:"
 { $list
-    "The optimizing compiler open-codes certain primitives with inline machine code, and in some cases optimizes them out altogether; this includes stack shuffling operations, conditionals, and many object allocation operations."
-    { "Calls to " { $link POSTPONE: inline } " words are not counted.." }
+    "Calls to open-coded intrinsics are not counted. Certain words are open-coded as inline machine code, and in some cases optimized out altogether; this includes stack shuffling operations, conditionals, and many object allocation operations."
+    { "Calls to " { $link POSTPONE: inline } " words are not counted." }
     { "Calls to methods which were inlined as a result of type inference are not counted." }
     "Tail-recursive loops will only count the initial invocation of the word, not every tail call."
-}
+} ;
+
+ARTICLE: "profiling" "Profiling code" 
+"The " { $vocab-link "tools.profiler" } " vocabulary implements a simple call counting profiler."
+$nl
 "Quotations can be passed to a combinator which calls them with the profiler enabled:"
 { $subsection profile }
 "After a quotation has been profiled, call counts can be presented in various ways:"
@@ -17,7 +21,9 @@ ARTICLE: "profiling" "Profiling code"
 { $subsection vocab-profile. }
 { $subsection usage-profile. }
 { $subsection vocabs-profile. }
-{ $subsection method-profile. } ;
+{ $subsection method-profile. }
+{ $subsection "profiler-limitations" }
+{ $see-also "ui-profiler" } ;
 
 ABOUT: "profiling"
 
index f21e8498ebeca28f09fb65d28866646acd98f2ce..83915363749f6ef62dfed14c2903cba72b80a153 100644 (file)
@@ -3,7 +3,7 @@
 USING: accessors words sequences math prettyprint kernel arrays io
 io.styles namespaces assocs kernel.private strings combinators
 sorting math.parser vocabs definitions tools.profiler.private
-continuations generic ;
+continuations generic compiler.units sets ;
 IN: tools.profiler
 
 : profile ( quot -- )
@@ -19,7 +19,7 @@ TUPLE: usage-profile word ;
 C: <usage-profile> usage-profile
 
 M: word (profile.)
-    dup unparse swap <usage-profile> write-object ;
+    [ name>> "( no name )" or ] [ <usage-profile> ] bi write-object ;
 
 TUPLE: vocab-profile vocab ;
 
@@ -29,8 +29,8 @@ M: string (profile.)
     dup <vocab-profile> write-object ;
 
 M: method-body (profile.)
-    dup synopsis swap "method-generic" word-prop
-    <usage-profile> write-object ;
+    [ synopsis ] [ "method-generic" word-prop <usage-profile> ] bi
+    write-object ;
 
 : counter. ( obj n -- )
     [
@@ -58,7 +58,10 @@ M: method-body (profile.)
     "Call counts for words which call " write
     dup pprint
     ":" print
-    smart-usage [ word? ] filter counters counters. ;
+    [ smart-usage [ word? ] filter ]
+    [ compiled-generic-usage keys ]
+    [ compiled-usage keys ]
+    tri 3append prune counters counters. ;
 
 : vocabs-profile. ( -- )
     "Call counts for all vocabularies:" print
index d2989d3cac81c30a1596658ef8e2a54ba06a44ef..9074c809869d790f3ee7dd123b99f666b8d1c808 100644 (file)
@@ -26,7 +26,7 @@ HELP: scaffold-undocumented
 HELP: scaffold-vocab
 { $values
      { "vocab-root" "a vocabulary root string" } { "string" string } }
-{ $description "Creates a direcory in the given root for a new vocabulary and adds a main .factor file, a tests file, and an authors.txt file." } ;
+{ $description "Creates a directory in the given root for a new vocabulary and adds a main .factor file, a tests file, and an authors.txt file." } ;
 
 HELP: using
 { $description "Stores the vocabularies that are pulled into the documentation file from looking up the stack effect types." } ;
index d8822f51dc1eb4064d346282b3086e1edec3fda1..b6e8eb2a4644423dd5c84cb11a7b13b14345df56 100644 (file)
@@ -1,10 +1,11 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: assocs io.files hashtables kernel namespaces sequences
-vocabs.loader io combinators io.encodings.utf8 calendar accessors
-math.parser io.streams.string ui.tools.operations quotations
-strings arrays prettyprint words vocabs sorting sets
-classes math alien urls splitting ascii ;
+USING: assocs io.files io.pathnames io.directories
+io.encodings.utf8 hashtables kernel namespaces sequences
+vocabs.loader io combinators calendar accessors math.parser
+io.streams.string ui.tools.operations quotations strings arrays
+prettyprint words vocabs sorting sets classes math alien urls
+splitting ascii ;
 IN: tools.scaffold
 
 SYMBOL: developer-name
index d4c5be9c17f09813e2c7c7966697b617a706dc4e..c60255b37744252f778a0f8082c4755dad2f4622 100644 (file)
@@ -2,10 +2,10 @@ IN: tools.threads
 USING: help.markup help.syntax threads ;
 
 HELP: threads.
-{ $description "Prints a list of running threads and their state. The ``Waiting on'' column displays one of the following:"
+{ $description "Prints a list of running threads and their state. The â€œWaiting on†column displays one of the following:"
     { $list
-        "``running'' if the thread is the current thread"
-        "``yield'' if the thread is waiting to run"
+        "“running†if the thread is the current thread"
+        "“yield†if the thread is waiting to run"
         { "the string given to " { $link suspend } " if the thread is suspended" }
     }
 } ;
index e9e8d27870704378c223bc9e53acbbd7e71937c3..36f23a8298aa2f6244406db3fbc7a15d8db501e9 100644 (file)
@@ -3,10 +3,10 @@
 USING: accessors arrays assocs classes classes.builtin
 classes.intersection classes.mixin classes.predicate
 classes.singleton classes.tuple classes.union combinators
-definitions effects fry generic help help.markup
-help.stylesheet help.topics io io.files io.styles kernel macros
+definitions effects fry generic help help.markup help.stylesheet
+help.topics io io.files io.pathnames io.styles kernel macros
 make namespaces prettyprint sequences sets sorting summary
-tools.vocabs vocabs vocabs.loader words ;
+tools.vocabs vocabs vocabs.loader words words.symbol ;
 IN: tools.vocabs.browser
 
 : vocab-status-string ( vocab -- string )
index f1eece91c23bba921fdf0227aff815c0b07a0063..0e767a3d34983cbfc20ade9d3314f03fd5278218 100644 (file)
@@ -1,4 +1,4 @@
-USING: tools.test tools.vocabs.monitor io.files ;
+USING: tools.test tools.vocabs.monitor io.pathnames ;
 IN: tools.vocabs.monitor.tests
 
 [ "kernel" ] [ "core/kernel/kernel.factor" path>vocab ] unit-test
index 416eec91d2b164df9555f10bdba54745e868a1e1..4091cdd90cd0275e210cde4346fef013bd5b70c8 100644 (file)
@@ -1,9 +1,9 @@
-! Copyright (C) 2008 Slava Pestov.\r
+! Copyright (C) 2008, 2009 Slava Pestov.\r
 ! See http://factorcode.org/license.txt for BSD license.\r
-USING: threads io.files io.monitors init kernel\r
+USING: threads io.files io.pathnames io.monitors init kernel\r
 vocabs vocabs.loader tools.vocabs namespaces continuations\r
 sequences splitting assocs command-line concurrency.messaging\r
-io.backend sets tr ;\r
+io.backend sets tr accessors ;\r
 IN: tools.vocabs.monitor\r
 \r
 TR: convert-separators "/\\" ".." ;\r
@@ -29,7 +29,7 @@ TR: convert-separators "/\\" ".." ;
 : monitor-loop ( -- )\r
     #! On OS X, monitors give us the full path, so we chop it\r
     #! off if its there.\r
-    receive first path>vocab changed-vocab\r
+    receive path>> path>vocab changed-vocab\r
     reset-cache\r
     monitor-loop ;\r
 \r
index ab2d089d94914f4412cd2f0143fff78b83cf7c45..fe380e0afe6cbcf7cb56fc24ff736553ab1b65cf 100644 (file)
@@ -1,11 +1,11 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.\r
 ! See http://factorcode.org/license.txt for BSD license.\r
-USING: kernel io io.styles io.files io.encodings.utf8\r
-vocabs.loader vocabs sequences namespaces make math.parser\r
-arrays hashtables assocs memoize summary sorting splitting\r
-combinators source-files debugger continuations compiler.errors\r
-init checksums checksums.crc32 sets accessors generic\r
-definitions words ;\r
+USING: kernel io io.styles io.files io.files.info io.directories\r
+io.pathnames io.encodings.utf8 vocabs.loader vocabs sequences\r
+namespaces make math.parser arrays hashtables assocs memoize\r
+summary sorting splitting combinators source-files debugger\r
+continuations compiler.errors init checksums checksums.crc32\r
+sets accessors generic definitions words ;\r
 IN: tools.vocabs\r
 \r
 : vocab-xref ( vocab quot -- vocabs )\r
index c168f5384d8c830381ef117285318c65d3ea4084..3434c28216366a5114b28d829a930875ab807b51 100644 (file)
@@ -1,5 +1,5 @@
 IN: tr.tests
-USING: tr tools.test unicode.case ;
+USING: tr tools.test ascii ;
 
 TR: tr-test ch>upper "ABC" "XYZ" ;
 
index 66d8df7d449a939e60b2ba2744154344df8cd1f9..ce535f335aa9e1eeb1b2b4ab67c6a9e67e3248f3 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: byte-arrays strings sequences sequences.private
+USING: byte-arrays strings sequences sequences.private ascii
 fry kernel words parser lexer assocs math math.order summary ;
 IN: tr
 
@@ -11,8 +11,6 @@ M: bad-tr summary
 
 <PRIVATE
 
-: ascii? ( ch -- ? ) 0 127 between? ; inline
-
 : tr-nth ( n mapping -- ch ) nth-unsafe 127 bitand ; inline
 
 : check-tr ( from to -- )
index 5da70857734d950ca100df6377ac5bb2b37b0914..af62c0b0d714389320e798cba4f7c269380863d4 100644 (file)
@@ -16,7 +16,7 @@ M: tuple-array nth
     [ seq>> nth ] [ class>> ] bi prefix >tuple ;
 
 M: tuple-array set-nth ( elt n seq -- )
-    >r >r tuple>array 1 tail r> r> seq>> set-nth ;
+    [ tuple>array 1 tail ] 2dip seq>> set-nth ;
 
 M: tuple-array new-sequence
     class>> <tuple-array> ;
index aa84419d642e58d18f319e125a41c6538ee88aab..eaa0953d2571de0babd08ca442d140a5b8cb9595 100755 (executable)
@@ -5,8 +5,6 @@ IN: ui.backend
 
 SYMBOL: ui-backend
 
-HOOK: do-events ui-backend ( -- )
-
 HOOK: set-title ui-backend ( string world -- )
 
 HOOK: set-fullscreen* ui-backend ( ? world -- )
index fecbb52a253a410f12d90cb88842663ccbe607c1..331c0a698cbf3c7c98cb2d648a844c1a6f1f4bc3 100755 (executable)
@@ -3,10 +3,11 @@
 USING: accessors math arrays assocs cocoa cocoa.application
 command-line kernel memory namespaces cocoa.messages
 cocoa.runtime cocoa.subclassing cocoa.pasteboard cocoa.types
-cocoa.windows cocoa.classes cocoa.nibs sequences system
-ui ui.backend ui.clipboards ui.gadgets ui.gadgets.worlds
-ui.cocoa.views core-foundation threads math.geometry.rect fry
-libc generalizations alien.c-types cocoa.views combinators ;
+cocoa.windows cocoa.classes cocoa.nibs sequences system ui
+ui.backend ui.clipboards ui.gadgets ui.gadgets.worlds
+ui.cocoa.views core-foundation core-foundation.run-loop threads
+math.geometry.rect fry libc generalizations alien.c-types
+cocoa.views combinators io.thread ;
 IN: ui.cocoa
 
 TUPLE: handle ;
@@ -18,9 +19,6 @@ C: <offscreen-handle> offscreen-handle
 
 SINGLETON: cocoa-ui-backend
 
-M: cocoa-ui-backend do-events ( -- )
-    [ NSApp '[ _ do-event ] loop ui-wait ] with-autorelease-pool ;
-
 TUPLE: pasteboard handle ;
 
 C: <pasteboard> pasteboard
@@ -134,8 +132,8 @@ CLASS: {
     { +name+ "FactorApplicationDelegate" }
 }
 
-{ "applicationDidFinishLaunching:" "void" { "id" "SEL" "id" }
-    [ 3drop event-loop ]
+{  "applicationDidUpdate:" "void" { "id" "SEL" "id" }
+    [ 3drop reset-run-loop ]
 } ;
 
 : install-app-delegate ( -- )
@@ -153,6 +151,9 @@ M: cocoa-ui-backend ui
             init-clipboard
             cocoa-init-hook get call
             start-ui
+            f io-thread-running? set-global
+            init-thread-timer
+            reset-run-loop
             NSApp -> run
         ] ui-running
     ] with-cocoa ;
diff --git a/basis/ui/event-loop/event-loop-tests.factor b/basis/ui/event-loop/event-loop-tests.factor
new file mode 100644 (file)
index 0000000..ae1d7ec
--- /dev/null
@@ -0,0 +1,4 @@
+IN: ui.event-loop.tests
+USING: ui.event-loop tools.test ;
+
+\ event-loop must-infer
diff --git a/basis/ui/event-loop/event-loop.factor b/basis/ui/event-loop/event-loop.factor
new file mode 100644 (file)
index 0000000..7c08d80
--- /dev/null
@@ -0,0 +1,18 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: calendar combinators deques kernel namespaces sequences
+threads ui ui.backend ui.gadgets ;
+IN: ui.event-loop
+
+: event-loop? ( -- ? )
+    {
+        { [ graft-queue deque-empty? not ] [ t ] }
+        { [ windows get-global empty? not ] [ t ] }
+        [ f ]
+    } cond ;
+
+HOOK: do-events ui-backend ( -- )
+
+: event-loop ( -- ) [ event-loop? ] [ do-events ] [ ] while ;
+
+: ui-wait ( -- ) 10 milliseconds sleep ;
index 22a4f1722db1f3f5a8ab6c89d854b668c1a48bf1..0f36f3dcbaef77629e40df47776135bb96fe331c 100644 (file)
@@ -78,9 +78,9 @@ SYMBOL: dpi
 
 72 dpi set-global
 
-: ft-floor -6 shift ; inline
+: ft-floor ( m -- n ) -6 shift ; inline
 
-: ft-ceil 63 + -64 bitand -6 shift ; inline
+: ft-ceil ( m -- n ) 63 + -64 bitand -6 shift ; inline
 
 : font-units>pixels ( n font -- n )
     face-size face-size-y-scale FT_MulFix ;
index 94816788e1b4c8f287e689541f3578ab24cbd9bd..1f66cca1787eac05ea102ebf34b46ea1218fd421 100644 (file)
@@ -16,6 +16,9 @@ TUPLE: border < gadget
     swap border new-border
         swap dup 2array >>size ;
 
+: <filled-border> ( child gap -- border )
+    <border> { 1 1 } >>fill ;
+
 M: border pref-dim*
     [ size>> 2 v*n ] keep
     gadget-child pref-dim v+ ;
index 75469671ef14ed47afb7358a84768e3cfc9b0037..dabc12d3ae7cda020288f5a768dcf061cbfcdf81 100644 (file)
@@ -6,7 +6,7 @@ classes.tuple opengl opengl.gl math.vectors ui.commands ui.gadgets
 ui.gadgets.borders ui.gadgets.labels ui.gadgets.theme
 ui.gadgets.tracks ui.gadgets.packs ui.gadgets.worlds ui.gestures
 ui.render math.geometry.rect locals alien.c-types
-specialized-arrays.float fry ;
+specialized-arrays.float fry combinators.smart ;
 IN: ui.gadgets.buttons
 
 TUPLE: button < border pressed? selected? quot ;
@@ -111,12 +111,14 @@ TUPLE: checkmark-paint < caching-pen color last-vertices ;
 <PRIVATE
 
 : checkmark-points ( dim -- points )
-    {
-        [ { 0 0 } v* { 0.5 0.5 } v+ ]
-        [ { 1 1 } v* { 0.5 0.5 } v+ ]
-        [ { 1 0 } v* { -0.3 0.5 } v+ ]
-        [ { 0 1 } v* { -0.3 0.5 } v+ ]
-    } cleave 4array ;
+    [
+        {
+            [ { 0 0 } v* { 0.5 0.5 } v+ ]
+            [ { 1 1 } v* { 0.5 0.5 } v+ ]
+            [ { 1 0 } v* { -0.3 0.5 } v+ ]
+            [ { 0 1 } v* { -0.3 0.5 } v+ ]
+        } cleave
+    ] output>array ;
 
 : checkmark-vertices ( dim -- vertices )
     checkmark-points concat >float-array ;
index 72d5900c281fd602b2191d765efd097b77ba7874..dc2cedfef85501bc9a5fe0fb1cefd25a98b8a0ed 100755 (executable)
@@ -107,7 +107,7 @@ M: editor ungraft*
     editor-font* "" string-height ;
 
 : y>line ( y editor -- line# )
-    line-height / >fixnum ;
+    line-height /i ;
 
 :: point>loc ( point editor -- loc )
     point second editor y>line {
@@ -350,7 +350,7 @@ M: editor gadget-text* editor-string % ;
     dupd editor-select-next mark>caret ;
 
 : editor-select ( from to editor -- )
-    tuck caret>> set-model mark>> set-model ;
+    tuck [ mark>> set-model ] [ caret>> set-model ] 2bi* ;
 
 : select-elt ( editor elt -- )
     [ [ [ editor-caret* ] [ model>> ] bi ] dip prev/next-elt ] [ drop ] 2bi
index baf025d11625f90d267d9ef8dacd857d584b4b04..2af0f6e6a2584694b9d1b537e24f9c2bc8c04815 100644 (file)
@@ -165,7 +165,9 @@ M: gadget dim-changed
     in-layout? get [ invalidate ] [ invalidate* ] if ;
 
 M: gadget (>>dim) ( dim gadget -- )
-    2dup dim>> = [ 2drop ] [ tuck call-next-method dim-changed ] if ;
+    2dup dim>> =
+    [ 2drop ]
+    [ [ nip ] [ call-next-method ] 2bi dim-changed ] if ;
 
 GENERIC: pref-dim* ( gadget -- dim )
 
@@ -250,7 +252,7 @@ M: gadget ungraft* drop ;
     f >>parent drop ;
 
 : unfocus-gadget ( child gadget -- )
-    tuck focus>> eq? [ f >>focus ] when drop ;
+    [ nip ] [ focus>> eq? ] 2bi [ f >>focus ] when drop ;
 
 SYMBOL: in-layout?
 
@@ -286,10 +288,7 @@ SYMBOL: in-layout?
     dup unparent
     over >>parent
     tuck ((add-gadget))
-    tuck graft-state>> second
-        [ graft ]
-        [ drop  ]
-    if ;
+    tuck graft-state>> second [ graft ] [ drop  ] if ;
 
 : add-gadget ( parent child -- parent )
     not-in-layout
@@ -316,7 +315,7 @@ SYMBOL: in-layout?
 : (screen-rect) ( gadget -- loc ext )
     dup parent>> [
         [ rect-extent ] dip (screen-rect)
-        [ tuck v+ ] dip vmin [ v+ ] dip
+        [ [ nip ] [ v+ ] 2bi ] dip [ v+ ] [ vmin ] 2bi*
     ] [
         rect-extent
     ] if* ;
index 8d79c9e07c9877af633c8cb8949dba507719c8c0..03e2e64d958af30040890fce49c249b10dffc4c7 100755 (executable)
@@ -11,7 +11,7 @@ C: <grid-lines> grid-lines
 
 SYMBOL: grid-dim
 
-: half-gap grid get gap>> [ 2/ ] map ; inline
+: half-gap ( -- gap ) grid get gap>> [ 2/ ] map ; inline
 
 : grid-line-from/to ( orientation point -- from to )
     half-gap v-
index eab8833120b21d23a552719742dea195456d8362..e40da44483bdbcc4be75b145c18640de52f146b1 100644 (file)
@@ -1,7 +1,7 @@
-! Copyright (C) 2006, 2008 Slava Pestov.
+! Copyright (C) 2006, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays kernel math namespaces make sequences words io
-io.streams.string math.vectors ui.gadgets columns accessors
+io.styles math.vectors ui.gadgets columns accessors
 math.geometry.rect locals fry ;
 IN: ui.gadgets.grids
 
index af249bbdc8c040ef74a412cf70c264e91f34fa4d..2b33d2bfe10fd38a7adec7a2d6ba811b310cb3c6 100644 (file)
@@ -23,7 +23,7 @@ M: incremental pref-dim*
     ] keep orientation>> set-axis ;
 
 : update-cursor ( gadget incremental -- )
-    tuck next-cursor >>cursor drop ;
+    [ nip ] [ next-cursor ] 2bi >>cursor drop ;
 
 : incremental-loc ( gadget incremental -- )
     [ cursor>> ] [ orientation>> ] bi v*
index 5706f4763937f566ab00997524c1cc50fdde3ef8..eff3c6f7bb892e23cc5e531ed8fe04346d39b12c 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2005, 2008 Slava Pestov.
+! Copyright (C) 2005, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays hashtables io kernel math namespaces
 make opengl sequences strings splitting ui.gadgets
@@ -12,11 +12,7 @@ TUPLE: label < gadget text font color ;
     text>> dup string? [ "\n" join ] unless ; inline
 
 : set-label-string ( string label -- )
-    CHAR: \n pick memq? [
-        [ string-lines ] dip (>>text)
-    ] [
-        (>>text)
-    ] if ; inline
+    [ CHAR: \n over memq? [ string-lines ] when ] dip (>>text) ; inline
 
 : label-theme ( gadget -- gadget )
     sans-serif-font >>font
index 2aef0b8417ce14c7d6259c452dd59f493cda5be0..c482f31896241138c7adac8e89ba97d31a9204f4 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: locals accessors arrays ui.commands ui.gadgets
+USING: locals accessors arrays ui.commands ui.operations ui.gadgets
 ui.gadgets.buttons ui.gadgets.worlds ui.gestures generic
 hashtables kernel math models namespaces opengl sequences
 math.vectors ui.gadgets.theme ui.gadgets.packs
@@ -54,3 +54,9 @@ M: menu-glass layout* gadget-child prefer ;
 
 : show-commands-menu ( target commands -- )
     [ dup [ ] ] dip <commands-menu> show-menu ;
+
+: <operations-menu> ( target hook -- menu )
+    over object-operations <commands-menu> ;
+
+: show-operations-menu ( gadget target -- )
+    [ ] <operations-menu> show-menu ;
\ No newline at end of file
index d53cba5f76516f47d224666f1dba0ca57c560ed8..23dc99da82124b3d0305f6d075ab7fb94c7e3d97 100644 (file)
@@ -49,8 +49,8 @@ HELP: <pane-control>
 HELP: pane-stream
 { $class-description "Pane streams implement the portion of the " { $link "stream-protocol" } " responsible for output of text, including full support for " { $link "styles" } ". Pane streams also support direct output of gadgets via " { $link write-gadget } " and " { $link print-gadget } ". Pane streams are created by calling " { $link <pane-stream> } "." } ;
 
-HELP: <pane-stream> ( pane -- stream )
-{ $values { "pane" pane } { "stream" "a new " { $link pane-stream } } }
+HELP: <pane-stream>
+{ $values { "pane" pane } { "pane-stream" "a new " { $link pane-stream } } }
 { $description "Creates a new " { $link pane-stream } " for writing to " { $snippet "pane" } "." } ;
 
 { with-pane make-pane } related-words
index 79a47380b6ccaf0e611f4802a434677523c61cf7..569d6e0f3f4fe57456f2cd5a679f6db83562a893 100644 (file)
@@ -6,7 +6,7 @@ ui.gadgets.incremental ui.gadgets.packs ui.gadgets.theme
 ui.gadgets.menus ui.clipboards ui.gestures ui.traverse ui.render
 hashtables io kernel namespaces sequences io.styles strings
 quotations math opengl combinators math.vectors sorting
-splitting io.streams.nested assocs ui.gadgets.presentations
+splitting assocs ui.gadgets.presentations
 ui.gadgets.slots ui.gadgets.grids ui.gadgets.grid-lines
 classes.tuple models continuations destructors accessors
 math.geometry.rect fry ;
@@ -358,25 +358,25 @@ M: f sloppy-pick-up*
     [ 3drop { } ]
     if ;
 
-: move-caret ( pane -- pane )
-    dup hand-rel over sloppy-pick-up >>caret
+: move-caret ( pane loc -- pane )
+    over screen-loc v- over sloppy-pick-up >>caret
     dup relayout-1 ;
 
 : begin-selection ( pane -- )
     f >>selecting?
-    move-caret
+    hand-loc get move-caret
     f >>mark
     drop ;
 
 : extend-selection ( pane -- )
     hand-moved? [
         dup selecting?>> [
-            move-caret
+            hand-loc get move-caret
         ] [
             dup hand-clicked get child? [
                 t >>selecting?
                 dup hand-clicked set-global
-                move-caret
+                hand-click-loc get move-caret
                 caret>mark
             ] when
         ] if
@@ -394,7 +394,7 @@ M: f sloppy-pick-up*
 : select-to-caret ( pane -- )
     t >>selecting?
     dup mark>> [ caret>mark ] unless
-    move-caret
+    hand-loc get move-caret
     dup request-focus
     com-copy-selection ;
 
index c651e849a28288263026051ca13a33f0e4e45c7c..005fa1e7fe61b6a75732dd01508ee0d2824a41b6 100644 (file)
@@ -35,8 +35,6 @@ HELP: <presentation>
 
 { <button> <bevel-button> <command-button> <roll-button> <presentation> } related-words
 
-{ <commands-menu> <toolbar> operations-menu show-menu } related-words
-
 { <status-bar> show-mouse-help show-status show-summary hide-status } related-words
 
 HELP: show-mouse-help
index 61a55e926bb44e5525b9e2ae2e5ebb41f8c00749..f05ea5ae5d7ec100e50a46ad0343a195168fb252 100644 (file)
@@ -11,8 +11,8 @@ IN: ui.gadgets.presentations
 TUPLE: presentation < button object hook ;
 
 : invoke-presentation ( presentation command -- )
-    over dup hook>> call
-    [ object>> ] dip invoke-command ;
+    [ [ dup hook>> call ] [ object>> ] bi ] dip
+    invoke-command ;
 
 : invoke-primary ( presentation -- )
     dup object>> primary-operation
@@ -23,7 +23,7 @@ TUPLE: presentation < button object hook ;
     invoke-presentation ;
 
 : show-mouse-help ( presentation -- )
-    dup object>> over show-summary button-update ;
+    [ [ object>> ] keep show-summary ] [ button-update ] bi ;
 
 : <presentation> ( label object -- button )
     swap [ invoke-primary ] presentation new-button
@@ -35,18 +35,13 @@ M: presentation ungraft*
     dup hand-gadget get-global child? [ dup hide-status ] when
     call-next-method ;
 
-: <operations-menu> ( presentation -- menu )
-    [ object>> ]
-    [ dup hook>> curry ]
-    [ object>> object-operations ]
-    tri <commands-menu> ;
-
-: operations-menu ( presentation -- )
-    dup <operations-menu> show-menu ;
+: show-operations-menu ( presentation -- )
+    [ ] [ object>> ] [ dup hook>> curry ] tri
+    <operations-menu> show-menu ;
 
 presentation H{
-    { T{ button-down f f 3 } [ operations-menu ] }
-    { T{ mouse-leave } [ dup hide-status button-update ] }
+    { T{ button-down f f 3 } [ show-operations-menu ] }
+    { T{ mouse-leave } [ [ hide-status ] [ button-update ] bi ] }
     { T{ mouse-enter } [ show-mouse-help ] }
     ! Responding to motion too allows nested presentations to
     ! display status help properly, when the mouse leaves a
index d6792abd49993f631da1f376d6445a8972c8cfdd..25977cd9063615c2cdb1f6ea7fe4d481286b9951 100644 (file)
@@ -28,7 +28,7 @@ IN: ui.gadgets.scrollers.tests
 "v" get [
     [ { 10 20 } ] [ "v" get model>> range-value ] unit-test
 
-    [ { 10 20 } ] [ "g" get rect-loc vneg { 3 3 } v+ ] unit-test
+    [ { 10 20 } ] [ "g" get rect-loc vneg viewport-gap v+ scroller-border v+ ] unit-test
 ] with-grafted-gadget
 
 [ ] [
@@ -43,13 +43,13 @@ IN: ui.gadgets.scrollers.tests
 "s" get [
     [ { 34 34 } ] [ "s" get viewport>> rect-dim ] unit-test
 
-    [ { 106 106 } ] [ "s" get viewport>> viewport-dim ] unit-test
+    [ { 107 107 } ] [ "s" get viewport>> viewport-dim ] unit-test
 
     [ ] [ { 0 0 } "s" get scroll ] unit-test
 
     [ { 0 0 } ] [ "s" get model>> range-min-value ] unit-test
 
-    [ { 106 106 } ] [ "s" get model>> range-max-value ] unit-test
+    [ { 107 107 } ] [ "s" get model>> range-max-value ] unit-test
 
     [ ] [ { 10 20 } "s" get scroll ] unit-test
 
@@ -57,7 +57,7 @@ IN: ui.gadgets.scrollers.tests
 
     [ { 10 20 } ] [ "s" get viewport>> model>> range-value ] unit-test
 
-    [ { 10 20 } ] [ "g" get rect-loc vneg { 3 3 } v+ ] unit-test
+    [ { 10 20 } ] [ "g" get rect-loc vneg viewport-gap v+ scroller-border v+ ] unit-test
 ] with-grafted-gadget
 
 <gadget> { 600 400 } >>dim "g1" set
@@ -102,7 +102,7 @@ dup layout
     swap dup quot>> call
     dup layout
     model>> dependencies>> [ range-max value>> ] map
-    viewport-gap 2 v*n =
+    viewport-padding =
 ] unit-test
 
 \ <scroller> must-infer
index 37f6e83e0cc2ff3378b5fcf154bb47abb098d6ec..93f6b8bb40c25df8159a06360697934ef5010c65 100644 (file)
@@ -37,13 +37,14 @@ scroller H{
     new-frame
         t >>root?
         <scroller-model> >>model
-        faint-boundary
 
-        dup model>> dependencies>> first  <x-slider> >>x dup x>> @bottom grid-add
-        dup model>> dependencies>> second <y-slider> >>y dup y>> @right  grid-add
+        dup model>> dependencies>>
+        [ first <x-slider> [ >>x ] [ @bottom grid-add ] bi ]
+        [ second <y-slider> [ >>y ] [ @right grid-add ] bi ] bi
 
-        tuck model>> <viewport> >>viewport
-        dup viewport>> @center grid-add ; inline
+        tuck model>> <viewport> [ >>viewport ] [ @center grid-add ] bi
+
+        faint-boundary ; inline
 
 : <scroller> ( gadget -- scroller ) scroller new-scroller ;
 
index fa36e61d90d69b3c112992885fede4e8e2ba1971..6ca3868d87d9ce2245943dae52466c3af61f11d7 100644 (file)
@@ -2,7 +2,7 @@
 ! Copyright (C) 2006, 2007 Alex Chapman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays kernel sequences io.styles ui.gadgets ui.render
-colors colors.gray qualified accessors ;
+colors colors.gray accessors ;
 QUALIFIED: colors
 IN: ui.gadgets.theme
 
index 5381eebb015c518be4d87f8445ed3a8d35e10a40..0ce348e9b711ec2a194dcc66ec39fb06a64ba8f0 100644 (file)
@@ -21,3 +21,20 @@ IN: ui.gadgets.tracks.tests
         <gadget> { 10 10 } >>dim 0 track-add
     pref-dim
 ] unit-test
+
+[ { 10 30 } ] [
+    { 0 1 } <track>
+        <gadget> { 10 10 } >>dim f track-add
+        <gadget> { 10 10 } >>dim f track-add
+        <gadget> { 10 10 } >>dim f track-add
+    pref-dim
+] unit-test
+
+[ { 10 40 } ] [
+    { 0 1 } <track>
+        { 5 5 } >>gap
+        <gadget> { 10 10 } >>dim f track-add
+        <gadget> { 10 10 } >>dim f track-add
+        <gadget> { 10 10 } >>dim f track-add
+    pref-dim
+] unit-test
\ No newline at end of file
index ddc7cf18fd21b122f02f00d39b10196177e6f4d5..aca2d7549e38d58f3702aff6eebce6595960be11 100644 (file)
@@ -27,10 +27,15 @@ TUPLE: track < pack sizes ;
     [ children>> ] [ sizes>> ] bi { 0 0 }
     [ [ drop { 0 0 } ] [ pref-dim ] if v+ ] 2reduce ;
 
-: available-dim ( track -- dim ) [ dim>> ] [ alloted-dim ] bi v- ;
+: gap-dim ( track -- dim )
+    [ gap>> ] [ children>> length 1 [-] ] bi v*n ;
+
+: available-dim ( track -- dim )
+    [ dim>> ] [ alloted-dim ] bi v- ;
 
 : track-layout ( track -- sizes )
-    [ available-dim ] [ children>> ] [ normalized-sizes ] tri
+    [ [ available-dim ] [ gap-dim ] bi v- ]
+    [ children>> ] [ normalized-sizes ] tri
     [ [ over n*v ] [ pref-dim ] ?if ] 2map nip ;
 
 M: track layout* ( track -- ) dup track-layout pack-layout ;
@@ -41,11 +46,9 @@ M: track layout* ( track -- ) dup track-layout pack-layout ;
 : track-pref-dims-2 ( track -- dim )
     [
         [ children>> pref-dims ] [ normalized-sizes ] bi
-        [ dup { 0 f } memq? [ drop ] [ v/n ] if ] 2map
+        [ dup { 0 f } member? [ 2drop { 0 0 } ] [ v/n ] if ] 2map
         max-dim [ >fixnum ] map
-    ]
-    [ [ gap>> ] [ children>> length 1 [-] ] bi v*n ] bi
-    v+ ;
+    ] [ gap-dim ] bi v+ ;
 
 M: track pref-dim* ( gadget -- dim )
     [ track-pref-dims-1 ]
index f01ef3bf426cfef5d8d9de15dacd03938f49ae2e..73782a1e3d804951e15254f5b6797aeeaebd4eae 100644 (file)
@@ -1,18 +1,23 @@
-! Copyright (C) 2005, 2008 Slava Pestov.
+! Copyright (C) 2005, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-IN: ui.gadgets.viewports
 USING: accessors arrays ui.gadgets ui.gadgets.borders
-kernel math namespaces sequences models math.vectors math.geometry.rect ;
+kernel math namespaces sequences models math.vectors
+math.geometry.rect ;
+IN: ui.gadgets.viewports
 
-: viewport-gap { 3 3 } ; inline
+CONSTANT: viewport-gap { 3 3 }
+CONSTANT: scroller-border { 1 1 }
 
 TUPLE: viewport < gadget ;
 
 : find-viewport ( gadget -- viewport )
     [ viewport? ] find-parent ;
 
+: viewport-padding ( -- padding )
+    viewport-gap 2 v*n scroller-border v+ ;
+
 : viewport-dim ( viewport -- dim )
-    gadget-child pref-dim viewport-gap 2 v*n v+ ;
+    gadget-child pref-dim viewport-padding v+ ;
 
 : <viewport> ( content model -- viewport )
     viewport new-gadget
@@ -21,11 +26,11 @@ TUPLE: viewport < gadget ;
         swap add-gadget ;
 
 M: viewport layout*
-    [
-        [ rect-dim viewport-gap 2 v*n v- ]
+    [ gadget-child ] [
+        [ dim>> viewport-padding v- ]
         [ gadget-child pref-dim ]
         bi vmax
-    ] [ gadget-child ] bi (>>dim) ;
+    ] bi >>dim drop ;
 
 M: viewport focusable-child*
     gadget-child ;
@@ -37,13 +42,17 @@ M: viewport pref-dim* viewport-dim ;
 
 M: viewport model-changed
     nip
-    dup relayout-1
-    dup scroller-value
-    vneg viewport-gap v+
-    swap gadget-child (>>loc) ;
+    [ relayout-1 ]
+    [
+        [ gadget-child ]
+        [
+            scroller-value vneg
+            viewport-gap v+
+            scroller-border v+
+        ] bi
+        >>loc drop
+    ] bi ;
 
 : visible-dim ( gadget -- dim )
     dup parent>> viewport?
-      [ parent>> rect-dim viewport-gap 2 v*n v- ]
-      [ rect-dim ]
-    if ;
+    [ parent>> rect-dim viewport-gap 2 v*n v- ] [ dim>> ] if ;
index 123a7620d1f4b500b75d8217e8ed8209ca2922f7..b74a36bc0b34f507a0860e521ebc4d804cd9d038 100644 (file)
@@ -3,7 +3,7 @@
 USING: accessors arrays assocs kernel math math.order models
 namespaces make sequences words strings system hashtables
 math.parser math.vectors classes.tuple classes boxes calendar
-alarms symbols combinators sets columns fry deques ui.gadgets ;
+alarms combinators sets columns fry deques ui.gadgets ;
 IN: ui.gestures
 
 GENERIC: handle-gesture ( gesture gadget -- ? )
index f233c9f162891882de8588405fb2804ce2790325..38db81c3dc26e5664f741e905c170fc514c69de4 100644 (file)
@@ -18,10 +18,6 @@ TUPLE: deploy-gadget < pack vocab settings ;
     deploy-ui? get
     "Include user interface framework" <checkbox> add-gadget ;
 
-: exit-when-windows-closed ( parent -- parent )
-    "stop-after-last-window?" get
-    "Exit when last UI window closed" <checkbox> add-gadget ;
-
 : io-settings ( parent -- parent )
     "Input/output support:" <label> add-gadget
     deploy-io get deploy-io-options <radio-buttons> add-gadget ;
@@ -50,7 +46,6 @@ TUPLE: deploy-gadget < pack vocab settings ;
             <pile>
             bundle-name
             deploy-ui
-            os macosx? [ exit-when-windows-closed ] when
             io-settings
             reflection-settings
             advanced-settings
index 51425b124d0afffb64ddc73cc9dfad41c15206f2..40da6ebafc7bb185fdd3404d828e8f116e9e042d 100644 (file)
@@ -7,7 +7,7 @@ quotations sequences strings threads listener classes.tuple
 ui.commands ui.gadgets ui.gadgets.editors ui.gadgets.status-bar
 ui.gadgets.presentations ui.gadgets.worlds ui.gestures
 definitions calendar concurrency.flags concurrency.mailboxes
-ui.tools.workspace accessors sets destructors fry ;
+ui.tools.workspace accessors sets destructors fry vocabs.parser ;
 IN: ui.tools.interactor
 
 ! If waiting is t, we're waiting for user input, and invoking
index e3c3d46904c3c36ff16f971c22954466b17d4bd2..a9405424dc283d72cd1f4f49cce790fb9e5d29b2 100644 (file)
@@ -3,12 +3,13 @@
 USING: continuations definitions ui.tools.browser
 ui.tools.interactor ui.tools.listener ui.tools.profiler
 ui.tools.search ui.tools.traceback ui.tools.workspace generic
-help.topics stack-checker summary inspector io.files io.styles
-kernel namespaces parser prettyprint quotations
+help.topics stack-checker summary inspector io.pathnames
+io.styles kernel namespaces parser prettyprint quotations
 tools.annotations editors tools.profiler tools.test tools.time
 tools.walker ui.commands ui.gadgets.editors ui.gestures
 ui.operations ui.tools.deploy vocabs vocabs.loader words
-sequences tools.vocabs classes compiler.units accessors ;
+sequences tools.vocabs classes compiler.units accessors
+vocabs.parser ;
 IN: ui.tools.operations
 
 V{ } clone operations set-global
index 39a644230808654d58ff111e24c5cc3bf14ff04b..4f239ba6e9e022145967856e1a5f9a0875197220 100644 (file)
@@ -1,4 +1,4 @@
-USING: assocs ui.tools.search help.topics io.files io.styles
+USING: assocs ui.tools.search help.topics io.pathnames io.styles
 kernel namespaces sequences source-files threads
 tools.test ui.gadgets ui.gestures vocabs accessors
 vocabs.loader words tools.test.ui debugger calendar ;
index cf980cfc234a57ba58fecb334d9d24ed96b808bc..9d248e29bdb9ceae5ceef453d41d6cd536dba056 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2006, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors assocs help help.topics io.files io.styles
+USING: accessors assocs help help.topics io.pathnames io.styles
 kernel models models.delay models.filter namespaces prettyprint
 quotations sequences sorting source-files definitions strings
 tools.completion tools.crossref classes.tuple vocabs words
index 8e1cc8d8f06b592e829a4428ec28dd525ab14bbc..2caea234801e0f05de7b010d02ac6566ca13c38a 100644 (file)
@@ -85,7 +85,7 @@ ARTICLE: "ui-completion-vocabs" "Vocabulary completion popup"
 { $operations "kernel" vocab } ;
 
 ARTICLE: "ui-completion-sources" "Source file completion popup"
-"The source file completion popup lists all source files which have been previously loaded by " { $link run-file } ". Clicking a source file  or pressing " { $snippet "RET" } " opens the source file in your editor with " { $link edit } "."
+"The source file completion popup lists all source files which have been previously loaded by " { $link run-file } ". Clicking a source file or pressing " { $snippet "RET" } " opens the source file in your editor with " { $link edit } "."
 { $operations P" " } ;
 
 ARTICLE: "ui-completion" "UI completion popups"
index 2265f27cc84c08af08c352b7ec9ab147d4f3b27e..5ce9e4c4a2dad2cf41a45cd626dc88643e3e3618 100644 (file)
@@ -2,7 +2,7 @@ USING: ui.tools ui.tools.interactor ui.tools.listener
 ui.tools.search ui.tools.workspace kernel models namespaces
 sequences tools.test ui.gadgets ui.gadgets.buttons
 ui.gadgets.labelled ui.gadgets.presentations
-ui.gadgets.scrollers vocabs tools.test.ui ui accessors ;
+ui.gadgets.menus ui.gadgets.scrollers vocabs tools.test.ui ui accessors ;
 IN: ui.tools.tests
 
 [ f ]
@@ -40,7 +40,10 @@ IN: ui.tools.tests
 
     [ t ] [ "p" get presentation? ] unit-test
 
-    [ ] [ "p" get <operations-menu> gadget-child gadget-child "c" set ] unit-test
+    [ ] [
+        "p" get [ object>> ] [ dup hook>> curry ] bi
+        <operations-menu> gadget-child gadget-child "c" set
+    ] unit-test
 
     [ ] [ notify-queued ] unit-test
 
index 738d259cad5c0a3c15843887fab27eb3de9e7e2a..5c0085bc45b40c13ed53037ced3d48375c38943b 100644 (file)
@@ -143,9 +143,7 @@ ARTICLE: "ui-backend-init" "UI initialization and the event loop"
 }
 "The above word must call the following:"
 { $subsection start-ui }
-"The " { $link ui } " word must not return until the event loop has stopped and the UI has been shut down."
-$nl
-"The event loop must not block, since otherwise other Factor threads and I/O will not run. Instead, it should poll for pending events, then call " { $link ui-wait } "." ;
+"The " { $link ui } " word must not return until the event loop has stopped and the UI has been shut down." ;
 
 ARTICLE: "ui-backend-windows" "UI backend window management"
 "The high-level " { $link open-window } " word eventually calls a low-level word which you must implement:"
@@ -187,7 +185,9 @@ $nl
 { $subsection add-gadgets }
 { $subsection clear-gadget }
 "The children of a gadget are available via the "
-{ $snippet "children" } " slot. " "Working with gadget children:"
+{ $snippet "children" } " slot. "
+$nl
+"Working with gadget children:"
 { $subsection gadget-child }
 { $subsection nth-gadget }
 { $subsection each-child }
@@ -201,7 +201,7 @@ $nl
 { $subsection relayout-1 }
 "Gadgets implement a generic word to inform their parents of their preferred size:"
 { $subsection pref-dim* }
-"To get a gadget's preferred size, do not call the above word, instead use " { $link pref-dim  } ",  which caches the result." ;
+"To get a gadget's preferred size, do not call the above word, instead use " { $link pref-dim  } ", which caches the result." ;
 
 ARTICLE: "ui-null-layout" "Manual layouts"
 "When automatic layout is not appropriate, gadgets can be added to a parent with no layout policy, and then positioned and sized manually by setting the " { $snippet "loc" } " field." ;
index 2920b58fffbb32c1cc3675dc4979c48af256a9d5..15999d128b081ac41f6f46ecc5a7ff0c275df247 100644 (file)
@@ -1,5 +1,4 @@
 IN: ui.tests
 USING: ui tools.test ;
 
-\ event-loop must-infer
 \ open-window must-infer
index 1ee860c9748d0ea6316fd7e92f44331ff9748add..37ce4ea499316e04f091fc457d7acfe17ca5dcfa 100644 (file)
@@ -10,18 +10,6 @@ IN: ui
 ! Assoc mapping aliens to gadgets
 SYMBOL: windows
 
-SYMBOL: stop-after-last-window?
-
-: event-loop? ( -- ? )
-    {
-        { [ stop-after-last-window? get not ] [ t ] }
-        { [ graft-queue deque-empty? not ] [ t ] }
-        { [ windows get-global empty? not ] [ t ] }
-        [ f ]
-    } cond ;
-
-: event-loop ( -- ) [ event-loop? ] [ do-events ] [ ] while ;
-
 : window ( handle -- world ) windows get-global at ;
 
 : window-focus ( handle -- gadget ) window world-focus ;
@@ -155,9 +143,6 @@ SYMBOL: ui-hook
         ] assert-depth
     ] [ ui-error ] recover ;
 
-: ui-wait ( -- )
-    10 milliseconds sleep ;
-
 SYMBOL: ui-thread
 
 : ui-running ( quot -- )
@@ -220,7 +205,6 @@ MAIN: ui
         f windows set-global
         [
             ui-hook set
-            stop-after-last-window? on
             ui
         ] with-scope
     ] if ;
index 35ee9f9a600ca2ef67021c3887404487c112af05..c22fcb6cbefce746854294b19a1c36c465b0251e 100755 (executable)
@@ -3,14 +3,14 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.c-types alien.strings arrays assocs ui
 ui.gadgets ui.backend ui.clipboards ui.gadgets.worlds
-ui.gestures io kernel math math.vectors namespaces make
-sequences strings vectors words windows.kernel32 windows.gdi32
-windows.user32 windows.opengl32 windows.messages windows.types
-windows.nt windows threads libc combinators fry
+ui.gestures ui.event-loop io kernel math math.vectors namespaces
+make sequences strings vectors words windows.kernel32
+windows.gdi32 windows.user32 windows.opengl32 windows.messages
+windows.types windows.nt windows threads libc combinators fry
 combinators.short-circuit continuations command-line shuffle
-opengl ui.render ascii math.bitwise locals symbols accessors
-math.geometry.rect math.order ascii calendar
-io.encodings.utf16n ;
+opengl ui.render ascii math.bitwise locals accessors
+math.geometry.rect math.order ascii calendar io.encodings.utf16n
+;
 IN: ui.windows
 
 SINGLETON: windows-ui-backend
@@ -172,10 +172,10 @@ SYMBOLS: msg-obj class-name-ptr mouse-captured ;
         { 27 "ESC" }
     } ;
 
-: exclude-key-wm-keydown? ( n -- bool )
+: exclude-key-wm-keydown? ( n -- ? )
     exclude-keys-wm-keydown key? ;
 
-: exclude-key-wm-char? ( n -- bool )
+: exclude-key-wm-char? ( n -- ? )
     exclude-keys-wm-char key? ;
 
 : keystroke>gesture ( n -- mods sym )
@@ -574,7 +574,6 @@ M: windows-ui-backend set-title ( string world -- )
 M: windows-ui-backend ui
     [
         [
-            stop-after-last-window? on
             init-clipboard
             init-win32-ui
             start-ui
index 817e356712505d2100b7b021f40ee1cfcd6290b0..666ebf2f18b2f8eeb3a634810707f1b2a4550a3c 100755 (executable)
@@ -2,10 +2,10 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors alien alien.c-types arrays ui ui.gadgets
 ui.gestures ui.backend ui.clipboards ui.gadgets.worlds ui.render
-assocs kernel math namespaces opengl sequences strings x11.xlib
-x11.events x11.xim x11.glx x11.clipboard x11.constants
-x11.windows io.encodings.string io.encodings.ascii
-io.encodings.utf8 combinators command-line qualified
+ui.event-loop assocs kernel math namespaces opengl sequences
+strings x11.xlib x11.events x11.xim x11.glx x11.clipboard
+x11.constants x11.windows io.encodings.string io.encodings.ascii
+io.encodings.utf8 combinators command-line
 math.vectors classes.tuple opengl.gl threads math.geometry.rect
 environment ascii ;
 IN: ui.x11
@@ -281,7 +281,6 @@ M: x11-ui-backend ui ( -- )
     [
         f [
             [
-                stop-after-last-window? on
                 init-clipboard
                 start-ui
                 event-loop
diff --git a/basis/unicode/breaks/GraphemeBreakTest.txt b/basis/unicode/breaks/GraphemeBreakTest.txt
new file mode 100644 (file)
index 0000000..e0b5a25
--- /dev/null
@@ -0,0 +1,311 @@
+# GraphemeBreakTest-5.1.0.txt
+# Date: 2008-03-11, 02:19:22 GMT [MD]
+#
+# Unicode Character Database
+# Copyright (c) 1991-2008 Unicode, Inc.
+# For terms of use, see http://www.unicode.org/terms_of_use.html
+# For documentation, see UCD.html
+#
+# Default Grapheme Break Test
+#
+# Format:
+# <string> (# <comment>)? 
+#  <string> contains hex Unicode code points, with 
+#      Ã· wherever there is a break opportunity, and 
+#      Ã— wherever there is not.
+#  <comment> the format can change, but currently it shows:
+#      - the sample character name
+#      - (x) the line_break property* for the sample character
+#      - [x] the rule that determines whether there is a break or not
+#
+# These samples may be extended or changed in the future.
+#
+÷ 0020 Ã· 0020 Ã·     #  Ã· [0.2] SPACE (Other) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ 0020 Ã— 0308 Ã· 0020 Ã·     #  Ã· [0.2] SPACE (Other) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ 0020 Ã· 000D Ã·     #  Ã· [0.2] SPACE (Other) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0020 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] SPACE (Other) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0020 Ã· 000A Ã·     #  Ã· [0.2] SPACE (Other) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0020 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] SPACE (Other) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0020 Ã· 0001 Ã·     #  Ã· [0.2] SPACE (Other) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 0020 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] SPACE (Other) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 0020 Ã— 0300 Ã·     #  Ã· [0.2] SPACE (Other) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 0020 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] SPACE (Other) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 0020 Ã· 0E40 Ã·     #  Ã· [0.2] SPACE (Other) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 0020 Ã— 0308 Ã· 0E40 Ã·     #  Ã· [0.2] SPACE (Other) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 0020 Ã— 0903 Ã·     #  Ã· [0.2] SPACE (Other) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 0020 Ã— 0308 Ã— 0903 Ã·     #  Ã· [0.2] SPACE (Other) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 0020 Ã· 1100 Ã·     #  Ã· [0.2] SPACE (Other) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 0020 Ã— 0308 Ã· 1100 Ã·     #  Ã· [0.2] SPACE (Other) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 0020 Ã· 1160 Ã·     #  Ã· [0.2] SPACE (Other) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 0020 Ã— 0308 Ã· 1160 Ã·     #  Ã· [0.2] SPACE (Other) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 0020 Ã· 11A8 Ã·     #  Ã· [0.2] SPACE (Other) Ã· [999.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 0020 Ã— 0308 Ã· 11A8 Ã·     #  Ã· [0.2] SPACE (Other) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 0020 Ã· AC00 Ã·     #  Ã· [0.2] SPACE (Other) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 0020 Ã— 0308 Ã· AC00 Ã·     #  Ã· [0.2] SPACE (Other) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 0020 Ã· AC01 Ã·     #  Ã· [0.2] SPACE (Other) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 0020 Ã— 0308 Ã· AC01 Ã·     #  Ã· [0.2] SPACE (Other) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 000D Ã· 0020 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] SPACE (Other) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 0020 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ 000D Ã· 000D Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 000D Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 000D Ã— 000A Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã— [3.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 000A Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 000D Ã· 0001 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 0001 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 000D Ã· 0300 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 000D Ã· 0308 Ã— 0300 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 000D Ã· 0E40 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 0E40 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 000D Ã· 0903 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 000D Ã· 0308 Ã— 0903 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 000D Ã· 1100 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 1100 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 000D Ã· 1160 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 1160 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 000D Ã· 11A8 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 11A8 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 000D Ã· AC00 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· AC00 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 000D Ã· AC01 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· AC01 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 000A Ã· 0020 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] SPACE (Other) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 0020 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ 000A Ã· 000D Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 000D Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 000A Ã· 000A Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 000A Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 000A Ã· 0001 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 0001 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 000A Ã· 0300 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 000A Ã· 0308 Ã— 0300 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 000A Ã· 0E40 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 0E40 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 000A Ã· 0903 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 000A Ã· 0308 Ã— 0903 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 000A Ã· 1100 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 1100 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 000A Ã· 1160 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 1160 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 000A Ã· 11A8 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 11A8 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 000A Ã· AC00 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· AC00 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 000A Ã· AC01 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· AC01 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 0001 Ã· 0020 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] SPACE (Other) Ã· [0.3]
+÷ 0001 Ã· 0308 Ã· 0020 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ 0001 Ã· 000D Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0001 Ã· 0308 Ã· 000D Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0001 Ã· 000A Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0001 Ã· 0308 Ã· 000A Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0001 Ã· 0001 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 0001 Ã· 0308 Ã· 0001 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 0001 Ã· 0300 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 0001 Ã· 0308 Ã— 0300 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 0001 Ã· 0E40 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 0001 Ã· 0308 Ã· 0E40 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 0001 Ã· 0903 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 0001 Ã· 0308 Ã— 0903 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 0001 Ã· 1100 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 0001 Ã· 0308 Ã· 1100 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 0001 Ã· 1160 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 0001 Ã· 0308 Ã· 1160 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 0001 Ã· 11A8 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 0001 Ã· 0308 Ã· 11A8 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 0001 Ã· AC00 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 0001 Ã· 0308 Ã· AC00 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 0001 Ã· AC01 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 0001 Ã· 0308 Ã· AC01 Ã·     #  Ã· [0.2] <START OF HEADING> (Control) Ã· [4.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 0300 Ã· 0020 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 0020 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ 0300 Ã· 000D Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0300 Ã· 000A Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0300 Ã· 0001 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 0300 Ã— 0300 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 0300 Ã· 0E40 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 0E40 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 0300 Ã— 0903 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã— 0903 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 0300 Ã· 1100 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 1100 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 0300 Ã· 1160 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 1160 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 0300 Ã· 11A8 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã· [999.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 11A8 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 0300 Ã· AC00 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· AC00 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 0300 Ã· AC01 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· AC01 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 0E40 Ã— 0020 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.2] SPACE (Other) Ã· [0.3]
+÷ 0E40 Ã— 0308 Ã· 0020 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ 0E40 Ã· 000D Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0E40 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0E40 Ã· 000A Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0E40 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0E40 Ã· 0001 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 0E40 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 0E40 Ã— 0300 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 0E40 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 0E40 Ã— 0E40 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.2] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 0E40 Ã— 0308 Ã· 0E40 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 0E40 Ã— 0903 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 0E40 Ã— 0308 Ã— 0903 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 0E40 Ã— 1100 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.2] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 0E40 Ã— 0308 Ã· 1100 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 0E40 Ã— 1160 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.2] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 0E40 Ã— 0308 Ã· 1160 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 0E40 Ã— 11A8 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.2] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 0E40 Ã— 0308 Ã· 11A8 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 0E40 Ã— AC00 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.2] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 0E40 Ã— 0308 Ã· AC00 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 0E40 Ã— AC01 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.2] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 0E40 Ã— 0308 Ã· AC01 Ã·     #  Ã· [0.2] THAI CHARACTER SARA E (Prepend) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 0903 Ã· 0020 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ 0903 Ã— 0308 Ã· 0020 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ 0903 Ã· 000D Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0903 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0903 Ã· 000A Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0903 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0903 Ã· 0001 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 0903 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 0903 Ã— 0300 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 0903 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 0903 Ã· 0E40 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 0903 Ã— 0308 Ã· 0E40 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 0903 Ã— 0903 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 0903 Ã— 0308 Ã— 0903 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 0903 Ã· 1100 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 0903 Ã— 0308 Ã· 1100 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 0903 Ã· 1160 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 0903 Ã— 0308 Ã· 1160 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 0903 Ã· 11A8 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [999.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 0903 Ã— 0308 Ã· 11A8 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 0903 Ã· AC00 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 0903 Ã— 0308 Ã· AC00 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 0903 Ã· AC01 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 0903 Ã— 0308 Ã· AC01 Ã·     #  Ã· [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 1100 Ã· 0020 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ 1100 Ã— 0308 Ã· 0020 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ 1100 Ã· 000D Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 1100 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 1100 Ã· 000A Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 1100 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 1100 Ã· 0001 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 1100 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 1100 Ã— 0300 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 1100 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 1100 Ã· 0E40 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 1100 Ã— 0308 Ã· 0E40 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 1100 Ã— 0903 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 1100 Ã— 0308 Ã— 0903 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 1100 Ã— 1100 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [6.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 1100 Ã— 0308 Ã· 1100 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 1100 Ã— 1160 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [6.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 1100 Ã— 0308 Ã· 1160 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 1100 Ã· 11A8 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã· [999.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 1100 Ã— 0308 Ã· 11A8 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 1100 Ã— AC00 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [6.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 1100 Ã— 0308 Ã· AC00 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 1100 Ã— AC01 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [6.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 1100 Ã— 0308 Ã· AC01 Ã·     #  Ã· [0.2] HANGUL CHOSEONG KIYEOK (L) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 1160 Ã· 0020 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ 1160 Ã— 0308 Ã· 0020 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ 1160 Ã· 000D Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 1160 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 1160 Ã· 000A Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 1160 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 1160 Ã· 0001 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 1160 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 1160 Ã— 0300 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 1160 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 1160 Ã· 0E40 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 1160 Ã— 0308 Ã· 0E40 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 1160 Ã— 0903 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 1160 Ã— 0308 Ã— 0903 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 1160 Ã· 1100 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 1160 Ã— 0308 Ã· 1100 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 1160 Ã— 1160 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã— [7.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 1160 Ã— 0308 Ã· 1160 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 1160 Ã— 11A8 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã— [7.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 1160 Ã— 0308 Ã· 11A8 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 1160 Ã· AC00 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 1160 Ã— 0308 Ã· AC00 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 1160 Ã· AC01 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 1160 Ã— 0308 Ã· AC01 Ã·     #  Ã· [0.2] HANGUL JUNGSEONG FILLER (V) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 11A8 Ã· 0020 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ 11A8 Ã— 0308 Ã· 0020 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ 11A8 Ã· 000D Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 11A8 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 11A8 Ã· 000A Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 11A8 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 11A8 Ã· 0001 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 11A8 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ 11A8 Ã— 0300 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 11A8 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ 11A8 Ã· 0E40 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 11A8 Ã— 0308 Ã· 0E40 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ 11A8 Ã— 0903 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 11A8 Ã— 0308 Ã— 0903 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ 11A8 Ã· 1100 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 11A8 Ã— 0308 Ã· 1100 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ 11A8 Ã· 1160 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 11A8 Ã— 0308 Ã· 1160 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ 11A8 Ã— 11A8 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã— [8.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 11A8 Ã— 0308 Ã· 11A8 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ 11A8 Ã· AC00 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 11A8 Ã— 0308 Ã· AC00 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ 11A8 Ã· AC01 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ 11A8 Ã— 0308 Ã· AC01 Ã·     #  Ã· [0.2] HANGUL JONGSEONG KIYEOK (T) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ AC00 Ã· 0020 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ AC00 Ã— 0308 Ã· 0020 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ AC00 Ã· 000D Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ AC00 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ AC00 Ã· 000A Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ AC00 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ AC00 Ã· 0001 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ AC00 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ AC00 Ã— 0300 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ AC00 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ AC00 Ã· 0E40 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ AC00 Ã— 0308 Ã· 0E40 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ AC00 Ã— 0903 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ AC00 Ã— 0308 Ã— 0903 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ AC00 Ã· 1100 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ AC00 Ã— 0308 Ã· 1100 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ AC00 Ã— 1160 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã— [7.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ AC00 Ã— 0308 Ã· 1160 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ AC00 Ã— 11A8 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã— [7.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ AC00 Ã— 0308 Ã· 11A8 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ AC00 Ã· AC00 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ AC00 Ã— 0308 Ã· AC00 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ AC00 Ã· AC01 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ AC00 Ã— 0308 Ã· AC01 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GA (LV) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ AC01 Ã· 0020 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ AC01 Ã— 0308 Ã· 0020 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] SPACE (Other) Ã· [0.3]
+÷ AC01 Ã· 000D Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ AC01 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ AC01 Ã· 000A Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ AC01 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ AC01 Ã· 0001 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ AC01 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [5.0] <START OF HEADING> (Control) Ã· [0.3]
+÷ AC01 Ã— 0300 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ AC01 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.0] COMBINING GRAVE ACCENT (Extend) Ã· [0.3]
+÷ AC01 Ã· 0E40 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ AC01 Ã— 0308 Ã· 0E40 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] THAI CHARACTER SARA E (Prepend) Ã· [0.3]
+÷ AC01 Ã— 0903 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ AC01 Ã— 0308 Ã— 0903 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã— [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) Ã· [0.3]
+÷ AC01 Ã· 1100 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ AC01 Ã— 0308 Ã· 1100 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL CHOSEONG KIYEOK (L) Ã· [0.3]
+÷ AC01 Ã· 1160 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ AC01 Ã— 0308 Ã· 1160 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JUNGSEONG FILLER (V) Ã· [0.3]
+÷ AC01 Ã— 11A8 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã— [8.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ AC01 Ã— 0308 Ã· 11A8 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL JONGSEONG KIYEOK (T) Ã· [0.3]
+÷ AC01 Ã· AC00 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ AC01 Ã— 0308 Ã· AC00 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GA (LV) Ã· [0.3]
+÷ AC01 Ã· AC01 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+÷ AC01 Ã— 0308 Ã· AC01 Ã·     #  Ã· [0.2] HANGUL SYLLABLE GAG (LVT) Ã— [9.0] COMBINING DIAERESIS (Extend) Ã· [999.0] HANGUL SYLLABLE GAG (LVT) Ã· [0.3]
+# Lines: 288
diff --git a/basis/unicode/breaks/WordBreakTest.txt b/basis/unicode/breaks/WordBreakTest.txt
new file mode 100644 (file)
index 0000000..39c595c
--- /dev/null
@@ -0,0 +1,1001 @@
+# WordBreakTest-5.1.0.txt
+# Date: 2008-03-11, 02:19:28 GMT [MD]
+#
+# Unicode Character Database
+# Copyright (c) 1991-2008 Unicode, Inc.
+# For terms of use, see http://www.unicode.org/terms_of_use.html
+# For documentation, see UCD.html
+#
+# Default Word Break Test
+#
+# Format:
+# <string> (# <comment>)? 
+#  <string> contains hex Unicode code points, with 
+#      Ã· wherever there is a break opportunity, and 
+#      Ã— wherever there is not.
+#  <comment> the format can change, but currently it shows:
+#      - the sample character name
+#      - (x) the line_break property* for the sample character
+#      - [x] the rule that determines whether there is a break or not
+#
+# These samples may be extended or changed in the future.
+#
+÷ 0001 Ã· 0001 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0001 Ã· 000D Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0001 Ã· 000A Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0001 Ã· 000B Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0001 Ã· 3031 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0001 Ã· 0041 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 0041 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0001 Ã· 003A Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0001 Ã· 002C Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0001 Ã· 0027 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0001 Ã· 0030 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 0030 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0001 Ã· 005F Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 005F Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0001 Ã— 00AD Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0001 Ã— 0300 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0001 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0001 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0001 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0001 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0001 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0001 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0001 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0001 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0001 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0001 Ã— 0308 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] <START OF HEADING> (Other) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000D Ã· 0001 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] <START OF HEADING> (Other) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 0001 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 000D Ã· 000D Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 000D Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 000D Ã— 000A Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã— [3.0] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 000A Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 000D Ã· 000B Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 000B Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 000D Ã· 3031 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 3031 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 000D Ã· 0041 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 0041 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 000D Ã· 003A Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COLON (MidLetter) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 003A Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 000D Ã· 002C Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMMA (MidNum) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 002C Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 000D Ã· 0027 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 0027 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000D Ã· 0030 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 0030 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 000D Ã· 005F Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 005F Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 000D Ã· 00AD Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 000D Ã· 0308 Ã— 00AD Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 000D Ã· 0300 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 000D Ã· 0308 Ã— 0300 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 000D Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000D Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 000D Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000D Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000D Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 000D Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 000D Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000D Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 000D Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000D Ã· 0308 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] <CARRIAGE RETURN (CR)> (CR) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000A Ã· 0001 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] <START OF HEADING> (Other) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 0001 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 000A Ã· 000D Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 000D Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 000A Ã· 000A Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 000A Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 000A Ã· 000B Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 000B Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 000A Ã· 3031 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 3031 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 000A Ã· 0041 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 0041 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 000A Ã· 003A Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COLON (MidLetter) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 003A Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 000A Ã· 002C Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMMA (MidNum) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 002C Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 000A Ã· 0027 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 0027 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000A Ã· 0030 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 0030 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 000A Ã· 005F Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 005F Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 000A Ã· 00AD Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 000A Ã· 0308 Ã— 00AD Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 000A Ã· 0300 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 000A Ã· 0308 Ã— 0300 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 000A Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000A Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 000A Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000A Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000A Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 000A Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 000A Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000A Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 000A Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000A Ã· 0308 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] <LINE FEED (LF)> (LF) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000B Ã· 0001 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] <START OF HEADING> (Other) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 0001 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 000B Ã· 000D Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 000D Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 000B Ã· 000A Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 000A Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 000B Ã· 000B Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 000B Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 000B Ã· 3031 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 3031 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 000B Ã· 0041 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 0041 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 000B Ã· 003A Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COLON (MidLetter) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 003A Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 000B Ã· 002C Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMMA (MidNum) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 002C Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 000B Ã· 0027 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 0027 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000B Ã· 0030 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 0030 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 000B Ã· 005F Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 005F Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 000B Ã· 00AD Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 000B Ã· 0308 Ã— 00AD Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 000B Ã· 0300 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 000B Ã· 0308 Ã— 0300 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 000B Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000B Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 000B Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000B Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000B Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 000B Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 000B Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 000B Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 000B Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 000B Ã· 0308 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] <LINE TABULATION> (Newline) Ã· [3.1] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 3031 Ã· 0001 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 3031 Ã· 000D Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 3031 Ã· 000A Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 3031 Ã· 000B Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 3031 Ã— 3031 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [13.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã— 3031 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 3031 Ã· 0041 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 0041 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 3031 Ã· 003A Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 3031 Ã· 002C Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 3031 Ã· 0027 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 3031 Ã· 0030 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 0030 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 3031 Ã— 005F Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [13.1] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã— 005F Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.1] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 3031 Ã— 00AD Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 3031 Ã— 0300 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 3031 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 3031 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 3031 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 3031 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 3031 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 3031 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 3031 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 3031 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 3031 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 3031 Ã— 0308 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] VERTICAL KANA REPEAT MARK (Katakana) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0041 Ã· 0001 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0041 Ã· 000D Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0041 Ã· 000A Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0041 Ã· 000B Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0041 Ã· 3031 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0041 Ã— 0041 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [5.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã— 0041 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [5.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0041 Ã· 003A Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0041 Ã· 002C Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0041 Ã· 0027 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0041 Ã— 0030 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [9.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã— 0030 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [9.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0041 Ã— 005F Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [13.1] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã— 005F Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.1] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0041 Ã— 00AD Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0041 Ã— 0300 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0041 Ã— 0061 Ã— 2060 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã— 0061 Ã— 2060 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0041 Ã— 0061 Ã· 003A Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã— 0061 Ã· 003A Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0041 Ã— 0061 Ã· 0027 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã— 0061 Ã· 0027 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0041 Ã— 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã— 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0041 Ã— 0061 Ã· 002C Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã— 0061 Ã· 002C Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0041 Ã— 0031 Ã· 003A Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [9.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã— 0031 Ã· 003A Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [9.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0041 Ã— 0031 Ã· 0027 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [9.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã— 0031 Ã· 0027 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [9.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0041 Ã— 0031 Ã· 002C Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [9.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã— 0031 Ã· 002C Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [9.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0041 Ã— 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [9.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0041 Ã— 0308 Ã— 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] LATIN CAPITAL LETTER A (ALetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [9.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 003A Ã· 0001 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 003A Ã· 000D Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 003A Ã· 000A Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 003A Ã· 000B Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 003A Ã· 3031 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 003A Ã· 0041 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 0041 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 003A Ã· 003A Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 003A Ã· 002C Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 003A Ã· 0027 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 003A Ã· 0030 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 0030 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 003A Ã· 005F Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 005F Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 003A Ã— 00AD Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 003A Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 003A Ã— 0300 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 003A Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 003A Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 003A Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 003A Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 003A Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 003A Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 003A Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 003A Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 003A Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 003A Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 003A Ã— 0308 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 002C Ã· 0001 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 002C Ã· 000D Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 002C Ã· 000A Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 002C Ã· 000B Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 002C Ã· 3031 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 002C Ã· 0041 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 0041 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 002C Ã· 003A Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 002C Ã· 002C Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 002C Ã· 0027 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 002C Ã· 0030 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 0030 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 002C Ã· 005F Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 005F Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 002C Ã— 00AD Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 002C Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 002C Ã— 0300 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 002C Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 002C Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 002C Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 002C Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 002C Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 002C Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 002C Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 002C Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 002C Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 002C Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 002C Ã— 0308 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0027 Ã· 0001 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0027 Ã· 000D Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0027 Ã· 000A Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0027 Ã· 000B Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0027 Ã· 3031 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0027 Ã· 0041 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 0041 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0027 Ã· 003A Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0027 Ã· 002C Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0027 Ã· 0027 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0027 Ã· 0030 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 0030 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0027 Ã· 005F Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 005F Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0027 Ã— 00AD Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0027 Ã— 0300 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0027 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0027 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0027 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0027 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0027 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0027 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0027 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0027 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0027 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0027 Ã— 0308 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0030 Ã· 0001 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0030 Ã· 000D Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0030 Ã· 000A Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0030 Ã· 000B Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0030 Ã· 3031 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0030 Ã— 0041 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [10.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã— 0041 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [10.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0030 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0030 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0030 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0030 Ã— 0030 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [8.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã— 0030 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [8.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0030 Ã— 005F Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [13.1] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã— 005F Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.1] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0030 Ã— 00AD Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0030 Ã— 0300 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0030 Ã— 0061 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [10.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã— 0061 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [10.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0030 Ã— 0061 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [10.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã— 0061 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [10.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0030 Ã— 0061 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [10.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã— 0061 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [10.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0030 Ã— 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [10.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã— 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [10.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0030 Ã— 0061 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [10.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã— 0061 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [10.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0030 Ã— 0031 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [8.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã— 0031 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [8.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0030 Ã— 0031 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [8.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã— 0031 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [8.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0030 Ã— 0031 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [8.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã— 0031 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [8.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0030 Ã— 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [8.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0030 Ã— 0308 Ã— 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ZERO (Numeric) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [8.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 005F Ã· 0001 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 005F Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 005F Ã· 000D Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 005F Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 005F Ã· 000A Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 005F Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 005F Ã· 000B Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 005F Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 005F Ã— 3031 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [13.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 005F Ã— 0308 Ã— 3031 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.2] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 005F Ã— 0041 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [13.2] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 005F Ã— 0308 Ã— 0041 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.2] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 005F Ã· 003A Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 005F Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 005F Ã· 002C Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 005F Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 005F Ã· 0027 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 005F Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 005F Ã— 0030 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [13.2] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 005F Ã— 0308 Ã— 0030 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.2] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 005F Ã— 005F Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [13.1] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 005F Ã— 0308 Ã— 005F Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.1] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 005F Ã— 00AD Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 005F Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 005F Ã— 0300 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 005F Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 005F Ã— 0061 Ã— 2060 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [13.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 005F Ã— 0308 Ã— 0061 Ã— 2060 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 005F Ã— 0061 Ã· 003A Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [13.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 005F Ã— 0308 Ã— 0061 Ã· 003A Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 005F Ã— 0061 Ã· 0027 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [13.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 005F Ã— 0308 Ã— 0061 Ã· 0027 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 005F Ã— 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [13.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 005F Ã— 0308 Ã— 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 005F Ã— 0061 Ã· 002C Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [13.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 005F Ã— 0308 Ã— 0061 Ã· 002C Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 005F Ã— 0031 Ã· 003A Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [13.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 005F Ã— 0308 Ã— 0031 Ã· 003A Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 005F Ã— 0031 Ã· 0027 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [13.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 005F Ã— 0308 Ã— 0031 Ã· 0027 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 005F Ã— 0031 Ã· 002C Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [13.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 005F Ã— 0308 Ã— 0031 Ã· 002C Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 005F Ã— 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [13.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 005F Ã— 0308 Ã— 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] LOW LINE (ExtendNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 00AD Ã· 0001 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 00AD Ã· 000D Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 00AD Ã· 000A Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 00AD Ã· 000B Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 00AD Ã· 3031 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 00AD Ã· 0041 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 0041 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 00AD Ã· 003A Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 00AD Ã· 002C Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 00AD Ã· 0027 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 00AD Ã· 0030 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 0030 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 00AD Ã· 005F Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 005F Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 00AD Ã— 00AD Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 00AD Ã— 0300 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 00AD Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 00AD Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 00AD Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 00AD Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 00AD Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 00AD Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 00AD Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 00AD Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 00AD Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 00AD Ã— 0308 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] SOFT HYPHEN (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0300 Ã· 0001 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0300 Ã· 000D Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0300 Ã· 000A Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0300 Ã· 000B Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0300 Ã· 3031 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0300 Ã· 0041 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 0041 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0300 Ã· 003A Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0300 Ã· 002C Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0300 Ã· 0027 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0300 Ã· 0030 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 0030 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0300 Ã· 005F Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 005F Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0300 Ã— 00AD Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0300 Ã— 0300 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0300 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0300 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0300 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0300 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0300 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0300 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0300 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0300 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0300 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0300 Ã— 0308 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] COMBINING GRAVE ACCENT (Extend_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã· 0001 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã· 000D Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã· 000A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã· 000B Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã· 3031 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0041 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [5.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã— 0041 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [5.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0030 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [9.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã— 0030 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [9.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 005F Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [13.1] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã— 005F Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [13.1] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 00AD Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0300 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0061 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã— 0061 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0061 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã— 0061 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0061 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã— 0061 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã— 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0061 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã— 0061 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0031 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [9.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã— 0031 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [9.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0031 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [9.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã— 0031 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [9.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0031 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [9.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã— 0031 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [9.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [9.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 2060 Ã— 0308 Ã— 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [9.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 003A Ã· 0001 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0061 Ã· 003A Ã· 000D Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0061 Ã· 003A Ã· 000A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0061 Ã· 003A Ã· 000B Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0061 Ã· 003A Ã· 3031 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0061 Ã— 003A Ã— 0041 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] COLON (MidLetter) Ã— [7.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0061 Ã— 003A Ã— 0308 Ã— 0041 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0061 Ã· 003A Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 003A Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 003A Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 003A Ã· 0030 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0308 Ã· 0030 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0061 Ã· 003A Ã· 005F Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0308 Ã· 005F Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 00AD Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0300 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0061 Ã— 003A Ã— 0061 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] COLON (MidLetter) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 003A Ã— 0308 Ã— 0061 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 003A Ã— 0061 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] COLON (MidLetter) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã— 003A Ã— 0308 Ã— 0061 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã— 003A Ã— 0061 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] COLON (MidLetter) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã— 003A Ã— 0308 Ã— 0061 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã— 003A Ã— 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] COLON (MidLetter) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 003A Ã— 0308 Ã— 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 003A Ã— 0061 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] COLON (MidLetter) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã— 003A Ã— 0308 Ã— 0061 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 003A Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0308 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 003A Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0308 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 003A Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0308 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 003A Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 003A Ã— 0308 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã· 0001 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã· 000D Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã· 000A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã· 000B Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã· 3031 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 0041 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [7.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 0308 Ã— 0041 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã· 0030 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0308 Ã· 0030 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã· 005F Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0308 Ã· 005F Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 00AD Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0300 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 0061 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 0308 Ã— 0061 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 0061 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 0308 Ã— 0061 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 0061 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 0308 Ã— 0061 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 0308 Ã— 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 0061 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 0308 Ã— 0061 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0308 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0308 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0308 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 0308 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã· 0001 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã· 000D Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã· 000A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã· 000B Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã· 3031 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 2060 Ã— 0041 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [7.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 2060 Ã— 0308 Ã— 0041 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã· 0030 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0308 Ã· 0030 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã· 005F Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0308 Ã· 005F Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 00AD Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0300 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 2060 Ã— 0061 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 2060 Ã— 0308 Ã— 0061 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 2060 Ã— 0061 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 2060 Ã— 0308 Ã— 0061 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 2060 Ã— 0061 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 2060 Ã— 0308 Ã— 0061 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 2060 Ã— 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 2060 Ã— 0308 Ã— 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 2060 Ã— 0061 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã— 0027 Ã— 2060 Ã— 0308 Ã— 0061 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [7.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0308 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0308 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0308 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 0027 Ã— 2060 Ã— 0308 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 0001 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 000D Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 000A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 000B Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 3031 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 0041 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 0041 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 0030 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 0030 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 005F Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 005F Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 00AD Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0300 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0061 Ã· 002C Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0061 Ã· 002C Ã— 0308 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 0001 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 000D Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 000A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 000B Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 3031 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 0041 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 0041 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 0030 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 0030 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 005F Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 005F Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 00AD Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0300 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 0031 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 0031 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 0031 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã· 003A Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 003A Ã— 0308 Ã· 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã· 0001 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã· 000D Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã· 000A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã· 000B Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã· 3031 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã· 0041 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã· 0041 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã— 0027 Ã— 0030 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] APOSTROPHE (MidNumLet) Ã— [11.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0031 Ã— 0027 Ã— 0308 Ã— 0030 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [11.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã· 005F Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã· 005F Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 00AD Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0300 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã· 0027 Ã— 0308 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã— 0027 Ã— 0031 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] APOSTROPHE (MidNumLet) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã— 0027 Ã— 0308 Ã— 0031 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã— 0027 Ã— 0031 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] APOSTROPHE (MidNumLet) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã— 0027 Ã— 0308 Ã— 0031 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã— 0027 Ã— 0031 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] APOSTROPHE (MidNumLet) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã— 0027 Ã— 0308 Ã— 0031 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã— 0027 Ã— 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] APOSTROPHE (MidNumLet) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã— 0027 Ã— 0308 Ã— 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] APOSTROPHE (MidNumLet) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 002C Ã· 0001 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0031 Ã· 002C Ã· 000D Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0031 Ã· 002C Ã· 000A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0031 Ã· 002C Ã· 000B Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0031 Ã· 002C Ã· 3031 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0031 Ã· 002C Ã· 0041 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã· 0041 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0031 Ã· 002C Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 002C Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã· 002C Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã— 002C Ã— 0030 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] COMMA (MidNum) Ã— [11.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0031 Ã— 002C Ã— 0308 Ã— 0030 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [11.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0031 Ã· 002C Ã· 005F Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã· 005F Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 00AD Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0300 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0031 Ã· 002C Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 002C Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 002C Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã· 002C Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 002C Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã· 002C Ã— 0308 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã— 002C Ã— 0031 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] COMMA (MidNum) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã— 002C Ã— 0308 Ã— 0031 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã— 002C Ã— 0031 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] COMMA (MidNum) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã— 002C Ã— 0308 Ã— 0031 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã— 002C Ã— 0031 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] COMMA (MidNum) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã— 002C Ã— 0308 Ã— 0031 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã— 002C Ã— 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] COMMA (MidNum) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã— 002C Ã— 0308 Ã— 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] COMMA (MidNum) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã· 0001 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã· 0001 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] <START OF HEADING> (Other) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã· 000D Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã· 000D Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <CARRIAGE RETURN (CR)> (CR) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã· 000A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã· 000A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE FEED (LF)> (LF) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã· 000B Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã· 000B Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [3.11] <LINE TABULATION> (Newline) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã· 3031 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã· 3031 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] VERTICAL KANA REPEAT MARK (Katakana) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã· 0041 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã· 0041 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN CAPITAL LETTER A (ALetter) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã— 002E Ã— 2060 Ã— 0030 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [11.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0031 Ã— 002E Ã— 2060 Ã— 0308 Ã— 0030 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [11.0] DIGIT ZERO (Numeric) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã· 005F Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã· 005F Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LOW LINE (ExtendNumLet) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 00AD Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã— 00AD Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0300 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã— 0300 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [4.0] COMBINING GRAVE ACCENT (Extend_FE) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã· 0061 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã· 0061 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã· 0061 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã· 0061 Ã· 0027 Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã· 002E Ã— 2060 Ã— 0308 Ã· 0061 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã— 002E Ã— 2060 Ã— 0031 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã— 002E Ã— 2060 Ã— 0308 Ã— 0031 Ã· 003A Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] COLON (MidLetter) Ã· [0.3]
+÷ 0031 Ã— 002E Ã— 2060 Ã— 0031 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã— 002E Ã— 2060 Ã— 0308 Ã— 0031 Ã· 0027 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] APOSTROPHE (MidNumLet) Ã· [0.3]
+÷ 0031 Ã— 002E Ã— 2060 Ã— 0031 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã— 002E Ã— 2060 Ã— 0308 Ã— 0031 Ã· 002C Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] COMMA (MidNum) Ã· [0.3]
+÷ 0031 Ã— 002E Ã— 2060 Ã— 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0031 Ã— 002E Ã— 2060 Ã— 0308 Ã— 0031 Ã· 002E Ã— 2060 Ã·     #  Ã· [0.2] DIGIT ONE (Numeric) Ã— [12.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] COMBINING DIAERESIS (Extend_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã· [999.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 0063 Ã— 0061 Ã— 006E Ã— 0027 Ã— 0074 Ã·     #  Ã· [0.2] LATIN SMALL LETTER C (ALetter) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã— [5.0] LATIN SMALL LETTER N (ALetter) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [7.0] LATIN SMALL LETTER T (ALetter) Ã· [0.3]
+÷ 0063 Ã— 0061 Ã— 006E Ã— 2019 Ã— 0074 Ã·     #  Ã· [0.2] LATIN SMALL LETTER C (ALetter) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã— [5.0] LATIN SMALL LETTER N (ALetter) Ã— [6.0] RIGHT SINGLE QUOTATION MARK (MidNumLet) Ã— [7.0] LATIN SMALL LETTER T (ALetter) Ã· [0.3]
+÷ 0061 Ã— 0062 Ã— 00AD Ã— 0062 Ã— 0079 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã— [5.0] LATIN SMALL LETTER B (ALetter) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã— [5.0] LATIN SMALL LETTER B (ALetter) Ã— [5.0] LATIN SMALL LETTER Y (ALetter) Ã· [0.3]
+÷ 0061 Ã· 0024 Ã· 002D Ã· 0033 Ã— 0034 Ã— 002C Ã— 0035 Ã— 0036 Ã— 0037 Ã— 002E Ã— 0031 Ã— 0034 Ã· 0025 Ã· 0062 Ã·     #  Ã· [0.2] LATIN SMALL LETTER A (ALetter) Ã· [999.0] DOLLAR SIGN (Other) Ã· [999.0] HYPHEN-MINUS (Other) Ã· [999.0] DIGIT THREE (Numeric) Ã— [8.0] DIGIT FOUR (Numeric) Ã— [12.0] COMMA (MidNum) Ã— [11.0] DIGIT FIVE (Numeric) Ã— [8.0] DIGIT SIX (Numeric) Ã— [8.0] DIGIT SEVEN (Numeric) Ã— [12.0] FULL STOP (MidNumLet) Ã— [11.0] DIGIT ONE (Numeric) Ã— [8.0] DIGIT FOUR (Numeric) Ã· [999.0] PERCENT SIGN (Other) Ã· [999.0] LATIN SMALL LETTER B (ALetter) Ã· [0.3]
+÷ 0033 Ã— 0061 Ã·     #  Ã· [0.2] DIGIT THREE (Numeric) Ã— [10.0] LATIN SMALL LETTER A (ALetter) Ã· [0.3]
+÷ 2060 Ã· 0063 Ã— 2060 Ã— 0061 Ã— 2060 Ã— 006E Ã— 2060 Ã— 0027 Ã— 2060 Ã— 0074 Ã— 2060 Ã— 2060 Ã·     #  Ã· [0.2] WORD JOINER (Format_FE) Ã· [999.0] LATIN SMALL LETTER C (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [5.0] LATIN SMALL LETTER N (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [6.0] APOSTROPHE (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [7.0] LATIN SMALL LETTER T (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 2060 Ã· 0063 Ã— 2060 Ã— 0061 Ã— 2060 Ã— 006E Ã— 2060 Ã— 2019 Ã— 2060 Ã— 0074 Ã— 2060 Ã— 2060 Ã·     #  Ã· [0.2] WORD JOINER (Format_FE) Ã· [999.0] LATIN SMALL LETTER C (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [5.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [5.0] LATIN SMALL LETTER N (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [6.0] RIGHT SINGLE QUOTATION MARK (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [7.0] LATIN SMALL LETTER T (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 2060 Ã· 0061 Ã— 2060 Ã— 0062 Ã— 2060 Ã— 00AD Ã— 2060 Ã— 0062 Ã— 2060 Ã— 0079 Ã— 2060 Ã— 2060 Ã·     #  Ã· [0.2] WORD JOINER (Format_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [5.0] LATIN SMALL LETTER B (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] SOFT HYPHEN (Format_FE) Ã— [4.0] WORD JOINER (Format_FE) Ã— [5.0] LATIN SMALL LETTER B (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [5.0] LATIN SMALL LETTER Y (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 2060 Ã· 0061 Ã— 2060 Ã· 0024 Ã— 2060 Ã· 002D Ã— 2060 Ã· 0033 Ã— 2060 Ã— 0034 Ã— 2060 Ã— 002C Ã— 2060 Ã— 0035 Ã— 2060 Ã— 0036 Ã— 2060 Ã— 0037 Ã— 2060 Ã— 002E Ã— 2060 Ã— 0031 Ã— 2060 Ã— 0034 Ã— 2060 Ã· 0025 Ã— 2060 Ã· 0062 Ã— 2060 Ã— 2060 Ã·     #  Ã· [0.2] WORD JOINER (Format_FE) Ã· [999.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] DOLLAR SIGN (Other) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] HYPHEN-MINUS (Other) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] DIGIT THREE (Numeric) Ã— [4.0] WORD JOINER (Format_FE) Ã— [8.0] DIGIT FOUR (Numeric) Ã— [4.0] WORD JOINER (Format_FE) Ã— [12.0] COMMA (MidNum) Ã— [4.0] WORD JOINER (Format_FE) Ã— [11.0] DIGIT FIVE (Numeric) Ã— [4.0] WORD JOINER (Format_FE) Ã— [8.0] DIGIT SIX (Numeric) Ã— [4.0] WORD JOINER (Format_FE) Ã— [8.0] DIGIT SEVEN (Numeric) Ã— [4.0] WORD JOINER (Format_FE) Ã— [12.0] FULL STOP (MidNumLet) Ã— [4.0] WORD JOINER (Format_FE) Ã— [11.0] DIGIT ONE (Numeric) Ã— [4.0] WORD JOINER (Format_FE) Ã— [8.0] DIGIT FOUR (Numeric) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] PERCENT SIGN (Other) Ã— [4.0] WORD JOINER (Format_FE) Ã· [999.0] LATIN SMALL LETTER B (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+÷ 2060 Ã· 0033 Ã— 2060 Ã— 0061 Ã— 2060 Ã— 2060 Ã·     #  Ã· [0.2] WORD JOINER (Format_FE) Ã· [999.0] DIGIT THREE (Numeric) Ã— [4.0] WORD JOINER (Format_FE) Ã— [10.0] LATIN SMALL LETTER A (ALetter) Ã— [4.0] WORD JOINER (Format_FE) Ã— [4.0] WORD JOINER (Format_FE) Ã· [0.3]
+# Lines: 968
diff --git a/basis/unicode/breaks/breaks-docs.factor b/basis/unicode/breaks/breaks-docs.factor
new file mode 100644 (file)
index 0000000..552883a
--- /dev/null
@@ -0,0 +1,39 @@
+USING: help.syntax help.markup strings ;
+IN: unicode.breaks
+
+ABOUT: "unicode.breaks"
+
+ARTICLE: "unicode.breaks" "Word and grapheme breaks"
+"The " { $vocab-link "unicode.breaks" "unicode.breaks" } " vocabulary partially implements Unicode Standard Annex #29. This provides for segmentation of a string along grapheme and word boundaries. In Unicode, a grapheme, or a basic unit of display in text, may be more than one code point. For example, in the string \"e\\u000301\" (where U+0301 is a combining acute accent), there is only one grapheme, as the acute accent goes above the e, forming a single grapheme. Word breaks, in general, are more complicated than simply splitting by whitespace, and the Unicode algorithm provides for that."
+$nl "Operations for graphemes:"
+{ $subsection first-grapheme }
+{ $subsection last-grapheme }
+{ $subsection >graphemes }
+{ $subsection string-reverse }
+"Operations on words:"
+{ $subsection first-word }
+{ $subsection >words } ;
+
+HELP: first-grapheme
+{ $values { "str" string } { "i" "an index" } }
+{ $description "Finds the length of the first grapheme of the string. This can be used repeatedly to efficiently traverse the graphemes of the string, using slices." } ;
+
+HELP: last-grapheme
+{ $values { "str" string } { "i" "an index" } }
+{ $description "Finds the index of the start of the last grapheme of the string. This can be used to traverse the graphemes of a string backwards." } ;
+
+HELP: >graphemes
+{ $values { "str" string } { "graphemes" "an array of strings" } }
+{ $description "Divides a string into a sequence of individual graphemes." } ;
+
+HELP: string-reverse
+{ $values { "str" string } { "rts" string } }
+{ $description "Reverses a string, leaving graphemes in-tact." } ;
+
+HELP: first-word
+{ $values { "str" string } { "i" "index" } }
+{ $description "Finds the length of the first word in the string." } ;
+
+HELP: >words
+{ $values { "str" string } { "words" "an array of strings" } }
+{ $description "Divides the string up into words." } ;
index 77ba0e82fa702f4bf85997ba2bb2a0e11b690613..b91cb2b26cc3f39b2e9bfb617ccdc0b749deb9c8 100644 (file)
@@ -1,7 +1,39 @@
-USING: tools.test unicode.breaks sequences math kernel ;
+USING: tools.test unicode.breaks sequences math kernel splitting
+unicode.categories io.pathnames io.encodings.utf8 io.files
+strings quotations math.parser locals ;
+IN: unicode.breaks.tests
 
 [ "\u001112\u001161\u0011abA\u000300a\r\r\n" ]
 [ "\r\n\raA\u000300\u001112\u001161\u0011ab" string-reverse ] unit-test
 [ "dcba" ] [ "abcd" string-reverse ] unit-test
 [ 3 ] [ "\u001112\u001161\u0011abA\u000300a"
         dup last-grapheme head last-grapheme ] unit-test
+
+: grapheme-break-test ( -- filename )
+    "resource:basis/unicode/breaks/GraphemeBreakTest.txt" ;
+
+: word-break-test ( -- filename )
+    "resource:basis/unicode/breaks/WordBreakTest.txt" ;
+
+: parse-test-file ( file-name -- tests )
+    utf8 file-lines
+    [ "#" split1 drop ] map harvest [
+        "÷" split
+        [ "×" split [ [ blank? ] trim hex> ] map harvest >string ] map
+        harvest
+    ] map ;
+
+:: test ( tests quot -- )
+    tests [
+        [ 1quotation ]
+        [ concat [ quot call [ "" like ] map ] curry ] bi unit-test
+    ] each ;
+
+: grapheme-test ( tests quot -- )
+    [
+        [ 1quotation ]
+        [ concat [ >graphemes [ "" like ] map ] curry ] bi unit-test
+    ] each ;
+
+grapheme-break-test parse-test-file [ >graphemes ] test
+word-break-test parse-test-file [ >words ] test
index 58c7a5d10e6eabe9ebe11ecbeab54e6380ed3322..6bcf8b50ccda03bdf9cadec546cdabee8e2cda51 100644 (file)
@@ -2,17 +2,24 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: combinators.short-circuit unicode.categories kernel math
 combinators splitting sequences math.parser io.files io assocs
-arrays namespaces make math.ranges unicode.normalize values
-io.encodings.ascii unicode.syntax unicode.data compiler.units
-alien.syntax sets ;
+arrays namespaces make math.ranges unicode.normalize.private values
+io.encodings.ascii unicode.syntax unicode.data compiler.units fry
+alien.syntax sets accessors interval-maps memoize locals words ;
 IN: unicode.breaks
 
-C-ENUM: Any L V T Extend Control CR LF graphemes ;
+<PRIVATE
+! Grapheme breaks
+
+C-ENUM: Any L V T LV LVT Extend Control CR LF
+    SpacingMark Prepend graphemes ;
 
 : jamo-class ( ch -- class )
     dup initial? [ drop L ]
     [ dup medial? [ drop V ] [ final? T Any ? ] if ] if ;
 
+: hangul-class ( ch -- class )
+    hangul-base - HEX: 1C mod zero? LV LVT ? ;
+
 CATEGORY: grapheme-control Zl Zp Cc Cf ;
 : control-class ( ch -- class )
     {
@@ -27,44 +34,55 @@ CATEGORY: (extend) Me Mn ;
 : extend? ( ch -- ? )
     { [ (extend)? ] [ "Other_Grapheme_Extend" property? ] } 1|| ;
 
+: loe? ( ch -- ? )
+    "Logical_Order_Exception" property? ;
+
+CATEGORY: spacing Mc ;
+
 : grapheme-class ( ch -- class )
     {
         { [ dup jamo? ] [ jamo-class ] }
+        { [ dup hangul? ] [ hangul-class ] }
         { [ dup grapheme-control? ] [ control-class ] }
-        { [ extend? ] [ Extend ] }
+        { [ dup extend? ] [ drop Extend ] }
+        { [ dup spacing? ] [ drop SpacingMark ] }
+        { [ loe? ] [ Prepend ] }
         [ Any ]
     } cond ;
 
-: init-grapheme-table ( -- table )
-    graphemes [ graphemes f <array> ] replicate ;
+: init-table ( size -- table )
+    dup [ f <array> ] curry replicate ;
 
 SYMBOL: table
 
 : finish-table ( -- table )
     table get [ [ 1 = ] map ] map ;
 
-: set-table ( class1 class2 val -- )
-    -rot table get nth [ swap or ] change-nth ;
-
-: connect ( class1 class2 -- ) 1 set-table ;
-: disconnect ( class1 class2 -- ) 0 set-table ;
+: eval-seq ( seq -- seq ) [ dup word? [ execute ] when ] map ;
 
-: connect-before ( class classes -- )
-    [ connect ] with each ;
+: (set-table) ( class1 class2 val -- )
+    [ table get nth ] dip '[ _ or ] change-nth ;
 
-: connect-after ( classes class -- )
-    [ connect ] curry each ;
+: set-table ( classes1 classes2 val -- )
+    [ [ eval-seq ] bi@ ] dip
+    [ [ (set-table) ] curry with each ] 2curry each ;
 
+: connect ( class1 class2 -- ) 1 set-table ;
+: disconnect ( class1 class2 -- ) 0 set-table ;
+  
 : break-around ( classes1 classes2 -- )
-    [ [ 2dup disconnect swap disconnect ] with each ] curry each ;
+    [ disconnect ] [ swap disconnect ] 2bi ;
 
 : make-grapheme-table ( -- )
-    CR LF connect
-    Control CR LF 3array graphemes break-around
-    L L V 2array connect-before
-    V V T 2array connect-before
-    T T connect
-    graphemes Extend connect-after ;
+    { CR } { LF } connect
+    { Control CR LF } graphemes disconnect
+    graphemes { Control CR LF } disconnect
+    { L } { L V LV LVT } connect
+    { LV V } { V T } connect
+    { LVT T } { T } connect
+    graphemes { Extend } connect
+    graphemes { SpacingMark } connect
+    { Prepend } graphemes connect ;
 
 VALUE: grapheme-table
 
@@ -74,30 +92,140 @@ VALUE: grapheme-table
 : chars ( i str n -- str[i] str[i+n] )
     swap [ dupd + ] dip [ ?nth ] curry bi@ ;
 
-: find-index ( seq quot -- i ) find drop ; inline
-: find-last-index ( seq quot -- i ) find-last drop ; inline
+PRIVATE>
 
 : first-grapheme ( str -- i )
     unclip-slice grapheme-class over
-    [ grapheme-class tuck grapheme-break? ] find-index
+    [ grapheme-class [ nip ] [ grapheme-break? ] 2bi ] find drop
     nip swap length or 1+ ;
 
-: (>graphemes) ( str -- )
-    [
-        dup first-grapheme cut-slice
-        swap , (>graphemes)
-    ] unless-empty ;
+<PRIVATE
+
+: >pieces ( str quot: ( str -- i ) -- graphemes )
+    [ dup empty? not ] swap '[ dup @ cut-slice swap ]
+    [ ] produce nip ; inline
+
+PRIVATE>
 
 : >graphemes ( str -- graphemes )
-    [ (>graphemes) ] { } make ;
+    [ first-grapheme ] >pieces ;
 
 : string-reverse ( str -- rts )
     >graphemes reverse concat ;
 
 : last-grapheme ( str -- i )
     unclip-last-slice grapheme-class swap
-    [ grapheme-class dup rot grapheme-break? ] find-last-index ?1+ nip ;
+    [ grapheme-class dup rot grapheme-break? ] find-last drop ?1+ nip ;
+
+<PRIVATE
 
-init-grapheme-table table
+graphemes init-table table
 [ make-grapheme-table finish-table ] with-variable
 to: grapheme-table
+
+! Word breaks
+
+VALUE: word-break-table
+
+"resource:basis/unicode/data/WordBreakProperty.txt" load-script
+to: word-break-table
+
+C-ENUM: wOther wCR wLF wNewline wExtend wFormat wKatakana wALetter wMidLetter
+wMidNum wMidNumLet wNumeric wExtendNumLet words ;
+
+: word-break-classes ( -- table ) ! Is there a way to avoid this?
+    H{
+        { "Other" 0 } { "CR" 1 } { "LF" 2 } { "Newline" 3 }
+        { "Extend" 4 } { "Format" 5 } { "Katakana" 6 }
+        { "ALetter" 7 } { "MidLetter" 8 }
+        { "MidNum" 9 } { "MidNumLet" 10 } { "Numeric" 11 }
+        { "ExtendNumLet" 12 }
+    } ;
+
+: word-break-prop ( char -- word-break-prop )
+    word-break-table interval-at
+    word-break-classes at [ wOther ] unless* ;
+
+SYMBOL: check-letter-before
+SYMBOL: check-letter-after
+SYMBOL: check-number-before
+SYMBOL: check-number-after
+
+: make-word-table ( -- )
+    { wCR } { wLF } connect
+    { wNewline wCR wLF } words disconnect
+    words { wNewline wCR wLF } disconnect
+    { wALetter } { wMidLetter wMidNumLet } check-letter-after set-table
+    { wMidLetter wMidNumLet } { wALetter } check-letter-before set-table
+    { wNumeric wALetter } { wNumeric wALetter } connect
+    { wNumeric } { wMidNum wMidNumLet } check-number-after set-table
+    { wMidNum wMidNumLet } { wNumeric } check-number-before set-table
+    { wKatakana } { wKatakana } connect
+    { wALetter wNumeric wKatakana wExtendNumLet } { wExtendNumLet }
+    [ connect ] [ swap connect ] 2bi ;
+
+VALUE: word-table
+
+: finish-word-table ( -- table )
+    table get [
+        [ { { 0 [ f ] } { 1 [ t ] } [ ] } case ] map
+    ] map ;
+
+words init-table table
+[ make-word-table finish-word-table ] with-variable
+to: word-table
+
+: word-table-nth ( class1 class2 -- ? )
+    word-table nth nth ;
+
+:: property-not= ( str i property -- ? )
+    i [
+        i str ?nth [ word-break-prop property = not ]
+        [ f ] if*
+    ] [ t ] if ;
+
+: format/extended? ( ch -- ? )
+    word-break-prop { 4 5 } member? ;
+
+: (walk-up) ( str i -- j )
+    swap [ format/extended? not ] find-from drop ;
+
+: walk-up ( str i -- j )
+    dupd 1+ (walk-up) [ 1+ (walk-up) ] [ drop f ] if* ;
+
+: (walk-down) ( str i -- j )
+    swap [ format/extended? not ] find-last-from drop ;
+
+: walk-down ( str i -- j )
+    dupd (walk-down) [ 1- (walk-down) ] [ drop f ] if* ;
+
+: word-break? ( str i table-entry -- ? )
+    {
+        { t [ 2drop f ] }
+        { f [ 2drop t ] }
+        { check-letter-after
+            [ dupd walk-up wALetter property-not= ] }
+        { check-letter-before
+            [ dupd walk-down wALetter property-not= ] }
+        { check-number-after
+            [ dupd walk-up wNumeric property-not= ] }
+        { check-number-before
+            [ dupd walk-down wNumeric property-not= ] }
+    } case ;
+
+:: word-break-next ( old-class new-char i str -- next-class ? )
+    new-char format/extended?
+    [ old-class dup { 1 2 3 } member? ] [
+        new-char word-break-prop old-class over word-table-nth
+        [ str i ] dip word-break?
+    ] if ;
+
+PRIVATE>
+
+: first-word ( str -- i )
+    [ unclip-slice word-break-prop over <enum> ] keep
+    '[ swap _ word-break-next ] assoc-find 2drop
+    nip swap length or 1+ ;
+
+: >words ( str -- words )
+    [ first-word ] >pieces ;
diff --git a/basis/unicode/case/case-docs.factor b/basis/unicode/case/case-docs.factor
new file mode 100644 (file)
index 0000000..02da8e7
--- /dev/null
@@ -0,0 +1,51 @@
+USING: help.syntax help.markup strings ;
+IN: unicode.case
+
+ABOUT: "unicode.case"
+
+ARTICLE: "unicode.case" "Case mapping"
+"When considering Unicode in general and not just ASCII or a smaller character set, putting a string in upper case, title case or lower case is slightly more complicated. In most contexts it's best to use the general Unicode routines for case conversion. There is an additional type of casing, case-fold, which is defined as bringing a string into upper case and then lower. This exists because in some cases it is different from simple lower case."
+{ $subsection >upper }
+{ $subsection >lower }
+{ $subsection >title }
+{ $subsection >case-fold }
+"To test if a string is in a given case:"
+{ $subsection upper? }
+{ $subsection lower? }
+{ $subsection title? }
+{ $subsection case-fold? }
+"For certain languages (Turkish, Azeri, Lithuanian), case mapping is dependent on locale; To change this, set the following variable to the ISO-639-1 code for your language:"
+{ $subsection locale }
+"This is unnecessary for most locales." ;
+
+HELP: >upper
+{ $values { "string" string } { "upper" string } }
+{ $description "Converts a string to upper case." } ;
+
+HELP: >lower
+{ $values { "string" string } { "lower" string } }
+{ $description "Converts a string to lower case." } ;
+
+HELP: >title
+{ $values { "string" string } { "title" string } }
+{ $description "Converts a string to title case." } ;
+
+HELP: >case-fold
+{ $values { "string" string } { "fold" string } }
+{ $description "Converts a string to case-folded form." } ;
+
+HELP: upper?
+{ $values { "string" string } { "?" "a boolean" } }
+{ $description "Tests if a string is in upper case." } ;
+
+HELP: lower?
+{ $values { "string" string } { "?" "a boolean" } }
+{ $description "Tests if a string is in lower case." } ;
+
+HELP: title?
+{ $values { "string" string } { "?" "a boolean" } }
+{ $description "Tests if a string is in title case." } ;
+
+HELP: case-fold?
+{ $values { "string" string } { "?" "a boolean" } }
+{ $description "Tests if a string is in case-folded form." } ;
index 0083e49672f79dfe2bdc76e962e85319aad855b5..6e26a36a190d1c447a9079c27bd9428679eb1dc8 100644 (file)
@@ -4,14 +4,14 @@ USING: unicode.case tools.test namespaces ;
 \ >lower must-infer
 \ >title must-infer
 
-[ "Hello How Are You? I'M Good" ] [ "hEllo how ARE yOU? I'm good" >title ] unit-test
+[ "Hello How Are You? I'm Good" ] [ "hEllo how ARE yOU? I'm good" >title ] unit-test
 [ "FUSS" ] [ "Fu\u0000DF" >upper ] unit-test
-[ "\u0003C3\u0003C2" ] [ "\u0003A3\u0003A3" >lower ] unit-test
+[ "\u0003C3a\u0003C2 \u0003C3\u0003C2 \u0003C3a\u0003C2" ] [ "\u0003A3A\u0003A3 \u0003A3\u0003A3 \u0003A3A\u0003A3" >lower ] unit-test
 [ t ] [ "hello how are you?" lower? ] unit-test
 [
     "tr" locale set
     [ "i\u000131i \u000131jj" ] [ "i\u000131I\u000307 IJj" >lower ] unit-test
-!    [ "I\u00307\u000131i Ijj" ] [ "i\u000131I\u000307 IJj" >title ] unit-test
+    [ "I\u000307\u000131i Ijj" ] [ "i\u000131I\u000307 IJj" >title ] unit-test
     [ "I\u000307II\u000307 IJJ" ] [ "i\u000131I\u000307 IJj" >upper ] unit-test
     "lt" locale set
     ! Lithuanian casing tests
index ea1baa6e9c6e5f7f62367f0e88afda6eae148b2f..7566138e11f34057fa4f808bbbe3217083c42338 100644 (file)
@@ -1,18 +1,28 @@
 ! Copyright (C) 2008 Daniel Ehrenberg.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: unicode.data sequences sequences.next namespaces make
-unicode.normalize math unicode.categories combinators
-assocs strings splitting kernel accessors ;
+USING: unicode.data sequences sequences.next namespaces
+sbufs make unicode.syntax unicode.normalize math hints
+unicode.categories combinators unicode.syntax assocs
+strings splitting kernel accessors unicode.breaks fry locals ;
+QUALIFIED: ascii
 IN: unicode.case
 
-: at-default ( key assoc -- value/key ) [ at ] [ drop ] 2bi or ;
-
-: ch>lower ( ch -- lower ) simple-lower at-default ;
-: ch>upper ( ch -- upper ) simple-upper at-default ;
-: ch>title ( ch -- title ) simple-title at-default ;
+<PRIVATE
+: ch>lower ( ch -- lower ) simple-lower at-default ; inline
+: ch>upper ( ch -- upper ) simple-upper at-default ; inline
+: ch>title ( ch -- title ) simple-title at-default ; inline
+PRIVATE>
 
 SYMBOL: locale ! Just casing locale, or overall?
 
+<PRIVATE
+
+: split-subseq ( string sep -- strings )
+    [ dup ] swap '[ _ split1-slice swap ] [ ] produce nip ;
+
+: replace ( old new str -- newstr )
+    [ split-subseq ] dip join ; inline
+
 : i-dot? ( -- ? )
     locale get { "tr" "az" } member? ;
 
@@ -20,82 +30,90 @@ SYMBOL: locale ! Just casing locale, or overall?
 
 : dot-over ( -- ch ) HEX: 307 ;
 
-: lithuanian-ch>upper ( ? next ch -- ? )
-    rot [ 2drop f ]
-    [ swap dot-over = over "ij" member? and swap , ] if ;
-
 : lithuanian>upper ( string -- lower )
-    [ f swap [ lithuanian-ch>upper ] each-next drop ] "" make ;
+    "i\u000307" "i" replace
+    "j\u000307" "j" replace ;
 
 : mark-above? ( ch -- ? )
     combining-class 230 = ;
 
-: lithuanian-ch>lower ( next ch -- )
-    ! This fails to add a dot above in certain edge cases
-    ! where there is a non-above combining mark before an above one
-    ! in Lithuanian
-    dup , "IJ" member? swap mark-above? and [ dot-over , ] when ;
+: with-rest ( seq quot: ( seq -- seq ) -- seq )
+    [ unclip ] dip swap slip prefix ; inline
 
-: lithuanian>lower ( string -- lower )
-    [ [ lithuanian-ch>lower ] each-next ] "" make ;
+: add-dots ( seq -- seq )
+    [ [ "" ] [
+        dup first mark-above?
+        [ CHAR: combining-dot-above prefix ] when
+    ] if-empty ] with-rest ; inline
 
-: turk-ch>upper ( ch -- )
-    dup CHAR: i = 
-    [ drop CHAR: I , dot-over , ] [ , ] if ;
+: lithuanian>lower ( string -- lower )
+    "i" split add-dots "i" join
+    "j" split add-dots "i" join ; inline
 
 : turk>upper ( string -- upper-i )
-    [ [ turk-ch>upper ] each ] "" make ;
-
-: turk-ch>lower ( ? next ch -- ? )
-    {
-        { [ rot ] [ 2drop f ] }
-        { [ dup CHAR: I = ] [
-            drop dot-over =
-            dup CHAR: i HEX: 131 ? ,
-        ] }
-        [ , drop f ]
-    } cond ;
+    "i" "I\u000307" replace ; inline
 
 : turk>lower ( string -- lower-i )
-    [ f swap [ turk-ch>lower ] each-next drop ] "" make ;
+    "I\u000307" "i" replace
+    "I" "\u000131" replace ; inline
 
-: word-boundary ( prev char -- new ? )
-    dup non-starter? [ drop dup ] when
-    swap uncased? ;
+: fix-sigma-end ( string -- string )
+    [ "" ] [
+        dup peek CHAR: greek-small-letter-sigma =
+        [ 1 head* CHAR: greek-small-letter-final-sigma suffix ] when
+    ] if-empty ; inline
 
 : sigma-map ( string -- string )
-    [
-        swap [ uncased? ] keep not or
-        [ drop HEX: 3C2 ] when
-    ] map-next ;
+    { CHAR: greek-capital-letter-sigma } split [ [
+        [ { CHAR: greek-small-letter-sigma } ] [
+            dup first uncased?
+            CHAR: greek-small-letter-final-sigma
+            CHAR: greek-small-letter-sigma ? prefix
+        ] if-empty
+    ] map ] with-rest concat fix-sigma-end ; inline
 
 : final-sigma ( string -- string )
-    HEX: 3A3 over member? [ sigma-map ] when ;
+    CHAR: greek-capital-letter-sigma
+    over member? [ sigma-map ] when
+    "" like ; inline
+
+:: map-case ( string string-quot char-quot -- case )
+    string length <sbuf> :> out
+    string [
+        dup special-casing at
+        [ string-quot call out push-all ]
+        [ char-quot call out push ] ?if
+    ] each out "" like ; inline
 
-: map-case ( string string-quot char-quot -- case )
-    [
-        [
-            [ dup special-casing at ] 2dip
-            [ [ % ] compose ] [ [ , ] compose ] bi* ?if
-        ] 2curry each
-    ] "" make ; inline
+PRIVATE>
 
 : >lower ( string -- lower )
-    i-dot? [ turk>lower ] when
-    final-sigma [ lower>> ] [ ch>lower ] map-case ;
+    i-dot? [ turk>lower ] when final-sigma
+    [ lower>> ] [ ch>lower ] map-case ;
+
+HINTS: >lower string ;
 
 : >upper ( string -- upper )
     i-dot? [ turk>upper ] when
     [ upper>> ] [ ch>upper ] map-case ;
 
+HINTS: >upper string ;
+
+<PRIVATE
+
+: (>title) ( string -- title )
+    i-dot? [ turk>upper ] when
+    [ title>> ] [ ch>title ] map-case ; inline
+
+: title-word ( string -- title )
+    unclip 1string [ >lower ] [ (>title) ] bi* prepend ; inline
+
+PRIVATE>
+
 : >title ( string -- title )
-    final-sigma
-    CHAR: \s swap
-    [ tuck word-boundary swapd
-        [ title>> ] [ lower>> ] if ]
-    [ tuck word-boundary swapd 
-        [ ch>title ] [ ch>lower ] if ]
-    map-case nip ;
+    final-sigma >words [ title-word ] map concat ;
+
+HINTS: >title string ;
 
 : >case-fold ( string -- fold )
     >upper >lower ;
diff --git a/basis/unicode/categories/categories-docs.factor b/basis/unicode/categories/categories-docs.factor
new file mode 100644 (file)
index 0000000..b0870e2
--- /dev/null
@@ -0,0 +1,59 @@
+! Copyright (C) 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax kernel ;
+IN: unicode.categories
+
+HELP: LETTER
+{ $class-description "The class of upper cased letters." } ;
+
+HELP: Letter
+{ $class-description "The class of letters." } ;
+
+HELP: alpha
+{ $class-description "The class of alphanumeric characters." } ;
+
+HELP: blank
+{ $class-description "The class of whitespace characters." } ;
+
+HELP: character
+{ $class-description "The class of pre-defined Unicode code points." } ;
+
+HELP: control
+{ $class-description "The class of control characters." } ;
+
+HELP: digit
+{ $class-description "The class of digits." } ;
+
+HELP: letter
+{ $class-description "The class of lower-cased letters." } ;
+
+HELP: printable
+{ $class-description "The class of characters which are printable, as opposed to being control or formatting characters." } ;
+
+HELP: uncased
+{ $class-description "The class of letters which don't have a case." } ;
+
+ARTICLE: "unicode.categories" "Character classes"
+"The " { $vocab-link "unicode.categories" } " vocabulary implements predicates for determining if a code point has a particular property, for example being a lower cased letter. These should be used in preference to the " { $vocab-link "ascii" } " equivalents in most cases. Each character class has an associated predicate word."
+{ $subsection blank }
+{ $subsection blank? }
+{ $subsection letter }
+{ $subsection letter? }
+{ $subsection LETTER }
+{ $subsection LETTER? }
+{ $subsection Letter }
+{ $subsection Letter? }
+{ $subsection digit }
+{ $subsection digit? } 
+{ $subsection printable }
+{ $subsection printable? }
+{ $subsection alpha }
+{ $subsection alpha? }
+{ $subsection control }
+{ $subsection control? }
+{ $subsection uncased }
+{ $subsection uncased? }
+{ $subsection character }
+{ $subsection character? } ;
+
+ABOUT: "unicode.categories"
index 3847ca2237cf7dea21b7aec928ad22f40e69a1ac..990390e82fbe060b9681506b632195f0b1f54f40 100644 (file)
@@ -1,25 +1,26 @@
-USING: help.syntax help.markup strings byte-arrays ;
+USING: help.syntax help.markup strings byte-arrays math.order ;
 IN: unicode.collation
 
-ABOUT: "unicode.collation"
-
-ARTICLE: "unicode.collation" "Unicode collation algorithm (UCA)"
-"The Unicode Collation Algorithm (UTS #10) forms a reasonable way to sort strings when accouting for all of the characters in Unicode. At the moment, only the default Unicode collation element table (DUCET) is used, but a more accurate collation would take locale into account. The following words are defined:"
+ARTICLE: "unicode.collation" "Collation and weak comparison"
+"The " { $vocab-link "unicode.collation" "unicode.collation" } " vocabulary implements the Unicode Collation Algorithm. The Unicode Collation Algorithm (UTS #10) forms a reasonable way to sort strings when accouting for all of the characters in Unicode. It is far preferred over code point order when sorting for human consumption, in user interfaces. At the moment, only the default Unicode collation element table (DUCET) is used, but a more accurate collation would take locale into account. The following words are useful for collation directly:"
 { $subsection sort-strings }
 { $subsection collation-key }
 { $subsection string<=> }
+"Predicates for weak equality testing:"
 { $subsection primary= }
 { $subsection secondary= }
 { $subsection tertiary= }
 { $subsection quaternary= } ;
 
+ABOUT: "unicode.collation"
+
 HELP: sort-strings
-{ $values { "strings" "a sequence of strings" } { "sorted" "the strings in DUCET order" } }
-{ $description "This word takes a sequence of strings and sorts them according to the UCA, using code point order as a tie-breaker." } ;
+{ $values { "strings" "a sequence of strings" } { "sorted" "the strings in lexicographical order" } }
+{ $description "This word takes a sequence of strings and sorts them according to the Unicode Collation Algorithm with the default collation order described in the DUCET. It uses code point order as a tie-breaker." } ;
 
 HELP: collation-key
 { $values { "string" string } { "key" byte-array } }
-{ $description "This takes a string and gives a representation of the collation key, which can be compared with <=>" } ;
+{ $description "This takes a string and gives a representation of the collation key, which can be compared with " { $link <=> } ". The representation is according to the DUCET." } ;
 
 HELP: string<=>
 { $values { "str1" string } { "str2" string } { "<=>" "one of +lt+, +gt+ or +eq+" } }
@@ -27,16 +28,16 @@ HELP: string<=>
 
 HELP: primary=
 { $values { "str1" string } { "str2" string } { "?" "t or f" } }
-{ $description "This checks whether the first level of collation is identical. This is the least specific kind of equality test. In Latin script, it can be understood as ignoring case, punctuation and accent marks." } ;
+{ $description "This checks whether the first level of collation key is identical. This is the least specific kind of equality test. In Latin script, it can be understood as ignoring case, punctuation, whitespace and accent marks." } ;
 
 HELP: secondary=
 { $values { "str1" string } { "str2" string } { "?" "t or f" } }
-{ $description "This checks whether the first two levels of collation are equal. For Latin script, this means accent marks are significant again, and it is otherwise similar to primary=." } ;
+{ $description "This checks whether the first two levels of collation key are equal. For Latin script, this means accent marks are significant again, and it is otherwise similar to " { $link primary= } "." } ;
 
 HELP: tertiary=
 { $values { "str1" string } { "str2" string } { "?" "t or f" } }
-{ $description "Along the same lines as secondary=, but case is significant." } ;
+{ $description "This checks if the first three levels of collation key are equal. For Latin-based scripts, it can be understood as testing for what " { $link secondary= } " tests for, but case is significant." } ;
 
 HELP: quaternary=
 { $values { "str1" string } { "str2" string } { "?" "t or f" } }
-{ $description "This is similar to tertiary= but it makes punctuation significant again, while still leaving out things like null bytes and Hebrew vowel marks, which mean absolutely nothing in collation." } ;
+{ $description "This checks if the first four levels of collation key are equal. This is similar to " { $link tertiary= } " but it makes punctuation significant again, while still leaving out things like null bytes and Hebrew vowel marks, which mean absolutely nothing in collation." } ;
index be6af2d9207cab624a592765fe4fb5b44e6701e4..d3d0b8199d5f3b1eee0757b6c17d98f4e24fa47c 100644 (file)
@@ -1,6 +1,6 @@
 USING: io io.files splitting grouping unicode.collation\r
 sequences kernel io.encodings.utf8 math.parser math.order\r
-tools.test assocs io.streams.null words ;\r
+tools.test assocs words ;\r
 IN: unicode.collation.tests\r
 \r
 : parse-test ( -- strings )\r
@@ -25,4 +25,4 @@ IN: unicode.collation.tests
 unit-test\r
 \r
 parse-test 2 <clumps>\r
-[ [ test-two ] assoc-each ] with-null-writer\r
+[ test-two ] assoc-each\r
index 90b280ee09f5697968059c069c0bc27fb619a71c..69a8c314f6d8afbd25810fda16c1b61f8b2e4486 100644 (file)
@@ -5,7 +5,7 @@ io.encodings.ascii kernel values splitting accessors math.parser
 ascii io assocs strings math namespaces make sorting combinators\r
 math.order arrays unicode.normalize unicode.data locals\r
 unicode.syntax macros sequences.deep words unicode.breaks\r
-quotations ;\r
+quotations combinators.short-circuit ;\r
 IN: unicode.collation\r
 \r
 <PRIVATE\r
@@ -71,12 +71,12 @@ ducet insert-helpers
     building get empty? [ 0 ] [ building get peek peek ] if ;\r
 \r
 : blocked? ( char -- ? )\r
-    combining-class [\r
-        last combining-class =\r
-    ] [ last combining-class ] if* ;\r
+    combining-class dup { 0 f } member?\r
+    [ drop last non-starter? ]\r
+    [ last combining-class = ] if ;\r
 \r
 : possible-bases ( -- slice-of-building )\r
-    building get dup [ first combining-class not ] find-last\r
+    building get dup [ first non-starter? not ] find-last\r
     drop [ 0 ] unless* tail-slice ;\r
 \r
 :: ?combine ( char slice i -- ? )\r
@@ -125,7 +125,7 @@ PRIVATE>
 \r
 : filter-ignorable ( weights -- weights' )\r
     f swap [\r
-        tuck primary>> zero? and\r
+        [ nip ] [ primary>> zero? and ] 2bi\r
         [ swap ignorable?>> or ]\r
         [ swap completely-ignorable? or not ] 2bi\r
     ] filter nip ;\r
diff --git a/basis/unicode/data/CompositionExclusions.txt b/basis/unicode/data/CompositionExclusions.txt
new file mode 100644 (file)
index 0000000..d4428fc
--- /dev/null
@@ -0,0 +1,197 @@
+# CompositionExclusions-5.1.0.txt
+# Date: 2008-03-20, 17:45:00 PDT [KW]
+#
+# This file lists the characters for the Composition Exclusion Table
+# defined in UAX #15, Unicode Normalization Forms.
+#
+# This file is a normative contributory data file in the
+# Unicode Character Database.
+#
+# Copyright (c) 1991-2008 Unicode, Inc.
+# For terms of use, see http://www.unicode.org/terms_of_use.html
+#
+# For more information, see
+# http://www.unicode.org/unicode/reports/tr15/#Primary Exclusion List Table
+#
+# For a full derivation of composition exclusions, see the derived property
+# Full_Composition_Exclusion in DerivedNormalizationProps.txt
+#
+
+# ================================================
+# (1) Script Specifics
+#
+# This list of characters cannot be derived from the UnicodeData.txt file.
+# ================================================
+
+0958    #  DEVANAGARI LETTER QA
+0959    #  DEVANAGARI LETTER KHHA
+095A    #  DEVANAGARI LETTER GHHA
+095B    #  DEVANAGARI LETTER ZA
+095C    #  DEVANAGARI LETTER DDDHA
+095D    #  DEVANAGARI LETTER RHA
+095E    #  DEVANAGARI LETTER FA
+095F    #  DEVANAGARI LETTER YYA
+09DC    #  BENGALI LETTER RRA
+09DD    #  BENGALI LETTER RHA
+09DF    #  BENGALI LETTER YYA
+0A33    #  GURMUKHI LETTER LLA
+0A36    #  GURMUKHI LETTER SHA
+0A59    #  GURMUKHI LETTER KHHA
+0A5A    #  GURMUKHI LETTER GHHA
+0A5B    #  GURMUKHI LETTER ZA
+0A5E    #  GURMUKHI LETTER FA
+0B5C    #  ORIYA LETTER RRA
+0B5D    #  ORIYA LETTER RHA
+0F43    #  TIBETAN LETTER GHA
+0F4D    #  TIBETAN LETTER DDHA
+0F52    #  TIBETAN LETTER DHA
+0F57    #  TIBETAN LETTER BHA
+0F5C    #  TIBETAN LETTER DZHA
+0F69    #  TIBETAN LETTER KSSA
+0F76    #  TIBETAN VOWEL SIGN VOCALIC R
+0F78    #  TIBETAN VOWEL SIGN VOCALIC L
+0F93    #  TIBETAN SUBJOINED LETTER GHA
+0F9D    #  TIBETAN SUBJOINED LETTER DDHA
+0FA2    #  TIBETAN SUBJOINED LETTER DHA
+0FA7    #  TIBETAN SUBJOINED LETTER BHA
+0FAC    #  TIBETAN SUBJOINED LETTER DZHA
+0FB9    #  TIBETAN SUBJOINED LETTER KSSA
+FB1D    #  HEBREW LETTER YOD WITH HIRIQ
+FB1F    #  HEBREW LIGATURE YIDDISH YOD YOD PATAH
+FB2A    #  HEBREW LETTER SHIN WITH SHIN DOT
+FB2B    #  HEBREW LETTER SHIN WITH SIN DOT
+FB2C    #  HEBREW LETTER SHIN WITH DAGESH AND SHIN DOT
+FB2D    #  HEBREW LETTER SHIN WITH DAGESH AND SIN DOT
+FB2E    #  HEBREW LETTER ALEF WITH PATAH
+FB2F    #  HEBREW LETTER ALEF WITH QAMATS
+FB30    #  HEBREW LETTER ALEF WITH MAPIQ
+FB31    #  HEBREW LETTER BET WITH DAGESH
+FB32    #  HEBREW LETTER GIMEL WITH DAGESH
+FB33    #  HEBREW LETTER DALET WITH DAGESH
+FB34    #  HEBREW LETTER HE WITH MAPIQ
+FB35    #  HEBREW LETTER VAV WITH DAGESH
+FB36    #  HEBREW LETTER ZAYIN WITH DAGESH
+FB38    #  HEBREW LETTER TET WITH DAGESH
+FB39    #  HEBREW LETTER YOD WITH DAGESH
+FB3A    #  HEBREW LETTER FINAL KAF WITH DAGESH
+FB3B    #  HEBREW LETTER KAF WITH DAGESH
+FB3C    #  HEBREW LETTER LAMED WITH DAGESH
+FB3E    #  HEBREW LETTER MEM WITH DAGESH
+FB40    #  HEBREW LETTER NUN WITH DAGESH
+FB41    #  HEBREW LETTER SAMEKH WITH DAGESH
+FB43    #  HEBREW LETTER FINAL PE WITH DAGESH
+FB44    #  HEBREW LETTER PE WITH DAGESH
+FB46    #  HEBREW LETTER TSADI WITH DAGESH
+FB47    #  HEBREW LETTER QOF WITH DAGESH
+FB48    #  HEBREW LETTER RESH WITH DAGESH
+FB49    #  HEBREW LETTER SHIN WITH DAGESH
+FB4A    #  HEBREW LETTER TAV WITH DAGESH
+FB4B    #  HEBREW LETTER VAV WITH HOLAM
+FB4C    #  HEBREW LETTER BET WITH RAFE
+FB4D    #  HEBREW LETTER KAF WITH RAFE
+FB4E    #  HEBREW LETTER PE WITH RAFE
+
+# Total code points: 67
+
+# ================================================
+# (2) Post Composition Version precomposed characters
+#
+# These characters cannot be derived solely from the UnicodeData.txt file
+# in this version of Unicode.
+#
+# Note that characters added to the standard after the
+# Composition Version and which have canonical decomposition mappings
+# are not automatically added to this list of Post Composition
+# Version precomposed characters.
+# ================================================
+
+2ADC    #  FORKING
+1D15E   #  MUSICAL SYMBOL HALF NOTE
+1D15F   #  MUSICAL SYMBOL QUARTER NOTE
+1D160   #  MUSICAL SYMBOL EIGHTH NOTE
+1D161   #  MUSICAL SYMBOL SIXTEENTH NOTE
+1D162   #  MUSICAL SYMBOL THIRTY-SECOND NOTE
+1D163   #  MUSICAL SYMBOL SIXTY-FOURTH NOTE
+1D164   #  MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE
+1D1BB   #  MUSICAL SYMBOL MINIMA
+1D1BC   #  MUSICAL SYMBOL MINIMA BLACK
+1D1BD   #  MUSICAL SYMBOL SEMIMINIMA WHITE
+1D1BE   #  MUSICAL SYMBOL SEMIMINIMA BLACK
+1D1BF   #  MUSICAL SYMBOL FUSA WHITE
+1D1C0   #  MUSICAL SYMBOL FUSA BLACK
+
+# Total code points: 14
+
+# ================================================
+# (3) Singleton Decompositions
+#
+# These characters can be derived from the UnicodeData.txt file
+# by including all characters whose canonical decomposition
+# consists of a single character.
+#
+# These characters are simply quoted here for reference.
+# See also Full_Composition_Exclusion in DerivedNormalizationProps.txt
+# ================================================
+
+# 0340..0341       [2] COMBINING GRAVE TONE MARK..COMBINING ACUTE TONE MARK
+# 0343                 COMBINING GREEK KORONIS
+# 0374                 GREEK NUMERAL SIGN
+# 037E                 GREEK QUESTION MARK
+# 0387                 GREEK ANO TELEIA
+# 1F71                 GREEK SMALL LETTER ALPHA WITH OXIA
+# 1F73                 GREEK SMALL LETTER EPSILON WITH OXIA
+# 1F75                 GREEK SMALL LETTER ETA WITH OXIA
+# 1F77                 GREEK SMALL LETTER IOTA WITH OXIA
+# 1F79                 GREEK SMALL LETTER OMICRON WITH OXIA
+# 1F7B                 GREEK SMALL LETTER UPSILON WITH OXIA
+# 1F7D                 GREEK SMALL LETTER OMEGA WITH OXIA
+# 1FBB                 GREEK CAPITAL LETTER ALPHA WITH OXIA
+# 1FBE                 GREEK PROSGEGRAMMENI
+# 1FC9                 GREEK CAPITAL LETTER EPSILON WITH OXIA
+# 1FCB                 GREEK CAPITAL LETTER ETA WITH OXIA
+# 1FD3                 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
+# 1FDB                 GREEK CAPITAL LETTER IOTA WITH OXIA
+# 1FE3                 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA
+# 1FEB                 GREEK CAPITAL LETTER UPSILON WITH OXIA
+# 1FEE..1FEF       [2] GREEK DIALYTIKA AND OXIA..GREEK VARIA
+# 1FF9                 GREEK CAPITAL LETTER OMICRON WITH OXIA
+# 1FFB                 GREEK CAPITAL LETTER OMEGA WITH OXIA
+# 1FFD                 GREEK OXIA
+# 2000..2001       [2] EN QUAD..EM QUAD
+# 2126                 OHM SIGN
+# 212A..212B       [2] KELVIN SIGN..ANGSTROM SIGN
+# 2329                 LEFT-POINTING ANGLE BRACKET
+# 232A                 RIGHT-POINTING ANGLE BRACKET
+# F900..FA0D     [270] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA0D
+# FA10                 CJK COMPATIBILITY IDEOGRAPH-FA10
+# FA12                 CJK COMPATIBILITY IDEOGRAPH-FA12
+# FA15..FA1E      [10] CJK COMPATIBILITY IDEOGRAPH-FA15..CJK COMPATIBILITY IDEOGRAPH-FA1E
+# FA20                 CJK COMPATIBILITY IDEOGRAPH-FA20
+# FA22                 CJK COMPATIBILITY IDEOGRAPH-FA22
+# FA25..FA26       [2] CJK COMPATIBILITY IDEOGRAPH-FA25..CJK COMPATIBILITY IDEOGRAPH-FA26
+# FA2A..FA2D       [4] CJK COMPATIBILITY IDEOGRAPH-FA2A..CJK COMPATIBILITY IDEOGRAPH-FA2D
+# FA30..FA6A      [59] CJK COMPATIBILITY IDEOGRAPH-FA30..CJK COMPATIBILITY IDEOGRAPH-FA6A
+# FA70..FAD9     [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9
+# 2F800..2FA1D   [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
+
+# Total code points: 1030
+
+# ================================================
+# (4) Non-Starter Decompositions
+#
+# These characters can be derived from the UnicodeData file
+# by including all characters whose canonical decomposition consists
+# of a sequence of characters, the first of which has a non-zero
+# combining class.
+#
+# These characters are simply quoted here for reference.
+# See also Full_Composition_Exclusion in DerivedNormalizationProps.txt
+# ================================================
+
+# 0344                 COMBINING GREEK DIALYTIKA TONOS
+# 0F73                 TIBETAN VOWEL SIGN II
+# 0F75                 TIBETAN VOWEL SIGN UU
+# 0F81                 TIBETAN VOWEL SIGN REVERSED II
+
+# Total code points: 4
+
diff --git a/basis/unicode/data/WordBreakProperty.txt b/basis/unicode/data/WordBreakProperty.txt
new file mode 100644 (file)
index 0000000..2768f72
--- /dev/null
@@ -0,0 +1,816 @@
+# WordBreakProperty-5.1.0.txt
+# Date: 2008-03-20, 17:55:36 GMT [MD]
+#
+# Unicode Character Database
+# Copyright (c) 1991-2008 Unicode, Inc.
+# For terms of use, see http://www.unicode.org/terms_of_use.html
+# For documentation, see UCD.html
+
+# ================================================
+
+# Property:    Word_Break
+
+#  All code points not explicitly listed for Word_Break
+#  have the value Other (XX).
+
+# @missing: 0000..10FFFF; Other
+
+# ================================================
+
+000D          ; CR # Cc       <control-000D>
+
+# Total code points: 1
+
+# ================================================
+
+000A          ; LF # Cc       <control-000A>
+
+# Total code points: 1
+
+# ================================================
+
+000B..000C    ; Newline # Cc   [2] <control-000B>..<control-000C>
+0085          ; Newline # Cc       <control-0085>
+2028          ; Newline # Zl       LINE SEPARATOR
+2029          ; Newline # Zp       PARAGRAPH SEPARATOR
+
+# Total code points: 5
+
+# ================================================
+
+0300..036F    ; Extend # Mn [112] COMBINING GRAVE ACCENT..COMBINING LATIN SMALL LETTER X
+0483..0487    ; Extend # Mn   [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE
+0488..0489    ; Extend # Me   [2] COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN
+0591..05BD    ; Extend # Mn  [45] HEBREW ACCENT ETNAHTA..HEBREW POINT METEG
+05BF          ; Extend # Mn       HEBREW POINT RAFE
+05C1..05C2    ; Extend # Mn   [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT
+05C4..05C5    ; Extend # Mn   [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT
+05C7          ; Extend # Mn       HEBREW POINT QAMATS QATAN
+0610..061A    ; Extend # Mn  [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA
+064B..065E    ; Extend # Mn  [20] ARABIC FATHATAN..ARABIC FATHA WITH TWO DOTS
+0670          ; Extend # Mn       ARABIC LETTER SUPERSCRIPT ALEF
+06D6..06DC    ; Extend # Mn   [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN
+06DE          ; Extend # Me       ARABIC START OF RUB EL HIZB
+06DF..06E4    ; Extend # Mn   [6] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA
+06E7..06E8    ; Extend # Mn   [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON
+06EA..06ED    ; Extend # Mn   [4] ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM
+0711          ; Extend # Mn       SYRIAC LETTER SUPERSCRIPT ALAPH
+0730..074A    ; Extend # Mn  [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH
+07A6..07B0    ; Extend # Mn  [11] THAANA ABAFILI..THAANA SUKUN
+07EB..07F3    ; Extend # Mn   [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE
+0901..0902    ; Extend # Mn   [2] DEVANAGARI SIGN CANDRABINDU..DEVANAGARI SIGN ANUSVARA
+0903          ; Extend # Mc       DEVANAGARI SIGN VISARGA
+093C          ; Extend # Mn       DEVANAGARI SIGN NUKTA
+093E..0940    ; Extend # Mc   [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II
+0941..0948    ; Extend # Mn   [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI
+0949..094C    ; Extend # Mc   [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU
+094D          ; Extend # Mn       DEVANAGARI SIGN VIRAMA
+0951..0954    ; Extend # Mn   [4] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI ACUTE ACCENT
+0962..0963    ; Extend # Mn   [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL
+0981          ; Extend # Mn       BENGALI SIGN CANDRABINDU
+0982..0983    ; Extend # Mc   [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA
+09BC          ; Extend # Mn       BENGALI SIGN NUKTA
+09BE..09C0    ; Extend # Mc   [3] BENGALI VOWEL SIGN AA..BENGALI VOWEL SIGN II
+09C1..09C4    ; Extend # Mn   [4] BENGALI VOWEL SIGN U..BENGALI VOWEL SIGN VOCALIC RR
+09C7..09C8    ; Extend # Mc   [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI
+09CB..09CC    ; Extend # Mc   [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU
+09CD          ; Extend # Mn       BENGALI SIGN VIRAMA
+09D7          ; Extend # Mc       BENGALI AU LENGTH MARK
+09E2..09E3    ; Extend # Mn   [2] BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL
+0A01..0A02    ; Extend # Mn   [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI
+0A03          ; Extend # Mc       GURMUKHI SIGN VISARGA
+0A3C          ; Extend # Mn       GURMUKHI SIGN NUKTA
+0A3E..0A40    ; Extend # Mc   [3] GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN II
+0A41..0A42    ; Extend # Mn   [2] GURMUKHI VOWEL SIGN U..GURMUKHI VOWEL SIGN UU
+0A47..0A48    ; Extend # Mn   [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI
+0A4B..0A4D    ; Extend # Mn   [3] GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA
+0A51          ; Extend # Mn       GURMUKHI SIGN UDAAT
+0A70..0A71    ; Extend # Mn   [2] GURMUKHI TIPPI..GURMUKHI ADDAK
+0A75          ; Extend # Mn       GURMUKHI SIGN YAKASH
+0A81..0A82    ; Extend # Mn   [2] GUJARATI SIGN CANDRABINDU..GUJARATI SIGN ANUSVARA
+0A83          ; Extend # Mc       GUJARATI SIGN VISARGA
+0ABC          ; Extend # Mn       GUJARATI SIGN NUKTA
+0ABE..0AC0    ; Extend # Mc   [3] GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN II
+0AC1..0AC5    ; Extend # Mn   [5] GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E
+0AC7..0AC8    ; Extend # Mn   [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI
+0AC9          ; Extend # Mc       GUJARATI VOWEL SIGN CANDRA O
+0ACB..0ACC    ; Extend # Mc   [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU
+0ACD          ; Extend # Mn       GUJARATI SIGN VIRAMA
+0AE2..0AE3    ; Extend # Mn   [2] GUJARATI VOWEL SIGN VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL
+0B01          ; Extend # Mn       ORIYA SIGN CANDRABINDU
+0B02..0B03    ; Extend # Mc   [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA
+0B3C          ; Extend # Mn       ORIYA SIGN NUKTA
+0B3E          ; Extend # Mc       ORIYA VOWEL SIGN AA
+0B3F          ; Extend # Mn       ORIYA VOWEL SIGN I
+0B40          ; Extend # Mc       ORIYA VOWEL SIGN II
+0B41..0B44    ; Extend # Mn   [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR
+0B47..0B48    ; Extend # Mc   [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI
+0B4B..0B4C    ; Extend # Mc   [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU
+0B4D          ; Extend # Mn       ORIYA SIGN VIRAMA
+0B56          ; Extend # Mn       ORIYA AI LENGTH MARK
+0B57          ; Extend # Mc       ORIYA AU LENGTH MARK
+0B62..0B63    ; Extend # Mn   [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL
+0B82          ; Extend # Mn       TAMIL SIGN ANUSVARA
+0BBE..0BBF    ; Extend # Mc   [2] TAMIL VOWEL SIGN AA..TAMIL VOWEL SIGN I
+0BC0          ; Extend # Mn       TAMIL VOWEL SIGN II
+0BC1..0BC2    ; Extend # Mc   [2] TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU
+0BC6..0BC8    ; Extend # Mc   [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI
+0BCA..0BCC    ; Extend # Mc   [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU
+0BCD          ; Extend # Mn       TAMIL SIGN VIRAMA
+0BD7          ; Extend # Mc       TAMIL AU LENGTH MARK
+0C01..0C03    ; Extend # Mc   [3] TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA
+0C3E..0C40    ; Extend # Mn   [3] TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN II
+0C41..0C44    ; Extend # Mc   [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR
+0C46..0C48    ; Extend # Mn   [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI
+0C4A..0C4D    ; Extend # Mn   [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA
+0C55..0C56    ; Extend # Mn   [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK
+0C62..0C63    ; Extend # Mn   [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL
+0C82..0C83    ; Extend # Mc   [2] KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA
+0CBC          ; Extend # Mn       KANNADA SIGN NUKTA
+0CBE          ; Extend # Mc       KANNADA VOWEL SIGN AA
+0CBF          ; Extend # Mn       KANNADA VOWEL SIGN I
+0CC0..0CC4    ; Extend # Mc   [5] KANNADA VOWEL SIGN II..KANNADA VOWEL SIGN VOCALIC RR
+0CC6          ; Extend # Mn       KANNADA VOWEL SIGN E
+0CC7..0CC8    ; Extend # Mc   [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI
+0CCA..0CCB    ; Extend # Mc   [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO
+0CCC..0CCD    ; Extend # Mn   [2] KANNADA VOWEL SIGN AU..KANNADA SIGN VIRAMA
+0CD5..0CD6    ; Extend # Mc   [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK
+0CE2..0CE3    ; Extend # Mn   [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL
+0D02..0D03    ; Extend # Mc   [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA
+0D3E..0D40    ; Extend # Mc   [3] MALAYALAM VOWEL SIGN AA..MALAYALAM VOWEL SIGN II
+0D41..0D44    ; Extend # Mn   [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR
+0D46..0D48    ; Extend # Mc   [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI
+0D4A..0D4C    ; Extend # Mc   [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU
+0D4D          ; Extend # Mn       MALAYALAM SIGN VIRAMA
+0D57          ; Extend # Mc       MALAYALAM AU LENGTH MARK
+0D62..0D63    ; Extend # Mn   [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL
+0D82..0D83    ; Extend # Mc   [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA
+0DCA          ; Extend # Mn       SINHALA SIGN AL-LAKUNA
+0DCF..0DD1    ; Extend # Mc   [3] SINHALA VOWEL SIGN AELA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA
+0DD2..0DD4    ; Extend # Mn   [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA
+0DD6          ; Extend # Mn       SINHALA VOWEL SIGN DIGA PAA-PILLA
+0DD8..0DDF    ; Extend # Mc   [8] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN GAYANUKITTA
+0DF2..0DF3    ; Extend # Mc   [2] SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA
+0E31          ; Extend # Mn       THAI CHARACTER MAI HAN-AKAT
+0E34..0E3A    ; Extend # Mn   [7] THAI CHARACTER SARA I..THAI CHARACTER PHINTHU
+0E47..0E4E    ; Extend # Mn   [8] THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN
+0EB1          ; Extend # Mn       LAO VOWEL SIGN MAI KAN
+0EB4..0EB9    ; Extend # Mn   [6] LAO VOWEL SIGN I..LAO VOWEL SIGN UU
+0EBB..0EBC    ; Extend # Mn   [2] LAO VOWEL SIGN MAI KON..LAO SEMIVOWEL SIGN LO
+0EC8..0ECD    ; Extend # Mn   [6] LAO TONE MAI EK..LAO NIGGAHITA
+0F18..0F19    ; Extend # Mn   [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS
+0F35          ; Extend # Mn       TIBETAN MARK NGAS BZUNG NYI ZLA
+0F37          ; Extend # Mn       TIBETAN MARK NGAS BZUNG SGOR RTAGS
+0F39          ; Extend # Mn       TIBETAN MARK TSA -PHRU
+0F3E..0F3F    ; Extend # Mc   [2] TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES
+0F71..0F7E    ; Extend # Mn  [14] TIBETAN VOWEL SIGN AA..TIBETAN SIGN RJES SU NGA RO
+0F7F          ; Extend # Mc       TIBETAN SIGN RNAM BCAD
+0F80..0F84    ; Extend # Mn   [5] TIBETAN VOWEL SIGN REVERSED I..TIBETAN MARK HALANTA
+0F86..0F87    ; Extend # Mn   [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS
+0F90..0F97    ; Extend # Mn   [8] TIBETAN SUBJOINED LETTER KA..TIBETAN SUBJOINED LETTER JA
+0F99..0FBC    ; Extend # Mn  [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA
+0FC6          ; Extend # Mn       TIBETAN SYMBOL PADMA GDAN
+102B..102C    ; Extend # Mc   [2] MYANMAR VOWEL SIGN TALL AA..MYANMAR VOWEL SIGN AA
+102D..1030    ; Extend # Mn   [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU
+1031          ; Extend # Mc       MYANMAR VOWEL SIGN E
+1032..1037    ; Extend # Mn   [6] MYANMAR VOWEL SIGN AI..MYANMAR SIGN DOT BELOW
+1038          ; Extend # Mc       MYANMAR SIGN VISARGA
+1039..103A    ; Extend # Mn   [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT
+103B..103C    ; Extend # Mc   [2] MYANMAR CONSONANT SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA
+103D..103E    ; Extend # Mn   [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT SIGN MEDIAL HA
+1056..1057    ; Extend # Mc   [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC RR
+1058..1059    ; Extend # Mn   [2] MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL
+105E..1060    ; Extend # Mn   [3] MYANMAR CONSONANT SIGN MON MEDIAL NA..MYANMAR CONSONANT SIGN MON MEDIAL LA
+1062..1064    ; Extend # Mc   [3] MYANMAR VOWEL SIGN SGAW KAREN EU..MYANMAR TONE MARK SGAW KAREN KE PHO
+1067..106D    ; Extend # Mc   [7] MYANMAR VOWEL SIGN WESTERN PWO KAREN EU..MYANMAR SIGN WESTERN PWO KAREN TONE-5
+1071..1074    ; Extend # Mn   [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN KAYAH EE
+1082          ; Extend # Mn       MYANMAR CONSONANT SIGN SHAN MEDIAL WA
+1083..1084    ; Extend # Mc   [2] MYANMAR VOWEL SIGN SHAN AA..MYANMAR VOWEL SIGN SHAN E
+1085..1086    ; Extend # Mn   [2] MYANMAR VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y
+1087..108C    ; Extend # Mc   [6] MYANMAR SIGN SHAN TONE-2..MYANMAR SIGN SHAN COUNCIL TONE-3
+108D          ; Extend # Mn       MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE
+108F          ; Extend # Mc       MYANMAR SIGN RUMAI PALAUNG TONE-5
+135F          ; Extend # Mn       ETHIOPIC COMBINING GEMINATION MARK
+1712..1714    ; Extend # Mn   [3] TAGALOG VOWEL SIGN I..TAGALOG SIGN VIRAMA
+1732..1734    ; Extend # Mn   [3] HANUNOO VOWEL SIGN I..HANUNOO SIGN PAMUDPOD
+1752..1753    ; Extend # Mn   [2] BUHID VOWEL SIGN I..BUHID VOWEL SIGN U
+1772..1773    ; Extend # Mn   [2] TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U
+17B6          ; Extend # Mc       KHMER VOWEL SIGN AA
+17B7..17BD    ; Extend # Mn   [7] KHMER VOWEL SIGN I..KHMER VOWEL SIGN UA
+17BE..17C5    ; Extend # Mc   [8] KHMER VOWEL SIGN OE..KHMER VOWEL SIGN AU
+17C6          ; Extend # Mn       KHMER SIGN NIKAHIT
+17C7..17C8    ; Extend # Mc   [2] KHMER SIGN REAHMUK..KHMER SIGN YUUKALEAPINTU
+17C9..17D3    ; Extend # Mn  [11] KHMER SIGN MUUSIKATOAN..KHMER SIGN BATHAMASAT
+17DD          ; Extend # Mn       KHMER SIGN ATTHACAN
+180B..180D    ; Extend # Mn   [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE
+18A9          ; Extend # Mn       MONGOLIAN LETTER ALI GALI DAGALGA
+1920..1922    ; Extend # Mn   [3] LIMBU VOWEL SIGN A..LIMBU VOWEL SIGN U
+1923..1926    ; Extend # Mc   [4] LIMBU VOWEL SIGN EE..LIMBU VOWEL SIGN AU
+1927..1928    ; Extend # Mn   [2] LIMBU VOWEL SIGN E..LIMBU VOWEL SIGN O
+1929..192B    ; Extend # Mc   [3] LIMBU SUBJOINED LETTER YA..LIMBU SUBJOINED LETTER WA
+1930..1931    ; Extend # Mc   [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA
+1932          ; Extend # Mn       LIMBU SMALL LETTER ANUSVARA
+1933..1938    ; Extend # Mc   [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA
+1939..193B    ; Extend # Mn   [3] LIMBU SIGN MUKPHRENG..LIMBU SIGN SA-I
+19B0..19C0    ; Extend # Mc  [17] NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW TAI LUE VOWEL SIGN IY
+19C8..19C9    ; Extend # Mc   [2] NEW TAI LUE TONE MARK-1..NEW TAI LUE TONE MARK-2
+1A17..1A18    ; Extend # Mn   [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U
+1A19..1A1B    ; Extend # Mc   [3] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN AE
+1B00..1B03    ; Extend # Mn   [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG
+1B04          ; Extend # Mc       BALINESE SIGN BISAH
+1B34          ; Extend # Mn       BALINESE SIGN REREKAN
+1B35          ; Extend # Mc       BALINESE VOWEL SIGN TEDUNG
+1B36..1B3A    ; Extend # Mn   [5] BALINESE VOWEL SIGN ULU..BALINESE VOWEL SIGN RA REPA
+1B3B          ; Extend # Mc       BALINESE VOWEL SIGN RA REPA TEDUNG
+1B3C          ; Extend # Mn       BALINESE VOWEL SIGN LA LENGA
+1B3D..1B41    ; Extend # Mc   [5] BALINESE VOWEL SIGN LA LENGA TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG
+1B42          ; Extend # Mn       BALINESE VOWEL SIGN PEPET
+1B43..1B44    ; Extend # Mc   [2] BALINESE VOWEL SIGN PEPET TEDUNG..BALINESE ADEG ADEG
+1B6B..1B73    ; Extend # Mn   [9] BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING GONG
+1B80..1B81    ; Extend # Mn   [2] SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PANGLAYAR
+1B82          ; Extend # Mc       SUNDANESE SIGN PANGWISAD
+1BA1          ; Extend # Mc       SUNDANESE CONSONANT SIGN PAMINGKAL
+1BA2..1BA5    ; Extend # Mn   [4] SUNDANESE CONSONANT SIGN PANYAKRA..SUNDANESE VOWEL SIGN PANYUKU
+1BA6..1BA7    ; Extend # Mc   [2] SUNDANESE VOWEL SIGN PANAELAENG..SUNDANESE VOWEL SIGN PANOLONG
+1BA8..1BA9    ; Extend # Mn   [2] SUNDANESE VOWEL SIGN PAMEPET..SUNDANESE VOWEL SIGN PANEULEUNG
+1BAA          ; Extend # Mc       SUNDANESE SIGN PAMAAEH
+1C24..1C2B    ; Extend # Mc   [8] LEPCHA SUBJOINED LETTER YA..LEPCHA VOWEL SIGN UU
+1C2C..1C33    ; Extend # Mn   [8] LEPCHA VOWEL SIGN E..LEPCHA CONSONANT SIGN T
+1C34..1C35    ; Extend # Mc   [2] LEPCHA CONSONANT SIGN NYIN-DO..LEPCHA CONSONANT SIGN KANG
+1C36..1C37    ; Extend # Mn   [2] LEPCHA SIGN RAN..LEPCHA SIGN NUKTA
+1DC0..1DE6    ; Extend # Mn  [39] COMBINING DOTTED GRAVE ACCENT..COMBINING LATIN SMALL LETTER Z
+1DFE..1DFF    ; Extend # Mn   [2] COMBINING LEFT ARROWHEAD ABOVE..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW
+200C..200D    ; Extend # Cf   [2] ZERO WIDTH NON-JOINER..ZERO WIDTH JOINER
+20D0..20DC    ; Extend # Mn  [13] COMBINING LEFT HARPOON ABOVE..COMBINING FOUR DOTS ABOVE
+20DD..20E0    ; Extend # Me   [4] COMBINING ENCLOSING CIRCLE..COMBINING ENCLOSING CIRCLE BACKSLASH
+20E1          ; Extend # Mn       COMBINING LEFT RIGHT ARROW ABOVE
+20E2..20E4    ; Extend # Me   [3] COMBINING ENCLOSING SCREEN..COMBINING ENCLOSING UPWARD POINTING TRIANGLE
+20E5..20F0    ; Extend # Mn  [12] COMBINING REVERSE SOLIDUS OVERLAY..COMBINING ASTERISK ABOVE
+2DE0..2DFF    ; Extend # Mn  [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS
+302A..302F    ; Extend # Mn   [6] IDEOGRAPHIC LEVEL TONE MARK..HANGUL DOUBLE DOT TONE MARK
+3099..309A    ; Extend # Mn   [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+A66F          ; Extend # Mn       COMBINING CYRILLIC VZMET
+A670..A672    ; Extend # Me   [3] COMBINING CYRILLIC TEN MILLIONS SIGN..COMBINING CYRILLIC THOUSAND MILLIONS SIGN
+A67C..A67D    ; Extend # Mn   [2] COMBINING CYRILLIC KAVYKA..COMBINING CYRILLIC PAYEROK
+A802          ; Extend # Mn       SYLOTI NAGRI SIGN DVISVARA
+A806          ; Extend # Mn       SYLOTI NAGRI SIGN HASANTA
+A80B          ; Extend # Mn       SYLOTI NAGRI SIGN ANUSVARA
+A823..A824    ; Extend # Mc   [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I
+A825..A826    ; Extend # Mn   [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E
+A827          ; Extend # Mc       SYLOTI NAGRI VOWEL SIGN OO
+A880..A881    ; Extend # Mc   [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA
+A8B4..A8C3    ; Extend # Mc  [16] SAURASHTRA CONSONANT SIGN HAARU..SAURASHTRA VOWEL SIGN AU
+A8C4          ; Extend # Mn       SAURASHTRA SIGN VIRAMA
+A926..A92D    ; Extend # Mn   [8] KAYAH LI VOWEL UE..KAYAH LI TONE CALYA PLOPHU
+A947..A951    ; Extend # Mn  [11] REJANG VOWEL SIGN I..REJANG CONSONANT SIGN R
+A952..A953    ; Extend # Mc   [2] REJANG CONSONANT SIGN H..REJANG VIRAMA
+AA29..AA2E    ; Extend # Mn   [6] CHAM VOWEL SIGN AA..CHAM VOWEL SIGN OE
+AA2F..AA30    ; Extend # Mc   [2] CHAM VOWEL SIGN O..CHAM VOWEL SIGN AI
+AA31..AA32    ; Extend # Mn   [2] CHAM VOWEL SIGN AU..CHAM VOWEL SIGN UE
+AA33..AA34    ; Extend # Mc   [2] CHAM CONSONANT SIGN YA..CHAM CONSONANT SIGN RA
+AA35..AA36    ; Extend # Mn   [2] CHAM CONSONANT SIGN LA..CHAM CONSONANT SIGN WA
+AA43          ; Extend # Mn       CHAM CONSONANT SIGN FINAL NG
+AA4C          ; Extend # Mn       CHAM CONSONANT SIGN FINAL M
+AA4D          ; Extend # Mc       CHAM CONSONANT SIGN FINAL H
+FB1E          ; Extend # Mn       HEBREW POINT JUDEO-SPANISH VARIKA
+FE00..FE0F    ; Extend # Mn  [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16
+FE20..FE26    ; Extend # Mn   [7] COMBINING LIGATURE LEFT HALF..COMBINING CONJOINING MACRON
+FF9E..FF9F    ; Extend # Lm   [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
+101FD         ; Extend # Mn       PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE
+10A01..10A03  ; Extend # Mn   [3] KHAROSHTHI VOWEL SIGN I..KHAROSHTHI VOWEL SIGN VOCALIC R
+10A05..10A06  ; Extend # Mn   [2] KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O
+10A0C..10A0F  ; Extend # Mn   [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN VISARGA
+10A38..10A3A  ; Extend # Mn   [3] KHAROSHTHI SIGN BAR ABOVE..KHAROSHTHI SIGN DOT BELOW
+10A3F         ; Extend # Mn       KHAROSHTHI VIRAMA
+1D165..1D166  ; Extend # Mc   [2] MUSICAL SYMBOL COMBINING STEM..MUSICAL SYMBOL COMBINING SPRECHGESANG STEM
+1D167..1D169  ; Extend # Mn   [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3
+1D16D..1D172  ; Extend # Mc   [6] MUSICAL SYMBOL COMBINING AUGMENTATION DOT..MUSICAL SYMBOL COMBINING FLAG-5
+1D17B..1D182  ; Extend # Mn   [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL COMBINING LOURE
+1D185..1D18B  ; Extend # Mn   [7] MUSICAL SYMBOL COMBINING DOIT..MUSICAL SYMBOL COMBINING TRIPLE TONGUE
+1D1AA..1D1AD  ; Extend # Mn   [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO
+1D242..1D244  ; Extend # Mn   [3] COMBINING GREEK MUSICAL TRISEME..COMBINING GREEK MUSICAL PENTASEME
+E0100..E01EF  ; Extend # Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256
+
+# Total code points: 1285
+
+# ================================================
+
+00AD          ; Format # Cf       SOFT HYPHEN
+0600..0603    ; Format # Cf   [4] ARABIC NUMBER SIGN..ARABIC SIGN SAFHA
+06DD          ; Format # Cf       ARABIC END OF AYAH
+070F          ; Format # Cf       SYRIAC ABBREVIATION MARK
+17B4..17B5    ; Format # Cf   [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA
+200B          ; Format # Cf       ZERO WIDTH SPACE
+200E..200F    ; Format # Cf   [2] LEFT-TO-RIGHT MARK..RIGHT-TO-LEFT MARK
+202A..202E    ; Format # Cf   [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE
+2060..2064    ; Format # Cf   [5] WORD JOINER..INVISIBLE PLUS
+206A..206F    ; Format # Cf   [6] INHIBIT SYMMETRIC SWAPPING..NOMINAL DIGIT SHAPES
+FEFF          ; Format # Cf       ZERO WIDTH NO-BREAK SPACE
+FFF9..FFFB    ; Format # Cf   [3] INTERLINEAR ANNOTATION ANCHOR..INTERLINEAR ANNOTATION TERMINATOR
+1D173..1D17A  ; Format # Cf   [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE
+E0001         ; Format # Cf       LANGUAGE TAG
+E0020..E007F  ; Format # Cf  [96] TAG SPACE..CANCEL TAG
+
+# Total code points: 137
+
+# ================================================
+
+3031..3035    ; Katakana # Lm   [5] VERTICAL KANA REPEAT MARK..VERTICAL KANA REPEAT MARK LOWER HALF
+309B..309C    ; Katakana # Sk   [2] KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+30A0          ; Katakana # Pd       KATAKANA-HIRAGANA DOUBLE HYPHEN
+30A1..30FA    ; Katakana # Lo  [90] KATAKANA LETTER SMALL A..KATAKANA LETTER VO
+30FC..30FE    ; Katakana # Lm   [3] KATAKANA-HIRAGANA PROLONGED SOUND MARK..KATAKANA VOICED ITERATION MARK
+30FF          ; Katakana # Lo       KATAKANA DIGRAPH KOTO
+31F0..31FF    ; Katakana # Lo  [16] KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO
+32D0..32FE    ; Katakana # So  [47] CIRCLED KATAKANA A..CIRCLED KATAKANA WO
+3300..3357    ; Katakana # So  [88] SQUARE APAATO..SQUARE WATTO
+FF66..FF6F    ; Katakana # Lo  [10] HALFWIDTH KATAKANA LETTER WO..HALFWIDTH KATAKANA LETTER SMALL TU
+FF70          ; Katakana # Lm       HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK
+FF71..FF9D    ; Katakana # Lo  [45] HALFWIDTH KATAKANA LETTER A..HALFWIDTH KATAKANA LETTER N
+
+# Total code points: 309
+
+# ================================================
+
+0041..005A    ; ALetter # L&  [26] LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z
+0061..007A    ; ALetter # L&  [26] LATIN SMALL LETTER A..LATIN SMALL LETTER Z
+00AA          ; ALetter # L&       FEMININE ORDINAL INDICATOR
+00B5          ; ALetter # L&       MICRO SIGN
+00BA          ; ALetter # L&       MASCULINE ORDINAL INDICATOR
+00C0..00D6    ; ALetter # L&  [23] LATIN CAPITAL LETTER A WITH GRAVE..LATIN CAPITAL LETTER O WITH DIAERESIS
+00D8..00F6    ; ALetter # L&  [31] LATIN CAPITAL LETTER O WITH STROKE..LATIN SMALL LETTER O WITH DIAERESIS
+00F8..01BA    ; ALetter # L& [195] LATIN SMALL LETTER O WITH STROKE..LATIN SMALL LETTER EZH WITH TAIL
+01BB          ; ALetter # Lo       LATIN LETTER TWO WITH STROKE
+01BC..01BF    ; ALetter # L&   [4] LATIN CAPITAL LETTER TONE FIVE..LATIN LETTER WYNN
+01C0..01C3    ; ALetter # Lo   [4] LATIN LETTER DENTAL CLICK..LATIN LETTER RETROFLEX CLICK
+01C4..0293    ; ALetter # L& [208] LATIN CAPITAL LETTER DZ WITH CARON..LATIN SMALL LETTER EZH WITH CURL
+0294          ; ALetter # Lo       LATIN LETTER GLOTTAL STOP
+0295..02AF    ; ALetter # L&  [27] LATIN LETTER PHARYNGEAL VOICED FRICATIVE..LATIN SMALL LETTER TURNED H WITH FISHHOOK AND TAIL
+02B0..02C1    ; ALetter # Lm  [18] MODIFIER LETTER SMALL H..MODIFIER LETTER REVERSED GLOTTAL STOP
+02C6..02D1    ; ALetter # Lm  [12] MODIFIER LETTER CIRCUMFLEX ACCENT..MODIFIER LETTER HALF TRIANGULAR COLON
+02E0..02E4    ; ALetter # Lm   [5] MODIFIER LETTER SMALL GAMMA..MODIFIER LETTER SMALL REVERSED GLOTTAL STOP
+02EC          ; ALetter # Lm       MODIFIER LETTER VOICING
+02EE          ; ALetter # Lm       MODIFIER LETTER DOUBLE APOSTROPHE
+0370..0373    ; ALetter # L&   [4] GREEK CAPITAL LETTER HETA..GREEK SMALL LETTER ARCHAIC SAMPI
+0374          ; ALetter # Lm       GREEK NUMERAL SIGN
+0376..0377    ; ALetter # L&   [2] GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA..GREEK SMALL LETTER PAMPHYLIAN DIGAMMA
+037A          ; ALetter # Lm       GREEK YPOGEGRAMMENI
+037B..037D    ; ALetter # L&   [3] GREEK SMALL REVERSED LUNATE SIGMA SYMBOL..GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL
+0386          ; ALetter # L&       GREEK CAPITAL LETTER ALPHA WITH TONOS
+0388..038A    ; ALetter # L&   [3] GREEK CAPITAL LETTER EPSILON WITH TONOS..GREEK CAPITAL LETTER IOTA WITH TONOS
+038C          ; ALetter # L&       GREEK CAPITAL LETTER OMICRON WITH TONOS
+038E..03A1    ; ALetter # L&  [20] GREEK CAPITAL LETTER UPSILON WITH TONOS..GREEK CAPITAL LETTER RHO
+03A3..03F5    ; ALetter # L&  [83] GREEK CAPITAL LETTER SIGMA..GREEK LUNATE EPSILON SYMBOL
+03F7..0481    ; ALetter # L& [139] GREEK CAPITAL LETTER SHO..CYRILLIC SMALL LETTER KOPPA
+048A..0523    ; ALetter # L& [154] CYRILLIC CAPITAL LETTER SHORT I WITH TAIL..CYRILLIC SMALL LETTER EN WITH MIDDLE HOOK
+0531..0556    ; ALetter # L&  [38] ARMENIAN CAPITAL LETTER AYB..ARMENIAN CAPITAL LETTER FEH
+0559          ; ALetter # Lm       ARMENIAN MODIFIER LETTER LEFT HALF RING
+0561..0587    ; ALetter # L&  [39] ARMENIAN SMALL LETTER AYB..ARMENIAN SMALL LIGATURE ECH YIWN
+05D0..05EA    ; ALetter # Lo  [27] HEBREW LETTER ALEF..HEBREW LETTER TAV
+05F0..05F2    ; ALetter # Lo   [3] HEBREW LIGATURE YIDDISH DOUBLE VAV..HEBREW LIGATURE YIDDISH DOUBLE YOD
+05F3          ; ALetter # Po       HEBREW PUNCTUATION GERESH
+0621..063F    ; ALetter # Lo  [31] ARABIC LETTER HAMZA..ARABIC LETTER FARSI YEH WITH THREE DOTS ABOVE
+0640          ; ALetter # Lm       ARABIC TATWEEL
+0641..064A    ; ALetter # Lo  [10] ARABIC LETTER FEH..ARABIC LETTER YEH
+066E..066F    ; ALetter # Lo   [2] ARABIC LETTER DOTLESS BEH..ARABIC LETTER DOTLESS QAF
+0671..06D3    ; ALetter # Lo  [99] ARABIC LETTER ALEF WASLA..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE
+06D5          ; ALetter # Lo       ARABIC LETTER AE
+06E5..06E6    ; ALetter # Lm   [2] ARABIC SMALL WAW..ARABIC SMALL YEH
+06EE..06EF    ; ALetter # Lo   [2] ARABIC LETTER DAL WITH INVERTED V..ARABIC LETTER REH WITH INVERTED V
+06FA..06FC    ; ALetter # Lo   [3] ARABIC LETTER SHEEN WITH DOT BELOW..ARABIC LETTER GHAIN WITH DOT BELOW
+06FF          ; ALetter # Lo       ARABIC LETTER HEH WITH INVERTED V
+0710          ; ALetter # Lo       SYRIAC LETTER ALAPH
+0712..072F    ; ALetter # Lo  [30] SYRIAC LETTER BETH..SYRIAC LETTER PERSIAN DHALATH
+074D..07A5    ; ALetter # Lo  [89] SYRIAC LETTER SOGDIAN ZHAIN..THAANA LETTER WAAVU
+07B1          ; ALetter # Lo       THAANA LETTER NAA
+07CA..07EA    ; ALetter # Lo  [33] NKO LETTER A..NKO LETTER JONA RA
+07F4..07F5    ; ALetter # Lm   [2] NKO HIGH TONE APOSTROPHE..NKO LOW TONE APOSTROPHE
+07FA          ; ALetter # Lm       NKO LAJANYALAN
+0904..0939    ; ALetter # Lo  [54] DEVANAGARI LETTER SHORT A..DEVANAGARI LETTER HA
+093D          ; ALetter # Lo       DEVANAGARI SIGN AVAGRAHA
+0950          ; ALetter # Lo       DEVANAGARI OM
+0958..0961    ; ALetter # Lo  [10] DEVANAGARI LETTER QA..DEVANAGARI LETTER VOCALIC LL
+0971          ; ALetter # Lm       DEVANAGARI SIGN HIGH SPACING DOT
+0972          ; ALetter # Lo       DEVANAGARI LETTER CANDRA A
+097B..097F    ; ALetter # Lo   [5] DEVANAGARI LETTER GGA..DEVANAGARI LETTER BBA
+0985..098C    ; ALetter # Lo   [8] BENGALI LETTER A..BENGALI LETTER VOCALIC L
+098F..0990    ; ALetter # Lo   [2] BENGALI LETTER E..BENGALI LETTER AI
+0993..09A8    ; ALetter # Lo  [22] BENGALI LETTER O..BENGALI LETTER NA
+09AA..09B0    ; ALetter # Lo   [7] BENGALI LETTER PA..BENGALI LETTER RA
+09B2          ; ALetter # Lo       BENGALI LETTER LA
+09B6..09B9    ; ALetter # Lo   [4] BENGALI LETTER SHA..BENGALI LETTER HA
+09BD          ; ALetter # Lo       BENGALI SIGN AVAGRAHA
+09CE          ; ALetter # Lo       BENGALI LETTER KHANDA TA
+09DC..09DD    ; ALetter # Lo   [2] BENGALI LETTER RRA..BENGALI LETTER RHA
+09DF..09E1    ; ALetter # Lo   [3] BENGALI LETTER YYA..BENGALI LETTER VOCALIC LL
+09F0..09F1    ; ALetter # Lo   [2] BENGALI LETTER RA WITH MIDDLE DIAGONAL..BENGALI LETTER RA WITH LOWER DIAGONAL
+0A05..0A0A    ; ALetter # Lo   [6] GURMUKHI LETTER A..GURMUKHI LETTER UU
+0A0F..0A10    ; ALetter # Lo   [2] GURMUKHI LETTER EE..GURMUKHI LETTER AI
+0A13..0A28    ; ALetter # Lo  [22] GURMUKHI LETTER OO..GURMUKHI LETTER NA
+0A2A..0A30    ; ALetter # Lo   [7] GURMUKHI LETTER PA..GURMUKHI LETTER RA
+0A32..0A33    ; ALetter # Lo   [2] GURMUKHI LETTER LA..GURMUKHI LETTER LLA
+0A35..0A36    ; ALetter # Lo   [2] GURMUKHI LETTER VA..GURMUKHI LETTER SHA
+0A38..0A39    ; ALetter # Lo   [2] GURMUKHI LETTER SA..GURMUKHI LETTER HA
+0A59..0A5C    ; ALetter # Lo   [4] GURMUKHI LETTER KHHA..GURMUKHI LETTER RRA
+0A5E          ; ALetter # Lo       GURMUKHI LETTER FA
+0A72..0A74    ; ALetter # Lo   [3] GURMUKHI IRI..GURMUKHI EK ONKAR
+0A85..0A8D    ; ALetter # Lo   [9] GUJARATI LETTER A..GUJARATI VOWEL CANDRA E
+0A8F..0A91    ; ALetter # Lo   [3] GUJARATI LETTER E..GUJARATI VOWEL CANDRA O
+0A93..0AA8    ; ALetter # Lo  [22] GUJARATI LETTER O..GUJARATI LETTER NA
+0AAA..0AB0    ; ALetter # Lo   [7] GUJARATI LETTER PA..GUJARATI LETTER RA
+0AB2..0AB3    ; ALetter # Lo   [2] GUJARATI LETTER LA..GUJARATI LETTER LLA
+0AB5..0AB9    ; ALetter # Lo   [5] GUJARATI LETTER VA..GUJARATI LETTER HA
+0ABD          ; ALetter # Lo       GUJARATI SIGN AVAGRAHA
+0AD0          ; ALetter # Lo       GUJARATI OM
+0AE0..0AE1    ; ALetter # Lo   [2] GUJARATI LETTER VOCALIC RR..GUJARATI LETTER VOCALIC LL
+0B05..0B0C    ; ALetter # Lo   [8] ORIYA LETTER A..ORIYA LETTER VOCALIC L
+0B0F..0B10    ; ALetter # Lo   [2] ORIYA LETTER E..ORIYA LETTER AI
+0B13..0B28    ; ALetter # Lo  [22] ORIYA LETTER O..ORIYA LETTER NA
+0B2A..0B30    ; ALetter # Lo   [7] ORIYA LETTER PA..ORIYA LETTER RA
+0B32..0B33    ; ALetter # Lo   [2] ORIYA LETTER LA..ORIYA LETTER LLA
+0B35..0B39    ; ALetter # Lo   [5] ORIYA LETTER VA..ORIYA LETTER HA
+0B3D          ; ALetter # Lo       ORIYA SIGN AVAGRAHA
+0B5C..0B5D    ; ALetter # Lo   [2] ORIYA LETTER RRA..ORIYA LETTER RHA
+0B5F..0B61    ; ALetter # Lo   [3] ORIYA LETTER YYA..ORIYA LETTER VOCALIC LL
+0B71          ; ALetter # Lo       ORIYA LETTER WA
+0B83          ; ALetter # Lo       TAMIL SIGN VISARGA
+0B85..0B8A    ; ALetter # Lo   [6] TAMIL LETTER A..TAMIL LETTER UU
+0B8E..0B90    ; ALetter # Lo   [3] TAMIL LETTER E..TAMIL LETTER AI
+0B92..0B95    ; ALetter # Lo   [4] TAMIL LETTER O..TAMIL LETTER KA
+0B99..0B9A    ; ALetter # Lo   [2] TAMIL LETTER NGA..TAMIL LETTER CA
+0B9C          ; ALetter # Lo       TAMIL LETTER JA
+0B9E..0B9F    ; ALetter # Lo   [2] TAMIL LETTER NYA..TAMIL LETTER TTA
+0BA3..0BA4    ; ALetter # Lo   [2] TAMIL LETTER NNA..TAMIL LETTER TA
+0BA8..0BAA    ; ALetter # Lo   [3] TAMIL LETTER NA..TAMIL LETTER PA
+0BAE..0BB9    ; ALetter # Lo  [12] TAMIL LETTER MA..TAMIL LETTER HA
+0BD0          ; ALetter # Lo       TAMIL OM
+0C05..0C0C    ; ALetter # Lo   [8] TELUGU LETTER A..TELUGU LETTER VOCALIC L
+0C0E..0C10    ; ALetter # Lo   [3] TELUGU LETTER E..TELUGU LETTER AI
+0C12..0C28    ; ALetter # Lo  [23] TELUGU LETTER O..TELUGU LETTER NA
+0C2A..0C33    ; ALetter # Lo  [10] TELUGU LETTER PA..TELUGU LETTER LLA
+0C35..0C39    ; ALetter # Lo   [5] TELUGU LETTER VA..TELUGU LETTER HA
+0C3D          ; ALetter # Lo       TELUGU SIGN AVAGRAHA
+0C58..0C59    ; ALetter # Lo   [2] TELUGU LETTER TSA..TELUGU LETTER DZA
+0C60..0C61    ; ALetter # Lo   [2] TELUGU LETTER VOCALIC RR..TELUGU LETTER VOCALIC LL
+0C85..0C8C    ; ALetter # Lo   [8] KANNADA LETTER A..KANNADA LETTER VOCALIC L
+0C8E..0C90    ; ALetter # Lo   [3] KANNADA LETTER E..KANNADA LETTER AI
+0C92..0CA8    ; ALetter # Lo  [23] KANNADA LETTER O..KANNADA LETTER NA
+0CAA..0CB3    ; ALetter # Lo  [10] KANNADA LETTER PA..KANNADA LETTER LLA
+0CB5..0CB9    ; ALetter # Lo   [5] KANNADA LETTER VA..KANNADA LETTER HA
+0CBD          ; ALetter # Lo       KANNADA SIGN AVAGRAHA
+0CDE          ; ALetter # Lo       KANNADA LETTER FA
+0CE0..0CE1    ; ALetter # Lo   [2] KANNADA LETTER VOCALIC RR..KANNADA LETTER VOCALIC LL
+0D05..0D0C    ; ALetter # Lo   [8] MALAYALAM LETTER A..MALAYALAM LETTER VOCALIC L
+0D0E..0D10    ; ALetter # Lo   [3] MALAYALAM LETTER E..MALAYALAM LETTER AI
+0D12..0D28    ; ALetter # Lo  [23] MALAYALAM LETTER O..MALAYALAM LETTER NA
+0D2A..0D39    ; ALetter # Lo  [16] MALAYALAM LETTER PA..MALAYALAM LETTER HA
+0D3D          ; ALetter # Lo       MALAYALAM SIGN AVAGRAHA
+0D60..0D61    ; ALetter # Lo   [2] MALAYALAM LETTER VOCALIC RR..MALAYALAM LETTER VOCALIC LL
+0D7A..0D7F    ; ALetter # Lo   [6] MALAYALAM LETTER CHILLU NN..MALAYALAM LETTER CHILLU K
+0D85..0D96    ; ALetter # Lo  [18] SINHALA LETTER AYANNA..SINHALA LETTER AUYANNA
+0D9A..0DB1    ; ALetter # Lo  [24] SINHALA LETTER ALPAPRAANA KAYANNA..SINHALA LETTER DANTAJA NAYANNA
+0DB3..0DBB    ; ALetter # Lo   [9] SINHALA LETTER SANYAKA DAYANNA..SINHALA LETTER RAYANNA
+0DBD          ; ALetter # Lo       SINHALA LETTER DANTAJA LAYANNA
+0DC0..0DC6    ; ALetter # Lo   [7] SINHALA LETTER VAYANNA..SINHALA LETTER FAYANNA
+0F00          ; ALetter # Lo       TIBETAN SYLLABLE OM
+0F40..0F47    ; ALetter # Lo   [8] TIBETAN LETTER KA..TIBETAN LETTER JA
+0F49..0F6C    ; ALetter # Lo  [36] TIBETAN LETTER NYA..TIBETAN LETTER RRA
+0F88..0F8B    ; ALetter # Lo   [4] TIBETAN SIGN LCE TSA CAN..TIBETAN SIGN GRU MED RGYINGS
+10A0..10C5    ; ALetter # L&  [38] GEORGIAN CAPITAL LETTER AN..GEORGIAN CAPITAL LETTER HOE
+10D0..10FA    ; ALetter # Lo  [43] GEORGIAN LETTER AN..GEORGIAN LETTER AIN
+10FC          ; ALetter # Lm       MODIFIER LETTER GEORGIAN NAR
+1100..1159    ; ALetter # Lo  [90] HANGUL CHOSEONG KIYEOK..HANGUL CHOSEONG YEORINHIEUH
+115F..11A2    ; ALetter # Lo  [68] HANGUL CHOSEONG FILLER..HANGUL JUNGSEONG SSANGARAEA
+11A8..11F9    ; ALetter # Lo  [82] HANGUL JONGSEONG KIYEOK..HANGUL JONGSEONG YEORINHIEUH
+1200..1248    ; ALetter # Lo  [73] ETHIOPIC SYLLABLE HA..ETHIOPIC SYLLABLE QWA
+124A..124D    ; ALetter # Lo   [4] ETHIOPIC SYLLABLE QWI..ETHIOPIC SYLLABLE QWE
+1250..1256    ; ALetter # Lo   [7] ETHIOPIC SYLLABLE QHA..ETHIOPIC SYLLABLE QHO
+1258          ; ALetter # Lo       ETHIOPIC SYLLABLE QHWA
+125A..125D    ; ALetter # Lo   [4] ETHIOPIC SYLLABLE QHWI..ETHIOPIC SYLLABLE QHWE
+1260..1288    ; ALetter # Lo  [41] ETHIOPIC SYLLABLE BA..ETHIOPIC SYLLABLE XWA
+128A..128D    ; ALetter # Lo   [4] ETHIOPIC SYLLABLE XWI..ETHIOPIC SYLLABLE XWE
+1290..12B0    ; ALetter # Lo  [33] ETHIOPIC SYLLABLE NA..ETHIOPIC SYLLABLE KWA
+12B2..12B5    ; ALetter # Lo   [4] ETHIOPIC SYLLABLE KWI..ETHIOPIC SYLLABLE KWE
+12B8..12BE    ; ALetter # Lo   [7] ETHIOPIC SYLLABLE KXA..ETHIOPIC SYLLABLE KXO
+12C0          ; ALetter # Lo       ETHIOPIC SYLLABLE KXWA
+12C2..12C5    ; ALetter # Lo   [4] ETHIOPIC SYLLABLE KXWI..ETHIOPIC SYLLABLE KXWE
+12C8..12D6    ; ALetter # Lo  [15] ETHIOPIC SYLLABLE WA..ETHIOPIC SYLLABLE PHARYNGEAL O
+12D8..1310    ; ALetter # Lo  [57] ETHIOPIC SYLLABLE ZA..ETHIOPIC SYLLABLE GWA
+1312..1315    ; ALetter # Lo   [4] ETHIOPIC SYLLABLE GWI..ETHIOPIC SYLLABLE GWE
+1318..135A    ; ALetter # Lo  [67] ETHIOPIC SYLLABLE GGA..ETHIOPIC SYLLABLE FYA
+1380..138F    ; ALetter # Lo  [16] ETHIOPIC SYLLABLE SEBATBEIT MWA..ETHIOPIC SYLLABLE PWE
+13A0..13F4    ; ALetter # Lo  [85] CHEROKEE LETTER A..CHEROKEE LETTER YV
+1401..166C    ; ALetter # Lo [620] CANADIAN SYLLABICS E..CANADIAN SYLLABICS CARRIER TTSA
+166F..1676    ; ALetter # Lo   [8] CANADIAN SYLLABICS QAI..CANADIAN SYLLABICS NNGAA
+1681..169A    ; ALetter # Lo  [26] OGHAM LETTER BEITH..OGHAM LETTER PEITH
+16A0..16EA    ; ALetter # Lo  [75] RUNIC LETTER FEHU FEOH FE F..RUNIC LETTER X
+16EE..16F0    ; ALetter # Nl   [3] RUNIC ARLAUG SYMBOL..RUNIC BELGTHOR SYMBOL
+1700..170C    ; ALetter # Lo  [13] TAGALOG LETTER A..TAGALOG LETTER YA
+170E..1711    ; ALetter # Lo   [4] TAGALOG LETTER LA..TAGALOG LETTER HA
+1720..1731    ; ALetter # Lo  [18] HANUNOO LETTER A..HANUNOO LETTER HA
+1740..1751    ; ALetter # Lo  [18] BUHID LETTER A..BUHID LETTER HA
+1760..176C    ; ALetter # Lo  [13] TAGBANWA LETTER A..TAGBANWA LETTER YA
+176E..1770    ; ALetter # Lo   [3] TAGBANWA LETTER LA..TAGBANWA LETTER SA
+1820..1842    ; ALetter # Lo  [35] MONGOLIAN LETTER A..MONGOLIAN LETTER CHI
+1843          ; ALetter # Lm       MONGOLIAN LETTER TODO LONG VOWEL SIGN
+1844..1877    ; ALetter # Lo  [52] MONGOLIAN LETTER TODO E..MONGOLIAN LETTER MANCHU ZHA
+1880..18A8    ; ALetter # Lo  [41] MONGOLIAN LETTER ALI GALI ANUSVARA ONE..MONGOLIAN LETTER MANCHU ALI GALI BHA
+18AA          ; ALetter # Lo       MONGOLIAN LETTER MANCHU ALI GALI LHA
+1900..191C    ; ALetter # Lo  [29] LIMBU VOWEL-CARRIER LETTER..LIMBU LETTER HA
+1A00..1A16    ; ALetter # Lo  [23] BUGINESE LETTER KA..BUGINESE LETTER HA
+1B05..1B33    ; ALetter # Lo  [47] BALINESE LETTER AKARA..BALINESE LETTER HA
+1B45..1B4B    ; ALetter # Lo   [7] BALINESE LETTER KAF SASAK..BALINESE LETTER ASYURA SASAK
+1B83..1BA0    ; ALetter # Lo  [30] SUNDANESE LETTER A..SUNDANESE LETTER HA
+1BAE..1BAF    ; ALetter # Lo   [2] SUNDANESE LETTER KHA..SUNDANESE LETTER SYA
+1C00..1C23    ; ALetter # Lo  [36] LEPCHA LETTER KA..LEPCHA LETTER A
+1C4D..1C4F    ; ALetter # Lo   [3] LEPCHA LETTER TTA..LEPCHA LETTER DDA
+1C5A..1C77    ; ALetter # Lo  [30] OL CHIKI LETTER LA..OL CHIKI LETTER OH
+1C78..1C7D    ; ALetter # Lm   [6] OL CHIKI MU TTUDDAG..OL CHIKI AHAD
+1D00..1D2B    ; ALetter # L&  [44] LATIN LETTER SMALL CAPITAL A..CYRILLIC LETTER SMALL CAPITAL EL
+1D2C..1D61    ; ALetter # Lm  [54] MODIFIER LETTER CAPITAL A..MODIFIER LETTER SMALL CHI
+1D62..1D77    ; ALetter # L&  [22] LATIN SUBSCRIPT SMALL LETTER I..LATIN SMALL LETTER TURNED G
+1D78          ; ALetter # Lm       MODIFIER LETTER CYRILLIC EN
+1D79..1D9A    ; ALetter # L&  [34] LATIN SMALL LETTER INSULAR G..LATIN SMALL LETTER EZH WITH RETROFLEX HOOK
+1D9B..1DBF    ; ALetter # Lm  [37] MODIFIER LETTER SMALL TURNED ALPHA..MODIFIER LETTER SMALL THETA
+1E00..1F15    ; ALetter # L& [278] LATIN CAPITAL LETTER A WITH RING BELOW..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA
+1F18..1F1D    ; ALetter # L&   [6] GREEK CAPITAL LETTER EPSILON WITH PSILI..GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA
+1F20..1F45    ; ALetter # L&  [38] GREEK SMALL LETTER ETA WITH PSILI..GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA
+1F48..1F4D    ; ALetter # L&   [6] GREEK CAPITAL LETTER OMICRON WITH PSILI..GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA
+1F50..1F57    ; ALetter # L&   [8] GREEK SMALL LETTER UPSILON WITH PSILI..GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI
+1F59          ; ALetter # L&       GREEK CAPITAL LETTER UPSILON WITH DASIA
+1F5B          ; ALetter # L&       GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA
+1F5D          ; ALetter # L&       GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA
+1F5F..1F7D    ; ALetter # L&  [31] GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI..GREEK SMALL LETTER OMEGA WITH OXIA
+1F80..1FB4    ; ALetter # L&  [53] GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI
+1FB6..1FBC    ; ALetter # L&   [7] GREEK SMALL LETTER ALPHA WITH PERISPOMENI..GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI
+1FBE          ; ALetter # L&       GREEK PROSGEGRAMMENI
+1FC2..1FC4    ; ALetter # L&   [3] GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI
+1FC6..1FCC    ; ALetter # L&   [7] GREEK SMALL LETTER ETA WITH PERISPOMENI..GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI
+1FD0..1FD3    ; ALetter # L&   [4] GREEK SMALL LETTER IOTA WITH VRACHY..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
+1FD6..1FDB    ; ALetter # L&   [6] GREEK SMALL LETTER IOTA WITH PERISPOMENI..GREEK CAPITAL LETTER IOTA WITH OXIA
+1FE0..1FEC    ; ALetter # L&  [13] GREEK SMALL LETTER UPSILON WITH VRACHY..GREEK CAPITAL LETTER RHO WITH DASIA
+1FF2..1FF4    ; ALetter # L&   [3] GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI
+1FF6..1FFC    ; ALetter # L&   [7] GREEK SMALL LETTER OMEGA WITH PERISPOMENI..GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI
+2071          ; ALetter # L&       SUPERSCRIPT LATIN SMALL LETTER I
+207F          ; ALetter # L&       SUPERSCRIPT LATIN SMALL LETTER N
+2090..2094    ; ALetter # Lm   [5] LATIN SUBSCRIPT SMALL LETTER A..LATIN SUBSCRIPT SMALL LETTER SCHWA
+2102          ; ALetter # L&       DOUBLE-STRUCK CAPITAL C
+2107          ; ALetter # L&       EULER CONSTANT
+210A..2113    ; ALetter # L&  [10] SCRIPT SMALL G..SCRIPT SMALL L
+2115          ; ALetter # L&       DOUBLE-STRUCK CAPITAL N
+2119..211D    ; ALetter # L&   [5] DOUBLE-STRUCK CAPITAL P..DOUBLE-STRUCK CAPITAL R
+2124          ; ALetter # L&       DOUBLE-STRUCK CAPITAL Z
+2126          ; ALetter # L&       OHM SIGN
+2128          ; ALetter # L&       BLACK-LETTER CAPITAL Z
+212A..212D    ; ALetter # L&   [4] KELVIN SIGN..BLACK-LETTER CAPITAL C
+212F..2134    ; ALetter # L&   [6] SCRIPT SMALL E..SCRIPT SMALL O
+2135..2138    ; ALetter # Lo   [4] ALEF SYMBOL..DALET SYMBOL
+2139          ; ALetter # L&       INFORMATION SOURCE
+213C..213F    ; ALetter # L&   [4] DOUBLE-STRUCK SMALL PI..DOUBLE-STRUCK CAPITAL PI
+2145..2149    ; ALetter # L&   [5] DOUBLE-STRUCK ITALIC CAPITAL D..DOUBLE-STRUCK ITALIC SMALL J
+214E          ; ALetter # L&       TURNED SMALL F
+2160..2182    ; ALetter # Nl  [35] ROMAN NUMERAL ONE..ROMAN NUMERAL TEN THOUSAND
+2183..2184    ; ALetter # L&   [2] ROMAN NUMERAL REVERSED ONE HUNDRED..LATIN SMALL LETTER REVERSED C
+2185..2188    ; ALetter # Nl   [4] ROMAN NUMERAL SIX LATE FORM..ROMAN NUMERAL ONE HUNDRED THOUSAND
+24B6..24E9    ; ALetter # So  [52] CIRCLED LATIN CAPITAL LETTER A..CIRCLED LATIN SMALL LETTER Z
+2C00..2C2E    ; ALetter # L&  [47] GLAGOLITIC CAPITAL LETTER AZU..GLAGOLITIC CAPITAL LETTER LATINATE MYSLITE
+2C30..2C5E    ; ALetter # L&  [47] GLAGOLITIC SMALL LETTER AZU..GLAGOLITIC SMALL LETTER LATINATE MYSLITE
+2C60..2C6F    ; ALetter # L&  [16] LATIN CAPITAL LETTER L WITH DOUBLE BAR..LATIN CAPITAL LETTER TURNED A
+2C71..2C7C    ; ALetter # L&  [12] LATIN SMALL LETTER V WITH RIGHT HOOK..LATIN SUBSCRIPT SMALL LETTER J
+2C7D          ; ALetter # Lm       MODIFIER LETTER CAPITAL V
+2C80..2CE4    ; ALetter # L& [101] COPTIC CAPITAL LETTER ALFA..COPTIC SYMBOL KAI
+2D00..2D25    ; ALetter # L&  [38] GEORGIAN SMALL LETTER AN..GEORGIAN SMALL LETTER HOE
+2D30..2D65    ; ALetter # Lo  [54] TIFINAGH LETTER YA..TIFINAGH LETTER YAZZ
+2D6F          ; ALetter # Lm       TIFINAGH MODIFIER LETTER LABIALIZATION MARK
+2D80..2D96    ; ALetter # Lo  [23] ETHIOPIC SYLLABLE LOA..ETHIOPIC SYLLABLE GGWE
+2DA0..2DA6    ; ALetter # Lo   [7] ETHIOPIC SYLLABLE SSA..ETHIOPIC SYLLABLE SSO
+2DA8..2DAE    ; ALetter # Lo   [7] ETHIOPIC SYLLABLE CCA..ETHIOPIC SYLLABLE CCO
+2DB0..2DB6    ; ALetter # Lo   [7] ETHIOPIC SYLLABLE ZZA..ETHIOPIC SYLLABLE ZZO
+2DB8..2DBE    ; ALetter # Lo   [7] ETHIOPIC SYLLABLE CCHA..ETHIOPIC SYLLABLE CCHO
+2DC0..2DC6    ; ALetter # Lo   [7] ETHIOPIC SYLLABLE QYA..ETHIOPIC SYLLABLE QYO
+2DC8..2DCE    ; ALetter # Lo   [7] ETHIOPIC SYLLABLE KYA..ETHIOPIC SYLLABLE KYO
+2DD0..2DD6    ; ALetter # Lo   [7] ETHIOPIC SYLLABLE XYA..ETHIOPIC SYLLABLE XYO
+2DD8..2DDE    ; ALetter # Lo   [7] ETHIOPIC SYLLABLE GYA..ETHIOPIC SYLLABLE GYO
+2E2F          ; ALetter # Lm       VERTICAL TILDE
+3005          ; ALetter # Lm       IDEOGRAPHIC ITERATION MARK
+303B          ; ALetter # Lm       VERTICAL IDEOGRAPHIC ITERATION MARK
+303C          ; ALetter # Lo       MASU MARK
+3105..312D    ; ALetter # Lo  [41] BOPOMOFO LETTER B..BOPOMOFO LETTER IH
+3131..318E    ; ALetter # Lo  [94] HANGUL LETTER KIYEOK..HANGUL LETTER ARAEAE
+31A0..31B7    ; ALetter # Lo  [24] BOPOMOFO LETTER BU..BOPOMOFO FINAL LETTER H
+A000..A014    ; ALetter # Lo  [21] YI SYLLABLE IT..YI SYLLABLE E
+A015          ; ALetter # Lm       YI SYLLABLE WU
+A016..A48C    ; ALetter # Lo [1143] YI SYLLABLE BIT..YI SYLLABLE YYR
+A500..A60B    ; ALetter # Lo [268] VAI SYLLABLE EE..VAI SYLLABLE NG
+A60C          ; ALetter # Lm       VAI SYLLABLE LENGTHENER
+A610..A61F    ; ALetter # Lo  [16] VAI SYLLABLE NDOLE FA..VAI SYMBOL JONG
+A62A..A62B    ; ALetter # Lo   [2] VAI SYLLABLE NDOLE MA..VAI SYLLABLE NDOLE DO
+A640..A65F    ; ALetter # L&  [32] CYRILLIC CAPITAL LETTER ZEMLYA..CYRILLIC SMALL LETTER YN
+A662..A66D    ; ALetter # L&  [12] CYRILLIC CAPITAL LETTER SOFT DE..CYRILLIC SMALL LETTER DOUBLE MONOCULAR O
+A66E          ; ALetter # Lo       CYRILLIC LETTER MULTIOCULAR O
+A67F          ; ALetter # Lm       CYRILLIC PAYEROK
+A680..A697    ; ALetter # L&  [24] CYRILLIC CAPITAL LETTER DWE..CYRILLIC SMALL LETTER SHWE
+A717..A71F    ; ALetter # Lm   [9] MODIFIER LETTER DOT VERTICAL BAR..MODIFIER LETTER LOW INVERTED EXCLAMATION MARK
+A722..A76F    ; ALetter # L&  [78] LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF..LATIN SMALL LETTER CON
+A770          ; ALetter # Lm       MODIFIER LETTER US
+A771..A787    ; ALetter # L&  [23] LATIN SMALL LETTER DUM..LATIN SMALL LETTER INSULAR T
+A788          ; ALetter # Lm       MODIFIER LETTER LOW CIRCUMFLEX ACCENT
+A78B..A78C    ; ALetter # L&   [2] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER SALTILLO
+A7FB..A801    ; ALetter # Lo   [7] LATIN EPIGRAPHIC LETTER REVERSED F..SYLOTI NAGRI LETTER I
+A803..A805    ; ALetter # Lo   [3] SYLOTI NAGRI LETTER U..SYLOTI NAGRI LETTER O
+A807..A80A    ; ALetter # Lo   [4] SYLOTI NAGRI LETTER KO..SYLOTI NAGRI LETTER GHO
+A80C..A822    ; ALetter # Lo  [23] SYLOTI NAGRI LETTER CO..SYLOTI NAGRI LETTER HO
+A840..A873    ; ALetter # Lo  [52] PHAGS-PA LETTER KA..PHAGS-PA LETTER CANDRABINDU
+A882..A8B3    ; ALetter # Lo  [50] SAURASHTRA LETTER A..SAURASHTRA LETTER LLA
+A90A..A925    ; ALetter # Lo  [28] KAYAH LI LETTER KA..KAYAH LI LETTER OO
+A930..A946    ; ALetter # Lo  [23] REJANG LETTER KA..REJANG LETTER A
+AA00..AA28    ; ALetter # Lo  [41] CHAM LETTER A..CHAM LETTER HA
+AA40..AA42    ; ALetter # Lo   [3] CHAM LETTER FINAL K..CHAM LETTER FINAL NG
+AA44..AA4B    ; ALetter # Lo   [8] CHAM LETTER FINAL CH..CHAM LETTER FINAL SS
+AC00..D7A3    ; ALetter # Lo [11172] HANGUL SYLLABLE GA..HANGUL SYLLABLE HIH
+FB00..FB06    ; ALetter # L&   [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST
+FB13..FB17    ; ALetter # L&   [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH
+FB1D          ; ALetter # Lo       HEBREW LETTER YOD WITH HIRIQ
+FB1F..FB28    ; ALetter # Lo  [10] HEBREW LIGATURE YIDDISH YOD YOD PATAH..HEBREW LETTER WIDE TAV
+FB2A..FB36    ; ALetter # Lo  [13] HEBREW LETTER SHIN WITH SHIN DOT..HEBREW LETTER ZAYIN WITH DAGESH
+FB38..FB3C    ; ALetter # Lo   [5] HEBREW LETTER TET WITH DAGESH..HEBREW LETTER LAMED WITH DAGESH
+FB3E          ; ALetter # Lo       HEBREW LETTER MEM WITH DAGESH
+FB40..FB41    ; ALetter # Lo   [2] HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER SAMEKH WITH DAGESH
+FB43..FB44    ; ALetter # Lo   [2] HEBREW LETTER FINAL PE WITH DAGESH..HEBREW LETTER PE WITH DAGESH
+FB46..FBB1    ; ALetter # Lo [108] HEBREW LETTER TSADI WITH DAGESH..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM
+FBD3..FD3D    ; ALetter # Lo [363] ARABIC LETTER NG ISOLATED FORM..ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM
+FD50..FD8F    ; ALetter # Lo  [64] ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM..ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM
+FD92..FDC7    ; ALetter # Lo  [54] ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM..ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM
+FDF0..FDFB    ; ALetter # Lo  [12] ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM..ARABIC LIGATURE JALLAJALALOUHOU
+FE70..FE74    ; ALetter # Lo   [5] ARABIC FATHATAN ISOLATED FORM..ARABIC KASRATAN ISOLATED FORM
+FE76..FEFC    ; ALetter # Lo [135] ARABIC FATHA ISOLATED FORM..ARABIC LIGATURE LAM WITH ALEF FINAL FORM
+FF21..FF3A    ; ALetter # L&  [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z
+FF41..FF5A    ; ALetter # L&  [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER Z
+FFA0..FFBE    ; ALetter # Lo  [31] HALFWIDTH HANGUL FILLER..HALFWIDTH HANGUL LETTER HIEUH
+FFC2..FFC7    ; ALetter # Lo   [6] HALFWIDTH HANGUL LETTER A..HALFWIDTH HANGUL LETTER E
+FFCA..FFCF    ; ALetter # Lo   [6] HALFWIDTH HANGUL LETTER YEO..HALFWIDTH HANGUL LETTER OE
+FFD2..FFD7    ; ALetter # Lo   [6] HALFWIDTH HANGUL LETTER YO..HALFWIDTH HANGUL LETTER YU
+FFDA..FFDC    ; ALetter # Lo   [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL LETTER I
+10000..1000B  ; ALetter # Lo  [12] LINEAR B SYLLABLE B008 A..LINEAR B SYLLABLE B046 JE
+1000D..10026  ; ALetter # Lo  [26] LINEAR B SYLLABLE B036 JO..LINEAR B SYLLABLE B032 QO
+10028..1003A  ; ALetter # Lo  [19] LINEAR B SYLLABLE B060 RA..LINEAR B SYLLABLE B042 WO
+1003C..1003D  ; ALetter # Lo   [2] LINEAR B SYLLABLE B017 ZA..LINEAR B SYLLABLE B074 ZE
+1003F..1004D  ; ALetter # Lo  [15] LINEAR B SYLLABLE B020 ZO..LINEAR B SYLLABLE B091 TWO
+10050..1005D  ; ALetter # Lo  [14] LINEAR B SYMBOL B018..LINEAR B SYMBOL B089
+10080..100FA  ; ALetter # Lo [123] LINEAR B IDEOGRAM B100 MAN..LINEAR B IDEOGRAM VESSEL B305
+10140..10174  ; ALetter # Nl  [53] GREEK ACROPHONIC ATTIC ONE QUARTER..GREEK ACROPHONIC STRATIAN FIFTY MNAS
+10280..1029C  ; ALetter # Lo  [29] LYCIAN LETTER A..LYCIAN LETTER X
+102A0..102D0  ; ALetter # Lo  [49] CARIAN LETTER A..CARIAN LETTER UUU3
+10300..1031E  ; ALetter # Lo  [31] OLD ITALIC LETTER A..OLD ITALIC LETTER UU
+10330..10340  ; ALetter # Lo  [17] GOTHIC LETTER AHSA..GOTHIC LETTER PAIRTHRA
+10341         ; ALetter # Nl       GOTHIC LETTER NINETY
+10342..10349  ; ALetter # Lo   [8] GOTHIC LETTER RAIDA..GOTHIC LETTER OTHAL
+1034A         ; ALetter # Nl       GOTHIC LETTER NINE HUNDRED
+10380..1039D  ; ALetter # Lo  [30] UGARITIC LETTER ALPA..UGARITIC LETTER SSU
+103A0..103C3  ; ALetter # Lo  [36] OLD PERSIAN SIGN A..OLD PERSIAN SIGN HA
+103C8..103CF  ; ALetter # Lo   [8] OLD PERSIAN SIGN AURAMAZDAA..OLD PERSIAN SIGN BUUMISH
+103D1..103D5  ; ALetter # Nl   [5] OLD PERSIAN NUMBER ONE..OLD PERSIAN NUMBER HUNDRED
+10400..1044F  ; ALetter # L&  [80] DESERET CAPITAL LETTER LONG I..DESERET SMALL LETTER EW
+10450..1049D  ; ALetter # Lo  [78] SHAVIAN LETTER PEEP..OSMANYA LETTER OO
+10800..10805  ; ALetter # Lo   [6] CYPRIOT SYLLABLE A..CYPRIOT SYLLABLE JA
+10808         ; ALetter # Lo       CYPRIOT SYLLABLE JO
+1080A..10835  ; ALetter # Lo  [44] CYPRIOT SYLLABLE KA..CYPRIOT SYLLABLE WO
+10837..10838  ; ALetter # Lo   [2] CYPRIOT SYLLABLE XA..CYPRIOT SYLLABLE XE
+1083C         ; ALetter # Lo       CYPRIOT SYLLABLE ZA
+1083F         ; ALetter # Lo       CYPRIOT SYLLABLE ZO
+10900..10915  ; ALetter # Lo  [22] PHOENICIAN LETTER ALF..PHOENICIAN LETTER TAU
+10920..10939  ; ALetter # Lo  [26] LYDIAN LETTER A..LYDIAN LETTER C
+10A00         ; ALetter # Lo       KHAROSHTHI LETTER A
+10A10..10A13  ; ALetter # Lo   [4] KHAROSHTHI LETTER KA..KHAROSHTHI LETTER GHA
+10A15..10A17  ; ALetter # Lo   [3] KHAROSHTHI LETTER CA..KHAROSHTHI LETTER JA
+10A19..10A33  ; ALetter # Lo  [27] KHAROSHTHI LETTER NYA..KHAROSHTHI LETTER TTTHA
+12000..1236E  ; ALetter # Lo [879] CUNEIFORM SIGN A..CUNEIFORM SIGN ZUM
+12400..12462  ; ALetter # Nl  [99] CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN OLD ASSYRIAN ONE QUARTER
+1D400..1D454  ; ALetter # L&  [85] MATHEMATICAL BOLD CAPITAL A..MATHEMATICAL ITALIC SMALL G
+1D456..1D49C  ; ALetter # L&  [71] MATHEMATICAL ITALIC SMALL I..MATHEMATICAL SCRIPT CAPITAL A
+1D49E..1D49F  ; ALetter # L&   [2] MATHEMATICAL SCRIPT CAPITAL C..MATHEMATICAL SCRIPT CAPITAL D
+1D4A2         ; ALetter # L&       MATHEMATICAL SCRIPT CAPITAL G
+1D4A5..1D4A6  ; ALetter # L&   [2] MATHEMATICAL SCRIPT CAPITAL J..MATHEMATICAL SCRIPT CAPITAL K
+1D4A9..1D4AC  ; ALetter # L&   [4] MATHEMATICAL SCRIPT CAPITAL N..MATHEMATICAL SCRIPT CAPITAL Q
+1D4AE..1D4B9  ; ALetter # L&  [12] MATHEMATICAL SCRIPT CAPITAL S..MATHEMATICAL SCRIPT SMALL D
+1D4BB         ; ALetter # L&       MATHEMATICAL SCRIPT SMALL F
+1D4BD..1D4C3  ; ALetter # L&   [7] MATHEMATICAL SCRIPT SMALL H..MATHEMATICAL SCRIPT SMALL N
+1D4C5..1D505  ; ALetter # L&  [65] MATHEMATICAL SCRIPT SMALL P..MATHEMATICAL FRAKTUR CAPITAL B
+1D507..1D50A  ; ALetter # L&   [4] MATHEMATICAL FRAKTUR CAPITAL D..MATHEMATICAL FRAKTUR CAPITAL G
+1D50D..1D514  ; ALetter # L&   [8] MATHEMATICAL FRAKTUR CAPITAL J..MATHEMATICAL FRAKTUR CAPITAL Q
+1D516..1D51C  ; ALetter # L&   [7] MATHEMATICAL FRAKTUR CAPITAL S..MATHEMATICAL FRAKTUR CAPITAL Y
+1D51E..1D539  ; ALetter # L&  [28] MATHEMATICAL FRAKTUR SMALL A..MATHEMATICAL DOUBLE-STRUCK CAPITAL B
+1D53B..1D53E  ; ALetter # L&   [4] MATHEMATICAL DOUBLE-STRUCK CAPITAL D..MATHEMATICAL DOUBLE-STRUCK CAPITAL G
+1D540..1D544  ; ALetter # L&   [5] MATHEMATICAL DOUBLE-STRUCK CAPITAL I..MATHEMATICAL DOUBLE-STRUCK CAPITAL M
+1D546         ; ALetter # L&       MATHEMATICAL DOUBLE-STRUCK CAPITAL O
+1D54A..1D550  ; ALetter # L&   [7] MATHEMATICAL DOUBLE-STRUCK CAPITAL S..MATHEMATICAL DOUBLE-STRUCK CAPITAL Y
+1D552..1D6A5  ; ALetter # L& [340] MATHEMATICAL DOUBLE-STRUCK SMALL A..MATHEMATICAL ITALIC SMALL DOTLESS J
+1D6A8..1D6C0  ; ALetter # L&  [25] MATHEMATICAL BOLD CAPITAL ALPHA..MATHEMATICAL BOLD CAPITAL OMEGA
+1D6C2..1D6DA  ; ALetter # L&  [25] MATHEMATICAL BOLD SMALL ALPHA..MATHEMATICAL BOLD SMALL OMEGA
+1D6DC..1D6FA  ; ALetter # L&  [31] MATHEMATICAL BOLD EPSILON SYMBOL..MATHEMATICAL ITALIC CAPITAL OMEGA
+1D6FC..1D714  ; ALetter # L&  [25] MATHEMATICAL ITALIC SMALL ALPHA..MATHEMATICAL ITALIC SMALL OMEGA
+1D716..1D734  ; ALetter # L&  [31] MATHEMATICAL ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD ITALIC CAPITAL OMEGA
+1D736..1D74E  ; ALetter # L&  [25] MATHEMATICAL BOLD ITALIC SMALL ALPHA..MATHEMATICAL BOLD ITALIC SMALL OMEGA
+1D750..1D76E  ; ALetter # L&  [31] MATHEMATICAL BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA
+1D770..1D788  ; ALetter # L&  [25] MATHEMATICAL SANS-SERIF BOLD SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD SMALL OMEGA
+1D78A..1D7A8  ; ALetter # L&  [31] MATHEMATICAL SANS-SERIF BOLD EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA
+1D7AA..1D7C2  ; ALetter # L&  [25] MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMEGA
+1D7C4..1D7CB  ; ALetter # L&   [8] MATHEMATICAL SANS-SERIF BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD SMALL DIGAMMA
+
+# Total code points: 21903
+
+# ================================================
+
+003A          ; MidLetter # Po       COLON
+00B7          ; MidLetter # Po       MIDDLE DOT
+0387          ; MidLetter # Po       GREEK ANO TELEIA
+05F4          ; MidLetter # Po       HEBREW PUNCTUATION GERSHAYIM
+2027          ; MidLetter # Po       HYPHENATION POINT
+FE13          ; MidLetter # Po       PRESENTATION FORM FOR VERTICAL COLON
+FE55          ; MidLetter # Po       SMALL COLON
+FF1A          ; MidLetter # Po       FULLWIDTH COLON
+
+# Total code points: 8
+
+# ================================================
+
+002C          ; MidNum # Po       COMMA
+003B          ; MidNum # Po       SEMICOLON
+037E          ; MidNum # Po       GREEK QUESTION MARK
+0589          ; MidNum # Po       ARMENIAN FULL STOP
+060C..060D    ; MidNum # Po   [2] ARABIC COMMA..ARABIC DATE SEPARATOR
+066C          ; MidNum # Po       ARABIC THOUSANDS SEPARATOR
+07F8          ; MidNum # Po       NKO COMMA
+2044          ; MidNum # Sm       FRACTION SLASH
+FE10          ; MidNum # Po       PRESENTATION FORM FOR VERTICAL COMMA
+FE14          ; MidNum # Po       PRESENTATION FORM FOR VERTICAL SEMICOLON
+FE50          ; MidNum # Po       SMALL COMMA
+FE54          ; MidNum # Po       SMALL SEMICOLON
+FF0C          ; MidNum # Po       FULLWIDTH COMMA
+FF1B          ; MidNum # Po       FULLWIDTH SEMICOLON
+
+# Total code points: 15
+
+# ================================================
+
+0027          ; MidNumLet # Po       APOSTROPHE
+002E          ; MidNumLet # Po       FULL STOP
+2018          ; MidNumLet # Pi       LEFT SINGLE QUOTATION MARK
+2019          ; MidNumLet # Pf       RIGHT SINGLE QUOTATION MARK
+2024          ; MidNumLet # Po       ONE DOT LEADER
+FE52          ; MidNumLet # Po       SMALL FULL STOP
+FF07          ; MidNumLet # Po       FULLWIDTH APOSTROPHE
+FF0E          ; MidNumLet # Po       FULLWIDTH FULL STOP
+
+# Total code points: 8
+
+# ================================================
+
+0030..0039    ; Numeric # Nd  [10] DIGIT ZERO..DIGIT NINE
+0660..0669    ; Numeric # Nd  [10] ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE
+066B          ; Numeric # Po       ARABIC DECIMAL SEPARATOR
+06F0..06F9    ; Numeric # Nd  [10] EXTENDED ARABIC-INDIC DIGIT ZERO..EXTENDED ARABIC-INDIC DIGIT NINE
+07C0..07C9    ; Numeric # Nd  [10] NKO DIGIT ZERO..NKO DIGIT NINE
+0966..096F    ; Numeric # Nd  [10] DEVANAGARI DIGIT ZERO..DEVANAGARI DIGIT NINE
+09E6..09EF    ; Numeric # Nd  [10] BENGALI DIGIT ZERO..BENGALI DIGIT NINE
+0A66..0A6F    ; Numeric # Nd  [10] GURMUKHI DIGIT ZERO..GURMUKHI DIGIT NINE
+0AE6..0AEF    ; Numeric # Nd  [10] GUJARATI DIGIT ZERO..GUJARATI DIGIT NINE
+0B66..0B6F    ; Numeric # Nd  [10] ORIYA DIGIT ZERO..ORIYA DIGIT NINE
+0BE6..0BEF    ; Numeric # Nd  [10] TAMIL DIGIT ZERO..TAMIL DIGIT NINE
+0C66..0C6F    ; Numeric # Nd  [10] TELUGU DIGIT ZERO..TELUGU DIGIT NINE
+0CE6..0CEF    ; Numeric # Nd  [10] KANNADA DIGIT ZERO..KANNADA DIGIT NINE
+0D66..0D6F    ; Numeric # Nd  [10] MALAYALAM DIGIT ZERO..MALAYALAM DIGIT NINE
+0E50..0E59    ; Numeric # Nd  [10] THAI DIGIT ZERO..THAI DIGIT NINE
+0ED0..0ED9    ; Numeric # Nd  [10] LAO DIGIT ZERO..LAO DIGIT NINE
+0F20..0F29    ; Numeric # Nd  [10] TIBETAN DIGIT ZERO..TIBETAN DIGIT NINE
+1040..1049    ; Numeric # Nd  [10] MYANMAR DIGIT ZERO..MYANMAR DIGIT NINE
+1090..1099    ; Numeric # Nd  [10] MYANMAR SHAN DIGIT ZERO..MYANMAR SHAN DIGIT NINE
+17E0..17E9    ; Numeric # Nd  [10] KHMER DIGIT ZERO..KHMER DIGIT NINE
+1810..1819    ; Numeric # Nd  [10] MONGOLIAN DIGIT ZERO..MONGOLIAN DIGIT NINE
+1946..194F    ; Numeric # Nd  [10] LIMBU DIGIT ZERO..LIMBU DIGIT NINE
+19D0..19D9    ; Numeric # Nd  [10] NEW TAI LUE DIGIT ZERO..NEW TAI LUE DIGIT NINE
+1B50..1B59    ; Numeric # Nd  [10] BALINESE DIGIT ZERO..BALINESE DIGIT NINE
+1BB0..1BB9    ; Numeric # Nd  [10] SUNDANESE DIGIT ZERO..SUNDANESE DIGIT NINE
+1C40..1C49    ; Numeric # Nd  [10] LEPCHA DIGIT ZERO..LEPCHA DIGIT NINE
+1C50..1C59    ; Numeric # Nd  [10] OL CHIKI DIGIT ZERO..OL CHIKI DIGIT NINE
+A620..A629    ; Numeric # Nd  [10] VAI DIGIT ZERO..VAI DIGIT NINE
+A8D0..A8D9    ; Numeric # Nd  [10] SAURASHTRA DIGIT ZERO..SAURASHTRA DIGIT NINE
+A900..A909    ; Numeric # Nd  [10] KAYAH LI DIGIT ZERO..KAYAH LI DIGIT NINE
+AA50..AA59    ; Numeric # Nd  [10] CHAM DIGIT ZERO..CHAM DIGIT NINE
+104A0..104A9  ; Numeric # Nd  [10] OSMANYA DIGIT ZERO..OSMANYA DIGIT NINE
+1D7CE..1D7FF  ; Numeric # Nd  [50] MATHEMATICAL BOLD DIGIT ZERO..MATHEMATICAL MONOSPACE DIGIT NINE
+
+# Total code points: 361
+
+# ================================================
+
+005F          ; ExtendNumLet # Pc       LOW LINE
+203F..2040    ; ExtendNumLet # Pc   [2] UNDERTIE..CHARACTER TIE
+2054          ; ExtendNumLet # Pc       INVERTED UNDERTIE
+FE33..FE34    ; ExtendNumLet # Pc   [2] PRESENTATION FORM FOR VERTICAL LOW LINE..PRESENTATION FORM FOR VERTICAL WAVY LOW LINE
+FE4D..FE4F    ; ExtendNumLet # Pc   [3] DASHED LOW LINE..WAVY LOW LINE
+FF3F          ; ExtendNumLet # Pc       FULLWIDTH LOW LINE
+
+# Total code points: 10
+
+# EOF
diff --git a/basis/unicode/data/data-docs.factor b/basis/unicode/data/data-docs.factor
new file mode 100644 (file)
index 0000000..55fed31
--- /dev/null
@@ -0,0 +1,51 @@
+USING: help.syntax help.markup strings ;
+IN: unicode.data
+
+ABOUT: "unicode.data"
+
+ARTICLE: "unicode.data" "Unicode data tables"
+"The " { $vocab-link "unicode.data" "unicode.data" } " vocabulary contains core Unicode data tables and code for parsing this from files."
+{ $subsection load-script }
+{ $subsection canonical-entry }
+{ $subsection combine-chars }
+{ $subsection combining-class }
+{ $subsection non-starter? }
+{ $subsection name>char }
+{ $subsection char>name }
+{ $subsection property? } ;
+
+HELP: load-script
+{ $values { "filename" string } { "table" "an interval map" } }
+{ $description "This loads a file that looks like Script.txt in the Unicode Character Database and converts it into an efficient interval map, where the keys are characters and the values are strings for the properties." } ;
+
+HELP: canonical-entry
+{ $values { "char" "a code point" } { "seq" string } }
+{ $description "Finds the canonical decomposition (NFD) for a code point" } ;
+
+HELP: combine-chars
+{ $values { "a" "a code point" } { "b" "a code point" } { "char/f" "a code point" } }
+{ $description "If a followed by b can be combined in NFC, this returns the code point of their combination." } ;
+
+HELP: compatibility-entry
+{ $values { "char" "a code point" } { "seq" string } }
+{ $description "This returns the compatibility decomposition (NFKD) for a code point" } ;
+
+HELP: combining-class
+{ $values { "char" "a code point" } { "n" "an integer" } }
+{ $description "Finds the combining class of a code point." } ;
+
+HELP: non-starter?
+{ $values { "char" "a code point" } { "?" "a boolean" } }
+{ $description "Returns true if the code point has a combining class." } ;
+
+HELP: char>name
+{ $values { "char" "a code point" } { "name" string } }
+{ $description "Looks up the name of a given code point. Warning: this is not optimized for speed, to save space." } ;
+
+HELP: name>char
+{ $values { "name" string } { "char" "a code point" } }
+{ $description "Looks up the code point corresponding to a given name." } ;
+
+HELP: property?
+{ $values { "char" "a code point" } { "property" string } { "?" "a boolean" } }
+{ $description "Tests whether the code point is listed under the given property in PropList.txt in the Unicode Character Database." } ;
index 80cf40fbf1f3d38db7bde2df75b6ae49ae2c011d..e78b4c104a81859c882d6c11ed9c4869ded2ccbe 100644 (file)
@@ -1,10 +1,11 @@
 ! Copyright (C) 2008 Daniel Ehrenberg.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: combinators.short-circuit assocs math kernel sequences
-io.files hashtables quotations splitting grouping arrays
+io.files hashtables quotations splitting grouping arrays io
 math.parser hash2 math.order byte-arrays words namespaces words
 compiler.units parser io.encodings.ascii values interval-maps
-ascii sets combinators locals math.ranges sorting ;
+ascii sets combinators locals math.ranges sorting make
+strings.parser io.encodings.utf8 ;
 IN: unicode.data
 
 VALUE: simple-lower
@@ -23,15 +24,11 @@ VALUE: properties
 : combine-chars ( a b -- char/f ) combine-map hash2 ;
 : compatibility-entry ( char -- seq ) compatibility-map at  ;
 : combining-class ( char -- n ) class-map at ;
-: non-starter? ( char -- ? ) class-map key? ;
-: name>char ( string -- char ) name-map at ;
-: char>name ( char -- string ) name-map value-at ;
+: non-starter? ( char -- ? ) combining-class { 0 f } member? not ;
+: name>char ( name -- char ) name-map at ;
+: char>name ( char -- name ) name-map value-at ;
 : property? ( char property -- ? ) properties at interval-key? ;
 
-! Convenience functions
-: ?between? ( n/f from to -- ? )
-    pick [ between? ] [ 3drop f ] if ;
-
 ! Loading data from UnicodeData.txt
 
 : split-; ( line -- array )
@@ -70,10 +67,20 @@ VALUE: properties
     5 swap (process-data)
     [ " " split [ hex> ] map ] assoc-map ;
 
+: exclusions-file ( -- filename )
+    "resource:basis/unicode/data/CompositionExclusions.txt" ;
+
+: exclusions ( -- set )
+    exclusions-file utf8 file-lines
+    [ "#" split1 drop [ blank? ] trim-right hex> ] map harvest ;
+
+: remove-exclusions ( alist -- alist )
+    exclusions [ dup ] H{ } map>assoc assoc-diff ;
+
 : process-canonical ( data -- hash2 hash )
     (process-decomposed) [ first* ] filter
     [
-        [ second length 2 = ] filter
+        [ second length 2 = ] filter remove-exclusions
         ! using 1009 as the size, the maximum load is 4
         [ first2 first2 rot 3array ] map 1009 alist>hash2
     ] [ >hashtable chain-decomposed ] bi ;
@@ -102,6 +109,7 @@ VALUE: properties
       "Cc" "Cf" "Cs" "Co" } ;
 
 : num-chars HEX: 2FA1E ;
+
 ! the maximum unicode char in the first 3 planes
 
 : ?set-nth ( val index seq -- )
@@ -121,12 +129,9 @@ VALUE: properties
             cat categories index char table ?set-nth
         ] assoc-each table fill-ranges ] ;
 
-: ascii-lower ( string -- lower )
-    [ dup CHAR: A CHAR: Z between? [ HEX: 20 + ] when ] map ;
-
 : process-names ( data -- names-hash )
     1 swap (process-data) [
-        ascii-lower { { CHAR: \s CHAR: - } } substitute swap
+        >lower { { CHAR: \s CHAR: - } } substitute swap
     ] H{ } assoc-map-as ;
 
 : multihex ( hexstring -- string )
@@ -176,6 +181,44 @@ load-data {
     [ process-category to: category-map ]
 } cleave
 
+: postprocess-class ( -- )
+    combine-map [ [ second ] map ] map concat
+    [ combining-class not ] filter
+    [ 0 swap class-map set-at ] each ;
+
+postprocess-class
+
 load-special-casing to: special-casing
 
 load-properties to: properties
+
+! Utility to load resource files that look like Scripts.txt
+
+SYMBOL: interned
+
+: parse-script ( stream -- assoc )
+    ! assoc is code point/range => name
+    lines filter-comments [ split-; ] map ;
+
+: range, ( value key -- )
+    swap interned get
+    [ = ] with find nip 2array , ;
+
+: expand-ranges ( assoc -- interval-map )
+    [
+        [
+            swap CHAR: . over member? [
+                ".." split1 [ hex> ] bi@ 2array
+            ] [ hex> ] if range,
+        ] assoc-each
+    ] { } make <interval-map> ;
+
+: process-script ( ranges -- table )
+    dup values prune interned
+    [ expand-ranges ] with-variable ;
+
+: load-script ( filename -- table )
+    ascii <file-reader> parse-script process-script ;
+
+[ name>char [ "Invalid character" throw ] unless* ]
+name>char-hook set-global
diff --git a/basis/unicode/normalize/normalize-docs.factor b/basis/unicode/normalize/normalize-docs.factor
new file mode 100644 (file)
index 0000000..453ab24
--- /dev/null
@@ -0,0 +1,33 @@
+USING: help.syntax help.markup strings ;
+IN: unicode.normalize
+
+ABOUT: "unicode.normalize"
+
+ARTICLE: "unicode.normalize" "Unicode normalization"
+"The " { $vocab-link "unicode.normalize" "unicode.normalize" } " vocabulary defines words for normalizing Unicode strings."
+$nl
+"In Unicode, it is often possible to have multiple sequences of characters which really represent exactly the same thing. For example, to represent e with an acute accent above, there are two possible strings: " { $snippet "\"e\\u000301\"" } " (the e character, followed by the combining acute accent character) and " { $snippet "\"\\u0000e9\"" } " (a single character, e with an acute accent)."
+$nl
+"There are four normalization forms: NFD, NFC, NFKD, and NFKC. Basically, in NFD and NFKD, everything is expanded, whereas in NFC and NFKC, everything is contracted. In NFKD and NFKC, more things are expanded and contracted. This is a process which loses some information, so it should be done only with care."
+$nl
+"Most of the world uses NFC to communicate, but for many purposes, NFD/NFKD is easier to process. For more information, see Unicode Standard Annex #15 and section 3 of the Unicode standard."
+{ $subsection nfc }
+{ $subsection nfd }
+{ $subsection nfkc }
+{ $subsection nfkd } ;
+
+HELP: nfc
+{ $values { "string" string } { "nfc" "a string in NFC" } }
+{ $description "Converts a string to Normalization Form C." } ;
+
+HELP: nfd
+{ $values { "string" string } { "nfd" "a string in NFD" } }
+{ $description "Converts a string to Normalization Form D." } ;
+
+HELP: nfkc
+{ $values { "string" string } { "nfkc" "a string in NFKC" } }
+{ $description "Converts a string to Normalization Form KC." } ;
+
+HELP: nfkd
+{ $values { "string" string } { "nfkd" "a string in NFKD" } }
+{ $description "Converts a string to Normalization Form KD." } ;
index cae1380ab449a681e0f49cd0bd266990b2e3c2a2..1242e1d358cca1b0f58b1722934672755fd3ab13 100644 (file)
@@ -1,8 +1,10 @@
 USING: unicode.normalize kernel tools.test sequences
 unicode.data io.encodings.utf8 io.files splitting math.parser
-locals math quotations assocs combinators ;
+locals math quotations assocs combinators unicode.normalize.private ;
 IN: unicode.normalize.tests
 
+{ nfc nfkc nfd nfkd } [ must-infer ] each
+
 [ "ab\u000323\u000302cd" ] [ "ab\u000302" "\u000323cd" string-append ] unit-test
 
 [ "ab\u00064b\u000347\u00034e\u00034d\u000346" ] [ "ab\u000346\u000347\u00064b\u00034e\u00034d" dup reorder ] unit-test
@@ -41,4 +43,4 @@ IN: unicode.normalize.tests
         [ { { 5 { 1 2 3 4 5 } } } [ nfkd ] assert= ]
     } cleave ;
 
-parse-test [ run-line ] each
+parse-test [ run-line ] each
index 35bdda67f051accd3369dfd0bcc4e32192d48cec..892379dc899adcbbf8a8431111287350ddb53d42 100644 (file)
@@ -1,29 +1,34 @@
 ! Copyright (C) 2008 Daniel Ehrenberg.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: sequences namespaces make unicode.data kernel math arrays
-locals sorting.insertion accessors ;
+USING: ascii sequences namespaces make unicode.data kernel math arrays
+locals sorting.insertion accessors assocs math.order combinators
+unicode.syntax strings sbufs hints combinators.short-circuit vectors ;
 IN: unicode.normalize
 
+<PRIVATE
 ! Conjoining Jamo behavior
 
-: hangul-base HEX: ac00 ; inline
-: hangul-end HEX: D7AF ; inline
-: initial-base HEX: 1100 ; inline
-: medial-base HEX: 1161 ; inline
-: final-base HEX: 11a7 ; inline
+CONSTANT: hangul-base HEX: ac00
+CONSTANT: hangul-end HEX: D7AF
+CONSTANT: initial-base HEX: 1100
+CONSTANT: medial-base HEX: 1161
+CONSTANT: final-base HEX: 11a7
 
-: initial-count 19 ; inline
-: medial-count 21 ; inline
-: final-count 28 ; inline
+CONSTANT: initial-count 19
+CONSTANT: medial-count 21
+CONSTANT: final-count 28
 
-: hangul? ( ch -- ? ) hangul-base hangul-end ?between? ;
-: jamo? ( ch -- ? ) HEX: 1100 HEX: 11FF ?between? ;
+: ?between? ( n/f from to -- ? )
+    pick [ between? ] [ 3drop f ] if ; inline
+
+: hangul? ( ch -- ? ) hangul-base hangul-end ?between? ; inline
+: jamo? ( ch -- ? ) HEX: 1100 HEX: 11FF ?between? ; inline
 
 ! These numbers come from UAX 29
 : initial? ( ch -- ? )
-    dup HEX: 1100 HEX: 1159 ?between? [ ] [ HEX: 115F = ] ?if ;
-: medial? ( ch -- ? ) HEX: 1160 HEX: 11A2 ?between? ;
-: final? ( ch -- ? ) HEX: 11A8 HEX: 11F9 ?between? ;
+    dup HEX: 1100 HEX: 1159 ?between? [ ] [ HEX: 115F = ] ?if ; inline
+: medial? ( ch -- ? ) HEX: 1160 HEX: 11A2 ?between? ; inline
+: final? ( ch -- ? ) HEX: 11A8 HEX: 11F9 ?between? ; inline
 
 : hangul>jamo ( hangul -- jamo-string )
     hangul-base - final-count /mod final-base +
@@ -43,16 +48,16 @@ IN: unicode.normalize
 
 : reorder-slice ( string start -- slice done? )
     2dup swap [ non-starter? not ] find-from drop
-    [ [ over length ] unless* rot <slice> ] keep not ;
+    [ [ over length ] unless* rot <slice> ] keep not ; inline
 
 : reorder-next ( string i -- new-i done? )
     over [ non-starter? ] find-from drop [
         reorder-slice
         [ dup [ combining-class ] insertion-sort to>> ] dip
-    ] [ length t ] if* ;
+    ] [ length t ] if* ; inline
 
 : reorder-loop ( string start -- )
-    dupd reorder-next [ 2drop ] [ reorder-loop ] if ;
+    dupd reorder-next [ 2drop ] [ reorder-loop ] if ; inline recursive
 
 : reorder ( string -- )
     0 reorder-loop ;
@@ -61,97 +66,131 @@ IN: unicode.normalize
     over [ non-starter? not ] find-last-from drop ?1+ reorder-next 2drop ;
 
 :: decompose ( string quot -- decomposed )
-    ! When there are 8 and 32-bit strings, this'll be
-    ! equivalent to clone on 8 and the contents of the last
-    ! main quotation on 32.
-    string [ 127 < ] all? [ string ] [
-        [
-            string [
-                dup hangul? [ hangul>jamo % ]
-                [ dup quot call [ % ] [ , ] ?if ] if
-            ] each
-        ] "" make
-        dup reorder
-    ] if ; inline
-
-: nfd ( string -- string )
+    string length <sbuf> :> out
+    string [
+        >fixnum dup ascii? [ out push ] [
+            dup hangul? [ hangul>jamo out push-all ]
+            [ dup quot call [ out push-all ] [ out push ] ?if ] if
+        ] if
+    ] each
+    out "" like dup reorder ; inline
+
+: with-string ( str quot -- str )
+    over aux>> [ call ] [ drop ] if ; inline
+
+: (nfd) ( string -- nfd )
     [ canonical-entry ] decompose ;
 
-: nfkd ( string -- string )
+HINTS: (nfd) string ;
+
+: (nfkd) ( string -- nfkd )
     [ compatibility-entry ] decompose ;
 
+HINTS: (nfkd) string ;
+
+PRIVATE>
+
+: nfd ( string -- nfd )
+    [ (nfd) ] with-string ;
+
+: nfkd ( string -- nfkd )
+    [ (nfkd) ] with-string ;
+
 : string-append ( s1 s2 -- string )
-    ! This could be more optimized,
-    ! but in practice, it'll almost always just be append
     [ append ] keep
     0 over ?nth non-starter?
     [ length dupd reorder-back ] [ drop ] if ;
 
+HINTS: string-append string string ;
+
+<PRIVATE
+
 ! Normalization -- Composition
-SYMBOL: main-str
-SYMBOL: ind
-SYMBOL: after
-SYMBOL: char
-
-: get-str ( i -- ch ) ind get + main-str get ?nth ;
-: current ( -- ch ) 0 get-str ;
-: to ( -- ) ind inc ;
-
-: initial-medial? ( -- ? )
-    current initial? [ 1 get-str medial? ] [ f ] if ;
-
-: --final? ( -- ? )
-    2 get-str final? ;
-
-: imf, ( -- )
-    current to current to current jamo>hangul , ;
-
-: im, ( -- )
-    current to current 0 jamo>hangul , ;
-
-: compose-jamo ( -- )
-    initial-medial? [
-        --final? [ imf, ] [ im, ] if
-    ] when to current jamo? [ compose-jamo ] when ;
-
-: pass-combining ( -- )
-    current non-starter? [ current , to pass-combining ] when ;
-
-: try-compose ( last-class char current-class -- )
-    swapd = [ after get push ] [
-        char get over combine-chars
-        [ nip char set ] [ after get push ] if*
-    ] if ;
-
-: compose-iter ( n -- )
-    current [
-        dup combining-class dup
-        [ [ try-compose ] keep to compose-iter ] [ 3drop ] if
-    ] [ drop ] if* ;
-
-: ?new-after ( -- )
-    after [ dup empty? [ drop SBUF" " clone ] unless ] change ;
-
-: (compose) ( -- )
-    current [
-        dup jamo? [ drop compose-jamo ] [
-            char set to ?new-after
-            0 compose-iter
-            char get , after get %
-            to
+
+: initial-medial? ( str i -- ? )
+    { [ swap nth initial? ] [ 1+ swap ?nth medial? ] } 2&& ;
+
+: --final? ( str i -- ? )
+    2 + swap ?nth final? ;
+
+: imf, ( str i -- str i )
+    [ tail-slice first3 jamo>hangul , ]
+    [ 3 + ] 2bi ;
+
+: im, ( str i -- str i )
+    [ tail-slice first2 final-base jamo>hangul , ]
+    [ 2 + ] 2bi ;
+
+: compose-jamo ( str i -- str i )
+    2dup initial-medial? [
+        2dup --final? [ imf, ] [ im, ] if
+    ] [ 2dup swap nth , 1+ ] if ;
+
+: pass-combining ( str -- str i )
+    dup [ non-starter? not ] find drop
+    [ dup length ] unless*
+    2dup head-slice % ;
+
+TUPLE: compose-state i str char after last-class ;
+
+: get-str ( state i -- ch )
+    swap [ i>> + ] [ str>> ] bi ?nth ; inline
+: current ( state -- ch ) 0 get-str ; inline
+: to ( state -- state ) [ 1+ ] change-i ; inline
+: push-after ( ch state -- state ) [ ?push ] change-after ; inline
+
+:: try-compose ( state new-char current-class -- state )
+    state last-class>> current-class =
+    [ new-char state push-after ] [
+        state char>> new-char combine-chars
+        [ state swap >>char ] [
+            new-char state push-after
+            current-class >>last-class
+        ] if*
+    ] if ; inline
+
+DEFER: compose-iter
+
+: try-noncombining ( char state -- state )
+    tuck char>> swap combine-chars
+    [ >>char to f >>last-class compose-iter ] when* ; inline
+
+: compose-iter ( state -- state )
+    dup current [
+        dup combining-class {
+            { f [ drop ] }
+            { 0 [
+                over last-class>>
+                [ drop ] [ swap try-noncombining ] if ] }
+            [ try-compose to compose-iter ]
+        } case
+    ] when* ; inline recursive
+
+: compose-combining ( ch str i -- str i )
+    compose-state new
+        swap >>i
+        swap >>str
+        swap >>char
+    compose-iter
+    { [ char>> , ] [ after>> % ] [ str>> ] [ i>> ] } cleave ; inline
+
+:: (compose) ( str i -- )
+    i str ?nth [
+        dup jamo? [ drop str i compose-jamo ] [
+            i 1+ str ?nth combining-class
+            [ str i 1+ compose-combining ] [ , str i 1+ ] if
         ] if (compose)
-    ] when* ;
+    ] when* ; inline recursive
 
-: compose ( str -- comp )
-    [
-        main-str set
-        0 ind set
-        SBUF" " clone after set
-        pass-combining (compose)
-    ] "" make ;
+: combine ( str -- comp )
+    [ pass-combining (compose) ] "" make ;
+
+HINTS: combine string ;
+
+PRIVATE>
 
 : nfc ( string -- nfc )
-    nfd compose ;
+    [ (nfd) combine ] with-string ;
 
 : nfkc ( string -- nfkc )
-    nfkc compose ;
+    [ (nfkd) combine ] with-string ;
index 905837123b7082d1bb368c1a2e9057ad0dfc6db9..3088eea765da20dc661ec2db4677e53c0d4ff254 100644 (file)
@@ -1,4 +1,4 @@
 USING: unicode.script tools.test ;\r
 \r
-[ Latin ] [ CHAR: a script-of ] unit-test\r
-[ Common ] [ 0 script-of ] unit-test\r
+[ "Latin" ] [ CHAR: a script-of ] unit-test\r
+[ "Common" ] [ 0 script-of ] unit-test\r
index 96917971280bc20d7aa7db32150b9806d516f421..aaa6767685f17bcaeaac02563f1c19f30b6c506e 100644 (file)
@@ -1,50 +1,16 @@
 ! Copyright (C) 2008 Daniel Ehrenberg.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors values kernel sequences assocs io.files
-io.encodings ascii math.ranges io splitting math.parser 
+io.encodings ascii math.ranges io splitting math.parser
 namespaces make byte-arrays locals math sets io.encodings.ascii
-words compiler.units arrays interval-maps unicode.data ;
+words words.symbol compiler.units arrays interval-maps
+unicode.data ;
 IN: unicode.script
 
-<PRIVATE
 VALUE: script-table
-SYMBOL: interned
 
-: parse-script ( stream -- assoc )
-    ! assoc is code point/range => name
-    lines filter-comments [ split-; ] map ;
-
-: range, ( value key -- )
-    swap interned get
-    [ name>> = ] with find nip 2array , ;
-
-: expand-ranges ( assoc -- interval-map )
-    [
-        [
-            CHAR: . pick member? [
-                swap ".." split1 [ hex> ] bi@ 2array
-            ] [ swap hex> ] if range,
-        ] assoc-each
-    ] { } make <interval-map> ;
-
-: >symbols ( strings -- symbols )
-    [
-        [ "unicode.script" create dup define-symbol ] map
-    ] with-compilation-unit ;
-
-: process-script ( ranges -- )
-    dup values prune >symbols interned [
-        expand-ranges to: script-table
-    ] with-variable ;
-
-: load-script ( -- )
-    "resource:basis/unicode/script/Scripts.txt"
-    ascii <file-reader> parse-script process-script ;
-
-load-script
-PRIVATE>
-
-SYMBOL: Unknown
+"resource:basis/unicode/script/Scripts.txt" load-script
+to: script-table
 
 : script-of ( char -- script )
-    script-table interval-at [ Unknown ] unless* ;
+    script-table interval-at ;
diff --git a/basis/unicode/unicode-docs.factor b/basis/unicode/unicode-docs.factor
new file mode 100644 (file)
index 0000000..4ae326a
--- /dev/null
@@ -0,0 +1,22 @@
+USING: help.markup help.syntax strings ;
+IN: unicode
+
+ARTICLE: "unicode" "Unicode"
+"The " { $vocab-link "unicode" } " vocabulary and its sub-vocabularies implement support for the Unicode 5.1 character set."
+$nl
+"The Unicode character set contains most of the world's writing systems. Unicode is intended as a replacement for, and is a superset of, such legacy character sets as ASCII, Latin1, MacRoman, and so on. Unicode characters are called " { $emphasis "code points" } "; Factor's " { $link "strings" } " are sequences of code points."
+$nl
+"The Unicode character set is accompanied by several standard algorithms for common operations like encoding text in files, capitalizing a string, finding the boundaries between words, and so on."
+$nl
+"The Unicode algorithms implemented by the " { $vocab-link "unicode" } " vocabulary are:"
+{ $vocab-subsection "Case mapping" "unicode.case" }
+{ $vocab-subsection "Collation and weak comparison" "unicode.collation" }
+{ $vocab-subsection "Character classes" "unicode.categories" }
+{ $vocab-subsection "Word and grapheme breaks" "unicode.breaks" }
+{ $vocab-subsection "Unicode normalization" "unicode.normalize" }
+"The following are mostly for internal use:"
+{ $vocab-subsection "Unicode syntax" "unicode.syntax" }
+{ $vocab-subsection "Unicode data tables" "unicode.data" }
+{ $see-also "ascii" "io.encodings" } ;
+
+ABOUT: "unicode"
diff --git a/basis/unicode/unicode.factor b/basis/unicode/unicode.factor
new file mode 100644 (file)
index 0000000..32adb96
--- /dev/null
@@ -0,0 +1 @@
+IN: unicode
index 1901f27a24507e2512d93a1f956aaaa0d2f05714..e1907c6d91fb7d575f2cb507af988c2a5c7938f3 100644 (file)
@@ -1 +1,2 @@
 Slava Pestov
+Eduardo Cavazos
index bf426ad8672cce3ffea90f9d6d0e3a365ea15b95..bb0f9b520163324302a7761fa79a813c47028117 100644 (file)
@@ -3,28 +3,28 @@
 USING: alien.syntax combinators system vocabs.loader ;
 IN: unix
 
-: MAXPATHLEN 1024 ; inline
-
-: O_RDONLY   HEX: 0000 ; inline
-: O_WRONLY   HEX: 0001 ; inline
-: O_RDWR     HEX: 0002 ; inline
-: O_NONBLOCK HEX: 0004 ; inline
-: O_APPEND   HEX: 0008 ; inline
-: O_CREAT    HEX: 0200 ; inline
-: O_TRUNC    HEX: 0400 ; inline
-: O_EXCL     HEX: 0800 ; inline
-: O_NOCTTY   HEX: 20000 ; inline
-: O_NDELAY O_NONBLOCK ; inline
-
-: SOL_SOCKET HEX: ffff ; inline
-: SO_REUSEADDR HEX: 4 ; inline
-: SO_OOBINLINE HEX: 100 ; inline
-: SO_SNDTIMEO HEX: 1005 ; inline
-: SO_RCVTIMEO HEX: 1006 ; inline
-
-: F_SETFD 2 ; inline
-: F_SETFL 4 ; inline
-: FD_CLOEXEC 1 ; inline
+CONSTANT: MAXPATHLEN 1024
+
+CONSTANT: O_RDONLY   HEX: 0000
+CONSTANT: O_WRONLY   HEX: 0001
+CONSTANT: O_RDWR     HEX: 0002
+CONSTANT: O_NONBLOCK HEX: 0004
+CONSTANT: O_APPEND   HEX: 0008
+CONSTANT: O_CREAT    HEX: 0200
+CONSTANT: O_TRUNC    HEX: 0400
+CONSTANT: O_EXCL     HEX: 0800
+CONSTANT: O_NOCTTY   HEX: 20000
+ALIAS: O_NDELAY O_NONBLOCK
+
+CONSTANT: SOL_SOCKET HEX: ffff
+CONSTANT: SO_REUSEADDR HEX: 4
+CONSTANT: SO_OOBINLINE HEX: 100
+CONSTANT: SO_SNDTIMEO HEX: 1005
+CONSTANT: SO_RCVTIMEO HEX: 1006
+
+CONSTANT: F_SETFD 2
+CONSTANT: F_SETFL 4
+CONSTANT: FD_CLOEXEC 1
 
 C-STRUCT: sockaddr-in
     { "uchar" "len" }
@@ -59,29 +59,29 @@ C-STRUCT: passwd
     { "time_t" "pw_expire" }
     { "int"    "pw_fields" } ;
 
-: max-un-path 104 ; inline
+CONSTANT: max-un-path 104
 
-: SOCK_STREAM 1 ; inline
-: SOCK_DGRAM 2 ; inline
+CONSTANT: SOCK_STREAM 1
+CONSTANT: SOCK_DGRAM 2
 
-: AF_UNSPEC 0 ; inline
-: AF_UNIX 1 ; inline
-: AF_INET 2 ; inline
-: AF_INET6 30 ; inline
+CONSTANT: AF_UNSPEC 0
+CONSTANT: AF_UNIX 1
+CONSTANT: AF_INET 2
+CONSTANT: AF_INET6 30
 
-: PF_UNSPEC AF_UNSPEC ; inline
-: PF_UNIX AF_UNIX ; inline
-: PF_INET AF_INET ; inline
-: PF_INET6 AF_INET6 ; inline
+ALIAS: PF_UNSPEC AF_UNSPEC
+ALIAS: PF_UNIX AF_UNIX
+ALIAS: PF_INET AF_INET
+ALIAS: PF_INET6 AF_INET6
 
-: IPPROTO_TCP 6 ; inline
-: IPPROTO_UDP 17 ; inline
+CONSTANT: IPPROTO_TCP 6
+CONSTANT: IPPROTO_UDP 17
 
-: AI_PASSIVE 1 ; inline
+CONSTANT: AI_PASSIVE 1
 
-: SEEK_SET 0 ; inline
-: SEEK_CUR 1 ; inline
-: SEEK_END 2 ; inline
+CONSTANT: SEEK_SET 0
+CONSTANT: SEEK_CUR 1
+CONSTANT: SEEK_END 2
 
 os {
     { macosx  [ "unix.bsd.macosx"  require ] }
index 81885ff14157b1f7d12e8ce4138cba4620e02aff..4536c532bf649e377faaa0c4ed303f5f1fcbeb19 100644 (file)
@@ -20,97 +20,97 @@ C-STRUCT: dirent
     { "u_int8_t"  "d_namlen" }
     { { "char" 256 } "d_name" } ;
 
-: EPERM 1 ; inline
-: ENOENT 2 ; inline
-: ESRCH 3 ; inline
-: EINTR 4 ; inline
-: EIO 5 ; inline
-: ENXIO 6 ; inline
-: E2BIG 7 ; inline
-: ENOEXEC 8 ; inline
-: EBADF 9 ; inline
-: ECHILD 10 ; inline
-: EDEADLK 11 ; inline
-: ENOMEM 12 ; inline
-: EACCES 13 ; inline
-: EFAULT 14 ; inline
-: ENOTBLK 15 ; inline
-: EBUSY 16 ; inline
-: EEXIST 17 ; inline
-: EXDEV 18 ; inline
-: ENODEV 19 ; inline
-: ENOTDIR 20 ; inline
-: EISDIR 21 ; inline
-: EINVAL 22 ; inline
-: ENFILE 23 ; inline
-: EMFILE 24 ; inline
-: ENOTTY 25 ; inline
-: ETXTBSY 26 ; inline
-: EFBIG 27 ; inline
-: ENOSPC 28 ; inline
-: ESPIPE 29 ; inline
-: EROFS 30 ; inline
-: EMLINK 31 ; inline
-: EPIPE 32 ; inline
-: EDOM 33 ; inline
-: ERANGE 34 ; inline
-: EAGAIN 35 ; inline
-: EWOULDBLOCK EAGAIN ; inline
-: EINPROGRESS 36 ; inline
-: EALREADY 37 ; inline
-: ENOTSOCK 38 ; inline
-: EDESTADDRREQ 39 ; inline
-: EMSGSIZE 40 ; inline
-: EPROTOTYPE 41 ; inline
-: ENOPROTOOPT 42 ; inline
-: EPROTONOSUPPORT 43 ; inline
-: ESOCKTNOSUPPORT 44 ; inline
-: EOPNOTSUPP 45 ; inline
-: ENOTSUP EOPNOTSUPP ; inline
-: EPFNOSUPPORT 46 ; inline
-: EAFNOSUPPORT 47 ; inline
-: EADDRINUSE 48 ; inline
-: EADDRNOTAVAIL 49 ; inline
-: ENETDOWN 50 ; inline
-: ENETUNREACH 51 ; inline
-: ENETRESET 52 ; inline
-: ECONNABORTED 53 ; inline
-: ECONNRESET 54 ; inline
-: ENOBUFS 55 ; inline
-: EISCONN 56 ; inline
-: ENOTCONN 57 ; inline
-: ESHUTDOWN 58 ; inline
-: ETOOMANYREFS 59 ; inline
-: ETIMEDOUT 60 ; inline
-: ECONNREFUSED 61 ; inline
-: ELOOP 62 ; inline
-: ENAMETOOLONG 63 ; inline
-: EHOSTDOWN 64 ; inline
-: EHOSTUNREACH 65 ; inline
-: ENOTEMPTY 66 ; inline
-: EPROCLIM 67 ; inline
-: EUSERS 68 ; inline
-: EDQUOT 69 ; inline
-: ESTALE 70 ; inline
-: EREMOTE 71 ; inline
-: EBADRPC 72 ; inline
-: ERPCMISMATCH 73 ; inline
-: EPROGUNAVAIL 74 ; inline
-: EPROGMISMATCH 75 ; inline
-: EPROCUNAVAIL 76 ; inline
-: ENOLCK 77 ; inline
-: ENOSYS 78 ; inline
-: EFTYPE 79 ; inline
-: EAUTH 80 ; inline
-: ENEEDAUTH 81 ; inline
-: EIDRM 82 ; inline
-: ENOMSG 83 ; inline
-: EOVERFLOW 84 ; inline
-: ECANCELED 85 ; inline
-: EILSEQ 86 ; inline
-: ENOATTR 87 ; inline
-: EDOOFUS 88 ; inline
-: EBADMSG 89 ; inline
-: EMULTIHOP 90 ; inline
-: ENOLINK 91 ; inline
-: EPROTO 92 ; inline
+CONSTANT: EPERM 1
+CONSTANT: ENOENT 2
+CONSTANT: ESRCH 3
+CONSTANT: EINTR 4
+CONSTANT: EIO 5
+CONSTANT: ENXIO 6
+CONSTANT: E2BIG 7
+CONSTANT: ENOEXEC 8
+CONSTANT: EBADF 9
+CONSTANT: ECHILD 10
+CONSTANT: EDEADLK 11
+CONSTANT: ENOMEM 12
+CONSTANT: EACCES 13
+CONSTANT: EFAULT 14
+CONSTANT: ENOTBLK 15
+CONSTANT: EBUSY 16
+CONSTANT: EEXIST 17
+CONSTANT: EXDEV 18
+CONSTANT: ENODEV 19
+CONSTANT: ENOTDIR 20
+CONSTANT: EISDIR 21
+CONSTANT: EINVAL 22
+CONSTANT: ENFILE 23
+CONSTANT: EMFILE 24
+CONSTANT: ENOTTY 25
+CONSTANT: ETXTBSY 26
+CONSTANT: EFBIG 27
+CONSTANT: ENOSPC 28
+CONSTANT: ESPIPE 29
+CONSTANT: EROFS 30
+CONSTANT: EMLINK 31
+CONSTANT: EPIPE 32
+CONSTANT: EDOM 33
+CONSTANT: ERANGE 34
+CONSTANT: EAGAIN 35
+ALIAS: EWOULDBLOCK EAGAIN
+CONSTANT: EINPROGRESS 36
+CONSTANT: EALREADY 37
+CONSTANT: ENOTSOCK 38
+CONSTANT: EDESTADDRREQ 39
+CONSTANT: EMSGSIZE 40
+CONSTANT: EPROTOTYPE 41
+CONSTANT: ENOPROTOOPT 42
+CONSTANT: EPROTONOSUPPORT 43
+CONSTANT: ESOCKTNOSUPPORT 44
+CONSTANT: EOPNOTSUPP 45
+ALIAS: ENOTSUP EOPNOTSUPP
+CONSTANT: EPFNOSUPPORT 46
+CONSTANT: EAFNOSUPPORT 47
+CONSTANT: EADDRINUSE 48
+CONSTANT: EADDRNOTAVAIL 49
+CONSTANT: ENETDOWN 50
+CONSTANT: ENETUNREACH 51
+CONSTANT: ENETRESET 52
+CONSTANT: ECONNABORTED 53
+CONSTANT: ECONNRESET 54
+CONSTANT: ENOBUFS 55
+CONSTANT: EISCONN 56
+CONSTANT: ENOTCONN 57
+CONSTANT: ESHUTDOWN 58
+CONSTANT: ETOOMANYREFS 59
+CONSTANT: ETIMEDOUT 60
+CONSTANT: ECONNREFUSED 61
+CONSTANT: ELOOP 62
+CONSTANT: ENAMETOOLONG 63
+CONSTANT: EHOSTDOWN 64
+CONSTANT: EHOSTUNREACH 65
+CONSTANT: ENOTEMPTY 66
+CONSTANT: EPROCLIM 67
+CONSTANT: EUSERS 68
+CONSTANT: EDQUOT 69
+CONSTANT: ESTALE 70
+CONSTANT: EREMOTE 71
+CONSTANT: EBADRPC 72
+CONSTANT: ERPCMISMATCH 73
+CONSTANT: EPROGUNAVAIL 74
+CONSTANT: EPROGMISMATCH 75
+CONSTANT: EPROCUNAVAIL 76
+CONSTANT: ENOLCK 77
+CONSTANT: ENOSYS 78
+CONSTANT: EFTYPE 79
+CONSTANT: EAUTH 80
+CONSTANT: ENEEDAUTH 81
+CONSTANT: EIDRM 82
+CONSTANT: ENOMSG 83
+CONSTANT: EOVERFLOW 84
+CONSTANT: ECANCELED 85
+CONSTANT: EILSEQ 86
+CONSTANT: ENOATTR 87
+CONSTANT: EDOOFUS 88
+CONSTANT: EBADMSG 89
+CONSTANT: EMULTIHOP 90
+CONSTANT: ENOLINK 91
+CONSTANT: EPROTO 92
index fb9eb9a621388b0e0e23e10a2bfd37fde273e71e..32dd4d80d8c3dc2f2036f90f1046055938c6652d 100644 (file)
@@ -1,7 +1,7 @@
 USING: alien.syntax unix.time ;
 IN: unix
 
-: FD_SETSIZE 1024 ; inline
+CONSTANT: FD_SETSIZE 1024
 
 C-STRUCT: addrinfo
     { "int" "flags" }
@@ -13,10 +13,10 @@ C-STRUCT: addrinfo
     { "void*" "addr" }
     { "addrinfo*" "next" } ;
 
-: _UTX_USERSIZE 256 ; inline
-: _UTX_LINESIZE 32 ; inline
-: _UTX_IDSIZE 4 ; inline
-: _UTX_HOSTSIZE 256 ; inline
+CONSTANT: _UTX_USERSIZE 256
+CONSTANT: _UTX_LINESIZE 32
+CONSTANT: _UTX_IDSIZE 4
+CONSTANT: _UTX_HOSTSIZE 256
     
 C-STRUCT: utmpx
     { { "char" _UTX_USERSIZE } "ut_user" }
@@ -28,9 +28,9 @@ C-STRUCT: utmpx
     { { "char" _UTX_HOSTSIZE } "ut_host" }
     { { "uint" 16 } "ut_pad" } ;
 
-: __DARWIN_MAXPATHLEN 1024 ; inline
-: __DARWIN_MAXNAMELEN 255 ; inline
-: __DARWIN_MAXNAMELEN+1 255 ; inline
+CONSTANT: __DARWIN_MAXPATHLEN 1024
+CONSTANT: __DARWIN_MAXNAMELEN 255
+CONSTANT: __DARWIN_MAXNAMELEN+1 255
 
 C-STRUCT: dirent
     { "ino_t" "d_ino" }
@@ -39,107 +39,107 @@ C-STRUCT: dirent
     { "__uint8_t"  "d_namlen" }
     { { "char" __DARWIN_MAXNAMELEN+1 } "d_name" } ;
 
-: EPERM 1 ; inline
-: ENOENT 2 ; inline
-: ESRCH 3 ; inline
-: EINTR 4 ; inline
-: EIO 5 ; inline
-: ENXIO 6 ; inline
-: E2BIG 7 ; inline
-: ENOEXEC 8 ; inline
-: EBADF 9 ; inline
-: ECHILD 10 ; inline
-: EDEADLK 11 ; inline
-: ENOMEM 12 ; inline
-: EACCES 13 ; inline
-: EFAULT 14 ; inline
-: ENOTBLK 15 ; inline
-: EBUSY 16 ; inline
-: EEXIST 17 ; inline
-: EXDEV 18 ; inline
-: ENODEV 19 ; inline
-: ENOTDIR 20 ; inline
-: EISDIR 21 ; inline
-: EINVAL 22 ; inline
-: ENFILE 23 ; inline
-: EMFILE 24 ; inline
-: ENOTTY 25 ; inline
-: ETXTBSY 26 ; inline
-: EFBIG 27 ; inline
-: ENOSPC 28 ; inline
-: ESPIPE 29 ; inline
-: EROFS 30 ; inline
-: EMLINK 31 ; inline
-: EPIPE 32 ; inline
-: EDOM 33 ; inline
-: ERANGE 34 ; inline
-: EAGAIN 35 ; inline
-: EWOULDBLOCK EAGAIN ; inline
-: EINPROGRESS 36 ; inline
-: EALREADY 37 ; inline
-: ENOTSOCK 38 ; inline
-: EDESTADDRREQ 39 ; inline
-: EMSGSIZE 40 ; inline
-: EPROTOTYPE 41 ; inline
-: ENOPROTOOPT 42 ; inline
-: EPROTONOSUPPORT 43 ; inline
-: ESOCKTNOSUPPORT 44 ; inline
-: ENOTSUP 45 ; inline
-: EPFNOSUPPORT 46 ; inline
-: EAFNOSUPPORT 47 ; inline
-: EADDRINUSE 48 ; inline
-: EADDRNOTAVAIL 49 ; inline
-: ENETDOWN 50 ; inline
-: ENETUNREACH 51 ; inline
-: ENETRESET 52 ; inline
-: ECONNABORTED 53 ; inline
-: ECONNRESET 54 ; inline
-: ENOBUFS 55 ; inline
-: EISCONN 56 ; inline
-: ENOTCONN 57 ; inline
-: ESHUTDOWN 58 ; inline
-: ETOOMANYREFS 59 ; inline
-: ETIMEDOUT 60 ; inline
-: ECONNREFUSED 61 ; inline
-: ELOOP 62 ; inline
-: ENAMETOOLONG 63 ; inline
-: EHOSTDOWN 64 ; inline
-: EHOSTUNREACH 65 ; inline
-: ENOTEMPTY 66 ; inline
-: EPROCLIM 67 ; inline
-: EUSERS 68 ; inline
-: EDQUOT 69 ; inline
-: ESTALE 70 ; inline
-: EREMOTE 71 ; inline
-: EBADRPC 72 ; inline
-: ERPCMISMATCH 73 ; inline
-: EPROGUNAVAIL 74 ; inline
-: EPROGMISMATCH 75 ; inline
-: EPROCUNAVAIL 76 ; inline
-: ENOLCK 77 ; inline
-: ENOSYS 78 ; inline
-: EFTYPE 79 ; inline
-: EAUTH 80 ; inline
-: ENEEDAUTH 81 ; inline
-: EPWROFF 82 ; inline
-: EDEVERR 83 ; inline
-: EOVERFLOW 84 ; inline
-: EBADEXEC 85 ; inline
-: EBADARCH 86 ; inline
-: ESHLIBVERS 87 ; inline
-: EBADMACHO 88 ; inline
-: ECANCELED 89 ; inline
-: EIDRM 90 ; inline
-: ENOMSG 91 ; inline
-: EILSEQ 92 ; inline
-: ENOATTR 93 ; inline
-: EBADMSG 94 ; inline
-: EMULTIHOP 95 ; inline
-: ENODATA 96 ; inline
-: ENOLINK 97 ; inline
-: ENOSR 98 ; inline
-: ENOSTR 99 ; inline
-: EPROTO 100 ; inline
-: ETIME 101 ; inline
-: EOPNOTSUPP 102 ; inline
-: ENOPOLICY 103 ; inline
+CONSTANT: EPERM 1
+CONSTANT: ENOENT 2
+CONSTANT: ESRCH 3
+CONSTANT: EINTR 4
+CONSTANT: EIO 5
+CONSTANT: ENXIO 6
+CONSTANT: E2BIG 7
+CONSTANT: ENOEXEC 8
+CONSTANT: EBADF 9
+CONSTANT: ECHILD 10
+CONSTANT: EDEADLK 11
+CONSTANT: ENOMEM 12
+CONSTANT: EACCES 13
+CONSTANT: EFAULT 14
+CONSTANT: ENOTBLK 15
+CONSTANT: EBUSY 16
+CONSTANT: EEXIST 17
+CONSTANT: EXDEV 18
+CONSTANT: ENODEV 19
+CONSTANT: ENOTDIR 20
+CONSTANT: EISDIR 21
+CONSTANT: EINVAL 22
+CONSTANT: ENFILE 23
+CONSTANT: EMFILE 24
+CONSTANT: ENOTTY 25
+CONSTANT: ETXTBSY 26
+CONSTANT: EFBIG 27
+CONSTANT: ENOSPC 28
+CONSTANT: ESPIPE 29
+CONSTANT: EROFS 30
+CONSTANT: EMLINK 31
+CONSTANT: EPIPE 32
+CONSTANT: EDOM 33
+CONSTANT: ERANGE 34
+CONSTANT: EAGAIN 35
+ALIAS: EWOULDBLOCK EAGAIN
+CONSTANT: EINPROGRESS 36
+CONSTANT: EALREADY 37
+CONSTANT: ENOTSOCK 38
+CONSTANT: EDESTADDRREQ 39
+CONSTANT: EMSGSIZE 40
+CONSTANT: EPROTOTYPE 41
+CONSTANT: ENOPROTOOPT 42
+CONSTANT: EPROTONOSUPPORT 43
+CONSTANT: ESOCKTNOSUPPORT 44
+CONSTANT: ENOTSUP 45
+CONSTANT: EPFNOSUPPORT 46
+CONSTANT: EAFNOSUPPORT 47
+CONSTANT: EADDRINUSE 48
+CONSTANT: EADDRNOTAVAIL 49
+CONSTANT: ENETDOWN 50
+CONSTANT: ENETUNREACH 51
+CONSTANT: ENETRESET 52
+CONSTANT: ECONNABORTED 53
+CONSTANT: ECONNRESET 54
+CONSTANT: ENOBUFS 55
+CONSTANT: EISCONN 56
+CONSTANT: ENOTCONN 57
+CONSTANT: ESHUTDOWN 58
+CONSTANT: ETOOMANYREFS 59
+CONSTANT: ETIMEDOUT 60
+CONSTANT: ECONNREFUSED 61
+CONSTANT: ELOOP 62
+CONSTANT: ENAMETOOLONG 63
+CONSTANT: EHOSTDOWN 64
+CONSTANT: EHOSTUNREACH 65
+CONSTANT: ENOTEMPTY 66
+CONSTANT: EPROCLIM 67
+CONSTANT: EUSERS 68
+CONSTANT: EDQUOT 69
+CONSTANT: ESTALE 70
+CONSTANT: EREMOTE 71
+CONSTANT: EBADRPC 72
+CONSTANT: ERPCMISMATCH 73
+CONSTANT: EPROGUNAVAIL 74
+CONSTANT: EPROGMISMATCH 75
+CONSTANT: EPROCUNAVAIL 76
+CONSTANT: ENOLCK 77
+CONSTANT: ENOSYS 78
+CONSTANT: EFTYPE 79
+CONSTANT: EAUTH 80
+CONSTANT: ENEEDAUTH 81
+CONSTANT: EPWROFF 82
+CONSTANT: EDEVERR 83
+CONSTANT: EOVERFLOW 84
+CONSTANT: EBADEXEC 85
+CONSTANT: EBADARCH 86
+CONSTANT: ESHLIBVERS 87
+CONSTANT: EBADMACHO 88
+CONSTANT: ECANCELED 89
+CONSTANT: EIDRM 90
+CONSTANT: ENOMSG 91
+CONSTANT: EILSEQ 92
+CONSTANT: ENOATTR 93
+CONSTANT: EBADMSG 94
+CONSTANT: EMULTIHOP 95
+CONSTANT: ENODATA 96
+CONSTANT: ENOLINK 97
+CONSTANT: ENOSR 98
+CONSTANT: ENOSTR 99
+CONSTANT: EPROTO 100
+CONSTANT: ETIME 101
+CONSTANT: EOPNOTSUPP 102
+CONSTANT: ENOPOLICY 103
index 149f35afce1e2fc3390d08650a99da32d16d8301..f124e7f998fa54dcf56a61482e28e6ac7e40ffb3 100644 (file)
@@ -1,7 +1,7 @@
 USING: alien.syntax alien.c-types math vocabs.loader ;
 IN: unix
 
-: FD_SETSIZE 256 ; inline
+CONSTANT: FD_SETSIZE 256
 
 C-STRUCT: addrinfo
     { "int" "flags" }
@@ -20,111 +20,111 @@ C-STRUCT: dirent
     { "__uint8_t"  "d_namlen" }
     { { "char" 256 } "d_name" } ;
 
-: EPERM 1 ; inline
-: ENOENT 2 ; inline
-: ESRCH 3 ; inline
-: EINTR 4 ; inline
-: EIO 5 ; inline
-: ENXIO 6 ; inline
-: E2BIG 7 ; inline
-: ENOEXEC 8 ; inline
-: EBADF 9 ; inline
-: ECHILD 10 ; inline
-: EDEADLK 11 ; inline
-: ENOMEM 12 ; inline
-: EACCES 13 ; inline
-: EFAULT 14 ; inline
-: ENOTBLK 15 ; inline
-: EBUSY 16 ; inline
-: EEXIST 17 ; inline
-: EXDEV 18 ; inline
-: ENODEV 19 ; inline
-: ENOTDIR 20 ; inline
-: EISDIR 21 ; inline
-: EINVAL 22 ; inline
-: ENFILE 23 ; inline
-: EMFILE 24 ; inline
-: ENOTTY 25 ; inline
-: ETXTBSY 26 ; inline
-: EFBIG 27 ; inline
-: ENOSPC 28 ; inline
-: ESPIPE 29 ; inline
-: EROFS 30 ; inline
-: EMLINK 31 ; inline
-: EPIPE 32 ; inline
-: EDOM 33 ; inline
-: ERANGE 34 ; inline
-: EAGAIN 35 ; inline
-: EWOULDBLOCK EAGAIN ; inline
-: EINPROGRESS 36 ; inline
-: EALREADY 37 ; inline
-: ENOTSOCK 38 ; inline
-: EDESTADDRREQ 39 ; inline
-: EMSGSIZE 40 ; inline
-: EPROTOTYPE 41 ; inline
-: ENOPROTOOPT 42 ; inline
-: EPROTONOSUPPORT 43 ; inline
-: ESOCKTNOSUPPORT 44 ; inline
-: EOPNOTSUPP 45 ; inline
-: EPFNOSUPPORT 46 ; inline
-: EAFNOSUPPORT 47 ; inline
-: EADDRINUSE 48 ; inline
-: EADDRNOTAVAIL 49 ; inline
-: ENETDOWN 50 ; inline
-: ENETUNREACH 51 ; inline
-: ENETRESET 52 ; inline
-: ECONNABORTED 53 ; inline
-: ECONNRESET 54 ; inline
-: ENOBUFS 55 ; inline
-: EISCONN 56 ; inline
-: ENOTCONN 57 ; inline
-: ESHUTDOWN 58 ; inline
-: ETOOMANYREFS 59 ; inline
-: ETIMEDOUT 60 ; inline
-: ECONNREFUSED 61 ; inline
-: ELOOP 62 ; inline
-: ENAMETOOLONG 63 ; inline
-: EHOSTDOWN 64 ; inline
-: EHOSTUNREACH 65 ; inline
-: ENOTEMPTY 66 ; inline
-: EPROCLIM 67 ; inline
-: EUSERS 68 ; inline
-: EDQUOT 69 ; inline
-: ESTALE 70 ; inline
-: EREMOTE 71 ; inline
-: EBADRPC 72 ; inline
-: ERPCMISMATCH 73 ; inline
-: EPROGUNAVAIL 74 ; inline
-: EPROGMISMATCH 75 ; inline
-: EPROCUNAVAIL 76 ; inline
-: ENOLCK 77 ; inline
-: ENOSYS 78 ; inline
-: EFTYPE 79 ; inline
-: EAUTH 80 ; inline
-: ENEEDAUTH 81 ; inline
-: EIDRM 82 ; inline
-: ENOMSG 83 ; inline
-: EOVERFLOW 84 ; inline
-: EILSEQ 85 ; inline
-: ENOTSUP 86 ; inline
-: ECANCELED 87 ; inline
-: EBADMSG 88 ; inline
-: ENODATA 89 ; inline
-: ENOSR 90 ; inline
-: ENOSTR 91 ; inline
-: ETIME 92 ; inline
-: ENOATTR 93 ; inline
-: EMULTIHOP 94 ; inline
-: ENOLINK 95 ; inline
-: EPROTO 96 ; inline
-: ELAST 96 ; inline
+CONSTANT: EPERM 1
+CONSTANT: ENOENT 2
+CONSTANT: ESRCH 3
+CONSTANT: EINTR 4
+CONSTANT: EIO 5
+CONSTANT: ENXIO 6
+CONSTANT: E2BIG 7
+CONSTANT: ENOEXEC 8
+CONSTANT: EBADF 9
+CONSTANT: ECHILD 10
+CONSTANT: EDEADLK 11
+CONSTANT: ENOMEM 12
+CONSTANT: EACCES 13
+CONSTANT: EFAULT 14
+CONSTANT: ENOTBLK 15
+CONSTANT: EBUSY 16
+CONSTANT: EEXIST 17
+CONSTANT: EXDEV 18
+CONSTANT: ENODEV 19
+CONSTANT: ENOTDIR 20
+CONSTANT: EISDIR 21
+CONSTANT: EINVAL 22
+CONSTANT: ENFILE 23
+CONSTANT: EMFILE 24
+CONSTANT: ENOTTY 25
+CONSTANT: ETXTBSY 26
+CONSTANT: EFBIG 27
+CONSTANT: ENOSPC 28
+CONSTANT: ESPIPE 29
+CONSTANT: EROFS 30
+CONSTANT: EMLINK 31
+CONSTANT: EPIPE 32
+CONSTANT: EDOM 33
+CONSTANT: ERANGE 34
+CONSTANT: EAGAIN 35
+ALIAS: EWOULDBLOCK EAGAIN
+CONSTANT: EINPROGRESS 36
+CONSTANT: EALREADY 37
+CONSTANT: ENOTSOCK 38
+CONSTANT: EDESTADDRREQ 39
+CONSTANT: EMSGSIZE 40
+CONSTANT: EPROTOTYPE 41
+CONSTANT: ENOPROTOOPT 42
+CONSTANT: EPROTONOSUPPORT 43
+CONSTANT: ESOCKTNOSUPPORT 44
+CONSTANT: EOPNOTSUPP 45
+CONSTANT: EPFNOSUPPORT 46
+CONSTANT: EAFNOSUPPORT 47
+CONSTANT: EADDRINUSE 48
+CONSTANT: EADDRNOTAVAIL 49
+CONSTANT: ENETDOWN 50
+CONSTANT: ENETUNREACH 51
+CONSTANT: ENETRESET 52
+CONSTANT: ECONNABORTED 53
+CONSTANT: ECONNRESET 54
+CONSTANT: ENOBUFS 55
+CONSTANT: EISCONN 56
+CONSTANT: ENOTCONN 57
+CONSTANT: ESHUTDOWN 58
+CONSTANT: ETOOMANYREFS 59
+CONSTANT: ETIMEDOUT 60
+CONSTANT: ECONNREFUSED 61
+CONSTANT: ELOOP 62
+CONSTANT: ENAMETOOLONG 63
+CONSTANT: EHOSTDOWN 64
+CONSTANT: EHOSTUNREACH 65
+CONSTANT: ENOTEMPTY 66
+CONSTANT: EPROCLIM 67
+CONSTANT: EUSERS 68
+CONSTANT: EDQUOT 69
+CONSTANT: ESTALE 70
+CONSTANT: EREMOTE 71
+CONSTANT: EBADRPC 72
+CONSTANT: ERPCMISMATCH 73
+CONSTANT: EPROGUNAVAIL 74
+CONSTANT: EPROGMISMATCH 75
+CONSTANT: EPROCUNAVAIL 76
+CONSTANT: ENOLCK 77
+CONSTANT: ENOSYS 78
+CONSTANT: EFTYPE 79
+CONSTANT: EAUTH 80
+CONSTANT: ENEEDAUTH 81
+CONSTANT: EIDRM 82
+CONSTANT: ENOMSG 83
+CONSTANT: EOVERFLOW 84
+CONSTANT: EILSEQ 85
+CONSTANT: ENOTSUP 86
+CONSTANT: ECANCELED 87
+CONSTANT: EBADMSG 88
+CONSTANT: ENODATA 89
+CONSTANT: ENOSR 90
+CONSTANT: ENOSTR 91
+CONSTANT: ETIME 92
+CONSTANT: ENOATTR 93
+CONSTANT: EMULTIHOP 94
+CONSTANT: ENOLINK 95
+CONSTANT: EPROTO 96
+CONSTANT: ELAST 96
 
 TYPEDEF: __uint8_t sa_family_t
 
-: _UTX_USERSIZE   32 ; inline
-: _UTX_LINESIZE   32 ; inline
-: _UTX_IDSIZE     4 ; inline
-: _UTX_HOSTSIZE   256 ; inline
+CONSTANT: _UTX_USERSIZE   32
+CONSTANT: _UTX_LINESIZE   32
+CONSTANT: _UTX_IDSIZE     4
+CONSTANT: _UTX_HOSTSIZE   256
 
 : _SS_MAXSIZE ( -- n )
     128 ; inline
index a4189775e7430eb4aa66ff582d78cbca8feaff64..e915b6ffcd35b4deab61a9e71af31de26ce60c91 100644 (file)
@@ -1,7 +1,7 @@
 USING: alien.syntax ;
 IN: unix
 
-: FD_SETSIZE 1024 ; inline
+CONSTANT: FD_SETSIZE 1024
 
 C-STRUCT: addrinfo
     { "int" "flags" }
@@ -20,92 +20,92 @@ C-STRUCT: dirent
     { "__uint8_t"  "d_namlen" }
     { { "char" 256 } "d_name" } ;
 
-: EPERM 1 ; inline
-: ENOENT 2 ; inline
-: ESRCH 3 ; inline
-: EINTR 4 ; inline
-: EIO 5 ; inline
-: ENXIO 6 ; inline
-: E2BIG 7 ; inline
-: ENOEXEC 8 ; inline
-: EBADF 9 ; inline
-: ECHILD 10 ; inline
-: EDEADLK 11 ; inline
-: ENOMEM 12 ; inline
-: EACCES 13 ; inline
-: EFAULT 14 ; inline
-: ENOTBLK 15 ; inline
-: EBUSY 16 ; inline
-: EEXIST 17 ; inline
-: EXDEV 18 ; inline
-: ENODEV 19 ; inline
-: ENOTDIR 20 ; inline
-: EISDIR 21 ; inline
-: EINVAL 22 ; inline
-: ENFILE 23 ; inline
-: EMFILE 24 ; inline
-: ENOTTY 25 ; inline
-: ETXTBSY 26 ; inline
-: EFBIG 27 ; inline
-: ENOSPC 28 ; inline
-: ESPIPE 29 ; inline
-: EROFS 30 ; inline
-: EMLINK 31 ; inline
-: EPIPE 32 ; inline
-: EDOM 33 ; inline
-: ERANGE 34 ; inline
-: EAGAIN 35 ; inline
-: EWOULDBLOCK EAGAIN ; inline
-: EINPROGRESS 36 ; inline
-: EALREADY 37 ; inline
-: ENOTSOCK 38 ; inline
-: EDESTADDRREQ 39 ; inline
-: EMSGSIZE 40 ; inline
-: EPROTOTYPE 41 ; inline
-: ENOPROTOOPT 42 ; inline
-: EPROTONOSUPPORT 43 ; inline
-: ESOCKTNOSUPPORT 44 ; inline
-: EOPNOTSUPP 45 ; inline
-: EPFNOSUPPORT 46 ; inline
-: EAFNOSUPPORT 47 ; inline
-: EADDRINUSE 48 ; inline
-: EADDRNOTAVAIL 49 ; inline
-: ENETDOWN 50 ; inline
-: ENETUNREACH 51 ; inline
-: ENETRESET 52 ; inline
-: ECONNABORTED 53 ; inline
-: ECONNRESET 54 ; inline
-: ENOBUFS 55 ; inline
-: EISCONN 56 ; inline
-: ENOTCONN 57 ; inline
-: ESHUTDOWN 58 ; inline
-: ETOOMANYREFS 59 ; inline
-: ETIMEDOUT 60 ; inline
-: ECONNREFUSED 61 ; inline
-: ELOOP 62 ; inline
-: ENAMETOOLONG 63 ; inline
-: EHOSTDOWN 64 ; inline
-: EHOSTUNREACH 65 ; inline
-: ENOTEMPTY 66 ; inline
-: EPROCLIM 67 ; inline
-: EUSERS 68 ; inline
-: EDQUOT 69 ; inline
-: ESTALE 70 ; inline
-: EREMOTE 71 ; inline
-: EBADRPC 72 ; inline
-: ERPCMISMATCH 73 ; inline
-: EPROGUNAVAIL 74 ; inline
-: EPROGMISMATCH 75 ; inline
-: EPROCUNAVAIL 76 ; inline
-: ENOLCK 77 ; inline
-: ENOSYS 78 ; inline
-: EFTYPE 79 ; inline
-: EAUTH 80 ; inline
-: ENEEDAUTH 81 ; inline
-: EIPSEC 82 ; inline
-: ENOATTR 83 ; inline
-: EILSEQ 84 ; inline
-: ENOMEDIUM 85 ; inline
-: EMEDIUMTYPE 86 ; inline
-: EOVERFLOW 87 ; inline
-: ECANCELED 88 ; inline
+CONSTANT: EPERM 1
+CONSTANT: ENOENT 2
+CONSTANT: ESRCH 3
+CONSTANT: EINTR 4
+CONSTANT: EIO 5
+CONSTANT: ENXIO 6
+CONSTANT: E2BIG 7
+CONSTANT: ENOEXEC 8
+CONSTANT: EBADF 9
+CONSTANT: ECHILD 10
+CONSTANT: EDEADLK 11
+CONSTANT: ENOMEM 12
+CONSTANT: EACCES 13
+CONSTANT: EFAULT 14
+CONSTANT: ENOTBLK 15
+CONSTANT: EBUSY 16
+CONSTANT: EEXIST 17
+CONSTANT: EXDEV 18
+CONSTANT: ENODEV 19
+CONSTANT: ENOTDIR 20
+CONSTANT: EISDIR 21
+CONSTANT: EINVAL 22
+CONSTANT: ENFILE 23
+CONSTANT: EMFILE 24
+CONSTANT: ENOTTY 25
+CONSTANT: ETXTBSY 26
+CONSTANT: EFBIG 27
+CONSTANT: ENOSPC 28
+CONSTANT: ESPIPE 29
+CONSTANT: EROFS 30
+CONSTANT: EMLINK 31
+CONSTANT: EPIPE 32
+CONSTANT: EDOM 33
+CONSTANT: ERANGE 34
+CONSTANT: EAGAIN 35
+ALIAS: EWOULDBLOCK EAGAIN
+CONSTANT: EINPROGRESS 36
+CONSTANT: EALREADY 37
+CONSTANT: ENOTSOCK 38
+CONSTANT: EDESTADDRREQ 39
+CONSTANT: EMSGSIZE 40
+CONSTANT: EPROTOTYPE 41
+CONSTANT: ENOPROTOOPT 42
+CONSTANT: EPROTONOSUPPORT 43
+CONSTANT: ESOCKTNOSUPPORT 44
+CONSTANT: EOPNOTSUPP 45
+CONSTANT: EPFNOSUPPORT 46
+CONSTANT: EAFNOSUPPORT 47
+CONSTANT: EADDRINUSE 48
+CONSTANT: EADDRNOTAVAIL 49
+CONSTANT: ENETDOWN 50
+CONSTANT: ENETUNREACH 51
+CONSTANT: ENETRESET 52
+CONSTANT: ECONNABORTED 53
+CONSTANT: ECONNRESET 54
+CONSTANT: ENOBUFS 55
+CONSTANT: EISCONN 56
+CONSTANT: ENOTCONN 57
+CONSTANT: ESHUTDOWN 58
+CONSTANT: ETOOMANYREFS 59
+CONSTANT: ETIMEDOUT 60
+CONSTANT: ECONNREFUSED 61
+CONSTANT: ELOOP 62
+CONSTANT: ENAMETOOLONG 63
+CONSTANT: EHOSTDOWN 64
+CONSTANT: EHOSTUNREACH 65
+CONSTANT: ENOTEMPTY 66
+CONSTANT: EPROCLIM 67
+CONSTANT: EUSERS 68
+CONSTANT: EDQUOT 69
+CONSTANT: ESTALE 70
+CONSTANT: EREMOTE 71
+CONSTANT: EBADRPC 72
+CONSTANT: ERPCMISMATCH 73
+CONSTANT: EPROGUNAVAIL 74
+CONSTANT: EPROGMISMATCH 75
+CONSTANT: EPROCUNAVAIL 76
+CONSTANT: ENOLCK 77
+CONSTANT: ENOSYS 78
+CONSTANT: EFTYPE 79
+CONSTANT: EAUTH 80
+CONSTANT: ENEEDAUTH 81
+CONSTANT: EIPSEC 82
+CONSTANT: ENOATTR 83
+CONSTANT: EILSEQ 84
+CONSTANT: ENOMEDIUM 85
+CONSTANT: EMEDIUMTYPE 86
+CONSTANT: EOVERFLOW 87
+CONSTANT: ECANCELED 88
index ea3265705796daa9aed0052c9d36fab5a3f148a9..e059e1a1844171d3659ab9a87695f07698bd2e05 100644 (file)
@@ -9,7 +9,7 @@ M: unix-error error.
     dup message>> write " (" write errno>> pprint ")" print ;
 
 M: unix-system-call-error error.
-    "Unix system call ``" write dup word>> pprint "'' failed:" print
+    "Unix system call â€œ" write dup word>> pprint "†failed:" print
     nl
     dup message>> write " (" write dup errno>> pprint ")" print
     nl
index 1d9cab577eda8501a5e1e13ad15d8724fb25447e..44d85680a715fd4e35412013f48d2cbbb41877d2 100644 (file)
@@ -3,9 +3,9 @@
 USING: alien.syntax ;
 IN: unix.getfsstat.freebsd
 
-: MNT_WAIT        1       ; inline ! synchronously wait for I/O to complete
-: MNT_NOWAIT      2       ; inline ! start all I/O, but do not wait for it 
-: MNT_LAZY        3       ; inline ! push data not written by filesystem syncer 
-: MNT_SUSPEND     4       ; inline ! Suspend file system after sync 
+CONSTANT: MNT_WAIT        1       ! synchronously wait for I/O to complete
+CONSTANT: MNT_NOWAIT      2       ! start all I/O, but do not wait for it 
+CONSTANT: MNT_LAZY        3       ! push data not written by filesystem syncer 
+CONSTANT: MNT_SUSPEND     4       ! Suspend file system after sync 
 
 FUNCTION: int getfsstat ( statfs* buf, int bufsize, int flags ) ;
index fe39f8556b8131228a8e72a21cc09f8f0e339a4e..0db1bb86ad4b0070a80e8d9db5f51c7c75eadc82 100644 (file)
@@ -3,7 +3,7 @@
 USING: alien.syntax ;
 IN: unix.getfsstat.macosx
 
-: MNT_WAIT    1   ; inline ! synchronously wait for I/O to complete
-: MNT_NOWAIT  2   ; inline ! start all I/O, but do not wait for it
+CONSTANT: MNT_WAIT    1   ! synchronously wait for I/O to complete
+CONSTANT: MNT_NOWAIT  2   ! start all I/O, but do not wait for it
 
 FUNCTION: int getfsstat64 ( statfs* buf, int bufsize, int flags ) ;
index 1c8941a6531f5f8272577a5f3e81b2a85c01e60b..1eca6d7dc391081e412fba43db800e520168ab6f 100644 (file)
@@ -3,8 +3,8 @@
 USING: alien.syntax ;
 IN: unix.getfsstat.netbsd
 
-: MNT_WAIT        1       ; inline ! synchronously wait for I/O to complete
-: MNT_NOWAIT      2       ; inline ! start all I/O, but do not wait for it 
-: MNT_LAZY        3       ; inline ! push data not written by filesystem syncer 
+CONSTANT: MNT_WAIT   1 ! synchronously wait for I/O to complete
+CONSTANT: MNT_NOWAIT 2 ! start all I/O, but do not wait for it 
+CONSTANT: MNT_LAZY   3 ! push data not written by filesystem syncer 
 
 FUNCTION: int getvfsstat ( statfs* buf, int bufsize, int flags ) ;
index 8bf692bd9c3d629a8794ce3ccfa531b934ea87ec..19465d8040163738e65cb82835e4809d79901f9b 100644 (file)
@@ -3,8 +3,8 @@
 USING: alien.syntax ;
 IN: unix.getfsstat.openbsd
 
-: MNT_WAIT        1       ; ! synchronously wait for I/O to complete
-: MNT_NOWAIT      2       ; ! start all I/O, but do not wait for it
-: MNT_LAZY        3       ; ! push data not written by filesystem syncer
+CONSTANT: MNT_WAIT   1 ! synchronously wait for I/O to complete
+CONSTANT: MNT_NOWAIT 2 ! start all I/O, but do not wait for it
+CONSTANT: MNT_LAZY   3 ! push data not written by filesystem syncer
 
 FUNCTION: int getfsstat ( statfs* buf, int bufsize, int flags ) ;
index 18c2e2384a145b2a5d17d07877f8af5ff2473dc7..05b22d341318badae48c51ef00ad20188ed53c74 100644 (file)
@@ -24,8 +24,8 @@ HELP: group-cache
 HELP: group-id
 { $values
      { "string" string }
-     { "id" integer } }
-{ $description "Returns the group id given a group name." } ;
+     { "id/f" "an integer or f" } }
+{ $description "Returns the group id given a group name. Returns " { $link f } " if the group does not exist." } ;
 
 HELP: group-name
 { $values
@@ -36,7 +36,7 @@ HELP: group-name
 HELP: group-struct
 { $values
      { "obj" object }
-     { "group" "a group struct" } }
+     { "group/f" "a group struct or f" } }
 { $description "Returns an alien group struct to be turned into a group tuple by calling subsequent words." } ;
 
 HELP: real-group-id
@@ -83,7 +83,6 @@ ARTICLE: "unix.groups" "Unix groups"
 $nl
 "Listing all groups:"
 { $subsection all-groups }
-"Returning a passwd tuple:"
 "Real groups:"
 { $subsection real-group-name }
 { $subsection real-group-id }
index 7e7ebd902a39db33bcaa4113078a87092c45a86b..2e989b32c0f86cfe3901e8e0cb40029c1049ea5f 100644 (file)
@@ -3,7 +3,6 @@
 USING: tools.test unix.groups kernel strings math ;
 IN: unix.groups.tests
 
-
 [ ] [ all-groups drop ] unit-test
 
 \ all-groups must-infer
@@ -24,3 +23,9 @@ IN: unix.groups.tests
 [ ] [ effective-group-id [ ] with-effective-group ] unit-test
 
 [ ] [ [ ] with-group-cache ] unit-test
+
+[ ] [ real-group-id group-name drop ] unit-test
+
+[ "888888888888888" ] [ 888888888888888 group-name ] unit-test
+[ f ]
+[ "please-oh-please-don't-have-a-group-named-this123lalala" group-struct ] unit-test
index 177949aec9591adf826ef6712a97c1b790f93290..f4d91df245e093d0827e98be102471ead4e3783c 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.c-types alien.strings io.encodings.utf8
-io.unix.backend kernel math sequences splitting unix strings
-combinators.short-circuit byte-arrays combinators qualified
+io.backend.unix kernel math sequences splitting unix strings
+combinators.short-circuit byte-arrays combinators
 accessors math.parser fry assocs namespaces continuations
 unix.users unix.utilities ;
 IN: unix.groups
@@ -13,7 +13,7 @@ TUPLE: group id name passwd members ;
 
 SYMBOL: group-cache
 
-GENERIC: group-struct ( obj -- group )
+GENERIC: group-struct ( obj -- group/f )
 
 <PRIVATE
 
@@ -24,11 +24,14 @@ GENERIC: group-struct ( obj -- group )
     "group" <c-object> tuck 4096
     [ <byte-array> ] keep f <void*> ;
 
-M: integer group-struct ( id -- group )
-    (group-struct) getgrgid_r io-error ;
+: check-group-struct ( group-struct ptr -- group-struct/f )
+    *void* [ drop f ] unless ;
 
-M: string group-struct ( string -- group )
-    (group-struct) getgrnam_r 0 = [ (io-error) ] unless ;
+M: integer group-struct ( id -- group/f )
+    (group-struct) [ getgrgid_r io-error ] keep check-group-struct ;
+
+M: string group-struct ( string -- group/f )
+    (group-struct) [ getgrnam_r io-error ] keep check-group-struct ;
 
 : group-struct>group ( group-struct -- group )
     [ \ group new ] dip
@@ -43,14 +46,14 @@ PRIVATE>
 
 : group-name ( id -- string )
     dup group-cache get [
-        at
+        dupd at* [ name>> nip ] [ drop number>string ] if
     ] [
-        group-struct group-gr_name
+        group-struct [ group-gr_name ] [ f ] if*
     ] if*
     [ nip ] [ number>string ] if* ;
 
-: group-id ( string -- id )
-    group-struct group-gr_gid ;
+: group-id ( string -- id/f )
+    group-struct [ group-gr_gid ] [ f ] if* ;
 
 <PRIVATE
 
@@ -71,7 +74,7 @@ M: string user-groups ( string -- seq )
     (user-groups) ; 
 
 M: integer user-groups ( id -- seq )
-    username (user-groups) ;
+    user-name (user-groups) ;
     
 : all-groups ( -- seq )
     [ getgrent dup ] [ group-struct>group ] [ drop ] produce ;
index edddae2c16dea9afb961248b96768f6a160593a4..1153b997c2edd91de78c0307a632b9a31f8c697d 100644 (file)
@@ -1,4 +1,4 @@
-USE: alien.syntax
+USING: alien.syntax ;
 IN: unix.kqueue
 
 C-STRUCT: kevent
@@ -12,12 +12,12 @@ C-STRUCT: kevent
 
 FUNCTION: int kevent ( int kq, kevent* changelist, int nchanges, kevent* eventlist, int nevents, timespec* timeout ) ;
 
-: EVFILT_READ     -1 ; inline
-: EVFILT_WRITE    -2 ; inline
-: EVFILT_AIO      -3 ; inline ! attached to aio requests
-: EVFILT_VNODE    -4 ; inline ! attached to vnodes
-: EVFILT_PROC     -5 ; inline ! attached to struct proc
-: EVFILT_SIGNAL   -6 ; inline ! attached to struct proc
-: EVFILT_TIMER    -7 ; inline ! timers
-: EVFILT_NETDEV   -8 ; inline ! Mach ports
-: EVFILT_FS       -9 ; inline ! Filesystem events
+CONSTANT: EVFILT_READ     -1
+CONSTANT: EVFILT_WRITE    -2
+CONSTANT: EVFILT_AIO      -3 ! attached to aio requests
+CONSTANT: EVFILT_VNODE    -4 ! attached to vnodes
+CONSTANT: EVFILT_PROC     -5 ! attached to struct proc
+CONSTANT: EVFILT_SIGNAL   -6 ! attached to struct proc
+CONSTANT: EVFILT_TIMER    -7 ! timers
+CONSTANT: EVFILT_NETDEV   -8 ! Mach ports
+CONSTANT: EVFILT_FS       -9 ! Filesystem events
index d7623df8be0954b85446de497a84fb144f04101e..6c3b9ef2cb07bfb05a66fe22dfbb488829eea193 100644 (file)
@@ -9,47 +9,47 @@ IN: unix.kqueue
 FUNCTION: int kqueue ( ) ;
 
 ! actions
-: EV_ADD     HEX: 1 ; inline ! add event to kq (implies enable)
-: EV_DELETE  HEX: 2 ; inline ! delete event from kq
-: EV_ENABLE  HEX: 4 ; inline ! enable event
-: EV_DISABLE HEX: 8 ; inline ! disable event (not reported)
+CONSTANT: EV_ADD     HEX: 1 ! add event to kq (implies enable)
+CONSTANT: EV_DELETE  HEX: 2 ! delete event from kq
+CONSTANT: EV_ENABLE  HEX: 4 ! enable event
+CONSTANT: EV_DISABLE HEX: 8 ! disable event (not reported)
 
 ! flags
-: EV_ONESHOT HEX: 10 ; inline ! only report one occurrence
-: EV_CLEAR   HEX: 20 ; inline ! clear event state after reporting
+CONSTANT: EV_ONESHOT HEX: 10 ! only report one occurrence
+CONSTANT: EV_CLEAR   HEX: 20 ! clear event state after reporting
 
-: EV_SYSFLAGS HEX: f000 ; inline ! reserved by system
-: EV_FLAG0    HEX: 1000 ; inline ! filter-specific flag
-: EV_FLAG1    HEX: 2000 ; inline ! filter-specific flag
+CONSTANT: EV_SYSFLAGS HEX: f000 ! reserved by system
+CONSTANT: EV_FLAG0    HEX: 1000 ! filter-specific flag
+CONSTANT: EV_FLAG1    HEX: 2000 ! filter-specific flag
 
 ! returned values
-: EV_EOF          HEX: 8000 ; inline ! EOF detected
-: EV_ERROR        HEX: 4000 ; inline ! error, data contains errno
-
-: EV_POLL EV_FLAG0 ; inline
-: EV_OOBAND EV_FLAG1 ; inline
-
-: NOTE_LOWAT      HEX: 00000001 ; inline ! low water mark
-
-: NOTE_DELETE     HEX: 00000001 ; inline ! vnode was removed
-: NOTE_WRITE      HEX: 00000002 ; inline ! data contents changed
-: NOTE_EXTEND     HEX: 00000004 ; inline ! size increased
-: NOTE_ATTRIB     HEX: 00000008 ; inline ! attributes changed
-: NOTE_LINK       HEX: 00000010 ; inline ! link count changed
-: NOTE_RENAME     HEX: 00000020 ; inline ! vnode was renamed
-: NOTE_REVOKE     HEX: 00000040 ; inline ! vnode access was revoked
-
-: NOTE_EXIT       HEX: 80000000 ; inline ! process exited
-: NOTE_FORK       HEX: 40000000 ; inline ! process forked
-: NOTE_EXEC       HEX: 20000000 ; inline ! process exec'd
-: NOTE_PCTRLMASK  HEX: f0000000 ; inline ! mask for hint bits
-: NOTE_PDATAMASK  HEX: 000fffff ; inline ! mask for pid
-
-: NOTE_SECONDS    HEX: 00000001 ; inline ! data is seconds
-: NOTE_USECONDS   HEX: 00000002 ; inline ! data is microseconds
-: NOTE_NSECONDS   HEX: 00000004 ; inline ! data is nanoseconds
-: NOTE_ABSOLUTE   HEX: 00000008 ; inline ! absolute timeout
-
-: NOTE_TRACK      HEX: 00000001 ; inline ! follow across forks
-: NOTE_TRACKERR   HEX: 00000002 ; inline ! could not track child
-: NOTE_CHILD      HEX: 00000004 ; inline ! am a child process
+CONSTANT: EV_EOF          HEX: 8000 ! EOF detected
+CONSTANT: EV_ERROR        HEX: 4000 ! error, data contains errno
+
+ALIAS: EV_POLL EV_FLAG0
+ALIAS: EV_OOBAND EV_FLAG1
+
+CONSTANT: NOTE_LOWAT      HEX: 00000001 ! low water mark
+
+CONSTANT: NOTE_DELETE     HEX: 00000001 ! vnode was removed
+CONSTANT: NOTE_WRITE      HEX: 00000002 ! data contents changed
+CONSTANT: NOTE_EXTEND     HEX: 00000004 ! size increased
+CONSTANT: NOTE_ATTRIB     HEX: 00000008 ! attributes changed
+CONSTANT: NOTE_LINK       HEX: 00000010 ! link count changed
+CONSTANT: NOTE_RENAME     HEX: 00000020 ! vnode was renamed
+CONSTANT: NOTE_REVOKE     HEX: 00000040 ! vnode access was revoked
+
+CONSTANT: NOTE_EXIT       HEX: 80000000 ! process exited
+CONSTANT: NOTE_FORK       HEX: 40000000 ! process forked
+CONSTANT: NOTE_EXEC       HEX: 20000000 ! process exec'd
+CONSTANT: NOTE_PCTRLMASK  HEX: f0000000 ! mask for hint bits
+CONSTANT: NOTE_PDATAMASK  HEX: 000fffff ! mask for pid
+
+CONSTANT: NOTE_SECONDS    HEX: 00000001 ! data is seconds
+CONSTANT: NOTE_USECONDS   HEX: 00000002 ! data is microseconds
+CONSTANT: NOTE_NSECONDS   HEX: 00000004 ! data is nanoseconds
+CONSTANT: NOTE_ABSOLUTE   HEX: 00000008 ! absolute timeout
+
+CONSTANT: NOTE_TRACK      HEX: 00000001 ! follow across forks
+CONSTANT: NOTE_TRACKERR   HEX: 00000002 ! could not track child
+CONSTANT: NOTE_CHILD      HEX: 00000004 ! am a child process
index 7dc2a79c09f78ef743fd9749567a28f0736f3c5c..843a0afad921741408457b6c0ccc5cf716ada8c3 100644 (file)
@@ -1,4 +1,4 @@
-USE: alien.syntax
+USING: alien.syntax ;
 IN: unix.kqueue
 
 C-STRUCT: kevent
@@ -12,12 +12,12 @@ C-STRUCT: kevent
 
 FUNCTION: int kevent ( int kq, kevent* changelist, int nchanges, kevent* eventlist, int nevents, timespec* timeout ) ;
 
-: EVFILT_READ     -1 ; inline
-: EVFILT_WRITE    -2 ; inline
-: EVFILT_AIO      -3 ; inline ! attached to aio requests
-: EVFILT_VNODE    -4 ; inline ! attached to vnodes
-: EVFILT_PROC     -5 ; inline ! attached to struct proc
-: EVFILT_SIGNAL   -6 ; inline ! attached to struct proc
-: EVFILT_TIMER    -7 ; inline ! timers
-: EVFILT_MACHPORT -8 ; inline ! Mach ports
-: EVFILT_FS       -9 ; inline ! Filesystem events
+CONSTANT: EVFILT_READ     -1
+CONSTANT: EVFILT_WRITE    -2
+CONSTANT: EVFILT_AIO      -3 ! attached to aio requests
+CONSTANT: EVFILT_VNODE    -4 ! attached to vnodes
+CONSTANT: EVFILT_PROC     -5 ! attached to struct proc
+CONSTANT: EVFILT_SIGNAL   -6 ! attached to struct proc
+CONSTANT: EVFILT_TIMER    -7 ! timers
+CONSTANT: EVFILT_MACHPORT -8 ! Mach ports
+CONSTANT: EVFILT_FS       -9 ! Filesystem events
index e3fc11a688c8ec588f4ca2dc24eb5b80593668df..7ba942d712e4c74f33a848a07c896e861fd1de4a 100644 (file)
@@ -1,4 +1,4 @@
-USE: alien.syntax
+USING: alien.syntax ;
 IN: unix.kqueue
 
 C-STRUCT: kevent
@@ -12,11 +12,11 @@ C-STRUCT: kevent
 
 FUNCTION: int kevent ( int kq, kevent* changelist, size_t nchanges, kevent* eventlist, size_t nevents, timespec* timeout ) ;
 
-: EVFILT_READ     0 ; inline
-: EVFILT_WRITE    1 ; inline
-: EVFILT_AIO      2 ; inline ! attached to aio requests
-: EVFILT_VNODE    3 ; inline ! attached to vnodes
-: EVFILT_PROC     4 ; inline ! attached to struct proc
-: EVFILT_SIGNAL   5 ; inline ! attached to struct proc
-: EVFILT_TIMER    6 ; inline ! timers
-: EVFILT_SYSCOUNT 7 ; inline ! Filesystem events
+CONSTANT: EVFILT_READ     0
+CONSTANT: EVFILT_WRITE    1
+CONSTANT: EVFILT_AIO      2 ! attached to aio requests
+CONSTANT: EVFILT_VNODE    3 ! attached to vnodes
+CONSTANT: EVFILT_PROC     4 ! attached to struct proc
+CONSTANT: EVFILT_SIGNAL   5 ! attached to struct proc
+CONSTANT: EVFILT_TIMER    6 ! timers
+CONSTANT: EVFILT_SYSCOUNT 7 ! Filesystem events
index bc4be88c42311cbd3f6c7fb18a40aa8cd818fcb5..c62ba05a4c599ff2f7433d31357594868e955439 100644 (file)
@@ -1,4 +1,4 @@
-USE: alien.syntax
+USING: alien.syntax ;
 IN: unix.kqueue
 
 C-STRUCT: kevent
@@ -12,10 +12,10 @@ C-STRUCT: kevent
 
 FUNCTION: int kevent ( int kq, kevent* changelist, int nchanges, kevent* eventlist, int nevents, timespec* timeout ) ;
 
-: EVFILT_READ     -1 ; inline
-: EVFILT_WRITE    -2 ; inline
-: EVFILT_AIO      -3 ; inline ! attached to aio requests
-: EVFILT_VNODE    -4 ; inline ! attached to vnodes
-: EVFILT_PROC     -5 ; inline ! attached to struct proc
-: EVFILT_SIGNAL   -6 ; inline ! attached to struct proc
-: EVFILT_TIMER    -7 ; inline ! timers
+CONSTANT: EVFILT_READ     -1
+CONSTANT: EVFILT_WRITE    -2
+CONSTANT: EVFILT_AIO      -3 ! attached to aio requests
+CONSTANT: EVFILT_VNODE    -4 ! attached to vnodes
+CONSTANT: EVFILT_PROC     -5 ! attached to struct proc
+CONSTANT: EVFILT_SIGNAL   -6 ! attached to struct proc
+CONSTANT: EVFILT_TIMER    -7 ! timers
index 72935807c320c5e52747fa32912c9ac55156607a..7c68dfa45a8124b4e6a22220e90a8a1e928fdc9d 100644 (file)
@@ -14,19 +14,19 @@ C-STRUCT: epoll-event
 
 FUNCTION: int epoll_wait ( int epfd, epoll_event* events, int maxevents, int timeout ) ;
 
-: EPOLL_CTL_ADD 1 ; inline ! Add a file decriptor to the interface.
-: EPOLL_CTL_DEL 2 ; inline ! Remove a file decriptor from the interface.
-: EPOLL_CTL_MOD 3 ; inline ! Change file decriptor epoll_event structure.
+CONSTANT: EPOLL_CTL_ADD 1 ! Add a file decriptor to the interface.
+CONSTANT: EPOLL_CTL_DEL 2 ! Remove a file decriptor from the interface.
+CONSTANT: EPOLL_CTL_MOD 3 ! Change file decriptor epoll_event structure.
 
-: EPOLLIN      HEX: 001 ; inline
-: EPOLLPRI     HEX: 002 ; inline
-: EPOLLOUT     HEX: 004 ; inline
-: EPOLLRDNORM  HEX: 040 ; inline
-: EPOLLRDBAND  HEX: 080 ; inline
-: EPOLLWRNORM  HEX: 100 ; inline
-: EPOLLWRBAND  HEX: 200 ; inline
-: EPOLLMSG     HEX: 400 ; inline
-: EPOLLERR     HEX: 008 ; inline
-: EPOLLHUP     HEX: 010 ; inline
-: EPOLLONESHOT 30 2^    ; inline
-: EPOLLET      31 2^    ; inline
+CONSTANT: EPOLLIN      HEX: 001
+CONSTANT: EPOLLPRI     HEX: 002
+CONSTANT: EPOLLOUT     HEX: 004
+CONSTANT: EPOLLRDNORM  HEX: 040
+CONSTANT: EPOLLRDBAND  HEX: 080
+CONSTANT: EPOLLWRNORM  HEX: 100
+CONSTANT: EPOLLWRBAND  HEX: 200
+CONSTANT: EPOLLMSG     HEX: 400
+CONSTANT: EPOLLERR     HEX: 008
+CONSTANT: EPOLLHUP     HEX: 010
+: EPOLLONESHOT ( -- n ) 30 2^ ; inline
+: EPOLLET      ( -- n ) 31 2^ ; inline
diff --git a/basis/unix/linux/fs/authors.txt b/basis/unix/linux/fs/authors.txt
deleted file mode 100755 (executable)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/basis/unix/linux/fs/fs.factor b/basis/unix/linux/fs/fs.factor
deleted file mode 100644 (file)
index 6cb9f68..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-USING: alien.syntax ;
-IN: unix.linux.fs
-
-: MS_RDONLY             1    ; ! Mount read-only.
-: MS_NOSUID             2    ; ! Ignore suid and sgid bits.
-: MS_NODEV              4    ; ! Disallow access to device special files.
-: MS_NOEXEC             8    ; ! Disallow program execution.
-: MS_SYNCHRONOUS        16   ; ! Writes are synced at once.
-: MS_REMOUNT            32   ; ! Alter flags of a mounted FS.
-: MS_MANDLOCK           64   ; ! Allow mandatory locks on an FS.
-: S_WRITE               128  ; ! Write on file/directory/symlink.
-: S_APPEND              256  ; ! Append-only file.
-: S_IMMUTABLE           512  ; ! Immutable file.
-: MS_NOATIME            1024 ; ! Do not update access times.
-: MS_NODIRATIME         2048 ; ! Do not update directory access times.
-: MS_BIND               4096 ; ! Bind directory at different place.
-
-FUNCTION: int mount
-( char* special_file, char* dir, char* fstype, ulong options, void* data ) ;
-
-! FUNCTION: int umount2 ( char* file, int flags ) ;
-
-FUNCTION: int umount ( char* file ) ;
diff --git a/basis/unix/linux/fs/tags.txt b/basis/unix/linux/fs/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/unix/linux/if/authors.txt b/basis/unix/linux/if/authors.txt
deleted file mode 100755 (executable)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/basis/unix/linux/if/if.factor b/basis/unix/linux/if/if.factor
deleted file mode 100644 (file)
index 0a90883..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-
-USING: alien.syntax ;
-
-IN: unix.linux.if
-
-: IFNAMSIZ    16 ;
-: IF_NAMESIZE 16 ;
-: IFHWADDRLEN 6 ;
-
-! Standard interface flags (netdevice->flags)
-
-: IFF_UP          HEX: 1 ;             ! interface is up
-: IFF_BROADCAST   HEX: 2 ;             ! broadcast address valid
-: IFF_DEBUG      HEX: 4 ;              ! turn on debugging
-: IFF_LOOPBACK           HEX: 8 ;              ! is a loopback net
-: IFF_POINTOPOINT HEX: 10 ;            ! interface is has p-p link
-: IFF_NOTRAILERS  HEX: 20 ;            ! avoid use of trailers
-: IFF_RUNNING    HEX: 40 ;             ! interface running and carrier ok
-: IFF_NOARP      HEX: 80 ;             ! no ARP protocol
-: IFF_PROMISC    HEX: 100 ;            ! receive all packets
-: IFF_ALLMULTI           HEX: 200 ;            ! receive all multicast packets
-
-: IFF_MASTER     HEX: 400 ;            ! master of a load balancer
-: IFF_SLAVE      HEX: 800 ;            ! slave of a load balancer
-
-: IFF_MULTICAST   HEX: 1000 ;          ! Supports multicast
-
-! #define IFF_VOLATILE
-! (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_MASTER|IFF_SLAVE|IFF_RUNNING)
-
-: IFF_PORTSEL     HEX: 2000 ;           ! can set media type
-: IFF_AUTOMEDIA   HEX: 4000 ;          ! auto media select active
-: IFF_DYNAMIC    HEX: 8000 ;           ! dialup device with changing addresses
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-C-STRUCT: struct-ifmap
-  { "ulong" "mem-start" }
-  { "ulong" "mem-end" }
-  { "ushort" "base-addr" }
-  { "uchar" "irq" }
-  { "uchar" "dma" }
-  { "uchar" "port" } ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-! Hmm... the generic sockaddr type isn't defined anywhere.
-! Put it here for now.
-
-TYPEDEF: ushort sa_family_t
-
-C-STRUCT: struct-sockaddr
-  { "sa_family_t" "sa_family" }
-  { { "char" 14 } "sa_data" } ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-! C-UNION: union-ifr-ifrn { "char" IFNAMSIZ } ;
-
-C-UNION: union-ifr-ifrn { "char" 16 } ;
-
-C-UNION: union-ifr-ifru
- "struct-sockaddr"
-!   "sockaddr"
-  "short"
-  "int"
-  "struct-ifmap"
-!   { "char" IFNAMSIZ }
-  { "char" 16 }
-  "caddr_t" ;
-
-C-STRUCT: struct-ifreq
-  { "union-ifr-ifrn" "ifr-ifrn" }
-  { "union-ifr-ifru" "ifr-ifru" } ;
-
-: ifr-name      ( struct-ifreq -- value ) struct-ifreq-ifr-ifrn ;
-
-: ifr-hwaddr   ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
-: ifr-addr     ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
-: ifr-dstaddr  ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
-: ifr-broadaddr ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
-: ifr-netmask  ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
-: ifr-flags    ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-C-UNION: union-ifc-ifcu "caddr_t" "struct-ifreq*" ;
-
-C-STRUCT: struct-ifconf
-  { "int" "ifc-len" }
-  { "union-ifc-ifcu" "ifc-ifcu" } ;
-
-: ifc-len ( struct-ifconf -- value ) struct-ifconf-ifc-len ;
-
-: ifc-buf ( struct-ifconf -- value ) struct-ifconf-ifc-ifcu ;
-: ifc-req ( struct-ifconf -- value ) struct-ifconf-ifc-ifcu ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
\ No newline at end of file
diff --git a/basis/unix/linux/if/tags.txt b/basis/unix/linux/if/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/unix/linux/ifreq/authors.txt b/basis/unix/linux/ifreq/authors.txt
deleted file mode 100755 (executable)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/basis/unix/linux/ifreq/ifreq.factor b/basis/unix/linux/ifreq/ifreq.factor
deleted file mode 100644 (file)
index 5dc1c0f..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-
-USING: kernel alien alien.c-types
-       io.sockets
-       unix
-       unix.linux.sockios
-       unix.linux.if ;
-
-IN: unix.linux.ifreq
-
-: set-if-addr ( name addr -- )
-  "struct-ifreq" <c-object>
-  rot  ascii string>alien       over set-struct-ifreq-ifr-ifrn
-  swap 0 <inet4> make-sockaddr  over set-struct-ifreq-ifr-ifru
-
-  AF_INET SOCK_DGRAM 0 socket SIOCSIFADDR rot ioctl drop ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: set-if-flags ( name flags -- )
-  "struct-ifreq" <c-object>
-  rot  ascii string>alien over set-struct-ifreq-ifr-ifrn
-  swap <short>          over set-struct-ifreq-ifr-ifru
-
-  AF_INET SOCK_DGRAM 0 socket SIOCSIFFLAGS rot ioctl drop ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: set-if-dst-addr ( name addr -- )
-  "struct-ifreq" <c-object>
-  rot  ascii string>alien       over set-struct-ifreq-ifr-ifrn
-  swap 0 <inet4> make-sockaddr  over set-struct-ifreq-ifr-ifru
-
-  AF_INET SOCK_DGRAM 0 socket SIOCSIFDSTADDR rot ioctl drop ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: set-if-brd-addr ( name addr -- )
-  "struct-ifreq" <c-object>
-  rot  ascii string>alien       over set-struct-ifreq-ifr-ifrn
-  swap 0 <inet4> make-sockaddr  over set-struct-ifreq-ifr-ifru
-
-  AF_INET SOCK_DGRAM 0 socket SIOCSIFBRDADDR rot ioctl drop ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: set-if-netmask ( name addr -- )
-  "struct-ifreq" <c-object>
-  rot  ascii string>alien       over set-struct-ifreq-ifr-ifrn
-  swap 0 <inet4> make-sockaddr  over set-struct-ifreq-ifr-ifru
-
-  AF_INET SOCK_DGRAM 0 socket SIOCSIFNETMASK rot ioctl drop ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: set-if-metric ( name metric -- )
-  "struct-ifreq" <c-object>
-  rot ascii string>alien over set-struct-ifreq-ifr-ifrn
-  swap <int>           over set-struct-ifreq-ifr-ifru
-
-  AF_INET SOCK_DGRAM 0 socket SIOCSIFMETRIC rot ioctl drop ;
\ No newline at end of file
diff --git a/basis/unix/linux/ifreq/tags.txt b/basis/unix/linux/ifreq/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
index 3385e454d2891d3dab207e7adc4522ae3cd3eca2..e3d40b5b2837acd1dd162c789ab5b6ad7f39ca1b 100644 (file)
@@ -11,31 +11,31 @@ C-STRUCT: inotify-event
     { "char[0]" "name" } ! stub for possible name\r
     ;\r
 \r
-: IN_ACCESS HEX: 1 ; inline         ! File was accessed\r
-: IN_MODIFY HEX: 2 ; inline         ! File was modified\r
-: IN_ATTRIB HEX: 4 ; inline         ! Metadata changed\r
-: IN_CLOSE_WRITE HEX: 8 ; inline    ! Writtable file was closed\r
-: IN_CLOSE_NOWRITE HEX: 10 ; inline ! Unwrittable file closed\r
-: IN_OPEN HEX: 20 ; inline          ! File was opened\r
-: IN_MOVED_FROM HEX: 40 ; inline    ! File was moved from X\r
-: IN_MOVED_TO HEX: 80 ; inline      ! File was moved to Y\r
-: IN_CREATE HEX: 100 ; inline       ! Subfile was created\r
-: IN_DELETE HEX: 200 ; inline       ! Subfile was deleted\r
-: IN_DELETE_SELF HEX: 400 ; inline  ! Self was deleted\r
-: IN_MOVE_SELF HEX: 800 ; inline    ! Self was moved\r
-\r
-: IN_UNMOUNT HEX: 2000 ; inline     ! Backing fs was unmounted\r
-: IN_Q_OVERFLOW HEX: 4000 ; inline  ! Event queued overflowed\r
-: IN_IGNORED HEX: 8000 ; inline     ! File was ignored\r
+CONSTANT: IN_ACCESS HEX: 1         ! File was accessed\r
+CONSTANT: IN_MODIFY HEX: 2         ! File was modified\r
+CONSTANT: IN_ATTRIB HEX: 4         ! Metadata changed\r
+CONSTANT: IN_CLOSE_WRITE HEX: 8    ! Writtable file was closed\r
+CONSTANT: IN_CLOSE_NOWRITE HEX: 10 ! Unwrittable file closed\r
+CONSTANT: IN_OPEN HEX: 20          ! File was opened\r
+CONSTANT: IN_MOVED_FROM HEX: 40    ! File was moved from X\r
+CONSTANT: IN_MOVED_TO HEX: 80      ! File was moved to Y\r
+CONSTANT: IN_CREATE HEX: 100       ! Subfile was created\r
+CONSTANT: IN_DELETE HEX: 200       ! Subfile was deleted\r
+CONSTANT: IN_DELETE_SELF HEX: 400  ! Self was deleted\r
+CONSTANT: IN_MOVE_SELF HEX: 800    ! Self was moved\r
+\r
+CONSTANT: IN_UNMOUNT HEX: 2000     ! Backing fs was unmounted\r
+CONSTANT: IN_Q_OVERFLOW HEX: 4000  ! Event queued overflowed\r
+CONSTANT: IN_IGNORED HEX: 8000     ! File was ignored\r
 \r
 : IN_CLOSE ( -- n ) IN_CLOSE_WRITE IN_CLOSE_NOWRITE bitor ; inline ! close\r
-: IN_MOVE ( -- n ) IN_MOVED_FROM IN_MOVED_TO bitor ; inline        ! moves\r
+: IN_MOVE ( -- n ) IN_MOVED_FROM IN_MOVED_TO bitor        ; inline ! moves\r
 \r
-: IN_ONLYDIR HEX: 1000000 ; inline     ! only watch the path if it is a directory\r
-: IN_DONT_FOLLOW HEX: 2000000 ; inline ! don't follow a sym link\r
-: IN_MASK_ADD HEX: 20000000 ; inline   ! add to the mask of an already existing watch\r
-: IN_ISDIR HEX: 40000000 ; inline      ! event occurred against dir\r
-: IN_ONESHOT HEX: 80000000 ; inline    ! only send event once\r
+CONSTANT: IN_ONLYDIR HEX: 1000000     ! only watch the path if it is a directory\r
+CONSTANT: IN_DONT_FOLLOW HEX: 2000000 ! don't follow a sym link\r
+CONSTANT: IN_MASK_ADD HEX: 20000000   ! add to the mask of an already existing watch\r
+CONSTANT: IN_ISDIR HEX: 40000000      ! event occurred against dir\r
+CONSTANT: IN_ONESHOT HEX: 80000000    ! only send event once\r
 \r
 : IN_CHANGE_EVENTS ( -- n )\r
     {\r
index 7a77dc9316788c9fddfb2d12280db62b53af4089..0cf33be1bf3514cfa99c832c47913a65cd688d57 100644 (file)
@@ -5,32 +5,33 @@ IN: unix
 
 ! Linux.
 
-: MAXPATHLEN 1024 ; inline
+CONSTANT: MAXPATHLEN 1024
 
-: O_RDONLY   HEX: 0000 ; inline
-: O_WRONLY   HEX: 0001 ; inline
-: O_RDWR     HEX: 0002 ; inline
-: O_CREAT    HEX: 0040 ; inline
-: O_EXCL     HEX: 0080 ; inline
-: O_NOCTTY   HEX: 0100 ; inline
-: O_TRUNC    HEX: 0200 ; inline
-: O_APPEND   HEX: 0400 ; inline
-: O_NONBLOCK HEX: 0800 ; inline
-: O_NDELAY O_NONBLOCK ; inline
+CONSTANT: O_RDONLY   HEX: 0000
+CONSTANT: O_WRONLY   HEX: 0001
+CONSTANT: O_RDWR     HEX: 0002
+CONSTANT: O_CREAT    HEX: 0040
+CONSTANT: O_EXCL     HEX: 0080
+CONSTANT: O_NOCTTY   HEX: 0100
+CONSTANT: O_TRUNC    HEX: 0200
+CONSTANT: O_APPEND   HEX: 0400
+CONSTANT: O_NONBLOCK HEX: 0800
 
-: SOL_SOCKET 1 ; inline
+ALIAS: O_NDELAY O_NONBLOCK
 
-: FD_SETSIZE 1024 ; inline
+CONSTANT: SOL_SOCKET 1
 
-: SO_REUSEADDR 2 ; inline
-: SO_OOBINLINE 10 ; inline
-: SO_SNDTIMEO HEX: 15 ; inline
-: SO_RCVTIMEO HEX: 14 ; inline
+CONSTANT: FD_SETSIZE 1024
 
-: F_SETFD 2 ; inline
-: FD_CLOEXEC 1 ; inline
+CONSTANT: SO_REUSEADDR 2
+CONSTANT: SO_OOBINLINE 10
+CONSTANT: SO_SNDTIMEO HEX: 15
+CONSTANT: SO_RCVTIMEO HEX: 14
 
-: F_SETFL 4 ; inline
+CONSTANT: F_SETFD 2
+CONSTANT: FD_CLOEXEC 1
+
+CONSTANT: F_SETFL 4
 
 C-STRUCT: addrinfo
     { "int" "flags" }
@@ -55,33 +56,33 @@ C-STRUCT: sockaddr-in6
     { { "uchar" 16 } "addr" }
     { "uint" "scopeid" } ;
 
-: max-un-path 108 ; inline
+CONSTANT: max-un-path 108
 
 C-STRUCT: sockaddr-un
     { "ushort" "family" }
     { { "char" max-un-path } "path" } ;
 
-: SOCK_STREAM 1 ; inline
-: SOCK_DGRAM 2 ; inline
+CONSTANT: SOCK_STREAM 1
+CONSTANT: SOCK_DGRAM 2
 
-: AF_UNSPEC 0 ; inline
-: AF_UNIX 1 ; inline
-: AF_INET 2 ; inline
-: AF_INET6 10 ; inline
+CONSTANT: AF_UNSPEC 0
+CONSTANT: AF_UNIX 1
+CONSTANT: AF_INET 2
+CONSTANT: AF_INET6 10
 
-: PF_UNSPEC AF_UNSPEC ; inline
-: PF_UNIX AF_UNIX ; inline
-: PF_INET AF_INET ; inline
-: PF_INET6 AF_INET6 ; inline
+ALIAS: PF_UNSPEC AF_UNSPEC
+ALIAS: PF_UNIX AF_UNIX
+ALIAS: PF_INET AF_INET
+ALIAS: PF_INET6 AF_INET6
 
-: IPPROTO_TCP 6 ; inline
-: IPPROTO_UDP 17 ; inline
+CONSTANT: IPPROTO_TCP 6
+CONSTANT: IPPROTO_UDP 17
 
-: AI_PASSIVE 1 ; inline
+CONSTANT: AI_PASSIVE 1
 
-: SEEK_SET 0 ; inline
-: SEEK_CUR 1 ; inline
-: SEEK_END 2 ; inline
+CONSTANT: SEEK_SET 0
+CONSTANT: SEEK_CUR 1
+CONSTANT: SEEK_END 2
 
 C-STRUCT: passwd
     { "char*"  "pw_name" }
@@ -99,134 +100,134 @@ C-STRUCT: dirent
     { "uchar" "d_type" }
     { { "char" 256 } "d_name" } ;
 
-: EPERM 1 ; inline
-: ENOENT 2 ; inline
-: ESRCH 3 ; inline
-: EINTR 4 ; inline
-: EIO 5 ; inline
-: ENXIO 6 ; inline
-: E2BIG 7 ; inline
-: ENOEXEC 8 ; inline
-: EBADF 9 ; inline
-: ECHILD 10 ; inline
-: EAGAIN 11 ; inline
-: ENOMEM 12 ; inline
-: EACCES 13 ; inline
-: EFAULT 14 ; inline
-: ENOTBLK 15 ; inline
-: EBUSY 16 ; inline
-: EEXIST 17 ; inline
-: EXDEV 18 ; inline
-: ENODEV 19 ; inline
-: ENOTDIR 20 ; inline
-: EISDIR 21 ; inline
-: EINVAL 22 ; inline
-: ENFILE 23 ; inline
-: EMFILE 24 ; inline
-: ENOTTY 25 ; inline
-: ETXTBSY 26 ; inline
-: EFBIG 27 ; inline
-: ENOSPC 28 ; inline
-: ESPIPE 29 ; inline
-: EROFS 30 ; inline
-: EMLINK 31 ; inline
-: EPIPE 32 ; inline
-: EDOM 33 ; inline
-: ERANGE 34 ; inline
-: EDEADLK 35 ; inline
-: ENAMETOOLONG 36 ; inline
-: ENOLCK 37 ; inline
-: ENOSYS 38 ; inline
-: ENOTEMPTY 39 ; inline
-: ELOOP 40 ; inline
-: EWOULDBLOCK EAGAIN ; inline
-: ENOMSG 42 ; inline
-: EIDRM 43 ; inline
-: ECHRNG 44 ; inline
-: EL2NSYNC 45 ; inline
-: EL3HLT 46 ; inline
-: EL3RST 47 ; inline
-: ELNRNG 48 ; inline
-: EUNATCH 49 ; inline
-: ENOCSI 50 ; inline
-: EL2HLT 51 ; inline
-: EBADE 52 ; inline
-: EBADR 53 ; inline
-: EXFULL 54 ; inline
-: ENOANO 55 ; inline
-: EBADRQC 56 ; inline
-: EBADSLT 57 ; inline
-: EDEADLOCK EDEADLK ; inline
-: EBFONT 59 ; inline
-: ENOSTR 60 ; inline
-: ENODATA 61 ; inline
-: ETIME 62 ; inline
-: ENOSR 63 ; inline
-: ENONET 64 ; inline
-: ENOPKG 65 ; inline
-: EREMOTE 66 ; inline
-: ENOLINK 67 ; inline
-: EADV 68 ; inline
-: ESRMNT 69 ; inline
-: ECOMM 70 ; inline
-: EPROTO 71 ; inline
-: EMULTIHOP 72 ; inline
-: EDOTDOT 73 ; inline
-: EBADMSG 74 ; inline
-: EOVERFLOW 75 ; inline
-: ENOTUNIQ 76 ; inline
-: EBADFD 77 ; inline
-: EREMCHG 78 ; inline
-: ELIBACC 79 ; inline
-: ELIBBAD 80 ; inline
-: ELIBSCN 81 ; inline
-: ELIBMAX 82 ; inline
-: ELIBEXEC 83 ; inline
-: EILSEQ 84 ; inline
-: ERESTART 85 ; inline
-: ESTRPIPE 86 ; inline
-: EUSERS 87 ; inline
-: ENOTSOCK 88 ; inline
-: EDESTADDRREQ 89 ; inline
-: EMSGSIZE 90 ; inline
-: EPROTOTYPE 91 ; inline
-: ENOPROTOOPT 92 ; inline
-: EPROTONOSUPPORT 93 ; inline
-: ESOCKTNOSUPPORT 94 ; inline
-: EOPNOTSUPP 95 ; inline
-: EPFNOSUPPORT 96 ; inline
-: EAFNOSUPPORT 97 ; inline
-: EADDRINUSE 98 ; inline
-: EADDRNOTAVAIL 99 ; inline
-: ENETDOWN 100 ; inline
-: ENETUNREACH 101 ; inline
-: ENETRESET 102 ; inline
-: ECONNABORTED 103 ; inline
-: ECONNRESET 104 ; inline
-: ENOBUFS 105 ; inline
-: EISCONN 106 ; inline
-: ENOTCONN 107 ; inline
-: ESHUTDOWN 108 ; inline
-: ETOOMANYREFS 109 ; inline
-: ETIMEDOUT 110 ; inline
-: ECONNREFUSED 111 ; inline
-: EHOSTDOWN 112 ; inline
-: EHOSTUNREACH 113 ; inline
-: EALREADY 114 ; inline
-: EINPROGRESS 115 ; inline
-: ESTALE 116 ; inline
-: EUCLEAN 117 ; inline
-: ENOTNAM 118 ; inline
-: ENAVAIL 119 ; inline
-: EISNAM 120 ; inline
-: EREMOTEIO 121 ; inline
-: EDQUOT 122 ; inline
-: ENOMEDIUM 123 ; inline
-: EMEDIUMTYPE 124 ; inline
-: ECANCELED 125 ; inline
-: ENOKEY 126 ; inline
-: EKEYEXPIRED 127 ; inline
-: EKEYREVOKED 128 ; inline
-: EKEYREJECTED 129 ; inline
-: EOWNERDEAD 130 ; inline
-: ENOTRECOVERABLE 131 ; inline
+CONSTANT: EPERM 1
+CONSTANT: ENOENT 2
+CONSTANT: ESRCH 3
+CONSTANT: EINTR 4
+CONSTANT: EIO 5
+CONSTANT: ENXIO 6
+CONSTANT: E2BIG 7
+CONSTANT: ENOEXEC 8
+CONSTANT: EBADF 9
+CONSTANT: ECHILD 10
+CONSTANT: EAGAIN 11
+CONSTANT: ENOMEM 12
+CONSTANT: EACCES 13
+CONSTANT: EFAULT 14
+CONSTANT: ENOTBLK 15
+CONSTANT: EBUSY 16
+CONSTANT: EEXIST 17
+CONSTANT: EXDEV 18
+CONSTANT: ENODEV 19
+CONSTANT: ENOTDIR 20
+CONSTANT: EISDIR 21
+CONSTANT: EINVAL 22
+CONSTANT: ENFILE 23
+CONSTANT: EMFILE 24
+CONSTANT: ENOTTY 25
+CONSTANT: ETXTBSY 26
+CONSTANT: EFBIG 27
+CONSTANT: ENOSPC 28
+CONSTANT: ESPIPE 29
+CONSTANT: EROFS 30
+CONSTANT: EMLINK 31
+CONSTANT: EPIPE 32
+CONSTANT: EDOM 33
+CONSTANT: ERANGE 34
+CONSTANT: EDEADLK 35
+CONSTANT: ENAMETOOLONG 36
+CONSTANT: ENOLCK 37
+CONSTANT: ENOSYS 38
+CONSTANT: ENOTEMPTY 39
+CONSTANT: ELOOP 40
+ALIAS: EWOULDBLOCK EAGAIN
+CONSTANT: ENOMSG 42
+CONSTANT: EIDRM 43
+CONSTANT: ECHRNG 44
+CONSTANT: EL2NSYNC 45
+CONSTANT: EL3HLT 46
+CONSTANT: EL3RST 47
+CONSTANT: ELNRNG 48
+CONSTANT: EUNATCH 49
+CONSTANT: ENOCSI 50
+CONSTANT: EL2HLT 51
+CONSTANT: EBADE 52
+CONSTANT: EBADR 53
+CONSTANT: EXFULL 54
+CONSTANT: ENOANO 55
+CONSTANT: EBADRQC 56
+CONSTANT: EBADSLT 57
+ALIAS: EDEADLOCK EDEADLK
+CONSTANT: EBFONT 59
+CONSTANT: ENOSTR 60
+CONSTANT: ENODATA 61
+CONSTANT: ETIME 62
+CONSTANT: ENOSR 63
+CONSTANT: ENONET 64
+CONSTANT: ENOPKG 65
+CONSTANT: EREMOTE 66
+CONSTANT: ENOLINK 67
+CONSTANT: EADV 68
+CONSTANT: ESRMNT 69
+CONSTANT: ECOMM 70
+CONSTANT: EPROTO 71
+CONSTANT: EMULTIHOP 72
+CONSTANT: EDOTDOT 73
+CONSTANT: EBADMSG 74
+CONSTANT: EOVERFLOW 75
+CONSTANT: ENOTUNIQ 76
+CONSTANT: EBADFD 77
+CONSTANT: EREMCHG 78
+CONSTANT: ELIBACC 79
+CONSTANT: ELIBBAD 80
+CONSTANT: ELIBSCN 81
+CONSTANT: ELIBMAX 82
+CONSTANT: ELIBEXEC 83
+CONSTANT: EILSEQ 84
+CONSTANT: ERESTART 85
+CONSTANT: ESTRPIPE 86
+CONSTANT: EUSERS 87
+CONSTANT: ENOTSOCK 88
+CONSTANT: EDESTADDRREQ 89
+CONSTANT: EMSGSIZE 90
+CONSTANT: EPROTOTYPE 91
+CONSTANT: ENOPROTOOPT 92
+CONSTANT: EPROTONOSUPPORT 93
+CONSTANT: ESOCKTNOSUPPORT 94
+CONSTANT: EOPNOTSUPP 95
+CONSTANT: EPFNOSUPPORT 96
+CONSTANT: EAFNOSUPPORT 97
+CONSTANT: EADDRINUSE 98
+CONSTANT: EADDRNOTAVAIL 99
+CONSTANT: ENETDOWN 100
+CONSTANT: ENETUNREACH 101
+CONSTANT: ENETRESET 102
+CONSTANT: ECONNABORTED 103
+CONSTANT: ECONNRESET 104
+CONSTANT: ENOBUFS 105
+CONSTANT: EISCONN 106
+CONSTANT: ENOTCONN 107
+CONSTANT: ESHUTDOWN 108
+CONSTANT: ETOOMANYREFS 109
+CONSTANT: ETIMEDOUT 110
+CONSTANT: ECONNREFUSED 111
+CONSTANT: EHOSTDOWN 112
+CONSTANT: EHOSTUNREACH 113
+CONSTANT: EALREADY 114
+CONSTANT: EINPROGRESS 115
+CONSTANT: ESTALE 116
+CONSTANT: EUCLEAN 117
+CONSTANT: ENOTNAM 118
+CONSTANT: ENAVAIL 119
+CONSTANT: EISNAM 120
+CONSTANT: EREMOTEIO 121
+CONSTANT: EDQUOT 122
+CONSTANT: ENOMEDIUM 123
+CONSTANT: EMEDIUMTYPE 124
+CONSTANT: ECANCELED 125
+CONSTANT: ENOKEY 126
+CONSTANT: EKEYEXPIRED 127
+CONSTANT: EKEYREVOKED 128
+CONSTANT: EKEYREJECTED 129
+CONSTANT: EOWNERDEAD 130
+CONSTANT: ENOTRECOVERABLE 131
diff --git a/basis/unix/linux/route/authors.txt b/basis/unix/linux/route/authors.txt
deleted file mode 100755 (executable)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/basis/unix/linux/route/route.factor b/basis/unix/linux/route/route.factor
deleted file mode 100644 (file)
index 4d9bbfa..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-
-USING: alien.syntax ;
-
-IN: unix.linux.route
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-C-STRUCT: struct-rtentry
-  { "ulong"           "rt_pad1" }
-  { "struct-sockaddr" "rt_dst" }
-  { "struct-sockaddr" "rt_gateway" }
-  { "struct-sockaddr" "rt_genmask" }
-  { "ushort"          "rt_flags" }
-  { "short"           "rt_pad2" }
-  { "ulong"           "rt_pad3" }
-  { "uchar"          "rt_tos" }
-  { "uchar"          "rt_class" }
-  { "short"          "rt_pad4" }
-  { "short"          "rt_metric" }
-  { "char*"          "rt_dev" }
-  { "ulong"          "rt_mtu" }
-  { "ulong"          "rt_window" }
-  { "ushort"         "rt_irtt" } ;
-
-: RTF_UP        HEX: 0001 ;            ! Route usable.
-: RTF_GATEWAY   HEX: 0002 ;            ! Destination is a gateway.
-
-: RTF_HOST      HEX: 0004 ;            ! Host entry (net otherwise).
-: RTF_REINSTATE         HEX: 0008 ;            ! Reinstate route after timeout.
-: RTF_DYNAMIC   HEX: 0010 ;            ! Created dyn. (by redirect).
-: RTF_MODIFIED  HEX: 0020 ;            ! Modified dyn. (by redirect).
-: RTF_MTU       HEX: 0040 ;            ! Specific MTU for this route.
-: RTF_MSS       RTF_MTU ;              ! Compatibility.
-: RTF_WINDOW    HEX: 0080 ;            ! Per route window clamping.
-: RTF_IRTT      HEX: 0100 ;            ! Initial round trip time.
-: RTF_REJECT    HEX: 0200 ;            ! Reject route.
-: RTF_STATIC    HEX: 0400 ;            ! Manually injected route.
-: RTF_XRESOLVE  HEX: 0800 ;            ! External resolver.
-: RTF_NOFORWARD  HEX: 1000 ;           ! Forwarding inhibited.
-: RTF_THROW     HEX: 2000 ;            ! Go to next class.
-: RTF_NOPMTUDISC HEX: 4000 ;           ! Do not send packets with DF.
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-USING: kernel alien.c-types io.sockets
-       unix unix.linux.sockios ;
-
-: route ( dst gateway genmask flags -- )
-  >r >r >r >r
-  "struct-rtentry" <c-object>
-  r> 0 <inet4> make-sockaddr over set-struct-rtentry-rt_dst
-  r> 0 <inet4> make-sockaddr over set-struct-rtentry-rt_gateway
-  r> 0 <inet4> make-sockaddr over set-struct-rtentry-rt_genmask
-  r>                                over set-struct-rtentry-rt_flags
-  AF_INET SOCK_DGRAM 0 socket SIOCADDRT rot ioctl drop ;
diff --git a/basis/unix/linux/route/tags.txt b/basis/unix/linux/route/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/unix/linux/sockios/authors.txt b/basis/unix/linux/sockios/authors.txt
deleted file mode 100755 (executable)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/basis/unix/linux/sockios/sockios.factor b/basis/unix/linux/sockios/sockios.factor
deleted file mode 100644 (file)
index fd1bb10..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-
-IN: unix.linux.sockios
-
-! Imported from linux-headers-2.6.15-28-686 on Ubuntu 6.06
-
-! Routing table calls
-: SIOCADDRT    HEX: 890B ;             ! add routing table entry
-: SIOCDELRT    HEX: 890C ;             ! delete routing table entry
-: SIOCRTMSG    HEX: 890D ;             ! call to routing system
-
-! Socket configuration controls
-
-: SIOCGIFNAME       HEX: 8910 ;                ! get iface name
-: SIOCSIFLINK       HEX: 8911 ;                ! set iface channel
-: SIOCGIFCONF       HEX: 8912 ;                ! get iface list
-: SIOCGIFFLAGS      HEX: 8913 ;                ! get flags
-: SIOCSIFFLAGS      HEX: 8914 ;                ! set flags
-: SIOCGIFADDR       HEX: 8915 ;                ! get PA address
-: SIOCSIFADDR       HEX: 8916 ;                ! set PA address
-: SIOCGIFDSTADDR     HEX: 8917 ;               ! get remote PA address
-: SIOCSIFDSTADDR     HEX: 8918 ;               ! set remote PA address
-: SIOCGIFBRDADDR     HEX: 8919 ;               ! get broadcast PA address
-: SIOCSIFBRDADDR     HEX: 891a ;               ! set broadcast PA address
-: SIOCGIFNETMASK     HEX: 891b ;               ! get network PA mask
-: SIOCSIFNETMASK     HEX: 891c ;               ! set network PA mask
-: SIOCGIFMETRIC             HEX: 891d ;                ! get metric
-: SIOCSIFMETRIC             HEX: 891e ;                ! set metric
-: SIOCGIFMEM        HEX: 891f ;                ! get memory address (BSD)
-: SIOCSIFMEM        HEX: 8920 ;                ! set memory address (BSD)
-: SIOCGIFMTU        HEX: 8921 ;                ! get MTU size
-: SIOCSIFMTU        HEX: 8922 ;                ! set MTU size
-: SIOCSIFNAME       HEX: 8923 ;                ! set interface name
-: SIOCSIFHWADDR             HEX: 8924 ;                ! set hardware address
-: SIOCGIFENCAP      HEX: 8925 ;                ! get/set encapsulations
-: SIOCSIFENCAP      HEX: 8926 ;
-: SIOCGIFHWADDR             HEX: 8927 ;                ! Get hardware address
-: SIOCGIFSLAVE      HEX: 8929 ;                ! Driver slaving support
-: SIOCSIFSLAVE      HEX: 8930 ;
-: SIOCADDMULTI      HEX: 8931 ;                ! Multicast address lists
-: SIOCDELMULTI      HEX: 8932 ;
-: SIOCGIFINDEX      HEX: 8933 ;                ! name -> if_index mapping
-: SIOGIFINDEX       SIOCGIFINDEX ;             ! misprint compatibility :-)
-: SIOCSIFPFLAGS             HEX: 8934 ;                ! set/get extended flags set
-: SIOCGIFPFLAGS             HEX: 8935 ;
-: SIOCDIFADDR       HEX: 8936 ;                ! delete PA address
-: SIOCSIFHWBROADCAST HEX: 8937 ;               ! set hardware broadcast addr
-: SIOCGIFCOUNT      HEX: 8938 ;                ! get number of devices
-
-: SIOCGIFBR         HEX: 8940 ;                ! Bridging support
-: SIOCSIFBR         HEX: 8941 ;                ! Set bridging options
-
-: SIOCGIFTXQLEN             HEX: 8942 ;                ! Get the tx queue length
-: SIOCSIFTXQLEN             HEX: 8943 ;                ! Set the tx queue length
-
-: SIOCGIFDIVERT             HEX: 8944 ;                ! Frame diversion support
-: SIOCSIFDIVERT             HEX: 8945 ;                ! Set frame diversion options
-
-: SIOCETHTOOL       HEX: 8946 ;                ! Ethtool interface
-
-: SIOCGMIIPHY       HEX: 8947 ;                ! Get address of MII PHY in use
-: SIOCGMIIREG       HEX: 8948 ;                ! Read MII PHY register.
-: SIOCSMIIREG       HEX: 8949 ;                ! Write MII PHY register.
-
-: SIOCWANDEV        HEX: 894A ;                ! get/set netdev parameters
diff --git a/basis/unix/linux/sockios/tags.txt b/basis/unix/linux/sockios/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/basis/unix/linux/swap/authors.txt b/basis/unix/linux/swap/authors.txt
deleted file mode 100755 (executable)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/basis/unix/linux/swap/swap.factor b/basis/unix/linux/swap/swap.factor
deleted file mode 100644 (file)
index b4edaaa..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-
-USING: alien.syntax ;
-
-IN: unix.linux.swap
-
-: SWAP_FLAG_PREFER      HEX: 8000 ; ! Set if swap priority is specified.
-: SWAP_FLAG_PRIO_MASK   HEX: 7fff ;
-: SWAP_FLAG_PRIO_SHIFT  0 ;
-
-FUNCTION: int swapon ( char* path, int flags ) ;
-
-FUNCTION: int swapoff ( char* path ) ;
\ No newline at end of file
diff --git a/basis/unix/linux/swap/tags.txt b/basis/unix/linux/swap/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
index 7d5f9eb330468ee079f6f8bd2da03921297643b6..22757cdbe1b5741ec03552b40a55f9d54447229b 100644 (file)
@@ -1,6 +1,6 @@
 USING: kernel alien.c-types alien.strings sequences math alien.syntax unix
 vectors kernel namespaces continuations threads assocs vectors
-io.unix.backend io.encodings.utf8 unix.utilities ;
+io.backend.unix io.encodings.utf8 unix.utilities fry ;
 IN: unix.process
 
 ! Low-level Unix process launching utilities. These are used
@@ -36,37 +36,37 @@ FUNCTION: int execve ( char* path, char** argv, char** envp ) ;
     [ [ first ] [ ] bi ] dip exec-with-env ;
 
 : with-fork ( child parent -- )
-    [ [ fork-process dup zero? ] dip [ drop ] prepose ] dip
+    [ [ fork-process dup zero? ] dip '[ drop @ ] ] dip
     if ; inline
 
-: SIGKILL 9 ; inline
-: SIGTERM 15 ; inline
+CONSTANT: SIGKILL 9
+CONSTANT: SIGTERM 15
 
 FUNCTION: int kill ( pid_t pid, int sig ) ;
 
-: PRIO_PROCESS 0 ; inline
-: PRIO_PGRP 1 ; inline
-: PRIO_USER 2 ; inline
+CONSTANT: PRIO_PROCESS 0
+CONSTANT: PRIO_PGRP 1
+CONSTANT: PRIO_USER 2
 
-: PRIO_MIN -20 ; inline
-: PRIO_MAX 20 ; inline
+CONSTANT: PRIO_MIN -20
+CONSTANT: PRIO_MAX 20
 
 ! which/who = 0 for current process
 FUNCTION: int getpriority ( int which, int who ) ;
 FUNCTION: int setpriority ( int which, int who, int prio ) ;
 
 : set-priority ( n -- )
-    0 0 rot setpriority io-error ;
+    [ 0 0 ] dip setpriority io-error ;
 
 ! Flags for waitpid
 
-: WNOHANG   1 ; inline
-: WUNTRACED 2 ; inline
+CONSTANT: WNOHANG   1
+CONSTANT: WUNTRACED 2
 
-: WSTOPPED   2 ; inline
-: WEXITED    4 ; inline
-: WCONTINUED 8 ; inline
-: WNOWAIT    HEX: 1000000 ; inline
+CONSTANT: WSTOPPED   2
+CONSTANT: WEXITED    4
+CONSTANT: WCONTINUED 8
+CONSTANT: WNOWAIT    HEX: 1000000
 
 ! Examining status
 
index 2bca20c6b6fba3887b41d2f0f85e1655d7097274..d91fbdfddc1f5c1a1f92da9b1320ca6e24c8ab4a 100644 (file)
@@ -1,30 +1,30 @@
 ! Copyright (C) 2006 Patrick Mauritz.
 ! See http://factorcode.org/license.txt for BSD license.
 IN: unix
-USING: alien.syntax system kernel ;
+USING: alien.syntax system kernel layouts ;
 
 ! Solaris.
 
-: O_RDONLY  HEX: 0000 ; inline
-: O_WRONLY  HEX: 0001 ; inline
-: O_RDWR    HEX: 0002 ; inline
-: O_APPEND  HEX: 0008 ; inline
-: O_CREAT   HEX: 0100 ; inline
-: O_TRUNC   HEX: 0200 ; inline
+CONSTANT: O_RDONLY  HEX: 0000
+CONSTANT: O_WRONLY  HEX: 0001
+CONSTANT: O_RDWR    HEX: 0002
+CONSTANT: O_APPEND  HEX: 0008
+CONSTANT: O_CREAT   HEX: 0100
+CONSTANT: O_TRUNC   HEX: 0200
 
-: SEEK_END 2 ; inline
+CONSTANT: SEEK_END 2
 
-: SOL_SOCKET HEX: ffff ; inline
+CONSTANT: SOL_SOCKET HEX: ffff
 
-: FD_SETSIZE cell 4 = 1024 65536 ? ; inline
+: FD_SETSIZE ( -- n ) cell 4 = 1024 65536 ? ;
 
-: SO_REUSEADDR 4 ; inline
-: SO_OOBINLINE HEX: 0100 ; inline
-: SO_SNDTIMEO HEX: 1005 ; inline
-: SO_RCVTIMEO HEX: 1006 ; inline
+CONSTANT: SO_REUSEADDR 4
+CONSTANT: SO_OOBINLINE HEX: 0100
+CONSTANT: SO_SNDTIMEO HEX: 1005
+CONSTANT: SO_RCVTIMEO HEX: 1006
 
-: F_SETFL 4 ;    ! set file status flags
-: O_NONBLOCK HEX: 80 ; ! no delay
+CONSTANT: F_SETFL 4    ! set file status flags
+CONSTANT: O_NONBLOCK HEX: 80 ! no delay
 
 C-STRUCT: addrinfo
     { "int" "flags" }
@@ -58,24 +58,24 @@ C-STRUCT: sockaddr-un
     { "ushort" "family" }
     { { "char" max-un-path } "path" } ;
 
-: EINTR 4 ; inline
-: EAGAIN 11 ; inline
-: EINPROGRESS 150 ; inline
+CONSTANT: EINTR 4
+CONSTANT: EAGAIN 11
+CONSTANT: EINPROGRESS 150
 
-: SOCK_STREAM 2 ; inline
-: SOCK_DGRAM 1 ; inline
+CONSTANT: SOCK_STREAM 2
+CONSTANT: SOCK_DGRAM 1
 
-: AF_UNSPEC 0 ; inline
-: AF_UNIX 1 ; inline
-: AF_INET 2 ; inline
-: AF_INET6 26 ; inline
+CONSTANT: AF_UNSPEC 0
+CONSTANT: AF_UNIX 1
+CONSTANT: AF_INET 2
+CONSTANT: AF_INET6 26
 
-: PF_UNSPEC AF_UNSPEC ; inline
-: PF_UNIX AF_UNIX ; inline
-: PF_INET AF_INET ; inline
-: PF_INET6 AF_INET6 ; inline
+ALIAS: PF_UNSPEC AF_UNSPEC
+ALIAS: PF_UNIX AF_UNIX
+ALIAS: PF_INET AF_INET
+ALIAS: PF_INET6 AF_INET6
 
-: IPPROTO_TCP 6 ; inline
-: IPPROTO_UDP 17 ; inline
+CONSTANT: IPPROTO_TCP 6
+CONSTANT: IPPROTO_UDP 17
 
-: AI_PASSIVE 8 ; inline
+CONSTANT: AI_PASSIVE 8
index ded06595de7c14bbd3e19f09bfa542b121725dc1..35963cf4edf0d157b16cf5de948454db3d928683 100644 (file)
@@ -25,5 +25,5 @@ C-STRUCT: stat
 FUNCTION: int __xstat  ( int ver, char* pathname, stat* buf ) ;
 FUNCTION: int __lxstat ( int ver, char* pathname, stat* buf ) ;
 
-:  stat ( pathname buf -- int ) 3 -rot __xstat ;
-: lstat ( pathname buf -- int ) 3 -rot __lxstat ;
+:  stat ( pathname buf -- int ) [ 3 ] 2dip __xstat ;
+: lstat ( pathname buf -- int ) [ 3 ] 2dip __lxstat ;
index f406b2ccee306f183156d484feef077cf6cd889d..81b33f322789ee1b0511c43c3abc12f536aa4e41 100644 (file)
@@ -26,5 +26,5 @@ C-STRUCT: stat
 FUNCTION: int __xstat  ( int ver, char* pathname, stat* buf ) ;
 FUNCTION: int __lxstat ( int ver, char* pathname, stat* buf ) ;
 
-:  stat ( pathname buf -- int ) 1 -rot __xstat ;
-: lstat ( pathname buf -- int ) 1 -rot __lxstat ;
+:  stat ( pathname buf -- int ) [ 1 ] 2dip __xstat ;
+: lstat ( pathname buf -- int ) [ 1 ] 2dip __lxstat ;
index d6a60ba5c88f385b773096fb87a8be8f40001526..c4cf5cc7a0951773d0df22eece0d5dbd47aa8b81 100644 (file)
@@ -25,5 +25,5 @@ C-STRUCT: stat
 FUNCTION: int __stat30  ( char* pathname, stat* buf ) ;
 FUNCTION: int __lstat30 ( char* pathname, stat* buf ) ;
 
-: stat ( pathname buf -- n ) __stat30 ; inline
-: lstat ( pathname buf -- n ) __lstat30 ; inline
+: stat ( pathname buf -- n ) __stat30 ;
+: lstat ( pathname buf -- n ) __lstat30 ;
index 1a1f97507c9a9fd6f2560b192afcb22505610c7a..cd9286c6ba410be22bea6375fae133fad9884e13 100644 (file)
@@ -25,5 +25,5 @@ C-STRUCT: stat
 FUNCTION: int __stat13 ( char* pathname, stat* buf ) ;
 FUNCTION: int __lstat13 ( char* pathname, stat* buf ) ;
 
-: stat ( pathname buf -- n ) __stat13 ; inline
-: lstat ( pathname buf -- n ) __lstat13 ; inline
+: stat ( pathname buf -- n ) __stat13 ;
+: lstat ( pathname buf -- n ) __lstat13 ;
index a3b0ed11b7f6caf984af2605939c88b3f99edb60..156be961906773f4a231932a1f5b860070983891 100644 (file)
@@ -1,19 +1,19 @@
 USING: kernel system combinators alien.syntax alien.c-types
-math io.unix.backend vocabs.loader unix ;
+math io.backend.unix vocabs.loader unix ;
 IN: unix.stat
 
 ! File Types
 
-: S_IFMT   OCT: 170000 ; ! These bits determine file type.
+CONSTANT: S_IFMT   OCT: 170000   ! These bits determine file type.
 
-: S_IFDIR  OCT:  40000 ; inline   ! Directory.
-: S_IFCHR  OCT:  20000 ; inline   ! Character device.
-: S_IFBLK  OCT:  60000 ; inline   ! Block device.
-: S_IFREG  OCT: 100000 ; inline   ! Regular file.
-: S_IFIFO  OCT: 010000 ; inline   ! FIFO.
-: S_IFLNK  OCT: 120000 ; inline   ! Symbolic link.
-: S_IFSOCK OCT: 140000 ; inline   ! Socket.
-: S_IFWHT  OCT: 160000 ; inline   ! Whiteout.
+CONSTANT: S_IFDIR  OCT:  40000   ! Directory.
+CONSTANT: S_IFCHR  OCT:  20000   ! Character device.
+CONSTANT: S_IFBLK  OCT:  60000   ! Block device.
+CONSTANT: S_IFREG  OCT: 100000   ! Regular file.
+CONSTANT: S_IFIFO  OCT: 010000   ! FIFO.
+CONSTANT: S_IFLNK  OCT: 120000   ! Symbolic link.
+CONSTANT: S_IFSOCK OCT: 140000   ! Socket.
+CONSTANT: S_IFWHT  OCT: 160000   ! Whiteout.
 
 FUNCTION: int chmod ( char* path, mode_t mode ) ;
 FUNCTION: int fchmod ( int fd, mode_t mode ) ;
@@ -22,8 +22,8 @@ FUNCTION: int mkdir ( char* path, mode_t mode ) ;
 C-STRUCT: fsid
     { { "int" 2 } "__val" } ;
 
-    TYPEDEF: fsid __fsid_t
-    TYPEDEF: fsid fsid_t
+TYPEDEF: fsid __fsid_t
+TYPEDEF: fsid fsid_t
 
 << os {
     { linux   [ "unix.stat.linux"   require ] }
index 038178f6f8351f018017f4dc2db51a34874dffe1..70e2d5e561938fa9ec886492c18897640636aec8 100644 (file)
@@ -1,11 +1,11 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax ;
+USING: alien.syntax unix.types unix.stat ;
 IN: unix.statfs.freebsd
 
-: MFSNAMELEN      16            ; inline ! length of type name including null */
-: MNAMELEN        88            ; inline ! size of on/from name bufs
-: STATFS_VERSION  HEX: 20030518 ; inline ! current version number 
+CONSTANT: MFSNAMELEN      16            ! length of type name including null */
+CONSTANT: MNAMELEN        88            ! size of on/from name bufs
+CONSTANT: STATFS_VERSION  HEX: 20030518 ! current version number 
 
 C-STRUCT: statfs
     { "uint32_t" "f_version" }
index 6550ee572e023926968ec997fff99b28e434ec39..c0db5ced1d899f220962879bf94e96c57d340c87 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax ;
+USING: alien.syntax unix.types unix.stat ;
 IN: unix.statfs.linux
 
 C-STRUCT: statfs64
index 210e9fbe12ede628e582c7fb3265d5a4c805d705..c26294973032acc6ec91003797b1fe7d289f40c7 100644 (file)
@@ -2,31 +2,32 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien.c-types io.encodings.utf8 io.encodings.string
 kernel sequences unix.stat accessors unix combinators math
-grouping system alien.strings math.bitwise alien.syntax ;
+grouping system alien.strings math.bitwise alien.syntax
+unix.types ;
 IN: unix.statfs.macosx
 
-: MNT_RDONLY  HEX: 00000001 ; inline
-: MNT_SYNCHRONOUS HEX: 00000002 ; inline
-: MNT_NOEXEC  HEX: 00000004 ; inline
-: MNT_NOSUID  HEX: 00000008 ; inline
-: MNT_NODEV   HEX: 00000010 ; inline
-: MNT_UNION   HEX: 00000020 ; inline
-: MNT_ASYNC   HEX: 00000040 ; inline
-: MNT_EXPORTED HEX: 00000100 ; inline
-: MNT_QUARANTINE  HEX: 00000400 ; inline
-: MNT_LOCAL   HEX: 00001000 ; inline
-: MNT_QUOTA   HEX: 00002000 ; inline
-: MNT_ROOTFS  HEX: 00004000 ; inline
-: MNT_DOVOLFS HEX: 00008000 ; inline
-: MNT_DONTBROWSE  HEX: 00100000 ; inline
-: MNT_IGNORE_OWNERSHIP HEX: 00200000 ; inline
-: MNT_AUTOMOUNTED HEX: 00400000 ; inline
-: MNT_JOURNALED   HEX: 00800000 ; inline
-: MNT_NOUSERXATTR HEX: 01000000 ; inline
-: MNT_DEFWRITE    HEX: 02000000 ; inline
-: MNT_MULTILABEL  HEX: 04000000 ; inline
-: MNT_NOATIME HEX: 10000000 ; inline
-: MNT_UNKNOWNPERMISSIONS MNT_IGNORE_OWNERSHIP ; inline
+CONSTANT: MNT_RDONLY  HEX: 00000001
+CONSTANT: MNT_SYNCHRONOUS HEX: 00000002
+CONSTANT: MNT_NOEXEC  HEX: 00000004
+CONSTANT: MNT_NOSUID  HEX: 00000008
+CONSTANT: MNT_NODEV   HEX: 00000010
+CONSTANT: MNT_UNION   HEX: 00000020
+CONSTANT: MNT_ASYNC   HEX: 00000040
+CONSTANT: MNT_EXPORTED HEX: 00000100
+CONSTANT: MNT_QUARANTINE  HEX: 00000400
+CONSTANT: MNT_LOCAL   HEX: 00001000
+CONSTANT: MNT_QUOTA   HEX: 00002000
+CONSTANT: MNT_ROOTFS  HEX: 00004000
+CONSTANT: MNT_DOVOLFS HEX: 00008000
+CONSTANT: MNT_DONTBROWSE  HEX: 00100000
+CONSTANT: MNT_IGNORE_OWNERSHIP HEX: 00200000
+CONSTANT: MNT_AUTOMOUNTED HEX: 00400000
+CONSTANT: MNT_JOURNALED   HEX: 00800000
+CONSTANT: MNT_NOUSERXATTR HEX: 01000000
+CONSTANT: MNT_DEFWRITE    HEX: 02000000
+CONSTANT: MNT_MULTILABEL  HEX: 04000000
+CONSTANT: MNT_NOATIME HEX: 10000000
+ALIAS: MNT_UNKNOWNPERMISSIONS MNT_IGNORE_OWNERSHIP
 
 : MNT_VISFLAGMASK ( -- n )
     {
@@ -39,58 +40,60 @@ IN: unix.statfs.macosx
         MNT_NOUSERXATTR MNT_DEFWRITE MNT_MULTILABEL MNT_NOATIME
     } flags ; inline
 
-: MNT_UPDATE  HEX: 00010000 ; inline
-: MNT_RELOAD  HEX: 00040000 ; inline
-: MNT_FORCE   HEX: 00080000 ; inline
-: MNT_CMDFLAGS { MNT_UPDATE MNT_RELOAD MNT_FORCE } flags ; inline
+CONSTANT: MNT_UPDATE  HEX: 00010000
+CONSTANT: MNT_RELOAD  HEX: 00040000
+CONSTANT: MNT_FORCE   HEX: 00080000
 
-: VFS_GENERIC 0 ; inline
-: VFS_NUMMNTOPS 1 ; inline
-: VFS_MAXTYPENUM 1 ; inline
-: VFS_CONF 2 ; inline
-: VFS_SET_PACKAGE_EXTS 3 ; inline
+: MNT_CMDFLAGS ( -- n )
+    { MNT_UPDATE MNT_RELOAD MNT_FORCE } flags ; inline
 
-: MNT_WAIT    1 ; inline
-: MNT_NOWAIT  2 ; inline
+CONSTANT: VFS_GENERIC 0
+CONSTANT: VFS_NUMMNTOPS 1
+CONSTANT: VFS_MAXTYPENUM 1
+CONSTANT: VFS_CONF 2
+CONSTANT: VFS_SET_PACKAGE_EXTS 3
 
-: VFS_CTL_VERS1   HEX: 01 ; inline
+CONSTANT: MNT_WAIT    1
+CONSTANT: MNT_NOWAIT  2
 
-: VFS_CTL_STATFS  HEX: 00010001 ; inline
-: VFS_CTL_UMOUNT  HEX: 00010002 ; inline
-: VFS_CTL_QUERY   HEX: 00010003 ; inline
-: VFS_CTL_NEWADDR HEX: 00010004 ; inline
-: VFS_CTL_TIMEO   HEX: 00010005 ; inline
-: VFS_CTL_NOLOCKS HEX: 00010006 ; inline
+CONSTANT: VFS_CTL_VERS1   HEX: 01
+
+CONSTANT: VFS_CTL_STATFS  HEX: 00010001
+CONSTANT: VFS_CTL_UMOUNT  HEX: 00010002
+CONSTANT: VFS_CTL_QUERY   HEX: 00010003
+CONSTANT: VFS_CTL_NEWADDR HEX: 00010004
+CONSTANT: VFS_CTL_TIMEO   HEX: 00010005
+CONSTANT: VFS_CTL_NOLOCKS HEX: 00010006
 
 C-STRUCT: vfsquery
     { "uint32_t" "vq_flags" }
     { { "uint32_t" 31 } "vq_spare" } ;
 
-: VQ_NOTRESP  HEX: 0001 ; inline
-: VQ_NEEDAUTH HEX: 0002 ; inline
-: VQ_LOWDISK  HEX: 0004 ; inline
-: VQ_MOUNT    HEX: 0008 ; inline
-: VQ_UNMOUNT  HEX: 0010 ; inline
-: VQ_DEAD     HEX: 0020 ; inline
-: VQ_ASSIST   HEX: 0040 ; inline
-: VQ_NOTRESPLOCK  HEX: 0080 ; inline
-: VQ_UPDATE   HEX: 0100 ; inline
-: VQ_FLAG0200 HEX: 0200 ; inline
-: VQ_FLAG0400 HEX: 0400 ; inline
-: VQ_FLAG0800 HEX: 0800 ; inline
-: VQ_FLAG1000 HEX: 1000 ; inline
-: VQ_FLAG2000 HEX: 2000 ; inline
-: VQ_FLAG4000 HEX: 4000 ; inline
-: VQ_FLAG8000 HEX: 8000 ; inline
+CONSTANT: VQ_NOTRESP  HEX: 0001
+CONSTANT: VQ_NEEDAUTH HEX: 0002
+CONSTANT: VQ_LOWDISK  HEX: 0004
+CONSTANT: VQ_MOUNT    HEX: 0008
+CONSTANT: VQ_UNMOUNT  HEX: 0010
+CONSTANT: VQ_DEAD     HEX: 0020
+CONSTANT: VQ_ASSIST   HEX: 0040
+CONSTANT: VQ_NOTRESPLOCK  HEX: 0080
+CONSTANT: VQ_UPDATE   HEX: 0100
+CONSTANT: VQ_FLAG0200 HEX: 0200
+CONSTANT: VQ_FLAG0400 HEX: 0400
+CONSTANT: VQ_FLAG0800 HEX: 0800
+CONSTANT: VQ_FLAG1000 HEX: 1000
+CONSTANT: VQ_FLAG2000 HEX: 2000
+CONSTANT: VQ_FLAG4000 HEX: 4000
+CONSTANT: VQ_FLAG8000 HEX: 8000
 
-: NFSV4_MAX_FH_SIZE 128 ; inline
-: NFSV3_MAX_FH_SIZE 64 ; inline
-: NFSV2_MAX_FH_SIZE 32 ; inline
-: NFS_MAX_FH_SIZE NFSV4_MAX_FH_SIZE ; inline
+CONSTANT: NFSV4_MAX_FH_SIZE 128
+CONSTANT: NFSV3_MAX_FH_SIZE 64
+CONSTANT: NFSV2_MAX_FH_SIZE 32
+ALIAS: NFS_MAX_FH_SIZE NFSV4_MAX_FH_SIZE
 
-: MFSNAMELEN 15 ; inline
-: MNAMELEN 90 ; inline
-: MFSTYPENAMELEN 16 ; inline
+CONSTANT: MFSNAMELEN 15
+CONSTANT: MNAMELEN 90
+CONSTANT: MFSTYPENAMELEN 16
 
 C-STRUCT: fsid_t
     { { "int32_t" 2 } "val" } ;
index 378e335c115e265760775a941cc740ce676de4bc..60590be4ea0275a901d12be20ca876ac832ad849 100644 (file)
@@ -1,10 +1,10 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax ;
+USING: alien.syntax unix.types unix.stat ;
 IN: unix.statfs.openbsd
 
-: MFSNAMELEN 16 ; inline
-: MNAMELEN 90 ; inline
+CONSTANT: MFSNAMELEN 16
+CONSTANT: MNAMELEN 90
 
 C-STRUCT: statfs
     { "u_int32_t"       "f_flags" }
index 7d1a6afb6146e8a4b7778d9d9904fc7768d6e6a3..3140b8500476d78556d961745f9364381ddbab88 100644 (file)
@@ -17,7 +17,7 @@ C-STRUCT: statvfs
     { "ulong"   "f_namemax" } ;
 
 ! Flags
-: ST_RDONLY   HEX: 1 ; inline ! Read-only file system
-: ST_NOSUID   HEX: 2 ; inline ! Does not honor setuid/setgid
+CONSTANT: ST_RDONLY   HEX: 1 ! Read-only file system
+CONSTANT: ST_NOSUID   HEX: 2 ! Does not honor setuid/setgid
 
 FUNCTION: int statvfs ( char* path, statvfs* buf ) ;
index 3bfbffa197f88e4e1b6d17a63015debd820cf910..c92fef6aaaeb551d7e202dde934e1ba6984add26 100644 (file)
@@ -19,13 +19,13 @@ C-STRUCT: statvfs64
 
 FUNCTION: int statvfs64 ( char* path, statvfs64* buf ) ;
 
-: ST_RDONLY 1 ; inline        ! Mount read-only.
-: ST_NOSUID 2 ; inline        ! Ignore suid and sgid bits.
-: ST_NODEV 4 ; inline         ! Disallow access to device special files.
-: ST_NOEXEC 8 ; inline        ! Disallow program execution.
-: ST_SYNCHRONOUS 16 ; inline  ! Writes are synced at once.
-: ST_MANDLOCK 64 ; inline     ! Allow mandatory locks on an FS.
-: ST_WRITE 128 ; inline       ! Write on file/directory/symlink.
-: ST_APPEND 256 ; inline      ! Append-only file.
-: ST_IMMUTABLE 512 ; inline   ! Immutable file.
-: ST_NOATIME 1024 ; inline    ! Do not update access times.
+CONSTANT: ST_RDONLY 1        ! Mount read-only.
+CONSTANT: ST_NOSUID 2        ! Ignore suid and sgid bits.
+CONSTANT: ST_NODEV 4         ! Disallow access to device special files.
+CONSTANT: ST_NOEXEC 8        ! Disallow program execution.
+CONSTANT: ST_SYNCHRONOUS 16  ! Writes are synced at once.
+CONSTANT: ST_MANDLOCK 64     ! Allow mandatory locks on an FS.
+CONSTANT: ST_WRITE 128       ! Write on file/directory/symlink.
+CONSTANT: ST_APPEND 256      ! Append-only file.
+CONSTANT: ST_IMMUTABLE 512   ! Immutable file.
+CONSTANT: ST_NOATIME 1024    ! Do not update access times.
index 7078ff9f33ad3c587d703d5059ee50542f19ead6..0aafad69fa6966a630bc60dd27117fdc09bae2a5 100644 (file)
@@ -17,7 +17,7 @@ C-STRUCT: statvfs
     { "ulong"   "f_namemax" } ;
 
 ! Flags
-: ST_RDONLY   HEX: 1 ; inline ! Read-only file system
-: ST_NOSUID   HEX: 2 ; inline ! Does not honor setuid/setgid
+CONSTANT: ST_RDONLY   HEX: 1 ! Read-only file system
+CONSTANT: ST_NOSUID   HEX: 2 ! Does not honor setuid/setgid
 
 FUNCTION: int statvfs ( char* path, statvfs* buf ) ;
index cf575c74b16d81e54aa1c84bc1e7035e75c90b5d..1adc1a3da8435cbd9a9327bb3d040b46de53db47 100644 (file)
@@ -3,31 +3,31 @@
 USING: alien.syntax ;
 IN: unix.statvfs.netbsd
 
-: _VFS_NAMELEN    32   ; inline
-: _VFS_MNAMELEN   1024 ; inline
+CONSTANT: _VFS_NAMELEN    32
+CONSTANT: _VFS_MNAMELEN   1024
 
 C-STRUCT: statvfs
-    { "ulong"   "f_flag" }   
+    { "ulong"   "f_flag" }
     { "ulong"   "f_bsize" }
-    { "ulong"   "f_frsize" }  
-    { "ulong"   "f_iosize" }  
-    { "fsblkcnt_t" "f_blocks" }       
-    { "fsblkcnt_t" "f_bfree" } 
-    { "fsblkcnt_t" "f_bavail" }       
-    { "fsblkcnt_t" "f_bresvd" }       
+    { "ulong"   "f_frsize" }
+    { "ulong"   "f_iosize" }
+    { "fsblkcnt_t" "f_blocks" }
+    { "fsblkcnt_t" "f_bfree" }
+    { "fsblkcnt_t" "f_bavail" }
+    { "fsblkcnt_t" "f_bresvd" }
     { "fsfilcnt_t" "f_files" }
     { "fsfilcnt_t" "f_ffree" }
-    { "fsfilcnt_t" "f_favail" }       
-    { "fsfilcnt_t" "f_fresvd" }       
-    { "uint64_t"   "f_syncreads" }    
-    { "uint64_t"   "f_syncwrites" }   
-    { "uint64_t"   "f_asyncreads" }   
-    { "uint64_t"   "f_asyncwrites" }  
+    { "fsfilcnt_t" "f_favail" }
+    { "fsfilcnt_t" "f_fresvd" }
+    { "uint64_t"   "f_syncreads" }
+    { "uint64_t"   "f_syncwrites" }
+    { "uint64_t"   "f_asyncreads" }
+    { "uint64_t"   "f_asyncwrites" }
     { "fsid_t"    "f_fsidx" }
     { "ulong"   "f_fsid" }
-    { "ulong"   "f_namemax" }      
+    { "ulong"   "f_namemax" }
     { "uid_t"   "f_owner" }
-    { { "uint32_t" 4 } "f_spare" }     
+    { { "uint32_t" 4 } "f_spare" }
     { { "char" _VFS_NAMELEN } "f_fstypename" }
     { { "char" _VFS_MNAMELEN } "f_mntonname" }
     { { "char" _VFS_MNAMELEN } "f_mntfromname" } ;
index 3f9353f92692a8295f6683667a96f81bf38b56ef..4ca8d0749daa8b7377264bf0424c6a8ac2dc7378 100644 (file)
@@ -16,7 +16,7 @@ C-STRUCT: statvfs
     { "ulong" "f_flag" }
     { "ulong" "f_namemax" } ;
 
-: ST_RDONLY       1 ; inline
-: ST_NOSUID       2 ; inline
+CONSTANT: ST_RDONLY       1
+CONSTANT: ST_NOSUID       2
 
 FUNCTION: int statvfs ( char* path, statvfs* buf ) ;
index 555f8e2c7da552c2cd79a53653b3bf1e30de8ea8..42444261e225aaa76f9e6d63a7e0090aa41df241 100644 (file)
@@ -1,47 +1,35 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
+! Copyright (C) 2008 Eduardo Cavazos.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.c-types alien.syntax kernel libc
 sequences continuations byte-arrays strings math namespaces
-system combinators vocabs.loader qualified accessors
+system combinators vocabs.loader accessors
 stack-checker macros locals generalizations unix.types
-io io.files vocabs vocabs.loader ;
+io vocabs vocabs.loader ;
 IN: unix
 
-: PROT_NONE   0 ; inline
-: PROT_READ   1 ; inline
-: PROT_WRITE  2 ; inline
-: PROT_EXEC   4 ; inline
-
-: MAP_FILE    0 ; inline
-: MAP_SHARED  1 ; inline
-: MAP_PRIVATE 2 ; inline
-
-: MAP_FAILED -1 <alien> ; inline
-
-: NGROUPS_MAX 16 ; inline
-
-: DT_UNKNOWN   0 ; inline
-: DT_FIFO      1 ; inline
-: DT_CHR       2 ; inline
-: DT_DIR       4 ; inline
-: DT_BLK       6 ; inline
-: DT_REG       8 ; inline
-: DT_LNK      10 ; inline
-: DT_SOCK     12 ; inline
-: DT_WHT      14 ; inline
-
-: dirent-type>file-type ( ch -- type )
-    {
-        { DT_BLK  [ +block-device+ ] }
-        { DT_CHR  [ +character-device+ ] }
-        { DT_DIR  [ +directory+ ] }
-        { DT_LNK  [ +symbolic-link+ ] }
-        { DT_SOCK [ +socket+ ] }
-        { DT_FIFO [ +fifo+ ] }
-        { DT_REG  [ +regular-file+ ] }
-        { DT_WHT  [ +whiteout+ ] }
-        [ drop +unknown+ ]
-    } case ;
+CONSTANT: PROT_NONE   0
+CONSTANT: PROT_READ   1
+CONSTANT: PROT_WRITE  2
+CONSTANT: PROT_EXEC   4
+                       
+CONSTANT: MAP_FILE    0
+CONSTANT: MAP_SHARED  1
+CONSTANT: MAP_PRIVATE 2
+
+: MAP_FAILED ( -- alien ) -1 <alien> ; inline
+
+CONSTANT: NGROUPS_MAX 16
+
+CONSTANT: DT_UNKNOWN   0
+CONSTANT: DT_FIFO      1
+CONSTANT: DT_CHR       2
+CONSTANT: DT_DIR       4
+CONSTANT: DT_BLK       6
+CONSTANT: DT_REG       8
+CONSTANT: DT_LNK      10
+CONSTANT: DT_SOCK     12
+CONSTANT: DT_WHT      14
 
 C-STRUCT: group
     { "char*" "gr_name" }
@@ -167,8 +155,8 @@ FUNCTION: int utime ( char* path, utimebuf* buf ) ;
 
 : change-file-times ( filename access modification -- )
     "utimebuf" <c-object>
-    tuck set-utimbuf-modtime
-    tuck set-utimbuf-actime
+    [ set-utimbuf-modtime ] keep
+    [ set-utimbuf-actime ] keep
     [ utime ] unix-system-call drop ;
 
 FUNCTION: int pclose ( void* file ) ;
@@ -181,7 +169,7 @@ FUNCTION: int readdir_r ( void* dirp, dirent* entry, dirent** result ) ;
 
 FUNCTION: ssize_t readlink ( char* path, char* buf, size_t bufsize ) ;
 
-: PATH_MAX 1024 ; inline
+CONSTANT: PATH_MAX 1024
 
 : read-symbolic-link ( path -- path )
     PATH_MAX <byte-array> dup [
index 83e7e99481cc69e0bfd7af6ec798a4c333d7ca4a..faee36d076027097d34b61e16ecb8477b0c17e59 100644 (file)
@@ -7,13 +7,13 @@ HELP: all-users
 { $values { "seq" sequence } }
 { $description "Returns a sequence of high-level " { $link passwd } " tuples that are platform-dependent and field for field complete with the Unix " { $link passwd } " structure." } ;
 
-HELP: effective-username
+HELP: effective-user-name
 { $values { "string" string } }
-{ $description "Returns the effective username for the current user." } ;
+{ $description "Returns the effective user-name for the current user." } ;
 
 HELP: effective-user-id
 { $values { "id" integer } }
-{ $description "Returns the effective username id for the current user." } ;
+{ $description "Returns the effective user-name id for the current user." } ;
 
 HELP: new-passwd
 { $values { "passwd" passwd } }
@@ -31,9 +31,9 @@ HELP: passwd>new-passwd
      { "new-passwd" "a passwd tuple" } }
 { $description "A platform-specific conversion routine from a passwd structure to a passwd tuple." } ;
 
-HELP: real-username
+HELP: real-user-name
 { $values { "string" string } }
-{ $description "The real username of the current user." } ;
+{ $description "The real user-name of the current user." } ;
 
 HELP: real-user-id
 { $values { "id" integer } }
@@ -41,34 +41,34 @@ HELP: real-user-id
 
 HELP: set-effective-user
 { $values { "string/id" "a string or a user id" } }
-{ $description "Sets the current effective user given a username or a user id." } ;
+{ $description "Sets the current effective user given a user-name or a user id." } ;
 
 HELP: set-real-user
 { $values { "string/id" "a string or a user id" } }
-{ $description "Sets the current real user given a username or a user id." } ;
+{ $description "Sets the current real user given a user-name or a user id." } ;
 
 HELP: user-passwd
 { $values
      { "obj" object }
-     { "passwd" passwd } }
-{ $description "Returns the passwd tuple given a username string or user id." } ;
+     { "passwd/f" "passwd or f" } }
+{ $description "Returns the passwd tuple given a user-name string or user id." } ;
 
-HELP: username
+HELP: user-name
 { $values
      { "id" integer }
      { "string" string } }
-{ $description "Returns the username associated with the user id." } ;
+{ $description "Returns the user-name associated with the user id." } ;
 
 HELP: user-id
 { $values
      { "string" string }
      { "id" integer } }
-{ $description "Returns the user id associated with the username." } ;
+{ $description "Returns the user id associated with the user-name." } ;
 
 HELP: with-effective-user
 { $values
      { "string/id" "a string or a uid" } { "quot" quotation } }
-{ $description "Sets the effective username and calls the quotation. Restores the current username on success or on error after the call." } ;
+{ $description "Sets the effective user-name and calls the quotation. Restores the current user-name on success or on error after the call." } ;
 
 HELP: with-user-cache
 { $values
@@ -78,11 +78,11 @@ HELP: with-user-cache
 HELP: with-real-user
 { $values
      { "string/id" "a string or a uid" } { "quot" quotation } }
-{ $description "Sets the real username and calls the quotation. Restores the current username on success or on error after the call." } ;
+{ $description "Sets the real user-name and calls the quotation. Restores the current user-name on success or on error after the call." } ;
 
 {
-    real-username real-user-id set-real-user
-    effective-username effective-user-id          
+    real-user-name real-user-id set-real-user
+    effective-user-name effective-user-id          
     set-effective-user
 } related-words
 
@@ -91,13 +91,12 @@ ARTICLE: "unix.users" "Unix users"
 $nl
 "Listing all users:"
 { $subsection all-users }
-"Returning a passwd tuple:"
 "Real user:"
-{ $subsection real-username }
+{ $subsection real-user-name }
 { $subsection real-user-id }
 { $subsection set-real-user }
 "Effective user:"
-{ $subsection effective-username }
+{ $subsection effective-user-name }
 { $subsection effective-user-id }
 { $subsection set-effective-user }
 "Combinators to change users:"
index 1113383635f5503ba040386ec439d42a178c9080..f2a4b7bc27ea54e779e5ada034d4dbca7b9a49f9 100644 (file)
@@ -8,8 +8,8 @@ IN: unix.users.tests
 
 \ all-users must-infer
 
-[ t ] [ real-username string? ] unit-test
-[ t ] [ effective-username string? ] unit-test
+[ t ] [ real-user-name string? ] unit-test
+[ t ] [ effective-user-name string? ] unit-test
 
 [ t ] [ real-user-id integer? ] unit-test
 [ t ] [ effective-user-id integer? ] unit-test
@@ -17,10 +17,14 @@ IN: unix.users.tests
 [ ] [ real-user-id set-real-user ] unit-test
 [ ] [ effective-user-id set-effective-user ] unit-test
 
-[ ] [ real-username [ ] with-real-user ] unit-test
+[ ] [ real-user-name [ ] with-real-user ] unit-test
 [ ] [ real-user-id [ ] with-real-user ] unit-test
 
-[ ] [ effective-username [ ] with-effective-user ] unit-test
+[ ] [ effective-user-name [ ] with-effective-user ] unit-test
 [ ] [ effective-user-id [ ] with-effective-user ] unit-test
 
 [ ] [ [ ] with-user-cache ] unit-test
+
+[ "9999999999999999999" ] [ 9999999999999999999 user-name ] unit-test
+
+[ f ] [ 89898989898989898989898989898 user-passwd ] unit-test
index 8487d5adf2a01c9d52c9da5725af66f05c16fc5e..da38972955c4ecbdd51ce54ed4a6445162d743c8 100644 (file)
@@ -1,13 +1,13 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.c-types alien.strings io.encodings.utf8
-io.unix.backend kernel math sequences splitting unix strings
+io.backend.unix kernel math sequences splitting unix strings
 combinators.short-circuit grouping byte-arrays combinators
 accessors math.parser fry assocs namespaces continuations
 vocabs.loader system ;
 IN: unix.users
 
-TUPLE: passwd username password uid gid gecos dir shell ;
+TUPLE: passwd user-name password uid gid gecos dir shell ;
 
 HOOK: new-passwd os ( -- passwd )
 HOOK: passwd>new-passwd os ( passwd -- new-passwd )
@@ -20,7 +20,7 @@ M: unix new-passwd ( -- passwd )
 M: unix passwd>new-passwd ( passwd -- seq )
     [ new-passwd ] dip
     {
-        [ passwd-pw_name >>username ]
+        [ passwd-pw_name >>user-name ]
         [ passwd-pw_passwd >>password ]
         [ passwd-pw_uid >>uid ]
         [ passwd-pw_gid >>gid ]
@@ -47,17 +47,18 @@ SYMBOL: user-cache
 : with-user-cache ( quot -- )
     [ <user-cache> user-cache ] dip with-variable ; inline
 
-GENERIC: user-passwd ( obj -- passwd )
+GENERIC: user-passwd ( obj -- passwd/f )
 
 M: integer user-passwd ( id -- passwd/f )
     user-cache get
-    [ at ] [ getpwuid passwd>new-passwd ] if* ;
+    [ at ] [ getpwuid [ passwd>new-passwd ] [ f ] if* ] if* ;
 
 M: string user-passwd ( string -- passwd/f )
     getpwnam dup [ passwd>new-passwd ] when ;
 
-: username ( id -- string )
-    user-passwd username>> ;
+: user-name ( id -- string )
+    dup user-passwd
+    [ nip user-name>> ] [ number>string ] if* ;
 
 : user-id ( string -- id )
     user-passwd uid>> ;
@@ -65,14 +66,14 @@ M: string user-passwd ( string -- passwd/f )
 : real-user-id ( -- id )
     getuid ; inline
 
-: real-username ( -- string )
-    real-user-id username ; inline
+: real-user-name ( -- string )
+    real-user-id user-name ; inline
 
 : effective-user-id ( -- id )
     geteuid ; inline
 
-: effective-username ( -- string )
-    effective-user-id username ; inline
+: effective-user-name ( -- string )
+    effective-user-id user-name ; inline
 
 GENERIC: set-real-user ( string/id -- )
 
index e1756daa0071068518b8b0e5a9c81c2eb1ddd6e5..6b70ceee2e1d5318a8f1ab72581d9e5f5f8900b1 100644 (file)
@@ -6,18 +6,18 @@ unix calendar system accessors unix.time calendar.unix
 vocabs.loader ;
 IN: unix.utmpx
 
-: EMPTY 0 ; inline
-: RUN_LVL 1 ; inline
-: BOOT_TIME 2 ; inline
-: OLD_TIME 3 ; inline
-: NEW_TIME 4 ; inline
-: INIT_PROCESS 5 ; inline
-: LOGIN_PROCESS 6 ; inline
-: USER_PROCESS 7 ; inline
-: DEAD_PROCESS 8 ; inline
-: ACCOUNTING 9 ; inline
-: SIGNATURE 10 ; inline
-: SHUTDOWN_TIME 11 ; inline
+CONSTANT: EMPTY 0
+CONSTANT: RUN_LVL 1
+CONSTANT: BOOT_TIME 2
+CONSTANT: OLD_TIME 3
+CONSTANT: NEW_TIME 4
+CONSTANT: INIT_PROCESS 5
+CONSTANT: LOGIN_PROCESS 6
+CONSTANT: USER_PROCESS 7
+CONSTANT: DEAD_PROCESS 8
+CONSTANT: ACCOUNTING 9
+CONSTANT: SIGNATURE 10
+CONSTANT: SHUTDOWN_TIME 11
 
 FUNCTION: void setutxent ( ) ;
 FUNCTION: void endutxent ( ) ;
index ce8a7be88ccebd9bc3213fde2d9002370e9e5a50..f6c25980eac5f96f55716479b6cda9f58f819f5b 100644 (file)
@@ -1,6 +1,6 @@
 USING: assocs hashtables help.markup help.syntax
-io.streams.string io.files kernel strings present math multiline
-;
+io.streams.string io.files io.pathnames kernel strings present
+math multiline ;
 IN: urls
 
 HELP: url
diff --git a/basis/uuid/authors.txt b/basis/uuid/authors.txt
new file mode 100644 (file)
index 0000000..e091bb8
--- /dev/null
@@ -0,0 +1 @@
+John Benediktsson
diff --git a/basis/uuid/summary.txt b/basis/uuid/summary.txt
new file mode 100644 (file)
index 0000000..ba55562
--- /dev/null
@@ -0,0 +1 @@
+Generates UUID's.
diff --git a/basis/uuid/uuid-docs.factor b/basis/uuid/uuid-docs.factor
new file mode 100644 (file)
index 0000000..487d5a1
--- /dev/null
@@ -0,0 +1,47 @@
+
+USING: help.syntax help.markup kernel prettyprint sequences strings ;
+
+IN: uuid
+
+HELP: uuid1
+{ $values { "string" "a UUID string" } }
+{ $description 
+    "Generates a UUID (version 1) from the host ID, sequence number, "
+    "and current time."
+} ;
+
+HELP: uuid3
+{ $values { "namespace" string } { "name" string } { "string" "a UUID string" } }
+{ $description 
+    "Generates a UUID (version 3) from the MD5 hash of a namespace "
+    "UUID and a name."
+} ;
+
+HELP: uuid4
+{ $values { "string" "a UUID string" } }
+{ $description 
+    "Generates a UUID (version 4) from random bits." 
+} ;
+
+HELP: uuid5
+{ $values { "namespace" string } { "name" string } { "string" "a UUID string" } }
+{ $description 
+    "Generates a UUID (version 5) from the SHA-1 hash of a namespace " 
+    "UUID and a name."
+} ;
+
+
+ARTICLE: "uuid" "UUID (Universally Unique Identifier)"
+"The " { $vocab-link "uuid" } " vocabulary is used to generate UUIDs. "
+"The below words can be used to generate version 1, 3, 4, and 5 UUIDs as specified in RFC 4122."
+$nl 
+"If all you want is a unique ID, you should probably call " { $link uuid1 } " or " { $link uuid4 } "."
+{ $subsection uuid1 }
+{ $subsection uuid3 }
+{ $subsection uuid4 }
+{ $subsection uuid5 }
+;
+
+ABOUT: "uuid"
+
+
diff --git a/basis/uuid/uuid-tests.factor b/basis/uuid/uuid-tests.factor
new file mode 100644 (file)
index 0000000..909e5f6
--- /dev/null
@@ -0,0 +1,18 @@
+! Copyright (C) 2008 John Benediktsson
+! See http://factorcode.org/license.txt for BSD license
+
+USING: kernel uuid tools.test ;
+
+IN: uuid.tests
+
+[ t ] [ NAMESPACE_DNS  [ uuid-parse uuid-unparse ] keep = ] unit-test
+[ t ] [ NAMESPACE_URL  [ uuid-parse uuid-unparse ] keep = ] unit-test
+[ t ] [ NAMESPACE_OID  [ uuid-parse uuid-unparse ] keep = ] unit-test
+[ t ] [ NAMESPACE_X500 [ uuid-parse uuid-unparse ] keep = ] unit-test
+
+[ t ] [ NAMESPACE_URL "ABCD" uuid3 
+        "2e10e403-d7fa-3ffb-808f-ab834a46890e" = ] unit-test
+
+[ t ] [ NAMESPACE_URL "ABCD" uuid5 
+        "0aa883d6-7953-57e7-a8f0-66db29ce5a91" = ] unit-test
+
diff --git a/basis/uuid/uuid.factor b/basis/uuid/uuid.factor
new file mode 100644 (file)
index 0000000..337ea22
--- /dev/null
@@ -0,0 +1,89 @@
+! Copyright (C) 2008 John Benediktsson
+! See http://factorcode.org/license.txt for BSD license
+
+USING: byte-arrays checksums checksums.md5 checksums.sha1 
+kernel math math.parser math.ranges random unicode.case 
+sequences strings system io.binary ;
+
+IN: uuid 
+
+<PRIVATE
+
+: (timestamp) ( -- time_high time_mid time_low ) 
+    ! 0x01b21dd213814000L is the number of 100-ns intervals
+    ! between the UUID epoch 1582-10-15 00:00:00 and the 
+    ! Unix epoch 1970-01-01 00:00:00.
+    micros 10 * HEX: 01b21dd213814000 +
+    [ -48 shift HEX: 0fff bitand ] 
+    [ -32 shift HEX: ffff bitand ]
+    [ HEX: ffffffff bitand ]
+    tri ;
+
+: (hardware) ( -- address ) 
+    ! Choose a random 48-bit number with eighth bit 
+    ! set to 1 (as recommended in RFC 4122)
+    48 random-bits HEX: 010000000000 bitor ;
+
+: (clock) ( -- clockseq ) 
+    ! Choose a random 14-bit number
+    14 random-bits ;
+
+: <uuid> ( address clockseq time_high time_mid time_low -- n )
+    96 shift 
+    [ 80 shift ] dip bitor 
+    [ 64 shift ] dip bitor
+    [ 48 shift ] dip bitor
+    bitor ;
+
+: (version) ( n version -- n' )
+    [
+        HEX: c000 48 shift bitnot bitand 
+        HEX: 8000 48 shift bitor 
+        HEX: f000 64 shift bitnot bitand
+    ] dip 76 shift bitor ;
+
+: uuid>string ( n -- string )
+    >hex 32 CHAR: 0 pad-left 
+    [ CHAR: - 20 ] dip insert-nth
+    [ CHAR: - 16 ] dip insert-nth 
+    [ CHAR: - 12 ] dip insert-nth 
+    [ CHAR: - 8 ] dip insert-nth ;
+: string>uuid ( string -- n )
+    [ CHAR: - = not ] filter 16 base> ;
+
+: uuid>byte-array ( n -- byte-array ) 
+    16 >be ;
+
+PRIVATE>
+
+: uuid-parse ( string -- byte-array ) 
+    string>uuid uuid>byte-array ;
+
+: uuid-unparse ( byte-array -- string ) 
+    be> uuid>string ;
+
+: uuid1 ( -- string )
+    (hardware) (clock) (timestamp) <uuid> 
+    1 (version) uuid>string ;
+
+: uuid3 ( namespace name -- string )
+    [ uuid-parse ] dip append 
+    md5 checksum-bytes 16 short head be> 
+    3 (version) uuid>string ;
+
+: uuid4 ( -- string )
+    128 random-bits 
+    4 (version) uuid>string ;
+
+: uuid5 ( namespace name -- string )
+    [ uuid-parse ] dip append 
+    sha1 checksum-bytes 16 short head be> 
+    5 (version) uuid>string ;
+
+CONSTANT: NAMESPACE_DNS  "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
+CONSTANT: NAMESPACE_URL  "6ba7b811-9dad-11d1-80b4-00c04fd430c8"
+CONSTANT: NAMESPACE_OID  "6ba7b812-9dad-11d1-80b4-00c04fd430c8"
+CONSTANT: NAMESPACE_X500 "6ba7b814-9dad-11d1-80b4-00c04fd430c8"
+
+
index 4f03fa915b8b53b2672bb5115cb624141af0361c..8f5a5875690d03eba157b689178510c967948a2d 100644 (file)
@@ -2,6 +2,10 @@ USING: help.markup help.syntax io.streams.string quotations
 strings math regexp regexp.backend ;
 IN: validators
 
+HELP: v-checkbox
+{ $values { "str" string } {  "?" "a boolean" } }
+{ $description "Converts the string value of a checkbox component (either \"on\" or \"off\") to a boolean value." } ;
+
 HELP: v-captcha
 { $values { "str" string } }
 { $description "Throws a validation error if the string is non-empty. This is used to create bait fields for spam-bots to fill in." } ;
@@ -99,6 +103,7 @@ $nl
 { $subsection v-one-line    }
 { $subsection v-one-word    }
 { $subsection v-captcha     }
+{ $subsection v-checkbox    }
 "More complex validators:"
 { $subsection v-email       }
 { $subsection v-url         }
index d4f3487d0b9c83cb4f96674eeeef87394f336702..acdcdda5d2b27954b3b7732cd13adafe55de4826 100644 (file)
@@ -10,6 +10,9 @@ namespaces assocs ;
 [ "hello" ] [ "hello" v-one-word ] unit-test
 [ "hello world" v-one-word ] must-fail
 
+[ t ] [ "on" v-checkbox ] unit-test
+[ f ] [ "off" v-checkbox ] unit-test
+
 [ "foo" v-number ] must-fail
 [ 123 ] [ "123" v-number ] unit-test
 [ 123 ] [ "123" v-integer ] unit-test
index 7c41d3efdb7ec4f885aff4ccbd588702d495f1df..eaf8056c451028ec1da1c46fde4a038519239c28 100644 (file)
@@ -2,9 +2,12 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel continuations sequences math namespaces make sets
 math.parser math.ranges assocs regexp unicode.categories arrays
-hashtables words classes quotations xmode.catalog ;
+hashtables words classes quotations xmode.catalog unicode.case ;
 IN: validators
 
+: v-checkbox ( str -- ? )
+    >lower "on" = ;
+
 : v-default ( str def -- str/def )
     over empty? spin ? ;
 
@@ -51,7 +54,7 @@ IN: validators
     ] if ;
 
 : v-regexp ( str what regexp -- str )
-    >r over r> matches?
+    [ over ] dip matches?
     [ drop ] [ "invalid " prepend throw ] if ;
 
 : v-email ( str -- str )
@@ -62,15 +65,15 @@ IN: validators
     v-regexp ;
 
 : v-url ( str -- str )
-    "URL" R' (ftp|http|https)://\S+' v-regexp ;
+    "URL" R' (?:ftp|http|https)://\S+' v-regexp ;
 
 : v-captcha ( str -- str )
     dup empty? [ "must remain blank" throw ] unless ;
 
 : v-one-line ( str -- str )
     v-required
-    dup "\r\n" intersect empty?
-    [ "must be a single line" throw ] unless ;
+    dup "\r\n" intersects?
+    [ "must be a single line" throw ] when ;
 
 : v-one-word ( str -- str )
     v-required
index 866af469e94357c84f46e2190df3e2fef30a1a98..df38869fbf35ae52a5f5cb53555a848172580df1 100644 (file)
@@ -15,7 +15,17 @@ ABOUT: "values"
 HELP: VALUE:\r
 { $syntax "VALUE: word" }\r
 { $values { "word" "a word to be created" } }\r
-{ $description "Creates a value on the given word, initializing it to hold " { $code f } ". To get the value, just run the word. To set it, use " { $link set-value } "." } ;\r
+{ $description "Creates a value on the given word, initializing it to hold " { $snippet "f" } ". To get the value, just run the word. To set it, use " { $link POSTPONE: to: } "." }\r
+{ $examples\r
+  { $example\r
+    "USING: values math prettyprint ;"\r
+    "IN: scratchpad"\r
+    "VALUE: x"\r
+    "2 2 + to: x"\r
+    "x ."\r
+    "4"\r
+  }\r
+} ;\r
 \r
 HELP: get-value\r
 { $values { "word" "a value word" } { "value" "the contents" } }\r
index 0dd1058370a75ab334c984b88bcffd45d74a410d..75a37339b1797c60bcab6b6c8663b6dab74f5b8f 100644 (file)
@@ -1,6 +1,7 @@
-! Copyright (C) 2008 Daniel Ehrenberg.
+! Copyright (C) 2008, 2009 Daniel Ehrenberg, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors kernel parser words sequences quotations ;
+USING: accessors kernel parser words sequences quotations
+combinators.short-circuit definitions ;
 IN: values
 
 ! Mutating literals in word definitions is not really allowed,
@@ -22,12 +23,23 @@ TUPLE: value-holder < identity-tuple obj ;
 
 PRIVATE>
 
+PREDICATE: value-word < word
+    def>> {
+        [ length 2 = ]
+        [ first value-holder? ]
+        [ second \ obj>> = ]
+    } 1&& ;
+
 : VALUE:
     CREATE-WORD
     dup t "no-def-strip" set-word-prop
     T{ value-holder } clone [ obj>> ] curry
     (( -- value )) define-declared ; parsing
 
+M: value-word definer drop \ VALUE: f ;
+
+M: value-word definition drop f ;
+
 : set-value ( value word -- )
     def>> first (>>obj) ;
 
index ea40594964760773e50c6efe0ccb165abd5d80f8..e4f64ca8f80c42119c766b815d82d2b7e73ed0c4 100644 (file)
@@ -17,7 +17,8 @@ M: vlist nth-unsafe vector>> nth-unsafe ;
 
 <PRIVATE
 
-: >vlist< [ length>> ] [ vector>> ] bi ; inline
+: >vlist< ( vlist -- len vec )
+    [ length>> ] [ vector>> ] bi ; inline
 
 : unshare ( len vec -- len vec' )
     clone [ set-length ] 2keep ; inline
index 251b59a4d837bcfe75460d928bdd845bc9e480a1..f76e389dce76d50e1c07a0c18022cccdd9d8cea7 100644 (file)
@@ -1,65 +1,64 @@
-USING: alias alien.syntax kernel math windows.types math.bitwise ;
+USING: alien.syntax kernel math windows.types math.bitwise ;
 IN: windows.advapi32
 LIBRARY: advapi32
 
-: PROV_RSA_FULL       1 ; inline
-: PROV_RSA_SIG        2 ; inline
-: PROV_DSS            3 ; inline
-: PROV_FORTEZZA       4 ; inline
-: PROV_MS_EXCHANGE    5 ; inline
-: PROV_SSL            6 ; inline
-: PROV_RSA_SCHANNEL  12 ; inline
-: PROV_DSS_DH        13 ; inline
-: PROV_EC_ECDSA_SIG  14 ; inline
-: PROV_EC_ECNRA_SIG  15 ; inline
-: PROV_EC_ECDSA_FULL 16 ; inline
-: PROV_EC_ECNRA_FULL 17 ; inline
-: PROV_DH_SCHANNEL   18 ; inline
-: PROV_SPYRUS_LYNKS  20 ; inline
-: PROV_RNG           21 ; inline
-: PROV_INTEL_SEC     22 ; inline
-: PROV_REPLACE_OWF   23 ; inline
-: PROV_RSA_AES       24 ; inline
-
-: MS_DEF_DH_SCHANNEL_PROV
-    "Microsoft DH Schannel Cryptographic Provider" ; inline
-
-: MS_DEF_DSS_DH_PROV
-    "Microsoft Base DSS and Diffie-Hellman Cryptographic Provider" ; inline
-
-: MS_DEF_DSS_PROV
-    "Microsoft Base DSS Cryptographic Provider" ; inline
-
-: MS_DEF_PROV
-    "Microsoft Base Cryptographic Provider v1.0" ; inline
-
-: MS_DEF_RSA_SCHANNEL_PROV
-    "Microsoft RSA Schannel Cryptographic Provider" ; inline
+CONSTANT: PROV_RSA_FULL       1
+CONSTANT: PROV_RSA_SIG        2
+CONSTANT: PROV_DSS            3
+CONSTANT: PROV_FORTEZZA       4
+CONSTANT: PROV_MS_EXCHANGE    5
+CONSTANT: PROV_SSL            6
+CONSTANT: PROV_RSA_SCHANNEL  12
+CONSTANT: PROV_DSS_DH        13
+CONSTANT: PROV_EC_ECDSA_SIG  14
+CONSTANT: PROV_EC_ECNRA_SIG  15
+CONSTANT: PROV_EC_ECDSA_FULL 16
+CONSTANT: PROV_EC_ECNRA_FULL 17
+CONSTANT: PROV_DH_SCHANNEL   18
+CONSTANT: PROV_SPYRUS_LYNKS  20
+CONSTANT: PROV_RNG           21
+CONSTANT: PROV_INTEL_SEC     22
+CONSTANT: PROV_REPLACE_OWF   23
+CONSTANT: PROV_RSA_AES       24
+
+CONSTANT: MS_DEF_DH_SCHANNEL_PROV "Microsoft DH Schannel Cryptographic Provider"
+
+CONSTANT: MS_DEF_DSS_DH_PROV
+    "Microsoft Base DSS and Diffie-Hellman Cryptographic Provider"
+
+CONSTANT: MS_DEF_DSS_PROV
+    "Microsoft Base DSS Cryptographic Provider"
+
+CONSTANT: MS_DEF_PROV
+    "Microsoft Base Cryptographic Provider v1.0"
+
+CONSTANT: MS_DEF_RSA_SCHANNEL_PROV
+    "Microsoft RSA Schannel Cryptographic Provider"
 
 ! Unsupported (!)
-: MS_DEF_RSA_SIG_PROV
-    "Microsoft RSA Signature Cryptographic Provider" ; inline
+CONSTANT: MS_DEF_RSA_SIG_PROV
+    "Microsoft RSA Signature Cryptographic Provider"
 
-: MS_ENH_DSS_DH_PROV
-    "Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider" ; inline
+CONSTANT: MS_ENH_DSS_DH_PROV
+    "Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider"
 
-: MS_ENH_RSA_AES_PROV
-    "Microsoft Enhanced RSA and AES Cryptographic Provider" ; inline
+CONSTANT: MS_ENH_RSA_AES_PROV
+    "Microsoft Enhanced RSA and AES Cryptographic Provider"
 
-: MS_ENHANCED_PROV
-    "Microsoft Enhanced Cryptographic Provider v1.0" ; inline
+CONSTANT: MS_ENHANCED_PROV
+    "Microsoft Enhanced Cryptographic Provider v1.0"
 
-: MS_SCARD_PROV
-    "Microsoft Base Smart Card Crypto Provider" ; inline
+CONSTANT: MS_SCARD_PROV
+    "Microsoft Base Smart Card Crypto Provider"
 
-: MS_STRONG_PROV
-    "Microsoft Strong Cryptographic Provider" ; inline
+CONSTANT: MS_STRONG_PROV
+    "Microsoft Strong Cryptographic Provider"
 
-: CRYPT_VERIFYCONTEXT  HEX: F0000000 ; inline
-: CRYPT_NEWKEYSET      HEX: 8 ; inline
-: CRYPT_DELETEKEYSET   HEX: 10 ; inline
-: CRYPT_MACHINE_KEYSET HEX: 20 ; inline
-: CRYPT_SILENT         HEX: 40 ; inline
+CONSTANT: CRYPT_VERIFYCONTEXT  HEX: F0000000
+CONSTANT: CRYPT_NEWKEYSET      HEX: 8
+CONSTANT: CRYPT_DELETEKEYSET   HEX: 10
+CONSTANT: CRYPT_MACHINE_KEYSET HEX: 20
+CONSTANT: CRYPT_SILENT         HEX: 40
 
 C-STRUCT: ACL
     { "BYTE" "AclRevision" }
@@ -70,16 +69,16 @@ C-STRUCT: ACL
 
 TYPEDEF: ACL* PACL
 
-: ACCESS_ALLOWED_ACE_TYPE 0 ; inline
-: ACCESS_DENIED_ACE_TYPE 1 ; inline
-: SYSTEM_AUDIT_ACE_TYPE 2 ; inline
-: SYSTEM_ALARM_ACE_TYPE 3 ; inline
+CONSTANT: ACCESS_ALLOWED_ACE_TYPE 0
+CONSTANT: ACCESS_DENIED_ACE_TYPE 1
+CONSTANT: SYSTEM_AUDIT_ACE_TYPE 2
+CONSTANT: SYSTEM_ALARM_ACE_TYPE 3
 
-: OBJECT_INHERIT_ACE HEX: 1 ; inline
-: CONTAINER_INHERIT_ACE HEX: 2 ; inline
-: NO_PROPAGATE_INHERIT_ACE HEX: 4 ; inline
-: INHERIT_ONLY_ACE HEX: 8 ; inline
-: VALID_INHERIT_FLAGS HEX: f ; inline
+CONSTANT: OBJECT_INHERIT_ACE HEX: 1
+CONSTANT: CONTAINER_INHERIT_ACE HEX: 2
+CONSTANT: NO_PROPAGATE_INHERIT_ACE HEX: 4
+CONSTANT: INHERIT_ONLY_ACE HEX: 8
+CONSTANT: VALID_INHERIT_FLAGS HEX: f
 
 C-STRUCT: ACE_HEADER
     { "BYTE" "AceType" }
@@ -125,46 +124,46 @@ TYPEDEF: ACCESS_ALLOWED_CALLBACK_ACE* PACCESS_ALLOWED_CALLBACK_ACE
 
 
 ! typedef enum _TOKEN_INFORMATION_CLASS {
-: TokenUser 1 ; inline
-: TokenGroups 2 ; inline
-: TokenPrivileges 3 ; inline
-: TokenOwner 4 ; inline
-: TokenPrimaryGroup 5 ; inline
-: TokenDefaultDacl 6 ; inline
-: TokenSource 7 ; inline
-: TokenType 8 ; inline
-: TokenImpersonationLevel 9 ; inline
-: TokenStatistics 10 ; inline
-: TokenRestrictedSids 11 ; inline
-: TokenSessionId 12 ; inline
-: TokenGroupsAndPrivileges 13 ; inline
-: TokenSessionReference 14 ; inline
-: TokenSandBoxInert 15 ; inline
+CONSTANT: TokenUser 1
+CONSTANT: TokenGroups 2
+CONSTANT: TokenPrivileges 3
+CONSTANT: TokenOwner 4
+CONSTANT: TokenPrimaryGroup 5
+CONSTANT: TokenDefaultDacl 6
+CONSTANT: TokenSource 7
+CONSTANT: TokenType 8
+CONSTANT: TokenImpersonationLevel 9
+CONSTANT: TokenStatistics 10
+CONSTANT: TokenRestrictedSids 11
+CONSTANT: TokenSessionId 12
+CONSTANT: TokenGroupsAndPrivileges 13
+CONSTANT: TokenSessionReference 14
+CONSTANT: TokenSandBoxInert 15
 ! } TOKEN_INFORMATION_CLASS;
 
-: DELETE                     HEX: 00010000 ; inline
-: READ_CONTROL               HEX: 00020000 ; inline
-: WRITE_DAC                  HEX: 00040000 ; inline
-: WRITE_OWNER                HEX: 00080000 ; inline
-: SYNCHRONIZE                HEX: 00100000 ; inline
-: STANDARD_RIGHTS_REQUIRED   HEX: 000f0000 ; inline
-
-: STANDARD_RIGHTS_READ       READ_CONTROL ; inline
-: STANDARD_RIGHTS_WRITE      READ_CONTROL ; inline
-: STANDARD_RIGHTS_EXECUTE    READ_CONTROL ; inline
-
-: TOKEN_TOKEN_ADJUST_DEFAULT   HEX: 0080 ; inline
-: TOKEN_ADJUST_GROUPS          HEX: 0040 ; inline
-: TOKEN_ADJUST_PRIVILEGES      HEX: 0020 ; inline
-: TOKEN_ADJUST_SESSIONID       HEX: 0100 ; inline
-: TOKEN_ASSIGN_PRIMARY         HEX: 0001 ; inline
-: TOKEN_DUPLICATE              HEX: 0002 ; inline
-: TOKEN_EXECUTE                STANDARD_RIGHTS_EXECUTE ; inline
-: TOKEN_IMPERSONATE            HEX: 0004 ; inline
-: TOKEN_QUERY                  HEX: 0008 ; inline
-: TOKEN_QUERY_SOURCE           HEX: 0010 ; inline
-: TOKEN_ADJUST_DEFAULT         HEX: 0080 ; inline
-: TOKEN_READ ( -- n ) STANDARD_RIGHTS_READ TOKEN_QUERY bitor ;
+CONSTANT: DELETE                     HEX: 00010000
+CONSTANT: READ_CONTROL               HEX: 00020000
+CONSTANT: WRITE_DAC                  HEX: 00040000
+CONSTANT: WRITE_OWNER                HEX: 00080000
+CONSTANT: SYNCHRONIZE                HEX: 00100000
+CONSTANT: STANDARD_RIGHTS_REQUIRED   HEX: 000f0000
+
+ALIAS: STANDARD_RIGHTS_READ       READ_CONTROL
+ALIAS: STANDARD_RIGHTS_WRITE      READ_CONTROL
+ALIAS: STANDARD_RIGHTS_EXECUTE    READ_CONTROL
+
+CONSTANT: TOKEN_TOKEN_ADJUST_DEFAULT   HEX: 0080
+CONSTANT: TOKEN_ADJUST_GROUPS          HEX: 0040
+CONSTANT: TOKEN_ADJUST_PRIVILEGES      HEX: 0020
+CONSTANT: TOKEN_ADJUST_SESSIONID       HEX: 0100
+CONSTANT: TOKEN_ASSIGN_PRIMARY         HEX: 0001
+CONSTANT: TOKEN_DUPLICATE              HEX: 0002
+ALIAS: TOKEN_EXECUTE                STANDARD_RIGHTS_EXECUTE
+CONSTANT: TOKEN_IMPERSONATE            HEX: 0004
+CONSTANT: TOKEN_QUERY                  HEX: 0008
+CONSTANT: TOKEN_QUERY_SOURCE           HEX: 0010
+CONSTANT: TOKEN_ADJUST_DEFAULT         HEX: 0080
+: TOKEN_READ ( -- n ) { STANDARD_RIGHTS_READ TOKEN_QUERY } flags ;
 
 : TOKEN_WRITE ( -- n )
     {
index 710feeec4d8c065c692c0465bbccb3f468639c9c..813d8315ac07f0a893c220e66e5e75fb49f37e6c 100755 (executable)
@@ -123,7 +123,7 @@ unless
 
 : (make-callbacks) ( implementations -- sequence )
     dup [ first ] map (make-iunknown-methods)
-    [ >r >r first2 r> r> swap (make-interface-callbacks) ]
+    [ [ first2 ] 2dip swap (make-interface-callbacks) ]
     curry map-index ;
 
 : (malloc-wrapped-object) ( wrapper -- wrapped-object )
index e3bec6d7ac17e5d9b5b2da8cd862f19ab6d8834a..0e9a03f0759d46ebc96b709d39ef63d60c7fd720 100755 (executable)
@@ -1,6 +1,6 @@
 USING: windows.dinput windows.kernel32 windows.ole32 windows.com
 windows.com.syntax alien alien.c-types alien.syntax kernel system namespaces
-combinators sequences symbols fry math accessors macros words quotations
+combinators sequences fry math accessors macros words quotations
 libc continuations generalizations splitting locals assocs init
 struct-arrays ;
 IN: windows.dinput.constants
old mode 100644 (file)
new mode 100755 (executable)
index 0c75f43..1cd22be
@@ -384,314 +384,314 @@ COM-INTERFACE: IDirectInput8W IUnknown {BF798031-483A-4DA2-AA99-5D64ED369700}
 
 FUNCTION: HRESULT DirectInput8Create ( HINSTANCE hinst, DWORD dwVersion, REFIID riidtlf, LPVOID* ppvOut, LPUNKNOWN punkOuter ) ;
 
-: DIRECTINPUT_VERSION HEX: 0800 ; inline
-
-: DI8DEVCLASS_ALL             0 ; inline
-: DI8DEVCLASS_DEVICE          1 ; inline
-: DI8DEVCLASS_POINTER         2 ; inline
-: DI8DEVCLASS_KEYBOARD        3 ; inline
-: DI8DEVCLASS_GAMECTRL        4 ; inline
-
-: DIEDFL_ALLDEVICES       HEX: 00000000 ; inline
-: DIEDFL_ATTACHEDONLY     HEX: 00000001 ; inline
-: DIEDFL_FORCEFEEDBACK    HEX: 00000100 ; inline
-: DIEDFL_INCLUDEALIASES   HEX: 00010000 ; inline
-: DIEDFL_INCLUDEPHANTOMS  HEX: 00020000 ; inline
-: DIEDFL_INCLUDEHIDDEN    HEX: 00040000 ; inline
-
-: DIENUM_STOP             0 ; inline
-: DIENUM_CONTINUE         1 ; inline
-
-: DIDF_ABSAXIS            1 ;
-: DIDF_RELAXIS            2 ;
-
-: DIDFT_ALL           HEX: 00000000 ; inline
-
-: DIDFT_RELAXIS       HEX: 00000001 ; inline
-: DIDFT_ABSAXIS       HEX: 00000002 ; inline
-: DIDFT_AXIS          HEX: 00000003 ; inline
-
-: DIDFT_PSHBUTTON     HEX: 00000004 ; inline
-: DIDFT_TGLBUTTON     HEX: 00000008 ; inline
-: DIDFT_BUTTON        HEX: 0000000C ; inline
-
-: DIDFT_POV           HEX: 00000010 ; inline
-: DIDFT_COLLECTION    HEX: 00000040 ; inline
-: DIDFT_NODATA        HEX: 00000080 ; inline
-
-: DIDFT_ANYINSTANCE   HEX: 00FFFF00 ; inline
-: DIDFT_INSTANCEMASK  DIDFT_ANYINSTANCE ; inline
+CONSTANT: DIRECTINPUT_VERSION HEX: 0800
+                               
+CONSTANT: DI8DEVCLASS_ALL             0
+CONSTANT: DI8DEVCLASS_DEVICE          1
+CONSTANT: DI8DEVCLASS_POINTER         2
+CONSTANT: DI8DEVCLASS_KEYBOARD        3
+CONSTANT: DI8DEVCLASS_GAMECTRL        4
+
+CONSTANT: DIEDFL_ALLDEVICES       HEX: 00000000
+CONSTANT: DIEDFL_ATTACHEDONLY     HEX: 00000001
+CONSTANT: DIEDFL_FORCEFEEDBACK    HEX: 00000100
+CONSTANT: DIEDFL_INCLUDEALIASES   HEX: 00010000
+CONSTANT: DIEDFL_INCLUDEPHANTOMS  HEX: 00020000
+CONSTANT: DIEDFL_INCLUDEHIDDEN    HEX: 00040000
+                                               
+CONSTANT: DIENUM_STOP             0
+CONSTANT: DIENUM_CONTINUE         1
+
+CONSTANT: DIDF_ABSAXIS            1
+CONSTANT: DIDF_RELAXIS            2
+
+CONSTANT: DIDFT_ALL           HEX: 00000000
+         
+CONSTANT: DIDFT_RELAXIS       HEX: 00000001
+CONSTANT: DIDFT_ABSAXIS       HEX: 00000002
+CONSTANT: DIDFT_AXIS          HEX: 00000003
+         
+CONSTANT: DIDFT_PSHBUTTON     HEX: 00000004
+CONSTANT: DIDFT_TGLBUTTON     HEX: 00000008
+CONSTANT: DIDFT_BUTTON        HEX: 0000000C
+         
+CONSTANT: DIDFT_POV           HEX: 00000010
+CONSTANT: DIDFT_COLLECTION    HEX: 00000040
+CONSTANT: DIDFT_NODATA        HEX: 00000080
+         
+CONSTANT: DIDFT_ANYINSTANCE   HEX: 00FFFF00
+ALIAS: DIDFT_INSTANCEMASK  DIDFT_ANYINSTANCE
 : DIDFT_MAKEINSTANCE ( n -- instance ) 8 shift                   ; inline
 : DIDFT_GETTYPE      ( n -- type     ) HEX: FF bitand            ; inline
 : DIDFT_GETINSTANCE  ( n -- instance ) -8 shift HEX: FFFF bitand ; inline
-: DIDFT_FFACTUATOR        HEX: 01000000 ; inline
-: DIDFT_FFEFFECTTRIGGER   HEX: 02000000 ; inline
-: DIDFT_OUTPUT            HEX: 10000000 ; inline
-: DIDFT_VENDORDEFINED     HEX: 04000000 ; inline
-: DIDFT_ALIAS             HEX: 08000000 ; inline
-: DIDFT_OPTIONAL          HEX: 80000000 ; inline
+CONSTANT: DIDFT_FFACTUATOR        HEX: 01000000
+CONSTANT: DIDFT_FFEFFECTTRIGGER   HEX: 02000000
+CONSTANT: DIDFT_OUTPUT            HEX: 10000000
+CONSTANT: DIDFT_VENDORDEFINED     HEX: 04000000
+CONSTANT: DIDFT_ALIAS             HEX: 08000000
+CONSTANT: DIDFT_OPTIONAL          HEX: 80000000
 
 : DIDFT_ENUMCOLLECTION ( n -- instance ) 8 shift HEX: FFFF bitand ; inline
-: DIDFT_NOCOLLECTION      HEX: 00FFFF00 ; inline
-
-: DIDOI_FFACTUATOR        HEX: 00000001 ; inline
-: DIDOI_FFEFFECTTRIGGER   HEX: 00000002 ; inline
-: DIDOI_POLLED            HEX: 00008000 ; inline
-: DIDOI_ASPECTPOSITION    HEX: 00000100 ; inline
-: DIDOI_ASPECTVELOCITY    HEX: 00000200 ; inline
-: DIDOI_ASPECTACCEL       HEX: 00000300 ; inline
-: DIDOI_ASPECTFORCE       HEX: 00000400 ; inline
-: DIDOI_ASPECTMASK        HEX: 00000F00 ; inline
-: DIDOI_GUIDISUSAGE       HEX: 00010000 ; inline
-
-: DISCL_EXCLUSIVE     HEX: 00000001 ; inline
-: DISCL_NONEXCLUSIVE  HEX: 00000002 ; inline
-: DISCL_FOREGROUND    HEX: 00000004 ; inline
-: DISCL_BACKGROUND    HEX: 00000008 ; inline
-: DISCL_NOWINKEY      HEX: 00000010 ; inline
-
-: DIK_ESCAPE          HEX: 01 ; inline
-: DIK_1               HEX: 02 ; inline
-: DIK_2               HEX: 03 ; inline
-: DIK_3               HEX: 04 ; inline
-: DIK_4               HEX: 05 ; inline
-: DIK_5               HEX: 06 ; inline
-: DIK_6               HEX: 07 ; inline
-: DIK_7               HEX: 08 ; inline
-: DIK_8               HEX: 09 ; inline
-: DIK_9               HEX: 0A ; inline
-: DIK_0               HEX: 0B ; inline
-: DIK_MINUS           HEX: 0C ; inline
-: DIK_EQUALS          HEX: 0D ; inline
-: DIK_BACK            HEX: 0E ; inline
-: DIK_TAB             HEX: 0F ; inline
-: DIK_Q               HEX: 10 ; inline
-: DIK_W               HEX: 11 ; inline
-: DIK_E               HEX: 12 ; inline
-: DIK_R               HEX: 13 ; inline
-: DIK_T               HEX: 14 ; inline
-: DIK_Y               HEX: 15 ; inline
-: DIK_U               HEX: 16 ; inline
-: DIK_I               HEX: 17 ; inline
-: DIK_O               HEX: 18 ; inline
-: DIK_P               HEX: 19 ; inline
-: DIK_LBRACKET        HEX: 1A ; inline
-: DIK_RBRACKET        HEX: 1B ; inline
-: DIK_RETURN          HEX: 1C ; inline
-: DIK_LCONTROL        HEX: 1D ; inline
-: DIK_A               HEX: 1E ; inline
-: DIK_S               HEX: 1F ; inline
-: DIK_D               HEX: 20 ; inline
-: DIK_F               HEX: 21 ; inline
-: DIK_G               HEX: 22 ; inline
-: DIK_H               HEX: 23 ; inline
-: DIK_J               HEX: 24 ; inline
-: DIK_K               HEX: 25 ; inline
-: DIK_L               HEX: 26 ; inline
-: DIK_SEMICOLON       HEX: 27 ; inline
-: DIK_APOSTROPHE      HEX: 28 ; inline
-: DIK_GRAVE           HEX: 29 ; inline
-: DIK_LSHIFT          HEX: 2A ; inline
-: DIK_BACKSLASH       HEX: 2B ; inline
-: DIK_Z               HEX: 2C ; inline
-: DIK_X               HEX: 2D ; inline
-: DIK_C               HEX: 2E ; inline
-: DIK_V               HEX: 2F ; inline
-: DIK_B               HEX: 30 ; inline
-: DIK_N               HEX: 31 ; inline
-: DIK_M               HEX: 32 ; inline
-: DIK_COMMA           HEX: 33 ; inline
-: DIK_PERIOD          HEX: 34 ; inline
-: DIK_SLASH           HEX: 35 ; inline
-: DIK_RSHIFT          HEX: 36 ; inline
-: DIK_MULTIPLY        HEX: 37 ; inline
-: DIK_LMENU           HEX: 38 ; inline
-: DIK_SPACE           HEX: 39 ; inline
-: DIK_CAPITAL         HEX: 3A ; inline
-: DIK_F1              HEX: 3B ; inline
-: DIK_F2              HEX: 3C ; inline
-: DIK_F3              HEX: 3D ; inline
-: DIK_F4              HEX: 3E ; inline
-: DIK_F5              HEX: 3F ; inline
-: DIK_F6              HEX: 40 ; inline
-: DIK_F7              HEX: 41 ; inline
-: DIK_F8              HEX: 42 ; inline
-: DIK_F9              HEX: 43 ; inline
-: DIK_F10             HEX: 44 ; inline
-: DIK_NUMLOCK         HEX: 45 ; inline
-: DIK_SCROLL          HEX: 46 ; inline
-: DIK_NUMPAD7         HEX: 47 ; inline
-: DIK_NUMPAD8         HEX: 48 ; inline
-: DIK_NUMPAD9         HEX: 49 ; inline
-: DIK_SUBTRACT        HEX: 4A ; inline
-: DIK_NUMPAD4         HEX: 4B ; inline
-: DIK_NUMPAD5         HEX: 4C ; inline
-: DIK_NUMPAD6         HEX: 4D ; inline
-: DIK_ADD             HEX: 4E ; inline
-: DIK_NUMPAD1         HEX: 4F ; inline
-: DIK_NUMPAD2         HEX: 50 ; inline
-: DIK_NUMPAD3         HEX: 51 ; inline
-: DIK_NUMPAD0         HEX: 52 ; inline
-: DIK_DECIMAL         HEX: 53 ; inline
-: DIK_OEM_102         HEX: 56 ; inline
-: DIK_F11             HEX: 57 ; inline
-: DIK_F12             HEX: 58 ; inline
-: DIK_F13             HEX: 64 ; inline
-: DIK_F14             HEX: 65 ; inline
-: DIK_F15             HEX: 66 ; inline
-: DIK_KANA            HEX: 70 ; inline
-: DIK_ABNT_C1         HEX: 73 ; inline
-: DIK_CONVERT         HEX: 79 ; inline
-: DIK_NOCONVERT       HEX: 7B ; inline
-: DIK_YEN             HEX: 7D ; inline
-: DIK_ABNT_C2         HEX: 7E ; inline
-: DIK_NUMPADEQUALS    HEX: 8D ; inline
-: DIK_PREVTRACK       HEX: 90 ; inline
-: DIK_AT              HEX: 91 ; inline
-: DIK_COLON           HEX: 92 ; inline
-: DIK_UNDERLINE       HEX: 93 ; inline
-: DIK_KANJI           HEX: 94 ; inline
-: DIK_STOP            HEX: 95 ; inline
-: DIK_AX              HEX: 96 ; inline
-: DIK_UNLABELED       HEX: 97 ; inline
-: DIK_NEXTTRACK       HEX: 99 ; inline
-: DIK_NUMPADENTER     HEX: 9C ; inline
-: DIK_RCONTROL        HEX: 9D ; inline
-: DIK_MUTE            HEX: A0 ; inline
-: DIK_CALCULATOR      HEX: A1 ; inline
-: DIK_PLAYPAUSE       HEX: A2 ; inline
-: DIK_MEDIASTOP       HEX: A4 ; inline
-: DIK_VOLUMEDOWN      HEX: AE ; inline
-: DIK_VOLUMEUP        HEX: B0 ; inline
-: DIK_WEBHOME         HEX: B2 ; inline
-: DIK_NUMPADCOMMA     HEX: B3 ; inline
-: DIK_DIVIDE          HEX: B5 ; inline
-: DIK_SYSRQ           HEX: B7 ; inline
-: DIK_RMENU           HEX: B8 ; inline
-: DIK_PAUSE           HEX: C5 ; inline
-: DIK_HOME            HEX: C7 ; inline
-: DIK_UP              HEX: C8 ; inline
-: DIK_PRIOR           HEX: C9 ; inline
-: DIK_LEFT            HEX: CB ; inline
-: DIK_RIGHT           HEX: CD ; inline
-: DIK_END             HEX: CF ; inline
-: DIK_DOWN            HEX: D0 ; inline
-: DIK_NEXT            HEX: D1 ; inline
-: DIK_INSERT          HEX: D2 ; inline
-: DIK_DELETE          HEX: D3 ; inline
-: DIK_LWIN            HEX: DB ; inline
-: DIK_RWIN            HEX: DC ; inline
-: DIK_APPS            HEX: DD ; inline
-: DIK_POWER           HEX: DE ; inline
-: DIK_SLEEP           HEX: DF ; inline
-: DIK_WAKE            HEX: E3 ; inline
-: DIK_WEBSEARCH       HEX: E5 ; inline
-: DIK_WEBFAVORITES    HEX: E6 ; inline
-: DIK_WEBREFRESH      HEX: E7 ; inline
-: DIK_WEBSTOP         HEX: E8 ; inline
-: DIK_WEBFORWARD      HEX: E9 ; inline
-: DIK_WEBBACK         HEX: EA ; inline
-: DIK_MYCOMPUTER      HEX: EB ; inline
-: DIK_MAIL            HEX: EC ; inline
-: DIK_MEDIASELECT     HEX: ED ; inline
-
-: DIK_BACKSPACE       DIK_BACK ; inline
-: DIK_NUMPADSTAR      DIK_MULTIPLY ; inline
-: DIK_LALT            DIK_LMENU ; inline
-: DIK_CAPSLOCK        DIK_CAPITAL ; inline
-: DIK_NUMPADMINUS     DIK_SUBTRACT ; inline
-: DIK_NUMPADPLUS      DIK_ADD ; inline
-: DIK_NUMPADPERIOD    DIK_DECIMAL ; inline
-: DIK_NUMPADSLASH     DIK_DIVIDE ; inline
-: DIK_RALT            DIK_RMENU ; inline
-: DIK_UPARROW         DIK_UP ; inline
-: DIK_PGUP            DIK_PRIOR ; inline
-: DIK_LEFTARROW       DIK_LEFT ; inline
-: DIK_RIGHTARROW      DIK_RIGHT ; inline
-: DIK_DOWNARROW       DIK_DOWN ; inline
-: DIK_PGDN            DIK_NEXT ; inline
-
-: DIK_CIRCUMFLEX      DIK_PREVTRACK ; inline
-
-: DI8DEVTYPE_DEVICE           HEX: 11 ; inline
-: DI8DEVTYPE_MOUSE            HEX: 12 ; inline
-: DI8DEVTYPE_KEYBOARD         HEX: 13 ; inline
-: DI8DEVTYPE_JOYSTICK         HEX: 14 ; inline
-: DI8DEVTYPE_GAMEPAD          HEX: 15 ; inline
-: DI8DEVTYPE_DRIVING          HEX: 16 ; inline
-: DI8DEVTYPE_FLIGHT           HEX: 17 ; inline
-: DI8DEVTYPE_1STPERSON        HEX: 18 ; inline
-: DI8DEVTYPE_DEVICECTRL       HEX: 19 ; inline
-: DI8DEVTYPE_SCREENPOINTER    HEX: 1A ; inline
-: DI8DEVTYPE_REMOTE           HEX: 1B ; inline
-: DI8DEVTYPE_SUPPLEMENTAL     HEX: 1C ; inline
+CONSTANT: DIDFT_NOCOLLECTION      HEX: 00FFFF00
+
+CONSTANT: DIDOI_FFACTUATOR        HEX: 00000001
+CONSTANT: DIDOI_FFEFFECTTRIGGER   HEX: 00000002
+CONSTANT: DIDOI_POLLED            HEX: 00008000
+CONSTANT: DIDOI_ASPECTPOSITION    HEX: 00000100
+CONSTANT: DIDOI_ASPECTVELOCITY    HEX: 00000200
+CONSTANT: DIDOI_ASPECTACCEL       HEX: 00000300
+CONSTANT: DIDOI_ASPECTFORCE       HEX: 00000400
+CONSTANT: DIDOI_ASPECTMASK        HEX: 00000F00
+CONSTANT: DIDOI_GUIDISUSAGE       HEX: 00010000
+
+CONSTANT: DISCL_EXCLUSIVE     HEX: 00000001
+CONSTANT: DISCL_NONEXCLUSIVE  HEX: 00000002
+CONSTANT: DISCL_FOREGROUND    HEX: 00000004
+CONSTANT: DISCL_BACKGROUND    HEX: 00000008
+CONSTANT: DISCL_NOWINKEY      HEX: 00000010
+
+CONSTANT: DIK_ESCAPE          HEX: 01
+CONSTANT: DIK_1               HEX: 02
+CONSTANT: DIK_2               HEX: 03
+CONSTANT: DIK_3               HEX: 04
+CONSTANT: DIK_4               HEX: 05
+CONSTANT: DIK_5               HEX: 06
+CONSTANT: DIK_6               HEX: 07
+CONSTANT: DIK_7               HEX: 08
+CONSTANT: DIK_8               HEX: 09
+CONSTANT: DIK_9               HEX: 0A
+CONSTANT: DIK_0               HEX: 0B
+CONSTANT: DIK_MINUS           HEX: 0C
+CONSTANT: DIK_EQUALS          HEX: 0D
+CONSTANT: DIK_BACK            HEX: 0E
+CONSTANT: DIK_TAB             HEX: 0F
+CONSTANT: DIK_Q               HEX: 10
+CONSTANT: DIK_W               HEX: 11
+CONSTANT: DIK_E               HEX: 12
+CONSTANT: DIK_R               HEX: 13
+CONSTANT: DIK_T               HEX: 14
+CONSTANT: DIK_Y               HEX: 15
+CONSTANT: DIK_U               HEX: 16
+CONSTANT: DIK_I               HEX: 17
+CONSTANT: DIK_O               HEX: 18
+CONSTANT: DIK_P               HEX: 19
+CONSTANT: DIK_LBRACKET        HEX: 1A
+CONSTANT: DIK_RBRACKET        HEX: 1B
+CONSTANT: DIK_RETURN          HEX: 1C
+CONSTANT: DIK_LCONTROL        HEX: 1D
+CONSTANT: DIK_A               HEX: 1E
+CONSTANT: DIK_S               HEX: 1F
+CONSTANT: DIK_D               HEX: 20
+CONSTANT: DIK_F               HEX: 21
+CONSTANT: DIK_G               HEX: 22
+CONSTANT: DIK_H               HEX: 23
+CONSTANT: DIK_J               HEX: 24
+CONSTANT: DIK_K               HEX: 25
+CONSTANT: DIK_L               HEX: 26
+CONSTANT: DIK_SEMICOLON       HEX: 27
+CONSTANT: DIK_APOSTROPHE      HEX: 28
+CONSTANT: DIK_GRAVE           HEX: 29
+CONSTANT: DIK_LSHIFT          HEX: 2A
+CONSTANT: DIK_BACKSLASH       HEX: 2B
+CONSTANT: DIK_Z               HEX: 2C
+CONSTANT: DIK_X               HEX: 2D
+CONSTANT: DIK_C               HEX: 2E
+CONSTANT: DIK_V               HEX: 2F
+CONSTANT: DIK_B               HEX: 30
+CONSTANT: DIK_N               HEX: 31
+CONSTANT: DIK_M               HEX: 32
+CONSTANT: DIK_COMMA           HEX: 33
+CONSTANT: DIK_PERIOD          HEX: 34
+CONSTANT: DIK_SLASH           HEX: 35
+CONSTANT: DIK_RSHIFT          HEX: 36
+CONSTANT: DIK_MULTIPLY        HEX: 37
+CONSTANT: DIK_LMENU           HEX: 38
+CONSTANT: DIK_SPACE           HEX: 39
+CONSTANT: DIK_CAPITAL         HEX: 3A
+CONSTANT: DIK_F1              HEX: 3B
+CONSTANT: DIK_F2              HEX: 3C
+CONSTANT: DIK_F3              HEX: 3D
+CONSTANT: DIK_F4              HEX: 3E
+CONSTANT: DIK_F5              HEX: 3F
+CONSTANT: DIK_F6              HEX: 40
+CONSTANT: DIK_F7              HEX: 41
+CONSTANT: DIK_F8              HEX: 42
+CONSTANT: DIK_F9              HEX: 43
+CONSTANT: DIK_F10             HEX: 44
+CONSTANT: DIK_NUMLOCK         HEX: 45
+CONSTANT: DIK_SCROLL          HEX: 46
+CONSTANT: DIK_NUMPAD7         HEX: 47
+CONSTANT: DIK_NUMPAD8         HEX: 48
+CONSTANT: DIK_NUMPAD9         HEX: 49
+CONSTANT: DIK_SUBTRACT        HEX: 4A
+CONSTANT: DIK_NUMPAD4         HEX: 4B
+CONSTANT: DIK_NUMPAD5         HEX: 4C
+CONSTANT: DIK_NUMPAD6         HEX: 4D
+CONSTANT: DIK_ADD             HEX: 4E
+CONSTANT: DIK_NUMPAD1         HEX: 4F
+CONSTANT: DIK_NUMPAD2         HEX: 50
+CONSTANT: DIK_NUMPAD3         HEX: 51
+CONSTANT: DIK_NUMPAD0         HEX: 52
+CONSTANT: DIK_DECIMAL         HEX: 53
+CONSTANT: DIK_OEM_102         HEX: 56
+CONSTANT: DIK_F11             HEX: 57
+CONSTANT: DIK_F12             HEX: 58
+CONSTANT: DIK_F13             HEX: 64
+CONSTANT: DIK_F14             HEX: 65
+CONSTANT: DIK_F15             HEX: 66
+CONSTANT: DIK_KANA            HEX: 70
+CONSTANT: DIK_ABNT_C1         HEX: 73
+CONSTANT: DIK_CONVERT         HEX: 79
+CONSTANT: DIK_NOCONVERT       HEX: 7B
+CONSTANT: DIK_YEN             HEX: 7D
+CONSTANT: DIK_ABNT_C2         HEX: 7E
+CONSTANT: DIK_NUMPADEQUALS    HEX: 8D
+CONSTANT: DIK_PREVTRACK       HEX: 90
+CONSTANT: DIK_AT              HEX: 91
+CONSTANT: DIK_COLON           HEX: 92
+CONSTANT: DIK_UNDERLINE       HEX: 93
+CONSTANT: DIK_KANJI           HEX: 94
+CONSTANT: DIK_STOP            HEX: 95
+CONSTANT: DIK_AX              HEX: 96
+CONSTANT: DIK_UNLABELED       HEX: 97
+CONSTANT: DIK_NEXTTRACK       HEX: 99
+CONSTANT: DIK_NUMPADENTER     HEX: 9C
+CONSTANT: DIK_RCONTROL        HEX: 9D
+CONSTANT: DIK_MUTE            HEX: A0
+CONSTANT: DIK_CALCULATOR      HEX: A1
+CONSTANT: DIK_PLAYPAUSE       HEX: A2
+CONSTANT: DIK_MEDIASTOP       HEX: A4
+CONSTANT: DIK_VOLUMEDOWN      HEX: AE
+CONSTANT: DIK_VOLUMEUP        HEX: B0
+CONSTANT: DIK_WEBHOME         HEX: B2
+CONSTANT: DIK_NUMPADCOMMA     HEX: B3
+CONSTANT: DIK_DIVIDE          HEX: B5
+CONSTANT: DIK_SYSRQ           HEX: B7
+CONSTANT: DIK_RMENU           HEX: B8
+CONSTANT: DIK_PAUSE           HEX: C5
+CONSTANT: DIK_HOME            HEX: C7
+CONSTANT: DIK_UP              HEX: C8
+CONSTANT: DIK_PRIOR           HEX: C9
+CONSTANT: DIK_LEFT            HEX: CB
+CONSTANT: DIK_RIGHT           HEX: CD
+CONSTANT: DIK_END             HEX: CF
+CONSTANT: DIK_DOWN            HEX: D0
+CONSTANT: DIK_NEXT            HEX: D1
+CONSTANT: DIK_INSERT          HEX: D2
+CONSTANT: DIK_DELETE          HEX: D3
+CONSTANT: DIK_LWIN            HEX: DB
+CONSTANT: DIK_RWIN            HEX: DC
+CONSTANT: DIK_APPS            HEX: DD
+CONSTANT: DIK_POWER           HEX: DE
+CONSTANT: DIK_SLEEP           HEX: DF
+CONSTANT: DIK_WAKE            HEX: E3
+CONSTANT: DIK_WEBSEARCH       HEX: E5
+CONSTANT: DIK_WEBFAVORITES    HEX: E6
+CONSTANT: DIK_WEBREFRESH      HEX: E7
+CONSTANT: DIK_WEBSTOP         HEX: E8
+CONSTANT: DIK_WEBFORWARD      HEX: E9
+CONSTANT: DIK_WEBBACK         HEX: EA
+CONSTANT: DIK_MYCOMPUTER      HEX: EB
+CONSTANT: DIK_MAIL            HEX: EC
+CONSTANT: DIK_MEDIASELECT     HEX: ED
+
+ALIAS: DIK_BACKSPACE       DIK_BACK
+ALIAS: DIK_NUMPADSTAR      DIK_MULTIPLY
+ALIAS: DIK_LALT            DIK_LMENU
+ALIAS: DIK_CAPSLOCK        DIK_CAPITAL
+ALIAS: DIK_NUMPADMINUS     DIK_SUBTRACT
+ALIAS: DIK_NUMPADPLUS      DIK_ADD
+ALIAS: DIK_NUMPADPERIOD    DIK_DECIMAL
+ALIAS: DIK_NUMPADSLASH     DIK_DIVIDE
+ALIAS: DIK_RALT            DIK_RMENU
+ALIAS: DIK_UPARROW         DIK_UP
+ALIAS: DIK_PGUP            DIK_PRIOR
+ALIAS: DIK_LEFTARROW       DIK_LEFT
+ALIAS: DIK_RIGHTARROW      DIK_RIGHT
+ALIAS: DIK_DOWNARROW       DIK_DOWN
+ALIAS: DIK_PGDN            DIK_NEXT
+
+ALIAS: DIK_CIRCUMFLEX      DIK_PREVTRACK
+
+CONSTANT: DI8DEVTYPE_DEVICE           HEX: 11
+CONSTANT: DI8DEVTYPE_MOUSE            HEX: 12
+CONSTANT: DI8DEVTYPE_KEYBOARD         HEX: 13
+CONSTANT: DI8DEVTYPE_JOYSTICK         HEX: 14
+CONSTANT: DI8DEVTYPE_GAMEPAD          HEX: 15
+CONSTANT: DI8DEVTYPE_DRIVING          HEX: 16
+CONSTANT: DI8DEVTYPE_FLIGHT           HEX: 17
+CONSTANT: DI8DEVTYPE_1STPERSON        HEX: 18
+CONSTANT: DI8DEVTYPE_DEVICECTRL       HEX: 19
+CONSTANT: DI8DEVTYPE_SCREENPOINTER    HEX: 1A
+CONSTANT: DI8DEVTYPE_REMOTE           HEX: 1B
+CONSTANT: DI8DEVTYPE_SUPPLEMENTAL     HEX: 1C
 
 : GET_DIDEVICE_TYPE ( dwType -- type ) HEX: FF bitand ; inline
 
-: DIPROPRANGE_NOMIN       HEX: 80000000 ; inline
-: DIPROPRANGE_NOMAX       HEX: 7FFFFFFF ; inline
-: MAXCPOINTSNUM           8 ; inline
-
-: DIPH_DEVICE             0 ; inline
-: DIPH_BYOFFSET           1 ; inline
-: DIPH_BYID               2 ; inline
-: DIPH_BYUSAGE            3 ; inline
+CONSTANT: DIPROPRANGE_NOMIN       HEX: 80000000
+CONSTANT: DIPROPRANGE_NOMAX       HEX: 7FFFFFFF
+CONSTANT: MAXCPOINTSNUM           8
 
+CONSTANT: DIPH_DEVICE             0
+CONSTANT: DIPH_BYOFFSET           1
+CONSTANT: DIPH_BYID               2
+CONSTANT: DIPH_BYUSAGE            3
+                                   
 : DIMAKEUSAGEDWORD ( UsagePage Usage -- DWORD ) 16 shift bitor ; inline
 
-: DIPROP_BUFFERSIZE           1 <alien> ; inline
-: DIPROP_AXISMODE             2 <alien> ; inline
-
-: DIPROPAXISMODE_ABS      0 ; inline
-: DIPROPAXISMODE_REL      1 ; inline
-
-: DIPROP_GRANULARITY          3 <alien> ; inline
-: DIPROP_RANGE                4 <alien> ; inline
-: DIPROP_DEADZONE             5 <alien> ; inline
-: DIPROP_SATURATION           6 <alien> ; inline
-: DIPROP_FFGAIN               7 <alien> ; inline
-: DIPROP_FFLOAD               8 <alien> ; inline
-: DIPROP_AUTOCENTER           9 <alien> ; inline
-
-: DIPROPAUTOCENTER_OFF    0 ; inline
-: DIPROPAUTOCENTER_ON     1 ; inline
-
-: DIPROP_CALIBRATIONMODE     10 <alien> ; inline
-
-: DIPROPCALIBRATIONMODE_COOKED    0 ; inline
-: DIPROPCALIBRATIONMODE_RAW       1 ; inline
-
-: DIPROP_CALIBRATION         11 <alien> ; inline
-: DIPROP_GUIDANDPATH         12 <alien> ; inline
-: DIPROP_INSTANCENAME        13 <alien> ; inline
-: DIPROP_PRODUCTNAME         14 <alien> ; inline
-: DIPROP_JOYSTICKID          15 <alien> ; inline
-: DIPROP_GETPORTDISPLAYNAME  16 <alien> ; inline
-: DIPROP_PHYSICALRANGE       18 <alien> ; inline
-: DIPROP_LOGICALRANGE        19 <alien> ; inline
-: DIPROP_KEYNAME             20 <alien> ; inline
-: DIPROP_CPOINTS             21 <alien> ; inline
-: DIPROP_APPDATA             22 <alien> ; inline
-: DIPROP_SCANCODE            23 <alien> ; inline
-: DIPROP_VIDPID              24 <alien> ; inline
-: DIPROP_USERNAME            25 <alien> ; inline
-: DIPROP_TYPENAME            26 <alien> ; inline
-
-: GUID_XAxis          GUID: {A36D02E0-C9F3-11CF-BFC7-444553540000} ; inline
-: GUID_YAxis          GUID: {A36D02E1-C9F3-11CF-BFC7-444553540000} ; inline
-: GUID_ZAxis          GUID: {A36D02E2-C9F3-11CF-BFC7-444553540000} ; inline
-: GUID_RxAxis         GUID: {A36D02F4-C9F3-11CF-BFC7-444553540000} ; inline
-: GUID_RyAxis         GUID: {A36D02F5-C9F3-11CF-BFC7-444553540000} ; inline
-: GUID_RzAxis         GUID: {A36D02E3-C9F3-11CF-BFC7-444553540000} ; inline
-: GUID_Slider         GUID: {A36D02E4-C9F3-11CF-BFC7-444553540000} ; inline
-: GUID_Button         GUID: {A36D02F0-C9F3-11CF-BFC7-444553540000} ; inline
-: GUID_Key            GUID: {55728220-D33C-11CF-BFC7-444553540000} ; inline
-: GUID_POV            GUID: {A36D02F2-C9F3-11CF-BFC7-444553540000} ; inline
-: GUID_Unknown        GUID: {A36D02F3-C9F3-11CF-BFC7-444553540000} ; inline
-: GUID_SysMouse       GUID: {6F1D2B60-D5A0-11CF-BFC7-444553540000} ; inline
-: GUID_SysKeyboard    GUID: {6F1D2B61-D5A0-11CF-BFC7-444553540000} ; inline
-: GUID_Joystick       GUID: {6F1D2B70-D5A0-11CF-BFC7-444553540000} ; inline
-: GUID_SysMouseEm     GUID: {6F1D2B80-D5A0-11CF-BFC7-444553540000} ; inline
-: GUID_SysMouseEm2    GUID: {6F1D2B81-D5A0-11CF-BFC7-444553540000} ; inline
-: GUID_SysKeyboardEm  GUID: {6F1D2B82-D5A0-11CF-BFC7-444553540000} ; inline
-: GUID_SysKeyboardEm2 GUID: {6F1D2B83-D5A0-11CF-BFC7-444553540000} ; inline
+: DIPROP_BUFFERSIZE ( -- alien ) 1 <alien> ; inline
+: DIPROP_AXISMODE   ( -- alien ) 2 <alien> ; inline
+
+CONSTANT: DIPROPAXISMODE_ABS      0
+CONSTANT: DIPROPAXISMODE_REL      1
+                                   
+: DIPROP_GRANULARITY ( -- alien ) 3 <alien> ; inline
+: DIPROP_RANGE       ( -- alien ) 4 <alien> ; inline
+: DIPROP_DEADZONE    ( -- alien ) 5 <alien> ; inline
+: DIPROP_SATURATION  ( -- alien ) 6 <alien> ; inline
+: DIPROP_FFGAIN      ( -- alien ) 7 <alien> ; inline
+: DIPROP_FFLOAD      ( -- alien ) 8 <alien> ; inline
+: DIPROP_AUTOCENTER  ( -- alien ) 9 <alien> ; inline
+
+CONSTANT: DIPROPAUTOCENTER_OFF    0
+CONSTANT: DIPROPAUTOCENTER_ON     1
+
+: DIPROP_CALIBRATIONMODE ( -- alien ) 10 <alien> ; inline
+
+CONSTANT: DIPROPCALIBRATIONMODE_COOKED    0
+CONSTANT: DIPROPCALIBRATIONMODE_RAW       1
+
+: DIPROP_CALIBRATION ( -- alien )        11 <alien> ; inline
+: DIPROP_GUIDANDPATH ( -- alien )        12 <alien> ; inline
+: DIPROP_INSTANCENAME ( -- alien )       13 <alien> ; inline
+: DIPROP_PRODUCTNAME ( -- alien )        14 <alien> ; inline
+: DIPROP_JOYSTICKID ( -- alien )         15 <alien> ; inline
+: DIPROP_GETPORTDISPLAYNAME ( -- alien ) 16 <alien> ; inline
+: DIPROP_PHYSICALRANGE ( -- alien )      18 <alien> ; inline
+: DIPROP_LOGICALRANGE ( -- alien )       19 <alien> ; inline
+: DIPROP_KEYNAME ( -- alien )            20 <alien> ; inline
+: DIPROP_CPOINTS ( -- alien )            21 <alien> ; inline
+: DIPROP_APPDATA ( -- alien )            22 <alien> ; inline
+: DIPROP_SCANCODE ( -- alien )           23 <alien> ; inline
+: DIPROP_VIDPID ( -- alien )             24 <alien> ; inline
+: DIPROP_USERNAME ( -- alien )           25 <alien> ; inline
+: DIPROP_TYPENAME ( -- alien )           26 <alien> ; inline
+
+CONSTANT: GUID_XAxis          GUID: {A36D02E0-C9F3-11CF-BFC7-444553540000}
+CONSTANT: GUID_YAxis          GUID: {A36D02E1-C9F3-11CF-BFC7-444553540000}
+CONSTANT: GUID_ZAxis          GUID: {A36D02E2-C9F3-11CF-BFC7-444553540000}
+CONSTANT: GUID_RxAxis         GUID: {A36D02F4-C9F3-11CF-BFC7-444553540000}
+CONSTANT: GUID_RyAxis         GUID: {A36D02F5-C9F3-11CF-BFC7-444553540000}
+CONSTANT: GUID_RzAxis         GUID: {A36D02E3-C9F3-11CF-BFC7-444553540000}
+CONSTANT: GUID_Slider         GUID: {A36D02E4-C9F3-11CF-BFC7-444553540000}
+CONSTANT: GUID_Button         GUID: {A36D02F0-C9F3-11CF-BFC7-444553540000}
+CONSTANT: GUID_Key            GUID: {55728220-D33C-11CF-BFC7-444553540000}
+CONSTANT: GUID_POV            GUID: {A36D02F2-C9F3-11CF-BFC7-444553540000}
+CONSTANT: GUID_Unknown        GUID: {A36D02F3-C9F3-11CF-BFC7-444553540000}
+CONSTANT: GUID_SysMouse       GUID: {6F1D2B60-D5A0-11CF-BFC7-444553540000}
+CONSTANT: GUID_SysKeyboard    GUID: {6F1D2B61-D5A0-11CF-BFC7-444553540000}
+CONSTANT: GUID_Joystick       GUID: {6F1D2B70-D5A0-11CF-BFC7-444553540000}
+CONSTANT: GUID_SysMouseEm     GUID: {6F1D2B80-D5A0-11CF-BFC7-444553540000}
+CONSTANT: GUID_SysMouseEm2    GUID: {6F1D2B81-D5A0-11CF-BFC7-444553540000}
+CONSTANT: GUID_SysKeyboardEm  GUID: {6F1D2B82-D5A0-11CF-BFC7-444553540000}
+CONSTANT: GUID_SysKeyboardEm2 GUID: {6F1D2B83-D5A0-11CF-BFC7-444553540000}
index 8384bb1acc18b4f4550f834b3be1ade6655bcbd6..4543aa703a0188db1a0bde7bdfb4ca19ffcb9656 100644 (file)
@@ -36,26 +36,30 @@ SYMBOL: +listener-dragdrop-wrapper+
 {\r
     { "IDropTarget" {\r
         [ ! DragEnter\r
-            >r 2drop\r
-            filenames-from-data-object\r
-            length 1 = [ DROPEFFECT_COPY ] [ DROPEFFECT_NONE ] if\r
-            dup 0 r> set-ulong-nth\r
+            [\r
+                2drop\r
+                filenames-from-data-object\r
+                length 1 = [ DROPEFFECT_COPY ] [ DROPEFFECT_NONE ] if\r
+                dup 0\r
+            ] dip set-ulong-nth\r
             >>last-drop-effect drop\r
             S_OK\r
         ] [ ! DragOver\r
-            >r 2drop last-drop-effect>> 0 r> set-ulong-nth\r
+            [ 2drop last-drop-effect>> 0 ] dip set-ulong-nth\r
             S_OK\r
         ] [ ! DragLeave\r
             drop S_OK\r
         ] [ ! Drop\r
-            >r 2drop nip\r
-            filenames-from-data-object\r
-            dup length 1 = [\r
-                first unparse [ "USE: parser " % % " run-file" % ] "" make\r
-                eval-listener\r
-                DROPEFFECT_COPY\r
-            ] [ 2drop DROPEFFECT_NONE ] if\r
-            0 r> set-ulong-nth\r
+            [\r
+                2drop nip\r
+                filenames-from-data-object\r
+                dup length 1 = [\r
+                    first unparse [ "USE: parser " % % " run-file" % ] "" make\r
+                    eval-listener\r
+                    DROPEFFECT_COPY\r
+                ] [ 2drop DROPEFFECT_NONE ] if\r
+                0\r
+            ] dip set-ulong-nth\r
             S_OK\r
         ]\r
     } }\r
index bd938fdbad9a12ecca185a69237d61f02d38bab7..56bba768de9e39c8d65f223e7a0722e0148c2f48 100644 (file)
@@ -1,10 +1,9 @@
-USING: kernel ;
 IN: windows.errors 
 
-: ERROR_SUCCESS 0 ; inline
-: ERROR_NO_MORE_FILES 18 ; inline
-: ERROR_HANDLE_EOF 38 ; inline
-: ERROR_BROKEN_PIPE 109 ; inline
-: ERROR_ENVVAR_NOT_FOUND 203 ; inline
-: ERROR_IO_INCOMPLETE 996 ; inline
-: ERROR_IO_PENDING 997 ; inline
+CONSTANT: ERROR_SUCCESS 0
+CONSTANT: ERROR_NO_MORE_FILES 18
+CONSTANT: ERROR_HANDLE_EOF 38
+CONSTANT: ERROR_BROKEN_PIPE 109
+CONSTANT: ERROR_ENVVAR_NOT_FOUND 203
+CONSTANT: ERROR_IO_INCOMPLETE 996
+CONSTANT: ERROR_IO_PENDING 997
index 32e4f3cd8a66232a9b88502f98819a56ab6b64db..077adf1961bc75eb4731cf5d78c0777b4737925f 100755 (executable)
@@ -1,38 +1,38 @@
 ! FUNCTION: AbortDoc
 ! Copyright (C) 2005, 2006 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien alien.syntax kernel windows.types alias ;
+USING: alien alien.syntax kernel windows.types ;
 IN: windows.gdi32
 
 ! Stock Logical Objects
-: WHITE_BRUSH         0 ; inline
-: LTGRAY_BRUSH        1 ; inline
-: GRAY_BRUSH          2 ; inline
-: DKGRAY_BRUSH        3 ; inline
-: BLACK_BRUSH         4 ; inline
-: NULL_BRUSH          5 ; inline
-: HOLLOW_BRUSH        NULL_BRUSH ; inline
-: WHITE_PEN           6 ; inline
-: BLACK_PEN           7 ; inline
-: NULL_PEN            8 ; inline
-: OEM_FIXED_FONT      10 ; inline
-: ANSI_FIXED_FONT     11 ; inline
-: ANSI_VAR_FONT       12 ; inline
-: SYSTEM_FONT         13 ; inline
-: DEVICE_DEFAULT_FONT 14 ; inline
-: DEFAULT_PALETTE     15 ; inline
-: SYSTEM_FIXED_FONT   16 ; inline
-: DEFAULT_GUI_FONT    17 ; inline
-: DC_BRUSH            18 ; inline
-: DC_PEN              19 ; inline
+CONSTANT: WHITE_BRUSH         0
+CONSTANT: LTGRAY_BRUSH        1
+CONSTANT: GRAY_BRUSH          2
+CONSTANT: DKGRAY_BRUSH        3
+CONSTANT: BLACK_BRUSH         4
+CONSTANT: NULL_BRUSH          5
+ALIAS: HOLLOW_BRUSH        NULL_BRUSH
+CONSTANT: WHITE_PEN           6
+CONSTANT: BLACK_PEN           7
+CONSTANT: NULL_PEN            8
+CONSTANT: OEM_FIXED_FONT      10
+CONSTANT: ANSI_FIXED_FONT     11
+CONSTANT: ANSI_VAR_FONT       12
+CONSTANT: SYSTEM_FONT         13
+CONSTANT: DEVICE_DEFAULT_FONT 14
+CONSTANT: DEFAULT_PALETTE     15
+CONSTANT: SYSTEM_FIXED_FONT   16
+CONSTANT: DEFAULT_GUI_FONT    17
+CONSTANT: DC_BRUSH            18
+CONSTANT: DC_PEN              19
+                  
+CONSTANT: BI_RGB        0
+CONSTANT: BI_RLE8       1
+CONSTANT: BI_RLE4       2
+CONSTANT: BI_BITFIELDS  3
 
-: BI_RGB        0 ; inline
-: BI_RLE8       1 ; inline
-: BI_RLE4       2 ; inline
-: BI_BITFIELDS  3 ; inline
-
-: DIB_RGB_COLORS 0 ; inline
-: DIB_PAL_COLORS 1 ; inline
+CONSTANT: DIB_RGB_COLORS 0
+CONSTANT: DIB_PAL_COLORS 1
 
 LIBRARY: gdi32
 
old mode 100644 (file)
new mode 100755 (executable)
index 7d6f0ab..d3e823f
@@ -1,93 +1,93 @@
 ! Copyright (C) 2005, 2006 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien alien.syntax kernel windows.types alias ;
+USING: alien alien.syntax kernel windows.types multiline ;
 IN: windows.kernel32
 
-: MAX_PATH 260 ; inline
+CONSTANT: MAX_PATH 260
 
-: GHND          HEX: 40 ; inline
-: GMEM_FIXED          0 ; inline
-: GMEM_MOVEABLE       2 ; inline
-: GMEM_ZEROINIT HEX: 40 ; inline
-: GPTR          HEX: 40 ; inline
+CONSTANT: GHND          HEX: 40
+CONSTANT: GMEM_FIXED          0
+CONSTANT: GMEM_MOVEABLE       2
+CONSTANT: GMEM_ZEROINIT HEX: 40
+CONSTANT: GPTR          HEX: 40
 
-: GENERIC_READ    HEX: 80000000 ; inline
-: GENERIC_WRITE   HEX: 40000000 ; inline
-: GENERIC_EXECUTE HEX: 20000000 ; inline
-: GENERIC_ALL     HEX: 10000000 ; inline
+CONSTANT: GENERIC_READ    HEX: 80000000
+CONSTANT: GENERIC_WRITE   HEX: 40000000
+CONSTANT: GENERIC_EXECUTE HEX: 20000000
+CONSTANT: GENERIC_ALL     HEX: 10000000
 
-: CREATE_NEW        1 ; inline
-: CREATE_ALWAYS     2 ; inline
-: OPEN_EXISTING     3 ; inline
-: OPEN_ALWAYS       4 ; inline
-: TRUNCATE_EXISTING 5 ; inline
+CONSTANT: CREATE_NEW        1
+CONSTANT: CREATE_ALWAYS     2
+CONSTANT: OPEN_EXISTING     3
+CONSTANT: OPEN_ALWAYS       4
+CONSTANT: TRUNCATE_EXISTING 5
               
-: FILE_LIST_DIRECTORY       HEX: 00000001 ; inline
-: FILE_READ_DAT             HEX: 00000001 ; inline
-: FILE_ADD_FILE             HEX: 00000002 ; inline
-: FILE_WRITE_DATA           HEX: 00000002 ; inline
-: FILE_ADD_SUBDIRECTORY     HEX: 00000004 ; inline
-: FILE_APPEND_DATA          HEX: 00000004 ; inline
-: FILE_CREATE_PIPE_INSTANCE HEX: 00000004 ; inline
-: FILE_READ_EA              HEX: 00000008 ; inline
-: FILE_READ_PROPERTIES      HEX: 00000008 ; inline
-: FILE_WRITE_EA             HEX: 00000010 ; inline
-: FILE_WRITE_PROPERTIES     HEX: 00000010 ; inline
-: FILE_EXECUTE              HEX: 00000020 ; inline
-: FILE_TRAVERSE             HEX: 00000020 ; inline
-: FILE_DELETE_CHILD         HEX: 00000040 ; inline
-: FILE_READ_ATTRIBUTES      HEX: 00000080 ; inline
-: FILE_WRITE_ATTRIBUTES     HEX: 00000100 ; inline
-
-: FILE_SHARE_READ        1 ; inline
-: FILE_SHARE_WRITE       2 ; inline
-: FILE_SHARE_DELETE      4 ; inline
-: FILE_SHARE_VALID_FLAGS 7 ; inline
-
-: FILE_FLAG_WRITE_THROUGH       HEX: 80000000 ; inline
-: FILE_FLAG_OVERLAPPED          HEX: 40000000 ; inline
-: FILE_FLAG_NO_BUFFERING        HEX: 20000000 ; inline
-: FILE_FLAG_RANDOM_ACCESS       HEX: 10000000 ; inline
-: FILE_FLAG_SEQUENTIAL_SCAN     HEX: 08000000 ; inline
-: FILE_FLAG_DELETE_ON_CLOSE     HEX: 04000000 ; inline
-: FILE_FLAG_BACKUP_SEMANTICS    HEX: 02000000 ; inline
-: FILE_FLAG_POSIX_SEMANTICS     HEX: 01000000 ; inline
-: FILE_FLAG_OPEN_REPARSE_POINT  HEX: 00200000 ; inline
-: FILE_FLAG_OPEN_NO_RECALL      HEX: 00100000 ; inline
-: FILE_FLAG_FIRST_PIPE_INSTANCE HEX: 00080000 ; inline
-
-: FILE_ATTRIBUTE_READONLY            HEX: 00000001 ; inline
-: FILE_ATTRIBUTE_HIDDEN              HEX: 00000002 ; inline
-: FILE_ATTRIBUTE_SYSTEM              HEX: 00000004 ; inline
-: FILE_ATTRIBUTE_DIRECTORY           HEX: 00000010 ; inline
-: FILE_ATTRIBUTE_ARCHIVE             HEX: 00000020 ; inline
-: FILE_ATTRIBUTE_DEVICE              HEX: 00000040 ; inline
-: FILE_ATTRIBUTE_NORMAL              HEX: 00000080 ; inline
-: FILE_ATTRIBUTE_TEMPORARY           HEX: 00000100 ; inline
-: FILE_ATTRIBUTE_SPARSE_FILE         HEX: 00000200 ; inline
-: FILE_ATTRIBUTE_REPARSE_POINT       HEX: 00000400 ; inline
-: FILE_ATTRIBUTE_COMPRESSED          HEX: 00000800 ; inline
-: FILE_ATTRIBUTE_OFFLINE             HEX: 00001000 ; inline
-: FILE_ATTRIBUTE_NOT_CONTENT_INDEXED HEX: 00002000 ; inline
-: FILE_ATTRIBUTE_ENCRYPTED           HEX: 00004000 ; inline
-
-: FILE_NOTIFY_CHANGE_FILE        HEX: 001 ; inline
-: FILE_NOTIFY_CHANGE_DIR_NAME    HEX: 002 ; inline
-: FILE_NOTIFY_CHANGE_ATTRIBUTES  HEX: 004 ; inline
-: FILE_NOTIFY_CHANGE_SIZE        HEX: 008 ; inline
-: FILE_NOTIFY_CHANGE_LAST_WRITE  HEX: 010 ; inline
-: FILE_NOTIFY_CHANGE_LAST_ACCESS HEX: 020 ; inline
-: FILE_NOTIFY_CHANGE_CREATION    HEX: 040 ; inline
-: FILE_NOTIFY_CHANGE_EA          HEX: 080 ; inline
-: FILE_NOTIFY_CHANGE_SECURITY    HEX: 100 ; inline
-: FILE_NOTIFY_CHANGE_FILE_NAME   HEX: 200 ; inline
-: FILE_NOTIFY_CHANGE_ALL         HEX: 3ff ; inline
-
-: FILE_ACTION_ADDED 1 ; inline
-: FILE_ACTION_REMOVED 2 ; inline
-: FILE_ACTION_MODIFIED 3 ; inline
-: FILE_ACTION_RENAMED_OLD_NAME 4 ; inline
-: FILE_ACTION_RENAMED_NEW_NAME 5 ; inline
+CONSTANT: FILE_LIST_DIRECTORY       HEX: 00000001
+CONSTANT: FILE_READ_DAT             HEX: 00000001
+CONSTANT: FILE_ADD_FILE             HEX: 00000002
+CONSTANT: FILE_WRITE_DATA           HEX: 00000002
+CONSTANT: FILE_ADD_SUBDIRECTORY     HEX: 00000004
+CONSTANT: FILE_APPEND_DATA          HEX: 00000004
+CONSTANT: FILE_CREATE_PIPE_INSTANCE HEX: 00000004
+CONSTANT: FILE_READ_EA              HEX: 00000008
+CONSTANT: FILE_READ_PROPERTIES      HEX: 00000008
+CONSTANT: FILE_WRITE_EA             HEX: 00000010
+CONSTANT: FILE_WRITE_PROPERTIES     HEX: 00000010
+CONSTANT: FILE_EXECUTE              HEX: 00000020
+CONSTANT: FILE_TRAVERSE             HEX: 00000020
+CONSTANT: FILE_DELETE_CHILD         HEX: 00000040
+CONSTANT: FILE_READ_ATTRIBUTES      HEX: 00000080
+CONSTANT: FILE_WRITE_ATTRIBUTES     HEX: 00000100
+
+CONSTANT: FILE_SHARE_READ        1
+CONSTANT: FILE_SHARE_WRITE       2
+CONSTANT: FILE_SHARE_DELETE      4
+CONSTANT: FILE_SHARE_VALID_FLAGS 7
+
+CONSTANT: FILE_FLAG_WRITE_THROUGH       HEX: 80000000
+CONSTANT: FILE_FLAG_OVERLAPPED          HEX: 40000000
+CONSTANT: FILE_FLAG_NO_BUFFERING        HEX: 20000000
+CONSTANT: FILE_FLAG_RANDOM_ACCESS       HEX: 10000000
+CONSTANT: FILE_FLAG_SEQUENTIAL_SCAN     HEX: 08000000
+CONSTANT: FILE_FLAG_DELETE_ON_CLOSE     HEX: 04000000
+CONSTANT: FILE_FLAG_BACKUP_SEMANTICS    HEX: 02000000
+CONSTANT: FILE_FLAG_POSIX_SEMANTICS     HEX: 01000000
+CONSTANT: FILE_FLAG_OPEN_REPARSE_POINT  HEX: 00200000
+CONSTANT: FILE_FLAG_OPEN_NO_RECALL      HEX: 00100000
+CONSTANT: FILE_FLAG_FIRST_PIPE_INSTANCE HEX: 00080000
+
+CONSTANT: FILE_ATTRIBUTE_READONLY            HEX: 00000001
+CONSTANT: FILE_ATTRIBUTE_HIDDEN              HEX: 00000002
+CONSTANT: FILE_ATTRIBUTE_SYSTEM              HEX: 00000004
+CONSTANT: FILE_ATTRIBUTE_DIRECTORY           HEX: 00000010
+CONSTANT: FILE_ATTRIBUTE_ARCHIVE             HEX: 00000020
+CONSTANT: FILE_ATTRIBUTE_DEVICE              HEX: 00000040
+CONSTANT: FILE_ATTRIBUTE_NORMAL              HEX: 00000080
+CONSTANT: FILE_ATTRIBUTE_TEMPORARY           HEX: 00000100
+CONSTANT: FILE_ATTRIBUTE_SPARSE_FILE         HEX: 00000200
+CONSTANT: FILE_ATTRIBUTE_REPARSE_POINT       HEX: 00000400
+CONSTANT: FILE_ATTRIBUTE_COMPRESSED          HEX: 00000800
+CONSTANT: FILE_ATTRIBUTE_OFFLINE             HEX: 00001000
+CONSTANT: FILE_ATTRIBUTE_NOT_CONTENT_INDEXED HEX: 00002000
+CONSTANT: FILE_ATTRIBUTE_ENCRYPTED           HEX: 00004000
+
+CONSTANT: FILE_NOTIFY_CHANGE_FILE        HEX: 001
+CONSTANT: FILE_NOTIFY_CHANGE_DIR_NAME    HEX: 002
+CONSTANT: FILE_NOTIFY_CHANGE_ATTRIBUTES  HEX: 004
+CONSTANT: FILE_NOTIFY_CHANGE_SIZE        HEX: 008
+CONSTANT: FILE_NOTIFY_CHANGE_LAST_WRITE  HEX: 010
+CONSTANT: FILE_NOTIFY_CHANGE_LAST_ACCESS HEX: 020
+CONSTANT: FILE_NOTIFY_CHANGE_CREATION    HEX: 040
+CONSTANT: FILE_NOTIFY_CHANGE_EA          HEX: 080
+CONSTANT: FILE_NOTIFY_CHANGE_SECURITY    HEX: 100
+CONSTANT: FILE_NOTIFY_CHANGE_FILE_NAME   HEX: 200
+CONSTANT: FILE_NOTIFY_CHANGE_ALL         HEX: 3ff
+
+CONSTANT: FILE_ACTION_ADDED 1
+CONSTANT: FILE_ACTION_REMOVED 2
+CONSTANT: FILE_ACTION_MODIFIED 3
+CONSTANT: FILE_ACTION_RENAMED_OLD_NAME 4
+CONSTANT: FILE_ACTION_RENAMED_NEW_NAME 5
 
 C-STRUCT: FILE_NOTIFY_INFORMATION
     { "DWORD" "NextEntryOffset" }
@@ -96,107 +96,119 @@ C-STRUCT: FILE_NOTIFY_INFORMATION
     { "WCHAR[1]" "FileName" } ;
 TYPEDEF: FILE_NOTIFY_INFORMATION* PFILE_NOTIFY_INFORMATION
 
-: STD_INPUT_HANDLE  -10 ; inline
-: STD_OUTPUT_HANDLE -11 ; inline
-: STD_ERROR_HANDLE  -12 ; inline
-
-: INVALID_HANDLE_VALUE -1 <alien> ; inline
-: INVALID_FILE_SIZE HEX: FFFFFFFF ; inline
-: INVALID_SET_FILE_POINTER HEX: ffffffff ; inline
-
-: FILE_BEGIN 0 ; inline
-: FILE_CURRENT 1 ; inline
-: FILE_END 2 ; inline
-
-: OF_READ 0 ;
-: OF_READWRITE    2 ;
-: OF_WRITE    1 ;
-: OF_SHARE_COMPAT    0 ;
-: OF_SHARE_DENY_NONE    64 ;
-: OF_SHARE_DENY_READ    48 ;
-: OF_SHARE_DENY_WRITE    32 ;
-: OF_SHARE_EXCLUSIVE    16 ;
-: OF_CANCEL    2048 ;
-: OF_CREATE    4096 ;
-: OF_DELETE    512 ;
-: OF_EXIST    16384 ;
-: OF_PARSE    256 ;
-: OF_PROMPT    8192 ;
-: OF_REOPEN    32768 ;
-: OF_VERIFY    1024 ;
-
-: INFINITE HEX: FFFFFFFF ; inline
+CONSTANT: STD_INPUT_HANDLE  -10
+CONSTANT: STD_OUTPUT_HANDLE -11
+CONSTANT: STD_ERROR_HANDLE  -12
+
+: INVALID_HANDLE_VALUE ( -- alien ) -1 <alien> ; inline
+CONSTANT: INVALID_FILE_SIZE HEX: FFFFFFFF
+CONSTANT: INVALID_SET_FILE_POINTER HEX: ffffffff
+
+CONSTANT: FILE_BEGIN 0
+CONSTANT: FILE_CURRENT 1
+CONSTANT: FILE_END 2
+
+CONSTANT: OF_READ 0
+CONSTANT: OF_READWRITE    2
+CONSTANT: OF_WRITE    1
+CONSTANT: OF_SHARE_COMPAT    0
+CONSTANT: OF_SHARE_DENY_NONE    64
+CONSTANT: OF_SHARE_DENY_READ    48
+CONSTANT: OF_SHARE_DENY_WRITE    32
+CONSTANT: OF_SHARE_EXCLUSIVE    16
+CONSTANT: OF_CANCEL    2048
+CONSTANT: OF_CREATE    4096
+CONSTANT: OF_DELETE    512
+CONSTANT: OF_EXIST    16384
+CONSTANT: OF_PARSE    256
+CONSTANT: OF_PROMPT    8192
+CONSTANT: OF_REOPEN    32768
+CONSTANT: OF_VERIFY    1024
+
+CONSTANT: INFINITE HEX: FFFFFFFF
 
 ! From C:\cygwin\usr\include\w32api\winbase.h
-: FILE_TYPE_UNKNOWN 0 ;
-: FILE_TYPE_DISK 1 ;
-: FILE_TYPE_CHAR 2 ;
-: FILE_TYPE_PIPE 3 ;
-: FILE_TYPE_REMOTE HEX: 8000 ;
-
-: TIME_ZONE_ID_UNKNOWN 0 ; inline
-: TIME_ZONE_ID_STANDARD 1 ; inline
-: TIME_ZONE_ID_DAYLIGHT 2 ; inline
-: TIME_ZONE_ID_INVALID HEX: FFFFFFFF ; inline
-
-
-: PF_XMMI64_INSTRUCTIONS_AVAILABLE 10 ; inline
-: PF_SSE3_INSTRUCTIONS_AVAILABLE 13 ; inline
-
-: MAX_COMPUTERNAME_LENGTH 15 ; inline
-: UNLEN 256 ; inline
-
-: PROCESS_TERMINATE ( -- n ) HEX: 1 ; inline
-: PROCESS_CREATE_THREAD ( -- n ) HEX: 2 ; inline
-: PROCESS_VM_OPERATION ( -- n ) HEX: 8 ; inline
-: PROCESS_VM_READ ( -- n ) HEX: 10 ; inline
-: PROCESS_VM_WRITE ( -- n ) HEX: 20 ; inline
-: PROCESS_DUP_HANDLE ( -- n ) HEX: 40 ; inline
-: PROCESS_CREATE_PROCESS ( -- n ) HEX: 80 ; inline
-: PROCESS_SET_QUOTA ( -- n ) HEX: 100 ; inline
-: PROCESS_SET_INFORMATION ( -- n ) HEX: 200 ; inline
-: PROCESS_QUERY_INFORMATION ( -- n ) HEX: 400 ; inline
-
-: MEM_COMMIT ( -- n ) HEX: 1000 ; inline
-: MEM_RELEASE ( -- n ) HEX: 8000 ; inline
-
-: PAGE_NOACCESS    1 ; inline
-: PAGE_READONLY    2 ; inline
-: PAGE_READWRITE 4 ; inline
-: PAGE_WRITECOPY 8 ; inline
-: PAGE_EXECUTE HEX: 10 ; inline
-: PAGE_EXECUTE_READ HEX: 20 ; inline
-: PAGE_EXECUTE_READWRITE HEX: 40 ; inline
-: PAGE_EXECUTE_WRITECOPY HEX: 80 ; inline
-: PAGE_GUARD HEX: 100 ; inline
-: PAGE_NOCACHE HEX: 200 ; inline
-
-: SEC_BASED HEX: 00200000 ; inline
-: SEC_NO_CHANGE HEX: 00400000 ; inline
-: SEC_FILE HEX: 00800000 ; inline
-: SEC_IMAGE HEX: 01000000 ; inline
-: SEC_VLM HEX: 02000000 ; inline
-: SEC_RESERVE HEX: 04000000 ; inline
-: SEC_COMMIT HEX: 08000000 ; inline
-: SEC_NOCACHE HEX: 10000000 ; inline
-: MEM_IMAGE SEC_IMAGE ; inline
-
-: ERROR_ALREADY_EXISTS 183 ; inline
-
-: FILE_MAP_ALL_ACCESS HEX: f001f ;
-: FILE_MAP_READ   4 ;
-: FILE_MAP_WRITE  2 ;
-: FILE_MAP_COPY   1 ;
-
-: THREAD_MODE_BACKGROUND_BEGIN HEX: 10000 ; inline
-: THREAD_MODE_BACKGROUND_END   HEX: 20000 ; inline
-: THREAD_PRIORITY_ABOVE_NORMAL 1 ; inline
-: THREAD_PRIORITY_BELOW_NORMAL -1 ; inline
-: THREAD_PRIORITY_HIGHEST 2 ; inline
-: THREAD_PRIORITY_IDLE -15 ; inline
-: THREAD_PRIORITY_LOWEST -2 ; inline
-: THREAD_PRIORITY_NORMAL 0 ; inline
-: THREAD_PRIORITY_TIME_CRITICAL 15 ; inline
+CONSTANT: FILE_TYPE_UNKNOWN 0
+CONSTANT: FILE_TYPE_DISK 1
+CONSTANT: FILE_TYPE_CHAR 2
+CONSTANT: FILE_TYPE_PIPE 3
+CONSTANT: FILE_TYPE_REMOTE HEX: 8000
+
+CONSTANT: TIME_ZONE_ID_UNKNOWN 0
+CONSTANT: TIME_ZONE_ID_STANDARD 1
+CONSTANT: TIME_ZONE_ID_DAYLIGHT 2
+CONSTANT: TIME_ZONE_ID_INVALID HEX: FFFFFFFF
+
+CONSTANT: PF_XMMI64_INSTRUCTIONS_AVAILABLE 10
+CONSTANT: PF_SSE3_INSTRUCTIONS_AVAILABLE 13
+
+CONSTANT: MAX_COMPUTERNAME_LENGTH 15
+CONSTANT: UNLEN 256
+
+CONSTANT: PROCESS_TERMINATE HEX: 1
+CONSTANT: PROCESS_CREATE_THREAD HEX: 2
+CONSTANT: PROCESS_VM_OPERATION HEX: 8
+CONSTANT: PROCESS_VM_READ HEX: 10
+CONSTANT: PROCESS_VM_WRITE HEX: 20
+CONSTANT: PROCESS_DUP_HANDLE HEX: 40
+CONSTANT: PROCESS_CREATE_PROCESS HEX: 80
+CONSTANT: PROCESS_SET_QUOTA HEX: 100
+CONSTANT: PROCESS_SET_INFORMATION HEX: 200
+CONSTANT: PROCESS_QUERY_INFORMATION HEX: 400
+
+CONSTANT: MEM_COMMIT HEX: 1000
+CONSTANT: MEM_RELEASE  HEX: 8000
+
+CONSTANT: PAGE_NOACCESS    1
+CONSTANT: PAGE_READONLY    2
+CONSTANT: PAGE_READWRITE 4
+CONSTANT: PAGE_WRITECOPY 8
+CONSTANT: PAGE_EXECUTE HEX: 10
+CONSTANT: PAGE_EXECUTE_READ HEX: 20
+CONSTANT: PAGE_EXECUTE_READWRITE HEX: 40
+CONSTANT: PAGE_EXECUTE_WRITECOPY HEX: 80
+CONSTANT: PAGE_GUARD HEX: 100
+CONSTANT: PAGE_NOCACHE HEX: 200
+
+CONSTANT: SEC_BASED HEX: 00200000
+CONSTANT: SEC_NO_CHANGE HEX: 00400000
+CONSTANT: SEC_FILE HEX: 00800000
+CONSTANT: SEC_IMAGE HEX: 01000000
+CONSTANT: SEC_VLM HEX: 02000000
+CONSTANT: SEC_RESERVE HEX: 04000000
+CONSTANT: SEC_COMMIT HEX: 08000000
+CONSTANT: SEC_NOCACHE HEX: 10000000
+ALIAS: MEM_IMAGE SEC_IMAGE
+
+CONSTANT: ERROR_ALREADY_EXISTS 183
+
+CONSTANT: FILE_MAP_ALL_ACCESS HEX: f001f
+CONSTANT: FILE_MAP_READ   4
+CONSTANT: FILE_MAP_WRITE  2
+CONSTANT: FILE_MAP_COPY   1
+
+CONSTANT: THREAD_MODE_BACKGROUND_BEGIN HEX: 10000
+CONSTANT: THREAD_MODE_BACKGROUND_END   HEX: 20000
+CONSTANT: THREAD_PRIORITY_ABOVE_NORMAL 1
+CONSTANT: THREAD_PRIORITY_BELOW_NORMAL -1
+CONSTANT: THREAD_PRIORITY_HIGHEST 2
+CONSTANT: THREAD_PRIORITY_IDLE -15
+CONSTANT: THREAD_PRIORITY_LOWEST -2
+CONSTANT: THREAD_PRIORITY_NORMAL 0
+CONSTANT: THREAD_PRIORITY_TIME_CRITICAL 15
+
+C-ENUM:
+    ComputerNameNetBIOS
+    ComputerNameDnsHostname
+    ComputerNameDnsDomain
+    ComputerNameDnsFullyQualified
+    ComputerNamePhysicalNetBIOS
+    ComputerNamePhysicalDnsHostname
+    ComputerNamePhysicalDnsDomain
+    ComputerNamePhysicalDnsFullyQualified
+    ComputerNameMax ;
+
+TYPEDEF: uint COMPUTER_NAME_FORMAT
 
 C-STRUCT: OVERLAPPED
     { "UINT_PTR" "internal" }
@@ -320,75 +332,318 @@ C-STRUCT: GUID
     { "WORD"  "Data3" }
     { { "UCHAR" 8 } "Data4" } ;
 
-
-: SE_CREATE_TOKEN_NAME "SeCreateTokenPrivilege" ;
-: SE_ASSIGNPRIMARYTOKEN_NAME "SeAssignPrimaryTokenPrivilege" ;
-: SE_LOCK_MEMORY_NAME "SeLockMemoryPrivilege" ;
-: SE_INCREASE_QUOTA_NAME "SeIncreaseQuotaPrivilege" ;
-: SE_UNSOLICITED_INPUT_NAME "SeUnsolicitedInputPrivilege" ;
-: SE_MACHINE_ACCOUNT_NAME "SeMachineAccountPrivilege" ;
-: SE_TCB_NAME "SeTcbPrivilege" ;
-: SE_SECURITY_NAME "SeSecurityPrivilege" ;
-: SE_TAKE_OWNERSHIP_NAME "SeTakeOwnershipPrivilege" ;
-: SE_LOAD_DRIVER_NAME "SeLoadDriverPrivilege" ;
-: SE_SYSTEM_PROFILE_NAME "SeSystemProfilePrivilege" ;
-: SE_SYSTEMTIME_NAME "SeSystemtimePrivilege" ;
-: SE_PROF_SINGLE_PROCESS_NAME "SeProfileSingleProcessPrivilege" ;
-: SE_INC_BASE_PRIORITY_NAME "SeIncreaseBasePriorityPrivilege" ;
-: SE_CREATE_PAGEFILE_NAME "SeCreatePagefilePrivilege" ;
-: SE_CREATE_PERMANENT_NAME "SeCreatePermanentPrivilege" ;
-: SE_BACKUP_NAME "SeBackupPrivilege" ;
-: SE_RESTORE_NAME "SeRestorePrivilege" ;
-: SE_SHUTDOWN_NAME "SeShutdownPrivilege" ;
-: SE_DEBUG_NAME "SeDebugPrivilege" ;
-: SE_AUDIT_NAME "SeAuditPrivilege" ;
-: SE_SYSTEM_ENVIRONMENT_NAME "SeSystemEnvironmentPrivilege" ;
-: SE_CHANGE_NOTIFY_NAME "SeChangeNotifyPrivilege" ;
-: SE_REMOTE_SHUTDOWN_NAME "SeRemoteShutdownPrivilege" ;
-: SE_UNDOCK_NAME "SeUndockPrivilege" ;
-: SE_ENABLE_DELEGATION_NAME "SeEnableDelegationPrivilege" ;
-: SE_MANAGE_VOLUME_NAME "SeManageVolumePrivilege" ;
-: SE_IMPERSONATE_NAME "SeImpersonatePrivilege" ;
-: SE_CREATE_GLOBAL_NAME "SeCreateGlobalPrivilege" ;
-
-: SE_GROUP_MANDATORY HEX: 00000001 ;
-: SE_GROUP_ENABLED_BY_DEFAULT HEX: 00000002 ;
-: SE_GROUP_ENABLED HEX: 00000004 ;
-: SE_GROUP_OWNER HEX: 00000008 ;
-: SE_GROUP_USE_FOR_DENY_ONLY HEX: 00000010 ;
-: SE_GROUP_LOGON_ID HEX: C0000000 ;
-: SE_GROUP_RESOURCE HEX: 20000000 ;
-
-: SE_PRIVILEGE_ENABLED_BY_DEFAULT HEX: 00000001 ;
-: SE_PRIVILEGE_ENABLED HEX: 00000002 ;
-: SE_PRIVILEGE_REMOVE HEX: 00000004 ;
-: SE_PRIVILEGE_USED_FOR_ACCESS HEX: 80000000 ;
-
-: PRIVILEGE_SET_ALL_NECESSARY 1 ;
-
-: SE_OWNER_DEFAULTED HEX: 00000001 ;
-: SE_GROUP_DEFAULTED HEX: 00000002 ;
-: SE_DACL_PRESENT HEX: 00000004 ;
-: SE_DACL_DEFAULTED HEX: 00000008 ;
-: SE_SACL_PRESENT HEX: 00000010 ;
-: SE_SACL_DEFAULTED HEX: 00000020 ;
-: SE_DACL_AUTO_INHERIT_REQ HEX: 00000100 ;
-: SE_SACL_AUTO_INHERIT_REQ HEX: 00000200 ;
-: SE_DACL_AUTO_INHERITED HEX: 00000400 ;
-: SE_SACL_AUTO_INHERITED HEX: 00000800 ;
-: SE_DACL_PROTECTED  HEX: 00001000 ;
-: SE_SACL_PROTECTED  HEX: 00002000 ;
-: SE_SELF_RELATIVE HEX: 00008000 ;
-
-: ANYSIZE_ARRAY 1 ; inline
-
-: MAXIMUM_WAIT_OBJECTS 64 ; inline
-: MAXIMUM_SUSPEND_COUNT HEX: 7f ; inline
-: WAIT_OBJECT_0 0 ; inline
-: WAIT_ABANDONED_0 128 ; inline
-: WAIT_TIMEOUT 258 ; inline
-: WAIT_IO_COMPLETION HEX: c0 ; inline
-: WAIT_FAILED HEX: ffffffff ; inline
+/*
+    fBinary  :1;
+    fParity  :1;
+    fOutxCtsFlow  :1;
+    fOutxDsrFlow  :1;
+    fDtrControl  :2;
+    fDsrSensitivity  :1;
+    fTXContinueOnXoff  :1;
+    fOutX  :1;
+    fInX  :1;
+    fErrorChar  :1;
+    fNull  :1;
+    fRtsControl  :2;
+    fAbortOnError  :1;
+    fDummy2  :17;
+*/
+
+CONSTANT: SP_SERIALCOMM   HEX: 1
+CONSTANT: BAUD_075        HEX: 1
+CONSTANT: BAUD_110        HEX: 2
+CONSTANT: BAUD_134_5      HEX: 4
+CONSTANT: BAUD_150        HEX: 8
+CONSTANT: BAUD_300        HEX: 10
+CONSTANT: BAUD_600        HEX: 20
+CONSTANT: BAUD_1200       HEX: 40
+CONSTANT: BAUD_1800       HEX: 80
+CONSTANT: BAUD_2400       HEX: 100
+CONSTANT: BAUD_4800       HEX: 200
+CONSTANT: BAUD_7200       HEX: 400
+CONSTANT: BAUD_9600       HEX: 800
+CONSTANT: BAUD_14400      HEX: 1000
+CONSTANT: BAUD_19200      HEX: 2000
+CONSTANT: BAUD_38400      HEX: 4000
+CONSTANT: BAUD_56K        HEX: 8000
+CONSTANT: BAUD_57600      HEX: 40000
+CONSTANT: BAUD_115200     HEX: 20000
+CONSTANT: BAUD_128K       HEX: 10000
+CONSTANT: BAUD_USER       HEX: 10000000
+CONSTANT: PST_FAX     HEX: 21
+CONSTANT: PST_LAT     HEX: 101
+CONSTANT: PST_MODEM       HEX: 6
+CONSTANT: PST_NETWORK_BRIDGE  HEX: 100
+CONSTANT: PST_PARALLELPORT    HEX: 2
+CONSTANT: PST_RS232       HEX: 1
+CONSTANT: PST_RS422       HEX: 3
+CONSTANT: PST_RS423       HEX: 4
+CONSTANT: PST_RS449       HEX: 5
+CONSTANT: PST_SCANNER     HEX: 22
+CONSTANT: PST_TCPIP_TELNET    HEX: 102
+CONSTANT: PST_UNSPECIFIED 0
+CONSTANT: PST_X25     HEX: 103
+CONSTANT: PCF_16BITMODE   HEX: 200
+CONSTANT: PCF_DTRDSR      HEX: 1
+CONSTANT: PCF_INTTIMEOUTS HEX: 80
+CONSTANT: PCF_PARITY_CHECK    HEX: 8
+CONSTANT: PCF_RLSD        HEX: 4
+CONSTANT: PCF_RTSCTS      HEX: 2
+CONSTANT: PCF_SETXCHAR    HEX: 20
+CONSTANT: PCF_SPECIALCHARS    HEX: 100
+CONSTANT: PCF_TOTALTIMEOUTS   HEX: 40
+CONSTANT: PCF_XONXOFF     HEX: 10
+CONSTANT: SP_BAUD     HEX: 2
+CONSTANT: SP_DATABITS     HEX: 4
+CONSTANT: SP_HANDSHAKING  HEX: 10
+CONSTANT: SP_PARITY       HEX: 1
+CONSTANT: SP_PARITY_CHECK HEX: 20
+CONSTANT: SP_RLSD     HEX: 40
+CONSTANT: SP_STOPBITS     HEX: 8
+CONSTANT: DATABITS_5      1
+CONSTANT: DATABITS_6      2
+CONSTANT: DATABITS_7      4
+CONSTANT: DATABITS_8      8
+CONSTANT: DATABITS_16     16
+CONSTANT: DATABITS_16X    32
+CONSTANT: STOPBITS_10     1
+CONSTANT: STOPBITS_15     2
+CONSTANT: STOPBITS_20     4
+CONSTANT: PARITY_NONE     256
+CONSTANT: PARITY_ODD      512
+CONSTANT: PARITY_EVEN     1024
+CONSTANT: PARITY_MARK     2048
+CONSTANT: PARITY_SPACE    4096
+CONSTANT: COMMPROP_INITIALIZED    HEX: e73cf52e
+
+CONSTANT: CBR_110         110
+CONSTANT: CBR_300         300
+CONSTANT: CBR_600         600
+CONSTANT: CBR_1200            1200
+CONSTANT: CBR_2400            2400
+CONSTANT: CBR_4800            4800
+CONSTANT: CBR_9600            9600
+CONSTANT: CBR_14400           14400
+CONSTANT: CBR_19200           19200
+CONSTANT: CBR_38400           38400
+CONSTANT: CBR_56000           56000
+CONSTANT: CBR_57600           57600
+CONSTANT: CBR_115200          115200
+CONSTANT: CBR_128000          128000
+CONSTANT: CBR_256000          256000
+CONSTANT: DTR_CONTROL_DISABLE     0
+CONSTANT: DTR_CONTROL_ENABLE      1
+CONSTANT: DTR_CONTROL_HANDSHAKE   2
+CONSTANT: RTS_CONTROL_DISABLE     0
+CONSTANT: RTS_CONTROL_ENABLE      1
+CONSTANT: RTS_CONTROL_HANDSHAKE   2
+CONSTANT: RTS_CONTROL_TOGGLE      3
+CONSTANT: EVENPARITY          2
+CONSTANT: MARKPARITY          3
+CONSTANT: NOPARITY            0
+CONSTANT: ODDPARITY           1
+CONSTANT: SPACEPARITY         4
+CONSTANT: ONESTOPBIT          0
+CONSTANT: ONE5STOPBITS        1
+CONSTANT: TWOSTOPBITS         2
+
+! Flowcontrol bit mask in DCB
+CONSTANT: FM_fBinary          HEX: 1
+CONSTANT: FM_fParity          HEX: 2
+CONSTANT: FM_fOutxCtsFlow     HEX: 4
+CONSTANT: FM_fOutxDsrFlow     HEX: 8
+CONSTANT: FM_fDtrControl      HEX: 30
+CONSTANT: FM_fDsrSensitivity      HEX: 40
+CONSTANT: FM_fTXContinueOnXoff    HEX: 80
+CONSTANT: FM_fOutX            HEX: 100
+CONSTANT: FM_fInX         HEX: 200
+CONSTANT: FM_fErrorChar       HEX: 400
+CONSTANT: FM_fNull            HEX: 800
+CONSTANT: FM_fRtsControl      HEX: 3000
+CONSTANT: FM_fAbortOnError        HEX: 4000
+CONSTANT: FM_fDummy2          HEX: ffff8000
+
+CONSTANT: BM_fCtsHold     HEX: 1
+CONSTANT: BM_fDsrHold     HEX: 2
+CONSTANT: BM_fRlsdHold    HEX: 4
+CONSTANT: BM_fXoffHold    HEX: 8
+CONSTANT: BM_fXoffSent    HEX: 10
+CONSTANT: BM_fEof     HEX: 20
+CONSTANT: BM_fTxim        HEX: 40
+CONSTANT: BM_AllBits      HEX: 7f
+
+! PurgeComm bit mask
+CONSTANT: PURGE_TXABORT   HEX: 1
+CONSTANT: PURGE_RXABORT   HEX: 2
+CONSTANT: PURGE_TXCLEAR   HEX: 4
+CONSTANT: PURGE_RXCLEAR   HEX: 8
+
+! GetCommModemStatus bit mask
+CONSTANT: MS_CTS_ON       HEX: 10
+CONSTANT: MS_DSR_ON       HEX: 20
+CONSTANT: MS_RING_ON      HEX: 40
+CONSTANT: MS_RLSD_ON      HEX: 80
+
+! EscapeCommFunction operations
+CONSTANT: SETXOFF     HEX: 1
+CONSTANT: SETXON      HEX: 2
+CONSTANT: SETRTS      HEX: 3
+CONSTANT: CLRRTS      HEX: 4
+CONSTANT: SETDTR      HEX: 5
+CONSTANT: CLRDTR      HEX: 6
+CONSTANT: SETBREAK        HEX: 8
+CONSTANT: CLRBREAK        HEX: 9
+
+! ClearCommError bit mask
+CONSTANT: CE_RXOVER       HEX: 1
+CONSTANT: CE_OVERRUN      HEX: 2
+CONSTANT: CE_RXPARITY     HEX: 4
+CONSTANT: CE_FRAME        HEX: 8
+CONSTANT: CE_BREAK        HEX: 10
+CONSTANT: CE_TXFULL       HEX: 100
+! LPT only
+CONSTANT: CE_PTO        HEX: 200
+CONSTANT: CE_IOE        HEX: 400
+CONSTANT: CE_DNS        HEX: 800
+CONSTANT: CE_OOP        HEX: 1000
+! LPT only
+CONSTANT: CE_MODE     HEX: 8000
+
+! GetCommMask bits
+CONSTANT: EV_RXCHAR       HEX: 1
+CONSTANT: EV_RXFLAG       HEX: 2
+CONSTANT: EV_TXEMPTY      HEX: 4
+CONSTANT: EV_CTS      HEX: 8
+CONSTANT: EV_DSR      HEX: 10
+CONSTANT: EV_RLSD     HEX: 20
+CONSTANT: EV_BREAK        HEX: 40
+CONSTANT: EV_ERR      HEX: 80
+CONSTANT: EV_RING     HEX: 100
+CONSTANT: EV_PERR     HEX: 200
+CONSTANT: EV_RX80FULL     HEX: 400
+CONSTANT: EV_EVENT1       HEX: 800
+CONSTANT: EV_EVENT2       HEX: 1000
+
+C-STRUCT: DCB
+    { "DWORD" "DCBlength" }
+    { "DWORD" "BaudRate" }
+    { "DWORD" "flags" }
+    { "WORD"  "wReserved" }
+    { "WORD"  "XonLim" }
+    { "WORD"  "XoffLim" }
+    { "BYTE"  "ByteSize" }
+    { "BYTE"  "Parity" }
+    { "BYTE"  "StopBits" }
+    { "char"  "XonChar" }
+    { "char"  "XoffChar" }
+    { "char"  "ErrorChar" }
+    { "char"  "EofChar" }
+    { "char"  "EvtChar" }
+    { "WORD"  "wReserved1" } ;
+TYPEDEF: DCB* PDCB
+TYPEDEF: DCB* LPDCB
+
+C-STRUCT: COMM_CONFIG
+    { "DWORD" "dwSize" }
+    { "WORD" "wVersion" }
+    { "WORD" "wReserved" }
+    { "DCB" "dcb" }
+    { "DWORD" "dwProviderSubType" }
+    { "DWORD" "dwProviderOffset" }
+    { "DWORD" "dwProviderSize" }
+    { { "WCHAR" 1 } "wcProviderData" } ;
+TYPEDEF: COMMCONFIG* LPCOMMCONFIG
+
+C-STRUCT: COMMPROP
+    { "WORD" "wPacketLength" }
+    { "WORD" "wPacketVersion" }
+    { "DWORD" "dwServiceMask" }
+    { "DWORD" "dwReserved1" }
+    { "DWORD" "dwMaxTxQueue" }
+    { "DWORD" "dwMaxRxQueue" }
+    { "DWORD" "dwMaxBaud" }
+    { "DWORD" "dwProvSubType" }
+    { "DWORD" "dwProvCapabilities" }
+    { "DWORD" "dwSettableParams" }
+    { "DWORD" "dwSettableBaud" }
+    { "WORD"  "wSettableData" }
+    { "WORD"  "wSettableStopParity" }
+    { "DWORD" "dwCurrentTxQueue" }
+    { "DWORD" "dwCurrentRxQueue" }
+    { "DWORD" "dwProvSpec1" }
+    { "DWORD" "dwProvSpec2" }
+    { { "WCHAR" 1 } "wcProvChar" } ;
+TYPEDEF: COMMPROP* LPCOMMPROP
+
+
+CONSTANT: SE_CREATE_TOKEN_NAME "SeCreateTokenPrivilege"
+CONSTANT: SE_ASSIGNPRIMARYTOKEN_NAME "SeAssignPrimaryTokenPrivilege"
+CONSTANT: SE_LOCK_MEMORY_NAME "SeLockMemoryPrivilege"
+CONSTANT: SE_INCREASE_QUOTA_NAME "SeIncreaseQuotaPrivilege"
+CONSTANT: SE_UNSOLICITED_INPUT_NAME "SeUnsolicitedInputPrivilege"
+CONSTANT: SE_MACHINE_ACCOUNT_NAME "SeMachineAccountPrivilege"
+CONSTANT: SE_TCB_NAME "SeTcbPrivilege"
+CONSTANT: SE_SECURITY_NAME "SeSecurityPrivilege"
+CONSTANT: SE_TAKE_OWNERSHIP_NAME "SeTakeOwnershipPrivilege"
+CONSTANT: SE_LOAD_DRIVER_NAME "SeLoadDriverPrivilege"
+CONSTANT: SE_SYSTEM_PROFILE_NAME "SeSystemProfilePrivilege"
+CONSTANT: SE_SYSTEMTIME_NAME "SeSystemtimePrivilege"
+CONSTANT: SE_PROF_SINGLE_PROCESS_NAME "SeProfileSingleProcessPrivilege"
+CONSTANT: SE_INC_BASE_PRIORITY_NAME "SeIncreaseBasePriorityPrivilege"
+CONSTANT: SE_CREATE_PAGEFILE_NAME "SeCreatePagefilePrivilege"
+CONSTANT: SE_CREATE_PERMANENT_NAME "SeCreatePermanentPrivilege"
+CONSTANT: SE_BACKUP_NAME "SeBackupPrivilege"
+CONSTANT: SE_RESTORE_NAME "SeRestorePrivilege"
+CONSTANT: SE_SHUTDOWN_NAME "SeShutdownPrivilege"
+CONSTANT: SE_DEBUG_NAME "SeDebugPrivilege"
+CONSTANT: SE_AUDIT_NAME "SeAuditPrivilege"
+CONSTANT: SE_SYSTEM_ENVIRONMENT_NAME "SeSystemEnvironmentPrivilege"
+CONSTANT: SE_CHANGE_NOTIFY_NAME "SeChangeNotifyPrivilege"
+CONSTANT: SE_REMOTE_SHUTDOWN_NAME "SeRemoteShutdownPrivilege"
+CONSTANT: SE_UNDOCK_NAME "SeUndockPrivilege"
+CONSTANT: SE_ENABLE_DELEGATION_NAME "SeEnableDelegationPrivilege"
+CONSTANT: SE_MANAGE_VOLUME_NAME "SeManageVolumePrivilege"
+CONSTANT: SE_IMPERSONATE_NAME "SeImpersonatePrivilege"
+CONSTANT: SE_CREATE_GLOBAL_NAME "SeCreateGlobalPrivilege"
+
+CONSTANT: SE_GROUP_MANDATORY HEX: 00000001
+CONSTANT: SE_GROUP_ENABLED_BY_DEFAULT HEX: 00000002
+CONSTANT: SE_GROUP_ENABLED HEX: 00000004
+CONSTANT: SE_GROUP_OWNER HEX: 00000008
+CONSTANT: SE_GROUP_USE_FOR_DENY_ONLY HEX: 00000010
+CONSTANT: SE_GROUP_LOGON_ID HEX: C0000000
+CONSTANT: SE_GROUP_RESOURCE HEX: 20000000
+
+CONSTANT: SE_PRIVILEGE_ENABLED_BY_DEFAULT HEX: 00000001
+CONSTANT: SE_PRIVILEGE_ENABLED HEX: 00000002
+CONSTANT: SE_PRIVILEGE_REMOVE HEX: 00000004
+CONSTANT: SE_PRIVILEGE_USED_FOR_ACCESS HEX: 80000000
+
+CONSTANT: PRIVILEGE_SET_ALL_NECESSARY 1
+
+CONSTANT: SE_OWNER_DEFAULTED HEX: 00000001
+CONSTANT: SE_GROUP_DEFAULTED HEX: 00000002
+CONSTANT: SE_DACL_PRESENT HEX: 00000004
+CONSTANT: SE_DACL_DEFAULTED HEX: 00000008
+CONSTANT: SE_SACL_PRESENT HEX: 00000010
+CONSTANT: SE_SACL_DEFAULTED HEX: 00000020
+CONSTANT: SE_DACL_AUTO_INHERIT_REQ HEX: 00000100
+CONSTANT: SE_SACL_AUTO_INHERIT_REQ HEX: 00000200
+CONSTANT: SE_DACL_AUTO_INHERITED HEX: 00000400
+CONSTANT: SE_SACL_AUTO_INHERITED HEX: 00000800
+CONSTANT: SE_DACL_PROTECTED  HEX: 00001000
+CONSTANT: SE_SACL_PROTECTED  HEX: 00002000
+CONSTANT: SE_SELF_RELATIVE HEX: 00008000
+
+CONSTANT: ANYSIZE_ARRAY 1
+
+CONSTANT: MAXIMUM_WAIT_OBJECTS 64
+CONSTANT: MAXIMUM_SUSPEND_COUNT HEX: 7f
+CONSTANT: WAIT_OBJECT_0 0
+CONSTANT: WAIT_ABANDONED_0 128
+CONSTANT: WAIT_TIMEOUT 258
+CONSTANT: WAIT_IO_COMPLETION HEX: c0
+CONSTANT: WAIT_FAILED HEX: ffffffff
 
 C-STRUCT: LUID
     { "DWORD" "LowPart" }
@@ -427,7 +682,7 @@ C-STRUCT: BY_HANDLE_FILE_INFORMATION
   { "DWORD" "nFileIndexLow" } ;
 TYPEDEF: BY_HANDLE_FILE_INFORMATION* LPBY_HANDLE_FILE_INFORMATION
 
-: OFS_MAXPATHNAME 128 ;
+CONSTANT: OFS_MAXPATHNAME 128
 
 C-STRUCT: OFSTRUCT
     { "BYTE" "cBytes" }
@@ -489,34 +744,34 @@ C-STRUCT: SECURITY_ATTRIBUTES
     { "LPVOID" "lpSecurityDescriptor" }
     { "BOOL" "bInheritHandle" } ;
 
-: HANDLE_FLAG_INHERIT 1 ; inline
-: HANDLE_FLAG_PROTECT_FROM_CLOSE 2 ; inline
+CONSTANT: HANDLE_FLAG_INHERIT 1
+CONSTANT: HANDLE_FLAG_PROTECT_FROM_CLOSE 2
 
-: STARTF_USESHOWWINDOW    HEX: 00000001 ; inline
-: STARTF_USESIZE          HEX: 00000002 ; inline
-: STARTF_USEPOSITION      HEX: 00000004 ; inline
-: STARTF_USECOUNTCHARS    HEX: 00000008 ; inline
-: STARTF_USEFILLATTRIBUTE HEX: 00000010 ; inline
-: STARTF_RUNFULLSCREEN    HEX: 00000020 ; inline
-: STARTF_FORCEONFEEDBACK  HEX: 00000040 ; inline
-: STARTF_FORCEOFFFEEDBACK HEX: 00000080 ; inline
-: STARTF_USESTDHANDLES    HEX: 00000100 ; inline
-: STARTF_USEHOTKEY        HEX: 00000200 ; inline
+CONSTANT: STARTF_USESHOWWINDOW    HEX: 00000001
+CONSTANT: STARTF_USESIZE          HEX: 00000002
+CONSTANT: STARTF_USEPOSITION      HEX: 00000004
+CONSTANT: STARTF_USECOUNTCHARS    HEX: 00000008
+CONSTANT: STARTF_USEFILLATTRIBUTE HEX: 00000010
+CONSTANT: STARTF_RUNFULLSCREEN    HEX: 00000020
+CONSTANT: STARTF_FORCEONFEEDBACK  HEX: 00000040
+CONSTANT: STARTF_FORCEOFFFEEDBACK HEX: 00000080
+CONSTANT: STARTF_USESTDHANDLES    HEX: 00000100
+CONSTANT: STARTF_USEHOTKEY        HEX: 00000200
 
-: PIPE_ACCESS_INBOUND  1 ; inline
-: PIPE_ACCESS_OUTBOUND 2 ; inline
-: PIPE_ACCESS_DUPLEX   3 ; inline
+CONSTANT: PIPE_ACCESS_INBOUND  1
+CONSTANT: PIPE_ACCESS_OUTBOUND 2
+CONSTANT: PIPE_ACCESS_DUPLEX   3
 
-: PIPE_TYPE_BYTE    0 ; inline
-: PIPE_TYPE_MESSAGE 4 ; inline
+CONSTANT: PIPE_TYPE_BYTE    0
+CONSTANT: PIPE_TYPE_MESSAGE 4
 
-: PIPE_READMODE_BYTE    0 ; inline
-: PIPE_READMODE_MESSAGE 2 ; inline
+CONSTANT: PIPE_READMODE_BYTE    0
+CONSTANT: PIPE_READMODE_MESSAGE 2
 
-: PIPE_WAIT   0 ; inline
-: PIPE_NOWAIT 1 ; inline
+CONSTANT: PIPE_WAIT   0
+CONSTANT: PIPE_NOWAIT 1
 
-: PIPE_UNLIMITED_INSTANCES 255 ; inline
+CONSTANT: PIPE_UNLIMITED_INSTANCES 255
 
 LIBRARY: kernel32
 ! FUNCTION: _hread
@@ -537,7 +792,7 @@ LIBRARY: kernel32
 ! FUNCTION: AddRefActCtx
 ! FUNCTION: AddVectoredExceptionHandler
 ! FUNCTION: AllocateUserPhysicalPages
-! FUNCTION: AllocConsole
+FUNCTION: BOOL AllocConsole ( ) ;
 ! FUNCTION: AreFileApisANSI
 ! FUNCTION: AssignProcessToJobObject
 ! FUNCTION: AttachConsole
@@ -641,29 +896,29 @@ ALIAS: CreateNamedPipe CreateNamedPipeW
 ! FUNCTION: CreateNlsSecurityDescriptor
 FUNCTION: BOOL CreatePipe ( PHANDLE hReadPipe, PHANDLE hWritePipe, LPSECURITY_ATTRIBUTES lpPipeAttributes, DWORD nSize ) ;
 
-: DEBUG_PROCESS                   HEX: 00000001 ;
-: DEBUG_ONLY_THIS_PROCESS         HEX: 00000002 ;
-: CREATE_SUSPENDED                HEX: 00000004 ;
-: DETACHED_PROCESS                HEX: 00000008 ;
-: CREATE_NEW_CONSOLE              HEX: 00000010 ;
-: NORMAL_PRIORITY_CLASS           HEX: 00000020 ;
-: IDLE_PRIORITY_CLASS             HEX: 00000040 ;
-: HIGH_PRIORITY_CLASS             HEX: 00000080 ;
-: REALTIME_PRIORITY_CLASS         HEX: 00000100 ;
-: CREATE_NEW_PROCESS_GROUP        HEX: 00000200 ;
-: CREATE_UNICODE_ENVIRONMENT      HEX: 00000400 ;
-: CREATE_SEPARATE_WOW_VDM         HEX: 00000800 ;
-: CREATE_SHARED_WOW_VDM           HEX: 00001000 ;
-: CREATE_FORCEDOS                 HEX: 00002000 ;
-: BELOW_NORMAL_PRIORITY_CLASS     HEX: 00004000 ;
-: ABOVE_NORMAL_PRIORITY_CLASS     HEX: 00008000 ;
-: CREATE_BREAKAWAY_FROM_JOB       HEX: 01000000 ;
-: CREATE_WITH_USERPROFILE         HEX: 02000000 ;
-: CREATE_DEFAULT_ERROR_MODE       HEX: 04000000 ;
-: CREATE_NO_WINDOW                HEX: 08000000 ;
-: PROFILE_USER                    HEX: 10000000 ;
-: PROFILE_KERNEL                  HEX: 20000000 ;
-: PROFILE_SERVER                  HEX: 40000000 ;
+CONSTANT: DEBUG_PROCESS                   HEX: 00000001
+CONSTANT: DEBUG_ONLY_THIS_PROCESS         HEX: 00000002
+CONSTANT: CREATE_SUSPENDED                HEX: 00000004
+CONSTANT: DETACHED_PROCESS                HEX: 00000008
+CONSTANT: CREATE_NEW_CONSOLE              HEX: 00000010
+CONSTANT: NORMAL_PRIORITY_CLASS           HEX: 00000020
+CONSTANT: IDLE_PRIORITY_CLASS             HEX: 00000040
+CONSTANT: HIGH_PRIORITY_CLASS             HEX: 00000080
+CONSTANT: REALTIME_PRIORITY_CLASS         HEX: 00000100
+CONSTANT: CREATE_NEW_PROCESS_GROUP        HEX: 00000200
+CONSTANT: CREATE_UNICODE_ENVIRONMENT      HEX: 00000400
+CONSTANT: CREATE_SEPARATE_WOW_VDM         HEX: 00000800
+CONSTANT: CREATE_SHARED_WOW_VDM           HEX: 00001000
+CONSTANT: CREATE_FORCEDOS                 HEX: 00002000
+CONSTANT: BELOW_NORMAL_PRIORITY_CLASS     HEX: 00004000
+CONSTANT: ABOVE_NORMAL_PRIORITY_CLASS     HEX: 00008000
+CONSTANT: CREATE_BREAKAWAY_FROM_JOB       HEX: 01000000
+CONSTANT: CREATE_WITH_USERPROFILE         HEX: 02000000
+CONSTANT: CREATE_DEFAULT_ERROR_MODE       HEX: 04000000
+CONSTANT: CREATE_NO_WINDOW                HEX: 08000000
+CONSTANT: PROFILE_USER                    HEX: 10000000
+CONSTANT: PROFILE_KERNEL                  HEX: 20000000
+CONSTANT: PROFILE_SERVER                  HEX: 40000000
 
 FUNCTION: BOOL CreateProcessW ( LPCTSTR lpApplicationname,
                                 LPTSTR lpCommandLine,
@@ -856,7 +1111,7 @@ FUNCTION: BOOL FindVolumeMountPointClose ( HANDLE hFindVolumeMountPoint ) ;
 ! FUNCTION: FoldStringW
 ! FUNCTION: FormatMessageA
 ! FUNCTION: FormatMessageW
-! FUNCTION: FreeConsole
+FUNCTION: BOOL FreeConsole ( ) ;
 ! FUNCTION: FreeEnvironmentStringsA
 FUNCTION: BOOL FreeEnvironmentStringsW ( LPTCH lpszEnvironmentBlock ) ;
 ALIAS: FreeEnvironmentStrings FreeEnvironmentStringsW
@@ -876,19 +1131,19 @@ ALIAS: FreeEnvironmentStrings FreeEnvironmentStringsW
 ! FUNCTION: GetCalendarInfoW
 ! FUNCTION: GetCommandLineA
 ! FUNCTION: GetCommandLineW
-! FUNCTION: GetCommConfig
-! FUNCTION: GetCommMask
-! FUNCTION: GetCommModemStatus
-! FUNCTION: GetCommProperties
-! FUNCTION: GetCommState
+FUNCTION: BOOL GetCommConfig ( HANDLE hCommDev, LPCOMMCONFIG lpCC, LPDWORD lpdwSize ) ;
+FUNCTION: BOOL GetCommMask ( HANDLE hFile, LPDWORD lpEvtMask ) ;
+FUNCTION: BOOL GetCommModemStatus ( HANDLE hFile, LPDWORD lpModemStat ) ;
+FUNCTION: BOOL GetCommProperties ( HANDLE hFile, LPCOMMPROP lpCommProp ) ;
+FUNCTION: BOOL GetCommState ( HANDLE hFile, LPDCB lpDCB ) ;
 ! FUNCTION: GetCommTimeouts
 ! FUNCTION: GetComPlusPackageInstallStatus
 ! FUNCTION: GetCompressedFileSizeA
 ! FUNCTION: GetCompressedFileSizeW
 FUNCTION: BOOL GetComputerNameW ( LPTSTR lpBuffer, LPDWORD lpnSize ) ;
-! FUNCTION: GetComputerNameExW
-! FUNCTION: GetComputerNameW
 ALIAS: GetComputerName GetComputerNameW
+FUNCTION: BOOL GetComputerNameExW ( COMPUTER_NAME_FORMAT NameType, LPTSTR lpBuffer, LPDWORD lpnSize ) ;
+ALIAS: GetComputerNameEx GetComputerNameExW
 ! FUNCTION: GetConsoleAliasA
 ! FUNCTION: GetConsoleAliasesA
 ! FUNCTION: GetConsoleAliasesLengthA
@@ -924,7 +1179,7 @@ ALIAS: GetComputerName GetComputerNameW
 ! FUNCTION: GetConsoleSelectionInfo
 FUNCTION: DWORD GetConsoleTitleW ( LPWSTR lpConsoleTitle, DWORD nSize ) ;
 ALIAS: GetConsoleTitle GetConsoleTitleW
-! FUNCTION: GetConsoleWindow
+FUNCTION: HWND GetConsoleWindow ( ) ;
 ! FUNCTION: GetCPFileNameFromRegistry
 ! FUNCTION: GetCPInfo
 ! FUNCTION: GetCPInfoExA
@@ -943,7 +1198,8 @@ FUNCTION: HANDLE GetCurrentThread ( ) ;
 ! FUNCTION: GetDateFormatA
 ! FUNCTION: GetDateFormatW
 ! FUNCTION: GetDefaultCommConfigA
-! FUNCTION: GetDefaultCommConfigW
+FUNCTION: BOOL GetDefaultCommConfigW ( LPCTSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize ) ;
+ALIAS: GetDefaultCommConfig GetDefaultCommConfigW
 ! FUNCTION: GetDefaultSortkeySize
 ! FUNCTION: GetDevicePowerState
 ! FUNCTION: GetDiskFreeSpaceA
@@ -988,8 +1244,6 @@ FUNCTION: DWORD GetFileType ( HANDLE hFile ) ;
 FUNCTION: DWORD GetFullPathNameW ( LPCTSTR lpFileName, DWORD nBufferLength, LPTSTR lpBuffer, LPTSTR* lpFilePart ) ;
 ALIAS: GetFullPathName GetFullPathNameW
 
-!  clear "license.txt" 32768 "char[32768]" <c-object> f over >r GetFullPathName r> swap 2 * head >string .
-
 ! FUNCTION: GetGeoInfoA
 ! FUNCTION: GetGeoInfoW
 ! FUNCTION: GetHandleContext
@@ -1403,10 +1657,10 @@ ALIAS: RemoveDirectory RemoveDirectoryW
 ! FUNCTION: SetCalendarInfoA
 ! FUNCTION: SetCalendarInfoW
 ! FUNCTION: SetClientTimeZoneInformation
-! FUNCTION: SetCommBreak
-! FUNCTION: SetCommConfig
-! FUNCTION: SetCommMask
-! FUNCTION: SetCommState
+FUNCTION: BOOL SetCommBreak ( HANDLE hFile ) ;
+FUNCTION: BOOL SetCommConfig ( HANDLE hCommDev, LPCOMMCONFIG lpCC, DWORD dwSize ) ;
+FUNCTION: BOOL SetCommMask ( HANDLE hFile, DWORD dwEvtMask ) ;
+FUNCTION: BOOL SetCommState ( HANDLE hFile, LPDCB lpDCB ) ;
 ! FUNCTION: SetCommTimeouts
 ! FUNCTION: SetComPlusPackageInstallStatus
 ! FUNCTION: SetComputerNameA
@@ -1449,7 +1703,8 @@ ALIAS: SetConsoleTitle SetConsoleTitleW
 FUNCTION: BOOL SetCurrentDirectoryW ( LPCWSTR lpDirectory ) ;
 ALIAS: SetCurrentDirectory SetCurrentDirectoryW
 ! FUNCTION: SetDefaultCommConfigA
-! FUNCTION: SetDefaultCommConfigW
+FUNCTION: BOOL SetDefaultCommConfigW ( LPCTSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize ) ;
+ALIAS: SetDefaultCommConfig SetDefaultCommConfigW
 ! FUNCTION: SetDllDirectoryA
 ! FUNCTION: SetDllDirectoryW
 FUNCTION: BOOL SetEndOfFile ( HANDLE hFile ) ;
old mode 100644 (file)
new mode 100755 (executable)
index 0f271b4..10e6cd4
@@ -14,1012 +14,1013 @@ windows-messages set-global
 : windows-message-name ( n -- name )
     windows-messages get at "unknown message" or ;
 
-: WM_NULL HEX: 0000 ; inline
-: WM_CREATE HEX: 0001 ; inline
-: WM_DESTROY HEX: 0002 ; inline
-: WM_MOVE HEX: 0003 ; inline
-: WM_SIZE HEX: 0005 ; inline
-: WM_ACTIVATE HEX: 0006 ; inline
-: WM_SETFOCUS HEX: 0007 ; inline
-: WM_KILLFOCUS HEX: 0008 ; inline
-: WM_ENABLE HEX: 000A ; inline
-: WM_SETREDRAW HEX: 000B ; inline
-: WM_SETTEXT HEX: 000C ; inline
-: WM_GETTEXT HEX: 000D ; inline
-: WM_GETTEXTLENGTH HEX: 000E ; inline
-: WM_PAINT HEX: 000F ; inline
-: WM_CLOSE HEX: 0010 ; inline
-: WM_QUERYENDSESSION HEX: 0011 ; inline
-: WM_QUERYOPEN HEX: 0013 ; inline
-: WM_ENDSESSION HEX: 0016 ; inline
-: WM_QUIT HEX: 0012 ; inline
-: WM_ERASEBKGND HEX: 0014 ; inline
-: WM_SYSCOLORCHANGE HEX: 0015 ; inline
-: WM_SHOWWINDOW HEX: 0018 ; inline
-: WM_WININICHANGE HEX: 001A ; inline
-: WM_SETTINGCHANGE HEX: 001A ; inline
-: WM_DEVMODECHANGE HEX: 001B ; inline
-: WM_ACTIVATEAPP HEX: 001C ; inline
-: WM_FONTCHANGE HEX: 001D ; inline
-: WM_TIMECHANGE HEX: 001E ; inline
-: WM_CANCELMODE HEX: 001F ; inline
-: WM_SETCURSOR HEX: 0020 ; inline
-: WM_MOUSEACTIVATE HEX: 0021 ; inline
-: WM_CHILDACTIVATE HEX: 0022 ; inline
-: WM_QUEUESYNC HEX: 0023 ; inline
-: WM_GETMINMAXINFO HEX: 0024 ; inline
-: WM_PAINTICON HEX: 0026 ; inline
-: WM_ICONERASEBKGND HEX: 0027 ; inline
-: WM_NEXTDLGCTL HEX: 0028 ; inline
-: WM_SPOOLERSTATUS HEX: 002A ; inline
-: WM_DRAWITEM HEX: 002B ; inline
-: WM_MEASUREITEM HEX: 002C ; inline
-: WM_DELETEITEM HEX: 002D ; inline
-: WM_VKEYTOITEM HEX: 002E ; inline
-: WM_CHARTOITEM HEX: 002F ; inline
-: WM_SETFONT HEX: 0030 ; inline
-: WM_GETFONT HEX: 0031 ; inline
-: WM_SETHOTKEY HEX: 0032 ; inline
-: WM_GETHOTKEY HEX: 0033 ; inline
-: WM_QUERYDRAGICON HEX: 0037 ; inline
-: WM_COMPAREITEM HEX: 0039 ; inline
-: WM_GETOBJECT HEX: 003D ; inline
-: WM_COMPACTING HEX: 0041 ; inline
-: WM_COMMNOTIFY HEX: 0044 ; inline
-: WM_WINDOWPOSCHANGING HEX: 0046 ; inline
-: WM_WINDOWPOSCHANGED HEX: 0047 ; inline
-: WM_POWER HEX: 0048 ; inline
-: WM_COPYDATA HEX: 004A ; inline
-: WM_CANCELJOURNAL HEX: 004B ; inline
-: WM_NOTIFY HEX: 004E ; inline
-: WM_INPUTLANGCHANGEREQUEST HEX: 0050 ; inline
-: WM_INPUTLANGCHANGE HEX: 0051 ; inline
-: WM_TCARD HEX: 0052 ; inline
-: WM_HELP HEX: 0053 ; inline
-: WM_USERCHANGED HEX: 0054 ; inline
-: WM_NOTIFYFORMAT HEX: 0055 ; inline
-: WM_CONTEXTMENU HEX: 007B ; inline
-: WM_STYLECHANGING HEX: 007C ; inline
-: WM_STYLECHANGED HEX: 007D ; inline
-: WM_DISPLAYCHANGE HEX: 007E ; inline
-: WM_GETICON HEX: 007F ; inline
-: WM_SETICON HEX: 0080 ; inline
-: WM_NCCREATE HEX: 0081 ; inline
-: WM_NCDESTROY HEX: 0082 ; inline
-: WM_NCCALCSIZE HEX: 0083 ; inline
-: WM_NCHITTEST HEX: 0084 ; inline
-: WM_NCPAINT HEX: 0085 ; inline
-: WM_NCACTIVATE HEX: 0086 ; inline
-: WM_GETDLGCODE HEX: 0087 ; inline
-: WM_SYNCPAINT HEX: 0088 ; inline
-: WM_NCMOUSEMOVE HEX: 00A0 ; inline
-: WM_NCLBUTTONDOWN HEX: 00A1 ; inline
-: WM_NCLBUTTONUP HEX: 00A2 ; inline
-: WM_NCLBUTTONDBLCLK HEX: 00A3 ; inline
-: WM_NCRBUTTONDOWN HEX: 00A4 ; inline
-: WM_NCRBUTTONUP HEX: 00A5 ; inline
-: WM_NCRBUTTONDBLCLK HEX: 00A6 ; inline
-: WM_NCMBUTTONDOWN HEX: 00A7 ; inline
-: WM_NCMBUTTONUP HEX: 00A8 ; inline
-: WM_NCMBUTTONDBLCLK HEX: 00A9 ; inline
-: WM_NCXBUTTONDOWN HEX: 00AB ; inline
-: WM_NCXBUTTONUP HEX: 00AC ; inline
-: WM_NCXBUTTONDBLCLK HEX: 00AD ; inline
-: WM_NCUAHDRAWCAPTION HEX: 00AE ; inline ! undocumented
-: WM_NCUAHDRAWFRAME HEX: 00AF ; inline   ! undocumented
-: WM_INPUT HEX: 00FF ; inline
-: WM_KEYFIRST HEX: 0100 ; inline
-: WM_KEYDOWN HEX: 0100 ; inline
-: WM_KEYUP HEX: 0101 ; inline
-: WM_CHAR HEX: 0102 ; inline
-: WM_DEADCHAR HEX: 0103 ; inline
-: WM_SYSKEYDOWN HEX: 0104 ; inline
-: WM_SYSKEYUP HEX: 0105 ; inline
-: WM_SYSCHAR HEX: 0106 ; inline
-: WM_SYSDEADCHAR HEX: 0107 ; inline
-: WM_UNICHAR HEX: 0109 ; inline
-: WM_KEYLAST_NT501 HEX: 0109 ; inline
-: UNICODE_NOCHAR HEX: FFFF ; inline
-: WM_KEYLAST_PRE501 HEX: 0108 ; inline
-: WM_IME_STARTCOMPOSITION HEX: 010D ; inline
-: WM_IME_ENDCOMPOSITION HEX: 010E ; inline
-: WM_IME_COMPOSITION HEX: 010F ; inline
-: WM_IME_KEYLAST HEX: 010F ; inline
-: WM_INITDIALOG HEX: 0110 ; inline
-: WM_COMMAND HEX: 0111 ; inline
-: WM_SYSCOMMAND HEX: 0112 ; inline
-: WM_TIMER HEX: 0113 ; inline
-: WM_HSCROLL HEX: 0114 ; inline
-: WM_VSCROLL HEX: 0115 ; inline
-: WM_INITMENU HEX: 0116 ; inline
-: WM_INITMENUPOPUP HEX: 0117 ; inline
-: WM_MENUSELECT HEX: 011F ; inline
-: WM_MENUCHAR HEX: 0120 ; inline
-: WM_ENTERIDLE HEX: 0121 ; inline
-: WM_MENURBUTTONUP HEX: 0122 ; inline
-: WM_MENUDRAG HEX: 0123 ; inline
-: WM_MENUGETOBJECT HEX: 0124 ; inline
-: WM_UNINITMENUPOPUP HEX: 0125 ; inline
-: WM_MENUCOMMAND HEX: 0126 ; inline
-: WM_CHANGEUISTATE HEX: 0127 ; inline
-: WM_UPDATEUISTATE HEX: 0128 ; inline
-: WM_QUERYUISTATE HEX: 0129 ; inline
-: WM_CTLCOLORMSGBOX HEX: 0132 ; inline
-: WM_CTLCOLOREDIT HEX: 0133 ; inline
-: WM_CTLCOLORLISTBOX HEX: 0134 ; inline
-: WM_CTLCOLORBTN HEX: 0135 ; inline
-: WM_CTLCOLORDLG HEX: 0136 ; inline
-: WM_CTLCOLORSCROLLBAR HEX: 0137 ; inline
-: WM_CTLCOLORSTATIC HEX: 0138 ; inline
-: WM_MOUSEFIRST HEX: 0200 ; inline
-: WM_MOUSEMOVE HEX: 0200 ; inline
-: WM_LBUTTONDOWN HEX: 0201 ; inline
-: WM_LBUTTONUP HEX: 0202 ; inline
-: WM_LBUTTONDBLCLK HEX: 0203 ; inline
-: WM_RBUTTONDOWN HEX: 0204 ; inline
-: WM_RBUTTONUP HEX: 0205 ; inline
-: WM_RBUTTONDBLCLK HEX: 0206 ; inline
-: WM_MBUTTONDOWN HEX: 0207 ; inline
-: WM_MBUTTONUP HEX: 0208 ; inline
-: WM_MBUTTONDBLCLK HEX: 0209 ; inline
-: WM_MOUSEWHEEL HEX: 020A ; inline
-: WM_XBUTTONDOWN HEX: 020B ; inline
-: WM_XBUTTONUP HEX: 020C ; inline
-: WM_XBUTTONDBLCLK HEX: 020D ; inline
-: WM_MOUSELAST_5 HEX: 020D ; inline
-: WM_MOUSELAST_4 HEX: 020A ; inline
-: WM_MOUSELAST_PRE_4 HEX: 0209 ; inline
-: WM_PARENTNOTIFY HEX: 0210 ; inline
-: WM_ENTERMENULOOP HEX: 0211 ; inline
-: WM_EXITMENULOOP HEX: 0212 ; inline
-: WM_NEXTMENU HEX: 0213 ; inline
-: WM_SIZING HEX: 0214 ; inline
-: WM_CAPTURECHANGED HEX: 0215 ; inline
-: WM_MOVING HEX: 0216 ; inline
-: WM_POWERBROADCAST HEX: 0218 ; inline
-: WM_DEVICECHANGE HEX: 0219 ; inline
-: WM_MDICREATE HEX: 0220 ; inline
-: WM_MDIDESTROY HEX: 0221 ; inline
-: WM_MDIACTIVATE HEX: 0222 ; inline
-: WM_MDIRESTORE HEX: 0223 ; inline
-: WM_MDINEXT HEX: 0224 ; inline
-: WM_MDIMAXIMIZE HEX: 0225 ; inline
-: WM_MDITILE HEX: 0226 ; inline
-: WM_MDICASCADE HEX: 0227 ; inline
-: WM_MDIICONARRANGE HEX: 0228 ; inline
-: WM_MDIGETACTIVE HEX: 0229 ; inline
-: WM_MDISETMENU HEX: 0230 ; inline
-: WM_ENTERSIZEMOVE HEX: 0231 ; inline
-: WM_EXITSIZEMOVE HEX: 0232 ; inline
-: WM_DROPFILES HEX: 0233 ; inline
-: WM_MDIREFRESHMENU HEX: 0234 ; inline
-: WM_IME_SETCONTEXT HEX: 0281 ; inline
-: WM_IME_NOTIFY HEX: 0282 ; inline
-: WM_IME_CONTROL HEX: 0283 ; inline
-: WM_IME_COMPOSITIONFULL HEX: 0284 ; inline
-: WM_IME_SELECT HEX: 0285 ; inline
-: WM_IME_CHAR HEX: 0286 ; inline
-: WM_IME_REQUEST HEX: 0288 ; inline
-: WM_IME_KEYDOWN HEX: 0290 ; inline
-: WM_IME_KEYUP HEX: 0291 ; inline
-: WM_MOUSEHOVER HEX: 02A1 ; inline
-: WM_MOUSELEAVE HEX: 02A3 ; inline
-: WM_NCMOUSEHOVER HEX: 02A0 ; inline
-: WM_NCMOUSELEAVE HEX: 02A2 ; inline
-: WM_WTSSESSION_CHANGE HEX: 02B1 ; inline
-: WM_TABLET_FIRST HEX: 02c0 ; inline
-: WM_TABLET_LAST HEX: 02df ; inline
-: WM_CUT HEX: 0300 ; inline
-: WM_COPY HEX: 0301 ; inline
-: WM_PASTE HEX: 0302 ; inline
-: WM_CLEAR HEX: 0303 ; inline
-: WM_UNDO HEX: 0304 ; inline
-: WM_RENDERFORMAT HEX: 0305 ; inline
-: WM_RENDERALLFORMATS HEX: 0306 ; inline
-: WM_DESTROYCLIPBOARD HEX: 0307 ; inline
-: WM_DRAWCLIPBOARD HEX: 0308 ; inline
-: WM_PAINTCLIPBOARD HEX: 0309 ; inline
-: WM_VSCROLLCLIPBOARD HEX: 030A ; inline
-: WM_SIZECLIPBOARD HEX: 030B ; inline
-: WM_ASKCBFORMATNAME HEX: 030C ; inline
-: WM_CHANGECBCHAIN HEX: 030D ; inline
-: WM_HSCROLLCLIPBOARD HEX: 030E ; inline
-: WM_QUERYNEWPALETTE HEX: 030F ; inline
-: WM_PALETTEISCHANGING HEX: 0310 ; inline
-: WM_PALETTECHANGED HEX: 0311 ; inline
-: WM_HOTKEY HEX: 0312 ; inline
-: WM_PRINT HEX: 0317 ; inline
-: WM_PRINTCLIENT HEX: 0318 ; inline
-: WM_APPCOMMAND HEX: 0319 ; inline
-: WM_THEMECHANGED HEX: 031A ; inline
-: WM_HANDHELDFIRST HEX: 0358 ; inline
-: WM_HANDHELDLAST HEX: 035F ; inline
-: WM_AFXFIRST HEX: 0360 ; inline
-: WM_AFXLAST HEX: 037F ; inline
-: WM_PENWINFIRST HEX: 0380 ; inline
-: WM_PENWINLAST HEX: 038F ; inline
-: WM_APP HEX: 8000 ; inline
-: WM_USER HEX: 0400 ; inline
-: EM_GETSEL HEX: 00B0 ; inline
-: EM_SETSEL HEX: 00B1 ; inline
-: EM_GETRECT HEX: 00B2 ; inline
-: EM_SETRECT HEX: 00B3 ; inline
-: EM_SETRECTNP HEX: 00B4 ; inline
-: EM_SCROLL HEX: 00B5 ; inline
-: EM_LINESCROLL HEX: 00B6 ; inline
-: EM_SCROLLCARET HEX: 00B7 ; inline
-: EM_GETMODIFY HEX: 00B8 ; inline
-: EM_SETMODIFY HEX: 00B9 ; inline
-: EM_GETLINECOUNT HEX: 00BA ; inline
-: EM_LINEINDEX HEX: 00BB ; inline
-: EM_SETHANDLE HEX: 00BC ; inline
-: EM_GETHANDLE HEX: 00BD ; inline
-: EM_GETTHUMB HEX: 00BE ; inline
-: EM_LINELENGTH HEX: 00C1 ; inline
-: EM_REPLACESEL HEX: 00C2 ; inline
-: EM_GETLINE HEX: 00C4 ; inline
-: EM_LIMITTEXT HEX: 00C5 ; inline
-: EM_CANUNDO HEX: 00C6 ; inline
-: EM_UNDO HEX: 00C7 ; inline
-: EM_FMTLINES HEX: 00C8 ; inline
-: EM_LINEFROMCHAR HEX: 00C9 ; inline
-: EM_SETTABSTOPS HEX: 00CB ; inline
-: EM_SETPASSWORDCHAR HEX: 00CC ; inline
-: EM_EMPTYUNDOBUFFER HEX: 00CD ; inline
-: EM_GETFIRSTVISIBLELINE HEX: 00CE ; inline
-: EM_SETREADONLY HEX: 00CF ; inline
-: EM_SETWORDBREAKPROC HEX: 00D0 ; inline
-: EM_GETWORDBREAKPROC HEX: 00D1 ; inline
-: EM_GETPASSWORDCHAR HEX: 00D2 ; inline
-: EM_SETMARGINS HEX: 00D3 ; inline
-: EM_GETMARGINS HEX: 00D4 ; inline
-: EM_SETLIMITTEXT EM_LIMITTEXT ; inline
-: EM_GETLIMITTEXT HEX: 00D5 ; inline
-: EM_POSFROMCHAR HEX: 00D6 ; inline
-: EM_CHARFROMPOS HEX: 00D7 ; inline
-: EM_SETIMESTATUS HEX: 00D8 ; inline
-: EM_GETIMESTATUS HEX: 00D9 ; inline
-: BM_GETCHECK HEX: 00F0 ; inline
-: BM_SETCHECK HEX: 00F1 ; inline
-: BM_GETSTATE HEX: 00F2 ; inline
-: BM_SETSTATE HEX: 00F3 ; inline
-: BM_SETSTYLE HEX: 00F4 ; inline
-: BM_CLICK HEX: 00F5 ; inline
-: BM_GETIMAGE HEX: 00F6 ; inline
-: BM_SETIMAGE HEX: 00F7 ; inline
-: STM_SETICON HEX: 0170 ; inline
-: STM_GETICON HEX: 0171 ; inline
-: STM_SETIMAGE HEX: 0172 ; inline
-: STM_GETIMAGE HEX: 0173 ; inline
-: STM_MSGMAX HEX: 0174 ; inline
-: DM_GETDEFID WM_USER ; inline
-: DM_SETDEFID  WM_USER 1 + ; inline
-: DM_REPOSITION WM_USER 2 + ; inline
-: LB_ADDSTRING HEX: 0180 ; inline
-: LB_INSERTSTRING HEX: 0181 ; inline
-: LB_DELETESTRING HEX: 0182 ; inline
-: LB_SELITEMRANGEEX HEX: 0183 ; inline
-: LB_RESETCONTENT HEX: 0184 ; inline
-: LB_SETSEL HEX: 0185 ; inline
-: LB_SETCURSEL HEX: 0186 ; inline
-: LB_GETSEL HEX: 0187 ; inline
-: LB_GETCURSEL HEX: 0188 ; inline
-: LB_GETTEXT HEX: 0189 ; inline
-: LB_GETTEXTLEN HEX: 018A ; inline
-: LB_GETCOUNT HEX: 018B ; inline
-: LB_SELECTSTRING HEX: 018C ; inline
-: LB_DIR HEX: 018D ; inline
-: LB_GETTOPINDEX HEX: 018E ; inline
-: LB_FINDSTRING HEX: 018F ; inline
-: LB_GETSELCOUNT HEX: 0190 ; inline
-: LB_GETSELITEMS HEX: 0191 ; inline
-: LB_SETTABSTOPS HEX: 0192 ; inline
-: LB_GETHORIZONTALEXTENT HEX: 0193 ; inline
-: LB_SETHORIZONTALEXTENT HEX: 0194 ; inline
-: LB_SETCOLUMNWIDTH HEX: 0195 ; inline
-: LB_ADDFILE HEX: 0196 ; inline
-: LB_SETTOPINDEX HEX: 0197 ; inline
-: LB_GETITEMRECT HEX: 0198 ; inline
-: LB_GETITEMDATA HEX: 0199 ; inline
-: LB_SETITEMDATA HEX: 019A ; inline
-: LB_SELITEMRANGE HEX: 019B ; inline
-: LB_SETANCHORINDEX HEX: 019C ; inline
-: LB_GETANCHORINDEX HEX: 019D ; inline
-: LB_SETCARETINDEX HEX: 019E ; inline
-: LB_GETCARETINDEX HEX: 019F ; inline
-: LB_SETITEMHEIGHT HEX: 01A0 ; inline
-: LB_GETITEMHEIGHT HEX: 01A1 ; inline
-: LB_FINDSTRINGEXACT HEX: 01A2 ; inline
-: LB_SETLOCALE HEX: 01A5 ; inline
-: LB_GETLOCALE HEX: 01A6 ; inline
-: LB_SETCOUNT HEX: 01A7 ; inline
-: LB_INITSTORAGE HEX: 01A8 ; inline
-: LB_ITEMFROMPOINT HEX: 01A9 ; inline
-: LB_MULTIPLEADDSTRING HEX: 01B1 ; inline
-: LB_GETLISTBOXINFO HEX: 01B2 ; inline
-: LB_MSGMAX_501 HEX: 01B3 ; inline
-: LB_MSGMAX_WCE4 HEX: 01B1 ; inline
-: LB_MSGMAX_4 HEX: 01B0 ; inline
-: LB_MSGMAX_PRE4 HEX: 01A8 ; inline
-: CB_GETEDITSEL HEX: 0140 ; inline
-: CB_LIMITTEXT HEX: 0141 ; inline
-: CB_SETEDITSEL HEX: 0142 ; inline
-: CB_ADDSTRING HEX: 0143 ; inline
-: CB_DELETESTRING HEX: 0144 ; inline
-: CB_DIR HEX: 0145 ; inline
-: CB_GETCOUNT HEX: 0146 ; inline
-: CB_GETCURSEL HEX: 0147 ; inline
-: CB_GETLBTEXT HEX: 0148 ; inline
-: CB_GETLBTEXTLEN HEX: 0149 ; inline
-: CB_INSERTSTRING HEX: 014A ; inline
-: CB_RESETCONTENT HEX: 014B ; inline
-: CB_FINDSTRING HEX: 014C ; inline
-: CB_SELECTSTRING HEX: 014D ; inline
-: CB_SETCURSEL HEX: 014E ; inline
-: CB_SHOWDROPDOWN HEX: 014F ; inline
-: CB_GETITEMDATA HEX: 0150 ; inline
-: CB_SETITEMDATA HEX: 0151 ; inline
-: CB_GETDROPPEDCONTROLRECT HEX: 0152 ; inline
-: CB_SETITEMHEIGHT HEX: 0153 ; inline
-: CB_GETITEMHEIGHT HEX: 0154 ; inline
-: CB_SETEXTENDEDUI HEX: 0155 ; inline
-: CB_GETEXTENDEDUI HEX: 0156 ; inline
-: CB_GETDROPPEDSTATE HEX: 0157 ; inline
-: CB_FINDSTRINGEXACT HEX: 0158 ; inline
-: CB_SETLOCALE HEX: 0159 ; inline
-: CB_GETLOCALE HEX: 015A ; inline
-: CB_GETTOPINDEX HEX: 015B ; inline
-: CB_SETTOPINDEX HEX: 015C ; inline
-: CB_GETHORIZONTALEXTENT HEX: 015d ; inline
-: CB_SETHORIZONTALEXTENT HEX: 015e ; inline
-: CB_GETDROPPEDWIDTH HEX: 015f ; inline
-: CB_SETDROPPEDWIDTH HEX: 0160 ; inline
-: CB_INITSTORAGE HEX: 0161 ; inline
-: CB_MULTIPLEADDSTRING HEX: 0163 ; inline
-: CB_GETCOMBOBOXINFO HEX: 0164 ; inline
-: CB_MSGMAX_501 HEX: 0165 ; inline
-: CB_MSGMAX_WCE400 HEX: 0163 ; inline
-: CB_MSGMAX_400 HEX: 0162 ; inline
-: CB_MSGMAX_PRE400 HEX: 015B ; inline
-: SBM_SETPOS HEX: 00E0 ; inline
-: SBM_GETPOS HEX: 00E1 ; inline
-: SBM_SETRANGE HEX: 00E2 ; inline
-: SBM_SETRANGEREDRAW HEX: 00E6 ; inline
-: SBM_GETRANGE HEX: 00E3 ; inline
-: SBM_ENABLE_ARROWS HEX: 00E4 ; inline
-: SBM_SETSCROLLINFO HEX: 00E9 ; inline
-: SBM_GETSCROLLINFO HEX: 00EA ; inline
-: SBM_GETSCROLLBARINFO HEX: 00EB ; inline
-: LVM_FIRST HEX: 1000 ; inline ! ListView messages
-: TV_FIRST HEX: 1100 ; inline ! TreeView messages
-: HDM_FIRST HEX: 1200 ; inline ! Header messages
-: TCM_FIRST HEX: 1300 ; inline ! Tab control messages
-: PGM_FIRST HEX: 1400 ; inline ! Pager control messages
-: ECM_FIRST HEX: 1500 ; inline ! Edit control messages
-: BCM_FIRST HEX: 1600 ; inline ! Button control messages
-: CBM_FIRST HEX: 1700 ; inline ! Combobox control messages
-: CCM_FIRST HEX: 2000 ; inline ! Common control shared messages
-: CCM_LAST CCM_FIRST HEX: 0200 + ; inline
-: CCM_SETBKCOLOR CCM_FIRST  1 +  ; inline
-: CCM_SETCOLORSCHEME CCM_FIRST  2 +  ; inline
-: CCM_GETCOLORSCHEME CCM_FIRST  3 +  ; inline
-: CCM_GETDROPTARGET CCM_FIRST  4 +  ; inline
-: CCM_SETUNICODEFORMAT CCM_FIRST  5 +  ; inline
-: CCM_GETUNICODEFORMAT CCM_FIRST  6 +  ; inline
-: CCM_SETVERSION CCM_FIRST  7 +  ; inline
-: CCM_GETVERSION CCM_FIRST  8 +  ; inline
-: CCM_SETNOTIFYWINDOW CCM_FIRST  9 +  ; inline
-: CCM_SETWINDOWTHEME CCM_FIRST  HEX: b +  ; inline
-: CCM_DPISCALE CCM_FIRST  HEX: c +  ; inline
-: HDM_GETITEMCOUNT HDM_FIRST  0 +  ; inline
-: HDM_INSERTITEMA HDM_FIRST  1 +  ; inline
-: HDM_INSERTITEMW HDM_FIRST  10 +  ; inline
-: HDM_DELETEITEM HDM_FIRST  2 +  ; inline
-: HDM_GETITEMA HDM_FIRST  3 +  ; inline
-: HDM_GETITEMW HDM_FIRST  11 +  ; inline
-: HDM_SETITEMA HDM_FIRST  4 +  ; inline
-: HDM_SETITEMW HDM_FIRST  12 +  ; inline
-: HDM_LAYOUT HDM_FIRST  5 +  ; inline
-: HDM_HITTEST HDM_FIRST  6 +  ; inline
-: HDM_GETITEMRECT HDM_FIRST  7 +  ; inline
-: HDM_SETIMAGELIST HDM_FIRST  8 +  ; inline
-: HDM_GETIMAGELIST HDM_FIRST  9 +  ; inline
-: HDM_ORDERTOINDEX HDM_FIRST  15 +  ; inline
-: HDM_CREATEDRAGIMAGE HDM_FIRST  16 +  ; inline
-: HDM_GETORDERARRAY HDM_FIRST  17 +  ; inline
-: HDM_SETORDERARRAY HDM_FIRST  18 +  ; inline
-: HDM_SETHOTDIVIDER HDM_FIRST  19 +  ; inline
-: HDM_SETBITMAPMARGIN HDM_FIRST  20 +  ; inline
-: HDM_GETBITMAPMARGIN HDM_FIRST  21 +  ; inline
-: HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline
-: HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline
-: HDM_SETFILTERCHANGETIMEOUT HDM_FIRST 22 + ; inline
-: HDM_EDITFILTER HDM_FIRST 23 + ; inline
-: HDM_CLEARFILTER HDM_FIRST 24 + ; inline
-: TB_ENABLEBUTTON WM_USER 1 + ; inline
-: TB_CHECKBUTTON WM_USER 2 + ; inline
-: TB_PRESSBUTTON WM_USER 3 + ; inline
-: TB_HIDEBUTTON WM_USER  4 +  ; inline
-: TB_INDETERMINATE WM_USER  5 +  ; inline
-: TB_MARKBUTTON WM_USER  6 +  ; inline
-: TB_ISBUTTONENABLED WM_USER  9 +  ; inline
-: TB_ISBUTTONCHECKED WM_USER  10 +  ; inline
-: TB_ISBUTTONPRESSED WM_USER  11 +  ; inline
-: TB_ISBUTTONHIDDEN WM_USER  12 +  ; inline
-: TB_ISBUTTONINDETERMINATE WM_USER  13 +  ; inline
-: TB_ISBUTTONHIGHLIGHTED WM_USER  14 +  ; inline
-: TB_SETSTATE WM_USER  17 +  ; inline
-: TB_GETSTATE WM_USER  18 +  ; inline
-: TB_ADDBITMAP WM_USER  19 +  ; inline
-: TB_ADDBUTTONSA WM_USER  20 +  ; inline
-: TB_INSERTBUTTONA WM_USER  21 +  ; inline
-: TB_ADDBUTTONS WM_USER  20 +  ; inline
-: TB_INSERTBUTTON WM_USER  21 +  ; inline
-: TB_DELETEBUTTON WM_USER  22 +  ; inline
-: TB_GETBUTTON WM_USER  23 +  ; inline
-: TB_BUTTONCOUNT WM_USER  24 +  ; inline
-: TB_COMMANDTOINDEX WM_USER  25 +  ; inline
-: TB_SAVERESTOREA WM_USER  26 +  ; inline
-: TB_SAVERESTOREW WM_USER  76 +  ; inline
-: TB_CUSTOMIZE WM_USER  27 +  ; inline
-: TB_ADDSTRINGA WM_USER  28 +  ; inline
-: TB_ADDSTRINGW WM_USER  77 +  ; inline
-: TB_GETITEMRECT WM_USER  29 +  ; inline
-: TB_BUTTONSTRUCTSIZE WM_USER  30 +  ; inline
-: TB_SETBUTTONSIZE WM_USER  31 +  ; inline
-: TB_SETBITMAPSIZE WM_USER  32 +  ; inline
-: TB_AUTOSIZE WM_USER  33 +  ; inline
-: TB_GETTOOLTIPS WM_USER  35 +  ; inline
-: TB_SETTOOLTIPS WM_USER  36 +  ; inline
-: TB_SETPARENT WM_USER  37 +  ; inline
-: TB_SETROWS WM_USER  39 +  ; inline
-: TB_GETROWS WM_USER  40 +  ; inline
-: TB_SETCMDID WM_USER  42 +  ; inline
-: TB_CHANGEBITMAP WM_USER  43 +  ; inline
-: TB_GETBITMAP WM_USER  44 +  ; inline
-: TB_GETBUTTONTEXTA WM_USER  45 +  ; inline
-: TB_GETBUTTONTEXTW WM_USER  75 +  ; inline
-: TB_REPLACEBITMAP WM_USER  46 +  ; inline
-: TB_SETINDENT WM_USER  47 +  ; inline
-: TB_SETIMAGELIST WM_USER  48 +  ; inline
-: TB_GETIMAGELIST WM_USER  49 +  ; inline
-: TB_LOADIMAGES WM_USER  50 +  ; inline
-: TB_GETRECT WM_USER  51 +  ; inline
-: TB_SETHOTIMAGELIST WM_USER  52 +  ; inline
-: TB_GETHOTIMAGELIST WM_USER  53 +  ; inline
-: TB_SETDISABLEDIMAGELIST WM_USER  54 +  ; inline
-: TB_GETDISABLEDIMAGELIST WM_USER  55 +  ; inline
-: TB_SETSTYLE WM_USER  56 +  ; inline
-: TB_GETSTYLE WM_USER  57 +  ; inline
-: TB_GETBUTTONSIZE WM_USER  58 +  ; inline
-: TB_SETBUTTONWIDTH WM_USER  59 +  ; inline
-: TB_SETMAXTEXTROWS WM_USER  60 +  ; inline
-: TB_GETTEXTROWS WM_USER  61 +  ; inline
-: TB_GETOBJECT WM_USER  62 +  ; inline
-: TB_GETHOTITEM WM_USER  71 +  ; inline
-: TB_SETHOTITEM WM_USER  72 +  ; inline
-: TB_SETANCHORHIGHLIGHT WM_USER  73 +  ; inline
-: TB_GETANCHORHIGHLIGHT WM_USER  74 +  ; inline
-: TB_MAPACCELERATORA WM_USER  78 +  ; inline
-: TB_GETINSERTMARK WM_USER  79 +  ; inline
-: TB_SETINSERTMARK WM_USER  80 +  ; inline
-: TB_INSERTMARKHITTEST WM_USER  81 +  ; inline
-: TB_MOVEBUTTON WM_USER  82 +  ; inline
-: TB_GETMAXSIZE WM_USER  83 +  ; inline
-: TB_SETEXTENDEDSTYLE WM_USER  84 +  ; inline
-: TB_GETEXTENDEDSTYLE WM_USER  85 +  ; inline
-: TB_GETPADDING WM_USER  86 +  ; inline
-: TB_SETPADDING WM_USER  87 +  ; inline
-: TB_SETINSERTMARKCOLOR WM_USER  88 +  ; inline
-: TB_GETINSERTMARKCOLOR WM_USER  89 +  ; inline
-: TB_SETCOLORSCHEME CCM_SETCOLORSCHEME ; inline
-: TB_GETCOLORSCHEME CCM_GETCOLORSCHEME ; inline
-: TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline
-: TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline
-: TB_MAPACCELERATORW WM_USER  90 +  ; inline
-: TB_GETBITMAPFLAGS WM_USER  41 +  ; inline
-: TB_GETBUTTONINFOW WM_USER  63 +  ; inline
-: TB_SETBUTTONINFOW WM_USER  64 +  ; inline
-: TB_GETBUTTONINFOA WM_USER  65 +  ; inline
-: TB_SETBUTTONINFOA WM_USER  66 +  ; inline
-: TB_INSERTBUTTONW WM_USER  67 +  ; inline
-: TB_ADDBUTTONSW WM_USER  68 +  ; inline
-: TB_HITTEST WM_USER  69 +  ; inline
-: TB_SETDRAWTEXTFLAGS WM_USER  70 +  ; inline
-: TB_GETSTRINGW WM_USER  91 +  ; inline
-: TB_GETSTRINGA WM_USER  92 +  ; inline
-: TB_GETMETRICS WM_USER  101 +  ; inline
-: TB_SETMETRICS WM_USER  102 +  ; inline
-: TB_SETWINDOWTHEME CCM_SETWINDOWTHEME ; inline
-: RB_INSERTBANDA WM_USER  1 +  ; inline
-: RB_DELETEBAND WM_USER  2 +  ; inline
-: RB_GETBARINFO WM_USER  3 +  ; inline
-: RB_SETBARINFO WM_USER  4 +  ; inline
-: RB_GETBANDINFO WM_USER  5 +  ; inline
-: RB_SETBANDINFOA WM_USER  6 +  ; inline
-: RB_SETPARENT WM_USER  7 +  ; inline
-: RB_HITTEST WM_USER  8 +  ; inline
-: RB_GETRECT WM_USER  9 +  ; inline
-: RB_INSERTBANDW WM_USER  10 +  ; inline
-: RB_SETBANDINFOW WM_USER  11 +  ; inline
-: RB_GETBANDCOUNT WM_USER  12 +  ; inline
-: RB_GETROWCOUNT WM_USER  13 +  ; inline
-: RB_GETROWHEIGHT WM_USER  14 +  ; inline
-: RB_IDTOINDEX WM_USER  16 +  ; inline
-: RB_GETTOOLTIPS WM_USER  17 +  ; inline
-: RB_SETTOOLTIPS WM_USER  18 +  ; inline
-: RB_SETBKCOLOR WM_USER  19 +  ; inline
-: RB_GETBKCOLOR WM_USER  20 +  ; inline
-: RB_SETTEXTCOLOR WM_USER  21 +  ; inline
-: RB_GETTEXTCOLOR WM_USER  22 +  ; inline
-: RB_SIZETORECT WM_USER  23 +  ; inline
-: RB_SETCOLORSCHEME CCM_SETCOLORSCHEME ; inline
-: RB_GETCOLORSCHEME CCM_GETCOLORSCHEME ; inline
-: RB_BEGINDRAG WM_USER  24 +  ; inline
-: RB_ENDDRAG WM_USER  25 +  ; inline
-: RB_DRAGMOVE WM_USER  26 +  ; inline
-: RB_GETBARHEIGHT WM_USER  27 +  ; inline
-: RB_GETBANDINFOW WM_USER  28 +  ; inline
-: RB_GETBANDINFOA WM_USER  29 +  ; inline
-: RB_MINIMIZEBAND WM_USER  30 +  ; inline
-: RB_MAXIMIZEBAND WM_USER  31 +  ; inline
-: RB_GETDROPTARGET CCM_GETDROPTARGET ; inline
-: RB_GETBANDBORDERS WM_USER  34 +  ; inline
-: RB_SHOWBAND WM_USER  35 +  ; inline
-: RB_SETPALETTE WM_USER  37 +  ; inline
-: RB_GETPALETTE WM_USER  38 +  ; inline
-: RB_MOVEBAND WM_USER  39 +  ; inline
-: RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline
-: RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline
-: RB_GETBANDMARGINS WM_USER  40 +  ; inline
-: RB_SETWINDOWTHEME CCM_SETWINDOWTHEME ; inline
-: RB_PUSHCHEVRON WM_USER  43 +  ; inline
-: TTM_ACTIVATE WM_USER  1 +  ; inline
-: TTM_SETDELAYTIME WM_USER  3 +  ; inline
-: TTM_ADDTOOLA WM_USER  4 +  ; inline
-: TTM_ADDTOOLW WM_USER  50 +  ; inline
-: TTM_DELTOOLA WM_USER  5 +  ; inline
-: TTM_DELTOOLW WM_USER  51 +  ; inline
-: TTM_NEWTOOLRECTA WM_USER  6 +  ; inline
-: TTM_NEWTOOLRECTW WM_USER  52 +  ; inline
-: TTM_RELAYEVENT WM_USER  7 +  ; inline
-: TTM_GETTOOLINFOA WM_USER  8 +  ; inline
-: TTM_GETTOOLINFOW WM_USER  53 +  ; inline
-: TTM_SETTOOLINFOA WM_USER  9 +  ; inline
-: TTM_SETTOOLINFOW WM_USER  54 +  ; inline
-: TTM_HITTESTA WM_USER 10 + ; inline
-: TTM_HITTESTW WM_USER 55 + ; inline
-: TTM_GETTEXTA WM_USER 11 + ; inline
-: TTM_GETTEXTW WM_USER 56 + ; inline
-: TTM_UPDATETIPTEXTA WM_USER 12 + ; inline
-: TTM_UPDATETIPTEXTW WM_USER 57 + ; inline
-: TTM_GETTOOLCOUNT WM_USER 13 + ; inline
-: TTM_ENUMTOOLSA WM_USER 14 + ; inline
-: TTM_ENUMTOOLSW WM_USER 58 + ; inline
-: TTM_GETCURRENTTOOLA WM_USER  15 +  ; inline
-: TTM_GETCURRENTTOOLW WM_USER  59 +  ; inline
-: TTM_WINDOWFROMPOINT WM_USER  16 +  ; inline
-: TTM_TRACKACTIVATE WM_USER  17 +  ; inline
-: TTM_TRACKPOSITION WM_USER  18 +  ; inline
-: TTM_SETTIPBKCOLOR WM_USER  19 +  ; inline
-: TTM_SETTIPTEXTCOLOR WM_USER  20 +  ; inline
-: TTM_GETDELAYTIME WM_USER  21 +  ; inline
-: TTM_GETTIPBKCOLOR WM_USER  22 +  ; inline
-: TTM_GETTIPTEXTCOLOR WM_USER  23 +  ; inline
-: TTM_SETMAXTIPWIDTH WM_USER  24 +  ; inline
-: TTM_GETMAXTIPWIDTH WM_USER  25 +  ; inline
-: TTM_SETMARGIN WM_USER  26 +  ; inline
-: TTM_GETMARGIN WM_USER  27 +  ; inline
-: TTM_POP WM_USER  28 +  ; inline
-: TTM_UPDATE WM_USER  29 +  ; inline
-: TTM_GETBUBBLESIZE WM_USER  30 +  ; inline
-: TTM_ADJUSTRECT WM_USER  31 +  ; inline
-: TTM_SETTITLEA WM_USER  32 +  ; inline
-: TTM_SETTITLEW WM_USER  33 +  ; inline
-: TTM_POPUP WM_USER  34 +  ; inline
-: TTM_GETTITLE WM_USER  35 +  ; inline
-: TTM_SETWINDOWTHEME CCM_SETWINDOWTHEME ; inline
-: SB_SETTEXTA WM_USER 1+  ; inline
-: SB_SETTEXTW WM_USER 11 +  ; inline
-: SB_GETTEXTA WM_USER 2 +  ; inline
-: SB_GETTEXTW WM_USER 13 +  ; inline
-: SB_GETTEXTLENGTHA WM_USER 3 +  ; inline
-: SB_GETTEXTLENGTHW WM_USER 12 +  ; inline
-: SB_SETPARTS WM_USER 4 +  ; inline
-: SB_GETPARTS WM_USER 6 +  ; inline
-: SB_GETBORDERS WM_USER 7 +  ; inline
-: SB_SETMINHEIGHT WM_USER 8 +  ; inline
-: SB_SIMPLE WM_USER 9 +  ; inline
-: SB_GETRECT WM_USER 10 +  ; inline
-: SB_ISSIMPLE WM_USER 14 +  ; inline
-: SB_SETICON WM_USER 15 +  ; inline
-: SB_SETTIPTEXTA WM_USER 16 +  ; inline
-: SB_SETTIPTEXTW WM_USER 17 +  ; inline
-: SB_GETTIPTEXTA WM_USER 18 +  ; inline
-: SB_GETTIPTEXTW WM_USER 19 +  ; inline
-: SB_GETICON WM_USER 20 +  ; inline
-: SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline
-: SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline
-: SB_SETBKCOLOR CCM_SETBKCOLOR ; inline
-: SB_SIMPLEID HEX: 00ff ; inline
-: TBM_GETPOS WM_USER ; inline
-: TBM_GETRANGEMIN WM_USER 1 +  ; inline
-: TBM_GETRANGEMAX WM_USER 2 +  ; inline
-: TBM_GETTIC WM_USER 3 +  ; inline
-: TBM_SETTIC WM_USER 4 +  ; inline
-: TBM_SETPOS WM_USER 5 +  ; inline
-: TBM_SETRANGE WM_USER 6 +  ; inline
-: TBM_SETRANGEMIN WM_USER 7 +  ; inline
-: TBM_SETRANGEMAX WM_USER 8 +  ; inline
-: TBM_CLEARTICS WM_USER 9 +  ; inline
-: TBM_SETSEL WM_USER 10 +  ; inline
-: TBM_SETSELSTART WM_USER 11 +  ; inline
-: TBM_SETSELEND WM_USER 12 +  ; inline
-: TBM_GETPTICS WM_USER 14 +  ; inline
-: TBM_GETTICPOS WM_USER 15 +  ; inline
-: TBM_GETNUMTICS WM_USER 16 +  ; inline
-: TBM_GETSELSTART WM_USER 17 +  ; inline
-: TBM_GETSELEND WM_USER 18 +  ; inline
-: TBM_CLEARSEL WM_USER 19 +  ; inline
-: TBM_SETTICFREQ WM_USER 20 +  ; inline
-: TBM_SETPAGESIZE WM_USER 21 +  ; inline
-: TBM_GETPAGESIZE WM_USER 22 +  ; inline
-: TBM_SETLINESIZE WM_USER 23 +  ; inline
-: TBM_GETLINESIZE WM_USER 24 +  ; inline
-: TBM_GETTHUMBRECT WM_USER 25 +  ; inline
-: TBM_GETCHANNELRECT WM_USER 26 +  ; inline
-: TBM_SETTHUMBLENGTH WM_USER 27 +  ; inline
-: TBM_GETTHUMBLENGTH WM_USER 28 +  ; inline
-: TBM_SETTOOLTIPS WM_USER 29 +  ; inline
-: TBM_GETTOOLTIPS WM_USER 30 +  ; inline
-: TBM_SETTIPSIDE WM_USER 31 +  ; inline
-: TBM_SETBUDDY WM_USER 32 +  ; inline
-: TBM_GETBUDDY WM_USER 33 +  ; inline
-: TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline
-: TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline
-: DL_BEGINDRAG WM_USER 133 +  ; inline
-: DL_DRAGGING WM_USER 134 +  ; inline
-: DL_DROPPED WM_USER 135 +  ; inline
-: DL_CANCELDRAG WM_USER 136 +  ; inline
-: UDM_SETRANGE WM_USER 101 +  ; inline
-: UDM_GETRANGE WM_USER 102 +  ; inline
-: UDM_SETPOS WM_USER 103 +  ; inline
-: UDM_GETPOS WM_USER 104 +  ; inline
-: UDM_SETBUDDY WM_USER 105 +  ; inline
-: UDM_GETBUDDY WM_USER 106 +  ; inline
-: UDM_SETACCEL WM_USER 107 +  ; inline
-: UDM_GETACCEL WM_USER 108 +  ; inline
-: UDM_SETBASE WM_USER 109 +  ; inline
-: UDM_GETBASE WM_USER 110 +  ; inline
-: UDM_SETRANGE32 WM_USER 111 +  ; inline
-: UDM_GETRANGE32 WM_USER 112 +  ; inline
-: UDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline
-: UDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline
-: UDM_SETPOS32 WM_USER 113 +  ; inline
-: UDM_GETPOS32 WM_USER 114 +  ; inline
-: PBM_SETRANGE WM_USER 1 +  ; inline
-: PBM_SETPOS WM_USER 2 +  ; inline
-: PBM_DELTAPOS WM_USER 3 +  ; inline
-: PBM_SETSTEP WM_USER 4 +  ; inline
-: PBM_STEPIT WM_USER 5 +  ; inline
-: PBM_SETRANGE32 WM_USER 6 +  ; inline
-: PBM_GETRANGE WM_USER 7 +  ; inline
-: PBM_GETPOS WM_USER 8 +  ; inline
-: PBM_SETBARCOLOR WM_USER 9 +  ; inline
-: PBM_SETBKCOLOR CCM_SETBKCOLOR ; inline
-: HKM_SETHOTKEY WM_USER 1 +  ; inline
-: HKM_GETHOTKEY WM_USER 2 +  ; inline
-: HKM_SETRULES WM_USER 3 +  ; inline
-: LVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline
-: LVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline
-: LVM_GETBKCOLOR LVM_FIRST  0 +  ; inline
-: LVM_SETBKCOLOR LVM_FIRST  1 +  ; inline
-: LVM_GETIMAGELIST LVM_FIRST  2 +  ; inline
-: LVM_SETIMAGELIST LVM_FIRST  3 +  ; inline
-: LVM_GETITEMCOUNT LVM_FIRST  4 +  ; inline
-: LVM_GETITEMA LVM_FIRST  5 +  ; inline
-: LVM_GETITEMW LVM_FIRST  75 +  ; inline
-: LVM_SETITEMA LVM_FIRST  6 +  ; inline
-: LVM_SETITEMW LVM_FIRST  76 +  ; inline
-: LVM_INSERTITEMA LVM_FIRST  7 +  ; inline
-: LVM_INSERTITEMW LVM_FIRST  77 +  ; inline
-: LVM_DELETEITEM LVM_FIRST  8 +  ; inline
-: LVM_DELETEALLITEMS LVM_FIRST  9 +  ; inline
-: LVM_GETCALLBACKMASK LVM_FIRST  10 +  ; inline
-: LVM_SETCALLBACKMASK LVM_FIRST  11 +  ; inline
-: LVM_FINDITEMA LVM_FIRST  13 +  ; inline
-: LVM_FINDITEMW LVM_FIRST  83 +  ; inline
-: LVM_GETITEMRECT LVM_FIRST  14 +  ; inline
-: LVM_SETITEMPOSITION LVM_FIRST  15 +  ; inline
-: LVM_GETITEMPOSITION LVM_FIRST  16 +  ; inline
-: LVM_GETSTRINGWIDTHA LVM_FIRST  17 +  ; inline
-: LVM_GETSTRINGWIDTHW LVM_FIRST  87 +  ; inline
-: LVM_HITTEST LVM_FIRST  18 +  ; inline
-: LVM_ENSUREVISIBLE LVM_FIRST  19 +  ; inline
-: LVM_SCROLL LVM_FIRST  20 +  ; inline
-: LVM_REDRAWITEMS LVM_FIRST  21 +  ; inline
-: LVM_ARRANGE LVM_FIRST  22 +  ; inline
-: LVM_EDITLABELA LVM_FIRST  23 +  ; inline
-: LVM_EDITLABELW LVM_FIRST  118 +  ; inline
-: LVM_GETEDITCONTROL LVM_FIRST  24 +  ; inline
-: LVM_GETCOLUMNA LVM_FIRST  25 +  ; inline
-: LVM_GETCOLUMNW LVM_FIRST  95 +  ; inline
-: LVM_SETCOLUMNA LVM_FIRST  26 +  ; inline
-: LVM_SETCOLUMNW LVM_FIRST  96 +  ; inline
-: LVM_INSERTCOLUMNA LVM_FIRST  27 +  ; inline
-: LVM_INSERTCOLUMNW LVM_FIRST  97 +  ; inline
-: LVM_DELETECOLUMN LVM_FIRST  28 +  ; inline
-: LVM_GETCOLUMNWIDTH LVM_FIRST  29 +  ; inline
-: LVM_SETCOLUMNWIDTH LVM_FIRST  30 +  ; inline
-: LVM_CREATEDRAGIMAGE LVM_FIRST  33 +  ; inline
-: LVM_GETVIEWRECT LVM_FIRST  34 +  ; inline
-: LVM_GETTEXTCOLOR LVM_FIRST  35 +  ; inline
-: LVM_SETTEXTCOLOR LVM_FIRST  36 +  ; inline
-: LVM_GETTEXTBKCOLOR LVM_FIRST  37 +  ; inline
-: LVM_SETTEXTBKCOLOR LVM_FIRST  38 +  ; inline
-: LVM_GETTOPINDEX LVM_FIRST  39 +  ; inline
-: LVM_GETCOUNTPERPAGE LVM_FIRST  40 +  ; inline
-: LVM_GETORIGIN LVM_FIRST  41 +  ; inline
-: LVM_UPDATE LVM_FIRST  42 +  ; inline
-: LVM_SETITEMSTATE LVM_FIRST  43 +  ; inline
-: LVM_GETITEMSTATE LVM_FIRST  44 +  ; inline
-: LVM_GETITEMTEXTA LVM_FIRST  45 +  ; inline
-: LVM_GETITEMTEXTW LVM_FIRST  115 +  ; inline
-: LVM_SETITEMTEXTA LVM_FIRST  46 +  ; inline
-: LVM_SETITEMTEXTW LVM_FIRST  116 +  ; inline
-: LVM_SETITEMCOUNT LVM_FIRST  47 +  ; inline
-: LVM_SORTITEMS LVM_FIRST  48 +  ; inline
-: LVM_SETITEMPOSITION32 LVM_FIRST  49 +  ; inline
-: LVM_GETSELECTEDCOUNT LVM_FIRST  50 +  ; inline
-: LVM_GETITEMSPACING LVM_FIRST  51 +  ; inline
-: LVM_GETISEARCHSTRINGA LVM_FIRST  52 +  ; inline
-: LVM_GETISEARCHSTRINGW LVM_FIRST  117 +  ; inline
-: LVM_SETICONSPACING LVM_FIRST  53 +  ; inline
-: LVM_SETEXTENDEDLISTVIEWSTYLE LVM_FIRST  54 +  ; inline
-: LVM_GETEXTENDEDLISTVIEWSTYLE LVM_FIRST  55 +  ; inline
-: LVM_GETSUBITEMRECT LVM_FIRST  56 +  ; inline
-: LVM_SUBITEMHITTEST LVM_FIRST  57 +  ; inline
-: LVM_SETCOLUMNORDERARRAY LVM_FIRST  58 +  ; inline
-: LVM_GETCOLUMNORDERARRAY LVM_FIRST  59 +  ; inline
-: LVM_SETHOTITEM LVM_FIRST  60 +  ; inline
-: LVM_GETHOTITEM LVM_FIRST  61 +  ; inline
-: LVM_SETHOTCURSOR LVM_FIRST  62 +  ; inline
-: LVM_GETHOTCURSOR LVM_FIRST  63 +  ; inline
-: LVM_APPROXIMATEVIEWRECT LVM_FIRST  64 +  ; inline
-: LVM_SETWORKAREAS LVM_FIRST  65 +  ; inline
-: LVM_GETWORKAREAS LVM_FIRST  70 +  ; inline
-: LVM_GETNUMBEROFWORKAREAS LVM_FIRST  73 +  ; inline
-: LVM_GETSELECTIONMARK LVM_FIRST  66 +  ; inline
-: LVM_SETSELECTIONMARK LVM_FIRST  67 +  ; inline
-: LVM_SETHOVERTIME LVM_FIRST  71 +  ; inline
-: LVM_GETHOVERTIME LVM_FIRST  72 +  ; inline
-: LVM_SETTOOLTIPS LVM_FIRST  74 +  ; inline
-: LVM_GETTOOLTIPS LVM_FIRST  78 +  ; inline
-: LVM_SORTITEMSEX LVM_FIRST  81 +  ; inline
-: LVM_SETBKIMAGEA LVM_FIRST  68 +  ; inline
-: LVM_SETBKIMAGEW LVM_FIRST  138 +  ; inline
-: LVM_GETBKIMAGEA LVM_FIRST  69 +  ; inline
-: LVM_GETBKIMAGEW LVM_FIRST  139 +  ; inline
-: LVM_SETSELECTEDCOLUMN LVM_FIRST  140 +  ; inline
-: LVM_SETTILEWIDTH LVM_FIRST  141 +  ; inline
-: LVM_SETVIEW LVM_FIRST  142 +  ; inline
-: LVM_GETVIEW LVM_FIRST  143 +  ; inline
-: LVM_INSERTGROUP LVM_FIRST  145 +  ; inline
-: LVM_SETGROUPINFO LVM_FIRST  147 +  ; inline
-: LVM_GETGROUPINFO LVM_FIRST  149 +  ; inline
-: LVM_REMOVEGROUP LVM_FIRST  150 +  ; inline
-: LVM_MOVEGROUP LVM_FIRST  151 +  ; inline
-: LVM_MOVEITEMTOGROUP LVM_FIRST  154 +  ; inline
-: LVM_SETGROUPMETRICS LVM_FIRST  155 +  ; inline
-: LVM_GETGROUPMETRICS LVM_FIRST  156 +  ; inline
-: LVM_ENABLEGROUPVIEW LVM_FIRST  157 +  ; inline
-: LVM_SORTGROUPS LVM_FIRST  158 +  ; inline
-: LVM_INSERTGROUPSORTED LVM_FIRST  159 +  ; inline
-: LVM_REMOVEALLGROUPS LVM_FIRST  160 +  ; inline
-: LVM_HASGROUP LVM_FIRST  161 +  ; inline
-: LVM_SETTILEVIEWINFO LVM_FIRST  162 +  ; inline
-: LVM_GETTILEVIEWINFO LVM_FIRST  163 +  ; inline
-: LVM_SETTILEINFO LVM_FIRST  164 +  ; inline
-: LVM_GETTILEINFO LVM_FIRST  165 +  ; inline
-: LVM_SETINSERTMARK LVM_FIRST  166 +  ; inline
-: LVM_GETINSERTMARK LVM_FIRST  167 +  ; inline
-: LVM_INSERTMARKHITTEST LVM_FIRST  168 +  ; inline
-: LVM_GETINSERTMARKRECT LVM_FIRST  169 +  ; inline
-: LVM_SETINSERTMARKCOLOR LVM_FIRST  170 +  ; inline
-: LVM_GETINSERTMARKCOLOR LVM_FIRST  171 +  ; inline
-: LVM_SETINFOTIP LVM_FIRST  173 +  ; inline
-: LVM_GETSELECTEDCOLUMN LVM_FIRST  174 +  ; inline
-: LVM_ISGROUPVIEWENABLED LVM_FIRST  175 +  ; inline
-: LVM_GETOUTLINECOLOR LVM_FIRST  176 +  ; inline
-: LVM_SETOUTLINECOLOR LVM_FIRST  177 +  ; inline
-: LVM_CANCELEDITLABEL LVM_FIRST  179 +  ; inline
-: LVM_MAPINDEXTOID LVM_FIRST  180 +  ; inline
-: LVM_MAPIDTOINDEX LVM_FIRST  181 +  ; inline
-: TVM_INSERTITEMA TV_FIRST  0 +  ; inline
-: TVM_INSERTITEMW TV_FIRST  50 +  ; inline
-: TVM_DELETEITEM TV_FIRST  1 +  ; inline
-: TVM_EXPAND TV_FIRST  2 +  ; inline
-: TVM_GETITEMRECT TV_FIRST  4 +  ; inline
-: TVM_GETCOUNT TV_FIRST  5 +  ; inline
-: TVM_GETINDENT TV_FIRST  6 +  ; inline
-: TVM_SETINDENT TV_FIRST  7 +  ; inline
-: TVM_GETIMAGELIST TV_FIRST  8 +  ; inline
-: TVM_SETIMAGELIST TV_FIRST  9 +  ; inline
-: TVM_GETNEXTITEM TV_FIRST  10 +  ; inline
-: TVM_SELECTITEM TV_FIRST  11 +  ; inline
-: TVM_GETITEMA TV_FIRST  12 +  ; inline
-: TVM_GETITEMW TV_FIRST  62 +  ; inline
-: TVM_SETITEMA TV_FIRST  13 +  ; inline
-: TVM_SETITEMW TV_FIRST  63 +  ; inline
-: TVM_EDITLABELA TV_FIRST  14 +  ; inline
-: TVM_EDITLABELW TV_FIRST  65 +  ; inline
-: TVM_GETEDITCONTROL TV_FIRST  15 +  ; inline
-: TVM_GETVISIBLECOUNT TV_FIRST  16 +  ; inline
-: TVM_HITTEST TV_FIRST  17 +  ; inline
-: TVM_CREATEDRAGIMAGE TV_FIRST  18 +  ; inline
-: TVM_SORTCHILDREN TV_FIRST  19 +  ; inline
-: TVM_ENSUREVISIBLE TV_FIRST  20 +  ; inline
-: TVM_SORTCHILDRENCB TV_FIRST  21 +  ; inline
-: TVM_ENDEDITLABELNOW TV_FIRST  22 +  ; inline
-: TVM_GETISEARCHSTRINGA TV_FIRST  23 +  ; inline
-: TVM_GETISEARCHSTRINGW TV_FIRST  64 +  ; inline
-: TVM_SETTOOLTIPS TV_FIRST  24 +  ; inline
-: TVM_GETTOOLTIPS TV_FIRST  25 +  ; inline
-: TVM_SETINSERTMARK TV_FIRST  26 +  ; inline
-: TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline
-: TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline
-: TVM_SETITEMHEIGHT TV_FIRST  27 +  ; inline
-: TVM_GETITEMHEIGHT TV_FIRST  28 +  ; inline
-: TVM_SETBKCOLOR TV_FIRST  29 +  ; inline
-: TVM_SETTEXTCOLOR TV_FIRST  30 +  ; inline
-: TVM_GETBKCOLOR TV_FIRST  31 +  ; inline
-: TVM_GETTEXTCOLOR TV_FIRST  32 +  ; inline
-: TVM_SETSCROLLTIME TV_FIRST  33 +  ; inline
-: TVM_GETSCROLLTIME TV_FIRST  34 +  ; inline
-: TVM_SETINSERTMARKCOLOR TV_FIRST  37 +  ; inline
-: TVM_GETINSERTMARKCOLOR TV_FIRST  38 +  ; inline
-: TVM_GETITEMSTATE TV_FIRST  39 +  ; inline
-: TVM_SETLINECOLOR TV_FIRST  40 +  ; inline
-: TVM_GETLINECOLOR TV_FIRST  41 +  ; inline
-: TVM_MAPACCIDTOHTREEITEM TV_FIRST  42 +  ; inline
-: TVM_MAPHTREEITEMTOACCID TV_FIRST  43 +  ; inline
-: CBEM_INSERTITEMA WM_USER  1 +  ; inline
-: CBEM_SETIMAGELIST WM_USER  2 +  ; inline
-: CBEM_GETIMAGELIST WM_USER  3 +  ; inline
-: CBEM_GETITEMA WM_USER  4 +  ; inline
-: CBEM_SETITEMA WM_USER  5 +  ; inline
-: CBEM_DELETEITEM CB_DELETESTRING ; inline
-: CBEM_GETCOMBOCONTROL WM_USER  6 +  ; inline
-: CBEM_GETEDITCONTROL WM_USER  7 +  ; inline
-: CBEM_SETEXTENDEDSTYLE WM_USER  14 +  ; inline
-: CBEM_GETEXTENDEDSTYLE WM_USER  9 +  ; inline
-: CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline
-: CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline
-: CBEM_SETEXSTYLE WM_USER  8 +  ; inline
-: CBEM_GETEXSTYLE WM_USER  9 +  ; inline
-: CBEM_HASEDITCHANGED WM_USER  10 +  ; inline
-: CBEM_INSERTITEMW WM_USER  11 +  ; inline
-: CBEM_SETITEMW WM_USER  12 +  ; inline
-: CBEM_GETITEMW WM_USER  13 +  ; inline
-: TCM_GETIMAGELIST TCM_FIRST  2 +  ; inline
-: TCM_SETIMAGELIST TCM_FIRST  3 +  ; inline
-: TCM_GETITEMCOUNT TCM_FIRST  4 +  ; inline
-: TCM_GETITEMA TCM_FIRST  5 +  ; inline
-: TCM_GETITEMW TCM_FIRST  60 +  ; inline
-: TCM_SETITEMA TCM_FIRST  6 +  ; inline
-: TCM_SETITEMW TCM_FIRST  61 +  ; inline
-: TCM_INSERTITEMA TCM_FIRST  7 +  ; inline
-: TCM_INSERTITEMW TCM_FIRST  62 +  ; inline
-: TCM_DELETEITEM TCM_FIRST  8 +  ; inline
-: TCM_DELETEALLITEMS TCM_FIRST  9 +  ; inline
-: TCM_GETITEMRECT TCM_FIRST  10 +  ; inline
-: TCM_GETCURSEL TCM_FIRST  11 +  ; inline
-: TCM_SETCURSEL TCM_FIRST  12 +  ; inline
-: TCM_HITTEST TCM_FIRST  13 +  ; inline
-: TCM_SETITEMEXTRA TCM_FIRST  14 +  ; inline
-: TCM_ADJUSTRECT TCM_FIRST  40 +  ; inline
-: TCM_SETITEMSIZE TCM_FIRST  41 +  ; inline
-: TCM_REMOVEIMAGE TCM_FIRST  42 +  ; inline
-: TCM_SETPADDING TCM_FIRST  43 +  ; inline
-: TCM_GETROWCOUNT TCM_FIRST  44 +  ; inline
-: TCM_GETTOOLTIPS TCM_FIRST  45 +  ; inline
-: TCM_SETTOOLTIPS TCM_FIRST  46 +  ; inline
-: TCM_GETCURFOCUS TCM_FIRST  47 +  ; inline
-: TCM_SETCURFOCUS TCM_FIRST  48 +  ; inline
-: TCM_SETMINTABWIDTH TCM_FIRST  49 +  ; inline
-: TCM_DESELECTALL TCM_FIRST  50 +  ; inline
-: TCM_HIGHLIGHTITEM TCM_FIRST  51 +  ; inline
-: TCM_SETEXTENDEDSTYLE TCM_FIRST  52 +  ; inline
-: TCM_GETEXTENDEDSTYLE TCM_FIRST  53 +  ; inline
-: TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline
-: TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline
-: ACM_OPENA WM_USER 100 +  ; inline
-: ACM_OPENW WM_USER 103 +  ; inline
-: ACM_PLAY WM_USER 101 +  ; inline
-: ACM_STOP WM_USER 102 +  ; inline
-: MCM_FIRST HEX: 1000 ; inline
-: MCM_GETCURSEL MCM_FIRST  1 +  ; inline
-: MCM_SETCURSEL MCM_FIRST  2 +  ; inline
-: MCM_GETMAXSELCOUNT MCM_FIRST  3 +  ; inline
-: MCM_SETMAXSELCOUNT MCM_FIRST  4 +  ; inline
-: MCM_GETSELRANGE MCM_FIRST  5 +  ; inline
-: MCM_SETSELRANGE MCM_FIRST  6 +  ; inline
-: MCM_GETMONTHRANGE MCM_FIRST  7 +  ; inline
-: MCM_SETDAYSTATE MCM_FIRST  8 +  ; inline
-: MCM_GETMINREQRECT MCM_FIRST  9 +  ; inline
-: MCM_SETCOLOR MCM_FIRST  10 +  ; inline
-: MCM_GETCOLOR MCM_FIRST  11 +  ; inline
-: MCM_SETTODAY MCM_FIRST  12 +  ; inline
-: MCM_GETTODAY MCM_FIRST  13 +  ; inline
-: MCM_HITTEST MCM_FIRST  14 +  ; inline
-: MCM_SETFIRSTDAYOFWEEK MCM_FIRST  15 +  ; inline
-: MCM_GETFIRSTDAYOFWEEK MCM_FIRST  16 +  ; inline
-: MCM_GETRANGE MCM_FIRST  17 +  ; inline
-: MCM_SETRANGE MCM_FIRST  18 +  ; inline
-: MCM_GETMONTHDELTA MCM_FIRST  19 +  ; inline
-: MCM_SETMONTHDELTA MCM_FIRST  20 +  ; inline
-: MCM_GETMAXTODAYWIDTH MCM_FIRST  21 +  ; inline
-: MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline
-: MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline
-: DTM_FIRST HEX: 1000 ; inline
-: DTM_GETSYSTEMTIME DTM_FIRST  1 +  ; inline
-: DTM_SETSYSTEMTIME DTM_FIRST  2 +  ; inline
-: DTM_GETRANGE DTM_FIRST  3 +  ; inline
-: DTM_SETRANGE DTM_FIRST  4 +  ; inline
-: DTM_SETFORMATA DTM_FIRST  5 +  ; inline
-: DTM_SETFORMATW DTM_FIRST  50 +  ; inline
-: DTM_SETMCCOLOR DTM_FIRST  6 +  ; inline
-: DTM_GETMCCOLOR DTM_FIRST  7 +  ; inline
-: DTM_GETMONTHCAL DTM_FIRST  8 +  ; inline
-: DTM_SETMCFONT DTM_FIRST  9 +  ; inline
-: DTM_GETMCFONT DTM_FIRST  10 +  ; inline
-: PGM_SETCHILD PGM_FIRST  1 +  ; inline
-: PGM_RECALCSIZE PGM_FIRST  2 +  ; inline
-: PGM_FORWARDMOUSE PGM_FIRST  3 +  ; inline
-: PGM_SETBKCOLOR PGM_FIRST  4 +  ; inline
-: PGM_GETBKCOLOR PGM_FIRST  5 +  ; inline
-: PGM_SETBORDER PGM_FIRST  6 +  ; inline
-: PGM_GETBORDER PGM_FIRST  7 +  ; inline
-: PGM_SETPOS PGM_FIRST  8 +  ; inline
-: PGM_GETPOS PGM_FIRST  9 +  ; inline
-: PGM_SETBUTTONSIZE PGM_FIRST  10 +  ; inline
-: PGM_GETBUTTONSIZE PGM_FIRST  11 +  ; inline
-: PGM_GETBUTTONSTATE PGM_FIRST  12 +  ; inline
-: PGM_GETDROPTARGET CCM_GETDROPTARGET ; inline
-: BCM_GETIDEALSIZE BCM_FIRST  1 +  ; inline
-: BCM_SETIMAGELIST BCM_FIRST  2 +  ; inline
-: BCM_GETIMAGELIST BCM_FIRST  3 +  ; inline
-: BCM_SETTEXTMARGIN BCM_FIRST 4 +  ; inline
-: BCM_GETTEXTMARGIN BCM_FIRST 5 +  ; inline
-: EM_SETCUEBANNER       ECM_FIRST  1 +  ; inline
-: EM_GETCUEBANNER       ECM_FIRST  2 +  ; inline
-: EM_SHOWBALLOONTIP ECM_FIRST  3 +  ; inline
-: EM_HIDEBALLOONTIP ECM_FIRST  4 +  ; inline
-: CB_SETMINVISIBLE CBM_FIRST  1 +  ; inline
-: CB_GETMINVISIBLE CBM_FIRST  2 +  ; inline
-: LM_HITTEST WM_USER  HEX: 0300 +  ; inline
-: LM_GETIDEALHEIGHT WM_USER  HEX: 0301 +  ; inline
-: LM_SETITEM WM_USER  HEX: 0302 + ; inline
-: LM_GETITEM WM_USER  HEX: 0303 + ; inline
+CONSTANT: WM_NULL HEX: 0000
+CONSTANT: WM_CREATE HEX: 0001
+CONSTANT: WM_DESTROY HEX: 0002
+CONSTANT: WM_MOVE HEX: 0003
+CONSTANT: WM_SIZE HEX: 0005
+CONSTANT: WM_ACTIVATE HEX: 0006
+CONSTANT: WM_SETFOCUS HEX: 0007
+CONSTANT: WM_KILLFOCUS HEX: 0008
+CONSTANT: WM_ENABLE HEX: 000A
+CONSTANT: WM_SETREDRAW HEX: 000B
+CONSTANT: WM_SETTEXT HEX: 000C
+CONSTANT: WM_GETTEXT HEX: 000D
+CONSTANT: WM_GETTEXTLENGTH HEX: 000E
+CONSTANT: WM_PAINT HEX: 000F
+CONSTANT: WM_CLOSE HEX: 0010
+CONSTANT: WM_QUERYENDSESSION HEX: 0011
+CONSTANT: WM_QUERYOPEN HEX: 0013
+CONSTANT: WM_ENDSESSION HEX: 0016
+CONSTANT: WM_QUIT HEX: 0012
+CONSTANT: WM_ERASEBKGND HEX: 0014
+CONSTANT: WM_SYSCOLORCHANGE HEX: 0015
+CONSTANT: WM_SHOWWINDOW HEX: 0018
+CONSTANT: WM_WININICHANGE HEX: 001A
+CONSTANT: WM_SETTINGCHANGE HEX: 001A
+CONSTANT: WM_DEVMODECHANGE HEX: 001B
+CONSTANT: WM_ACTIVATEAPP HEX: 001C
+CONSTANT: WM_FONTCHANGE HEX: 001D
+CONSTANT: WM_TIMECHANGE HEX: 001E
+CONSTANT: WM_CANCELMODE HEX: 001F
+CONSTANT: WM_SETCURSOR HEX: 0020
+CONSTANT: WM_MOUSEACTIVATE HEX: 0021
+CONSTANT: WM_CHILDACTIVATE HEX: 0022
+CONSTANT: WM_QUEUESYNC HEX: 0023
+CONSTANT: WM_GETMINMAXINFO HEX: 0024
+CONSTANT: WM_PAINTICON HEX: 0026
+CONSTANT: WM_ICONERASEBKGND HEX: 0027
+CONSTANT: WM_NEXTDLGCTL HEX: 0028
+CONSTANT: WM_SPOOLERSTATUS HEX: 002A
+CONSTANT: WM_DRAWITEM HEX: 002B
+CONSTANT: WM_MEASUREITEM HEX: 002C
+CONSTANT: WM_DELETEITEM HEX: 002D
+CONSTANT: WM_VKEYTOITEM HEX: 002E
+CONSTANT: WM_CHARTOITEM HEX: 002F
+CONSTANT: WM_SETFONT HEX: 0030
+CONSTANT: WM_GETFONT HEX: 0031
+CONSTANT: WM_SETHOTKEY HEX: 0032
+CONSTANT: WM_GETHOTKEY HEX: 0033
+CONSTANT: WM_QUERYDRAGICON HEX: 0037
+CONSTANT: WM_COMPAREITEM HEX: 0039
+CONSTANT: WM_GETOBJECT HEX: 003D
+CONSTANT: WM_COMPACTING HEX: 0041
+CONSTANT: WM_COMMNOTIFY HEX: 0044
+CONSTANT: WM_WINDOWPOSCHANGING HEX: 0046
+CONSTANT: WM_WINDOWPOSCHANGED HEX: 0047
+CONSTANT: WM_POWER HEX: 0048
+CONSTANT: WM_COPYDATA HEX: 004A
+CONSTANT: WM_CANCELJOURNAL HEX: 004B
+CONSTANT: WM_NOTIFY HEX: 004E
+CONSTANT: WM_INPUTLANGCHANGEREQUEST HEX: 0050
+CONSTANT: WM_INPUTLANGCHANGE HEX: 0051
+CONSTANT: WM_TCARD HEX: 0052
+CONSTANT: WM_HELP HEX: 0053
+CONSTANT: WM_USERCHANGED HEX: 0054
+CONSTANT: WM_NOTIFYFORMAT HEX: 0055
+CONSTANT: WM_CONTEXTMENU HEX: 007B
+CONSTANT: WM_STYLECHANGING HEX: 007C
+CONSTANT: WM_STYLECHANGED HEX: 007D
+CONSTANT: WM_DISPLAYCHANGE HEX: 007E
+CONSTANT: WM_GETICON HEX: 007F
+CONSTANT: WM_SETICON HEX: 0080
+CONSTANT: WM_NCCREATE HEX: 0081
+CONSTANT: WM_NCDESTROY HEX: 0082
+CONSTANT: WM_NCCALCSIZE HEX: 0083
+CONSTANT: WM_NCHITTEST HEX: 0084
+CONSTANT: WM_NCPAINT HEX: 0085
+CONSTANT: WM_NCACTIVATE HEX: 0086
+CONSTANT: WM_GETDLGCODE HEX: 0087
+CONSTANT: WM_SYNCPAINT HEX: 0088
+CONSTANT: WM_NCMOUSEMOVE HEX: 00A0
+CONSTANT: WM_NCLBUTTONDOWN HEX: 00A1
+CONSTANT: WM_NCLBUTTONUP HEX: 00A2
+CONSTANT: WM_NCLBUTTONDBLCLK HEX: 00A3
+CONSTANT: WM_NCRBUTTONDOWN HEX: 00A4
+CONSTANT: WM_NCRBUTTONUP HEX: 00A5
+CONSTANT: WM_NCRBUTTONDBLCLK HEX: 00A6
+CONSTANT: WM_NCMBUTTONDOWN HEX: 00A7
+CONSTANT: WM_NCMBUTTONUP HEX: 00A8
+CONSTANT: WM_NCMBUTTONDBLCLK HEX: 00A9
+CONSTANT: WM_NCXBUTTONDOWN HEX: 00AB
+CONSTANT: WM_NCXBUTTONUP HEX: 00AC
+CONSTANT: WM_NCXBUTTONDBLCLK HEX: 00AD
+CONSTANT: WM_NCUAHDRAWCAPTION HEX: 00AE ! undocumented
+CONSTANT: WM_NCUAHDRAWFRAME HEX: 00AF   ! undocumented
+CONSTANT: WM_INPUT HEX: 00FF
+CONSTANT: WM_KEYFIRST HEX: 0100
+CONSTANT: WM_KEYDOWN HEX: 0100
+CONSTANT: WM_KEYUP HEX: 0101
+CONSTANT: WM_CHAR HEX: 0102
+CONSTANT: WM_DEADCHAR HEX: 0103
+CONSTANT: WM_SYSKEYDOWN HEX: 0104
+CONSTANT: WM_SYSKEYUP HEX: 0105
+CONSTANT: WM_SYSCHAR HEX: 0106
+CONSTANT: WM_SYSDEADCHAR HEX: 0107
+CONSTANT: WM_UNICHAR HEX: 0109
+CONSTANT: WM_KEYLAST_NT501 HEX: 0109
+CONSTANT: UNICODE_NOCHAR HEX: FFFF
+CONSTANT: WM_KEYLAST_PRE501 HEX: 0108
+CONSTANT: WM_IME_STARTCOMPOSITION HEX: 010D
+CONSTANT: WM_IME_ENDCOMPOSITION HEX: 010E
+CONSTANT: WM_IME_COMPOSITION HEX: 010F
+CONSTANT: WM_IME_KEYLAST HEX: 010F
+CONSTANT: WM_INITDIALOG HEX: 0110
+CONSTANT: WM_COMMAND HEX: 0111
+CONSTANT: WM_SYSCOMMAND HEX: 0112
+CONSTANT: WM_TIMER HEX: 0113
+CONSTANT: WM_HSCROLL HEX: 0114
+CONSTANT: WM_VSCROLL HEX: 0115
+CONSTANT: WM_INITMENU HEX: 0116
+CONSTANT: WM_INITMENUPOPUP HEX: 0117
+CONSTANT: WM_MENUSELECT HEX: 011F
+CONSTANT: WM_MENUCHAR HEX: 0120
+CONSTANT: WM_ENTERIDLE HEX: 0121
+CONSTANT: WM_MENURBUTTONUP HEX: 0122
+CONSTANT: WM_MENUDRAG HEX: 0123
+CONSTANT: WM_MENUGETOBJECT HEX: 0124
+CONSTANT: WM_UNINITMENUPOPUP HEX: 0125
+CONSTANT: WM_MENUCOMMAND HEX: 0126
+CONSTANT: WM_CHANGEUISTATE HEX: 0127
+CONSTANT: WM_UPDATEUISTATE HEX: 0128
+CONSTANT: WM_QUERYUISTATE HEX: 0129
+CONSTANT: WM_CTLCOLORMSGBOX HEX: 0132
+CONSTANT: WM_CTLCOLOREDIT HEX: 0133
+CONSTANT: WM_CTLCOLORLISTBOX HEX: 0134
+CONSTANT: WM_CTLCOLORBTN HEX: 0135
+CONSTANT: WM_CTLCOLORDLG HEX: 0136
+CONSTANT: WM_CTLCOLORSCROLLBAR HEX: 0137
+CONSTANT: WM_CTLCOLORSTATIC HEX: 0138
+CONSTANT: WM_MOUSEFIRST HEX: 0200
+CONSTANT: WM_MOUSEMOVE HEX: 0200
+CONSTANT: WM_LBUTTONDOWN HEX: 0201
+CONSTANT: WM_LBUTTONUP HEX: 0202
+CONSTANT: WM_LBUTTONDBLCLK HEX: 0203
+CONSTANT: WM_RBUTTONDOWN HEX: 0204
+CONSTANT: WM_RBUTTONUP HEX: 0205
+CONSTANT: WM_RBUTTONDBLCLK HEX: 0206
+CONSTANT: WM_MBUTTONDOWN HEX: 0207
+CONSTANT: WM_MBUTTONUP HEX: 0208
+CONSTANT: WM_MBUTTONDBLCLK HEX: 0209
+CONSTANT: WM_MOUSEWHEEL HEX: 020A
+CONSTANT: WM_XBUTTONDOWN HEX: 020B
+CONSTANT: WM_XBUTTONUP HEX: 020C
+CONSTANT: WM_XBUTTONDBLCLK HEX: 020D
+CONSTANT: WM_MOUSELAST_5 HEX: 020D
+CONSTANT: WM_MOUSELAST_4 HEX: 020A
+CONSTANT: WM_MOUSELAST_PRE_4 HEX: 0209
+CONSTANT: WM_PARENTNOTIFY HEX: 0210
+CONSTANT: WM_ENTERMENULOOP HEX: 0211
+CONSTANT: WM_EXITMENULOOP HEX: 0212
+CONSTANT: WM_NEXTMENU HEX: 0213
+CONSTANT: WM_SIZING HEX: 0214
+CONSTANT: WM_CAPTURECHANGED HEX: 0215
+CONSTANT: WM_MOVING HEX: 0216
+CONSTANT: WM_POWERBROADCAST HEX: 0218
+CONSTANT: WM_DEVICECHANGE HEX: 0219
+CONSTANT: WM_MDICREATE HEX: 0220
+CONSTANT: WM_MDIDESTROY HEX: 0221
+CONSTANT: WM_MDIACTIVATE HEX: 0222
+CONSTANT: WM_MDIRESTORE HEX: 0223
+CONSTANT: WM_MDINEXT HEX: 0224
+CONSTANT: WM_MDIMAXIMIZE HEX: 0225
+CONSTANT: WM_MDITILE HEX: 0226
+CONSTANT: WM_MDICASCADE HEX: 0227
+CONSTANT: WM_MDIICONARRANGE HEX: 0228
+CONSTANT: WM_MDIGETACTIVE HEX: 0229
+CONSTANT: WM_MDISETMENU HEX: 0230
+CONSTANT: WM_ENTERSIZEMOVE HEX: 0231
+CONSTANT: WM_EXITSIZEMOVE HEX: 0232
+CONSTANT: WM_DROPFILES HEX: 0233
+CONSTANT: WM_MDIREFRESHMENU HEX: 0234
+CONSTANT: WM_IME_SETCONTEXT HEX: 0281
+CONSTANT: WM_IME_NOTIFY HEX: 0282
+CONSTANT: WM_IME_CONTROL HEX: 0283
+CONSTANT: WM_IME_COMPOSITIONFULL HEX: 0284
+CONSTANT: WM_IME_SELECT HEX: 0285
+CONSTANT: WM_IME_CHAR HEX: 0286
+CONSTANT: WM_IME_REQUEST HEX: 0288
+CONSTANT: WM_IME_KEYDOWN HEX: 0290
+CONSTANT: WM_IME_KEYUP HEX: 0291
+CONSTANT: WM_MOUSEHOVER HEX: 02A1
+CONSTANT: WM_MOUSELEAVE HEX: 02A3
+CONSTANT: WM_NCMOUSEHOVER HEX: 02A0
+CONSTANT: WM_NCMOUSELEAVE HEX: 02A2
+CONSTANT: WM_WTSSESSION_CHANGE HEX: 02B1
+CONSTANT: WM_TABLET_FIRST HEX: 02c0
+CONSTANT: WM_TABLET_LAST HEX: 02df
+CONSTANT: WM_CUT HEX: 0300
+CONSTANT: WM_COPY HEX: 0301
+CONSTANT: WM_PASTE HEX: 0302
+CONSTANT: WM_CLEAR HEX: 0303
+CONSTANT: WM_UNDO HEX: 0304
+CONSTANT: WM_RENDERFORMAT HEX: 0305
+CONSTANT: WM_RENDERALLFORMATS HEX: 0306
+CONSTANT: WM_DESTROYCLIPBOARD HEX: 0307
+CONSTANT: WM_DRAWCLIPBOARD HEX: 0308
+CONSTANT: WM_PAINTCLIPBOARD HEX: 0309
+CONSTANT: WM_VSCROLLCLIPBOARD HEX: 030A
+CONSTANT: WM_SIZECLIPBOARD HEX: 030B
+CONSTANT: WM_ASKCBFORMATNAME HEX: 030C
+CONSTANT: WM_CHANGECBCHAIN HEX: 030D
+CONSTANT: WM_HSCROLLCLIPBOARD HEX: 030E
+CONSTANT: WM_QUERYNEWPALETTE HEX: 030F
+CONSTANT: WM_PALETTEISCHANGING HEX: 0310
+CONSTANT: WM_PALETTECHANGED HEX: 0311
+CONSTANT: WM_HOTKEY HEX: 0312
+CONSTANT: WM_PRINT HEX: 0317
+CONSTANT: WM_PRINTCLIENT HEX: 0318
+CONSTANT: WM_APPCOMMAND HEX: 0319
+CONSTANT: WM_THEMECHANGED HEX: 031A
+CONSTANT: WM_HANDHELDFIRST HEX: 0358
+CONSTANT: WM_HANDHELDLAST HEX: 035F
+CONSTANT: WM_AFXFIRST HEX: 0360
+CONSTANT: WM_AFXLAST HEX: 037F
+CONSTANT: WM_PENWINFIRST HEX: 0380
+CONSTANT: WM_PENWINLAST HEX: 038F
+CONSTANT: WM_APP HEX: 8000
+CONSTANT: WM_USER HEX: 0400
+CONSTANT: EM_GETSEL HEX: 00B0
+CONSTANT: EM_SETSEL HEX: 00B1
+CONSTANT: EM_GETRECT HEX: 00B2
+CONSTANT: EM_SETRECT HEX: 00B3
+CONSTANT: EM_SETRECTNP HEX: 00B4
+CONSTANT: EM_SCROLL HEX: 00B5
+CONSTANT: EM_LINESCROLL HEX: 00B6
+CONSTANT: EM_SCROLLCARET HEX: 00B7
+CONSTANT: EM_GETMODIFY HEX: 00B8
+CONSTANT: EM_SETMODIFY HEX: 00B9
+CONSTANT: EM_GETLINECOUNT HEX: 00BA
+CONSTANT: EM_LINEINDEX HEX: 00BB
+CONSTANT: EM_SETHANDLE HEX: 00BC
+CONSTANT: EM_GETHANDLE HEX: 00BD
+CONSTANT: EM_GETTHUMB HEX: 00BE
+CONSTANT: EM_LINELENGTH HEX: 00C1
+CONSTANT: EM_REPLACESEL HEX: 00C2
+CONSTANT: EM_GETLINE HEX: 00C4
+CONSTANT: EM_LIMITTEXT HEX: 00C5
+CONSTANT: EM_CANUNDO HEX: 00C6
+CONSTANT: EM_UNDO HEX: 00C7
+CONSTANT: EM_FMTLINES HEX: 00C8
+CONSTANT: EM_LINEFROMCHAR HEX: 00C9
+CONSTANT: EM_SETTABSTOPS HEX: 00CB
+CONSTANT: EM_SETPASSWORDCHAR HEX: 00CC
+CONSTANT: EM_EMPTYUNDOBUFFER HEX: 00CD
+CONSTANT: EM_GETFIRSTVISIBLELINE HEX: 00CE
+CONSTANT: EM_SETREADONLY HEX: 00CF
+CONSTANT: EM_SETWORDBREAKPROC HEX: 00D0
+CONSTANT: EM_GETWORDBREAKPROC HEX: 00D1
+CONSTANT: EM_GETPASSWORDCHAR HEX: 00D2
+CONSTANT: EM_SETMARGINS HEX: 00D3
+CONSTANT: EM_GETMARGINS HEX: 00D4
+ALIAS: EM_SETLIMITTEXT EM_LIMITTEXT
+CONSTANT: EM_GETLIMITTEXT HEX: 00D5
+CONSTANT: EM_POSFROMCHAR HEX: 00D6
+CONSTANT: EM_CHARFROMPOS HEX: 00D7
+CONSTANT: EM_SETIMESTATUS HEX: 00D8
+CONSTANT: EM_GETIMESTATUS HEX: 00D9
+CONSTANT: BM_GETCHECK HEX: 00F0
+CONSTANT: BM_SETCHECK HEX: 00F1
+CONSTANT: BM_GETSTATE HEX: 00F2
+CONSTANT: BM_SETSTATE HEX: 00F3
+CONSTANT: BM_SETSTYLE HEX: 00F4
+CONSTANT: BM_CLICK HEX: 00F5
+CONSTANT: BM_GETIMAGE HEX: 00F6
+CONSTANT: BM_SETIMAGE HEX: 00F7
+CONSTANT: STM_SETICON HEX: 0170
+CONSTANT: STM_GETICON HEX: 0171
+CONSTANT: STM_SETIMAGE HEX: 0172
+CONSTANT: STM_GETIMAGE HEX: 0173
+CONSTANT: STM_MSGMAX HEX: 0174
+CONSTANT: DM_GETDEFID WM_USER
+: DM_SETDEFID ( -- n ) ( -- n ) WM_USER 1  + ; inline
+: DM_REPOSITION ( -- n ) ( -- n ) WM_USER 2  + ; inline
+CONSTANT: LB_ADDSTRING HEX: 0180
+CONSTANT: LB_INSERTSTRING HEX: 0181
+CONSTANT: LB_DELETESTRING HEX: 0182
+CONSTANT: LB_SELITEMRANGEEX HEX: 0183
+CONSTANT: LB_RESETCONTENT HEX: 0184
+CONSTANT: LB_SETSEL HEX: 0185
+CONSTANT: LB_SETCURSEL HEX: 0186
+CONSTANT: LB_GETSEL HEX: 0187
+CONSTANT: LB_GETCURSEL HEX: 0188
+CONSTANT: LB_GETTEXT HEX: 0189
+CONSTANT: LB_GETTEXTLEN HEX: 018A
+CONSTANT: LB_GETCOUNT HEX: 018B
+CONSTANT: LB_SELECTSTRING HEX: 018C
+CONSTANT: LB_DIR HEX: 018D
+CONSTANT: LB_GETTOPINDEX HEX: 018E
+CONSTANT: LB_FINDSTRING HEX: 018F
+CONSTANT: LB_GETSELCOUNT HEX: 0190
+CONSTANT: LB_GETSELITEMS HEX: 0191
+CONSTANT: LB_SETTABSTOPS HEX: 0192
+CONSTANT: LB_GETHORIZONTALEXTENT HEX: 0193
+CONSTANT: LB_SETHORIZONTALEXTENT HEX: 0194
+CONSTANT: LB_SETCOLUMNWIDTH HEX: 0195
+CONSTANT: LB_ADDFILE HEX: 0196
+CONSTANT: LB_SETTOPINDEX HEX: 0197
+CONSTANT: LB_GETITEMRECT HEX: 0198
+CONSTANT: LB_GETITEMDATA HEX: 0199
+CONSTANT: LB_SETITEMDATA HEX: 019A
+CONSTANT: LB_SELITEMRANGE HEX: 019B
+CONSTANT: LB_SETANCHORINDEX HEX: 019C
+CONSTANT: LB_GETANCHORINDEX HEX: 019D
+CONSTANT: LB_SETCARETINDEX HEX: 019E
+CONSTANT: LB_GETCARETINDEX HEX: 019F
+CONSTANT: LB_SETITEMHEIGHT HEX: 01A0
+CONSTANT: LB_GETITEMHEIGHT HEX: 01A1
+CONSTANT: LB_FINDSTRINGEXACT HEX: 01A2
+CONSTANT: LB_SETLOCALE HEX: 01A5
+CONSTANT: LB_GETLOCALE HEX: 01A6
+CONSTANT: LB_SETCOUNT HEX: 01A7
+CONSTANT: LB_INITSTORAGE HEX: 01A8
+CONSTANT: LB_ITEMFROMPOINT HEX: 01A9
+CONSTANT: LB_MULTIPLEADDSTRING HEX: 01B1
+CONSTANT: LB_GETLISTBOXINFO HEX: 01B2
+CONSTANT: LB_MSGMAX_501 HEX: 01B3
+CONSTANT: LB_MSGMAX_WCE4 HEX: 01B1
+CONSTANT: LB_MSGMAX_4 HEX: 01B0
+CONSTANT: LB_MSGMAX_PRE4 HEX: 01A8
+CONSTANT: CB_GETEDITSEL HEX: 0140
+CONSTANT: CB_LIMITTEXT HEX: 0141
+CONSTANT: CB_SETEDITSEL HEX: 0142
+CONSTANT: CB_ADDSTRING HEX: 0143
+CONSTANT: CB_DELETESTRING HEX: 0144
+CONSTANT: CB_DIR HEX: 0145
+CONSTANT: CB_GETCOUNT HEX: 0146
+CONSTANT: CB_GETCURSEL HEX: 0147
+CONSTANT: CB_GETLBTEXT HEX: 0148
+CONSTANT: CB_GETLBTEXTLEN HEX: 0149
+CONSTANT: CB_INSERTSTRING HEX: 014A
+CONSTANT: CB_RESETCONTENT HEX: 014B
+CONSTANT: CB_FINDSTRING HEX: 014C
+CONSTANT: CB_SELECTSTRING HEX: 014D
+CONSTANT: CB_SETCURSEL HEX: 014E
+CONSTANT: CB_SHOWDROPDOWN HEX: 014F
+CONSTANT: CB_GETITEMDATA HEX: 0150
+CONSTANT: CB_SETITEMDATA HEX: 0151
+CONSTANT: CB_GETDROPPEDCONTROLRECT HEX: 0152
+CONSTANT: CB_SETITEMHEIGHT HEX: 0153
+CONSTANT: CB_GETITEMHEIGHT HEX: 0154
+CONSTANT: CB_SETEXTENDEDUI HEX: 0155
+CONSTANT: CB_GETEXTENDEDUI HEX: 0156
+CONSTANT: CB_GETDROPPEDSTATE HEX: 0157
+CONSTANT: CB_FINDSTRINGEXACT HEX: 0158
+CONSTANT: CB_SETLOCALE HEX: 0159
+CONSTANT: CB_GETLOCALE HEX: 015A
+CONSTANT: CB_GETTOPINDEX HEX: 015B
+CONSTANT: CB_SETTOPINDEX HEX: 015C
+CONSTANT: CB_GETHORIZONTALEXTENT HEX: 015d
+CONSTANT: CB_SETHORIZONTALEXTENT HEX: 015e
+CONSTANT: CB_GETDROPPEDWIDTH HEX: 015f
+CONSTANT: CB_SETDROPPEDWIDTH HEX: 0160
+CONSTANT: CB_INITSTORAGE HEX: 0161
+CONSTANT: CB_MULTIPLEADDSTRING HEX: 0163
+CONSTANT: CB_GETCOMBOBOXINFO HEX: 0164
+CONSTANT: CB_MSGMAX_501 HEX: 0165
+CONSTANT: CB_MSGMAX_WCE400 HEX: 0163
+CONSTANT: CB_MSGMAX_400 HEX: 0162
+CONSTANT: CB_MSGMAX_PRE400 HEX: 015B
+CONSTANT: SBM_SETPOS HEX: 00E0
+CONSTANT: SBM_GETPOS HEX: 00E1
+CONSTANT: SBM_SETRANGE HEX: 00E2
+CONSTANT: SBM_SETRANGEREDRAW HEX: 00E6
+CONSTANT: SBM_GETRANGE HEX: 00E3
+CONSTANT: SBM_ENABLE_ARROWS HEX: 00E4
+CONSTANT: SBM_SETSCROLLINFO HEX: 00E9
+CONSTANT: SBM_GETSCROLLINFO HEX: 00EA
+CONSTANT: SBM_GETSCROLLBARINFO HEX: 00EB
+CONSTANT: LVM_FIRST HEX: 1000 ! ListView messages
+CONSTANT: TV_FIRST HEX: 1100 ! TreeView messages
+CONSTANT: HDM_FIRST HEX: 1200 ! Header messages
+CONSTANT: TCM_FIRST HEX: 1300 ! Tab control messages
+CONSTANT: PGM_FIRST HEX: 1400 ! Pager control messages
+CONSTANT: ECM_FIRST HEX: 1500 ! Edit control messages
+CONSTANT: BCM_FIRST HEX: 1600 ! Button control messages
+CONSTANT: CBM_FIRST HEX: 1700 ! Combobox control messages
+CONSTANT: CCM_FIRST HEX: 2000 ! Common control shared messages
+: CCM_LAST ( -- n ) CCM_FIRST HEX: 0200  + ; inline
+: CCM_SETBKCOLOR ( -- n ) CCM_FIRST  1  + ; inline
+: CCM_SETCOLORSCHEME ( -- n ) CCM_FIRST  2  + ; inline
+: CCM_GETCOLORSCHEME ( -- n ) CCM_FIRST  3  + ; inline
+: CCM_GETDROPTARGET ( -- n ) CCM_FIRST  4  + ; inline
+: CCM_SETUNICODEFORMAT ( -- n ) CCM_FIRST  5  + ; inline
+: CCM_GETUNICODEFORMAT ( -- n ) CCM_FIRST  6  + ; inline
+: CCM_SETVERSION ( -- n ) CCM_FIRST  7  + ; inline
+: CCM_GETVERSION ( -- n ) CCM_FIRST  8  + ; inline
+: CCM_SETNOTIFYWINDOW ( -- n ) CCM_FIRST  9  + ; inline
+: CCM_SETWINDOWTHEME ( -- n ) CCM_FIRST  HEX: b  + ; inline
+: CCM_DPISCALE ( -- n ) CCM_FIRST  HEX: c  + ; inline
+: HDM_GETITEMCOUNT ( -- n ) HDM_FIRST  0  + ; inline
+: HDM_INSERTITEMA ( -- n ) HDM_FIRST  1  + ; inline
+: HDM_INSERTITEMW ( -- n ) HDM_FIRST  10  + ; inline
+: HDM_DELETEITEM ( -- n ) HDM_FIRST  2  + ; inline
+: HDM_GETITEMA ( -- n ) HDM_FIRST  3  + ; inline
+: HDM_GETITEMW ( -- n ) HDM_FIRST  11  + ; inline
+: HDM_SETITEMA ( -- n ) HDM_FIRST  4  + ; inline
+: HDM_SETITEMW ( -- n ) HDM_FIRST  12  + ; inline
+: HDM_LAYOUT ( -- n ) HDM_FIRST  5  + ; inline
+: HDM_HITTEST ( -- n ) HDM_FIRST  6  + ; inline
+: HDM_GETITEMRECT ( -- n ) HDM_FIRST  7  + ; inline
+: HDM_SETIMAGELIST ( -- n ) HDM_FIRST  8  + ; inline
+: HDM_GETIMAGELIST ( -- n ) HDM_FIRST  9  + ; inline
+: HDM_ORDERTOINDEX ( -- n ) HDM_FIRST  15  + ; inline
+: HDM_CREATEDRAGIMAGE ( -- n ) HDM_FIRST  16  + ; inline
+: HDM_GETORDERARRAY ( -- n ) HDM_FIRST  17  + ; inline
+: HDM_SETORDERARRAY ( -- n ) HDM_FIRST  18  + ; inline
+: HDM_SETHOTDIVIDER ( -- n ) HDM_FIRST  19  + ; inline
+: HDM_SETBITMAPMARGIN ( -- n ) HDM_FIRST  20  + ; inline
+: HDM_GETBITMAPMARGIN ( -- n ) HDM_FIRST  21  + ; inline
+CONSTANT: HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
+CONSTANT: HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT   
+: HDM_SETFILTERCHANGETIMEOUT ( -- n ) HDM_FIRST 22  + ; inline
+: HDM_EDITFILTER ( -- n ) HDM_FIRST 23  + ; inline
+: HDM_CLEARFILTER ( -- n ) HDM_FIRST 24  + ; inline
+: TB_ENABLEBUTTON ( -- n ) WM_USER 1  + ; inline
+: TB_CHECKBUTTON ( -- n ) WM_USER 2  + ; inline
+: TB_PRESSBUTTON ( -- n ) WM_USER 3  + ; inline
+: TB_HIDEBUTTON ( -- n ) WM_USER  4  + ; inline
+: TB_INDETERMINATE ( -- n ) WM_USER  5  + ; inline
+: TB_MARKBUTTON ( -- n ) WM_USER  6  + ; inline
+: TB_ISBUTTONENABLED ( -- n ) WM_USER  9  + ; inline
+: TB_ISBUTTONCHECKED ( -- n ) WM_USER  10  + ; inline
+: TB_ISBUTTONPRESSED ( -- n ) WM_USER  11  + ; inline
+: TB_ISBUTTONHIDDEN ( -- n ) WM_USER  12  + ; inline
+: TB_ISBUTTONINDETERMINATE ( -- n ) WM_USER  13  + ; inline
+: TB_ISBUTTONHIGHLIGHTED ( -- n ) WM_USER  14  + ; inline
+: TB_SETSTATE ( -- n ) WM_USER  17  + ; inline
+: TB_GETSTATE ( -- n ) WM_USER  18  + ; inline
+: TB_ADDBITMAP ( -- n ) WM_USER  19  + ; inline
+: TB_ADDBUTTONSA ( -- n ) WM_USER  20  + ; inline
+: TB_INSERTBUTTONA ( -- n ) WM_USER  21  + ; inline
+: TB_ADDBUTTONS ( -- n ) WM_USER  20  + ; inline
+: TB_INSERTBUTTON ( -- n ) WM_USER  21  + ; inline
+: TB_DELETEBUTTON ( -- n ) WM_USER  22  + ; inline
+: TB_GETBUTTON ( -- n ) WM_USER  23  + ; inline
+: TB_BUTTONCOUNT ( -- n ) WM_USER  24  + ; inline
+: TB_COMMANDTOINDEX ( -- n ) WM_USER  25  + ; inline
+: TB_SAVERESTOREA ( -- n ) WM_USER  26  + ; inline
+: TB_SAVERESTOREW ( -- n ) WM_USER  76  + ; inline
+: TB_CUSTOMIZE ( -- n ) WM_USER  27  + ; inline
+: TB_ADDSTRINGA ( -- n ) WM_USER  28  + ; inline
+: TB_ADDSTRINGW ( -- n ) WM_USER  77  + ; inline
+: TB_GETITEMRECT ( -- n ) WM_USER  29  + ; inline
+: TB_BUTTONSTRUCTSIZE ( -- n ) WM_USER  30  + ; inline
+: TB_SETBUTTONSIZE ( -- n ) WM_USER  31  + ; inline
+: TB_SETBITMAPSIZE ( -- n ) WM_USER  32  + ; inline
+: TB_AUTOSIZE ( -- n ) WM_USER  33  + ; inline
+: TB_GETTOOLTIPS ( -- n ) WM_USER  35  + ; inline
+: TB_SETTOOLTIPS ( -- n ) WM_USER  36  + ; inline
+: TB_SETPARENT ( -- n ) WM_USER  37  + ; inline
+: TB_SETROWS ( -- n ) WM_USER  39  + ; inline
+: TB_GETROWS ( -- n ) WM_USER  40  + ; inline
+: TB_SETCMDID ( -- n ) WM_USER  42  + ; inline
+: TB_CHANGEBITMAP ( -- n ) WM_USER  43  + ; inline
+: TB_GETBITMAP ( -- n ) WM_USER  44  + ; inline
+: TB_GETBUTTONTEXTA ( -- n ) WM_USER  45  + ; inline
+: TB_GETBUTTONTEXTW ( -- n ) WM_USER  75  + ; inline
+: TB_REPLACEBITMAP ( -- n ) WM_USER  46  + ; inline
+: TB_SETINDENT ( -- n ) WM_USER  47  + ; inline
+: TB_SETIMAGELIST ( -- n ) WM_USER  48  + ; inline
+: TB_GETIMAGELIST ( -- n ) WM_USER  49  + ; inline
+: TB_LOADIMAGES ( -- n ) WM_USER  50  + ; inline
+: TB_GETRECT ( -- n ) WM_USER  51  + ; inline
+: TB_SETHOTIMAGELIST ( -- n ) WM_USER  52  + ; inline
+: TB_GETHOTIMAGELIST ( -- n ) WM_USER  53  + ; inline
+: TB_SETDISABLEDIMAGELIST ( -- n ) WM_USER  54  + ; inline
+: TB_GETDISABLEDIMAGELIST ( -- n ) WM_USER  55  + ; inline
+: TB_SETSTYLE ( -- n ) WM_USER  56  + ; inline
+: TB_GETSTYLE ( -- n ) WM_USER  57  + ; inline
+: TB_GETBUTTONSIZE ( -- n ) WM_USER  58  + ; inline
+: TB_SETBUTTONWIDTH ( -- n ) WM_USER  59  + ; inline
+: TB_SETMAXTEXTROWS ( -- n ) WM_USER  60  + ; inline
+: TB_GETTEXTROWS ( -- n ) WM_USER  61  + ; inline
+: TB_GETOBJECT ( -- n ) WM_USER  62  + ; inline
+: TB_GETHOTITEM ( -- n ) WM_USER  71  + ; inline
+: TB_SETHOTITEM ( -- n ) WM_USER  72  + ; inline
+: TB_SETANCHORHIGHLIGHT ( -- n ) WM_USER  73  + ; inline
+: TB_GETANCHORHIGHLIGHT ( -- n ) WM_USER  74  + ; inline
+: TB_MAPACCELERATORA ( -- n ) WM_USER  78  + ; inline
+: TB_GETINSERTMARK ( -- n ) WM_USER  79  + ; inline
+: TB_SETINSERTMARK ( -- n ) WM_USER  80  + ; inline
+: TB_INSERTMARKHITTEST ( -- n ) WM_USER  81  + ; inline
+: TB_MOVEBUTTON ( -- n ) WM_USER  82  + ; inline
+: TB_GETMAXSIZE ( -- n ) WM_USER  83  + ; inline
+: TB_SETEXTENDEDSTYLE ( -- n ) WM_USER  84  + ; inline
+: TB_GETEXTENDEDSTYLE ( -- n ) WM_USER  85  + ; inline
+: TB_GETPADDING ( -- n ) WM_USER  86  + ; inline
+: TB_SETPADDING ( -- n ) WM_USER  87  + ; inline
+: TB_SETINSERTMARKCOLOR ( -- n ) WM_USER  88  + ; inline
+: TB_GETINSERTMARKCOLOR ( -- n ) WM_USER  89  + ; inline
+ALIAS: TB_SETCOLORSCHEME CCM_SETCOLORSCHEME
+ALIAS: TB_GETCOLORSCHEME CCM_GETCOLORSCHEME
+ALIAS: TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
+ALIAS: TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
+: TB_MAPACCELERATORW ( -- n ) WM_USER  90  + ; inline
+: TB_GETBITMAPFLAGS ( -- n ) WM_USER  41  + ; inline
+: TB_GETBUTTONINFOW ( -- n ) WM_USER  63  + ; inline
+: TB_SETBUTTONINFOW ( -- n ) WM_USER  64  + ; inline
+: TB_GETBUTTONINFOA ( -- n ) WM_USER  65  + ; inline
+: TB_SETBUTTONINFOA ( -- n ) WM_USER  66  + ; inline
+: TB_INSERTBUTTONW ( -- n ) WM_USER  67  + ; inline
+: TB_ADDBUTTONSW ( -- n ) WM_USER  68  + ; inline
+: TB_HITTEST ( -- n ) WM_USER  69  + ; inline
+: TB_SETDRAWTEXTFLAGS ( -- n ) WM_USER  70  + ; inline
+: TB_GETSTRINGW ( -- n ) WM_USER  91  + ; inline
+: TB_GETSTRINGA ( -- n ) WM_USER  92  + ; inline
+: TB_GETMETRICS ( -- n ) WM_USER  101  + ; inline
+: TB_SETMETRICS ( -- n ) WM_USER  102  + ; inline
+ALIAS: TB_SETWINDOWTHEME CCM_SETWINDOWTHEME
+: RB_INSERTBANDA ( -- n ) WM_USER  1  + ; inline
+: RB_DELETEBAND ( -- n ) WM_USER  2  + ; inline
+: RB_GETBARINFO ( -- n ) WM_USER  3  + ; inline
+: RB_SETBARINFO ( -- n ) WM_USER  4  + ; inline
+: RB_GETBANDINFO ( -- n ) WM_USER  5  + ; inline
+: RB_SETBANDINFOA ( -- n ) WM_USER  6  + ; inline
+: RB_SETPARENT ( -- n ) WM_USER  7  + ; inline
+: RB_HITTEST ( -- n ) WM_USER  8  + ; inline
+: RB_GETRECT ( -- n ) WM_USER  9  + ; inline
+: RB_INSERTBANDW ( -- n ) WM_USER  10  + ; inline
+: RB_SETBANDINFOW ( -- n ) WM_USER  11  + ; inline
+: RB_GETBANDCOUNT ( -- n ) WM_USER  12  + ; inline
+: RB_GETROWCOUNT ( -- n ) WM_USER  13  + ; inline
+: RB_GETROWHEIGHT ( -- n ) WM_USER  14  + ; inline
+: RB_IDTOINDEX ( -- n ) WM_USER  16  + ; inline
+: RB_GETTOOLTIPS ( -- n ) WM_USER  17  + ; inline
+: RB_SETTOOLTIPS ( -- n ) WM_USER  18  + ; inline
+: RB_SETBKCOLOR ( -- n ) WM_USER  19  + ; inline
+: RB_GETBKCOLOR ( -- n ) WM_USER  20  + ; inline
+: RB_SETTEXTCOLOR ( -- n ) WM_USER  21  + ; inline
+: RB_GETTEXTCOLOR ( -- n ) WM_USER  22  + ; inline
+: RB_SIZETORECT ( -- n ) WM_USER  23  + ; inline
+CONSTANT: RB_SETCOLORSCHEME CCM_SETCOLORSCHEME
+CONSTANT: RB_GETCOLORSCHEME CCM_GETCOLORSCHEME
+: RB_BEGINDRAG ( -- n ) WM_USER  24  + ; inline
+: RB_ENDDRAG ( -- n ) WM_USER  25  + ; inline
+: RB_DRAGMOVE ( -- n ) WM_USER  26  + ; inline
+: RB_GETBARHEIGHT ( -- n ) WM_USER  27  + ; inline
+: RB_GETBANDINFOW ( -- n ) WM_USER  28  + ; inline
+: RB_GETBANDINFOA ( -- n ) WM_USER  29  + ; inline
+: RB_MINIMIZEBAND ( -- n ) WM_USER  30  + ; inline
+: RB_MAXIMIZEBAND ( -- n ) WM_USER  31  + ; inline
+ALIAS: RB_GETDROPTARGET CCM_GETDROPTARGET
+: RB_GETBANDBORDERS ( -- n ) WM_USER  34  + ; inline
+: RB_SHOWBAND ( -- n ) WM_USER  35  + ; inline
+: RB_SETPALETTE ( -- n ) WM_USER  37  + ; inline
+: RB_GETPALETTE ( -- n ) WM_USER  38  + ; inline
+: RB_MOVEBAND ( -- n ) WM_USER  39  + ; inline
+CONSTANT: RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
+CONSTANT: RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
+: RB_GETBANDMARGINS ( -- n ) WM_USER  40  + ; inline
+ALIAS: RB_SETWINDOWTHEME CCM_SETWINDOWTHEME
+: RB_PUSHCHEVRON ( -- n ) WM_USER  43  + ; inline
+: TTM_ACTIVATE ( -- n ) WM_USER  1  + ; inline
+: TTM_SETDELAYTIME ( -- n ) WM_USER  3  + ; inline
+: TTM_ADDTOOLA ( -- n ) WM_USER  4  + ; inline
+: TTM_ADDTOOLW ( -- n ) WM_USER  50  + ; inline
+: TTM_DELTOOLA ( -- n ) WM_USER  5  + ; inline
+: TTM_DELTOOLW ( -- n ) WM_USER  51  + ; inline
+: TTM_NEWTOOLRECTA ( -- n ) WM_USER  6  + ; inline
+: TTM_NEWTOOLRECTW ( -- n ) WM_USER  52  + ; inline
+: TTM_RELAYEVENT ( -- n ) WM_USER  7  + ; inline
+: TTM_GETTOOLINFOA ( -- n ) WM_USER  8  + ; inline
+: TTM_GETTOOLINFOW ( -- n ) WM_USER  53  + ; inline
+: TTM_SETTOOLINFOA ( -- n ) WM_USER  9  + ; inline
+: TTM_SETTOOLINFOW ( -- n ) WM_USER  54  + ; inline
+: TTM_HITTESTA ( -- n ) WM_USER 10  + ; inline
+: TTM_HITTESTW ( -- n ) WM_USER 55  + ; inline
+: TTM_GETTEXTA ( -- n ) WM_USER 11  + ; inline
+: TTM_GETTEXTW ( -- n ) WM_USER 56  + ; inline
+: TTM_UPDATETIPTEXTA ( -- n ) WM_USER 12  + ; inline
+: TTM_UPDATETIPTEXTW ( -- n ) WM_USER 57  + ; inline
+: TTM_GETTOOLCOUNT ( -- n ) WM_USER 13  + ; inline
+: TTM_ENUMTOOLSA ( -- n ) WM_USER 14  + ; inline
+: TTM_ENUMTOOLSW ( -- n ) WM_USER 58  + ; inline
+: TTM_GETCURRENTTOOLA ( -- n ) WM_USER  15  + ; inline
+: TTM_GETCURRENTTOOLW ( -- n ) WM_USER  59  + ; inline
+: TTM_WINDOWFROMPOINT ( -- n ) WM_USER  16  + ; inline
+: TTM_TRACKACTIVATE ( -- n ) WM_USER  17  + ; inline
+: TTM_TRACKPOSITION ( -- n ) WM_USER  18  + ; inline
+: TTM_SETTIPBKCOLOR ( -- n ) WM_USER  19  + ; inline
+: TTM_SETTIPTEXTCOLOR ( -- n ) WM_USER  20  + ; inline
+: TTM_GETDELAYTIME ( -- n ) WM_USER  21  + ; inline
+: TTM_GETTIPBKCOLOR ( -- n ) WM_USER  22  + ; inline
+: TTM_GETTIPTEXTCOLOR ( -- n ) WM_USER  23  + ; inline
+: TTM_SETMAXTIPWIDTH ( -- n ) WM_USER  24  + ; inline
+: TTM_GETMAXTIPWIDTH ( -- n ) WM_USER  25  + ; inline
+: TTM_SETMARGIN ( -- n ) WM_USER  26  + ; inline
+: TTM_GETMARGIN ( -- n ) WM_USER  27  + ; inline
+: TTM_POP ( -- n ) WM_USER  28  + ; inline
+: TTM_UPDATE ( -- n ) WM_USER  29  + ; inline
+: TTM_GETBUBBLESIZE ( -- n ) WM_USER  30  + ; inline
+: TTM_ADJUSTRECT ( -- n ) WM_USER  31  + ; inline
+: TTM_SETTITLEA ( -- n ) WM_USER  32  + ; inline
+: TTM_SETTITLEW ( -- n ) WM_USER  33  + ; inline
+: TTM_POPUP ( -- n ) WM_USER  34  + ; inline
+: TTM_GETTITLE ( -- n ) WM_USER  35  + ; inline
+ALIAS: TTM_SETWINDOWTHEME CCM_SETWINDOWTHEME
+: SB_SETTEXTA ( -- n ) WM_USER 1 + ; inline
+: SB_SETTEXTW ( -- n ) WM_USER 11  + ; inline
+: SB_GETTEXTA ( -- n ) WM_USER 2  + ; inline
+: SB_GETTEXTW ( -- n ) WM_USER 13  + ; inline
+: SB_GETTEXTLENGTHA ( -- n ) WM_USER 3  + ; inline
+: SB_GETTEXTLENGTHW ( -- n ) WM_USER 12  + ; inline
+: SB_SETPARTS ( -- n ) WM_USER 4  + ; inline
+: SB_GETPARTS ( -- n ) WM_USER 6  + ; inline
+: SB_GETBORDERS ( -- n ) WM_USER 7  + ; inline
+: SB_SETMINHEIGHT ( -- n ) WM_USER 8  + ; inline
+: SB_SIMPLE ( -- n ) WM_USER 9  + ; inline
+: SB_GETRECT ( -- n ) WM_USER 10  + ; inline
+: SB_ISSIMPLE ( -- n ) WM_USER 14  + ; inline
+: SB_SETICON ( -- n ) WM_USER 15  + ; inline
+: SB_SETTIPTEXTA ( -- n ) WM_USER 16  + ; inline
+: SB_SETTIPTEXTW ( -- n ) WM_USER 17  + ; inline
+: SB_GETTIPTEXTA ( -- n ) WM_USER 18  + ; inline
+: SB_GETTIPTEXTW ( -- n ) WM_USER 19  + ; inline
+: SB_GETICON ( -- n ) WM_USER 20  + ; inline
+CONSTANT: SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
+CONSTANT: SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
+ALIAS: SB_SETBKCOLOR CCM_SETBKCOLOR
+CONSTANT: SB_SIMPLEID HEX: 00ff
+ALIAS: TBM_GETPOS WM_USER
+: TBM_GETRANGEMIN ( -- n ) WM_USER 1  + ; inline
+: TBM_GETRANGEMAX ( -- n ) WM_USER 2  + ; inline
+: TBM_GETTIC ( -- n ) WM_USER 3  + ; inline
+: TBM_SETTIC ( -- n ) WM_USER 4  + ; inline
+: TBM_SETPOS ( -- n ) WM_USER 5  + ; inline
+: TBM_SETRANGE ( -- n ) WM_USER 6  + ; inline
+: TBM_SETRANGEMIN ( -- n ) WM_USER 7  + ; inline
+: TBM_SETRANGEMAX ( -- n ) WM_USER 8  + ; inline
+: TBM_CLEARTICS ( -- n ) WM_USER 9  + ; inline
+: TBM_SETSEL ( -- n ) WM_USER 10  + ; inline
+: TBM_SETSELSTART ( -- n ) WM_USER 11  + ; inline
+: TBM_SETSELEND ( -- n ) WM_USER 12  + ; inline
+: TBM_GETPTICS ( -- n ) WM_USER 14  + ; inline
+: TBM_GETTICPOS ( -- n ) WM_USER 15  + ; inline
+: TBM_GETNUMTICS ( -- n ) WM_USER 16  + ; inline
+: TBM_GETSELSTART ( -- n ) WM_USER 17  + ; inline
+: TBM_GETSELEND ( -- n ) WM_USER 18  + ; inline
+: TBM_CLEARSEL ( -- n ) WM_USER 19  + ; inline
+: TBM_SETTICFREQ ( -- n ) WM_USER 20  + ; inline
+: TBM_SETPAGESIZE ( -- n ) WM_USER 21  + ; inline
+: TBM_GETPAGESIZE ( -- n ) WM_USER 22  + ; inline
+: TBM_SETLINESIZE ( -- n ) WM_USER 23  + ; inline
+: TBM_GETLINESIZE ( -- n ) WM_USER 24  + ; inline
+: TBM_GETTHUMBRECT ( -- n ) WM_USER 25  + ; inline
+: TBM_GETCHANNELRECT ( -- n ) WM_USER 26  + ; inline
+: TBM_SETTHUMBLENGTH ( -- n ) WM_USER 27  + ; inline
+: TBM_GETTHUMBLENGTH ( -- n ) WM_USER 28  + ; inline
+: TBM_SETTOOLTIPS ( -- n ) WM_USER 29  + ; inline
+: TBM_GETTOOLTIPS ( -- n ) WM_USER 30  + ; inline
+: TBM_SETTIPSIDE ( -- n ) WM_USER 31  + ; inline
+: TBM_SETBUDDY ( -- n ) WM_USER 32  + ; inline
+: TBM_GETBUDDY ( -- n ) WM_USER 33  + ; inline
+ALIAS: TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
+ALIAS: TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
+: DL_BEGINDRAG ( -- n ) WM_USER 133  + ; inline
+: DL_DRAGGING ( -- n ) WM_USER 134  + ; inline
+: DL_DROPPED ( -- n ) WM_USER 135  + ; inline
+: DL_CANCELDRAG ( -- n ) WM_USER 136  + ; inline
+: UDM_SETRANGE ( -- n ) WM_USER 101  + ; inline
+: UDM_GETRANGE ( -- n ) WM_USER 102  + ; inline
+: UDM_SETPOS ( -- n ) WM_USER 103  + ; inline
+: UDM_GETPOS ( -- n ) WM_USER 104  + ; inline
+: UDM_SETBUDDY ( -- n ) WM_USER 105  + ; inline
+: UDM_GETBUDDY ( -- n ) WM_USER 106  + ; inline
+: UDM_SETACCEL ( -- n ) WM_USER 107  + ; inline
+: UDM_GETACCEL ( -- n ) WM_USER 108  + ; inline
+: UDM_SETBASE ( -- n ) WM_USER 109  + ; inline
+: UDM_GETBASE ( -- n ) WM_USER 110  + ; inline
+: UDM_SETRANGE32 ( -- n ) WM_USER 111  + ; inline
+: UDM_GETRANGE32 ( -- n ) WM_USER 112  + ; inline
+ALIAS: UDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
+ALIAS: UDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
+: UDM_SETPOS32 ( -- n ) WM_USER 113  + ; inline
+: UDM_GETPOS32 ( -- n ) WM_USER 114  + ; inline
+: PBM_SETRANGE ( -- n ) WM_USER 1  + ; inline
+: PBM_SETPOS ( -- n ) WM_USER 2  + ; inline
+: PBM_DELTAPOS ( -- n ) WM_USER 3  + ; inline
+: PBM_SETSTEP ( -- n ) WM_USER 4  + ; inline
+: PBM_STEPIT ( -- n ) WM_USER 5  + ; inline
+: PBM_SETRANGE32 ( -- n ) WM_USER 6  + ; inline
+: PBM_GETRANGE ( -- n ) WM_USER 7  + ; inline
+: PBM_GETPOS ( -- n ) WM_USER 8  + ; inline
+: PBM_SETBARCOLOR ( -- n ) WM_USER 9  + ; inline
+ALIAS: PBM_SETBKCOLOR CCM_SETBKCOLOR
+: HKM_SETHOTKEY ( -- n ) WM_USER 1  + ; inline
+: HKM_GETHOTKEY ( -- n ) WM_USER 2  + ; inline
+: HKM_SETRULES ( -- n ) WM_USER 3  + ; inline
+ALIAS: LVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
+ALIAS: LVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
+: LVM_GETBKCOLOR ( -- n ) LVM_FIRST  0  + ; inline
+: LVM_SETBKCOLOR ( -- n ) LVM_FIRST  1  + ; inline
+: LVM_GETIMAGELIST ( -- n ) LVM_FIRST  2  + ; inline
+: LVM_SETIMAGELIST ( -- n ) LVM_FIRST  3  + ; inline
+: LVM_GETITEMCOUNT ( -- n ) LVM_FIRST  4  + ; inline
+: LVM_GETITEMA ( -- n ) LVM_FIRST  5  + ; inline
+: LVM_GETITEMW ( -- n ) LVM_FIRST  75  + ; inline
+: LVM_SETITEMA ( -- n ) LVM_FIRST  6  + ; inline
+: LVM_SETITEMW ( -- n ) LVM_FIRST  76  + ; inline
+: LVM_INSERTITEMA ( -- n ) LVM_FIRST  7  + ; inline
+: LVM_INSERTITEMW ( -- n ) LVM_FIRST  77  + ; inline
+: LVM_DELETEITEM ( -- n ) LVM_FIRST  8  + ; inline
+: LVM_DELETEALLITEMS ( -- n ) LVM_FIRST  9  + ; inline
+: LVM_GETCALLBACKMASK ( -- n ) LVM_FIRST  10  + ; inline
+: LVM_SETCALLBACKMASK ( -- n ) LVM_FIRST  11  + ; inline
+: LVM_FINDITEMA ( -- n ) LVM_FIRST  13  + ; inline
+: LVM_FINDITEMW ( -- n ) LVM_FIRST  83  + ; inline
+: LVM_GETITEMRECT ( -- n ) LVM_FIRST  14  + ; inline
+: LVM_SETITEMPOSITION ( -- n ) LVM_FIRST  15  + ; inline
+: LVM_GETITEMPOSITION ( -- n ) LVM_FIRST  16  + ; inline
+: LVM_GETSTRINGWIDTHA ( -- n ) LVM_FIRST  17  + ; inline
+: LVM_GETSTRINGWIDTHW ( -- n ) LVM_FIRST  87  + ; inline
+: LVM_HITTEST ( -- n ) LVM_FIRST  18  + ; inline
+: LVM_ENSUREVISIBLE ( -- n ) LVM_FIRST  19  + ; inline
+: LVM_SCROLL ( -- n ) LVM_FIRST  20  + ; inline
+: LVM_REDRAWITEMS ( -- n ) LVM_FIRST  21  + ; inline
+: LVM_ARRANGE ( -- n ) LVM_FIRST  22  + ; inline
+: LVM_EDITLABELA ( -- n ) LVM_FIRST  23  + ; inline
+: LVM_EDITLABELW ( -- n ) LVM_FIRST  118  + ; inline
+: LVM_GETEDITCONTROL ( -- n ) LVM_FIRST  24  + ; inline
+: LVM_GETCOLUMNA ( -- n ) LVM_FIRST  25  + ; inline
+: LVM_GETCOLUMNW ( -- n ) LVM_FIRST  95  + ; inline
+: LVM_SETCOLUMNA ( -- n ) LVM_FIRST  26  + ; inline
+: LVM_SETCOLUMNW ( -- n ) LVM_FIRST  96  + ; inline
+: LVM_INSERTCOLUMNA ( -- n ) LVM_FIRST  27  + ; inline
+: LVM_INSERTCOLUMNW ( -- n ) LVM_FIRST  97  + ; inline
+: LVM_DELETECOLUMN ( -- n ) LVM_FIRST  28  + ; inline
+: LVM_GETCOLUMNWIDTH ( -- n ) LVM_FIRST  29  + ; inline
+: LVM_SETCOLUMNWIDTH ( -- n ) LVM_FIRST  30  + ; inline
+: LVM_CREATEDRAGIMAGE ( -- n ) LVM_FIRST  33  + ; inline
+: LVM_GETVIEWRECT ( -- n ) LVM_FIRST  34  + ; inline
+: LVM_GETTEXTCOLOR ( -- n ) LVM_FIRST  35  + ; inline
+: LVM_SETTEXTCOLOR ( -- n ) LVM_FIRST  36  + ; inline
+: LVM_GETTEXTBKCOLOR ( -- n ) LVM_FIRST  37  + ; inline
+: LVM_SETTEXTBKCOLOR ( -- n ) LVM_FIRST  38  + ; inline
+: LVM_GETTOPINDEX ( -- n ) LVM_FIRST  39  + ; inline
+: LVM_GETCOUNTPERPAGE ( -- n ) LVM_FIRST  40  + ; inline
+: LVM_GETORIGIN ( -- n ) LVM_FIRST  41  + ; inline
+: LVM_UPDATE ( -- n ) LVM_FIRST  42  + ; inline
+: LVM_SETITEMSTATE ( -- n ) LVM_FIRST  43  + ; inline
+: LVM_GETITEMSTATE ( -- n ) LVM_FIRST  44  + ; inline
+: LVM_GETITEMTEXTA ( -- n ) LVM_FIRST  45  + ; inline
+: LVM_GETITEMTEXTW ( -- n ) LVM_FIRST  115  + ; inline
+: LVM_SETITEMTEXTA ( -- n ) LVM_FIRST  46  + ; inline
+: LVM_SETITEMTEXTW ( -- n ) LVM_FIRST  116  + ; inline
+: LVM_SETITEMCOUNT ( -- n ) LVM_FIRST  47  + ; inline
+: LVM_SORTITEMS ( -- n ) LVM_FIRST  48  + ; inline
+: LVM_SETITEMPOSITION32 ( -- n ) LVM_FIRST  49  + ; inline
+: LVM_GETSELECTEDCOUNT ( -- n ) LVM_FIRST  50  + ; inline
+: LVM_GETITEMSPACING ( -- n ) LVM_FIRST  51  + ; inline
+: LVM_GETISEARCHSTRINGA ( -- n ) LVM_FIRST  52  + ; inline
+: LVM_GETISEARCHSTRINGW ( -- n ) LVM_FIRST  117  + ; inline
+: LVM_SETICONSPACING ( -- n ) LVM_FIRST  53  + ; inline
+: LVM_SETEXTENDEDLISTVIEWSTYLE ( -- n ) LVM_FIRST  54  + ; inline
+: LVM_GETEXTENDEDLISTVIEWSTYLE ( -- n ) LVM_FIRST  55  + ; inline
+: LVM_GETSUBITEMRECT ( -- n ) LVM_FIRST  56  + ; inline
+: LVM_SUBITEMHITTEST ( -- n ) LVM_FIRST  57  + ; inline
+: LVM_SETCOLUMNORDERARRAY ( -- n ) LVM_FIRST  58  + ; inline
+: LVM_GETCOLUMNORDERARRAY ( -- n ) LVM_FIRST  59  + ; inline
+: LVM_SETHOTITEM ( -- n ) LVM_FIRST  60  + ; inline
+: LVM_GETHOTITEM ( -- n ) LVM_FIRST  61  + ; inline
+: LVM_SETHOTCURSOR ( -- n ) LVM_FIRST  62  + ; inline
+: LVM_GETHOTCURSOR ( -- n ) LVM_FIRST  63  + ; inline
+: LVM_APPROXIMATEVIEWRECT ( -- n ) LVM_FIRST  64  + ; inline
+: LVM_SETWORKAREAS ( -- n ) LVM_FIRST  65  + ; inline
+: LVM_GETWORKAREAS ( -- n ) LVM_FIRST  70  + ; inline
+: LVM_GETNUMBEROFWORKAREAS ( -- n ) LVM_FIRST  73  + ; inline
+: LVM_GETSELECTIONMARK ( -- n ) LVM_FIRST  66  + ; inline
+: LVM_SETSELECTIONMARK ( -- n ) LVM_FIRST  67  + ; inline
+: LVM_SETHOVERTIME ( -- n ) LVM_FIRST  71  + ; inline
+: LVM_GETHOVERTIME ( -- n ) LVM_FIRST  72  + ; inline
+: LVM_SETTOOLTIPS ( -- n ) LVM_FIRST  74  + ; inline
+: LVM_GETTOOLTIPS ( -- n ) LVM_FIRST  78  + ; inline
+: LVM_SORTITEMSEX ( -- n ) LVM_FIRST  81  + ; inline
+: LVM_SETBKIMAGEA ( -- n ) LVM_FIRST  68  + ; inline
+: LVM_SETBKIMAGEW ( -- n ) LVM_FIRST  138  + ; inline
+: LVM_GETBKIMAGEA ( -- n ) LVM_FIRST  69  + ; inline
+: LVM_GETBKIMAGEW ( -- n ) LVM_FIRST  139  + ; inline
+: LVM_SETSELECTEDCOLUMN ( -- n ) LVM_FIRST  140  + ; inline
+: LVM_SETTILEWIDTH ( -- n ) LVM_FIRST  141  + ; inline
+: LVM_SETVIEW ( -- n ) LVM_FIRST  142  + ; inline
+: LVM_GETVIEW ( -- n ) LVM_FIRST  143  + ; inline
+: LVM_INSERTGROUP ( -- n ) LVM_FIRST  145  + ; inline
+: LVM_SETGROUPINFO ( -- n ) LVM_FIRST  147  + ; inline
+: LVM_GETGROUPINFO ( -- n ) LVM_FIRST  149  + ; inline
+: LVM_REMOVEGROUP ( -- n ) LVM_FIRST  150  + ; inline
+: LVM_MOVEGROUP ( -- n ) LVM_FIRST  151  + ; inline
+: LVM_MOVEITEMTOGROUP ( -- n ) LVM_FIRST  154  + ; inline
+: LVM_SETGROUPMETRICS ( -- n ) LVM_FIRST  155  + ; inline
+: LVM_GETGROUPMETRICS ( -- n ) LVM_FIRST  156  + ; inline
+: LVM_ENABLEGROUPVIEW ( -- n ) LVM_FIRST  157  + ; inline
+: LVM_SORTGROUPS ( -- n ) LVM_FIRST  158  + ; inline
+: LVM_INSERTGROUPSORTED ( -- n ) LVM_FIRST  159  + ; inline
+: LVM_REMOVEALLGROUPS ( -- n ) LVM_FIRST  160  + ; inline
+: LVM_HASGROUP ( -- n ) LVM_FIRST  161  + ; inline
+: LVM_SETTILEVIEWINFO ( -- n ) LVM_FIRST  162  + ; inline
+: LVM_GETTILEVIEWINFO ( -- n ) LVM_FIRST  163  + ; inline
+: LVM_SETTILEINFO ( -- n ) LVM_FIRST  164  + ; inline
+: LVM_GETTILEINFO ( -- n ) LVM_FIRST  165  + ; inline
+: LVM_SETINSERTMARK ( -- n ) LVM_FIRST  166  + ; inline
+: LVM_GETINSERTMARK ( -- n ) LVM_FIRST  167  + ; inline
+: LVM_INSERTMARKHITTEST ( -- n ) LVM_FIRST  168  + ; inline
+: LVM_GETINSERTMARKRECT ( -- n ) LVM_FIRST  169  + ; inline
+: LVM_SETINSERTMARKCOLOR ( -- n ) LVM_FIRST  170  + ; inline
+: LVM_GETINSERTMARKCOLOR ( -- n ) LVM_FIRST  171  + ; inline
+: LVM_SETINFOTIP ( -- n ) LVM_FIRST  173  + ; inline
+: LVM_GETSELECTEDCOLUMN ( -- n ) LVM_FIRST  174  + ; inline
+: LVM_ISGROUPVIEWENABLED ( -- n ) LVM_FIRST  175  + ; inline
+: LVM_GETOUTLINECOLOR ( -- n ) LVM_FIRST  176  + ; inline
+: LVM_SETOUTLINECOLOR ( -- n ) LVM_FIRST  177  + ; inline
+: LVM_CANCELEDITLABEL ( -- n ) LVM_FIRST  179  + ; inline
+: LVM_MAPINDEXTOID ( -- n ) LVM_FIRST  180  + ; inline
+: LVM_MAPIDTOINDEX ( -- n ) LVM_FIRST  181  + ; inline
+: TVM_INSERTITEMA ( -- n ) TV_FIRST  0  + ; inline
+: TVM_INSERTITEMW ( -- n ) TV_FIRST  50  + ; inline
+: TVM_DELETEITEM ( -- n ) TV_FIRST  1  + ; inline
+: TVM_EXPAND ( -- n ) TV_FIRST  2  + ; inline
+: TVM_GETITEMRECT ( -- n ) TV_FIRST  4  + ; inline
+: TVM_GETCOUNT ( -- n ) TV_FIRST  5  + ; inline
+: TVM_GETINDENT ( -- n ) TV_FIRST  6  + ; inline
+: TVM_SETINDENT ( -- n ) TV_FIRST  7  + ; inline
+: TVM_GETIMAGELIST ( -- n ) TV_FIRST  8  + ; inline
+: TVM_SETIMAGELIST ( -- n ) TV_FIRST  9  + ; inline
+: TVM_GETNEXTITEM ( -- n ) TV_FIRST  10  + ; inline
+: TVM_SELECTITEM ( -- n ) TV_FIRST  11  + ; inline
+: TVM_GETITEMA ( -- n ) TV_FIRST  12  + ; inline
+: TVM_GETITEMW ( -- n ) TV_FIRST  62  + ; inline
+: TVM_SETITEMA ( -- n ) TV_FIRST  13  + ; inline
+: TVM_SETITEMW ( -- n ) TV_FIRST  63  + ; inline
+: TVM_EDITLABELA ( -- n ) TV_FIRST  14  + ; inline
+: TVM_EDITLABELW ( -- n ) TV_FIRST  65  + ; inline
+: TVM_GETEDITCONTROL ( -- n ) TV_FIRST  15  + ; inline
+: TVM_GETVISIBLECOUNT ( -- n ) TV_FIRST  16  + ; inline
+: TVM_HITTEST ( -- n ) TV_FIRST  17  + ; inline
+: TVM_CREATEDRAGIMAGE ( -- n ) TV_FIRST  18  + ; inline
+: TVM_SORTCHILDREN ( -- n ) TV_FIRST  19  + ; inline
+: TVM_ENSUREVISIBLE ( -- n ) TV_FIRST  20  + ; inline
+: TVM_SORTCHILDRENCB ( -- n ) TV_FIRST  21  + ; inline
+: TVM_ENDEDITLABELNOW ( -- n ) TV_FIRST  22  + ; inline
+: TVM_GETISEARCHSTRINGA ( -- n ) TV_FIRST  23  + ; inline
+: TVM_GETISEARCHSTRINGW ( -- n ) TV_FIRST  64  + ; inline
+: TVM_SETTOOLTIPS ( -- n ) TV_FIRST  24  + ; inline
+: TVM_GETTOOLTIPS ( -- n ) TV_FIRST  25  + ; inline
+: TVM_SETINSERTMARK ( -- n ) TV_FIRST  26  + ; inline
+ALIAS: TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
+ALIAS: TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
+: TVM_SETITEMHEIGHT ( -- n ) TV_FIRST  27  + ; inline
+: TVM_GETITEMHEIGHT ( -- n ) TV_FIRST  28  + ; inline
+: TVM_SETBKCOLOR ( -- n ) TV_FIRST  29  + ; inline
+: TVM_SETTEXTCOLOR ( -- n ) TV_FIRST  30  + ; inline
+: TVM_GETBKCOLOR ( -- n ) TV_FIRST  31  + ; inline
+: TVM_GETTEXTCOLOR ( -- n ) TV_FIRST  32  + ; inline
+: TVM_SETSCROLLTIME ( -- n ) TV_FIRST  33  + ; inline
+: TVM_GETSCROLLTIME ( -- n ) TV_FIRST  34  + ; inline
+: TVM_SETINSERTMARKCOLOR ( -- n ) TV_FIRST  37  + ; inline
+: TVM_GETINSERTMARKCOLOR ( -- n ) TV_FIRST  38  + ; inline
+: TVM_GETITEMSTATE ( -- n ) TV_FIRST  39  + ; inline
+: TVM_SETLINECOLOR ( -- n ) TV_FIRST  40  + ; inline
+: TVM_GETLINECOLOR ( -- n ) TV_FIRST  41  + ; inline
+: TVM_MAPACCIDTOHTREEITEM ( -- n ) TV_FIRST  42  + ; inline
+: TVM_MAPHTREEITEMTOACCID ( -- n ) TV_FIRST  43  + ; inline
+: CBEM_INSERTITEMA ( -- n ) WM_USER  1  + ; inline
+: CBEM_SETIMAGELIST ( -- n ) WM_USER  2  + ; inline
+: CBEM_GETIMAGELIST ( -- n ) WM_USER  3  + ; inline
+: CBEM_GETITEMA ( -- n ) WM_USER  4  + ; inline
+: CBEM_SETITEMA ( -- n ) WM_USER  5  + ; inline
+ALIAS: CBEM_DELETEITEM CB_DELETESTRING
+: CBEM_GETCOMBOCONTROL ( -- n ) WM_USER  6  + ; inline
+: CBEM_GETEDITCONTROL ( -- n ) WM_USER  7  + ; inline
+: CBEM_SETEXTENDEDSTYLE ( -- n ) WM_USER  14  + ; inline
+: CBEM_GETEXTENDEDSTYLE ( -- n ) WM_USER  9  + ; inline
+ALIAS: CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
+ALIAS: CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
+: CBEM_SETEXSTYLE ( -- n ) WM_USER  8  + ; inline
+: CBEM_GETEXSTYLE ( -- n ) WM_USER  9  + ; inline
+: CBEM_HASEDITCHANGED ( -- n ) WM_USER  10  + ; inline
+: CBEM_INSERTITEMW ( -- n ) WM_USER  11  + ; inline
+: CBEM_SETITEMW ( -- n ) WM_USER  12  + ; inline
+: CBEM_GETITEMW ( -- n ) WM_USER  13  + ; inline
+: TCM_GETIMAGELIST ( -- n ) TCM_FIRST  2  + ; inline
+: TCM_SETIMAGELIST ( -- n ) TCM_FIRST  3  + ; inline
+: TCM_GETITEMCOUNT ( -- n ) TCM_FIRST  4  + ; inline
+: TCM_GETITEMA ( -- n ) TCM_FIRST  5  + ; inline
+: TCM_GETITEMW ( -- n ) TCM_FIRST  60  + ; inline
+: TCM_SETITEMA ( -- n ) TCM_FIRST  6  + ; inline
+: TCM_SETITEMW ( -- n ) TCM_FIRST  61  + ; inline
+: TCM_INSERTITEMA ( -- n ) TCM_FIRST  7  + ; inline
+: TCM_INSERTITEMW ( -- n ) TCM_FIRST  62  + ; inline
+: TCM_DELETEITEM ( -- n ) TCM_FIRST  8  + ; inline
+: TCM_DELETEALLITEMS ( -- n ) TCM_FIRST  9  + ; inline
+: TCM_GETITEMRECT ( -- n ) TCM_FIRST  10  + ; inline
+: TCM_GETCURSEL ( -- n ) TCM_FIRST  11  + ; inline
+: TCM_SETCURSEL ( -- n ) TCM_FIRST  12  + ; inline
+: TCM_HITTEST ( -- n ) TCM_FIRST  13  + ; inline
+: TCM_SETITEMEXTRA ( -- n ) TCM_FIRST  14  + ; inline
+: TCM_ADJUSTRECT ( -- n ) TCM_FIRST  40  + ; inline
+: TCM_SETITEMSIZE ( -- n ) TCM_FIRST  41  + ; inline
+: TCM_REMOVEIMAGE ( -- n ) TCM_FIRST  42  + ; inline
+: TCM_SETPADDING ( -- n ) TCM_FIRST  43  + ; inline
+: TCM_GETROWCOUNT ( -- n ) TCM_FIRST  44  + ; inline
+: TCM_GETTOOLTIPS ( -- n ) TCM_FIRST  45  + ; inline
+: TCM_SETTOOLTIPS ( -- n ) TCM_FIRST  46  + ; inline
+: TCM_GETCURFOCUS ( -- n ) TCM_FIRST  47  + ; inline
+: TCM_SETCURFOCUS ( -- n ) TCM_FIRST  48  + ; inline
+: TCM_SETMINTABWIDTH ( -- n ) TCM_FIRST  49  + ; inline
+: TCM_DESELECTALL ( -- n ) TCM_FIRST  50  + ; inline
+: TCM_HIGHLIGHTITEM ( -- n ) TCM_FIRST  51  + ; inline
+: TCM_SETEXTENDEDSTYLE ( -- n ) TCM_FIRST  52  + ; inline
+: TCM_GETEXTENDEDSTYLE ( -- n ) TCM_FIRST  53  + ; inline
+ALIAS: TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
+ALIAS: TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
+: ACM_OPENA ( -- n ) WM_USER 100  + ; inline
+: ACM_OPENW ( -- n ) WM_USER 103  + ; inline
+: ACM_PLAY ( -- n ) WM_USER 101  + ; inline
+: ACM_STOP ( -- n ) WM_USER 102  + ; inline
+CONSTANT: MCM_FIRST HEX: 1000
+: MCM_GETCURSEL ( -- n ) MCM_FIRST  1  + ; inline
+: MCM_SETCURSEL ( -- n ) MCM_FIRST  2  + ; inline
+: MCM_GETMAXSELCOUNT ( -- n ) MCM_FIRST  3  + ; inline
+: MCM_SETMAXSELCOUNT ( -- n ) MCM_FIRST  4  + ; inline
+: MCM_GETSELRANGE ( -- n ) MCM_FIRST  5  + ; inline
+: MCM_SETSELRANGE ( -- n ) MCM_FIRST  6  + ; inline
+: MCM_GETMONTHRANGE ( -- n ) MCM_FIRST  7  + ; inline
+: MCM_SETDAYSTATE ( -- n ) MCM_FIRST  8  + ; inline
+: MCM_GETMINREQRECT ( -- n ) MCM_FIRST  9  + ; inline
+: MCM_SETCOLOR ( -- n ) MCM_FIRST  10  + ; inline
+: MCM_GETCOLOR ( -- n ) MCM_FIRST  11  + ; inline
+: MCM_SETTODAY ( -- n ) MCM_FIRST  12  + ; inline
+: MCM_GETTODAY ( -- n ) MCM_FIRST  13  + ; inline
+: MCM_HITTEST ( -- n ) MCM_FIRST  14  + ; inline
+: MCM_SETFIRSTDAYOFWEEK ( -- n ) MCM_FIRST  15  + ; inline
+: MCM_GETFIRSTDAYOFWEEK ( -- n ) MCM_FIRST  16  + ; inline
+: MCM_GETRANGE ( -- n ) MCM_FIRST  17  + ; inline
+: MCM_SETRANGE ( -- n ) MCM_FIRST  18  + ; inline
+: MCM_GETMONTHDELTA ( -- n ) MCM_FIRST  19  + ; inline
+: MCM_SETMONTHDELTA ( -- n ) MCM_FIRST  20  + ; inline
+: MCM_GETMAXTODAYWIDTH ( -- n ) MCM_FIRST  21  + ; inline
+ALIAS: MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
+ALIAS: MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
+CONSTANT: DTM_FIRST HEX: 1000
+: DTM_GETSYSTEMTIME ( -- n ) DTM_FIRST  1  + ; inline
+: DTM_SETSYSTEMTIME ( -- n ) DTM_FIRST  2  + ; inline
+: DTM_GETRANGE ( -- n ) DTM_FIRST  3  + ; inline
+: DTM_SETRANGE ( -- n ) DTM_FIRST  4  + ; inline
+: DTM_SETFORMATA ( -- n ) DTM_FIRST  5  + ; inline
+: DTM_SETFORMATW ( -- n ) DTM_FIRST  50  + ; inline
+: DTM_SETMCCOLOR ( -- n ) DTM_FIRST  6  + ; inline
+: DTM_GETMCCOLOR ( -- n ) DTM_FIRST  7  + ; inline
+: DTM_GETMONTHCAL ( -- n ) DTM_FIRST  8  + ; inline
+: DTM_SETMCFONT ( -- n ) DTM_FIRST  9  + ; inline
+: DTM_GETMCFONT ( -- n ) DTM_FIRST  10  + ; inline
+: PGM_SETCHILD ( -- n ) PGM_FIRST  1  + ; inline
+: PGM_RECALCSIZE ( -- n ) PGM_FIRST  2  + ; inline
+: PGM_FORWARDMOUSE ( -- n ) PGM_FIRST  3  + ; inline
+: PGM_SETBKCOLOR ( -- n ) PGM_FIRST  4  + ; inline
+: PGM_GETBKCOLOR ( -- n ) PGM_FIRST  5  + ; inline
+: PGM_SETBORDER ( -- n ) PGM_FIRST  6  + ; inline
+: PGM_GETBORDER ( -- n ) PGM_FIRST  7  + ; inline
+: PGM_SETPOS ( -- n ) PGM_FIRST  8  + ; inline
+: PGM_GETPOS ( -- n ) PGM_FIRST  9  + ; inline
+: PGM_SETBUTTONSIZE ( -- n ) PGM_FIRST  10  + ; inline
+: PGM_GETBUTTONSIZE ( -- n ) PGM_FIRST  11  + ; inline
+: PGM_GETBUTTONSTATE ( -- n ) PGM_FIRST  12  + ; inline
+CONSTANT: PGM_GETDROPTARGET CCM_GETDROPTARGET
+: BCM_GETIDEALSIZE ( -- n ) BCM_FIRST  1  + ; inline
+: BCM_SETIMAGELIST ( -- n ) BCM_FIRST  2  + ; inline
+: BCM_GETIMAGELIST ( -- n ) BCM_FIRST  3  + ; inline
+: BCM_SETTEXTMARGIN ( -- n ) BCM_FIRST 4  + ; inline
+: BCM_GETTEXTMARGIN ( -- n ) BCM_FIRST 5  + ; inline
+: EM_SETCUEBANNER ( -- n ) ECM_FIRST  1 +  ; inline
+: EM_GETCUEBANNER ( -- n ) ECM_FIRST  2 +  ; inline
+: EM_SHOWBALLOONTIP ( -- n ) ECM_FIRST  3  + ; inline
+: EM_HIDEBALLOONTIP ( -- n ) ECM_FIRST  4  + ; inline
+: CB_SETMINVISIBLE ( -- n ) CBM_FIRST  1  + ; inline
+: CB_GETMINVISIBLE ( -- n ) CBM_FIRST  2  + ; inline
+: LM_HITTEST ( -- n ) WM_USER  HEX: 0300  + ; inline
+: LM_GETIDEALHEIGHT ( -- n ) WM_USER  HEX: 0301  + ; inline
+: LM_SETITEM ( -- n ) WM_USER  HEX: 0302  + ; inline
+: LM_GETITEM ( -- n ) WM_USER  HEX: 0303  + ; inline
 
 
-: WA_INACTIVE 0 ; inline
-: WA_ACTIVE 1 ; inline
-: WA_CLICKACTIVE 2 ; inline
 
-: SC_SIZE         HEX: f000 ; inline
-: SC_MOVE         HEX: f010 ; inline
-: SC_MINIMIZE     HEX: f020 ; inline
-: SC_MAXIMIZE     HEX: f030 ; inline
-: SC_NEXTWINDOW   HEX: f040 ; inline
-: SC_PREVWINDOW   HEX: f050 ; inline
-: SC_CLOSE        HEX: f060 ; inline
-: SC_VSCROLL      HEX: f070 ; inline
-: SC_HSCROLL      HEX: f080 ; inline
-: SC_MOUSEMENU    HEX: f090 ; inline
-: SC_KEYMENU      HEX: f100 ; inline
-: SC_ARRANGE      HEX: f110 ; inline
-: SC_RESTORE      HEX: f120 ; inline
-: SC_TASKLIST     HEX: f130 ; inline
-: SC_SCREENSAVE   HEX: f140 ; inline
-: SC_HOTKEY       HEX: f150 ; inline
+CONSTANT: WA_INACTIVE 0
+CONSTANT: WA_ACTIVE 1
+CONSTANT: WA_CLICKACTIVE 2
+
+CONSTANT: SC_SIZE         HEX: f000
+CONSTANT: SC_MOVE         HEX: f010
+CONSTANT: SC_MINIMIZE     HEX: f020
+CONSTANT: SC_MAXIMIZE     HEX: f030
+CONSTANT: SC_NEXTWINDOW   HEX: f040
+CONSTANT: SC_PREVWINDOW   HEX: f050
+CONSTANT: SC_CLOSE        HEX: f060
+CONSTANT: SC_VSCROLL      HEX: f070
+CONSTANT: SC_HSCROLL      HEX: f080
+CONSTANT: SC_MOUSEMENU    HEX: f090
+CONSTANT: SC_KEYMENU      HEX: f100
+CONSTANT: SC_ARRANGE      HEX: f110
+CONSTANT: SC_RESTORE      HEX: f120
+CONSTANT: SC_TASKLIST     HEX: f130
+CONSTANT: SC_SCREENSAVE   HEX: f140
+CONSTANT: SC_HOTKEY       HEX: f150
index 6d4e60ab22ff80d69a1ba0acd5603fc6a9250fce..05a306640d7a3bccfc1b1a9f9181c6dc8750f349 100755 (executable)
@@ -131,7 +131,7 @@ M: ole32-error error.
 : guid= ( a b -- ? )
     [ 16 memory>byte-array ] bi@ = ;
 
-: GUID-STRING-LENGTH
+: GUID-STRING-LENGTH ( -- n )
     "{01234567-89ab-cdef-0123-456789abcdef}" length ; inline
 
 :: (guid-section>guid) ( string guid start end quot -- )
index eae796ac0876e3fe769c47e5c5ddffddc0758c21..6d1c7b1a366b8946872f93c2d622ddea5fc7a113 100644 (file)
@@ -1,97 +1,97 @@
-USING: alien alien.c-types alien.strings alien.syntax combinators
-kernel windows windows.user32 windows.ole32
-windows.com windows.com.syntax io.files io.encodings.utf16n ;
+! Copyright (C) 2006, 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: alien alien.c-types alien.strings alien.syntax
+combinators io.encodings.utf16n io.files io.pathnames kernel
+windows windows.com windows.com.syntax windows.user32
+windows.ole32 ;
 IN: windows.shell32
 
-: CSIDL_DESKTOP HEX: 00 ; inline
-: CSIDL_INTERNET HEX: 01 ; inline
-: CSIDL_PROGRAMS HEX: 02 ; inline
-: CSIDL_CONTROLS HEX: 03 ; inline
-: CSIDL_PRINTERS HEX: 04 ; inline
-: CSIDL_PERSONAL HEX: 05 ; inline
-: CSIDL_FAVORITES HEX: 06 ; inline
-: CSIDL_STARTUP HEX: 07 ; inline
-: CSIDL_RECENT HEX: 08 ; inline
-: CSIDL_SENDTO HEX: 09 ; inline
-: CSIDL_BITBUCKET HEX: 0a ; inline
-: CSIDL_STARTMENU HEX: 0b ; inline
-: CSIDL_MYDOCUMENTS HEX: 0c ; inline
-: CSIDL_MYMUSIC HEX: 0d ; inline
-: CSIDL_MYVIDEO HEX: 0e ; inline
-: CSIDL_DESKTOPDIRECTORY HEX: 10 ; inline
-: CSIDL_DRIVES HEX: 11 ; inline
-: CSIDL_NETWORK HEX: 12 ; inline
-: CSIDL_NETHOOD HEX: 13 ; inline
-: CSIDL_FONTS HEX: 14 ; inline
-: CSIDL_TEMPLATES HEX: 15 ; inline
-: CSIDL_COMMON_STARTMENU HEX: 16 ; inline
-: CSIDL_COMMON_PROGRAMS HEX: 17 ; inline
-: CSIDL_COMMON_STARTUP HEX: 18 ; inline
-: CSIDL_COMMON_DESKTOPDIRECTORY HEX: 19 ; inline
-: CSIDL_APPDATA HEX: 1a ; inline
-: CSIDL_PRINTHOOD HEX: 1b ; inline
-: CSIDL_LOCAL_APPDATA HEX: 1c ; inline
-: CSIDL_ALTSTARTUP HEX: 1d ; inline
-: CSIDL_COMMON_ALTSTARTUP HEX: 1e ; inline
-: CSIDL_COMMON_FAVORITES HEX: 1f ; inline
-: CSIDL_INTERNET_CACHE HEX: 20 ; inline
-: CSIDL_COOKIES HEX: 21 ; inline
-: CSIDL_HISTORY HEX: 22 ; inline
-: CSIDL_COMMON_APPDATA HEX: 23 ; inline
-: CSIDL_WINDOWS HEX: 24 ; inline
-: CSIDL_SYSTEM HEX: 25 ; inline
-: CSIDL_PROGRAM_FILES HEX: 26 ; inline
-: CSIDL_MYPICTURES HEX: 27 ; inline
-: CSIDL_PROFILE HEX: 28 ; inline
-: CSIDL_SYSTEMX86 HEX: 29 ; inline
-: CSIDL_PROGRAM_FILESX86 HEX: 2a ; inline
-: CSIDL_PROGRAM_FILES_COMMON HEX: 2b ; inline
-: CSIDL_PROGRAM_FILES_COMMONX86 HEX: 2c ; inline
-: CSIDL_COMMON_TEMPLATES HEX: 2d ; inline
-: CSIDL_COMMON_DOCUMENTS HEX: 2e ; inline
-: CSIDL_COMMON_ADMINTOOLS HEX: 2f ; inline
-: CSIDL_ADMINTOOLS HEX: 30 ; inline
-: CSIDL_CONNECTIONS HEX: 31 ; inline
-: CSIDL_COMMON_MUSIC HEX: 35 ; inline
-: CSIDL_COMMON_PICTURES HEX: 36 ; inline
-: CSIDL_COMMON_VIDEO HEX: 37 ; inline
-: CSIDL_RESOURCES HEX: 38 ; inline
-: CSIDL_RESOURCES_LOCALIZED HEX: 39 ; inline
-: CSIDL_COMMON_OEM_LINKS HEX: 3a ; inline
-: CSIDL_CDBURN_AREA HEX: 3b ; inline
-: CSIDL_COMPUTERSNEARME HEX: 3d ; inline
-: CSIDL_PROFILES HEX: 3e ; inline
-: CSIDL_FOLDER_MASK HEX: ff ; inline
-: CSIDL_FLAG_PER_USER_INIT HEX: 800 ; inline
-: CSIDL_FLAG_NO_ALIAS HEX: 1000 ; inline
-: CSIDL_FLAG_DONT_VERIFY HEX: 4000 ; inline
-: CSIDL_FLAG_CREATE HEX: 8000 ; inline
-: CSIDL_FLAG_MASK HEX: ff00 ; inline
-
-
-: ERROR_FILE_NOT_FOUND 2 ; inline
-
-: SHGFP_TYPE_CURRENT 0 ; inline
-: SHGFP_TYPE_DEFAULT 1 ; inline
+CONSTANT: CSIDL_DESKTOP HEX: 00
+CONSTANT: CSIDL_INTERNET HEX: 01
+CONSTANT: CSIDL_PROGRAMS HEX: 02
+CONSTANT: CSIDL_CONTROLS HEX: 03
+CONSTANT: CSIDL_PRINTERS HEX: 04
+CONSTANT: CSIDL_PERSONAL HEX: 05
+CONSTANT: CSIDL_FAVORITES HEX: 06
+CONSTANT: CSIDL_STARTUP HEX: 07
+CONSTANT: CSIDL_RECENT HEX: 08
+CONSTANT: CSIDL_SENDTO HEX: 09
+CONSTANT: CSIDL_BITBUCKET HEX: 0a
+CONSTANT: CSIDL_STARTMENU HEX: 0b
+CONSTANT: CSIDL_MYDOCUMENTS HEX: 0c
+CONSTANT: CSIDL_MYMUSIC HEX: 0d
+CONSTANT: CSIDL_MYVIDEO HEX: 0e
+CONSTANT: CSIDL_DESKTOPDIRECTORY HEX: 10
+CONSTANT: CSIDL_DRIVES HEX: 11
+CONSTANT: CSIDL_NETWORK HEX: 12
+CONSTANT: CSIDL_NETHOOD HEX: 13
+CONSTANT: CSIDL_FONTS HEX: 14
+CONSTANT: CSIDL_TEMPLATES HEX: 15
+CONSTANT: CSIDL_COMMON_STARTMENU HEX: 16
+CONSTANT: CSIDL_COMMON_PROGRAMS HEX: 17
+CONSTANT: CSIDL_COMMON_STARTUP HEX: 18
+CONSTANT: CSIDL_COMMON_DESKTOPDIRECTORY HEX: 19
+CONSTANT: CSIDL_APPDATA HEX: 1a
+CONSTANT: CSIDL_PRINTHOOD HEX: 1b
+CONSTANT: CSIDL_LOCAL_APPDATA HEX: 1c
+CONSTANT: CSIDL_ALTSTARTUP HEX: 1d
+CONSTANT: CSIDL_COMMON_ALTSTARTUP HEX: 1e
+CONSTANT: CSIDL_COMMON_FAVORITES HEX: 1f
+CONSTANT: CSIDL_INTERNET_CACHE HEX: 20
+CONSTANT: CSIDL_COOKIES HEX: 21
+CONSTANT: CSIDL_HISTORY HEX: 22
+CONSTANT: CSIDL_COMMON_APPDATA HEX: 23
+CONSTANT: CSIDL_WINDOWS HEX: 24
+CONSTANT: CSIDL_SYSTEM HEX: 25
+CONSTANT: CSIDL_PROGRAM_FILES HEX: 26
+CONSTANT: CSIDL_MYPICTURES HEX: 27
+CONSTANT: CSIDL_PROFILE HEX: 28
+CONSTANT: CSIDL_SYSTEMX86 HEX: 29
+CONSTANT: CSIDL_PROGRAM_FILESX86 HEX: 2a
+CONSTANT: CSIDL_PROGRAM_FILES_COMMON HEX: 2b
+CONSTANT: CSIDL_PROGRAM_FILES_COMMONX86 HEX: 2c
+CONSTANT: CSIDL_COMMON_TEMPLATES HEX: 2d
+CONSTANT: CSIDL_COMMON_DOCUMENTS HEX: 2e
+CONSTANT: CSIDL_COMMON_ADMINTOOLS HEX: 2f
+CONSTANT: CSIDL_ADMINTOOLS HEX: 30
+CONSTANT: CSIDL_CONNECTIONS HEX: 31
+CONSTANT: CSIDL_COMMON_MUSIC HEX: 35
+CONSTANT: CSIDL_COMMON_PICTURES HEX: 36
+CONSTANT: CSIDL_COMMON_VIDEO HEX: 37
+CONSTANT: CSIDL_RESOURCES HEX: 38
+CONSTANT: CSIDL_RESOURCES_LOCALIZED HEX: 39
+CONSTANT: CSIDL_COMMON_OEM_LINKS HEX: 3a
+CONSTANT: CSIDL_CDBURN_AREA HEX: 3b
+CONSTANT: CSIDL_COMPUTERSNEARME HEX: 3d
+CONSTANT: CSIDL_PROFILES HEX: 3e
+CONSTANT: CSIDL_FOLDER_MASK HEX: ff
+CONSTANT: CSIDL_FLAG_PER_USER_INIT HEX: 800
+CONSTANT: CSIDL_FLAG_NO_ALIAS HEX: 1000
+CONSTANT: CSIDL_FLAG_DONT_VERIFY HEX: 4000
+CONSTANT: CSIDL_FLAG_CREATE HEX: 8000
+CONSTANT: CSIDL_FLAG_MASK HEX: ff00
+
+
+CONSTANT: ERROR_FILE_NOT_FOUND 2
+
+CONSTANT: SHGFP_TYPE_CURRENT 0
+CONSTANT: SHGFP_TYPE_DEFAULT 1
 
 LIBRARY: shell32
 
 FUNCTION: HRESULT SHGetFolderPathW ( HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPTSTR pszPath ) ;
-: SHGetFolderPath SHGetFolderPathW ; inline
+ALIAS: SHGetFolderPath SHGetFolderPathW
 
 FUNCTION: HINSTANCE ShellExecuteW ( HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory, INT nShowCmd ) ;
-: ShellExecute ShellExecuteW ; inline
+ALIAS: ShellExecute ShellExecuteW
 
 : open-in-explorer ( dir -- )
     f "open" rot (normalize-path) f f SW_SHOWNORMAL ShellExecute drop ;
 
-: shell32-error ( n -- )
-    ole32-error ; inline
-
 : shell32-directory ( n -- str )
     f swap f SHGFP_TYPE_DEFAULT
     MAX_UNICODE_PATH "ushort" <c-array>
-    [ SHGetFolderPath shell32-error ] keep utf16n alien>string ;
+    [ SHGetFolderPath drop ] keep utf16n alien>string ;
 
 : desktop ( -- str )
     CSIDL_DESKTOPDIRECTORY shell32-directory ;
@@ -102,7 +102,7 @@ FUNCTION: HINSTANCE ShellExecuteW ( HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFi
 : application-data ( -- str )
     CSIDL_APPDATA shell32-directory ;
 
-: windows ( -- str )
+: windows-directory ( -- str )
     CSIDL_WINDOWS shell32-directory ;
 
 : programs ( -- str )
@@ -120,50 +120,50 @@ FUNCTION: HINSTANCE ShellExecuteW ( HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFi
 : program-files-common-x86 ( -- str )
     CSIDL_PROGRAM_FILES_COMMONX86 shell32-directory ;
 
-: SHCONTF_FOLDERS 32 ; inline
-: SHCONTF_NONFOLDERS 64 ; inline
-: SHCONTF_INCLUDEHIDDEN 128 ; inline
-: SHCONTF_INIT_ON_FIRST_NEXT 256 ; inline
-: SHCONTF_NETPRINTERSRCH 512 ; inline
-: SHCONTF_SHAREABLE 1024 ; inline
-: SHCONTF_STORAGE 2048 ; inline
+CONSTANT: SHCONTF_FOLDERS 32
+CONSTANT: SHCONTF_NONFOLDERS 64
+CONSTANT: SHCONTF_INCLUDEHIDDEN 128
+CONSTANT: SHCONTF_INIT_ON_FIRST_NEXT 256
+CONSTANT: SHCONTF_NETPRINTERSRCH 512
+CONSTANT: SHCONTF_SHAREABLE 1024
+CONSTANT: SHCONTF_STORAGE 2048
 
 TYPEDEF: DWORD SHCONTF
 
-: SHGDN_NORMAL 0 ; inline
-: SHGDN_INFOLDER 1 ; inline
-: SHGDN_FOREDITING HEX: 1000 ; inline
-: SHGDN_INCLUDE_NONFILESYS HEX: 2000 ; inline
-: SHGDN_FORADDRESSBAR HEX: 4000 ; inline
-: SHGDN_FORPARSING HEX: 8000 ; inline
+CONSTANT: SHGDN_NORMAL 0
+CONSTANT: SHGDN_INFOLDER 1
+CONSTANT: SHGDN_FOREDITING HEX: 1000
+CONSTANT: SHGDN_INCLUDE_NONFILESYS HEX: 2000
+CONSTANT: SHGDN_FORADDRESSBAR HEX: 4000
+CONSTANT: SHGDN_FORPARSING HEX: 8000
 
 TYPEDEF: DWORD SHGDNF
 
-: SFGAO_CANCOPY           DROPEFFECT_COPY ; inline
-: SFGAO_CANMOVE           DROPEFFECT_MOVE ; inline
-: SFGAO_CANLINK           DROPEFFECT_LINK ; inline
-: SFGAO_CANRENAME         HEX: 00000010 ; inline
-: SFGAO_CANDELETE         HEX: 00000020 ; inline
-: SFGAO_HASPROPSHEET      HEX: 00000040 ; inline
-: SFGAO_DROPTARGET        HEX: 00000100 ; inline
-: SFGAO_CAPABILITYMASK    HEX: 00000177 ; inline
-: SFGAO_LINK              HEX: 00010000 ; inline
-: SFGAO_SHARE             HEX: 00020000 ; inline
-: SFGAO_READONLY          HEX: 00040000 ; inline
-: SFGAO_GHOSTED           HEX: 00080000 ; inline
-: SFGAO_HIDDEN            HEX: 00080000 ; inline
-: SFGAO_DISPLAYATTRMASK   HEX: 000F0000 ; inline
-: SFGAO_FILESYSANCESTOR   HEX: 10000000 ; inline
-: SFGAO_FOLDER            HEX: 20000000 ; inline
-: SFGAO_FILESYSTEM        HEX: 40000000 ; inline
-: SFGAO_HASSUBFOLDER      HEX: 80000000 ; inline
-: SFGAO_CONTENTSMASK      HEX: 80000000 ; inline
-: SFGAO_VALIDATE          HEX: 01000000 ; inline
-: SFGAO_REMOVABLE         HEX: 02000000 ; inline
-: SFGAO_COMPRESSED        HEX: 04000000 ; inline
-: SFGAO_BROWSABLE         HEX: 08000000 ; inline
-: SFGAO_NONENUMERATED     HEX: 00100000 ; inline
-: SFGAO_NEWCONTENT        HEX: 00200000 ; inline
+ALIAS: SFGAO_CANCOPY           DROPEFFECT_COPY
+ALIAS: SFGAO_CANMOVE           DROPEFFECT_MOVE
+ALIAS: SFGAO_CANLINK           DROPEFFECT_LINK
+CONSTANT: SFGAO_CANRENAME         HEX: 00000010
+CONSTANT: SFGAO_CANDELETE         HEX: 00000020
+CONSTANT: SFGAO_HASPROPSHEET      HEX: 00000040
+CONSTANT: SFGAO_DROPTARGET        HEX: 00000100
+CONSTANT: SFGAO_CAPABILITYMASK    HEX: 00000177
+CONSTANT: SFGAO_LINK              HEX: 00010000
+CONSTANT: SFGAO_SHARE             HEX: 00020000
+CONSTANT: SFGAO_READONLY          HEX: 00040000
+CONSTANT: SFGAO_GHOSTED           HEX: 00080000
+CONSTANT: SFGAO_HIDDEN            HEX: 00080000
+CONSTANT: SFGAO_DISPLAYATTRMASK   HEX: 000F0000
+CONSTANT: SFGAO_FILESYSANCESTOR   HEX: 10000000
+CONSTANT: SFGAO_FOLDER            HEX: 20000000
+CONSTANT: SFGAO_FILESYSTEM        HEX: 40000000
+CONSTANT: SFGAO_HASSUBFOLDER      HEX: 80000000
+CONSTANT: SFGAO_CONTENTSMASK      HEX: 80000000
+CONSTANT: SFGAO_VALIDATE          HEX: 01000000
+CONSTANT: SFGAO_REMOVABLE         HEX: 02000000
+CONSTANT: SFGAO_COMPRESSED        HEX: 04000000
+CONSTANT: SFGAO_BROWSABLE         HEX: 08000000
+CONSTANT: SFGAO_NONENUMERATED     HEX: 00100000
+CONSTANT: SFGAO_NEWCONTENT        HEX: 00200000
 
 TYPEDEF: ULONG SFGAOF
 
@@ -220,5 +220,4 @@ COM-INTERFACE: IShellFolder IUnknown {000214E6-0000-0000-C000-000000000046}
 FUNCTION: HRESULT SHGetDesktopFolder ( IShellFolder** ppshf ) ;
 
 FUNCTION: UINT DragQueryFileW ( HDROP hDrop, UINT iFile, LPWSTR lpszFile, UINT cch ) ;
-: DragQueryFile DragQueryFileW ; inline
-
+ALIAS: DragQueryFile DragQueryFileW
index 5e23f8cc01e29df59b7dc96bc6239976d6fb88fe..e63834d3695801278f3a78f6234cf6ec564c59ab 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2007 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.c-types kernel math windows windows.kernel32
-namespaces calendar ;
+namespaces calendar math.bitwise ;
 IN: windows.time
 
 : >64bit ( lo hi -- n )
@@ -11,8 +11,9 @@ IN: windows.time
     1601 1 1 0 0 0 instant <timestamp> ;
 
 : FILETIME>windows-time ( FILETIME -- n )
-    [ FILETIME-dwLowDateTime ] keep
-    FILETIME-dwHighDateTime >64bit ;
+    [ FILETIME-dwLowDateTime ]
+    [ FILETIME-dwHighDateTime ]
+    bi >64bit ;
 
 : windows-time>timestamp ( n -- timestamp )
     10000000 /i seconds windows-1601 swap time+ ;
@@ -28,12 +29,12 @@ IN: windows.time
 : windows-time>FILETIME ( n -- FILETIME )
     "FILETIME" <c-object>
     [
-        [ >r HEX: ffffffff bitand r> set-FILETIME-dwLowDateTime ] 2keep
-        >r -32 shift r> set-FILETIME-dwHighDateTime
+        [ [ 32 bits ] dip set-FILETIME-dwLowDateTime ]
+        [ [ -32 shift ] dip set-FILETIME-dwHighDateTime ] 2bi
     ] keep ;
 
 : timestamp>FILETIME ( timestamp -- FILETIME/f )
-    [ >gmt timestamp>windows-time windows-time>FILETIME ] [ f ] if* ;
+    dup [ >gmt timestamp>windows-time windows-time>FILETIME ] when ;
 
 : FILETIME>timestamp ( FILETIME -- timestamp/f )
     FILETIME>windows-time windows-time>timestamp ;
index e5c9f962751061fd1c130df58da72442804da47b..e2e2c7e1502c65e5556950aed6d188d437bcf83f 100644 (file)
@@ -1,35 +1,35 @@
 ! Copyright (C) 2005, 2006 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.syntax parser namespaces kernel math
-windows.types generalizations math.bitwise alias ;
+windows.types generalizations math.bitwise ;
 IN: windows.user32
 
 ! HKL for ActivateKeyboardLayout
-: HKL_PREV 0 ; inline
-: HKL_NEXT 1 ; inline
-
-: CW_USEDEFAULT HEX: 80000000 ; inline
-
-: WS_OVERLAPPED       HEX: 00000000 ; inline
-: WS_POPUP            HEX: 80000000 ; inline
-: WS_CHILD            HEX: 40000000 ; inline
-: WS_MINIMIZE         HEX: 20000000 ; inline
-: WS_VISIBLE          HEX: 10000000 ; inline
-: WS_DISABLED         HEX: 08000000 ; inline
-: WS_CLIPSIBLINGS     HEX: 04000000 ; inline
-: WS_CLIPCHILDREN     HEX: 02000000 ; inline
-: WS_MAXIMIZE         HEX: 01000000 ; inline
-: WS_CAPTION          HEX: 00C00000 ; inline
-: WS_BORDER           HEX: 00800000 ; inline
-: WS_DLGFRAME         HEX: 00400000 ; inline
-: WS_VSCROLL          HEX: 00200000 ; inline
-: WS_HSCROLL          HEX: 00100000 ; inline
-: WS_SYSMENU          HEX: 00080000 ; inline
-: WS_THICKFRAME       HEX: 00040000 ; inline
-: WS_GROUP            HEX: 00020000 ; inline
-: WS_TABSTOP          HEX: 00010000 ; inline
-: WS_MINIMIZEBOX      HEX: 00020000 ; inline
-: WS_MAXIMIZEBOX      HEX: 00010000 ; inline
+CONSTANT: HKL_PREV 0
+CONSTANT: HKL_NEXT 1
+
+CONSTANT: CW_USEDEFAULT HEX: 80000000
+
+CONSTANT: WS_OVERLAPPED       HEX: 00000000
+CONSTANT: WS_POPUP            HEX: 80000000
+CONSTANT: WS_CHILD            HEX: 40000000
+CONSTANT: WS_MINIMIZE         HEX: 20000000
+CONSTANT: WS_VISIBLE          HEX: 10000000
+CONSTANT: WS_DISABLED         HEX: 08000000
+CONSTANT: WS_CLIPSIBLINGS     HEX: 04000000
+CONSTANT: WS_CLIPCHILDREN     HEX: 02000000
+CONSTANT: WS_MAXIMIZE         HEX: 01000000
+CONSTANT: WS_CAPTION          HEX: 00C00000
+CONSTANT: WS_BORDER           HEX: 00800000
+CONSTANT: WS_DLGFRAME         HEX: 00400000
+CONSTANT: WS_VSCROLL          HEX: 00200000
+CONSTANT: WS_HSCROLL          HEX: 00100000
+CONSTANT: WS_SYSMENU          HEX: 00080000
+CONSTANT: WS_THICKFRAME       HEX: 00040000
+CONSTANT: WS_GROUP            HEX: 00020000
+CONSTANT: WS_TABSTOP          HEX: 00010000
+CONSTANT: WS_MINIMIZEBOX      HEX: 00020000
+CONSTANT: WS_MAXIMIZEBOX      HEX: 00010000
 
 ! Common window styles
 : WS_OVERLAPPEDWINDOW ( -- n )
@@ -45,102 +45,102 @@ IN: windows.user32
 : WS_POPUPWINDOW ( -- n )
     { WS_POPUP WS_BORDER WS_SYSMENU } flags ; foldable
 
-: WS_CHILDWINDOW      WS_CHILD ; inline
+ALIAS: WS_CHILDWINDOW      WS_CHILD
 
-: WS_TILED            WS_OVERLAPPED ; inline
-: WS_ICONIC           WS_MINIMIZE ; inline
-: WS_SIZEBOX          WS_THICKFRAME ; inline
-: WS_TILEDWINDOW WS_OVERLAPPEDWINDOW ; inline
+ALIAS: WS_TILED            WS_OVERLAPPED
+ALIAS: WS_ICONIC           WS_MINIMIZE
+ALIAS: WS_SIZEBOX          WS_THICKFRAME
+ALIAS: WS_TILEDWINDOW WS_OVERLAPPEDWINDOW
 
 ! Extended window styles
 
-: WS_EX_DLGMODALFRAME     HEX: 00000001 ; inline
-: WS_EX_NOPARENTNOTIFY    HEX: 00000004 ; inline
-: WS_EX_TOPMOST           HEX: 00000008 ; inline
-: WS_EX_ACCEPTFILES       HEX: 00000010 ; inline
-: WS_EX_TRANSPARENT       HEX: 00000020 ; inline
-: WS_EX_MDICHILD          HEX: 00000040 ; inline
-: WS_EX_TOOLWINDOW        HEX: 00000080 ; inline
-: WS_EX_WINDOWEDGE        HEX: 00000100 ; inline
-: WS_EX_CLIENTEDGE        HEX: 00000200 ; inline
-: WS_EX_CONTEXTHELP       HEX: 00000400 ; inline
-
-: WS_EX_RIGHT             HEX: 00001000 ; inline
-: WS_EX_LEFT              HEX: 00000000 ; inline
-: WS_EX_RTLREADING        HEX: 00002000 ; inline
-: WS_EX_LTRREADING        HEX: 00000000 ; inline
-: WS_EX_LEFTSCROLLBAR     HEX: 00004000 ; inline
-: WS_EX_RIGHTSCROLLBAR    HEX: 00000000 ; inline
-: WS_EX_CONTROLPARENT     HEX: 00010000 ; inline
-: WS_EX_STATICEDGE        HEX: 00020000 ; inline
-: WS_EX_APPWINDOW         HEX: 00040000 ; inline
+CONSTANT: WS_EX_DLGMODALFRAME     HEX: 00000001
+CONSTANT: WS_EX_NOPARENTNOTIFY    HEX: 00000004
+CONSTANT: WS_EX_TOPMOST           HEX: 00000008
+CONSTANT: WS_EX_ACCEPTFILES       HEX: 00000010
+CONSTANT: WS_EX_TRANSPARENT       HEX: 00000020
+CONSTANT: WS_EX_MDICHILD          HEX: 00000040
+CONSTANT: WS_EX_TOOLWINDOW        HEX: 00000080
+CONSTANT: WS_EX_WINDOWEDGE        HEX: 00000100
+CONSTANT: WS_EX_CLIENTEDGE        HEX: 00000200
+CONSTANT: WS_EX_CONTEXTHELP       HEX: 00000400
+
+CONSTANT: WS_EX_RIGHT             HEX: 00001000
+CONSTANT: WS_EX_LEFT              HEX: 00000000
+CONSTANT: WS_EX_RTLREADING        HEX: 00002000
+CONSTANT: WS_EX_LTRREADING        HEX: 00000000
+CONSTANT: WS_EX_LEFTSCROLLBAR     HEX: 00004000
+CONSTANT: WS_EX_RIGHTSCROLLBAR    HEX: 00000000
+CONSTANT: WS_EX_CONTROLPARENT     HEX: 00010000
+CONSTANT: WS_EX_STATICEDGE        HEX: 00020000
+CONSTANT: WS_EX_APPWINDOW         HEX: 00040000
 : WS_EX_OVERLAPPEDWINDOW ( -- n )
     WS_EX_WINDOWEDGE WS_EX_CLIENTEDGE bitor ; foldable
 : WS_EX_PALETTEWINDOW ( -- n )
     { WS_EX_WINDOWEDGE WS_EX_TOOLWINDOW WS_EX_TOPMOST } flags ; foldable
 
-: CS_VREDRAW          HEX: 0001 ; inline
-: CS_HREDRAW          HEX: 0002 ; inline
-: CS_DBLCLKS          HEX: 0008 ; inline
-: CS_OWNDC            HEX: 0020 ; inline
-: CS_CLASSDC          HEX: 0040 ; inline
-: CS_PARENTDC         HEX: 0080 ; inline
-: CS_NOCLOSE          HEX: 0200 ; inline
-: CS_SAVEBITS         HEX: 0800 ; inline
-: CS_BYTEALIGNCLIENT  HEX: 1000 ; inline
-: CS_BYTEALIGNWINDOW  HEX: 2000 ; inline
-: CS_GLOBALCLASS      HEX: 4000 ; inline
-
-: COLOR_SCROLLBAR         0 ; inline
-: COLOR_BACKGROUND        1 ; inline
-: COLOR_ACTIVECAPTION     2 ; inline
-: COLOR_INACTIVECAPTION   3 ; inline
-: COLOR_MENU              4 ; inline
-: COLOR_WINDOW            5 ; inline
-: COLOR_WINDOWFRAME       6 ; inline
-: COLOR_MENUTEXT          7 ; inline
-: COLOR_WINDOWTEXT        8 ; inline
-: COLOR_CAPTIONTEXT       9 ; inline
-: COLOR_ACTIVEBORDER      10 ; inline
-: COLOR_INACTIVEBORDER    11 ; inline
-: COLOR_APPWORKSPACE      12 ; inline
-: COLOR_HIGHLIGHT         13 ; inline
-: COLOR_HIGHLIGHTTEXT     14 ; inline
-: COLOR_BTNFACE           15 ; inline
-: COLOR_BTNSHADOW         16 ; inline
-: COLOR_GRAYTEXT          17 ; inline
-: COLOR_BTNTEXT           18 ; inline
-: COLOR_INACTIVECAPTIONTEXT 19 ; inline
-: COLOR_BTNHIGHLIGHT      20 ; inline
-
-: IDI_APPLICATION     32512 ; inline
-: IDI_HAND            32513 ; inline
-: IDI_QUESTION        32514 ; inline
-: IDI_EXCLAMATION     32515 ; inline
-: IDI_ASTERISK        32516 ; inline
-: IDI_WINLOGO         32517 ; inline
+CONSTANT: CS_VREDRAW          HEX: 0001
+CONSTANT: CS_HREDRAW          HEX: 0002
+CONSTANT: CS_DBLCLKS          HEX: 0008
+CONSTANT: CS_OWNDC            HEX: 0020
+CONSTANT: CS_CLASSDC          HEX: 0040
+CONSTANT: CS_PARENTDC         HEX: 0080
+CONSTANT: CS_NOCLOSE          HEX: 0200
+CONSTANT: CS_SAVEBITS         HEX: 0800
+CONSTANT: CS_BYTEALIGNCLIENT  HEX: 1000
+CONSTANT: CS_BYTEALIGNWINDOW  HEX: 2000
+CONSTANT: CS_GLOBALCLASS      HEX: 4000
+
+CONSTANT: COLOR_SCROLLBAR         0
+CONSTANT: COLOR_BACKGROUND        1
+CONSTANT: COLOR_ACTIVECAPTION     2
+CONSTANT: COLOR_INACTIVECAPTION   3
+CONSTANT: COLOR_MENU              4
+CONSTANT: COLOR_WINDOW            5
+CONSTANT: COLOR_WINDOWFRAME       6
+CONSTANT: COLOR_MENUTEXT          7
+CONSTANT: COLOR_WINDOWTEXT        8
+CONSTANT: COLOR_CAPTIONTEXT       9
+CONSTANT: COLOR_ACTIVEBORDER      10
+CONSTANT: COLOR_INACTIVEBORDER    11
+CONSTANT: COLOR_APPWORKSPACE      12
+CONSTANT: COLOR_HIGHLIGHT         13
+CONSTANT: COLOR_HIGHLIGHTTEXT     14
+CONSTANT: COLOR_BTNFACE           15
+CONSTANT: COLOR_BTNSHADOW         16
+CONSTANT: COLOR_GRAYTEXT          17
+CONSTANT: COLOR_BTNTEXT           18
+CONSTANT: COLOR_INACTIVECAPTIONTEXT 19
+CONSTANT: COLOR_BTNHIGHLIGHT      20
+
+CONSTANT: IDI_APPLICATION     32512
+CONSTANT: IDI_HAND            32513
+CONSTANT: IDI_QUESTION        32514
+CONSTANT: IDI_EXCLAMATION     32515
+CONSTANT: IDI_ASTERISK        32516
+CONSTANT: IDI_WINLOGO         32517
 
 ! ShowWindow() Commands
-: SW_HIDE             0 ; inline
-: SW_SHOWNORMAL       1 ; inline
-: SW_NORMAL           1 ; inline
-: SW_SHOWMINIMIZED    2 ; inline
-: SW_SHOWMAXIMIZED    3 ; inline
-: SW_MAXIMIZE         3 ; inline
-: SW_SHOWNOACTIVATE   4 ; inline
-: SW_SHOW             5 ; inline
-: SW_MINIMIZE         6 ; inline
-: SW_SHOWMINNOACTIVE  7 ; inline
-: SW_SHOWNA           8 ; inline
-: SW_RESTORE          9 ; inline
-: SW_SHOWDEFAULT      10 ; inline
-: SW_FORCEMINIMIZE    11 ; inline
-: SW_MAX              11 ; inline
+CONSTANT: SW_HIDE             0
+CONSTANT: SW_SHOWNORMAL       1
+CONSTANT: SW_NORMAL           1
+CONSTANT: SW_SHOWMINIMIZED    2
+CONSTANT: SW_SHOWMAXIMIZED    3
+CONSTANT: SW_MAXIMIZE         3
+CONSTANT: SW_SHOWNOACTIVATE   4
+CONSTANT: SW_SHOW             5
+CONSTANT: SW_MINIMIZE         6
+CONSTANT: SW_SHOWMINNOACTIVE  7
+CONSTANT: SW_SHOWNA           8
+CONSTANT: SW_RESTORE          9
+CONSTANT: SW_SHOWDEFAULT      10
+CONSTANT: SW_FORCEMINIMIZE    11
+CONSTANT: SW_MAX              11
 
 ! PeekMessage
-: PM_NOREMOVE   0 ; inline
-: PM_REMOVE     1 ; inline
-: PM_NOYIELD    2 ; inline
+CONSTANT: PM_NOREMOVE   0
+CONSTANT: PM_REMOVE     1
+CONSTANT: PM_NOYIELD    2
 ! : PM_QS_INPUT         (QS_INPUT << 16) ;
 ! : PM_QS_POSTMESSAGE   ((QS_POSTMESSAGE | QS_HOTKEY | QS_TIMER) << 16) ;
 ! : PM_QS_PAINT         (QS_PAINT << 16) ;
@@ -503,7 +503,7 @@ IN: windows.user32
 : MB_ICONQUESTION    HEX: 00000020 ; inline
 : MB_OK              HEX: 00000000 ; inline
 
-: FVIRTKEY TRUE ; inline
+ALIAS: FVIRTKEY TRUE
 : FNOINVERT 2 ; inline
 : FSHIFT 4 ; inline
 : FCONTROL 8 ; inline
@@ -670,7 +670,7 @@ FUNCTION: HWND CreateWindowExW (
 
 ALIAS: CreateWindowEx CreateWindowExW
 
-: CreateWindow 0 12 -nrot CreateWindowEx ; inline
+: CreateWindow ( a b c d e f g h i j k -- hwnd ) 0 12 -nrot CreateWindowEx ; inline
 
 
 ! FUNCTION: CreateWindowStationA
@@ -1265,7 +1265,7 @@ FUNCTION: BOOL SetForegroundWindow ( HWND hWnd ) ;
 ! FUNCTION: SetKeyboardState
 ! type is ignored
 FUNCTION: void SetLastErrorEx ( DWORD dwErrCode, DWORD dwType ) ; 
-: SetLastError 0 SetLastErrorEx ; inline
+: SetLastError ( errcode -- ) 0 SetLastErrorEx ; inline
 ! FUNCTION: SetLayeredWindowAttributes
 ! FUNCTION: SetLogonNotifyWindow
 ! FUNCTION: SetMenu
index 5d450897e22120d14379ba442a478314f0c11954..27069ed743080d7a3875ef010c67a3f11d3c2f8d 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.c-types alien.strings alien.syntax arrays
 byte-arrays kernel math sequences windows.types windows.kernel32
-windows.errors windows math.bitwise alias io.encodings.utf16n ;
+windows.errors windows math.bitwise io.encodings.utf16n ;
 IN: windows.winsock
 
 USE: libc
@@ -14,95 +14,95 @@ TYPEDEF: void* SOCKET
 : <wsadata> ( -- byte-array )
     HEX: 190 <byte-array> ;
 
-: SOCK_STREAM    1 ; inline
-: SOCK_DGRAM     2 ; inline
-: SOCK_RAW       3 ; inline
-: SOCK_RDM       4 ; inline
-: SOCK_SEQPACKET 5 ; inline
-
-: SO_DEBUG       HEX:   1 ; inline
-: SO_ACCEPTCONN  HEX:   2 ; inline
-: SO_REUSEADDR   HEX:   4 ; inline
-: SO_KEEPALIVE   HEX:   8 ; inline
-: SO_DONTROUTE   HEX:  10 ; inline
-: SO_BROADCAST   HEX:  20 ; inline
-: SO_USELOOPBACK HEX:  40 ; inline
-: SO_LINGER      HEX:  80 ; inline
-: SO_OOBINLINE   HEX: 100 ; inline
-: SO_DONTLINGER SO_LINGER bitnot ; inline
-
-: SO_SNDBUF     HEX: 1001 ; inline
-: SO_RCVBUF     HEX: 1002 ; inline
-: SO_SNDLOWAT   HEX: 1003 ; inline
-: SO_RCVLOWAT   HEX: 1004 ; inline
-: SO_SNDTIMEO   HEX: 1005 ; inline
-: SO_RCVTIMEO   HEX: 1006 ; inline
-: SO_ERROR      HEX: 1007 ; inline
-: SO_TYPE       HEX: 1008 ; inline
-
-: TCP_NODELAY   HEX:    1 ; inline
-
-: AF_UNSPEC      0 ; inline
-: AF_UNIX        1 ; inline
-: AF_INET        2 ; inline
-: AF_IMPLINK     3 ; inline
-: AF_PUP         4 ; inline
-: AF_CHAOS       5 ; inline
-: AF_NS          6 ; inline
-: AF_ISO         7 ; inline
-: AF_OSI    AF_ISO ; inline
-: AF_ECMA        8 ; inline
-: AF_DATAKIT     9 ; inline
-: AF_CCITT      10 ; inline
-: AF_SNA        11 ; inline
-: AF_DECnet     12 ; inline
-: AF_DLI        13 ; inline
-: AF_LAT        14 ; inline
-: AF_HYLINK     15 ; inline
-: AF_APPLETALK  16 ; inline
-: AF_NETBIOS    17 ; inline
-: AF_MAX        18 ; inline
-: AF_INET6      23 ; inline
-: AF_IRDA       26 ; inline
-: AF_BTM        32 ; inline
-
-: PF_UNSPEC      0 ; inline
-: PF_LOCAL       1 ; inline
-: PF_INET        2 ; inline
-: PF_INET6      23 ; inline
-
-: AI_PASSIVE     1 ; inline
-: AI_CANONNAME   2 ; inline
-: AI_NUMERICHOST 4 ; inline
+CONSTANT: SOCK_STREAM    1
+CONSTANT: SOCK_DGRAM     2
+CONSTANT: SOCK_RAW       3
+CONSTANT: SOCK_RDM       4
+CONSTANT: SOCK_SEQPACKET 5
+
+CONSTANT: SO_DEBUG       HEX:   1
+CONSTANT: SO_ACCEPTCONN  HEX:   2
+CONSTANT: SO_REUSEADDR   HEX:   4
+CONSTANT: SO_KEEPALIVE   HEX:   8
+CONSTANT: SO_DONTROUTE   HEX:  10
+CONSTANT: SO_BROADCAST   HEX:  20
+CONSTANT: SO_USELOOPBACK HEX:  40
+CONSTANT: SO_LINGER      HEX:  80
+CONSTANT: SO_OOBINLINE   HEX: 100
+: SO_DONTLINGER ( -- n ) SO_LINGER bitnot ; inline
+
+CONSTANT: SO_SNDBUF     HEX: 1001
+CONSTANT: SO_RCVBUF     HEX: 1002
+CONSTANT: SO_SNDLOWAT   HEX: 1003
+CONSTANT: SO_RCVLOWAT   HEX: 1004
+CONSTANT: SO_SNDTIMEO   HEX: 1005
+CONSTANT: SO_RCVTIMEO   HEX: 1006
+CONSTANT: SO_ERROR      HEX: 1007
+CONSTANT: SO_TYPE       HEX: 1008
+
+CONSTANT: TCP_NODELAY   HEX:    1
+
+CONSTANT: AF_UNSPEC      0
+CONSTANT: AF_UNIX        1
+CONSTANT: AF_INET        2
+CONSTANT: AF_IMPLINK     3
+CONSTANT: AF_PUP         4
+CONSTANT: AF_CHAOS       5
+CONSTANT: AF_NS          6
+CONSTANT: AF_ISO         7
+ALIAS: AF_OSI    AF_ISO
+CONSTANT: AF_ECMA        8
+CONSTANT: AF_DATAKIT     9
+CONSTANT: AF_CCITT      10
+CONSTANT: AF_SNA        11
+CONSTANT: AF_DECnet     12
+CONSTANT: AF_DLI        13
+CONSTANT: AF_LAT        14
+CONSTANT: AF_HYLINK     15
+CONSTANT: AF_APPLETALK  16
+CONSTANT: AF_NETBIOS    17
+CONSTANT: AF_MAX        18
+CONSTANT: AF_INET6      23
+CONSTANT: AF_IRDA       26
+CONSTANT: AF_BTM        32
+
+CONSTANT: PF_UNSPEC      0
+CONSTANT: PF_LOCAL       1
+CONSTANT: PF_INET        2
+CONSTANT: PF_INET6      23
+
+CONSTANT: AI_PASSIVE     1
+CONSTANT: AI_CANONNAME   2
+CONSTANT: AI_NUMERICHOST 4
 : AI_MASK ( -- n ) { AI_PASSIVE AI_CANONNAME AI_NUMERICHOST } flags ;
 
-: NI_NUMERICHOST 1 ;
-: NI_NUMERICSERV 2 ;
+CONSTANT: NI_NUMERICHOST 1
+CONSTANT: NI_NUMERICSERV 2
 
-: IPPROTO_TCP    6 ; inline
-: IPPROTO_UDP   17 ; inline
-: IPPROTO_RM   113 ; inline
+CONSTANT: IPPROTO_TCP    6
+CONSTANT: IPPROTO_UDP   17
+CONSTANT: IPPROTO_RM   113
 
-: WSA_FLAG_OVERLAPPED 1 ; inline
-: WSA_WAIT_EVENT_0 WAIT_OBJECT_0 ; inline
-: WSA_MAXIMUM_WAIT_EVENTS MAXIMUM_WAIT_OBJECTS ; inline
-: WSA_INVALID_EVENT f ; inline
-: WSA_WAIT_FAILED -1 ; inline
-: WSA_WAIT_IO_COMPLETION WAIT_IO_COMPLETION ; inline
-: WSA_WAIT_TIMEOUT WAIT_TIMEOUT ; inline
-: WSA_INFINITE INFINITE ; inline
-: WSA_IO_PENDING ERROR_IO_PENDING ; inline
+CONSTANT: WSA_FLAG_OVERLAPPED 1
+ALIAS: WSA_WAIT_EVENT_0 WAIT_OBJECT_0
+ALIAS: WSA_MAXIMUM_WAIT_EVENTS MAXIMUM_WAIT_OBJECTS
+CONSTANT: WSA_INVALID_EVENT f
+CONSTANT: WSA_WAIT_FAILED -1
+ALIAS: WSA_WAIT_IO_COMPLETION WAIT_IO_COMPLETION
+ALIAS: WSA_WAIT_TIMEOUT WAIT_TIMEOUT
+ALIAS: WSA_INFINITE INFINITE
+ALIAS: WSA_IO_PENDING ERROR_IO_PENDING
 
-: INADDR_ANY 0 ; inline
+CONSTANT: INADDR_ANY 0
 
-: INVALID_SOCKET -1 <alien> ; inline
-: SOCKET_ERROR -1 ; inline
+: INVALID_SOCKET ( -- alien ) -1 <alien> ; inline
+CONSTANT: SOCKET_ERROR -1
 
-: SD_RECV 0 ; inline
-: SD_SEND 1 ; inline
-: SD_BOTH 2 ; inline
+CONSTANT: SD_RECV 0
+CONSTANT: SD_SEND 1
+CONSTANT: SD_BOTH 2
 
-: SOL_SOCKET HEX: ffff ; inline
+CONSTANT: SOL_SOCKET HEX: ffff
 
 ! TYPEDEF: uint in_addr_t
 ! C-STRUCT: in_addr
@@ -206,7 +206,7 @@ C-STRUCT: QOS
     { "WSABUF" "ProviderSpecific" } ;
 TYPEDEF: QOS* LPQOS
 
-: MAX_PROTOCOL_CHAIN 7 ; inline
+CONSTANT: MAX_PROTOCOL_CHAIN 7
 
 C-STRUCT: WSAPROTOCOLCHAIN
     { "int" "ChainLen" }
@@ -214,7 +214,7 @@ C-STRUCT: WSAPROTOCOLCHAIN
     { { "DWORD" 7 } "ChainEntries" } ;
 TYPEDEF: WSAPROTOCOLCHAIN* LPWSAPROTOCOLCHAIN
 
-: WSAPROTOCOL_LEN 255 ; inline
+CONSTANT: WSAPROTOCOL_LEN 255
 
 C-STRUCT: WSAPROTOCOL_INFOW
     { "DWORD" "dwServiceFlags1" }
@@ -386,7 +386,7 @@ LIBRARY: mswsock
 FUNCTION: int AcceptEx ( void* listen, void* accept, void* out-buf, int recv-len, int addr-len, int remote-len, void* out-len, void* overlapped ) ;
 FUNCTION: void GetAcceptExSockaddrs ( void* a, int b, int c, int d, void* e, void* f, void* g, void* h ) ;
 
-: SIO_GET_EXTENSION_FUNCTION_POINTER -939524090 ; inline
+CONSTANT: SIO_GET_EXTENSION_FUNCTION_POINTER -939524090
 
 : WSAID_CONNECTEX ( -- GUID )
     "GUID" <c-object>
index 1612b7ec11da72a8bd3629b3f294efec77328100..d3fe0a84477a147535b58cd332a62b464a9539cb 100644 (file)
@@ -22,14 +22,14 @@ TUPLE: x-clipboard atom contents ;
     "org.factorcode.Factor.SELECTION" x-atom ;
 
 : convert-selection ( win selection -- )
-    swap >r >r dpy get r> XA_UTF8_STRING selection-property r>
+    swap [ [ dpy get ] dip XA_UTF8_STRING selection-property ] dip
     CurrentTime XConvertSelection drop ;
 
 : snarf-property ( prop-return -- string )
     dup *void* [ *void* ascii alien>string ] [ drop f ] if ;
 
 : window-property ( win prop delete? -- string )
-    >r dpy get -rot 0 -1 r> AnyPropertyType
+    [ [ dpy get ] 2dip 0 -1 ] dip AnyPropertyType
     0 <Atom> 0 <int> 0 <ulong> 0 <ulong> f <void*>
     [ XGetWindowProperty drop ] keep snarf-property ;
 
@@ -41,7 +41,7 @@ TUPLE: x-clipboard atom contents ;
     ] if ;
 
 : own-selection ( prop win -- )
-    dpy get -rot CurrentTime XSetSelectionOwner drop
+    [ dpy get ] 2dip CurrentTime XSetSelectionOwner drop
     flush-dpy ;
 
 : set-targets-prop ( evt -- )
@@ -58,7 +58,7 @@ TUPLE: x-clipboard atom contents ;
     dpy get swap
     [ XSelectionRequestEvent-requestor ] keep
     [ XSelectionRequestEvent-property ] keep
-    >r "TIMESTAMP" x-atom 32 PropModeReplace r>
+    [ "TIMESTAMP" x-atom 32 PropModeReplace ] dip
     XSelectionRequestEvent-time <int>
     1 XChangeProperty drop ;
 
@@ -71,7 +71,7 @@ TUPLE: x-clipboard atom contents ;
     over XSelectionRequestEvent-selection over set-XSelectionEvent-selection
     over XSelectionRequestEvent-target    over set-XSelectionEvent-target
     over XSelectionRequestEvent-time      over set-XSelectionEvent-time
-    >r dpy get swap XSelectionRequestEvent-requestor 0 0 r>
+    [ dpy get swap XSelectionRequestEvent-requestor 0 0 ] dip
     XSendEvent drop
     flush-dpy ;
 
index 0a389c8034493197fc90037591847e9038e3579e..07650a9da73125655928c472eb9fb9ca669cc6ad 100644 (file)
@@ -36,12 +36,12 @@ GENERIC: selection-request-event ( event window -- )
 GENERIC: client-event ( event window -- )
 
 : next-event ( -- event )
-    dpy get "XEvent" <c-object> dup >r XNextEvent drop r> ;
+    dpy get "XEvent" <c-object> [ XNextEvent drop ] keep ;
 
 : mask-event ( mask -- event )
-    >r dpy get r> "XEvent" <c-object> dup >r XMaskEvent drop r> ;
+    [ dpy get ] dip "XEvent" <c-object> [ XMaskEvent drop ] keep ;
 
-: events-queued ( mode -- n ) >r dpy get r> XEventsQueued ;
+: events-queued ( mode -- n ) [ dpy get ] dip XEventsQueued ;
 
 : wheel? ( event -- ? ) XButtonEvent-button 4 7 between? ;
 
@@ -71,15 +71,15 @@ GENERIC: client-event ( event window -- )
     } case ;
 
 : configured-loc ( event -- dim )
-    dup XConfigureEvent-x swap XConfigureEvent-y 2array ;
+    [ XConfigureEvent-x ] [ XConfigureEvent-y ] bi 2array ;
 
 : configured-dim ( event -- dim )
-    dup XConfigureEvent-width swap XConfigureEvent-height 2array ;
+    [ XConfigureEvent-width ] [ XConfigureEvent-height ] bi 2array ;
 
 : mouse-event-loc ( event -- loc )
-    dup XButtonEvent-x swap XButtonEvent-y 2array ;
+    [ XButtonEvent-x ] [ XButtonEvent-y ] bi 2array ;
 
 : close-box? ( event -- ? )
-    dup XClientMessageEvent-message_type "WM_PROTOCOLS" x-atom =
-    swap XClientMessageEvent-data0 "WM_DELETE_WINDOW" x-atom =
-    and ;
+    [ XClientMessageEvent-message_type "WM_PROTOCOLS" x-atom = ]
+    [ XClientMessageEvent-data0 "WM_DELETE_WINDOW" x-atom = ]
+    bi and ;
index 3c41a7858411f7118c782567501cec67fca1a3c5..be9f8cf7a9769491b91a5849cc4119ae2548e4c6 100644 (file)
@@ -31,24 +31,25 @@ IN: x11.windows
     "XSetWindowAttributes" <c-object>
     0 over set-XSetWindowAttributes-background_pixel
     0 over set-XSetWindowAttributes-border_pixel
-    [ >r create-colormap r> set-XSetWindowAttributes-colormap ] keep
+    [ [ create-colormap ] dip set-XSetWindowAttributes-colormap ] keep
     event-mask over set-XSetWindowAttributes-event_mask ;
 
 : set-size-hints ( window -- )
     "XSizeHints" <c-object>
     USPosition over set-XSizeHints-flags
-    dpy get -rot XSetWMNormalHints ;
+    [ dpy get ] 2dip XSetWMNormalHints ;
 
 : auto-position ( window loc -- )
     { 0 0 } = [ drop ] [ set-size-hints ] if ;
 
 : create-window ( loc dim visinfo -- window )
-    pick >r
-    >r >r >r dpy get root get r> first2 r> { 1 1 } vmax first2 0 r>
-    [ XVisualInfo-depth InputOutput ] keep
-    [ XVisualInfo-visual create-window-mask ] keep
-    window-attributes XCreateWindow
-    dup r> auto-position ;
+    pick [
+        [ [ [ dpy get root get ] dip first2 ] dip { 1 1 } vmax first2 0 ] dip
+        [ XVisualInfo-depth InputOutput ] keep
+        [ XVisualInfo-visual create-window-mask ] keep
+        window-attributes XCreateWindow
+        dup
+    ] dip auto-position ;
 
 : glx-window ( loc dim -- window glx )
     GLX_DOUBLEBUFFER 1array choose-visual
index 862ec3355a18243c83ad934146ee880fb42927b1..856420af0f701abc67fec6a1f864b80814134aeb 100644 (file)
@@ -9,14 +9,14 @@ IN: x11.xim
 SYMBOL: xim
 
 : (init-xim) ( classname medifier -- im )
-   XSetLocaleModifiers [ "XSetLocaleModifiers() failed" throw ] unless
-   [ dpy get f ] dip dup XOpenIM ;
+    XSetLocaleModifiers [ "XSetLocaleModifiers() failed" throw ] unless
+    [ dpy get f ] dip dup XOpenIM ;
 
 : init-xim ( classname -- )
-   dup "" (init-xim)
-   [ nip ]
-   [ "@im=none" (init-xim) [ "XOpenIM() failed" throw ] unless* ] if*
-   xim set-global ;
+    dup "" (init-xim)
+    [ nip ]
+    [ "@im=none" (init-xim) [ "XOpenIM() failed" throw ] unless* ] if*
+    xim set-global ;
 
 : close-xim ( -- )
     xim get-global XCloseIM drop f xim set-global ;
index 996932e697a24939d9001fbd5bc8925a1034ce75..f86c24b845eca6f06008f708da1197253e53c48f 100644 (file)
@@ -31,7 +31,6 @@ TYPEDEF: XID KeySym
 TYPEDEF: ulong Atom
 
 TYPEDEF: char* XPointer
-TYPEDEF: void* Display*
 TYPEDEF: void* Screen*
 TYPEDEF: void* GC
 TYPEDEF: void* Visual*
@@ -51,21 +50,27 @@ TYPEDEF: ulong Time
 TYPEDEF: void* Window**
 TYPEDEF: void* Atom**
 
-: <XID> <ulong> ; inline
-: <Window> <XID> ; inline
-: <Drawable> <XID> ; inline
-: <KeySym> <XID> ; inline
-: <Atom> <ulong> ; inline
-
-: *XID *ulong ; inline
-: *Window *XID ; inline
-: *Drawable *XID ; inline
-: *KeySym *XID ; inline
-: *Atom *ulong ; inline
+ALIAS: <XID> <ulong>
+ALIAS: <Window> <XID>
+ALIAS: <Drawable> <XID>
+ALIAS: <KeySym> <XID>
+ALIAS: <Atom> <ulong>
+
+ALIAS: *XID *ulong
+ALIAS: *Window *XID
+ALIAS: *Drawable *XID
+ALIAS: *KeySym *XID
+ALIAS: *Atom *ulong
 !
 ! 2 - Display Functions
 !
 
+! This struct is incomplete
+C-STRUCT: Display
+{ "void*" "ext_data" }
+{ "void*" "free_funcs" }
+{ "int" "fd" } ;
+
 FUNCTION: Display* XOpenDisplay ( void* display_name ) ;
 
 ! 2.2 Obtaining Information about the Display, Image Formats, or Screens
@@ -93,21 +98,21 @@ FUNCTION: int XCloseDisplay ( Display* display ) ;
 
 ! 3.2 - Window Attributes
 
-: CWBackPixmap          1 0 shift ; inline
-: CWBackPixel           1 1 shift ; inline
-: CWBorderPixmap        1 2 shift ; inline
-: CWBorderPixel         1 3 shift ; inline
-: CWBitGravity          1 4 shift ; inline
-: CWWinGravity          1 5 shift ; inline
-: CWBackingStore        1 6 shift ; inline
-: CWBackingPlanes       1 7 shift ; inline
-: CWBackingPixel        1 8 shift ; inline
-: CWOverrideRedirect    1 9 shift ; inline
-: CWSaveUnder           1 10 shift ; inline
-: CWEventMask           1 11 shift ; inline
-: CWDontPropagate       1 12 shift ; inline
-: CWColormap            1 13 shift ; inline
-: CWCursor              1 14 shift ; inline
+: CWBackPixmap       ( -- n ) 0 2^ ; inline
+: CWBackPixel        ( -- n ) 1 2^ ; inline
+: CWBorderPixmap     ( -- n ) 2 2^ ; inline
+: CWBorderPixel      ( -- n ) 3 2^ ; inline
+: CWBitGravity       ( -- n ) 4 2^ ; inline
+: CWWinGravity       ( -- n ) 5 2^ ; inline
+: CWBackingStore     ( -- n ) 6 2^ ; inline
+: CWBackingPlanes    ( -- n ) 7 2^ ; inline
+: CWBackingPixel     ( -- n ) 8 2^ ; inline
+: CWOverrideRedirect ( -- n ) 9 2^ ; inline
+: CWSaveUnder        ( -- n ) 10 2^ ; inline
+: CWEventMask        ( -- n ) 11 2^ ; inline
+: CWDontPropagate    ( -- n ) 12 2^ ; inline
+: CWColormap         ( -- n ) 13 2^ ; inline
+: CWCursor           ( -- n ) 14 2^ ; inline
 
 C-STRUCT: XSetWindowAttributes
         { "Pixmap" "background_pixmap" }
@@ -156,13 +161,13 @@ FUNCTION: int XMapRaised ( Display* display, Window w ) ;
 
 ! 3.7 - Configuring Windows
 
-: CWX                   1 0 shift ; inline
-: CWY                   1 1 shift ; inline
-: CWWidth               1 2 shift ; inline
-: CWHeight              1 3 shift ; inline
-: CWBorderWidth         1 4 shift ; inline
-: CWSibling             1 5 shift ; inline
-: CWStackMode           1 6 shift ; inline
+: CWX           ( -- n ) 0 2^ ; inline
+: CWY           ( -- n ) 1 2^ ; inline
+: CWWidth       ( -- n ) 2 2^ ; inline
+: CWHeight      ( -- n ) 3 2^ ; inline
+: CWBorderWidth ( -- n ) 4 2^ ; inline
+: CWSibling     ( -- n ) 5 2^ ; inline
+: CWStackMode   ( -- n ) 6 2^ ; inline
 
 C-STRUCT: XWindowChanges
         { "int" "x" }
@@ -307,29 +312,29 @@ FUNCTION: Colormap XCreateColormap ( Display* display, Window w, Visual* visual,
 ! 7 - Graphics Context Functions
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: GCFunction            1 0 shift ; inline
-: GCPlaneMask           1 1 shift ; inline
-: GCForeground          1 2 shift ; inline
-: GCBackground          1 3 shift ; inline
-: GCLineWidth           1 4 shift ; inline
-: GCLineStyle           1 5 shift ; inline
-: GCCapStyle            1 6 shift ; inline
-: GCJoinStyle           1 7 shift ; inline
-: GCFillStyle           1 8 shift ; inline
-: GCFillRule            1 9 shift ; inline
-: GCTile                1 10 shift ; inline
-: GCStipple             1 11 shift ; inline
-: GCTileStipXOrigin     1 12 shift ; inline
-: GCTileStipYOrigin     1 13 shift ; inline
-: GCFont                1 14 shift ; inline
-: GCSubwindowMode       1 15 shift ; inline
-: GCGraphicsExposures   1 16 shift ; inline
-: GCClipXOrigin         1 17 shift ; inline
-: GCClipYOrigin         1 18 shift ; inline
-: GCClipMask            1 19 shift ; inline
-: GCDashOffset          1 20 shift ; inline
-: GCDashList            1 21 shift ; inline
-: GCArcMode             1 22 shift ; inline
+: GCFunction          ( -- n ) 0 2^ ; inline
+: GCPlaneMask         ( -- n ) 1 2^ ; inline
+: GCForeground        ( -- n ) 2 2^ ; inline
+: GCBackground        ( -- n ) 3 2^ ; inline
+: GCLineWidth         ( -- n ) 4 2^ ; inline
+: GCLineStyle         ( -- n ) 5 2^ ; inline
+: GCCapStyle          ( -- n ) 6 2^ ; inline
+: GCJoinStyle         ( -- n ) 7 2^ ; inline
+: GCFillStyle         ( -- n ) 8 2^ ; inline
+: GCFillRule          ( -- n ) 9 2^ ; inline
+: GCTile              ( -- n ) 10 2^ ; inline
+: GCStipple           ( -- n ) 11 2^ ; inline
+: GCTileStipXOrigin   ( -- n ) 12 2^ ; inline
+: GCTileStipYOrigin   ( -- n ) 13 2^ ; inline
+: GCFont              ( -- n ) 14 2^ ; inline
+: GCSubwindowMode     ( -- n ) 15 2^ ; inline
+: GCGraphicsExposures ( -- n ) 16 2^ ; inline
+: GCClipXOrigin       ( -- n ) 17 2^ ; inline
+: GCClipYOrigin       ( -- n ) 18 2^ ; inline
+: GCClipMask          ( -- n ) 19 2^ ; inline
+: GCDashOffset        ( -- n ) 20 2^ ; inline
+: GCDashList          ( -- n ) 21 2^ ; inline
+: GCArcMode           ( -- n ) 22 2^ ; inline
 
 : GXclear               HEX: 0 ; inline
 : GXand                 HEX: 1 ; inline
@@ -500,32 +505,32 @@ FUNCTION: Status XKillClient ( Display* display, XID resource ) ;
 
 ! 10.3 - Event Masks
 
-: NoEventMask                   0 ; inline
-: KeyPressMask                  1 0 shift ; inline
-: KeyReleaseMask                1 1 shift ; inline
-: ButtonPressMask               1 2 shift ; inline
-: ButtonReleaseMask             1 3 shift ; inline
-: EnterWindowMask               1 4 shift ; inline
-: LeaveWindowMask               1 5 shift ; inline
-: PointerMotionMask             1 6 shift ; inline
-: PointerMotionHintMask         1 7 shift ; inline
-: Button1MotionMask             1 8 shift ; inline
-: Button2MotionMask             1 9 shift ; inline
-: Button3MotionMask             1 10 shift ; inline
-: Button4MotionMask             1 11 shift ; inline
-: Button5MotionMask             1 12 shift ; inline
-: ButtonMotionMask              1 13 shift ; inline
-: KeymapStateMask               1 14 shift ; inline
-: ExposureMask                  1 15 shift ; inline
-: VisibilityChangeMask          1 16 shift ; inline
-: StructureNotifyMask           1 17 shift ; inline
-: ResizeRedirectMask            1 18 shift ; inline
-: SubstructureNotifyMask        1 19 shift ; inline
-: SubstructureRedirectMask      1 20 shift ; inline
-: FocusChangeMask               1 21 shift ; inline
-: PropertyChangeMask            1 22 shift ; inline
-: ColormapChangeMask            1 23 shift ; inline
-: OwnerGrabButtonMask           1 24 shift ; inline
+: NoEventMask              ( -- n ) 0 ; inline
+: KeyPressMask             ( -- n ) 0 2^ ; inline
+: KeyReleaseMask           ( -- n ) 1 2^ ; inline
+: ButtonPressMask          ( -- n ) 2 2^ ; inline
+: ButtonReleaseMask        ( -- n ) 3 2^ ; inline
+: EnterWindowMask          ( -- n ) 4 2^ ; inline
+: LeaveWindowMask          ( -- n ) 5 2^ ; inline
+: PointerMotionMask        ( -- n ) 6 2^ ; inline
+: PointerMotionHintMask    ( -- n ) 7 2^ ; inline
+: Button1MotionMask        ( -- n ) 8 2^ ; inline
+: Button2MotionMask        ( -- n ) 9 2^ ; inline
+: Button3MotionMask        ( -- n ) 10 2^ ; inline
+: Button4MotionMask        ( -- n ) 11 2^ ; inline
+: Button5MotionMask        ( -- n ) 12 2^ ; inline
+: ButtonMotionMask         ( -- n ) 13 2^ ; inline
+: KeymapStateMask          ( -- n ) 14 2^ ; inline
+: ExposureMask             ( -- n ) 15 2^ ; inline
+: VisibilityChangeMask     ( -- n ) 16 2^ ; inline
+: StructureNotifyMask      ( -- n ) 17 2^ ; inline
+: ResizeRedirectMask       ( -- n ) 18 2^ ; inline
+: SubstructureNotifyMask   ( -- n ) 19 2^ ; inline
+: SubstructureRedirectMask ( -- n ) 20 2^ ; inline
+: FocusChangeMask          ( -- n ) 21 2^ ; inline
+: PropertyChangeMask       ( -- n ) 22 2^ ; inline
+: ColormapChangeMask       ( -- n ) 23 2^ ; inline
+: OwnerGrabButtonMask      ( -- n ) 24 2^ ; inline
 
 : KeyPress              2 ; inline
 : KeyRelease            3 ; inline
@@ -579,20 +584,20 @@ C-STRUCT: XAnyEvent
 : Button4 4 ; inline
 : Button5 5 ; inline
 
-: Button1Mask           1 8  shift ; inline
-: Button2Mask           1 9  shift ; inline
-: Button3Mask           1 10 shift ; inline
-: Button4Mask           1 11 shift ; inline
-: Button5Mask           1 12 shift ; inline
-
-: ShiftMask     1 0 shift ; inline
-: LockMask      1 1 shift ; inline
-: ControlMask   1 2 shift ; inline
-: Mod1Mask      1 3 shift ; inline
-: Mod2Mask      1 4 shift ; inline
-: Mod3Mask      1 5 shift ; inline
-: Mod4Mask      1 6 shift ; inline
-: Mod5Mask      1 7 shift ; inline
+: Button1Mask ( -- n ) 1 8  shift ; inline
+: Button2Mask ( -- n ) 1 9  shift ; inline
+: Button3Mask ( -- n ) 1 10 shift ; inline
+: Button4Mask ( -- n ) 1 11 shift ; inline
+: Button5Mask ( -- n ) 1 12 shift ; inline
+
+: ShiftMask   ( -- n ) 1 0 shift ; inline
+: LockMask    ( -- n ) 1 1 shift ; inline
+: ControlMask ( -- n ) 1 2 shift ; inline
+: Mod1Mask    ( -- n ) 1 3 shift ; inline
+: Mod2Mask    ( -- n ) 1 4 shift ; inline
+: Mod3Mask    ( -- n ) 1 5 shift ; inline
+: Mod4Mask    ( -- n ) 1 6 shift ; inline
+: Mod5Mask    ( -- n ) 1 7 shift ; inline
 
 C-STRUCT: XButtonEvent
         { "int" "type" }
@@ -1316,15 +1321,15 @@ FUNCTION: int XBell ( Display* display, int percent ) ;
 
 ! !!! INPUT METHODS
 
-: XIMPreeditArea      HEX: 0001 ;
-: XIMPreeditCallbacks HEX: 0002 ;
-: XIMPreeditPosition  HEX: 0004 ;
-: XIMPreeditNothing   HEX: 0008 ;
-: XIMPreeditNone      HEX: 0010 ;
-: XIMStatusArea       HEX: 0100 ;
-: XIMStatusCallbacks  HEX: 0200 ;
-: XIMStatusNothing    HEX: 0400 ;
-: XIMStatusNone       HEX: 0800 ;
+: XIMPreeditArea      HEX: 0001 ; inline
+: XIMPreeditCallbacks HEX: 0002 ; inline
+: XIMPreeditPosition  HEX: 0004 ; inline
+: XIMPreeditNothing   HEX: 0008 ; inline
+: XIMPreeditNone      HEX: 0010 ; inline
+: XIMStatusArea       HEX: 0100 ; inline
+: XIMStatusCallbacks  HEX: 0200 ; inline
+: XIMStatusNothing    HEX: 0400 ; inline
+: XIMStatusNone       HEX: 0800 ; inline
 
 : XNVaNestedList "XNVaNestedList" ;
 : XNQueryInputStyle "queryInputStyle" ;
index 836a85d52de6fb5716569da1a83fc9393f41e216..e2be36c4504c0d18f05300f18088067362373309 100644 (file)
@@ -10,7 +10,7 @@ USING: kernel hashtables xml-rpc xml calendar sequences
        { "divide" [ / ] } } ;
 
 : apply-function ( name args -- {number} )
-    >r functions hash r> first2 rot call 1array ;
+    [ functions hash ] dip first2 rot call 1array ;
 
 : problem>solution ( xml-doc -- xml-doc )
     receive-rpc dup rpc-method-name swap rpc-method-params
index 8c20df1fd02d93349777e43a43fb495638d55456..d812e8503b872814842581c884e17860bf64e0f6 100644 (file)
@@ -21,7 +21,7 @@ HELP: base64
 { $see-also <base64> } ;
 
 HELP: <rpc-method>
-{ $values { "name" "a string" } { "params" "a sequence" } }
+{ $values { "name" "a string" } { "params" "a sequence" } { "rpc-method" rpc-method } }
 { $description "creates a tuple reprsenting a method call which can be translated using send-rpc into an XML-RPC document" }
 { $see-also rpc-method <rpc-response> <rpc-fault> } ;
 
@@ -30,7 +30,7 @@ HELP: rpc-method
 { $see-also <rpc-method> rpc-response rpc-fault } ;
 
 HELP: <rpc-response>
-{ $values { "params" "a sequence" } }
+{ $values { "params" "a sequence" } { "rpc-response" rpc-response } }
 { $description "creates a tuple representing a data response in XML-RPC" }
 { $see-also rpc-response <rpc-method> <rpc-fault> } ;
 
@@ -39,7 +39,7 @@ HELP: rpc-response
 { $see-also <rpc-response> rpc-method rpc-fault } ;
 
 HELP: <rpc-fault>
-{ $values { "code" "an integer" } { "string" "a string" } }
+{ $values { "code" "an integer" } { "string" "a string" } { "rpc-fault" rpc-fault } }
 { $description "creates a tuple representing an exception in RPC, to be returned to the caller. The code is a number representing what type of error it is, and the string is a description" }
 { $see-also rpc-fault <rpc-method> <rpc-response> } ;
 
index 9472f5e09d5cb5a795e1c4c207f6713b5a325b88..52e175ca3a82ca575f833cf1ef6e25932c7e0c79 100644 (file)
@@ -3,7 +3,7 @@
 USING: accessors kernel xml arrays math generic http.client
 combinators hashtables namespaces io base64 sequences strings
 calendar xml.data xml.writer xml.utilities assocs math.parser
-debugger calendar.format math.order ;
+debugger calendar.format math.order xml.interpolate xml.dispatch ;
 IN: xml-rpc
 
 ! * Sending RPC requests
@@ -15,56 +15,70 @@ GENERIC: item>xml ( object -- xml )
 M: integer item>xml
     dup 31 2^ neg 31 2^ 1 - between?
     [ "Integers must fit in 32 bits" throw ] unless
-    number>string "i4" build-tag ;
+    [XML <i4><-></i4> XML] ;
 
 UNION: boolean t POSTPONE: f ;
 
 M: boolean item>xml
-    "1" "0" ? "boolean" build-tag ;
+    "1" "0" ? [XML <boolean><-></boolean> XML] ;
 
 M: float item>xml
-    number>string "double" build-tag ;
+    number>string [XML <double><-></double> XML] ;
 
-M: string item>xml ! This should change < and &
-    "string" build-tag ;
+M: string item>xml
+    [XML <string><-></string> XML] ;
 
 : struct-member ( name value -- tag )
-    swap dup string?
-    [ "Struct member name must be string" throw ] unless
-    "name" build-tag swap
-    item>xml "value" build-tag
-    2array "member" build-tag* ;
+    over string? [ "Struct member name must be string" throw ] unless
+    item>xml
+    [XML
+        <member>
+            <name><-></name>
+            <value><-></value>
+        </member>
+    XML] ;
 
 M: hashtable item>xml
     [ struct-member ] { } assoc>map
-    "struct" build-tag* ;
+    [XML <struct><-></struct> XML] ;
 
 M: array item>xml
-    [ item>xml "value" build-tag ] map
-    "data" build-tag* "array" build-tag ;
+    [ item>xml [XML <value><-></value> XML] ] map
+    [XML <array><data><-></data></array> XML] ;
 
 TUPLE: base64 string ;
 
 C: <base64> base64
 
 M: base64 item>xml
-    string>> >base64 "base64" build-tag ;
+    string>> >base64
+    [XML <base64><-></base64> XML] ;
 
 : params ( seq -- xml )
-    [ item>xml "value" build-tag "param" build-tag ] map
-    "params" build-tag* ;
+    [ item>xml [XML <param><value><-></value></param> XML] ] map
+    [XML <params><-></params> XML] ;
 
 : method-call ( name seq -- xml )
-    params >r "methodName" build-tag r>
-    2array "methodCall" build-tag* build-xml ;
+    params
+    <XML
+        <methodCall>
+            <methodName><-></methodName>
+            <->
+        </methodCall>
+    XML> ;
 
 : return-params ( seq -- xml )
-    params "methodResponse" build-tag build-xml ;
+    params <XML <methodResponse><-></methodResponse> XML> ;
 
 : return-fault ( fault-code fault-string -- xml )
     [ "faultString" set "faultCode" set ] H{ } make-assoc item>xml
-    "value" build-tag "fault" build-tag "methodResponse" build-tag
-    build-xml ;
+    <XML
+        <methodResponse>
+            <fault>
+                <value><-></value>
+            </fault>
+        </methodResponse>
+    XML> ;
 
 TUPLE: rpc-method name params ;
 
@@ -117,7 +131,7 @@ TAG: boolean xml>item
 : unstruct-member ( tag -- )
     children-tags first2
     first-child-tag xml>item
-    >r children>string r> swap set ;
+    [ children>string ] dip swap set ;
 
 TAG: struct xml>item
     [
@@ -158,14 +172,7 @@ TAG: array xml>item
 
 : post-rpc ( rpc url -- rpc )
     ! This needs to do something in the event of an error
-    >r send-rpc r> http-post nip string>xml receive-rpc ;
+    [ send-rpc ] dip http-post nip string>xml receive-rpc ;
 
 : invoke-method ( params method url -- )
-    >r swap <rpc-method> r> post-rpc ;
-
-: put-http-response ( string -- )
-    "HTTP/1.1 200 OK\nConnection: close\nContent-Length: " write
-    dup length number>string write
-    "\nContent-Type: text/xml\nDate: " write
-    now timestamp>http-string write "\n\n" write
-    write ;
+    [ swap <rpc-method> ] dip post-rpc ;
diff --git a/basis/xml/autoencoding/authors.txt b/basis/xml/autoencoding/authors.txt
new file mode 100644 (file)
index 0000000..f990dd0
--- /dev/null
@@ -0,0 +1 @@
+Daniel Ehrenberg
diff --git a/basis/xml/autoencoding/autoencoding.factor b/basis/xml/autoencoding/autoencoding.factor
new file mode 100644 (file)
index 0000000..20a661c
--- /dev/null
@@ -0,0 +1,79 @@
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel namespaces xml.name io.encodings.utf8 xml.elements
+io.encodings.utf16 xml.tokenize xml.state math ascii sequences
+io.encodings.string io.encodings combinators accessors
+xml.data io.encodings.iana ;
+IN: xml.autoencoding
+
+: continue-make-tag ( str -- tag )
+    parse-name-starting middle-tag end-tag ;
+
+: start-utf16le ( -- tag )
+    utf16le decode-input
+    "?\0" expect
+    check instruct ;
+
+: 10xxxxxx? ( ch -- ? )
+    -6 shift 3 bitand 2 = ;
+          
+: start<name ( ch -- tag )
+    ! This is unfortunate, and exists for the corner case
+    ! that the first letter of the document is < and second is
+    ! not ASCII
+    ascii?
+    [ utf8 decode-input next make-tag ] [
+        next
+        [ get-next 10xxxxxx? not ] take-until
+        get-char suffix utf8 decode
+        utf8 decode-input next
+        continue-make-tag
+    ] if ;
+
+: prolog-encoding ( prolog -- )
+    encoding>> dup "UTF-16" =
+    [ drop ] [ name>encoding [ decode-input ] when* ] if ;
+
+: instruct-encoding ( instruct/prolog -- )
+    dup prolog?
+    [ prolog-encoding ]
+    [ drop utf8 decode-input ] if ;
+
+: go-utf8 ( -- )
+    check utf8 decode-input next next ;
+
+: start< ( -- tag )
+    ! What if first letter of processing instruction is non-ASCII?
+    get-next {
+        { 0 [ next next start-utf16le ] }
+        { CHAR: ? [ go-utf8 instruct dup instruct-encoding ] }
+        { CHAR: ! [ go-utf8 direct ] }
+        [ check start<name ]
+    } case ;
+
+: skip-utf8-bom ( -- tag )
+    "\u0000bb\u0000bf" expect utf8 decode-input
+    "<" expect check make-tag ;
+
+: decode-expecting ( encoding string -- tag )
+    [ decode-input next ] [ expect ] bi* check make-tag ;
+
+: start-utf16be ( -- tag )
+    utf16be "<" decode-expecting ;
+
+: skip-utf16le-bom ( -- tag )
+    utf16le "\u0000fe<" decode-expecting ;
+
+: skip-utf16be-bom ( -- tag )
+    utf16be "\u0000ff<" decode-expecting ;
+
+: start-document ( -- tag )
+    get-char {
+        { CHAR: < [ start< ] }
+        { 0 [ start-utf16be ] }
+        { HEX: EF [ skip-utf8-bom ] }
+        { HEX: FF [ skip-utf16le-bom ] }
+        { HEX: FE [ skip-utf16be-bom ] }
+        [ drop utf8 decode-input check f ]
+    } case ;
+
diff --git a/basis/xml/autoencoding/summary.txt b/basis/xml/autoencoding/summary.txt
new file mode 100644 (file)
index 0000000..c7517b1
--- /dev/null
@@ -0,0 +1 @@
+Implements the automatic detection of encodings of XML documents
diff --git a/basis/xml/backend/backend.factor b/basis/xml/backend/backend.factor
deleted file mode 100644 (file)
index 5dee386..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-! Copyright (C) 2008 Daniel Ehrenberg
-! See http://factorcode.org/license.txt for BSD license.
-IN: xml.backend
-
-! A stack of { tag children } pairs
-SYMBOL: xml-stack
index 4688e20767d3ed4f21f9276dbb2ba2d7f1660d16..b47d4c66df92e9fe1bd446fccd1940a01c123113 100644 (file)
@@ -1,21 +1,33 @@
 ! Copyright (C) 2005, 2007 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel sequences unicode.syntax math math.order ;
+USING: kernel sequences unicode.syntax math math.order combinators ;
 IN: xml.char-classes
 
-CATEGORY: 1.0name-start* Ll Lu Lo Lt Nl \u000559\u0006E5\u0006E6_ ;
+CATEGORY: 1.0name-start* Ll Lu Lo Lt Nl \u000559\u0006E5\u0006E6_: ;
 : 1.0name-start? ( char -- ? )
     dup 1.0name-start*? [ drop t ] 
     [ HEX: 2BB HEX: 2C1 between? ] if ;
 
-CATEGORY: 1.0name-char Ll Lu Lo Lt Nl Mc Me Mn Lm Nd _-.\u000387 ;
+CATEGORY: 1.0name-char Ll Lu Lo Lt Nl Mc Me Mn Lm Nd _-.\u000387: ;
 
-CATEGORY: 1.1name-start Ll Lu Lo Lm Ln Nl _ ;
+CATEGORY: 1.1name-start Ll Lu Lo Lm Ln Nl _: ;
 
-CATEGORY: 1.1name-char Ll Lu Lo Lm Ln Nl Mc Mn Nd Pc Cf _-.\u0000b7 ;
+CATEGORY: 1.1name-char Ll Lu Lo Lm Ln Nl Mc Mn Nd Pc Cf _-.\u0000b7: ;
 
 : name-start? ( 1.0? char -- ? )
     swap [ 1.0name-start? ] [ 1.1name-start? ] if ;
 
 : name-char? ( 1.0? char -- ? )
     swap [ 1.0name-char? ] [ 1.1name-char? ] if ;
+
+: text? ( 1.0? char -- ? )
+    ! 1.0:
+    ! #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
+    ! 1.1:
+    ! [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
+    {
+        { [ dup HEX: 20 < ] [ swap [ "\t\r\n" member? ] [ zero? not ] if ] }
+        { [ nip dup HEX: D800 < ] [ drop t ] }
+        { [ dup HEX: E000 < ] [ drop f ] }
+        [ { HEX: FFFE HEX: FFFF } member? not ]
+    } cond ;
diff --git a/basis/xml/char-classes/summary.txt b/basis/xml/char-classes/summary.txt
new file mode 100644 (file)
index 0000000..8f70bdd
--- /dev/null
@@ -0,0 +1 @@
+XML-related character classes
diff --git a/basis/xml/data/data-docs.factor b/basis/xml/data/data-docs.factor
new file mode 100644 (file)
index 0000000..639ef55
--- /dev/null
@@ -0,0 +1,218 @@
+USING: help.markup help.syntax sequences strings ;
+IN: xml.data
+
+ABOUT: "xml.data"
+
+ARTICLE: "xml.data" "XML data types"
+"The " { $vocab-link "xml.data" } " vocabulary defines a simple document object model for XML. Everything is simply a tuple and can be manipulated as such."
+{ $subsection { "xml.data" "classes" } }
+{ $subsection { "xml.data" "constructors" } }
+"Simple words for manipulating names:"
+    { $subsection names-match? }
+    { $subsection assure-name }
+"For high-level tools for manipulating XML, see " { $vocab-link "xml.utilities" } ;
+
+ARTICLE: { "xml.data" "classes" } "XML data classes"
+    "XML documents and chunks are made of the following classes:"
+    { $subsection xml }
+    { $subsection xml-chunk }
+    { $subsection tag }
+    { $subsection name }
+    { $subsection contained-tag }
+    { $subsection open-tag }
+    { $subsection prolog }
+    { $subsection comment }
+    { $subsection instruction }
+    { $subsection unescaped }
+    { $subsection element-decl }
+    { $subsection attlist-decl }
+    { $subsection entity-decl }
+    { $subsection system-id }
+    { $subsection public-id }
+    { $subsection doctype-decl }
+    { $subsection notation-decl } ;
+
+ARTICLE: { "xml.data" "constructors" } "XML data constructors"
+    "These data types are constructed with:"
+    { $subsection <xml> }
+    { $subsection <xml-chunk> } 
+    { $subsection <tag> }
+    { $subsection <name> }
+    { $subsection <contained-tag> }
+    { $subsection <prolog> }
+    { $subsection <comment> }
+    { $subsection <instruction> }
+    { $subsection <unescaped> }
+    { $subsection <simple-name> }
+    { $subsection <element-decl> }
+    { $subsection <attlist-decl> }
+    { $subsection <entity-decl> }
+    { $subsection <system-id> }
+    { $subsection <public-id> }
+    { $subsection <doctype-decl> }
+    { $subsection <notation-decl> } ;
+
+HELP: tag
+{ $class-description "Tuple representing an XML tag, delegating to a " { $link
+name } ", containing the slots attrs (an alist of names to strings) and children (a sequence). Tags implement the sequence protocol by acting like a sequence of its chidren, and the assoc protocol by acting like its attributes." }
+{ $see-also <tag> name contained-tag xml } ;
+
+HELP: <tag>
+{ $values { "name" "an XML tag name" }
+    { "attrs" "an alist of names to strings" }
+    { "children" sequence }
+    { "tag" tag } }
+{ $description "Constructs an XML " { $link tag } " with the name (not a string) and tag attributes specified in attrs and children specified." }
+{ $see-also tag <contained-tag> } ;
+
+HELP: name
+{ $class-description "Represents an XML name, with the fields space (a string representing the namespace, as written in the document, tag (a string of the actual name of the tag) and url (a string of the URL that the namespace points to)." }
+{ $see-also <name> tag } ;
+
+HELP: <name>
+{ $values { "space" "a string" } { "main" "a string" } { "url" "a string" }
+    { "name" "an XML tag name" } }
+{ $description "Creates a name tuple with the namespace prefix space, the the given main part of the name, and the namespace URL given by url." }
+{ $see-also name <tag> } ;
+
+HELP: contained-tag
+{ $class-description "This is a subclass of " { $link tag } " consisting of tags with no body, like " { $snippet "<a/>" } "." }
+{ $see-also tag <contained-tag> } ;
+
+HELP: <contained-tag>
+{ $values { "name" "an XML tag name" }
+    { "attrs" "an alist from names to strings" }
+    { "tag" tag } }
+{ $description "Creates an empty tag (like " { $snippet "<a/>" } ") with the specified name and tag attributes." }
+{ $see-also contained-tag <tag> } ;
+
+HELP: xml
+{ $class-description "Tuple representing an XML document, delegating to the main tag, containing the fields prolog (the header " { $snippet "<?xml...?>" } "), before (whatever comes between the prolog and the main tag) and after (whatever comes after the main tag)." }
+{ $see-also <xml> tag prolog } ;
+
+HELP: <xml>
+{ $values { "prolog" "an XML prolog" } { "before" "a sequence of XML elements" }
+{ "body" tag } { "after" "a sequence of XML elements" } { "xml" "an XML document" } }
+{ $description "Creates an XML document. The " { $snippet "before" } " and " { $snippet "after" } " slots store what comes before and after the main tag, and " { $snippet "body" } "contains the main tag itself." }
+{ $see-also xml <tag> } ;
+
+HELP: prolog
+{ $class-description "represents an XML prolog, with the tuple fields version (containing \"1.0\" or \"1.1\"), encoding (a string representing the encoding type), and standalone (t or f, whether the document is standalone without external entities)" }
+{ $see-also <prolog> xml } ;
+
+HELP: <prolog>
+{ $values { "version" "a string, 1.0 or 1.1" }
+{ "encoding" "a string" } { "standalone" "a boolean" } { "prolog" "an XML prolog" } }
+{ $description "Creates an XML prolog tuple." }
+{ $see-also prolog <xml> } ;
+
+HELP: comment
+{ $class-description "Represents a comment in XML. This tuple has one slot, " { $snippet "text" } ", which contains the string of the comment." }
+{ $see-also <comment> } ;
+
+HELP: <comment>
+{ $values { "text" string } { "comment" comment } }
+{ $description "Creates an XML " { $link comment } " tuple." }
+{ $see-also comment } ;
+
+HELP: instruction
+{ $class-description "Represents an XML instruction, such as " { $snippet "<?xsl stylesheet='foo.xml'?>" } ". Contains one slot, " { $snippet "text" } ", which contains the string between the question marks." }
+{ $see-also <instruction> } ;
+
+HELP: <instruction>
+{ $values { "text" "a string" } { "instruction" "an XML instruction" } }
+{ $description "Creates an XML parsing instruction, like " { $snippet "<?xsl stylesheet='foo.xml'?>" } "." }
+{ $see-also instruction } ;
+
+HELP: opener
+{ $class-description "Describes an opening tag, like " { $snippet "<a>" } ". Contains two slots, " { $snippet "name" } " and " { $snippet "attrs" } " containing, respectively, the name of the tag and its attributes." } ;
+
+HELP: closer
+{ $class-description "Describes a closing tag, like " { $snippet "</a>" } ". Contains one slot, " { $snippet "name" } ", containing the closer's name." } ;
+
+HELP: contained
+{ $class-description "Represents a self-closing tag, like " { $snippet "<a/>" } ". Contains two slots," { $snippet "name" } " and " { $snippet "attrs" } " containing, respectively, the name of the tag and its attributes." } ;
+
+{ opener closer contained } related-words
+
+HELP: open-tag
+{ $class-description "Represents a tag that does have children, ie. is not a contained tag" }
+{ $notes "The constructor used for this class is simply " { $link <tag> } "." }
+{ $see-also tag contained-tag } ;
+
+HELP: names-match?
+{ $values { "name1" "a name" } { "name2" "a name" } { "?" "t or f" } }
+{ $description "Checks to see if the two names match, that is, if all fields are equal, ignoring fields whose value is f in either name." }
+{ $example "USING: prettyprint xml.data ;" "T{ name f \"rpc\" \"methodCall\" f } T{ name f f \"methodCall\" \"http://www.xmlrpc.org/\" } names-match? ." "t" }
+{ $see-also name } ;
+
+HELP: assure-name
+{ $values { "string/name" "a string or a name" } { "name" "a name" } }
+{ $description "Converts a string into an XML name, if it is not already a name." } ;
+
+HELP: <simple-name>
+{ $values { "string" string } { "name" name } }
+{ $description "Converts a string into an XML name with an empty prefix and URL." } ;
+
+HELP: element-decl
+{ $class-description "Describes the class of element declarations, like <!ELEMENT  greeting (#PCDATA)>." } ;
+
+HELP: <element-decl>
+{ $values { "name" name } { "content-spec" string } { "element-decl" entity-decl } }
+{ $description "Creates an element declaration object, of the class " { $link element-decl } } ;
+
+HELP: attlist-decl
+{ $class-description "Describes the class of element declarations, like " { $snippet "<!ATTLIST pre xml:space (preserve) #FIXED 'preserve'>" } "." } ;
+
+HELP: <attlist-decl>
+{ $values { "name" name } { "att-defs" string } { "attlist-decl" attlist-decl } }
+{ $description "Creates an element declaration object, of the class " { $link attlist-decl } } ;
+
+HELP: entity-decl
+{ $class-description "Describes the class of element declarations, like " { $snippet "<!ENTITY foo 'bar'>" } "." } ;
+
+HELP: <entity-decl>
+{ $values { "name" name } { "def" string } { "pe?" "t or f" } { "entity-decl" entity-decl } }
+{ $description "Creates an entity declaration object, of the class " { $link entity-decl } ". The pe? slot should be t if the object is a DTD-internal entity, like " { $snippet "<!ENTITY % foo 'bar'>" } " and f if the object is like " { $snippet "<!ENTITY foo 'bar'>" } ", that is, it can be used outside of the DTD." } ;
+
+HELP: system-id
+{ $class-description "Describes the class of system identifiers within an XML DTD directive, such as " { $snippet "<!DOCTYPE greeting " { $emphasis "SYSTEM 'hello.dtd'" } ">" } "." } ;
+
+HELP: <system-id>
+{ $values { "system-literal" string } { "system-id" system-id } }
+{ $description "Constructs a " { $link system-id } " tuple." } ;
+
+HELP: public-id
+{ $class-description "Describes the class of public identifiers within an XML DTD directive, such as " { $snippet "<!DOCTYPE open-hatch " { $emphasis "PUBLIC '-//Textuality//TEXT Standard open-hatch boilerplate//EN' 'http://www.textuality.com/boilerplate/OpenHatch.xml'" } ">" } } ;
+
+HELP: <public-id>
+{ $values { "pubid-literal" string } { "system-literal" string } { "public-id" public-id } }
+{ $description "Constructs a " { $link system-id } " tuple." } ;
+
+HELP: notation-decl
+{ $class-description "Describes the class of element declarations, like " { $snippet "<!NOTATION jpg SYSTEM './jpgviewer'>" } "." } ;
+
+HELP: <notation-decl>
+{ $values { "name" string } { "id" id } { "notation-decl" notation-decl } }
+{ $description "Creates an notation declaration object, of the class " { $link notation-decl } "." } ;
+
+HELP: doctype-decl
+{ $class-description "Describes the class of doctype declarations." } ;
+
+HELP: <doctype-decl>
+{ $values { "name" name } { "external-id" id } { "internal-subset" sequence } { "doctype-decl" doctype-decl } }
+{ $description "Creates a new doctype declaration object, of the class " { $link doctype-decl } ". Only one of external-id or internal-subset will be non-null." } ;
+
+HELP: unescaped
+{ $class-description "When constructing XML documents to write to output, it can be useful to splice in a string which is already written. This tuple type allows for that. Printing an " { $snippet "unescaped" } " is the same is printing its " { $snippet "string" } " slot." } ;
+
+HELP: <unescaped>
+{ $values { "string" string } { "unescaped" unescaped } }
+{ $description "Constructs an " { $link unescaped } " tuple, given a string." } ;
+
+HELP: xml-chunk
+{ $class-description "Encapsulates a balanced fragment of an XML document. This is a sequence (following the sequence protocol) of XML data types, eg " { $link string } "s and " { $link tag } "s." } ;
+
+HELP: <xml-chunk>
+{ $values { "seq" sequence } { "xml-chunk" xml-chunk } }
+{ $description "Constructs an " { $link xml-chunk } " tuple, given a sequence to be its contents." } ;
index bf4e2047a7990df29e275f8082f8e60e405423d3..6cd975d42da83172595921b427f2c03cdddd77b0 100644 (file)
@@ -1,11 +1,19 @@
-! Copyright (C) 2005, 2006 Daniel Ehrenberg
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel sequences sequences.private assocs arrays
 delegate.protocols delegate vectors accessors multiline
-macros words quotations combinators slots fry ;
+macros words quotations combinators slots fry strings ;
 IN: xml.data
 
-TUPLE: name space main url ;
+TUPLE: interpolated var ;
+C: <interpolated> interpolated
+
+UNION: nullable-string string POSTPONE: f ;
+
+TUPLE: name
+    { space nullable-string }
+    { main string }
+    { url nullable-string } ;
 C: <name> name
 
 : ?= ( object/f object/f -- ? )
@@ -17,50 +25,15 @@ C: <name> name
     [ [ main>> ] bi@ ?= ] 2tri and and ;
 
 : <simple-name> ( string -- name )
+    "" swap f <name> ;
+
+: <null-name> ( string -- name )
     f swap f <name> ;
 
 : assure-name ( string/name -- name )
-    dup name? [ <simple-name> ] unless ;
-
-TUPLE: opener name attrs ;
-C: <opener> opener
-
-TUPLE: closer name ;
-C: <closer> closer
-
-TUPLE: contained name attrs ;
-C: <contained> contained
-
-TUPLE: comment text ;
-C: <comment> comment
-
-TUPLE: directive ;
-
-TUPLE: element-decl < directive name content-spec ;
-C: <element-decl> element-decl
-
-TUPLE: attlist-decl < directive name att-defs ;
-C: <attlist-decl> attlist-decl
+    dup name? [ <null-name> ] unless ;
 
-TUPLE: entity-decl < directive name def ;
-C: <entity-decl> entity-decl
-
-TUPLE: system-id system-literal ;
-C: <system-id> system-id
-
-TUPLE: public-id pubid-literal system-literal ;
-C: <public-id> public-id
-
-TUPLE: doctype-decl < directive name external-id internal-subset ;
-C: <doctype-decl> doctype-decl
-
-TUPLE: instruction text ;
-C: <instruction> instruction
-
-TUPLE: prolog version encoding standalone ;
-C: <prolog> prolog
-
-TUPLE: attrs alist ;
+TUPLE: attrs { alist sequence } ;
 C: <attrs> attrs
 
 : attr@ ( key alist -- index {key,value} )
@@ -92,22 +65,96 @@ M: attrs assoc-like
 M: attrs clear-assoc
     f >>alist drop ;
 M: attrs delete-at
-    tuck attr@ drop [ swap alist>> delete-nth ] [ drop ] if* ;
+    [ nip ] [ attr@ drop ] 2bi
+    [ swap alist>> delete-nth ] [ drop ] if* ;
 
 M: attrs clone
     alist>> clone <attrs> ;
 
 INSTANCE: attrs assoc
 
-TUPLE: tag name attrs children ;
+TUPLE: opener { name name } { attrs attrs } ;
+C: <opener> opener
+
+TUPLE: closer { name name } ;
+C: <closer> closer
+
+TUPLE: contained { name name } { attrs attrs } ;
+C: <contained> contained
+
+TUPLE: comment { text string } ;
+C: <comment> comment
+
+TUPLE: directive ;
+
+TUPLE: element-decl < directive
+    { name string }
+    { content-spec string } ;
+C: <element-decl> element-decl
+
+TUPLE: attlist-decl < directive
+    { name string }
+    { att-defs string } ;
+C: <attlist-decl> attlist-decl
+
+UNION: boolean t POSTPONE: f ;
+
+TUPLE: entity-decl < directive
+    { name string }
+    { def string }
+    { pe? boolean } ;
+C: <entity-decl> entity-decl
+
+TUPLE: system-id { system-literal string } ;
+C: <system-id> system-id
+
+TUPLE: public-id { pubid-literal string } { system-literal string } ;
+C: <public-id> public-id
+
+UNION: id system-id public-id POSTPONE: f ;
+
+TUPLE: dtd
+    { directives sequence }
+    { entities assoc }
+    { parameter-entities assoc } ;
+C: <dtd> dtd
+
+UNION: dtd/f dtd POSTPONE: f ;
+
+TUPLE: doctype-decl < directive
+    { name string }
+    { external-id id }
+    { internal-subset dtd/f } ;
+C: <doctype-decl> doctype-decl
+
+TUPLE: notation-decl < directive
+    { name string }
+    { id string } ;
+C: <notation-decl> notation-decl
+
+TUPLE: instruction { text string } ;
+C: <instruction> instruction
+
+TUPLE: prolog
+    { version string }
+    { encoding string }
+    { standalone boolean } ;
+C: <prolog> prolog
+
+TUPLE: tag
+    { name name }
+    { attrs attrs }
+    { children sequence } ;
 
 : <tag> ( name attrs children -- tag )
     [ assure-name ] [ T{ attrs } assoc-like ] [ ] tri*
     tag boa ;
 
-! For convenience, tags follow the assoc protocol too (for attrs)
-CONSULT: assoc-protocol tag attrs>> ;
-INSTANCE: tag assoc
+: attr ( tag/xml name -- string )
+    swap attrs>> at ;
+
+: set-attr ( tag/xml value name -- )
+    rot attrs>> set-at ;
 
 ! They also follow the sequence protocol (for children)
 CONSULT: sequence-protocol tag children>> ;
@@ -131,15 +178,16 @@ MACRO: clone-slots ( class -- tuple )
 M: tag clone
     tag clone-slots ;
 
-TUPLE: xml prolog before body after ;
+TUPLE: xml
+    { prolog prolog }
+    { before sequence }
+    { body tag }
+    { after sequence } ;
 C: <xml> xml
 
 CONSULT: sequence-protocol xml body>> ;
 INSTANCE: xml sequence
 
-CONSULT: assoc-protocol xml body>> ;
-INSTANCE: xml assoc
-
 CONSULT: tag xml body>> ;
 
 CONSULT: name xml body>> ;
@@ -167,3 +215,15 @@ M: xml like
 
 PREDICATE: contained-tag < tag children>> not ;
 PREDICATE: open-tag < tag children>> ;
+
+TUPLE: unescaped string ;
+C: <unescaped> unescaped
+
+UNION: xml-data
+    tag comment string directive instruction unescaped ;
+
+TUPLE: xml-chunk seq ;
+C: <xml-chunk> xml-chunk
+
+CONSULT: sequence-protocol xml-chunk seq>> ;
+INSTANCE: xml-chunk sequence
diff --git a/basis/xml/data/summary.txt b/basis/xml/data/summary.txt
new file mode 100644 (file)
index 0000000..d8f0f0d
--- /dev/null
@@ -0,0 +1 @@
+Contains XML data types and basic tools for manipulation
diff --git a/basis/xml/data/tags.txt b/basis/xml/data/tags.txt
new file mode 100644 (file)
index 0000000..2a50137
--- /dev/null
@@ -0,0 +1,2 @@
+collections
+assocs
diff --git a/basis/xml/dispatch/authors.txt b/basis/xml/dispatch/authors.txt
new file mode 100644 (file)
index 0000000..f990dd0
--- /dev/null
@@ -0,0 +1 @@
+Daniel Ehrenberg
diff --git a/basis/xml/dispatch/dispatch-docs.factor b/basis/xml/dispatch/dispatch-docs.factor
new file mode 100644 (file)
index 0000000..572a75c
--- /dev/null
@@ -0,0 +1,25 @@
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax ;
+IN: xml.dispatch
+
+ABOUT: "xml.dispatch"
+
+ARTICLE: "xml.dispatch" "Dispatch on XML tag names"
+"Two parsing words define a system, analogous to generic words, for processing XML. A word can dispatch off the name of the tag that is passed to it. To define such a word, use"
+{ $subsection POSTPONE: PROCESS: }
+"and to define a new 'method' for this word, use"
+{ $subsection POSTPONE: TAG: } ;
+
+HELP: PROCESS:
+{ $syntax "PROCESS: word" }
+{ $values { "word" "a new word to define" } }
+{ $description "creates a new word to process XML tags" }
+{ $see-also POSTPONE: TAG: } ;
+
+HELP: TAG:
+{ $syntax "TAG: tag word definition... ;" }
+{ $values { "tag" "an xml tag name" } { "word" "an XML process" } }
+{ $description "defines what a process should do when it encounters a specific tag" }
+{ $examples { $code "PROCESS: x ( tag -- )\nTAG: a x drop \"hi\" write ;" } }
+{ $see-also POSTPONE: PROCESS: } ;
diff --git a/basis/xml/dispatch/dispatch-tests.factor b/basis/xml/dispatch/dispatch-tests.factor
new file mode 100644 (file)
index 0000000..6f3179b
--- /dev/null
@@ -0,0 +1,31 @@
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: xml io kernel math sequences strings xml.utilities
+tools.test math.parser xml.dispatch ;
+IN: xml.dispatch.tests
+
+PROCESS: calculate ( tag -- n )
+
+: calc-2children ( tag -- n n )
+    children-tags first2 [ calculate ] dip calculate ;
+
+TAG: number calculate
+    children>string string>number ;
+TAG: add calculate
+    calc-2children + ;
+TAG: minus calculate
+    calc-2children - ;
+TAG: times calculate
+    calc-2children * ;
+TAG: divide calculate
+    calc-2children / ;
+TAG: neg calculate
+    children-tags first calculate neg ;
+
+: calc-arith ( string -- n )
+    string>xml first-child-tag calculate ;
+
+[ 32 ] [
+    "<math><times><add><number>1</number><number>3</number></add><neg><number>-8</number></neg></times></math>"
+    calc-arith
+] unit-test
diff --git a/basis/xml/dispatch/dispatch.factor b/basis/xml/dispatch/dispatch.factor
new file mode 100644 (file)
index 0000000..23cb43c
--- /dev/null
@@ -0,0 +1,27 @@
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: words assocs kernel accessors parser sequences summary
+lexer splitting fry ;
+IN: xml.dispatch
+
+TUPLE: process-missing process tag ;
+M: process-missing summary
+    drop "Tag not implemented on process" ;
+
+: run-process ( tag word -- )
+    2dup "xtable" word-prop
+    [ dup main>> ] dip at* [ 2nip call ] [
+        drop \ process-missing boa throw
+    ] if ;
+
+: PROCESS:
+    CREATE
+    dup H{ } clone "xtable" set-word-prop
+    dup '[ _ run-process ] define ; parsing
+
+: TAG:
+    scan scan-word
+    parse-definition
+    swap "xtable" word-prop
+    rot "/" split [ [ 2dup ] dip swap set-at ] each 2drop ;
+    parsing
diff --git a/basis/xml/dispatch/summary.txt b/basis/xml/dispatch/summary.txt
new file mode 100644 (file)
index 0000000..6751e55
--- /dev/null
@@ -0,0 +1 @@
+'Generic words' that dispatch on XML tag names
diff --git a/basis/xml/dispatch/tags.txt b/basis/xml/dispatch/tags.txt
new file mode 100644 (file)
index 0000000..71c0ff7
--- /dev/null
@@ -0,0 +1 @@
+syntax
diff --git a/basis/xml/dtd/authors.txt b/basis/xml/dtd/authors.txt
new file mode 100644 (file)
index 0000000..f990dd0
--- /dev/null
@@ -0,0 +1 @@
+Daniel Ehrenberg
diff --git a/basis/xml/dtd/dtd.factor b/basis/xml/dtd/dtd.factor
new file mode 100644 (file)
index 0000000..50de78e
--- /dev/null
@@ -0,0 +1,45 @@
+! Copyright (C) 2005, 2009 Daniel Ehrenberg, Slava Pestov
+! See http://factorcode.org/license.txt for BSD license.
+USING: xml.tokenize xml.data xml.state kernel sequences ascii
+fry xml.errors combinators hashtables namespaces xml.entities
+strings xml.name ;
+IN: xml.dtd
+
+: take-decl-contents ( -- first second )
+    pass-blank take-word pass-blank ">" take-string ;
+
+: take-element-decl ( -- element-decl )
+    take-decl-contents <element-decl> ;
+
+: take-attlist-decl ( -- attlist-decl )
+    take-decl-contents <attlist-decl> ;
+
+: take-notation-decl ( -- notation-decl )
+    take-decl-contents <notation-decl> ; 
+
+UNION: dtd-acceptable
+    directive comment instruction ;
+
+: take-entity-def ( var -- entity-name entity-def )
+    [
+        take-word pass-blank get-char {
+            { CHAR: ' [ parse-quote ] }
+            { CHAR: " [ parse-quote ] }
+            [ drop take-external-id close ]
+        } case
+   ] dip '[ swap _ [ ?set-at ] change ] 2keep ;
+
+: take-entity-decl ( -- entity-decl )
+    pass-blank get-char {
+        { CHAR: % [ next pass-blank pe-table take-entity-def t ] }
+        [ drop extra-entities take-entity-def f ]
+    } case close <entity-decl> ;
+
+: take-inner-directive ( string -- directive )
+    {
+        { "ELEMENT" [ take-element-decl ] }
+        { "ATTLIST" [ take-attlist-decl ] }
+        { "ENTITY" [ take-entity-decl ] }
+        { "NOTATION" [ take-notation-decl ] }
+        [ bad-directive ]
+    } case ;
diff --git a/basis/xml/dtd/summary.txt b/basis/xml/dtd/summary.txt
new file mode 100644 (file)
index 0000000..8b0745f
--- /dev/null
@@ -0,0 +1 @@
+Implements the parsing of directives in DTDs
diff --git a/basis/xml/elements/authors.txt b/basis/xml/elements/authors.txt
new file mode 100644 (file)
index 0000000..f990dd0
--- /dev/null
@@ -0,0 +1 @@
+Daniel Ehrenberg
diff --git a/basis/xml/elements/elements.factor b/basis/xml/elements/elements.factor
new file mode 100644 (file)
index 0000000..b927947
--- /dev/null
@@ -0,0 +1,176 @@
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel namespaces xml.tokenize xml.state xml.name
+xml.data accessors arrays make xml.char-classes fry assocs sequences
+math xml.errors sets combinators io.encodings io.encodings.iana
+unicode.case xml.dtd strings xml.entities unicode.categories ;
+IN: xml.elements
+
+: take-interpolated ( quot -- interpolated )
+    interpolating? get [
+        drop get-char CHAR: > =
+        [ next f ]
+        [ "->" take-string [ blank? ] trim ]
+        if <interpolated>
+    ] [ call ] if ; inline
+
+: interpolate-quote ( -- interpolated )
+    [ quoteless-attr ] take-interpolated ;
+
+: parse-attr ( -- )
+    parse-name pass-blank "=" expect pass-blank
+    get-char CHAR: < =
+    [ "<-" expect interpolate-quote ]
+    [ t parse-quote* ] if 2array , ;
+
+: start-tag ( -- name ? )
+    #! Outputs the name and whether this is a closing tag
+    get-char CHAR: / = dup [ next ] when
+    parse-name swap ;
+
+: (middle-tag) ( -- )
+    pass-blank version-1.0? get-char name-start?
+    [ parse-attr (middle-tag) ] when ;
+
+: assure-no-duplicates ( attrs-alist -- attrs-alist )
+    H{ } clone 2dup '[ swap _ push-at ] assoc-each
+    [ nip length 2 >= ] assoc-filter >alist
+    [ first first2 duplicate-attr ] unless-empty ;
+
+: middle-tag ( -- attrs-alist )
+    ! f make will make a vector if it has any elements
+    [ (middle-tag) ] f make pass-blank
+    assure-no-duplicates ;
+
+: end-tag ( name attrs-alist -- tag )
+    tag-ns pass-blank get-char CHAR: / =
+    [ pop-ns <contained> next ">" expect ]
+    [ depth inc <opener> close ] if ;
+
+: take-comment ( -- comment )
+    "--" expect
+    "--" take-string
+    <comment>
+    ">" expect ;
+
+: assure-no-extra ( seq -- )
+    [ first ] map {
+        T{ name f "" "version" f }
+        T{ name f "" "encoding" f }
+        T{ name f "" "standalone" f }
+    } diff
+    [ extra-attrs ] unless-empty ; 
+
+: good-version ( version -- version )
+    dup { "1.0" "1.1" } member? [ bad-version ] unless ;
+
+: prolog-version ( alist -- version )
+    T{ name { space "" } { main "version" } } swap at
+    [ good-version ] [ versionless-prolog ] if*
+    dup set-version ;
+
+: prolog-encoding ( alist -- encoding )
+    T{ name { space "" } { main "encoding" } } swap at
+    "UTF-8" or ;
+
+: yes/no>bool ( string -- t/f )
+    {
+        { "yes" [ t ] }
+        { "no" [ f ] }
+        [ not-yes/no ]
+    } case ;
+
+: prolog-standalone ( alist -- version )
+    T{ name { space "" } { main "standalone" } } swap at
+    [ yes/no>bool ] [ f ] if* ;
+
+: prolog-attrs ( alist -- prolog )
+    [ prolog-version ]
+    [ prolog-encoding ]
+    [ prolog-standalone ]
+    tri <prolog> ;
+
+: parse-prolog ( -- prolog )
+    pass-blank middle-tag "?>" expect
+    dup assure-no-extra prolog-attrs ;
+
+: instruct ( -- instruction )
+    take-name {
+        { [ dup "xml" = ] [ drop parse-prolog ] }
+        { [ dup >lower "xml" = ] [ capitalized-prolog ] }
+        { [ dup valid-name? not ] [ bad-name ] }
+        [ "?>" take-string append <instruction> ]
+    } cond ;
+
+: take-cdata ( -- string )
+    depth get zero? [ bad-cdata ] when
+    "[CDATA[" expect "]]>" take-string ;
+
+DEFER: make-tag ! Is this unavoidable?
+
+: expand-pe ( -- ) ; ! Make this run the contents of the pe within a DOCTYPE
+
+: dtd-loop ( -- )
+    pass-blank get-char {
+        { CHAR: ] [ next ] }
+        { CHAR: % [ expand-pe ] }
+        { CHAR: < [
+            next make-tag dup dtd-acceptable?
+            [ bad-doctype ] unless , dtd-loop
+        ] }
+        { f [ ] }
+        [ 1string bad-doctype ]
+    } case ;
+
+: take-internal-subset ( -- dtd )
+    [
+        H{ } clone pe-table set
+        t in-dtd? set
+        dtd-loop
+        pe-table get
+    ] { } make swap extra-entities get swap <dtd> ;
+
+: take-optional-id ( -- id/f )
+    get-char "SP" member?
+    [ take-external-id ] [ f ] if ;
+
+: take-internal ( -- dtd/f )
+    get-char CHAR: [ =
+    [ next take-internal-subset ] [ f ] if ;
+
+: take-doctype-decl ( -- doctype-decl )
+    pass-blank take-name
+    pass-blank take-optional-id
+    pass-blank take-internal
+    <doctype-decl> close ;
+
+: take-directive ( -- doctype )
+    take-name dup "DOCTYPE" =
+    [ drop take-doctype-decl ] [
+        in-dtd? get
+        [ take-inner-directive ]
+        [ misplaced-directive ] if
+    ] if ;
+
+: direct ( -- object )
+    get-char {
+        { CHAR: - [ take-comment ] }
+        { CHAR: [ [ take-cdata ] }
+        [ drop take-directive ]
+    } case ;
+
+: normal-tag ( -- tag )
+    start-tag
+    [ dup add-ns pop-ns <closer> depth dec close ]
+    [ middle-tag end-tag ] if ;
+
+: interpolate-tag ( -- interpolated )
+    [ "-" bad-name ] take-interpolated ;
+
+: make-tag ( -- tag )
+    {
+        { [ get-char dup CHAR: ! = ] [ drop next direct ] }
+        { [ dup CHAR: ? = ] [ drop next instruct ] }
+        { [ dup CHAR: - = ] [ drop next interpolate-tag ] }
+        [ drop normal-tag ]
+    } cond ;
diff --git a/basis/xml/elements/summary.txt b/basis/xml/elements/summary.txt
new file mode 100644 (file)
index 0000000..c85b023
--- /dev/null
@@ -0,0 +1 @@
+Implements the parsing of XML tags
diff --git a/basis/xml/entities/entities-docs.factor b/basis/xml/entities/entities-docs.factor
new file mode 100644 (file)
index 0000000..2fccb50
--- /dev/null
@@ -0,0 +1,21 @@
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax ;
+IN: xml.entities
+
+ABOUT: "xml.entities"
+
+ARTICLE: "xml.entities" "XML entities"
+    "When XML is parsed, entities like &foo; are replaced with the characters they represent. A few entities like &amp; and &lt; are defined by default, but more are available, and the set of entities can be customized. Below are some words involved in XML entities, defined in the vocabulary 'entities':"
+    { $subsection entities }
+    { $subsection with-entities }
+"For entities used in HTML/XHTML, see " { $vocab-link "xml.entities.html" } ;
+
+HELP: entities
+{ $description "A hash table from default XML entity names (like " { $snippet "&amp;" } " and " { $snippet "&lt;" } ") to the characters they represent. This is automatically included when parsing any XML document." }
+{ $see-also with-entities } ;
+
+HELP: with-entities
+{ $values { "entities" "a hash table of strings to strings" } { "quot" "a quotation ( -- )" } }
+{ $description "Calls the quotation using the given table of entity values (symbolizing, eg, that " { $snippet "&foo;" } " represents " { $snippet "\"a\"" } ") on top of the default XML entities" } ;
+
index 03de0f78d1814492947995bf9eff8cdb8884871e..3e768b1b88e5833461b85f0325d8a0f439960fd1 100644 (file)
@@ -1,6 +1,7 @@
 ! Copyright (C) 2005, 2006 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
-USING: namespaces make kernel assocs sequences fry ;
+USING: namespaces make kernel assocs sequences fry values
+io.files io.encodings.binary xml.state ;
 IN: xml.entities
 
 : entities-out
@@ -15,6 +16,7 @@ IN: xml.entities
         { CHAR: & "&amp;"  }
         { CHAR: ' "&apos;" }
         { CHAR: " "&quot;" }
+        { CHAR: < "&lt;"   }
     } ;
 
 : escape-string-by ( str table -- escaped )
@@ -36,265 +38,5 @@ IN: xml.entities
         { "quot"  CHAR: "  }
     } ;
 
-: html-entities
-    #! generated from:
-    #! http://www.w3.org/TR/REC-html40/sgml/entities.html
-    H{
-        { "nbsp"   160 }
-        { "iexcl"  161 }
-        { "cent"   162 }
-        { "pound"  163 }
-        { "curren" 164 }
-        { "yen"    165 }
-        { "brvbar" 166 }
-        { "sect"   167 }
-        { "uml"    168 }
-        { "copy"   169 }
-        { "ordf"   170 }
-        { "laquo"  171 }
-        { "not"    172 }
-        { "shy"    173 }
-        { "reg"    174 }
-        { "macr"   175 }
-        { "deg"    176 }
-        { "plusmn" 177 }
-        { "sup2"   178 }
-        { "sup3"   179 }
-        { "acute"  180 }
-        { "micro"  181 }
-        { "para"   182 }
-        { "middot" 183 }
-        { "cedil"  184 }
-        { "sup1"   185 }
-        { "ordm"   186 }
-        { "raquo"  187 }
-        { "frac14" 188 }
-        { "frac12" 189 }
-        { "frac34" 190 }
-        { "iquest" 191 }
-        { "Agrave" 192 }
-        { "Aacute" 193 }
-        { "Acirc"  194 }
-        { "Atilde" 195 }
-        { "Auml"   196 }
-        { "Aring"  197 }
-        { "AElig"  198 }
-        { "Ccedil" 199 }
-        { "Egrave" 200 }
-        { "Eacute" 201 }
-        { "Ecirc"  202 }
-        { "Euml"   203 }
-        { "Igrave" 204 }
-        { "Iacute" 205 }
-        { "Icirc"  206 }
-        { "Iuml"   207 }
-        { "ETH"    208 }
-        { "Ntilde" 209 }
-        { "Ograve" 210 }
-        { "Oacute" 211 }
-        { "Ocirc"  212 }
-        { "Otilde" 213 }
-        { "Ouml"   214 }
-        { "times"  215 }
-        { "Oslash" 216 }
-        { "Ugrave" 217 }
-        { "Uacute" 218 }
-        { "Ucirc"  219 }
-        { "Uuml"   220 }
-        { "Yacute" 221 }
-        { "THORN"  222 }
-        { "szlig"  223 }
-        { "agrave" 224 }
-        { "aacute" 225 }
-        { "acirc"  226 }
-        { "atilde" 227 }
-        { "auml"   228 }
-        { "aring"  229 }
-        { "aelig"  230 }
-        { "ccedil" 231 }
-        { "egrave" 232 }
-        { "eacute" 233 }
-        { "ecirc"  234 }
-        { "euml"   235 }
-        { "igrave" 236 }
-        { "iacute" 237 }
-        { "icirc"  238 }
-        { "iuml"   239 }
-        { "eth"    240 }
-        { "ntilde" 241 }
-        { "ograve" 242 }
-        { "oacute" 243 }
-        { "ocirc"  244 }
-        { "otilde" 245 }
-        { "ouml"   246 }
-        { "divide" 247 }
-        { "oslash" 248 }
-        { "ugrave" 249 }
-        { "uacute" 250 }
-        { "ucirc"  251 }
-        { "uuml"   252 }
-        { "yacute" 253 }
-        { "thorn"  254 }
-        { "yuml"   255 }
-        { "fnof"     402 }
-        { "Alpha"    913 }
-        { "Beta"     914 }
-        { "Gamma"    915 }
-        { "Delta"    916 }
-        { "Epsilon"  917 }
-        { "Zeta"     918 }
-        { "Eta"      919 }
-        { "Theta"    920 }
-        { "Iota"     921 }
-        { "Kappa"    922 }
-        { "Lambda"   923 }
-        { "Mu"       924 }
-        { "Nu"       925 }
-        { "Xi"       926 }
-        { "Omicron"  927 }
-        { "Pi"       928 }
-        { "Rho"      929 }
-        { "Sigma"    931 }
-        { "Tau"      932 }
-        { "Upsilon"  933 }
-        { "Phi"      934 }
-        { "Chi"      935 }
-        { "Psi"      936 }
-        { "Omega"    937 }
-        { "alpha"    945 }
-        { "beta"     946 }
-        { "gamma"    947 }
-        { "delta"    948 }
-        { "epsilon"  949 }
-        { "zeta"     950 }
-        { "eta"      951 }
-        { "theta"    952 }
-        { "iota"     953 }
-        { "kappa"    954 }
-        { "lambda"   955 }
-        { "mu"       956 }
-        { "nu"       957 }
-        { "xi"       958 }
-        { "omicron"  959 }
-        { "pi"       960 }
-        { "rho"      961 }
-        { "sigmaf"   962 }
-        { "sigma"    963 }
-        { "tau"      964 }
-        { "upsilon"  965 }
-        { "phi"      966 }
-        { "chi"      967 }
-        { "psi"      968 }
-        { "omega"    969 }
-        { "thetasym" 977 }
-        { "upsih"    978 }
-        { "piv"      982 }
-        { "bull"     8226 }
-        { "hellip"   8230 }
-        { "prime"    8242 }
-        { "Prime"    8243 }
-        { "oline"    8254 }
-        { "frasl"    8260 }
-        { "weierp"   8472 }
-        { "image"    8465 }
-        { "real"     8476 }
-        { "trade"    8482 }
-        { "alefsym"  8501 }
-        { "larr"     8592 }
-        { "uarr"     8593 }
-        { "rarr"     8594 }
-        { "darr"     8595 }
-        { "harr"     8596 }
-        { "crarr"    8629 }
-        { "lArr"     8656 }
-        { "uArr"     8657 }
-        { "rArr"     8658 }
-        { "dArr"     8659 }
-        { "hArr"     8660 }
-        { "forall"   8704 }
-        { "part"     8706 }
-        { "exist"    8707 }
-        { "empty"    8709 }
-        { "nabla"    8711 }
-        { "isin"     8712 }
-        { "notin"    8713 }
-        { "ni"       8715 }
-        { "prod"     8719 }
-        { "sum"      8721 }
-        { "minus"    8722 }
-        { "lowast"   8727 }
-        { "radic"    8730 }
-        { "prop"     8733 }
-        { "infin"    8734 }
-        { "ang"      8736 }
-        { "and"      8743 }
-        { "or"       8744 }
-        { "cap"      8745 }
-        { "cup"      8746 }
-        { "int"      8747 }
-        { "there4"   8756 }
-        { "sim"      8764 }
-        { "cong"     8773 }
-        { "asymp"    8776 }
-        { "ne"       8800 }
-        { "equiv"    8801 }
-        { "le"       8804 }
-        { "ge"       8805 }
-        { "sub"      8834 }
-        { "sup"      8835 }
-        { "nsub"     8836 }
-        { "sube"     8838 }
-        { "supe"     8839 }
-        { "oplus"    8853 }
-        { "otimes"   8855 }
-        { "perp"     8869 }
-        { "sdot"     8901 }
-        { "lceil"    8968 }
-        { "rceil"    8969 }
-        { "lfloor"   8970 }
-        { "rfloor"   8971 }
-        { "lang"     9001 }
-        { "rang"     9002 }
-        { "loz"      9674 }
-        { "spades"   9824 }
-        { "clubs"    9827 }
-        { "hearts"   9829 }
-        { "diams"    9830 }
-        { "OElig"   338 }
-        { "oelig"   339 }
-        { "Scaron"  352 }
-        { "scaron"  353 }
-        { "Yuml"    376 }
-        { "circ"    710 }
-        { "tilde"   732 }
-        { "ensp"    8194 }
-        { "emsp"    8195 }
-        { "thinsp"  8201 }
-        { "zwnj"    8204 }
-        { "zwj"     8205 }
-        { "lrm"     8206 }
-        { "rlm"     8207 }
-        { "ndash"   8211 }
-        { "mdash"   8212 }
-        { "lsquo"   8216 }
-        { "rsquo"   8217 }
-        { "sbquo"   8218 }
-        { "ldquo"   8220 }
-        { "rdquo"   8221 }
-        { "bdquo"   8222 }
-        { "dagger"  8224 }
-        { "Dagger"  8225 }
-        { "permil"  8240 }
-        { "lsaquo"  8249 }
-        { "rsaquo"  8250 }
-        { "euro"   8364 }
-    } ;
-
-SYMBOL: extra-entities
-f extra-entities set-global
-
 : with-entities ( entities quot -- )
     [ swap extra-entities set call ] with-scope ; inline
-
-: with-html-entities ( quot -- )
-    html-entities swap with-entities ; inline
diff --git a/basis/xml/entities/html/authors.txt b/basis/xml/entities/html/authors.txt
new file mode 100644 (file)
index 0000000..29e7963
--- /dev/null
@@ -0,0 +1 @@
+Daniel Ehrenberg
\ No newline at end of file
diff --git a/basis/xml/entities/html/html-docs.factor b/basis/xml/entities/html/html-docs.factor
new file mode 100644 (file)
index 0000000..f436944
--- /dev/null
@@ -0,0 +1,18 @@
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax xml.entities ;
+IN: xml.entities.html
+
+ARTICLE: "xml.entities.html" "HTML entities"
+{ $vocab-link "xml.entities.html" } " defines words for using entities defined in HTML/XHTML."
+{ $subsection html-entities }
+{ $subsection with-html-entities } ;
+
+HELP: html-entities
+{ $description "A hash table from HTML entity names to their character values." }
+{ $see-also entities with-html-entities } ;
+
+HELP: with-html-entities
+{ $values { "quot" "a quotation ( -- )" } }
+{ $description "Calls the given quotation using HTML entity values." }
+{ $see-also html-entities with-entities } ;
diff --git a/basis/xml/entities/html/html-tests.factor b/basis/xml/entities/html/html-tests.factor
new file mode 100644 (file)
index 0000000..68b10be
--- /dev/null
@@ -0,0 +1,4 @@
+! Copyright (C) 2009 Daniel Ehrenberg.
+! See http://factorcode.org/license.txt for BSD license.
+USING: tools.test xml.entities.html ;
+IN: xml.entities.html.tests
diff --git a/basis/xml/entities/html/html.factor b/basis/xml/entities/html/html.factor
new file mode 100644 (file)
index 0000000..f1e5231
--- /dev/null
@@ -0,0 +1,21 @@
+! Copyright (C) 2009 Daniel Ehrenberg.
+! See http://factorcode.org/license.txt for BSD license.
+USING: assocs io.encodings.binary io.files kernel namespaces sequences
+values xml xml.entities accessors xml.state ;
+IN: xml.entities.html
+
+VALUE: html-entities
+
+: read-entities-file ( file -- table )
+    file>dtd entities>> ;
+
+: get-html ( -- table )
+    { "lat1" "special" "symbol" } [
+        "resource:basis/xml/entities/html/xhtml-"
+        swap ".ent" 3append read-entities-file
+    ] map first3 assoc-union assoc-union ;
+
+get-html to: html-entities
+
+: with-html-entities ( quot -- )
+    html-entities swap with-entities ; inline
diff --git a/basis/xml/entities/html/xhtml-lat1.ent b/basis/xml/entities/html/xhtml-lat1.ent
new file mode 100644 (file)
index 0000000..ffee223
--- /dev/null
@@ -0,0 +1,196 @@
+<!-- Portions (C) International Organization for Standardization 1986
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+<!-- Character entity set. Typical invocation:
+    <!ENTITY % HTMLlat1 PUBLIC
+       "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+       "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
+    %HTMLlat1;
+-->
+
+<!ENTITY nbsp   "&#160;"> <!-- no-break space = non-breaking space,
+                                  U+00A0 ISOnum -->
+<!ENTITY iexcl  "&#161;"> <!-- inverted exclamation mark, U+00A1 ISOnum -->
+<!ENTITY cent   "&#162;"> <!-- cent sign, U+00A2 ISOnum -->
+<!ENTITY pound  "&#163;"> <!-- pound sign, U+00A3 ISOnum -->
+<!ENTITY curren "&#164;"> <!-- currency sign, U+00A4 ISOnum -->
+<!ENTITY yen    "&#165;"> <!-- yen sign = yuan sign, U+00A5 ISOnum -->
+<!ENTITY brvbar "&#166;"> <!-- broken bar = broken vertical bar,
+                                  U+00A6 ISOnum -->
+<!ENTITY sect   "&#167;"> <!-- section sign, U+00A7 ISOnum -->
+<!ENTITY uml    "&#168;"> <!-- diaeresis = spacing diaeresis,
+                                  U+00A8 ISOdia -->
+<!ENTITY copy   "&#169;"> <!-- copyright sign, U+00A9 ISOnum -->
+<!ENTITY ordf   "&#170;"> <!-- feminine ordinal indicator, U+00AA ISOnum -->
+<!ENTITY laquo  "&#171;"> <!-- left-pointing double angle quotation mark
+                                  = left pointing guillemet, U+00AB ISOnum -->
+<!ENTITY not    "&#172;"> <!-- not sign = angled dash,
+                                  U+00AC ISOnum -->
+<!ENTITY shy    "&#173;"> <!-- soft hyphen = discretionary hyphen,
+                                  U+00AD ISOnum -->
+<!ENTITY reg    "&#174;"> <!-- registered sign = registered trade mark sign,
+                                  U+00AE ISOnum -->
+<!ENTITY macr   "&#175;"> <!-- macron = spacing macron = overline
+                                  = APL overbar, U+00AF ISOdia -->
+<!ENTITY deg    "&#176;"> <!-- degree sign, U+00B0 ISOnum -->
+<!ENTITY plusmn "&#177;"> <!-- plus-minus sign = plus-or-minus sign,
+                                  U+00B1 ISOnum -->
+<!ENTITY sup2   "&#178;"> <!-- superscript two = superscript digit two
+                                  = squared, U+00B2 ISOnum -->
+<!ENTITY sup3   "&#179;"> <!-- superscript three = superscript digit three
+                                  = cubed, U+00B3 ISOnum -->
+<!ENTITY acute  "&#180;"> <!-- acute accent = spacing acute,
+                                  U+00B4 ISOdia -->
+<!ENTITY micro  "&#181;"> <!-- micro sign, U+00B5 ISOnum -->
+<!ENTITY para   "&#182;"> <!-- pilcrow sign = paragraph sign,
+                                  U+00B6 ISOnum -->
+<!ENTITY middot "&#183;"> <!-- middle dot = Georgian comma
+                                  = Greek middle dot, U+00B7 ISOnum -->
+<!ENTITY cedil  "&#184;"> <!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
+<!ENTITY sup1   "&#185;"> <!-- superscript one = superscript digit one,
+                                  U+00B9 ISOnum -->
+<!ENTITY ordm   "&#186;"> <!-- masculine ordinal indicator,
+                                  U+00BA ISOnum -->
+<!ENTITY raquo  "&#187;"> <!-- right-pointing double angle quotation mark
+                                  = right pointing guillemet, U+00BB ISOnum -->
+<!ENTITY frac14 "&#188;"> <!-- vulgar fraction one quarter
+                                  = fraction one quarter, U+00BC ISOnum -->
+<!ENTITY frac12 "&#189;"> <!-- vulgar fraction one half
+                                  = fraction one half, U+00BD ISOnum -->
+<!ENTITY frac34 "&#190;"> <!-- vulgar fraction three quarters
+                                  = fraction three quarters, U+00BE ISOnum -->
+<!ENTITY iquest "&#191;"> <!-- inverted question mark
+                                  = turned question mark, U+00BF ISOnum -->
+<!ENTITY Agrave "&#192;"> <!-- latin capital letter A with grave
+                                  = latin capital letter A grave,
+                                  U+00C0 ISOlat1 -->
+<!ENTITY Aacute "&#193;"> <!-- latin capital letter A with acute,
+                                  U+00C1 ISOlat1 -->
+<!ENTITY Acirc  "&#194;"> <!-- latin capital letter A with circumflex,
+                                  U+00C2 ISOlat1 -->
+<!ENTITY Atilde "&#195;"> <!-- latin capital letter A with tilde,
+                                  U+00C3 ISOlat1 -->
+<!ENTITY Auml   "&#196;"> <!-- latin capital letter A with diaeresis,
+                                  U+00C4 ISOlat1 -->
+<!ENTITY Aring  "&#197;"> <!-- latin capital letter A with ring above
+                                  = latin capital letter A ring,
+                                  U+00C5 ISOlat1 -->
+<!ENTITY AElig  "&#198;"> <!-- latin capital letter AE
+                                  = latin capital ligature AE,
+                                  U+00C6 ISOlat1 -->
+<!ENTITY Ccedil "&#199;"> <!-- latin capital letter C with cedilla,
+                                  U+00C7 ISOlat1 -->
+<!ENTITY Egrave "&#200;"> <!-- latin capital letter E with grave,
+                                  U+00C8 ISOlat1 -->
+<!ENTITY Eacute "&#201;"> <!-- latin capital letter E with acute,
+                                  U+00C9 ISOlat1 -->
+<!ENTITY Ecirc  "&#202;"> <!-- latin capital letter E with circumflex,
+                                  U+00CA ISOlat1 -->
+<!ENTITY Euml   "&#203;"> <!-- latin capital letter E with diaeresis,
+                                  U+00CB ISOlat1 -->
+<!ENTITY Igrave "&#204;"> <!-- latin capital letter I with grave,
+                                  U+00CC ISOlat1 -->
+<!ENTITY Iacute "&#205;"> <!-- latin capital letter I with acute,
+                                  U+00CD ISOlat1 -->
+<!ENTITY Icirc  "&#206;"> <!-- latin capital letter I with circumflex,
+                                  U+00CE ISOlat1 -->
+<!ENTITY Iuml   "&#207;"> <!-- latin capital letter I with diaeresis,
+                                  U+00CF ISOlat1 -->
+<!ENTITY ETH    "&#208;"> <!-- latin capital letter ETH, U+00D0 ISOlat1 -->
+<!ENTITY Ntilde "&#209;"> <!-- latin capital letter N with tilde,
+                                  U+00D1 ISOlat1 -->
+<!ENTITY Ograve "&#210;"> <!-- latin capital letter O with grave,
+                                  U+00D2 ISOlat1 -->
+<!ENTITY Oacute "&#211;"> <!-- latin capital letter O with acute,
+                                  U+00D3 ISOlat1 -->
+<!ENTITY Ocirc  "&#212;"> <!-- latin capital letter O with circumflex,
+                                  U+00D4 ISOlat1 -->
+<!ENTITY Otilde "&#213;"> <!-- latin capital letter O with tilde,
+                                  U+00D5 ISOlat1 -->
+<!ENTITY Ouml   "&#214;"> <!-- latin capital letter O with diaeresis,
+                                  U+00D6 ISOlat1 -->
+<!ENTITY times  "&#215;"> <!-- multiplication sign, U+00D7 ISOnum -->
+<!ENTITY Oslash "&#216;"> <!-- latin capital letter O with stroke
+                                  = latin capital letter O slash,
+                                  U+00D8 ISOlat1 -->
+<!ENTITY Ugrave "&#217;"> <!-- latin capital letter U with grave,
+                                  U+00D9 ISOlat1 -->
+<!ENTITY Uacute "&#218;"> <!-- latin capital letter U with acute,
+                                  U+00DA ISOlat1 -->
+<!ENTITY Ucirc  "&#219;"> <!-- latin capital letter U with circumflex,
+                                  U+00DB ISOlat1 -->
+<!ENTITY Uuml   "&#220;"> <!-- latin capital letter U with diaeresis,
+                                  U+00DC ISOlat1 -->
+<!ENTITY Yacute "&#221;"> <!-- latin capital letter Y with acute,
+                                  U+00DD ISOlat1 -->
+<!ENTITY THORN  "&#222;"> <!-- latin capital letter THORN,
+                                  U+00DE ISOlat1 -->
+<!ENTITY szlig  "&#223;"> <!-- latin small letter sharp s = ess-zed,
+                                  U+00DF ISOlat1 -->
+<!ENTITY agrave "&#224;"> <!-- latin small letter a with grave
+                                  = latin small letter a grave,
+                                  U+00E0 ISOlat1 -->
+<!ENTITY aacute "&#225;"> <!-- latin small letter a with acute,
+                                  U+00E1 ISOlat1 -->
+<!ENTITY acirc  "&#226;"> <!-- latin small letter a with circumflex,
+                                  U+00E2 ISOlat1 -->
+<!ENTITY atilde "&#227;"> <!-- latin small letter a with tilde,
+                                  U+00E3 ISOlat1 -->
+<!ENTITY auml   "&#228;"> <!-- latin small letter a with diaeresis,
+                                  U+00E4 ISOlat1 -->
+<!ENTITY aring  "&#229;"> <!-- latin small letter a with ring above
+                                  = latin small letter a ring,
+                                  U+00E5 ISOlat1 -->
+<!ENTITY aelig  "&#230;"> <!-- latin small letter ae
+                                  = latin small ligature ae, U+00E6 ISOlat1 -->
+<!ENTITY ccedil "&#231;"> <!-- latin small letter c with cedilla,
+                                  U+00E7 ISOlat1 -->
+<!ENTITY egrave "&#232;"> <!-- latin small letter e with grave,
+                                  U+00E8 ISOlat1 -->
+<!ENTITY eacute "&#233;"> <!-- latin small letter e with acute,
+                                  U+00E9 ISOlat1 -->
+<!ENTITY ecirc  "&#234;"> <!-- latin small letter e with circumflex,
+                                  U+00EA ISOlat1 -->
+<!ENTITY euml   "&#235;"> <!-- latin small letter e with diaeresis,
+                                  U+00EB ISOlat1 -->
+<!ENTITY igrave "&#236;"> <!-- latin small letter i with grave,
+                                  U+00EC ISOlat1 -->
+<!ENTITY iacute "&#237;"> <!-- latin small letter i with acute,
+                                  U+00ED ISOlat1 -->
+<!ENTITY icirc  "&#238;"> <!-- latin small letter i with circumflex,
+                                  U+00EE ISOlat1 -->
+<!ENTITY iuml   "&#239;"> <!-- latin small letter i with diaeresis,
+                                  U+00EF ISOlat1 -->
+<!ENTITY eth    "&#240;"> <!-- latin small letter eth, U+00F0 ISOlat1 -->
+<!ENTITY ntilde "&#241;"> <!-- latin small letter n with tilde,
+                                  U+00F1 ISOlat1 -->
+<!ENTITY ograve "&#242;"> <!-- latin small letter o with grave,
+                                  U+00F2 ISOlat1 -->
+<!ENTITY oacute "&#243;"> <!-- latin small letter o with acute,
+                                  U+00F3 ISOlat1 -->
+<!ENTITY ocirc  "&#244;"> <!-- latin small letter o with circumflex,
+                                  U+00F4 ISOlat1 -->
+<!ENTITY otilde "&#245;"> <!-- latin small letter o with tilde,
+                                  U+00F5 ISOlat1 -->
+<!ENTITY ouml   "&#246;"> <!-- latin small letter o with diaeresis,
+                                  U+00F6 ISOlat1 -->
+<!ENTITY divide "&#247;"> <!-- division sign, U+00F7 ISOnum -->
+<!ENTITY oslash "&#248;"> <!-- latin small letter o with stroke,
+                                  = latin small letter o slash,
+                                  U+00F8 ISOlat1 -->
+<!ENTITY ugrave "&#249;"> <!-- latin small letter u with grave,
+                                  U+00F9 ISOlat1 -->
+<!ENTITY uacute "&#250;"> <!-- latin small letter u with acute,
+                                  U+00FA ISOlat1 -->
+<!ENTITY ucirc  "&#251;"> <!-- latin small letter u with circumflex,
+                                  U+00FB ISOlat1 -->
+<!ENTITY uuml   "&#252;"> <!-- latin small letter u with diaeresis,
+                                  U+00FC ISOlat1 -->
+<!ENTITY yacute "&#253;"> <!-- latin small letter y with acute,
+                                  U+00FD ISOlat1 -->
+<!ENTITY thorn  "&#254;"> <!-- latin small letter thorn,
+                                  U+00FE ISOlat1 -->
+<!ENTITY yuml   "&#255;"> <!-- latin small letter y with diaeresis,
+                                  U+00FF ISOlat1 -->
diff --git a/basis/xml/entities/html/xhtml-special.ent b/basis/xml/entities/html/xhtml-special.ent
new file mode 100644 (file)
index 0000000..ca358b2
--- /dev/null
@@ -0,0 +1,80 @@
+<!-- Special characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+     <!ENTITY % HTMLspecial PUBLIC
+        "-//W3C//ENTITIES Special for XHTML//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
+     %HTMLspecial;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+     New names (i.e., not in ISO 8879 list) do not clash with any
+     existing ISO 8879 entity names. ISO 10646 character numbers
+     are given for each character, in hex. values are decimal
+     conversions of the ISO 10646 values and refer to the document
+     character set. Names are Unicode names. 
+-->
+
+<!-- C0 Controls and Basic Latin -->
+<!ENTITY quot    "&#34;"> <!--  quotation mark, U+0022 ISOnum -->
+<!ENTITY amp     "&#38;#38;"> <!--  ampersand, U+0026 ISOnum -->
+<!ENTITY lt      "&#38;#60;"> <!--  less-than sign, U+003C ISOnum -->
+<!ENTITY gt      "&#62;"> <!--  greater-than sign, U+003E ISOnum -->
+<!ENTITY apos   "&#39;"> <!--  apostrophe = APL quote, U+0027 ISOnum -->
+
+<!-- Latin Extended-A -->
+<!ENTITY OElig   "&#338;"> <!--  latin capital ligature OE,
+                                    U+0152 ISOlat2 -->
+<!ENTITY oelig   "&#339;"> <!--  latin small ligature oe, U+0153 ISOlat2 -->
+<!-- ligature is a misnomer, this is a separate character in some languages -->
+<!ENTITY Scaron  "&#352;"> <!--  latin capital letter S with caron,
+                                    U+0160 ISOlat2 -->
+<!ENTITY scaron  "&#353;"> <!--  latin small letter s with caron,
+                                    U+0161 ISOlat2 -->
+<!ENTITY Yuml    "&#376;"> <!--  latin capital letter Y with diaeresis,
+                                    U+0178 ISOlat2 -->
+
+<!-- Spacing Modifier Letters -->
+<!ENTITY circ    "&#710;"> <!--  modifier letter circumflex accent,
+                                    U+02C6 ISOpub -->
+<!ENTITY tilde   "&#732;"> <!--  small tilde, U+02DC ISOdia -->
+
+<!-- General Punctuation -->
+<!ENTITY ensp    "&#8194;"> <!-- en space, U+2002 ISOpub -->
+<!ENTITY emsp    "&#8195;"> <!-- em space, U+2003 ISOpub -->
+<!ENTITY thinsp  "&#8201;"> <!-- thin space, U+2009 ISOpub -->
+<!ENTITY zwnj    "&#8204;"> <!-- zero width non-joiner,
+                                    U+200C NEW RFC 2070 -->
+<!ENTITY zwj     "&#8205;"> <!-- zero width joiner, U+200D NEW RFC 2070 -->
+<!ENTITY lrm     "&#8206;"> <!-- left-to-right mark, U+200E NEW RFC 2070 -->
+<!ENTITY rlm     "&#8207;"> <!-- right-to-left mark, U+200F NEW RFC 2070 -->
+<!ENTITY ndash   "&#8211;"> <!-- en dash, U+2013 ISOpub -->
+<!ENTITY mdash   "&#8212;"> <!-- em dash, U+2014 ISOpub -->
+<!ENTITY lsquo   "&#8216;"> <!-- left single quotation mark,
+                                    U+2018 ISOnum -->
+<!ENTITY rsquo   "&#8217;"> <!-- right single quotation mark,
+                                    U+2019 ISOnum -->
+<!ENTITY sbquo   "&#8218;"> <!-- single low-9 quotation mark, U+201A NEW -->
+<!ENTITY ldquo   "&#8220;"> <!-- left double quotation mark,
+                                    U+201C ISOnum -->
+<!ENTITY rdquo   "&#8221;"> <!-- right double quotation mark,
+                                    U+201D ISOnum -->
+<!ENTITY bdquo   "&#8222;"> <!-- double low-9 quotation mark, U+201E NEW -->
+<!ENTITY dagger  "&#8224;"> <!-- dagger, U+2020 ISOpub -->
+<!ENTITY Dagger  "&#8225;"> <!-- double dagger, U+2021 ISOpub -->
+<!ENTITY permil  "&#8240;"> <!-- per mille sign, U+2030 ISOtech -->
+<!ENTITY lsaquo  "&#8249;"> <!-- single left-pointing angle quotation mark,
+                                    U+2039 ISO proposed -->
+<!-- lsaquo is proposed but not yet ISO standardized -->
+<!ENTITY rsaquo  "&#8250;"> <!-- single right-pointing angle quotation mark,
+                                    U+203A ISO proposed -->
+<!-- rsaquo is proposed but not yet ISO standardized -->
+
+<!-- Currency Symbols -->
+<!ENTITY euro   "&#8364;"> <!--  euro sign, U+20AC NEW -->
diff --git a/basis/xml/entities/html/xhtml-symbol.ent b/basis/xml/entities/html/xhtml-symbol.ent
new file mode 100644 (file)
index 0000000..63c2abf
--- /dev/null
@@ -0,0 +1,237 @@
+<!-- Mathematical, Greek and Symbolic characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+     <!ENTITY % HTMLsymbol PUBLIC
+        "-//W3C//ENTITIES Symbols for XHTML//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
+     %HTMLsymbol;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+     New names (i.e., not in ISO 8879 list) do not clash with any
+     existing ISO 8879 entity names. ISO 10646 character numbers
+     are given for each character, in hex. values are decimal
+     conversions of the ISO 10646 values and refer to the document
+     character set. Names are Unicode names. 
+-->
+
+<!-- Latin Extended-B -->
+<!ENTITY fnof     "&#402;"> <!-- latin small letter f with hook = function
+                                    = florin, U+0192 ISOtech -->
+
+<!-- Greek -->
+<!ENTITY Alpha    "&#913;"> <!-- greek capital letter alpha, U+0391 -->
+<!ENTITY Beta     "&#914;"> <!-- greek capital letter beta, U+0392 -->
+<!ENTITY Gamma    "&#915;"> <!-- greek capital letter gamma,
+                                    U+0393 ISOgrk3 -->
+<!ENTITY Delta    "&#916;"> <!-- greek capital letter delta,
+                                    U+0394 ISOgrk3 -->
+<!ENTITY Epsilon  "&#917;"> <!-- greek capital letter epsilon, U+0395 -->
+<!ENTITY Zeta     "&#918;"> <!-- greek capital letter zeta, U+0396 -->
+<!ENTITY Eta      "&#919;"> <!-- greek capital letter eta, U+0397 -->
+<!ENTITY Theta    "&#920;"> <!-- greek capital letter theta,
+                                    U+0398 ISOgrk3 -->
+<!ENTITY Iota     "&#921;"> <!-- greek capital letter iota, U+0399 -->
+<!ENTITY Kappa    "&#922;"> <!-- greek capital letter kappa, U+039A -->
+<!ENTITY Lambda   "&#923;"> <!-- greek capital letter lamda,
+                                    U+039B ISOgrk3 -->
+<!ENTITY Mu       "&#924;"> <!-- greek capital letter mu, U+039C -->
+<!ENTITY Nu       "&#925;"> <!-- greek capital letter nu, U+039D -->
+<!ENTITY Xi       "&#926;"> <!-- greek capital letter xi, U+039E ISOgrk3 -->
+<!ENTITY Omicron  "&#927;"> <!-- greek capital letter omicron, U+039F -->
+<!ENTITY Pi       "&#928;"> <!-- greek capital letter pi, U+03A0 ISOgrk3 -->
+<!ENTITY Rho      "&#929;"> <!-- greek capital letter rho, U+03A1 -->
+<!-- there is no Sigmaf, and no U+03A2 character either -->
+<!ENTITY Sigma    "&#931;"> <!-- greek capital letter sigma,
+                                    U+03A3 ISOgrk3 -->
+<!ENTITY Tau      "&#932;"> <!-- greek capital letter tau, U+03A4 -->
+<!ENTITY Upsilon  "&#933;"> <!-- greek capital letter upsilon,
+                                    U+03A5 ISOgrk3 -->
+<!ENTITY Phi      "&#934;"> <!-- greek capital letter phi,
+                                    U+03A6 ISOgrk3 -->
+<!ENTITY Chi      "&#935;"> <!-- greek capital letter chi, U+03A7 -->
+<!ENTITY Psi      "&#936;"> <!-- greek capital letter psi,
+                                    U+03A8 ISOgrk3 -->
+<!ENTITY Omega    "&#937;"> <!-- greek capital letter omega,
+                                    U+03A9 ISOgrk3 -->
+
+<!ENTITY alpha    "&#945;"> <!-- greek small letter alpha,
+                                    U+03B1 ISOgrk3 -->
+<!ENTITY beta     "&#946;"> <!-- greek small letter beta, U+03B2 ISOgrk3 -->
+<!ENTITY gamma    "&#947;"> <!-- greek small letter gamma,
+                                    U+03B3 ISOgrk3 -->
+<!ENTITY delta    "&#948;"> <!-- greek small letter delta,
+                                    U+03B4 ISOgrk3 -->
+<!ENTITY epsilon  "&#949;"> <!-- greek small letter epsilon,
+                                    U+03B5 ISOgrk3 -->
+<!ENTITY zeta     "&#950;"> <!-- greek small letter zeta, U+03B6 ISOgrk3 -->
+<!ENTITY eta      "&#951;"> <!-- greek small letter eta, U+03B7 ISOgrk3 -->
+<!ENTITY theta    "&#952;"> <!-- greek small letter theta,
+                                    U+03B8 ISOgrk3 -->
+<!ENTITY iota     "&#953;"> <!-- greek small letter iota, U+03B9 ISOgrk3 -->
+<!ENTITY kappa    "&#954;"> <!-- greek small letter kappa,
+                                    U+03BA ISOgrk3 -->
+<!ENTITY lambda   "&#955;"> <!-- greek small letter lamda,
+                                    U+03BB ISOgrk3 -->
+<!ENTITY mu       "&#956;"> <!-- greek small letter mu, U+03BC ISOgrk3 -->
+<!ENTITY nu       "&#957;"> <!-- greek small letter nu, U+03BD ISOgrk3 -->
+<!ENTITY xi       "&#958;"> <!-- greek small letter xi, U+03BE ISOgrk3 -->
+<!ENTITY omicron  "&#959;"> <!-- greek small letter omicron, U+03BF NEW -->
+<!ENTITY pi       "&#960;"> <!-- greek small letter pi, U+03C0 ISOgrk3 -->
+<!ENTITY rho      "&#961;"> <!-- greek small letter rho, U+03C1 ISOgrk3 -->
+<!ENTITY sigmaf   "&#962;"> <!-- greek small letter final sigma,
+                                    U+03C2 ISOgrk3 -->
+<!ENTITY sigma    "&#963;"> <!-- greek small letter sigma,
+                                    U+03C3 ISOgrk3 -->
+<!ENTITY tau      "&#964;"> <!-- greek small letter tau, U+03C4 ISOgrk3 -->
+<!ENTITY upsilon  "&#965;"> <!-- greek small letter upsilon,
+                                    U+03C5 ISOgrk3 -->
+<!ENTITY phi      "&#966;"> <!-- greek small letter phi, U+03C6 ISOgrk3 -->
+<!ENTITY chi      "&#967;"> <!-- greek small letter chi, U+03C7 ISOgrk3 -->
+<!ENTITY psi      "&#968;"> <!-- greek small letter psi, U+03C8 ISOgrk3 -->
+<!ENTITY omega    "&#969;"> <!-- greek small letter omega,
+                                    U+03C9 ISOgrk3 -->
+<!ENTITY thetasym "&#977;"> <!-- greek theta symbol,
+                                    U+03D1 NEW -->
+<!ENTITY upsih    "&#978;"> <!-- greek upsilon with hook symbol,
+                                    U+03D2 NEW -->
+<!ENTITY piv      "&#982;"> <!-- greek pi symbol, U+03D6 ISOgrk3 -->
+
+<!-- General Punctuation -->
+<!ENTITY bull     "&#8226;"> <!-- bullet = black small circle,
+                                     U+2022 ISOpub  -->
+<!-- bullet is NOT the same as bullet operator, U+2219 -->
+<!ENTITY hellip   "&#8230;"> <!-- horizontal ellipsis = three dot leader,
+                                     U+2026 ISOpub  -->
+<!ENTITY prime    "&#8242;"> <!-- prime = minutes = feet, U+2032 ISOtech -->
+<!ENTITY Prime    "&#8243;"> <!-- double prime = seconds = inches,
+                                     U+2033 ISOtech -->
+<!ENTITY oline    "&#8254;"> <!-- overline = spacing overscore,
+                                     U+203E NEW -->
+<!ENTITY frasl    "&#8260;"> <!-- fraction slash, U+2044 NEW -->
+
+<!-- Letterlike Symbols -->
+<!ENTITY weierp   "&#8472;"> <!-- script capital P = power set
+                                     = Weierstrass p, U+2118 ISOamso -->
+<!ENTITY image    "&#8465;"> <!-- black-letter capital I = imaginary part,
+                                     U+2111 ISOamso -->
+<!ENTITY real     "&#8476;"> <!-- black-letter capital R = real part symbol,
+                                     U+211C ISOamso -->
+<!ENTITY trade    "&#8482;"> <!-- trade mark sign, U+2122 ISOnum -->
+<!ENTITY alefsym  "&#8501;"> <!-- alef symbol = first transfinite cardinal,
+                                     U+2135 NEW -->
+<!-- alef symbol is NOT the same as hebrew letter alef,
+     U+05D0 although the same glyph could be used to depict both characters -->
+
+<!-- Arrows -->
+<!ENTITY larr     "&#8592;"> <!-- leftwards arrow, U+2190 ISOnum -->
+<!ENTITY uarr     "&#8593;"> <!-- upwards arrow, U+2191 ISOnum-->
+<!ENTITY rarr     "&#8594;"> <!-- rightwards arrow, U+2192 ISOnum -->
+<!ENTITY darr     "&#8595;"> <!-- downwards arrow, U+2193 ISOnum -->
+<!ENTITY harr     "&#8596;"> <!-- left right arrow, U+2194 ISOamsa -->
+<!ENTITY crarr    "&#8629;"> <!-- downwards arrow with corner leftwards
+                                     = carriage return, U+21B5 NEW -->
+<!ENTITY lArr     "&#8656;"> <!-- leftwards double arrow, U+21D0 ISOtech -->
+<!-- Unicode does not say that lArr is the same as the 'is implied by' arrow
+    but also does not have any other character for that function. So lArr can
+    be used for 'is implied by' as ISOtech suggests -->
+<!ENTITY uArr     "&#8657;"> <!-- upwards double arrow, U+21D1 ISOamsa -->
+<!ENTITY rArr     "&#8658;"> <!-- rightwards double arrow,
+                                     U+21D2 ISOtech -->
+<!-- Unicode does not say this is the 'implies' character but does not have 
+     another character with this function so rArr can be used for 'implies'
+     as ISOtech suggests -->
+<!ENTITY dArr     "&#8659;"> <!-- downwards double arrow, U+21D3 ISOamsa -->
+<!ENTITY hArr     "&#8660;"> <!-- left right double arrow,
+                                     U+21D4 ISOamsa -->
+
+<!-- Mathematical Operators -->
+<!ENTITY forall   "&#8704;"> <!-- for all, U+2200 ISOtech -->
+<!ENTITY part     "&#8706;"> <!-- partial differential, U+2202 ISOtech  -->
+<!ENTITY exist    "&#8707;"> <!-- there exists, U+2203 ISOtech -->
+<!ENTITY empty    "&#8709;"> <!-- empty set = null set, U+2205 ISOamso -->
+<!ENTITY nabla    "&#8711;"> <!-- nabla = backward difference,
+                                     U+2207 ISOtech -->
+<!ENTITY isin     "&#8712;"> <!-- element of, U+2208 ISOtech -->
+<!ENTITY notin    "&#8713;"> <!-- not an element of, U+2209 ISOtech -->
+<!ENTITY ni       "&#8715;"> <!-- contains as member, U+220B ISOtech -->
+<!ENTITY prod     "&#8719;"> <!-- n-ary product = product sign,
+                                     U+220F ISOamsb -->
+<!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though
+     the same glyph might be used for both -->
+<!ENTITY sum      "&#8721;"> <!-- n-ary summation, U+2211 ISOamsb -->
+<!-- sum is NOT the same character as U+03A3 'greek capital letter sigma'
+     though the same glyph might be used for both -->
+<!ENTITY minus    "&#8722;"> <!-- minus sign, U+2212 ISOtech -->
+<!ENTITY lowast   "&#8727;"> <!-- asterisk operator, U+2217 ISOtech -->
+<!ENTITY radic    "&#8730;"> <!-- square root = radical sign,
+                                     U+221A ISOtech -->
+<!ENTITY prop     "&#8733;"> <!-- proportional to, U+221D ISOtech -->
+<!ENTITY infin    "&#8734;"> <!-- infinity, U+221E ISOtech -->
+<!ENTITY ang      "&#8736;"> <!-- angle, U+2220 ISOamso -->
+<!ENTITY and      "&#8743;"> <!-- logical and = wedge, U+2227 ISOtech -->
+<!ENTITY or       "&#8744;"> <!-- logical or = vee, U+2228 ISOtech -->
+<!ENTITY cap      "&#8745;"> <!-- intersection = cap, U+2229 ISOtech -->
+<!ENTITY cup      "&#8746;"> <!-- union = cup, U+222A ISOtech -->
+<!ENTITY int      "&#8747;"> <!-- integral, U+222B ISOtech -->
+<!ENTITY there4   "&#8756;"> <!-- therefore, U+2234 ISOtech -->
+<!ENTITY sim      "&#8764;"> <!-- tilde operator = varies with = similar to,
+                                     U+223C ISOtech -->
+<!-- tilde operator is NOT the same character as the tilde, U+007E,
+     although the same glyph might be used to represent both  -->
+<!ENTITY cong     "&#8773;"> <!-- approximately equal to, U+2245 ISOtech -->
+<!ENTITY asymp    "&#8776;"> <!-- almost equal to = asymptotic to,
+                                     U+2248 ISOamsr -->
+<!ENTITY ne       "&#8800;"> <!-- not equal to, U+2260 ISOtech -->
+<!ENTITY equiv    "&#8801;"> <!-- identical to, U+2261 ISOtech -->
+<!ENTITY le       "&#8804;"> <!-- less-than or equal to, U+2264 ISOtech -->
+<!ENTITY ge       "&#8805;"> <!-- greater-than or equal to,
+                                     U+2265 ISOtech -->
+<!ENTITY sub      "&#8834;"> <!-- subset of, U+2282 ISOtech -->
+<!ENTITY sup      "&#8835;"> <!-- superset of, U+2283 ISOtech -->
+<!ENTITY nsub     "&#8836;"> <!-- not a subset of, U+2284 ISOamsn -->
+<!ENTITY sube     "&#8838;"> <!-- subset of or equal to, U+2286 ISOtech -->
+<!ENTITY supe     "&#8839;"> <!-- superset of or equal to,
+                                     U+2287 ISOtech -->
+<!ENTITY oplus    "&#8853;"> <!-- circled plus = direct sum,
+                                     U+2295 ISOamsb -->
+<!ENTITY otimes   "&#8855;"> <!-- circled times = vector product,
+                                     U+2297 ISOamsb -->
+<!ENTITY perp     "&#8869;"> <!-- up tack = orthogonal to = perpendicular,
+                                     U+22A5 ISOtech -->
+<!ENTITY sdot     "&#8901;"> <!-- dot operator, U+22C5 ISOamsb -->
+<!-- dot operator is NOT the same character as U+00B7 middle dot -->
+
+<!-- Miscellaneous Technical -->
+<!ENTITY lceil    "&#8968;"> <!-- left ceiling = APL upstile,
+                                     U+2308 ISOamsc  -->
+<!ENTITY rceil    "&#8969;"> <!-- right ceiling, U+2309 ISOamsc  -->
+<!ENTITY lfloor   "&#8970;"> <!-- left floor = APL downstile,
+                                     U+230A ISOamsc  -->
+<!ENTITY rfloor   "&#8971;"> <!-- right floor, U+230B ISOamsc  -->
+<!ENTITY lang     "&#9001;"> <!-- left-pointing angle bracket = bra,
+                                     U+2329 ISOtech -->
+<!-- lang is NOT the same character as U+003C 'less than sign' 
+     or U+2039 'single left-pointing angle quotation mark' -->
+<!ENTITY rang     "&#9002;"> <!-- right-pointing angle bracket = ket,
+                                     U+232A ISOtech -->
+<!-- rang is NOT the same character as U+003E 'greater than sign' 
+     or U+203A 'single right-pointing angle quotation mark' -->
+
+<!-- Geometric Shapes -->
+<!ENTITY loz      "&#9674;"> <!-- lozenge, U+25CA ISOpub -->
+
+<!-- Miscellaneous Symbols -->
+<!ENTITY spades   "&#9824;"> <!-- black spade suit, U+2660 ISOpub -->
+<!-- black here seems to mean filled as opposed to hollow -->
+<!ENTITY clubs    "&#9827;"> <!-- black club suit = shamrock,
+                                     U+2663 ISOpub -->
+<!ENTITY hearts   "&#9829;"> <!-- black heart suit = valentine,
+                                     U+2665 ISOpub -->
+<!ENTITY diams    "&#9830;"> <!-- black diamond suit, U+2666 ISOpub -->
diff --git a/basis/xml/entities/summary.txt b/basis/xml/entities/summary.txt
new file mode 100644 (file)
index 0000000..4ff3e75
--- /dev/null
@@ -0,0 +1 @@
+Contains built-in XML entities
diff --git a/basis/xml/errors/errors-docs.factor b/basis/xml/errors/errors-docs.factor
new file mode 100644 (file)
index 0000000..01a943e
--- /dev/null
@@ -0,0 +1,120 @@
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax ;
+IN: xml.errors
+
+<PRIVATE
+
+: $xml-error ( element -- )
+    "Bad XML document for the error" $heading $code ;
+
+PRIVATE>
+
+HELP: multitags
+{ $class-description "XML parsing error describing the case where there is more than one main tag in a document." }
+{ $xml-error "<a/>\n<b/>" } ;
+
+HELP: notags
+{ $class-description "XML parsing error describing the case where an XML document contains no main tag, or any tags at all" }
+{ $xml-error "<?xml version='1.0'?>" } ;
+
+HELP: extra-attrs
+{ $class-description "XML parsing error describing the case where the XML prolog (" { $snippet "<?xml ...?>" } ") contains attributes other than the three allowed ones, " { $snippet "standalone" } ", " { $snippet "version" } " and " { $snippet "encoding" } ". Contains one slot, " { $snippet "attrs" } ", which is a hashtable of all the extra attributes' names. This is a subclass of " { $link xml-error-at } "." }
+{ $xml-error "<?xml version='1.0' reason='because I said so'?>\n<foo/>" } ;
+
+HELP: nonexist-ns
+{ $class-description "XML parsing error describing the case where a namespace doesn't exist but it is used in a tag. Contains one slot, " { $snippet "name" } ", which contains the name of the undeclared namespace, and is a subclass of " { $link xml-error-at } "." }
+{ $xml-error "<a:b>c</a:b>" } ;
+
+HELP: not-yes/no
+{ $class-description "XML parsing error used to describe the case where standalone is set in the XML prolog to something other than " { $snippet "yes" } " or " { $snippet "no" } ". This is a subclass of " { $link xml-error-at } " and contains one slot, text, which contains offending value." }
+{ $xml-error "<?xml version='1.0' standalone='maybe'?>\n<x/>" } ;
+
+HELP: unclosed
+{ $class-description "XML parsing error used to describe the case where the XML document contains classes which are not closed by the end of the document. Contains one slot, " { $snippet "tags" } ", a sequence of names." }
+{ $xml-error "<x>some text" } ;
+
+HELP: mismatched
+{ $class-description "XML parsing error describing mismatched tags. Contains two slots: " { $snippet "open" } " is the name of the opening tag and " { $snippet "close" } " is the name of the closing tag. This is a subclass of " { $link xml-error-at } " showing the location of the closing tag" }
+{ $xml-error "<a></c>" } ;
+
+HELP: expected
+{ $class-description "XML parsing error describing when an expected token was not present. Delegates to " { $link xml-error-at } ". Contains two slots, " { $snippet "should-be" } ", which has the expected string, and " { $snippet "was" } ", which has the actual string." } ;
+
+HELP: no-entity
+{ $class-description "XML parsing error describing the use of an undefined entity. This is a subclass of " { $link xml-error-at } ". Contains one slot, thing, containing a string representing the entity." }
+{ $xml-error "<x>&foo;</x>" } ;
+
+
+HELP: pre/post-content
+{ $class-description "Describes the error where a non-whitespace string is used before or after the main tag in an XML document. Contains two slots: " { $snippet "string" } " contains the offending string, and " { $snippet "pre?" } " is " { $snippet "t" } " if it occured before the main tag and " { $snippet "f" } " if it occured after." }
+{ $xml-error "hello\n<main-tag/>" } ;
+
+HELP: bad-name
+{ $class-description "Describes the error where a name is used, for example in an XML tag or attribute key, which is invalid." }
+{ $xml-error "<%>\n</%>" } ;
+
+HELP: quoteless-attr
+{ $class-description "Describes the error where an attribute of an XML tag is missing quotes around a value." }
+{ $xml-error "<tag foo=bar/>" } ;
+
+HELP: disallowed-char
+{ $class-description "Describes the error where a disallowed character occurs in an XML document." } ;
+
+HELP: missing-close
+{ $class-description "Describes the error where a particular closing token is missing." } ;
+
+HELP: unexpected-end
+{ $class-description "Describes the error where a document unexpectedly ends, and the XML parser expected it to continue." } ;
+
+HELP: duplicate-attr
+{ $class-description "Describes the error where there is more than one attribute of the same key." }
+{ $xml-error "<tag value='1' value='2'/>" } ;
+
+HELP: bad-cdata
+{ $class-description "Describes the error where CDATA is used outside of the main tag of an XML document." }
+{ $xml-error "<x>y</x>\n<![CDATA[]]>" } ;
+
+HELP: text-w/]]>
+{ $class-description "Describes the error where a text node contains the literal string " { $snippet "]]>" } " which is disallowed." }
+{ $xml-error "<x>Here's some text: ]]> there it was</x>" } ;
+
+HELP: attr-w/<
+{ $class-description "Describes the error where an attribute value contains the literal character " { $snippet "<" } " which is disallowed." }
+{ $xml-error "<x value='bar<baz'/>" } ;
+
+HELP: misplaced-directive
+{ $class-description "Describes the error where an internal DTD directive is used outside of a DOCTYPE or DTD file, or where a DOCTYPE occurs somewhere other than before the main tag of an XML document." }
+{ $xml-error "<x><!ENTITY foo 'bar'></x>" } ;
+
+HELP: xml-error
+{ $class-description "The exception class that all parsing errors in XML documents are in." } ;
+
+ARTICLE: "xml.errors" "XML parsing errors"
+"The " { $vocab-link "xml.errors" } " vocabulary provides a rich and highly inspectable set of parsing errors. All XML errors are described by the union class " { $link xml-error } "."
+    { $subsection multitags }
+    { $subsection notags }
+    { $subsection extra-attrs }
+    { $subsection nonexist-ns }
+    { $subsection not-yes/no }
+    { $subsection unclosed }
+    { $subsection mismatched }
+    { $subsection expected }
+    { $subsection no-entity }
+    { $subsection pre/post-content }
+    { $subsection unclosed-quote }
+    { $subsection bad-name }
+    { $subsection quoteless-attr }
+    { $subsection disallowed-char }
+    { $subsection missing-close }
+    { $subsection unexpected-end }
+    { $subsection duplicate-attr }
+    { $subsection bad-cdata }
+    { $subsection text-w/]]> }
+    { $subsection attr-w/< }
+    { $subsection misplaced-directive }
+    "Additionally, most of these errors are a kind of " { $link xml-error-at } " which provides more information about where the error occurred."
+    $nl
+    "Note that, in parsing an XML document, only the first error is reported." ;
+
+ABOUT: "xml.errors"
index e72e465f0d0179a5c3c342f11903665f6a55b39d..4204979941738a0462f18245479348e93943942b 100644 (file)
@@ -1,27 +1,42 @@
 USING: continuations xml xml.errors tools.test kernel arrays
-xml.data state-parser quotations fry ;
+xml.data quotations fry ;
 IN: xml.errors.tests
 
 : xml-error-test ( expected-error xml-string -- )
     '[ _ string>xml ] swap '[ _ = ] must-fail-with ;
 
 T{ no-entity f 1 10 "nbsp" } "<x>&nbsp;</x>" xml-error-test
-T{ mismatched f 1 8 T{ name f "" "x" "" } T{ name f "" "y" "" }
-} "<x></y>" xml-error-test
+T{ mismatched f 1 8 T{ name f "" "x" "" } T{ name f "" "y" "" } }
+    "<x></y>" xml-error-test
 T{ unclosed f 1 4 V{ T{ name f "" "x" "" } } } "<x>" xml-error-test
 T{ nonexist-ns f 1 5 "x" } "<x:y/>" xml-error-test
 T{ unopened f 1 5 } "</x>" xml-error-test
-T{ not-yes/no f 1 41 "maybe" } "<?xml version='1.0' standalone='maybe'?><x/>" xml-error-test
+T{ not-yes/no f 1 41 "maybe" }
+    "<?xml version='1.0' standalone='maybe'?><x/>" xml-error-test
 T{ extra-attrs f 1 32 V{ T{ name f "" "foo" f } }
 } "<?xml version='1.1' foo='bar'?><x/>" xml-error-test
-T{ bad-version f 1 28 "5 million" } "<?xml version='5 million'?><x/>" xml-error-test
+T{ bad-version f 1 28 "5 million" }
+    "<?xml version='5 million'?><x/>" xml-error-test
 T{ notags f } "" xml-error-test
 T{ multitags } "<x/><y/>" xml-error-test
-T{ bad-prolog  f 1 26 T{ prolog f "1.0" "UTF-8" f }
-} "<x/><?xml version='1.0'?>" xml-error-test
+T{ bad-prolog  f 1 26 T{ prolog f "1.0" "UTF-8" f } }
+    "<x/><?xml version='1.0'?>" xml-error-test
 T{ capitalized-prolog f 1 6 "XmL" } "<?XmL version='1.0'?><x/>"
-xml-error-test
+    xml-error-test
 T{ pre/post-content f "x" t } "x<y/>" xml-error-test
 T{ versionless-prolog f 1 8 } "<?xml?><x/>" xml-error-test
-T{ bad-instruction f 1 11 T{ instruction f "xsl" }
-} "<x><?xsl?></x>" xml-error-test
+T{ unclosed-quote f 1 13 } "<x value='/>" xml-error-test
+T{ bad-name f 1 3 "-" } "<-/>" xml-error-test
+T{ quoteless-attr f 1 12 } "<x value=<->/>" xml-error-test
+T{ quoteless-attr f 1 10 } "<x value=3/>" xml-error-test
+T{ attr-w/< f 1 11 } "<x value='<'/>" xml-error-test
+T{ text-w/]]> f 1 6 } "<x>]]></x>" xml-error-test
+T{ duplicate-attr f 1 21 T{ name { space "" } { main "this" } } V{ "a" "b" } } "<x this='a' this='b'/>" xml-error-test
+T{ bad-cdata f 1 3 } "<![CDATA[]]><x/>" xml-error-test
+T{ bad-cdata f 1 7 } "<x/><![CDATA[]]>" xml-error-test
+T{ pre/post-content f "&" t } "&#32;<x/>" xml-error-test
+T{ bad-doctype f 1 17 "a" } "<!DOCTYPE foo [ a ]><x/>" xml-error-test
+T{ bad-doctype f 1 22 T{ opener { name T{ name f "" "foo" "" } } { attrs T{ attrs } } } } "<!DOCTYPE foo [ <foo> ]><x/>" xml-error-test
+T{ disallowed-char f 1 3 1 } "<x>\u000001</x>" xml-error-test
+T{ missing-close f 1 9 } "<!-- foo" xml-error-test
+T{ misplaced-directive f 1 9 "ENTITY" } "<!ENTITY foo 'bar'><x/>" xml-error-test
index 0c039d526c5a55e3612294b15d3a656c0e5a195e..304b38f2bda6a2915ee647f4f80db1e4a38b82b4 100644 (file)
@@ -1,10 +1,61 @@
 ! Copyright (C) 2005, 2006 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
 USING: xml.data xml.writer kernel generic io prettyprint math 
-debugger sequences state-parser accessors summary
-namespaces io.streams.string xml.backend ;
+debugger sequences xml.state accessors summary
+namespaces io.streams.string ;
 IN: xml.errors
 
+TUPLE: xml-error-at line column ;
+
+: xml-error-at ( class -- obj )
+    new
+        get-line >>line
+        get-column >>column ;
+M: xml-error-at summary ( obj -- str )
+    [
+        "XML parsing error" print
+        "Line: " write dup line>> .
+        "Column: " write column>> .
+    ] with-string-writer ;
+
+TUPLE: expected < xml-error-at should-be was ;
+: expected ( should-be was -- * )
+    \ expected xml-error-at
+        swap >>was
+        swap >>should-be throw ;
+M: expected summary ( obj -- str )
+    [
+        dup call-next-method write
+        "Token expected: " write dup should-be>> print
+        "Token present: " write was>> print
+    ] with-string-writer ;
+
+TUPLE: unexpected-end < xml-error-at ;
+: unexpected-end ( -- * ) \ unexpected-end xml-error-at throw ;
+M: unexpected-end summary ( obj -- str )
+    [
+        call-next-method write
+        "File unexpectedly ended." print
+    ] with-string-writer ;
+
+TUPLE: missing-close < xml-error-at ;
+: missing-close ( -- * ) \ missing-close xml-error-at throw ;
+M: missing-close summary ( obj -- str )
+    [
+        call-next-method write
+        "Missing closing token." print
+    ] with-string-writer ;
+
+TUPLE: disallowed-char < xml-error-at char ;
+
+: disallowed-char ( char -- * )
+    \ disallowed-char xml-error-at swap >>char throw ;
+
+M: disallowed-char summary
+    [ call-next-method ]
+    [ char>> "Disallowed character in XML document: " swap suffix ] bi
+    append ;
+
 ERROR: multitags ;
 
 M: multitags summary ( obj -- str )
@@ -21,10 +72,10 @@ M: pre/post-content summary ( obj -- str )
         " the main tag." print
     ] with-string-writer ;
 
-TUPLE: no-entity < parsing-error thing ;
+TUPLE: no-entity < xml-error-at thing ;
 
 : no-entity ( string -- * )
-    \ no-entity parsing-error swap >>thing throw ;
+    \ no-entity xml-error-at swap >>thing throw ;
 
 M: no-entity summary ( obj -- str )
     [
@@ -32,21 +83,10 @@ M: no-entity summary ( obj -- str )
         "Entity does not exist: &" write thing>> write ";" print
     ] with-string-writer ;
 
-TUPLE: xml-string-error < parsing-error string ; ! this should not exist
-
-: xml-string-error ( string -- * )
-    \ xml-string-error parsing-error swap >>string throw ;
-
-M: xml-string-error summary ( obj -- str )
-    [
-        dup call-next-method write
-        string>> print
-    ] with-string-writer ;
-
-TUPLE: mismatched < parsing-error open close ;
+TUPLE: mismatched < xml-error-at open close ;
 
 : mismatched ( open close -- * )
-    \ mismatched parsing-error swap >>close swap >>open throw ;
+    \ mismatched xml-error-at swap >>close swap >>open throw ;
 
 M: mismatched summary ( obj -- str )
     [
@@ -56,10 +96,10 @@ M: mismatched summary ( obj -- str )
         "Closing tag: </" write close>> print-name ">" print
     ] with-string-writer ;
 
-TUPLE: unclosed < parsing-error tags ;
+TUPLE: unclosed < xml-error-at tags ;
 
 : unclosed ( -- * )
-    \ unclosed parsing-error
+    \ unclosed xml-error-at
         xml-stack get rest-slice [ first name>> ] map >>tags
     throw ;
 
@@ -71,10 +111,10 @@ M: unclosed summary ( obj -- str )
         tags>> [ "  <" write print-name ">" print ] each
     ] with-string-writer ;
 
-TUPLE: bad-uri < parsing-error string ;
+TUPLE: bad-uri < xml-error-at string ;
 
 : bad-uri ( string -- * )
-    \ bad-uri parsing-error swap >>string throw ;
+    \ bad-uri xml-error-at swap >>string throw ;
 
 M: bad-uri summary ( obj -- str )
     [
@@ -82,10 +122,10 @@ M: bad-uri summary ( obj -- str )
         "Bad URI:" print string>> .
     ] with-string-writer ;
 
-TUPLE: nonexist-ns < parsing-error name ;
+TUPLE: nonexist-ns < xml-error-at name ;
 
 : nonexist-ns ( name-string -- * )
-    \ nonexist-ns parsing-error swap >>name throw ;
+    \ nonexist-ns xml-error-at swap >>name throw ;
 
 M: nonexist-ns summary ( obj -- str )
     [
@@ -93,10 +133,10 @@ M: nonexist-ns summary ( obj -- str )
         "Namespace " write name>> write " has not been declared" print
     ] with-string-writer ;
 
-TUPLE: unopened < parsing-error ; ! this should give which tag was unopened
+TUPLE: unopened < xml-error-at ; ! this should give which tag was unopened
 
 : unopened ( -- * )
-    \ unopened parsing-error throw ;
+    \ unopened xml-error-at throw ;
 
 M: unopened summary ( obj -- str )
     [
@@ -104,10 +144,10 @@ M: unopened summary ( obj -- str )
         "Closed an unopened tag" print
     ] with-string-writer ;
 
-TUPLE: not-yes/no < parsing-error text ;
+TUPLE: not-yes/no < xml-error-at text ;
 
 : not-yes/no ( text -- * )
-    \ not-yes/no parsing-error swap >>text throw ;
+    \ not-yes/no xml-error-at swap >>text throw ;
 
 M: not-yes/no summary ( obj -- str )
     [
@@ -117,10 +157,10 @@ M: not-yes/no summary ( obj -- str )
     ] with-string-writer ;
 
 ! this should actually print the names
-TUPLE: extra-attrs < parsing-error attrs ;
+TUPLE: extra-attrs < xml-error-at attrs ;
 
 : extra-attrs ( attrs -- * )
-    \ extra-attrs parsing-error swap >>attrs throw ;
+    \ extra-attrs xml-error-at swap >>attrs throw ;
 
 M: extra-attrs summary ( obj -- str )
     [
@@ -129,10 +169,10 @@ M: extra-attrs summary ( obj -- str )
         attrs>> .
     ] with-string-writer ;
 
-TUPLE: bad-version < parsing-error num ;
+TUPLE: bad-version < xml-error-at num ;
 
 : bad-version ( num -- * )
-    \ bad-version parsing-error swap >>num throw ;
+    \ bad-version xml-error-at swap >>num throw ;
 
 M: bad-version summary ( obj -- str )
     [
@@ -145,22 +185,22 @@ ERROR: notags ;
 M: notags summary ( obj -- str )
     drop "XML document lacks a main tag" ;
 
-TUPLE: bad-prolog < parsing-error prolog ;
+TUPLE: bad-prolog < xml-error-at prolog ;
 
 : bad-prolog ( prolog -- * )
-    \ bad-prolog parsing-error swap >>prolog throw ;
+    \ bad-prolog xml-error-at swap >>prolog throw ;
 
 M: bad-prolog summary ( obj -- str )
     [
         dup call-next-method write
         "Misplaced XML prolog" print
-        prolog>> write-prolog nl
+        prolog>> write-xml nl
     ] with-string-writer ;
 
-TUPLE: capitalized-prolog < parsing-error name ;
+TUPLE: capitalized-prolog < xml-error-at name ;
 
 : capitalized-prolog ( name -- capitalized-prolog )
-    \ capitalized-prolog parsing-error swap >>name throw ;
+    \ capitalized-prolog xml-error-at swap >>name throw ;
 
 M: capitalized-prolog summary ( obj -- str )
     [
@@ -170,10 +210,10 @@ M: capitalized-prolog summary ( obj -- str )
         " instead of <?xml...?>" print
     ] with-string-writer ;
 
-TUPLE: versionless-prolog < parsing-error ;
+TUPLE: versionless-prolog < xml-error-at ;
 
 : versionless-prolog ( -- * )
-    \ versionless-prolog parsing-error throw ;
+    \ versionless-prolog xml-error-at throw ;
 
 M: versionless-prolog summary ( obj -- str )
     [
@@ -181,22 +221,10 @@ M: versionless-prolog summary ( obj -- str )
         "XML prolog lacks a version declaration" print
     ] with-string-writer ;
 
-TUPLE: bad-instruction < parsing-error instruction ;
-
-: bad-instruction ( instruction -- * )
-    \ bad-instruction parsing-error swap >>instruction throw ;
-
-M: bad-instruction summary ( obj -- str )
-    [
-        dup call-next-method write
-        "Misplaced processor instruction:" print
-        instruction>> write-xml-chunk nl
-    ] with-string-writer ;
-
-TUPLE: bad-directive < parsing-error dir ;
+TUPLE: bad-directive < xml-error-at dir ;
 
 : bad-directive ( directive -- * )
-    \ bad-directive parsing-error swap >>dir throw ;
+    \ bad-directive xml-error-at swap >>dir throw ;
 
 M: bad-directive summary ( obj -- str )
     [
@@ -205,35 +233,110 @@ M: bad-directive summary ( obj -- str )
         dir>> write
     ] with-string-writer ;
 
-TUPLE: bad-doctype-decl < parsing-error ;
+TUPLE: bad-decl < xml-error-at ;
 
-: bad-doctype-decl ( -- * )
-    \ bad-doctype-decl parsing-error throw ;
+: bad-decl ( -- * )
+    \ bad-decl xml-error-at throw ;
 
-M: bad-doctype-decl summary ( obj -- str )
-    call-next-method "\nBad DOCTYPE" append ;
+M: bad-decl summary ( obj -- str )
+    call-next-method "\nExtra content in directive" append ;
 
-TUPLE: bad-external-id < parsing-error ;
+TUPLE: bad-external-id < xml-error-at ;
 
 : bad-external-id ( -- * )
-    \ bad-external-id parsing-error throw ;
+    \ bad-external-id xml-error-at throw ;
 
 M: bad-external-id summary ( obj -- str )
     call-next-method "\nBad external ID" append ;
 
-TUPLE: misplaced-directive < parsing-error dir ;
+TUPLE: misplaced-directive < xml-error-at dir ;
 
 : misplaced-directive ( directive -- * )
-    \ misplaced-directive parsing-error swap >>dir throw ;
+    \ misplaced-directive xml-error-at swap >>dir throw ;
 
 M: misplaced-directive summary ( obj -- str )
     [
         dup call-next-method write
         "Misplaced directive:" print
-        dir>> write-xml-chunk nl
+        dir>> write-xml nl
+    ] with-string-writer ;
+
+TUPLE: bad-name < xml-error-at name ;
+
+: bad-name ( name -- * )
+    \ bad-name xml-error-at swap >>name throw ;
+
+M: bad-name summary ( obj -- str )
+    [ call-next-method ]
+    [ "Invalid name: " swap name>> "\n" 3append ]
+    bi append ;
+
+TUPLE: unclosed-quote < xml-error-at ;
+
+: unclosed-quote ( -- * )
+    \ unclosed-quote xml-error-at throw ;
+
+M: unclosed-quote summary
+    call-next-method
+    "XML document ends with quote still open\n" append ;
+
+TUPLE: quoteless-attr < xml-error-at ;
+
+: quoteless-attr ( -- * )
+    \ quoteless-attr xml-error-at throw ;
+
+M: quoteless-attr summary
+    call-next-method "Attribute lacks quotes around value\n" append ;
+
+TUPLE: attr-w/< < xml-error-at ;
+
+: attr-w/< ( value -- * )
+    \ attr-w/< xml-error-at throw ;
+
+M: attr-w/< summary
+    call-next-method
+    "Attribute value contains literal <" append ;
+
+TUPLE: text-w/]]> < xml-error-at ;
+
+: text-w/]]> ( text -- * )
+    \ text-w/]]> xml-error-at throw ;
+
+M: text-w/]]> summary
+    call-next-method
+    "Text node contains ']]>'" append ;
+
+TUPLE: duplicate-attr < xml-error-at key values ;
+
+: duplicate-attr ( key values -- * )
+    \ duplicate-attr xml-error-at
+    swap >>values swap >>key throw ;
+
+M: duplicate-attr summary
+    call-next-method "\nDuplicate attribute" append ;
+
+TUPLE: bad-cdata < xml-error-at ;
+
+: bad-cdata ( -- * )
+    \ bad-cdata xml-error-at throw ;
+
+M: bad-cdata summary
+    call-next-method "\nCDATA occurs before or after main tag" append ;
+
+TUPLE: not-enough-characters < xml-error-at ;
+: not-enough-characters ( -- * )
+    \ not-enough-characters xml-error-at throw ;
+M: not-enough-characters summary ( obj -- str )
+    [
+        call-next-method write
+        "Not enough characters" print
     ] with-string-writer ;
 
-UNION: xml-parse-error multitags notags extra-attrs nonexist-ns
-       not-yes/no unclosed mismatched xml-string-error expected no-entity
-       bad-prolog versionless-prolog capitalized-prolog bad-instruction
-       bad-directive ;
+TUPLE: bad-doctype < xml-error-at contents ;
+: bad-doctype ( contents -- * )
+    \ bad-doctype xml-error-at swap >>contents throw ;
+M: bad-doctype summary
+    call-next-method "\nDTD contains invalid object" append ;
+
+UNION: xml-error
+    multitags notags pre/post-content xml-error-at ;
diff --git a/basis/xml/errors/summary.txt b/basis/xml/errors/summary.txt
new file mode 100644 (file)
index 0000000..6bab352
--- /dev/null
@@ -0,0 +1 @@
+XML parsing errors
diff --git a/basis/xml/generator/authors.txt b/basis/xml/generator/authors.txt
deleted file mode 100755 (executable)
index f990dd0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Daniel Ehrenberg
diff --git a/basis/xml/generator/generator-tests.factor b/basis/xml/generator/generator-tests.factor
deleted file mode 100644 (file)
index 17f7cab..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USING: tools.test io.streams.string xml.generator xml.writer accessors ;
-[ "<html><body><a href=\"blah\"/></body></html>" ]
-[ "html" [ "body" [ "a" { { "href" "blah" } } contained*, ] tag, ] make-xml [ body>> write-xml-chunk ] with-string-writer ] unit-test
diff --git a/basis/xml/generator/generator.factor b/basis/xml/generator/generator.factor
deleted file mode 100644 (file)
index ac7b14b..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-! Copyright (C) 2006, 2007 Daniel Ehrenberg
-! See http://factorcode.org/license.txt for BSD license.
-USING: namespaces make kernel xml.data xml.utilities assocs
-sequences ;
-IN: xml.generator
-
-: comment, ( string -- ) <comment> , ;
-: instruction, ( string -- ) <instruction> , ;
-: nl, ( -- ) "\n" , ;
-
-: (tag,) ( name attrs quot -- tag )
-    -rot [ V{ } make ] 2dip rot <tag> ; inline
-: tag*, ( name attrs quot -- )
-    (tag,) , ; inline
-
-: contained*, ( name attrs -- )
-    f <tag> , ;
-
-: tag, ( name quot -- ) f swap tag*, ; inline
-: contained, ( name -- ) f contained*, ; inline
-
-: make-xml* ( name attrs quot -- xml )
-    (tag,) build-xml ; inline
-: make-xml ( name quot -- xml )
-    f swap make-xml* ; inline
diff --git a/basis/xml/interpolate/authors.txt b/basis/xml/interpolate/authors.txt
new file mode 100644 (file)
index 0000000..29e7963
--- /dev/null
@@ -0,0 +1 @@
+Daniel Ehrenberg
\ No newline at end of file
diff --git a/basis/xml/interpolate/interpolate-docs.factor b/basis/xml/interpolate/interpolate-docs.factor
new file mode 100644 (file)
index 0000000..23972ba
--- /dev/null
@@ -0,0 +1,60 @@
+USING: help.markup help.syntax present multiline ;
+IN: xml.interpolate
+
+ABOUT: "xml.interpolate"
+
+ARTICLE: "xml.interpolate" "XML literal interpolation"
+"The " { $vocab-link "xml.interpolate" } " vocabulary provides a convenient syntax for generating XML documents and chunks. It defines the following parsing words:"
+{ $subsection POSTPONE: <XML }
+{ $subsection POSTPONE: [XML }
+"For a description of the common syntax of these two, see"
+{ $subsection { "xml.interpolate" "in-depth" } } ;
+
+HELP: <XML
+{ $syntax "<XML <?xml version=\"1.0\"?><document>...</document> XML>" }
+{ $description "This syntax allows the interpolation of XML documents. When evaluated, there is an XML document on the stack. For more information about XML interpolation, see " { $link { "xml.interpolate" "in-depth" } } "." } ;
+
+HELP: [XML
+{ $syntax "[XML foo <x>...</x> bar <y>...</y> baz XML]" }
+{ $description "This syntax allows the interpolation of XML chunks. When evaluated, there is a sequence of XML elements (tags, strings, comments, etc) on the stack. For more information about XML interpolation, see " { $link { "xml.interpolate" "in-depth" } } "." } ;
+
+ARTICLE: { "xml.interpolate" "in-depth" } "XML interpolation syntax"
+"XML interpolation has two forms for each of the words " { $link POSTPONE: <XML } " and " { $link POSTPONE: [XML } ": a fry-like form and a locals form. To splice locals in, use the syntax " { $snippet "<-variable->" } ". To splice something in from the stack, in the style of " { $vocab-link "fry" } ", use the syntax " { $snippet "<->" } ". An XML interpolation form may only use one of these styles."
+$nl
+"These forms can be used where a tag might go, as in " { $snippet "[XML <foo><-></foo> XML]" } " or where an attribute might go, as in " { $snippet "[XML <foo bar=<->/> XML]" } ". When an attribute is spliced in, it is not included if the value is " { $snippet "f" } " and if the value is not a string, the value is put through " { $link present } ". Here is an example of the fry style of XML interpolation:"
+{ $example 
+{" USING: splitting sequences xml.writer xml.interpolate ;
+"one two three" " " split
+[ [XML <item><-></item> XML] ] map
+<XML <doc><-></doc> XML> pprint-xml"}
+{" <?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <item>
+    one
+  </item>
+  <item>
+    two
+  </item>
+  <item>
+    three
+  </item>
+</doc>"} }
+"Here is an example of the locals version:"
+{ $example
+{" USING: locals urls xml.interpolate xml.writer ;
+[let |
+    number [ 3 ]
+    false [ f ]
+    url [ URL" http://factorcode.org/" ]
+    string [ "hello" ]
+    word [ \ drop ] |
+    <XML
+        <x
+            number=<-number->
+            false=<-false->
+            url=<-url->
+            string=<-string->
+            word=<-word-> />
+    XML> pprint-xml ] "}
+{" <?xml version="1.0" encoding="UTF-8"?>
+<x number="3" url="http://factorcode.org/" string="hello" word="drop"/>"} } ;
diff --git a/basis/xml/interpolate/interpolate-tests.factor b/basis/xml/interpolate/interpolate-tests.factor
new file mode 100644 (file)
index 0000000..9be85a1
--- /dev/null
@@ -0,0 +1,68 @@
+! Copyright (C) 2009 Daniel Ehrenberg.
+! See http://factorcode.org/license.txt for BSD license.
+USING: tools.test xml.interpolate multiline kernel assocs
+sequences accessors xml.writer xml.interpolate.private
+locals splitting urls xml.data classes ;
+IN: xml.interpolate.tests
+
+[ "a" "c" { "a" "c" f } ] [
+    "<?xml version='1.0'?><x><-a-><b val=<-c->/><-></x>"
+    string>doc
+    [ second var>> ]
+    [ fourth "val" attr var>> ]
+    [ extract-variables ] tri
+] unit-test
+
+[ {" <?xml version="1.0" encoding="UTF-8"?>
+<x>
+  one
+  <b val="two"/>
+  y
+  <foo/>
+</x>"} ] [
+    [let* | a [ "one" ] c [ "two" ] x [ "y" ]
+           d [ [XML <-x-> <foo/> XML] ] |
+        <XML
+            <x> <-a-> <b val=<-c->/> <-d-> </x>
+        XML> pprint-xml>string
+    ]
+] unit-test
+
+[ {" <?xml version="1.0" encoding="UTF-8"?>
+<doc>
+  <item>
+    one
+  </item>
+  <item>
+    two
+  </item>
+  <item>
+    three
+  </item>
+</doc>"} ] [
+    "one two three" " " split
+    [ [XML <item><-></item> XML] ] map
+    <XML <doc><-></doc> XML> pprint-xml>string
+] unit-test
+
+[ {" <?xml version="1.0" encoding="UTF-8"?>
+<x number="3" url="http://factorcode.org/" string="hello" word="drop"/>"} ]
+[ 3 f URL" http://factorcode.org/" "hello" \ drop
+  <XML <x number=<-> false=<-> url=<-> string=<-> word=<->/> XML>
+  pprint-xml>string  ] unit-test
+
+[ "<x>3</x>" ] [ 3 [XML <x><-></x> XML] xml>string ] unit-test
+[ "<x></x>" ] [ f [XML <x><-></x> XML] xml>string ] unit-test
+
+\ <XML must-infer
+[ { } "" interpolate-xml ] must-infer
+[ [XML <foo><-></foo> <bar val=<->/> XML] ] must-infer
+
+[ xml-chunk ] [ [ [XML <foo/> XML] ] first class ] unit-test
+[ xml ] [ [ <XML <foo/> XML> ] first class ] unit-test
+[ xml-chunk ] [ [ [XML <foo val=<->/> XML] ] third class ] unit-test
+[ xml ] [ [ <XML <foo val=<->/> XML> ] third class ] unit-test
+[ 1 ] [ [ [XML <foo/> XML] ] length ] unit-test
+[ 1 ] [ [ <XML <foo/> XML> ] length ] unit-test
+
+[ "" ] [ [XML XML] concat ] unit-test
diff --git a/basis/xml/interpolate/interpolate.factor b/basis/xml/interpolate/interpolate.factor
new file mode 100644 (file)
index 0000000..0e551bd
--- /dev/null
@@ -0,0 +1,109 @@
+! Copyright (C) 2009 Daniel Ehrenberg.
+! See http://factorcode.org/license.txt for BSD license.
+USING: xml xml.state kernel sequences fry assocs xml.data
+accessors strings make multiline parser namespaces macros
+sequences.deep generalizations words combinators
+math present arrays unicode.categories ;
+IN: xml.interpolate
+
+<PRIVATE
+
+: string>chunk ( string -- chunk )
+    t interpolating? [ string>xml-chunk ] with-variable ;
+
+: string>doc ( string -- xml )
+    t interpolating? [ string>xml ] with-variable ;
+
+DEFER: interpolate-sequence
+
+: interpolate-attrs ( table attrs -- attrs )
+    swap '[
+        dup interpolated?
+        [ var>> _ at dup [ present ] when ] when
+    ] assoc-map [ nip ] assoc-filter ;
+
+: interpolate-tag ( table tag -- tag )
+    [ nip name>> ]
+    [ attrs>> interpolate-attrs ]
+    [ children>> [ interpolate-sequence ] [ drop f ] if* ] 2tri
+    <tag> ;
+
+GENERIC: push-item ( item -- )
+M: string push-item , ;
+M: xml-data push-item , ;
+M: object push-item present , ;
+M: sequence push-item
+    dup xml-data? [ , ] [ [ push-item ] each ] if ;
+M: number push-item present , ;
+M: xml-chunk push-item % ;
+
+GENERIC: interpolate-item ( table item -- )
+M: object interpolate-item nip , ;
+M: tag interpolate-item interpolate-tag , ;
+M: interpolated interpolate-item
+    var>> swap at push-item ;
+
+: interpolate-sequence ( table seq -- seq )
+    [ [ interpolate-item ] with each ] { } make ;
+
+: interpolate-xml-doc ( table xml -- xml )
+    (clone) [ interpolate-tag ] change-body ;
+
+: (each-interpolated) ( item quot: ( interpolated -- ) -- )
+     {
+        { [ over interpolated? ] [ call ] }
+        { [ over tag? ] [
+            [ attrs>> values [ interpolated? ] filter ] dip each
+        ] }
+        { [ over xml? ] [ [ body>> ] dip (each-interpolated) ] }
+        [ 2drop ]
+     } cond ; inline recursive
+
+: each-interpolated ( xml quot -- )
+    '[ _ (each-interpolated) ] deep-each ; inline
+
+: number<-> ( doc -- dup )
+    0 over [
+        dup var>> [
+            over >>var [ 1+ ] dip
+        ] unless drop
+    ] each-interpolated drop ;
+
+GENERIC: interpolate-xml ( table xml -- xml )
+
+M: xml interpolate-xml
+    interpolate-xml-doc ;
+
+M: xml-chunk interpolate-xml
+    interpolate-sequence <xml-chunk> ;
+
+: >search-hash ( seq -- hash )
+    [ dup search ] H{ } map>assoc ;
+
+: extract-variables ( xml -- seq )
+    [ [ var>> , ] each-interpolated ] { } make ;
+
+: nenum ( ... n -- assoc )
+    narray <enum> ; inline
+
+: collect ( accum variables -- accum ? )
+    {
+        { [ dup empty? ] [ drop f ] } ! Just a literal
+        { [ dup [ ] all? ] [ >search-hash parsed t ] } ! locals
+        { [ dup [ not ] all? ] [ length parsed \ nenum parsed t ] } ! fry
+        [ drop "XML interpolation contains both fry and locals" throw ] ! mixed
+    } cond ;
+
+: parse-def ( accum delimiter quot -- accum )
+    [ parse-multiline-string [ blank? ] trim ] dip call
+    [ extract-variables collect ] keep swap
+    [ number<-> parsed ] dip
+    [ \ interpolate-xml parsed ] when ; inline
+
+PRIVATE>
+
+: <XML
+    "XML>" [ string>doc ] parse-def ; parsing
+
+: [XML
+    "XML]" [ string>chunk ] parse-def ; parsing
diff --git a/basis/xml/interpolate/summary.txt b/basis/xml/interpolate/summary.txt
new file mode 100644 (file)
index 0000000..7c18fc8
--- /dev/null
@@ -0,0 +1 @@
+Syntax for XML interpolation
diff --git a/basis/xml/interpolate/tags.txt b/basis/xml/interpolate/tags.txt
new file mode 100644 (file)
index 0000000..d236e96
--- /dev/null
@@ -0,0 +1,2 @@
+syntax
+enterprise
diff --git a/basis/xml/name/authors.txt b/basis/xml/name/authors.txt
new file mode 100644 (file)
index 0000000..f990dd0
--- /dev/null
@@ -0,0 +1 @@
+Daniel Ehrenberg
diff --git a/basis/xml/name/name.factor b/basis/xml/name/name.factor
new file mode 100644 (file)
index 0000000..1907a83
--- /dev/null
@@ -0,0 +1,94 @@
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel namespaces accessors xml.tokenize xml.data assocs
+xml.errors xml.char-classes combinators.short-circuit splitting
+fry xml.state sequences combinators ascii ;
+IN: xml.name
+
+! XML namespace processing: ns = namespace
+
+! A stack of hashtables
+SYMBOL: ns-stack
+
+: attrs>ns ( attrs-alist -- hash )
+    ! this should check to make sure URIs are valid
+    [
+        [
+            swap dup space>> "xmlns" =
+            [ main>> set ]
+            [
+                T{ name f "" "xmlns" f } names-match?
+                [ "" set ] [ drop ] if
+            ] if
+        ] assoc-each
+    ] { } make-assoc f like ;
+
+: add-ns ( name -- )
+    dup space>> dup ns-stack get assoc-stack
+    [ nip ] [ nonexist-ns ] if* >>url drop ;
+
+: push-ns ( hash -- )
+    ns-stack get push ;
+
+: pop-ns ( -- )
+    ns-stack get pop* ;
+
+: init-ns-stack ( -- )
+    V{ H{
+        { "xml" "http://www.w3.org/XML/1998/namespace" }
+        { "xmlns" "http://www.w3.org/2000/xmlns" }
+        { "" "" }
+    } } clone
+    ns-stack set ;
+
+: tag-ns ( name attrs-alist -- name attrs )
+    dup attrs>ns push-ns
+    [ dup add-ns ] dip dup [ drop add-ns ] assoc-each <attrs> ;
+
+: valid-name? ( str -- ? )
+    [ f ] [
+        version-1.0? swap {
+            [ first name-start? ]
+            [ rest-slice [ name-char? ] with all? ]
+        } 2&&
+    ] if-empty ;
+
+: prefixed-name ( str -- name/f )
+    ":" split dup length 2 = [
+        [ [ valid-name? ] all? ]
+        [ first2 f <name> ] bi and
+    ] [ drop f ] if ;
+
+: interpret-name ( str -- name )
+    dup prefixed-name [ ] [
+        dup valid-name?
+        [ <simple-name> ] [ bad-name ] if
+    ] ?if ;
+
+: take-name ( -- string )
+    version-1.0? '[ _ get-char name-char? not ] take-until ;
+
+: parse-name ( -- name )
+    take-name interpret-name ;
+
+: parse-name-starting ( string -- name )
+    take-name append interpret-name ;
+
+: take-system-id ( -- system-id )
+    parse-quote <system-id> ;
+
+: take-public-id ( -- public-id )
+    parse-quote parse-quote <public-id> ;
+
+: (take-external-id) ( token -- external-id )
+    pass-blank {
+        { "SYSTEM" [ take-system-id ] }
+        { "PUBLIC" [ take-public-id ] }
+        [ bad-external-id ]
+    } case ;
+
+: take-word ( -- string )
+    [ get-char blank? ] take-until ;
+
+: take-external-id ( -- external-id )
+    take-word (take-external-id) ;
diff --git a/basis/xml/name/summary.txt b/basis/xml/name/summary.txt
new file mode 100644 (file)
index 0000000..4a75904
--- /dev/null
@@ -0,0 +1 @@
+Implements parsing XML names
diff --git a/basis/xml/state/authors.txt b/basis/xml/state/authors.txt
new file mode 100644 (file)
index 0000000..f990dd0
--- /dev/null
@@ -0,0 +1 @@
+Daniel Ehrenberg
diff --git a/basis/xml/state/state.factor b/basis/xml/state/state.factor
new file mode 100644 (file)
index 0000000..eba9422
--- /dev/null
@@ -0,0 +1,34 @@
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors kernel namespaces io ;
+IN: xml.state
+
+TUPLE: spot char line column next check version-1.0? ;
+
+C: <spot> spot
+
+: get-char ( -- char ) spot get char>> ;
+: set-char ( char -- ) spot get swap >>char drop ;
+: get-line ( -- line ) spot get line>> ;
+: set-line ( line -- ) spot get swap >>line drop ;
+: get-column ( -- column ) spot get column>> ;
+: set-column ( column -- ) spot get swap >>column drop ;
+: get-next ( -- char ) spot get next>> ;
+: set-next ( char -- ) spot get swap >>next drop ;
+: get-check ( -- ? ) spot get check>> ;
+: check ( -- ) spot get t >>check drop ;
+: version-1.0? ( -- ? ) spot get version-1.0?>> ;
+: set-version ( string -- )
+    spot get swap "1.0" = >>version-1.0? drop ;
+
+SYMBOL: xml-stack
+
+SYMBOL: depth
+
+SYMBOL: interpolating?
+
+SYMBOL: in-dtd?
+
+SYMBOL: pe-table
+
+SYMBOL: extra-entities
diff --git a/basis/xml/state/summary.txt b/basis/xml/state/summary.txt
new file mode 100644 (file)
index 0000000..cfdd722
--- /dev/null
@@ -0,0 +1 @@
+Primitive device for storing the state of the XML parser
diff --git a/basis/xml/tests/arithmetic.factor b/basis/xml/tests/arithmetic.factor
deleted file mode 100644 (file)
index 98facfc..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-! Copyright (C) 2005, 2006 Daniel Ehrenberg
-! See http://factorcode.org/license.txt for BSD license.
-IN: xml.tests
-USING: xml io kernel math sequences strings xml.utilities tools.test math.parser ;
-
-PROCESS: calculate ( tag -- n )
-
-: calc-2children ( tag -- n n )
-    children-tags first2 [ calculate ] dip calculate ;
-
-TAG: number calculate
-    children>string string>number ;
-TAG: add calculate
-    calc-2children + ;
-TAG: minus calculate
-    calc-2children - ;
-TAG: times calculate
-    calc-2children * ;
-TAG: divide calculate
-    calc-2children / ;
-TAG: neg calculate
-    children-tags first calculate neg ;
-
-: calc-arith ( string -- n )
-    string>xml first-child-tag calculate ;
-
-[ 32 ] [
-    "<math><times><add><number>1</number><number>3</number></add><neg><number>-8</number></neg></times></math>"
-    calc-arith
-] unit-test
diff --git a/basis/xml/tests/ascii.xml b/basis/xml/tests/ascii.xml
new file mode 100644 (file)
index 0000000..ca1c355
--- /dev/null
@@ -0,0 +1 @@
+<?xml version='1.0' encoding='ASCII'?><x>e</x>
\ No newline at end of file
diff --git a/basis/xml/tests/encodings.factor b/basis/xml/tests/encodings.factor
new file mode 100644 (file)
index 0000000..720b04c
--- /dev/null
@@ -0,0 +1,14 @@
+USING: xml xml.data xml.utilities tools.test accessors kernel ;
+
+[ "\u000131" ] [ "resource:basis/xml/tests/latin5.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "resource:basis/xml/tests/latin1.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "resource:basis/xml/tests/spaces.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "resource:basis/xml/tests/utf8.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "resource:basis/xml/tests/utf16.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "resource:basis/xml/tests/utf16be.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "resource:basis/xml/tests/utf16le.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "resource:basis/xml/tests/utf16be-bom.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "resource:basis/xml/tests/utf16le-bom.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "resource:basis/xml/tests/prologless.xml" file>xml children>string ] unit-test
+[ "e" ] [ "resource:basis/xml/tests/ascii.xml" file>xml children>string ] unit-test
+[ "\u0000e9" "x" ] [ "resource:basis/xml/tests/unitag.xml" file>xml [ name>> main>> ] [ children>string ] bi ] unit-test
\ No newline at end of file
diff --git a/basis/xml/tests/latin1.xml b/basis/xml/tests/latin1.xml
new file mode 100644 (file)
index 0000000..f8bc6bc
--- /dev/null
@@ -0,0 +1 @@
+<?xml version='1.0' encoding='ISO-8859-1'?><x>é</x>
\ No newline at end of file
diff --git a/basis/xml/tests/latin5.xml b/basis/xml/tests/latin5.xml
new file mode 100644 (file)
index 0000000..afbcf09
--- /dev/null
@@ -0,0 +1 @@
+<?xml version='1.0' encoding='ISO-8859-9'?><x>ý</x>
\ No newline at end of file
diff --git a/basis/xml/tests/prologless.xml b/basis/xml/tests/prologless.xml
new file mode 100644 (file)
index 0000000..a60ed31
--- /dev/null
@@ -0,0 +1 @@
+<x>é</x>
\ No newline at end of file
index 063090b5f4049a757fec0b372c3d8119fd29832e..a8093442ca29508059973f9906d8f4f1dc8b3312 100644 (file)
@@ -25,9 +25,9 @@
 <directoryTitle xsi:type="xsd:string"></directoryTitle>
 <hostName xsi:type="xsd:string"></hostName>
 <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent>
-<snippet xsi:type="xsd:string">The O\e$-1òùReilly &lt;b&gt;Factor&lt;/b&gt; with Bill OòùReilly on FOXNews.com. Bill OòùReilly hosts The &lt;br&gt;  OòùReilly &lt;b&gt;Factor&lt;/b&gt;, the most-watched program on cable news.</snippet>
+<snippet xsi:type="xsd:string">The O$-1òùReilly &lt;b&gt;Factor&lt;/b&gt; with Bill OòùReilly on FOXNews.com. Bill OòùReilly hosts The &lt;br&gt;  OòùReilly &lt;b&gt;Factor&lt;/b&gt;, the most-watched program on cable news.</snippet>
 <summary xsi:type="xsd:string"></summary>
-<title xsi:type="xsd:string">Bill O\e$-1òùReilly | The OòùReilly &lt;b&gt;Factor&lt;/b&gt; - FOXNews.com</title>
+<title xsi:type="xsd:string">Bill O$-1òùReilly | The OòùReilly &lt;b&gt;Factor&lt;/b&gt; - FOXNews.com</title>
 </item>
 <item xsi:type="ns1:ResultElement">
 <URL xsi:type="xsd:string">http://www.factor.ca/</URL>
diff --git a/basis/xml/tests/spaces.xml b/basis/xml/tests/spaces.xml
new file mode 100644 (file)
index 0000000..dd194ff
--- /dev/null
@@ -0,0 +1,3 @@
+
+
+<x>é</x>
diff --git a/basis/xml/tests/state-parser-tests.factor b/basis/xml/tests/state-parser-tests.factor
new file mode 100644 (file)
index 0000000..24c3bc4
--- /dev/null
@@ -0,0 +1,18 @@
+USING: tools.test xml.tokenize xml.state io.streams.string kernel io strings ascii ;
+IN: xml.test.state
+
+: string-parse ( str quot -- )
+    [ <string-reader> ] dip with-state ;
+
+: take-rest ( -- string )
+    [ f ] take-until ;
+
+: take-char ( char -- string )
+    1string take-to ;
+
+[ "hello" ] [ "hello" [ take-rest ] string-parse ] unit-test
+[ 2 4 ] [ "12\n123" [ take-rest drop get-line get-column ] string-parse ] unit-test
+[ "hi" " how are you?" ] [ "hi how are you?" [ [ get-char blank? ] take-until take-rest ] string-parse ] unit-test
+[ "foo" ";bar" ] [ "foo;bar" [ CHAR: ; take-char take-rest ] string-parse ] unit-test
+[ "foo " " bar" ] [ "foo and bar" [ "and" take-string take-rest ] string-parse ] unit-test
+[ "baz" ] [ " \n\t baz" [ pass-blank take-rest ] string-parse ] unit-test
index f0af650e4f59ec68013d882c1d31daf48d009be5..618e785d057c7556cec8a97f4890944445f31c7a 100644 (file)
@@ -1,5 +1,5 @@
-USING: kernel xml sequences assocs tools.test io arrays namespaces
-accessors xml.data xml.utilities xml.writer generic sequences.deep ;
+USING: kernel xml sequences assocs tools.test io arrays namespaces fry
+accessors xml.data xml.utilities xml.writer generic sequences.deep multiline ;
 IN: xml.tests
 
 : sub-tag
@@ -9,10 +9,10 @@ SYMBOL: ref-table
 
 GENERIC: (r-ref) ( xml -- )
 M: tag (r-ref)
-    sub-tag over at* [
+    dup sub-tag attr [
         ref-table get at
         >>children drop
-    ] [ 2drop ] if ;
+    ] [ drop ] if* ;
 M: object (r-ref) drop ;
 
 : template ( xml -- )
@@ -20,24 +20,39 @@ M: object (r-ref) drop ;
 
 ! Example
 
-: sample-doc ( -- string )
-    {
-        "<html xmlns:f='http://littledan.onigirihouse.com/namespaces/replace'>"
-        "<body>"
-        "<span f:sub='foo'/>"
-        "<div f:sub='bar'/>"
-        "<p f:sub='baz'>paragraph</p>"
-        "</body></html>"
-    } concat ;
+STRING: sample-doc
+<html xmlns:f='http://littledan.onigirihouse.com/namespaces/replace'>
+<body>
+<span f:sub='foo'/>
+<div f:sub='bar'/>
+<p f:sub='baz'>paragraph</p>
+</body></html>
+;
+
+STRING: expected-result
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns:f="http://littledan.onigirihouse.com/namespaces/replace">
+  <body>
+    <span f:sub="foo">
+      foo
+    </span>
+    <div f:sub="bar">
+      blah
+      <a/>
+    </div>
+    <p f:sub="baz"/>
+  </body>
+</html>
+;
 
 : test-refs ( -- string )
     [
         H{
             { "foo" { "foo" } }
-            { "bar" { "blah" T{ tag f T{ name f "" "a" "" } f f } } }
+            { "bar" { "blah" T{ tag f T{ name f "" "a" "" } T{ attrs } f } } }
             { "baz" f }
         } ref-table set
-        sample-doc string>xml dup template xml>string
+        sample-doc string>xml dup template pprint-xml>string
     ] with-scope ;
 
-[ "<?xml version=\"1.0\" encoding=\"UTF-8\"?><html xmlns:f=\"http://littledan.onigirihouse.com/namespaces/replace\"><body><span f:sub=\"foo\">foo</span><div f:sub=\"bar\">blah<a/></div><p f:sub=\"baz\"/></body></html>" ] [ test-refs ] unit-test
+expected-result '[ _ ] [ test-refs ] unit-test
index 01987a98ab6fc0d16bc3d60ce9041ef2f18863cd..337c19bfe1df63b5bae473d10b1adf0f9ad6cf2b 100644 (file)
@@ -1,13 +1,15 @@
-! Copyright (C) 2005, 2006 Daniel Ehrenberg
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
 IN: xml.tests
 USING: kernel xml tools.test io namespaces make sequences
-xml.errors xml.entities parser strings xml.data io.files
-xml.writer xml.utilities state-parser continuations assocs
+xml.errors xml.entities.html parser strings xml.data io.files
+xml.utilities continuations assocs
 sequences.deep accessors io.streams.string ;
 
 ! This is insufficient
 \ read-xml must-infer
+[ [ drop ] each-element ] must-infer
+\ string>xml must-infer
 
 SYMBOL: xml-file
 [ ] [ "resource:basis/xml/tests/test.xml"
@@ -17,10 +19,10 @@ SYMBOL: xml-file
 [ "a" ] [ xml-file get space>> ] unit-test
 [ "http://www.hello.com" ] [ xml-file get url>> ] unit-test
 [ "that" ] [
-    xml-file get T{ name f "" "this" "http://d.de" } swap at
+    xml-file get T{ name f "" "this" "http://d.de" } attr
 ] unit-test
 [ t ] [ xml-file get children>> second contained-tag? ] unit-test
-[ "<a></b>" string>xml ] [ xml-parse-error? ] must-fail-with
+[ "<a></b>" string>xml ] [ xml-error? ] must-fail-with
 [ T{ comment f "This is where the fun begins!" } ] [
     xml-file get before>> [ comment? ] find nip
 ] unit-test
@@ -28,9 +30,7 @@ SYMBOL: xml-file
     xml-file get after>> [ instruction? ] find nip text>>
 ] unit-test
 [ V{ "fa&g" } ] [ xml-file get "x" get-id children>> ] unit-test
-[ "that" ] [ xml-file get "this" swap at ] unit-test
-[ "<?xml version=\"1.0\" encoding=\"UTF-8\"?><a b=\"c\"/>" ]
-    [ "<a b='c'/>" string>xml xml>string ] unit-test
+[ "that" ] [ xml-file get "this" attr ] unit-test
 [ "abcd" ] [
     "<main>a<sub>bc</sub>d<nothing/></main>" string>xml
     [ [ dup string? [ % ] [ drop ] if ] deep-each ] "" make
@@ -43,21 +43,27 @@ SYMBOL: xml-file
     "<a><b id='c'>foo</b><d id='e'/></a>" string>xml
     "c" get-id children>string
 ] unit-test
-[ "foo" ] [ "<x y='foo'/>" string>xml "y" over
-    at swap "z" [ tuck ] dip swap set-at
-    T{ name f "blah" "z" f } swap at ] unit-test
+[ "foo" ] [
+    "<x y='foo'/>" string>xml
+    dup dup "y" attr "z" set-attr
+    T{ name { space "blah" } { main "z" } } attr
+] unit-test
 [ "foo" ] [ "<boo><![CDATA[foo]]></boo>" string>xml children>string ] unit-test
-[ "<?xml version=\"1.0\" encoding=\"UTF-8\"?><foo>bar baz</foo>" ]
-[ "<foo>bar</foo>" string>xml [ " baz" append ] map xml>string ] unit-test
-[ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<foo>\n  bar\n</foo>" ]
-[ "<foo>         bar            </foo>" string>xml pprint-xml>string ] unit-test
 [ "<!-- B+, B, or B--->" string>xml ] must-fail
 [ ] [ "<?xml version='1.0'?><!-- declarations for <head> & <body> --><foo/>" string>xml drop ] unit-test
-[ T{ element-decl f "br" "EMPTY" } ] [ "<!ELEMENT br EMPTY>" string>xml-chunk second ] unit-test
-[ T{ element-decl f "p" "(#PCDATA|emph)*" } ] [ "<!ELEMENT p (#PCDATA|emph)*>" string>xml-chunk second ] unit-test
-[ T{ element-decl f "%name.para;" "%content.para;" } ] [ "<!ELEMENT %name.para; %content.para;>" string>xml-chunk second ] unit-test
-[ T{ element-decl f "container" "ANY" } ] [ "<!ELEMENT container ANY>" string>xml-chunk second ] unit-test
-[ T{ doctype-decl f "foo" } ] [ "<!DOCTYPE foo>" string>xml-chunk second ] unit-test
-[ T{ doctype-decl f "foo" } ] [ "<!DOCTYPE foo >" string>xml-chunk second ] unit-test
-[ T{ doctype-decl f "foo" T{ system-id f "blah.dtd" } } ] [ "<!DOCTYPE foo SYSTEM 'blah.dtd'>" string>xml-chunk second ] unit-test
-[ T{ doctype-decl f "foo" T{ system-id f "blah.dtd" } } ] [ "<!DOCTYPE foo   SYSTEM \"blah.dtd\"   >" string>xml-chunk second ] unit-test
+
+: first-thing ( seq -- elt )
+    [ "" = not ] filter first ;
+
+[ T{ element-decl f "br" "EMPTY" } ] [ "<!ELEMENT br EMPTY>" string>dtd directives>> first-thing ] unit-test
+[ T{ element-decl f "p" "(#PCDATA|emph)*" } ] [ "<!ELEMENT p (#PCDATA|emph)*>" string>dtd directives>> first-thing ] unit-test
+[ T{ element-decl f "%name.para;" "%content.para;" } ] [ "<!ELEMENT %name.para; %content.para;>" string>dtd directives>> first-thing ] unit-test
+[ T{ element-decl f "container" "ANY" } ] [ "<!ELEMENT container ANY>" string>dtd directives>> first-thing ] unit-test
+[ T{ doctype-decl f "foo" } ] [ "<!DOCTYPE foo>" string>xml-chunk first-thing ] unit-test
+[ T{ doctype-decl f "foo" } ] [ "<!DOCTYPE foo >" string>xml-chunk first-thing ] unit-test
+[ T{ doctype-decl f "foo" T{ system-id f "blah.dtd" } } ] [ "<!DOCTYPE foo SYSTEM 'blah.dtd'>" string>xml-chunk first-thing ] unit-test
+[ T{ doctype-decl f "foo" T{ system-id f "blah.dtd" } } ] [ "<!DOCTYPE foo   SYSTEM \"blah.dtd\"   >" string>xml-chunk first-thing ] unit-test
+[ 958 ] [ [ "&xi;" string>xml-chunk ] with-html-entities first first ] unit-test
+[ "x" "<" ] [ "<x value='&lt;'/>" string>xml [ name>> main>> ] [ "value" attr ] bi ] unit-test
+[ "foo" ] [ "<!DOCTYPE foo [<!ENTITY bar 'foo'>]><x>&bar;</x>" string>xml children>string ] unit-test
+[ T{ xml-chunk f V{ "hello" } } ] [ "hello" string>xml-chunk ] unit-test
diff --git a/basis/xml/tests/unitag.xml b/basis/xml/tests/unitag.xml
new file mode 100644 (file)
index 0000000..b7ef6ad
--- /dev/null
@@ -0,0 +1 @@
+<é>x</é>
\ No newline at end of file
diff --git a/basis/xml/tests/utf16.xml b/basis/xml/tests/utf16.xml
new file mode 100644 (file)
index 0000000..d877509
Binary files /dev/null and b/basis/xml/tests/utf16.xml differ
diff --git a/basis/xml/tests/utf16be-bom.xml b/basis/xml/tests/utf16be-bom.xml
new file mode 100644 (file)
index 0000000..4a6f3e2
Binary files /dev/null and b/basis/xml/tests/utf16be-bom.xml differ
diff --git a/basis/xml/tests/utf16be.xml b/basis/xml/tests/utf16be.xml
new file mode 100644 (file)
index 0000000..c97bff7
Binary files /dev/null and b/basis/xml/tests/utf16be.xml differ
diff --git a/basis/xml/tests/utf16le-bom.xml b/basis/xml/tests/utf16le-bom.xml
new file mode 100644 (file)
index 0000000..ac7d8b8
Binary files /dev/null and b/basis/xml/tests/utf16le-bom.xml differ
diff --git a/basis/xml/tests/utf16le.xml b/basis/xml/tests/utf16le.xml
new file mode 100644 (file)
index 0000000..5a0c7d9
Binary files /dev/null and b/basis/xml/tests/utf16le.xml differ
diff --git a/basis/xml/tests/utf8-bom.xml b/basis/xml/tests/utf8-bom.xml
new file mode 100644 (file)
index 0000000..5486916
--- /dev/null
@@ -0,0 +1 @@
+<?xml version='1.0' encoding='UTF-8'?><x/>
\ No newline at end of file
diff --git a/basis/xml/tests/utf8.xml b/basis/xml/tests/utf8.xml
new file mode 100644 (file)
index 0000000..83b3e2d
--- /dev/null
@@ -0,0 +1 @@
+<?xml version='1.0' encoding='UTF-8'?><x>é</x>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest.factor b/basis/xml/tests/xmltest.factor
new file mode 100644 (file)
index 0000000..a8024ce
--- /dev/null
@@ -0,0 +1,55 @@
+USING: accessors assocs combinators continuations fry generalizations
+io.pathnames kernel macros sequences stack-checker tools.test xml
+xml.utilities xml.writer arrays xml.data ; 
+IN: xml.tests.suite
+
+TUPLE: xml-test id uri sections description type ;
+
+: >xml-test ( tag -- test )
+    xml-test new swap {
+        [ "TYPE" attr >>type ]
+        [ "ID" attr >>id ]
+        [ "URI" attr >>uri ]
+        [ "SECTIONS" attr >>sections ]
+        [ children>> xml>string >>description ]
+    } cleave ;
+
+: parse-tests ( xml -- tests )
+    "TEST" tags-named [ >xml-test ] map ;
+
+: base "resource:basis/xml/tests/xmltest/" ;
+
+MACRO: drop-output ( quot -- newquot )
+    dup infer out>> '[ @ _ ndrop ] ;
+
+MACRO: drop-input ( quot -- newquot )
+    infer in>> '[ _ ndrop ] ;
+
+: fails? ( quot -- ? )
+    [ '[ _ drop-output f ] ]
+    [ '[ drop _ drop-input t ] ] bi recover ; inline
+
+: well-formed? ( uri -- answer )
+    [ file>xml ] fails? "not-wf" "valid" ? ;
+
+: test-quots ( test -- result quot )
+    [ type>> '[ _ ] ]
+    [ '[ _ uri>> base swap append-path well-formed? ] ] bi ;
+
+: xml-tests ( -- tests )
+    base "xmltest.xml" append-path file>xml
+    parse-tests [ test-quots 2array ] map ;
+
+: run-xml-tests ( -- )
+    xml-tests [ unit-test ] assoc-each ;
+
+: works? ( result quot -- ? )
+    [ first ] [ call ] bi* = ;
+
+: partition-xml-tests ( -- successes failures )
+    xml-tests [ first2 works? ] partition ;
+
+: failing-valids ( -- tests )
+    partition-xml-tests nip [ second first ] map [ type>> "valid" = ] filter ;
+
+[ ] [ partition-xml-tests 2drop ] unit-test
diff --git a/basis/xml/tests/xmltest/canonxml.html b/basis/xml/tests/xmltest/canonxml.html
new file mode 100755 (executable)
index 0000000..2ba0edf
--- /dev/null
@@ -0,0 +1,44 @@
+<HTML>\r
+<TITLE>Canonical XML</TITLE>\r
+<BODY>\r
+<H1>Canonical XML</H1>\r
+<P>\r
+This document defines a subset of XML called canonical XML.\r
+The intended use of canonical XML is in testing XML processors,\r
+as a representation of the result of parsing an XML document.\r
+<P>\r
+Every well-formed XML document has a unique structurally equivalent\r
+canonical XML document.  Two structurally equivalent XML\r
+documents have a byte-for-byte identical canonical XML document.\r
+Canonicalizing an XML document requires only information that an XML\r
+processor is required to make available to an application.\r
+<P>\r
+A canonical XML document conforms to the following grammar:\r
+<PRE>\r
+CanonXML    ::= Pi* element Pi*\r
+element     ::= Stag (Datachar | Pi | element)* Etag\r
+Stag        ::= '&lt;'  Name Atts '&gt;'\r
+Etag        ::= '&lt;/' Name '&gt;'\r
+Pi          ::= '&lt;?' Name ' ' (((Char - S) Char*)? - (Char* '?&gt;' Char*)) '?&gt;'\r
+Atts        ::= (' ' Name '=' '"' Datachar* '"')*\r
+Datachar    ::= '&amp;amp;' | '&amp;lt;' | '&amp;gt;' | '&amp;quot;'\r
+                 | '&amp;#9;'| '&amp;#10;'| '&amp;#13;'\r
+                 | (Char - ('&amp;' | '&lt;' | '&gt;' | '"' | #x9 | #xA | #xD))\r
+Name        ::= (see XML spec)\r
+Char        ::= (see XML spec)\r
+S           ::= (see XML spec)\r
+</PRE>\r
+<P>\r
+Attributes are in lexicographical order (in Unicode bit order).\r
+<P>\r
+A canonical XML document is encoded in UTF-8.\r
+<P>\r
+Ignorable white space is considered significant and is treated equivalently\r
+to data.\r
+<P>\r
+<ADDRESS>\r
+<A HREF="mailto:jjc@jclark.com">James Clark</A>\r
+</ADDRESS>\r
+\r
+</BODY>\r
+</HTML>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/invalid/002.ent b/basis/xml/tests/xmltest/invalid/002.ent
new file mode 100755 (executable)
index 0000000..4cb848b
--- /dev/null
@@ -0,0 +1,2 @@
+<!ENTITY % e "(#PCDATA">\r
+<!ELEMENT doc %e;)>\r
diff --git a/basis/xml/tests/xmltest/invalid/002.xml b/basis/xml/tests/xmltest/invalid/002.xml
new file mode 100755 (executable)
index 0000000..5a3a96d
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "002.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/invalid/005.ent b/basis/xml/tests/xmltest/invalid/005.ent
new file mode 100755 (executable)
index 0000000..85e1647
--- /dev/null
@@ -0,0 +1,2 @@
+<!ENTITY % e ">">\r
+<!ELEMENT doc (#PCDATA) %e;\r
diff --git a/basis/xml/tests/xmltest/invalid/005.xml b/basis/xml/tests/xmltest/invalid/005.xml
new file mode 100755 (executable)
index 0000000..383553d
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "005.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/invalid/006.ent b/basis/xml/tests/xmltest/invalid/006.ent
new file mode 100755 (executable)
index 0000000..116ca79
--- /dev/null
@@ -0,0 +1,2 @@
+<!ENTITY % e "(#PCDATA)>">\r
+<!ELEMENT doc %e;\r
diff --git a/basis/xml/tests/xmltest/invalid/006.xml b/basis/xml/tests/xmltest/invalid/006.xml
new file mode 100755 (executable)
index 0000000..2f14e83
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "006.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/invalid/not-sa/022.ent b/basis/xml/tests/xmltest/invalid/not-sa/022.ent
new file mode 100644 (file)
index 0000000..26f2d8b
--- /dev/null
@@ -0,0 +1,3 @@
+<!ENTITY % e "INCLUDE[">\r
+<!ELEMENT doc (#PCDATA)>\r
+<![ %e; <!ATTLIST doc a1 CDATA "v1"> ]]>\r
diff --git a/basis/xml/tests/xmltest/invalid/not-sa/022.xml b/basis/xml/tests/xmltest/invalid/not-sa/022.xml
new file mode 100644 (file)
index 0000000..b639f25
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "022.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/invalid/not-sa/out/022.xml b/basis/xml/tests/xmltest/invalid/not-sa/out/022.xml
new file mode 100644 (file)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/not-wf/ext-sa/001.ent b/basis/xml/tests/xmltest/not-wf/ext-sa/001.ent
new file mode 100755 (executable)
index 0000000..378a207
--- /dev/null
@@ -0,0 +1 @@
+&e;
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/not-wf/ext-sa/001.xml b/basis/xml/tests/xmltest/not-wf/ext-sa/001.xml
new file mode 100755 (executable)
index 0000000..aa624cb
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e SYSTEM "001.ent">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/ext-sa/002.ent b/basis/xml/tests/xmltest/not-wf/ext-sa/002.ent
new file mode 100755 (executable)
index 0000000..2cd184a
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0" standalone="yes"?>\r
+data\r
+\r
diff --git a/basis/xml/tests/xmltest/not-wf/ext-sa/002.xml b/basis/xml/tests/xmltest/not-wf/ext-sa/002.xml
new file mode 100755 (executable)
index 0000000..9eaf917
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e SYSTEM "002.ent">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/ext-sa/003.ent b/basis/xml/tests/xmltest/not-wf/ext-sa/003.ent
new file mode 100755 (executable)
index 0000000..ac292ee
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?><?xml version="1.0" encoding="UTF-8"?>\r
+data\r
diff --git a/basis/xml/tests/xmltest/not-wf/ext-sa/003.xml b/basis/xml/tests/xmltest/not-wf/ext-sa/003.xml
new file mode 100755 (executable)
index 0000000..bb60b66
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e SYSTEM "003.ent">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/001.ent b/basis/xml/tests/xmltest/not-wf/not-sa/001.ent
new file mode 100755 (executable)
index 0000000..00096e5
--- /dev/null
@@ -0,0 +1,3 @@
+<![ INCLUDE [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/001.xml b/basis/xml/tests/xmltest/not-wf/not-sa/001.xml
new file mode 100755 (executable)
index 0000000..3618845
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "001.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/002.xml b/basis/xml/tests/xmltest/not-wf/not-sa/002.xml
new file mode 100755 (executable)
index 0000000..dd73174
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY % e "<?xml version='1.0' encoding='UTF-8'?>">\r
+%e;\r
+]>\r
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/003.ent b/basis/xml/tests/xmltest/not-wf/not-sa/003.ent
new file mode 100755 (executable)
index 0000000..abf1b1a
--- /dev/null
@@ -0,0 +1,2 @@
+<!ELEMENT doc (#PCDATA)>\r
+<![ IGNORE [\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/003.xml b/basis/xml/tests/xmltest/not-wf/not-sa/003.xml
new file mode 100755 (executable)
index 0000000..dd01f41
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "003.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/004.ent b/basis/xml/tests/xmltest/not-wf/not-sa/004.ent
new file mode 100755 (executable)
index 0000000..552e4f5
--- /dev/null
@@ -0,0 +1,2 @@
+<!ELEMENT doc (#PCDATA)>\r
+<![ INCLUDE [\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/004.xml b/basis/xml/tests/xmltest/not-wf/not-sa/004.xml
new file mode 100755 (executable)
index 0000000..20cdf6d
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "004.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/005.ent b/basis/xml/tests/xmltest/not-wf/not-sa/005.ent
new file mode 100755 (executable)
index 0000000..9a369ce
--- /dev/null
@@ -0,0 +1,2 @@
+<!ELEMENT doc (#PCDATA)>\r
+%e;\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/005.xml b/basis/xml/tests/xmltest/not-wf/not-sa/005.xml
new file mode 100755 (executable)
index 0000000..383553d
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "005.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/006.ent b/basis/xml/tests/xmltest/not-wf/not-sa/006.ent
new file mode 100755 (executable)
index 0000000..771daf1
--- /dev/null
@@ -0,0 +1,3 @@
+<![INCLUDE\r
+<!ELEMENT doc (#PCDATA)>\r
+]]>\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/006.xml b/basis/xml/tests/xmltest/not-wf/not-sa/006.xml
new file mode 100755 (executable)
index 0000000..2f14e83
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "006.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/007.ent b/basis/xml/tests/xmltest/not-wf/not-sa/007.ent
new file mode 100755 (executable)
index 0000000..9e9866d
--- /dev/null
@@ -0,0 +1,3 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/007.xml b/basis/xml/tests/xmltest/not-wf/not-sa/007.xml
new file mode 100755 (executable)
index 0000000..38897e3
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "007.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/008.ent b/basis/xml/tests/xmltest/not-wf/not-sa/008.ent
new file mode 100755 (executable)
index 0000000..f8b1cd3
--- /dev/null
@@ -0,0 +1,2 @@
+<!ELEMENT doc ANY>\r
+<!ENTITY e "100%">\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/008.xml b/basis/xml/tests/xmltest/not-wf/not-sa/008.xml
new file mode 100755 (executable)
index 0000000..5435100
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "008.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/009.ent b/basis/xml/tests/xmltest/not-wf/not-sa/009.ent
new file mode 100644 (file)
index 0000000..f70eaea
--- /dev/null
@@ -0,0 +1,3 @@
+<!ELEMENT doc EMPTY>\r
+<!ENTITY % e "<!--">\r
+%e; -->\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/009.xml b/basis/xml/tests/xmltest/not-wf/not-sa/009.xml
new file mode 100644 (file)
index 0000000..9aa7289
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "009.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/010.ent b/basis/xml/tests/xmltest/not-wf/not-sa/010.ent
new file mode 100644 (file)
index 0000000..54f3c82
--- /dev/null
@@ -0,0 +1,2 @@
+<!ENTITY % e "<!ELEMENT ">\r
+%e; doc (#PCDATA)>\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/010.xml b/basis/xml/tests/xmltest/not-wf/not-sa/010.xml
new file mode 100644 (file)
index 0000000..963e4c2
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "010.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/011.ent b/basis/xml/tests/xmltest/not-wf/not-sa/011.ent
new file mode 100644 (file)
index 0000000..aae4cc2
--- /dev/null
@@ -0,0 +1,3 @@
+<!ENTITY % e1 "<!ELEMENT ">\r
+<!ENTITY % e2 ">">\r
+%e1; doc (#PCDATA) %e2;\r
diff --git a/basis/xml/tests/xmltest/not-wf/not-sa/011.xml b/basis/xml/tests/xmltest/not-wf/not-sa/011.xml
new file mode 100644 (file)
index 0000000..dd40c95
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "011.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/001.xml b/basis/xml/tests/xmltest/not-wf/sa/001.xml
new file mode 100755 (executable)
index 0000000..d33ec68
--- /dev/null
@@ -0,0 +1,5 @@
+<doc>\r
+<doc\r
+?\r
+<a</a>\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/002.xml b/basis/xml/tests/xmltest/not-wf/sa/002.xml
new file mode 100755 (executable)
index 0000000..0a64d52
--- /dev/null
@@ -0,0 +1,4 @@
+<doc>\r
+<.doc></.doc>\r
+</doc>\r
+\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/003.xml b/basis/xml/tests/xmltest/not-wf/sa/003.xml
new file mode 100755 (executable)
index 0000000..e0b8bae
--- /dev/null
@@ -0,0 +1 @@
+<doc><? ?></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/004.xml b/basis/xml/tests/xmltest/not-wf/sa/004.xml
new file mode 100755 (executable)
index 0000000..e85bc96
--- /dev/null
@@ -0,0 +1 @@
+<doc><?target some data></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/005.xml b/basis/xml/tests/xmltest/not-wf/sa/005.xml
new file mode 100755 (executable)
index 0000000..7cd44ef
--- /dev/null
@@ -0,0 +1 @@
+<doc><?target some data?</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/006.xml b/basis/xml/tests/xmltest/not-wf/sa/006.xml
new file mode 100755 (executable)
index 0000000..8594c35
--- /dev/null
@@ -0,0 +1 @@
+<doc><!-- a comment -- another --></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/007.xml b/basis/xml/tests/xmltest/not-wf/sa/007.xml
new file mode 100755 (executable)
index 0000000..286756f
--- /dev/null
@@ -0,0 +1 @@
+<doc>&amp no refc</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/008.xml b/basis/xml/tests/xmltest/not-wf/sa/008.xml
new file mode 100755 (executable)
index 0000000..29ef403
--- /dev/null
@@ -0,0 +1 @@
+<doc>&.entity;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/009.xml b/basis/xml/tests/xmltest/not-wf/sa/009.xml
new file mode 100755 (executable)
index 0000000..8e3ff7d
--- /dev/null
@@ -0,0 +1 @@
+<doc>&#RE;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/010.xml b/basis/xml/tests/xmltest/not-wf/sa/010.xml
new file mode 100755 (executable)
index 0000000..a679084
--- /dev/null
@@ -0,0 +1 @@
+<doc>A & B</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/011.xml b/basis/xml/tests/xmltest/not-wf/sa/011.xml
new file mode 100755 (executable)
index 0000000..57eaf9f
--- /dev/null
@@ -0,0 +1 @@
+<doc a1></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/012.xml b/basis/xml/tests/xmltest/not-wf/sa/012.xml
new file mode 100755 (executable)
index 0000000..1b2539f
--- /dev/null
@@ -0,0 +1 @@
+<doc a1=v1></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/013.xml b/basis/xml/tests/xmltest/not-wf/sa/013.xml
new file mode 100755 (executable)
index 0000000..3540df9
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1'></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/014.xml b/basis/xml/tests/xmltest/not-wf/sa/014.xml
new file mode 100755 (executable)
index 0000000..a613115
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="<foo>"></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/015.xml b/basis/xml/tests/xmltest/not-wf/sa/015.xml
new file mode 100755 (executable)
index 0000000..f2baf94
--- /dev/null
@@ -0,0 +1 @@
+<doc a1=></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/016.xml b/basis/xml/tests/xmltest/not-wf/sa/016.xml
new file mode 100755 (executable)
index 0000000..22d4b2e
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1" "v2"></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/017.xml b/basis/xml/tests/xmltest/not-wf/sa/017.xml
new file mode 100755 (executable)
index 0000000..a76f592
--- /dev/null
@@ -0,0 +1 @@
+<doc><![CDATA[</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/018.xml b/basis/xml/tests/xmltest/not-wf/sa/018.xml
new file mode 100755 (executable)
index 0000000..66e204a
--- /dev/null
@@ -0,0 +1 @@
+<doc><![CDATA [ stuff]]></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/019.xml b/basis/xml/tests/xmltest/not-wf/sa/019.xml
new file mode 100755 (executable)
index 0000000..b835c2d
--- /dev/null
@@ -0,0 +1 @@
+<doc></>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/020.xml b/basis/xml/tests/xmltest/not-wf/sa/020.xml
new file mode 100755 (executable)
index 0000000..b30cfcf
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="A & B"></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/021.xml b/basis/xml/tests/xmltest/not-wf/sa/021.xml
new file mode 100755 (executable)
index 0000000..1bfa84a
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="a&b"></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/022.xml b/basis/xml/tests/xmltest/not-wf/sa/022.xml
new file mode 100755 (executable)
index 0000000..44c803b
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="&#123:"></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/023.xml b/basis/xml/tests/xmltest/not-wf/sa/023.xml
new file mode 100755 (executable)
index 0000000..b877ae2
--- /dev/null
@@ -0,0 +1 @@
+<doc 12="34"></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/024.xml b/basis/xml/tests/xmltest/not-wf/sa/024.xml
new file mode 100755 (executable)
index 0000000..cf68f2c
--- /dev/null
@@ -0,0 +1,3 @@
+<doc>\r
+<123></123>\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/025.xml b/basis/xml/tests/xmltest/not-wf/sa/025.xml
new file mode 100755 (executable)
index 0000000..6cba95c
--- /dev/null
@@ -0,0 +1 @@
+<doc>]]></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/026.xml b/basis/xml/tests/xmltest/not-wf/sa/026.xml
new file mode 100755 (executable)
index 0000000..347984f
--- /dev/null
@@ -0,0 +1 @@
+<doc>]]]></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/027.xml b/basis/xml/tests/xmltest/not-wf/sa/027.xml
new file mode 100755 (executable)
index 0000000..cfafaf0
--- /dev/null
@@ -0,0 +1,3 @@
+<doc>\r
+<!-- abc\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/028.xml b/basis/xml/tests/xmltest/not-wf/sa/028.xml
new file mode 100755 (executable)
index 0000000..5227149
--- /dev/null
@@ -0,0 +1,4 @@
+<doc>\r
+<?a pi that is not closed\r
+</doc>\r
+\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/029.xml b/basis/xml/tests/xmltest/not-wf/sa/029.xml
new file mode 100755 (executable)
index 0000000..9a8008b
--- /dev/null
@@ -0,0 +1 @@
+<doc>abc]]]>def</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/030.xml b/basis/xml/tests/xmltest/not-wf/sa/030.xml
new file mode 100755 (executable)
index 0000000..25861fa
--- /dev/null
@@ -0,0 +1 @@
+<doc>A form feed (\f) is not legal in data</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/031.xml b/basis/xml/tests/xmltest/not-wf/sa/031.xml
new file mode 100755 (executable)
index 0000000..f946536
--- /dev/null
@@ -0,0 +1 @@
+<doc><?pi a form feed (\f) is not allowed in a pi?></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/032.xml b/basis/xml/tests/xmltest/not-wf/sa/032.xml
new file mode 100755 (executable)
index 0000000..7595201
--- /dev/null
@@ -0,0 +1 @@
+<doc><!-- a form feed (\f) is not allowed in a comment --></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/033.xml b/basis/xml/tests/xmltest/not-wf/sa/033.xml
new file mode 100755 (executable)
index 0000000..afd2328
--- /dev/null
@@ -0,0 +1 @@
+<doc>abc\edef</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/034.xml b/basis/xml/tests/xmltest/not-wf/sa/034.xml
new file mode 100755 (executable)
index 0000000..d74a777
--- /dev/null
@@ -0,0 +1 @@
+<doc\f>A form-feed is not white space or a name character</doc\f>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/035.xml b/basis/xml/tests/xmltest/not-wf/sa/035.xml
new file mode 100755 (executable)
index 0000000..e1fc920
--- /dev/null
@@ -0,0 +1 @@
+<doc>1 < 2 but not in XML</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/036.xml b/basis/xml/tests/xmltest/not-wf/sa/036.xml
new file mode 100755 (executable)
index 0000000..b8ecb21
--- /dev/null
@@ -0,0 +1,2 @@
+<doc></doc>\r
+Illegal data\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/037.xml b/basis/xml/tests/xmltest/not-wf/sa/037.xml
new file mode 100755 (executable)
index 0000000..2e02662
--- /dev/null
@@ -0,0 +1,2 @@
+<doc></doc>\r
+&#32;\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/038.xml b/basis/xml/tests/xmltest/not-wf/sa/038.xml
new file mode 100755 (executable)
index 0000000..68b2803
--- /dev/null
@@ -0,0 +1 @@
+<doc x="foo" y="bar" x="baz"></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/039.xml b/basis/xml/tests/xmltest/not-wf/sa/039.xml
new file mode 100755 (executable)
index 0000000..80429e3
--- /dev/null
@@ -0,0 +1 @@
+<doc><a></aa></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/040.xml b/basis/xml/tests/xmltest/not-wf/sa/040.xml
new file mode 100755 (executable)
index 0000000..dc8ba5a
--- /dev/null
@@ -0,0 +1,2 @@
+<doc></doc>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/041.xml b/basis/xml/tests/xmltest/not-wf/sa/041.xml
new file mode 100755 (executable)
index 0000000..30bcdd6
--- /dev/null
@@ -0,0 +1,2 @@
+<doc/>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/042.xml b/basis/xml/tests/xmltest/not-wf/sa/042.xml
new file mode 100755 (executable)
index 0000000..4ae50ef
--- /dev/null
@@ -0,0 +1 @@
+<doc/></doc/>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/043.xml b/basis/xml/tests/xmltest/not-wf/sa/043.xml
new file mode 100755 (executable)
index 0000000..41824ee
--- /dev/null
@@ -0,0 +1,2 @@
+<doc/>\r
+Illegal data\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/044.xml b/basis/xml/tests/xmltest/not-wf/sa/044.xml
new file mode 100755 (executable)
index 0000000..3fc232d
--- /dev/null
@@ -0,0 +1 @@
+<doc/><doc/>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/045.xml b/basis/xml/tests/xmltest/not-wf/sa/045.xml
new file mode 100755 (executable)
index 0000000..00c10f0
--- /dev/null
@@ -0,0 +1,4 @@
+<doc>\r
+<a/\r
+</doc>\r
+\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/046.xml b/basis/xml/tests/xmltest/not-wf/sa/046.xml
new file mode 100755 (executable)
index 0000000..265cb15
--- /dev/null
@@ -0,0 +1,3 @@
+<doc>\r
+<a/</a>\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/047.xml b/basis/xml/tests/xmltest/not-wf/sa/047.xml
new file mode 100755 (executable)
index 0000000..d18a4a4
--- /dev/null
@@ -0,0 +1,3 @@
+<doc>\r
+<a / >\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/048.xml b/basis/xml/tests/xmltest/not-wf/sa/048.xml
new file mode 100755 (executable)
index 0000000..67419c1
--- /dev/null
@@ -0,0 +1,3 @@
+<doc>\r
+</doc>\r
+<![CDATA[]]>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/049.xml b/basis/xml/tests/xmltest/not-wf/sa/049.xml
new file mode 100755 (executable)
index 0000000..3cf0e79
--- /dev/null
@@ -0,0 +1,4 @@
+<doc>\r
+<a><![CDATA[xyz]]]></a>\r
+<![CDATA[]]></a>\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/050.xml b/basis/xml/tests/xmltest/not-wf/sa/050.xml
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/basis/xml/tests/xmltest/not-wf/sa/051.xml b/basis/xml/tests/xmltest/not-wf/sa/051.xml
new file mode 100755 (executable)
index 0000000..b52df12
--- /dev/null
@@ -0,0 +1,3 @@
+<!-- a comment -->\r
+<![CDATA[]]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/052.xml b/basis/xml/tests/xmltest/not-wf/sa/052.xml
new file mode 100755 (executable)
index 0000000..8283895
--- /dev/null
@@ -0,0 +1,3 @@
+<!-- a comment -->\r
+&#32;\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/053.xml b/basis/xml/tests/xmltest/not-wf/sa/053.xml
new file mode 100755 (executable)
index 0000000..9d7f369
--- /dev/null
@@ -0,0 +1 @@
+<doc></DOC>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/054.xml b/basis/xml/tests/xmltest/not-wf/sa/054.xml
new file mode 100755 (executable)
index 0000000..eda553c
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY foo PUBLIC "some public id">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/055.xml b/basis/xml/tests/xmltest/not-wf/sa/055.xml
new file mode 100755 (executable)
index 0000000..cbb3683
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc [\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/056.xml b/basis/xml/tests/xmltest/not-wf/sa/056.xml
new file mode 100755 (executable)
index 0000000..a681684
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc -- a comment -- []>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/057.xml b/basis/xml/tests/xmltest/not-wf/sa/057.xml
new file mode 100755 (executable)
index 0000000..848d347
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "whatever" -- a comment -->\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/058.xml b/basis/xml/tests/xmltest/not-wf/sa/058.xml
new file mode 100755 (executable)
index 0000000..daba266
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 (foo,bar) #IMPLIED>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/059.xml b/basis/xml/tests/xmltest/not-wf/sa/059.xml
new file mode 100755 (executable)
index 0000000..316083d
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 NMTOKEN v1>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/060.xml b/basis/xml/tests/xmltest/not-wf/sa/060.xml
new file mode 100755 (executable)
index 0000000..9a610fd
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 NAME #IMPLIED>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/061.xml b/basis/xml/tests/xmltest/not-wf/sa/061.xml
new file mode 100755 (executable)
index 0000000..59181e7
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e PUBLIC "whatever""e.ent">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/062.xml b/basis/xml/tests/xmltest/not-wf/sa/062.xml
new file mode 100755 (executable)
index 0000000..e62e9cd
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY foo"some text">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/063.xml b/basis/xml/tests/xmltest/not-wf/sa/063.xml
new file mode 100755 (executable)
index 0000000..98675b9
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<![INCLUDE[ ]]>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/064.xml b/basis/xml/tests/xmltest/not-wf/sa/064.xml
new file mode 100755 (executable)
index 0000000..3888c46
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST e a1 CDATA"foo">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/065.xml b/basis/xml/tests/xmltest/not-wf/sa/065.xml
new file mode 100755 (executable)
index 0000000..da9cafd
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1(foo|bar) #IMPLIED>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/066.xml b/basis/xml/tests/xmltest/not-wf/sa/066.xml
new file mode 100755 (executable)
index 0000000..9c09eb4
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 (foo|bar)#IMPLIED>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/067.xml b/basis/xml/tests/xmltest/not-wf/sa/067.xml
new file mode 100755 (executable)
index 0000000..7e0809b
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 (foo)"foo">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/068.xml b/basis/xml/tests/xmltest/not-wf/sa/068.xml
new file mode 100755 (executable)
index 0000000..53a80a8
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 NOTATION(foo) #IMPLIED>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/069.xml b/basis/xml/tests/xmltest/not-wf/sa/069.xml
new file mode 100755 (executable)
index 0000000..6f891dd
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!NOTATION eps SYSTEM "eps.exe">\r
+<!-- missing space before NDATA -->\r
+<!ENTITY foo SYSTEM "foo.eps"NDATA eps>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/070.xml b/basis/xml/tests/xmltest/not-wf/sa/070.xml
new file mode 100755 (executable)
index 0000000..faf4b0a
--- /dev/null
@@ -0,0 +1,2 @@
+<!-- a comment ending with three dashes --->\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/071.xml b/basis/xml/tests/xmltest/not-wf/sa/071.xml
new file mode 100755 (executable)
index 0000000..5bd3908
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ENTITY e1 "&e2;">\r
+<!ENTITY e2 "&e3;">\r
+<!ENTITY e3 "&e1;">\r
+]>\r
+<doc>&e1;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/072.xml b/basis/xml/tests/xmltest/not-wf/sa/072.xml
new file mode 100755 (executable)
index 0000000..743ba79
--- /dev/null
@@ -0,0 +1 @@
+<doc>&foo;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/073.xml b/basis/xml/tests/xmltest/not-wf/sa/073.xml
new file mode 100755 (executable)
index 0000000..2578af4
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "whatever">\r
+]>\r
+<doc>&f;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/074.xml b/basis/xml/tests/xmltest/not-wf/sa/074.xml
new file mode 100755 (executable)
index 0000000..f8abaeb
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "</foo><foo>">\r
+]>\r
+<doc>\r
+<foo>&e;</foo>\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/075.xml b/basis/xml/tests/xmltest/not-wf/sa/075.xml
new file mode 100755 (executable)
index 0000000..d3dbf50
--- /dev/null
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [\r
+<!ENTITY e1 "&e2;">\r
+<!ENTITY e2 "&e3;">\r
+<!ENTITY e3 "&e1;">\r
+]>\r
+<doc a="&e1;"></doc>\r
+\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/076.xml b/basis/xml/tests/xmltest/not-wf/sa/076.xml
new file mode 100755 (executable)
index 0000000..6054672
--- /dev/null
@@ -0,0 +1 @@
+<doc a="&foo;"></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/077.xml b/basis/xml/tests/xmltest/not-wf/sa/077.xml
new file mode 100755 (executable)
index 0000000..f8ac23a
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY foo "&bar;">\r
+]>\r
+<doc a="&foo;"></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/078.xml b/basis/xml/tests/xmltest/not-wf/sa/078.xml
new file mode 100755 (executable)
index 0000000..446cd85
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA "&foo;">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/079.xml b/basis/xml/tests/xmltest/not-wf/sa/079.xml
new file mode 100755 (executable)
index 0000000..da016fd
--- /dev/null
@@ -0,0 +1,8 @@
+<!DOCTYPE doc [\r
+<!ENTITY e1 "&e2;">\r
+<!ENTITY e2 "&e3;">\r
+<!ENTITY e3 "&e1;">\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA "&e1;">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/080.xml b/basis/xml/tests/xmltest/not-wf/sa/080.xml
new file mode 100755 (executable)
index 0000000..fa4b9e4
--- /dev/null
@@ -0,0 +1,8 @@
+<!DOCTYPE doc [\r
+<!ENTITY e1 "&e2;">\r
+<!ENTITY e2 "&e3;">\r
+<!ENTITY e3 "&e1;">\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA #FIXED "&e1;">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/081.xml b/basis/xml/tests/xmltest/not-wf/sa/081.xml
new file mode 100755 (executable)
index 0000000..d676100
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e SYSTEM "nul">\r
+]>\r
+<doc a="&e;"></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/082.xml b/basis/xml/tests/xmltest/not-wf/sa/082.xml
new file mode 100755 (executable)
index 0000000..3217d6f
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ENTITY e SYSTEM "nul">\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA "&e;">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/083.xml b/basis/xml/tests/xmltest/not-wf/sa/083.xml
new file mode 100755 (executable)
index 0000000..469d43f
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e SYSTEM "nul" NDATA n>\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/084.xml b/basis/xml/tests/xmltest/not-wf/sa/084.xml
new file mode 100755 (executable)
index 0000000..abbbcde
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ENTITY e SYSTEM "nul" NDATA n>\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA "&e;">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/085.xml b/basis/xml/tests/xmltest/not-wf/sa/085.xml
new file mode 100755 (executable)
index 0000000..ac0aeca
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc PUBLIC "[" "null.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/086.xml b/basis/xml/tests/xmltest/not-wf/sa/086.xml
new file mode 100755 (executable)
index 0000000..df6adfd
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY foo PUBLIC "[" "null.xml">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/087.xml b/basis/xml/tests/xmltest/not-wf/sa/087.xml
new file mode 100755 (executable)
index 0000000..ed49492
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!NOTATION foo PUBLIC "[" "null.ent">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/088.xml b/basis/xml/tests/xmltest/not-wf/sa/088.xml
new file mode 100755 (executable)
index 0000000..da0a68c
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA #IMPLIED>\r
+<!ENTITY e '"'>\r
+]>\r
+<doc a="&e;></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/089.xml b/basis/xml/tests/xmltest/not-wf/sa/089.xml
new file mode 100755 (executable)
index 0000000..0c6cf40
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY % foo SYSTEM "foo.xml" NDATA bar>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/090.xml b/basis/xml/tests/xmltest/not-wf/sa/090.xml
new file mode 100755 (executable)
index 0000000..3fb72f3
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "<foo a='&#60;'></foo>">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/091.xml b/basis/xml/tests/xmltest/not-wf/sa/091.xml
new file mode 100755 (executable)
index 0000000..a61d091
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!NOTATION n SYSTEM "n">\r
+<!ENTITY % foo SYSTEM "foo.xml" NDATA n>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/092.xml b/basis/xml/tests/xmltest/not-wf/sa/092.xml
new file mode 100755 (executable)
index 0000000..be5266d
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "<foo a='&#38;'></foo>">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/093.xml b/basis/xml/tests/xmltest/not-wf/sa/093.xml
new file mode 100755 (executable)
index 0000000..4af61bc
--- /dev/null
@@ -0,0 +1 @@
+<doc>&#X58;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/094.xml b/basis/xml/tests/xmltest/not-wf/sa/094.xml
new file mode 100755 (executable)
index 0000000..bdec7a4
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml VERSION="1.0"?>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/095.xml b/basis/xml/tests/xmltest/not-wf/sa/095.xml
new file mode 100755 (executable)
index 0000000..090b8b4
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml encoding="UTF-8" version="1.0"?>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/096.xml b/basis/xml/tests/xmltest/not-wf/sa/096.xml
new file mode 100755 (executable)
index 0000000..d806c3b
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"encoding="UTF-8" ?>\r
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/not-wf/sa/097.xml b/basis/xml/tests/xmltest/not-wf/sa/097.xml
new file mode 100755 (executable)
index 0000000..d4def54
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0' encoding="UTF-8" ?>\r
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/not-wf/sa/098.xml b/basis/xml/tests/xmltest/not-wf/sa/098.xml
new file mode 100755 (executable)
index 0000000..9798496
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" version="1.0"?>\r
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/not-wf/sa/099.xml b/basis/xml/tests/xmltest/not-wf/sa/099.xml
new file mode 100755 (executable)
index 0000000..d5be08e
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" valid="no" ?>\r
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/not-wf/sa/100.xml b/basis/xml/tests/xmltest/not-wf/sa/100.xml
new file mode 100755 (executable)
index 0000000..51e0623
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" standalone="YES" ?>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/101.xml b/basis/xml/tests/xmltest/not-wf/sa/101.xml
new file mode 100755 (executable)
index 0000000..afa5a45
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding=" UTF-8"?>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/102.xml b/basis/xml/tests/xmltest/not-wf/sa/102.xml
new file mode 100755 (executable)
index 0000000..8734ada
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0 " ?>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/103.xml b/basis/xml/tests/xmltest/not-wf/sa/103.xml
new file mode 100755 (executable)
index 0000000..6c47167
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "&#60;foo>">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/104.xml b/basis/xml/tests/xmltest/not-wf/sa/104.xml
new file mode 100755 (executable)
index 0000000..dd57396
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "<foo>">\r
+]>\r
+<doc>&e;</foo></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/105.xml b/basis/xml/tests/xmltest/not-wf/sa/105.xml
new file mode 100755 (executable)
index 0000000..809e705
--- /dev/null
@@ -0,0 +1,4 @@
+<?pi stuff?>\r
+<![CDATA[]]>\r
+<doc>\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/106.xml b/basis/xml/tests/xmltest/not-wf/sa/106.xml
new file mode 100755 (executable)
index 0000000..d32319e
--- /dev/null
@@ -0,0 +1,2 @@
+<?pi data?>\r
+&#32;<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/107.xml b/basis/xml/tests/xmltest/not-wf/sa/107.xml
new file mode 100755 (executable)
index 0000000..3dfd820
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<![CDATA[]]>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/108.xml b/basis/xml/tests/xmltest/not-wf/sa/108.xml
new file mode 100755 (executable)
index 0000000..af5cf50
--- /dev/null
@@ -0,0 +1,3 @@
+<doc>\r
+<![CDATA [  ]]>\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/109.xml b/basis/xml/tests/xmltest/not-wf/sa/109.xml
new file mode 100755 (executable)
index 0000000..5afc03e
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "<doc></doc>">\r
+]>\r
+&e;\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/110.xml b/basis/xml/tests/xmltest/not-wf/sa/110.xml
new file mode 100755 (executable)
index 0000000..cf54ebe
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "">\r
+]>\r
+<doc></doc>\r
+&e;\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/111.xml b/basis/xml/tests/xmltest/not-wf/sa/111.xml
new file mode 100755 (executable)
index 0000000..84a469f
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "foo='bar'">\r
+]>\r
+<doc &e;></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/112.xml b/basis/xml/tests/xmltest/not-wf/sa/112.xml
new file mode 100755 (executable)
index 0000000..0c5c1a4
--- /dev/null
@@ -0,0 +1,3 @@
+<doc>\r
+<![cdata[data]]>\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/113.xml b/basis/xml/tests/xmltest/not-wf/sa/113.xml
new file mode 100755 (executable)
index 0000000..04fc9d2
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY % foo "&">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/114.xml b/basis/xml/tests/xmltest/not-wf/sa/114.xml
new file mode 100755 (executable)
index 0000000..1261ee4
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY foo "&">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/115.xml b/basis/xml/tests/xmltest/not-wf/sa/115.xml
new file mode 100755 (executable)
index 0000000..f111dbe
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "&#38;">\r
+]>\r
+<doc a="&e;"></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/116.xml b/basis/xml/tests/xmltest/not-wf/sa/116.xml
new file mode 100755 (executable)
index 0000000..84bb762
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "&#38;#9">\r
+]>\r
+<doc>&e;7;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/117.xml b/basis/xml/tests/xmltest/not-wf/sa/117.xml
new file mode 100755 (executable)
index 0000000..e4a5e57
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "&#38;">\r
+]>\r
+<doc>&e;#97;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/118.xml b/basis/xml/tests/xmltest/not-wf/sa/118.xml
new file mode 100755 (executable)
index 0000000..494d53d
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "#">\r
+]>\r
+<doc>&&e;97;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/119.xml b/basis/xml/tests/xmltest/not-wf/sa/119.xml
new file mode 100755 (executable)
index 0000000..aefaa44
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "&#38;">\r
+]>\r
+<doc>\r
+&e;#38;\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/120.xml b/basis/xml/tests/xmltest/not-wf/sa/120.xml
new file mode 100755 (executable)
index 0000000..b7d6ff9
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "&#38;">\r
+]>\r
+<doc>\r
+&e;\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/121.xml b/basis/xml/tests/xmltest/not-wf/sa/121.xml
new file mode 100755 (executable)
index 0000000..2b4adcc
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY #DEFAULT "default">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/122.xml b/basis/xml/tests/xmltest/not-wf/sa/122.xml
new file mode 100755 (executable)
index 0000000..ef0b057
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (a, (b) | c)?>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/123.xml b/basis/xml/tests/xmltest/not-wf/sa/123.xml
new file mode 100755 (executable)
index 0000000..06d65f0
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc ((doc?)))>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/124.xml b/basis/xml/tests/xmltest/not-wf/sa/124.xml
new file mode 100755 (executable)
index 0000000..3bbe0f9
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (doc|#PCDATA)*>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/125.xml b/basis/xml/tests/xmltest/not-wf/sa/125.xml
new file mode 100755 (executable)
index 0000000..5f9c22c
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc ((#PCDATA))>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/126.xml b/basis/xml/tests/xmltest/not-wf/sa/126.xml
new file mode 100755 (executable)
index 0000000..13e74d6
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)+>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/127.xml b/basis/xml/tests/xmltest/not-wf/sa/127.xml
new file mode 100755 (executable)
index 0000000..a379b9e
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)?>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/128.xml b/basis/xml/tests/xmltest/not-wf/sa/128.xml
new file mode 100755 (executable)
index 0000000..dd706bb
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc CDATA>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/129.xml b/basis/xml/tests/xmltest/not-wf/sa/129.xml
new file mode 100755 (executable)
index 0000000..d4e4461
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc - - (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/130.xml b/basis/xml/tests/xmltest/not-wf/sa/130.xml
new file mode 100755 (executable)
index 0000000..fa7be64
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (doc?) +(foo)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/131.xml b/basis/xml/tests/xmltest/not-wf/sa/131.xml
new file mode 100755 (executable)
index 0000000..f34ed45
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (doc?) -(foo)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/132.xml b/basis/xml/tests/xmltest/not-wf/sa/132.xml
new file mode 100755 (executable)
index 0000000..ab6cc41
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (a, (b, c), (d, (e, f) | g))?>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/133.xml b/basis/xml/tests/xmltest/not-wf/sa/133.xml
new file mode 100755 (executable)
index 0000000..d2aa604
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (a *)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/134.xml b/basis/xml/tests/xmltest/not-wf/sa/134.xml
new file mode 100755 (executable)
index 0000000..c8919c5
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (a) *>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/135.xml b/basis/xml/tests/xmltest/not-wf/sa/135.xml
new file mode 100755 (executable)
index 0000000..e639e8b
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (a & b)?>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/136.xml b/basis/xml/tests/xmltest/not-wf/sa/136.xml
new file mode 100755 (executable)
index 0000000..499e68b
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc O O (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/137.xml b/basis/xml/tests/xmltest/not-wf/sa/137.xml
new file mode 100755 (executable)
index 0000000..723b77f
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc(#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/138.xml b/basis/xml/tests/xmltest/not-wf/sa/138.xml
new file mode 100755 (executable)
index 0000000..16934cc
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (doc*?)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/139.xml b/basis/xml/tests/xmltest/not-wf/sa/139.xml
new file mode 100755 (executable)
index 0000000..34df52e
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc ()>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/140.xml b/basis/xml/tests/xmltest/not-wf/sa/140.xml
new file mode 100755 (executable)
index 0000000..467d5ed
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "<&#x309a;></&#x309a;>">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/141.xml b/basis/xml/tests/xmltest/not-wf/sa/141.xml
new file mode 100755 (executable)
index 0000000..409d0a7
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "<X&#xe5c;></X&#xe5c;>">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/142.xml b/basis/xml/tests/xmltest/not-wf/sa/142.xml
new file mode 100755 (executable)
index 0000000..20e88f8
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&#0;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/143.xml b/basis/xml/tests/xmltest/not-wf/sa/143.xml
new file mode 100755 (executable)
index 0000000..0ee1c61
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&#31;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/144.xml b/basis/xml/tests/xmltest/not-wf/sa/144.xml
new file mode 100755 (executable)
index 0000000..437548c
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&#xFFFF;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/145.xml b/basis/xml/tests/xmltest/not-wf/sa/145.xml
new file mode 100755 (executable)
index 0000000..71b187a
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&#xD800;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/146.xml b/basis/xml/tests/xmltest/not-wf/sa/146.xml
new file mode 100755 (executable)
index 0000000..d0bfbca
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&#x110000;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/147.xml b/basis/xml/tests/xmltest/not-wf/sa/147.xml
new file mode 100755 (executable)
index 0000000..3b61456
--- /dev/null
@@ -0,0 +1,3 @@
+\r
+<?xml version="1.0"?>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/148.xml b/basis/xml/tests/xmltest/not-wf/sa/148.xml
new file mode 100755 (executable)
index 0000000..774dce1
--- /dev/null
@@ -0,0 +1,3 @@
+<!-- -->\r
+<?xml version="1.0"?>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/149.xml b/basis/xml/tests/xmltest/not-wf/sa/149.xml
new file mode 100755 (executable)
index 0000000..725eea0
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<?xml version="1.0"?>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/150.xml b/basis/xml/tests/xmltest/not-wf/sa/150.xml
new file mode 100755 (executable)
index 0000000..44f6b6d
--- /dev/null
@@ -0,0 +1,3 @@
+<doc>\r
+<?xml version="1.0"?>\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/151.xml b/basis/xml/tests/xmltest/not-wf/sa/151.xml
new file mode 100755 (executable)
index 0000000..fecc4f2
--- /dev/null
@@ -0,0 +1,3 @@
+<doc>\r
+</doc>\r
+<?xml version="1.0"?>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/152.xml b/basis/xml/tests/xmltest/not-wf/sa/152.xml
new file mode 100755 (executable)
index 0000000..b5c5cb2
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml encoding="UTF-8"?>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/153.xml b/basis/xml/tests/xmltest/not-wf/sa/153.xml
new file mode 100755 (executable)
index 0000000..5e29737
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e "<?xml encoding='UTF-8'?>">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/154.xml b/basis/xml/tests/xmltest/not-wf/sa/154.xml
new file mode 100755 (executable)
index 0000000..96e01d6
--- /dev/null
@@ -0,0 +1,2 @@
+<?XML version="1.0"?>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/155.xml b/basis/xml/tests/xmltest/not-wf/sa/155.xml
new file mode 100755 (executable)
index 0000000..4f16d0f
--- /dev/null
@@ -0,0 +1,2 @@
+<?xmL version="1.0"?>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/156.xml b/basis/xml/tests/xmltest/not-wf/sa/156.xml
new file mode 100755 (executable)
index 0000000..c6d93fd
--- /dev/null
@@ -0,0 +1,3 @@
+<doc>\r
+<?xMl version="1.0"?>\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/157.xml b/basis/xml/tests/xmltest/not-wf/sa/157.xml
new file mode 100755 (executable)
index 0000000..2f058da
--- /dev/null
@@ -0,0 +1,3 @@
+<doc>\r
+<?xmL?>\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/158.xml b/basis/xml/tests/xmltest/not-wf/sa/158.xml
new file mode 100755 (executable)
index 0000000..32b90b7
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!NOTATION gif PUBLIC "image/gif" "">\r
+<!ATTLIST #NOTATION gif a1 CDATA #IMPLIED>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/159.xml b/basis/xml/tests/xmltest/not-wf/sa/159.xml
new file mode 100755 (executable)
index 0000000..066244c
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e "<![CDATA[Tim & Michael]]>">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/160.xml b/basis/xml/tests/xmltest/not-wf/sa/160.xml
new file mode 100755 (executable)
index 0000000..85424ac
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY % e "">\r
+<!ENTITY foo "%e;">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/161.xml b/basis/xml/tests/xmltest/not-wf/sa/161.xml
new file mode 100755 (executable)
index 0000000..4f8a5b7
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ENTITY % e "#PCDATA">\r
+<!ELEMENT doc (%e;)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/162.xml b/basis/xml/tests/xmltest/not-wf/sa/162.xml
new file mode 100755 (executable)
index 0000000..efae4b1
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY % e1 "">\r
+<!ENTITY % e2 "%e1;">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/163.xml b/basis/xml/tests/xmltest/not-wf/sa/163.xml
new file mode 100755 (executable)
index 0000000..e14fb76
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY % e "">\r
+]>\r
+%e;\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/164.xml b/basis/xml/tests/xmltest/not-wf/sa/164.xml
new file mode 100755 (executable)
index 0000000..98dd267
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY % e "">\r
+] %e; >\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/165.xml b/basis/xml/tests/xmltest/not-wf/sa/165.xml
new file mode 100755 (executable)
index 0000000..36c0461
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ENTITY% e "">\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/166.xml b/basis/xml/tests/xmltest/not-wf/sa/166.xml
new file mode 100755 (executable)
index 0000000..ee2ce28
--- /dev/null
@@ -0,0 +1 @@
+<doc>ï¿¿</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/167.xml b/basis/xml/tests/xmltest/not-wf/sa/167.xml
new file mode 100755 (executable)
index 0000000..9bdc6c1
--- /dev/null
@@ -0,0 +1 @@
+<doc>￾</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/168.xml b/basis/xml/tests/xmltest/not-wf/sa/168.xml
new file mode 100755 (executable)
index 0000000..f83221a
--- /dev/null
@@ -0,0 +1 @@
+<doc>í €</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/169.xml b/basis/xml/tests/xmltest/not-wf/sa/169.xml
new file mode 100755 (executable)
index 0000000..310029b
--- /dev/null
@@ -0,0 +1 @@
+<doc>í°€</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/170.xml b/basis/xml/tests/xmltest/not-wf/sa/170.xml
new file mode 100755 (executable)
index 0000000..cfa0aee
--- /dev/null
@@ -0,0 +1 @@
+<doc>÷€€€</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/171.xml b/basis/xml/tests/xmltest/not-wf/sa/171.xml
new file mode 100755 (executable)
index 0000000..48b5c7d
--- /dev/null
@@ -0,0 +1,2 @@
+<!-- ï¿¿ -->\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/172.xml b/basis/xml/tests/xmltest/not-wf/sa/172.xml
new file mode 100755 (executable)
index 0000000..6651d4d
--- /dev/null
@@ -0,0 +1,2 @@
+<?pi ï¿¿?>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/173.xml b/basis/xml/tests/xmltest/not-wf/sa/173.xml
new file mode 100755 (executable)
index 0000000..f9f9f42
--- /dev/null
@@ -0,0 +1 @@
+<doc a="ï¿¿"></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/174.xml b/basis/xml/tests/xmltest/not-wf/sa/174.xml
new file mode 100755 (executable)
index 0000000..42bef86
--- /dev/null
@@ -0,0 +1 @@
+<doc><![CDATA[ï¿¿]]></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/175.xml b/basis/xml/tests/xmltest/not-wf/sa/175.xml
new file mode 100755 (executable)
index 0000000..69912f3
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY % e "ï¿¿">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/176.xml b/basis/xml/tests/xmltest/not-wf/sa/176.xml
new file mode 100755 (executable)
index 0000000..9c8e2e4
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>
diff --git a/basis/xml/tests/xmltest/not-wf/sa/177.xml b/basis/xml/tests/xmltest/not-wf/sa/177.xml
new file mode 100755 (executable)
index 0000000..6bc8228
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>Aï¿¿</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/178.xml b/basis/xml/tests/xmltest/not-wf/sa/178.xml
new file mode 100755 (executable)
index 0000000..e8f2d18
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA #IMPLIED>\r
+]>\r
+<doc a="&#34;></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/179.xml b/basis/xml/tests/xmltest/not-wf/sa/179.xml
new file mode 100755 (executable)
index 0000000..e8f1f41
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "&#34;>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/180.xml b/basis/xml/tests/xmltest/not-wf/sa/180.xml
new file mode 100755 (executable)
index 0000000..569d553
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA "&e;">\r
+<!ENTITY e "v">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/181.xml b/basis/xml/tests/xmltest/not-wf/sa/181.xml
new file mode 100755 (executable)
index 0000000..4341d99
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "&#60;![CDATA[">\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&e;]]></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/182.xml b/basis/xml/tests/xmltest/not-wf/sa/182.xml
new file mode 100755 (executable)
index 0000000..920f431
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "&#60;!--">\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&e;--></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/183.xml b/basis/xml/tests/xmltest/not-wf/sa/183.xml
new file mode 100755 (executable)
index 0000000..7a5677d
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA | foo*)* >\r
+<!ELEMENT foo EMPTY>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/184.xml b/basis/xml/tests/xmltest/not-wf/sa/184.xml
new file mode 100755 (executable)
index 0000000..103384a
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA | (foo))* >\r
+<!ELEMENT foo EMPTY>\r
+]>\r
+<doc></doc>\r
+\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/185.ent b/basis/xml/tests/xmltest/not-wf/sa/185.ent
new file mode 100755 (executable)
index 0000000..e557426
--- /dev/null
@@ -0,0 +1 @@
+<!ELEMENT doc (#PCDATA)>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/185.xml b/basis/xml/tests/xmltest/not-wf/sa/185.xml
new file mode 100755 (executable)
index 0000000..81d5ef4
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0" standalone="yes"?>\r
+<!DOCTYPE doc SYSTEM "185.ent">\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/186.xml b/basis/xml/tests/xmltest/not-wf/sa/186.xml
new file mode 100755 (executable)
index 0000000..85b26ec
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE a [\r
+<!ELEMENT a EMPTY>\r
+<!ATTLIST a b CDATA #IMPLIED d CDATA #IMPLIED>\r
+]>\r
+<a b="c"d="e"/>\r
diff --git a/basis/xml/tests/xmltest/not-wf/sa/null.ent b/basis/xml/tests/xmltest/not-wf/sa/null.ent
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/basis/xml/tests/xmltest/readme.html b/basis/xml/tests/xmltest/readme.html
new file mode 100755 (executable)
index 0000000..fc7310c
--- /dev/null
@@ -0,0 +1,60 @@
+<HTML>\r
+<TITLE>XML Test Cases</TITLE>\r
+<BODY>\r
+<H1>XML Test Cases version 1998-11-18</H1>\r
+<P>\r
+Copyright (C) 1998 James Clark.  All rights reserved.  Permission is\r
+granted to copy and modify this collection in any way for internal use\r
+within a company or organization.  Permission is granted to\r
+redistribute the file <code>xmltest.zip</code> containing this\r
+collection to third parties provided that no modifications of any kind\r
+are made to this file.  Note that permission to distribute the\r
+collection in any other form is not granted.\r
+<P>\r
+The collection is structured into three directories:\r
+<DL>\r
+<DT><CODE>not-wf</CODE>\r
+<DD>this contains cases that are not well-formed XML documents\r
+<DT><CODE>valid</CODE>\r
+<DD>this contains cases that are valid XML documents\r
+<DT><CODE>invalid</CODE>\r
+<DD>this contains cases that are well-formed XML documents\r
+but are not valid XML documents\r
+</DL>\r
+<P>\r
+The <CODE>not-wf</CODE> and <CODE>valid</CODE> directories each have\r
+three subdirectories:\r
+<DL>\r
+<DT>\r
+<CODE>sa</CODE>\r
+<DD>\r
+this contains cases that are standalone (as defined in XML) and do not\r
+have references to external general entities\r
+<DT>\r
+<CODE>ext-sa</CODE>\r
+<DD>\r
+this contains case that are standalone and have references to external\r
+general entities\r
+<DT>\r
+<CODE>not-sa</CODE>\r
+<DD>\r
+this contains cases that are not standalone\r
+</DL>\r
+<P>\r
+In each directory, files with a <CODE>.xml</CODE> extension are the\r
+XML document test cases, and files with a <CODE>.ent</CODE> extension\r
+are external entities referenced by the test cases.\r
+<P>\r
+Within the <CODE>valid</CODE> directory, each of these three\r
+subdirectories has an <CODE>out</CODE> subdirectory which contains an\r
+equivalent <A HREF="canonxml.html">canonical XML</A> document for each\r
+of the cases.\r
+<P>\r
+<P>\r
+Bug reports and contributions of new test cases are welcome.\r
+<P>\r
+<ADDRESS>\r
+<A HREF="mailto:jjc@jclark.com">James Clark</A>\r
+</ADDRESS>\r
+</BODY>\r
+</HTML>\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/001.ent b/basis/xml/tests/xmltest/valid/ext-sa/001.ent
new file mode 100755 (executable)
index 0000000..1cff3fd
--- /dev/null
@@ -0,0 +1 @@
+Data\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/001.xml b/basis/xml/tests/xmltest/valid/ext-sa/001.xml
new file mode 100755 (executable)
index 0000000..147d70d
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e SYSTEM "001.ent">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/002.ent b/basis/xml/tests/xmltest/valid/ext-sa/002.ent
new file mode 100755 (executable)
index 0000000..45f6d8e
--- /dev/null
@@ -0,0 +1 @@
+Data
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/002.xml b/basis/xml/tests/xmltest/valid/ext-sa/002.xml
new file mode 100755 (executable)
index 0000000..9eaf917
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e SYSTEM "002.ent">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/003.ent b/basis/xml/tests/xmltest/valid/ext-sa/003.ent
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/003.xml b/basis/xml/tests/xmltest/valid/ext-sa/003.xml
new file mode 100755 (executable)
index 0000000..bb60b66
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e SYSTEM "003.ent">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/004.ent b/basis/xml/tests/xmltest/valid/ext-sa/004.ent
new file mode 100755 (executable)
index 0000000..3436f20
--- /dev/null
@@ -0,0 +1 @@
+Data\r
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/004.xml b/basis/xml/tests/xmltest/valid/ext-sa/004.xml
new file mode 100755 (executable)
index 0000000..074498c
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e SYSTEM "004.ent">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/005.ent b/basis/xml/tests/xmltest/valid/ext-sa/005.ent
new file mode 100755 (executable)
index 0000000..c6e97f8
--- /dev/null
@@ -0,0 +1 @@
+<e/><e/><e/>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/005.xml b/basis/xml/tests/xmltest/valid/ext-sa/005.xml
new file mode 100755 (executable)
index 0000000..82a6228
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (e*)>\r
+<!ELEMENT e EMPTY>\r
+<!ENTITY e SYSTEM "005.ent">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/006.ent b/basis/xml/tests/xmltest/valid/ext-sa/006.ent
new file mode 100755 (executable)
index 0000000..4df2f0c
--- /dev/null
@@ -0,0 +1,4 @@
+Data\r
+<e/>\r
+More data\r
+<e/>\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/006.xml b/basis/xml/tests/xmltest/valid/ext-sa/006.xml
new file mode 100755 (executable)
index 0000000..0b326ca
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA|e)*>\r
+<!ELEMENT e EMPTY>\r
+<!ENTITY e SYSTEM "006.ent">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/007.ent b/basis/xml/tests/xmltest/valid/ext-sa/007.ent
new file mode 100755 (executable)
index 0000000..ab1d696
Binary files /dev/null and b/basis/xml/tests/xmltest/valid/ext-sa/007.ent differ
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/007.xml b/basis/xml/tests/xmltest/valid/ext-sa/007.xml
new file mode 100755 (executable)
index 0000000..825e3b2
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e SYSTEM "007.ent">\r
+]>\r
+<doc>X&e;Z</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/008.ent b/basis/xml/tests/xmltest/valid/ext-sa/008.ent
new file mode 100755 (executable)
index 0000000..c6ca61f
Binary files /dev/null and b/basis/xml/tests/xmltest/valid/ext-sa/008.ent differ
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/008.xml b/basis/xml/tests/xmltest/valid/ext-sa/008.xml
new file mode 100755 (executable)
index 0000000..3c001b6
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e SYSTEM "008.ent">\r
+]>\r
+<doc>X&e;Z</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/009.ent b/basis/xml/tests/xmltest/valid/ext-sa/009.ent
new file mode 100755 (executable)
index 0000000..67c3297
--- /dev/null
@@ -0,0 +1 @@
+\r
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/009.xml b/basis/xml/tests/xmltest/valid/ext-sa/009.xml
new file mode 100755 (executable)
index 0000000..a5866e5
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e SYSTEM "009.ent">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/010.ent b/basis/xml/tests/xmltest/valid/ext-sa/010.ent
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/010.xml b/basis/xml/tests/xmltest/valid/ext-sa/010.xml
new file mode 100755 (executable)
index 0000000..418e9b0
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e SYSTEM "010.ent">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/011.ent b/basis/xml/tests/xmltest/valid/ext-sa/011.ent
new file mode 100755 (executable)
index 0000000..b19be3a
--- /dev/null
@@ -0,0 +1 @@
+xyzzy\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/011.xml b/basis/xml/tests/xmltest/valid/ext-sa/011.xml
new file mode 100755 (executable)
index 0000000..2ceefa1
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e PUBLIC "a not very interesting file" "011.ent">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/012.ent b/basis/xml/tests/xmltest/valid/ext-sa/012.ent
new file mode 100755 (executable)
index 0000000..8eb1fb9
--- /dev/null
@@ -0,0 +1 @@
+&e4;
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/012.xml b/basis/xml/tests/xmltest/valid/ext-sa/012.xml
new file mode 100755 (executable)
index 0000000..5a8f009
--- /dev/null
@@ -0,0 +1,9 @@
+<!DOCTYPE doc [\r
+<!ENTITY e1 "&e2;">\r
+<!ENTITY e2 "&e3;">\r
+<!ENTITY e3 SYSTEM "012.ent">\r
+<!ENTITY e4 "&e5;">\r
+<!ENTITY e5 "(e5)">\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&e1;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/013.ent b/basis/xml/tests/xmltest/valid/ext-sa/013.ent
new file mode 100755 (executable)
index 0000000..7f25c50
--- /dev/null
@@ -0,0 +1 @@
+<e/>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/013.xml b/basis/xml/tests/xmltest/valid/ext-sa/013.xml
new file mode 100755 (executable)
index 0000000..7717c97
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (e)>\r
+<!ELEMENT e (#PCDATA)>\r
+<!ATTLIST e\r
+  a1 CDATA "a1 default"\r
+  a2 NMTOKENS "a2 default"\r
+>\r
+<!ENTITY x SYSTEM "013.ent">\r
+]>\r
+<doc>&x;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/014.ent b/basis/xml/tests/xmltest/valid/ext-sa/014.ent
new file mode 100755 (executable)
index 0000000..470fd6f
Binary files /dev/null and b/basis/xml/tests/xmltest/valid/ext-sa/014.ent differ
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/014.xml b/basis/xml/tests/xmltest/valid/ext-sa/014.xml
new file mode 100755 (executable)
index 0000000..816fd1e
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e SYSTEM "014.ent">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/out/001.xml b/basis/xml/tests/xmltest/valid/ext-sa/out/001.xml
new file mode 100755 (executable)
index 0000000..0a7acf8
--- /dev/null
@@ -0,0 +1 @@
+<doc>Data&#10;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/out/002.xml b/basis/xml/tests/xmltest/valid/ext-sa/out/002.xml
new file mode 100755 (executable)
index 0000000..d4a445e
--- /dev/null
@@ -0,0 +1 @@
+<doc>Data</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/out/003.xml b/basis/xml/tests/xmltest/valid/ext-sa/out/003.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/out/004.xml b/basis/xml/tests/xmltest/valid/ext-sa/out/004.xml
new file mode 100755 (executable)
index 0000000..0a7acf8
--- /dev/null
@@ -0,0 +1 @@
+<doc>Data&#10;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/out/005.xml b/basis/xml/tests/xmltest/valid/ext-sa/out/005.xml
new file mode 100755 (executable)
index 0000000..6e293aa
--- /dev/null
@@ -0,0 +1 @@
+<doc><e></e><e></e><e></e></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/out/006.xml b/basis/xml/tests/xmltest/valid/ext-sa/out/006.xml
new file mode 100755 (executable)
index 0000000..04b6fc8
--- /dev/null
@@ -0,0 +1 @@
+<doc>Data&#10;<e></e>&#10;More data&#10;<e></e>&#10;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/out/007.xml b/basis/xml/tests/xmltest/valid/ext-sa/out/007.xml
new file mode 100755 (executable)
index 0000000..ab2a74c
--- /dev/null
@@ -0,0 +1 @@
+<doc>XYZ</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/out/008.xml b/basis/xml/tests/xmltest/valid/ext-sa/out/008.xml
new file mode 100755 (executable)
index 0000000..ab2a74c
--- /dev/null
@@ -0,0 +1 @@
+<doc>XYZ</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/out/009.xml b/basis/xml/tests/xmltest/valid/ext-sa/out/009.xml
new file mode 100755 (executable)
index 0000000..a79dff6
--- /dev/null
@@ -0,0 +1 @@
+<doc>&#10;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/out/010.xml b/basis/xml/tests/xmltest/valid/ext-sa/out/010.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/out/011.xml b/basis/xml/tests/xmltest/valid/ext-sa/out/011.xml
new file mode 100755 (executable)
index 0000000..bf275ad
--- /dev/null
@@ -0,0 +1 @@
+<doc>xyzzy&#10;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/out/012.xml b/basis/xml/tests/xmltest/valid/ext-sa/out/012.xml
new file mode 100755 (executable)
index 0000000..81a251c
--- /dev/null
@@ -0,0 +1 @@
+<doc>(e5)</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/out/013.xml b/basis/xml/tests/xmltest/valid/ext-sa/out/013.xml
new file mode 100755 (executable)
index 0000000..524d94e
--- /dev/null
@@ -0,0 +1 @@
+<doc><e a1="a1 default" a2="a2 default"></e></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/ext-sa/out/014.xml b/basis/xml/tests/xmltest/valid/ext-sa/out/014.xml
new file mode 100755 (executable)
index 0000000..71c6dc3
--- /dev/null
@@ -0,0 +1 @@
+<doc>data</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/001.ent b/basis/xml/tests/xmltest/valid/not-sa/001.ent
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/basis/xml/tests/xmltest/valid/not-sa/001.xml b/basis/xml/tests/xmltest/valid/not-sa/001.xml
new file mode 100755 (executable)
index 0000000..2d6f41a
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc SYSTEM "001.ent" [\r
+<!ELEMENT doc EMPTY>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/002.ent b/basis/xml/tests/xmltest/valid/not-sa/002.ent
new file mode 100755 (executable)
index 0000000..67c3297
--- /dev/null
@@ -0,0 +1 @@
+\r
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/002.xml b/basis/xml/tests/xmltest/valid/not-sa/002.xml
new file mode 100755 (executable)
index 0000000..023fce8
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc SYSTEM "002.ent" [\r
+<!ELEMENT doc EMPTY>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/003-1.ent b/basis/xml/tests/xmltest/valid/not-sa/003-1.ent
new file mode 100755 (executable)
index 0000000..931f3ad
--- /dev/null
@@ -0,0 +1,3 @@
+<!ELEMENT doc EMPTY>\r
+<!ENTITY % e SYSTEM "003-2.ent">\r
+<!ATTLIST doc a1 CDATA %e; "v1">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/003-2.ent b/basis/xml/tests/xmltest/valid/not-sa/003-2.ent
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/basis/xml/tests/xmltest/valid/not-sa/003.xml b/basis/xml/tests/xmltest/valid/not-sa/003.xml
new file mode 100755 (executable)
index 0000000..63a5e8b
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "003-1.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/004-1.ent b/basis/xml/tests/xmltest/valid/not-sa/004-1.ent
new file mode 100755 (executable)
index 0000000..40f7ff5
--- /dev/null
@@ -0,0 +1,4 @@
+<!ELEMENT doc EMPTY>\r
+<!ENTITY % e1 SYSTEM "004-2.ent">\r
+<!ENTITY % e2 "%e1;">\r
+%e1;\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/004-2.ent b/basis/xml/tests/xmltest/valid/not-sa/004-2.ent
new file mode 100755 (executable)
index 0000000..61def75
--- /dev/null
@@ -0,0 +1 @@
+<!ATTLIST doc a1 CDATA "value">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/004.xml b/basis/xml/tests/xmltest/valid/not-sa/004.xml
new file mode 100755 (executable)
index 0000000..adc9201
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "004-1.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/005-1.ent b/basis/xml/tests/xmltest/valid/not-sa/005-1.ent
new file mode 100755 (executable)
index 0000000..ade9599
--- /dev/null
@@ -0,0 +1,3 @@
+<!ELEMENT doc EMPTY>\r
+<!ENTITY % e SYSTEM "005-2.ent">\r
+%e;\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/005-2.ent b/basis/xml/tests/xmltest/valid/not-sa/005-2.ent
new file mode 100755 (executable)
index 0000000..bef50b1
--- /dev/null
@@ -0,0 +1 @@
+<!ATTLIST doc a1 CDATA "v1">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/005.xml b/basis/xml/tests/xmltest/valid/not-sa/005.xml
new file mode 100755 (executable)
index 0000000..6bd44cf
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "005-1.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/006.ent b/basis/xml/tests/xmltest/valid/not-sa/006.ent
new file mode 100755 (executable)
index 0000000..8f305a8
--- /dev/null
@@ -0,0 +1,2 @@
+<!ELEMENT doc EMPTY>\r
+<!ATTLIST doc a1 CDATA "w1" a2 CDATA "w2">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/006.xml b/basis/xml/tests/xmltest/valid/not-sa/006.xml
new file mode 100755 (executable)
index 0000000..eb80bb7
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc SYSTEM "006.ent" [\r
+<!ATTLIST doc a1 CDATA "v1">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/007.ent b/basis/xml/tests/xmltest/valid/not-sa/007.ent
new file mode 100755 (executable)
index 0000000..fbf4ca4
--- /dev/null
@@ -0,0 +1,2 @@
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA "v1">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/007.xml b/basis/xml/tests/xmltest/valid/not-sa/007.xml
new file mode 100755 (executable)
index 0000000..38897e3
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "007.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/008.ent b/basis/xml/tests/xmltest/valid/not-sa/008.ent
new file mode 100755 (executable)
index 0000000..fbf4ca4
--- /dev/null
@@ -0,0 +1,2 @@
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA "v1">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/008.xml b/basis/xml/tests/xmltest/valid/not-sa/008.xml
new file mode 100755 (executable)
index 0000000..bf777a7
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc PUBLIC "whatever" "008.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/009.ent b/basis/xml/tests/xmltest/valid/not-sa/009.ent
new file mode 100755 (executable)
index 0000000..fbf4ca4
--- /dev/null
@@ -0,0 +1,2 @@
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA "v1">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/009.xml b/basis/xml/tests/xmltest/valid/not-sa/009.xml
new file mode 100755 (executable)
index 0000000..c17562f
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc PUBLIC "whatever" "009.ent" [\r
+<!ATTLIST doc a2 CDATA "v2">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/010.ent b/basis/xml/tests/xmltest/valid/not-sa/010.ent
new file mode 100755 (executable)
index 0000000..52a28f5
--- /dev/null
@@ -0,0 +1,2 @@
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA "v2">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/010.xml b/basis/xml/tests/xmltest/valid/not-sa/010.xml
new file mode 100755 (executable)
index 0000000..2786b32
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc SYSTEM "010.ent" [\r
+<!ATTLIST doc a1 CDATA "v1">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/011.ent b/basis/xml/tests/xmltest/valid/not-sa/011.ent
new file mode 100755 (executable)
index 0000000..fbf4ca4
--- /dev/null
@@ -0,0 +1,2 @@
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA "v1">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/011.xml b/basis/xml/tests/xmltest/valid/not-sa/011.xml
new file mode 100755 (executable)
index 0000000..03b482b
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ENTITY % e SYSTEM "011.ent">\r
+%e;\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/012.ent b/basis/xml/tests/xmltest/valid/not-sa/012.ent
new file mode 100755 (executable)
index 0000000..7e372e6
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA "v1">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/012.xml b/basis/xml/tests/xmltest/valid/not-sa/012.xml
new file mode 100755 (executable)
index 0000000..1967edb
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ENTITY % e SYSTEM "012.ent">\r
+%e;\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/013.ent b/basis/xml/tests/xmltest/valid/not-sa/013.ent
new file mode 100755 (executable)
index 0000000..a3691d9
--- /dev/null
@@ -0,0 +1,4 @@
+<!ELEMENT doc (#PCDATA)>\r
+<![ INCLUDE [\r
+<!ATTLIST doc a1 CDATA "v1">\r
+]]>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/013.xml b/basis/xml/tests/xmltest/valid/not-sa/013.xml
new file mode 100755 (executable)
index 0000000..cf44f26
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "013.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/014.ent b/basis/xml/tests/xmltest/valid/not-sa/014.ent
new file mode 100755 (executable)
index 0000000..6eaf779
--- /dev/null
@@ -0,0 +1,4 @@
+<!ELEMENT doc (#PCDATA)>\r
+<![ %e; [\r
+<!ATTLIST doc a1 CDATA "v1">\r
+]]>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/014.xml b/basis/xml/tests/xmltest/valid/not-sa/014.xml
new file mode 100755 (executable)
index 0000000..bd08502
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc SYSTEM "014.ent" [\r
+<!ENTITY % e "INCLUDE">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/015.ent b/basis/xml/tests/xmltest/valid/not-sa/015.ent
new file mode 100755 (executable)
index 0000000..00d2f30
--- /dev/null
@@ -0,0 +1,5 @@
+<!ELEMENT doc (#PCDATA)>\r
+<![ %e; [\r
+<!ATTLIST doc a1 CDATA "v1">\r
+]]>\r
+<!ATTLIST doc a2 CDATA "v2">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/015.xml b/basis/xml/tests/xmltest/valid/not-sa/015.xml
new file mode 100755 (executable)
index 0000000..e04e75f
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc SYSTEM "015.ent" [\r
+<!ENTITY % e "IGNORE">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/016.ent b/basis/xml/tests/xmltest/valid/not-sa/016.ent
new file mode 100755 (executable)
index 0000000..bf77ef8
--- /dev/null
@@ -0,0 +1,4 @@
+<!ELEMENT doc (#PCDATA)>\r
+<![%e;[\r
+<!ATTLIST doc a1 CDATA "v1">\r
+]]>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/016.xml b/basis/xml/tests/xmltest/valid/not-sa/016.xml
new file mode 100755 (executable)
index 0000000..4ccf4af
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc SYSTEM "016.ent" [\r
+<!ENTITY % e "INCLUDE">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/017.ent b/basis/xml/tests/xmltest/valid/not-sa/017.ent
new file mode 100755 (executable)
index 0000000..ffd9add
--- /dev/null
@@ -0,0 +1,3 @@
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY % e "<!ATTLIST doc a1 CDATA 'v1'>">\r
+%e;\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/017.xml b/basis/xml/tests/xmltest/valid/not-sa/017.xml
new file mode 100755 (executable)
index 0000000..7fe18f4
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "017.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/018.ent b/basis/xml/tests/xmltest/valid/not-sa/018.ent
new file mode 100755 (executable)
index 0000000..2d46f76
--- /dev/null
@@ -0,0 +1,3 @@
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY % e "'v1'">\r
+<!ATTLIST doc a1 CDATA %e;>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/018.xml b/basis/xml/tests/xmltest/valid/not-sa/018.xml
new file mode 100755 (executable)
index 0000000..31e90f2
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "018.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/019.ent b/basis/xml/tests/xmltest/valid/not-sa/019.ent
new file mode 100755 (executable)
index 0000000..d18201a
--- /dev/null
@@ -0,0 +1,3 @@
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY % e "'v1'">\r
+<!ATTLIST doc a1 CDATA%e;>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/019.xml b/basis/xml/tests/xmltest/valid/not-sa/019.xml
new file mode 100755 (executable)
index 0000000..b7a18fa
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "019.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/020.ent b/basis/xml/tests/xmltest/valid/not-sa/020.ent
new file mode 100755 (executable)
index 0000000..815291c
--- /dev/null
@@ -0,0 +1,3 @@
+<!ENTITY % e "doc">\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST%e;a1 CDATA "v1">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/020.xml b/basis/xml/tests/xmltest/valid/not-sa/020.xml
new file mode 100755 (executable)
index 0000000..d70892f
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "020.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/021.ent b/basis/xml/tests/xmltest/valid/not-sa/021.ent
new file mode 100755 (executable)
index 0000000..9f8f2af
--- /dev/null
@@ -0,0 +1,3 @@
+<!ENTITY % e "doc a1 CDATA">\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST %e; "v1">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/021.xml b/basis/xml/tests/xmltest/valid/not-sa/021.xml
new file mode 100755 (executable)
index 0000000..70c2873
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "021.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/023.ent b/basis/xml/tests/xmltest/valid/not-sa/023.ent
new file mode 100755 (executable)
index 0000000..e326881
--- /dev/null
@@ -0,0 +1,5 @@
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY % e1 "do">\r
+<!ENTITY % e2 "c">\r
+<!ENTITY % e3 "%e1;%e2;">\r
+<!ATTLIST %e3; a1 CDATA "v1">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/023.xml b/basis/xml/tests/xmltest/valid/not-sa/023.xml
new file mode 100755 (executable)
index 0000000..1c2484b
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "023.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/024.ent b/basis/xml/tests/xmltest/valid/not-sa/024.ent
new file mode 100755 (executable)
index 0000000..aa6d0ec
--- /dev/null
@@ -0,0 +1,4 @@
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY % e1 "'v1'">\r
+<!ENTITY % e2 'a1 CDATA %e1;'>\r
+<!ATTLIST doc %e2;>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/024.xml b/basis/xml/tests/xmltest/valid/not-sa/024.xml
new file mode 100755 (executable)
index 0000000..96e1ecb
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "024.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/025.ent b/basis/xml/tests/xmltest/valid/not-sa/025.ent
new file mode 100755 (executable)
index 0000000..389d259
--- /dev/null
@@ -0,0 +1,5 @@
+<!ELEMENT doc EMPTY>\r
+<!ENTITY % e "x">\r
+<!ENTITY % e "y">\r
+<!ENTITY % v "'%e;'">\r
+<!ATTLIST doc a1 CDATA %v;>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/025.xml b/basis/xml/tests/xmltest/valid/not-sa/025.xml
new file mode 100755 (executable)
index 0000000..8fdbc14
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "025.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/026.ent b/basis/xml/tests/xmltest/valid/not-sa/026.ent
new file mode 100755 (executable)
index 0000000..bdc93af
--- /dev/null
@@ -0,0 +1 @@
+<!ATTLIST doc a1 CDATA "w1">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/026.xml b/basis/xml/tests/xmltest/valid/not-sa/026.xml
new file mode 100755 (executable)
index 0000000..7b109c0
--- /dev/null
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc ANY>\r
+<!ENTITY % e SYSTEM "026.ent">\r
+%e;\r
+<!ATTLIST doc a1 CDATA "x1" a2 CDATA "x2">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/027.ent b/basis/xml/tests/xmltest/valid/not-sa/027.ent
new file mode 100755 (executable)
index 0000000..712cce3
--- /dev/null
@@ -0,0 +1,2 @@
+<!ENTITY % e "">\r
+<!ELEMENT doc (#PCDATA %e;)>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/027.xml b/basis/xml/tests/xmltest/valid/not-sa/027.xml
new file mode 100755 (executable)
index 0000000..d0c8c7a
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "027.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/028.ent b/basis/xml/tests/xmltest/valid/not-sa/028.ent
new file mode 100755 (executable)
index 0000000..ac249d7
--- /dev/null
@@ -0,0 +1,2 @@
+<!ELEMENT doc (#PCDATA)>\r
+<![INCLUDE[<!ATTLIST doc a1 CDATA "v1">]]>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/028.xml b/basis/xml/tests/xmltest/valid/not-sa/028.xml
new file mode 100755 (executable)
index 0000000..50e5248
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "028.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/029.ent b/basis/xml/tests/xmltest/valid/not-sa/029.ent
new file mode 100755 (executable)
index 0000000..df94df5
--- /dev/null
@@ -0,0 +1,3 @@
+<!ELEMENT doc (#PCDATA)>\r
+<![IGNORE[<!ATTLIST doc a1 CDATA "v1">]]>\r
+<!ATTLIST doc a1 CDATA "v2">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/029.xml b/basis/xml/tests/xmltest/valid/not-sa/029.xml
new file mode 100755 (executable)
index 0000000..07e226c
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "029.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/030.ent b/basis/xml/tests/xmltest/valid/not-sa/030.ent
new file mode 100755 (executable)
index 0000000..e386446
--- /dev/null
@@ -0,0 +1,3 @@
+<!ELEMENT doc (#PCDATA)>\r
+<![IGNORE[]]>\r
+<![INCLUDE[]]>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/030.xml b/basis/xml/tests/xmltest/valid/not-sa/030.xml
new file mode 100755 (executable)
index 0000000..01fc2be
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "030.ent">\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/031-1.ent b/basis/xml/tests/xmltest/valid/not-sa/031-1.ent
new file mode 100755 (executable)
index 0000000..f7f94ab
--- /dev/null
@@ -0,0 +1,3 @@
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY % e SYSTEM "031-2.ent">\r
+<!ENTITY e "<![CDATA[%e;]]>">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/031-2.ent b/basis/xml/tests/xmltest/valid/not-sa/031-2.ent
new file mode 100755 (executable)
index 0000000..bef50b1
--- /dev/null
@@ -0,0 +1 @@
+<!ATTLIST doc a1 CDATA "v1">\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/031.xml b/basis/xml/tests/xmltest/valid/not-sa/031.xml
new file mode 100755 (executable)
index 0000000..c3fe5fc
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE doc SYSTEM "031-1.ent">\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/001.xml b/basis/xml/tests/xmltest/valid/not-sa/out/001.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/002.xml b/basis/xml/tests/xmltest/valid/not-sa/out/002.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/003.xml b/basis/xml/tests/xmltest/valid/not-sa/out/003.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/004.xml b/basis/xml/tests/xmltest/valid/not-sa/out/004.xml
new file mode 100755 (executable)
index 0000000..bdc39e2
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="value"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/005.xml b/basis/xml/tests/xmltest/valid/not-sa/out/005.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/006.xml b/basis/xml/tests/xmltest/valid/not-sa/out/006.xml
new file mode 100755 (executable)
index 0000000..d07627d
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1" a2="w2"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/007.xml b/basis/xml/tests/xmltest/valid/not-sa/out/007.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/008.xml b/basis/xml/tests/xmltest/valid/not-sa/out/008.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/009.xml b/basis/xml/tests/xmltest/valid/not-sa/out/009.xml
new file mode 100755 (executable)
index 0000000..7293fb6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1" a2="v2"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/010.xml b/basis/xml/tests/xmltest/valid/not-sa/out/010.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/011.xml b/basis/xml/tests/xmltest/valid/not-sa/out/011.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/012.xml b/basis/xml/tests/xmltest/valid/not-sa/out/012.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/013.xml b/basis/xml/tests/xmltest/valid/not-sa/out/013.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/014.xml b/basis/xml/tests/xmltest/valid/not-sa/out/014.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/015.xml b/basis/xml/tests/xmltest/valid/not-sa/out/015.xml
new file mode 100755 (executable)
index 0000000..131a32f
--- /dev/null
@@ -0,0 +1 @@
+<doc a2="v2"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/016.xml b/basis/xml/tests/xmltest/valid/not-sa/out/016.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/017.xml b/basis/xml/tests/xmltest/valid/not-sa/out/017.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/018.xml b/basis/xml/tests/xmltest/valid/not-sa/out/018.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/019.xml b/basis/xml/tests/xmltest/valid/not-sa/out/019.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/020.xml b/basis/xml/tests/xmltest/valid/not-sa/out/020.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/021.xml b/basis/xml/tests/xmltest/valid/not-sa/out/021.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/022.xml b/basis/xml/tests/xmltest/valid/not-sa/out/022.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/023.xml b/basis/xml/tests/xmltest/valid/not-sa/out/023.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/024.xml b/basis/xml/tests/xmltest/valid/not-sa/out/024.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/025.xml b/basis/xml/tests/xmltest/valid/not-sa/out/025.xml
new file mode 100755 (executable)
index 0000000..eb3f967
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="x"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/026.xml b/basis/xml/tests/xmltest/valid/not-sa/out/026.xml
new file mode 100755 (executable)
index 0000000..71c0202
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="w1" a2="x2"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/027.xml b/basis/xml/tests/xmltest/valid/not-sa/out/027.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/028.xml b/basis/xml/tests/xmltest/valid/not-sa/out/028.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/029.xml b/basis/xml/tests/xmltest/valid/not-sa/out/029.xml
new file mode 100755 (executable)
index 0000000..7ac8b2b
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v2"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/030.xml b/basis/xml/tests/xmltest/valid/not-sa/out/030.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/not-sa/out/031.xml b/basis/xml/tests/xmltest/valid/not-sa/out/031.xml
new file mode 100755 (executable)
index 0000000..03a6c3f
--- /dev/null
@@ -0,0 +1 @@
+<doc>&lt;!ATTLIST doc a1 CDATA &quot;v1&quot;&gt;&#10;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/001.xml b/basis/xml/tests/xmltest/valid/sa/001.xml
new file mode 100755 (executable)
index 0000000..7fbef49
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/002.xml b/basis/xml/tests/xmltest/valid/sa/002.xml
new file mode 100755 (executable)
index 0000000..2e3f1d8
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc ></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/003.xml b/basis/xml/tests/xmltest/valid/sa/003.xml
new file mode 100755 (executable)
index 0000000..c841b81
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc >\r
diff --git a/basis/xml/tests/xmltest/valid/sa/004.xml b/basis/xml/tests/xmltest/valid/sa/004.xml
new file mode 100755 (executable)
index 0000000..a9c5756
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA #IMPLIED>\r
+]>\r
+<doc a1="v1"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/005.xml b/basis/xml/tests/xmltest/valid/sa/005.xml
new file mode 100755 (executable)
index 0000000..b069efe
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA #IMPLIED>\r
+]>\r
+<doc a1 = "v1"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/006.xml b/basis/xml/tests/xmltest/valid/sa/006.xml
new file mode 100755 (executable)
index 0000000..39a3463
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA #IMPLIED>\r
+]>\r
+<doc a1='v1'></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/007.xml b/basis/xml/tests/xmltest/valid/sa/007.xml
new file mode 100755 (executable)
index 0000000..cc3dc53
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&#32;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/008.xml b/basis/xml/tests/xmltest/valid/sa/008.xml
new file mode 100755 (executable)
index 0000000..b3370eb
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&amp;&lt;&gt;&quot;&apos;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/009.xml b/basis/xml/tests/xmltest/valid/sa/009.xml
new file mode 100755 (executable)
index 0000000..0fa183e
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&#x20;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/010.xml b/basis/xml/tests/xmltest/valid/sa/010.xml
new file mode 100755 (executable)
index 0000000..eb64d18
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA #IMPLIED>\r
+]>\r
+<doc a1="v1" ></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/011.xml b/basis/xml/tests/xmltest/valid/sa/011.xml
new file mode 100755 (executable)
index 0000000..4cac44b
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA #IMPLIED a2 CDATA #IMPLIED>\r
+]>\r
+<doc a1="v1" a2="v2"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/012.xml b/basis/xml/tests/xmltest/valid/sa/012.xml
new file mode 100755 (executable)
index 0000000..6ce2a3e
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc : CDATA #IMPLIED>\r
+]>\r
+<doc :="v1"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/013.xml b/basis/xml/tests/xmltest/valid/sa/013.xml
new file mode 100755 (executable)
index 0000000..2f4aae4
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc _.-0123456789 CDATA #IMPLIED>\r
+]>\r
+<doc _.-0123456789="v1"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/014.xml b/basis/xml/tests/xmltest/valid/sa/014.xml
new file mode 100755 (executable)
index 0000000..47f1f72
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc abcdefghijklmnopqrstuvwxyz CDATA #IMPLIED>\r
+]>\r
+<doc abcdefghijklmnopqrstuvwxyz="v1"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/015.xml b/basis/xml/tests/xmltest/valid/sa/015.xml
new file mode 100755 (executable)
index 0000000..861df8a
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc ABCDEFGHIJKLMNOPQRSTUVWXYZ CDATA #IMPLIED>\r
+]>\r
+<doc ABCDEFGHIJKLMNOPQRSTUVWXYZ="v1"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/016.xml b/basis/xml/tests/xmltest/valid/sa/016.xml
new file mode 100755 (executable)
index 0000000..66b1973
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc><?pi?></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/017.xml b/basis/xml/tests/xmltest/valid/sa/017.xml
new file mode 100755 (executable)
index 0000000..827ba96
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc><?pi some data ? > <??></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/018.xml b/basis/xml/tests/xmltest/valid/sa/018.xml
new file mode 100755 (executable)
index 0000000..4570903
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc><![CDATA[<foo>]]></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/019.xml b/basis/xml/tests/xmltest/valid/sa/019.xml
new file mode 100755 (executable)
index 0000000..3e6b74c
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc><![CDATA[<&]]></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/020.xml b/basis/xml/tests/xmltest/valid/sa/020.xml
new file mode 100755 (executable)
index 0000000..f749551
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc><![CDATA[<&]>]]]></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/021.xml b/basis/xml/tests/xmltest/valid/sa/021.xml
new file mode 100755 (executable)
index 0000000..13dda8c
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc><!-- a comment --></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/022.xml b/basis/xml/tests/xmltest/valid/sa/022.xml
new file mode 100755 (executable)
index 0000000..41d300e
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc><!-- a comment ->--></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/023.xml b/basis/xml/tests/xmltest/valid/sa/023.xml
new file mode 100755 (executable)
index 0000000..3837b83
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e "">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/024.xml b/basis/xml/tests/xmltest/valid/sa/024.xml
new file mode 100755 (executable)
index 0000000..b0655c6
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (foo)>\r
+<!ELEMENT foo (#PCDATA)>\r
+<!ENTITY e "&#60;foo></foo>">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/025.xml b/basis/xml/tests/xmltest/valid/sa/025.xml
new file mode 100755 (executable)
index 0000000..ed01f36
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (foo*)>\r
+<!ELEMENT foo (#PCDATA)>\r
+]>\r
+<doc><foo/><foo></foo></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/026.xml b/basis/xml/tests/xmltest/valid/sa/026.xml
new file mode 100755 (executable)
index 0000000..1ba033c
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (foo*)>\r
+<!ELEMENT foo EMPTY>\r
+]>\r
+<doc><foo/><foo></foo></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/027.xml b/basis/xml/tests/xmltest/valid/sa/027.xml
new file mode 100755 (executable)
index 0000000..ee02439
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (foo*)>\r
+<!ELEMENT foo ANY>\r
+]>\r
+<doc><foo/><foo></foo></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/028.xml b/basis/xml/tests/xmltest/valid/sa/028.xml
new file mode 100755 (executable)
index 0000000..3d95747
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>\r
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/029.xml b/basis/xml/tests/xmltest/valid/sa/029.xml
new file mode 100755 (executable)
index 0000000..909f6ff
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version='1.0'?>\r
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/030.xml b/basis/xml/tests/xmltest/valid/sa/030.xml
new file mode 100755 (executable)
index 0000000..3a7ddaa
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version = "1.0"?>\r
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/031.xml b/basis/xml/tests/xmltest/valid/sa/031.xml
new file mode 100755 (executable)
index 0000000..a58e058
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version='1.0' encoding="UTF-8"?>\r
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/032.xml b/basis/xml/tests/xmltest/valid/sa/032.xml
new file mode 100755 (executable)
index 0000000..be55c8d
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version='1.0' standalone='yes'?>\r
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/033.xml b/basis/xml/tests/xmltest/valid/sa/033.xml
new file mode 100755 (executable)
index 0000000..a3f9053
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version='1.0' encoding="UTF-8" standalone='yes'?>\r
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/034.xml b/basis/xml/tests/xmltest/valid/sa/034.xml
new file mode 100755 (executable)
index 0000000..7d52f31
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc/>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/035.xml b/basis/xml/tests/xmltest/valid/sa/035.xml
new file mode 100755 (executable)
index 0000000..f109a8b
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc />\r
diff --git a/basis/xml/tests/xmltest/valid/sa/036.xml b/basis/xml/tests/xmltest/valid/sa/036.xml
new file mode 100755 (executable)
index 0000000..8ab2b3f
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
+<?pi data?>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/037.xml b/basis/xml/tests/xmltest/valid/sa/037.xml
new file mode 100755 (executable)
index 0000000..f9b2113
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
+<!-- comment -->\r
+\r
diff --git a/basis/xml/tests/xmltest/valid/sa/038.xml b/basis/xml/tests/xmltest/valid/sa/038.xml
new file mode 100755 (executable)
index 0000000..d14f41b
--- /dev/null
@@ -0,0 +1,6 @@
+<!-- comment -->\r
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
+\r
diff --git a/basis/xml/tests/xmltest/valid/sa/039.xml b/basis/xml/tests/xmltest/valid/sa/039.xml
new file mode 100755 (executable)
index 0000000..0897316
--- /dev/null
@@ -0,0 +1,5 @@
+<?pi data?>\r
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/040.xml b/basis/xml/tests/xmltest/valid/sa/040.xml
new file mode 100755 (executable)
index 0000000..12c419b
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA #IMPLIED>\r
+]>\r
+<doc a1="&quot;&lt;&amp;&gt;&apos;"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/041.xml b/basis/xml/tests/xmltest/valid/sa/041.xml
new file mode 100755 (executable)
index 0000000..a59f536
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA #IMPLIED>\r
+]>\r
+<doc a1="&#65;"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/042.xml b/basis/xml/tests/xmltest/valid/sa/042.xml
new file mode 100755 (executable)
index 0000000..5d7c650
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&#00000000000000000000000000000000065;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/043.xml b/basis/xml/tests/xmltest/valid/sa/043.xml
new file mode 100755 (executable)
index 0000000..a8095df
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ATTLIST doc a1 CDATA #IMPLIED>\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc a1="foo\r
+bar"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/044.xml b/basis/xml/tests/xmltest/valid/sa/044.xml
new file mode 100755 (executable)
index 0000000..bee1d23
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (e*)>\r
+<!ELEMENT e EMPTY>\r
+<!ATTLIST e a1 CDATA "v1" a2 CDATA "v2" a3 CDATA #IMPLIED>\r
+]>\r
+<doc>\r
+<e a3="v3"/>\r
+<e a1="w1"/>\r
+<e a2="w2" a3="v3"/>\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/045.xml b/basis/xml/tests/xmltest/valid/sa/045.xml
new file mode 100755 (executable)
index 0000000..e2567f5
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA "v1">\r
+<!ATTLIST doc a1 CDATA "z1">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/046.xml b/basis/xml/tests/xmltest/valid/sa/046.xml
new file mode 100755 (executable)
index 0000000..c50a284
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA "v1">\r
+<!ATTLIST doc a2 CDATA "v2">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/047.xml b/basis/xml/tests/xmltest/valid/sa/047.xml
new file mode 100755 (executable)
index 0000000..a4c688c
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>X\r
+Y</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/048.xml b/basis/xml/tests/xmltest/valid/sa/048.xml
new file mode 100755 (executable)
index 0000000..c6b2ded
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>]</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/049.xml b/basis/xml/tests/xmltest/valid/sa/049.xml
new file mode 100755 (executable)
index 0000000..c3cc797
Binary files /dev/null and b/basis/xml/tests/xmltest/valid/sa/049.xml differ
diff --git a/basis/xml/tests/xmltest/valid/sa/050.xml b/basis/xml/tests/xmltest/valid/sa/050.xml
new file mode 100755 (executable)
index 0000000..12303b1
Binary files /dev/null and b/basis/xml/tests/xmltest/valid/sa/050.xml differ
diff --git a/basis/xml/tests/xmltest/valid/sa/051.xml b/basis/xml/tests/xmltest/valid/sa/051.xml
new file mode 100755 (executable)
index 0000000..7ae8f6c
Binary files /dev/null and b/basis/xml/tests/xmltest/valid/sa/051.xml differ
diff --git a/basis/xml/tests/xmltest/valid/sa/052.xml b/basis/xml/tests/xmltest/valid/sa/052.xml
new file mode 100755 (executable)
index 0000000..3f33a4c
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>ð€€ô¿½</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/053.xml b/basis/xml/tests/xmltest/valid/sa/053.xml
new file mode 100755 (executable)
index 0000000..0d88f28
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "<e/>">\r
+<!ELEMENT doc (e)>\r
+<!ELEMENT e EMPTY>\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/054.xml b/basis/xml/tests/xmltest/valid/sa/054.xml
new file mode 100755 (executable)
index 0000000..5d1c88b
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+\r
+\r
+<doc\r
+></doc\r
+>\r
+\r
+\r
diff --git a/basis/xml/tests/xmltest/valid/sa/055.xml b/basis/xml/tests/xmltest/valid/sa/055.xml
new file mode 100755 (executable)
index 0000000..da0292c
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<?pi  data?>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/056.xml b/basis/xml/tests/xmltest/valid/sa/056.xml
new file mode 100755 (executable)
index 0000000..144871b
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&#x0000000000000000000000000000000000000041;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/057.xml b/basis/xml/tests/xmltest/valid/sa/057.xml
new file mode 100755 (executable)
index 0000000..c1ac849
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (a*)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/058.xml b/basis/xml/tests/xmltest/valid/sa/058.xml
new file mode 100755 (executable)
index 0000000..2ff23b2
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ATTLIST doc a1 NMTOKENS #IMPLIED>\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc a1=" 1    2       "></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/059.xml b/basis/xml/tests/xmltest/valid/sa/059.xml
new file mode 100755 (executable)
index 0000000..2171480
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (e*)>\r
+<!ELEMENT e EMPTY>\r
+<!ATTLIST e a1 CDATA #IMPLIED a2 CDATA #IMPLIED a3 CDATA #IMPLIED>\r
+]>\r
+<doc>\r
+<e a1="v1" a2="v2" a3="v3"/>\r
+<e a1="w1" a2="v2"/>\r
+<e a1="v1" a2="w2" a3="v3"/>\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/060.xml b/basis/xml/tests/xmltest/valid/sa/060.xml
new file mode 100755 (executable)
index 0000000..6cd6b43
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>X&#10;Y</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/061.xml b/basis/xml/tests/xmltest/valid/sa/061.xml
new file mode 100755 (executable)
index 0000000..bbdc152
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&#163;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/062.xml b/basis/xml/tests/xmltest/valid/sa/062.xml
new file mode 100755 (executable)
index 0000000..f4ba530
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&#xe40;&#xe08;&#xe21;ส์</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/063.xml b/basis/xml/tests/xmltest/valid/sa/063.xml
new file mode 100755 (executable)
index 0000000..9668f2d
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE à¹€à¸ˆà¸¡à¸ªà¹Œ [\r
+<!ELEMENT à¹€à¸ˆà¸¡à¸ªà¹Œ (#PCDATA)>\r
+]>\r
+<เจมส์></เจมส์>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/064.xml b/basis/xml/tests/xmltest/valid/sa/064.xml
new file mode 100755 (executable)
index 0000000..74a97aa
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&#x10000;&#x10FFFD;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/065.xml b/basis/xml/tests/xmltest/valid/sa/065.xml
new file mode 100755 (executable)
index 0000000..f708f2b
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "&#60;">\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/066.xml b/basis/xml/tests/xmltest/valid/sa/066.xml
new file mode 100755 (executable)
index 0000000..a27340b
--- /dev/null
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA #IMPLIED>\r
+<!-- 34 is double quote -->\r
+<!ENTITY e1 "&#34;">\r
+]>\r
+<doc a1="&e1;"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/067.xml b/basis/xml/tests/xmltest/valid/sa/067.xml
new file mode 100755 (executable)
index 0000000..a0ccf77
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&#13;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/068.xml b/basis/xml/tests/xmltest/valid/sa/068.xml
new file mode 100755 (executable)
index 0000000..8ed806b
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e "&#13;">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/069.xml b/basis/xml/tests/xmltest/valid/sa/069.xml
new file mode 100755 (executable)
index 0000000..2437f60
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!NOTATION n PUBLIC "whatever">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/070.xml b/basis/xml/tests/xmltest/valid/sa/070.xml
new file mode 100755 (executable)
index 0000000..eef097d
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ENTITY % e "<!ELEMENT doc (#PCDATA)>">\r
+%e;\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/071.xml b/basis/xml/tests/xmltest/valid/sa/071.xml
new file mode 100755 (executable)
index 0000000..ebfba23
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a ID #IMPLIED>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/072.xml b/basis/xml/tests/xmltest/valid/sa/072.xml
new file mode 100755 (executable)
index 0000000..6ef39dc
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a IDREF #IMPLIED>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/073.xml b/basis/xml/tests/xmltest/valid/sa/073.xml
new file mode 100755 (executable)
index 0000000..217476d
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a IDREFS #IMPLIED>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/074.xml b/basis/xml/tests/xmltest/valid/sa/074.xml
new file mode 100755 (executable)
index 0000000..8b2354f
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a ENTITY #IMPLIED>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/075.xml b/basis/xml/tests/xmltest/valid/sa/075.xml
new file mode 100755 (executable)
index 0000000..33c0124
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a ENTITIES #IMPLIED>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/076.xml b/basis/xml/tests/xmltest/valid/sa/076.xml
new file mode 100755 (executable)
index 0000000..65b731c
--- /dev/null
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a NOTATION (n1|n2) #IMPLIED>\r
+<!NOTATION n1 SYSTEM "http://www.w3.org/">\r
+<!NOTATION n2 SYSTEM "http://www.w3.org/">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/077.xml b/basis/xml/tests/xmltest/valid/sa/077.xml
new file mode 100755 (executable)
index 0000000..e5f301e
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a (1|2) #IMPLIED>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/078.xml b/basis/xml/tests/xmltest/valid/sa/078.xml
new file mode 100755 (executable)
index 0000000..b31f40f
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA #REQUIRED>\r
+]>\r
+<doc a="v"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/079.xml b/basis/xml/tests/xmltest/valid/sa/079.xml
new file mode 100755 (executable)
index 0000000..a3290d6
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA #FIXED "v">\r
+]>\r
+<doc a="v"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/080.xml b/basis/xml/tests/xmltest/valid/sa/080.xml
new file mode 100755 (executable)
index 0000000..3208fa9
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA #FIXED "v">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/081.xml b/basis/xml/tests/xmltest/valid/sa/081.xml
new file mode 100755 (executable)
index 0000000..51ee1a3
--- /dev/null
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (a, b, c)>\r
+<!ELEMENT a (a?)>\r
+<!ELEMENT b (b*)>\r
+<!ELEMENT c (a | b)+>\r
+]>\r
+<doc><a/><b/><c><a/></c></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/082.xml b/basis/xml/tests/xmltest/valid/sa/082.xml
new file mode 100755 (executable)
index 0000000..d5245ac
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ENTITY % e SYSTEM "e.dtd">\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/083.xml b/basis/xml/tests/xmltest/valid/sa/083.xml
new file mode 100755 (executable)
index 0000000..937cfc0
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ENTITY % e PUBLIC 'whatever' "e.dtd">\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/084.xml b/basis/xml/tests/xmltest/valid/sa/084.xml
new file mode 100755 (executable)
index 0000000..8276076
--- /dev/null
@@ -0,0 +1 @@
+<!DOCTYPE doc [<!ELEMENT doc (#PCDATA)>]><doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/085.xml b/basis/xml/tests/xmltest/valid/sa/085.xml
new file mode 100755 (executable)
index 0000000..cf5834f
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY % e "<foo>">\r
+<!ENTITY e "">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/086.xml b/basis/xml/tests/xmltest/valid/sa/086.xml
new file mode 100755 (executable)
index 0000000..bbc3080
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e "">\r
+<!ENTITY e "<foo>">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/087.xml b/basis/xml/tests/xmltest/valid/sa/087.xml
new file mode 100755 (executable)
index 0000000..34797a6
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "<foo/&#62;">\r
+<!ELEMENT doc (foo)>\r
+<!ELEMENT foo EMPTY>\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/088.xml b/basis/xml/tests/xmltest/valid/sa/088.xml
new file mode 100755 (executable)
index 0000000..f97d968
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e "&lt;foo>">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/089.xml b/basis/xml/tests/xmltest/valid/sa/089.xml
new file mode 100755 (executable)
index 0000000..2d80c8f
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ENTITY e "&#x10000;&#x10FFFD;&#x10FFFF;">\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/090.xml b/basis/xml/tests/xmltest/valid/sa/090.xml
new file mode 100755 (executable)
index 0000000..c392c96
--- /dev/null
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [\r
+<!ATTLIST e a NOTATION (n) #IMPLIED>\r
+<!ELEMENT doc (e)*>\r
+<!ELEMENT e (#PCDATA)>\r
+<!NOTATION n PUBLIC "whatever">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/091.xml b/basis/xml/tests/xmltest/valid/sa/091.xml
new file mode 100755 (executable)
index 0000000..7343d0f
--- /dev/null
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [\r
+<!NOTATION n SYSTEM "http://www.w3.org/">\r
+<!ENTITY e SYSTEM "http://www.w3.org/" NDATA n>\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a ENTITY "e">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/092.xml b/basis/xml/tests/xmltest/valid/sa/092.xml
new file mode 100755 (executable)
index 0000000..627b74e
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (a)*>\r
+<!ELEMENT a EMPTY>\r
+]>\r
+<doc>\r
+<a/>\r
+    <a/>       <a/>\r
+\r
+\r
+</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/093.xml b/basis/xml/tests/xmltest/valid/sa/093.xml
new file mode 100755 (executable)
index 0000000..300578e
--- /dev/null
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (#PCDATA)>
+]>
+<doc>
+
+
+</doc>
diff --git a/basis/xml/tests/xmltest/valid/sa/094.xml b/basis/xml/tests/xmltest/valid/sa/094.xml
new file mode 100755 (executable)
index 0000000..5726e7d
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ENTITY % e "foo">\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a1 CDATA "%e;">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/095.xml b/basis/xml/tests/xmltest/valid/sa/095.xml
new file mode 100755 (executable)
index 0000000..1fe6959
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ATTLIST doc a1 CDATA #IMPLIED>\r
+<!ATTLIST doc a1 NMTOKENS #IMPLIED>\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc a1="1  2"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/096.xml b/basis/xml/tests/xmltest/valid/sa/096.xml
new file mode 100755 (executable)
index 0000000..a6f8f43
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ATTLIST doc a1 NMTOKENS " 1          2       ">\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/097.ent b/basis/xml/tests/xmltest/valid/sa/097.ent
new file mode 100755 (executable)
index 0000000..e06554a
--- /dev/null
@@ -0,0 +1 @@
+<!ATTLIST doc a2 CDATA #IMPLIED>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/097.xml b/basis/xml/tests/xmltest/valid/sa/097.xml
new file mode 100755 (executable)
index 0000000..c606afa
--- /dev/null
@@ -0,0 +1,8 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY % e SYSTEM "097.ent">\r
+<!ATTLIST doc a1 CDATA "v1">\r
+%e;\r
+<!ATTLIST doc a2 CDATA "v2">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/098.xml b/basis/xml/tests/xmltest/valid/sa/098.xml
new file mode 100755 (executable)
index 0000000..33a64ce
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc><?pi x\r
+y?></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/099.xml b/basis/xml/tests/xmltest/valid/sa/099.xml
new file mode 100755 (executable)
index 0000000..1b7214a
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/100.xml b/basis/xml/tests/xmltest/valid/sa/100.xml
new file mode 100755 (executable)
index 0000000..5b839e7
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ENTITY e PUBLIC ";!*#@$_%" "100.xml">\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/101.xml b/basis/xml/tests/xmltest/valid/sa/101.xml
new file mode 100755 (executable)
index 0000000..f464484
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e "&#34;">\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/102.xml b/basis/xml/tests/xmltest/valid/sa/102.xml
new file mode 100755 (executable)
index 0000000..f239ff5
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA #IMPLIED>\r
+]>\r
+<doc a="&#34;"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/103.xml b/basis/xml/tests/xmltest/valid/sa/103.xml
new file mode 100755 (executable)
index 0000000..1dbbd5b
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc>&#60;doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/104.xml b/basis/xml/tests/xmltest/valid/sa/104.xml
new file mode 100755 (executable)
index 0000000..666f43d
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA #IMPLIED>\r
+]>\r
+<doc a="x      y"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/105.xml b/basis/xml/tests/xmltest/valid/sa/105.xml
new file mode 100755 (executable)
index 0000000..6b3af2b
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA #IMPLIED>\r
+]>\r
+<doc a="x&#9;y"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/106.xml b/basis/xml/tests/xmltest/valid/sa/106.xml
new file mode 100755 (executable)
index 0000000..8757c0a
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA #IMPLIED>\r
+]>\r
+<doc a="x&#10;y"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/107.xml b/basis/xml/tests/xmltest/valid/sa/107.xml
new file mode 100755 (executable)
index 0000000..3d2c256
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA #IMPLIED>\r
+]>\r
+<doc a="x&#13;y"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/108.xml b/basis/xml/tests/xmltest/valid/sa/108.xml
new file mode 100755 (executable)
index 0000000..e919bf2
--- /dev/null
@@ -0,0 +1,7 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e "\r
+">\r
+<!ATTLIST doc a CDATA #IMPLIED>\r
+]>\r
+<doc a="x&e;y"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/109.xml b/basis/xml/tests/xmltest/valid/sa/109.xml
new file mode 100755 (executable)
index 0000000..33fa38e
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a CDATA #IMPLIED>\r
+]>\r
+<doc a=""></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/110.xml b/basis/xml/tests/xmltest/valid/sa/110.xml
new file mode 100755 (executable)
index 0000000..0c61c65
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e "&#13;&#10;">\r
+<!ATTLIST doc a CDATA #IMPLIED>\r
+]>\r
+<doc a="x&e;y"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/111.xml b/basis/xml/tests/xmltest/valid/sa/111.xml
new file mode 100755 (executable)
index 0000000..cb56f26
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST doc a NMTOKENS #IMPLIED>\r
+]>\r
+<doc a="&#32;x&#32;&#32;y&#32;"></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/112.xml b/basis/xml/tests/xmltest/valid/sa/112.xml
new file mode 100755 (executable)
index 0000000..27b6a4c
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (a | b)>\r
+<!ELEMENT a (#PCDATA)>\r
+]>\r
+<doc><a></a></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/113.xml b/basis/xml/tests/xmltest/valid/sa/113.xml
new file mode 100755 (executable)
index 0000000..d2edd0f
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ATTLIST e a CDATA #IMPLIED>\r
+]>\r
+<doc></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/114.xml b/basis/xml/tests/xmltest/valid/sa/114.xml
new file mode 100755 (executable)
index 0000000..52e2070
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e "<![CDATA[&foo;]]>">\r
+]>\r
+<doc>&e;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/115.xml b/basis/xml/tests/xmltest/valid/sa/115.xml
new file mode 100755 (executable)
index 0000000..d939a67
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY e1 "&e2;">\r
+<!ENTITY e2 "v">\r
+]>\r
+<doc>&e1;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/116.xml b/basis/xml/tests/xmltest/valid/sa/116.xml
new file mode 100755 (executable)
index 0000000..55ab496
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+]>\r
+<doc><![CDATA[\r
+]]></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/117.xml b/basis/xml/tests/xmltest/valid/sa/117.xml
new file mode 100755 (executable)
index 0000000..e4f02b1
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY rsqb "]">\r
+]>\r
+<doc>&rsqb;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/118.xml b/basis/xml/tests/xmltest/valid/sa/118.xml
new file mode 100755 (executable)
index 0000000..fba6c44
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc (#PCDATA)>\r
+<!ENTITY rsqb "]]">\r
+]>\r
+<doc>&rsqb;</doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/119.xml b/basis/xml/tests/xmltest/valid/sa/119.xml
new file mode 100755 (executable)
index 0000000..876e747
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [\r
+<!ELEMENT doc ANY>\r
+]>\r
+<doc><!-- -á --></doc>\r
diff --git a/basis/xml/tests/xmltest/valid/sa/out/001.xml b/basis/xml/tests/xmltest/valid/sa/out/001.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/002.xml b/basis/xml/tests/xmltest/valid/sa/out/002.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/003.xml b/basis/xml/tests/xmltest/valid/sa/out/003.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/004.xml b/basis/xml/tests/xmltest/valid/sa/out/004.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/005.xml b/basis/xml/tests/xmltest/valid/sa/out/005.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/006.xml b/basis/xml/tests/xmltest/valid/sa/out/006.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/007.xml b/basis/xml/tests/xmltest/valid/sa/out/007.xml
new file mode 100755 (executable)
index 0000000..97cf3e3
--- /dev/null
@@ -0,0 +1 @@
+<doc> </doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/008.xml b/basis/xml/tests/xmltest/valid/sa/out/008.xml
new file mode 100755 (executable)
index 0000000..3ea232c
--- /dev/null
@@ -0,0 +1 @@
+<doc>&amp;&lt;&gt;&quot;'</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/009.xml b/basis/xml/tests/xmltest/valid/sa/out/009.xml
new file mode 100755 (executable)
index 0000000..97cf3e3
--- /dev/null
@@ -0,0 +1 @@
+<doc> </doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/010.xml b/basis/xml/tests/xmltest/valid/sa/out/010.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/011.xml b/basis/xml/tests/xmltest/valid/sa/out/011.xml
new file mode 100755 (executable)
index 0000000..7293fb6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1" a2="v2"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/012.xml b/basis/xml/tests/xmltest/valid/sa/out/012.xml
new file mode 100755 (executable)
index 0000000..5a0c983
--- /dev/null
@@ -0,0 +1 @@
+<doc :="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/013.xml b/basis/xml/tests/xmltest/valid/sa/out/013.xml
new file mode 100755 (executable)
index 0000000..c9c7ec5
--- /dev/null
@@ -0,0 +1 @@
+<doc _.-0123456789="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/014.xml b/basis/xml/tests/xmltest/valid/sa/out/014.xml
new file mode 100755 (executable)
index 0000000..ac6b28f
--- /dev/null
@@ -0,0 +1 @@
+<doc abcdefghijklmnopqrstuvwxyz="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/015.xml b/basis/xml/tests/xmltest/valid/sa/out/015.xml
new file mode 100755 (executable)
index 0000000..8e216eb
--- /dev/null
@@ -0,0 +1 @@
+<doc ABCDEFGHIJKLMNOPQRSTUVWXYZ="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/016.xml b/basis/xml/tests/xmltest/valid/sa/out/016.xml
new file mode 100755 (executable)
index 0000000..4fc7692
--- /dev/null
@@ -0,0 +1 @@
+<doc><?pi ?></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/017.xml b/basis/xml/tests/xmltest/valid/sa/out/017.xml
new file mode 100755 (executable)
index 0000000..3b9a2f8
--- /dev/null
@@ -0,0 +1 @@
+<doc><?pi some data ? > <??></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/018.xml b/basis/xml/tests/xmltest/valid/sa/out/018.xml
new file mode 100755 (executable)
index 0000000..a547101
--- /dev/null
@@ -0,0 +1 @@
+<doc>&lt;foo&gt;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/019.xml b/basis/xml/tests/xmltest/valid/sa/out/019.xml
new file mode 100755 (executable)
index 0000000..05d4e2f
--- /dev/null
@@ -0,0 +1 @@
+<doc>&lt;&amp;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/020.xml b/basis/xml/tests/xmltest/valid/sa/out/020.xml
new file mode 100755 (executable)
index 0000000..95ae08a
--- /dev/null
@@ -0,0 +1 @@
+<doc>&lt;&amp;]&gt;]</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/021.xml b/basis/xml/tests/xmltest/valid/sa/out/021.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/022.xml b/basis/xml/tests/xmltest/valid/sa/out/022.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/023.xml b/basis/xml/tests/xmltest/valid/sa/out/023.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/024.xml b/basis/xml/tests/xmltest/valid/sa/out/024.xml
new file mode 100755 (executable)
index 0000000..a9aa207
--- /dev/null
@@ -0,0 +1 @@
+<doc><foo></foo></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/025.xml b/basis/xml/tests/xmltest/valid/sa/out/025.xml
new file mode 100755 (executable)
index 0000000..de0f566
--- /dev/null
@@ -0,0 +1 @@
+<doc><foo></foo><foo></foo></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/026.xml b/basis/xml/tests/xmltest/valid/sa/out/026.xml
new file mode 100755 (executable)
index 0000000..de0f566
--- /dev/null
@@ -0,0 +1 @@
+<doc><foo></foo><foo></foo></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/027.xml b/basis/xml/tests/xmltest/valid/sa/out/027.xml
new file mode 100755 (executable)
index 0000000..de0f566
--- /dev/null
@@ -0,0 +1 @@
+<doc><foo></foo><foo></foo></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/028.xml b/basis/xml/tests/xmltest/valid/sa/out/028.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/029.xml b/basis/xml/tests/xmltest/valid/sa/out/029.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/030.xml b/basis/xml/tests/xmltest/valid/sa/out/030.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/031.xml b/basis/xml/tests/xmltest/valid/sa/out/031.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/032.xml b/basis/xml/tests/xmltest/valid/sa/out/032.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/033.xml b/basis/xml/tests/xmltest/valid/sa/out/033.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/034.xml b/basis/xml/tests/xmltest/valid/sa/out/034.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/035.xml b/basis/xml/tests/xmltest/valid/sa/out/035.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/036.xml b/basis/xml/tests/xmltest/valid/sa/out/036.xml
new file mode 100755 (executable)
index 0000000..2bcfb06
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc><?pi data?>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/037.xml b/basis/xml/tests/xmltest/valid/sa/out/037.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/038.xml b/basis/xml/tests/xmltest/valid/sa/out/038.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/039.xml b/basis/xml/tests/xmltest/valid/sa/out/039.xml
new file mode 100755 (executable)
index 0000000..82d117d
--- /dev/null
@@ -0,0 +1 @@
+<?pi data?><doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/040.xml b/basis/xml/tests/xmltest/valid/sa/out/040.xml
new file mode 100755 (executable)
index 0000000..d79cfe1
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="&quot;&lt;&amp;&gt;'"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/041.xml b/basis/xml/tests/xmltest/valid/sa/out/041.xml
new file mode 100755 (executable)
index 0000000..6f2cd58
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="A"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/042.xml b/basis/xml/tests/xmltest/valid/sa/out/042.xml
new file mode 100755 (executable)
index 0000000..f683039
--- /dev/null
@@ -0,0 +1 @@
+<doc>A</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/043.xml b/basis/xml/tests/xmltest/valid/sa/out/043.xml
new file mode 100755 (executable)
index 0000000..e162b76
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="foo bar"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/044.xml b/basis/xml/tests/xmltest/valid/sa/out/044.xml
new file mode 100755 (executable)
index 0000000..78028b7
--- /dev/null
@@ -0,0 +1 @@
+<doc>&#10;<e a1="v1" a2="v2" a3="v3"></e>&#10;<e a1="w1" a2="v2"></e>&#10;<e a1="v1" a2="w2" a3="v3"></e>&#10;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/045.xml b/basis/xml/tests/xmltest/valid/sa/out/045.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/046.xml b/basis/xml/tests/xmltest/valid/sa/out/046.xml
new file mode 100755 (executable)
index 0000000..7293fb6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1" a2="v2"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/047.xml b/basis/xml/tests/xmltest/valid/sa/out/047.xml
new file mode 100755 (executable)
index 0000000..b327ebd
--- /dev/null
@@ -0,0 +1 @@
+<doc>X&#10;Y</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/048.xml b/basis/xml/tests/xmltest/valid/sa/out/048.xml
new file mode 100755 (executable)
index 0000000..ced7d02
--- /dev/null
@@ -0,0 +1 @@
+<doc>]</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/049.xml b/basis/xml/tests/xmltest/valid/sa/out/049.xml
new file mode 100755 (executable)
index 0000000..7cc53f9
--- /dev/null
@@ -0,0 +1 @@
+<doc>£</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/050.xml b/basis/xml/tests/xmltest/valid/sa/out/050.xml
new file mode 100755 (executable)
index 0000000..33703c7
--- /dev/null
@@ -0,0 +1 @@
+<doc>เจมส์</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/051.xml b/basis/xml/tests/xmltest/valid/sa/out/051.xml
new file mode 100755 (executable)
index 0000000..cfeb5a5
--- /dev/null
@@ -0,0 +1 @@
+<เจมส์></เจมส์>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/052.xml b/basis/xml/tests/xmltest/valid/sa/out/052.xml
new file mode 100755 (executable)
index 0000000..f5a0484
--- /dev/null
@@ -0,0 +1 @@
+<doc>ð€€ô¿½</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/053.xml b/basis/xml/tests/xmltest/valid/sa/out/053.xml
new file mode 100755 (executable)
index 0000000..c408384
--- /dev/null
@@ -0,0 +1 @@
+<doc><e></e></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/054.xml b/basis/xml/tests/xmltest/valid/sa/out/054.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/055.xml b/basis/xml/tests/xmltest/valid/sa/out/055.xml
new file mode 100755 (executable)
index 0000000..82d117d
--- /dev/null
@@ -0,0 +1 @@
+<?pi data?><doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/056.xml b/basis/xml/tests/xmltest/valid/sa/out/056.xml
new file mode 100755 (executable)
index 0000000..f683039
--- /dev/null
@@ -0,0 +1 @@
+<doc>A</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/057.xml b/basis/xml/tests/xmltest/valid/sa/out/057.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/058.xml b/basis/xml/tests/xmltest/valid/sa/out/058.xml
new file mode 100755 (executable)
index 0000000..f898cc8
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="1 2"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/059.xml b/basis/xml/tests/xmltest/valid/sa/out/059.xml
new file mode 100755 (executable)
index 0000000..78028b7
--- /dev/null
@@ -0,0 +1 @@
+<doc>&#10;<e a1="v1" a2="v2" a3="v3"></e>&#10;<e a1="w1" a2="v2"></e>&#10;<e a1="v1" a2="w2" a3="v3"></e>&#10;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/060.xml b/basis/xml/tests/xmltest/valid/sa/out/060.xml
new file mode 100755 (executable)
index 0000000..b327ebd
--- /dev/null
@@ -0,0 +1 @@
+<doc>X&#10;Y</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/061.xml b/basis/xml/tests/xmltest/valid/sa/out/061.xml
new file mode 100755 (executable)
index 0000000..7cc53f9
--- /dev/null
@@ -0,0 +1 @@
+<doc>£</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/062.xml b/basis/xml/tests/xmltest/valid/sa/out/062.xml
new file mode 100755 (executable)
index 0000000..33703c7
--- /dev/null
@@ -0,0 +1 @@
+<doc>เจมส์</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/063.xml b/basis/xml/tests/xmltest/valid/sa/out/063.xml
new file mode 100755 (executable)
index 0000000..cfeb5a5
--- /dev/null
@@ -0,0 +1 @@
+<เจมส์></เจมส์>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/064.xml b/basis/xml/tests/xmltest/valid/sa/out/064.xml
new file mode 100755 (executable)
index 0000000..f5a0484
--- /dev/null
@@ -0,0 +1 @@
+<doc>ð€€ô¿½</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/065.xml b/basis/xml/tests/xmltest/valid/sa/out/065.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/066.xml b/basis/xml/tests/xmltest/valid/sa/out/066.xml
new file mode 100755 (executable)
index 0000000..7597d31
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="&quot;"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/067.xml b/basis/xml/tests/xmltest/valid/sa/out/067.xml
new file mode 100755 (executable)
index 0000000..4bbdad4
--- /dev/null
@@ -0,0 +1 @@
+<doc>&#13;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/068.xml b/basis/xml/tests/xmltest/valid/sa/out/068.xml
new file mode 100755 (executable)
index 0000000..4bbdad4
--- /dev/null
@@ -0,0 +1 @@
+<doc>&#13;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/069.xml b/basis/xml/tests/xmltest/valid/sa/out/069.xml
new file mode 100755 (executable)
index 0000000..41eed46
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!NOTATION n PUBLIC 'whatever'>
+]>
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/070.xml b/basis/xml/tests/xmltest/valid/sa/out/070.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/071.xml b/basis/xml/tests/xmltest/valid/sa/out/071.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/072.xml b/basis/xml/tests/xmltest/valid/sa/out/072.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/073.xml b/basis/xml/tests/xmltest/valid/sa/out/073.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/074.xml b/basis/xml/tests/xmltest/valid/sa/out/074.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/075.xml b/basis/xml/tests/xmltest/valid/sa/out/075.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/076.xml b/basis/xml/tests/xmltest/valid/sa/out/076.xml
new file mode 100755 (executable)
index 0000000..b07019e
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE doc [
+<!NOTATION n1 SYSTEM 'http://www.w3.org/'>
+<!NOTATION n2 SYSTEM 'http://www.w3.org/'>
+]>
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/077.xml b/basis/xml/tests/xmltest/valid/sa/out/077.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/078.xml b/basis/xml/tests/xmltest/valid/sa/out/078.xml
new file mode 100755 (executable)
index 0000000..fcab0cd
--- /dev/null
@@ -0,0 +1 @@
+<doc a="v"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/079.xml b/basis/xml/tests/xmltest/valid/sa/out/079.xml
new file mode 100755 (executable)
index 0000000..fcab0cd
--- /dev/null
@@ -0,0 +1 @@
+<doc a="v"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/080.xml b/basis/xml/tests/xmltest/valid/sa/out/080.xml
new file mode 100755 (executable)
index 0000000..fcab0cd
--- /dev/null
@@ -0,0 +1 @@
+<doc a="v"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/081.xml b/basis/xml/tests/xmltest/valid/sa/out/081.xml
new file mode 100755 (executable)
index 0000000..e356e7e
--- /dev/null
@@ -0,0 +1 @@
+<doc><a></a><b></b><c><a></a></c></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/082.xml b/basis/xml/tests/xmltest/valid/sa/out/082.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/083.xml b/basis/xml/tests/xmltest/valid/sa/out/083.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/084.xml b/basis/xml/tests/xmltest/valid/sa/out/084.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/085.xml b/basis/xml/tests/xmltest/valid/sa/out/085.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/086.xml b/basis/xml/tests/xmltest/valid/sa/out/086.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/087.xml b/basis/xml/tests/xmltest/valid/sa/out/087.xml
new file mode 100755 (executable)
index 0000000..a9aa207
--- /dev/null
@@ -0,0 +1 @@
+<doc><foo></foo></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/088.xml b/basis/xml/tests/xmltest/valid/sa/out/088.xml
new file mode 100755 (executable)
index 0000000..a547101
--- /dev/null
@@ -0,0 +1 @@
+<doc>&lt;foo&gt;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/089.xml b/basis/xml/tests/xmltest/valid/sa/out/089.xml
new file mode 100755 (executable)
index 0000000..e01d86e
--- /dev/null
@@ -0,0 +1 @@
+<doc>ð€€ô¿½ô¿¿</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/090.xml b/basis/xml/tests/xmltest/valid/sa/out/090.xml
new file mode 100755 (executable)
index 0000000..41eed46
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!NOTATION n PUBLIC 'whatever'>
+]>
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/091.xml b/basis/xml/tests/xmltest/valid/sa/out/091.xml
new file mode 100755 (executable)
index 0000000..c55a698
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!NOTATION n SYSTEM 'http://www.w3.org/'>
+]>
+<doc a="e"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/092.xml b/basis/xml/tests/xmltest/valid/sa/out/092.xml
new file mode 100755 (executable)
index 0000000..87269f7
--- /dev/null
@@ -0,0 +1 @@
+<doc>&#10;<a></a>&#10;    <a></a>&#9;<a></a>&#10;&#10;&#10;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/093.xml b/basis/xml/tests/xmltest/valid/sa/out/093.xml
new file mode 100755 (executable)
index 0000000..631bfde
--- /dev/null
@@ -0,0 +1 @@
+<doc>&#10;&#10;&#10;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/094.xml b/basis/xml/tests/xmltest/valid/sa/out/094.xml
new file mode 100755 (executable)
index 0000000..636ab47
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="%e;"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/095.xml b/basis/xml/tests/xmltest/valid/sa/out/095.xml
new file mode 100755 (executable)
index 0000000..a20706e
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="1  2"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/096.xml b/basis/xml/tests/xmltest/valid/sa/out/096.xml
new file mode 100755 (executable)
index 0000000..f898cc8
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="1 2"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/097.xml b/basis/xml/tests/xmltest/valid/sa/out/097.xml
new file mode 100755 (executable)
index 0000000..e05cfe6
--- /dev/null
@@ -0,0 +1 @@
+<doc a1="v1"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/098.xml b/basis/xml/tests/xmltest/valid/sa/out/098.xml
new file mode 100755 (executable)
index 0000000..f6408de
--- /dev/null
@@ -0,0 +1,2 @@
+<doc><?pi x
+y?></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/099.xml b/basis/xml/tests/xmltest/valid/sa/out/099.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/100.xml b/basis/xml/tests/xmltest/valid/sa/out/100.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/101.xml b/basis/xml/tests/xmltest/valid/sa/out/101.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/102.xml b/basis/xml/tests/xmltest/valid/sa/out/102.xml
new file mode 100755 (executable)
index 0000000..6e66b8d
--- /dev/null
@@ -0,0 +1 @@
+<doc a="&quot;"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/103.xml b/basis/xml/tests/xmltest/valid/sa/out/103.xml
new file mode 100755 (executable)
index 0000000..96495d4
--- /dev/null
@@ -0,0 +1 @@
+<doc>&lt;doc&gt;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/104.xml b/basis/xml/tests/xmltest/valid/sa/out/104.xml
new file mode 100755 (executable)
index 0000000..cc3def3
--- /dev/null
@@ -0,0 +1 @@
+<doc a="x y"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/105.xml b/basis/xml/tests/xmltest/valid/sa/out/105.xml
new file mode 100755 (executable)
index 0000000..5aed3d6
--- /dev/null
@@ -0,0 +1 @@
+<doc a="x&#9;y"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/106.xml b/basis/xml/tests/xmltest/valid/sa/out/106.xml
new file mode 100755 (executable)
index 0000000..1197d2f
--- /dev/null
@@ -0,0 +1 @@
+<doc a="x&#10;y"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/107.xml b/basis/xml/tests/xmltest/valid/sa/out/107.xml
new file mode 100755 (executable)
index 0000000..288f23c
--- /dev/null
@@ -0,0 +1 @@
+<doc a="x&#13;y"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/108.xml b/basis/xml/tests/xmltest/valid/sa/out/108.xml
new file mode 100755 (executable)
index 0000000..cc3def3
--- /dev/null
@@ -0,0 +1 @@
+<doc a="x y"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/109.xml b/basis/xml/tests/xmltest/valid/sa/out/109.xml
new file mode 100755 (executable)
index 0000000..c43bdf9
--- /dev/null
@@ -0,0 +1 @@
+<doc a=""></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/110.xml b/basis/xml/tests/xmltest/valid/sa/out/110.xml
new file mode 100755 (executable)
index 0000000..a92237b
--- /dev/null
@@ -0,0 +1 @@
+<doc a="x  y"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/111.xml b/basis/xml/tests/xmltest/valid/sa/out/111.xml
new file mode 100755 (executable)
index 0000000..cc3def3
--- /dev/null
@@ -0,0 +1 @@
+<doc a="x y"></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/112.xml b/basis/xml/tests/xmltest/valid/sa/out/112.xml
new file mode 100755 (executable)
index 0000000..c82f47b
--- /dev/null
@@ -0,0 +1 @@
+<doc><a></a></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/113.xml b/basis/xml/tests/xmltest/valid/sa/out/113.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/114.xml b/basis/xml/tests/xmltest/valid/sa/out/114.xml
new file mode 100755 (executable)
index 0000000..8e0722a
--- /dev/null
@@ -0,0 +1 @@
+<doc>&amp;foo;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/115.xml b/basis/xml/tests/xmltest/valid/sa/out/115.xml
new file mode 100755 (executable)
index 0000000..682b814
--- /dev/null
@@ -0,0 +1 @@
+<doc>v</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/116.xml b/basis/xml/tests/xmltest/valid/sa/out/116.xml
new file mode 100755 (executable)
index 0000000..a79dff6
--- /dev/null
@@ -0,0 +1 @@
+<doc>&#10;</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/117.xml b/basis/xml/tests/xmltest/valid/sa/out/117.xml
new file mode 100755 (executable)
index 0000000..ced7d02
--- /dev/null
@@ -0,0 +1 @@
+<doc>]</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/118.xml b/basis/xml/tests/xmltest/valid/sa/out/118.xml
new file mode 100755 (executable)
index 0000000..31e37a9
--- /dev/null
@@ -0,0 +1 @@
+<doc>]]</doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/valid/sa/out/119.xml b/basis/xml/tests/xmltest/valid/sa/out/119.xml
new file mode 100755 (executable)
index 0000000..7e8f183
--- /dev/null
@@ -0,0 +1 @@
+<doc></doc>
\ No newline at end of file
diff --git a/basis/xml/tests/xmltest/xmltest.xml b/basis/xml/tests/xmltest/xmltest.xml
new file mode 100755 (executable)
index 0000000..733523b
--- /dev/null
@@ -0,0 +1,1435 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    @(#)xmltest.xml    1.12 99/02/12
+    Copyright 1998-1999 by Sun Microsystems, Inc.
+    All Rights Reserved.
+-->
+
+<TESTCASES PROFILE="James Clark XMLTEST cases, 18-Nov-1998">
+
+<!-- Start:  not-wf/sa -->
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-001"
+       URI="not-wf/sa/001.xml" SECTIONS="3.1 [41]">
+    Attribute values must start with attribute names, not "?". </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-002"
+       URI="not-wf/sa/002.xml" SECTIONS="2.3 [4]">
+    Names may not start with "."; it's not a Letter. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-003"
+       URI="not-wf/sa/003.xml" SECTIONS="2.6 [16]">
+    Processing Instruction target name is required.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-004"
+       URI="not-wf/sa/004.xml" SECTIONS="2.6 [16]">
+    SGML-ism:  processing instructions end in '?&gt;' not '&gt;'. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-005"
+       URI="not-wf/sa/005.xml" SECTIONS="2.6 [16]">
+    Processing instructions end in '?&gt;' not '?'. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-006"
+       URI="not-wf/sa/006.xml" SECTIONS="2.5 [16]">
+    XML comments may not contain "--" </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-007"
+       URI="not-wf/sa/007.xml" SECTIONS="4.1 [68]">
+    General entity references have no whitespace after the
+    entity name and before the semicolon. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-008"
+       URI="not-wf/sa/008.xml" SECTIONS="2.3 [5]">
+    Entity references must include names, which don't begin
+    with '.' (it's not a Letter or other name start character). </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-009"
+       URI="not-wf/sa/009.xml" SECTIONS="4.1 [66]">
+    Character references may have only decimal or numeric strings.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-010"
+       URI="not-wf/sa/010.xml" SECTIONS="4.1 [68]">
+    Ampersand may only appear as part of a general entity reference.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-011"
+       URI="not-wf/sa/011.xml" SECTIONS="3.1 [41]">
+    SGML-ism:  attribute values must be explicitly assigned a
+    value, it can't act as a boolean toggle. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-012"
+       URI="not-wf/sa/012.xml" SECTIONS="2.3 [10]">
+    SGML-ism:  attribute values must be quoted in all cases. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-013"
+       URI="not-wf/sa/013.xml" SECTIONS="2.3 [10]">
+    The quotes on both ends of an attribute value must match. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-014"
+       URI="not-wf/sa/014.xml" SECTIONS="2.3 [10]">
+    Attribute values may not contain literal '&lt;' characters. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-015"
+       URI="not-wf/sa/015.xml" SECTIONS="3.1 [41]">
+    Attribute values need a value, not just an equals sign. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-016"
+       URI="not-wf/sa/016.xml" SECTIONS="3.1 [41]">
+    Attribute values need an associated name.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-017"
+       URI="not-wf/sa/017.xml" SECTIONS="2.7 [18]">
+    CDATA sections need a terminating ']]&gt;'. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-018"
+       URI="not-wf/sa/018.xml" SECTIONS="2.7 [19]">
+    CDATA sections begin with a literal '&lt;![CDATA[', no space.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-019"
+       URI="not-wf/sa/019.xml" SECTIONS="3.1 [42]">
+    End tags may not be abbreviated as '&lt;/&gt;'.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-020"
+       URI="not-wf/sa/020.xml" SECTIONS="2.3 [10]">
+    Attribute values may not contain literal '&amp;'
+    characters except as part of an entity reference. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-021"
+       URI="not-wf/sa/021.xml" SECTIONS="2.3 [10]">
+    Attribute values may not contain literal '&amp;'
+    characters except as part of an entity reference. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-022"
+       URI="not-wf/sa/022.xml" SECTIONS="4.1 [66]">
+    Character references end with semicolons, always!</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-023"
+       URI="not-wf/sa/023.xml" SECTIONS="2.3 [5]">
+    Digits are not valid name start characters. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-024"
+       URI="not-wf/sa/024.xml" SECTIONS="2.3 [5]">
+    Digits are not valid name start characters. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-025"
+       URI="not-wf/sa/025.xml" SECTIONS="2.4 [14]">
+    Text may not contain a literal ']]&gt;' sequence. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-026"
+       URI="not-wf/sa/026.xml" SECTIONS="2.4 [14]">
+    Text may not contain a literal ']]&gt;' sequence. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-027"
+       URI="not-wf/sa/027.xml" SECTIONS="2.5 [15]">
+    Comments must be terminated with "--&gt;".</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-028"
+       URI="not-wf/sa/028.xml" SECTIONS="2.6 [16]">
+    Processing instructions must end with '?&gt;'. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-029"
+       URI="not-wf/sa/029.xml" SECTIONS="2.4 [14]">
+    Text may not contain a literal ']]&gt;' sequence. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-030"
+       URI="not-wf/sa/030.xml" SECTIONS="2.2 [2]">
+    A form feed is not a legal XML character. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-031"
+       URI="not-wf/sa/031.xml" SECTIONS="2.2 [2]">
+    A form feed is not a legal XML character. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-032"
+       URI="not-wf/sa/032.xml" SECTIONS="2.2 [2]">
+    A form feed is not a legal XML character. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-033"
+       URI="not-wf/sa/033.xml" SECTIONS="2.2 [2]">
+    An ESC (octal 033) is not a legal XML character. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-034"
+       URI="not-wf/sa/034.xml" SECTIONS="2.2 [2]">
+    A form feed is not a legal XML character. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-035"
+       URI="not-wf/sa/035.xml" SECTIONS="3.1 [43]">
+    The '&lt;' character is a markup delimiter and must
+    start an element, CDATA section, PI, or comment. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-036"
+       URI="not-wf/sa/036.xml" SECTIONS="2.8 [27]">
+    Text may not appear after the root element. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-037"
+       URI="not-wf/sa/037.xml" SECTIONS="2.8 [27]">
+    Character references may not appear after the root element. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-038"
+       URI="not-wf/sa/038.xml" SECTIONS="3.1">
+    Tests the "Unique Att Spec" WF constraint by providing
+    multiple values for an attribute.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-039"
+       URI="not-wf/sa/039.xml" SECTIONS="3">
+    Tests the Element Type Match WFC - end tag name must
+    match start tag name.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-040"
+       URI="not-wf/sa/040.xml" SECTIONS="2.8 [27]">
+    Provides two document elements.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-041"
+       URI="not-wf/sa/041.xml" SECTIONS="2.8 [27]">
+    Provides two document elements.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-042"
+       URI="not-wf/sa/042.xml" SECTIONS="3.1 [42]">
+     Invalid End Tag </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-043"
+       URI="not-wf/sa/043.xml" SECTIONS="2.8 [27]">
+    Provides #PCDATA text after the document element. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-044"
+       URI="not-wf/sa/044.xml" SECTIONS="2.8 [27]">
+    Provides two document elements.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-045"
+       URI="not-wf/sa/045.xml" SECTIONS="3.1 [44]">
+    Invalid Empty Element Tag </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-046"
+       URI="not-wf/sa/046.xml" SECTIONS="3.1 [40]">
+    This start (or empty element) tag was not terminated correctly. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-047"
+       URI="not-wf/sa/047.xml" SECTIONS="3.1 [44]">
+    Invalid empty element tag invalid whitespace </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-048"
+       URI="not-wf/sa/048.xml" SECTIONS="2.8 [27]">
+    Provides a CDATA section after the root element.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-049"
+       URI="not-wf/sa/049.xml" SECTIONS="3.1 [40]">
+    Missing start tag </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-050"
+       URI="not-wf/sa/050.xml" SECTIONS="2.1 [1]">
+    Empty document, with no root element. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-051"
+       URI="not-wf/sa/051.xml" SECTIONS="2.7 [18]">
+     CDATA is invalid at top level of document.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-052"
+       URI="not-wf/sa/052.xml" SECTIONS="4.1 [66]">
+    Invalid character reference. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-053"
+       URI="not-wf/sa/053.xml" SECTIONS="3.1 [42]">
+    End tag does not match start tag. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-054"
+       URI="not-wf/sa/054.xml" SECTIONS="4.2.2 [75]">
+     PUBLIC requires two literals.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-055"
+       URI="not-wf/sa/055.xml" SECTIONS="2.8 [28]">
+    Invalid Document Type Definition format. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-056"
+       URI="not-wf/sa/056.xml" SECTIONS="2.8 [28]">
+    Invalid Document Type Definition format - misplaced comment. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-057"
+       URI="not-wf/sa/057.xml" SECTIONS="3.2 [45]">
+    This isn't SGML; comments can't exist in declarations. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-058"
+       URI="not-wf/sa/058.xml" SECTIONS="3.3.1 [54]">
+    Invalid character , in ATTLIST enumeration </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-059"
+       URI="not-wf/sa/059.xml" SECTIONS="3.3.1 [59]">
+    String literal must be in quotes. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-060"
+       URI="not-wf/sa/060.xml" SECTIONS="3.3.1 [56]">
+     Invalid type NAME defined in ATTLIST.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-061"
+       URI="not-wf/sa/061.xml" SECTIONS="4.2.2 [75]">
+    External entity declarations require whitespace between public
+    and system IDs.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-062"
+       URI="not-wf/sa/062.xml" SECTIONS="4.2 [71]">
+    Entity declarations need space after the entity name. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-063"
+       URI="not-wf/sa/063.xml" SECTIONS="2.8 [29]">
+    Conditional sections may only appear in the external
+    DTD subset. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-064"
+       URI="not-wf/sa/064.xml" SECTIONS="3.3 [53]">
+    Space is required between attribute type and default values
+    in &lt;!ATTLIST...&gt; declarations. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-065"
+       URI="not-wf/sa/065.xml" SECTIONS="3.3 [53]">
+    Space is required between attribute name and type
+    in &lt;!ATTLIST...&gt; declarations. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-066"
+       URI="not-wf/sa/066.xml" SECTIONS="3.3 [52]">
+    Required whitespace is missing. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-067"
+       URI="not-wf/sa/067.xml" SECTIONS="3.3 [53]">
+    Space is required between attribute type and default values
+    in &lt;!ATTLIST...&gt; declarations. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-068"
+       URI="not-wf/sa/068.xml" SECTIONS="3.3.1 [58]">
+    Space is required between NOTATION keyword and list of
+    enumerated choices in &lt;!ATTLIST...&gt; declarations. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-069"
+       URI="not-wf/sa/069.xml" SECTIONS="4.2.2 [76]">
+    Space is required before an NDATA entity annotation.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-070"
+       URI="not-wf/sa/070.xml" SECTIONS="2.5 [16]">
+    XML comments may not contain "--" </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-071"
+       URI="not-wf/sa/071.xml" SECTIONS="4.1 [68]">
+     ENTITY can't reference itself directly or indirectly.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-072"
+       URI="not-wf/sa/072.xml" SECTIONS="4.1 [68]">
+    Undefined ENTITY foo. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-073"
+       URI="not-wf/sa/073.xml" SECTIONS="4.1 [68]">
+    Undefined ENTITY f. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-074"
+       URI="not-wf/sa/074.xml" SECTIONS="4.3.2">
+    Internal general parsed entities are only well formed if
+    they match the "content" production. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-075"
+       URI="not-wf/sa/075.xml" SECTIONS="4.1 [68]">
+    ENTITY can't reference itself directly or indirectly. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-076"
+       URI="not-wf/sa/076.xml" SECTIONS="4.1 [68]">
+    Undefined ENTITY foo. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-077"
+       URI="not-wf/sa/077.xml" SECTIONS="41. [68]">
+    Undefined ENTITY bar. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-078"
+       URI="not-wf/sa/078.xml" SECTIONS="4.1 [68]">
+    Undefined ENTITY foo. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-079"
+       URI="not-wf/sa/079.xml" SECTIONS="4.1 [68]">
+    ENTITY can't reference itself directly or indirectly. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-080"
+       URI="not-wf/sa/080.xml" SECTIONS="4.1 [68]">
+    ENTITY can't reference itself directly or indirectly. </TEST>
+<TEST TYPE="not-wf" ENTITIES="general" ID="not-wf-sa-081"
+       URI="not-wf/sa/081.xml" SECTIONS="3.1">
+    This tests the <EM>No External Entity References</EM> WFC,
+    since the entity is referred to within an attribute.  </TEST>
+<TEST TYPE="not-wf" ENTITIES="general" ID="not-wf-sa-082"
+       URI="not-wf/sa/082.xml" SECTIONS="3.1">
+    This tests the <EM>No External Entity References</EM> WFC,
+    since the entity is referred to within an attribute.  </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-083"
+       URI="not-wf/sa/083.xml" SECTIONS="4.2.2 [76]">
+    Undefined NOTATION n. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-084"
+       URI="not-wf/sa/084.xml" SECTIONS="4.1">
+    Tests the <EM>Parsed Entity</EM> WFC by referring to an
+    unparsed entity.  (This precedes the error of not declaring
+    that entity's notation, which may be detected any time before
+    the DTD parsing is completed.) </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-085"
+       URI="not-wf/sa/085.xml" SECTIONS="2.3 [13]">
+    Public IDs may not contain "[". </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-086"
+       URI="not-wf/sa/086.xml" SECTIONS="2.3 [13]">
+    Public IDs may not contain "[". </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-087"
+       URI="not-wf/sa/087.xml" SECTIONS="2.3 [13]">
+    Public IDs may not contain "[". </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-088"
+       URI="not-wf/sa/088.xml" SECTIONS="2.3 [10]">
+    Attribute values are terminated by literal quote characters,
+    and any entity expansion is done afterwards. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-089"
+       URI="not-wf/sa/089.xml" SECTIONS="4.2 [74]">
+    Parameter entities "are" always parsed; NDATA annotations
+    are not permitted.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-090"
+       URI="not-wf/sa/090.xml" SECTIONS="2.3 [10]">
+    Attributes may not contain a literal "&lt;" character;
+    this one has one because of reference expansion. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-091"
+       URI="not-wf/sa/091.xml" SECTIONS="4.2 [74]">
+    Parameter entities "are" always parsed; NDATA annotations
+    are not permitted.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-092"
+       URI="not-wf/sa/092.xml" SECTIONS="4.5">
+    The replacement text of this entity has an illegal reference,
+    because the character reference is expanded immediately. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-093"
+       URI="not-wf/sa/093.xml" SECTIONS="4.1 [66]">
+    Hexadecimal character references may not use the uppercase 'X'.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-094"
+       URI="not-wf/sa/094.xml" SECTIONS="2.8 [24]">
+    Prolog VERSION must be lowercase. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-095"
+       URI="not-wf/sa/095.xml" SECTIONS="2.8 [23]">
+    VersionInfo must come before EncodingDecl. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-096"
+       URI="not-wf/sa/096.xml" SECTIONS="2.9 [32]">
+    Space is required before the standalone declaration. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-097"
+       URI="not-wf/sa/097.xml" SECTIONS="2.8 [24]">
+    Both quotes surrounding VersionNum must be the same. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-098"
+       URI="not-wf/sa/098.xml" SECTIONS="2.8 [23]">
+    Only one "version=..." string may appear in an XML declaration.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-099"
+       URI="not-wf/sa/099.xml" SECTIONS="2.8 [23]">
+    Only three pseudo-attributes are in the XML declaration,
+    and "valid=..." is not one of them. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-100"
+       URI="not-wf/sa/100.xml" SECTIONS="2.9 [32]">
+    Only "yes" and "no" are permitted as values of "standalone". </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-101"
+       URI="not-wf/sa/101.xml" SECTIONS="4.3.3 [81]">
+    Space is not permitted in an encoding name. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-102"
+       URI="not-wf/sa/102.xml" SECTIONS="2.8 [26]">
+    Provides an illegal XML version number; spaces are illegal.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-103"
+       URI="not-wf/sa/103.xml" SECTIONS="4.3.2">
+    End-tag required for element foo. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-104"
+       URI="not-wf/sa/104.xml" SECTIONS="4.3.2">
+    Internal general parsed entities are only well formed if
+    they match the "content" production. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-105"
+       URI="not-wf/sa/105.xml" SECTIONS="2.7 ">
+    Invalid placement of CDATA section. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-106"
+       URI="not-wf/sa/106.xml" SECTIONS="4.2">
+    Invalid placement of entity declaration. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-107"
+       URI="not-wf/sa/107.xml" SECTIONS="2.8 [28]">
+     Invalid document type declaration.  CDATA alone is invalid.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-108"
+       URI="not-wf/sa/108.xml" SECTIONS="2.7 [19]">
+    No space in '&lt;![CDATA['.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-109"
+       URI="not-wf/sa/109.xml" SECTIONS="4.2 [70]">
+    Tags invalid within EntityDecl. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-110"
+       URI="not-wf/sa/110.xml" SECTIONS="4.1 [68]">
+    Entity reference must be in content of element. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-111"
+       URI="not-wf/sa/111.xml" SECTIONS="3.1 [43]">
+    Entiry reference must be in content of element not Start-tag. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-112"
+       URI="not-wf/sa/112.xml" SECTIONS="2.7 [19]">
+    CDATA sections start '&lt;![CDATA[', not '&lt;!cdata['.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-113"
+       URI="not-wf/sa/113.xml" SECTIONS="2.3 [9]">
+    Parameter entity values must use valid reference syntax;
+    this reference is malformed.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-114"
+       URI="not-wf/sa/114.xml" SECTIONS="2.3 [9]">
+    General entity values must use valid reference syntax;
+    this reference is malformed.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-115"
+       URI="not-wf/sa/115.xml" SECTIONS="4.5">
+    The replacement text of this entity is an illegal character
+    reference, which must be rejected when it is parsed in the
+    context of an attribute value.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-116"
+       URI="not-wf/sa/116.xml" SECTIONS="4.3.2">
+    Internal general parsed entities are only well formed if
+    they match the "content" production.  This is a partial
+    character reference, not a full one. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-117"
+       URI="not-wf/sa/117.xml" SECTIONS="4.3.2">
+    Internal general parsed entities are only well formed if
+    they match the "content" production.  This is a partial
+    character reference, not a full one. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-118"
+       URI="not-wf/sa/118.xml" SECTIONS="4.1 [68]">
+    Entity reference expansion is not recursive.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-119"
+       URI="not-wf/sa/119.xml" SECTIONS="4.3.2">
+    Internal general parsed entities are only well formed if
+    they match the "content" production.  This is a partial
+    character reference, not a full one. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-120"
+       URI="not-wf/sa/120.xml" SECTIONS="4.5">
+    Character references are expanded in the replacement text of
+    an internal entity, which is then parsed as usual.  Accordingly,
+    &amp; must be doubly quoted - encoded either as <EM>&amp;amp;</EM>
+    or as <EM>&amp;#38;#38;</EM>. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-121"
+       URI="not-wf/sa/121.xml" SECTIONS="4.1 [68]">
+    A name of an ENTITY was started with an invalid character. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-122"
+       URI="not-wf/sa/122.xml" SECTIONS="3.2.1 [47]">
+    Invalid syntax mixed connectors are used. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-123"
+       URI="not-wf/sa/123.xml" SECTIONS="3.2.1 [48]">
+    Invalid syntax mismatched parenthesis. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-124"
+       URI="not-wf/sa/124.xml" SECTIONS="3.2.2 [51]">
+    Invalid format of Mixed-content declaration. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-125"
+       URI="not-wf/sa/125.xml" SECTIONS="3.2.2 [51]">
+    Invalid syntax extra set of parenthesis not necessary. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-126"
+       URI="not-wf/sa/126.xml" SECTIONS="3.2.2 [51]">
+    Invalid syntax Mixed-content must be defined as zero or more. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-127"
+       URI="not-wf/sa/127.xml" SECTIONS="3.2.2 [51]">
+    Invalid syntax Mixed-content must be defined as zero or more. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-128"
+       URI="not-wf/sa/128.xml" SECTIONS="2.7 [18]">
+    Invalid CDATA syntax. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-129"
+       URI="not-wf/sa/129.xml" SECTIONS="3.2 [45]">
+    Invalid syntax for Element Type Declaration. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-130"
+       URI="not-wf/sa/130.xml" SECTIONS="3.2 [45]">
+    Invalid syntax for Element Type Declaration. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-131"
+       URI="not-wf/sa/131.xml" SECTIONS="3.2 [45]">
+    Invalid syntax for Element Type Declaration. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-132"
+       URI="not-wf/sa/132.xml" SECTIONS="3.2.1 [50]">
+    Invalid syntax mixed connectors used. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-133"
+       URI="not-wf/sa/133.xml" SECTIONS="3.2.1">
+    Illegal whitespace before optional character causes syntax error. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-134"
+       URI="not-wf/sa/134.xml" SECTIONS="3.2.1">
+    Illegal whitespace before optional character causes syntax error. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-135"
+       URI="not-wf/sa/135.xml" SECTIONS="3.2.1 [47]">
+    Invalid character used as connector. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-136"
+       URI="not-wf/sa/136.xml" SECTIONS="3.2 [45]">
+    Tag omission is invalid in XML. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-137"
+       URI="not-wf/sa/137.xml" SECTIONS="3.2 [45]">
+    Space is required before a content model. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-138"
+       URI="not-wf/sa/138.xml" SECTIONS="3.2.1 [48]">
+    Invalid syntax for content particle.  </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-139"
+       URI="not-wf/sa/139.xml" SECTIONS="3.2.1 [46]">
+    The element-content model should not be empty. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-140"
+       URI="not-wf/sa/140.xml" SECTIONS="2.3 [4]"
+        EDITION="1 2 3 4">
+    Character '&amp;#x309a;' is a CombiningChar, not a
+    Letter, and so may not begin a name.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-141"
+       URI="not-wf/sa/141.xml" SECTIONS="2.3 [5]"
+        EDITION="1 2 3 4">
+    Character #x0E5C is not legal in XML names. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-142"
+       URI="not-wf/sa/142.xml" SECTIONS="2.2 [2]">
+    Character #x0000 is not legal anywhere in an XML document. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-143"
+       URI="not-wf/sa/143.xml" SECTIONS="2.2 [2]">
+    Character #x001F is not legal anywhere in an XML document. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-144"
+       URI="not-wf/sa/144.xml" SECTIONS="2.2 [2]">
+    Character #xFFFF is not legal anywhere in an XML document. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-145"
+       URI="not-wf/sa/145.xml" SECTIONS="2.2 [2]">
+    Character #xD800 is not legal anywhere in an XML document.  (If it
+    appeared in a UTF-16 surrogate pair, it'd represent half of a UCS-4
+    character and so wouldn't really be in the document.) </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-146"
+       URI="not-wf/sa/146.xml" SECTIONS="2.2 [2]">
+    Character references must also refer to legal XML characters;
+    #x00110000 is one more than the largest legal character.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-147"
+       URI="not-wf/sa/147.xml" SECTIONS="2.8 [22]">
+    XML Declaration may not be preceded by whitespace.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-148"
+       URI="not-wf/sa/148.xml" SECTIONS="2.8 [22]">
+    XML Declaration may not be preceded by comments or whitespace.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-149"
+       URI="not-wf/sa/149.xml" SECTIONS="2.8 [28]">
+    XML Declaration may not be within a DTD.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-150"
+       URI="not-wf/sa/150.xml" SECTIONS="3.1 [43]">
+    XML declarations may not be within element content. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-151"
+       URI="not-wf/sa/151.xml" SECTIONS="2.8 [27]">
+    XML declarations may not follow document content.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-152"
+       URI="not-wf/sa/152.xml" SECTIONS="2.8 [22]">
+    XML declarations must include the "version=..." string.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-153"
+       URI="not-wf/sa/153.xml" SECTIONS="4.3.2">
+    Text declarations may not begin internal parsed entities;
+    they may only appear at the beginning of external parsed
+    (parameter or general) entities. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-154"
+       URI="not-wf/sa/154.xml" SECTIONS="2.8 2.6 [23, 17]">
+    '&lt;?XML ...?&gt;' is neither an XML declaration
+    nor a legal processing instruction target name. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-155"
+       URI="not-wf/sa/155.xml" SECTIONS="2.8 2.6 [23, 17]">
+    '&lt;?xmL ...?&gt;' is neither an XML declaration
+    nor a legal processing instruction target name. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-156"
+       URI="not-wf/sa/156.xml" SECTIONS="2.8 2.6 [23, 17]">
+    '&lt;?xMl ...?&gt;' is neither an XML declaration
+    nor a legal processing instruction target name. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-157"
+       URI="not-wf/sa/157.xml" SECTIONS="2.6 [17]">
+    '&lt;?xmL ...?&gt;' is not a legal processing instruction
+    target name. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-158"
+       URI="not-wf/sa/158.xml" SECTIONS="3.3 [52]">
+    SGML-ism:  "#NOTATION gif" can't have attributes. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-159"
+       URI="not-wf/sa/159.xml" SECTIONS="2.3 [9]">
+    Uses '&amp;' unquoted in an entity declaration,
+    which is illegal syntax for an entity reference.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-160"
+       URI="not-wf/sa/160.xml" SECTIONS="2.8">
+    Violates the <EM>PEs in Internal Subset</EM> WFC
+    by using a PE reference within a declaration. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-161"
+       URI="not-wf/sa/161.xml" SECTIONS="2.8">
+    Violates the <EM>PEs in Internal Subset</EM> WFC
+    by using a PE reference within a declaration. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-162"
+       URI="not-wf/sa/162.xml" SECTIONS="2.8">
+    Violates the <EM>PEs in Internal Subset</EM> WFC
+    by using a PE reference within a declaration. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-163"
+       URI="not-wf/sa/163.xml" SECTIONS="4.1 [69]">
+    Invalid placement of Parameter entity reference. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-164"
+       URI="not-wf/sa/164.xml" SECTIONS="4.1 [69]">
+    Invalid placement of Parameter entity reference. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-165"
+       URI="not-wf/sa/165.xml" SECTIONS="4.2 [72]">
+    Parameter entity declarations must have a space before
+    the '%'. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-166"
+       URI="not-wf/sa/166.xml" SECTIONS="2.2 [2]">
+    Character FFFF is not legal anywhere in an XML document. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-167"
+       URI="not-wf/sa/167.xml" SECTIONS="2.2 [2]">
+    Character FFFE is not legal anywhere in an XML document. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-168"
+       URI="not-wf/sa/168.xml" SECTIONS="2.2 [2]">
+    An unpaired surrogate (D800) is not legal anywhere
+    in an XML document.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-169"
+       URI="not-wf/sa/169.xml" SECTIONS="2.2 [2]">
+    An unpaired surrogate (DC00) is not legal anywhere
+    in an XML document.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-170"
+       URI="not-wf/sa/170.xml" SECTIONS="2.2 [2]">
+    Four byte UTF-8 encodings can encode UCS-4 characters
+    which are beyond the range of legal XML characters
+    (and can't be expressed in Unicode surrogate pairs).
+    This document holds such a character.  </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-171"
+       URI="not-wf/sa/171.xml" SECTIONS="2.2 [2]">
+    Character FFFF is not legal anywhere in an XML document. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-172"
+       URI="not-wf/sa/172.xml" SECTIONS="2.2 [2]">
+    Character FFFF is not legal anywhere in an XML document. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-173"
+       URI="not-wf/sa/173.xml" SECTIONS="2.2 [2]">
+    Character FFFF is not legal anywhere in an XML document. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-174"
+       URI="not-wf/sa/174.xml" SECTIONS="2.2 [2]">
+    Character FFFF is not legal anywhere in an XML document. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-175"
+       URI="not-wf/sa/175.xml" SECTIONS="2.2 [2]">
+    Character FFFF is not legal anywhere in an XML document. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-176"
+       URI="not-wf/sa/176.xml" SECTIONS="3 [39]">
+    Start tags must have matching end tags.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-177"
+       URI="not-wf/sa/177.xml" SECTIONS="2.2 [2]">
+    Character FFFF is not legal anywhere in an XML document. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-178"
+       URI="not-wf/sa/178.xml" SECTIONS="3.1 [41]">
+    Invalid syntax matching double quote is missing. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-179"
+       URI="not-wf/sa/179.xml" SECTIONS="4.1 [66]">
+    Invalid syntax matching double quote is missing. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-180"
+       URI="not-wf/sa/180.xml" SECTIONS="4.1">
+    The <EM>Entity Declared</EM> WFC requires entities to be declared
+    before they are used in an attribute list declaration. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-181"
+       URI="not-wf/sa/181.xml" SECTIONS="4.3.2">
+    Internal parsed entities must match the <EM>content</EM>
+    production to be well formed. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-182"
+       URI="not-wf/sa/182.xml" SECTIONS="4.3.2">
+    Internal parsed entities must match the <EM>content</EM>
+    production to be well formed. </TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-183"
+       URI="not-wf/sa/183.xml" SECTIONS="3.2.2 [51]">
+    Mixed content declarations may not include content particles.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-184"
+       URI="not-wf/sa/184.xml" SECTIONS="3.2.2 [51]">
+    In mixed content models, element names must not be
+    parenthesized. </TEST>
+<TEST TYPE="not-wf" ENTITIES="parameter" ID="not-wf-sa-185"
+       URI="not-wf/sa/185.xml" SECTIONS="4.1">
+    Tests the <EM>Entity Declared</EM> WFC.
+    <EM>Note:</EM>  a nonvalidating parser is permitted not to report
+    this WFC violation, since it would need to read an external
+    parameter entity to distinguish it from a violation of
+    the <EM>Standalone Declaration</EM> VC.</TEST>
+<TEST TYPE="not-wf" ENTITIES="none" ID="not-wf-sa-186"
+       URI="not-wf/sa/186.xml" SECTIONS="3.1 [44]">
+    Whitespace is required between attribute/value pairs. </TEST>
+
+<!-- Start:  not-wf/not-sa -->
+<TEST TYPE="not-wf" ENTITIES="both" ID="not-wf-not-sa-001"
+       URI="not-wf/not-sa/001.xml" SECTIONS="3.4 [62]">
+    Conditional sections must be properly terminated ("]&gt;" used
+    instead of "]]&gt;"). </TEST>
+<TEST TYPE="not-wf" ENTITIES="both" ID="not-wf-not-sa-002"
+       URI="not-wf/not-sa/002.xml" SECTIONS="2.6 [17]">
+    Processing instruction target names may not be "XML" 
+    in any combination of cases. </TEST>
+<TEST TYPE="not-wf" ENTITIES="both" ID="not-wf-not-sa-003"
+       URI="not-wf/not-sa/003.xml" SECTIONS="3.4 [62]">
+    Conditional sections must be properly terminated ("]]&gt;" omitted). </TEST>
+<TEST TYPE="not-wf" ENTITIES="both" ID="not-wf-not-sa-004"
+       URI="not-wf/not-sa/004.xml" SECTIONS="3.4 [62]">
+    Conditional sections must be properly terminated ("]]&gt;" omitted). </TEST>
+<TEST TYPE="error" ENTITIES="both" ID="not-wf-not-sa-005"
+       URI="not-wf/not-sa/005.xml" SECTIONS="4.1">
+    Tests the <EM>Entity Declared</EM> VC by referring to an
+    undefined parameter entity within an external entity.</TEST>
+<TEST TYPE="not-wf" ENTITIES="both" ID="not-wf-not-sa-006"
+       URI="not-wf/not-sa/006.xml" SECTIONS="3.4 [62]">
+    Conditional sections need a '[' after the INCLUDE or IGNORE. </TEST>
+<TEST TYPE="not-wf" ENTITIES="both" ID="not-wf-not-sa-007"
+       URI="not-wf/not-sa/007.xml" SECTIONS="4.3.2 [79]">
+    A &lt;!DOCTYPE ...&gt; declaration may not begin any external
+    entity; it's only found once, in the document entity.</TEST>
+<TEST TYPE="not-wf" ENTITIES="both" ID="not-wf-not-sa-008"
+       URI="not-wf/not-sa/008.xml" SECTIONS="4.1 [69]">
+    In DTDs, the '%' character must be part of a parameter
+    entity reference.</TEST>
+<TEST TYPE="not-wf" ENTITIES="both" ID="not-wf-not-sa-009"
+       URI="not-wf/not-sa/009.xml" SECTIONS="2.8">
+    This test violates WFC:PE Between Declarations in Production 28a.  
+    The last character of a markup declaration is not contained in the same 
+    parameter-entity text replacement.</TEST>
+<!-- Start:  not-wf/ext-sa -->
+<TEST TYPE="not-wf" ENTITIES="both" ID="not-wf-ext-sa-001"
+       URI="not-wf/ext-sa/001.xml" SECTIONS="4.1">
+    Tests the <EM>No Recursion</EM> WFC by having an external general
+    entity be self-recursive.</TEST>
+<TEST TYPE="not-wf" ENTITIES="both" ID="not-wf-ext-sa-002"
+       URI="not-wf/ext-sa/002.xml" SECTIONS="4.3.1 4.3.2 [77, 78]">
+    External entities have "text declarations", which do
+    not permit the "standalone=..." attribute that's allowed
+    in XML declarations.</TEST>
+<TEST TYPE="not-wf" ENTITIES="both" ID="not-wf-ext-sa-003"
+       URI="not-wf/ext-sa/003.xml" SECTIONS="2.6 [17]">
+    Only one text declaration is permitted; a second one
+    looks like an illegal processing instruction (target names
+    of "xml" in any case are not allowed). </TEST>
+
+
+<!-- Start:  invalid/ -->
+
+<TEST TYPE="invalid" ENTITIES="both" ID="invalid--002"
+       URI="invalid/002.xml" SECTIONS="3.2.1">
+    Tests the "Proper Group/PE Nesting" validity constraint by
+    fragmenting a content model between two parameter entities.</TEST>
+<TEST TYPE="invalid" ENTITIES="both" ID="invalid--005"
+       URI="invalid/005.xml" SECTIONS="2.8">
+    Tests the "Proper Declaration/PE Nesting" validity constraint by
+    fragmenting an element declaration between two parameter entities.</TEST>
+<TEST TYPE="invalid" ENTITIES="both" ID="invalid--006"
+       URI="invalid/006.xml" SECTIONS="2.8">
+    Tests the "Proper Declaration/PE Nesting" validity constraint by
+    fragmenting an element declaration between two parameter entities.</TEST>
+<TEST TYPE="invalid" ENTITIES="both" ID="invalid-not-sa-022"
+       URI="invalid/not-sa/022.xml" SECTIONS="3.4 [62]"
+       OUTPUT="invalid/not-sa/out/022.xml">
+    Test the "Proper Conditional Section/ PE Nesting" validity constraint. </TEST>
+
+<!-- Start:  valid/sa -->
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-001"
+       URI="valid/sa/001.xml" SECTIONS="3.2.2 [51]"
+       OUTPUT="valid/sa/out/001.xml">
+    Test demonstrates an Element Type Declaration with Mixed Content. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-002"
+       URI="valid/sa/002.xml" SECTIONS="3.1 [40]"
+       OUTPUT="valid/sa/out/002.xml">
+    Test demonstrates that whitespace is permitted after the tag name in a Start-tag. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-003"
+       URI="valid/sa/003.xml" SECTIONS="3.1 [42]"
+       OUTPUT="valid/sa/out/003.xml">
+    Test demonstrates that whitespace is permitted after the tag name in an End-tag.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-004"
+       URI="valid/sa/004.xml" SECTIONS="3.1 [41]"
+       OUTPUT="valid/sa/out/004.xml">
+    Test demonstrates a valid attribute specification within a Start-tag. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-005"
+       URI="valid/sa/005.xml" SECTIONS="3.1 [40]"
+       OUTPUT="valid/sa/out/005.xml">
+    Test demonstrates a valid attribute specification within a Start-tag that
+contains whitespace on both sides of the equal sign. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-006"
+       URI="valid/sa/006.xml" SECTIONS="3.1 [41]"
+       OUTPUT="valid/sa/out/006.xml">
+    Test demonstrates that the AttValue within a Start-tag can use a single quote as a delimter. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-007"
+       URI="valid/sa/007.xml" SECTIONS="3.1 4.6 [43]"
+       OUTPUT="valid/sa/out/007.xml">
+    Test demonstrates numeric character references can be used for element content. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-008"
+       URI="valid/sa/008.xml" SECTIONS="2.4 3.1 [43]"
+       OUTPUT="valid/sa/out/008.xml">
+    Test demonstrates character references can be used for element content. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-009"
+       URI="valid/sa/009.xml" SECTIONS="2.3 3.1 [43]"
+       OUTPUT="valid/sa/out/009.xml">
+    Test demonstrates that PubidChar can be used for element content. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-010"
+       URI="valid/sa/010.xml" SECTIONS="3.1 [40]"
+       OUTPUT="valid/sa/out/010.xml">
+    Test demonstrates that whitespace is valid after the Attribute in a Start-tag. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-011"
+       URI="valid/sa/011.xml" SECTIONS="3.1 [40]"
+       OUTPUT="valid/sa/out/011.xml">
+    Test demonstrates mutliple Attibutes within the Start-tag. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-012"
+       URI="valid/sa/012.xml" SECTIONS="2.3 [4]"
+       OUTPUT="valid/sa/out/012.xml" NAMESPACE="no">
+    Uses a legal XML 1.0 name consisting of a single colon
+    character (disallowed by the latest XML Namespaces draft).</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-013"
+       URI="valid/sa/013.xml" SECTIONS="2.3 3.1 [13] [40]"
+       OUTPUT="valid/sa/out/013.xml">
+    Test demonstrates that the Attribute in a Start-tag can consist of numerals along with special characters. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-014"
+       URI="valid/sa/014.xml" SECTIONS="2.3 3.1 [13] [40]"
+       OUTPUT="valid/sa/out/014.xml">
+    Test demonstrates that all lower case letters are valid for the Attribute in a Start-tag. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-015"
+       URI="valid/sa/015.xml" SECTIONS="2.3 3.1 [13] [40]"
+       OUTPUT="valid/sa/out/015.xml">
+    Test demonstrates that all upper case letters are valid for the Attribute in a Start-tag. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-016"
+       URI="valid/sa/016.xml" SECTIONS="2.6 3.1 [16] [43]"
+       OUTPUT="valid/sa/out/016.xml">
+    Test demonstrates that Processing Instructions are valid element content. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-017"
+       URI="valid/sa/017.xml" SECTIONS="2.6 3.1 [16] [43]"
+       OUTPUT="valid/sa/out/017.xml">
+    Test demonstrates that Processing Instructions are valid element content and there can be more than one. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-018"
+       URI="valid/sa/018.xml" SECTIONS="2.7 3.1 [18] [43]"
+       OUTPUT="valid/sa/out/018.xml">
+    Test demonstrates that CDATA sections are valid element content. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-019"
+       URI="valid/sa/019.xml" SECTIONS="2.7 3.1 [18] [43]"
+       OUTPUT="valid/sa/out/019.xml">
+    Test demonstrates that CDATA sections are valid element content and that
+ampersands may occur in their literal form. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-020"
+       URI="valid/sa/020.xml" SECTIONS="2.7 3.1 [18] [43]"
+       OUTPUT="valid/sa/out/020.xml">
+   Test demonstractes that CDATA sections are valid element content and that
+everyting between the CDStart and CDEnd is recognized as character data not markup.  </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-021"
+       URI="valid/sa/021.xml" SECTIONS="2.5 3.1 [15] [43]"
+       OUTPUT="valid/sa/out/021.xml">
+    Test demonstrates that comments are valid element content. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-022"
+       URI="valid/sa/022.xml" SECTIONS="2.5 3.1 [15] [43]"
+       OUTPUT="valid/sa/out/022.xml">
+    Test demonstrates that comments are valid element content and that all characters before the double-hypen right angle combination are considered part of thecomment. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-023"
+       URI="valid/sa/023.xml" SECTIONS="3.1 [43]"
+       OUTPUT="valid/sa/out/023.xml">
+    Test demonstrates that Entity References are valid element content. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-024"
+       URI="valid/sa/024.xml" SECTIONS="3.1 4.1 [43] [66]"
+       OUTPUT="valid/sa/out/024.xml">
+    Test demonstrates that Entity References are valid element content and also demonstrates a valid Entity Declaration. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-025"
+       URI="valid/sa/025.xml" SECTIONS="3.2 [46]"
+       OUTPUT="valid/sa/out/025.xml">
+    Test demonstrates an Element Type Declaration and that the contentspec can be of mixed content. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-026"
+       URI="valid/sa/026.xml" SECTIONS="3.2 [46]"
+       OUTPUT="valid/sa/out/026.xml">
+    Test demonstrates an Element Type Declaration and that EMPTY is a valid contentspec. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-027"
+       URI="valid/sa/027.xml" SECTIONS="3.2 [46]"
+       OUTPUT="valid/sa/out/027.xml">
+    Test demonstrates an Element Type Declaration and that ANY is a valid contenspec. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-028"
+       URI="valid/sa/028.xml" SECTIONS="2.8 [24]"
+       OUTPUT="valid/sa/out/028.xml">
+    Test demonstrates a valid prolog that uses double quotes as delimeters around the VersionNum. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-029"
+       URI="valid/sa/029.xml" SECTIONS="2.8 [24]"
+       OUTPUT="valid/sa/out/029.xml">
+    Test demonstrates a valid prolog that uses single quotes as delimters around the VersionNum. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-030"
+       URI="valid/sa/030.xml" SECTIONS="2.8 [25]"
+       OUTPUT="valid/sa/out/030.xml">
+    Test demonstrates a valid prolog that contains whitespace on both sides of the equal sign in the VersionInfo. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-031"
+       URI="valid/sa/031.xml" SECTIONS="4.3.3 [80]"
+       OUTPUT="valid/sa/out/031.xml">
+    Test demonstrates a valid EncodingDecl within the prolog. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-032"
+       URI="valid/sa/032.xml" SECTIONS="2.9 [32]"
+       OUTPUT="valid/sa/out/032.xml">
+    Test demonstrates a valid SDDecl within the prolog. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-033"
+       URI="valid/sa/033.xml" SECTIONS="2.8 [23]"
+       OUTPUT="valid/sa/out/033.xml">
+    Test demonstrates that both a EncodingDecl and SDDecl are valid within the prolog. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-034"
+       URI="valid/sa/034.xml" SECTIONS="3.1 [44]"
+       OUTPUT="valid/sa/out/034.xml">
+    Test demonstrates the correct syntax for an Empty element tag. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-035"
+       URI="valid/sa/035.xml" SECTIONS="3.1 [44]"
+       OUTPUT="valid/sa/out/035.xml">
+    Test demonstrates that whitespace is permissible after the name in an Empty element tag. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-036"
+       URI="valid/sa/036.xml" SECTIONS="2.6 [16]"
+       OUTPUT="valid/sa/out/036.xml">
+    Test demonstrates a valid processing instruction. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-037"
+       URI="valid/sa/037.xml" SECTIONS="2.6 [15]"
+       OUTPUT="valid/sa/out/037.xml">
+    Test demonstrates a valid comment and that it may appear anywhere in the document including at the end. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-038"
+       URI="valid/sa/038.xml" SECTIONS="2.6 [15]"
+       OUTPUT="valid/sa/out/038.xml">
+    Test demonstrates a valid comment and that it may appear anywhere in the document including the beginning. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-039"
+       URI="valid/sa/039.xml" SECTIONS="2.6 [16]"
+       OUTPUT="valid/sa/out/039.xml">
+    Test demonstrates a valid processing instruction and that it may appear at the beginning of the document. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-040"
+       URI="valid/sa/040.xml" SECTIONS="3.3 3.3.1 [52] [54]"
+       OUTPUT="valid/sa/out/040.xml">
+    Test demonstrates an Attribute List declaration that uses a StringType as the AttType. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-041"
+       URI="valid/sa/041.xml" SECTIONS="3.3.1 4.1 [54] [66]"
+       OUTPUT="valid/sa/out/041.xml">
+    Test demonstrates an Attribute List declaration that uses a StringType as the AttType and also expands the CDATA attribute with a character reference. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-042"
+       URI="valid/sa/042.xml" SECTIONS="3.3.1 4.1 [54] [66]"
+       OUTPUT="valid/sa/out/042.xml">
+    Test demonstrates an Attribute List declaration that uses a StringType as the AttType and also expands the CDATA attribute with a character reference.  The test also shows that the leading zeros in the character reference are ignored. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-043"
+       URI="valid/sa/043.xml" SECTIONS="3.3"
+       OUTPUT="valid/sa/out/043.xml">
+    An element's attributes may be declared before its content
+    model; and attribute values may contain newlines.  </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-044"
+       URI="valid/sa/044.xml" SECTIONS="3.1 [44]"
+       OUTPUT="valid/sa/out/044.xml">
+    Test demonstrates that the empty-element tag must be use for an elements that are declared EMPTY. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-045"
+       URI="valid/sa/045.xml" SECTIONS="3.3 [52]"
+       OUTPUT="valid/sa/out/045.xml">
+    Tests whether more than one definition can be provided for the same attribute of a given element type with the first declaration being binding. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-046"
+       URI="valid/sa/046.xml" SECTIONS="3.3 [52]"
+       OUTPUT="valid/sa/out/046.xml">
+    Test demonstrates that when more than one AttlistDecl is provided for a given element type, the contents of all those provided are merged. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-047"
+       URI="valid/sa/047.xml" SECTIONS="3.1 [43]"
+       OUTPUT="valid/sa/out/047.xml">
+    Test demonstrates that extra whitespace is normalized into single space character. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-048"
+       URI="valid/sa/048.xml" SECTIONS="2.4 3.1 [14] [43]"
+       OUTPUT="valid/sa/out/048.xml">
+    Test demonstrates that character data is valid element content. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-049"
+       URI="valid/sa/049.xml" SECTIONS="2.2 [2]"
+       OUTPUT="valid/sa/out/049.xml">
+    Test demonstrates that characters outside of normal ascii range can be used as element content. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-050"
+       URI="valid/sa/050.xml" SECTIONS="2.2 [2]"
+       OUTPUT="valid/sa/out/050.xml">
+    Test demonstrates that characters outside of normal ascii range can be used as element content. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-051"
+       URI="valid/sa/051.xml" SECTIONS="2.2 [2]"
+       OUTPUT="valid/sa/out/051.xml">
+    The document is encoded in UTF-16 and uses some name
+    characters well outside of the normal ASCII range.
+    </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-052"
+       URI="valid/sa/052.xml" SECTIONS="2.2 [2]"
+       OUTPUT="valid/sa/out/052.xml">
+    The document is encoded in UTF-8 and the text inside the
+    root element uses two non-ASCII characters, encoded in UTF-8
+    and each of which expands to a Unicode surrogate pair.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-053"
+       URI="valid/sa/053.xml" SECTIONS="4.4.2"
+       OUTPUT="valid/sa/out/053.xml">
+    Tests inclusion of a well-formed internal entity, which
+    holds an element required by the content model.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-054"
+       URI="valid/sa/054.xml" SECTIONS="3.1 [40] [42]"
+       OUTPUT="valid/sa/out/054.xml">
+    Test demonstrates that extra whitespace within Start-tags and End-tags are nomalized into single spaces. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-055"
+       URI="valid/sa/055.xml" SECTIONS="2.6 2.10 [16]"
+       OUTPUT="valid/sa/out/055.xml">
+    Test demonstrates that extra whitespace within a processing instruction willnormalized into s single space character. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-056"
+       URI="valid/sa/056.xml" SECTIONS="3.3.1 4.1 [54] [66]"
+       OUTPUT="valid/sa/out/056.xml">
+    Test demonstrates an Attribute List declaration that uses a StringType as the AttType and also expands the CDATA attribute with a character reference.  The test also shows that the leading zeros in the character reference are ignored. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-057"
+       URI="valid/sa/057.xml" SECTIONS="3.2.1 [47]"
+       OUTPUT="valid/sa/out/057.xml">
+    Test demonstrates an element content model whose element can occur zero or more times. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-058"
+       URI="valid/sa/058.xml" SECTIONS="3.3.3"
+       OUTPUT="valid/sa/out/058.xml">
+    Test demonstrates that extra whitespace be normalized into a single space character in an attribute of type NMTOKENS. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-059"
+       URI="valid/sa/059.xml" SECTIONS="3.2 3.3 [46] [53]"
+       OUTPUT="valid/sa/out/059.xml">
+    Test demonstrates an Element Type Declaration that uses the contentspec of EMPTY.  The element cannot have any contents and must always appear as an empty element in the document.  The test also shows an Attribute-list declaration with multiple AttDef's. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-060"
+       URI="valid/sa/060.xml" SECTIONS="4.1 [66]"
+       OUTPUT="valid/sa/out/060.xml">
+    Test demonstrates the use of decimal Character References within element content. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-061"
+       URI="valid/sa/061.xml" SECTIONS="4.1 [66]"
+       OUTPUT="valid/sa/out/061.xml">
+    Test demonstrates the use of decimal Character References within element content. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-062"
+       URI="valid/sa/062.xml" SECTIONS="4.1 [66]"
+       OUTPUT="valid/sa/out/062.xml">
+    Test demonstrates the use of hexadecimal Character References within element.  </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-063"
+       URI="valid/sa/063.xml" SECTIONS="2.3 [5]"
+       OUTPUT="valid/sa/out/063.xml">
+    The document is encoded in UTF-8 and the name of the
+    root element type uses non-ASCII characters.  </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-064"
+       URI="valid/sa/064.xml" SECTIONS="4.1 [66]"
+       OUTPUT="valid/sa/out/064.xml">
+    Tests in-line handling of two legal character references, which
+    each expand to a Unicode surrogate pair.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-065"
+       URI="valid/sa/065.xml" SECTIONS="4.5"
+       OUTPUT="valid/sa/out/065.xml">
+    Tests ability to define an internal entity which can't
+    legally be expanded (contains an unquoted <B>&lt;</B>).</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-066"
+       URI="valid/sa/066.xml" SECTIONS="4.1 [66]"
+       OUTPUT="valid/sa/out/066.xml">
+    Expands a CDATA attribute with a character reference.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-067"
+       URI="valid/sa/067.xml" SECTIONS="4.1 [66]"
+       OUTPUT="valid/sa/out/067.xml">
+    Test demonstrates the use of decimal character references within element content. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-068"
+       URI="valid/sa/068.xml" SECTIONS="2.11, 4.5"
+       OUTPUT="valid/sa/out/068.xml">
+    Tests definition of an internal entity holding a carriage return character
+    reference, which must not be normalized before reporting to the application.  Line 
+    break normalization only occurs when parsing external parsed entities.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-069"
+       URI="valid/sa/069.xml" SECTIONS="4.7"
+       OUTPUT="valid/sa/out/069.xml">
+    Verifies that an XML parser will parse a NOTATION
+    declaration; the output phase of this test ensures that
+    it's reported to the application. </TEST>
+<TEST TYPE="valid" ENTITIES="parameter" ID="valid-sa-070"
+       URI="valid/sa/070.xml" SECTIONS="4.4.8"
+       OUTPUT="valid/sa/out/070.xml">
+    Verifies that internal parameter entities are correctly
+    expanded within the internal subset.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-071"
+       URI="valid/sa/071.xml" SECTIONS="3.3 3.3.1 [52] [56]"
+       OUTPUT="valid/sa/out/071.xml">
+    Test demonstrates that an AttlistDecl can use ID as the TokenizedType within the Attribute type.  The test also shows that IMPLIED is a valid DefaultDecl. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-072"
+       URI="valid/sa/072.xml" SECTIONS="3.3 3.3.1 [52] [56]"
+       OUTPUT="valid/sa/out/072.xml">
+    Test demonstrates that an AttlistDecl can use IDREF as the TokenizedType within the Attribute type.  The test also shows that IMPLIED is a valid DefaultDecl. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-073"
+       URI="valid/sa/073.xml" SECTIONS="3.3 3.3.1 [52] [56]"
+       OUTPUT="valid/sa/out/073.xml">
+    Test demonstrates that an AttlistDecl can use IDREFS as the TokenizedType within the Attribute type.  The test also shows that IMPLIED is a valid DefaultDecl. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-074"
+       URI="valid/sa/074.xml" SECTIONS="3.3 3.3.1 [52] [56]"
+       OUTPUT="valid/sa/out/074.xml">
+    Test demonstrates that an AttlistDecl can use ENTITY as the TokenizedType within the Attribute type.  The test also shows that IMPLIED is a valid DefaultDecl. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-075"
+       URI="valid/sa/075.xml" SECTIONS="3.3 3.3.1 [52] [56]"
+       OUTPUT="valid/sa/out/075.xml">
+    Test demonstrates that an AttlistDecl can use ENTITIES as the TokenizedType within the Attribute type.  The test also shows that IMPLIED is a valid DefaultDecl. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-076"
+       URI="valid/sa/076.xml" SECTIONS="3.3.1"
+       OUTPUT="valid/sa/out/076.xml">
+    Verifies that an XML parser will parse a NOTATION
+    attribute; the output phase of this test ensures that
+    both notations are reported to the application. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-077"
+       URI="valid/sa/077.xml" SECTIONS="3.3 3.3.1 [52] [54]"
+       OUTPUT="valid/sa/out/077.xml">
+    Test demonstrates that an AttlistDecl can use an EnumeratedType within the Attribute type.  The test also shows that IMPLIED is a valid DefaultDecl. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-078"
+       URI="valid/sa/078.xml" SECTIONS="3.3 3.3.1 [52] [54]"
+       OUTPUT="valid/sa/out/078.xml">
+    Test demonstrates that an AttlistDecl can use an StringType of CDATA within the Attribute type.  The test also shows that REQUIRED is a valid DefaultDecl. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-079"
+       URI="valid/sa/079.xml" SECTIONS="3.3 3.3.2 [52] [60]"
+       OUTPUT="valid/sa/out/079.xml">
+    Test demonstrates that an AttlistDecl can use an StringType of CDATA within the Attribute type.  The test also shows that FIXED is a valid DefaultDecl and that a value can be given to the attribute in the Start-tag as well as the AttListDecl. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-080"
+       URI="valid/sa/080.xml" SECTIONS="3.3 3.3.2 [52] [60]"
+       OUTPUT="valid/sa/out/080.xml">
+    Test demonstrates that an AttlistDecl can use an StringType of CDATA within the Attribute type.  The test also shows that FIXED is a valid DefaultDecl and that an value can be given to the attribute. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-081"
+       URI="valid/sa/081.xml" SECTIONS="3.2.1 [50]"
+       OUTPUT="valid/sa/out/081.xml">
+    Test demonstrates the use of the optional character following a name or list  to govern the number of times an element or content particles in the list occur. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-082"
+       URI="valid/sa/082.xml" SECTIONS="4.2 [72]"
+       OUTPUT="valid/sa/out/082.xml">
+    Tests that an external PE may be defined (but not referenced).</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-083"
+       URI="valid/sa/083.xml" SECTIONS="4.2 [72]"
+       OUTPUT="valid/sa/out/083.xml">
+    Tests that an external PE may be defined (but not referenced).</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-084"
+       URI="valid/sa/084.xml" SECTIONS="2.10"
+       OUTPUT="valid/sa/out/084.xml">
+    Test demonstrates that although whitespace can be used to set apart markup for greater readability it is not necessary. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-085"
+       URI="valid/sa/085.xml" SECTIONS="4"
+       OUTPUT="valid/sa/out/085.xml">
+    Parameter and General entities use different namespaces,
+    so there can be an entity of each type with a given name.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-086"
+       URI="valid/sa/086.xml" SECTIONS="4.2"
+       OUTPUT="valid/sa/out/086.xml">
+    Tests whether entities may be declared more than once,
+    with the first declaration being the binding one. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-087"
+       URI="valid/sa/087.xml" SECTIONS="4.5"
+       OUTPUT="valid/sa/out/087.xml">
+    Tests whether character references in internal entities are
+    expanded early enough, by relying on correct handling to
+    make the entity be well formed.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-088"
+       URI="valid/sa/088.xml" SECTIONS="4.5"
+       OUTPUT="valid/sa/out/088.xml">
+    Tests whether entity references in internal entities are
+    expanded late enough, by relying on correct handling to
+    make the expanded text be valid.  (If it's expanded too
+    early, the entity will parse as an element that's not
+    valid in that context.)</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-089"
+       URI="valid/sa/089.xml" SECTIONS="4.1 [66]"
+       OUTPUT="valid/sa/out/089.xml">
+    Tests entity expansion of three legal character references,
+    which each expand to a Unicode surrogate pair.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-090"
+       URI="valid/sa/090.xml" SECTIONS="3.3.1"
+       OUTPUT="valid/sa/out/090.xml">
+    Verifies that an XML parser will parse a NOTATION
+    attribute; the output phase of this test ensures that
+    the notation is reported to the application. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-091"
+       URI="valid/sa/091.xml" SECTIONS="3.3.1"
+       OUTPUT="valid/sa/out/091.xml">
+    Verifies that an XML parser will parse an ENTITY
+    attribute; the output phase of this test ensures that
+    the notation is reported to the application, and for
+    validating parsers it further tests that the entity
+    is so reported.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-092"
+       URI="valid/sa/092.xml" SECTIONS="2.3 2.10"
+       OUTPUT="valid/sa/out/092.xml">
+    Test demostrates that extra whitespace is normalized into a single space character. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-093"
+       URI="valid/sa/093.xml" SECTIONS="2.10"
+       OUTPUT="valid/sa/out/093.xml">
+    Test demonstrates that extra whitespace is not intended for inclusion in the delivered version of the document. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-094"
+       OUTPUT="valid/sa/out/094.xml"
+       URI="valid/sa/094.xml" SECTIONS="2.8">
+    Attribute defaults with a DTD have special parsing rules, different
+    from other strings.  That means that characters found there may look
+    like an undefined parameter entity reference "within a markup
+    declaration", but they aren't ... so they can't be violating
+    the <EM>PEs in Internal Subset</EM> WFC. 
+    </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-095"
+       URI="valid/sa/095.xml" SECTIONS="3.3.3"
+       OUTPUT="valid/sa/out/095.xml">
+    Basically an output test, this requires extra whitespace
+    to be normalized into a single space character in an
+    attribute of type NMTOKENS.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-096"
+       URI="valid/sa/096.xml" SECTIONS="3.3.3"
+       OUTPUT="valid/sa/out/096.xml">
+    Test demonstrates that extra whitespace is normalized into a single space character in an attribute of type NMTOKENS. </TEST>
+<TEST TYPE="valid" ENTITIES="parameter" ID="valid-sa-097"
+       URI="valid/sa/097.xml" SECTIONS="3.3"
+       OUTPUT="valid/sa/out/097.xml">
+    Basically an output test, this tests whether an externally
+    defined attribute declaration (with a default) takes proper
+    precedence over a subsequent internal declaration.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-098"
+       URI="valid/sa/098.xml" SECTIONS="2.6 2.10 [16]"
+       OUTPUT="valid/sa/out/098.xml">
+    Test demonstrates that extra whitespace within a processing instruction is converted into a single space character.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-099"
+       URI="valid/sa/099.xml" SECTIONS="4.3.3 [81]"
+       OUTPUT="valid/sa/out/099.xml">
+    Test demonstrates the name of the encoding can be composed of lowercase characters. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-100"
+       URI="valid/sa/100.xml" SECTIONS="2.3 [12]"
+       OUTPUT="valid/sa/out/100.xml">
+    Makes sure that PUBLIC identifiers may have some strange
+    characters.  <EM>NOTE:  The XML editors have said that the XML
+    specification errata will specify that parameter entity expansion
+    does not occur in PUBLIC identifiers, so that the '%' character
+    will not flag a malformed parameter entity reference.</EM></TEST> 
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-101"
+       URI="valid/sa/101.xml" SECTIONS="4.5"
+       OUTPUT="valid/sa/out/101.xml">
+    This tests whether entity expansion is (incorrectly) done
+    while processing entity declarations; if it is, the entity
+    value literal will terminate prematurely.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-102"
+       URI="valid/sa/102.xml" SECTIONS="3.3.3"
+       OUTPUT="valid/sa/out/102.xml">
+    Test demonstrates that a CDATA attribute can pass a double quote as its value. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-103"
+       URI="valid/sa/103.xml" SECTIONS="3.3.3"
+       OUTPUT="valid/sa/out/103.xml">
+    Test demonstrates that an attribute can pass a less than sign as its value. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-104"
+       URI="valid/sa/104.xml" SECTIONS="3.1 [40]"
+       OUTPUT="valid/sa/out/104.xml">
+    Test demonstrates that extra whitespace within an Attribute of a Start-tag is normalized to a single space character. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-105"
+       URI="valid/sa/105.xml" SECTIONS="3.3.3"
+       OUTPUT="valid/sa/out/105.xml">
+    Basically an output test, this requires a CDATA attribute
+    with a tab character to be passed through as one space.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-106"
+       URI="valid/sa/106.xml" SECTIONS="3.3.3"
+       OUTPUT="valid/sa/out/106.xml">
+    Basically an output test, this requires a CDATA attribute
+    with a newline character to be passed through as one space.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-107"
+       URI="valid/sa/107.xml" SECTIONS="3.3.3"
+       OUTPUT="valid/sa/out/107.xml">
+    Basically an output test, this requires a CDATA attribute
+    with a return character to be passed through as one space.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-108"
+       URI="valid/sa/108.xml" SECTIONS="2.11, 3.3.3"
+       OUTPUT="valid/sa/out/108.xml">
+    This tests normalization of end-of-line characters (CRLF)
+    within entities to LF, primarily as an output test. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-109"
+       URI="valid/sa/109.xml" SECTIONS="2.3 3.1 [10][40][41]"
+       OUTPUT="valid/sa/out/109.xml">
+    Test demonstrates that an attribute can have a null value. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-110"
+       URI="valid/sa/110.xml" SECTIONS="3.3.3"
+       OUTPUT="valid/sa/out/110.xml">
+    Basically an output test, this requires that a CDATA
+    attribute with a CRLF be normalized to one space.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-111"
+       URI="valid/sa/111.xml" SECTIONS="3.3.3"
+       OUTPUT="valid/sa/out/111.xml">
+    Character references expanding to spaces doesn't affect
+    treatment of attributes. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-112"
+       URI="valid/sa/112.xml" SECTIONS="3.2.1 [48][49]"
+       OUTPUT="valid/sa/out/112.xml">
+    Test demonstrates shows the use of content particles within the element content. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-113"
+       URI="valid/sa/113.xml" SECTIONS="3.3 [52][53]"
+       OUTPUT="valid/sa/out/113.xml">
+     Test demonstrates that it is not an error to have attributes declared for an element not itself declared.</TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-114"
+       URI="valid/sa/114.xml" SECTIONS="2.7 [20]"
+       OUTPUT="valid/sa/out/114.xml">
+    Test demonstrates that all text within a valid CDATA section is considered text and not recognized as markup. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-115"
+       URI="valid/sa/115.xml" SECTIONS="3.3.3"
+       OUTPUT="valid/sa/out/115.xml">
+    Test demonstrates that an entity reference is processed by recursively processing the replacement text of the entity. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-116"
+       URI="valid/sa/116.xml" SECTIONS="2.11"
+       OUTPUT="valid/sa/out/116.xml">
+    Test demonstrates that a line break within CDATA will be normalized. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-117"
+       URI="valid/sa/117.xml" SECTIONS="4.5"
+       OUTPUT="valid/sa/out/117.xml">
+    Test demonstrates that entity expansion is done while processing entity declarations.  </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-118"
+       URI="valid/sa/118.xml" SECTIONS="4.5"
+       OUTPUT="valid/sa/out/118.xml">
+    Test demonstrates that entity expansion is done while processing entity declarations. </TEST>
+<TEST TYPE="valid" ENTITIES="none" ID="valid-sa-119"
+       URI="valid/sa/119.xml" SECTIONS="2.5"
+       OUTPUT="valid/sa/out/119.xml">
+    Comments may contain any legal XML characters;
+    only the string "--" is disallowed.</TEST>
+
+
+<!-- Start:  valid/not-sa -->
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-001"
+       URI="valid/not-sa/001.xml" SECTIONS="4.2.2 [75]"
+       OUTPUT="valid/not-sa/out/001.xml">
+    Test demonstrates the use of an ExternalID within a document type definition. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-002"
+       URI="valid/not-sa/002.xml" SECTIONS="4.2.2 [75]"
+       OUTPUT="valid/not-sa/out/002.xml">
+    Test demonstrates the use of an ExternalID within a document type definition. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-003"
+       URI="valid/not-sa/003.xml" SECTIONS="4.1 [69]"
+       OUTPUT="valid/not-sa/out/003.xml">
+    Test demonstrates the expansion of an external parameter entity that declares an attribute. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-004"
+       URI="valid/not-sa/004.xml" SECTIONS="4.1 [69]"
+       OUTPUT="valid/not-sa/out/004.xml">
+    Expands an external parameter entity in two different ways,
+    with one of them declaring an attribute.</TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-005"
+       URI="valid/not-sa/005.xml" SECTIONS="4.1 [69]"
+       OUTPUT="valid/not-sa/out/005.xml">
+    Test demonstrates the expansion of an external parameter entity that declares an attribute. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-006"
+       URI="valid/not-sa/006.xml" SECTIONS="3.3 [52]"
+       OUTPUT="valid/not-sa/out/006.xml">
+    Test demonstrates that when more than one definition is provided for the same attribute of a given element type only the first declaration is binding. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-007"
+       URI="valid/not-sa/007.xml" SECTIONS="3.3 [52]"
+       OUTPUT="valid/not-sa/out/007.xml">
+    Test demonstrates the use of an Attribute list declaration within an external entity. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-008"
+       URI="valid/not-sa/008.xml" SECTIONS="4.2.2 [75]"
+       OUTPUT="valid/not-sa/out/008.xml">
+    Test demonstrates that an external identifier may include a public identifier. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-009"
+       URI="valid/not-sa/009.xml" SECTIONS="4.2.2 [75]"
+       OUTPUT="valid/not-sa/out/009.xml">
+    Test demonstrates that an external identifier may include a public identifier. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-010"
+       URI="valid/not-sa/010.xml" SECTIONS="3.3 [52]"
+       OUTPUT="valid/not-sa/out/010.xml">
+    Test demonstrates that when more that one definition is provided for the same attribute of a given element type only the first declaration is binding. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-011"
+       URI="valid/not-sa/011.xml" SECTIONS="4.2 4.2.1 [72] [75]"
+       OUTPUT="valid/not-sa/out/011.xml">
+    Test demonstrates a parameter entity declaration whose parameter entity definition is an ExternalID. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-012"
+       URI="valid/not-sa/012.xml" SECTIONS="4.3.1 [77]"
+       OUTPUT="valid/not-sa/out/012.xml">
+    Test demonstrates an enternal parsed entity that begins with a text declaration. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-013"
+       URI="valid/not-sa/013.xml" SECTIONS="3.4 [62]"
+       OUTPUT="valid/not-sa/out/013.xml">
+    Test demonstrates the use of the conditional section INCLUDE that will include its contents as part of the DTD. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-014"
+       URI="valid/not-sa/014.xml" SECTIONS="3.4 [62]"
+       OUTPUT="valid/not-sa/out/014.xml">
+    Test demonstrates the use of the conditional section INCLUDE that will include its contents as part of the DTD.  The keyword is a parameter-entity reference. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-015"
+       URI="valid/not-sa/015.xml" SECTIONS="3.4 [63]"
+       OUTPUT="valid/not-sa/out/015.xml">
+    Test demonstrates the use of the conditonal section IGNORE the will ignore its content from being part of the DTD.  The keyword is a parameter-entity reference. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-016"
+       URI="valid/not-sa/016.xml" SECTIONS="3.4 [62]"
+       OUTPUT="valid/not-sa/out/016.xml">
+    Test demonstrates the use of the conditional section INCLUDE that will include its contents as part of the DTD.  The keyword is a parameter-entity reference.</TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-017"
+       URI="valid/not-sa/017.xml" SECTIONS="4.2 [72]"
+       OUTPUT="valid/not-sa/out/017.xml">
+    Test demonstrates a parameter entity declaration that contains an attribute list declaration. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-018"
+       URI="valid/not-sa/018.xml" SECTIONS="4.2.2 [75]"
+       OUTPUT="valid/not-sa/out/018.xml">
+    Test demonstrates an EnternalID whose contents contain an parameter entity declaration and a attribute list definition. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-019"
+       URI="valid/not-sa/019.xml" SECTIONS="4.4.8"
+       OUTPUT="valid/not-sa/out/019.xml">
+    Test demonstrates that a parameter entity will be expanded with spaces on either side. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-020"
+       URI="valid/not-sa/020.xml" SECTIONS="4.4.8"
+       OUTPUT="valid/not-sa/out/020.xml">
+    Parameter entities expand with spaces on either side.</TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-021"
+       URI="valid/not-sa/021.xml" SECTIONS="4.2 [72]"
+       OUTPUT="valid/not-sa/out/021.xml">
+    Test demonstrates a parameter entity declaration that contains a partial attribute list declaration. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-023"
+       URI="valid/not-sa/023.xml" SECTIONS="2.3 4.1 [10] [69]"
+       OUTPUT="valid/not-sa/out/023.xml">
+    Test demonstrates the use of a parameter entity reference within an attribute list declaration.
+</TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-024"
+       URI="valid/not-sa/024.xml" SECTIONS="2.8, 4.1 [69]"
+       OUTPUT="valid/not-sa/out/024.xml">
+    Constructs an &lt;!ATTLIST...&gt; declaration from several PEs.</TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-025"
+       URI="valid/not-sa/025.xml" SECTIONS="4.2"
+       OUTPUT="valid/not-sa/out/025.xml">
+    Test demonstrates that when more that one definition is provided for the same entity only the first declaration is binding. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-026"
+       URI="valid/not-sa/026.xml" SECTIONS="3.3 [52]"
+       OUTPUT="valid/not-sa/out/026.xml">
+    Test demonstrates that when more that one definition is provided for the same attribute of a given element type only the first declaration is binding. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-027"
+       URI="valid/not-sa/027.xml" SECTIONS="4.1 [69]"
+       OUTPUT="valid/not-sa/out/027.xml">
+    Test demonstrates a parameter entity reference whose value is NULL. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-028"
+       URI="valid/not-sa/028.xml" SECTIONS="3.4 [62]"
+       OUTPUT="valid/not-sa/out/028.xml">
+    Test demonstrates the use of the conditional section INCLUDE that will include its contents. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-029"
+       URI="valid/not-sa/029.xml" SECTIONS="3.4 [62]"
+       OUTPUT="valid/not-sa/out/029.xml">
+    Test demonstrates the use of the conditonal section IGNORE the will ignore its content from being used. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-030"
+       URI="valid/not-sa/030.xml" SECTIONS="3.4 [62]"
+       OUTPUT="valid/not-sa/out/030.xml">
+    Test demonstrates the use of the conditonal section IGNORE the will ignore its content from being used. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-not-sa-031"
+       URI="valid/not-sa/031.xml" SECTIONS="2.7"
+       OUTPUT="valid/not-sa/out/031.xml">
+    Expands a general entity which contains a CDATA section with
+    what looks like a markup declaration (but is just text since
+    it's in a CDATA section).</TEST>
+
+
+<!-- Start:  valid/ext-sa -->
+<TEST TYPE="valid" ENTITIES="both" ID="valid-ext-sa-001"
+       URI="valid/ext-sa/001.xml" SECTIONS="2.11"
+       OUTPUT="valid/ext-sa/out/001.xml">
+    A combination of carriage return line feed in an external entity must
+    be normalized to a single newline. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-ext-sa-002"
+       URI="valid/ext-sa/002.xml" SECTIONS="2.11"
+       OUTPUT="valid/ext-sa/out/002.xml">
+    A carriage return (also CRLF) in an external entity must
+    be normalized to a single newline. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-ext-sa-003"
+       URI="valid/ext-sa/003.xml" SECTIONS="3.1 4.1 [43] [68]"
+       OUTPUT="valid/ext-sa/out/003.xml">
+    Test demonstrates that the content of an element can be empty. In this case the external entity is an empty file. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-ext-sa-004"
+       URI="valid/ext-sa/004.xml" SECTIONS="2.11"
+       OUTPUT="valid/ext-sa/out/004.xml">
+    A carriage return (also CRLF) in an external entity must
+    be normalized to a single newline. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-ext-sa-005"
+       URI="valid/ext-sa/005.xml" SECTIONS="3.2.1 4.2.2 [48] [75]"
+       OUTPUT="valid/ext-sa/out/005.xml">
+    Test demonstrates the use of optional character and content particles within an element content.  The test also show the use of external entity. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-ext-sa-006"
+       URI="valid/ext-sa/006.xml" SECTIONS="2.11 3.2.1 3.2.2 4.2.2 [48] [51] [75]"
+       OUTPUT="valid/ext-sa/out/006.xml">
+    Test demonstrates the use of optional character and content particles within mixed element content.  The test also shows the use of an external entity and that a carriage control line feed in an external entity must be normalized to a single newline. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-ext-sa-007"
+       URI="valid/ext-sa/007.xml" SECTIONS="4.2.2 4.4.3 [75]"
+       OUTPUT="valid/ext-sa/out/007.xml">
+    Test demonstrates the use of external entity and how replacement 
+text is retrieved and processed. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-ext-sa-008"
+       URI="valid/ext-sa/008.xml" SECTIONS="4.2.2 4.3.3. 4.4.3 [75] [80]"
+       OUTPUT="valid/ext-sa/out/008.xml"> Test demonstrates the use of external 
+entity and how replacement text is retrieved and processed.  Also tests the use of an 
+EncodingDecl of UTF-16.</TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-ext-sa-009"
+       URI="valid/ext-sa/009.xml" SECTIONS="2.11"
+       OUTPUT="valid/ext-sa/out/009.xml">
+    A carriage return (also CRLF) in an external entity must
+    be normalized to a single newline. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-ext-sa-011"
+       URI="valid/ext-sa/011.xml" SECTIONS="2.11 4.2.2 [75]"
+       OUTPUT="valid/ext-sa/out/011.xml">
+    Test demonstrates the use of a public identifier with and external entity.  
+The test also show that a carriage control line feed combination in an external 
+entity must be normalized to a single newline. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-ext-sa-012"
+       URI="valid/ext-sa/012.xml" SECTIONS="4.2.1 4.2.2"
+       OUTPUT="valid/ext-sa/out/012.xml">
+     Test demonstrates both internal and external entities and that processing of entity references may be required to produce the correct replacement text.</TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-ext-sa-013"
+       URI="valid/ext-sa/013.xml" SECTIONS="3.3.3"
+       OUTPUT="valid/ext-sa/out/013.xml">
+    Test demonstrates that whitespace is handled by adding a single whitespace to the normalized value in the attribute list. </TEST>
+<TEST TYPE="valid" ENTITIES="both" ID="valid-ext-sa-014"
+       URI="valid/ext-sa/014.xml" SECTIONS="4.1 4.4.3 [68]"
+       OUTPUT="valid/ext-sa/out/014.xml">
+    Test demonstrates use of characters outside of normal ASCII range.</TEST>
+</TESTCASES>
index c15d3a462ec96e1ddef55272298184f0f6853989..4408655d9c9db144c590ebab366e1337af8af79c 100644 (file)
@@ -1,9 +1,8 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: xml io.encodings.utf8 io.files kernel tools.test ;
+USING: xml xml.data kernel tools.test ;
 IN: xml.tests
 
-[ ] [
-    "resource:basis/xmode/xmode.dtd" utf8 <file-reader>
-    read-xml-chunk drop
+[ t ] [
+    "resource:basis/xmode/xmode.dtd" file>dtd dtd?
 ] unit-test
diff --git a/basis/xml/tokenize/summary.txt b/basis/xml/tokenize/summary.txt
new file mode 100644 (file)
index 0000000..cc5361a
--- /dev/null
@@ -0,0 +1 @@
+Basic tools for parsing XML
index 0c475c108ddb3a0c1a2060a5d90b725303941ee9..50ab43ca7b18b7020d55f19f25d85508d5e49a48 100644 (file)
-! Copyright (C) 2005, 2006 Daniel Ehrenberg
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
-USING: xml.errors xml.data xml.utilities xml.char-classes sets
-xml.entities kernel state-parser kernel namespaces make strings
-math math.parser sequences assocs arrays splitting combinators
-unicode.case accessors fry ascii ;
+USING: namespaces xml.state kernel sequences accessors
+xml.char-classes xml.errors math io sbufs fry strings ascii
+circular xml.entities assocs make splitting math.parser
+locals combinators arrays ;
 IN: xml.tokenize
 
-! XML namespace processing: ns = namespace
-
-! A stack of hashtables
-SYMBOL: ns-stack
-
-: attrs>ns ( attrs-alist -- hash )
-    ! this should check to make sure URIs are valid
+: assure-good-char ( ch -- ch )
     [
-        [
-            swap dup space>> "xmlns" =
-            [ main>> set ]
-            [
-                T{ name f "" "xmlns" f } names-match?
-                [ "" set ] [ drop ] if
-            ] if
-        ] assoc-each
-    ] { } make-assoc f like ;
-
-: add-ns ( name -- )
-    dup space>> dup ns-stack get assoc-stack
-    [ nip ] [ nonexist-ns ] if* >>url drop ;
-
-: push-ns ( hash -- )
-    ns-stack get push ;
-
-: pop-ns ( -- )
-    ns-stack get pop* ;
-
-: init-ns-stack ( -- )
-    V{ H{
-        { "xml" "http://www.w3.org/XML/1998/namespace" }
-        { "xmlns" "http://www.w3.org/2000/xmlns" }
-        { "" "" }
-    } } clone
-    ns-stack set ;
-
-: tag-ns ( name attrs-alist -- name attrs )
-    dup attrs>ns push-ns
-    [ dup add-ns ] dip dup [ drop add-ns ] assoc-each <attrs> ;
-
-! Parsing names
-
-: version=1.0? ( -- ? )
-    prolog-data get version>> "1.0" = ;
-
-! version=1.0? is calculated once and passed around for efficiency
-
-: (parse-name) ( -- str )
-    version=1.0? dup
-    get-char name-start? [
-        [ dup get-char name-char? not ] take-until nip
-    ] [
-        "Malformed name" xml-string-error
-    ] if ;
-
-: parse-name ( -- name )
-    (parse-name) get-char CHAR: : =
-    [ next (parse-name) ] [ "" swap ] if f <name> ;
-
-!   -- Parsing strings
-
-: (parse-entity) ( string -- )
-    dup entities at [ , ] [ 
-        prolog-data get standalone>>
-        [ no-entity ] [
-            dup extra-entities get at
-            [ , ] [ no-entity ] ?if
+        version-1.0? over text? not get-check and
+        [ disallowed-char ] when
+    ] [ f ] if* ;
+
+! * Basic utility words
+
+: record ( char -- )
+    CHAR: \n =
+    [ 0 get-line 1+ set-line ] [ get-column 1+ ] if
+    set-column ;
+
+! (next) normalizes \r\n and \r
+: (next) ( -- char )
+    get-next read1
+    2dup swap CHAR: \r = [
+        CHAR: \n =
+        [ nip read1 ] [ nip CHAR: \n swap ] if
+    ] [ drop ] if
+    set-next dup set-char assure-good-char ;
+
+: next ( -- )
+    #! Increment spot.
+    get-char [ unexpected-end ] unless (next) record ;
+
+: init-parser ( -- )
+    0 1 0 f f t <spot> spot set
+    read1 set-next next ;
+
+: with-state ( stream quot -- )
+    ! with-input-stream implicitly creates a new scope which we use
+    swap [ init-parser call ] with-input-stream ; inline
+
+: skip-until ( quot: ( -- ? ) -- )
+    get-char [
+        [ call ] keep swap [ drop ] [
+            next skip-until
         ] if
+    ] [ drop ] if ; inline recursive
+
+: take-until ( quot -- string )
+    #! Take the substring of a string starting at spot
+    #! from code until the quotation given is true and
+    #! advance spot to after the substring.
+    10 <sbuf> [
+        '[ @ [ t ] [ get-char _ push f ] if ] skip-until
+    ] keep >string ; inline
+
+: take-to ( seq -- string )
+    '[ get-char _ member? ] take-until ;
+
+: pass-blank ( -- )
+    #! Advance code past any whitespace, including newlines
+    [ get-char blank? not ] skip-until ;
+
+: string-matches? ( string circular -- ? )
+    get-char over push-circular
+    sequence= ;
+
+: take-string ( match -- string )
+    dup length <circular-string>
+    [ 2dup string-matches? ] take-until nip
+    dup length rot length 1- - head
+    get-char [ missing-close ] unless next ;
+
+: expect ( string -- )
+    dup [ get-char next ] replicate 2dup =
+    [ 2drop ] [ expected ] if ;
+
+! Suddenly XML-specific
+
+: parse-named-entity ( string -- )
+    dup entities at [ , ] [
+        dup extra-entities get at
+        [ % ] [ no-entity ] ?if
     ] ?if ;
 
+: take-; ( -- string )
+    next ";" take-to next ;
+
 : parse-entity ( -- )
-    next CHAR: ; take-char next
-    "#" ?head [
+    take-; "#" ?head [
         "x" ?head 16 10 ? base> ,
-    ] [ (parse-entity) ] if ;
-
-: (parse-char) ( ch -- )
-    get-char {
-        { [ dup not ] [ 2drop ] }
-        { [ 2dup = ] [ 2drop next ] }
-        { [ dup CHAR: & = ] [ drop parse-entity (parse-char) ] }
-        [ , next (parse-char) ]
-    } cond ;
-
-: parse-char ( ch -- string )
-    [ (parse-char) ] "" make ;
-
-: parse-quot ( ch -- string )
-    parse-char get-char
-    [ "XML file ends in a quote" xml-string-error ] unless ;
-
-: parse-text ( -- string )
-    CHAR: < parse-char ;
-
-! Parsing tags
-
-: start-tag ( -- name ? )
-    #! Outputs the name and whether this is a closing tag
-    get-char CHAR: / = dup [ next ] when
-    parse-name swap ;
-
-: parse-attr-value ( -- seq )
-    get-char dup "'\"" member? [
-        next parse-quot
-    ] [
-        "Attribute lacks quote" xml-string-error
-    ] if ;
-
-: parse-attr ( -- )
-    [ parse-name ] with-scope
-    pass-blank CHAR: = expect pass-blank
-    [ parse-attr-value ] with-scope
-    2array , ;
-
-: (middle-tag) ( -- )
-    pass-blank version=1.0? get-char name-start?
-    [ parse-attr (middle-tag) ] when ;
-
-: middle-tag ( -- attrs-alist )
-    ! f make will make a vector if it has any elements
-    [ (middle-tag) ] f make pass-blank ;
+    ] [ parse-named-entity ] if ;
 
-: end-tag ( name attrs-alist -- tag )
-    tag-ns pass-blank get-char CHAR: / =
-    [ pop-ns <contained> next ] [ <opener> ] if ;
+: parse-pe ( -- )
+    take-; dup pe-table get at
+    [ % ] [ no-entity ] ?if ;
 
-: take-comment ( -- comment )
-    "--" expect-string
-    "--" take-string
-    <comment>
-    CHAR: > expect ;
-
-: take-cdata ( -- string )
-    "[CDATA[" expect-string "]]>" take-string ;
-
-: take-element-decl ( -- element-decl )
-    pass-blank " " take-string pass-blank ">" take-string <element-decl> ;
-
-: take-attlist-decl ( -- doctype-decl )
-    pass-blank " " take-string pass-blank ">" take-string <attlist-decl> ;
-
-: take-until-one-of ( seps -- str sep )
-    '[ get-char _ member? ] take-until get-char ;
-
-: only-blanks ( str -- )
-    [ blank? ] all? [ bad-doctype-decl ] unless ;
-
-: take-system-literal ( -- str )
-    pass-blank get-char next {
-        { CHAR: ' [ "'" take-string ] }
-        { CHAR: " [ "\"" take-string ] }
-    } case ;
-
-: take-system-id ( -- system-id )
-    take-system-literal <system-id>
-    ">" take-string only-blanks ;
-
-: take-public-id ( -- public-id )
-    take-system-literal
-    take-system-literal <public-id>
-    ">" take-string only-blanks ;
-
-DEFER: direct
-
-: (take-internal-subset) ( -- )
-    pass-blank get-char {
-        { CHAR: ] [ next ] }
-        [ drop "<!" expect-string direct , (take-internal-subset) ]
-    } case ;
-
-: take-internal-subset ( -- seq )
-    [ (take-internal-subset) ] { } make ;
-
-: (take-external-id) ( token -- external-id )
-    pass-blank {
-        { "SYSTEM" [ take-system-id ] }
-        { "PUBLIC" [ take-public-id ] }
-        [ bad-external-id ]
-    } case ;
-
-: take-external-id ( -- external-id )
-    " " take-string (take-external-id) ;
-
-: take-doctype-decl ( -- doctype-decl )
-    pass-blank " >" take-until-one-of {
-        { CHAR: \s [
-            pass-blank get-char CHAR: [ = [
-                next take-internal-subset f swap
-                ">" take-string only-blanks
-            ] [
-                " >" take-until-one-of {
-                    { CHAR: \s [ (take-external-id) ] }
-                    { CHAR: > [ only-blanks f ] }
-                } case f
-            ] if
-        ] }
-        { CHAR: > [ f f ] }
-    } case <doctype-decl> ;
-
-: take-entity-def ( -- entity-name entity-def )
-    " " take-string pass-blank get-char {
-        { CHAR: ' [ take-system-literal ] }
-        { CHAR: " [ take-system-literal ] }
-        [ drop take-external-id ]
-    } case ;
-
-: take-entity-decl ( -- entity-decl )
-    pass-blank get-char {
-        { CHAR: % [ next pass-blank take-entity-def ] }
-        [ drop take-entity-def ]
-    } case
-    ">" take-string only-blanks <entity-decl> ;
-
-: take-directive ( -- directive )
-    " " take-string {
-        { "ELEMENT" [ take-element-decl ] }
-        { "ATTLIST" [ take-attlist-decl ] }
-        { "DOCTYPE" [ take-doctype-decl ] }
-        { "ENTITY" [ take-entity-decl ] }
-        [ bad-directive ]
-    } case ;
-
-: direct ( -- object )
-    get-char {
-        { CHAR: - [ take-comment ] }
-        { CHAR: [ [ take-cdata ] }
-        [ drop take-directive ]
-    } case ;
-
-: yes/no>bool ( string -- t/f )
+:: (parse-char) ( quot: ( ch -- ? ) -- )
+    get-char :> char
     {
-        { "yes" [ t ] }
-        { "no" [ f ] }
-        [ not-yes/no ]
-    } case ;
+        { [ char not ] [ ] }
+        { [ char quot call ] [ next ] }
+        { [ char CHAR: & = ] [ parse-entity quot (parse-char) ] }
+        { [ in-dtd? get char CHAR: % = and ] [ parse-pe quot (parse-char) ] }
+        [ char , next quot (parse-char) ]
+    } cond ; inline recursive
+
+: parse-char ( quot: ( ch -- ? ) -- seq )
+    [ (parse-char) ] "" make ; inline
+
+: assure-no-]]> ( circular -- )
+    "]]>" sequence= [ text-w/]]> ] when ;
+
+:: parse-text ( -- string )
+    3 f <array> <circular> :> circ
+    depth get zero? :> no-text [| char |
+        char circ push-circular
+        circ assure-no-]]>
+        no-text [ char blank? char CHAR: < = or [
+            char 1string t pre/post-content
+        ] unless ] when
+        char CHAR: < =
+    ] parse-char ;
+
+: close ( -- )
+    pass-blank ">" expect ;
+
+: normalize-quote ( str -- str )
+    [ dup "\t\r\n" member? [ drop CHAR: \s ] when ] map ;
+
+: (parse-quote) ( <-disallowed? ch -- string )
+    swap '[
+        dup _ = [ drop t ]
+        [ CHAR: < = _ and [ attr-w/< ] [ f ] if ] if
+    ] parse-char normalize-quote get-char
+    [ unclosed-quote ] unless ; inline
+
+: parse-quote* ( <-disallowed? -- seq )
+    pass-blank get-char dup "'\"" member?
+    [ next (parse-quote) ] [ quoteless-attr ] if ; inline
+
+: parse-quote ( -- seq )
+   f parse-quote* ;
 
-: assure-no-extra ( seq -- )
-    [ first ] map {
-        T{ name f "" "version" f }
-        T{ name f "" "encoding" f }
-        T{ name f "" "standalone" f }
-    } diff
-    [ extra-attrs ] unless-empty ; 
-
-: good-version ( version -- version )
-    dup { "1.0" "1.1" } member? [ bad-version ] unless ;
-
-: prolog-attrs ( alist -- prolog )
-    [ T{ name f "" "version" f } swap at
-      [ good-version ] [ versionless-prolog ] if* ] keep
-    [ T{ name f "" "encoding" f } swap at
-      "UTF-8" or ] keep
-    T{ name f "" "standalone" f } swap at
-    [ yes/no>bool ] [ f ] if*
-    <prolog> ;
-
-: parse-prolog ( -- prolog )
-    pass-blank middle-tag "?>" expect-string
-    dup assure-no-extra prolog-attrs
-    dup prolog-data set ;
-
-: instruct ( -- instruction )
-    (parse-name) dup "xml" =
-    [ drop parse-prolog ] [
-        dup >lower "xml" =
-        [ capitalized-prolog ]
-        [ "?>" take-string append <instruction> ] if
-    ] if ;
-
-: make-tag ( -- tag )
-    {
-        { [ get-char dup CHAR: ! = ] [ drop next direct ] }
-        { [ CHAR: ? = ] [ next instruct ] } 
-        [
-            start-tag [ dup add-ns pop-ns <closer> ]
-            [ middle-tag end-tag ] if
-            CHAR: > expect
-        ]
-    } cond ;
diff --git a/basis/xml/utilities/summary.txt b/basis/xml/utilities/summary.txt
new file mode 100644 (file)
index 0000000..a671132
--- /dev/null
@@ -0,0 +1 @@
+Utilities for manipulating an XML DOM tree
diff --git a/basis/xml/utilities/tags.txt b/basis/xml/utilities/tags.txt
new file mode 100644 (file)
index 0000000..71c0ff7
--- /dev/null
@@ -0,0 +1 @@
+syntax
diff --git a/basis/xml/utilities/utilities-docs.factor b/basis/xml/utilities/utilities-docs.factor
new file mode 100644 (file)
index 0000000..161ca82
--- /dev/null
@@ -0,0 +1,63 @@
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax xml.data sequences strings ;
+IN: xml.utilities
+
+ABOUT: "xml.utilities"
+
+ARTICLE: "xml.utilities" "Utilities for processing XML"
+    "Getting parts of an XML document or tag:"
+    $nl
+    "Note: the difference between deep-tag-named and tag-named is that the former searches recursively among all children and children of children of the tag, while the latter only looks at the direct children, and is therefore more efficient."
+    { $subsection tag-named }
+    { $subsection tags-named }
+    { $subsection deep-tag-named }
+    { $subsection deep-tags-named }
+    { $subsection get-id }
+    "To get at the contents of a single tag, use"
+    { $subsection children>string }
+    { $subsection children-tags }
+    { $subsection first-child-tag }
+    { $subsection assert-tag } ;
+
+HELP: deep-tag-named
+{ $values { "tag" "an XML tag or document" } { "name/string" "an XML name or string representing a name" } { "matching-tag" tag } }
+{ $description "Finds an XML tag with a matching name, recursively searching children and children of children." }
+{ $see-also tags-named tag-named deep-tags-named } ;
+
+HELP: deep-tags-named
+{ $values { "tag" "an XML tag or document" } { "name/string" "an XML name or string representing a name" } { "tags-seq" "a sequence of tags" } }
+{ $description "Returns a sequence of all tags of a matching name, recursively searching children and children of children." }
+{ $see-also tag-named deep-tag-named tags-named } ;
+
+HELP: children>string
+{ $values { "tag" "an XML tag or document" } { "string" "a string" } }
+{ $description "Concatenates the children of the tag, throwing an exception when there is a non-string child." } ;
+
+HELP: children-tags
+{ $values { "tag" "an XML tag or document" } { "sequence" sequence } }
+{ $description "Gets the children of the tag that are themselves tags." }
+{ $see-also first-child-tag } ;
+
+HELP: first-child-tag
+{ $values { "tag" "an XML tag or document" } { "tag" tag } }
+{ $description "Returns the first child of the given tag that is a tag." }
+{ $see-also children-tags } ;
+
+HELP: tag-named
+{ $values { "tag" "an XML tag or document" }
+    { "name/string" "an XML name or string representing the name" }
+    { "matching-tag" tag } }
+{ $description "Finds the first tag with matching name which is the direct child of the given tag." }
+{ $see-also deep-tags-named deep-tag-named tags-named } ;
+
+HELP: tags-named
+{ $values { "tag" "an XML tag or document" }
+    { "name/string" "an XML name or string representing the name" }
+    { "tags-seq" "a sequence of tags" } }
+{ $description "Finds all tags with matching name that are the direct children of the given tag." }
+{ $see-also deep-tag-named deep-tags-named tag-named } ;
+
+HELP: get-id
+{ $values { "tag" "an XML tag or document" } { "id" "a string" } { "elem" "an XML element or f" } }
+{ $description "Finds the XML tag with the specified id, ignoring the namespace." } ;
index c150c7133db62e72e073e47175ed042adb4d1254..7b0989611cc540db91fa0a5f8dc3ec672f921c2f 100644 (file)
@@ -1,8 +1,14 @@
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: xml xml.utilities tools.test xml.data ;
 IN: xml.utilities.tests
-USING: xml xml.utilities tools.test ;
 
 [ "bar" ] [ "<foo>bar</foo>" string>xml children>string ] unit-test
 
 [ "" ] [ "<foo></foo>" string>xml children>string ] unit-test
 
 [ "" ] [ "<foo/>" string>xml children>string ] unit-test
+
+XML-NS: foo http://blah.com
+
+[ T{ name { main "bling" } { url "http://blah.com" } } ] [ "bling" foo ] unit-test
index e104142a76e5586be4ccebddcd23a54952655f2b..924ae56aa466f1152f33dd6c8279eba22de7453d 100644 (file)
@@ -1,52 +1,10 @@
-! Copyright (C) 2005, 2006 Daniel Ehrenberg
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors kernel namespaces sequences words io assocs
 quotations strings parser lexer arrays xml.data xml.writer debugger
-splitting vectors sequences.deep combinators fry ;
+splitting vectors sequences.deep combinators fry memoize ;
 IN: xml.utilities
 
-! * System for words specialized on tag names
-
-TUPLE: process-missing process tag ;
-M: process-missing error.
-    "Tag <" write
-    dup tag>> print-name
-    "> not implemented on process process " write
-    name>> print ;
-
-: run-process ( tag word -- )
-    2dup "xtable" word-prop
-    [ dup main>> ] dip at* [ 2nip call ] [
-        drop \ process-missing boa throw
-    ] if ;
-
-: PROCESS:
-    CREATE
-    dup H{ } clone "xtable" set-word-prop
-    dup '[ _ run-process ] define ; parsing
-
-: TAG:
-    scan scan-word
-    parse-definition
-    swap "xtable" word-prop
-    rot "/" split [ [ 2dup ] dip swap set-at ] each 2drop ;
-    parsing
-
-
-! * Common utility functions
-
-: build-tag* ( items name -- tag )
-    assure-name swap f swap <tag> ;
-
-: build-tag ( item name -- tag )
-    [ 1array ] dip build-tag* ;
-
-: standard-prolog ( -- prolog )
-    T{ prolog f "1.0" "UTF-8" f } ;
-
-: build-xml ( tag -- xml )
-    standard-prolog { } rot { } <xml> ;
-
 : children>string ( tag -- string )
     children>> {
         { [ dup empty? ] [ drop "" ] }
@@ -61,10 +19,6 @@ M: process-missing error.
 : first-child-tag ( tag -- tag )
     children>> [ tag? ] find nip ;
 
-! * Accessing part of an XML document
-! for tag- words, a start means that it searches all children
-! and no star searches only direct children
-
 : tag-named? ( name elem -- ? )
     dup tag? [ names-match? ] [ 2drop f ] if ;
 
@@ -78,15 +32,13 @@ M: process-missing error.
     tags@ '[ _ swap tag-named? ] deep-filter ;
 
 : tag-named ( tag name/string -- matching-tag )
-    ! like get-name-tag but only looks at direct children,
-    ! not all the children down the tree.
     assure-name swap [ tag-named? ] with find nip ;
 
 : tags-named ( tag name/string -- tags-seq )
     tags@ swap [ tag-named? ] with filter ;
 
 : tag-with-attr? ( elem attr-value attr-name -- ? )
-    rot dup tag? [ at = ] [ 3drop f ] if ;
+    rot dup tag? [ swap attr = ] [ 3drop f ] if ;
 
 : tag-with-attr ( tag attr-value attr-name -- matching-tag )
     assure-name '[ _ _ tag-with-attr? ] find nip ;
@@ -100,7 +52,7 @@ M: process-missing error.
 : deep-tags-with-attr ( tag attr-value attr-name -- tags-seq )
     tags@ '[ _ _ tag-with-attr? ] deep-filter ;
 
-: get-id ( tag id -- elem ) ! elem=tag.getElementById(id)
+: get-id ( tag id -- elem )
     "id" deep-tag-with-attr ;
 
 : deep-tags-named-with-attr ( tag tag-name attr-value attr-name -- tags )
@@ -115,3 +67,7 @@ M: process-missing error.
 
 : insert-child ( child tag -- )
     [ 1vector ] dip insert-children ;
+
+: XML-NS:
+    CREATE-WORD (( string -- name )) over set-stack-effect
+    scan '[ f swap _ <name> ] define-memoized ; parsing
diff --git a/basis/xml/writer/summary.txt b/basis/xml/writer/summary.txt
new file mode 100644 (file)
index 0000000..04d0471
--- /dev/null
@@ -0,0 +1 @@
+Tools for printing XML, including prettyprinting
diff --git a/basis/xml/writer/writer-docs.factor b/basis/xml/writer/writer-docs.factor
new file mode 100644 (file)
index 0000000..38f97bd
--- /dev/null
@@ -0,0 +1,67 @@
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.syntax help.markup io strings xml.data multiline ;
+IN: xml.writer
+
+ABOUT: "xml.writer"
+
+ARTICLE: "xml.writer" "Writing XML"
+    "These words are used to print XML preserving whitespace in text nodes"
+    { $subsection write-xml }
+    { $subsection xml>string }
+    "These words are used to prettyprint XML"
+    { $subsection pprint-xml>string }
+    { $subsection pprint-xml }
+    "Certain variables can be changed to mainpulate prettyprinting"
+    { $subsection sensitive-tags }
+    { $subsection indenter }
+    "All of these words operate on arbitrary pieces of XML: they can take, as in put, XML documents, comments, tags, strings (text nodes), XML chunks, etc." ;
+
+HELP: xml>string
+{ $values { "xml" "an XML document" } { "string" "a string" } }
+{ $description "This converts an XML document " { $link xml } " into a string. It can also be used to convert any piece of XML to a string, eg an " { $link xml-chunk } " or " { $link comment } "." }
+{ $notes "This does not preserve what type of quotes were used or what data was omitted from version declaration, as that information isn't present in the XML data representation. The whitespace in the text nodes of the original document is preserved." } ;
+
+HELP: pprint-xml>string
+{ $values { "xml" "an XML document" } { "string" "a string" } }
+{ $description "converts an XML document into a string in a prettyprinted form." }
+{ $notes "This does not preserve what type of quotes were used or what data was omitted from version declaration, as that information isn't present in the XML data representation. The whitespace in the text nodes of the original document is preserved." } ;
+
+HELP: write-xml
+{ $values { "xml" "an XML document" } }
+{ $description "prints the contents of an XML document to " { $link output-stream } "." }
+{ $notes "This does not preserve what type of quotes were used or what data was omitted from version declaration, as that information isn't present in the XML data representation. The whitespace in the text nodes of the original document is preserved." } ;
+
+HELP: pprint-xml
+{ $values { "xml" "an XML document" } }
+{ $description "prints the contents of an XML document to " { $link output-stream } " in a prettyprinted form." }
+{ $notes "This does not preserve what type of quotes were used or what data was omitted from version declaration, as that information isn't present in the XML data representation. Whitespace is also not preserved." } ;
+
+{ xml>string write-xml pprint-xml pprint-xml>string } related-words
+
+HELP: indenter
+{ $var-description "Contains the string which is used for indenting in the XML prettyprinter. For example, to print an XML document using " { $snippet "%%%%" } " for indentation, you can use the following:" }
+{ $example {" USING: xml.interpolate xml.writer namespaces ;
+[XML <foo>bar</foo> XML] "%%%%" indenter [ pprint-xml ] with-variable "} {"
+<foo>
+%%%%bar
+</foo>"} } ;
+
+HELP: sensitive-tags
+{ $var-description "Contains a sequence of " { $link name } "s where whitespace should be considered significant for prettyprinting purposes. The sequence can contain " { $link string } "s in place of names. For example, to preserve whitespace inside a " { $snippet "pre" } " tag:" }
+{ $example {" USING: xml.interpolate xml.writer namespaces ;
+[XML <html> <head>   <title> something</title></head><body><pre>bing
+bang
+   bong</pre></body></html> XML] { "pre" } sensitive-tags [ pprint-xml ] with-variable "} {"
+<html>
+  <head>
+    <title>
+      something
+    </title>
+  </head>
+  <body>
+    <pre>bing
+bang
+   bong</pre>
+  </body>
+</html>"} } ;
index acfe4bfe1e00ba3632d028b237c130433f83db48..d09ae08b3fa6ca26134b42a2ba333d55d1818d4f 100644 (file)
@@ -1,5 +1,61 @@
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: xml.data xml.writer tools.test fry xml kernel multiline
+xml.writer.private io.streams.string xml.utilities sequences ;
 IN: xml.writer.tests
-USING: xml.data xml.writer tools.test ;
+
+\ write-xml must-infer
+\ xml>string must-infer
+\ pprint-xml must-infer
+! Add a test for pprint-xml with sensitive-tags
 
 [ "foo" ] [ T{ name { main "foo" } } name>string ] unit-test
+[ "foo" ] [ T{ name { space "" } { main "foo" } } name>string ] unit-test
 [ "ns:foo" ] [ T{ name { space "ns" } { main "foo" } } name>string ] unit-test
+
+: reprints-as ( to from -- )
+     [ '[ _ ] ] [ '[ _ string>xml xml>string ] ] bi* unit-test ;
+
+: pprint-reprints-as ( to from -- )
+     [ '[ _ ] ] [ '[ _ string>xml pprint-xml>string ] ] bi* unit-test ;
+
+: reprints-same ( string -- ) dup reprints-as ;
+
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?><x/>" reprints-same
+
+{" <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE foo [<!ENTITY foo "bar">]>
+<x>bar</x> "}
+{" <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE foo [<!ENTITY foo 'bar'>]>
+<x>&foo;</x> "} reprints-as
+
+{" <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE foo [
+  <!ENTITY foo "bar">
+  <!ELEMENT br EMPTY>
+  <!ATTLIST list type    (bullets|ordered|glossary)  "ordered">
+  <!NOTATION foo bar>
+  <?baz bing bang bong?>
+  <!--wtf-->
+]>
+<x>
+  bar
+</x>"}
+{" <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE foo [ <!ENTITY foo 'bar'> <!ELEMENT br EMPTY>
+<!ATTLIST list
+          type    (bullets|ordered|glossary)  "ordered">
+<!NOTATION     foo bar> <?baz bing bang bong?>
+               <!--wtf-->
+]>
+<x>&foo;</x>"} pprint-reprints-as
+
+[ t ] [ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\" >" dup string>xml-chunk xml>string = ] unit-test
+[ "<?xml version=\"1.0\" encoding=\"UTF-8\"?><a b=\"c\"/>" ]
+    [ "<a b='c'/>" string>xml xml>string ] unit-test
+[ "<?xml version=\"1.0\" encoding=\"UTF-8\"?><foo>bar baz</foo>" ]
+[ "<foo>bar</foo>" string>xml [ " baz" append ] map xml>string ] unit-test
+[ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<foo>\n  bar\n</foo>" ]
+[ "<foo>         bar            </foo>" string>xml pprint-xml>string ] unit-test
+[ "<foo'>" ] [ "<foo'>" <unescaped> xml>string ] unit-test
index 12601953f67f67589039d2b3e9324749564b9d0d..92bc18054afa1622fde821c43c7d26c1e4751753 100644 (file)
@@ -1,16 +1,19 @@
-! Copyright (C) 2005, 2006 Daniel Ehrenberg\r
+! Copyright (C) 2005, 2009 Daniel Ehrenberg\r
 ! See http://factorcode.org/license.txt for BSD license.\r
 USING: hashtables kernel math namespaces sequences strings\r
 assocs combinators io io.streams.string accessors\r
 xml.data wrap xml.entities unicode.categories fry ;\r
 IN: xml.writer\r
 \r
-SYMBOL: xml-pprint?\r
 SYMBOL: sensitive-tags\r
-SYMBOL: indentation\r
 SYMBOL: indenter\r
 "  " indenter set-global\r
 \r
+<PRIVATE\r
+\r
+SYMBOL: xml-pprint?\r
+SYMBOL: indentation\r
+\r
 : sensitive? ( tag -- ? )\r
     sensitive-tags get swap '[ _ names-match? ] contains? ;\r
 \r
@@ -37,26 +40,37 @@ SYMBOL: indenter
         [ [ empty? ] [ string? ] bi and not ] filter\r
     ] when ;\r
 \r
+PRIVATE>\r
+\r
 : name>string ( name -- string )\r
     [ main>> ] [ space>> ] bi [ ":" rot 3append ] unless-empty ;\r
 \r
 : print-name ( name -- )\r
     name>string write ;\r
 \r
+<PRIVATE\r
+\r
+: write-quoted ( string -- )\r
+    CHAR: " write1 write CHAR: " write1 ;\r
+\r
 : print-attrs ( assoc -- )\r
     [\r
-        " " write\r
-        swap print-name\r
-        "=\"" write\r
-        escape-quoted-string write\r
-        "\"" write\r
+        [ bl print-name "=" write ]\r
+        [ escape-quoted-string write-quoted ] bi*\r
     ] assoc-each ;\r
 \r
-GENERIC: write-xml-chunk ( object -- )\r
+PRIVATE>\r
+\r
+GENERIC: write-xml ( xml -- )\r
 \r
-M: string write-xml-chunk\r
-    escape-string dup empty? not xml-pprint? get and\r
-    [ nl 80 indent-string indented-break ] when write ;\r
+<PRIVATE\r
+\r
+M: string write-xml\r
+    escape-string xml-pprint? get [\r
+        dup [ blank? ] all?\r
+        [ drop "" ]\r
+        [ nl 80 indent-string indented-break ] if\r
+    ] when write ;\r
 \r
 : write-tag ( tag -- )\r
     ?indent CHAR: < write1\r
@@ -65,112 +79,115 @@ M: string write-xml-chunk
 : write-start-tag ( tag -- )\r
     write-tag ">" write ;\r
 \r
-M: contained-tag write-xml-chunk\r
+M: contained-tag write-xml\r
     write-tag "/>" write ;\r
 \r
 : write-children ( tag -- )\r
     indent children>> ?filter-children\r
-    [ write-xml-chunk ] each unindent ;\r
+    [ write-xml ] each unindent ;\r
 \r
 : write-end-tag ( tag -- )\r
     ?indent "</" write print-name CHAR: > write1 ;\r
 \r
-M: open-tag write-xml-chunk\r
+M: open-tag write-xml\r
     xml-pprint? get [\r
         {\r
-            [ sensitive? not xml-pprint? get and xml-pprint? set ]\r
             [ write-start-tag ]\r
+            [ sensitive? not xml-pprint? get and xml-pprint? set ]\r
             [ write-children ]\r
             [ write-end-tag ]\r
         } cleave\r
     ] dip xml-pprint? set ;\r
 \r
-M: comment write-xml-chunk\r
+M: unescaped write-xml\r
+    string>> write ;\r
+\r
+M: comment write-xml\r
     "<!--" write text>> write "-->" write ;\r
 \r
-M: element-decl write-xml-chunk\r
-    "<!ELEMENT " write\r
-    [ name>> write " " write ]\r
-    [ content-spec>> write ">" write ]\r
-    bi ;\r
+: write-decl ( decl name quot: ( decl -- slot ) -- )\r
+    "<!" write swap write bl\r
+    [ name>> write bl ]\r
+    swap '[ @ write ">" write ] bi ; inline\r
 \r
-M: attlist-decl write-xml-chunk\r
-    "<!ATTLIST " write\r
-    [ name>> write " " write ]\r
-    [ att-defs>> write ">" write ]\r
-    bi ;\r
+M: element-decl write-xml\r
+    "ELEMENT" [ content-spec>> ] write-decl ;\r
 \r
-M: entity-decl write-xml-chunk\r
+M: attlist-decl write-xml\r
+    "ATTLIST" [ att-defs>> ] write-decl ;\r
+\r
+M: notation-decl write-xml\r
+    "NOTATION" [ id>> ] write-decl ;\r
+\r
+M: entity-decl write-xml\r
     "<!ENTITY " write\r
-    [ name>> write " " write ]\r
-    [ def>> write-xml-chunk ">" write ]\r
-    bi ;\r
+    [ pe?>> [ " % " write ] when ]\r
+    [ name>> write " \"" write ] [\r
+        def>> f xml-pprint?\r
+        [ write-xml ] with-variable\r
+        "\">" write\r
+    ] tri ;\r
 \r
-M: system-id write-xml-chunk\r
-    "SYSTEM '" write system-literal>> write "'" write ;\r
+M: system-id write-xml\r
+    "SYSTEM" write bl system-literal>> write-quoted ;\r
 \r
-M: public-id write-xml-chunk\r
-    "PUBLIC '" write\r
-    [ pubid-literal>> write "' '" write ]\r
-    [ system-literal>> write "'>" write ] bi ;\r
+M: public-id write-xml\r
+    "PUBLIC" write bl\r
+    [ pubid-literal>> write-quoted bl ]\r
+    [ system-literal>> write-quoted ] bi ;\r
 \r
-M: doctype-decl write-xml-chunk\r
-    "<!DOCTYPE " write\r
-    [ name>> write " " write ]\r
-    [ external-id>> [ write-xml-chunk " " write ] when* ]\r
+: write-internal-subset ( dtd -- )\r
     [\r
-        internal-subset>>\r
-        [ "[" write [ write-xml-chunk ] each "]" write ] when* ">" write\r
-    ] tri ;\r
+        "[" write indent\r
+        directives>> [ ?indent write-xml ] each\r
+        unindent ?indent "]" write\r
+    ] when* ;\r
+\r
+M: doctype-decl write-xml\r
+    ?indent "<!DOCTYPE " write\r
+    [ name>> write " " write ]\r
+    [ external-id>> [ write-xml " " write ] when* ]\r
+    [ internal-subset>> write-internal-subset ">" write ] tri ;\r
 \r
-M: directive write-xml-chunk\r
-    "<!" write text>> write CHAR: > write1 ;\r
+M: directive write-xml\r
+    "<!" write text>> write CHAR: > write1 nl ;\r
 \r
-M: instruction write-xml-chunk\r
+M: instruction write-xml\r
     "<?" write text>> write "?>" write ;\r
 \r
-M: sequence write-xml-chunk\r
-    [ write-xml-chunk ] each ;\r
+M: number write-xml\r
+    "Numbers are not allowed in XML" throw ;\r
 \r
-: write-prolog ( xml -- )\r
-    "<?xml version=\"" write dup version>> write\r
-    "\" encoding=\"" write dup encoding>> write\r
-    standalone>> [ "\" standalone=\"yes" write ] when\r
-    "\"?>" write ;\r
+M: sequence write-xml\r
+    [ write-xml ] each ;\r
 \r
-: write-xml ( xml -- )\r
+M: prolog write-xml\r
+    "<?xml version=" write\r
+    [ version>> write-quoted ]\r
+    [ " encoding=" write encoding>> write-quoted ]\r
+    [ standalone>> [ " standalone=\"yes\"" write ] when ] tri\r
+    "?>" write ;\r
+\r
+M: xml write-xml\r
     {\r
-        [ prolog>> write-prolog ]\r
-        [ before>> write-xml-chunk ]\r
-        [ body>> write-xml-chunk ]\r
-        [ after>> write-xml-chunk ]\r
+        [ prolog>> write-xml ]\r
+        [ before>> write-xml ]\r
+        [ body>> write-xml ]\r
+        [ after>> write-xml ]\r
     } cleave ;\r
 \r
-M: xml write-xml-chunk\r
-    body>> write-xml-chunk ;\r
-\r
-: print-xml ( xml -- )\r
-    write-xml nl ;\r
+PRIVATE>\r
 \r
 : xml>string ( xml -- string )\r
     [ write-xml ] with-string-writer ;\r
 \r
-: with-xml-pprint ( sensitive-tags quot -- )\r
+: pprint-xml ( xml -- )\r
     [\r
-        swap [ assure-name ] map sensitive-tags set\r
+        sensitive-tags [ [ assure-name ] map ] change\r
         0 indentation set\r
         xml-pprint? on\r
-        call\r
-    ] with-scope ; inline\r
-\r
-: pprint-xml-but ( xml sensitive-tags -- )\r
-    [ print-xml ] with-xml-pprint ;\r
-\r
-: pprint-xml ( xml -- )\r
-    f pprint-xml-but ;\r
-\r
-: pprint-xml>string-but ( xml sensitive-tags -- string )\r
-    [ xml>string ] with-xml-pprint ;\r
+        write-xml\r
+    ] with-scope ;\r
 \r
 : pprint-xml>string ( xml -- string )\r
-    f pprint-xml>string-but ;\r
+    [ pprint-xml ] with-string-writer ;\r
index 05dd85251dd032602a1e941285746459165c28ad..901fce2dd491e999bbe5d177155179d57efbc254 100644 (file)
-! Copyright (C) 2005, 2006 Daniel Ehrenberg\r
+! Copyright (C) 2005, 2009 Daniel Ehrenberg\r
 ! See http://factorcode.org/license.txt for BSD license.\r
-USING: help.markup help.syntax kernel xml.data xml.errors\r
-xml.writer state-parser xml.tokenize xml.utilities xml.entities\r
-strings sequences io ;\r
+USING: help.markup help.syntax xml.data io strings ;\r
 IN: xml\r
 \r
 HELP: string>xml\r
-{ $values { "string" "a string" } { "xml" "an xml document" } }\r
-{ $description "converts a string into an " { $link xml }\r
-    " datatype for further processing" } ;\r
+{ $values { "string" string } { "xml" xml } }\r
+{ $description "Converts a string into an " { $link xml }\r
+    " tree for further processing." } ;\r
 \r
 HELP: read-xml\r
-{ $values { "stream" "a stream that supports readln" }\r
-    { "xml" "an XML document" } }\r
-{ $description "exausts the given stream, reading an XML document from it" } ;\r
+{ $values { "stream" "an input stream" } { "xml" xml } }\r
+{ $description "Exausts the given stream, reading an XML document from it. A binary stream, one without encoding, should be used as input, and the encoding is automatically detected." } ;\r
 \r
 HELP: file>xml\r
-{ $values { "filename" "a string representing a filename" }\r
-    { "xml" "an XML document" } }\r
-{ $description "opens the given file, reads it in as XML, closes the file and returns the corresponding XML tree" } ;\r
+{ $values { "filename" string } { "xml" xml } }\r
+{ $description "Opens the given file, reads it in as XML, closes the file and returns the corresponding XML tree. The encoding is automatically detected." } ;\r
 \r
 { string>xml read-xml file>xml } related-words\r
 \r
-HELP: xml>string\r
-{ $values { "xml" "an xml document" } { "string" "a string" } }\r
-{ $description "converts an xml document (" { $link xml } ") into a string" }\r
-{ $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;\r
-\r
-HELP: pprint-xml>string\r
-{ $values { "xml" "an xml document" } { "string" "a string" } }\r
-{ $description "converts an xml document (" { $link xml } ") into a string in a prettyprinted form." }\r
-{ $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;\r
-\r
-HELP: xml-parse-error\r
-{ $class-description "the exception class that all parsing errors in XML documents are in." } ;\r
-\r
-HELP: xml-reprint\r
-{ $values { "string" "a string of XML" } }\r
-{ $description "parses XML and prints it out again, for testing purposes" }\r
-{ $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;\r
-\r
-HELP: write-xml\r
-{ $values { "xml" "an XML document" } }\r
-{ $description "prints the contents of an XML document (" { $link xml } ") to " { $link output-stream } "." }\r
-{ $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;\r
-\r
-HELP: print-xml\r
-{ $values { "xml" "an XML document" } }\r
-{ $description "prints the contents of an XML document (" { $link xml } ") to " { $link output-stream } ", followed by a newline" }\r
-{ $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;\r
-\r
-HELP: pprint-xml\r
-{ $values { "xml" "an XML document" } }\r
-{ $description "prints the contents of an XML document (" { $link xml } ") to " { $link output-stream } " in a prettyprinted form." }\r
-{ $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;\r
-\r
-HELP: pprint-xml-but\r
-{ $values { "xml" "an XML document" } { "sensitive-tags" "a sequence of names" } }\r
-{ $description "Prettyprints an XML document, leaving the whitespace of the tags with names in sensitive-tags intact." }\r
-{ $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;\r
-\r
-HELP: pprint-xml>string-but\r
-{ $values { "xml" "an XML document" } { "sensitive-tags" "a sequence of names" } { "string" string } }\r
-{ $description "Prettyprints an XML document, returning the result as a string and leaving the whitespace of the tags with names in sensitive-tags intact." }\r
-{ $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;\r
-\r
-{ xml>string print-xml write-xml pprint-xml xml-reprint pprint-xml>string pprint-xml>string-but pprint-xml-but } related-words\r
-\r
-HELP: PROCESS:\r
-{ $syntax "PROCESS: word" }\r
-{ $values { "word" "a new word to define" } }\r
-{ $description "creates a new word to process XML tags" }\r
-{ $see-also POSTPONE: TAG: } ;\r
-\r
-HELP: TAG:\r
-{ $syntax "TAG: tag word definition... ;" }\r
-{ $values { "tag" "an xml tag name" } { "word" "an XML process" } }\r
-{ $description "defines what a process should do when it encounters a specific tag" }\r
-{ $examples { $code "PROCESS: x ( tag -- )\nTAG: a x drop \"hi\" write ;" } }\r
-{ $see-also POSTPONE: PROCESS: } ;\r
-HELP: build-tag*\r
-{ $values { "items" "sequence of elements" } { "name" "string" }\r
-    { "tag" tag } }\r
-{ $description "builds a " { $link tag } " with the specified name, in the namespace \"\" and URL \"\" containing the children listed in item" }\r
-{ $see-also build-tag build-xml } ;\r
-\r
-HELP: build-tag\r
-{ $values { "item" "an element" } { "name" string } { "tag" tag } }\r
-{ $description "builds a " { $link tag } " with the specified name containing the single child item" }\r
-{ $see-also build-tag* build-xml } ;\r
-\r
-HELP: build-xml\r
-{ $values { "tag" tag } { "xml" "an XML document" } }\r
-{ $description "builds an XML document out of a tag" }\r
-{ $see-also build-tag* build-tag } ;\r
-\r
-HELP: tag\r
-{ $class-description "tuple representing an XML tag, delegating to a " { $link\r
-name } ", containing the slots attrs (an alist of names to strings) and children (a sequence). Tags implement the sequence protocol by acting like a sequence of its chidren, and the assoc protocol by acting like its attributes." }\r
-{ $see-also <tag> name contained-tag xml } ;\r
-\r
-HELP: <tag>\r
-{ $values { "name" "an XML tag name" }\r
-    { "attrs" "an alist of names to strings" }\r
-    { "children" sequence }\r
-    { "tag" tag } }\r
-{ $description "constructs an XML " { $link tag } " with the name (not a string) and tag attributes specified in attrs and children specified" }\r
-{ $see-also tag <contained-tag> build-tag build-tag* } ;\r
-\r
-HELP: name\r
-{ $class-description "represents an XML name, with the fields space (a string representing the namespace, as written in the document, tag (a string of the actual name of the tag) and url (a string of the URL that the namespace points to)" }\r
-{ $see-also <name> tag } ;\r
-\r
-HELP: <name> ( space tag url -- name )\r
-{ $values { "space" "a string" } { "tag" "a string" } { "url" "a string" }\r
-    { "name" "an XML tag name" } }\r
-{ $description "creates a name tuple with the name-space space and the tag-name tag and the tag-url url." }\r
-{ $see-also name <tag> } ;\r
-\r
-HELP: contained-tag\r
-{ $class-description "delegates to tag representing a tag like <a/> with no contents. The tag attributes are accessed with tag-attrs" }\r
-{ $see-also tag <contained-tag> } ;\r
-\r
-HELP: <contained-tag>\r
-{ $values { "name" "an XML tag name" }\r
-    { "attrs" "an alist from names to strings" }\r
-    { "tag" tag } }\r
-{ $description "creates an empty tag (like <a/>) with the specified name and tag attributes. This delegates to tag" }\r
-{ $see-also contained-tag <tag> } ;\r
-\r
-HELP: xml\r
-{ $class-description "tuple representing an XML document, delegating to the main tag, containing the fields prolog (the header <?xml...?>), before (whatever comes between the prolog and the main tag) and after (whatever comes after the main tag)" }\r
-{ $see-also <xml> tag prolog } ;\r
-\r
-HELP: <xml>\r
-{ $values { "prolog" "an XML prolog" } { "before" "a sequence of XML elements" }\r
-{ "main" tag } { "after" "a sequence of XML elements" } { "xml" "an XML document" } }\r
-{ $description "creates an XML document, delegating to the main tag, with the specified prolog, before, and after" }\r
-{ $see-also xml <tag> } ;\r
-\r
-HELP: prolog\r
-{ $class-description "represents an XML prolog, with the tuple fields version (containing \"1.0\" or \"1.1\"), encoding (a string representing the encoding type), and standalone (t or f, whether the document is standalone without external entities)" }\r
-{ $see-also <prolog> xml } ;\r
-\r
-HELP: <prolog> ( version encoding standalone -- prolog )\r
-{ $values { "version" "a string, 1.0 or 1.1" }\r
-{ "encoding" "a string" } { "standalone" "a boolean" } { "prolog" "an XML prolog" } }\r
-{ $description "creates an XML prolog tuple" }\r
-{ $see-also prolog <xml> } ;\r
-\r
-HELP: comment\r
-{ $class-description "represents a comment in XML. Has one slot, text, which contains the string of the comment" }\r
-{ $see-also <comment> } ;\r
-\r
-HELP: <comment> ( text -- comment )\r
-{ $values { "text" "a string" } { "comment" "a comment" } }\r
-{ $description "creates an XML comment tuple" }\r
-{ $see-also comment } ;\r
-\r
-HELP: instruction\r
-{ $class-description "represents an XML instruction, such as <?xsl stylesheet='foo.xml'?>. Contains one slot, text, which contains the string between the question marks." }\r
-{ $see-also <instruction> } ;\r
-\r
-HELP: <instruction> ( text -- instruction )\r
-{ $values { "text" "a string" } { "instruction" "an XML instruction" } }\r
-{ $description "creates an XML parsing instruction, such as <?xsl stylesheet='foo.xml'?>." }\r
-{ $see-also instruction } ;\r
-\r
-HELP: names-match?\r
-{ $values { "name1" "a name" } { "name2" "a name" } { "?" "t or f" } }\r
-{ $description "checks to see if the two names match, that is, if all fields are equal, ignoring fields whose value is f in either name." }\r
-{ $example "USING: prettyprint xml.data ;" "T{ name f \"rpc\" \"methodCall\" f } T{ name f f \"methodCall\" \"http://www.xmlrpc.org/\" } names-match? ." "t" }\r
-{ $see-also name } ;\r
-\r
 HELP: read-xml-chunk\r
 { $values { "stream" "an input stream" } { "seq" "a sequence of elements" } }\r
-{ $description "rather than parse a document, as " { $link read-xml } " does, this word parses and returns a sequence of XML elements (tags, strings, etc), ie a document fragment. This is useful for pieces of XML which may have more than one main tag." }\r
-{ $see-also write-xml-chunk read-xml } ;\r
-\r
-HELP: get-id\r
-{ $values { "tag" "an XML tag or document" } { "id" "a string" } { "elem" "an XML element or f" } }\r
-{ $description "finds the XML tag with the specified id, ignoring the namespace" }\r
-{ $see-also } ;\r
-\r
-HELP: process\r
-{ $values { "object" "an opener, closer, contained or text element" } }\r
-{ $description  "takes an XML event and, using the XML stack, processes it and adds it to the tree"  } ;\r
+{ $description "Rather than parse a document, as " { $link read-xml } " does, this word parses and returns a sequence of XML elements (tags, strings, etc), ie a document fragment. This is useful for pieces of XML which may have more than one main tag. The encoding is not automatically detected, and a stream with an encoding (ie. one which returns strings from " { $link read } ") should be used as input." }\r
+{ $see-also read-xml } ;\r
 \r
-HELP: sax\r
+HELP: each-element\r
 { $values { "stream" "an input stream" } { "quot" "a quotation ( xml-elem -- )" } }\r
-{ $description "parses the XML document, and whenever an event is encountered (a tag piece, comment, parsing instruction, directive or string element), the quotation is called with that event on the stack. The quotation has all responsibility to deal with the event properly, and it is advised that generic words be used in dispatching on the event class." }\r
-{ $notes "It is important to note that this is not SAX, merely an event-based XML view" }\r
+{ $description "Parses the XML document, and whenever an event is encountered (a tag piece, comment, parsing instruction, directive or string element), the quotation is called with that event on the stack. The quotation has all responsibility to deal with the event properly. The encoding of the stream is automatically detected, so a binary input stream should be used." }\r
 { $see-also read-xml } ;\r
 \r
-HELP: opener\r
-{ $class-description "describes an opening tag, like <a>. Contains two slots, name and attrs containing, respectively, the name of the tag and its attributes. Usually, the name-url will be f." }\r
-{ $see-also closer contained } ;\r
-\r
-HELP: closer\r
-{ $class-description "describes a closing tag, like </a>. Contains one slot, name, containing the tag's name. Usually, the name-url will be f." }\r
-{ $see-also opener contained } ;\r
-\r
-HELP: contained\r
-{ $class-description "represents a self-closing tag, like <a/>. Contains two slots, name and attrs containing, respectively, the name of the tag and its attributes. Usually, the name-url will be f." }\r
-{ $see-also opener closer } ;\r
-\r
-HELP: parse-text\r
-{ $values { "string" "a string" } }\r
-{ $description "moves the pointer from the current spot to the beginning of the next tag, parsing the text underneath, returning the text element it passed. This parses XML entities like &bar; &#97; and &amp;" }\r
-{ $see-also parse-name } ;\r
-\r
-HELP: parse-name\r
-{ $values { "name" "an XML name" } }\r
-{ $description "parses a " { $link name } " from the input stream. Returns a name with only the name-space and name-tag defined, with name-url=f" }\r
-{ $see-also parse-text } ;\r
-\r
-HELP: make-tag\r
-{ $values { "tag" "an opener, closer or contained" } }\r
-{ $description "assuming the pointer is just past a <, this word parses until the next > and emits a tuple representing the tag parsed" }\r
-{ $see-also opener closer contained } ;\r
-\r
 HELP: pull-xml\r
-{ $class-description "represents the state of a pull-parser for XML. Has one slot, scope, which is a namespace which contains all relevant state information." }\r
+{ $class-description "Represents the state of a pull-parser for XML. Has one slot, " { $snippet "scope" } ", which is a namespace which contains all relevant state information." }\r
 { $see-also <pull-xml> pull-event pull-elem } ;\r
 \r
 HELP: <pull-xml>\r
-{ $values { "pull-xml" "a pull-xml tuple" } }\r
-{ $description "creates an XML pull-based parser which reads from " { $link input-stream } ", executing all initial XML commands to set up the parser." }\r
+{ $values { "pull-xml" pull-xml } }\r
+{ $description "Creates an XML pull-based parser which reads from " { $link input-stream } ", executing all initial XML commands to set up the parser." }\r
 { $see-also pull-xml pull-elem pull-event } ;\r
 \r
 HELP: pull-elem\r
 { $values { "pull" "an XML pull parser" } { "xml-elem/f" "an XML tag, string, or f" } }\r
-{ $description "gets the next XML element from the given XML pull parser. Returns f upon exhaustion." }\r
+{ $description "Gets the next XML element from the given XML pull parser. Returns f upon exhaustion." }\r
 { $see-also pull-xml <pull-xml> pull-event } ;\r
 \r
 HELP: pull-event\r
 { $values { "pull" "an XML pull parser" } { "xml-event/f" "an XML tag event, string, or f" } }\r
-{ $description "gets the next XML event from the given XML pull parser. Returns f upon exhaustion." }\r
+{ $description "Gets the next XML event from the given XML pull parser. Returns f upon exhaustion." }\r
 { $see-also pull-xml <pull-xml> pull-elem } ;\r
 \r
-HELP: write-xml-chunk\r
-{ $values { "object" "an XML element" } }\r
-{ $description "writes an XML element to " { $link output-stream } "." }\r
-{ $see-also write-xml-chunk write-xml } ;\r
-\r
-HELP: deep-tag-named\r
-{ $values { "tag" "an XML tag or document" } { "name/string" "an XML name or string representing a name" } { "matching-tag" tag } }\r
-{ $description "finds an XML tag with a matching name, recursively searching children and children of children" }\r
-{ $see-also tags-named tag-named deep-tags-named } ;\r
-\r
-HELP: deep-tags-named\r
-{ $values { "tag" "an XML tag or document" } { "name/string" "an XML name or string representing a name" } { "tags-seq" "a sequence of tags" } }\r
-{ $description "returns a sequence of all tags of a matching name, recursively searching children and children of children" }\r
-{ $see-also tag-named deep-tag-named tags-named } ;\r
-\r
-HELP: children>string\r
-{ $values { "tag" "an XML tag or document" } { "string" "a string" } }\r
-{ $description "concatenates the children of the tag, ignoring everything that's not a string" } ;\r
-\r
-HELP: children-tags\r
-{ $values { "tag" "an XML tag or document" } { "sequence" sequence } }\r
-{ $description "gets the children of the tag that are themselves tags" }\r
-{ $see-also first-child-tag } ;\r
-\r
-HELP: first-child-tag\r
-{ $values { "tag" "an XML tag or document" } { "tag" tag } }\r
-{ $description "returns the first child of the given tag that is a tag" }\r
-{ $see-also children-tags } ;\r
-\r
-HELP: multitags\r
-{ $class-description "XML parsing error describing the case where there is more than one main tag in a document. Contains no slots" } ;\r
-\r
-HELP: notags\r
-{ $class-description "XML parsing error describing the case where an XML document contains no main tag, or any tags at all" } ;\r
-\r
-HELP: extra-attrs\r
-{ $class-description "XML parsing error describing the case where the XML prolog (<?xml ...?>) contains attributes other than the three allowed ones, standalone, version and encoding. Contains one slot, attrs, which is a hashtable of all the extra attributes' names. Delegates to " { $link parsing-error } "." } ;\r
-\r
-HELP: nonexist-ns\r
-{ $class-description "XML parsing error describing the case where a namespace doesn't exist but it is used in a tag. Contains one slot, name, which contains the name of the undeclared namespace, and delegates to " { $link parsing-error } "." } ;\r
-\r
-HELP: not-yes/no\r
-{ $class-description "XML parsing error used to describe the case where standalone is set in the XML prolog to something other than 'yes' or 'no'. Delegates to " { $link parsing-error } " and contains one slot, text, which contains offending value." } ;\r
-\r
-HELP: unclosed\r
-{ $class-description "XML parsing error used to describe the case where the XML document contains classes which are not closed by the end of the document. Contains one slot, tags, a sequence of names." } ;\r
-\r
-HELP: mismatched\r
-{ $class-description "XML parsing error describing mismatched tags, eg <a></c>. Contains two slots: open is the name of the opening tag and close is the name of the closing tag. Delegates to " { $link parsing-error } " showing the location of the closing tag" } ;\r
-\r
-HELP: expected\r
-{ $class-description "XML parsing error describing when an expected token was not present. Delegates to " { $link parsing-error } ". Contains two slots, should-be, which has the expected string, and was, which has the actual string." } ;\r
+HELP: read-dtd\r
+{ $values { "stream" "an input stream" } { "dtd" dtd } }\r
+{ $description "Exhausts a stream, producing a " { $link dtd } " from the contents." } ;\r
 \r
-HELP: no-entity\r
-{ $class-description "XML parsing error describing the use of an undefined entity in a case where standalone is marked yes. Delegates to " { $link parsing-error } ". Contains one slot, thing, containing a string representing the entity." } ;\r
+HELP: file>dtd\r
+{ $values { "filename" string } { "dtd" dtd } }\r
+{ $description "Reads a file in UTF-8, converting it into an XML " { $link dtd } "." } ;\r
 \r
-HELP: xml-string-error\r
-{ $class-description "XML parsing error that delegates to " { $link parsing-error } " and represents an other, unspecified error, which is represented by the slot string, containing a string describing the error." } ;\r
+HELP: string>dtd\r
+{ $values { "string" string } { "dtd" dtd } }\r
+{ $description "Interprets a string as an XML " { $link dtd } "." } ;\r
 \r
-HELP: open-tag\r
-{ $class-description "represents a tag that does have children, ie is not a contained tag" }\r
-{ $notes "the constructor used for this class is simply " { $link <tag> } "." }\r
-{ $see-also tag contained-tag } ;\r
-\r
-HELP: tag-named\r
-{ $values { "tag" "an XML tag or document" }\r
-    { "name/string" "an XML name or string representing the name" }\r
-    { "matching-tag" tag } }\r
-{ $description "finds the first tag with matching name which is the direct child of the given tag" }\r
-{ $see-also deep-tags-named deep-tag-named tags-named } ;\r
-\r
-HELP: tags-named\r
-{ $values { "tag" "an XML tag or document" }\r
-    { "name/string" "an XML name or string representing the name" }\r
-    { "tags-seq" "a sequence of tags" } }\r
-{ $description "finds all tags with matching name that are the direct children of the given tag" }\r
-{ $see-also deep-tag-named deep-tags-named tag-named } ;\r
-\r
-HELP: state-parse\r
-{ $values { "stream" "an input stream" } { "quot" "a quotation ( -- )" } }\r
-{ $description "takes a stream and runs an imperative parser on it, allowing words like " { $link next } " to be used within the context of the stream." } ;\r
-\r
-HELP: pre/post-content\r
-{ $class-description "describes the error where a non-whitespace string is used before or after the main tag in an XML document. Contains two slots: string contains the offending string, and pre? is t if it occured before the main tag and f if it occured after" } ;\r
-\r
-HELP: entities\r
-{ $description "a hash table from default XML entity names (like &amp; and &lt;) to the characters they represent. This is automatically included when parsing any XML document." }\r
-{ $see-also html-entities } ;\r
-\r
-HELP: html-entities\r
-{ $description "a hash table from HTML entity names to their character values" }\r
-{ $see-also entities with-html-entities } ;\r
-\r
-HELP: with-entities\r
-{ $values { "entities" "a hash table of strings to chars" }\r
-    { "quot" "a quotation ( -- )" } }\r
-{ $description "calls the quotation using the given table of entity values (symbolizing, eg, that &foo; represents CHAR: a) on top of the default XML entities" }\r
-{ $see-also with-html-entities } ;\r
-\r
-HELP: with-html-entities\r
-{ $values { "quot" "a quotation ( -- )" } }\r
-{ $description "calls the given quotation using HTML entity values" }\r
-{ $see-also html-entities with-entities } ;\r
+{ read-dtd file>dtd string>dtd } related-words\r
 \r
 ARTICLE: { "xml" "reading" } "Reading XML"\r
     "The following words are used to read something into an XML document"\r
@@ -349,80 +67,15 @@ ARTICLE: { "xml" "reading" } "Reading XML"
     { $subsection read-xml }\r
     { $subsection read-xml-chunk }\r
     { $subsection string>xml-chunk }\r
-    { $subsection file>xml } ;\r
-\r
-ARTICLE: { "xml" "writing" } "Writing XML"\r
-    "These words are used in implementing prettyprint"\r
-    { $subsection write-xml-chunk }\r
-    "These words are used to print XML normally"\r
-    { $subsection xml>string }\r
-    { $subsection write-xml }\r
-    { $subsection print-xml }\r
-    "These words are used to prettyprint XML"\r
-    { $subsection pprint-xml>string }\r
-    { $subsection pprint-xml>string-but }\r
-    { $subsection pprint-xml }\r
-    { $subsection pprint-xml-but }\r
-    "This word reads and writes XML"\r
-    { $subsection xml-reprint } ;\r
-\r
-ARTICLE: { "xml" "classes" } "XML data classes"\r
-    "Data types that XML documents are made of:"\r
-    { $subsection name }\r
-    { $subsection tag }\r
-    { $subsection contained-tag }\r
-    { $subsection open-tag }\r
-    { $subsection xml }\r
-    { $subsection prolog }\r
-    { $subsection comment }\r
-    { $subsection instruction } ;\r
-\r
-ARTICLE: { "xml" "construct" } "XML data constructors"\r
-    "These data types are constructed with:"\r
-    { $subsection <name> }\r
-    { $subsection <tag> }\r
-    { $subsection <contained-tag> }\r
-    { $subsection <xml> }\r
-    { $subsection <prolog> }\r
-    { $subsection <comment> }\r
-    { $subsection <instruction> } ;\r
-\r
-ARTICLE: { "xml" "utils" } "XML processing utilities"\r
-    "Utilities for processing XML include..."\r
-    $nl\r
-    "System sfor creating words which dispatch on XML tags:"\r
-    { $subsection POSTPONE: PROCESS: }\r
-    { $subsection POSTPONE: TAG: }\r
-    "Getting parts of an XML document or tag:"\r
-    $nl\r
-    "Note: the difference between deep-tag-named and tag-named is that the former searches recursively among all children and children of children of the tag, while the latter only looks at the direct children, and is therefore more efficient."\r
-    { $subsection tag-named }\r
-    { $subsection tags-named }\r
-    { $subsection deep-tag-named }\r
-    { $subsection deep-tags-named }\r
-    { $subsection get-id }\r
-    "Words for simplified generation of XML:"\r
-    { $subsection build-tag* }\r
-    { $subsection build-tag }\r
-    { $subsection build-xml }\r
-    "Other relevant words:"\r
-    { $subsection children>string }\r
-    { $subsection children-tags }\r
-    { $subsection first-child-tag }\r
-    { $subsection names-match? }\r
-    { $subsection assert-tag } ;\r
-\r
-ARTICLE: { "xml" "internal" } "Internals of the XML parser"\r
-    "The XML parser creates its own parsing framework to process XML documents. The parser operates on streams. Important words involved in processing are:"\r
-    { $subsection parse-text }\r
-    { $subsection make-tag }\r
-    { $subsection parse-name }\r
-    { $subsection process }\r
-    "The XML parser is implemented using the libs/state-parser module. For more information, see " { $link { "state-parser" "main" } } ;\r
+    { $subsection file>xml }\r
+    "To read a DTD:"\r
+    { $subsection read-dtd }\r
+    { $subsection file>dtd }\r
+    { $subsection string>dtd } ;\r
 \r
 ARTICLE: { "xml" "events" } "Event-based XML parsing"\r
-    "In addition to DOM-style parsing based around " { $link read-xml } ", the XML module also provides SAX-style event-based parsing. This uses much of the same data structures as normal XML, with the exception of the classes " { $link xml } " and " { $link tag } " and as such, the articles " { $link { "xml" "classes" } } " and " { $link { "xml" "construct" } } " may be useful in learning how to process documents in this way. Other useful words are:"\r
-    { $subsection sax }\r
+    "In addition to DOM-style parsing based around " { $link read-xml } ", the XML module also provides SAX-style event-based parsing. This uses much of the same data structures as normal XML, with the exception of the classes " { $link xml } " and " { $link tag } " and as such, the article " { $vocab-link "xml.data" } " may be useful in learning how to process documents in this way. Other useful words are:"\r
+    { $subsection each-element }\r
     { $subsection opener }\r
     { $subsection closer }\r
     { $subsection contained }\r
@@ -432,41 +85,15 @@ ARTICLE: { "xml" "events" } "Event-based XML parsing"
     { $subsection pull-event }\r
     { $subsection pull-elem } ;\r
 \r
-ARTICLE: { "xml" "errors" } "XML parsing errors"\r
-    "The XML module provides a rich and highly inspectable set of parsing errors. All XML errors are described by the union class " { $link xml-parse-error } " but there are many classes contained in that:"\r
-    { $subsection multitags }\r
-    { $subsection notags }\r
-    { $subsection extra-attrs }\r
-    { $subsection nonexist-ns }\r
-    { $subsection not-yes/no }\r
-    { $subsection unclosed }\r
-    { $subsection mismatched }\r
-    { $subsection expected }\r
-    { $subsection no-entity }\r
-    { $subsection pre/post-content }\r
-    "Additionally, most of these errors delegate to " { $link parsing-error } " in order to provide more information"\r
-    $nl\r
-    "Note that, in parsing an XML document, only the first error is reported." ;\r
-\r
-ARTICLE: { "xml" "entities" } "XML entities"\r
-    "When XML is parsed, entities like &foo; are replaced with the characters they represent. A few entities like &amp; and &lt; are defined by default, but more are available, and the set of entities can be customized. Below are some words involved in XML entities, defined in the vocabulary 'entities':"\r
-    { $subsection entities }\r
-    { $subsection html-entities }\r
-    { $subsection with-entities }\r
-    { $subsection with-html-entities } ;\r
-\r
 ARTICLE: "xml" "XML parser"\r
-"The " { $vocab-link "xml" } " vocabulary implements the XML 1.1 standard, converting strings of text into XML and vice versa."\r
+"The " { $vocab-link "xml" } " vocabulary implements the XML 1.0 and 1.1 standards, converting strings of text into XML and vice versa. The parser checks for well-formedness but is not validating. There is only partial support for processing DTDs."\r
     { $subsection { "xml" "reading" } }\r
-    { $subsection { "xml" "writing" } }\r
-    { $subsection { "xml" "classes" } }\r
-    { $subsection { "xml" "construct" } }\r
-    { $subsection { "xml" "utils" } }\r
-    { $subsection { "xml" "internal" } }\r
     { $subsection { "xml" "events" } }\r
-    { $subsection { "xml" "errors" } }\r
-    { $subsection { "xml" "entities" } } ;\r
-\r
-IN: xml\r
+    { $vocab-subsection "Writing XML" "xml.writer" }\r
+    { $vocab-subsection "XML parsing errors" "xml.errors" }\r
+    { $vocab-subsection "XML entities" "xml.entities" }\r
+    { $vocab-subsection "XML data types" "xml.data" }\r
+    { $vocab-subsection "Utilities for processing XML" "xml.utilities" }\r
+    { $vocab-subsection "Dispatch on XML tag names" "xml.dispatch" } ;\r
 \r
 ABOUT: "xml"\r
index 8afcf7a33b0ed55e0b5c89b6b305efaafbcf27e9..fd749ce905e26490e8f064db3d1d4b972474a35e 100644 (file)
@@ -1,13 +1,13 @@
-! Copyright (C) 2005, 2006 Daniel Ehrenberg
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io io.streams.string io.files kernel math namespaces
-prettyprint sequences arrays generic strings vectors
-xml.char-classes xml.data xml.errors xml.tokenize xml.writer
-xml.utilities state-parser assocs ascii io.encodings.utf8
-accessors xml.backend ;
+USING: accessors arrays io io.encodings.binary io.files
+io.streams.string kernel namespaces sequences strings io.encodings.utf8
+xml.data xml.errors xml.elements ascii xml.entities
+xml.writer xml.state xml.autoencoding assocs xml.tokenize
+combinators.short-circuit xml.name ;
 IN: xml
 
-!   -- Overall parser with data tree
+<PRIVATE
 
 : add-child ( object -- )
     xml-stack get peek second push ;
@@ -23,19 +23,18 @@ GENERIC: process ( object -- )
 M: object process add-child ;
 
 M: prolog process
-    xml-stack get V{ { f V{ "" } } } =
+    xml-stack get
+    { V{ { f V{ "" } } } V{ { f V{ } } } } member?
     [ bad-prolog ] unless drop ;
 
-M: instruction process
-    xml-stack get length 1 =
-    [ bad-instruction ] unless
-    add-child ;
+: before-main? ( -- ? )
+    xml-stack get {
+        [ length 1 = ]
+        [ first second [ tag? ] contains? not ]
+    } 1&& ;
 
 M: directive process
-    xml-stack get dup length 1 =
-    swap first second [ tag? ] contains? not and
-    [ misplaced-directive ] unless
-    add-child ;
+    before-main? [ misplaced-directive ] unless add-child ;
 
 M: contained process
     [ name>> ] [ attrs>> ] bi
@@ -54,16 +53,15 @@ M: closer process
     <tag> add-child ;
 
 : init-xml-stack ( -- )
-    V{ } clone xml-stack set f push-xml ;
+    V{ } clone xml-stack set
+    f push-xml ;
 
 : default-prolog ( -- prolog )
     "1.0" "UTF-8" f <prolog> ;
 
-: reset-prolog ( -- )
-    default-prolog prolog-data set ;
-
 : init-xml ( -- )
-    reset-prolog init-xml-stack init-ns-stack ;
+    init-ns-stack
+    extra-entities [ H{ } assoc-like ] change ;
 
 : assert-blanks ( seq pre? -- )
     swap [ string? ] filter
@@ -84,7 +82,11 @@ M: closer process
     ! this does *not* affect the contents of the stack
     [ notags ] unless* ;
 
-: make-xml-doc ( prolog seq -- xml-doc )
+: get-prolog ( seq -- prolog )
+    first dup prolog? [ drop default-prolog ] unless ;
+
+: make-xml-doc ( seq -- xml-doc )
+    [ get-prolog ] keep
     dup [ tag? ] find
     [ assure-tags cut rest no-pre/post no-post-tags ] dip
     swap <xml> ;
@@ -93,14 +95,16 @@ M: closer process
 
 SYMBOL: text-now?
 
+PRIVATE>
+
 TUPLE: pull-xml scope ;
 : <pull-xml> ( -- pull-xml )
     [
         input-stream [ ] change ! bring var in this scope
-        init-parser reset-prolog init-ns-stack
-        text-now? on
+        init-xml text-now? on
     ] H{ } make-assoc
     pull-xml boa ;
+! pull-xml needs to call start-document somewhere
 
 : pull-event ( pull -- xml-event/f )
     scope>> [
@@ -109,6 +113,8 @@ TUPLE: pull-xml scope ;
         ] if text-now? set
     ] bind ;
 
+<PRIVATE
+
 : done? ( -- ? )
     xml-stack get length 1 = ;
 
@@ -119,52 +125,64 @@ TUPLE: pull-xml scope ;
         [ (pull-elem) ] if
     ] if ;
 
+PRIVATE>
+
 : pull-elem ( pull -- xml-elem/f )
     [ init-xml-stack (pull-elem) ] with-scope ;
 
+<PRIVATE
+
 : call-under ( quot object -- quot )
     swap dup slip ; inline
 
-: sax-loop ( quot: ( xml-elem -- ) -- )
+: xml-loop ( quot: ( xml-elem -- ) -- )
     parse-text call-under
-    get-char [ make-tag call-under sax-loop ]
+    get-char [ make-tag call-under xml-loop ]
     [ drop ] if ; inline recursive
 
-: sax ( stream quot: ( xml-elem -- ) -- )
-    swap [
-        reset-prolog init-ns-stack
-        prolog-data get call-under
-        sax-loop
-    ] state-parse ; inline recursive
-
-: (read-xml) ( -- )
-    [ process ] sax-loop ; inline
-
-: (read-xml-chunk) ( stream -- prolog seq )
-    [
-        init-xml (read-xml)
+: read-seq ( stream quot n -- seq )
+    rot [
+        depth set
+        init-xml init-xml-stack
+        call
+        [ process ] xml-loop
         done? [ unclosed ] unless
         xml-stack get first second
-        prolog-data get swap
-    ] state-parse ;
+    ] with-state ; inline
+
+PRIVATE>
+
+: each-element ( stream quot: ( xml-elem -- ) -- )
+    swap [
+        init-xml
+        start-document [ call-under ] when*
+        xml-loop
+    ] with-state ; inline
 
 : read-xml ( stream -- xml )
-    #! Produces a tree of XML nodes
-    (read-xml-chunk) make-xml-doc ;
+    [ start-document [ process ] when* ]
+    0 read-seq make-xml-doc ;
 
 : read-xml-chunk ( stream -- seq )
-    (read-xml-chunk) nip ;
+    [ check ] 1 read-seq <xml-chunk> ;
 
 : string>xml ( string -- xml )
-    <string-reader> read-xml ;
+    <string-reader> [ check ] 0 read-seq make-xml-doc ;
 
 : string>xml-chunk ( string -- xml )
     <string-reader> read-xml-chunk ;
 
 : file>xml ( filename -- xml )
-    ! Autodetect encoding!
-    utf8 <file-reader> read-xml ;
+    binary <file-reader> read-xml ;
+
+: read-dtd ( stream -- dtd )
+    [
+        H{ } clone extra-entities set
+        take-internal-subset
+    ] with-state ;
 
-: xml-reprint ( string -- )
-    string>xml print-xml ;
+: file>dtd ( filename -- dtd )
+    utf8 <file-reader> read-dtd ;
 
+: string>dtd ( string -- dtd )
+    <string-reader> read-dtd ;
index 16da4be1d3eefeab1d95a3ed6c0147c139c131f5..8a8e5fad4ac1da730af790caeda39763957e45ba 100644 (file)
@@ -1,6 +1,6 @@
 USING: xmode.loader xmode.utilities xmode.rules namespaces
 strings splitting assocs sequences kernel io.files xml memoize
-words globs combinators io.encodings.utf8 sorting accessors ;
+words globs combinators io.encodings.utf8 sorting accessors xml.data ;
 IN: xmode.catalog
 
 TUPLE: mode file file-name-glob first-line-glob ;
@@ -8,12 +8,13 @@ TUPLE: mode file file-name-glob first-line-glob ;
 <TAGS: parse-mode-tag ( modes tag -- )
 
 TAG: MODE
-    "NAME" over at >r
-    mode new {
-        { "FILE" f (>>file) }
-        { "FILE_NAME_GLOB" f (>>file-name-glob) }
-        { "FIRST_LINE_GLOB" f (>>first-line-glob) }
-    } init-from-tag r>
+    dup "NAME" attr [
+        mode new {
+            { "FILE" f (>>file) }
+            { "FILE_NAME_GLOB" f (>>file-name-glob) }
+            { "FIRST_LINE_GLOB" f (>>first-line-glob) }
+        } init-from-tag
+    ] dip
     rot set-at ;
 
 TAGS>
@@ -56,7 +57,7 @@ SYMBOL: rule-sets
     [ get-rule-set nip swap (>>delegate) ] [ 2drop ] if ;
 
 : each-rule ( rule-set quot -- )
-    >r rules>> values concat r> each ; inline
+    [ rules>> values concat ] dip each ; inline
 
 : resolve-delegates ( ruleset -- )
     [ resolve-delegate ] each-rule ;
@@ -65,8 +66,7 @@ SYMBOL: rule-sets
     over [ dupd update ] [ nip clone ] if ;
 
 : import-keywords ( parent child -- )
-    over >r [ keywords>> ] bi@ ?update
-    r> (>>keywords) ;
+    over [ [ keywords>> ] bi@ ?update ] dip (>>keywords) ;
 
 : import-rules ( parent child -- )
     swap [ add-rule ] curry each-rule ;
@@ -115,5 +115,5 @@ ERROR: mutually-recursive-rulesets ruleset ;
 
 : find-mode ( file-name first-line -- mode )
     modes
-    [ nip >r 2dup r> suitable-mode? ] assoc-find
-    2drop >r 2drop r> [ "text" ] unless* ;
+    [ nip [ 2dup ] dip suitable-mode? ] assoc-find
+    2drop [ 2drop ] dip [ "text" ] unless* ;
diff --git a/basis/xmode/code2html/code2html-tests.factor b/basis/xmode/code2html/code2html-tests.factor
new file mode 100644 (file)
index 0000000..cd11ba5
--- /dev/null
@@ -0,0 +1,12 @@
+IN: xmode.code2html.tests
+USING: xmode.code2html xmode.catalog
+tools.test multiline splitting memoize
+kernel ;
+
+[ ] [ \ (load-mode) reset-memoized ] unit-test
+
+[ ] [
+    <" <style type="text/css" media="screen" >
+    *        {margin:0; padding:0; border:0;} ">
+    string-lines "html" htmlize-lines drop
+] unit-test
\ No newline at end of file
index 032b2b25f00c526d4e498f4e64cc90aed4223a89..962b0e9fbf1c68bb5c16cd71ebbf1c15d870c723 100644 (file)
@@ -1,48 +1,45 @@
-USING: xmode.tokens xmode.marker xmode.catalog kernel
+USING: xmode.tokens xmode.marker xmode.catalog kernel locals
 html.elements io io.files sequences words io.encodings.utf8
-namespaces xml.entities accessors ;
+namespaces xml.entities accessors xml.interpolate locals xml.writer ;
 IN: xmode.code2html
 
-: htmlize-tokens ( tokens -- )
+: htmlize-tokens ( tokens -- xml )
     [
         [ str>> ] [ id>> ] bi [
-            <span name>> =class span> escape-string write </span>
-        ] [
-            escape-string write
-        ] if*
-    ] each ;
+            name>> swap
+            [XML <span class=<->><-></span> XML]
+        ] [ ] if*
+    ] map ;
 
-: htmlize-line ( line-context line rules -- line-context' )
+: htmlize-line ( line-context line rules -- line-context' xml )
     tokenize-line htmlize-tokens ;
 
-: htmlize-lines ( lines mode -- )
-    f swap load-mode [ htmlize-line nl ] curry reduce drop ;
+: htmlize-lines ( lines mode -- xml )
+    [ f ] 2dip load-mode [ htmlize-line ] curry map nip ;
 
-: default-stylesheet ( -- )
-    <style>
-        "resource:basis/xmode/code2html/stylesheet.css"
-        utf8 file-contents escape-string write
-    </style> ;
+: default-stylesheet ( -- xml )
+    "resource:basis/xmode/code2html/stylesheet.css"
+    utf8 file-contents
+    [XML <style><-></style> XML] ;
 
-: htmlize-stream ( path stream -- )
-    lines swap
-    <html>
+:: htmlize-stream ( path stream -- xml )
+    stream lines
+    [ "" ] [ first find-mode path swap htmlize-lines ]
+    if-empty :> input
+    default-stylesheet :> stylesheet
+    <XML <html>
         <head>
-            default-stylesheet
-            <title> dup escape-string write </title>
+            <-stylesheet->
+            <title><-path-></title>
         </head>
         <body>
-            <pre>
-                over empty?
-                [ 2drop ]
-                [ over first find-mode htmlize-lines ] if
-            </pre>
+            <pre><-input-></pre>
         </body>
-    </html> ;
+    </html> XML> ;
 
 : htmlize-file ( path -- )
     dup utf8 [
         dup ".html" append utf8 [
-            input-stream get htmlize-stream
+            input-stream get htmlize-stream write-xml
         ] with-file-writer
     ] with-file-reader ;
index 9115b1389bc323a69caeaf32b07894f7c2173ad7..39ff627b8460748ba10ea75ba273a3fb7fce32a7 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.\r
 ! See http://factorcode.org/license.txt for BSD license.\r
-USING: io io.files io.encodings.utf8 namespaces http.server\r
-http.server.responses http.server.static http xmode.code2html\r
-kernel sequences accessors fry ;\r
+USING: io io.files io.pathnames io.encodings.utf8 namespaces\r
+http.server http.server.responses http.server.static http\r
+xmode.code2html kernel sequences accessors fry ;\r
 IN: xmode.code2html.responder\r
 \r
 : <sources> ( root -- responder )\r
index 8639c93e71651ebc9b2ffc2e071a5ee9b1583362..64c4234bd3f39ed5999e557142c4c9d5fd27abf1 100644 (file)
@@ -13,10 +13,10 @@ TAG: PROPS
     parse-props-tag >>props drop ;
 
 TAG: IMPORT
-    "DELEGATE" swap at swap import-rule-set ;
+    "DELEGATE" attr swap import-rule-set ;
 
 TAG: TERMINATE
-    "AT_CHAR" swap at string>number >>terminate-char drop ;
+    "AT_CHAR" attr string>number >>terminate-char drop ;
 
 RULE: SEQ seq-rule
     shared-tag-attrs delegate-attr literal-start ;
index cbebe090c33676bf68372c39f8c86c0ec7736612..f63191d5f6c164627b3001e2eed59fe14464461e 100644 (file)
@@ -31,7 +31,7 @@ SYMBOL: ignore-case?
 
 ! PROP, PROPS
 : parse-prop-tag ( tag -- key value )
-    "NAME" over at "VALUE" rot at ;
+    [ "NAME" attr ] [ "VALUE" attr ] bi ;
 
 : parse-props-tag ( tag -- assoc )
     child-tags
@@ -40,7 +40,7 @@ SYMBOL: ignore-case?
 : position-attrs ( tag -- at-line-start? at-whitespace-end? at-word-start? )
     ! XXX Wrong logic!
     { "AT_LINE_START" "AT_WHITESPACE_END" "AT_WORD_START" }
-    swap [ at string>boolean ] curry map first3 ;
+    [ attr string>boolean ] with map first3 ;
 
 : parse-literal-matcher ( tag -- matcher )
     dup children>string
@@ -101,4 +101,4 @@ TAGS>
 : init-eol-span-tag ( -- ) [ drop init-eol-span ] , ;
 
 : parse-keyword-tag ( tag keyword-map -- )
-    >r dup main>> string>token swap children>string r> set-at ;
+    [ dup main>> string>token swap children>string ] dip set-at ;
index f777eaa18ca4b5d9d63a4b8b5afc1e5dfe132042..798807f19807f7f1841c07ce67a14b370ff4983f 100644 (file)
@@ -5,7 +5,7 @@ USING: kernel namespaces make xmode.rules xmode.tokens
 xmode.marker.state xmode.marker.context xmode.utilities
 xmode.catalog sequences math assocs combinators strings
 parser-combinators.regexp splitting parser-combinators ascii
-unicode.case combinators.short-circuit accessors ;
+ascii combinators.short-circuit accessors ;
 
 ! Based on org.gjt.sp.jedit.syntax.TokenMarker
 
@@ -69,7 +69,7 @@ M: string-matcher text-matches?
     ] keep string>> length and ;
 
 M: regexp text-matches?
-    >r >string r> match-head ;
+    [ >string ] dip match-head ;
 
 : rule-start-matches? ( rule -- match-count/f )
     dup start>> tuck swap can-match-here? [
@@ -97,10 +97,10 @@ DEFER: get-rules
     f swap rules>> at ?push-all ;
 
 : get-char-rules ( vector/f char ruleset -- vector/f )
-    >r ch>upper r> rules>> at ?push-all ;
+    [ ch>upper ] dip rules>> at ?push-all ;
 
 : get-rules ( char ruleset -- seq )
-    f -rot [ get-char-rules ] keep get-always-rules ;
+    [ f ] 2dip [ get-char-rules ] keep get-always-rules ;
 
 GENERIC: handle-rule-start ( match-count rule -- )
 
index 096230ff4e3577bc604c6f14e6f4950cfdfd9e0c..44d3a0285e41a040723c821896cdfb23e16d12c5 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: xmode.marker.context xmode.rules symbols accessors
+USING: xmode.marker.context xmode.rules accessors
 xmode.tokens namespaces make kernel sequences assocs math ;
 IN: xmode.marker.state
 
@@ -20,14 +20,14 @@ SYMBOLS: line last-offset position context
     current-rule-set keywords>> ;
 
 : token, ( from to id -- )
-    2over = [ 3drop ] [ >r line get subseq r> <token> , ] if ;
+    2over = [ 3drop ] [ [ line get subseq ] dip <token> , ] if ;
 
 : prev-token, ( id -- )
-    >r last-offset get position get r> token,
+    [ last-offset get position get ] dip token,
     position get last-offset set ;
 
 : next-token, ( len id -- )
-    >r position get 2dup + r> token,
+    [ position get 2dup + ] dip token,
     position get + dup 1- position set last-offset set ;
 
 : push-context ( rules -- )
index e4f12bcc49314d0a9debc17ef90b5dbea6a26a5a..adc43d7bb6b6364521eb220c564af61dfbcd6436 100644 (file)
@@ -41,7 +41,7 @@ MEMO: standard-rule-set ( id -- ruleset )
 
 : ?push-all ( seq1 seq2 -- seq1+seq2 )
     [
-        over [ >r V{ } like r> over push-all ] [ nip ] if
+        over [ [ V{ } like ] dip over push-all ] [ nip ] if
     ] when* ;
 
 : rule-set-no-word-sep* ( ruleset -- str )
@@ -107,8 +107,7 @@ M: regexp text-hash-char drop f ;
     text-hash-char [ suffix ] when* ;
 
 : add-rule ( rule ruleset -- )
-    >r dup rule-chars* >upper swap
-    r> rules>> inverted-index ;
+    [ dup rule-chars* >upper swap ] dip rules>> inverted-index ;
 
 : add-escape-rule ( string ruleset -- )
     over [
index b8917529d6d9d808a7a84dad513082abca471a94..945f4bb0465a8ebf290ea45f7bd474be93dbff9d 100644 (file)
@@ -1,4 +1,5 @@
-USING: accessors parser words sequences namespaces kernel assocs
+USING: accessors parser words words.symbol
+sequences namespaces kernel assocs
 compiler.units ;
 IN: xmode.tokens
 
index 23e4195158b05dc0d9e90fc647001de05e727ee5..d6407d818062deb9dedc212e17359d2203c1bf8d 100644 (file)
@@ -2,12 +2,12 @@ USING: accessors sequences assocs kernel quotations namespaces
 xml.data xml.utilities combinators macros parser lexer words fry ;
 IN: xmode.utilities
 
-: implies [ not ] dip or ; inline
+: implies ( x y -- z ) [ not ] dip or ; inline
 
 : child-tags ( tag -- seq ) children>> [ tag? ] filter ;
 
 : map-find ( seq quot -- result elt )
-    f -rot
+    [ f ] 2dip
     '[ nip @ dup ] find
     [ [ drop f ] unless ] dip ; inline
 
@@ -22,7 +22,7 @@ IN: xmode.utilities
         ] }
         { [ dup length 3 = ] [
             first3 '[
-                _ tag get at
+                tag get _ attr
                 _ [ execute ] when* object get _ execute
             ]
         ] }
@@ -53,5 +53,5 @@ SYMBOL: tag-handler-word
 
 : TAGS>
     tag-handler-word get
-    tag-handlers get >alist [ >r dup main>> r> case ] curry
+    tag-handlers get >alist [ [ dup main>> ] dip case ] curry
     define ; parsing
index b2b6ad1ff94bea6f3ba3055a2fbb62173056623f..44c047155d78a5c5bc9fa4b6714929e1bdf77a7e 100755 (executable)
@@ -236,7 +236,7 @@ find_word_size() {
 
 set_factor_binary() {
     case $OS in
-        winnt) FACTOR_BINARY=factor.exe;;
+        winnt) FACTOR_BINARY=factor-console.exe;;
         *) FACTOR_BINARY=factor;;
     esac
 }
index 2f486cd948786180506a079eda810bb2a12c0a8c..e088953db883e01ed4c85f9c102d8db41d78d1ab 100644 (file)
@@ -1,7 +1,7 @@
-! Copyright (C) 2007 Daniel Ehrenberg, Slava Pestov, and Doug Coleman
+! Copyright (C) 2007, 2009 Daniel Ehrenberg, Slava Pestov, and Doug Coleman
 ! See http://factorcode.org/license.txt for BSD license.
 USING: help.markup help.syntax kernel sequences
-sequences.private namespaces math quotations ;
+sequences.private namespaces math quotations assocs.private ;
 IN: assocs
 
 ARTICLE: "alists" "Association lists"
@@ -21,7 +21,7 @@ ARTICLE: "enums" "Enumerations"
 { $subsection enum }
 { $subsection <enum> }
 "Inverting a permutation using enumerations:"
-{ $example "USING: assocs sorting prettyprint ;" ": invert <enum> >alist sort-values keys ;" "{ 2 0 4 1 3 } invert ." "{ 1 3 0 4 2 }" } ;
+{ $example "USING: assocs sorting prettyprint ;" "IN: scratchpad" ": invert ( perm -- perm' )" "    <enum> >alist sort-values keys ;" "{ 2 0 4 1 3 } invert ." "{ 1 3 0 4 2 }" } ;
 
 HELP: enum
 { $class-description "An associative structure which wraps a sequence and maps integers to the corresponding elements of the sequence."
@@ -113,18 +113,15 @@ $nl
 { $subsection assoc-each }
 { $subsection assoc-find }
 { $subsection assoc-map }
-{ $subsection assoc-push-if }
 { $subsection assoc-filter }
+{ $subsection assoc-filter-as }
 { $subsection assoc-contains? }
 { $subsection assoc-all? }
 "Additional combinators:"
 { $subsection cache }
 { $subsection map>assoc }
 { $subsection assoc>map }
-{ $subsection assoc-map-as }
-{ $subsection search-alist }
-"Utility word:"
-{ $subsection assoc-pusher } ;
+{ $subsection assoc-map-as } ;
 
 ARTICLE: "assocs" "Associative mapping operations"
 "An " { $emphasis "associative mapping" } ", abbreviated " { $emphasis "assoc" } ", is a collection of key/value pairs which provides efficient lookup and storage indexed by key."
@@ -224,14 +221,16 @@ HELP: assoc-map
 
 { assoc-map assoc-map-as } related-words
 
-HELP: assoc-push-if
-{ $values { "accum" "a resizable mutable sequence" } { "quot" { $quotation "( key value -- ? )" } } { "key" object } { "value" object } }
-{ $description "If the quotation yields true when applied to the key/value pair, adds the key/value pair at the end of " { $snippet "accum" } "." } ;
-
 HELP: assoc-filter
 { $values { "assoc" assoc } { "quot" { $quotation "( key value -- ? )" } } { "subassoc" "a new assoc" } }
 { $description "Outputs an assoc of the same type as " { $snippet "assoc" } " consisting of all entries for which the predicate quotation yields true." } ;
 
+HELP: assoc-filter-as
+{ $values { "assoc" assoc } { "quot" { $quotation "( key value -- ? )" } } { "exemplar" assoc } { "subassoc" "a new assoc" } }
+{ $description "Outputs an assoc of the same type as " { $snippet "exemplar" } " consisting of all entries for which the predicate quotation yields true." } ;
+
+{ assoc-filter assoc-filter-as } related-words
+
 HELP: assoc-contains?
 { $values { "assoc" assoc } { "quot" { $quotation "( key value -- ? )" } } { "?" "a boolean" } }
 { $description "Tests if the assoc contains an entry satisfying a predicate by applying the quotation to each entry in turn. Iteration stops if an entry is found for which the quotation outputs a true value." } ;
@@ -381,18 +380,6 @@ HELP: assoc-map-as
 { $description "Applies the quotation to each entry in the input assoc and collects the results in a new assoc of the stame type as the exemplar." }
 { $examples { $example "USING: prettyprint assocs hashtables math ;" " H{ { 1 2 } { 3 4 } } [ sq ] { } assoc-map-as ." "{ { 1 4 } { 3 16 } }" } } ;
 
-HELP: assoc-pusher
-{ $values
-     { "quot" "a predicate quotation" }
-     { "quot'" quotation } { "accum" assoc } }
-{ $description "Creates a new " { $snippet "assoc" } " to accumulate the key/value pairs which return true for a predicate.  Returns a new quotation which accepts a pair of object to be tested and stored in the accumulator if the test yields true. The accumulator is left on the stack for convenience." }
-{ $example "! Find only the pairs that sum to 5:" "USING: prettyprint assocs math kernel ;"
-           "{ { 1 2 } { 2 3 } { 3 4 } } [ + 5 = ] assoc-pusher [ assoc-each ] dip ."
-           "V{ { 2 3 } }"
-}
-{ $notes "Used to implement the " { $link assoc-filter } " word." } ;
-
-
 HELP: extract-keys
 { $values
      { "seq" sequence } { "assoc" assoc }
@@ -418,11 +405,12 @@ HELP: search-alist
 { $values
      { "key" object } { "alist" "an array of key/value pairs" }
      { "pair/f" "a key/value pair" } { "i/f" integer } }
-{ $description "Performs an in-order traversal of a " { $snippet "alist" } " and stops when the key is matched or the end of the " { $snippet "alist" } " has been reached. If there is no match, both outputs are " { $link f } "." }
-{ $examples { $example "USING: prettyprint assocs kernel ;"
+{ $description "Iterates over " { $snippet "alist" } " and stops when the key is matched or the end of the " { $snippet "alist" } " has been reached. If there is no match, both outputs are " { $link f } "." }
+{ $notes "This word is used to implement " { $link at* } " and " { $link set-at } " on sequences, and should not be called direclty." }
+{ $examples { $example "USING: prettyprint assocs.private kernel ;"
                         "3 { { 1 2 } { 3 4 } } search-alist [ . ] bi@"
                        "{ 3 4 }\n1"
-            } { $example "USING: prettyprint assocs kernel ;"
+            } { $example "USING: prettyprint assocs.private kernel ;"
                        "6 { { 1 2 } { 3 4 } } search-alist [ . ] bi@"
                        "f\nf"
             }
index 969c7249a9205150c01fdacb1b82db9f273411ab..5617888148ede69c4928ff7e98a58bf1d25d434b 100644 (file)
@@ -118,3 +118,24 @@ unit-test
         { "nachos" "cheese" }
     } extract-keys
 ] unit-test
+
+[ f ] [
+    "a" H{ { "a" f } } at-default
+] unit-test
+
+[ "b" ] [
+    "b" H{ { "a" f } } at-default
+] unit-test
+
+[ "x" ] [
+    "a" H{ { "a" "x" } } at-default
+] unit-test
+
+[ H{ { "b" [ 2 ] } { "d" [ 4 ] } } H{ { "a" [ 1 ] } { "c" [ 3 ] } } ] [
+    H{
+        { "a" [ 1 ] }
+        { "b" [ 2 ] }
+        { "c" [ 3 ] }
+        { "d" [ 4 ] }
+    } [ nip first even? ] assoc-partition
+] unit-test
\ No newline at end of file
index 320e370ec980bad11cc5363e10104cdcc05d70e3..730c9f6cb80b5d00382ee14b9987272dd158ca30 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2007, 2008 Daniel Ehrenberg, Slava Pestov
+! Copyright (C) 2007, 2009 Daniel Ehrenberg, Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel sequences arrays math sequences.private vectors
 accessors ;
@@ -7,22 +7,42 @@ IN: assocs
 MIXIN: assoc
 
 GENERIC: at* ( key assoc -- value/f ? )
+GENERIC: value-at* ( value assoc -- key/f ? )
 GENERIC: set-at ( value key assoc -- )
 GENERIC: new-assoc ( capacity exemplar -- newassoc )
 GENERIC: delete-at ( key assoc -- )
 GENERIC: clear-assoc ( assoc -- )
 GENERIC: assoc-size ( assoc -- n )
 GENERIC: assoc-like ( assoc exemplar -- newassoc )
+GENERIC: assoc-clone-like ( assoc exemplar -- newassoc )
+GENERIC: >alist ( assoc -- newassoc )
 
 M: assoc assoc-like drop ;
 
-GENERIC: assoc-clone-like ( assoc exemplar -- newassoc )
-
-GENERIC: >alist ( assoc -- newassoc )
+<PRIVATE
 
 : (assoc-each) ( assoc quot -- seq quot' )
     [ >alist ] dip [ first2 ] prepose ; inline
 
+: (assoc-stack) ( key i seq -- value )
+    over 0 < [
+        3drop f
+    ] [
+        3dup nth-unsafe at*
+        [ [ 3drop ] dip ] [ drop [ 1- ] dip (assoc-stack) ] if
+    ] if ; inline recursive
+
+: search-alist ( key alist -- pair/f i/f )
+    [ first = ] with find swap ; inline
+
+: substituter ( assoc -- quot )
+    [ dupd at* [ nip ] [ drop ] if ] curry ; inline
+
+: with-assoc ( assoc quot: ( value key -- assoc ) -- quot: ( key value -- ) )
+    curry [ swap ] prepose ; inline
+
+PRIVATE>
+
 : assoc-find ( assoc quot -- key value ? )
     (assoc-each) find swap [ first2 t ] [ drop f f f ] if ; inline
 
@@ -40,19 +60,16 @@ GENERIC: >alist ( assoc -- newassoc )
 : assoc-map ( assoc quot -- newassoc )
     over assoc-map-as ; inline
 
-: assoc-push-if ( key value quot accum -- )
-    [ 2keep rot ] dip swap
-    [ [ 2array ] dip push ] [ 3drop ] if ; inline
-
-: assoc-pusher ( quot -- quot' accum )
-    V{ } clone [ [ assoc-push-if ] 2curry ] keep ; inline
-
 : assoc-filter-as ( assoc quot exemplar -- subassoc )
-    [ assoc-pusher [ assoc-each ] dip ] dip assoc-like ; inline
+    [ (assoc-each) filter ] dip assoc-like ; inline
 
 : assoc-filter ( assoc quot -- subassoc )
     over assoc-filter-as ; inline
 
+: assoc-partition ( assoc quot -- true-assoc false-assoc )
+    [ (assoc-each) partition ] [ drop ] 2bi
+    tuck [ assoc-like ] 2bi@ ; inline
+
 : assoc-contains? ( assoc quot -- ? )
     assoc-find 2nip ; inline
 
@@ -62,9 +79,12 @@ GENERIC: >alist ( assoc -- newassoc )
 : at ( key assoc -- value/f )
     at* drop ; inline
 
+: at-default ( key assoc -- value/key )
+    2dup at* [ 2nip ] [ 2drop ] if ; inline
+
 M: assoc assoc-clone-like ( assoc exemplar -- newassoc )
-    over assoc-size swap new-assoc
-    swap [ swap pick set-at ] assoc-each ;
+    [ dup assoc-size ] dip new-assoc
+    [ [ set-at ] with-assoc assoc-each ] keep ;
 
 : keys ( assoc -- keys )
     [ drop ] { } assoc>map ;
@@ -76,38 +96,28 @@ M: assoc assoc-clone-like ( assoc exemplar -- newassoc )
     [ at* ] 2keep delete-at ;
 
 : rename-at ( newkey key assoc -- )
-    tuck delete-at* [ -rot set-at ] [ 3drop ] if ;
+    [ delete-at* ] keep [ set-at ] with-assoc [ 2drop ] if ;
 
 : assoc-empty? ( assoc -- ? )
-    assoc-size zero? ;
-
-: (assoc-stack) ( key i seq -- value )
-    over 0 < [
-        3drop f
-    ] [
-        3dup nth-unsafe at*
-        [ [ 3drop ] dip ] [ drop [ 1- ] dip (assoc-stack) ] if
-    ] if ; inline recursive
+    assoc-size 0 = ;
 
 : assoc-stack ( key seq -- value )
-    dup length 1- swap (assoc-stack) ; flushable
+    [ length 1- ] keep (assoc-stack) ; flushable
 
 : assoc-subset? ( assoc1 assoc2 -- ? )
-    [ swapd at* [ = ] [ 2drop f ] if ] curry assoc-all? ;
+    [ at* [ = ] [ 2drop f ] if ] with-assoc assoc-all? ;
 
 : assoc= ( assoc1 assoc2 -- ? )
     [ assoc-subset? ] [ swap assoc-subset? ] 2bi and ;
 
 : assoc-hashcode ( n assoc -- code )
-    [
-        [ over ] dip hashcode* 2/ [ dupd hashcode* ] dip bitxor
-    ] { } assoc>map hashcode* ;
+    >alist hashcode* ;
 
 : assoc-intersect ( assoc1 assoc2 -- intersection )
     swap [ nip key? ] curry assoc-filter ;
 
 : update ( assoc1 assoc2 -- )
-    swap [ swapd set-at ] curry assoc-each ;
+    swap [ set-at ] with-assoc assoc-each ;
 
 : assoc-union ( assoc1 assoc2 -- union )
     [ [ [ assoc-size ] bi@ + ] [ drop ] 2bi new-assoc ] 2keep
@@ -122,24 +132,23 @@ M: assoc assoc-clone-like ( assoc exemplar -- newassoc )
 : remove-all ( assoc seq -- subseq )
     swap [ key? not ] curry filter ;
 
-: (substitute)
-    [ dupd at* [ nip ] [ drop ] if ] curry ; inline
-
 : substitute-here ( seq assoc -- )
-    (substitute) change-each ;
+    substituter change-each ;
 
 : substitute ( seq assoc -- newseq )
-    (substitute) map ;
+    substituter map ;
 
 : cache ( key assoc quot -- value )
-    2over at* [
-        [ 3drop ] dip
-    ] [
-        drop pick rot [ call dup ] 2dip set-at
-    ] if ; inline
+    [ [ at* ] 2keep ] dip
+    [ [ nip call dup ] [ drop ] 3bi set-at ] 3curry
+    [ drop ] prepose
+    unless ; inline
+
+: 2cache ( key1 key2 assoc quot -- value )
+    [ 2array ] 2dip [ first2 ] prepose cache ; inline
 
 : change-at ( key assoc quot -- )
-    [ [ at ] dip call ] 3keep drop set-at ; inline
+    [ [ at ] dip call ] [ drop ] 3bi set-at ; inline
 
 : at+ ( n key assoc -- ) [ 0 or + ] change-at ; inline
 
@@ -151,8 +160,6 @@ M: assoc assoc-clone-like ( assoc exemplar -- newassoc )
 : extract-keys ( seq assoc -- subassoc )
     [ [ dupd at ] curry ] keep map>assoc ;
 
-GENERIC: value-at* ( value assoc -- key/f ? )
-
 M: assoc value-at* swap [ = nip ] curry assoc-find nip ;
 
 : value-at ( value assoc -- key/f ) value-at* drop ;
@@ -168,9 +175,6 @@ M: assoc value-at* swap [ = nip ] curry assoc-find nip ;
 : unzip ( assoc -- keys values )
     dup assoc-empty? [ drop { } { } ] [ >alist flip first2 ] if ;
 
-: search-alist ( key alist -- pair/f i/f )
-    [ first = ] with find swap ; inline
-
 M: sequence at*
     search-alist [ second t ] [ f ] if ;
 
@@ -184,7 +188,7 @@ M: sequence new-assoc drop <vector> ;
 M: sequence clear-assoc delete-all ;
 
 M: sequence delete-at
-    tuck search-alist nip
+    [ nip ] [ search-alist nip ] 2bi
     [ swap delete-nth ] [ drop ] if* ;
 
 M: sequence assoc-size length ;
index 6cc97531a4a790db5efb4eb24d289feaed8d37b6..f1e8b8b65e14d662eb5a1e02d75d1b12da5ddd5c 100644 (file)
@@ -32,17 +32,14 @@ H{ } clone sub-primitives set
 ! Now we have ( syntax-quot arch-quot layouts-quot ) on the stack
 
 ! Bring up a bare cross-compiling vocabulary.
-"syntax" vocab vocab-words bootstrap-syntax set
-H{ } clone dictionary set
-H{ } clone new-classes set
-H{ } clone changed-definitions set
-H{ } clone changed-generics set
-H{ } clone remake-generics set
-H{ } clone forgotten-definitions set
-H{ } clone root-cache set
-H{ } clone source-files set
-H{ } clone update-map set
-H{ } clone implementors-map set
+"syntax" vocab vocab-words bootstrap-syntax set {
+    dictionary
+    new-classes
+    changed-definitions changed-generics
+    remake-generics forgotten-definitions
+    root-cache source-files update-map implementors-map
+} [ H{ } clone swap set ] each
+
 init-caches
 
 ! Vocabulary for slot accessors
@@ -264,7 +261,7 @@ bi
     "vocabulary"
     { "def" { "quotation" "quotations" } initial: [ ] }
     "props"
-    { "compiled" read-only }
+    { "optimized" read-only }
     { "counter" { "fixnum" "math" } }
     { "sub-primitive" read-only }
 } define-builtin
@@ -287,11 +284,11 @@ tuple
 
 "((empty))" "hashtables.private" create
 "tombstone" "hashtables.private" lookup f
-2array >tuple 1quotation define-inline
+2array >tuple 1quotation (( -- value )) define-inline
 
 "((tombstone))" "hashtables.private" create
 "tombstone" "hashtables.private" lookup t
-2array >tuple 1quotation define-inline
+2array >tuple 1quotation (( -- value )) define-inline
 
 ! Some tuple classes
 "curry" "kernel" create
@@ -380,12 +377,11 @@ tuple
     { "over" "kernel" }
     { "pick" "kernel" }
     { "swap" "kernel" }
-    { ">r" "kernel" }
-    { "r>" "kernel" }
     { "eq?" "kernel" }
     { "tag" "kernel.private" }
     { "slot" "slots.private" }
     { "get-local" "locals.backend" }
+    { "load-local" "locals.backend" }
     { "drop-locals" "locals.backend" }
 } [ make-sub-primitive ] assoc-each
 
index 874a9dd0d215dd418ebc04263b125ed981d29c64..9a40796bda48600dd80497d6a691bf5c080a9f8e 100644 (file)
@@ -21,6 +21,7 @@ load-help? off
         ! using the host image's hashing algorithms. We don't
         ! use each-object here since the catch stack isn't yet
         ! set up.
+        gc
         begin-scan
         [ hashtable? ] pusher [ (each-object) ] dip
         end-scan
index badc1f5218165ab1686ad9b8f7883e07f06c043f..654a8f5f3468b61f29b1b3b4b601350b9ec43081 100644 (file)
@@ -1,6 +1,6 @@
-! Copyright (C) 2007 Slava Pestov.
+! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: words sequences vocabs kernel ;
+USING: words words.symbol sequences vocabs kernel ;
 IN: bootstrap.syntax
 
 "syntax" create-vocab drop
@@ -40,7 +40,10 @@ IN: bootstrap.syntax
     "PRIVATE>"
     "SBUF\""
     "SINGLETON:"
+    "SINGLETONS:"
     "SYMBOL:"
+    "SYMBOLS:"
+    "CONSTANT:"
     "TUPLE:"
     "SLOT:"
     "T{"
@@ -48,6 +51,12 @@ IN: bootstrap.syntax
     "INTERSECTION:"
     "USE:"
     "USING:"
+    "QUALIFIED:"
+    "QUALIFIED-WITH:"
+    "FROM:"
+    "EXCLUDE:"
+    "RENAME:"
+    "ALIAS:"
     "V{"
     "W{"
     "["
index 25bff0fce5a743f4bf24b6775a9690ef52eb0b6d..f1d94a46f70bc6009af6f88c0024edb6976a1cce 100644 (file)
@@ -30,6 +30,10 @@ HELP: <byte-array> ( n -- byte-array )
 { $values { "n" "a non-negative integer" } { "byte-array" "a new byte array" } }
 { $description "Creates a new byte array holding " { $snippet "n" } " bytes." } ;
 
+HELP: (byte-array)
+{ $values { "n" "a non-negative integer" } { "byte-array" "a new byte array" } }
+{ $description "Creates a new byte array with unspecified contents of length " { $snippet "n" } " bytes." } ;
+
 HELP: >byte-array
 { $values { "seq" "a sequence" } { "byte-array" byte-array } }
 { $description
index 699d93b8b4f994a9fbaa186b3ab03e74ae4f9b07..a3662fcaa62e3f6b86e6ed0dbeec441b7188273f 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (c) 2008 Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
-USING: sequences math.parser io io.encodings.binary io.files
+USING: sequences math.parser io io.backend io.files
 kernel ;
 IN: checksums
 
@@ -19,7 +19,10 @@ M: checksum checksum-lines
     [ B{ CHAR: \n } join ] dip checksum-bytes ;
 
 : checksum-file ( path checksum -- value )
-    [ binary <file-reader> ] dip checksum-stream ;
+    #! normalize-path (file-reader) is equivalen to
+    #! binary <file-reader>. We use the lower-level form
+    #! so that we can move io.encodings.binary to basis/.
+    [ normalize-path (file-reader) ] dip checksum-stream ;
 
 : hex-string ( seq -- str )
     [ >hex 2 CHAR: 0 pad-left ] { } map-as concat ;
index 7cff22de19bedd11402b1d1f6de7d504cce40b33..d373a96f39244c8d8881650849d76e7eacbb2c83 100644 (file)
@@ -24,9 +24,11 @@ SINGLETON: crc32
 
 INSTANCE: crc32 checksum
 
-: init-crc32 drop [ HEX: ffffffff dup ] dip ; inline
+: init-crc32 ( input checksum -- x y input )
+    drop [ HEX: ffffffff dup ] dip ; inline
 
-: finish-crc32 bitxor 4 >be ; inline
+: finish-crc32 ( x y -- bytes )
+    bitxor 4 >be ; inline
 
 M: crc32 checksum-bytes
     init-crc32
index 1b86ce0b0a939e44afd21b709222af71ade524a6..e71379ac1a679dcec33a5ed94ddcd0fafc4799e5 100644 (file)
@@ -17,9 +17,6 @@ TUPLE: anonymous-complement class ;
 \r
 C: <anonymous-complement> anonymous-complement\r
 \r
-: 2cache ( key1 key2 assoc quot -- value )\r
-    [ 2array ] 2dip [ first2 ] prepose cache ; inline\r
-\r
 GENERIC: valid-class? ( obj -- ? )\r
 \r
 M: class valid-class? drop t ;\r
@@ -218,7 +215,7 @@ M: anonymous-complement (classes-intersect?)
 : min-class ( class seq -- class/f )\r
     over [ classes-intersect? ] curry filter\r
     [ drop f ] [\r
-        tuck [ class<= ] with all? [ peek ] [ drop f ] if\r
+        [ nip ] [ [ class<= ] with all? ] 2bi [ peek ] [ drop f ] if\r
     ] if-empty ;\r
 \r
 GENERIC: (flatten-class) ( class -- )\r
index 2ce4b934c87f991165baf498c4c267e51d06c3d1..8145730f401f91c9a28ca0ba02c8aa23e5c3fd4f 100644 (file)
@@ -1,8 +1,9 @@
 ! Copyright (C) 2004, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays definitions assocs kernel kernel.private
-slots.private namespaces make sequences strings words vectors
-math quotations combinators sorting effects graphs vocabs sets ;
+slots.private namespaces make sequences strings words words.symbol
+vectors math quotations combinators sorting effects graphs
+vocabs sets ;
 IN: classes
 
 SYMBOL: class<=-cache
@@ -161,7 +162,7 @@ GENERIC: update-methods ( class seq -- )
     dup "predicate" word-prop
     dup length 1 = [
         first
-        tuck "predicating" word-prop =
+        [ nip ] [ "predicating" word-prop = ] 2bi
         [ forget ] [ drop ] if
     ] [ 2drop ] if ;
 
index 2470c0087526e0ccf60c9906208a3b3489e66259..1261d44a6984ebea80e5f3989a3eed75d4f8e18f 100644 (file)
@@ -54,7 +54,7 @@ TUPLE: check-mixin-class class ;
     #! class-usages of the member, now that it's been added.
     [ 2drop ] [
         [ [ suffix ] change-mixin-class ] 2keep
-        tuck [ new-class? ] either? [
+        [ nip ] [ [ new-class? ] either? ] 2bi [
             update-classes/new
         ] [
             update-classes
index f647b006d97524cceb3549ba4575731dcf7b8fac..bd2a2ae6a6b5e641b428b88dbcbc9241754d123e 100644 (file)
@@ -4,23 +4,12 @@ IN: classes.singleton
 ARTICLE: "singletons" "Singleton classes"
 "A singleton is a class with only one instance and with no state."
 { $subsection POSTPONE: SINGLETON: }
+{ $subsection POSTPONE: SINGLETONS: }
 { $subsection define-singleton-class }
 "The set of all singleton classes is itself a class:"
 { $subsection singleton-class? }
 { $subsection singleton-class } ;
 
-HELP: SINGLETON:
-{ $syntax "SINGLETON: class" }
-{ $values
-    { "class" "a new singleton to define" }
-}
-{ $description
-    "Defines a new singleton class. The class word itself is the sole instance of the singleton class."
-}
-{ $examples
-    { $example "USING: classes.singleton kernel io ;" "IN: scratchpad" "SINGLETON: foo\nGENERIC: bar ( obj -- )\nM: foo bar drop \"a foo!\" print ;\nfoo bar" "a foo!" }
-} ;
-
 HELP: define-singleton-class
 { $values { "word" "a new word" } }
 { $description
index 5b1844b78b63cbb7af071f61a4340acb972d8ed9..561d0962ffc9e39728c4923c338b176d267476d8 100644 (file)
@@ -172,7 +172,7 @@ $nl
 $nl
 "The second is to use ad-hoc slot polymorphism. If two classes define a slot with the same name, then code which uses " { $link "accessors" } " can operate on instances of both objects, assuming the values stored in that slot implement a common protocol. This allows code to be shared without creating contrieved relationships between classes."
 { $heading "Anti-pattern #3: subclassing to override a method definition" }
-"While method overriding is a very powerful tool, improper use can cause tight coupling of code and lead to difficulty in testing and refactoring. Subclassing should not be used as a means of ``monkey patching'' methods to fix bugs and add features. Only subclass from classes which were designed to be inherited from, and when writing classes of your own which are intended to be subclassed, clearly document that subclasses may and may not do. This includes construction policy; document whether subclasses should use " { $link new } ", " { $link boa } ", or a custom parametrized constructor."
+"While method overriding is a very powerful tool, improper use can cause tight coupling of code and lead to difficulty in testing and refactoring. Subclassing should not be used as a means of â€œmonkey patching†methods to fix bugs and add features. Only subclass from classes which were designed to be inherited from, and when writing classes of your own which are intended to be subclassed, clearly document that subclasses may and may not do. This includes construction policy; document whether subclasses should use " { $link new } ", " { $link boa } ", or a custom parametrized constructor."
 { $see-also "parametrized-constructors" } ;
 
 ARTICLE: "tuple-subclassing" "Tuple subclassing"
@@ -428,5 +428,5 @@ HELP: new
 HELP: boa
 { $values { "..." "slot values" } { "class" tuple-class } { "tuple" tuple } }
 { $description "Creates a new instance of " { $snippet "class" } " and fill in the slots from the stack, with the top-most stack element being stored in the right-most slot." }
-{ $notes "The name " { $snippet "boa" } " is shorthand for ``by order of arguments'', and ``BOA constructor'' is a pun on ``boa constrictor''." }
+{ $notes "The name " { $snippet "boa" } " is shorthand for â€œby order of argumentsâ€, and â€œBOA constructor†is a pun on â€œboa constrictorâ€." }
 { $errors "Throws an error if the slot values do not match class declarations on slots (see" { $link "tuple-declarations" } ")." } ;
index d9464399a94ee4a7a9253a501f7f80779ecbf304..4f40d838b7ff4c32ceca1dd52ad8e3d73c6a068c 100644 (file)
@@ -79,16 +79,16 @@ M: tuple-class slots>tuple
 
 ERROR: bad-superclass class ;
 
-<PRIVATE
-
 : tuple= ( tuple1 tuple2 -- ? )
-    2dup [ layout-of ] bi@ eq? [
-        [ drop tuple-size ]
-        [ [ [ drop array-nth ] [ nip array-nth ] 3bi = ] 2curry ]
-        2bi all-integers?
-    ] [
-        2drop f
-    ] if ; inline
+    2dup [ tuple? ] both? [
+        2dup [ layout-of ] bi@ eq? [
+            [ drop tuple-size ]
+            [ [ [ drop array-nth ] [ nip array-nth ] 3bi = ] 2curry ]
+            2bi all-integers?
+        ] [ 2drop f ] if
+    ] [ 2drop f ] if ; inline
+
+<PRIVATE
 
 : tuple-predicate-quot/1 ( class -- quot )
     #! Fast path for tuples with no superclass
@@ -290,6 +290,12 @@ M: tuple-class (define-tuple-class)
         tri* define-declared
     ] 3tri ;
 
+: boa-effect ( class -- effect )
+    [ all-slots [ name>> ] map ] [ name>> 1array ] bi <effect> ;
+
+: define-boa-word ( word class -- )
+    [ [ boa ] curry ] [ boa-effect ] bi define-inline ;
+
 M: tuple-class reset-class
     [
         dup "slots" word-prop [
@@ -322,7 +328,9 @@ M: tuple clone (clone) ;
 
 M: tuple equal? over tuple? [ tuple= ] [ 2drop f ] if ;
 
-M: tuple hashcode*
+GENERIC: tuple-hashcode ( n tuple -- x )
+
+M: tuple tuple-hashcode
     [
         [ class hashcode ] [ tuple-size ] [ ] tri
         [ rot ] dip [
@@ -330,6 +338,8 @@ M: tuple hashcode*
         ] 2curry each
     ] recursive-hashcode ;
 
+M: tuple hashcode* tuple-hashcode ;
+
 M: tuple-class new
     dup "prototype" word-prop
     [ (clone) ] [ tuple-layout <tuple> ] ?if ;
index 6edec815da18e18c460578e5a983eeca8f6077fd..29a2e7a8bd5678d1066b354b1bf22ac8af2214b7 100644 (file)
@@ -136,7 +136,7 @@ ERROR: no-case ;
 
 ! recursive-hashcode
 : recursive-hashcode ( n obj quot -- code )
-    pick 0 <= [ 3drop 0 ] [ rot 1- -rot call ] if ; inline
+    pick 0 <= [ 3drop 0 ] [ [ 1- ] 2dip call ] if ; inline
 
 ! These go here, not in sequences and hashtables, since those
 ! two cannot depend on us
index cb896dbf53f0356adc3c2f3abfce3f4ba834a2e4..f5ecf5add149967f18fd8c63ecd9b06766d90d42 100644 (file)
@@ -1,20 +1,22 @@
 IN: compiler.errors
 USING: help.markup help.syntax vocabs.loader words io
-quotations ;
+quotations words.symbol ;
 
 ARTICLE: "compiler-errors" "Compiler warnings and errors"
-"The compiler saves various notifications in a global variable:"
+"The compiler saves " { $link "inference-errors" } " in a global variable:"
 { $subsection compiler-errors }
 "These notifications can be viewed later:"
 { $subsection :errors }
 { $subsection :warnings }
 { $subsection :linkage }
 "Words such as " { $link require } " use a combinator which counts errors and prints a report at the end:"
-{ $link with-compiler-errors } ;
+{ $subsection with-compiler-errors } ;
 
 HELP: compiler-errors
 { $var-description "Global variable holding an assoc mapping words to compiler errors. This variable is set by " { $link with-compiler-errors } "." } ;
 
+ABOUT: "compiler-errors"
+
 HELP: compiler-error
 { $values { "error" "an error" } { "word" word } }
 { $description "If inside a " { $link with-compiler-errors } ", saves the error for future persual via " { $link :errors } ", " { $link :warnings } " and " { $link :linkage } ". If not inside a " { $link with-compiler-errors } ", ignores the error." } ;
index b30e92bbfd6b6e0bf63ce4a81714491785b4380e..5eafcef94e2168ac2fd0a2bfb85de6fdad6b6e1c 100644 (file)
@@ -1,5 +1,6 @@
 IN: compiler.units.tests
-USING: definitions compiler.units tools.test arrays sequences ;
+USING: definitions compiler.units tools.test arrays sequences words kernel
+accessors namespaces fry ;
 
 [ flushed-dependency ] [ f flushed-dependency strongest-dependency ] unit-test
 [ flushed-dependency ] [ flushed-dependency f strongest-dependency ] unit-test
@@ -7,3 +8,23 @@ USING: definitions compiler.units tools.test arrays sequences ;
 [ inlined-dependency ] [ called-dependency inlined-dependency strongest-dependency ] unit-test
 [ flushed-dependency ] [ called-dependency flushed-dependency strongest-dependency ] unit-test
 [ called-dependency ] [ called-dependency f strongest-dependency ] unit-test
+
+! Non-optimizing compiler bugs
+[ 1 1 ] [
+    "A" "B" <word> [ [ 1 ] dip ] >>def dup f 2array 1array modify-code-heap
+    1 swap execute
+] unit-test
+
+[ "A" "B" ] [
+    gensym "a" set
+    gensym "b" set
+    [
+        "a" get [ "A" ] define
+        "b" get "a" get '[ _ execute ] define
+    ] with-compilation-unit
+    "b" get execute
+    [
+        "a" get [ "B" ] define
+    ] with-compilation-unit
+    "b" get execute
+] unit-test
\ No newline at end of file
index 72496a5f762995c9e0d49415ed165bb72ca51245..999b783c489d94dd2d2394da7c9e76c0c43f395d 100644 (file)
@@ -66,9 +66,7 @@ GENERIC: definitions-changed ( assoc obj -- )
     dup dup changed-vocabs update ;
 
 : compile ( words -- )
-    recompile-hook get call
-    dup [ drop crossref? ] assoc-contains?
-    modify-code-heap ;
+    recompile-hook get call modify-code-heap ;
 
 SYMBOL: outdated-tuples
 SYMBOL: update-tuples-hook
@@ -145,7 +143,7 @@ SYMBOL: remake-generics-hook
     call-recompile-hook
     call-update-tuples-hook
     unxref-forgotten-definitions
-    dup [ drop crossref? ] assoc-contains? modify-code-heap ;
+    modify-code-heap ;
 
 : with-nested-compilation-unit ( quot -- )
     [
index 363248216281cc009a825933b18bb82576dd9fb9..2cc44bee1bcc7ba83d31ab863db9cd444ad9926c 100644 (file)
@@ -1,6 +1,6 @@
 USING: help.markup help.syntax kernel kernel.private
 continuations.private vectors arrays namespaces
-assocs words quotations lexer sequences ;
+assocs words quotations lexer sequences math ;
 IN: continuations
 
 ARTICLE: "errors-restartable" "Restartable errors"
@@ -26,7 +26,7 @@ ARTICLE: "errors-anti-examples" "Common error handling pitfalls"
 $nl
 "In most other cases, " { $link cleanup } " should be used instead to handle an error and rethrow it automatically."
 { $heading "Anti-pattern #3: Dropping and rethrowing" }
-"Do not use " { $link recover } " to handle an error by dropping it and throwing a new error. By losing the original error message, you signal to the user that something failed without leaving any indication of what actually went wrong. Either wrap the error in a new error containing additional information, or rethrow the original error. A more subtle form of this is using  " { $link throw } " instead of " { $link rethrow } ". The " { $link throw } " word should only be used when throwing new errors, and never when rethrowing errors that have been caught."
+"Do not use " { $link recover } " to handle an error by dropping it and throwing a new error. By losing the original error message, you signal to the user that something failed without leaving any indication of what actually went wrong. Either wrap the error in a new error containing additional information, or rethrow the original error. A more subtle form of this is using " { $link throw } " instead of " { $link rethrow } ". The " { $link throw } " word should only be used when throwing new errors, and never when rethrowing errors that have been caught."
 { $heading "Anti-pattern #4: Logging and rethrowing" }
 "If you are going to rethrow an error, do not log a message. If you do so, the user will see two log messages for the same error, which will clutter logs without adding any useful information." ;
 
@@ -221,10 +221,6 @@ HELP: assert-depth
 { $values { "quot" "a quotation" } }
 { $description "Runs a quotation. Throws an error if the quotation attempts to take input values from the stack, or leave outputs on the stack." } ;
 
-HELP: <continuation>
-{ $description "Constructs a new continuation." }
-{ $notes "User code should call " { $link continuation } " instead." } ;
-
 HELP: attempt-all
 { $values
      { "seq" sequence } { "quot" quotation }
@@ -245,12 +241,13 @@ HELP: attempt-all
 
 HELP: retry
 { $values
-     { "quot" quotation } { "n" null }
+     { "quot" quotation } { "n" integer }
 }
 { $description "Tries the quotation up to " { $snippet "n" } " times until it returns true. Retries the quotation if an exception is thrown or if the quotation returns " { $link f } ". The quotation is expected to have side effects that may fail, such as generating a random name for a new file until successful." }
 { $examples
+    "Try to get a 0 as a random number:"
     { $unchecked-example "USING: continuations math prettyprint ;"
-        "[ 5 random 0 = ] retry t"
+        "[ 5 random 0 = ] retry t"
         "t"
     }
 } ;
index db6b2461b53653ab228ba98051e27b5ccb4bc338..8a06653eb8af49430dfece15ecb7b67b4a17a63e 100644 (file)
@@ -44,8 +44,6 @@ M: effect effect>string ( effect -- string )
 
 GENERIC: stack-effect ( word -- effect/f )
 
-M: symbol stack-effect drop (( -- symbol )) ;
-
 M: word stack-effect
     { "declared-effect" "inferred-effect" }
     swap props>> [ at ] curry map [ ] find nip ;
index 77bcd7cad6f10a26039148d8611f4a1a7e6a3274..6b7e953b6c18ee073ab8c6603adf0e0909db2135 100644 (file)
@@ -9,7 +9,7 @@ DEFER: parse-effect
 ERROR: bad-effect ;
 
 : parse-effect-token ( end -- token/f )
-    scan tuck = [ drop f ] [
+    scan [ nip ] [ = ] 2bi [ drop f ] [
         dup { f "(" "((" } member? [ bad-effect ] [
             ":" ?tail [
                 scan-word {
index 4eb39291a05cf04f6d1c1cd294e1add41f244720..c16b6a52a12e3bdf1494c7db0283a9a91f87d99a 100644 (file)
@@ -36,7 +36,8 @@ PREDICATE: method-spec < pair
     "methods" word-prop keys sort-classes ;
 
 : specific-method ( class generic -- method/f )
-    tuck order min-class dup [ swap method ] [ 2drop f ] if ;
+    [ nip ] [ order min-class ] 2bi
+    dup [ swap method ] [ 2drop f ] if ;
 
 GENERIC: effective-method ( generic -- method )
 
index f5f8f85376794470401b94317cfc5eda4031c71b..516d40893388d0ed662aac74bfbf7795e7eaf82b 100644 (file)
@@ -4,7 +4,8 @@ generic.standard strings sequences arrays kernel accessors words
 specialized-arrays.double byte-arrays bit-arrays parser
 namespaces make quotations stack-checker vectors growable
 hashtables sbufs prettyprint byte-vectors bit-vectors
-specialized-vectors.double definitions generic sets graphs assocs ;
+specialized-vectors.double definitions generic sets graphs assocs
+grouping ;
 
 GENERIC: lo-tag-test ( obj -- obj' )
 
index 300bd44fb4abca12ae175cbba52b5fdfd9a2f9f5..9ace1a01f4f63efb02abf938fd43aa106f4f3fda 100644 (file)
@@ -33,7 +33,7 @@ ERROR: no-method object generic ;
     ] change-at ;
 
 : flatten-method ( class method assoc -- )
-    [ dup flatten-class keys swap ] 2dip [
+    [ [ flatten-class keys ] keep ] 2dip [
         [ spin ] dip push-method
     ] 3curry each ;
 
index e1ab50cdcd8b340f09ed4d9dec29b0cb4f5fa696..b55672f8052e0e6c0f226bd91f17304c1dcec4c5 100644 (file)
@@ -28,7 +28,12 @@ HELP: new-size
 
 HELP: ensure
 { $values { "n" "a positive integer" } { "seq" growable } }
-{ $description "If " { $snippet "n" } " is less than the length of the sequence, does nothing. Otherwise, if " { $snippet "n" } " also exceeds the capacity of the underlying storage, the underlying storage is grown, and the fill pointer is reset. Finally, if " { $snippet "n" } " is greater than or equal to the length but less than the capacity of the underlying storage, the fill pointer is moved and nothing else is done."
-$nl
-"This word is used in the implementation of the " { $link set-nth } " generic for sequences supporting the resizable sequence protocol (see " { $link "growable" } ")."
+{ $description "This word behaves as follows, depending on the relation between " { $snippet "n" } " and the length of the sequence:"
+{ $list
+  { "If " { $snippet "n" } " is less than the length of the sequence, does nothing." }
+  { "If " { $snippet "n" } " exceeds the capacity of the underlying storage, the underlying storage is grown." }
+  { "If " { $snippet "n" } " is greater than or equal to the length but less than the capacity of the underlying storage, the fill pointer is moved and nothing else is done." }
+}
+"In the case that new elements are added to the sequence (last two cases), the new elements are undefined." }
+{ $notes "This word is used in the implementation of the " { $link set-nth } " generic for sequences supporting the resizable sequence protocol (see " { $link "growable" } ")."
 } ;
index 3c487af0a54245e5e82631f282af97d4bb3b5497..c4970f98bd249ec8bf905d02ff30b5e3d6e114f3 100644 (file)
@@ -1,7 +1,5 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-
-! Some low-level code used by vectors and string buffers.
 USING: accessors kernel kernel.private math math.private
 sequences sequences.private ;
 IN: growable
@@ -22,7 +20,7 @@ M: growable set-nth-unsafe underlying>> set-nth-unsafe ;
 
 : contract ( len seq -- )
     [ length ] keep
-    [ 0 -rot set-nth-unsafe ] curry
+    [ [ 0 ] 2dip set-nth-unsafe ] curry
     (each-integer) ; inline
 
 : growable-check ( n seq -- n seq )
index 8663f25a7032ba919833130355f5ff6f77486bfc..8aa13a5f5eeb09c2f150aadbef0f630f440db4d3 100644 (file)
@@ -77,7 +77,7 @@ TUPLE: hashtable
     [ deleted>> 10 fixnum*fast ] [ count>> ] bi fixnum> ; inline
 
 : grow-hash ( hash -- )
-    [ dup >alist swap assoc-size 1+ ] keep
+    [ [ >alist ] [ assoc-size 1+ ] bi ] keep
     [ reset-hash ] keep
     swap (rehash) ; inline
 
@@ -104,7 +104,7 @@ M: hashtable clear-assoc ( hash -- )
     [ init-hash ] [ array>> [ drop ((empty)) ] change-each ] bi ;
 
 M: hashtable delete-at ( key hash -- )
-    tuck key@ [
+    [ nip ] [ key@ ] 2bi [
         [ ((tombstone)) dup ] 2dip set-nth-pair
         hash-deleted+
     ] [
index e2c6c3d4647709e3a96eb791ae2f304c214af8e4..fd5567cfa2300450f6a9750f97a49ebb5b1b4a02 100644 (file)
@@ -1,7 +1,7 @@
-! Copyright (C) 2007, 2008 Slava Pestov.
+! Copyright (C) 2007, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: init kernel system namespaces io io.encodings
-io.encodings.utf8 init assocs splitting alien ;
+io.encodings.utf8 init assocs splitting alien io.streams.null ;
 IN: io.backend
 
 SYMBOL: io-backend
@@ -12,13 +12,22 @@ io-backend global [ c-io-backend or ] change-at
 
 HOOK: init-io io-backend ( -- )
 
-HOOK: (init-stdio) io-backend ( -- stdin stdout stderr )
+HOOK: (init-stdio) io-backend ( -- stdin stdout stderr ? )
+
+: set-stdio ( input-handle output-handle error-handle -- )
+    [ input-stream set-global ]
+    [ output-stream set-global ]
+    [ error-stream set-global ] tri* ;
 
 : init-stdio ( -- )
-    (init-stdio)
-    [ utf8 <decoder> input-stream set-global ]
-    [ utf8 <encoder> output-stream set-global ]
-    [ utf8 <encoder> error-stream set-global ] tri* ;
+    (init-stdio) [
+        [ utf8 <decoder> ]
+        [ utf8 <encoder> ]
+        [ utf8 <encoder> ] tri*
+    ] [
+        3drop
+        null-reader null-writer null-writer
+    ] if set-stdio ;
 
 HOOK: io-multiplex io-backend ( us -- )
 
diff --git a/core/io/encodings/binary/authors.txt b/core/io/encodings/binary/authors.txt
deleted file mode 100644 (file)
index f990dd0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Daniel Ehrenberg
diff --git a/core/io/encodings/binary/binary-docs.factor b/core/io/encodings/binary/binary-docs.factor
deleted file mode 100644 (file)
index 4da1e08..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-USING: help.syntax help.markup ;
-IN: io.encodings.binary
-
-HELP: binary
-{ $class-description "Encoding descriptor for binary I/O." } ;
-
-ARTICLE: "io.encodings.binary" "Binary encoding"
-"Making an encoded stream with the binary encoding is a no-op; streams with this encoding deal with byte-arrays, not strings." 
-{ $subsection binary } ;
-
-ABOUT: "io.encodings.binary"
diff --git a/core/io/encodings/binary/binary.factor b/core/io/encodings/binary/binary.factor
deleted file mode 100644 (file)
index e54163f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-! Copyright (C) 2008 Daniel Ehrenberg.
-! See http://factorcode.org/license.txt for BSD license.
-USING: io.encodings kernel ;
-IN: io.encodings.binary
-
-SINGLETON: binary
-M: binary <encoder> drop ;
-M: binary <decoder> drop ;
diff --git a/core/io/encodings/binary/summary.txt b/core/io/encodings/binary/summary.txt
deleted file mode 100644 (file)
index a1eb4bc..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Dummy encoding for binary I/O
diff --git a/core/io/encodings/binary/tags.txt b/core/io/encodings/binary/tags.txt
deleted file mode 100644 (file)
index 8e27be7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-text
index b893e7f717cef7fdf6cd2a43cc8504ff5364c173..ed39e74878ff1c8928a216362958a86b8b351d5e 100644 (file)
@@ -74,7 +74,7 @@ HELP: replacement-char
 { $description "A code point that replaces input that could not be decoded. The presence of this character in the decoded data usually signifies an error." } ;
 
 ARTICLE: "encodings-descriptors" "Encoding descriptors"
-"An encoding descriptor is something which can be used for input or output streams to encode or decode bytes stored in a certain representation. It must conform to the " { $link "encodings-protocol" } ". Encodings which you can use are defined in the following vocabularies:"
+"An encoding descriptor is something which can be used with binary input or output streams to encode or decode bytes stored in a certain representation. It must conform to the " { $link "encodings-protocol" } ". Encodings which you can use are defined in the following vocabularies:"
 { $subsection "io.encodings.binary" }
 { $subsection "io.encodings.utf8" }
 { $subsection "io.encodings.utf16" }
@@ -99,7 +99,13 @@ ARTICLE: "encodings-constructors" "Manually constructing an encoded stream"
 { $subsection <decoder> } ;
 
 ARTICLE: "io.encodings" "I/O encodings"
-"The " { $vocab-link "io.encodings" } " vocabulary provides utilities for encoding and decoding bytes that represent text. Both strings and streams may be encoded."
+"The " { $vocab-link "io.encodings" } " vocabulary provides utilities for encoding and decoding bytes that represent text. Encodings can be used in the following situations:"
+{ $list
+  "With binary input streams, to convert bytes to characters"
+  "With binary output streams, to convert characters to bytes"
+  "With byte arrays, to convert bytes to characters"
+  "With strings, to convert characters to bytes"
+}
 { $subsection "encodings-descriptors" }
 { $subsection "encodings-constructors" }
 { $subsection "io.encodings.string" }
@@ -113,6 +119,7 @@ ARTICLE: "io.encodings" "I/O encodings"
 { $subsection re-decode }
 "Combinators to change the encoding:"
 { $subsection with-encoded-output }
-{ $subsection with-decoded-input } ;
+{ $subsection with-decoded-input }
+{ $see-also "encodings-introduction" "stream-elements" } ;
 
 ABOUT: "io.encodings"
index d165ad3138cc7c5e939b25bcc53c7acac2915f8e..94d211547870bc76918336d5a5c48b1af54b5188 100644 (file)
@@ -32,9 +32,9 @@ M: object <decoder> f decoder boa ;
 
 <PRIVATE
 
-: cr+ t >>cr drop ; inline
+: cr+ ( stream -- ) t >>cr drop ; inline
 
-: cr- f >>cr drop ; inline
+: cr- ( stream -- ) f >>cr drop ; inline
 
 : >decoder< ( decoder -- stream encoding )
     [ stream>> ] [ code>> ] bi ; inline
index 80b515b13f32bf57c4bc3c6ca4d3a9903f2dc110..cf0aea787bcc98c0cfabef70b788c8c967e64129 100644 (file)
@@ -1,8 +1,8 @@
 USING: help.markup help.syntax io strings arrays io.backend
-io.files.private quotations ;
+io.files.private quotations sequences ;
 IN: io.files
 
-ARTICLE: "file-streams" "Reading and writing files"
+ARTICLE: "io.files" "Reading and writing files"
 "File streams:"
 { $subsection <file-reader> }
 { $subsection <file-writer> }
@@ -17,193 +17,24 @@ ARTICLE: "file-streams" "Reading and writing files"
 { $subsection with-file-writer }
 { $subsection with-file-appender } ;
 
-ARTICLE: "pathnames" "Pathname manipulation"
-"Pathname manipulation:"
-{ $subsection parent-directory }
-{ $subsection file-name }
-{ $subsection last-path-separator }
-{ $subsection append-path }
-"Pathnames relative to Factor's temporary files directory:"
-{ $subsection temp-directory }
-{ $subsection temp-file }
-"Pathname presentations:"
-{ $subsection pathname }
-{ $subsection <pathname> } ;
-
-ARTICLE: "symbolic-links" "Symbolic links"
-"Reading and creating links:"
-{ $subsection read-link }
-{ $subsection make-link }
-"Copying links:"
-{ $subsection copy-link }
-"Not all operating systems support symbolic links."
-{ $see-also link-info } ;
-
-ARTICLE: "current-directory" "Current working directory"
-"File system I/O operations use the value of a variable to resolve relative pathnames:"
-{ $subsection current-directory }
-"This variable can be changed with a pair of words:"
-{ $subsection set-current-directory }
-{ $subsection with-directory }
-"This variable is independent of the operating system notion of ``current working directory''. While all Factor I/O operations use the variable and not the operating system's value, care must be taken when making FFI calls which expect a pathname. The first option is to resolve relative paths:"
-{ $subsection (normalize-path) }
-"The second is to change the working directory of the current process:"
-{ $subsection cd }
-{ $subsection cwd } ;
-
-ARTICLE: "directories" "Directories"
-"Home directory:"
-{ $subsection home }
-"Directory listing:"
-{ $subsection directory-entries }
-{ $subsection directory-files }
-{ $subsection with-directory-files }
-"Creating directories:"
-{ $subsection make-directory }
-{ $subsection make-directories }
-{ $subsection "current-directory" } ;
-
-ARTICLE: "file-types" "File Types"
-"Platform-independent types:"
-{ $subsection +regular-file+ }
-{ $subsection +directory+ }
-"Platform-specific types:"
-{ $subsection +character-device+ }
-{ $subsection +block-device+ }
-{ $subsection +fifo+ }
-{ $subsection +symbolic-link+ }
-{ $subsection +socket+ }
-{ $subsection +unknown+ } ;
-
-ARTICLE: "fs-meta" "File metadata"
-"Querying file-system metadata:"
-{ $subsection file-info }
-{ $subsection link-info }
-{ $subsection exists? }
-{ $subsection directory? }
-
-"File types:"
-{ $subsection "file-types" } ;
-
-ARTICLE: "delete-move-copy" "Deleting, moving, copying files"
-"Operations for deleting and copying files come in two forms:"
-{ $list
-    { "Words named " { $snippet { $emphasis "operation" } "-file" } " which work on regular files only." }
-    { "Words named " { $snippet { $emphasis "operation" } "-tree" } " works on directory trees recursively, and also accepts regular files." }
-}
-"The operations for moving and copying files come in three flavors:"
-{ $list
-    { "A word named " { $snippet { $emphasis "operation" } } " which takes a source and destination path." }
-    { "A word named " { $snippet { $emphasis "operation" } "-into" } " which takes a source path and destination directory. The destination file will be stored in the destination directory and will have the same file name as the source path." }
-    { "A word named " { $snippet { $emphasis "operation" } "s-into" } " which takes a sequence of source paths and destination directory." }
-}
-"Since both of the above lists apply to copying files, that this means that there are a total of six variations on copying a file."
-$nl
-"Deleting files:"
-{ $subsection delete-file }
-{ $subsection delete-directory }
-{ $subsection delete-tree }
-"Moving files:"
-{ $subsection move-file }
-{ $subsection move-file-into }
-{ $subsection move-files-into }
-"Copying files:"
-{ $subsection copy-file }
-{ $subsection copy-file-into }
-{ $subsection copy-files-into }
-"Copying directory trees recursively:"
-{ $subsection copy-tree }
-{ $subsection copy-tree-into }
-{ $subsection copy-trees-into }
-"On most operating systems, files can only be moved within the same file system. To move files between file systems, use " { $link copy-file } " followed by " { $link delete-file } " on the old name." ;
-
-ARTICLE: "io.files" "Basic file operations"
-"The " { $vocab-link "io.files" } " vocabulary provides basic support for working with files."
-{ $subsection "pathnames" }
-{ $subsection "file-streams" }
-{ $subsection "fs-meta" }
-{ $subsection "directories" }
-{ $subsection "delete-move-copy" }
-{ $subsection "symbolic-links" } ;
-
 ABOUT: "io.files"
 
-HELP: path-separator?
-{ $values { "ch" "a code point" } { "?" "a boolean" } }
-{ $description "Tests if the code point is a platform-specific path separator." }
-{ $examples
-    "On Unix:"
-    { $example "USING: io.files prettyprint ;" "CHAR: / path-separator? ." "t" }
-} ;
-
-HELP: parent-directory
-{ $values { "path" "a pathname string" } { "parent" "a pathname string" } }
-{ $description "Strips the last component off a pathname." }
-{ $examples { $example "USING: io io.files ;" "\"/etc/passwd\" parent-directory print" "/etc/" } } ;
-
-HELP: file-name
-{ $values { "path" "a pathname string" } { "string" string } }
-{ $description "Outputs the last component of a pathname string." }
-{ $examples
-    { $example "USING: io.files prettyprint ;" "\"/usr/bin/gcc\" file-name ." "\"gcc\"" }
-    { $example "USING: io.files prettyprint ;" "\"/usr/libexec/awk/\" file-name ." "\"awk\"" }
-} ;
-
-! need a $class-description file-info
-
-HELP: file-info
-{ $values { "path" "a pathname string" } { "info" file-info } }
-{ $description "Queries the file system for metadata. If " { $snippet "path" } " refers to a symbolic link, it is followed. See the article " { $link "file-types" } " for a list of metadata symbols." }
-{ $errors "Throws an error if the file does not exist." } ;
-
-HELP: link-info
-{ $values { "path" "a pathname string" } { "info" "a file-info tuple" } }
-{ $description "Queries the file system for metadata. If path refers to a symbolic link, information about the symbolic link itself is returned. If the file does not exist, an exception is thrown." } ;
-
-{ file-info link-info } related-words
-
-HELP: +regular-file+
-{ $description "A regular file. This type exists on all platforms. See " { $link "file-streams" } " for words operating on files." } ;
-
-HELP: +directory+
-{ $description "A directory. This type exists on all platforms. See " { $link "directories" } " for words operating on directories." } ;
-
-HELP: +symbolic-link+
-{ $description "A symbolic link file.  This type is currently implemented on Unix platforms only. See " { $link "symbolic-links" } " for words operating on symbolic links." } ;
-
-HELP: +character-device+
-{ $description "A Unix character device file. This type exists on Unix platforms only." } ;
-
-HELP: +block-device+
-{ $description "A Unix block device file. This type exists on Unix platforms only." } ;
-
-HELP: +fifo+
-{ $description "A Unix fifo file. This type exists on Unix platforms only." } ;
-
-HELP: +socket+
-{ $description "A Unix socket file. This type exists on Unix platforms only." } ;
-
-HELP: +unknown+
-{ $description "A unknown file type." } ;
-
 HELP: <file-reader>
-{
-  $values
-  { "path" "a pathname string" }
-  { "encoding" "an encoding descriptor" }
-  { "stream" "an input stream" }
-}
+{ $values { "path" "a pathname string" } { "encoding" "an encoding descriptor" } { "stream" "an input stream" } }
 { $description "Outputs an input stream for reading from the specified pathname using the given encoding." }
+{ $notes "Most code should use " { $link with-file-reader } " instead, to ensure the stream is properly disposed of after." }
 { $errors "Throws an error if the file is unreadable." } ;
 
 HELP: <file-writer>
 { $values { "path" "a pathname string" } { "encoding" "an encoding descriptor" } { "stream" "an output stream" } }
 { $description "Outputs an output stream for writing to the specified pathname using the given encoding. The file's length is truncated to zero." }
+{ $notes "Most code should use " { $link with-file-writer } " instead, to ensure the stream is properly disposed of after." }
 { $errors "Throws an error if the file cannot be opened for writing." } ;
 
 HELP: <file-appender>
 { $values { "path" "a pathname string" } { "encoding" "an encoding descriptor" } { "stream" "an output stream" } }
 { $description "Outputs an output stream for writing to the specified pathname using the given encoding. The stream begins writing at the end of the file." }
+{ $notes "Most code should use " { $link with-file-appender } " instead, to ensure the stream is properly disposed of after." }
 { $errors "Throws an error if the file cannot be opened for writing." } ;
 
 HELP: with-file-reader
@@ -232,216 +63,17 @@ HELP: file-lines
 { $errors "Throws an error if the file cannot be opened for reading." } ;
 
 HELP: set-file-contents
-{ $values { "str" "a string" } { "path" "a pathname string" } { "encoding" "an encoding descriptor" } }
-{ $description "Sets the contents of a file to a string with the given encoding." }
+{ $values { "seq" sequence } { "path" "a pathname string" } { "encoding" "an encoding descriptor" } }
+{ $description "Sets the contents of a file to a sequence with the given encoding." }
 { $errors "Throws an error if the file cannot be opened for writing." } ;
 
 HELP: file-contents
-{ $values { "path" "a pathname string" } { "encoding" "an encoding descriptor" } { "str" "a string" } }
-{ $description "Opens the file at the given path using the given encoding, and the contents of that file as a string." }
+{ $values { "path" "a pathname string" } { "encoding" "an encoding descriptor" } { "seq" sequence } }
+{ $description "Opens the file at the given path using the given encoding, and the contents of that file as a sequence." }
 { $errors "Throws an error if the file cannot be opened for reading." } ;
 
 { set-file-lines file-lines set-file-contents file-contents } related-words
 
-HELP: cwd
-{ $values { "path" "a pathname string" } }
-{ $description "Outputs the current working directory of the Factor process." }
-{ $errors "Windows CE has no concept of ``current directory'', so this word throws an error there." }
-{ $notes "User code should use " { $link with-directory } " or " { $link set-current-directory } " instead." } ;
-
-HELP: cd
-{ $values { "path" "a pathname string" } }
-{ $description "Changes the current working directory of the Factor process." }
-{ $errors "Windows CE has no concept of ``current directory'', so this word throws an error there." }
-{ $notes "User code should use " { $link with-directory } " or " { $link set-current-directory } " instead." } ;
-
-{ cd cwd current-directory set-current-directory with-directory } related-words
-
-HELP: current-directory
-{ $description "A variable holding the current directory as an absolute path. Words that use the filesystem do so in relation to this variable."
-$nl
-"This variable should never be set directly; instead, use " { $link set-current-directory } " or " { $link with-directory } ". This preserves the invariant that the value of this variable is an absolute path." } ;
-
-HELP: set-current-directory
-{ $values { "path" "a pathname string" } }
-{ $description "Changes the " { $link current-directory } " variable."
-$nl
-"If " { $snippet "path" } " is relative, it is first resolved relative to the current directory. If " { $snippet "path" } " is absolute, it becomes the new current directory." } ;
-
-HELP: with-directory
-{ $values { "path" "a pathname string" } { "quot" quotation } }
-{ $description "Calls the quotation in a new dynamic scope with the " { $link current-directory } " variable rebound."
-$nl
-"If " { $snippet "path" } " is relative, it is first resolved relative to the current directory. If " { $snippet "path" } " is absolute, it becomes the new current directory." } ;
-
-HELP: append-path
-{ $values { "str1" "a string" } { "str2" "a string" } { "str" "a string" } }
-{ $description "Appends " { $snippet "str1" } " and " { $snippet "str2" } " to form a pathname." } ;
-
-HELP: prepend-path
-{ $values { "str1" "a string" } { "str2" "a string" } { "str" "a string" } }
-{ $description "Appends " { $snippet "str2" } " and " { $snippet "str1" } " to form a pathname." } ;
-
-{ append-path prepend-path } related-words
-
-HELP: absolute-path?
-{ $values { "path" "a pathname string" } { "?" "a boolean" } }
-{ $description "Tests if a pathname is absolute. Examples of absolute pathnames are " { $snippet "/foo/bar" } " on Unix and " { $snippet "c:\\foo\\bar" } " on Windows." } ;
-
-HELP: windows-absolute-path?
-{ $values { "path" "a pathname string" } { "?" "a boolean" } }
-{ $description "Tests if a pathname is absolute on Windows. Examples of absolute pathnames on Windows are " { $snippet "c:\\foo\\bar" } " and " { $snippet "\\\\?\\c:\\foo\\bar" } " for absolute Unicode pathnames." } ;
-
-HELP: root-directory?
-{ $values { "path" "a pathname string" } { "?" "a boolean" } }
-{ $description "Tests if a pathname is a root directory. Examples of root directory pathnames are " { $snippet "/" } " on Unix and " { $snippet "c:\\" } " on Windows." } ;
-
-{ absolute-path? windows-absolute-path? root-directory? } related-words
-
 HELP: exists?
 { $values { "path" "a pathname string" } { "?" "a boolean" } }
 { $description "Tests if the file named by " { $snippet "path" } " exists." } ;
-
-HELP: directory?
-{ $values { "file-info" file-info } { "?" "a boolean" } }
-{ $description "Tests if " { $snippet "file-info" } " is a directory." } ;
-
-HELP: (directory-entries)
-{ $values { "path" "a pathname string" } { "seq" "a sequence of " { $snippet "{ name dir? }" } " pairs" } }
-{ $description "Outputs the contents of a directory named by " { $snippet "path" } "." }
-{ $notes "This is a low-level word, and user code should call one of the related words instead." } ;
-
-HELP: directory-entries
-{ $values { "path" "a pathname string" } { "seq" "a sequence of " { $link directory-entry } " objects" } }
-{ $description "Outputs the contents of a directory named by " { $snippet "path" } "." } ;
-
-HELP: directory-files
-{ $values { "path" "a pathname string" } { "seq" "a sequence of filenames" } }
-{ $description "Outputs the contents of a directory named by " { $snippet "path" } "." } ;
-
-HELP: with-directory-files
-{ $values { "path" "a pathname string" } { "quot" quotation } }
-{ $description "Calls the quotation with the directory file names on the stack and with the directory set as the " { $link current-directory } ".  Restores the current directory after the quotation is called." } ;
-
-HELP: file-systems
-{ $values { "array" array } }
-{ $description "Returns an array of " { $link file-system-info } " objects returned by iterating the mount points and calling " { $link file-system-info } " on each." } ;
-
-HELP: file-system-info
-{ $values
-{ "path" "a pathname string" }
-{ "file-system-info" file-system-info } }
-{ $description "Returns a platform-specific object describing the file-system that contains the path. The cross-platform slot is " { $slot "free-space" } "." } ;
-
-HELP: resource-path
-{ $values { "path" "a pathname string" } { "newpath" "a pathname string" } }
-{ $description "Resolve a path relative to the Factor source code location." } ;
-
-HELP: pathname
-{ $class-description "Class of path name objects. Path name objects can be created by calling " { $link <pathname> } "." } ;
-
-HELP: normalize-path
-{ $values { "str" "a pathname string" } { "newstr" "a new pathname string" } }
-{ $description "Called by words such as " { $link <file-reader> } " and " { $link <file-writer> } " to prepare a pathname before passing it to underlying code." } ;
-
-HELP: <pathname> ( str -- pathname )
-{ $values { "str" "a pathname string" } { "pathname" pathname } }
-{ $description "Creates a new " { $link pathname } "." } ;
-
-HELP: make-link
-{ $values { "target" "a path to the symbolic link's target" } { "symlink" "a path to new symbolic link" } }
-{ $description "Creates a symbolic link." } ;
-
-HELP: read-link
-{ $values { "symlink" "a path to an existing symbolic link" } { "path" "the path pointed to by the symbolic link" } }
-{ $description "Reads the symbolic link and returns its target path." } ;
-
-HELP: copy-link
-{ $values { "target" "a path to an existing symlink" } { "symlink" "a path to a new symbolic link" } }
-{ $description "Copies a symbolic link without following the link." } ;
-
-{ make-link read-link copy-link } related-words
-
-HELP: home
-{ $values { "dir" string } }
-{ $description "Outputs the user's home directory." } ;
-
-HELP: delete-file
-{ $values { "path" "a pathname string" } }
-{ $description "Deletes a file." }
-{ $errors "Throws an error if the file could not be deleted." } ;
-
-HELP: make-directory
-{ $values { "path" "a pathname string" } }
-{ $description "Creates a directory." }
-{ $errors "Throws an error if the directory could not be created." } ;
-
-HELP: make-directories
-{ $values { "path" "a pathname string" } }
-{ $description "Creates a directory and any parent directories which do not yet exist." }
-{ $errors "Throws an error if the directories could not be created." } ;
-
-HELP: delete-directory
-{ $values { "path" "a pathname string" } }
-{ $description "Deletes a directory. The directory must be empty." }
-{ $errors "Throws an error if the directory could not be deleted." } ;
-
-HELP: touch-file
-{ $values { "path" "a pathname string" } }
-{ $description "Updates the modification time of a file or directory. If the file does not exist, creates a new, empty file." }
-{ $errors "Throws an error if the file could not be touched." } ;
-
-HELP: delete-tree
-{ $values { "path" "a pathname string" } }
-{ $description "Deletes a file or directory, recursing into subdirectories." }
-{ $errors "Throws an error if the deletion fails." } 
-{ $warning "Misuse of this word can lead to catastrophic data loss." } ;
-
-HELP: move-file
-{ $values { "from" "a pathname string" } { "to" "a pathname string" } }
-{ $description "Moves or renames a file." }
-{ $errors "Throws an error if the file does not exist or if the move operation fails." } ;
-
-HELP: move-file-into
-{ $values { "from" "a pathname string" } { "to" "a directory pathname string" } }
-{ $description "Moves a file to another directory without renaming it." }
-{ $errors "Throws an error if the file does not exist or if the move operation fails." } ;
-
-HELP: move-files-into
-{ $values { "files" "a sequence of pathname strings" } { "to" "a directory pathname string" } }
-{ $description "Moves a set of files to another directory." }
-{ $errors "Throws an error if the file does not exist or if the move operation fails." } ;
-
-HELP: copy-file
-{ $values { "from" "a pathname string" } { "to" "a pathname string" } }
-{ $description "Copies a file." }
-{ $notes "This operation attempts to preserve the original file's attributes, however not all attributes may be preserved." }
-{ $errors "Throws an error if the file does not exist or if the copy operation fails." } ;
-
-HELP: copy-file-into
-{ $values { "from" "a pathname string" } { "to" "a directory pathname string" } }
-{ $description "Copies a file to another directory." }
-{ $errors "Throws an error if the file does not exist or if the copy operation fails." } ;
-
-HELP: copy-files-into
-{ $values { "files" "a sequence of pathname strings" } { "to" "a directory pathname string" } }
-{ $description "Copies a set of files to another directory." }
-{ $errors "Throws an error if the file does not exist or if the copy operation fails." } ;
-
-HELP: copy-tree
-{ $values { "from" "a pathname string" } { "to" "a pathname string" } }
-{ $description "Copies a directory tree recursively." }
-{ $notes "This operation attempts to preserve original file attributes, however not all attributes may be preserved." }
-{ $errors "Throws an error if the copy operation fails." } ;
-
-HELP: copy-tree-into
-{ $values { "from" "a pathname string" } { "to" "a directory pathname string" } }
-{ $description "Copies a directory tree to another directory, recursively." }
-{ $errors "Throws an error if the copy operation fails." } ;
-
-HELP: copy-trees-into
-{ $values { "files" "a sequence of pathname strings" } { "to" "a directory pathname string" } }
-{ $description "Copies a set of directory trees to another directory, recursively." }
-{ $errors "Throws an error if the copy operation fails." } ;
-
-
index 4299634642f3b8f3cc06c103cdebb71bef342d2e..f9702fd1337a993f460a29f0d6d73b8ecdf42696 100644 (file)
+USING: tools.test io.files io.files.private io.files.temp
+io.directories io.encodings.8-bit arrays make system
+io.encodings.binary io threads kernel continuations
+io.encodings.ascii sequences strings accessors
+io.encodings.utf8 math destructors namespaces ;
 IN: io.files.tests
-USING: tools.test io.files io.files.private io threads kernel
-continuations io.encodings.ascii sequences
-strings accessors io.encodings.utf8 math destructors
-namespaces ;
 
 \ exists? must-infer
 \ (exists?) must-infer
-\ file-info must-infer
-\ link-info must-infer
 
-[ ] [ "blahblah" temp-file dup exists? [ delete-directory ] [ drop ] if ] unit-test
-[ ] [ "blahblah" temp-file make-directory ] unit-test
-[ t ] [ "blahblah" temp-file file-info directory? ] unit-test
-
-[ t ] [
-    [ temp-directory "loldir" append-path delete-directory ] ignore-errors
-    temp-directory [
-        "loldir" make-directory
-    ] with-directory
-    temp-directory "loldir" append-path exists?
-] unit-test
-
-[ ] [
-    [ temp-directory "loldir" append-path delete-directory ] ignore-errors
-    temp-directory [
-        "loldir" make-directory
-        "loldir" delete-directory
-    ] with-directory
-] unit-test
-
-[ "file1 contents" ] [
-    [ temp-directory "loldir" append-path delete-directory ] ignore-errors
-    temp-directory [
-        "file1 contents" "file1" utf8 set-file-contents
-        "file1" "file2" copy-file
-        "file2" utf8 file-contents
-    ] with-directory
-    "file1" temp-file delete-file
-    "file2" temp-file delete-file
-] unit-test
-
-[ "file3 contents" ] [
-    temp-directory [
-        "file3 contents" "file3" utf8 set-file-contents
-        "file3" "file4" move-file
-        "file4" utf8 file-contents
-    ] with-directory
-    "file4" temp-file delete-file
-] unit-test
-
-[ "file5" temp-file delete-file ] ignore-errors
-
-[ ] [
-    temp-directory [
-        "file5" touch-file
-        "file5" delete-file
-    ] with-directory
-] unit-test
-
-[ "file6" temp-file delete-file ] ignore-errors
-
-[ ] [
-    temp-directory [
-        "file6" touch-file
-        "file6" link-info drop
-    ] with-directory
-] unit-test
-
-[ "passwd" ] [ "/etc/passwd" file-name ] unit-test
-[ "awk" ] [ "/usr/libexec/awk/" file-name ] unit-test
-[ "awk" ] [ "/usr/libexec/awk///" file-name ] unit-test
-[ "" ] [ "" file-name ] unit-test
+[ ] [ "append-test" temp-file dup exists? [ delete-file ] [ drop ] if ] unit-test
 
-[ "freetype6.dll" ] [ "resource:freetype6.dll" file-name ] unit-test
-[ "freetype6.dll" ] [ "resource:/freetype6.dll" file-name ] unit-test
+[ ] [ "append-test" temp-file ascii <file-appender> dispose ] unit-test
 
-[ ] [
-    { "Hello world." }
-    "test-foo.txt" temp-file ascii set-file-lines
+[
+    "This is a line.\rThis is another line.\r"
+] [
+    "resource:core/io/test/mac-os-eol.txt" latin1 <file-reader>
+    [ 500 read ] with-input-stream
 ] unit-test
 
-[ ] [
-    "test-foo.txt" temp-file ascii [
-        "Hello appender." print
-    ] with-file-appender
+[
+    255
+] [
+    "resource:core/io/test/binary.txt" latin1 <file-reader>
+    [ read1 ] with-input-stream >fixnum
 ] unit-test
 
 [ ] [
-    "test-bar.txt" temp-file ascii [
-        "Hello appender." print
-    ] with-file-appender
+    "It seems Jobs has lost his grasp on reality again.\n"
+    "separator-test.txt" temp-file latin1 set-file-contents
 ] unit-test
 
-[ "Hello world.\nHello appender.\n" ] [
-    "test-foo.txt" temp-file ascii file-contents
-] unit-test
-
-[ "Hello appender.\n" ] [
-    "test-bar.txt" temp-file ascii file-contents
+[
+    {
+        { "It seems " CHAR: J }
+        { "obs has lost h" CHAR: i }
+        { "s grasp on reality again.\n" f }
+    }
+] [
+    [
+        "separator-test.txt" temp-file
+        latin1 <file-reader> [
+            "J" read-until 2array ,
+            "i" read-until 2array ,
+            "X" read-until 2array ,
+        ] with-input-stream
+    ] { } make
 ] unit-test
 
-[ ] [ "test-foo.txt" temp-file delete-file ] unit-test
-
-[ ] [ "test-bar.txt" temp-file delete-file ] unit-test
-
-[ f ] [ "test-foo.txt" temp-file exists? ] unit-test
-
-[ f ] [ "test-bar.txt" temp-file exists? ] unit-test
-
-[ "test-blah" temp-file delete-tree ] ignore-errors
-
-[ ] [ "test-blah" temp-file make-directory ] unit-test
-
 [ ] [
-    "test-blah/fooz" temp-file ascii <file-writer> dispose
+    image binary [
+        10 [ 65536 read drop ] times
+    ] with-file-reader
 ] unit-test
 
-[ t ] [
-    "test-blah/fooz" temp-file exists?
+! Test EOF behavior
+[ 10 ] [
+    image binary [
+        0 read drop
+        10 read length
+    ] with-file-reader
 ] unit-test
 
-[ ] [ "test-blah/fooz" temp-file delete-file ] unit-test
-
-[ ] [ "test-blah" temp-file delete-directory ] unit-test
-
-[ f ] [ "test-blah" temp-file exists? ] unit-test
-
 USE: debugger.threads
 
 [ ] [ "test-quux.txt" temp-file ascii [ [ yield "Hi" write ] "Test" spawn drop ] with-file-writer ] unit-test
@@ -139,150 +75,3 @@ USE: debugger.threads
 [ t ] [ "quux-test.txt" temp-file exists? ] unit-test
 
 [ ] [ "quux-test.txt" temp-file delete-file ] unit-test
-
-[ ] [ "delete-tree-test/a/b/c" temp-file make-directories ] unit-test
-
-[ ] [
-    { "Hi" }
-    "delete-tree-test/a/b/c/d" temp-file ascii set-file-lines
-] unit-test
-
-[ ] [
-    "delete-tree-test" temp-file delete-tree
-] unit-test
-
-[ { "kernel" } ] [
-    "core" resource-path [
-        "." directory-files [ "kernel" = ] filter
-    ] with-directory
-] unit-test
-
-[ { "kernel" } ] [
-    "resource:core" [
-        "." directory-files [ "kernel" = ] filter
-    ] with-directory
-] unit-test
-
-[ { "kernel" } ] [
-    "resource:core" [
-        [ "kernel" = ] filter
-    ] with-directory-files
-] unit-test
-
-[ ] [
-    "copy-tree-test/a/b/c" temp-file make-directories
-] unit-test
-
-[ ] [
-    "Foobar"
-    "copy-tree-test/a/b/c/d" temp-file
-    ascii set-file-contents
-] unit-test
-
-[ ] [
-    "copy-tree-test" temp-file
-    "copy-destination" temp-file copy-tree
-] unit-test
-
-[ "Foobar" ] [
-    "copy-destination/a/b/c/d" temp-file ascii file-contents
-] unit-test
-
-[ ] [
-    "copy-destination" temp-file delete-tree
-] unit-test
-
-[ ] [
-    "copy-tree-test" temp-file
-    "copy-destination" temp-file copy-tree-into
-] unit-test
-
-[ "Foobar" ] [
-    "copy-destination/copy-tree-test/a/b/c/d" temp-file ascii file-contents
-] unit-test
-
-[ ] [
-    "copy-destination/copy-tree-test/a/b/c/d" temp-file "" temp-file copy-file-into
-] unit-test
-
-[ "Foobar" ] [
-    "d" temp-file ascii file-contents
-] unit-test
-
-[ ] [ "d" temp-file delete-file ] unit-test
-
-[ ] [ "copy-destination" temp-file delete-tree ] unit-test
-
-[ ] [ "copy-tree-test" temp-file delete-tree ] unit-test
-
-[ t ] [ cwd "misc" resource-path [ ] with-directory cwd = ] unit-test
-
-[ t ] [
-    temp-directory [ "hi41" "test41" utf8 set-file-contents ] with-directory
-    temp-directory "test41" append-path utf8 file-contents "hi41" =
-] unit-test
-
-[ t ] [
-    temp-directory [ "test41" file-info size>> ] with-directory 4 =
-] unit-test
-
-[ ] [ "append-test" temp-file dup exists? [ delete-file ] [ drop ] if ] unit-test
-
-[ ] [ "append-test" temp-file ascii <file-appender> dispose ] unit-test
-
-[ "/usr/lib" ] [ "/usr" "lib" append-path ] unit-test
-[ "/usr/lib" ] [ "/usr/" "lib" append-path ] unit-test
-[ "/usr/lib" ] [ "/usr" "./lib" append-path ] unit-test
-[ "/usr/lib/" ] [ "/usr" "./lib/" append-path ] unit-test
-[ "/lib" ] [ "/usr" "../lib" append-path ] unit-test
-[ "/lib/" ] [ "/usr" "../lib/" append-path ] unit-test
-
-[ "" ] [ "" "." append-path ] unit-test
-[ "" ".." append-path ] must-fail
-
-[ "/" ] [ "/" "./." append-path ] unit-test
-[ "/" ] [ "/" "././" append-path ] unit-test
-[ "/a/b/lib" ] [ "/a/b/c/d/e/f/" "../../../../lib" append-path ] unit-test
-[ "/a/b/lib/" ] [ "/a/b/c/d/e/f/" "../../../../lib/" append-path ] unit-test
-
-[ "" "../lib/" append-path ] must-fail
-[ "lib" ] [ "" "lib" append-path ] unit-test
-[ "lib" ] [ "" "./lib" append-path ] unit-test
-
-[ "foo/bar/." parent-directory ] must-fail
-[ "foo/bar/./" parent-directory ] must-fail
-[ "foo/bar/baz/.." parent-directory ] must-fail
-[ "foo/bar/baz/../" parent-directory ] must-fail
-
-[ "." parent-directory ] must-fail
-[ "./" parent-directory ] must-fail
-[ ".." parent-directory ] must-fail
-[ "../" parent-directory ] must-fail
-[ "../../" parent-directory ] must-fail
-[ "foo/.." parent-directory ] must-fail
-[ "foo/../" parent-directory ] must-fail
-[ "" parent-directory ] must-fail
-[ "." ] [ "boot.x86.64.image" parent-directory ] unit-test
-
-[ "bar/foo" ] [ "bar/baz" "..///foo" append-path ] unit-test
-[ "bar/baz/foo" ] [ "bar/baz" ".///foo" append-path ] unit-test
-[ "bar/foo" ] [ "bar/baz" "./..//foo" append-path ] unit-test
-[ "bar/foo" ] [ "bar/baz" "./../././././././///foo" append-path ] unit-test
-
-[ t ] [ "resource:core" absolute-path? ] unit-test
-[ f ] [ "" absolute-path? ] unit-test
-
-[ "touch-twice-test" temp-file delete-file ] ignore-errors
-[ ] [ 2 [ "touch-twice-test" temp-file touch-file ] times ] unit-test
-
-! aum's bug
-[
-    "." current-directory set
-    ".." "resource-path" set
-    [ "../core/bootstrap/stage2.factor" ]
-    [ "resource:core/bootstrap/stage2.factor" (normalize-path) ]
-    unit-test
-] with-scope
-
-[ t ] [ "/" file-system-info file-system-info? ] unit-test
-[ t ] [ file-systems [ file-system-info? ] all? ] unit-test
index 77b37180c63aadf79a5f577484f48fd9ad01e368..1bc282e95661af65e6bad11a303a802926894e58 100644 (file)
@@ -1,10 +1,7 @@
 ! Copyright (C) 2004, 2008 Slava Pestov, Daniel Ehrenberg.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io.backend io.files.private io hashtables kernel
-kernel.private math memory namespaces sequences strings assocs
-arrays definitions system combinators splitting sbufs
-continuations destructors io.encodings io.encodings.binary init
-accessors math.order ;
+USING: kernel kernel.private sequences init namespaces system io
+io.backend io.pathnames io.encodings io.files.private ;
 IN: io.files
 
 HOOK: (file-reader) io-backend ( path -- stream )
@@ -28,7 +25,7 @@ HOOK: (file-appender) io-backend ( path -- stream )
 : with-file-reader ( path encoding quot -- )
     [ <file-reader> ] dip with-input-stream ; inline
 
-: file-contents ( path encoding -- str )
+: file-contents ( path encoding -- seq )
     <file-reader> contents ;
 
 : with-file-writer ( path encoding quot -- )
@@ -37,161 +34,15 @@ HOOK: (file-appender) io-backend ( path -- stream )
 : set-file-lines ( seq path encoding -- )
     [ [ print ] each ] with-file-writer ;
 
-: set-file-contents ( str path encoding -- )
+: set-file-contents ( seq path encoding -- )
     [ write ] with-file-writer ;
 
 : with-file-appender ( path encoding quot -- )
     [ <file-appender> ] dip with-output-stream ; inline
 
-! Pathnames
-: path-separator? ( ch -- ? ) os windows? "/\\" "/" ? member? ;
-
-: path-separator ( -- string ) os windows? "\\" "/" ? ;
-
-: trim-right-separators ( str -- newstr )
-    [ path-separator? ] trim-right ;
-
-: trim-left-separators ( str -- newstr )
-    [ path-separator? ] trim-left ;
-
-: last-path-separator ( path -- n ? )
-    [ length 1- ] keep [ path-separator? ] find-last-from ;
-
-HOOK: root-directory? io-backend ( path -- ? )
-
-M: object root-directory? ( path -- ? )
-    [ f ] [ [ path-separator? ] all? ] if-empty ;
-
-ERROR: no-parent-directory path ;
-
-: parent-directory ( path -- parent )
-    dup root-directory? [
-        trim-right-separators
-        dup last-path-separator [
-            1+ cut
-        ] [
-            drop "." swap
-        ] if
-        { "" "." ".." } member? [
-            no-parent-directory
-        ] when
-    ] unless ;
-
-<PRIVATE
-
-: head-path-separator? ( path1 ? -- ?' )
-    [
-        [ t ] [ first path-separator? ] if-empty
-    ] [
-        drop f
-    ] if ;
-
-: head.? ( path -- ? ) "." ?head head-path-separator? ;
-
-: head..? ( path -- ? ) ".." ?head head-path-separator? ;
-
-: append-path-empty ( path1 path2 -- path' )
-    {
-        { [ dup head.? ] [
-            rest trim-left-separators append-path-empty
-        ] }
-        { [ dup head..? ] [ drop no-parent-directory ] }
-        [ nip ]
-    } cond ;
-
-PRIVATE>
-
-: windows-absolute-path? ( path -- path ? )
-    {
-        { [ dup "\\\\?\\" head? ] [ t ] }
-        { [ dup length 2 < ] [ f ] }
-        { [ dup second CHAR: : = ] [ t ] }
-        [ f ]
-    } cond ;
-
-: absolute-path? ( path -- ? )
-    {
-        { [ dup empty? ] [ f ] }
-        { [ dup "resource:" head? ] [ t ] }
-        { [ os windows? ] [ windows-absolute-path? ] }
-        { [ dup first path-separator? ] [ t ] }
-        [ f ]
-    } cond nip ;
-
-: append-path ( str1 str2 -- str )
-    {
-        { [ over empty? ] [ append-path-empty ] }
-        { [ dup empty? ] [ drop ] }
-        { [ over trim-right-separators "." = ] [ nip ] }
-        { [ dup absolute-path? ] [ nip ] }
-        { [ dup head.? ] [ rest trim-left-separators append-path ] }
-        { [ dup head..? ] [
-            2 tail trim-left-separators
-            [ parent-directory ] dip append-path
-        ] }
-        { [ over absolute-path? over first path-separator? and ] [
-            [ 2 head ] dip append
-        ] }
-        [
-            [ trim-right-separators "/" ] dip
-            trim-left-separators 3append
-        ]
-    } cond ;
-
-: prepend-path ( str1 str2 -- str )
-    swap append-path ; inline
-
-: file-name ( path -- string )
-    dup root-directory? [
-        trim-right-separators
-        dup last-path-separator [ 1+ tail ] [
-            drop "resource:" ?head [ file-name ] when
-        ] if
-    ] unless ;
-
-: file-extension ( filename -- extension )
-    "." split1-last nip ;
-
-! File info
-TUPLE: file-info type size permissions created modified
-accessed ;
-
-HOOK: file-info io-backend ( path -- info )
-
-! Symlinks
-HOOK: link-info io-backend ( path -- info )
-
-HOOK: make-link io-backend ( target symlink -- )
-
-HOOK: read-link io-backend ( symlink -- path )
-
-: copy-link ( target symlink -- )
-    [ read-link ] dip make-link ;
-
-SYMBOL: +regular-file+
-SYMBOL: +directory+
-SYMBOL: +symbolic-link+
-SYMBOL: +character-device+
-SYMBOL: +block-device+
-SYMBOL: +fifo+
-SYMBOL: +socket+
-SYMBOL: +whiteout+
-SYMBOL: +unknown+
-
-! File metadata
 : exists? ( path -- ? ) normalize-path (exists?) ;
 
-: directory? ( file-info -- ? ) type>> +directory+ = ;
-
-! File-system
-
-HOOK: file-systems os ( -- array )
-
-TUPLE: file-system-info device-name mount-point type
-available-space free-space used-space total-space ;
-
-HOOK: file-system-info os ( path -- file-system-info )
-
+! Current directory
 <PRIVATE
 
 HOOK: cd io-backend ( path -- )
@@ -202,148 +53,9 @@ M: object cwd ( -- path ) "." ;
 
 PRIVATE>
 
-SYMBOL: current-directory
-
 [
     cwd current-directory set-global
     13 getenv cwd prepend-path \ image set-global
     14 getenv cwd prepend-path \ vm set-global
     image parent-directory "resource-path" set-global
 ] "io.files" add-init-hook
-
-: resource-path ( path -- newpath )
-    "resource-path" get prepend-path ;
-
-: (normalize-path) ( path -- path' )
-    "resource:" ?head [
-        trim-left-separators resource-path
-        (normalize-path)
-    ] [
-        current-directory get prepend-path
-    ] if ;
-
-M: object normalize-path ( path -- path' )
-    (normalize-path) ;
-
-: set-current-directory ( path -- )
-    (normalize-path) current-directory set ;
-
-: with-directory ( path quot -- )
-    [ (normalize-path) current-directory ] dip with-variable ; inline
-
-! Creating directories
-HOOK: make-directory io-backend ( path -- )
-
-: make-directories ( path -- )
-    normalize-path trim-right-separators {
-        { [ dup "." = ] [ ] }
-        { [ dup root-directory? ] [ ] }
-        { [ dup empty? ] [ ] }
-        { [ dup exists? ] [ ] }
-        [
-            dup parent-directory make-directories
-            dup make-directory
-        ]
-    } cond drop ;
-
-TUPLE: directory-entry name type ;
-
-HOOK: >directory-entry os ( byte-array -- directory-entry )
-
-HOOK: (directory-entries) os ( path -- seq )
-
-: directory-entries ( path -- seq )
-    normalize-path
-    (directory-entries)
-    [ name>> { "." ".." } member? not ] filter ;
-    
-: directory-files ( path -- seq )
-    directory-entries [ name>> ] map ;
-
-: with-directory-files ( path quot -- )
-    [ "" directory-files ] prepose with-directory ; inline
-
-! Touching files
-HOOK: touch-file io-backend ( path -- )
-
-! Deleting files
-HOOK: delete-file io-backend ( path -- )
-
-HOOK: delete-directory io-backend ( path -- )
-
-: delete-tree ( path -- )
-    dup link-info type>> +directory+ = [
-        [ [ [ delete-tree ] each ] with-directory-files ]
-        [ delete-directory ]
-        bi
-    ] [ delete-file ] if ;
-
-: to-directory ( from to -- from to' )
-    over file-name append-path ;
-
-! Moving and renaming files
-HOOK: move-file io-backend ( from to -- )
-
-: move-file-into ( from to -- )
-    to-directory move-file ;
-
-: move-files-into ( files to -- )
-    [ move-file-into ] curry each ;
-
-! Copying files
-HOOK: copy-file io-backend ( from to -- )
-
-M: object copy-file
-    dup parent-directory make-directories
-    binary <file-writer> [
-        swap binary <file-reader> [
-            swap stream-copy
-        ] with-disposal
-    ] with-disposal ;
-
-: copy-file-into ( from to -- )
-    to-directory copy-file ;
-
-: copy-files-into ( files to -- )
-    [ copy-file-into ] curry each ;
-
-DEFER: copy-tree-into
-
-: copy-tree ( from to -- )
-    normalize-path
-    over link-info type>>
-    {
-        { +symbolic-link+ [ copy-link ] }
-        { +directory+ [
-            swap [
-                [ swap copy-tree-into ] with each
-            ] with-directory-files
-        ] }
-        [ drop copy-file ]
-    } case ;
-
-: copy-tree-into ( from to -- )
-    to-directory copy-tree ;
-
-: copy-trees-into ( files to -- )
-    [ copy-tree-into ] curry each ;
-
-! Special paths
-
-: temp-directory ( -- path )
-    "temp" resource-path dup make-directories ;
-
-: temp-file ( name -- path )
-    temp-directory prepend-path ;
-
-! Pathname presentations
-TUPLE: pathname string ;
-
-C: <pathname> pathname
-
-M: pathname <=> [ string>> ] compare ;
-
-! Home directory
-HOOK: home io-backend ( -- dir )
-
-M: object home "" resource-path ;
index 02af963e1a1d13e9b7708026132c840982fca182..d7534ddb5083080c12e3148e7a3644e6d45891af 100644 (file)
@@ -1,5 +1,5 @@
 USING: help.markup help.syntax quotations hashtables kernel
-classes strings continuations destructors math ;
+classes strings continuations destructors math byte-arrays ;
 IN: io
 
 HELP: stream-readln
@@ -9,38 +9,38 @@ HELP: stream-readln
 $io-error ;
 
 HELP: stream-read1
-{ $values { "stream" "an input stream" } { "ch/f" "a character or " { $link f } } }
-{ $contract "Reads a character of input from the stream. Outputs " { $link f } " on stream exhaustion." }
+{ $values { "stream" "an input stream" } { "elt" "an element or " { $link f } } }
+{ $contract "Reads an element from the stream. Outputs " { $link f } " on stream exhaustion." }
 { $notes "Most code only works on one stream at a time and should instead use " { $link read1 } "; see " { $link "stdio" } "." }
 $io-error ;
 
 HELP: stream-read
-{ $values { "n" "a non-negative integer" } { "stream" "an input stream" } { "str/f" "a string or " { $link f } } }
-{ $contract "Reads " { $snippet "n" } " characters of input from the stream. Outputs a truncated string or " { $link f } " on stream exhaustion." }
+{ $values { "n" "a non-negative integer" } { "stream" "an input stream" } { "seq" { $or byte-array string f } } }
+{ $contract "Reads " { $snippet "n" } " elements from the stream. Outputs a truncated string or " { $link f } " on stream exhaustion." }
 { $notes "Most code only works on one stream at a time and should instead use " { $link read } "; see " { $link "stdio" } "." }
 $io-error ;
 
 HELP: stream-read-until
-{ $values { "seps" string } { "stream" "an input stream" } { "str/f" "a string or " { $link f } } { "sep/f" "a character or " { $link f } } }
-{ $contract "Reads characters from the stream, until the first occurrence of a separator character, or stream exhaustion. In the former case, the separator character is pushed on the stack, and is not part of the output string. In the latter case, the entire stream contents are output, along with " { $link f } "." }
+{ $values { "seps" string } { "stream" "an input stream" } { "seq" { $or byte-array string f } } { "sep/f" "a character or " { $link f } } }
+{ $contract "Reads elements from the stream, until the first occurrence of a separator character, or stream exhaustion. In the former case, the separator is pushed on the stack, and is not part of the output string. In the latter case, the entire stream contents are output, along with " { $link f } "." }
 { $notes "Most code only works on one stream at a time and should instead use " { $link read-until } "; see " { $link "stdio" } "." }
 $io-error ;
 
 HELP: stream-read-partial
 { $values
-     { "n" integer } { "stream" "an input stream" }
-     { "str/f" "a string or " { $link f } } }
-{ $description "Reads at most " { $snippet "n" } " characters from a stream and returns up to that many characters without blocking. If no characters are available, blocks until some are and returns them." } ;
+     { "n" "a non-negative integer" } { "stream" "an input stream" }
+     { "seq" { $or byte-array string f } } }
+{ $description "Reads at most " { $snippet "n" } " elements from a stream and returns up to that many characters without blocking. If no characters are available, blocks until some are and returns them." } ;
 
 HELP: stream-write1
-{ $values { "ch" "a character" } { "stream" "an output stream" } }
-{ $contract "Writes a character of output to the stream. If the stream does buffering, output may not be performed immediately; use " { $link stream-flush } " to force output." }
+{ $values { "elt" "an element" } { "stream" "an output stream" } }
+{ $contract "Writes an element to the stream. If the stream does buffering, output may not be performed immediately; use " { $link stream-flush } " to force output." }
 { $notes "Most code only works on one stream at a time and should instead use " { $link write1 } "; see " { $link "stdio" } "." }
 $io-error ;
 
 HELP: stream-write
-{ $values { "str" string } { "stream" "an output stream" } }
-{ $contract "Writes a string of output to the stream. If the stream does buffering, output may not be performed immediately; use " { $link stream-flush } " to force output." }
+{ $values { "seq" "a byte array or string" } { "stream" "an output stream" } }
+{ $contract "Writes a sequence of elements to the stream. If the stream does buffering, output may not be performed immediately; use " { $link stream-flush } " to force output." }
 { $notes "Most code only works on one stream at a time and should instead use " { $link write } "; see " { $link "stdio" } "." }
 $io-error ;
 
@@ -57,46 +57,6 @@ HELP: stream-nl
 { $notes "Most code only works on one stream at a time and should instead use " { $link nl } "; see " { $link "stdio" } "." }
 $io-error ;
 
-HELP: stream-format
-{ $values { "str" string } { "style" "a hashtable" } { "stream" "an output stream" } }
-{ $contract "Writes formatted text to the stream. If the stream does buffering, output may not be performed immediately; use " { $link stream-flush } " to force output."
-$nl
-"The " { $snippet "style" } " hashtable holds character style information. See " { $link "character-styles" } "." }
-{ $notes "Most code only works on one stream at a time and should instead use " { $link format } "; see " { $link "stdio" } "." }
-$io-error ;
-
-HELP: make-block-stream
-{ $values { "style" "a hashtable" } { "stream" "an output stream" } { "stream'" "an output stream" } }
-{ $contract "Creates an output stream which wraps " { $snippet "stream" } " and adds " { $snippet "style" } " on calls to " { $link stream-write } " and " { $link stream-format } "."
-$nl
-"Unlike " { $link make-span-stream } ", this creates a new paragraph block in the output."
-$nl
-"The " { $snippet "style" } " hashtable holds paragraph style information. See " { $link "paragraph-styles" } "." }
-{ $notes "Most code only works on one stream at a time and should instead use " { $link with-nesting } "; see " { $link "stdio" } "." }
-$io-error ;
-
-HELP: stream-write-table
-{ $values { "table-cells" "a sequence of sequences of table cells" } { "style" "a hashtable" } { "stream" "an output stream" } }
-{ $contract "Prints a table of cells produced by " { $link with-cell } "."
-$nl
-"The " { $snippet "style" } " hashtable holds table style information. See " { $link "table-styles" } "." }
-{ $notes "Most code only works on one stream at a time and should instead use " { $link tabular-output } "; see " { $link "stdio" } "." }
-$io-error ;
-
-HELP: make-cell-stream
-{ $values { "style" hashtable } { "stream" "an output stream" } { "stream'" object } }
-{ $contract "Creates an output stream which writes to a table cell object." }
-{ $notes "Most code only works on one stream at a time and should instead use " { $link with-cell } "; see " { $link "stdio" } "." }
-$io-error ;
-
-HELP: make-span-stream
-{ $values { "style" "a hashtable" } { "stream" "an output stream" } { "stream'" "an output stream" } }
-{ $contract "Creates an output stream which wraps " { $snippet "stream" } " and adds " { $snippet "style" } " on calls to " { $link stream-write } " and " { $link stream-format } "."
-$nl
-"Unlike " { $link make-block-stream } ", the stream output is inline, and not nested in a paragraph block." }
-{ $notes "Most code only works on one stream at a time and should instead use " { $link with-style } "; see " { $link "stdio" } "." }
-$io-error ;
-
 HELP: stream-print
 { $values { "str" string } { "stream" "an output stream" } }
 { $description "Writes a newline-terminated string." }
@@ -123,34 +83,32 @@ HELP: readln
 $io-error ;
 
 HELP: read1
-{ $values { "ch/f" "a character or " { $link f } } }
-{ $description "Reads a character of input from " { $link input-stream } ". Outputs " { $link f } " on stream exhaustion." }
+{ $values { "elt" "an element or " { $link f } } }
+{ $description "Reads an element from " { $link input-stream } ". Outputs " { $link f } " on stream exhaustion." }
 $io-error ;
 
 HELP: read
-{ $values { "n" "a non-negative integer" } { "str/f" "a string or " { $link f } } }
-{ $description "Reads " { $snippet "n" } " characters of input from " { $link input-stream } ". Outputs a truncated string or " { $link f } " on stream exhaustion." }
+{ $values { "n" "a non-negative integer" } { "seq" { $or byte-array string f } } }
+{ $description "Reads " { $snippet "n" } " elements from " { $link input-stream } ". If there is no input available, outputs " { $link f } ". If there are less than " { $snippet "n" } " elements available, outputs a sequence shorter than " { $snippet "n" } " in length." }
 $io-error ;
 
 HELP: read-until
-{ $values { "seps" string } { "str/f" "a string or " { $link f } } { "sep/f" "a character or " { $link f } } }
-{ $contract "Reads characters from " { $link input-stream } ". until the first occurrence of a separator character, or stream exhaustion. In the former case, the separator character is pushed on the stack, and is not part of the output string. In the latter case, the entire stream contents are output, along with " { $link f } "." }
+{ $values { "seps" string } { "seq" { $or byte-array string f } } { "sep/f" "a character or " { $link f } } }
+{ $contract "Reads elements from " { $link input-stream } ". until the first occurrence of a separator, or stream exhaustion. In the former case, the separator character is pushed on the stack, and is not part of the output. In the latter case, the entire stream contents are output, along with " { $link f } "." }
 $io-error ;
 
 HELP: read-partial
-{ $values
-     { "n" null }
-     { "str/f" null } }
-{ $description "Reads at most " { $snippet "n" } " characters from " { $link input-stream } " and returns up to that many characters without blocking. If no characters are available, blocks until some are and returns them." } ;
+{ $values { "n" integer } { "seq" { $or byte-array string f } } }
+{ $description "Reads at most " { $snippet "n" } " elements from " { $link input-stream } " and returns them in a sequence. This word should be used instead of " { $link read } " when processing the entire element a chunk at a time, since on some stream implementations it may be slightly faster." } ;
 
 HELP: write1
-{ $values { "ch" "a character" } }
-{ $contract "Writes a character of output to " { $link output-stream } ". If the stream does buffering, output may not be performed immediately; use " { $link flush } " to force output." }
+{ $values { "elt" "an element" } }
+{ $contract "Writes an element to " { $link output-stream } ". If the stream does buffering, output may not be performed immediately; use " { $link flush } " to force output." }
 $io-error ;
 
 HELP: write
-{ $values { "str" string } }
-{ $description "Writes a string of output to " { $link output-stream } ". If the stream does buffering, output may not be performed immediately; use " { $link flush } " to force output." }
+{ $values { "seq" { $or byte-array string f } } }
+{ $description "Writes a sequence of elements to " { $link output-stream } ". If the stream does buffering, output may not be performed immediately; use " { $link flush } " to force output." }
 $io-error ;
 
 HELP: flush
@@ -161,56 +119,8 @@ HELP: nl
 { $description "Writes a line terminator to " { $link output-stream } ". If the stream does buffering, output may not be performed immediately; use " { $link flush } " to force output." }
 $io-error ;
 
-HELP: format
-{ $values { "str" string } { "style" "a hashtable" } }
-{ $description "Writes formatted text to " { $link output-stream } ". If the stream does buffering, output may not be performed immediately; use " { $link flush } " to force output." }
-{ $notes "Details are in the documentation for " { $link stream-format } "." }
-$io-error ;
-
-HELP: with-nesting
-{ $values { "style" "a hashtable" } { "quot" quotation } }
-{ $description "Calls the quotation in a new dynamic scope with " { $link output-stream } " rebound to a nested paragraph stream, with formatting information applied." }
-{ $notes "Details are in the documentation for " { $link make-block-stream } "." }
-$io-error ;
-
-HELP: tabular-output
-{ $values { "style" "a hashtable" } { "quot" quotation } }
-{ $description "Calls a quotation which emits a series of equal-length table rows using " { $link with-row } ". The results are laid out in a tabular fashion on " { $link output-stream } "."
-$nl
-"The " { $snippet "style" } " hashtable holds table style information. See " { $link "table-styles" } "." }
-{ $examples
-    { $code
-        "{ { 1 2 } { 3 4 } }"
-        "H{ { table-gap { 10 10 } } } ["
-        "    [ [ [ [ . ] with-cell ] each ] with-row ] each"
-        "] tabular-output"
-    }
-}
-$io-error ;
-
-HELP: with-row
-{ $values { "quot" quotation } }
-{ $description "Calls a quotation which emits a series of table cells using " { $link with-cell } ". This word can only be called inside the quotation given to " { $link tabular-output } "." }
-$io-error ;
-
-HELP: with-cell
-{ $values { "quot" quotation } }
-{ $description "Calls a quotation in a new scope with " { $link output-stream } " rebound. Output performed by the quotation is displayed in a table cell. This word can only be called inside the quotation given to " { $link with-row } "." }
-$io-error ;
-
-HELP: write-cell
-{ $values { "str" string } }
-{ $description "Outputs a table cell containing a single string. This word can only be called inside the quotation given to " { $link with-row } "." }
-$io-error ;
-
-HELP: with-style
-{ $values { "style" "a hashtable" } { "quot" quotation } }
-{ $description "Calls the quotation in a new dynamic scope where calls to " { $link write } ", " { $link format } " and other stream output words automatically inherit style settings from " { $snippet "style" } "." }
-{ $notes "Details are in the documentation for " { $link make-span-stream } "." }
-$io-error ;
-
 HELP: print
-{ $values { "string" string } }
+{ $values { "str" string } }
 { $description "Writes a newline-terminated string to " { $link output-stream } "." }
 $io-error ;
 
@@ -255,11 +165,15 @@ HELP: lines
 
 HELP: each-line
 { $values { "quot" { $quotation "( str -- )" } } }
-{ $description "Calls the quotatin with successive lines of text, until the current " { $link input-stream } " is exhausted." } ;
+{ $description "Calls the quotation with successive lines of text, until the current " { $link input-stream } " is exhausted." } ;
+
+HELP: each-block
+{ $values { "quot" { $quotation "( block -- )" } } }
+{ $description "Calls the quotation with successive blocks of data, until the current " { $link input-stream } " is exhausted." } ;
 
 HELP: contents
-{ $values { "stream" "an input stream" } { "str" string } }
-{ $description "Reads the entire contents of a stream into a string." }
+{ $values { "stream" "an input stream" } { "seq" "a string, byte array or " { $link f } } }
+{ $description "Reads the entire contents of a stream. If the stream is empty, outputs"  { $link f } "." }
 $io-error ;
 
 ARTICLE: "stream-protocol" "Stream protocol"
@@ -269,25 +183,23 @@ $nl
 $nl
 "All streams must implement the " { $link dispose } " word in addition to the stream protocol."
 $nl
-"These words are required for input streams:"
+"These words are required for binary and string input streams:"
 { $subsection stream-read1 }
 { $subsection stream-read }
 { $subsection stream-read-until }
-{ $subsection stream-readln }
 { $subsection stream-read-partial }
-"These words are required for output streams:"
+"This word is only required for string input streams:"
+{ $subsection stream-readln }
+"These words are required for binary and string output streams:"
 { $subsection stream-flush }
 { $subsection stream-write1 }
 { $subsection stream-write }
-{ $subsection stream-format }
+"This word is only required for string output streams:"
 { $subsection stream-nl }
-{ $subsection make-span-stream }
-{ $subsection make-block-stream }
-{ $subsection make-cell-stream }
-{ $subsection stream-write-table }
+"For a discussion of the distinction between binary and string streams, see " { $link "stream-elements" } "."
 { $see-also "io.timeouts" } ;
 
-ARTICLE: "stdio" "Default input and output streams"
+ARTICLE: "stdio-motivation" "Motivation for default streams"
 "Most I/O code only operates on one stream at a time. The " { $link input-stream } " and " { $link output-stream } " variables are implicit parameters used by many I/O words. Using this idiom improves code in three ways:"
 { $list
     { "Code becomes simpler because there is no need to keep a stream around on the stack." }
@@ -322,7 +234,10 @@ ARTICLE: "stdio" "Default input and output streams"
     "\"data.txt\" utf8 ["
     "    readln number>string read 16 group"
     "] with-file-reader"
-}
+} ;
+
+ARTICLE: "stdio" "Default input and output streams"
+{ $subsection "stdio-motivation" }
 "The default input stream is stored in a dynamically-scoped variable:"
 { $subsection input-stream }
 "Unless rebound in a child namespace, this variable will be set to a console stream for reading input from the user."
@@ -331,8 +246,9 @@ $nl
 { $subsection read1 }
 { $subsection read }
 { $subsection read-until }
-{ $subsection readln }
 { $subsection read-partial }
+"If the default input stream is a string stream (" { $link "stream-elements" } "), lines of text can be read:"
+{ $subsection readln }
 "A pair of combinators for rebinding the " { $link input-stream } " variable:"
 { $subsection with-input-stream }
 { $subsection with-input-stream* }
@@ -344,18 +260,11 @@ $nl
 { $subsection flush }
 { $subsection write1 }
 { $subsection write }
+"If the default output stream is a string stream (" { $link "stream-elements" } "), lines of text can be written:"
+{ $subsection readln }
 { $subsection print }
 { $subsection nl }
 { $subsection bl }
-"Formatted output:"
-{ $subsection format }
-{ $subsection with-style }
-{ $subsection with-nesting }
-"Tabular output:"
-{ $subsection tabular-output }
-{ $subsection with-row }
-{ $subsection with-cell }
-{ $subsection write-cell }
 "A pair of combinators for rebinding the " { $link output-stream } " variable:"
 { $subsection with-output-stream }
 { $subsection with-output-stream* }
@@ -369,17 +278,26 @@ $nl
 "First, a simple composition of " { $link stream-write } " and " { $link stream-nl } ":"
 { $subsection stream-print }
 "Processing lines one by one:"
-{ $subsection each-line }
-"Sluring an entire stream into memory all at once:"
 { $subsection lines }
+{ $subsection each-line }
+"Processing blocks of data:"
 { $subsection contents }
+{ $subsection each-block }
 "Copying the contents of one stream to another:"
 { $subsection stream-copy } ;
 
+ARTICLE: "stream-elements" "Stream elements"
+"There are two types of streams:"
+{ $list
+  { { $strong "Binary streams" } " - the elements are integers between 0 and 255, inclusive; they represent bytes. Reading a sequence of elements produces a " { $link byte-array } "." }
+  { { $strong "String streams" } " - the elements are non-negative integers, representing Unicode code points. Reading a sequence of elements produces a " { $link string } "." }
+}
+"Most external streams are binary streams, and can be wrapped in string streams once a suitable encoding has been provided; see " { $link "io.encodings" } "." ;
+
 ARTICLE: "streams" "Streams"
-"Input and output centers on the concept of a " { $emphasis "stream" } ", which is a source or sink of characters. Streams also support formatted output, which may be used to present styled text in a manner independent of output medium."
-$nl
-"A stream can either be passed around on the stack or bound to a dynamic variable and used as an implicit " { $emphasis "default stream" } "."
+"Input and output centers on the concept of a " { $emphasis "stream" } ", which is a source or sink of elements."
+{ $subsection "stream-elements" }
+"A stream can either be passed around on the stack or bound to a dynamic variable and used as one of the two implicit " { $emphasis "default streams" } "."
 { $subsection "stream-protocol" }
 { $subsection "stdio" }
 { $subsection "stream-utils" }
index 18cde1a35c5518fa6590e6f41f01ea735f255077..009ba3a9e73f2170591a6e5ee2a23bdfbc0f5dc1 100644 (file)
@@ -8,55 +8,5 @@ IN: io.tests
     "foo" "io.tests" lookup
 ] unit-test
 
-[
-    "This is a line.\rThis is another line.\r"
-] [
-    "resource:core/io/test/mac-os-eol.txt" latin1 <file-reader>
-    [ 500 read ] with-input-stream
-] unit-test
-
-[
-    255
-] [
-    "resource:core/io/test/binary.txt" latin1 <file-reader>
-    [ read1 ] with-input-stream >fixnum
-] unit-test
-
 ! Make sure we use correct to_c_string form when writing
 [ ] [ "\0" write ] unit-test
-
-[ ] [
-    "It seems Jobs has lost his grasp on reality again.\n"
-    "separator-test.txt" temp-file latin1 set-file-contents
-] unit-test
-
-[
-    {
-        { "It seems " CHAR: J }
-        { "obs has lost h" CHAR: i }
-        { "s grasp on reality again.\n" f }
-    }
-] [
-    [
-        "separator-test.txt" temp-file
-        latin1 <file-reader> [
-            "J" read-until 2array ,
-            "i" read-until 2array ,
-            "X" read-until 2array ,
-        ] with-input-stream
-    ] { } make
-] unit-test
-
-[ ] [
-    image binary [
-        10 [ 65536 read drop ] times
-    ] with-file-reader
-] unit-test
-
-! Test EOF behavior
-[ 10 ] [
-    image binary [
-        0 read drop
-        10 read length
-    ] with-file-reader
-] unit-test
index c1fd69a16af006791a1e95eb07473ae0987589c2..55cc336ef8285c1d41aad570fa22b886ca745572 100644 (file)
@@ -1,34 +1,21 @@
-! Copyright (C) 2003, 2007 Slava Pestov.
+! Copyright (C) 2003, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: hashtables generic kernel math namespaces make sequences
 continuations destructors assocs ;
 IN: io
 
+GENERIC: stream-read1 ( stream -- elt )
+GENERIC: stream-read ( n stream -- seq )
+GENERIC: stream-read-until ( seps stream -- seq sep/f )
+GENERIC: stream-read-partial ( n stream -- seq )
 GENERIC: stream-readln ( stream -- str/f )
-GENERIC: stream-read1 ( stream -- ch/f )
-GENERIC: stream-read ( n stream -- str/f )
-GENERIC: stream-read-until ( seps stream -- str/f sep/f )
-GENERIC: stream-read-partial ( n stream -- str/f )
-GENERIC: stream-write1 ( ch stream -- )
-GENERIC: stream-write ( str stream -- )
+
+GENERIC: stream-write1 ( elt stream -- )
+GENERIC: stream-write ( seq stream -- )
 GENERIC: stream-flush ( stream -- )
 GENERIC: stream-nl ( stream -- )
-GENERIC: stream-format ( str style stream -- )
-GENERIC: make-span-stream ( style stream -- stream' )
-GENERIC: make-block-stream ( style stream -- stream' )
-GENERIC: make-cell-stream ( style stream -- stream' )
-GENERIC: stream-write-table ( table-cells style stream -- )
-
-: stream-print ( str stream -- )
-    [ stream-write ] keep stream-nl ;
 
-: (stream-copy) ( in out -- )
-    64 1024 * pick stream-read-partial
-    [ over stream-write (stream-copy) ] [ 2drop ] if* ;
-
-: stream-copy ( in out -- )
-    [ 2dup (stream-copy) ] [ dispose dispose ] [ ]
-    cleanup ;
+: stream-print ( str stream -- ) [ stream-write ] keep stream-nl ;
 
 ! Default streams
 SYMBOL: input-stream
@@ -36,17 +23,16 @@ SYMBOL: output-stream
 SYMBOL: error-stream
 
 : readln ( -- str/f ) input-stream get stream-readln ;
-: read1 ( -- ch/f ) input-stream get stream-read1 ;
-: read ( n -- str/f ) input-stream get stream-read ;
-: read-until ( seps -- str/f sep/f ) input-stream get stream-read-until ;
-: read-partial ( n -- str/f ) input-stream get stream-read-partial ;
+: read1 ( -- elt ) input-stream get stream-read1 ;
+: read ( n -- seq ) input-stream get stream-read ;
+: read-until ( seps -- seq sep/f ) input-stream get stream-read-until ;
+: read-partial ( n -- seq ) input-stream get stream-read-partial ;
 
-: write1 ( ch -- ) output-stream get stream-write1 ;
-: write ( str -- ) output-stream get stream-write ;
+: write1 ( elt -- ) output-stream get stream-write1 ;
+: write ( seq -- ) output-stream get stream-write ;
 : flush ( -- ) output-stream get stream-flush ;
 
 : nl ( -- ) output-stream get stream-nl ;
-: format ( str style -- ) output-stream get stream-format ;
 
 : with-input-stream* ( stream quot -- )
     input-stream swap with-variable ; inline
@@ -68,41 +54,32 @@ SYMBOL: error-stream
     [ [ drop dispose dispose ] 3curry ] 3bi
     [ ] cleanup ; inline
 
-: tabular-output ( style quot -- )
-    swap [ { } make ] dip output-stream get stream-write-table ; inline
-
-: with-row ( quot -- )
-    { } make , ; inline
-
-: with-cell ( quot -- )
-    H{ } output-stream get make-cell-stream
-    [ swap with-output-stream ] keep , ; inline
-
-: write-cell ( str -- )
-    [ write ] with-cell ; inline
-
-: with-style ( style quot -- )
-    swap dup assoc-empty? [
-        drop call
-    ] [
-        output-stream get make-span-stream swap with-output-stream
-    ] if ; inline
-
-: with-nesting ( style quot -- )
-    [ output-stream get make-block-stream ] dip
-    with-output-stream ; inline
-
-: print ( string -- ) output-stream get stream-print ;
+: print ( str -- ) output-stream get stream-print ;
 
 : bl ( -- ) " " write ;
 
 : lines ( stream -- seq )
     [ [ readln dup ] [ ] [ drop ] produce ] with-input-stream ;
 
+<PRIVATE
+
+: each-morsel ( handler: ( data -- ) reader: ( -- data ) -- )
+    [ dup ] compose swap [ drop ] while ; inline
+
+PRIVATE>
+
 : each-line ( quot -- )
-    [ [ readln dup ] ] dip [ drop ] while ; inline
+    [ readln ] each-morsel ; inline
 
-: contents ( stream -- str )
+: contents ( stream -- seq )
     [
-        [ 65536 read dup ] [ ] [ drop ] produce concat f like
+        [ 65536 read-partial dup ]
+        [ ] [ drop ] produce concat f like
     ] with-input-stream ;
+
+: each-block ( quot: ( block -- ) -- )
+    [ 8192 read-partial ] each-morsel ; inline
+
+: stream-copy ( in out -- )
+    [ [ [ write ] each-block ] with-output-stream ]
+    curry with-input-stream ;
\ No newline at end of file
diff --git a/core/io/pathnames/authors.txt b/core/io/pathnames/authors.txt
new file mode 100644 (file)
index 0000000..f372b57
--- /dev/null
@@ -0,0 +1,2 @@
+Slava Pestov
+Doug Coleman
diff --git a/core/io/pathnames/pathnames-docs.factor b/core/io/pathnames/pathnames-docs.factor
new file mode 100644 (file)
index 0000000..a4f2613
--- /dev/null
@@ -0,0 +1,85 @@
+USING: help.markup help.syntax io.backend io.files strings ;
+IN: io.pathnames
+
+HELP: path-separator?
+{ $values { "ch" "a code point" } { "?" "a boolean" } }
+{ $description "Tests if the code point is a platform-specific path separator." }
+{ $examples
+    "On Unix:"
+    { $example "USING: io.pathnames prettyprint ;" "CHAR: / path-separator? ." "t" }
+} ;
+
+HELP: parent-directory
+{ $values { "path" "a pathname string" } { "parent" "a pathname string" } }
+{ $description "Strips the last component off a pathname." }
+{ $examples { $example "USING: io io.pathnames ;" "\"/etc/passwd\" parent-directory print" "/etc/" } } ;
+
+HELP: file-name
+{ $values { "path" "a pathname string" } { "string" string } }
+{ $description "Outputs the last component of a pathname string." }
+{ $examples
+    { $example "USING: io.pathnames prettyprint ;" "\"/usr/bin/gcc\" file-name ." "\"gcc\"" }
+    { $example "USING: io.pathnames prettyprint ;" "\"/usr/libexec/awk/\" file-name ." "\"awk\"" }
+} ;
+
+HELP: append-path
+{ $values { "str1" "a string" } { "str2" "a string" } { "str" "a string" } }
+{ $description "Appends " { $snippet "str1" } " and " { $snippet "str2" } " to form a pathname." } ;
+
+HELP: prepend-path
+{ $values { "str1" "a string" } { "str2" "a string" } { "str" "a string" } }
+{ $description "Appends " { $snippet "str2" } " and " { $snippet "str1" } " to form a pathname." } ;
+
+{ append-path prepend-path } related-words
+
+HELP: absolute-path?
+{ $values { "path" "a pathname string" } { "?" "a boolean" } }
+{ $description "Tests if a pathname is absolute. Examples of absolute pathnames are " { $snippet "/foo/bar" } " on Unix and " { $snippet "c:\\foo\\bar" } " on Windows." } ;
+
+HELP: windows-absolute-path?
+{ $values { "path" "a pathname string" } { "?" "a boolean" } }
+{ $description "Tests if a pathname is absolute on Windows. Examples of absolute pathnames on Windows are " { $snippet "c:\\foo\\bar" } " and " { $snippet "\\\\?\\c:\\foo\\bar" } " for absolute Unicode pathnames." } ;
+
+HELP: root-directory?
+{ $values { "path" "a pathname string" } { "?" "a boolean" } }
+{ $description "Tests if a pathname is a root directory. Examples of root directory pathnames are " { $snippet "/" } " on Unix and " { $snippet "c:\\" } " on Windows." } ;
+
+{ absolute-path? windows-absolute-path? root-directory? } related-words
+
+HELP: resource-path
+{ $values { "path" "a pathname string" } { "newpath" "a pathname string" } }
+{ $description "Resolve a path relative to the Factor source code location." } ;
+
+HELP: pathname
+{ $class-description "Class of path name objects. Path name objects can be created by calling " { $link <pathname> } "." } ;
+
+HELP: normalize-path
+{ $values { "str" "a pathname string" } { "newstr" "a new pathname string" } }
+{ $description "Called by words such as " { $link <file-reader> } " and " { $link <file-writer> } " to prepare a pathname before passing it to underlying code." } ;
+
+HELP: <pathname>
+{ $values { "string" "a pathname string" } { "pathname" pathname } }
+{ $description "Creates a new " { $link pathname } "." } ;
+
+HELP: home
+{ $values { "dir" string } }
+{ $description "Outputs the user's home directory." } ;
+
+ARTICLE: "pathname-normalization" "Pathname normalization"
+"Words that take a pathname should normalize the pathname by calling " { $link normalize-path } ".When normalizing a pathname, the input pathname is either absolute or relative to the " { $link current-directory } ". If absolute, such as the root directories " { $snippet "/" } " or " { $snippet "c:\\" } ", the pathname is left alone, while if relative, the current directory is prepended to the pathname. If a pathname begins with the magic string " { $snippet "resource:" } ", this string is replaced with the Factor directory. On Windows, all pathnames, absolute and relative, are converted to Unicode pathamess." ;
+
+ARTICLE: "io.pathnames" "Pathname manipulation"
+{ $subsection "pathname-normalization" }
+"Literal pathnames:"
+{ $subsection POSTPONE: P" }
+"Pathname manipulation:"
+{ $subsection normalize-path }
+{ $subsection parent-directory }
+{ $subsection file-name }
+{ $subsection last-path-separator }
+{ $subsection append-path }
+"Pathname presentations:"
+{ $subsection pathname }
+{ $subsection <pathname> } ;
+
+ABOUT: "io.pathnames"
diff --git a/core/io/pathnames/pathnames-tests.factor b/core/io/pathnames/pathnames-tests.factor
new file mode 100644 (file)
index 0000000..41498fa
--- /dev/null
@@ -0,0 +1,68 @@
+USING: io.pathnames io.files.temp io.directories
+continuations math io.files.private kernel
+namespaces tools.test ;
+IN: io.pathnames.tests
+
+[ "passwd" ] [ "/etc/passwd" file-name ] unit-test
+[ "awk" ] [ "/usr/libexec/awk/" file-name ] unit-test
+[ "awk" ] [ "/usr/libexec/awk///" file-name ] unit-test
+[ "" ] [ "" file-name ] unit-test
+
+[ "freetype6.dll" ] [ "resource:freetype6.dll" file-name ] unit-test
+[ "freetype6.dll" ] [ "resource:/freetype6.dll" file-name ] unit-test
+
+[ "/usr/lib" ] [ "/usr" "lib" append-path ] unit-test
+[ "/usr/lib" ] [ "/usr/" "lib" append-path ] unit-test
+[ "/usr/lib" ] [ "/usr" "./lib" append-path ] unit-test
+[ "/usr/lib/" ] [ "/usr" "./lib/" append-path ] unit-test
+[ "/lib" ] [ "/usr" "../lib" append-path ] unit-test
+[ "/lib/" ] [ "/usr" "../lib/" append-path ] unit-test
+
+[ "" ] [ "" "." append-path ] unit-test
+[ "" ".." append-path ] must-fail
+
+[ "/" ] [ "/" "./." append-path ] unit-test
+[ "/" ] [ "/" "././" append-path ] unit-test
+[ "/a/b/lib" ] [ "/a/b/c/d/e/f/" "../../../../lib" append-path ] unit-test
+[ "/a/b/lib/" ] [ "/a/b/c/d/e/f/" "../../../../lib/" append-path ] unit-test
+
+[ "" "../lib/" append-path ] must-fail
+[ "lib" ] [ "" "lib" append-path ] unit-test
+[ "lib" ] [ "" "./lib" append-path ] unit-test
+
+[ "foo/bar/." parent-directory ] must-fail
+[ "foo/bar/./" parent-directory ] must-fail
+[ "foo/bar/baz/.." parent-directory ] must-fail
+[ "foo/bar/baz/../" parent-directory ] must-fail
+
+[ "." parent-directory ] must-fail
+[ "./" parent-directory ] must-fail
+[ ".." parent-directory ] must-fail
+[ "../" parent-directory ] must-fail
+[ "../../" parent-directory ] must-fail
+[ "foo/.." parent-directory ] must-fail
+[ "foo/../" parent-directory ] must-fail
+[ "" parent-directory ] must-fail
+[ "." ] [ "boot.x86.64.image" parent-directory ] unit-test
+
+[ "bar/foo" ] [ "bar/baz" "..///foo" append-path ] unit-test
+[ "bar/baz/foo" ] [ "bar/baz" ".///foo" append-path ] unit-test
+[ "bar/foo" ] [ "bar/baz" "./..//foo" append-path ] unit-test
+[ "bar/foo" ] [ "bar/baz" "./../././././././///foo" append-path ] unit-test
+
+[ t ] [ "resource:core" absolute-path? ] unit-test
+[ f ] [ "" absolute-path? ] unit-test
+
+[ "touch-twice-test" temp-file delete-file ] ignore-errors
+[ ] [ 2 [ "touch-twice-test" temp-file touch-file ] times ] unit-test
+
+! aum's bug
+[
+    "." current-directory set
+    ".." "resource-path" set
+    [ "../core/bootstrap/stage2.factor" ]
+    [ "resource:core/bootstrap/stage2.factor" (normalize-path) ]
+    unit-test
+] with-scope
+
+[ t ] [ cwd "misc" resource-path [ ] with-directory cwd = ] unit-test
diff --git a/core/io/pathnames/pathnames.factor b/core/io/pathnames/pathnames.factor
new file mode 100644 (file)
index 0000000..e81d8c2
--- /dev/null
@@ -0,0 +1,143 @@
+! Copyright (C) 2004, 2008 Slava Pestov, Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors combinators io.backend kernel math math.order
+namespaces sequences splitting strings system ;
+IN: io.pathnames
+
+SYMBOL: current-directory
+
+: path-separator? ( ch -- ? ) os windows? "/\\" "/" ? member? ;
+
+: path-separator ( -- string ) os windows? "\\" "/" ? ;
+
+: trim-right-separators ( str -- newstr )
+    [ path-separator? ] trim-right ;
+
+: trim-left-separators ( str -- newstr )
+    [ path-separator? ] trim-left ;
+
+: last-path-separator ( path -- n ? )
+    [ length 1- ] keep [ path-separator? ] find-last-from ;
+
+HOOK: root-directory? io-backend ( path -- ? )
+
+M: object root-directory? ( path -- ? )
+    [ f ] [ [ path-separator? ] all? ] if-empty ;
+
+ERROR: no-parent-directory path ;
+
+: parent-directory ( path -- parent )
+    dup root-directory? [
+        trim-right-separators
+        dup last-path-separator [
+            1+ cut
+        ] [
+            drop "." swap
+        ] if
+        { "" "." ".." } member? [
+            no-parent-directory
+        ] when
+    ] unless ;
+
+<PRIVATE
+
+: head-path-separator? ( path1 ? -- ?' )
+    [
+        [ t ] [ first path-separator? ] if-empty
+    ] [
+        drop f
+    ] if ;
+
+: head.? ( path -- ? ) "." ?head head-path-separator? ;
+
+: head..? ( path -- ? ) ".." ?head head-path-separator? ;
+
+: append-path-empty ( path1 path2 -- path' )
+    {
+        { [ dup head.? ] [
+            rest trim-left-separators append-path-empty
+        ] }
+        { [ dup head..? ] [ drop no-parent-directory ] }
+        [ nip ]
+    } cond ;
+
+PRIVATE>
+
+: windows-absolute-path? ( path -- path ? )
+    {
+        { [ dup "\\\\?\\" head? ] [ t ] }
+        { [ dup length 2 < ] [ f ] }
+        { [ dup second CHAR: : = ] [ t ] }
+        [ f ]
+    } cond ;
+
+: absolute-path? ( path -- ? )
+    {
+        { [ dup empty? ] [ f ] }
+        { [ dup "resource:" head? ] [ t ] }
+        { [ os windows? ] [ windows-absolute-path? ] }
+        { [ dup first path-separator? ] [ t ] }
+        [ f ]
+    } cond nip ;
+
+: append-path ( str1 str2 -- str )
+    {
+        { [ over empty? ] [ append-path-empty ] }
+        { [ dup empty? ] [ drop ] }
+        { [ over trim-right-separators "." = ] [ nip ] }
+        { [ dup absolute-path? ] [ nip ] }
+        { [ dup head.? ] [ rest trim-left-separators append-path ] }
+        { [ dup head..? ] [
+            2 tail trim-left-separators
+            [ parent-directory ] dip append-path
+        ] }
+        { [ over absolute-path? over first path-separator? and ] [
+            [ 2 head ] dip append
+        ] }
+        [
+            [ trim-right-separators "/" ] dip
+            trim-left-separators 3append
+        ]
+    } cond ;
+
+: prepend-path ( str1 str2 -- str )
+    swap append-path ; inline
+
+: file-name ( path -- string )
+    dup root-directory? [
+        trim-right-separators
+        dup last-path-separator [ 1+ tail ] [
+            drop "resource:" ?head [ file-name ] when
+        ] if
+    ] unless ;
+
+: file-extension ( filename -- extension )
+    "." split1-last nip ;
+
+: resource-path ( path -- newpath )
+    "resource-path" get prepend-path ;
+
+GENERIC: (normalize-path) ( path -- path' )
+
+M: string (normalize-path)
+    "resource:" ?head [
+        trim-left-separators resource-path
+        (normalize-path)
+    ] [
+        current-directory get prepend-path
+    ] if ;
+
+M: object normalize-path ( path -- path' )
+    (normalize-path) ;
+
+TUPLE: pathname string ;
+
+C: <pathname> pathname
+
+M: pathname (normalize-path) string>> (normalize-path) ;
+
+M: pathname <=> [ string>> ] compare ;
+
+HOOK: home io-backend ( -- dir )
+
+M: object home "" resource-path ;
\ No newline at end of file
diff --git a/core/io/pathnames/summary.txt b/core/io/pathnames/summary.txt
new file mode 100644 (file)
index 0000000..de19eed
--- /dev/null
@@ -0,0 +1 @@
+Pathname manipulation
index a579153353a1032f60d917bbf6276a3450957b3b..41cc878c7977ba88be9c4fde352ecb7e3d3229d2 100644 (file)
@@ -20,13 +20,13 @@ ARTICLE: "io.streams.c" "ANSI C streams"
 
 ABOUT: "io.streams.c"
 
-HELP: <c-reader> ( in -- stream )
-{ $values { "in" "a C FILE* handle" } { "stream" "a new stream" } }
+HELP: <c-reader>
+{ $values { "handle" "a C FILE* handle" } { "stream" "a new stream" } }
 { $description "Creates a stream which reads data by calling C standard library functions." }
 { $notes "Usually C streams are only used during bootstrap, and non-blocking OS-specific I/O routines are used during normal operation." } ;
 
-HELP: <c-writer> ( out -- stream )
-{ $values { "out" "a C FILE* handle" } { "stream" "a new stream" } }
+HELP: <c-writer>
+{ $values { "handle" "a C FILE* handle" } { "stream" "a new stream" } }
 { $description "Creates a stream which writes data by calling C standard library functions." }
 { $notes "Usually C streams are only used during bootstrap, and non-blocking OS-specific I/O routines are used during normal operation." } ;
 
index 4a3d94a1722f47ef3dfb8af5da4bbbf38f4d7146..3dde9152d08eeb55624c951673debdc475e1c79d 100644 (file)
@@ -1,4 +1,4 @@
-USING: tools.test io.files io io.streams.c
+USING: tools.test io.files io.files.temp io io.streams.c
 io.encodings.ascii strings ;
 IN: io.streams.c.tests
 
index 71c9ffd7d9a4e097d147bb2fadc1c35775cf9854..a93602533d8dbbc3f81f7ee4e6880def86b3a277 100755 (executable)
@@ -65,7 +65,7 @@ M: c-io-backend init-io ;
     stdout-handle <c-writer>
     stderr-handle <c-writer> ;
 
-M: c-io-backend (init-stdio) init-c-stdio ;
+M: c-io-backend (init-stdio) init-c-stdio ;
 
 M: c-io-backend io-multiplex 60 60 * 1000 * 1000 * or (sleep) ;
 
diff --git a/core/io/streams/nested/authors.txt b/core/io/streams/nested/authors.txt
deleted file mode 100644 (file)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/core/io/streams/nested/nested-docs.factor b/core/io/streams/nested/nested-docs.factor
deleted file mode 100644 (file)
index e7e18e3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-USING: io io.streams.nested help.markup help.syntax ;
-
diff --git a/core/io/streams/nested/nested.factor b/core/io/streams/nested/nested.factor
deleted file mode 100644 (file)
index a155f84..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-! Copyright (C) 2006, 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: arrays generic assocs kernel namespaces strings
-quotations io continuations destructors accessors sequences ;
-IN: io.streams.nested
-
-TUPLE: filter-writer stream ;
-
-M: filter-writer stream-format
-    stream>> stream-format ;
-
-M: filter-writer stream-write
-    stream>> stream-write ;
-
-M: filter-writer stream-write1
-    stream>> stream-write1 ;
-
-M: filter-writer make-span-stream
-    stream>> make-span-stream ;
-
-M: filter-writer make-block-stream
-    stream>> make-block-stream ;
-
-M: filter-writer make-cell-stream
-    stream>> make-cell-stream ;
-
-M: filter-writer stream-flush
-    stream>> stream-flush ;
-
-M: filter-writer stream-nl
-    stream>> stream-nl ;
-
-M: filter-writer stream-write-table
-    stream>> stream-write-table ;
-
-M: filter-writer dispose
-    stream>> dispose ;
-
-TUPLE: ignore-close-stream < filter-writer ;
-
-M: ignore-close-stream dispose drop ;
-
-C: <ignore-close-stream> ignore-close-stream
-
-TUPLE: style-stream < filter-writer style ;
-
-: do-nested-style ( style style-stream -- style stream )
-    [ style>> swap assoc-union ] [ stream>> ] bi ; inline
-
-C: <style-stream> style-stream
-
-M: style-stream stream-format
-    do-nested-style stream-format ;
-
-M: style-stream stream-write
-    [ style>> ] [ stream>> ] bi stream-format ;
-
-M: style-stream stream-write1
-    [ 1string ] dip stream-write ;
-
-M: style-stream make-span-stream
-    do-nested-style make-span-stream ;
-
-M: style-stream make-block-stream
-    [ do-nested-style make-block-stream ] [ style>> ] bi
-    <style-stream> ;
-
-M: style-stream make-cell-stream
-    [ do-nested-style make-cell-stream ] [ style>> ] bi
-    <style-stream> ;
-
-M: style-stream stream-write-table
-    [ [ [ stream>> ] map ] map ] [ ] [ stream>> ] tri*
-    stream-write-table ;
diff --git a/core/io/streams/nested/summary.txt b/core/io/streams/nested/summary.txt
deleted file mode 100644 (file)
index cf1c662..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Support for with-stream-style implementation
diff --git a/core/io/streams/null/authors.txt b/core/io/streams/null/authors.txt
new file mode 100755 (executable)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/core/io/streams/null/null-docs.factor b/core/io/streams/null/null-docs.factor
new file mode 100644 (file)
index 0000000..19bf825
--- /dev/null
@@ -0,0 +1,28 @@
+USING: io help.markup help.syntax quotations ;
+IN: io.streams.null
+
+HELP: null-reader
+{ $class-description "Singleton class of null reader streams." } ;
+
+HELP: null-writer
+{ $class-description "Singleton class of null writer streams." } ;
+
+HELP: with-null-reader
+{ $values { "quot" quotation } }
+{ $description "Calls the quotation with " { $link input-stream } " rebound to a " { $link null-reader } " which always produces EOF." } ;
+
+HELP: with-null-writer
+{ $values { "quot" quotation } }
+{ $description "Calls the quotation with " { $link output-stream } " rebound to a " { $link null-writer } " which ignores all output." } ;
+
+ARTICLE: "io.streams.null" "Null streams"
+"The " { $vocab-link "io.streams.null" } " vocabulary implements a pair of streams which are useful for testing. The null reader always yields EOF and the null writer ignores all output. Conceptually, they are similar to " { $snippet "/dev/null" } " on a Unix system."
+$nl
+"Null readers:"
+{ $subsection null-reader }
+{ $subsection with-null-writer }
+"Null writers:"
+{ $subsection null-writer }
+{ $subsection with-null-reader } ;
+
+ABOUT: "io.streams.null"
\ No newline at end of file
diff --git a/core/io/streams/null/null-tests.factor b/core/io/streams/null/null-tests.factor
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/core/io/streams/null/null.factor b/core/io/streams/null/null.factor
new file mode 100644 (file)
index 0000000..98729c7
--- /dev/null
@@ -0,0 +1,25 @@
+! Copyright (C) 2007, 2009 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel io destructors io.streams.plain ;
+IN: io.streams.null
+
+SINGLETONS: null-reader null-writer ;
+UNION: null-stream null-reader null-writer ;
+INSTANCE: null-writer plain-writer
+
+M: null-stream dispose drop ;
+
+M: null-reader stream-readln drop f ;
+M: null-reader stream-read1 drop f ;
+M: null-reader stream-read-until 2drop f f ;
+M: null-reader stream-read 2drop f ;
+
+M: null-writer stream-write1 2drop ;
+M: null-writer stream-write 2drop ;
+M: null-writer stream-flush drop ;
+
+: with-null-reader ( quot -- )
+    null-reader swap with-input-stream* ; inline
+
+: with-null-writer ( quot -- )
+    null-writer swap with-output-stream* ; inline
index a84e5be4f727d67277d849d3d83a53b4ccd0bee9..4ebdc20216514806a1a027bab83cc8d4bd43ebe0 100644 (file)
@@ -1,15 +1,6 @@
 USING: help.markup help.syntax io ;
 IN: io.streams.plain
 
-ARTICLE: "io.streams.plain" "Plain writer streams"
-"Plain writer streams wrap an underlying stream and provide a default implementation of "
-{ $link stream-nl } ", "
-{ $link stream-format } ", "
-{ $link make-span-stream } ", "
-{ $link make-block-stream } " and "
-{ $link make-cell-stream } "."
-{ $subsection plain-writer } ;
-
 ABOUT: "io.streams.plain"
 
 HELP: plain-writer
index 47bff681cd525537c76875ada31beca11fdbf22a..9cd18adcc6da2cd84fb724444a496605b91edf00 100644 (file)
@@ -1,18 +1,9 @@
-! Copyright (C) 2005, 2007 Slava Pestov.
+! Copyright (C) 2005, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel io io.streams.nested ;
+USING: kernel io ;
 IN: io.streams.plain
 
 MIXIN: plain-writer
 
 M: plain-writer stream-nl
-    CHAR: \n swap stream-write1 ;
-
-M: plain-writer stream-format
-    nip stream-write ;
-
-M: plain-writer make-span-stream
-    swap <style-stream> <ignore-close-stream> ;
-
-M: plain-writer make-block-stream
-    nip <ignore-close-stream> ;
+    CHAR: \n swap stream-write1 ;
\ No newline at end of file
index 57c0cb37e8a25780fa3c6b951ad90ed6ff47fe8b..45824907267522f572800d24df2d5f353f65c5a1 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2003, 2008 Slava Pestov.
+! Copyright (C) 2003, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors io kernel math namespaces sequences sbufs
 strings generic splitting continuations destructors
@@ -17,21 +17,8 @@ SINGLETON: null-encoding
 
 M: null-encoding decode-char drop stream-read1 ;
 
-: format-column ( seq ? -- seq )
-    [
-        [ 0 [ length max ] reduce ] keep
-        swap [ CHAR: \s pad-right ] curry map
-    ] unless ;
-
-: map-last ( seq quot -- seq )
-    [ dup length <reversed> ] dip [ 0 = ] prepose 2map ; inline
-
 PRIVATE>
 
-: format-table ( table -- seq )
-    flip [ format-column ] map-last
-    flip [ " " join ] map ;
-
 M: growable dispose drop ;
 
 M: growable stream-write1 push ;
@@ -78,8 +65,3 @@ M: growable stream-read-partial
     [ <string-reader> ] dip with-input-stream ; inline
 
 INSTANCE: growable plain-writer
-
-M: plain-writer stream-write-table
-    [ drop format-table [ print ] each ] with-output-stream* ;
-
-M: plain-writer make-cell-stream 2drop <string-writer> ;
index 1404491d10e405566d0133f247882492975f2321..d85a51edffa272c769ae912d6fb4bbe3c4ba321d 100644 (file)
@@ -359,6 +359,17 @@ HELP: 2bi*
     }
 } ;
 
+HELP: 2tri*
+{ $values { "u" object } { "v" object } { "w" object } { "x" object } { "y" object } { "z" object } { "p" { $quotation "( u v -- ... )" } } { "q" { $quotation "( w x -- ... )" } } { "r" { $quotation "( y z -- ... )" } } }
+{ $description "Applies " { $snippet "p" } " to " { $snippet "u" } " and " { $snippet "v" } ", then applies " { $snippet "q" } " to " { $snippet "w" } " and " { $snippet "x" } ", and finally applies " { $snippet "r" } " to " { $snippet "y" } " and " { $snippet "z" } "." }
+{ $examples
+    "The following two lines are equivalent:"
+    { $code
+        "[ p ] [ q ] [ r ] 2tri*"
+        "[ [ p ] 2dip q ] 2dip r"
+    }
+} ;
+
 HELP: tri*
 { $values { "x" object } { "y" object } { "z" object } { "p" { $quotation "( x -- ... )" } } { "q" { $quotation "( y -- ... )" } } { "r" { $quotation "( z -- ... )" } } }
 { $description "Applies " { $snippet "p" } " to " { $snippet "x" } ", then applies " { $snippet "q" } " to " { $snippet "y" } ", and finally applies " { $snippet "r" } " to " { $snippet "z" } "." }
@@ -418,6 +429,22 @@ HELP: tri@
     }
 } ;
 
+HELP: 2tri@
+{ $values { "u" object } { "v" object } { "w" object } { "x" object } { "y" object } { "z" object } { "quot" { $quotation "( obj1 obj2 -- ... )" } } }
+{ $description "Applies the quotation to " { $snippet "u" } " and " { $snippet "v" } ", then to " { $snippet "w" } " and " { $snippet "x" } ", and then to " { $snippet "y" } " and " { $snippet "z" } "." }
+{ $examples
+    "The following two lines are equivalent:"
+    { $code
+        "[ p ] 2tri@"
+        "[ [ p ] 2dip p ] 2dip p"
+    }
+    "The following two lines are also equivalent:"
+    { $code
+        "[ p ] 2tri@"
+        "[ p ] [ p ] [ p ] 2tri*"
+    }
+} ;
+
 HELP: if
 { $values { "?" "a generalized boolean" } { "true" quotation } { "false" quotation } }
 { $description "If " { $snippet "cond" } " is " { $link f } ", calls the " { $snippet "false" } " quotation. Otherwise calls the " { $snippet "true" } " quotation."
@@ -595,12 +622,20 @@ HELP: 2dip
 
 HELP: 3dip
 { $values { "x" object } { "y" object } { "z" object } { "quot" quotation } }
-{ $description "Calls " { $snippet "quot" } " with " { $snippet "obj1" } ", " { $snippet "obj2" } " and " { $snippet "obj3" } " hidden on the retain stack." }
+{ $description "Calls " { $snippet "quot" } " with " { $snippet "x" } ", " { $snippet "y" } " and " { $snippet "z" } " hidden on the retain stack." }
 { $notes "The following are equivalent:"
     { $code "[ [ [ foo bar ] dip ] dip ] dip" }
     { $code "[ foo bar ] 3dip" }
 } ;
 
+HELP: 4dip
+{ $values { "w" object } { "x" object } { "y" object } { "z" object } { "quot" quotation } }
+{ $description "Calls " { $snippet "quot" } " with " { $snippet "w" } ", " { $snippet "x" } ", " { $snippet "y" } " and " { $snippet "z" } " hidden on the retain stack." }
+{ $notes "The following are equivalent:"
+    { $code "[ [ [ [ foo bar ] dip ] dip ] dip ] dip" }
+    { $code "[ foo bar ] 4dip" }
+} ;
+
 HELP: while
 { $values { "pred" { $quotation "( -- ? )" } } { "body" "a quotation" } { "tail" "a quotation" } }
 { $description "Calls " { $snippet "body" } " until " { $snippet "pred" } " returns " { $link f } "." } ;
@@ -656,11 +691,10 @@ HELP: assert=
 { $values { "a" object } { "b" object } }
 { $description "Throws an " { $link assert } " error if " { $snippet "a" } " does not equal " { $snippet "b" } "." } ;
 
-
 ARTICLE: "shuffle-words" "Shuffle words"
 "Shuffle words rearrange items at the top of the data stack. They control the flow of data between words that perform actions."
 $nl
-"The " { $link "cleave-combinators" } " and " { $link "spread-combinators" } " are closely related to shuffle words and should be used instead where possible because they can result in clearer code; also, see the advice in " { $link "cookbook-philosophy" } "."
+"The " { $link "cleave-combinators" } ", " { $link "spread-combinators" } " and " { $link "apply-combinators" } " are closely related to shuffle words and should be used instead where possible because they can result in clearer code; also, see the advice in " { $link "cookbook-philosophy" } "."
 $nl
 "Removing stack elements:"
 { $subsection drop }
@@ -735,7 +769,7 @@ $nl
 { $subsection "cleave-shuffle-equivalence" } ;
 
 ARTICLE: "spread-shuffle-equivalence" "Expressing shuffle words with spread combinators"
-"Spread combinators are defined in terms of shuffle words, and mappings from certain shuffle idioms to spread combinators are discussed in the documentation for " { $link bi* } ", " { $link 2bi* } ", and " { $link tri* } "."
+"Spread combinators are defined in terms of shuffle words, and mappings from certain shuffle idioms to spread combinators are discussed in the documentation for " { $link bi* } ", " { $link 2bi* } ", " { $link tri* } ", and " { $link 2tri* } "."
 $nl
 "Certain shuffle words can also be expressed in terms of the spread combinators. Internalizing such identities can help with understanding and writing code using spread combinators:"
 { $code
@@ -775,6 +809,7 @@ $nl
 { $subsection 2bi* }
 "Three quotations:"
 { $subsection tri* }
+{ $subsection 2tri* }
 "Technically, the spread combinators are redundant because they can be simulated using shuffle words and other combinators, and in addition, they do not reduce token counts by much, if at all. However, they can make code more readable by expressing intention and exploiting any inherent symmetry. For example, a piece of code which performs three operations on three related values can be written in one of two ways:"
 { $code
     "! First alternative; uses dip"
@@ -793,6 +828,7 @@ $nl
 { $subsection 2bi@ }
 "Three quotations:"
 { $subsection tri@ }
+{ $subsection 2tri@ }
 "A pair of utility words built from " { $link bi@ } ":"
 { $subsection both? }
 { $subsection either? } ;
@@ -804,6 +840,7 @@ $nl
 { $subsection dip }
 { $subsection 2dip }
 { $subsection 3dip }
+{ $subsection 4dip }
 "The slip combinators invoke a quotation further down on the stack. They are most useful for implementing other combinators:"
 { $subsection slip }
 { $subsection 2slip }
@@ -851,9 +888,9 @@ $nl
 "Here is an array containing the " { $link f } " class:"
 { $example "{ POSTPONE: f } ." "{ POSTPONE: f }" }
 "The " { $link f } " object is an instance of the " { $link f } " class:"
-{ $example "f class ." "POSTPONE: f" }
+{ $example "USE: classes" "f class ." "POSTPONE: f" }
 "The " { $link f } " class is an instance of " { $link word } ":"
-{ $example "\\ f class ." "word" }
+{ $example "USE: classes" "\\ f class ." "word" }
 "On the other hand, " { $link t } " is just a word, and there is no class which it is a unique instance of."
 { $example "t \\ t eq? ." "t" }
 "Many words which search collections confuse the case of no element being present with an element being found equal to " { $link f } ". If this distinction is imporant, there is usually an alternative word which can be used; for example, compare " { $link at } " with " { $link at* } "." ;
@@ -892,7 +929,7 @@ ARTICLE: "conditionals" "Conditionals and logic"
 { $see-also "booleans" "bitwise-arithmetic" both? either? } ;
 
 ARTICLE: "equality" "Equality"
-"There are two distinct notions of ``sameness'' when it comes to objects."
+"There are two distinct notions of â€œsameness†when it comes to objects."
 $nl
 "You can test if two references point to the same object (" { $emphasis "identity comparison" } "). This is rarely used; it is mostly useful with large, mutable objects where the object identity matters but the value is transient:"
 { $subsection eq? }
index 320025b124d9fe91e5298ebf475e4750ae6e86c5..4d725e57f892c3b150a992c63b838d5573d2545b 100644 (file)
@@ -1,7 +1,7 @@
 USING: arrays byte-arrays kernel kernel.private math memory
 namespaces sequences tools.test math.private quotations
 continuations prettyprint io.streams.string debugger assocs
-sequences.private accessors ;
+sequences.private accessors locals.backend grouping ;
 IN: kernel.tests
 
 [ 0 ] [ f size ] unit-test
@@ -17,7 +17,7 @@ IN: kernel.tests
 
 [ ] [ :c ] unit-test
 
-[ { } set-retainstack r> ] [ { "kernel-error" 13 f f } = ] must-fail-with
+[ 3 [ { } set-retainstack ] dip ] [ { "kernel-error" 13 f f } = ] must-fail-with
 
 [ ] [ :c ] unit-test
 
@@ -35,7 +35,7 @@ IN: kernel.tests
 
 [ ] [ [ :c ] with-string-writer drop ] unit-test
 
-: overflow-r 3 >r overflow-r ;
+: overflow-r 3 load-local overflow-r ;
 
 [ overflow-r ] [ { "kernel-error" 14 f f } = ] must-fail-with
 
@@ -163,3 +163,9 @@ IN: kernel.tests
     [ [ 1 2 3 throw [ ] [ ] if 4 ] call ] ignore-errors
     last-frame
 ] unit-test
+
+[ 10 2 3 4 5 ] [ 1 2 3 4 5 [ 10 * ] 4dip ] unit-test
+
+[ 3 -1 5/6 ] [ 1 2 3 4 5 6 [ + ] [ - ] [ / ] 2tri* ] unit-test
+
+[ { 1 2 } { 3 4 } { 5 6 } ] [ 1 2 3 4 5 6 [ 2array ] 2tri@ ] unit-test
\ No newline at end of file
index d4df6fa407deb01166afa4811575391aa03beaae..be1de766504fb150bd65974ad650d441e9b4bbc6 100644 (file)
@@ -1,6 +1,7 @@
 ! Copyright (C) 2004, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel.private slots.private classes.tuple.private ;
+USING: kernel.private slots.private math.private
+classes.tuple.private ;
 IN: kernel
 
 DEFER: dip
@@ -79,6 +80,8 @@ DEFER: if
 
 : 3dip ( x y z quot -- x y z ) -roll 3slip ;
 
+: 4dip ( w x y z quot -- w x y z ) swap [ 3dip ] dip ; inline
+
 ! Keepers
 : keep ( x quot -- x ) over slip ; inline
 
@@ -118,6 +121,9 @@ DEFER: if
 : 2bi* ( w x y z p q -- )
     [ 2dip ] dip call ; inline
 
+: 2tri* ( u v w x y z p q r -- )
+    [ 4dip ] 2dip 2bi* ; inline
+
 ! Appliers
 : bi@ ( x y quot -- )
     dup bi* ; inline
@@ -129,6 +135,9 @@ DEFER: if
 : 2bi@ ( w x y z quot -- )
     dup 2bi* ; inline
 
+: 2tri@ ( u v w y x z quot -- )
+    dup dup 2tri* ; inline
+
 ! Object protocol
 GENERIC: hashcode* ( depth obj -- code )
 
@@ -146,7 +155,6 @@ TUPLE: identity-tuple ;
 
 M: identity-tuple equal? 2drop f ;
 
-USE: math.private
 : = ( obj1 obj2 -- ? )
     2dup eq? [ 2drop t ] [
         2dup both-fixnums? [ 2drop f ] [ equal? ] if
index 9522aa5a0bb37ee515bc48b61846a40ac53931c7..5a32ca2dced334b4bc4696dea7bd015daae4a2f8 100644 (file)
@@ -37,11 +37,11 @@ SYMBOL: type-numbers
 
 : cell-bits ( -- n ) 8 cells ; inline
 
-: bootstrap-cell \ cell get cell or ; inline
+: bootstrap-cell ( -- n ) \ cell get cell or ; inline
 
-: bootstrap-cells bootstrap-cell * ; inline
+: bootstrap-cells ( m -- n ) bootstrap-cell * ; inline
 
-: bootstrap-cell-bits 8 bootstrap-cells ; inline
+: bootstrap-cell-bits ( -- n ) 8 bootstrap-cells ; inline
 
 : first-bignum ( -- n )
     cell-bits (first-bignum) ; inline
index dbdd5b27fea356a65686a597fca1200f7d05caf3..27cc510ea2861f70549961965ab02f4931b41058 100644 (file)
@@ -1,4 +1,5 @@
-USING: kernel math math.constants tools.test sequences ;
+USING: kernel math math.constants tools.test sequences
+grouping ;
 IN: math.floats.tests
 
 [ t ] [ 0.0 float? ] unit-test
index c75040b6bba91f7af47a8707b1b23311d30b2659..26c7e03fba714d112285425863593f099b721df0 100644 (file)
@@ -4,10 +4,10 @@ IN: math.integers
 ARTICLE: "integers" "Integers"
 { $subsection integer }
 "Integers come in two varieties -- fixnums and bignums. Fixnums fit in a machine word and are faster to manipulate; if the result of a fixnum operation is too large to fit in a fixnum, the result is upgraded to a bignum. Here is an example where two fixnums are multiplied yielding a bignum:"
-{ $example "134217728 class ." "fixnum" }
-{ $example "128 class ." "fixnum" }
+{ $example "USE: classes" "134217728 class ." "fixnum" }
+{ $example "USE: classes" "128 class ." "fixnum" }
 { $example "134217728 128 * ." "17179869184" }
-{ $example "134217728 128 * class ." "bignum" }
+{ $example "USE: classes" "1 128 shift class ." "bignum" }
 "Integers can be entered using a different base; see " { $link "syntax-numbers" } "."
 $nl
 "Integers can be tested for, and real numbers can be converted to integers:"
index 3c2b7f67e2eecc618bdf01b3b77e5bc740f83fed..7d0666328fd7a7eeceaf46b8a9d0c64d0c054cb4 100644 (file)
@@ -1,5 +1,5 @@
 USING: help.markup help.syntax kernel sequences quotations
-math.private ;
+math.private byte-arrays io.binary ;
 IN: math
 
 HELP: number=
@@ -143,7 +143,7 @@ HELP: bitxor
 
 HELP: shift
 { $values { "x" integer } { "n" integer } { "y" integer } }
-{ $description "Shifts " { $snippet "x" } " to the left by " { $snippet "n" } " bits if " { $snippet "n" } " is positive, or " { $snippet "-n" } " bits to the right if " { $snippet "n" } " is negative. A left shift of a fixnum may overflow, yielding a bignum. A right shift may result in bits ``falling off'' the right hand side and being discarded." }
+{ $description "Shifts " { $snippet "x" } " to the left by " { $snippet "n" } " bits if " { $snippet "n" } " is positive, or " { $snippet "-n" } " bits to the right if " { $snippet "n" } " is negative. A left shift of a fixnum may overflow, yielding a bignum. A right shift may result in bits â€œfalling off†the right hand side and being discarded." }
 { $examples { $example "USING: math prettyprint ;" "BIN: 101 5 shift .b" "10100000" } { $example "USING: math prettyprint ;" "BIN: 11111 -2 shift .b" "111" } } ;
 
 HELP: bitnot
@@ -180,6 +180,7 @@ HELP: 1-
 } ;
 
 HELP: ?1+
+{ $values { "x" { $maybe number } } { "y" number } }
 { $description "If the input is not " { $link f } ", adds one. Otherwise, outputs a " { $snippet "0" } "." } ;
 
 HELP: sq
@@ -305,6 +306,10 @@ HELP: find-last-integer
 { $description "Applies the quotation to each integer from " { $snippet "n" } " down to 0, inclusive. Iteration stops when the quotation outputs a true value or 0 is reached. If the quotation yields a true value for some integer, the word outputs that integer. Otherwise, the word outputs " { $link f } "." }
 { $notes "This word is used to implement " { $link find-last } "." } ;
 
+HELP: byte-array>bignum
+{ $values { "byte-array" byte-array } { "n" integer } }
+{ $description "Converts a byte-array, interpreted as little-endian, into a bignum integer. User code should call " { $link >le } " or " { $link >be } " instead." } ;
+
 ARTICLE: "division-by-zero" "Division by zero"
 "Floating point division never raises an error if the denominator is zero. This means that if at least one of the two inputs to " { $link / } ", " { $link /f } " or " { $link mod } " is a float, the result will be a floating point infinity or not a number value."
 $nl
@@ -316,8 +321,8 @@ ARTICLE: "number-protocol" "Number protocol"
 "Math operations obey certain numerical upgrade rules. If one of the inputs is a bignum and the other is a fixnum, the latter is first coerced to a bignum; if one of the inputs is a float, the other is coerced to a float."
 $nl
 "Two examples where you should note the types of the inputs and outputs:"
-{ $example "3 >fixnum 6 >bignum * class ." "bignum" }
-{ $example "1/2 2.0 + ." "4.5" }
+{ $example "USE: classes" "3 >fixnum 6 >bignum * class ." "bignum" }
+{ $example "1/2 2.0 + ." "2.5" }
 "The following usual operations are supported by all numbers."
 { $subsection + }
 { $subsection - }
old mode 100644 (file)
new mode 100755 (executable)
index 2434bf8..412fd32
@@ -64,7 +64,7 @@ PRIVATE>
 : recip ( x -- y ) 1 swap / ; inline
 : sgn ( x -- n ) dup 0 < [ drop -1 ] [ 0 > 1 0 ? ] if ; inline
 
-: ?1+ [ 1+ ] [ 0 ] if* ; inline
+: ?1+ ( x -- y ) [ 1+ ] [ 0 ] if* ; inline
 
 : rem ( x y -- z ) abs tuck mod over + swap mod ; foldable
 
@@ -114,15 +114,15 @@ M: float fp-infinity? ( float -- ? )
 
 <PRIVATE
 
-: iterate-prep 0 -rot ; inline
+: iterate-prep ( n quot -- i n quot ) [ 0 ] 2dip ; inline
 
-: if-iterate? [ 2over < ] 2dip if ; inline
+: if-iterate? ( i n true false -- ) [ 2over < ] 2dip if ; inline
 
 : iterate-step ( i n quot -- i n quot )
     #! Apply quot to i, keep i and quot, hide n.
     swap [ 2dup 2slip ] dip swap ; inline
 
-: iterate-next [ 1+ ] 2dip ; inline
+: iterate-next ( i n quot -- i' n quot ) [ 1+ ] 2dip ; inline
 
 PRIVATE>
 
index c8d3095ce651abba62209671e83fe8346b4364f2..1bdd1009e9c77c7b03504554de13b22973285ac6 100644 (file)
@@ -1,5 +1,5 @@
 USING: help.markup help.syntax kernel math quotations
-math.private words ;
+math.private words words.symbol ;
 IN: math.order
 
 HELP: <=>
@@ -15,6 +15,12 @@ HELP: <=>
     }
 } ;
 
+HELP: >=<
+{ $values { "obj1" object } { "obj2" object } { ">=<" "an ordering specifier" } }
+{ $description "Compares two objects using the " { $link <=> } " comparator and inverts the output." } ;
+
+{ <=> >=< } related-words
+
 HELP: +lt+
 { $description "Output by " { $link <=> } " when the first object is strictly less than the second object." } ;
 
@@ -85,6 +91,7 @@ ARTICLE: "order-specifiers" "Ordering specifiers"
 ARTICLE: "math.order" "Linear order protocol"
 "Some classes have an intrinsic order amongst instances:"
 { $subsection <=> }
+{ $subsection >=< }
 { $subsection compare }
 { $subsection invert-comparison }
 "The above words output order specifiers."
index aae5841185d56e8aa4f04f6cb3903d530fb993c3..a06209bf63cf983ea42e94de6d5b7d38a40d0e30 100644 (file)
@@ -13,6 +13,8 @@ SYMBOL: +gt+
 
 GENERIC: <=> ( obj1 obj2 -- <=> )
 
+: >=< ( obj1 obj2 -- >=< ) <=> invert-comparison ; inline
+
 M: real <=> 2dup < [ 2drop +lt+ ] [ number= +eq+ +gt+ ? ] if ;
 
 GENERIC: before? ( obj1 obj2 -- ? )
index bfe26823beb30a22655a094b7ab97389971247fe..eb2968ece7d9dc6bf6bad8632bf649557a9a929b 100644 (file)
@@ -3,7 +3,7 @@ quotations math ;
 IN: memory
 
 HELP: begin-scan ( -- )
-{ $description "Moves all objects to tenured space, disables the garbage collector, and resets the heap scan pointer to point at the first object in the heap. The " { $link next-object } " word can then be called to advance the heap scan pointer and return successive objects."
+{ $description "Disables the garbage collector and resets the heap scan pointer to point at the first object in the heap. The " { $link next-object } " word can then be called to advance the heap scan pointer and return successive objects."
 $nl
 "This word must always be paired with a call to " { $link end-scan } "." }
 { $notes "This is a low-level facility and can be dangerous. Use the " { $link each-object } " combinator instead." } ;
index b67f7c94e838e8f16ef13ed24fe09bea7868865e..4b873ef6ec7189add14012c46a7de2f55c929990 100644 (file)
@@ -9,7 +9,7 @@ IN: memory
     ] [ 2drop ] if ; inline recursive
 
 : each-object ( quot -- )
-    begin-scan [ (each-object) ] [ end-scan ] [ ] cleanup ; inline
+    gc begin-scan [ (each-object) ] [ end-scan ] [ ] cleanup ; inline
 
 : count-instances ( quot -- n )
     0 swap [ 1 0 ? + ] compose each-object ; inline
index 4716a8fe999190488c5c70a4bf86be63295bb023..1cc3d86e9866a9e2f5501f5191780b366abdd3a4 100644 (file)
@@ -34,7 +34,7 @@ ARTICLE: "namespaces.private" "Namespace implementation details"
 ARTICLE: "namespaces" "Variables and namespaces"
 "The " { $vocab-link "namespaces" } " vocabulary implements simple dynamically-scoped variables."
 $nl
-"A variable is an entry in an assoc of bindings, where the assoc is implicit rather than passed on the stack. These assocs are termed " { $emphasis "namespaces" } ". Nesting of scopes is implemented with a search order on namespaces, defined by a " { $emphasis "namestack" } ". Since namespaces are just assoc, any object can be used as a variable, however by convention, variables are keyed by symbols (see " { $link "symbols" } ")."
+"A variable is an entry in an assoc of bindings, where the assoc is implicit rather than passed on the stack. These assocs are termed " { $emphasis "namespaces" } ". Nesting of scopes is implemented with a search order on namespaces, defined by a " { $emphasis "namestack" } ". Since namespaces are just assoc, any object can be used as a variable, however by convention, variables are keyed by symbols (see " { $link "words.symbol" } ")."
 $nl
 "The " { $link get } " and " { $link set } " words read and write variable values. The " { $link get } " word searches up the chain of nested namespaces, while " { $link set } " always sets variable values in the current namespace only. Namespaces are dynamically scoped; when a quotation is called from a nested scope, any words called by the quotation also execute in that scope."
 { $subsection get }
index 92e5922802bbab824b4691a228d27f1792282303..23bc41a1bb30f2b320d00be0877ee5760ca3938d 100644 (file)
@@ -1,78 +1,10 @@
 USING: help.markup help.syntax kernel sequences words
 math strings vectors quotations generic effects classes
 vocabs.loader definitions io vocabs source-files
-quotations namespaces compiler.units assocs lexer ;
+quotations namespaces compiler.units assocs lexer
+words.symbol words.alias words.constant vocabs.parser ;
 IN: parser
 
-ARTICLE: "vocabulary-search-shadow" "Shadowing word names"
-"If adding a vocabulary to the search path results in a word in another vocabulary becoming inaccessible due to the new vocabulary defining a word with the same name, we say that the old word has been " { $emphasis "shadowed" } "."
-$nl
-"Here is an example where shadowing occurs:"
-{ $code
-    "IN: foe"
-    "USING: sequences io ;"
-    ""
-    ": append"
-    "    \"foe::append calls sequences:append\" print  append ;"
-    ""
-    "IN: fee"
-    ""
-    ": append"
-    "    \"fee::append calls fee:append\" print  append ;"
-    ""
-    "IN: fox"
-    "USE: foe"
-    ""
-    ": append"
-    "    \"fox::append calls foe:append\" print  append ;"
-    ""
-    "\"1234\" \"5678\" append print"
-    ""
-    "USE: fox"
-    "\"1234\" \"5678\" append print"
-}
-"When placed in a source file and run, the above code produces the following output:"
-{ $code
-    "foe:append calls sequences:append"
-    "12345678"
-    "fee:append calls foe:append"
-    "foe:append calls sequences:append"
-    "12345678"
-}
-"The " { $vocab-link "qualified" } " vocabulary contains some tools for helping with shadowing." ;
-
-ARTICLE: "vocabulary-search-errors"  "Word lookup errors"
-"If the parser cannot not find a word in the current vocabulary search path, it attempts to look for the word in all loaded vocabularies."
-$nl
-"If " { $link auto-use? } " mode is off, a restartable error is thrown with a restart for each vocabulary in question, together with a restart which defers the word in the current vocabulary, as if " { $link POSTPONE: DEFER: } " was used."
-$nl
-"If " { $link auto-use? } " mode is on and only one vocabulary has a word with this name, the vocabulary is added to the search path and parsing continues."
-$nl
-"If any restarts were invoked, or if " { $link auto-use? } " is on, the parser will print the correct " { $link POSTPONE: USING: } " after parsing completes. This form can be copy and pasted back into the source file."
-{ $subsection auto-use? } ;
-
-ARTICLE: "vocabulary-search" "Vocabulary search path"
-"When the parser reads a token, it attempts to look up a word named by that token. The lookup is performed by searching each vocabulary in the search path, in order."
-$nl
-"For a source file the vocabulary search path starts off with one vocabulary:"
-{ $code "syntax" }
-"The " { $vocab-link "syntax" } " vocabulary consists of a set of parsing words for reading Factor data and defining new words."
-$nl
-"In the listener, the " { $vocab-link "scratchpad" } " is the default vocabulary for new word definitions. However, when loading source files, there is no default vocabulary. Defining words before declaring a vocabulary with " { $link POSTPONE: IN: } " results in an error."
-$nl
-"At the interactive listener, the default search path contains many more vocabularies. Details on the default search path and parser invocation are found in " { $link "parser" } "."
-$nl
-"Three parsing words deal with the vocabulary search path:"
-{ $subsection POSTPONE: USE: }
-{ $subsection POSTPONE: USING: }
-{ $subsection POSTPONE: IN: }
-"Private words can be defined; note that this is just a convention and they can be called from other vocabularies anyway:"
-{ $subsection POSTPONE: <PRIVATE }
-{ $subsection POSTPONE: PRIVATE> }
-{ $subsection "vocabulary-search-errors" }
-{ $subsection "vocabulary-search-shadow" }
-{ $see-also "words" "qualified" } ;
-
 ARTICLE: "reading-ahead" "Reading ahead"
 "Parsing words can consume input:"
 { $subsection scan }
@@ -102,13 +34,14 @@ ARTICLE: "defining-words" "Defining words"
 { $see POSTPONE: SYMBOL: }
 "The key factor in the definition of " { $link POSTPONE: SYMBOL: } " is " { $link CREATE } ", which reads a token from the input and creates a word with that name. This word is then passed to " { $link define-symbol } "."
 { $subsection CREATE }
+{ $subsection CREATE-WORD }
 "Colon definitions are defined in a more elaborate way:"
 { $subsection POSTPONE: : }
 "The " { $link POSTPONE: : } " word first calls " { $link CREATE } ", and then reads input until reaching " { $link POSTPONE: ; } " using a utility word:"
 { $subsection parse-definition }
 "The " { $link POSTPONE: ; } " word is just a delimiter; an unpaired occurrence throws a parse error:"
 { $see POSTPONE: ; }
-"There are additional parsing words whose syntax is delimited by  " { $link POSTPONE: ; } ", and they are all implemented by calling " { $link parse-definition } "." ;
+"There are additional parsing words whose syntax is delimited by " { $link POSTPONE: ; } ", and they are all implemented by calling " { $link parse-definition } "." ;
 
 ARTICLE: "parsing-tokens" "Parsing raw tokens"
 "So far we have seen how to read individual tokens, or read a sequence of parsed objects until a delimiter. It is also possible to read raw tokens from the input and perform custom processing."
index cc97b78eb65a1e98bffa4e05825770ca4f727490..2870be9a4f5a798337b34448c3e644f8ce66fe46 100644 (file)
@@ -1,8 +1,9 @@
 USING: arrays math parser tools.test kernel generic words
-io.streams.string namespaces classes effects source-files
-assocs sequences strings io.files definitions continuations
-sorting classes.tuple compiler.units debugger vocabs
-vocabs.loader accessors eval combinators lexer ;
+io.streams.string namespaces classes effects source-files assocs
+sequences strings io.files io.pathnames definitions
+continuations sorting classes.tuple compiler.units debugger
+vocabs vocabs.loader accessors eval combinators lexer
+vocabs.parser words.symbol ;
 IN: parser.tests
 
 \ run-file must-infer
@@ -485,20 +486,73 @@ must-fail-with
 
 [ t ] [ "staging-problem-test-2" "parser.tests" lookup >boolean ] unit-test
 
-[ "DEFER: blah" eval ] [ error>> error>> no-current-vocab? ] must-fail-with
+[ "DEFER: blahy" eval ] [ error>> error>> no-current-vocab? ] must-fail-with
 
 [
-    "IN: parser.tests : blah ; parsing FORGET: blah" eval
+    "IN: parser.tests : blahy ; parsing FORGET: blahy" eval
 ] [
     error>> staging-violation?
 ] must-fail-with
 
 ! Bogus error message
-DEFER: blah
+DEFER: blahy
 
-[ "IN: parser.tests USE: kernel TUPLE: blah < tuple ; : blah ; TUPLE: blah < tuple ; : blah ;" eval ]
-[ error>> error>> def>> \ blah eq? ] must-fail-with
+[ "IN: parser.tests USE: kernel TUPLE: blahy < tuple ; : blahy ; TUPLE: blahy < tuple ; : blahy ;" eval ]
+[ error>> error>> def>> \ blahy eq? ] must-fail-with
 
 [ ] [ f lexer set f file set "Hello world" note. ] unit-test
 
 [ "CHAR: \\u9999999999999" eval ] must-fail
+
+SYMBOLS: a b c ;
+
+[ a ] [ a ] unit-test
+[ b ] [ b ] unit-test
+[ c ] [ c ] unit-test
+
+DEFER: blah
+
+[ ] [ "IN: parser.tests GENERIC: blah" eval ] unit-test
+[ ] [ "IN: parser.tests SYMBOLS: blah ;" eval ] unit-test
+
+[ f ] [ \ blah generic? ] unit-test
+[ t ] [ \ blah symbol? ] unit-test
+
+DEFER: blah1
+
+[ "IN: parser.tests SINGLETONS: blah1 blah1 blah1 ;" eval ]
+[ error>> error>> def>> \ blah1 eq? ]
+must-fail-with
+
+IN: qualified.tests.foo
+: x 1 ;
+: y 5 ;
+IN: qualified.tests.bar
+: x 2 ;
+: y 4 ;
+IN: qualified.tests.baz
+: x 3 ;
+
+QUALIFIED: qualified.tests.foo
+QUALIFIED: qualified.tests.bar
+[ 1 2 3 ] [ qualified.tests.foo:x qualified.tests.bar:x x ] unit-test
+
+QUALIFIED-WITH: qualified.tests.bar p
+[ 2 ] [ p:x ] unit-test
+
+RENAME: x qualified.tests.baz => y
+[ 3 ] [ y ] unit-test
+
+FROM: qualified.tests.baz => x ;
+[ 3 ] [ x ] unit-test
+[ 3 ] [ y ] unit-test
+
+EXCLUDE: qualified.tests.bar => x ;
+[ 3 ] [ x ] unit-test
+[ 4 ] [ y ] unit-test
+
+[ "IN: qualified.tests FROM: qualified.tests => doesnotexist ;" eval ]
+[ error>> no-word-error? ] must-fail-with
+
+[ "IN: qualified.tests RENAME: doesnotexist qualified.tests => blahx" eval ]
+[ error>> no-word-error? ] must-fail-with
index 4586cfe34ec4614f055547815c2f6ca05c6ee073..4be7cfa8912b09e5efb2149459d44e58b8d3a08f 100644 (file)
@@ -1,11 +1,11 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays definitions generic assocs kernel math namespaces
-sequences strings vectors words quotations io
+sequences strings vectors words words.symbol quotations io
 combinators sorting splitting math.parser effects continuations
 io.files io.streams.string vocabs io.encodings.utf8 source-files
 classes hashtables compiler.errors compiler.units accessors sets
-lexer ;
+lexer vocabs.parser ;
 IN: parser
 
 : location ( -- loc )
@@ -29,27 +29,6 @@ t parser-notes set-global
         "Note: " write dup print
     ] when drop ;
 
-SYMBOL: use
-SYMBOL: in
-
-: (use+) ( vocab -- )
-    vocab-words use get push ;
-
-: use+ ( vocab -- )
-    load-vocab (use+) ;
-
-: add-use ( seq -- ) [ use+ ] each ;
-
-: set-use ( seq -- )
-    [ vocab-words ] V{ } map-as sift use set ;
-
-: check-vocab-string ( name -- name )
-    dup string?
-    [ "Vocabulary name must be a string" throw ] unless ;
-
-: set-in ( name -- )
-    check-vocab-string dup in set create-vocab (use+) ;
-
 M: parsing-word stack-effect drop (( parsed -- parsed )) ;
 
 TUPLE: no-current-vocab ;
@@ -69,17 +48,6 @@ TUPLE: no-current-vocab ;
 
 : CREATE-WORD ( -- word ) CREATE dup reset-generic ;
 
-: word-restarts ( name possibilities -- restarts )
-    natural-sort
-    [ [ vocabulary>> "Use the " " vocabulary" surround ] keep ] { } map>assoc
-    swap "Defer word in current vocabulary" swap 2array
-    suffix ;
-
-ERROR: no-word-error name ;
-
-: <no-word-error> ( name possibilities -- error restarts )
-    [ drop \ no-word-error boa ] [ word-restarts ] 2bi ;
-
 SYMBOL: amended-use
 
 SYMBOL: auto-use?
@@ -89,7 +57,7 @@ SYMBOL: auto-use?
         dup vocabulary>>
         [ (use+) ]
         [ amended-use get dup [ push ] [ 2drop ] if ]
-        [ "Added ``" "'' vocabulary to search path" surround note. ]
+        [ "Added \"" "\" vocabulary to search path" surround note. ]
         tri
     ] [ create-in ] if ;
 
@@ -192,6 +160,7 @@ SYMBOL: interactive-vocabs
     "definitions"
     "editors"
     "help"
+    "help.lint"
     "inspector"
     "io"
     "io.files"
@@ -232,7 +201,7 @@ SYMBOL: interactive-vocabs
 SYMBOL: print-use-hook
 
 print-use-hook global [ [ ] or ] change-at
-!
+
 : parse-fresh ( lines -- quot )
     [
         V{ } clone amended-use set
@@ -286,7 +255,7 @@ print-use-hook global [ [ ] or ] change-at
     [
         [
             lines dup parse-fresh
-            tuck finish-parsing
+            [ nip ] [ finish-parsing ] 2bi
             forget-smudged
         ] with-source-file
     ] with-compilation-unit ;
index 1a16d0f92a273cfdc51b5aa87697644a62b1c527..f2629a36c4317b317656eb73d3b84ee00384cc0f 100644 (file)
@@ -14,6 +14,10 @@ $nl
 "Quotations implement the " { $link "sequence-protocol" } ", and existing sequences can be converted into quotations:"
 { $subsection >quotation }
 { $subsection 1quotation }
+"Wrappers:"
+{ $subsection "wrappers" } ;
+
+ARTICLE: "wrappers" "Wrappers"
 "Wrappers are used to push words on the data stack; they evaluate to the object being wrapped:"
 { $subsection wrapper }
 { $subsection literalize }
index 2df11d485874958d20f3acbd412844110f307abc..2c3b41ca4e9dc444c2e3865e118171bd1530c26a 100644 (file)
@@ -7,9 +7,11 @@ IN: quotations
 
 <PRIVATE
 
-: uncurry dup 2 slot swap 3 slot ; inline
+: uncurry ( curry -- obj quot )
+    dup 2 slot swap 3 slot ; inline
 
-: uncompose dup 2 slot swap 3 slot ; inline
+: uncompose ( compose -- quot quot2 )
+    dup 2 slot swap 3 slot ; inline
 
 PRIVATE>
 
index 7354759bb6a834c91ef1ce6fa776777e1a42c526..ea7cf829c461ce7f278c87ead2d2669a9b01fd15 100644 (file)
@@ -191,6 +191,10 @@ HELP: exchange-unsafe
 { $values { "m" "a non-negative integer" } { "n" "a non-negative integer" } { "seq" "a mutable sequence" } }
 { $description "Unsafe variant of " { $link exchange } " that does not perform bounds checks." } ;
 
+HELP: first-unsafe
+{ $values { "seq" sequence } { "first" "the first element" } }
+{ $contract "Unsafe variant of " { $link first } " that does not perform bounds checks." } ;
+
 HELP: first2-unsafe
 { $values { "seq" sequence } { "first" "the first element" } { "second" "the second element" } }
 { $contract "Unsafe variant of " { $link first2 } " that does not perform bounds checks." } ;
@@ -334,6 +338,10 @@ HELP: 2each
 { $values { "seq1" sequence } { "seq2" sequence } { "quot" { $quotation "( elt1 elt2 -- )" } } }
 { $description "Applies the quotation to pairs of elements from " { $snippet "seq1" } " and " { $snippet "seq2" } "." } ;
 
+HELP: 3each
+{ $values { "seq1" sequence } { "seq2" sequence } { "seq3" sequence } { "quot" { $quotation "( elt1 elt2 elt3 -- )" } } }
+{ $description "Applies the quotation to triples of elements from " { $snippet "seq1" } ", " { $snippet "seq2" } " and " { $snippet "seq3" } "." } ;
+
 HELP: 2reduce
 { $values { "seq1" sequence }
           { "seq2" sequence }
@@ -346,10 +354,18 @@ HELP: 2map
 { $values { "seq1" sequence } { "seq2" sequence } { "quot" { $quotation "( elt1 elt2 -- new )" } } { "newseq" "a new sequence" } }
 { $description "Applies the quotation to each pair of elements in turn, yielding new elements which are collected into a new sequence having the same class as " { $snippet "seq1" } "." } ;
 
+HELP: 3map
+{ $values { "seq1" sequence } { "seq2" sequence } { "seq3" sequence } { "quot" { $quotation "( elt1 elt2 elt3 -- new )" } } { "newseq" "a new sequence" } }
+{ $description "Applies the quotation to each triple of elements in turn, yielding new elements which are collected into a new sequence having the same class as " { $snippet "seq1" } "." } ;
+
 HELP: 2map-as
 { $values { "seq1" sequence } { "seq2" sequence } { "quot" { $quotation "( elt1 elt2 -- new )" } } { "exemplar" sequence } { "newseq" "a new sequence" } }
 { $description "Applies the quotation to each pair of elements in turn, yielding new elements which are collected into a new sequence having the same class as " { $snippet "exemplar" } "." } ;
 
+HELP: 3map-as
+{ $values { "seq1" sequence } { "seq2" sequence } { "seq3" sequence } { "quot" { $quotation "( elt1 elt2 elt3 -- new )" } } { "exemplar" sequence } { "newseq" "a new sequence" } }
+{ $description "Applies the quotation to each triple of elements in turn, yielding new elements which are collected into a new sequence having the same class as " { $snippet "exemplar" } "." } ;
+
 HELP: 2all?
 { $values { "seq1" sequence } { "seq2" sequence } { "quot" { $quotation "( elt1 elt2 -- ? )" } } { "?" "a boolean" } }
 { $description "Tests the predicate pairwise against elements of " { $snippet "seq1" } " and " { $snippet "seq2" } "." } ;
@@ -399,18 +415,6 @@ HELP: filter-here
 { $description "Applies the quotation to each element in turn, and removes elements for which the quotation outputs a false value." }
 { $side-effects "seq" } ;
 
-HELP: monotonic?
-{ $values { "seq" sequence } { "quot" { $quotation "( elt elt -- ? )" } } { "?" "a boolean" } }
-{ $description "Applies the relation to successive pairs of elements in the sequence, testing for a truth value. The relation should be a transitive relation, such as a total order or an equality relation." }
-{ $examples
-    "Testing if a sequence is non-decreasing:"
-    { $example "USING: math prettyprint sequences ;" "{ 1 1 2 } [ <= ] monotonic? ." "t" }
-    "Testing if a sequence is decreasing:"
-    { $example "USING: math prettyprint sequences ;" "{ 9 8 6 7 } [ < ] monotonic? ." "f" }
-} ;
-
-{ monotonic? all-eq? all-equal? } related-words
-
 HELP: interleave
 { $values { "seq" sequence } { "between" "a quotation" } { "quot" { $quotation "( elt -- )" } } }
 { $description "Applies " { $snippet "quot" } " to each element in turn, also invoking " { $snippet "between" } " in-between each pair of elements." }
@@ -549,14 +553,6 @@ HELP: pop
 { $side-effects "seq" }
 { $errors "Throws an error if the sequence is empty." } ;
 
-HELP: all-equal?
-{ $values { "seq" sequence } { "?" "a boolean" } }
-{ $description "Tests if all elements in the sequence are equal. Yields true with an empty sequence." } ;
-
-HELP: all-eq?
-{ $values { "seq" sequence } { "?" "a boolean" } }
-{ $description "Tests if all elements in the sequence are the same identical object. Yields true with an empty sequence." } ;
-
 HELP: mismatch
 { $values { "seq1" sequence } { "seq2" sequence } { "i" "an index" } }
 { $description "Compares pairs of elements up to the minimum of the sequences' lengths, outputting the first index where the two sequences have non-equal elements, or " { $link f } " if all tested elements were equal." } ;
@@ -602,7 +598,7 @@ HELP: reverse
 
 { reverse <reversed> reverse-here } related-words
 
-HELP: <reversed> ( seq -- reversed )
+HELP: <reversed>
 { $values { "seq" sequence } { "reversed" "a new sequence" } }
 { $description "Creates an instance of the " { $link reversed } " class." }
 { $see-also "virtual-sequences" } ;
@@ -649,7 +645,7 @@ HELP: <slice>
 HELP: repetition
 { $class-description "A virtual sequence consisting of " { $snippet "elt" } " repeated " { $snippet "len" } " times. Repetitions are created by calling " { $link <repetition> } "." } ;
 
-HELP: <repetition> ( len elt -- repetition )
+HELP: <repetition>
 { $values { "len" "a non-negative integer" } { "elt" object } { "repetition" repetition } }
 { $description "Creates a new " { $link repetition } "." }
 { $examples
@@ -683,12 +679,28 @@ HELP: append
     }
 } ;
 
+HELP: append-as
+{ $values { "seq1" sequence } { "seq2" sequence } { "exemplar" sequence } { "newseq" sequence } }
+{ $description "Outputs a new sequence of the same type as " { $snippet "exemplar" } " consisting of the elements of " { $snippet "seq1" } " followed by " { $snippet "seq2" } "." }
+{ $errors "Throws an error if " { $snippet "seq1" } " or " { $snippet "seq2" } " contain elements not permitted in sequences of the same class as " { $snippet "exemplar" } "." }
+{ $examples 
+    { $example "USING: prettyprint sequences ;"
+        "{ 1 2 } B{ 3 4 } B{ } append-as ."
+        "B{ 1 2 3 4 }"
+    }
+    { $example "USING: prettyprint sequences strings ;"
+        "\"go\" \"ing\" SBUF\" \" append-as ."
+        "SBUF\" going\""
+    }
+} ;
+
+{ append append-as } related-words
+
 HELP: prepend
 { $values { "seq1" sequence } { "seq2" sequence } { "newseq" sequence } }
 { $description "Outputs a new sequence of the same type as " { $snippet "seq2" } " consisting of the elements of " { $snippet "seq2" } " followed by " { $snippet "seq1" } "." }
 { $errors "Throws an error if " { $snippet "seq1" } " contains elements not permitted in sequences of the same class as " { $snippet "seq2" } "." }
-{ $examples 
-    { $example "USING: prettyprint sequences ;"
+{ $examples { $example "USING: prettyprint sequences ;"
         "{ 1 2 } B{ 3 4 } prepend ."
         "B{ 3 4 1 2 }"
     }
@@ -709,6 +721,19 @@ HELP: 3append
     }
 } ;
 
+HELP: 3append-as
+{ $values { "seq1" sequence } { "seq2" sequence } { "seq3" sequence } { "exemplar" sequence } { "newseq" sequence } }
+{ $description "Outputs a new sequence consisting of the elements of " { $snippet "seq1" } ", " { $snippet "seq2" } " and " { $snippet "seq3" } " in turn of the same type as " { $snippet "exemplar" } "." }
+{ $errors "Throws an error if " { $snippet "seq1" } ", " { $snippet "seq2" } ", or " { $snippet "seq3" } " contain elements not permitted in sequences of the same class as " { $snippet "exemplar" } "." }
+{ $examples
+    { $example "USING: prettyprint sequences ;"
+        "\"a\" \"b\" \"c\" SBUF\" \" 3append-as ."
+        "SBUF\" abc\""
+    }
+} ;
+
+{ 3append 3append-as } related-words
+
 HELP: surround
 { $values { "seq1" sequence } { "seq2" sequence } { "seq3" sequence } { "newseq" sequence } }
 { $description "Outputs a new sequence with " { $snippet "seq1" } " inserted between " { $snippet "seq2" } " and " { $snippet "seq3" } "." }
@@ -895,6 +920,16 @@ HELP: produce
     { $unchecked-example "USING: kernel prettyprint random sequences ;" "[ 10 random dup 1 > ] [ ] [ drop ] produce ." "{ 8 2 2 9 }" }
 } ;
 
+HELP: produce-as
+{ $values { "pred" { $quotation "( -- ? )" } } { "quot" { $quotation "( -- obj )" } } { "tail" "a quotation" } { "exemplar" sequence } { "seq" "a sequence" } }
+{ $description "Calls " { $snippet "pred" } " repeatedly. If the predicate yields " { $link f } ", stops, otherwise, calls " { $snippet "quot" } " to yield a value. Values are accumulated and returned in a sequence of type " { $snippet "exemplar" } " at the end." }
+{ $examples
+    "The following example divides a number by two until we reach zero, and accumulates intermediate results:"
+    { $example "USING: kernel math prettyprint sequences ;" "1337 [ dup 0 > ] [ 2/ dup ] [ ] V{ } produce-as nip ." "V{ 668 334 167 83 41 20 10 5 2 1 0 }" }
+    "The " { $snippet "tail" } " quotation is used when the predicate produces more than one output value. In this case, we have to drop this value even if the predicate fails in order for stack inference to calculate a stack effect for the " { $link produce } " call:"
+    { $unchecked-example "USING: kernel prettyprint random sequences ;" "[ 10 random dup 1 > ] [ ] [ drop ] B{ } produce-as ." "B{ 8 2 2 9 }" }
+} ;
+
 HELP: sigma
 { $values { "seq" sequence } { "quot" quotation } { "n" number } }
 { $description "Like map sum, but without creating an intermediate sequence." }
@@ -1061,7 +1096,7 @@ HELP: set-fourth
 
 HELP: replicate
 { $values
-     { "seq" sequence } { "quot" quotation }
+     { "seq" sequence } { "quot" { $quotation "( -- elt )" } }
      { "newseq" sequence } }
 { $description "Calls the quotation for every element of the sequence in order. However, the element is not passed to the quotation -- it is dropped, and the quotation produces an element of its own that is collected into a sequence of the same class as the input sequence." }
 { $examples 
@@ -1108,15 +1143,6 @@ HELP: virtual@
      { "n'" integer } { "seq'" sequence } }
 { $description "Part of the sequence protocol, this word translates the input index " { $snippet "n" } " into an index into the underlying storage returned by " { $link virtual-seq } "." } ;
 
-HELP: 2change-each
-{ $values
-     { "seq1" sequence } { "seq2" sequence } { "quot" quotation } }
-{ $description "Calls the quotation on subsequent pairs of objects from the two input sequences. The resulting computation replaces the element in the first sequence." }
-{ $examples { $example "USING: kernel math sequences prettyprint ;"
-    "{ 10 20 30 } dup { 60 70 80 } [ + ] 2change-each ."
-    "{ 70 90 110 }"
-} } ;
-
 HELP: 2map-reduce
 { $values
      { "seq1" sequence } { "seq2" sequence } { "map-quot" quotation } { "reduce-quot" quotation }
@@ -1267,6 +1293,17 @@ HELP: shorten
     "V{ 1 2 3 }"
 } } ;
 
+HELP: iota
+{ $values { "n" integer } { "iota" iota } }
+{ $description "Creates an immutable virtual sequence containing the integers from 0 to " { $snippet "n-1" } "." }
+{ $examples
+  { $example
+    "USING: math sequences prettyprint ;"
+    "3 iota [ sq ] map ."
+    "{ 0 1 4 }"
+  }
+} ;
+
 ARTICLE: "sequences-unsafe" "Unsafe sequence operations"
 "The " { $link nth-unsafe } " and " { $link set-nth-unsafe } " sequence protocol bypasses bounds checks for increased performance."
 $nl
@@ -1361,8 +1398,10 @@ ARTICLE: "sequences-reshape" "Reshaping sequences"
 
 ARTICLE: "sequences-appending" "Appending sequences"
 { $subsection append }
+{ $subsection append-as }
 { $subsection prepend }
 { $subsection 3append }
+{ $subsection 3append-as }
 { $subsection surround }
 { $subsection glue }
 { $subsection concat }
@@ -1419,24 +1458,30 @@ ARTICLE: "sequences-combinators" "Sequence combinators"
 { $subsection map-index }
 { $subsection accumulate }
 { $subsection produce }
+{ $subsection produce-as }
 "Filtering:"
 { $subsection push-if }
 { $subsection filter }
 "Testing if a sequence contains elements satisfying a predicate:"
 { $subsection contains? }
 { $subsection all? }
-"Testing how elements are related:"
-{ $subsection monotonic? }
-{ $subsection "sequence-2combinators" } ;
+{ $subsection "sequence-2combinators" }
+{ $subsection "sequence-3combinators" } ;
 
 ARTICLE: "sequence-2combinators" "Pair-wise sequence combinators"
-"There is a set of combinators which traverse two sequences pairwise. If one sequence is shorter than the other, than only the prefix having the length of the minimum of the two is examined."
+"There is a set of combinators which traverse two sequences pairwise. If one sequence is shorter than the other, then only the prefix having the length of the minimum of the two is examined."
 { $subsection 2each }
 { $subsection 2reduce }
 { $subsection 2map }
 { $subsection 2map-as }
 { $subsection 2all? } ;
 
+ARTICLE: "sequence-3combinators" "Triple-wise sequence combinators"
+"There is a set of combinators which traverse three sequences triple-wise. If one sequence is shorter than the others, then only the prefix having the length of the minimum of the three is examined."
+{ $subsection 3each }
+{ $subsection 3map }
+{ $subsection 3map-as } ;
+
 ARTICLE: "sequences-tests" "Testing sequences"
 "Testing for an empty sequence:"
 { $subsection empty? }
@@ -1448,10 +1493,7 @@ ARTICLE: "sequences-tests" "Testing sequences"
 "Testing if a sequence contains a subsequence:"
 { $subsection head? }
 { $subsection tail? }
-{ $subsection subseq? }
-"Testing how elements are related:"
-{ $subsection all-eq? }
-{ $subsection all-equal? } ;
+{ $subsection subseq? } ;
 
 ARTICLE: "sequences-search" "Searching sequences"
 "Finding the index of an element:"
index dcca525e2bbf1626ac037a1e2d347778e672adaf..85c4636822ad60414b83d192957f75f6adf8ac13 100644 (file)
@@ -32,8 +32,8 @@ IN: sequences.tests
 [ 4 CHAR: o ]
 [ 3 "hello world" "aeiou" [ member? ] curry find-from ] unit-test
 
-[ f         ] [ 3 [ ]     member? ] unit-test
-[ f         ] [ 3 [ 1 2 ] member? ] unit-test
+[ f ] [ 3 [ ]     member? ] unit-test
+[ f ] [ 3 [ 1 2 ] member? ] unit-test
 [ t ] [ 1 [ 1 2 ] member? ] unit-test
 [ t ] [ 2 [ 1 2 ] member? ] unit-test
 
@@ -55,6 +55,11 @@ IN: sequences.tests
 
 [ [ 3 ] ] [ [ 1 2 3 ] 2 [ swap < ] curry filter ] unit-test
 
+[ V{ 1 2 3 } ] [ V{ 1 4 2 5 3 6 } clone [ [ 4 < ] filter-here ] keep ] unit-test
+[ V{ 4 2 6 } ] [ V{ 1 4 2 5 3 6 } clone [ [ 2 mod 0 = ] filter-here ] keep ] unit-test
+
+[ V{ 3 } ] [ V{ 1 2 3 } clone [ 2 [ swap < ] curry filter-here ] keep ] unit-test
+
 [ "hello world how are you" ]
 [ { "hello" "world" "how" "are" "you" } " " join ]
 unit-test
@@ -68,13 +73,6 @@ unit-test
 [ { { 1 4 } { 2 5 } { 3 6 } } ]
 [ { { 1 2 3 } { 4 5 6 } } flip ] unit-test
 
-[ f ] [ [ { } { } "Hello" ] all-equal? ] unit-test
-[ f ] [ [ { 2 } { } { } ] all-equal? ] unit-test
-[ t ] [ [ ] all-equal? ] unit-test
-[ t ] [ [ 1234 ] all-equal? ] unit-test
-[ f ] [ [ 1.0 1 1 ] all-equal? ] unit-test
-[ t ] [ { 1 2 3 4 } [ < ] monotonic? ] unit-test
-[ f ] [ { 1 2 3 4 } [ > ] monotonic? ] unit-test
 [ [ 2 3 4 ] ] [ [ 1 2 3 ] 1 [ + ] curry map ] unit-test
 
 [ 1 ] [ 0 [ 1 2 ] nth ] unit-test
@@ -261,3 +259,18 @@ M: bogus-hashcode hashcode* 2drop 0 >bignum ;
 
 [ "a,b" ] [ "a" "b" "," glue ] unit-test
 [ "(abc)" ] [ "abc" "(" ")" surround ] unit-test
+
+[ "HELLO" ] [
+    "HELLO" { -1 -1 -1 -1 -1 } { 2 2 2 2 2 2 }
+    [ * 2 + + ] 3map
+] unit-test
+
+{ 3 1 } [ [ 3array ] 3map ] must-infer-as
+
+{ 3 0 } [ [ 3drop ] 3each ] must-infer-as
+
+[ V{ 0 3 } ] [ "A" { "A" "B" "C" "A" "D" } indices ] unit-test
+
+[ "asdf" iota ] must-fail
+[ T{ iota { n 10 } } ] [ 10 iota ] unit-test
+[ 0 ] [ 10 iota first ] unit-test
index 7bb509cb67072e8aabcdef8ea02cbe5537c0eac9..2a5c0c674cc612a6ec2d8ca83dc82d622a8bbbab 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2005, 2008 Slava Pestov, Daniel Ehrenberg.
+! Copyright (C) 2005, 2009 Slava Pestov, Daniel Ehrenberg.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors kernel kernel.private slots.private math
 math.private math.order ;
@@ -101,38 +101,52 @@ M: integer nth-unsafe drop ;
 
 INSTANCE: integer immutable-sequence
 
-: first-unsafe
+PRIVATE>
+
+! In the future, this will replace integer sequences
+TUPLE: iota { n integer read-only } ;
+
+: iota ( n -- iota ) \ iota boa ; inline
+
+<PRIVATE
+
+M: iota length n>> ;
+M: iota nth-unsafe drop ;
+
+INSTANCE: iota immutable-sequence
+
+: first-unsafe ( seq -- first )
     0 swap nth-unsafe ; inline
 
-: first2-unsafe
+: first2-unsafe ( seq -- first second )
     [ first-unsafe ] [ 1 swap nth-unsafe ] bi ; inline
 
-: first3-unsafe
+: first3-unsafe ( seq -- first second third )
     [ first2-unsafe ] [ 2 swap nth-unsafe ] bi ; inline
 
-: first4-unsafe
+: first4-unsafe ( seq -- first second third fourth )
     [ first3-unsafe ] [ 3 swap nth-unsafe ] bi ; inline
 
 : exchange-unsafe ( m n seq -- )
     [ tuck [ nth-unsafe ] 2bi@ ]
     [ tuck [ set-nth-unsafe ] 2bi@ ] 3bi ; inline
 
-: (head) ( seq n -- from to seq ) 0 spin ; inline
+: (head) ( seq n -- from to seq ) [ 0 ] 2dip swap ; inline
 
-: (tail) ( seq n -- from to seq ) over length rot ; inline
+: (tail) ( seq n -- from to seq ) swap [ length ] keep ; inline
 
-: from-end [ dup length ] dip - ; inline
+: from-end ( seq n -- seq n' ) [ dup length ] dip - ; inline
 
-: (2sequence)
-    tuck 1 swap set-nth-unsafe
-    tuck 0 swap set-nth-unsafe ; inline
+: (2sequence) ( obj1 obj2 seq -- seq )
+    [ 1 swap set-nth-unsafe ] keep
+    [ 0 swap set-nth-unsafe ] keep ; inline
 
-: (3sequence)
-    tuck 2 swap set-nth-unsafe
+: (3sequence) ( obj1 obj2 obj3 seq -- seq )
+    [ 2 swap set-nth-unsafe ] keep
     (2sequence) ; inline
 
-: (4sequence)
-    tuck 3 swap set-nth-unsafe
+: (4sequence) ( obj1 obj2 obj3 obj4 seq -- seq )
+    [ 3 swap set-nth-unsafe ] keep
     (3sequence) ; inline
 
 PRIVATE>
@@ -331,7 +345,7 @@ PRIVATE>
 <PRIVATE
 
 : (each) ( seq quot -- n quot' )
-    [ dup length swap [ nth-unsafe ] curry ] dip compose ; inline
+    [ [ length ] keep [ nth-unsafe ] curry ] dip compose ; inline
 
 : (collect) ( quot into -- quot' )
     [ [ keep ] dip set-nth-unsafe ] 2curry ; inline
@@ -346,11 +360,19 @@ PRIVATE>
     [ over ] dip [ nth-unsafe ] 2bi@ ; inline
 
 : (2each) ( seq1 seq2 quot -- n quot' )
-    [ [ min-length ] 2keep ] dip
-    [ [ 2nth-unsafe ] dip call ] 3curry ; inline
+    [
+        [ min-length ] 2keep
+        [ 2nth-unsafe ] 2curry
+    ] dip compose ; inline
 
-: 2map-into ( seq1 seq2 quot into -- newseq )
-    [ (2each) ] dip collect ; inline
+: 3nth-unsafe ( n seq1 seq2 seq3 -- elt1 elt2 elt3 )
+    [ over ] 2dip [ over ] dip [ nth-unsafe ] 2tri@ ; inline
+
+: (3each) ( seq1 seq2 seq3 quot -- n quot' )
+    [
+        [ [ length ] tri@ min min ] 3keep
+        [ 3nth-unsafe ] 3curry
+    ] dip compose ; inline
 
 : finish-find ( i seq -- i elt )
     over [ dupd nth-unsafe ] [ drop f ] if ; inline
@@ -364,10 +386,6 @@ PRIVATE>
     [ 2drop f f ]
     if ; inline
 
-: (monotonic) ( seq quot -- ? )
-    [ 2dup nth-unsafe rot 1+ rot nth-unsafe ]
-    prepose curry ; inline
-
 : (interleave) ( n elt between quot -- )
     roll 0 = [ nip ] [ swapd 2slip ] if call ; inline
 
@@ -407,18 +425,23 @@ PRIVATE>
     [ -rot ] dip 2each ; inline
 
 : 2map-as ( seq1 seq2 quot exemplar -- newseq )
-    [ 2over min-length ] dip
-    [ [ 2map-into ] keep ] new-like ; inline
+    [ (2each) ] dip map-as ; inline
 
 : 2map ( seq1 seq2 quot -- newseq )
     pick 2map-as ; inline
 
-: 2change-each ( seq1 seq2 quot -- )
-    pick 2map-into ; inline
-
 : 2all? ( seq1 seq2 quot -- ? )
     (2each) all-integers? ; inline
 
+: 3each ( seq1 seq2 seq3 quot -- )
+    (3each) each ; inline
+
+: 3map-as ( seq1 seq2 seq3 quot exemplar -- newseq )
+    [ (3each) ] dip map-as ; inline
+
+: 3map ( seq1 seq2 seq3 quot -- newseq )
+    [ pick ] dip swap 3map-as ; inline
+
 : find-from ( n seq quot -- i elt )
     [ (find-integer) ] (find-from) ; inline
 
@@ -452,11 +475,8 @@ PRIVATE>
 : partition ( seq quot -- trueseq falseseq )
     over [ 2pusher [ each ] 2dip ] dip tuck [ like ] 2bi@ ; inline
 
-: monotonic? ( seq quot -- ? )
-    [ dup length 1- swap ] dip (monotonic) all? ; inline
-
 : interleave ( seq between quot -- )
-    [ (interleave) ] 2curry [ dup length swap ] dip 2each ; inline
+    [ (interleave) ] 2curry [ [ length ] keep ] dip 2each ; inline
 
 : accumulator ( quot -- quot' vec )
     V{ } clone [ [ push ] curry compose ] keep ; inline
@@ -494,10 +514,12 @@ PRIVATE>
 : last-index-from ( obj i seq -- n )
     rot [ = ] curry find-last-from drop ;
 
+: (indices) ( elt i obj accum -- )
+    [ swap [ = ] dip ] dip [ push ] 2curry when ; inline
+
 : indices ( obj seq -- indices )
-    V{ } clone spin
-    [ rot = [ over push ] [ drop ] if ]
-    curry each-index ;
+    swap V{ } clone
+    [ [ (indices) ] 2curry each-index ] keep ;
 
 : nths ( indices seq -- seq' )
     [ nth ] curry map ;
@@ -566,7 +588,7 @@ M: slice equal? over slice? [ sequence= ] [ 2drop f ] if ;
 PRIVATE>
 
 : filter-here ( seq quot -- )
-    0 0 roll (filter-here) ; inline
+    swap [ 0 0 ] dip (filter-here) ; inline
 
 : delete ( elt seq -- )
     [ = not ] with filter-here ;
@@ -642,10 +664,6 @@ PRIVATE>
 : pop ( seq -- elt )
     [ length 1- ] [ [ nth ] [ shorten ] 2bi ] bi ;
 
-: all-equal? ( seq -- ? ) [ = ] monotonic? ;
-
-: all-eq? ( seq -- ? ) [ eq? ] monotonic? ;
-
 : exchange ( m n seq -- )
     pick over bounds-check 2drop 2dup bounds-check 2drop
     exchange-unsafe ;
@@ -667,9 +685,7 @@ PRIVATE>
     0 [ length + ] reduce ;
 
 : concat ( seq -- newseq )
-    [
-        { }
-    ] [
+    [ { } ] [
         [ sum-lengths ] keep
         [ first new-resizable ] keep
         [ [ over push-all ] each ] keep
@@ -679,7 +695,7 @@ PRIVATE>
 <PRIVATE
 
 : joined-length ( seq glue -- n )
-    [ dup sum-lengths swap length 1 [-] ] dip length * + ;
+    [ [ sum-lengths ] [ length 1 [-] ] bi ] dip length * + ;
 
 PRIVATE>
 
@@ -707,14 +723,14 @@ PRIVATE>
     2dup shorter? [
         2drop f
     ] [
-        tuck length head-slice sequence=
+        [ nip ] [ length head-slice ] 2bi sequence=
     ] if ;
 
 : tail? ( seq end -- ? )
     2dup shorter? [
         2drop f
     ] [
-        tuck length tail-slice* sequence=
+        [ nip ] [ length tail-slice* ] 2bi sequence=
     ] if ;
 
 : cut-slice ( seq n -- before-slice after-slice )
@@ -828,7 +844,7 @@ PRIVATE>
 
 : supremum ( seq -- n ) dup first [ max ] reduce ;
 
-: sigma ( seq quot -- n ) [ + ] compose 0 swap reduce ; inline
+: sigma ( seq quot -- n ) [ 0 ] 2dip [ rot slip + ] curry each ; inline
 
 : count ( seq quot -- n ) [ 1 0 ? ] compose sigma ; inline
 
index 5f7f4acf7accf00cfdae4ab1bfe5869b6fb6119c..428bf104012c8bf820b6e92412c3d452e4bc3d40 100644 (file)
@@ -13,6 +13,8 @@ $nl
 { $subsection diff }
 { $subsection intersect }
 { $subsection union }
+"Set-theoretic predicates:"
+{ $subsection intersects? }
 { $subsection subset? }
 { $subsection set= }
 "A word used to implement the above:"
@@ -104,9 +106,15 @@ HELP: union
 
 { diff intersect union } related-words
 
+HELP: intersects?
+{ $values { "seq1" sequence } { "seq2" sequence } { "?" "a boolean" } }
+{ $description "Tests if " { $snippet "seq1" } " and " { $snippet "seq2" } " have any elements in common." }
+{ $notes "If one of the sequences is empty, the result is always " { $link f } "." } ;
+
 HELP: subset?
 { $values { "seq1" sequence } { "seq2" sequence } { "?" "a boolean" } }
-{ $description "Tests if every element of " { $snippet "seq1" } " is contained in " { $snippet "seq2" } "." } ;
+{ $description "Tests if every element of " { $snippet "seq1" } " is contained in " { $snippet "seq2" } "." }
+{ $notes "If " { $snippet "seq1" } " is empty, the result is always " { $link t } "." } ;
 
 HELP: set=
 { $values { "seq1" sequence } { "seq2" sequence } { "?" "a boolean" } }
index b6e6443afadae10dac08777f5f1263af2df9c82f..838a0a82b8ae44dbf74b7bd8aba1a76a8ee9ba95 100644 (file)
@@ -21,3 +21,11 @@ IN: sets.tests
 
 [ V{ 1 2 3 } ]
 [ 3 V{ 1 3 2 } clone [ adjoin ] keep ] unit-test
+
+[ t ] [ { 1 2 } { 1 3 } intersects? ] unit-test
+
+[ f ] [ { 4 2 } { 1 3 } intersects? ] unit-test
+
+[ f ] [ { } { 1 } intersects? ] unit-test
+
+[ f ] [ { 1 } { } intersects? ] unit-test
index c411bfcdcdcc4dda1d565f1d9e923cefb5f749dc..3435298f6e293782c03e9d5699c124db03256e5d 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2008 Slava Pestov, Doug Coleman.
+! Copyright (C) 2008, 2009 Slava Pestov, Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: assocs hashtables kernel sequences vectors ;
 IN: sets
@@ -31,17 +31,26 @@ IN: sets
 : all-unique? ( seq -- ? )
     dup length <hashtable> [ (all-unique?) ] curry all? ;
 
+<PRIVATE
+
+: tester ( seq -- quot ) unique [ key? ] curry ; inline
+
+PRIVATE>
+
 : intersect ( seq1 seq2 -- newseq )
-    unique [ key? ] curry filter ;
+    tester filter ;
+
+: intersects? ( seq1 seq2 -- ? )
+    tester contains? ;
 
 : diff ( seq1 seq2 -- newseq )
-    unique [ key? not ] curry filter ;
+    tester [ not ] compose filter ;
 
 : union ( seq1 seq2 -- newseq )
     append prune ;
 
 : subset? ( seq1 seq2 -- ? )
-    unique [ key? ] curry all? ;
+    tester all? ;
 
 : set= ( seq1 seq2 -- ? )
     [ unique ] bi@ = ;
index c9ce33438809c225c0c280e58d1c9495ed6f6a35..bdc5a5ba07adebfd917f4b0b4204376e277a5e86 100644 (file)
@@ -84,10 +84,9 @@ $nl
 { $subsection initial-value } ;
 
 ARTICLE: "slots" "Slots"
-"A " { $emphasis "slot" } " is a component of an object which can store a value."
+"The " { $vocab-link "slots" } " vocabulary contains words for introspecting the slots of an object. A " { $emphasis "slot" } " is a component of an object which can store a value."
 $nl
 { $link "tuples" } " are composed entirely of slots, and instances of " { $link "builtin-classes" } " consist of slots together with intrinsic data."
-"The " { $vocab-link "slots" } " vocabulary contains words for introspecting the slots of an object."
 $nl
 "The " { $snippet "\"slots\"" } " word property of built-in and tuple classes holds an array of " { $emphasis "slot specifiers" } " describing the slot layout of each instance."
 { $subsection slot-spec }
index 438e604e789c433f8d0c9de28139b4ac0f601e7e..f166378d9d20aa3a3a747a4e97272d00c38e5cc6 100644 (file)
@@ -1,9 +1,9 @@
-! Copyright (C) 2005, 2008 Slava Pestov.
+! Copyright (C) 2005, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays byte-arrays kernel kernel.private math namespaces
 make sequences strings words effects generic generic.standard
 classes classes.algebra slots.private combinators accessors
-words sequences.private assocs alien quotations ;
+words sequences.private assocs alien quotations hashtables ;
 IN: slots
 
 TUPLE: slot-spec name offset class initial read-only ;
@@ -22,10 +22,6 @@ PREDICATE: writer < word "writer" word-prop ;
     [ drop define ]
     3bi ;
 
-: create-accessor ( name effect -- word )
-    [ "accessors" create dup ] dip
-    "declared-effect" set-word-prop ;
-
 : reader-quot ( slot-spec -- quot )
     [
         dup offset>> ,
@@ -35,7 +31,8 @@ PREDICATE: writer < word "writer" word-prop ;
     ] [ ] make ;
 
 : reader-word ( name -- word )
-    ">>" append (( object -- value )) create-accessor
+    ">>" append "accessors" create
+    dup (( object -- value )) "declared-effect" set-word-prop
     dup t "reader" set-word-prop ;
 
 : reader-props ( slot-spec -- assoc )
@@ -50,7 +47,8 @@ PREDICATE: writer < word "writer" word-prop ;
     define-typecheck ;
 
 : writer-word ( name -- word )
-    "(>>" ")" surround (( value object -- )) create-accessor
+    "(>>" ")" surround "accessors" create
+    dup (( value object -- )) "declared-effect" set-word-prop
     dup t "writer" set-word-prop ;
 
 ERROR: bad-slot-value value class ;
@@ -88,22 +86,23 @@ ERROR: bad-slot-value value class ;
     ] [ ] make ;
 
 : writer-props ( slot-spec -- assoc )
-    [ "writing" set ] H{ } make-assoc ;
+    "writing" associate ;
 
 : define-writer ( class slot-spec -- )
     [ name>> writer-word ] [ writer-quot ] [ writer-props ] tri
     define-typecheck ;
 
 : setter-word ( name -- word )
-    ">>" prepend (( object value -- object )) create-accessor ;
+    ">>" prepend "accessors" create ;
 
 : define-setter ( name -- )
     dup setter-word dup deferred? [
-        [ \ over , swap writer-word , ] [ ] make define-inline
+        [ \ over , swap writer-word , ] [ ] make
+        (( object value -- object )) define-inline
     ] [ 2drop ] if ;
 
 : changer-word ( name -- word )
-    "change-" prepend (( object quot -- object )) create-accessor ;
+    "change-" prepend "accessors" create ;
 
 : define-changer ( name -- )
     dup changer-word dup deferred? [
@@ -112,7 +111,7 @@ ERROR: bad-slot-value value class ;
             over reader-word 1quotation
             [ dip call ] curry [ dip swap ] curry %
             swap setter-word ,
-        ] [ ] make define-inline
+        ] [ ] make (( object quot -- object )) define-inline
     ] [ 2drop ] if ;
 
 : define-slot-methods ( class slot-spec -- )
index 6ea1485425c3b5aad12229d6656853bdb926abf2..290ca1470cc68f1a1f8bd38e75df59f68876f4e1 100644 (file)
@@ -20,7 +20,8 @@ ABOUT: "sequences-sorting"
 
 HELP: sort
 { $values { "seq" "a sequence" } { "quot" { $quotation "( obj1 obj2 -- <=> )" } } { "sortedseq" "a new sorted sequence" } }
-{ $description "Sorts the elements into a new array." } ;
+{ $description "Sorts the elements into a new array using a stable sort." }
+{ $notes "The algorithm used is the merge sort." } ;
 
 HELP: sort-keys
 { $values { "seq" "an alist" } { "sortedseq" "a new sorted sequence" } }
index 74cbe3b532a109964aaf54bd5a79d85961faf245..0bda4ba9b0be9e4324c69677d6734c4a7c1e3d3e 100644 (file)
@@ -1,5 +1,5 @@
 USING: sorting sequences kernel math math.order random
-tools.test vectors sets vocabs ;
+tools.test vectors sets vocabs grouping ;
 IN: sorting.tests
 
 [ { } ] [ { } natural-sort ] unit-test
index 47399b61767940882bfa83bc17878c441811e669..938bf17cd2f664f79b65bbc9ddc2cb01b34bef87 100644 (file)
@@ -42,15 +42,28 @@ TUPLE: merge
         ] if
     ] if ; inline
 
-: l-elt   [ from1>> ] [ seq>> ] bi nth-unsafe ; inline
-: r-elt   [ from2>> ] [ seq>> ] bi nth-unsafe ; inline
-: l-done? [ from1>> ] [ to1>> ] bi number= ; inline
-: r-done? [ from2>> ] [ to2>> ] bi number= ; inline
-: dump-l  [ [ from1>> ] [ to1>> ] [ seq>> ] tri ] [ accum>> ] bi dump ; inline
-: dump-r  [ [ from2>> ] [ to2>> ] [ seq>> ] tri ] [ accum>> ] bi dump ; inline
-: l-next  [ [ l-elt ] [ [ 1+ ] change-from1 drop ] bi ] [ accum>> ] bi push ; inline
-: r-next  [ [ r-elt ] [ [ 1+ ] change-from2 drop ] bi ] [ accum>> ] bi push ; inline
-: decide  [ [ l-elt ] [ r-elt ] bi ] dip call +gt+ eq? ; inline
+: l-elt ( merge -- elt ) [ from1>> ] [ seq>> ] bi nth-unsafe ; inline
+
+: r-elt ( merge -- elt ) [ from2>> ] [ seq>> ] bi nth-unsafe ; inline
+
+: l-done? ( merge -- ? ) [ from1>> ] [ to1>> ] bi eq? ; inline
+
+: r-done? ( merge -- ? ) [ from2>> ] [ to2>> ] bi eq? ; inline
+
+: dump-l ( merge -- )
+    [ [ from1>> ] [ to1>> ] [ seq>> ] tri ] [ accum>> ] bi dump ; inline
+
+: dump-r ( merge -- )
+    [ [ from2>> ] [ to2>> ] [ seq>> ] tri ] [ accum>> ] bi dump ; inline
+
+: l-next ( merge -- )
+    [ [ l-elt ] [ [ 1+ ] change-from1 drop ] bi ] [ accum>> ] bi push ; inline
+
+: r-next ( merge -- )
+    [ [ r-elt ] [ [ 1+ ] change-from2 drop ] bi ] [ accum>> ] bi push ; inline
+
+: decide ( merge -- ? )
+    [ [ l-elt ] [ r-elt ] bi ] dip call +gt+ eq? ; inline
 
 : (merge) ( merge quot: ( elt1 elt2 -- <=> ) -- )
     over r-done? [ drop dump-l ] [
index 89ffbfd795330370a7ab0e9b9d628823480a8bd8..2c9e2172cca06ea2e31f298d030b73a920b8b4ca 100644 (file)
@@ -1,4 +1,4 @@
-USING: help.markup help.syntax vocabs.loader io.files strings
+USING: help.markup help.syntax vocabs.loader io.pathnames strings
 definitions quotations compiler.units ;
 IN: source-files
 
index 3ae50a9a150fa768b1087a175a9faa368617c20e..7ecc967e9ee35a61c72a1fb9b66d39c91ee2aead 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays definitions generic assocs kernel math namespaces
-sequences strings vectors words quotations io
-combinators sorting splitting math.parser effects continuations
-io.files checksums checksums.crc32 vocabs hashtables graphs
+sequences strings vectors words quotations io io.files
+io.pathnames combinators sorting splitting math.parser effects
+continuations checksums checksums.crc32 vocabs hashtables graphs
 compiler.units io.encodings.utf8 accessors ;
 IN: source-files
 
index 29fee2e5c3c063d0b3cb2d65ae9760fabd2244ef..e31a25b687f981d581afb76cfba310556db64611 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2005, 2008 Slava Pestov.
+! Copyright (C) 2005, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel math make strings arrays vectors sequences
 sets math.order accessors ;
@@ -16,19 +16,23 @@ IN: splitting
 : ?tail-slice ( seq end -- newseq ? )
     2dup tail? [ length head-slice* t ] [ drop f ] if ;
 
+: (split1) ( seq subseq -- start end ? )
+    tuck swap start dup
+    [ swap [ drop ] [ length + ] 2bi t ]
+    [ 2drop f f f ]
+    if ;
+
 : split1 ( seq subseq -- before after )
-    dup pick start dup [
-        [ [ over ] dip head -rot length ] keep + tail
-    ] [
-        2drop f
-    ] if ;
+    [ drop ] [ (split1) ] 2bi
+    [ [ over ] dip [ head ] [ tail ] 2bi* ]
+    [ 2drop f ]
+    if ;
 
 : split1-slice ( seq subseq -- before-slice after-slice )
-    dup pick start dup [
-        [ [ over ] dip head-slice -rot length ] keep + tail-slice
-    ] [
-        2drop f
-    ] if ;
+    [ drop ] [ (split1) ] 2bi
+    [ [ over ] dip [ head-slice ] [ tail-slice ] 2bi* ]
+    [ 2drop f ]
+    if ;
 
 : split1-last ( seq subseq -- before after )
     [ <reversed> ] bi@ split1 [ reverse ] bi@
@@ -48,12 +52,12 @@ IN: splitting
 : split ( seq separators -- pieces ) [ split, ] { } make ;
 
 : string-lines ( str -- seq )
-    dup "\r\n" intersect empty? [
-        1array
-    ] [
+    dup "\r\n" intersects? [
         "\n" split [
             but-last-slice [
                 "\r" ?tail drop "\r" split
             ] map
         ] keep peek "\r" split suffix concat
+    ] [
+        1array
     ] if ;
index 88e47d5309433da87916eeaca3ba25585fdb8de7..3a519e143bc91b0daec4537939950db70a26ef61 100644 (file)
@@ -22,9 +22,8 @@ $nl
 { $subsection 1string }
 "Since strings are sequences, basic string manipulation can be performed using sequence operations (" { $link "sequences" } "). More advanced functionality can be found in other vocabularies, including but not limited to:"
 { $list
-    { { $vocab-link "ascii" } " - traditional ASCII character classes" }
-    { { $vocab-link "unicode.categories" } " - Unicode character classes" }
-    { { $vocab-link "unicode.case" } " - Unicode case conversion" }
+    { { $link "ascii" } " - ASCII algorithms for interoperability with legacy applications" }
+    { { $link "unicode" } " - Unicode algorithms for modern multilingual applications" }
     { { $vocab-link "regexp" } " - regular expressions" }
     { { $vocab-link "peg" } " - parser expression grammars" }
 } ;
index 078785178bc34eb493198b51cfde6979848480a7..810e9051d8637b3a2543fcbab03f6db70148cf60 100644 (file)
@@ -108,7 +108,7 @@ unit-test
             ] times
             .
         ] times
-    ] with-null-stream
+    ] with-null-writer
 ] unit-test
 
 [ t ] [
index 0c3f918fdca03879a8dd65c817b2e94272b0e8a6..7e4c80d4aeb2198681819be450310fbc6609313e 100644 (file)
@@ -7,11 +7,12 @@ IN: strings
 
 <PRIVATE
 
-: string-hashcode 3 slot ; inline
+: string-hashcode ( str -- n ) 3 slot ; inline
 
-: set-string-hashcode 3 set-slot ; inline
+: set-string-hashcode ( n str -- ) 3 set-slot ; inline
 
-: reset-string-hashcode f swap set-string-hashcode ; inline
+: reset-string-hashcode ( str -- )
+    f swap set-string-hashcode ; inline
 
 : rehash-string ( str -- )
     1 over sequence-hashcode swap set-string-hashcode ; inline
index 2b7de36d562b8f0bfdd796e474af463092740305..e08821bddd5a1a4ceec45e194fffde8a0c6ce9e6 100644 (file)
@@ -1,11 +1,11 @@
 USING: generic help.syntax help.markup kernel math parser words
 effects classes generic.standard classes.tuple generic.math
-generic.standard arrays io.files vocabs.loader io sequences
-assocs ;
+generic.standard arrays io.pathnames vocabs.loader io sequences
+assocs words.symbol words.alias words.constant ;
 IN: syntax
 
 ARTICLE: "parser-algorithm" "Parser algorithm"
-"At the most abstract level, Factor syntax consists of whitespace-separated tokens. The parser tokenizes the input on whitespace boundaries.  The parser is case-sensitive and whitespace between tokens is significant, so the following three expressions tokenize differently:"
+"At the most abstract level, Factor syntax consists of whitespace-separated tokens. The parser tokenizes the input on whitespace boundaries. The parser is case-sensitive and whitespace between tokens is significant, so the following three expressions tokenize differently:"
 { $code "2X+\n2 X +\n2 x +" }
 "As the parser reads tokens it makes a distinction between numbers, ordinary words, and parsing words. Tokens are appended to the parse tree, the top level of which is a quotation returned by the original parser invocation. Nested levels of the parse tree are created by parsing words."
 $nl
@@ -69,7 +69,7 @@ ARTICLE: "syntax-floats" "Float syntax"
 "More information on floats can be found in " { $link "floats" } "." ;
 
 ARTICLE: "syntax-complex-numbers" "Complex number syntax"
-"A complex number is given by two components, a ``real'' part and ''imaginary'' part. The components must either be integers, ratios or floats."
+"A complex number is given by two components, a â€œreal†part and â€œimaginary†part. The components must either be integers, ratios or floats."
 { $code
     "C{ 1/2 1/3 }   ! the complex number 1/2+1/3i"
     "C{ 0 1 }       ! the imaginary unit"
@@ -144,12 +144,12 @@ ARTICLE: "syntax-byte-arrays" "Byte array syntax"
 
 ARTICLE: "syntax-pathnames" "Pathname syntax"
 { $subsection POSTPONE: P" }
-"Pathnames are documented in " { $link "pathnames" } "." ;
+"Pathnames are documented in " { $link "io.pathnames" } "." ;
 
 ARTICLE: "syntax-literals" "Literals"
 "Many different types of objects can be constructed at parse time via literal syntax. Numbers are a special case since support for reading them is built-in to the parser. All other literals are constructed via parsing words."
 $nl
-"If a quotation contains a literal object, the same literal object instance is used each time the quotation executes; that is, literals are ``live''."
+"If a quotation contains a literal object, the same literal object instance is used each time the quotation executes; that is, literals are â€œliveâ€."
 $nl
 "Using mutable object literals in word definitions requires care, since if those objects are mutated, the actual word definition will be changed, which is in most cases not what you would expect. Literals should be " { $link clone } "d before being passed to word which may potentially mutate them."
 { $subsection "syntax-numbers" }
@@ -344,7 +344,53 @@ HELP: SYMBOL:
 { $description "Defines a new symbol word in the current vocabulary. Symbols push themselves on the stack when executed, and are used to identify variables (see " { $link "namespaces" } ") as well as for storing crufties in word properties (see " { $link "word-props" } ")." }
 { $examples { $example "USE: prettyprint" "IN: scratchpad" "SYMBOL: foo\nfoo ." "foo" } } ;
 
-{ define-symbol POSTPONE: SYMBOL: } related-words
+{ define-symbol POSTPONE: SYMBOL: POSTPONE: SYMBOLS: } related-words
+
+HELP: SYMBOLS:
+{ $syntax "SYMBOLS: words... ;" }
+{ $values { "words" "a sequence of new words to define" } }
+{ $description "Creates a new symbol for every token until the " { $snippet ";" } "." }
+{ $examples { $example "USING: prettyprint ;" "IN: scratchpad" "SYMBOLS: foo bar baz ;\nfoo . bar . baz ." "foo\nbar\nbaz" } } ;
+
+HELP: SINGLETON:
+{ $syntax "SINGLETON: class" }
+{ $values
+    { "class" "a new singleton to define" }
+}
+{ $description
+    "Defines a new singleton class. The class word itself is the sole instance of the singleton class."
+}
+{ $examples
+    { $example "USING: classes.singleton kernel io ;" "IN: singleton-demo" "USE: prettyprint SINGLETON: foo\nGENERIC: bar ( obj -- )\nM: foo bar drop \"a foo!\" print ;\nfoo bar" "a foo!" }
+} ;
+    
+HELP: SINGLETONS:
+{ $syntax "SINGLETONS: words... ;" }
+{ $values { "words" "a sequence of new words to define" } }
+{ $description "Creates a new singleton for every token until the " { $snippet ";" } "." } ;
+
+HELP: ALIAS:
+{ $syntax "ALIAS: new-word existing-word" }
+{ $values { "new-word" word } { "existing-word" word } }
+{ $description "Creates a new inlined word that calls the existing word." }
+{ $examples
+    { $example "USING: prettyprint sequences ;"
+               "IN: alias.test"
+               "ALIAS: sequence-nth nth"
+               "0 { 10 20 30 } sequence-nth ."
+               "10"
+    }
+} ;
+
+{ define-alias POSTPONE: ALIAS: } related-words
+
+HELP: CONSTANT:
+{ $syntax "CONSTANT: word value" }
+{ $values { "word" word } { "value" object } }
+{ $description "Creates a word which pushes a value on the stack." }
+{ $examples { $code "CONSTANT: magic 1" "CONSTANT: science HEX: ff0f" } } ;
+
+{ define-constant POSTPONE: CONSTANT: } related-words
 
 HELP: \
 { $syntax "\\ word" }
@@ -376,6 +422,47 @@ HELP: USING:
 { $description "Adds a list of vocabularies to the front of the search path, with later vocabularies taking precedence." }
 { $errors "Throws an error if one of the vocabularies does not exist." } ;
 
+HELP: QUALIFIED:
+{ $syntax "QUALIFIED: vocab" }
+{ $description "Similar to " { $link POSTPONE: USE: } " but loads vocabulary with prefix." }
+{ $examples { $example
+    "USING: prettyprint ;"
+    "QUALIFIED: math"
+    "1 2 math:+ ." "3"
+} } ;
+
+HELP: QUALIFIED-WITH:
+{ $syntax "QUALIFIED-WITH: vocab word-prefix" }
+{ $description "Works like " { $link POSTPONE: QUALIFIED: } " but uses " { $snippet "word-prefix" } " as prefix." }
+{ $examples { $code
+    "USING: prettyprint ;"
+    "QUALIFIED-WITH: math m"
+    "1 2 m:+ ."
+    "3"
+} } ;
+
+HELP: FROM:
+{ $syntax "FROM: vocab => words ... ;" }
+{ $description "Imports " { $snippet "words" } " from " { $snippet "vocab" } "." }
+{ $examples { $code
+    "FROM: math.parser => bin> hex> ; ! imports only bin> and hex>" } } ;
+
+HELP: EXCLUDE:
+{ $syntax "EXCLUDE: vocab => words ... ;" }
+{ $description "Imports everything from " { $snippet "vocab" } " excluding " { $snippet "words" } "." }
+{ $examples { $code
+    "EXCLUDE: math.parser => bin> hex> ; ! imports everything but bin> and hex>" } } ;
+
+HELP: RENAME:
+{ $syntax "RENAME: word vocab => newname" }
+{ $description "Imports " { $snippet "word" } " from " { $snippet "vocab" } ", but renamed to " { $snippet "newname" } "." }
+{ $examples { $example
+    "USING: prettyprint ;"
+    "RENAME: + math => -"
+    "2 3 - ."
+    "5"
+} } ;
+
 HELP: IN:
 { $syntax "IN: vocabulary" }
 { $values { "vocabulary" "a new vocabulary name" } }
@@ -470,7 +557,7 @@ HELP: GENERIC:
 
 HELP: GENERIC#
 { $syntax "GENERIC# word n" }
-{ $values { "word" "a new word to define" } { "n" "the stack position to dispatch on, either 0, 1 or 2" } }
+{ $values { "word" "a new word to define" } { "n" "the stack position to dispatch on" } }
 { $description "Defines a new generic word which dispatches on the " { $snippet "n" } "th most element from the top of the stack in the current vocabulary. Initially, it contains no methods, and thus will throw a " { $link no-method } " error when called." }
 { $notes
     "The following two definitions are equivalent:"
@@ -529,7 +616,7 @@ HELP: MIXIN:
 
 HELP: INSTANCE:
 { $syntax "INSTANCE: instance mixin" }
-{ $values { "instance" "a class word" } { "instance" "a class word" } }
+{ $values { "instance" "a class word" } { "mixin" "a mixin class word" } }
 { $description "Makes " { $snippet "instance" } " an instance of " { $snippet "mixin" } "." } ;
 
 HELP: PREDICATE:
index 0b7d9d008f0bce0138e14ebb66957e0b8871c6eb..af5fa38aeb439a3031699433f08e39c9ae8857ac 100644 (file)
@@ -2,12 +2,13 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors alien arrays byte-arrays definitions generic
 hashtables kernel math namespaces parser lexer sequences strings
-strings.parser sbufs vectors words quotations io assocs
-splitting classes.tuple generic.standard generic.math
-generic.parser classes io.files vocabs classes.parser
-classes.union classes.intersection classes.mixin
-classes.predicate classes.singleton classes.tuple.parser
-compiler.units combinators effects.parser slots ;
+strings.parser sbufs vectors words words.symbol words.constant
+words.alias quotations io assocs splitting classes.tuple
+generic.standard generic.math generic.parser classes
+io.pathnames vocabs vocabs.parser classes.parser classes.union
+classes.intersection classes.mixin classes.predicate
+classes.singleton classes.tuple.parser compiler.units
+combinators effects.parser slots ;
 IN: bootstrap.syntax
 
 ! These words are defined as a top-level form, instead of with
@@ -22,7 +23,8 @@ IN: bootstrap.syntax
     "syntax" lookup t "delimiter" set-word-prop ;
 
 : define-syntax ( name quot -- )
-    [ "syntax" lookup dup ] dip define make-parsing ;
+    [ dup "syntax" lookup [ dup ] [ no-word-error ] ?if ] dip
+    define make-parsing ;
 
 [
     { "]" "}" ";" ">>" } [ define-delimiter ] each
@@ -51,6 +53,22 @@ IN: bootstrap.syntax
 
     "USING:" [ ";" parse-tokens add-use ] define-syntax
 
+    "QUALIFIED:" [ scan dup add-qualified ] define-syntax
+
+    "QUALIFIED-WITH:" [ scan scan add-qualified ] define-syntax
+
+    "FROM:" [
+        scan "=>" expect ";" parse-tokens swap add-words-from
+    ] define-syntax
+
+    "EXCLUDE:" [
+        scan "=>" expect ";" parse-tokens swap add-words-excluding
+    ] define-syntax
+
+    "RENAME:" [
+        scan scan "=>" expect scan add-renamed-word
+    ] define-syntax
+
     "HEX:" [ 16 parse-base ] define-syntax
     "OCT:" [ 8 parse-base ] define-syntax
     "BIN:" [ 2 parse-base ] define-syntax
@@ -85,7 +103,7 @@ IN: bootstrap.syntax
     "W{" [ \ } [ first <wrapper> ] parse-literal ] define-syntax
 
     "POSTPONE:" [ scan-word parsed ] define-syntax
-    "\\" [ scan-word literalize parsed ] define-syntax
+    "\\" [ scan-word <wrapper> parsed ] define-syntax
     "inline" [ word make-inline ] define-syntax
     "recursive" [ word make-recursive ] define-syntax
     "foldable" [ word make-foldable ] define-syntax
@@ -97,6 +115,24 @@ IN: bootstrap.syntax
         CREATE-WORD define-symbol
     ] define-syntax
 
+    "SYMBOLS:" [
+        ";" parse-tokens
+        [ create-in dup reset-generic define-symbol ] each
+    ] define-syntax
+
+    "SINGLETONS:" [
+        ";" parse-tokens
+        [ create-class-in define-singleton-class ] each
+    ] define-syntax
+    
+    "ALIAS:" [
+        CREATE-WORD scan-word define-alias
+    ] define-syntax
+
+    "CONSTANT:" [
+        CREATE scan-object define-constant
+    ] define-syntax
+
     "DEFER:" [
         scan current-vocab create
         dup old-definitions get [ delete-at ] with each
@@ -169,8 +205,7 @@ IN: bootstrap.syntax
     ] define-syntax
 
     "C:" [
-        CREATE-WORD
-        scan-word [ boa ] curry define-inline
+        CREATE-WORD scan-word define-boa-word
     ] define-syntax
 
     "ERROR:" [
diff --git a/core/syntax/tags.txt b/core/syntax/tags.txt
deleted file mode 100755 (executable)
index e69de29..0000000
index 533bea76fcd4a35b9831cc64e8d0f670db2190b1..cb4a0b50aa9c78f176f162ce25705ced54d78911 100644 (file)
@@ -3,7 +3,7 @@ USING: vocabs.loader tools.test continuations vocabs math
 kernel arrays sequences namespaces io.streams.string
 parser source-files words assocs classes.tuple definitions
 debugger compiler.units tools.vocabs accessors eval
-combinators ;
+combinators vocabs.parser grouping ;
 
 ! This vocab should not exist, but just in case...
 [ ] [
index 97fbfe8a0762a6026976ec501034bcde88620074..48e8737fd25f0edbddfbec2e051d86c3347da400 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2007, 2008 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: namespaces make sequences io.files kernel assocs words
-vocabs definitions parser continuations io hashtables sorting
-source-files arrays combinators strings system math.parser
-compiler.errors splitting init accessors sets ;
+USING: namespaces make sequences io io.files io.pathnames kernel
+assocs words vocabs definitions parser continuations hashtables
+sorting source-files arrays combinators strings system
+math.parser compiler.errors splitting init accessors sets ;
 IN: vocabs.loader
 
 SYMBOL: vocab-roots
@@ -57,8 +57,6 @@ PRIVATE>
 
 SYMBOL: load-help?
 
-ERROR: circular-dependency name ;
-
 <PRIVATE
 
 : load-source ( vocab -- )
diff --git a/core/vocabs/parser/authors.txt b/core/vocabs/parser/authors.txt
new file mode 100644 (file)
index 0000000..3095b9b
--- /dev/null
@@ -0,0 +1,3 @@
+Daniel Ehrenberg
+Bruno Deferrari
+Slava Pestov
diff --git a/core/vocabs/parser/parser-docs.factor b/core/vocabs/parser/parser-docs.factor
new file mode 100644 (file)
index 0000000..7186240
--- /dev/null
@@ -0,0 +1,80 @@
+USING: help.markup help.syntax parser ;
+IN: vocabs.parser
+
+ARTICLE: "vocabulary-search-shadow" "Shadowing word names"
+"If adding a vocabulary to the search path results in a word in another vocabulary becoming inaccessible due to the new vocabulary defining a word with the same name, we say that the old word has been " { $emphasis "shadowed" } "."
+$nl
+"Here is an example where shadowing occurs:"
+{ $code
+    "IN: foe"
+    "USING: sequences io ;"
+    ""
+    ": append"
+    "    \"foe::append calls sequences:append\" print  append ;"
+    ""
+    "IN: fee"
+    ""
+    ": append"
+    "    \"fee::append calls fee:append\" print  append ;"
+    ""
+    "IN: fox"
+    "USE: foe"
+    ""
+    ": append"
+    "    \"fox::append calls foe:append\" print  append ;"
+    ""
+    "\"1234\" \"5678\" append print"
+    ""
+    "USE: fox"
+    "\"1234\" \"5678\" append print"
+}
+"When placed in a source file and run, the above code produces the following output:"
+{ $code
+    "foe:append calls sequences:append"
+    "12345678"
+    "fee:append calls foe:append"
+    "foe:append calls sequences:append"
+    "12345678"
+} ;
+
+ARTICLE: "vocabulary-search-errors"  "Word lookup errors"
+"If the parser cannot not find a word in the current vocabulary search path, it attempts to look for the word in all loaded vocabularies."
+$nl
+"If " { $link auto-use? } " mode is off, a restartable error is thrown with a restart for each vocabulary in question, together with a restart which defers the word in the current vocabulary, as if " { $link POSTPONE: DEFER: } " was used."
+$nl
+"If " { $link auto-use? } " mode is on and only one vocabulary has a word with this name, the vocabulary is added to the search path and parsing continues."
+$nl
+"If any restarts were invoked, or if " { $link auto-use? } " is on, the parser will print the correct " { $link POSTPONE: USING: } " after parsing completes. This form can be copy and pasted back into the source file."
+{ $subsection auto-use? } ;
+
+ARTICLE: "vocabulary-search" "Vocabulary search path"
+"When the parser reads a token, it attempts to look up a word named by that token. The lookup is performed by searching each vocabulary in the search path, in order."
+$nl
+"For a source file the vocabulary search path starts off with one vocabulary:"
+{ $code "syntax" }
+"The " { $vocab-link "syntax" } " vocabulary consists of a set of parsing words for reading Factor data and defining new words."
+$nl
+"In the listener, the " { $vocab-link "scratchpad" } " is the default vocabulary for new word definitions. However, when loading source files, there is no default vocabulary. Defining words before declaring a vocabulary with " { $link POSTPONE: IN: } " results in an error."
+$nl
+"At the interactive listener, the default search path contains many more vocabularies. Details on the default search path and parser invocation are found in " { $link "parser" } "."
+$nl
+"Three parsing words deal with the vocabulary search path:"
+{ $subsection POSTPONE: IN: }
+{ $subsection POSTPONE: USE: }
+{ $subsection POSTPONE: USING: }
+"There are some additional parsing words give more control over word lookup than is offered by " { $link POSTPONE: USE: } " and " { $link POSTPONE: USING: } ":"
+{ $subsection POSTPONE: QUALIFIED: }
+{ $subsection POSTPONE: QUALIFIED-WITH: }
+{ $subsection POSTPONE: FROM: }
+{ $subsection POSTPONE: EXCLUDE: }
+{ $subsection POSTPONE: RENAME: }
+"These words are useful when there is no way to avoid using two vocabularies with identical word names in the same source file."
+$nl
+"Private words can be defined; note that this is just a convention and they can be called from other vocabularies anyway:"
+{ $subsection POSTPONE: <PRIVATE }
+{ $subsection POSTPONE: PRIVATE> }
+{ $subsection "vocabulary-search-errors" }
+{ $subsection "vocabulary-search-shadow" }
+{ $see-also "words" } ;
+
+ABOUT: "vocabulary-search"
diff --git a/core/vocabs/parser/parser.factor b/core/vocabs/parser/parser.factor
new file mode 100644 (file)
index 0000000..35feae3
--- /dev/null
@@ -0,0 +1,59 @@
+! Copyright (C) 2007, 2008 Daniel Ehrenberg, Bruno Deferrari,
+! Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: assocs hashtables kernel namespaces sequences
+sets strings vocabs sorting accessors arrays ;
+IN: vocabs.parser
+
+ERROR: no-word-error name ;
+
+: word-restarts ( name possibilities -- restarts )
+    natural-sort
+    [ [ vocabulary>> "Use the " " vocabulary" surround ] keep ] { } map>assoc
+    swap "Defer word in current vocabulary" swap 2array
+    suffix ;
+
+: <no-word-error> ( name possibilities -- error restarts )
+    [ drop \ no-word-error boa ] [ word-restarts ] 2bi ;
+
+SYMBOL: use
+SYMBOL: in
+
+: (use+) ( vocab -- )
+    vocab-words use get push ;
+
+: use+ ( vocab -- )
+    load-vocab (use+) ;
+
+: add-use ( seq -- ) [ use+ ] each ;
+
+: set-use ( seq -- )
+    [ vocab-words ] V{ } map-as sift use set ;
+
+: add-qualified ( vocab prefix -- )
+    [ load-vocab vocab-words ] [ CHAR: : suffix ] bi*
+    [ swap [ prepend ] dip ] curry assoc-map
+    use get push ;
+
+: partial-vocab ( words vocab -- assoc )
+    load-vocab vocab-words
+    [ dupd at [ no-word-error ] unless* ] curry { } map>assoc ;
+
+: add-words-from ( words vocab -- )
+    partial-vocab use get push ;
+
+: partial-vocab-excluding ( words vocab -- assoc )
+    load-vocab [ vocab-words keys swap diff ] keep partial-vocab ;
+
+: add-words-excluding ( words vocab -- )
+    partial-vocab-excluding use get push ;
+
+: add-renamed-word ( word vocab new-name -- )
+    [ load-vocab vocab-words dupd at [ ] [ no-word-error ] ?if ] dip
+    associate use get push ;
+
+: check-vocab-string ( name -- name )
+    dup string? [ "Vocabulary name must be a string" throw ] unless ;
+
+: set-in ( name -- )
+    check-vocab-string dup in set create-vocab (use+) ;
index 13f79b04ecccbb5dac560b7b29a8a8057e58d146..fb9ce5467239a21e5d2672832bfc176e63846ce0 100644 (file)
@@ -11,7 +11,7 @@ name words
 main help
 source-loaded? docs-loaded? ;
 
-! sources-loaded? slot is one of these two
+! sources-loaded? slot is one of these three
 SYMBOL: +parsing+
 SYMBOL: +running+
 SYMBOL: +done+
diff --git a/core/words/alias/alias-docs.factor b/core/words/alias/alias-docs.factor
new file mode 100644 (file)
index 0000000..d569647
--- /dev/null
@@ -0,0 +1,12 @@
+USING: help.markup help.syntax words.alias ;
+IN: words.alias
+
+ARTICLE: "words.alias" "Word aliasing"
+"There is a syntax for defining new names for existing words. This useful for C library bindings, for example in the Win32 API, where words need to be renamed for symmetry."
+$nl
+"Define a new word that aliases another word:"
+{ $subsection POSTPONE: ALIAS: }
+"Define an alias at run-time:"
+{ $subsection define-alias } ;
+
+ABOUT: "words.alias"
diff --git a/core/words/alias/alias.factor b/core/words/alias/alias.factor
new file mode 100644 (file)
index 0000000..0615e83
--- /dev/null
@@ -0,0 +1,16 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: quotations effects accessors sequences words kernel ;
+IN: words.alias
+
+PREDICATE: alias < word "alias" word-prop ;
+
+: define-alias ( new old -- )
+    [ [ 1quotation ] [ stack-effect ] bi define-inline ]
+    [ drop t "alias" set-word-prop ] 2bi ;
+
+M: alias reset-word
+    [ call-next-method ] [ f "alias" set-word-prop ] bi ;
+
+M: alias stack-effect
+    def>> first stack-effect ;
diff --git a/core/words/alias/authors.txt b/core/words/alias/authors.txt
new file mode 100644 (file)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/core/words/alias/summary.txt b/core/words/alias/summary.txt
new file mode 100644 (file)
index 0000000..15690a7
--- /dev/null
@@ -0,0 +1 @@
+Defining multiple words with the same name
diff --git a/core/words/constant/constant.factor b/core/words/constant/constant.factor
new file mode 100644 (file)
index 0000000..43b7f37
--- /dev/null
@@ -0,0 +1,10 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors kernel sequences words ;
+IN: words.constant
+
+PREDICATE: constant < word ( obj -- ? )
+    def>> dup length 1 = [ first word? not ] [ drop f ] if ;
+
+: define-constant ( word value -- )
+    [ ] curry (( -- value )) define-inline ;
diff --git a/core/words/symbol/symbol-docs.factor b/core/words/symbol/symbol-docs.factor
new file mode 100644 (file)
index 0000000..1fcba9a
--- /dev/null
@@ -0,0 +1,28 @@
+USING: help.syntax help.markup words.symbol words compiler.units ;
+IN: words.symbol
+
+HELP: symbol
+{ $description "The class of symbols created by " { $link POSTPONE: SYMBOL: } "." } ;
+
+HELP: define-symbol
+{ $values { "word" word } }
+{ $description "Defines the word to push itself on the stack when executed. This is the run time equivalent of " { $link POSTPONE: SYMBOL: } "." }
+{ $notes "This word must be called from inside " { $link with-compilation-unit } "." }
+{ $side-effects "word" } ;
+
+ARTICLE: "words.symbol" "Symbols"
+"A symbol pushes itself on the stack when executed. By convention, symbols are used as variable names (" { $link "namespaces" } ")."
+{ $subsection symbol }
+{ $subsection symbol? }
+"Defining symbols at parse time:"
+{ $subsection POSTPONE: SYMBOL: }
+{ $subsection POSTPONE: SYMBOLS: }
+"Defining symbols at run time:"
+{ $subsection define-symbol }
+"Symbols are just compound definitions in disguise. The following two lines are equivalent:"
+{ $code
+    "SYMBOL: foo"
+    ": foo ( -- value ) \\ foo ;"
+} ;
+
+ABOUT: "words.symbol"
diff --git a/core/words/symbol/symbol.factor b/core/words/symbol/symbol.factor
new file mode 100644 (file)
index 0000000..a107808
--- /dev/null
@@ -0,0 +1,15 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel sequences accessors definitions
+words words.constant ;
+IN: words.symbol
+
+PREDICATE: symbol < constant ( obj -- ? )
+    [ def>> ] [ [ ] curry ] bi sequence= ;
+
+M: symbol definer drop \ SYMBOL: f ;
+
+M: symbol definition drop f ;
+
+: define-symbol ( word -- )
+    dup define-constant ;
index aaf14617b374f6a5627cf3e07ee6493e95227c6f..764df9924cded9bae3354bdf1376f3c82bdaf231 100644 (file)
@@ -33,21 +33,7 @@ $nl
 { $subsection define-inline }
 "Word definitions should declare their stack effect, unless the definition is completely trivial. See " { $link "effect-declaration" } "."
 $nl
-"All other types of word definitions, such as " { $link "symbols" } " and " { $link "generic" } ", are just special cases of the above." ;
-
-ARTICLE: "symbols" "Symbols"
-"A symbol pushes itself on the stack when executed. By convention, symbols are used as variable names (" { $link "namespaces" } ")."
-{ $subsection symbol }
-{ $subsection symbol? }
-"Defining symbols at parse time:"
-{ $subsection POSTPONE: SYMBOL: }
-"Defining symbols at run time:"
-{ $subsection define-symbol }
-"Symbols are just compound definitions in disguise. The following two lines are equivalent:"
-{ $code
-    "SYMBOL: foo"
-    ": foo \\ foo ;"
-} ;
+"All other types of word definitions, such as " { $link "words.symbol" } " and " { $link "generic" } ", are just special cases of the above." ;
 
 ARTICLE: "primitives" "Primitives"
 "Primitives are words defined in the Factor VM. They provide the essential low-level services to the rest of the system."
@@ -91,7 +77,8 @@ ARTICLE: "word-definition" "Defining words"
 }
 "The latter is a more dynamic feature that can be used to implement code generation and such, and in fact parse time defining words are implemented in terms of run time defining words."
 { $subsection "colon-definition" }
-{ $subsection "symbols" }
+{ $subsection "words.symbol" }
+{ $subsection "words.alias" }
 { $subsection "primitives" }
 { $subsection "deferred" }
 { $subsection "declarations" }
@@ -193,9 +180,6 @@ HELP: deferred
 HELP: primitive
 { $description "The class of primitive words." } ;
 
-HELP: symbol
-{ $description "The class of symbols created by " { $link POSTPONE: SYMBOL: } "." } ;
-
 HELP: word-prop
 { $values { "word" word } { "name" "a property name" } { "value" "a property value" } }
 { $description "Retrieves a word property. Word property names are conventionally strings." } ;
@@ -214,12 +198,6 @@ HELP: word-xt ( word -- start end )
 { $values { "word" word } { "start" "the word's start address" } { "end" "the word's end address" } }
 { $description "Outputs the machine code address of the word's definition." } ;
 
-HELP: define-symbol
-{ $values { "word" word } }
-{ $description "Defines the word to push itself on the stack when executed. This is the run time equivalent of " { $link POSTPONE: SYMBOL: } "." }
-{ $notes "This word must be called from inside " { $link with-compilation-unit } "." }
-{ $side-effects "word" } ;
-
 HELP: define
 { $values { "word" word } { "def" quotation } }
 { $description "Defines the word to call a quotation when executed. This is the run time equivalent of " { $link POSTPONE: : } "." }
@@ -344,6 +322,6 @@ HELP: make-inline
 { $side-effects "word" } ;
 
 HELP: define-inline
-{ $values { "word" word } { "quot" quotation } }
+{ $values { "word" word } { "def" quotation } { "effect" effect } }
 { $description "Defines a word and makes it " { $link POSTPONE: inline } "." }
 { $side-effects "word" } ;
index 09ebcb6b777668dd2c5a7c40ef4884aaedc00093..10c17a0e79a1048e5054c1bc434174864d302dd3 100644 (file)
@@ -1,7 +1,7 @@
 USING: arrays generic assocs kernel math namespaces
 sequences tools.test words definitions parser quotations
 vocabs continuations classes.tuple compiler.units
-io.streams.string accessors eval ;
+io.streams.string accessors eval words.symbol ;
 IN: words.tests
 
 [ 4 ] [
index 8c144b03a2bac8f3ac3b7eb96d80ce0832b8050a..6a3b63ab8ab9d83a92e2126f021bb88d4276533f 100644 (file)
@@ -28,11 +28,6 @@ PREDICATE: deferred < word ( obj -- ? )
 M: deferred definer drop \ DEFER: f ;
 M: deferred definition drop f ;
 
-PREDICATE: symbol < word ( obj -- ? )
-    [ def>> ] [ [ ] curry ] bi sequence= ;
-M: symbol definer drop \ SYMBOL: f ;
-M: symbol definition drop f ;
-
 PREDICATE: primitive < word ( obj -- ? )
     [ def>> [ do-primitive ] tail? ]
     [ sub-primitive>> >boolean ]
@@ -59,7 +54,7 @@ M: primitive definition drop f ;
 SYMBOL: bootstrapping?
 
 : if-bootstrapping ( true false -- )
-    bootstrapping? get -rot if ; inline
+    [ bootstrapping? get ] 2dip if ; inline
 
 : bootstrap-word ( word -- target )
     [ target-word ] [ ] if-bootstrapping ;
@@ -192,11 +187,8 @@ SYMBOL: visited
 : make-foldable ( word -- )
     dup make-flushable t "foldable" set-word-prop ;
 
-: define-inline ( word quot -- )
-    dupd define make-inline ;
-
-: define-symbol ( word -- )
-    dup [ ] curry define-inline ;
+: define-inline ( word def effect -- )
+    [ define-declared ] [ 2drop make-inline ] 3bi ;
 
 GENERIC: reset-word ( word -- )
 
diff --git a/extra/L-system/L-system.factor b/extra/L-system/L-system.factor
new file mode 100644 (file)
index 0000000..0dbf94b
--- /dev/null
@@ -0,0 +1,511 @@
+
+USING: accessors arrays assocs calendar colors
+combinators.short-circuit help.markup help.syntax kernel locals
+math math.functions math.matrices math.order math.parser
+math.trig math.vectors opengl opengl.demo-support opengl.gl
+sbufs sequences strings threads ui.gadgets ui.gadgets.worlds
+ui.gestures ui.render ui.tools.workspace ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+IN: L-system
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+TUPLE: <turtle> pos ori angle length thickness color vertices saved ;
+
+DEFER: default-L-parser-values
+
+: reset-turtle ( turtle -- turtle )
+  { 0 0 0 } clone   >>pos
+  3 identity-matrix >>ori
+  V{ } clone >>vertices
+  V{ } clone >>saved
+
+  default-L-parser-values ;
+
+: turtle ( -- turtle ) <turtle> new reset-turtle ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: step-turtle ( TURTLE LENGTH -- turtle )
+
+  TURTLE
+    TURTLE pos>>   TURTLE ori>> { 0 0 LENGTH } m.v   v+
+  >>pos ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: Rx ( ANGLE -- Rx )
+  
+  [let | ANGLE [ ANGLE deg>rad ] |
+
+    [let | A [ ANGLE cos     ]
+           B [ ANGLE sin neg ]
+           C [ ANGLE sin     ]
+           D [ ANGLE cos     ] |
+
+      { { 1 0 0 }
+        { 0 A B }
+        { 0 C D } }
+
+    ] ] ;
+
+:: Ry ( ANGLE -- Ry )
+  
+  [let | ANGLE [ ANGLE deg>rad ] |
+
+    [let | A [ ANGLE cos     ]
+           B [ ANGLE sin     ]
+           C [ ANGLE sin neg ]
+           D [ ANGLE cos     ] |
+
+      { { A 0 B }
+        { 0 1 0 }
+        { C 0 D } }
+
+    ] ] ;
+
+:: Rz ( ANGLE -- Rz )
+  
+  [let | ANGLE [ ANGLE deg>rad ] |
+
+    [let | A [ ANGLE cos     ]
+           B [ ANGLE sin neg ]
+           C [ ANGLE sin     ]
+           D [ ANGLE cos     ] |
+
+      { { A B 0 }
+        { C D 0 }
+        { 0 0 1 } }
+
+    ] ] ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: apply-rotation ( TURTLE ROTATION -- turtle )
+  
+  TURTLE  TURTLE ori>> ROTATION m.  >>ori ;
+
+: rotate-x ( turtle angle -- turtle ) Rx apply-rotation ;
+: rotate-y ( turtle angle -- turtle ) Ry apply-rotation ;
+: rotate-z ( turtle angle -- turtle ) Rz apply-rotation ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: pitch-up   ( turtle angle -- turtle ) neg rotate-x ;
+: pitch-down ( turtle angle -- turtle )     rotate-x ;
+
+: turn-left  ( turtle angle -- turtle )     rotate-y ;
+: turn-right ( turtle angle -- turtle ) neg rotate-y ;
+
+: roll-left  ( turtle angle -- turtle ) neg rotate-z ;
+: roll-right ( turtle angle -- turtle )     rotate-z ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: V ( -- V ) { 0 1 0 } ;
+
+: X ( turtle -- 3array ) ori>> [ first  ] map ;
+: Y ( turtle -- 3array ) ori>> [ second ] map ;
+: Z ( turtle -- 3array ) ori>> [ third  ] map ;
+
+: set-X ( turtle seq -- turtle ) over ori>> [ set-first  ] 2each ;
+: set-Y ( turtle seq -- turtle ) over ori>> [ set-second ] 2each ;
+: set-Z ( turtle seq -- turtle ) over ori>> [ set-third  ] 2each ;
+
+:: roll-until-horizontal ( TURTLE -- turtle )
+
+  TURTLE
+  
+    V         TURTLE Z  cross normalize  set-X
+
+    TURTLE Z  TURTLE X  cross normalize  set-Y ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: strafe-up ( TURTLE LENGTH -- turtle )
+  TURTLE 90 pitch-up LENGTH step-turtle 90 pitch-down ;
+
+:: strafe-down ( TURTLE LENGTH -- turtle )
+  TURTLE 90 pitch-down LENGTH step-turtle 90 pitch-up ;
+
+:: strafe-left ( TURTLE LENGTH -- turtle )
+  TURTLE 90 turn-left LENGTH step-turtle 90 turn-right ;
+
+:: strafe-right ( TURTLE LENGTH -- turtle )
+  TURTLE 90 turn-right LENGTH step-turtle 90 turn-left ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: polygon ( vertices -- ) GL_POLYGON glBegin [ first3 glVertex3d ] each glEnd ;
+
+: start-polygon ( turtle -- turtle ) dup vertices>> delete-all ;
+
+: finish-polygon ( turtle -- turtle ) dup vertices>> polygon ;
+
+: polygon-vertex ( turtle -- turtle ) dup [ pos>> ] [ vertices>> ] bi push ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: record-vertex ( turtle -- turtle ) dup pos>> first3 glVertex3d ;
+
+: draw-forward ( turtle length -- turtle )
+  GL_LINES glBegin [ record-vertex ] dip step-turtle record-vertex glEnd ;
+
+: move-forward ( turtle length -- turtle ) step-turtle polygon-vertex ;
+
+: sneak-forward ( turtle length -- turtle ) step-turtle ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: scale-length ( turtle m -- turtle ) over length>> * >>length ;
+: scale-angle  ( turtle m -- turtle ) over angle>>  * >>angle  ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: set-thickness ( turtle i -- turtle ) dup glLineWidth >>thickness ;
+
+: scale-thickness ( turtle m -- turtle )
+  over thickness>> * 0.5 max set-thickness ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: color-table ( -- colors )
+  {
+    T{ rgba f 0    0    0    1 } ! black
+    T{ rgba f 0.5  0.5  0.5  1 } ! grey
+    T{ rgba f 1    0    0    1 } ! red
+    T{ rgba f 1    1    0    1 } ! yellow
+    T{ rgba f 0    1    0    1 } ! green
+    T{ rgba f 0.25 0.88 0.82 1 } ! turquoise
+    T{ rgba f 0    0    1    1 } ! blue
+    T{ rgba f 0.63 0.13 0.94 1 } ! purple
+    T{ rgba f 0.00 0.50 0.00 1 } ! dark green
+    T{ rgba f 0.00 0.82 0.82 1 } ! dark turquoise
+    T{ rgba f 0.00 0.00 0.50 1 } ! dark blue
+    T{ rgba f 0.58 0.00 0.82 1 } ! dark purple
+    T{ rgba f 0.50 0.00 0.00 1 } ! dark red
+    T{ rgba f 0.25 0.25 0.25 1 } ! dark grey
+    T{ rgba f 0.75 0.75 0.75 1 } ! medium grey
+    T{ rgba f 1    1    1    1 } ! white
+  } ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+! : material-color ( color -- )
+!   GL_FRONT_AND_BACK GL_AMBIENT_AND_DIFFUSE rot gl-material ;
+
+: material-color ( color -- )
+  GL_FRONT_AND_BACK GL_AMBIENT_AND_DIFFUSE rot color>raw 4array gl-material ;
+
+: set-color ( turtle i -- turtle )
+  dup color-table nth dup gl-color material-color >>color ;
+
+: inc-color ( turtle -- turtle ) dup color>> 1 + set-color ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: save-turtle    ( turtle -- turtle ) dup clone over saved>> push ;
+
+: restore-turtle ( turtle -- turtle ) saved>> pop dup color>> set-color ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: default-L-parser-values ( turtle -- turtle )
+  1 >>length 45 >>angle 1 >>thickness 2 >>color ;
+
+: L-parser-dialect ( -- commands )
+
+  {
+      { "+" [ dup angle>> turn-left  ] }
+      { "-" [ dup angle>> turn-right ] }
+      { "&" [ dup angle>> pitch-down ] }
+      { "^" [ dup angle>> pitch-up   ] }
+      { "<" [ dup angle>> roll-left  ] }
+      { ">" [ dup angle>> roll-right ] }
+
+      { "|" [ 180.0         rotate-y ] }
+      { "%" [ 180.0         rotate-z ] }
+      { "$" [ roll-until-horizontal  ]  }
+
+      { "F" [ dup length>>     draw-forward  ] }
+      { "Z" [ dup length>> 2 / draw-forward  ] }
+      { "f" [ dup length>>     move-forward  ] }
+      { "z" [ dup length>> 2 / move-forward  ] }
+      { "g" [ dup length>>     sneak-forward ] }
+      { "." [ polygon-vertex                 ] }
+
+      { "[" [ save-turtle      ] }
+      { "]" [ restore-turtle   ] }
+      
+      { "{" [ start-polygon    ] }
+      { "}" [ finish-polygon   ] }
+
+      { "/" [ 1.1 scale-length    ] } ! double quote command in lparser
+      { "'" [ 0.9 scale-length    ] }
+      { ";" [ 1.1 scale-angle     ] }
+      { ":" [ 0.9 scale-angle     ] }
+      { "?" [ 1.4 scale-thickness ] }
+      { "!" [ 0.7 scale-thickness ] }
+
+      { "c" [ dup color>> 1 + color-table length mod set-color ] }
+
+    }
+    ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+TUPLE: <L-system> < gadget
+  camera display-list pedestal paused
+  turtle-values
+  commands axiom rules string ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: iterate-system ( GADGET -- ) GADGET pedestal>> 0.5 + GADGET (>>pedestal) ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: start-rotation-thread ( GADGET -- )
+  GADGET f >>paused drop
+  [
+    [
+      GADGET paused>>
+        [ f ]
+        [ GADGET iterate-system GADGET relayout-1 25 milliseconds sleep t ]
+      if
+    ]
+    loop
+  ]
+  in-thread ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: open-paren  ( -- ch ) CHAR: ( ;
+: close-paren ( -- ch ) CHAR: ) ;
+
+: open-paren?  ( obj -- ? ) open-paren  = ;
+: close-paren? ( obj -- ? ) close-paren = ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: read-instruction ( STRING -- next rest )
+  
+  { [ STRING length 1 > ] [ STRING second open-paren? ] } 0&&
+    [ STRING  close-paren STRING index 1 + cut ]
+    [ STRING  1                            cut ]
+  if ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: iterate-string-loop ( STRING RULES ACCUM -- )
+  STRING empty? not
+    [
+      STRING read-instruction
+    
+      [let | REST [ ] NEXT [ ] |
+
+        NEXT 1 head RULES at  NEXT  or  ACCUM push-all
+
+        REST RULES ACCUM iterate-string-loop ]
+    ]
+  when ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: iterate-string ( STRING RULES -- string )
+
+  [let | ACCUM [ STRING length  10 *  <sbuf> ] |
+
+    STRING RULES ACCUM iterate-string-loop
+
+    ACCUM >string ] ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: interpret-string ( STRING COMMANDS -- )
+
+  STRING empty? not
+    [
+      STRING read-instruction
+
+      [let | REST [ ] NEXT [ ] |
+
+        [let | COMMAND [ NEXT 1 head COMMANDS at ] |
+
+          COMMAND
+            [
+              NEXT length 1 =
+                [ COMMAND call ]
+                [
+                  NEXT 2 tail 1 head* string>number
+                  COMMAND 1 tail*
+                  call
+                ]
+              if
+            ]
+          when ]
+
+        REST COMMANDS interpret-string ]
+    ]
+  when ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: iterate-L-system-string ( L-SYSTEM -- )
+  L-SYSTEM string>> L-SYSTEM axiom>> or
+  L-SYSTEM rules>>
+  iterate-string
+  L-SYSTEM (>>string) ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: do-camera-look-at ( CAMERA -- )
+
+  [let | EYE   [ CAMERA pos>> ]
+         FOCUS [ CAMERA clone 1 step-turtle pos>> ]
+         UP    [ CAMERA clone 90 pitch-up 1 step-turtle pos>> CAMERA pos>> v- ]
+       |
+
+    EYE FOCUS UP gl-look-at ] ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: generate-display-list ( L-SYSTEM -- )
+
+  L-SYSTEM find-gl-context
+
+  L-SYSTEM display-list>> GL_COMPILE glNewList
+
+    turtle
+    L-SYSTEM turtle-values>> [ ] or call
+    L-SYSTEM string>> L-SYSTEM axiom>> or
+    L-SYSTEM commands>>
+    interpret-string
+    drop
+
+  glEndList ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+M:: <L-system> draw-gadget* ( L-SYSTEM -- )
+
+  black gl-clear
+
+  GL_FLAT glShadeModel
+
+  GL_PROJECTION glMatrixMode
+  glLoadIdentity
+  -1 1 -1 1 1.5 200 glFrustum
+
+  GL_MODELVIEW glMatrixMode
+
+  glLoadIdentity
+
+  L-SYSTEM camera>> do-camera-look-at
+
+  GL_FRONT_AND_BACK GL_LINE glPolygonMode
+
+  ! draw axis
+  white gl-color GL_LINES glBegin { 0 0 0 } gl-vertex { 0 0 1 } gl-vertex glEnd
+
+  ! rotate pedestal
+
+  L-SYSTEM pedestal>> 0 0 1 glRotated
+  
+  L-SYSTEM display-list>> glCallList ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+M:: <L-system> graft* ( L-SYSTEM -- )
+
+  L-SYSTEM find-gl-context
+
+  1 glGenLists L-SYSTEM (>>display-list) ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+M:: <L-system> pref-dim* ( L-SYSTEM -- dim ) { 400 400 } ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: with-camera ( L-SYSTEM QUOT -- )
+  L-SYSTEM camera>> QUOT call drop
+  L-SYSTEM relayout-1 ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+<L-system>
+H{
+  { T{ key-down f f "LEFT"  } [ [  5 turn-left   ] with-camera ] }
+  { T{ key-down f f "RIGHT" } [ [  5 turn-right  ] with-camera ] }
+  { T{ key-down f f "UP"    } [ [  5 pitch-down  ] with-camera ] }
+  { T{ key-down f f "DOWN"  } [ [  5 pitch-up    ] with-camera ] }
+  
+  { T{ key-down f f "a"     } [ [  1 step-turtle ] with-camera ] }
+  { T{ key-down f f "z"     } [ [ -1 step-turtle ] with-camera ] }
+
+  { T{ key-down f f "q"     } [ [ 5 roll-left    ] with-camera ] }
+  { T{ key-down f f "w"     } [ [ 5 roll-right   ] with-camera ] }
+
+  { T{ key-down f { A+ } "LEFT"  } [ [ 1 strafe-left  ] with-camera ] }
+  { T{ key-down f { A+ } "RIGHT" } [ [ 1 strafe-right ] with-camera ] }
+  { T{ key-down f { A+ } "UP"    } [ [ 1 strafe-up    ] with-camera ] }
+  { T{ key-down f { A+ } "DOWN"  } [ [ 1 strafe-down  ] with-camera ] }
+
+  { T{ key-down f f "r"     } [ start-rotation-thread          ] }
+
+  {
+    T{ key-down f f "x" }
+    [
+      dup iterate-L-system-string
+      dup generate-display-list
+      dup relayout-1
+      drop
+    ]
+  }
+
+  { T{ key-down f f "F1" } [ drop "L-system" help-window ] }
+    
+}
+set-gestures
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: L-system ( -- L-system )
+
+  <L-system> new-gadget
+
+    0 >>pedestal
+  
+    ! turtle 45 turn-left 45 pitch-up 5 step-turtle 180 turn-left >>camera ;
+
+    turtle 90 pitch-down -5 step-turtle 2 strafe-up >>camera
+
+    dup start-rotation-thread
+
+  ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ARTICLE: "L-system" "L-system"
+
+"Press 'x' to iterate the L-system." $nl
+
+"Camera control:"
+
+{ $table
+
+  { "a" "Forward" }
+  { "z" "Backward" }
+
+  { "LEFT" "Turn left" }
+  { "RIGHT" "Turn right" }
+  { "UP" "Pitch down" }
+  { "DOWN" "Pitch up" }
+
+  { "q" "Roll left" }
+  { "w" "Roll right" } } ;
+
+ABOUT: "L-system"
\ No newline at end of file
diff --git a/extra/L-system/models/abop-1/abop-1.factor b/extra/L-system/models/abop-1/abop-1.factor
new file mode 100644 (file)
index 0000000..34f1d47
--- /dev/null
@@ -0,0 +1,27 @@
+
+USING: accessors ui L-system ;
+
+IN: L-system.models.abop-1
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: abop-1 ( <L-system> -- <L-system> )
+  
+  L-parser-dialect >>commands
+
+  "c(12)FFAL" >>axiom
+
+  {
+    { "A" "F [ & '(.8) !       B L ] >(137) ' !(.9) A" }
+    { "B" "F [ - '(.8) !(.9) $ C L ]        ' !(.9) C" }
+    { "C" "F [ + '(.8) !(.9) $ B L ]        ' !(.9) B" }
+    
+    { "L" " ~ c(8) { +(30) f -(120) f -(120) f }" }
+  }
+  >>rules ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: main ( -- ) [ L-system abop-1 "L-system" open-window ] with-ui ;
+
+MAIN: main
diff --git a/extra/L-system/models/abop-2/abop-2.factor b/extra/L-system/models/abop-2/abop-2.factor
new file mode 100644 (file)
index 0000000..1168780
--- /dev/null
@@ -0,0 +1,31 @@
+
+USING: accessors ui L-system ;
+
+IN: L-system.models.abop-2
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: abop-2 ( <L-system> -- <L-system> )
+
+  L-parser-dialect >>commands
+
+  [ 30 >>angle ] >>turtle-values
+
+  "c(12)FAL" >>axiom
+
+  {
+    { "A" "F [&'(.7)!BL] >(137) [&'(.6)!BL] >(137) '(.9) !(.9) A" }
+    
+    { "B" "F [- '(.7) !(.9) $ C L] '(.9) !(.9) C" }
+    { "C" "F [+ '(.7) !(.9) $ B L] '(.9) !(.9) B" }
+
+    { "L" "~c(8){+f(.1)-f(.1)-f(.1)+|+f(.1)-f(.1)-f(.1)}" }
+
+  } >>rules ;
+
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: main ( -- ) [ L-system abop-2 "L-system" open-window ] with-ui ;
+
+MAIN: main
diff --git a/extra/L-system/models/abop-3/abop-3.factor b/extra/L-system/models/abop-3/abop-3.factor
new file mode 100644 (file)
index 0000000..f594caf
--- /dev/null
@@ -0,0 +1,27 @@
+
+USING: accessors ui L-system ;
+
+IN: L-system.models.abop-3
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: abop-3 ( <L-system> -- <L-system> )
+
+  L-parser-dialect >>commands
+
+  [ 30 >>angle ] >>turtle-values
+
+  "c(12)FA" >>axiom
+
+ {
+   { "A" "!(.9)t(.4)FB>(94)B>(132)B" }
+   { "B" "[&t(.4)F$A]" }
+   { "F" "'(1.25)F'(.8)" }
+ }
+   >>rules ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: main ( -- ) [ L-system abop-3 "L-system" open-window ] with-ui ;
+
+MAIN: main
diff --git a/extra/L-system/models/abop-4/abop-4.factor b/extra/L-system/models/abop-4/abop-4.factor
new file mode 100644 (file)
index 0000000..71cf32d
--- /dev/null
@@ -0,0 +1,56 @@
+
+USING: accessors ui L-system ;
+
+IN: L-system.models.abop-4
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: abop-4 ( <L-system> -- <L-system> )
+
+  L-parser-dialect >>commands
+
+  [ 18 >>angle ] >>turtle-values
+
+  "c(12)&(20)N" >>axiom
+
+  {
+    {
+      "N"
+      "FII[&(60)rY]>(90)[&(45)'(0.8)rA]>(90)[&(60)rY]>(90)[&(45)'(0.8)rD]!FIK"
+    }
+    { "Y" "[c(4){++l.--l.--l.++|++l.--l.--l.}]" }
+    { "l" "g(.2)l" }
+    { "K" "[!c(2)FF>w>(72)w>(72)w>(72)w>(72)w]" }
+    { "w" "[c(2)^!F][c(5)&(72){-(54)f(3)+(54)f(3)|-(54)f(3)+(54)f(3)}]" }
+    { "f" "_" }
+
+    { "A" "B" }
+    { "B" "C" }
+    { "C" "D" }
+    { "D" "E" }
+    { "E" "G" }
+    { "G" "H" }
+    { "H" "N" }
+
+    { "I" "FoO" }
+    { "O" "FoP" }
+    { "P" "FoQ" }
+    { "Q" "FoR" }
+    { "R" "FoS" }
+    { "S" "FoT" }
+    { "T" "FoU" }
+    { "U" "FoV" }
+    { "V" "FoW" }
+    { "W" "FoX" }
+    { "X" "_" }
+
+    { "o" "$t(-0.03)" }
+    { "r" "~(30)" }
+  }
+    >>rules ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: main ( -- ) [ L-system abop-4 "L-system" open-window ] with-ui ;
+
+MAIN: main
diff --git a/extra/L-system/models/abop-5-angular/abop-5-angular.factor b/extra/L-system/models/abop-5-angular/abop-5-angular.factor
new file mode 100644 (file)
index 0000000..29b1c72
--- /dev/null
@@ -0,0 +1,33 @@
+
+USING: accessors ui L-system ;
+
+IN: L-system.models.abop-5-angular
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: abop-5-angular ( <L-system> -- <L-system> )
+
+  L-parser-dialect >>commands
+
+  "&(90)+(90)a" >>axiom
+
+  {
+    { "a" "F[+(45)l][-(45)l]^;ca" }
+
+    { "l" "j" }
+    { "j" "h" }
+    { "h" "s" }
+    { "s" "d" }
+    { "d" "x" }
+    { "x" "a" }
+
+    { "F" "'(1.17)F'(.855)" }
+  }
+    >>rules ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: main ( -- ) [ L-system abop-5-angular "L-system" open-window ] with-ui ;
+
+MAIN: main
+  
\ No newline at end of file
diff --git a/extra/L-system/models/abop-5/abop-5.factor b/extra/L-system/models/abop-5/abop-5.factor
new file mode 100644 (file)
index 0000000..2e373f7
--- /dev/null
@@ -0,0 +1,35 @@
+
+USING: accessors ui L-system ;
+
+IN: L-system.models.abop-5
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: abop-5 ( <L-system> -- <L-system> )
+
+  L-parser-dialect >>commands
+
+  [ 5 >>angle ] >>turtle-values
+
+  "a" >>axiom
+
+  {
+    { "a" "F[+(45)l][-(45)l]^;ca" }
+
+    { "l" "j" }
+    { "j" "h" }
+    { "h" "s" }
+    { "s" "d" }
+    { "d" "x" }
+    { "x" "a" }
+
+    { "F" "'(1.17)F'(.855)" }
+  }
+    >>rules ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: main ( -- ) [ L-system abop-5 "L-system" open-window ] with-ui ;
+
+MAIN: main
+  
\ No newline at end of file
diff --git a/extra/L-system/models/abop-6/abop-6.factor b/extra/L-system/models/abop-6/abop-6.factor
new file mode 100644 (file)
index 0000000..0639d53
--- /dev/null
@@ -0,0 +1,34 @@
+
+USING: accessors ui L-system ;
+
+IN: L-system.models.abop-6
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: abop-6 ( <L-system> -- <L-system> )
+
+  L-parser-dialect >>commands
+
+  [ 5 >>angle ] >>turtle-values
+
+  ! "&(90)+(90)FFF[-(120)'(.6)x][-(60)'(.8)x][+(120)'(.6)x][+(60)'(.8)x]x"
+  "FFF[-(120)'(.6)x][-(60)'(.8)x][+(120)'(.6)x][+(60)'(.8)x]x"
+  >>axiom
+
+  {
+    { "a" "F[cdx][cex]F!(.9)a" }
+    { "x" "a" }
+
+    { "d" "+d" }
+    { "e" "-e" }
+
+    { "F" "'(1.25)F'(.8)" }
+  }
+    >>rules ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: main ( -- ) [ L-system abop-6 "L-system" open-window ] with-ui ;
+
+MAIN: main
+  
\ No newline at end of file
diff --git a/extra/L-system/models/airhorse/airhorse.factor b/extra/L-system/models/airhorse/airhorse.factor
new file mode 100644 (file)
index 0000000..f65c7b8
--- /dev/null
@@ -0,0 +1,53 @@
+
+USING: accessors ui L-system ;
+
+IN: L-system.models.airhorse
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: airhorse ( <L-system> -- <L-system> )
+
+  L-parser-dialect >>commands
+
+  [ 10 >>angle ] >>turtle-values
+
+  "C" >>axiom
+
+  {
+    { "C" "LBW" }
+
+    { "B" "[[''aH]|[g]]" }
+    { "a" "Fs+;'a" }
+    { "g" "Ft+;'g" }
+    { "s" "[::cc!!!!&&[FFcccZ]^^^^FFcccZ]" }
+    { "t" "[c!!!!&[FF]^^FF]" }
+
+    { "L" "O" }
+    { "O" "P" }
+    { "P" "Q" }
+    { "Q" "R" }
+    { "R" "U" }
+    { "U" "X" }
+    { "X" "Y" }
+    { "Y" "V" }
+    { "V" "[cc!!!&(90)[Zp]|[Zp]]" }
+    { "p" "h>(120)h>(120)h" }
+    { "h" "[+(40)!F'''p]" }
+
+    { "H" "[cccci[>(50)dcFFF][<(50)ecFFF]]" }
+    { "d" "Z!&Z!&:'d" }
+    { "e" "Z!^Z!^:'e" }
+    { "i" "-:/i" }
+
+    { "W" "[%[!!cb][<<<!!cb][>>>!!cb]]" }
+    { "b" "Fl!+Fl+;'b" }
+    { "l" "[-cc{--z++z++z--|--z++z++z}]" }
+  }
+    >>rules ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: main ( -- ) [ L-system airhorse "L-system" open-window ] with-ui ;
+
+MAIN: main
+  
\ No newline at end of file
diff --git a/extra/L-system/models/tree-5/tree-5.factor b/extra/L-system/models/tree-5/tree-5.factor
new file mode 100644 (file)
index 0000000..2647698
--- /dev/null
@@ -0,0 +1,37 @@
+
+USING: accessors ui L-system ;
+
+IN: L-system.models.tree-5
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: tree-5 ( <L-system> -- <L-system> )
+
+  L-parser-dialect >>commands
+
+  [ 5 >>angle ] >>turtle-values
+
+  "c(4)FFS" >>axiom
+
+  {
+    { "S" "FFR>(60)R>(60)R>(60)R>(60)R>(60)R>(30)S" }
+    { "R" "[Ba]" }
+    { "a" "$tF[Cx]Fb" }
+    { "b" "$tF[Dy]Fa" }
+    { "B" "&B" }
+    { "C" "+C" }
+    { "D" "-D" }
+
+    { "x" "a" }
+    { "y" "b" }
+
+    { "F" "'(1.25)F'(.8)" }
+  }
+    >>rules ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: main ( -- ) [ L-system tree-5 "L-system" open-window ] with-ui ;
+
+MAIN: main
+  
\ No newline at end of file
index 383812e602721e12807e57e9615d5d1aabca881a..fbdfa9c66bb41397f312da904873c51c41efbf1b 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 James Cash
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel sequences symbols fry words assocs linked-assocs tools.annotations
+USING: kernel sequences fry words assocs linked-assocs tools.annotations
 coroutines lexer parser quotations arrays namespaces continuations ;
 IN: advice
 
index 1908e28d39365d30ecb350a51850e15bca3ea173..3d46e06b686476fee5fff46818571d04e0a060ff 100755 (executable)
@@ -30,7 +30,7 @@ USING: asn1 asn1.ldap io io.streams.string tools.test ;
     ] unit-test
 
     [ B{ 133 6 97 98 99 100 101 102 } ] [ 
-        5 "abcdef" >ber-contextspecific 
+        5 "abcdef" >ber-contextspecific-string 
     ] unit-test
 
     ! triggers array
@@ -45,7 +45,7 @@ USING: asn1 asn1.ldap io io.streams.string tools.test ;
     ] unit-test
 
     [ B{ 160 4 49 50 51 52 } ] [ 
-        { 1 2 3 4 } >ber-contextspecific 
+        { 1 2 3 4 } >ber-contextspecific-array
     ] unit-test
 
 ] with-ber
index b087d3ae2baf47636c91feeb0af739f31ba59bb5..2b96d2a4f4e02dde9f33c783815b61a9f609480c 100644 (file)
@@ -7,6 +7,24 @@ math.parser namespaces make pack strings sequences accessors ;
 
 IN: asn1
 
+<PRIVATE
+
+: (>128-ber) ( n -- )
+    dup 0 > [
+        [ HEX: 7f bitand HEX: 80 bitor , ] keep -7 shift
+        (>128-ber)
+    ] [
+        drop
+    ] if ;
+
+PRIVATE>
+
+: >128-ber ( n -- str )
+    [
+        [ HEX: 7f bitand , ] keep -7 shift
+        (>128-ber)
+    ] { } make reverse ;
+
 : tag-classes ( -- seq )
     { "universal" "application" "context_specific" "private" } ;
 
@@ -191,8 +209,7 @@ M: string >ber ( str -- byte-array )
 : >ber-application-string ( n str -- byte-array )
     [ HEX: 40 + set-tag ] dip >ber ;
 
-GENERIC: >ber-contextspecific ( n obj -- byte-array )
-M: string >ber-contextspecific ( n str -- byte-array )
+: >ber-contextspecific-string ( n str -- byte-array )
     [ HEX: 80 + set-tag ] dip >ber ;
 
 ! =========================================================
@@ -215,5 +232,5 @@ M: array >ber ( array -- byte-array )
 : >ber-appsequence ( array -- byte-array )
     HEX: 60 >ber-seq-internal ;
 
-M: array >ber-contextspecific ( array -- byte-array )
+: >ber-contextspecific-array ( array -- byte-array )
     HEX: A0 >ber-seq-internal ;
diff --git a/extra/assoc-heaps/assoc-heaps-docs.factor b/extra/assoc-heaps/assoc-heaps-docs.factor
deleted file mode 100644 (file)
index 8beaf9c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: help.markup help.syntax io.streams.string ;
-IN: assoc-heaps
-
-HELP: <assoc-heap>
-{ $description "Constructs a new " { $link assoc-heap } " from two existing data structures." } ;
-
-HELP: <unique-max-heap>
-{ $values
-    
-     { "unique-heap" assoc-heap } }
-{ $description "Creates a new " { $link assoc-heap } " where the assoc is a hashtable and the heap is a max-heap. Popping an element from the heap leaves this element in the hashtable to ensure that the element will not be processed again." } ;
-
-HELP: <unique-min-heap>
-{ $values
-     { "unique-heap" assoc-heap } }
-{ $description "Creates a new " { $link assoc-heap } " where the assoc is a hashtable and the heap is a min-heap. Popping an element from the heap leaves this element in the hashtable to ensure that the element will not be processed again." } ;
-
-{ <unique-max-heap> <unique-min-heap> } related-words
-
-HELP: assoc-heap
-{ $description "A data structure containing an assoc and a heap to get certain properties with better time constraints at the expense of more space and complexity. For instance, a hashtable and a heap can be combined into one assoc-heap to get a sorted data structure with O(1) lookup. Operations on assoc-heap may update both the assoc and the heap or leave them out of sync if it's advantageous." } ;
-
-ARTICLE: "assoc-heaps" "Associative heaps"
-"The " { $vocab-link "assoc-heaps" } " vocabulary combines exists to synthesize data structures with better time properties than either of the two component data structures alone." $nl
-"Associative heap constructor:"
-{ $subsection <assoc-heap> }
-"Unique heaps:"
-{ $subsection <unique-min-heap> }
-{ $subsection <unique-max-heap> } ;
-
-ABOUT: "assoc-heaps"
diff --git a/extra/assoc-heaps/assoc-heaps-tests.factor b/extra/assoc-heaps/assoc-heaps-tests.factor
deleted file mode 100644 (file)
index 6ea3fe1..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test assoc-heaps ;
-IN: assoc-heaps.tests
diff --git a/extra/assoc-heaps/assoc-heaps.factor b/extra/assoc-heaps/assoc-heaps.factor
deleted file mode 100644 (file)
index a495aed..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors assocs hashtables heaps kernel ;
-IN: assoc-heaps
-
-TUPLE: assoc-heap assoc heap ;
-
-C: <assoc-heap> assoc-heap
-
-: <unique-min-heap> ( -- unique-heap )
-    H{ } clone <min-heap> <assoc-heap> ;
-
-: <unique-max-heap> ( -- unique-heap )
-    H{ } clone <max-heap> <assoc-heap> ;
-
-M: assoc-heap heap-push* ( value key assoc-heap -- entry )
-    pick over assoc>> key? [
-        3drop f
-    ] [
-        [ assoc>> swapd set-at ] [ heap>> heap-push* ] 3bi
-    ] if ;
-
-M: assoc-heap heap-pop ( assoc-heap -- value key )
-    heap>> heap-pop ;
-
-M: assoc-heap heap-peek ( assoc-heap -- value key )
-    heap>> heap-peek ;
-
-M: assoc-heap heap-empty? ( assoc-heap -- value key )
-    heap>> heap-empty? ;
diff --git a/extra/assoc-heaps/authors.txt b/extra/assoc-heaps/authors.txt
deleted file mode 100644 (file)
index b4bd0e7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
\ No newline at end of file
diff --git a/extra/assocs/lib/authors.txt b/extra/assocs/lib/authors.txt
deleted file mode 100644 (file)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/extra/assocs/lib/lib-tests.factor b/extra/assocs/lib/lib-tests.factor
deleted file mode 100644 (file)
index c7e1aa4..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-USING: kernel tools.test sequences vectors assocs.lib ;
-IN: assocs.lib.tests
-
-{ 1 1 } [ [ ?push ] histogram ] must-infer-as
-
-! substitute
-[ { 2 } ] [ { 1 } H{ { 1 2 } } [ ?at drop ] curry map ] unit-test
-[ { 3 } ] [ { 3 } H{ { 1 2 } } [ ?at drop ] curry map ] unit-test
-
-[ 2 ] [ 1 H{ { 1 2 } } [ ] [ ] if-at ] unit-test
-[ 3 ] [ 3 H{ { 1 2 } } [ ] [ ] if-at ] unit-test
-
-[ "hi" ] [ 1 H{ { 1 2 } } [ drop "hi" ] when-at ] unit-test
-[ 3 ] [ 3 H{ { 1 2 } } [ drop "hi" ] when-at ] unit-test
-[ 2 ] [ 1 H{ { 1 2 } } [ drop "hi" ] unless-at ] unit-test
-[ "hi" ] [ 3 H{ { 1 2 } } [ drop "hi" ] unless-at ] unit-test
-
diff --git a/extra/assocs/lib/lib.factor b/extra/assocs/lib/lib.factor
deleted file mode 100755 (executable)
index f1b018f..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-USING: arrays assocs kernel vectors sequences namespaces
-       random math.parser math fry ;
-
-IN: assocs.lib
-
-: set-assoc-stack ( value key seq -- )
-    dupd [ key? ] with find-last nip set-at ;
-
-: at-default ( key assoc -- value/key )
-    dupd at [ nip ] when* ;
-
-: replace-at ( assoc value key -- assoc )
-    [ dupd 1vector ] dip rot set-at ;
-
-: peek-at* ( assoc key -- obj ? )
-    swap at* dup [ [ peek ] dip ] when ;
-
-: peek-at ( assoc key -- obj )
-    peek-at* drop ;
-
-: >multi-assoc ( assoc -- new-assoc )
-    [ 1vector ] assoc-map ;
-
-: multi-assoc-each ( assoc quot -- )
-    [ with each ] curry assoc-each ; inline
-
-: insert ( value variable -- ) namespace push-at ;
-
-: generate-key ( assoc -- str )
-    [ 32 random-bits >hex ] dip
-    2dup key? [ nip generate-key ] [ drop ] if ;
-
-: set-at-unique ( value assoc -- key )
-    dup generate-key [ swap set-at ] keep ;
-
-: histogram ( assoc quot -- assoc' )
-    H{ } clone [
-        swap [ change-at ] 2curry assoc-each
-    ] keep ; inline
-
-: ?at ( obj assoc -- value/obj ? )
-    dupd at* [ [ nip ] [ drop ] if ] keep ;
-
-: if-at ( obj assoc quot1 quot2 -- )
-    [ ?at ] 2dip if ; inline
-
-: when-at ( obj assoc quot -- ) [ ] if-at ; inline
-
-: unless-at ( obj assoc quot -- ) [ ] swap if-at ; inline
diff --git a/extra/assocs/lib/summary.txt b/extra/assocs/lib/summary.txt
deleted file mode 100644 (file)
index 24c2825..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Non-core assoc words
diff --git a/extra/assocs/lib/tags.txt b/extra/assocs/lib/tags.txt
deleted file mode 100644 (file)
index 42d711b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-collections
index 9210097cabcace5da5beb5ba343a304deb36579f..def71e7e6702560b2073dfbdbbf411fcd6a67996 100644 (file)
@@ -15,7 +15,7 @@ USING: kernel namespaces math quotations arrays hashtables sequences threads
        ui.gadgets.theme
        ui.gadgets.handler
        accessors
-       namespaces.lib assocs.lib vars
+       vars fry
        rewrite-closures automata math.geometry.rect newfx ;
 
 IN: automata.ui
@@ -24,9 +24,9 @@ IN: automata.ui
 
 : draw-point ( y x value -- ) 1 = [ swap glVertex2i ] [ 2drop ] if ;
 
-: draw-line ( y line -- ) 0 swap [ >r 2dup r> draw-point 1+ ] each 2drop ;
+: draw-line ( y line -- ) 0 swap [ [ 2dup ] dip draw-point 1+ ] each 2drop ;
 
-: (draw-bitmap) ( bitmap -- ) 0 swap [ >r dup r> draw-line 1+ ] each drop ;
+: (draw-bitmap) ( bitmap -- ) 0 swap [ [ dup ] dip draw-line 1+ ] each drop ;
 
 : draw-bitmap ( bitmap -- ) GL_POINTS glBegin (draw-bitmap) glEnd ;
 
@@ -46,9 +46,9 @@ VAR: slate
 
 ! Create a quotation that is appropriate for buttons and gesture handler.
 
-: view-action ( quot -- quot ) [ drop [ ] with-view ] make* closed-quot ;
+: view-action ( quot -- quot ) '[ drop _ with-view ] closed-quot ;
 
-: view-button ( label quot -- ) >r <label> r> view-action <bevel-button> ;
+: view-button ( label quot -- button ) [ <label> ] dip view-action <bevel-button> ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
diff --git a/extra/bake/authors.txt b/extra/bake/authors.txt
deleted file mode 100644 (file)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/extra/bake/bake-tests.factor b/extra/bake/bake-tests.factor
deleted file mode 100644 (file)
index 64329de..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-
-USING: kernel tools.test bake ;
-
-IN: bake.tests
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: unit-test* ( input output -- ) swap unit-test ;
-
-: must-be-t ( in -- ) [ t ] swap unit-test ;
-: must-be-f ( in -- ) [ f ] swap unit-test ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-[ 10 20 30 `{ , , , } ] [ { 10 20 30 } ] unit-test*
-
-[ 10 20 30 `{ , { , } , } ] [ { 10 { 20 } 30 } ] unit-test*
-
-[ 10 { 20 21 22 } 30 `{ , , , } ] [ { 10 { 20 21 22 } 30 } ] unit-test*
-
-[ 10 { 20 21 22 } 30 `{ , @ , } ] [ { 10 20 21 22 30 } ] unit-test*
-
-[ { 1 2 3 } `{ @ } ] [ { 1 2 3 } ] unit-test*
-
-[ { 1 2 3 } { 4 5 6 } { 7 8 9 } `{ @ @ @ } ]
-[ { 1 2 3 4 5 6 7 8 9 } ]
-unit-test*
-
diff --git a/extra/bake/bake.factor b/extra/bake/bake.factor
deleted file mode 100644 (file)
index ef4b9d2..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-
-USING: kernel parser namespaces sequences quotations arrays vectors splitting
-       strings words math generalizations
-       macros combinators.lib combinators.conditional newfx ;
-
-IN: bake
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYMBOL: ,
-SYMBOL: @
-
-: comma? ( obj -- ? ) , = ;
-: atsym? ( obj -- ? ) @ = ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-DEFER: [bake]
-
-: broil-element ( obj -- quot )
-    {
-      { [ comma?    ] [ drop [ >r ]          ] }
-      { [ f =       ] [ [ >r ] prefix-on     ] }
-      { [ integer?  ] [ [ >r ] prefix-on     ] }
-      { [ string?   ] [ [ >r ] prefix-on     ] }
-      { [ sequence? ] [ [bake] [ >r ] append ] }
-      { [ word?     ] [ literalize [ >r ] prefix-on ] }
-      { [ drop t    ] [ [ >r ] prefix-on     ] }
-    }
-  1cond ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: constructor ( seq -- quot )
-    {
-      { [ array? ]     [ length [ narray ] prefix-on ] }
-!      { [ quotation? ] [ length [ ncurry ] prefix-on [ ] prefix ] }
-      { [ quotation? ] [ length [ narray >quotation ] prefix-on ] }
-      { [ vector? ]    [ length [ narray >vector    ] prefix-on ] }
-    }
-  1cond ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: [broil] ( seq -- quot )
-    [ reverse [ broil-element ] map concat ]
-    [ length  [ drop [ r> ]   ] map concat ]
-    [ constructor ]
-  tri append append
-  >quotation ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYMBOL: saved-sequence
-
-: [connector] ( -- quot )
-  saved-sequence get quotation? [ [ compose ] ] [ [ append ] ] if ;
-
-: [starter] ( -- quot )
-  saved-sequence get
-    {
-      { [ quotation? ] [ drop [  [ ] ] ] }
-      { [ array?     ] [ drop [  { } ] ] }
-      { [ vector?    ] [ drop [ V{ } ] ] }
-    }
-  1cond ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: [simmer] ( seq -- quot )
-
-  dup saved-sequence set
-
-  { @ } split reverse
-    [ [ [bake] [connector] append [ >r ] append ] map concat ]
-    [ length [ drop [ r> ] [connector] append   ] map concat ]
-  bi
-
-  >r 1 invert-index pluck r> ! remove the last append/compose
-
-  [starter] prepend
-
-  append ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: [bake] ( seq -- quot ) [ @ member? ] [ [simmer] ] [ [broil] ] 1if ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-MACRO: bake ( seq -- quot ) [bake] ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-:  `{ \ } [ >array     ] parse-literal \ bake parsed ; parsing
-: `V{ \ } [ >vector    ] parse-literal \ bake parsed ; parsing
-:  `[ \ ] [ >quotation ] parse-literal \ bake parsed ; parsing
\ No newline at end of file
diff --git a/extra/bake/fry/fry-tests.factor b/extra/bake/fry/fry-tests.factor
deleted file mode 100755 (executable)
index 74408dc..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-
-USING: tools.test math prettyprint kernel io arrays vectors sequences
-       generalizations bake bake.fry ;
-
-IN: bake.fry.tests
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: unit-test* ( input output -- ) swap unit-test ;
-
-: must-be-t ( in -- ) [ t ] swap unit-test ;
-: must-be-f ( in -- ) [ f ] swap unit-test ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-[ [ 3 + ] ] [ 3 '[ , + ] ] unit-test
-
-[ [ 1 3 + ] ] [ 1 3 '[ , , + ] ] unit-test
-
-[ [ 1 + ] ] [ 1 [ + ] '[ , @ ] ] unit-test
-
-[ [ 1 + . ] ] [ 1 [ + ] '[ , @ . ] ] unit-test
-
-[ [ + - ] ] [ [ + ] [ - ] '[ @ @ ] ] unit-test
-
-[ [ "a" write "b" print ] ]
-[ "a" "b" '[ , write , print ] ] unit-test
-
-[ [ 1 2 + 3 4 - ] ]
-[ [ + ] [ - ] '[ 1 2 @ 3 4 @ ] ] unit-test
-
-[ 1/2 ] [
-    1 '[ , _ / ] 2 swap call
-] unit-test
-
-[ { { 1 "a" "A" } { 1 "b" "B" } { 1 "c" "C" } } ] [
-    1 '[ , _ _ 3array ]
-    { "a" "b" "c" } { "A" "B" "C" } rot 2map
-] unit-test
-
-[ { { 1 "a" } { 1 "b" } { 1 "c" } } ] [
-    '[ 1 _ 2array ]
-    { "a" "b" "c" } swap map
-] unit-test
-
-[ 1 2 ] [
-    1 2 '[ _ , ] call
-] unit-test
-
-[ { { 1 "a" 2 } { 1 "b" 2 } { 1 "c" 2 } } ] [
-    1 2 '[ , _ , 3array ]
-    { "a" "b" "c" } swap map
-] unit-test
-
-: funny-dip '[ @ _ ] call ; inline
-
-[ "hi" 3 ] [ "h" "i" 3 [ append ] funny-dip ] unit-test
-
-[ { 1 2 3 } ] [
-    3 1 '[ , [ , + ] map ] call
-] unit-test
-
-[ { 1 { 2 { 3 } } } ] [
-    1 2 3 '[ , [ , [ , 1array ] call 2array ] call 2array ] call
-] unit-test
-
-{ 1 1 } [ '[ [ [ , ] ] ] ] must-infer-as
-
-[ { { { 3 } } } ] [
-    3 '[ [ [ , 1array ] call 1array ] call 1array ] call
-] unit-test
-
-[ { { { 3 } } } ] [
-    3 '[ [ [ , 1array ] call 1array ] call 1array ] call
-] unit-test
-
-! [ 10 20 30 40 '[ , V{ , { , } } , ] ] [ [ 10 V{ 20 { 30 } } 40 ] ] unit-test*
-
-[ 10 20 30 40 '[ , V{ , { , } } , ] ]
-[ [ 10 20 30 >r r> 1 narray >r >r r> r> 2 narray >vector 40 ] ]
-unit-test*
-
-[ { 1 2 3 } { 4 5 6 } { 7 8 9 } '[ , { V{ @ } { , } } ] call ]
-[
-  { 1 2 3 }
-  { V{ 4 5 6 } { { 7 8 9 } } }
-]
-unit-test*
-
diff --git a/extra/bake/fry/fry.factor b/extra/bake/fry/fry.factor
deleted file mode 100644 (file)
index d82500e..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-
-USING: kernel combinators arrays vectors quotations sequences splitting
-       parser macros sequences.deep
-       combinators.short-circuit combinators.conditional bake newfx ;
-
-IN: bake.fry
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYMBOL: _
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-DEFER: (shallow-fry)
-DEFER: shallow-fry
-
-: ((shallow-fry)) ( accum quot adder -- result )
-  >r shallow-fry r>
-  append swap dup empty?
-    [ drop ]
-    [ [ prepose ] curry append ]
-  if ; inline
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: (shallow-fry) ( accum quot -- result )
-  dup empty?
-    [ drop 1quotation ]
-    [
-      unclip
-        {
-          { \ , [ [ curry   ] ((shallow-fry)) ] }
-          { \ @ [ [ compose ] ((shallow-fry)) ] }
-          [ swap >r suffix r> (shallow-fry) ]
-        }
-      case
-    ]
-  if ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: shallow-fry ( quot -- quot' ) [ ] swap (shallow-fry) ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: deep-fry ( quot -- quot )
-  { _ } split1-last dup
-    [
-      shallow-fry [ >r ] rot
-      deep-fry    [ [ dip ] curry r> compose ] 4array concat
-    ]
-    [ drop shallow-fry ]
-  if ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: bakeable? ( obj -- ? ) { [ array? ] [ vector? ] } 1|| ;
-
-: fry-specifier? ( obj -- ? ) { , @ } member-of? ;
-
-: count-inputs ( quot -- n ) flatten [ fry-specifier? ] count ;
-
-: commas ( n -- seq ) , <repetition> ;
-
-: [fry] ( quot -- quot' )
-    [
-        {
-          { [ callable? ] [ [ count-inputs commas ] [ [fry]  ] bi append ] }
-          { [ bakeable? ] [ [ count-inputs commas ] [ [bake] ] bi append ] }
-          { [ drop t    ] [ 1quotation                                   ] }
-        }
-      1cond
-    ]
-  map concat deep-fry ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-MACRO: fry ( seq -- quot ) [fry] ;
-
-: '[ \ ] [ >quotation ] parse-literal \ fry parsed ; parsing
diff --git a/extra/bake/summary.txt b/extra/bake/summary.txt
deleted file mode 100644 (file)
index cfc944a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Bake is similar to make but with additional features
index a409c9781546b24bf1ea43d0ffc59e54d334f9f1..0f8b5581dfe582ff2d413527f2bd29a0b407e89d 100644 (file)
@@ -20,7 +20,7 @@ C: <transaction> transaction
 : balance>> ( account -- balance ) transactions>> total ;
 
 : open-account ( name interest-rate interest-payment-day opening-date opening-balance -- account )
-    >r [ <account> ] keep r> "Account Opened" <transaction> >>transaction ;
+    [ [ <account> ] keep ] dip "Account Opened" <transaction> >>transaction ;
 
 : daily-rate ( yearly-rate day -- daily-rate )
     days-in-year / ;
@@ -56,7 +56,7 @@ C: <transaction> transaction
 
 : each-day ( quot start end -- )
     2dup before? [
-        >r dup >r over >r swap call r> r> 1 days time+ r> each-day
+        [ dup [ over [ swap call ] dip ] dip 1 days time+ ] dip each-day
     ] [
         3drop
     ] if ;
index 1018e643eff9c8d6acc4319d3778ab033d098f43..5883836b7dbb229055bd4ab35f841bc127e89377 100644 (file)
@@ -1,9 +1,16 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: binary-search math.primes.list math.ranges sequences
-prettyprint ;
+USING: binary-search compiler.units kernel math.primes math.ranges
+memoize prettyprint sequences ;
 IN: benchmark.binary-search
 
+[
+    MEMO: primes-under-million ( -- seq ) 1000000 primes-upto ;
+] with-compilation-unit
+
+! Force computation of the primes list before benchmarking the binary search
+primes-under-million drop
+
 : binary-search-benchmark ( -- )
     1 1000000 [a,b] [ primes-under-million sorted-member? ] map length . ;
 
index f562072f280e5d74c61b66029ad2699a6eefb4c1..8e3918656a42c14614c62c6cedef05a4e0845515 100644 (file)
@@ -10,8 +10,8 @@ C: <tree-node> tree-node
     dup 0 > [
         1 -
         [ drop ]
-        [ >r 2 * 1 - r> bottom-up-tree ]
-        [ >r 2 *     r> bottom-up-tree ] 2tri
+        [ [ 2 * 1 - ] dip bottom-up-tree ]
+        [ [ 2 *     ] dip bottom-up-tree ] 2tri
     ] [
         drop f f
     ] if <tree-node> ; inline recursive
index 0e5482da303678f9c395d6dd87b15f21e27aef48..2fea4eb1f198062a23bf50dc5c995f7fa002e0df 100755 (executable)
@@ -1,10 +1,10 @@
 USING: checksums checksums.crc32 io.encodings.ascii io.files kernel math ;
 IN: benchmark.crc32
 
-: crc32-primes-list ( -- )
+: crc32-file ( -- )
     10 [
-        "resource:extra/math/primes/list/list.factor"
+        "resource:basis/mime/multipart/multipart-tests.factor"
         crc32 checksum-file drop
     ] times ;
 
-MAIN: crc32-primes-list
+MAIN: crc32-file
index 7b8e2d34c98b55662ebf9d726310a7657fdda459..7e65059643f6ff17d237dee32baeed49b68cb77c 100644 (file)
@@ -29,7 +29,7 @@ IN: benchmark.knucleotide
 : small-groups ( x n -- b )
     swap
     [ length swap - 1+ ] 2keep
-    [ >r over + r> subseq ] 2curry map ;
+    [ [ over + ] dip subseq ] 2curry map ;
 
 : handle-table ( inputs n -- )
     small-groups
index 218f566eda96bd24a8db9ce94ac84d1614b67be0..edc848a0caabde94b9f3959382070980d670af05 100644 (file)
@@ -2,7 +2,7 @@ USING: math math.order kernel arrays byte-arrays sequences
 colors.hsv benchmark.mandel.params accessors colors ;
 IN: benchmark.mandel.colors
 
-: scale 255 * >fixnum ; inline
+: scale ( x -- y ) 255 * >fixnum ; inline
 
 : scale-rgb ( rgba -- n )
     [ red>> scale ] [ green>> scale ] [ blue>> scale ] tri 3byte-array ;
index 64a673c8ec9faa7df8520f6f5fec69a30dc17422..1da3d91c61ef4ac7bfa15702ba5140f2b3f6c152 100755 (executable)
@@ -1,12 +1,13 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: io kernel math math.functions sequences prettyprint
-io.files io.encodings io.encodings.ascii io.encodings.binary fry
-benchmark.mandel.params benchmark.mandel.colors ;
+io.files io.files.temp io.encodings io.encodings.ascii
+io.encodings.binary fry benchmark.mandel.params
+benchmark.mandel.colors ;
 IN: benchmark.mandel
 
-: x-inc width  200000 zoom-fact * / ; inline
-: y-inc height 150000 zoom-fact * / ; inline
+: x-inc ( -- x ) width  200000 zoom-fact * / ; inline
+: y-inc ( -- y ) height 150000 zoom-fact * / ; inline
 
 : c ( i j -- c )
     [ x-inc * center real-part x-inc width 2 / * - + >float ]
index 8a259c121789503676b66df2a1510ddc9824d787..24578ec677a799c8760155ddb921967ed50de0c7 100644 (file)
@@ -1,7 +1,7 @@
 USING: checksums checksums.md5 io.files kernel ;
 IN: benchmark.md5
 
-: md5-primes-list ( -- )
-    "resource:extra/math/primes/list/list.factor" md5 checksum-file drop ;
+: md5-file ( -- )
+    "resource:basis/mime/multipart/multipart-tests.factor" md5 checksum-file drop ;
 
-MAIN: md5-primes-list
+MAIN: md5-file
index 305fc2e33ba1e76f059346d44f715118f903870e..37c4fc43c5a8cc5892b760b881832f10572e6356 100644 (file)
@@ -1,11 +1,11 @@
-! Copyright (C) 2008 Slava Pestov.
+! Copyright (C) 2008, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors specialized-arrays.double fry kernel locals make math
-math.constants math.functions math.vectors prettyprint
+USING: accessors specialized-arrays.double fry kernel locals math
+math.constants math.functions math.vectors prettyprint combinators.smart
 sequences hints arrays ;
 IN: benchmark.nbody
 
-: solar-mass 4 pi sq * ; inline
+: solar-mass ( -- x ) 4 pi sq * ; inline
 : days-per-year 365.24 ; inline
 
 TUPLE: body
@@ -53,7 +53,7 @@ TUPLE: nbody-system { bodies array read-only } ;
     offset-momentum drop ; inline
 
 : <nbody-system> ( -- system )
-    [ <sun> , <jupiter> , <saturn> , <uranus> , <neptune> , ] { } make nbody-system boa
+    [ <sun> <jupiter> <saturn> <uranus> <neptune> ] output>array nbody-system boa
     dup bodies>> init-bodies ; inline
 
 :: each-pair ( bodies pair-quot: ( other-body body -- ) each-quot: ( body -- ) -- )
index ddb70972b9df1757d47e6abdd71c9475a167c801..246a962a55b554e00e8b4b1e239a4dbb222162c1 100644 (file)
@@ -6,7 +6,7 @@ bit-arrays make io ;
     2dup length >= [
         3drop
     ] [
-        f 2over set-nth-unsafe >r over + r> clear-flags
+        f 2over set-nth-unsafe [ over + ] dip clear-flags
     ] if ; inline recursive
 
 : (nsieve-bits) ( count i seq -- count )
@@ -14,7 +14,7 @@ bit-arrays make io ;
         2dup nth-unsafe [
             over dup 2 * pick clear-flags
             rot 1+ -rot ! increment count
-        ] when >r 1+ r> (nsieve-bits)
+        ] when [ 1+ ] dip (nsieve-bits)
     ] [
         2drop
     ] if ; inline recursive
index 11745e4463f67bc22d96cffd74777d2d6cdf5ce3..bbeccf750b3fca290c370e98b9901cb377752cd4 100644 (file)
@@ -6,7 +6,7 @@ byte-arrays make io ;
     2dup length >= [
         3drop
     ] [
-        0 2over set-nth-unsafe >r over + r> clear-flags
+        0 2over set-nth-unsafe [ over + ] dip clear-flags
     ] if ; inline recursive
 
 : (nsieve) ( count i seq -- count )
@@ -14,7 +14,7 @@ byte-arrays make io ;
         2dup nth-unsafe 0 > [
             over dup 2 * pick clear-flags
             rot 1+ -rot ! increment count
-        ] when >r 1+ r> (nsieve)
+        ] when [ 1+ ] dip (nsieve)
     ] [
         2drop
     ] if ; inline recursive
index 76d991f7347f387d1192748b06a2e53222301cdc..6fbc144e8078ba76573de611446d0560cda9893e 100644 (file)
@@ -6,7 +6,7 @@ arrays make io ;
     2dup length >= [
         3drop
     ] [
-        f 2over set-nth-unsafe >r over + r> clear-flags
+        f 2over set-nth-unsafe [ over + ] dip clear-flags
     ] if ; inline recursive
 
 : (nsieve) ( count i seq -- count )
@@ -14,7 +14,7 @@ arrays make io ;
         2dup nth-unsafe [
             over dup 2 * pick clear-flags
             rot 1+ -rot ! increment count
-        ] when >r 1+ r> (nsieve)
+        ] when [ 1+ ] dip (nsieve)
     ] [
         2drop
     ] if ; inline recursive
index 985c9a59b24477dd9f542290990bbe040d8a0cd2..d2eb4cdab516be55c12187715c799d1585e000b2 100755 (executable)
@@ -1,4 +1,5 @@
-USING: io.files io.encodings.ascii random math.parser io math ;
+USING: io io.files io.files.temp io.encodings.ascii random
+math.parser math ;
 IN: benchmark.random
 
 : random-numbers-path ( -- path )
index 7fe46e9c367783af1786e7ac4b66b8246fbe61cd..c16e47846efb16c13f719e8e49d3b1ea4ad850e3 100755 (executable)
@@ -2,8 +2,9 @@
 ! http://www.ffconsultancy.com/free/ray_tracer/languages.html
 
 USING: arrays accessors specialized-arrays.double io io.files
-io.encodings.binary kernel math math.functions math.vectors
-math.parser make sequences sequences.private words hints ;
+io.files.temp io.encodings.binary kernel math math.functions
+math.vectors math.parser make sequences sequences.private words
+hints ;
 IN: benchmark.raytracer
 
 ! parameters
index 665cbba30d60d9b5f234f7cb25f18aab0fc5ffd5..4147ffabdfa06657cd07c125cb56ac1ee1c111cc 100755 (executable)
@@ -1,7 +1,9 @@
-USING: io io.files io.streams.duplex kernel sequences
-sequences.private strings vectors words memoize splitting
-grouping hints tr continuations io.encodings.ascii
-unicode.case ;
+! Copyright (C) 2006, 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: io io.files io.files.temp io.streams.duplex kernel
+sequences sequences.private strings vectors words memoize
+splitting grouping hints tr continuations io.encodings.ascii
+ascii ;
 IN: benchmark.reverse-complement
 
 TR: trans-map ch>upper "ACGTUMRYKVHDB" "TGCAAKYRMBDHV" ;
index d5ff5673c2f5f120dfbfdb7aec1c77af41ead77e..585368e836b2190d68d9d4feea5d48dfb386e7a6 100644 (file)
@@ -1,7 +1,7 @@
 USING: checksums checksums.sha1 io.files kernel ;
 IN: benchmark.sha1
 
-: sha1-primes-list ( -- )
-    "resource:extra/math/primes/list/list.factor" sha1 checksum-file drop ;
+: sha1-file ( -- )
+    "resource:basis/mime/multipart/multipart-tests.factor" sha1 checksum-file drop ;
 
-MAIN: sha1-primes-list
+MAIN: sha1-file
index a61293cd995025e006dfb9293f2ff2a76276c973..a32a98a13308e0d2a0aa0f30ba47026e562c379f 100644 (file)
@@ -1,6 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io.encodings.utf8 io.files kernel sequences xml ;
+USING: io.encodings.utf8 io.directories io.files kernel
+sequences xml ;
 IN: benchmark.xml
 
 : xml-benchmark ( -- )
diff --git a/extra/bind-in/bind-in.factor b/extra/bind-in/bind-in.factor
deleted file mode 100644 (file)
index 78c797d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-
-USING: kernel parser lexer locals.parser locals.types ;
-
-IN: bind-in
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: ->
-  "[" parse-tokens make-locals dup push-locals
-  \ ] (parse-lambda) <lambda>
-  parsed-lambda
-  \ call parsed ; parsing
\ No newline at end of file
diff --git a/extra/bitfields/authors.txt b/extra/bitfields/authors.txt
deleted file mode 100644 (file)
index f990dd0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Daniel Ehrenberg
diff --git a/extra/bitfields/bitfields-docs.factor b/extra/bitfields/bitfields-docs.factor
deleted file mode 100644 (file)
index ae67023..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-USING: help.markup help.syntax ;
-IN: bitfields
-
-HELP: BITFIELD:
-{ $syntax "BITFIELD: name slot:size... ;" }
-{ $values { "name" "name of bitfield" }  { "slot" "names of slots" } { "size" "sizes of slots" } }
-{ $description "Creates a new bitfield specification, with the constructor <name> and slot accessors of the form name-slot. Slots' values can be changed by words of the form with-name-slot, with the stack effect " { $code "( newvalue bitfield -- newbitfield )" } ". The slots have the amount of space specified, in bits, after the colon. The constructor and setters do not check to make sure there is no overflow, and any inappropriately high value (except in the first field) will corrupt the bitfield. To check overflow, use " { $link POSTPONE: SAFE-BITFIELD: } " instead. Padding can be included by writing the binary number to be used as a pad in the middle of the bitfield specification. The first slot written will have the most significant digits. Note that bitfields do not form a class; they are merely integers. For efficiency across platforms, it is often the best to keep the total size at or below 29, allowing fixnums to be used on all platforms." }
-{ $see-also define-bitfield } ;
-
-HELP: define-bitfield
-{ $values { "classname" "a string" } { "slots" "slot specifications" } }
-{ $description "Defines a bitfield constructor and slot accessors and setters. The workings of these are described in more detail at " { $link POSTPONE: BITFIELD: } ". The slot specifications should be an assoc. Any key which looks like a binary number will be treated as padding." } ;
-
-HELP: SAFE-BITFIELD:
-{ $syntax "SAFE-BITFIELD: name slot:size... ;" }
-{ $values { "name" "name of bitfield" } { "slot" "name of slots" } { "size" "size in bits of slots" } }
-{ $description "Defines a bitfield in the same way as " { $link POSTPONE: BITFIELD: } " but the constructor and slot setters check for overflow." } ;
diff --git a/extra/bitfields/bitfields-tests.factor b/extra/bitfields/bitfields-tests.factor
deleted file mode 100755 (executable)
index bbd4aa3..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-USING: tools.test bitfields kernel ;
-IN: bitfields.tests
-
-SAFE-BITFIELD: foo bar:5 baz:10 111 bing:2 ;
-
-[ 21 ] [ 21 852 3 <foo> foo-bar ] unit-test
-[ 852 ] [ 21 852 3 <foo> foo-baz ] unit-test
-[ 3 ] [ 21 852 3 <foo> foo-bing ] unit-test
-
-[ 23 ] [ 21 852 3 <foo> 23 swap with-foo-bar foo-bar ] unit-test
-[ 855 ] [ 21 852 3 <foo> 855 swap with-foo-baz foo-baz ] unit-test
-[ 1 ] [ 21 852 3 <foo> 1 swap with-foo-bing foo-bing ] unit-test
-
-[ 100 0 0 <foo> ] must-fail
-[ 0 5000 0 <foo> ] must-fail
-[ 0 0 10 <foo> ] must-fail
-
-[ 100 0 with-foo-bar ] must-fail
-[ 5000 0 with-foo-baz ] must-fail
-[ 10 0 with-foo-bing ] must-fail
-
-[ BIN: 00101100000000111111 ] [ BIN: 101 BIN: 1000000001 BIN: 11 <foo> ] unit-test
diff --git a/extra/bitfields/bitfields.factor b/extra/bitfields/bitfields.factor
deleted file mode 100755 (executable)
index 90e588b..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-USING: parser lexer kernel math sequences namespaces make assocs
-summary words splitting math.parser arrays sequences.next
-mirrors generalizations compiler.units ;
-IN: bitfields
-
-! Example:
-! BITFIELD: blah short:16 char:8 nothing:5 ;
-! defines <blah> blah-short blah-char blah-nothing.
-
-! An efficient bitfield has a sum of 29 bits or less
-! so it can fit in a fixnum.
-! No class is defined and there is no overflow checking.
-! The first field is the most significant.
-
-: >ranges ( slots/sizes -- slots/ranges )
-    ! range is { start length }
-    reverse 0 swap [
-        swap >r tuck >r [ + ] keep r> 2array r> swap
-    ] assoc-map nip reverse ;
-
-SYMBOL: safe-bitfields? ! default f; set at parsetime
-
-TUPLE: check< number bound ;
-M: check< summary drop "Number exceeds upper bound" ;
-
-: check< ( num cmp -- num )
-    2dup < [ drop ] [ \ check< boa throw ] if ;
-
-: ?check ( length -- )
-    safe-bitfields? get [ 2^ , \ check< , ] [ drop ] if ;
-
-: put-together ( lengths -- )
-    ! messy because of bounds checking
-    dup length 1- [ \ >r , ] times [ 0 swap ] % [
-        ?check [ \ bitor , , [ shift r> ] % ] when*
-    ] each-next \ bitor , ;
-
-: padding-name? ( string -- ? )
-    [ "10" member? ] all? ;
-
-: pad ( i name -- )
-    bin> , , \ -nrot , ;
-
-: add-padding ( names -- ) 
-    <enum>
-    [ dup padding-name? [ pad ] [ 2drop ] if ] assoc-each ;
-
-: [constructor] ( names lengths -- quot )
-    [ swap add-padding put-together ] [ ] make ;
-
-: define-constructor ( classname slots -- )
-    [ keys ] keep values [constructor]
-    >r in get constructor-word dup save-location r>
-    define ;
-
-: range>accessor ( range -- quot )
-    [
-        dup first neg , \ shift ,
-        second 2^ 1- , \ bitand ,
-    ] [ ] make ;
-
-: [accessors] ( lengths -- accessors )
-    [ range>accessor ] map ;
-
-: clear-range ( range -- num )
-    first2 dupd + [ 2^ 1- ] bi@ bitnot bitor ;
-
-: range>setter ( range -- quot )
-    [
-        \ >r , dup second ?check \ r> ,
-        dup clear-range ,
-        [ bitand >r ] %
-        first , [ shift r> bitor ] %
-    ] [ ] make ;
-
-: [setters] ( lengths -- setters )
-    [ range>setter ] map ;
-
-: parse-slots ( slotspecs -- slots )
-    [ ":" split1 string>number [ dup length ] unless* ] { } map>assoc ;
-
-: define-slots ( prefix names quots -- )
-    >r [ "-" glue create-in ] with map r>
-    [ define ] 2each ;
-
-: define-accessors ( classname slots -- )
-    dup values [accessors]
-    >r keys r> define-slots ;
-
-: define-setters ( classname slots -- )
-    >r "with-" prepend r>
-    dup values [setters]
-    >r keys r> define-slots ;
-
-: filter-pad ( slots -- slots )
-    [ drop padding-name? not ] assoc-filter ;
-
-: define-bitfield ( classname slots -- ) 
-    [
-        [ define-constructor ] 2keep
-        >ranges filter-pad [ define-setters ] 2keep define-accessors
-    ] with-compilation-unit ;
-
-: parse-bitfield ( -- )
-    scan ";" parse-tokens parse-slots define-bitfield ;
-
-: BITFIELD:
-    parse-bitfield ; parsing
-
-: SAFE-BITFIELD:
-    [ safe-bitfields? on parse-bitfield ] with-scope ; parsing
diff --git a/extra/bitfields/summary.txt b/extra/bitfields/summary.txt
deleted file mode 100644 (file)
index fa2f7ff..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Simple system for specifying packed bitfields
diff --git a/extra/bitfields/tags.txt b/extra/bitfields/tags.txt
deleted file mode 100644 (file)
index f427429..0000000
+++ /dev/null
@@ -1 +0,0 @@
-extensions
index 5bf4bf3ad3594ae0a6f87882aac6e131c40015b6..8cb5acf74bda955558c97b140c18cba07272c078 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays classes kernel sequences sets
-io prettyprint multi-methods symbols ;
+io prettyprint multi-methods ;
 IN: boolean-expr
 
 ! Demonstrates the use of Unicode symbols in source files, and
diff --git a/extra/bubble-chamber/bubble-chamber-docs.factor b/extra/bubble-chamber/bubble-chamber-docs.factor
deleted file mode 100644 (file)
index 72ffb63..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-
-USING: help.syntax help.markup ;
-
-USING: bubble-chamber.particle.muon
-       bubble-chamber.particle.quark
-       bubble-chamber.particle.hadron
-       bubble-chamber.particle.axion ;
-
-IN: bubble-chamber
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-HELP: muon
-
-  { $class-description
-    "The muon is a colorful particle with an entangled friend."
-    "It draws both itself and its horizontally symmetric partner."
-    "A high range of speed and almost no speed decay allow the"
-    "muon to reach the extents of the window, often forming rings"
-    "where theta has decayed but speed remains stable. The result"
-    "is color almost everywhere in the general direction of collision,"
-    "stabilized into fuzzy rings." } ;
-
-HELP: quark
-
-  { $class-description
-    "The quark draws as a translucent black. Their large numbers"
-    "create fields of blackness overwritten only by the glowing shadows of "
-    "Hadrons. "
-    "quarks are allowed to accelerate away with speed decay values above 1.0. "
-    "Each quark has an entangled friend. Both particles are drawn identically,"
-    "mirrored along the y-axis." } ;
-
-HELP: hadron
-
-  { $class-description
-    "Hadrons collide from totally random directions. "
-    "Those hadrons that do not exit the drawing area, "
-    "tend to stabilize into perfect circular orbits. "
-    "Each hadron draws with a slight glowing emboss. "
-    "The hadron itself is not drawn." } ;
-
-HELP: axion
-
-  { $class-description
-    "The axion particle draws a bold black path. Axions exist "
-    "in a slightly higher dimension and as such are drawn with "
-    "elevated embossed shadows. Axions are quick to stabilize "
-    "and fall into single pixel orbits axions automatically "
-    "recollide themselves after stabilizing." } ;
-
-{ muon quark hadron axion } related-words
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-ARTICLE: "bubble-chamber" "Bubble Chamber"
-
-"The " { $vocab-link "bubble-chamber" } 
-" is a generative painting system of imaginary "
-"colliding particles. A single super-massive collision produces a "
-"discrete universe of four particle types. Particles draw their "
-"positions over time as pixel exposures.\n"
-"\n"
-"Four types of particles exist. The behavior and graphic appearance of "
-"each particle type is unique.\n"
-  { $subsection muon }
-  { $subsection quark }
-  { $subsection hadron }
-  { $subsection axion } 
-"\n"
-"After you run the vocabulary, a window will appear. Click the "
-"mouse in a random area to fire 11 particles of each type. "
-"Another way to fire particles is to press the "
-"spacebar. This fires all the particles.\n"
-"\n"
-"Bubble Chamber was created by Jared Tarbell. "
-"It was originally implemented in Processing. "
-"It was ported to Factor by Eduardo Cavazos. "
-"The original work is on display here: "
-{ $url
-"http://www.complexification.net/gallery/machines/bubblechamber/" } ;
-
-ABOUT: "bubble-chamber"
-
index 4b0db46c35356d21d025359ab130624efcdf0e69..4bddd4b6328b770072307dcc95aef35d332fe8ef 100644 (file)
 
-USING: kernel namespaces sequences random math math.constants math.libm vars
-       ui
-       processing
-       processing.gadget
-       bubble-chamber.common
-       bubble-chamber.particle
-       bubble-chamber.particle.muon
-       bubble-chamber.particle.quark
-       bubble-chamber.particle.hadron
-       bubble-chamber.particle.axion ;
+USING: kernel syntax accessors sequences
+       arrays calendar
+       combinators.cleave combinators.short-circuit 
+       locals math math.constants math.functions math.libm
+       math.order math.points math.vectors
+       namespaces random sequences threads ui ui.gadgets ui.gestures
+       math.ranges
+       colors
+       colors.gray
+       vars
+       multi-methods
+       multi-method-syntax
+       processing.shapes
+       frame-buffer ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
 IN: bubble-chamber
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-VARS: particles muons quarks hadrons axions ;
+! This is a Factor implementation of an art piece by Jared Tarbell:
+!
+!   http://complexification.net/gallery/machines/bubblechamber/
+!
+! Jared's version is written in Processing (Java)
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! processing
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: 2random ( a b -- num ) 2dup swap - 100 / <range> random ;
+
+: 1random ( b -- num ) 0 swap 2random ;
+
+: at-fraction ( seq fraction -- val ) over length 1- * swap nth ;
+
+: at-fraction-of ( fraction seq -- val ) swap at-fraction ;
+
+: mouse ( -- point ) hand-loc get ;
+
+: mouse-x ( -- x ) mouse first  ;
+: mouse-y ( -- y ) mouse second ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! bubble-chamber.particle
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+GENERIC: collide ( particle -- )
+GENERIC: move    ( particle -- )
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+TUPLE: particle
+  bubble-chamber pos vel speed speed-d theta theta-d theta-dd myc mya ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: initialize-particle ( particle -- particle )
+
+  0 0 {2} >>pos
+  0 0 {2} >>vel
+
+  0 >>speed
+  0 >>speed-d
+  0 >>theta
+  0 >>theta-d
+  0 >>theta-dd
 
-VAR: boom
+  0 0 0 1 rgba boa >>myc
+  0 0 0 1 rgba boa >>mya ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: collide-all ( -- )
+: center ( particle -- point ) bubble-chamber>> size>> 2 v/n ;
 
-  2 pi * 1random >collision-theta
+DEFER: collision-theta
 
-  particles> [ collide ] each ;
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: move-by ( obj delta -- obj ) over pos>> v+ >>pos ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: collide-one ( -- )
+: theta-dd-small? ( par limit -- par ? ) [ dup theta-dd>> abs ] dip < ;
+
+: random-theta-dd  ( par a b -- par ) 2random >>theta-dd ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: turn ( particle -- particle )
+  dup
+    [ speed>> ] [ theta>> { sin cos } <arr> ] bi n*v
+  >>vel ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: step-theta     ( p -- p ) [ ] [ theta>>   ] [ theta-d>>  ] tri + >>theta   ;
+: step-theta-d   ( p -- p ) [ ] [ theta-d>> ] [ theta-dd>> ] tri + >>theta-d ;
+: step-speed-sub ( p -- p ) [ ] [ speed>>   ] [ speed-d>>  ] tri - >>speed   ;
+: step-speed-mul ( p -- p ) [ ] [ speed>>   ] [ speed-d>>  ] tri * >>speed   ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: out-of-bounds? ( PARTICLE -- ? )
+  [let | X      [ PARTICLE pos>> first                    ]
+         Y      [ PARTICLE pos>> second                   ]
+         WIDTH  [ PARTICLE bubble-chamber>> size>> first  ]
+         HEIGHT [ PARTICLE bubble-chamber>> size>> second ] |
+
+    [let | LEFT   [ WIDTH  neg ]
+           RIGHT  [ WIDTH  2 * ]
+           BOTTOM [ HEIGHT neg ]
+           TOP    [ HEIGHT 2 * ] |
+
+      { [ X LEFT < ] [ X RIGHT > ] [ Y BOTTOM < ] [ Y TOP > ] } 0|| ] ] ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! bubble-chamber.particle.axion
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+TUPLE: <axion> < particle ;
+
+: axion ( -- <axion> ) <axion> new initialize-particle ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+METHOD: collide ( <axion> -- )
+
+  dup center          >>pos
+  2 pi *      1random >>theta
+  1.0   6.0   2random >>speed
+  0.998 1.000 2random >>speed-d
+  0                   >>theta-d
+  0                   >>theta-dd
+
+  [ 0.00001 theta-dd-small? ] [ -0.001 0.001 random-theta-dd ] [ ] while
+
+  drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: dy>alpha ( dy -- alpha ) neg 6 * 30 + 255.0 / ;
+
+! : axion-white ( dy -- dy ) dup 1 swap dy>alpha {2} \ stroke-color set ;
+! : axion-black ( dy -- dy ) dup 0 swap dy>alpha {2} \ stroke-color set ;
+
+: axion-white ( dy -- dy ) dup 1 swap dy>alpha gray boa \ stroke-color set ;
+: axion-black ( dy -- dy ) dup 0 swap dy>alpha gray boa \ stroke-color set ;
+
+: axion-point- ( particle dy -- particle ) [ dup pos>> ] dip v-y point ;
+: axion-point+ ( particle dy -- particle ) [ dup pos>> ] dip v+y point ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+METHOD: move ( <axion> -- )
+
+  T{ gray f 0.06 0.59 } \ stroke-color set
+  dup pos>>  point
+
+  1 4 [a,b] [ axion-white axion-point- ] each
+  1 4 [a,b] [ axion-black axion-point+ ] each
 
-  dim 2 / mouse-x - dim 2 / mouse-y - fatan2 >collision-theta
+  dup vel>> move-by
 
-  hadrons> random collide
-  quarks>  random collide
-  muons>   random collide ;
+  turn
+
+  step-theta
+  step-theta-d
+  step-speed-mul
+
+  [ ] [ speed-d>> 0.9999 * ] bi >>speed-d
+
+  1000 random 996 >
+    [
+      dup speed>>   neg     >>speed
+      dup speed-d>> neg 2 + >>speed-d
+
+      100 random 30 > [ collide ] [ drop ] if
+    ]
+    [ drop ]
+  if ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! bubble-chamber.particle.hadron
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+TUPLE: <hadron> < particle ;
+
+: hadron ( -- <hadron> ) <hadron> new initialize-particle ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+METHOD: collide ( <hadron> -- )
+
+  dup center          >>pos
+  2 pi *      1random >>theta
+  0.5   3.5   2random >>speed
+  0.996 1.001 2random >>speed-d
+  0                   >>theta-d
+  0                   >>theta-dd
+
+  [ 0.00001 theta-dd-small? ] [ -0.001 0.001 random-theta-dd ] [ ] while
+
+  0 1 0 1 rgba boa >>myc
 
-: mouse-pressed ( -- )
-  boom on
-  1 background ! kludge
-  11 [ drop collide-one ] each ;
+  drop ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: key-released ( -- )
-  key " " =
+METHOD: move ( <hadron> -- )
+
+  T{ gray f 1 0.11 } \ stroke-color set  dup pos>> 1 v-y point
+  T{ gray f 0 0.11 } \ stroke-color set  dup pos>> 1 v+y point
+
+  dup vel>> move-by
+
+  turn
+
+  step-theta
+  step-theta-d
+  step-speed-mul
+
+  1000 random 997 >
     [
-      boom on
-      1 background
-      collide-all
+      1.0     >>speed-d
+      0.00001 >>theta-dd
+
+      100 random 70 > [ dup collide ] when
     ]
-  when ;
+  when
 
+  dup out-of-bounds? [ collide ] [ drop ] if ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! bubble-chamber.particle.muon.colors
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: bubble-chamber ( -- )
+: good-colors ( -- seq )
+  {
+    T{ rgba f 0.23 0.14 0.17 1 }
+    T{ rgba f 0.23 0.14 0.15 1 }
+    T{ rgba f 0.21 0.14 0.15 1 }
+    T{ rgba f 0.51 0.39 0.33 1 }
+    T{ rgba f 0.49 0.33 0.20 1 }
+    T{ rgba f 0.55 0.45 0.32 1 }
+    T{ rgba f 0.69 0.63 0.51 1 }
+    T{ rgba f 0.64 0.39 0.18 1 }
+    T{ rgba f 0.73 0.42 0.20 1 }
+    T{ rgba f 0.71 0.45 0.29 1 }
+    T{ rgba f 0.79 0.45 0.22 1 }
+    T{ rgba f 0.82 0.56 0.34 1 }
+    T{ rgba f 0.88 0.72 0.49 1 }
+    T{ rgba f 0.85 0.69 0.40 1 }
+    T{ rgba f 0.96 0.92 0.75 1 }
+    T{ rgba f 0.99 0.98 0.87 1 }
+    T{ rgba f 0.85 0.82 0.69 1 }
+    T{ rgba f 0.99 0.98 0.87 1 }
+    T{ rgba f 0.82 0.82 0.79 1 }
+    T{ rgba f 0.65 0.69 0.67 1 }
+    T{ rgba f 0.53 0.60 0.55 1 }
+    T{ rgba f 0.57 0.53 0.68 1 }
+    T{ rgba f 0.47 0.42 0.56 1 }
+  } ;
 
-  1000 1000 size*
+: anti-colors ( -- seq ) good-colors <reversed> ; 
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: color-fraction ( particle -- particle fraction ) dup theta>> pi + 2 pi * / ;
+
+: set-good-color ( particle -- particle )
+  color-fraction dup 0 1 between?
+    [ good-colors at-fraction-of >>myc ]
+    [ drop ]
+  if ;
+
+: set-anti-color ( particle -- particle )
+  color-fraction dup 0 1 between?
+    [ anti-colors at-fraction-of >>mya ]
+    [ drop ]
+  if ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! bubble-chamber.particle.muon
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+TUPLE: <muon> < particle ;
+
+: muon ( -- <muon> ) <muon> new initialize-particle ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+METHOD: collide ( <muon> -- )
+
+  dup center           >>pos
+  2 32 [a,b] random    >>speed
+  0.0001 0.001 2random >>speed-d
+
+  dup collision-theta  -0.1 0.1 2random + >>theta
+  0                                    >>theta-d
+  0                                    >>theta-dd
+
+  [ 0.001 theta-dd-small? ] [ -0.1 0.1 random-theta-dd ] [ ] while
+
+  set-good-color
+  set-anti-color
+
+  drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+METHOD: move ( <muon> -- )
+
+  [let | MUON [ ] |
+
+    [let | WIDTH [ MUON bubble-chamber>> size>> first ] |
+
+      MUON
+
+      dup myc>> 0.16 >>alpha \ stroke-color set
+      dup pos>> point
+
+      dup mya>> 0.16 >>alpha \ stroke-color set
+      dup pos>> first2 [ WIDTH swap - ] dip 2array point
+
+      dup
+      [ speed>> ] [ theta>> { sin cos } <arr> ] bi n*v
+      move-by
+
+      step-theta
+      step-theta-d
+      step-speed-sub
+
+      dup out-of-bounds? [ collide ] [ drop ] if ] ] ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! bubble-chamber.particle.quark
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+TUPLE: <quark> < particle ;
+
+: quark ( -- <quark> ) <quark> new initialize-particle ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
+METHOD: collide ( <quark> -- )
+
+  dup center                             >>pos
+  dup collision-theta -0.11 0.11 2random +  >>theta
+  0.5 3.0 2random                        >>speed
+
+  0.996 1.001 2random                    >>speed-d
+  0                                      >>theta-d
+  0                                      >>theta-dd
+
+  [ 0.00001 theta-dd-small? ] [ -0.001 0.001 random-theta-dd ] [ ] while
+
+  drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+METHOD: move ( <quark> -- )
+
+  [let | QUARK [ ] |
+
+    [let | WIDTH [ QUARK bubble-chamber>> size>> first ] |
+
+      QUARK
+    
+      dup myc>> 0.13 >>alpha \ stroke-color set
+      dup pos>>              point
+
+      dup pos>> first2 [ WIDTH swap - ] dip 2array point
+
+      [ ] [ vel>> ] bi move-by
+
+      turn
+
+      step-theta
+      step-theta-d
+      step-speed-mul
+
+      1000 random 997 >
+      [
+      dup speed>> neg    >>speed
+      2 over speed-d>> - >>speed-d
+      ]
+      when
+
+      dup out-of-bounds? [ collide ] [ drop ] if ] ] ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+USE: syntax ! Switch back to non-multi-method 'TUPLE:' syntax
+
+TUPLE: <bubble-chamber> < <frame-buffer>
+  paused particles collision-theta size ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+! : randomize-collision-theta ( bubble-chamber -- bubble-chamber )
+!   0  2 pi *  0.001  <range>  random >>collision-theta ;
+
+: randomize-collision-theta ( bubble-chamber -- bubble-chamber )
+  pi neg  pi  0.001 <range> random >>collision-theta ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: collision-theta ( particle -- theta ) bubble-chamber>> collision-theta>> ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+M: <bubble-chamber> pref-dim* ( gadget -- dim ) size>> ;
+
+M: <bubble-chamber> ungraft* ( <bubble-chamber> -- ) t >>paused drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: iterate-particle ( particle -- ) move ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+M:: <bubble-chamber> update-frame-buffer ( BUBBLE-CHAMBER -- )
+
+  BUBBLE-CHAMBER particles>> [ iterate-particle ] each ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: iterate-system ( <bubble-chamber> -- ) drop ;
+
+:: start-bubble-chamber-thread ( GADGET -- )
+  GADGET f >>paused drop
   [
-    1 background
-    no-stroke
+    [
+      GADGET paused>>
+        [ f ]
+        [ GADGET iterate-system GADGET relayout-1 1 milliseconds sleep t ]
+      if
+    ]
+    loop
+  ]
+  in-thread ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: bubble-chamber ( -- <bubble-chamber> )
+  <bubble-chamber> new-gadget
+    { 1000 1000 } >>size
+    randomize-collision-theta ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: bubble-chamber-window ( -- <bubble-chamber> )
+  bubble-chamber
+    dup start-bubble-chamber-thread
+    dup "Bubble Chamber" open-window ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: add-particle ( BUBBLE-CHAMBER PARTICLE -- bubble-chamber )
   
-    1789 [ drop <muon>   ] map >muons
-    1300 [ drop <quark>  ] map >quarks
-    1000 [ drop <hadron> ] map >hadrons
-    111  [ drop <axion>  ] map >axions
+  PARTICLE BUBBLE-CHAMBER >>bubble-chamber drop
+
+  BUBBLE-CHAMBER  BUBBLE-CHAMBER particles>> PARTICLE suffix  >>particles ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: mouse->collision-theta ( BUBBLE-CHAMBER -- BUBBLE-CHAMBER )
+  mouse
+  BUBBLE-CHAMBER size>> 2 v/n
+  v-
+  first2
+  fatan2
+  BUBBLE-CHAMBER (>>collision-theta)
+  BUBBLE-CHAMBER ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-    muons> quarks> hadrons> axions> 3append append >particles
+:: mouse-pressed ( BUBBLE-CHAMBER -- )
 
-    collide-one
-  ] setup
+  BUBBLE-CHAMBER mouse->collision-theta drop
 
+  11
   [
-    boom>
-      [ particles> [ move ] each ]
-    when
-  ] draw
+    BUBBLE-CHAMBER particles>> [ <hadron>? ] filter random [ collide ] when*
+    BUBBLE-CHAMBER particles>> [ <quark>?  ] filter random [ collide ] when*
+    BUBBLE-CHAMBER particles>> [ <muon>?   ] filter random [ collide ] when*
+  ]
+  times ;
 
-  [ mouse-pressed ] button-down
-  [ key-released  ] key-up ;
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+<bubble-chamber> H{ { T{ button-down } [ mouse-pressed ] } } set-gestures
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: collide-random-particle ( bubble-chamber -- bubble-chamber )
+  dup particles>> random collide ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: big-bang ( bubble-chamber -- bubble-chamber )
+  dup particles>> [ collide ] each ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: collide-one-of-each ( bubble-chamber -- bubble-chamber )
+  dup
+  particles>>
+  [ [ <muon>?   ] filter random collide ]
+  [ [ <quark>?  ] filter random collide ]
+  [ [ <hadron>? ] filter random collide ]
+  tri ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! Some initial configurations
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: ten-hadrons ( -- )
+  bubble-chamber-window
+  10 [ drop hadron add-particle ] each
+  drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: original ( -- )
+  
+  bubble-chamber-window
+  
+    1789 [ muon   add-particle ] times
+    1300 [ quark  add-particle ] times
+    1000 [ hadron add-particle ] times
+     111 [ axion  add-particle ] times
+
+    particles>>
+    [ [ <muon>?   ] filter random collide ]
+    [ [ <quark>?  ] filter random collide ]
+    [ [ <hadron>? ] filter random collide ]
+    tri ;
+    
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: hadron-chamber ( -- )
+  bubble-chamber-window
+  1000 [ hadron add-particle ] times
+  big-bang
+  drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: quark-chamber ( -- )
+  bubble-chamber-window
+  100 [ quark add-particle ] times
+  big-bang
+  drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: small ( -- )
+  <bubble-chamber> new-gadget
+    { 200 200 } >>size
+    randomize-collision-theta
+    dup start-bubble-chamber-thread
+    dup "Bubble Chamber" open-window
 
-: go ( -- ) [ bubble-chamber run ] with-ui ;
+    42 [ muon   add-particle ] times
+    30 [ quark  add-particle ] times
+    21 [ hadron add-particle ] times
+     7 [ axion  add-particle ] times
+
+    collide-one-of-each
+
+  drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: medium ( -- )
+  <bubble-chamber> new-gadget
+    { 400 400 } >>size
+    randomize-collision-theta
+    dup start-bubble-chamber-thread
+    dup "Bubble Chamber" open-window
+
+    100 [ muon   add-particle ] times
+     81 [ quark  add-particle ] times
+     60 [ hadron add-particle ] times
+      9 [ axion  add-particle ] times
+
+    collide-one-of-each
+
+  drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: large ( -- )
+  <bubble-chamber> new-gadget
+    { 600 600 } >>size
+    randomize-collision-theta
+    dup start-bubble-chamber-thread
+    dup "Bubble Chamber" open-window
+
+    550 [ muon   add-particle ] times
+    339 [ quark  add-particle ] times
+    100 [ hadron add-particle ] times
+     11 [ axion  add-particle ] times
+
+    collide-one-of-each
+
+  drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! Experimental
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: muon-chamber ( -- )
+  bubble-chamber-window
+  1000 [ muon add-particle ] times
+  dup particles>> [ collide randomize-collision-theta ] each
+  drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: original-big-bang ( -- )
+  bubble-chamber
+    { 1000 1000 } >>size
+    dup start-bubble-chamber-thread
+    dup "Bubble Chamber" open-window
+
+  1789 [ muon   add-particle ] times
+  1300 [ quark  add-particle ] times
+  1000 [ hadron add-particle ] times
+   111 [ axion  add-particle ] times
+
+  big-bang
+
+  drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: original-big-bang-variant ( -- )
+  bubble-chamber-window
+  1789 [ muon   add-particle ] times
+  1300 [ quark  add-particle ] times
+  1000 [ hadron add-particle ] times
+   111 [ axion  add-particle ] times
+  dup particles>> [ collide randomize-collision-theta ] each
+  drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-MAIN: go
\ No newline at end of file
diff --git a/extra/bubble-chamber/common/common.factor b/extra/bubble-chamber/common/common.factor
deleted file mode 100644 (file)
index c9ce687..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-
-USING: kernel math accessors combinators.cleave vars ;
-
-IN: bubble-chamber.common
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-VAR: collision-theta
-
-: dim ( -- dim ) 1000 ;
-
-: center ( -- point ) dim 2 / dup {2} ; foldable
diff --git a/extra/bubble-chamber/hadron-chamber/hadron-chamber.factor b/extra/bubble-chamber/hadron-chamber/hadron-chamber.factor
new file mode 100644 (file)
index 0000000..4046724
--- /dev/null
@@ -0,0 +1,8 @@
+
+USING: ui bubble-chamber ;
+
+IN: bubble-chamber.hadron-chamber
+
+: main ( -- ) [ hadron-chamber ] with-ui ;
+
+MAIN: main
\ No newline at end of file
diff --git a/extra/bubble-chamber/hadron-chamber/tags.txt b/extra/bubble-chamber/hadron-chamber/tags.txt
new file mode 100644 (file)
index 0000000..cb5fc20
--- /dev/null
@@ -0,0 +1 @@
+demos
diff --git a/extra/bubble-chamber/large/large.factor b/extra/bubble-chamber/large/large.factor
new file mode 100644 (file)
index 0000000..8520277
--- /dev/null
@@ -0,0 +1,8 @@
+
+USING: ui bubble-chamber ;
+
+IN: bubble-chamber.large
+
+: main ( -- ) [ large ] with-ui ;
+
+MAIN: main
\ No newline at end of file
diff --git a/extra/bubble-chamber/large/tags.txt b/extra/bubble-chamber/large/tags.txt
new file mode 100644 (file)
index 0000000..cb5fc20
--- /dev/null
@@ -0,0 +1 @@
+demos
diff --git a/extra/bubble-chamber/medium/medium.factor b/extra/bubble-chamber/medium/medium.factor
new file mode 100644 (file)
index 0000000..35ee88e
--- /dev/null
@@ -0,0 +1,8 @@
+
+USING: ui bubble-chamber ;
+
+IN: bubble-chamber.medium
+
+: main ( -- ) [ medium ] with-ui ;
+
+MAIN: main
\ No newline at end of file
diff --git a/extra/bubble-chamber/medium/tags.txt b/extra/bubble-chamber/medium/tags.txt
new file mode 100644 (file)
index 0000000..cb5fc20
--- /dev/null
@@ -0,0 +1 @@
+demos
diff --git a/extra/bubble-chamber/original/original.factor b/extra/bubble-chamber/original/original.factor
new file mode 100644 (file)
index 0000000..4d1744e
--- /dev/null
@@ -0,0 +1,8 @@
+
+USING: ui bubble-chamber ;
+
+IN: bubble-chamber.original
+
+: main ( -- ) [ original ] with-ui ;
+
+MAIN: main
\ No newline at end of file
diff --git a/extra/bubble-chamber/original/tags.txt b/extra/bubble-chamber/original/tags.txt
new file mode 100644 (file)
index 0000000..cb5fc20
--- /dev/null
@@ -0,0 +1 @@
+demos
diff --git a/extra/bubble-chamber/particle/axion/axion.factor b/extra/bubble-chamber/particle/axion/axion.factor
deleted file mode 100644 (file)
index 2dafc36..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-
-USING: kernel sequences random accessors multi-methods
-       math math.constants math.ranges math.points combinators.cleave
-       processing processing.shapes
-       bubble-chamber.common bubble-chamber.particle ;
-
-IN: bubble-chamber.particle.axion
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-TUPLE: axion < particle ;
-
-: <axion> ( -- axion ) axion new initialize-particle ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-METHOD: collide { axion }
-
-  center              >>pos
-  2 pi *      1random >>theta
-  1.0   6.0   2random >>speed
-  0.998 1.000 2random >>speed-d
-  0                   >>theta-d
-  0                   >>theta-dd
-
-  [ 0.00001 theta-dd-small? ] [ -0.001 0.001 random-theta-dd ] [ ] while
-
-  drop ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: dy>alpha ( dy -- alpha ) neg 6 * 30 + 255.0 / ;
-
-: axion-white ( dy -- dy ) dup 1 swap dy>alpha {2} stroke ;
-: axion-black ( dy -- dy ) dup 0 swap dy>alpha {2} stroke ;
-
-: axion-point- ( particle dy -- particle ) >r dup pos>> r> v-y point ;
-: axion-point+ ( particle dy -- particle ) >r dup pos>> r> v+y point ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-METHOD: move { axion }
-
-  { 0.06 0.59 } stroke
-  dup pos>>  point
-
-  1 4 [a,b] [ axion-white axion-point- ] each
-  1 4 [a,b] [ axion-black axion-point+ ] each
-
-  dup vel>> move-by
-
-  turn
-
-  step-theta
-  step-theta-d
-  step-speed-mul
-
-  [ ] [ speed-d>> 0.9999 * ] bi >>speed-d
-
-  1000 random 996 >
-    [
-      dup speed>>   neg     >>speed
-      dup speed-d>> neg 2 + >>speed-d
-
-      100 random 30 > [ collide ] [ drop ] if
-    ]
-    [ drop ]
-  if ;
diff --git a/extra/bubble-chamber/particle/hadron/hadron.factor b/extra/bubble-chamber/particle/hadron/hadron.factor
deleted file mode 100644 (file)
index 910df97..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-
-USING: kernel random math math.constants math.points accessors multi-methods
-       processing processing.shapes
-       bubble-chamber.common
-       bubble-chamber.particle colors ;
-
-IN: bubble-chamber.particle.hadron
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-TUPLE: hadron < particle ;
-
-: <hadron> ( -- hadron ) hadron new initialize-particle ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-METHOD: collide { hadron }
-
-  center              >>pos
-  2 pi *      1random >>theta
-  0.5   3.5   2random >>speed
-  0.996 1.001 2random >>speed-d
-  0                   >>theta-d
-  0                   >>theta-dd
-
-  [ 0.00001 theta-dd-small? ] [ -0.001 0.001 random-theta-dd ] [ ] while
-
-  0 1 0 1 rgba boa >>myc
-
-  drop ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-METHOD: move { hadron }
-
-  { 1 0.11 } stroke
-  dup pos>> 1 v-y point
-  
-  { 0 0.11 } stroke
-  dup pos>> 1 v+y point
-
-  dup vel>> move-by
-
-  turn
-
-  step-theta
-  step-theta-d
-  step-speed-mul
-
-  1000 random 997 >
-    [
-      1.0     >>speed-d
-      0.00001 >>theta-dd
-
-      100 random 70 > [ dup collide ] when
-    ]
-  when
-
-  out-of-bounds? [ collide ] [ drop ] if ;
diff --git a/extra/bubble-chamber/particle/muon/colors/colors.factor b/extra/bubble-chamber/particle/muon/colors/colors.factor
deleted file mode 100644 (file)
index 644bed8..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-
-USING: kernel sequences math math.constants math.order accessors
-       processing
-       colors ;
-
-IN: bubble-chamber.particle.muon.colors
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: good-colors ( -- seq )
-  {
-    T{ rgba f 0.23 0.14 0.17 1 }
-    T{ rgba f 0.23 0.14 0.15 1 }
-    T{ rgba f 0.21 0.14 0.15 1 }
-    T{ rgba f 0.51 0.39 0.33 1 }
-    T{ rgba f 0.49 0.33 0.20 1 }
-    T{ rgba f 0.55 0.45 0.32 1 }
-    T{ rgba f 0.69 0.63 0.51 1 }
-    T{ rgba f 0.64 0.39 0.18 1 }
-    T{ rgba f 0.73 0.42 0.20 1 }
-    T{ rgba f 0.71 0.45 0.29 1 }
-    T{ rgba f 0.79 0.45 0.22 1 }
-    T{ rgba f 0.82 0.56 0.34 1 }
-    T{ rgba f 0.88 0.72 0.49 1 }
-    T{ rgba f 0.85 0.69 0.40 1 }
-    T{ rgba f 0.96 0.92 0.75 1 }
-    T{ rgba f 0.99 0.98 0.87 1 }
-    T{ rgba f 0.85 0.82 0.69 1 }
-    T{ rgba f 0.99 0.98 0.87 1 }
-    T{ rgba f 0.82 0.82 0.79 1 }
-    T{ rgba f 0.65 0.69 0.67 1 }
-    T{ rgba f 0.53 0.60 0.55 1 }
-    T{ rgba f 0.57 0.53 0.68 1 }
-    T{ rgba f 0.47 0.42 0.56 1 }
-  } ;
-
-: anti-colors ( -- seq ) good-colors <reversed> ; 
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: color-fraction ( particle -- particle fraction ) dup theta>> pi + 2 pi * / ;
-
-: set-good-color ( particle -- particle )
-  color-fraction dup 0 1 between?
-    [ good-colors at-fraction-of >>myc ]
-    [ drop ]
-  if ;
-
-: set-anti-color ( particle -- particle )
-  color-fraction dup 0 1 between?
-    [ anti-colors at-fraction-of >>mya ]
-    [ drop ]
-  if ;
diff --git a/extra/bubble-chamber/particle/muon/muon.factor b/extra/bubble-chamber/particle/muon/muon.factor
deleted file mode 100644 (file)
index c5ee71c..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-
-USING: kernel arrays sequences random
-       math
-       math.ranges
-       math.functions
-       math.vectors
-       multi-methods accessors
-       combinators.cleave
-       processing
-       processing.shapes
-       bubble-chamber.common
-       bubble-chamber.particle
-       bubble-chamber.particle.muon.colors ;
-
-IN: bubble-chamber.particle.muon
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-TUPLE: muon < particle ;
-
-: <muon> ( -- muon ) muon new initialize-particle ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-METHOD: collide { muon }
-
-  center               >>pos
-  2 32 [a,b] random    >>speed
-  0.0001 0.001 2random >>speed-d
-
-  collision-theta>  -0.1 0.1 2random + >>theta
-  0                                    >>theta-d
-  0                                    >>theta-dd
-
-  [ 0.001 theta-dd-small? ] [ -0.1 0.1 random-theta-dd ] [ ] while
-
-  set-good-color
-  set-anti-color
-
-  drop ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-METHOD: move { muon }
-
-  dup myc>> 0.16 >>alpha stroke
-  dup pos>> point
-
-  dup mya>> 0.16 >>alpha stroke
-  dup pos>> first2 >r dim swap - r> 2array point
-
-  dup
-    [ speed>> ] [ theta>> { sin cos } <arr> ] bi n*v
-  move-by
-
-  step-theta
-  step-theta-d
-  step-speed-sub
-
-  out-of-bounds? [ collide ] [ drop ] if ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
diff --git a/extra/bubble-chamber/particle/particle.factor b/extra/bubble-chamber/particle/particle.factor
deleted file mode 100644 (file)
index 8b13e9b..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-
-USING: kernel sequences combinators
-       math math.vectors math.functions multi-methods
-       accessors combinators.cleave processing
-       bubble-chamber.common colors ;
-
-IN: bubble-chamber.particle
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-GENERIC: collide ( particle -- )
-GENERIC: move    ( particle -- )
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-TUPLE: particle pos vel speed speed-d theta theta-d theta-dd myc mya ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: initialize-particle ( particle -- particle )
-
-  0 0 {2} >>pos
-  0 0 {2} >>vel
-
-  0 >>speed
-  0 >>speed-d
-  0 >>theta
-  0 >>theta-d
-  0 >>theta-dd
-
-  0 0 0 1 rgba boa >>myc
-  0 0 0 1 rgba boa >>mya ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: move-by ( obj delta -- obj ) over pos>> v+ >>pos ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: theta-dd-small? ( par limit -- par ? ) >r dup theta-dd>> abs r> < ;
-
-: random-theta-dd  ( par a b -- par ) 2random >>theta-dd ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: turn ( particle -- particle )
-  dup
-    [ speed>> ] [ theta>> { sin cos } <arr> ] bi n*v
-  >>vel ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: step-theta     ( p -- p ) [ ] [ theta>>   ] [ theta-d>>  ] tri + >>theta   ;
-: step-theta-d   ( p -- p ) [ ] [ theta-d>> ] [ theta-dd>> ] tri + >>theta-d ;
-: step-speed-sub ( p -- p ) [ ] [ speed>>   ] [ speed-d>>  ] tri - >>speed   ;
-: step-speed-mul ( p -- p ) [ ] [ speed>>   ] [ speed-d>>  ] tri * >>speed   ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: x ( particle -- x ) pos>> first  ;
-: y ( particle -- x ) pos>> second ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: out-of-bounds? ( particle -- particle ? )
-  dup
-  { [ x dim neg < ] [ x dim 2 * > ] [ y dim neg < ] [ y dim 2 * > ] } cleave
-  or or or ;
diff --git a/extra/bubble-chamber/particle/quark/quark.factor b/extra/bubble-chamber/particle/quark/quark.factor
deleted file mode 100644 (file)
index 194b97a..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-
-USING: kernel arrays sequences random math accessors multi-methods
-       processing processing.shapes
-       bubble-chamber.common
-       bubble-chamber.particle ;
-
-IN: bubble-chamber.particle.quark
-
-TUPLE: quark < particle ;
-
-: <quark> ( -- quark ) quark new initialize-particle ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-METHOD: collide { quark }
-
-  center                     >>pos
-  collision-theta> -0.11 0.11 2random +  >>theta
-  0.5 3.0 2random                        >>speed
-
-  0.996 1.001 2random                    >>speed-d
-  0                                      >>theta-d
-  0                                      >>theta-dd
-
-  [ 0.00001 theta-dd-small? ] [ -0.001 0.001 random-theta-dd ] [ ] while
-
-  drop ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-METHOD: move { quark }
-
-  dup myc>> 0.13 >>alpha stroke
-  dup pos>>              point
-
-  dup pos>> first2 >r dim swap - r> 2array point
-
-  [ ] [ vel>> ] bi move-by
-
-  turn
-
-  step-theta
-  step-theta-d
-  step-speed-mul
-
-  1000 random 997 >
-    [
-      dup speed>> neg    >>speed
-      2 over speed-d>> - >>speed-d
-    ]
-  when
-
-  out-of-bounds? [ collide ] [ drop ] if ;
diff --git a/extra/bubble-chamber/quark-chamber/quark-chamber.factor b/extra/bubble-chamber/quark-chamber/quark-chamber.factor
new file mode 100644 (file)
index 0000000..99aa97b
--- /dev/null
@@ -0,0 +1,8 @@
+
+USING: ui bubble-chamber ;
+
+IN: bubble-chamber.quark-chamber
+
+: main ( -- ) [ quark-chamber ] with-ui ;
+
+MAIN: main
\ No newline at end of file
diff --git a/extra/bubble-chamber/quark-chamber/tags.txt b/extra/bubble-chamber/quark-chamber/tags.txt
new file mode 100644 (file)
index 0000000..cb5fc20
--- /dev/null
@@ -0,0 +1 @@
+demos
diff --git a/extra/bubble-chamber/small/small.factor b/extra/bubble-chamber/small/small.factor
new file mode 100644 (file)
index 0000000..d02e3ac
--- /dev/null
@@ -0,0 +1,8 @@
+
+USING: ui bubble-chamber ;
+
+IN: bubble-chamber.small
+
+: main ( -- ) [ small ] with-ui ;
+
+MAIN: main
\ No newline at end of file
diff --git a/extra/bubble-chamber/small/tags.txt b/extra/bubble-chamber/small/tags.txt
new file mode 100644 (file)
index 0000000..cb5fc20
--- /dev/null
@@ -0,0 +1 @@
+demos
diff --git a/extra/bubble-chamber/tags.txt b/extra/bubble-chamber/tags.txt
deleted file mode 100644 (file)
index cb5fc20..0000000
+++ /dev/null
@@ -1 +0,0 @@
-demos
diff --git a/extra/bubble-chamber/ten-hadrons/tags.txt b/extra/bubble-chamber/ten-hadrons/tags.txt
new file mode 100644 (file)
index 0000000..cb5fc20
--- /dev/null
@@ -0,0 +1 @@
+demos
diff --git a/extra/bubble-chamber/ten-hadrons/ten-hadrons.factor b/extra/bubble-chamber/ten-hadrons/ten-hadrons.factor
new file mode 100644 (file)
index 0000000..a29ecf8
--- /dev/null
@@ -0,0 +1,8 @@
+
+USING: ui bubble-chamber ;
+
+IN: bubble-chamber.ten-hadrons
+
+: main ( -- ) [ ten-hadrons ] with-ui ;
+
+MAIN: main
\ No newline at end of file
index e481b4716160f3e2a579cd4ce5468f99d6b7ffb3..b1e24243f08cd4e2de09b519e308561a1ae15725 100644 (file)
@@ -1,6 +1,6 @@
 USING: arrays bunny.model continuations destructors kernel
 multiline opengl opengl.shaders opengl.capabilities opengl.gl
-sequences sequences.lib accessors combinators ;
+sequences accessors combinators ;
 IN: bunny.cel-shaded
 
 STRING: vertex-shader-source
index 452adf56891cb7da3d46d14525df42d2812ed834..0009e39fa7a4460b5538edb2e0dee9332ebb493b 100755 (executable)
@@ -1,9 +1,9 @@
 USING: accessors alien.c-types arrays combinators destructors
-http.client io io.encodings.ascii io.files kernel math
-math.matrices math.parser math.vectors opengl
+http.client io io.encodings.ascii io.files io.files.temp kernel
+math math.matrices math.parser math.vectors opengl
 opengl.capabilities opengl.gl opengl.demo-support sequences
-sequences.lib splitting vectors words
-specialized-arrays.float specialized-arrays.uint ;
+splitting vectors words specialized-arrays.float
+specialized-arrays.uint ;
 IN: bunny.model
 
 : numbers ( str -- seq )
@@ -23,15 +23,15 @@ IN: bunny.model
 
 : n ( vs triple -- n )
     swap [ nth ] curry map
-    dup third over first v- >r dup second swap first v- r> cross
+    [ [ second ] [ first ] bi v- ] [ [ third ] [ first ] bi v- ] bi cross
     vneg normalize ;
 
 : normal ( ns vs triple -- )
-    [ n ] keep [ rot [ v+ ] change-nth ] each-with2 ;
+    [ n ] keep [ rot [ v+ ] change-nth ] with with each ;
 
 : normals ( vs is -- ns )
-    over length { 0.0 0.0 0.0 } <array> -rot
-    [ >r 2dup r> normal ] each drop
+    [ [ length { 0.0 0.0 0.0 } <array> ] keep ] dip
+    [ [ 2dup ] dip normal ] each drop
     [ normalize ] map ;
 
 : read-model ( stream -- model )
@@ -50,10 +50,10 @@ IN: bunny.model
     ] unless ;
 
 : (draw-triangle) ( ns vs triple -- )
-    [ dup roll nth gl-normal swap nth gl-vertex ] each-with2 ;
+    [ dup roll nth gl-normal swap nth gl-vertex ] with with each ;
 
 : draw-triangles ( ns vs is -- )
-    GL_TRIANGLES [ [ (draw-triangle) ] each-with2 ] do-state ;
+    GL_TRIANGLES [ [ (draw-triangle) ] with with each ] do-state ;
 
 TUPLE: bunny-dlist list ;
 TUPLE: bunny-buffers array element-array nv ni ;
index 3cf3f94d7385c3213974dcb38b3d66440a6fdfab..c91a895ce112973dc0e92a95ec758e0927451184 100755 (executable)
@@ -2,7 +2,7 @@ USING: arrays bunny.model bunny.cel-shaded continuations
 destructors kernel math multiline opengl opengl.shaders
 opengl.framebuffers opengl.gl opengl.demo-support fry
 opengl.capabilities sequences ui.gadgets combinators accessors
-macros ;
+macros locals ;
 IN: bunny.outlined
 
 STRING: outlined-pass1-fragment-shader-main-source
@@ -143,19 +143,17 @@ TUPLE: bunny-outlined
         pass1-program pass2-program f f f f f bunny-outlined boa
     ] [ drop f ] if ;
 
-: (framebuffer-texture) ( dim iformat xformat -- texture )
-    swapd >r >r >r
+:: (framebuffer-texture) ( dim iformat xformat -- texture )
     GL_TEXTURE0 glActiveTexture
     gen-texture GL_TEXTURE_2D over glBindTexture
     GL_TEXTURE_2D GL_TEXTURE_WRAP_S GL_CLAMP glTexParameteri
     GL_TEXTURE_2D GL_TEXTURE_WRAP_T GL_CLAMP glTexParameteri
     GL_TEXTURE_2D GL_TEXTURE_MAG_FILTER GL_NEAREST glTexParameteri
     GL_TEXTURE_2D GL_TEXTURE_MIN_FILTER GL_NEAREST glTexParameteri
-    GL_TEXTURE_2D 0 r> r> first2 0 r> GL_UNSIGNED_BYTE f glTexImage2D ;
+    GL_TEXTURE_2D 0 iformat dim first2 0 xformat GL_UNSIGNED_BYTE f glTexImage2D ;
 
-: (attach-framebuffer-texture) ( texture attachment -- )
-    swap >r >r
-    GL_FRAMEBUFFER_EXT r> GL_TEXTURE_2D r> 0 glFramebufferTexture2DEXT
+:: (attach-framebuffer-texture) ( texture attachment -- )
+    GL_FRAMEBUFFER_EXT attachment GL_TEXTURE_2D texture 0 glFramebufferTexture2DEXT
     gl-error ;
 
 : (make-framebuffer) ( color-texture normal-texture depth-texture -- framebuffer )
index ea92e798a7689b98c2eeea0b96b901798b731148..cec6702ce06238959f60514e0b65d68227a8a988 100644 (file)
@@ -25,7 +25,7 @@ TUPLE: cairo-demo-gadget < gadget image-array cairo-t ;
 M: cairo-demo-gadget draw-gadget* ( gadget -- )
     0 0 glRasterPos2i
     1.0 -1.0 glPixelZoom
-    >r 384 256 GL_RGBA GL_UNSIGNED_BYTE r>
+    [ 384 256 GL_RGBA GL_UNSIGNED_BYTE ] dip
     image-array>> glDrawPixels ;
 
 : create-surface ( gadget -- cairo_surface_t )
diff --git a/extra/cairo-samples/cairo-samples.factor b/extra/cairo-samples/cairo-samples.factor
new file mode 100644 (file)
index 0000000..a29e12c
--- /dev/null
@@ -0,0 +1,161 @@
+! Copyright (C) 2008 Matthew Willis
+! See http://factorcode.org/license.txt for BSD license.
+!
+! these samples are a subset of the samples on
+! http://cairographics.org/samples/
+USING: cairo cairo.ffi locals math.constants math
+io.backend kernel alien.c-types libc namespaces
+cairo.gadgets ui.gadgets accessors specialized-arrays.double ;
+
+IN: cairo-samples
+
+TUPLE: arc-gadget < cairo-gadget ;
+M:: arc-gadget render-cairo* ( gadget -- )
+    [let | xc [ 128.0 ]
+           yc [ 128.0 ]
+           radius [ 100.0 ]
+           angle1 [ pi 1/4 * ]
+           angle2 [ pi ] |
+        cr 10.0 cairo_set_line_width
+        cr xc yc radius angle1 angle2 cairo_arc
+        cr cairo_stroke
+        
+        ! draw helping lines
+        cr 1 0.2 0.2 0.6 cairo_set_source_rgba
+        cr 6.0 cairo_set_line_width
+        
+        cr xc yc 10.0 0 2 pi * cairo_arc
+        cr cairo_fill
+        
+        cr xc yc radius angle1 angle1 cairo_arc
+        cr xc yc cairo_line_to
+        cr xc yc radius angle2 angle2 cairo_arc
+        cr xc yc cairo_line_to
+        cr cairo_stroke
+    ] ;
+
+TUPLE: clip-gadget < cairo-gadget ;
+M: clip-gadget render-cairo* ( gadget -- )
+    drop
+    cr 128 128 76.8 0 2 pi * cairo_arc
+    cr cairo_clip
+    cr cairo_new_path
+    
+    cr 0 0 256 256 cairo_rectangle
+    cr cairo_fill
+    cr 0 1 0 cairo_set_source_rgb
+    cr 0 0 cairo_move_to
+    cr 256 256 cairo_line_to
+    cr 256 0 cairo_move_to
+    cr 0 256 cairo_line_to
+    cr 10 cairo_set_line_width
+    cr cairo_stroke ;
+
+TUPLE: clip-image-gadget < cairo-gadget ;
+M:: clip-image-gadget render-cairo* ( gadget -- )
+    [let* | png [ "resource:misc/icons/Factor_128x128.png"
+                  normalize-path cairo_image_surface_create_from_png ]
+            w [ png cairo_image_surface_get_width ]
+            h [ png cairo_image_surface_get_height ] |
+        cr 128 128 76.8 0 2 pi * cairo_arc
+        cr cairo_clip
+        cr cairo_new_path
+
+        cr 192.0 w / 192.0 h / cairo_scale
+        cr png 32 32 cairo_set_source_surface
+        cr cairo_paint
+        png cairo_surface_destroy
+    ] ;
+
+TUPLE: dash-gadget < cairo-gadget ;
+M:: dash-gadget render-cairo* ( gadget -- )
+    [let | dashes [ double-array{ 50 10 10 10 } underlying>> ]
+           ndash [ 4 ] |
+        cr dashes ndash -50 cairo_set_dash
+        cr 10 cairo_set_line_width
+        cr 128.0 25.6 cairo_move_to
+        cr 230.4 230.4 cairo_line_to
+        cr -102.4 0 cairo_rel_line_to
+        cr 51.2 230.4 51.2 128.0 128.0 128.0 cairo_curve_to
+        cr cairo_stroke
+    ] ;
+
+TUPLE: gradient-gadget < cairo-gadget ;
+M:: gradient-gadget render-cairo* ( gadget -- )
+    [let | pat [ 0 0 0 256 cairo_pattern_create_linear ]
+           radial [ 115.2 102.4 25.6 102.4 102.4 128.0
+                    cairo_pattern_create_radial ] |
+        pat 1 0 0 0 1 cairo_pattern_add_color_stop_rgba
+        pat 0 1 1 1 1 cairo_pattern_add_color_stop_rgba
+        cr 0 0 256 256 cairo_rectangle
+        cr pat cairo_set_source
+        cr cairo_fill
+        pat cairo_pattern_destroy
+        
+        radial 0 1 1 1 1 cairo_pattern_add_color_stop_rgba
+        radial 1 0 0 0 1 cairo_pattern_add_color_stop_rgba
+        cr radial cairo_set_source
+        cr 128.0 128.0 76.8 0 2 pi * cairo_arc
+        cr cairo_fill
+        radial cairo_pattern_destroy
+    ] ;
+
+TUPLE: text-gadget < cairo-gadget ;
+M: text-gadget render-cairo* ( gadget -- )
+    drop
+    cr "Serif" CAIRO_FONT_SLANT_NORMAL CAIRO_FONT_WEIGHT_BOLD
+    cairo_select_font_face
+    cr 50 cairo_set_font_size
+    cr 10 135 cairo_move_to
+    cr "Hello" cairo_show_text
+    
+    cr 70 165 cairo_move_to
+    cr "factor" cairo_text_path
+    cr 0.5 0.5 1 cairo_set_source_rgb
+    cr cairo_fill_preserve
+    cr 0 0 0 cairo_set_source_rgb
+    cr 2.56 cairo_set_line_width
+    cr cairo_stroke
+    
+    ! draw helping lines
+    cr 1 0.2 0.2 0.6 cairo_set_source_rgba
+    cr 10 135 5.12 0 2 pi * cairo_arc
+    cr cairo_close_path
+    cr 70 165 5.12 0 2 pi * cairo_arc
+    cr cairo_fill ;
+
+TUPLE: utf8-gadget < cairo-gadget ;
+M: utf8-gadget render-cairo* ( gadget -- )
+    drop
+    cr "Sans" CAIRO_FONT_SLANT_NORMAL CAIRO_FONT_WEIGHT_NORMAL
+    cairo_select_font_face
+    cr 50 cairo_set_font_size
+    "cairo_text_extents_t" malloc-object
+    cr "日本語" pick cairo_text_extents
+    cr over
+    [ cairo_text_extents_t-width 2 / ]
+    [ cairo_text_extents_t-x_bearing ] bi +
+    128 swap - pick
+    [ cairo_text_extents_t-height 2 / ]
+    [ cairo_text_extents_t-y_bearing ] bi +
+    128 swap - cairo_move_to
+    free
+    cr "日本語" cairo_show_text
+    
+    cr 1 0.2 0.2 0.6 cairo_set_source_rgba
+    cr 6 cairo_set_line_width
+    cr 128 0 cairo_move_to
+    cr 0 256 cairo_rel_line_to
+    cr 0 128 cairo_move_to
+    cr 256 0 cairo_rel_line_to
+    cr cairo_stroke ;
+ USING: quotations cairo.gadgets ui.gadgets.panes sequences ;
+ : samples ( -- )
+    {
+        arc-gadget clip-gadget clip-image-gadget dash-gadget
+        gradient-gadget text-gadget utf8-gadget
+    }
+    [ new-gadget { 256 256 } >>dim gadget. ] each ;
+ MAIN: samples
diff --git a/extra/cairo/authors.txt b/extra/cairo/authors.txt
deleted file mode 100644 (file)
index 68d35d1..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Sampo Vuori
-Doug Coleman
diff --git a/extra/cairo/cairo.factor b/extra/cairo/cairo.factor
deleted file mode 100755 (executable)
index aa7d115..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: cairo.ffi kernel accessors sequences
-namespaces fry continuations destructors ;
-IN: cairo
-
-TUPLE: cairo-t alien ;
-C: <cairo-t> cairo-t
-M: cairo-t dispose ( alien -- ) alien>> cairo_destroy ;
-
-TUPLE: cairo-surface-t alien ;
-C: <cairo-surface-t> cairo-surface-t
-M: cairo-surface-t dispose ( alien -- ) alien>> cairo_surface_destroy ;
-
-: check-cairo ( cairo_status_t -- )
-    dup CAIRO_STATUS_SUCCESS = [ drop ]
-    [ cairo_status_to_string "Cairo error: " prepend throw ] if ;
-
-SYMBOL: cairo
-: cr ( -- cairo ) cairo get ;
-
-: (with-cairo) ( cairo-t quot -- )
-    >r alien>> cairo r> [ cr cairo_status check-cairo ]
-    compose with-variable ; inline
-    
-: with-cairo ( cairo quot -- )
-    >r <cairo-t> r> [ (with-cairo) ] curry with-disposal ; inline
-
-: (with-surface) ( cairo-surface-t quot -- )
-    >r alien>> r> [ cairo_surface_status check-cairo ] bi ; inline
-
-: with-surface ( cairo_surface quot -- )
-    >r <cairo-surface-t> r> [ (with-surface) ] curry with-disposal ; inline
-
-: with-cairo-from-surface ( cairo_surface quot -- )
-    '[ cairo_create _ with-cairo ] with-surface ; inline
diff --git a/extra/cairo/ffi/ffi.factor b/extra/cairo/ffi/ffi.factor
deleted file mode 100644 (file)
index db18320..0000000
+++ /dev/null
@@ -1,950 +0,0 @@
-! Copyright (c) 2007 Sampo Vuori
-! Copyright (c) 2008 Matthew Willis
-!
-! Adapted from cairo.h, version 1.5.14
-! License: http://factorcode.org/license.txt
-
-USING: system combinators alien alien.syntax kernel 
-alien.c-types accessors sequences arrays ui.gadgets ;
-
-IN: cairo.ffi
-<< "cairo" {
-    { [ os winnt? ] [ "libcairo-2.dll" ] }
-    { [ os macosx? ] [ "/opt/local/lib/libcairo.dylib" ] }
-    { [ os unix? ] [ "libcairo.so.2" ] }
-} cond "cdecl" add-library >>
-
-LIBRARY: cairo
-
-FUNCTION: int cairo_version ( ) ;
-FUNCTION: char* cairo_version_string ( ) ;
-
-TYPEDEF: int cairo_bool_t
-
-! I am leaving these and other void* types as opaque structures
-TYPEDEF: void* cairo_t
-TYPEDEF: void* cairo_surface_t
-
-C-STRUCT: cairo_matrix_t
-    { "double" "xx" }
-    { "double" "yx" }
-    { "double" "xy" }
-    { "double" "yy" }
-    { "double" "x0" }
-    { "double" "y0" } ;
-
-TYPEDEF: void* cairo_pattern_t
-
-TYPEDEF: void* cairo_destroy_func_t
-: cairo-destroy-func ( quot -- callback )
-    >r "void" { "void*" } "cdecl" r> alien-callback ; inline
-
-! See cairo.h for details
-C-STRUCT: cairo_user_data_key_t
-    { "int" "unused" } ;
-
-TYPEDEF: int cairo_status_t
-C-ENUM:
-    CAIRO_STATUS_SUCCESS
-    CAIRO_STATUS_NO_MEMORY
-    CAIRO_STATUS_INVALID_RESTORE
-    CAIRO_STATUS_INVALID_POP_GROUP
-    CAIRO_STATUS_NO_CURRENT_POINT
-    CAIRO_STATUS_INVALID_MATRIX
-    CAIRO_STATUS_INVALID_STATUS
-    CAIRO_STATUS_NULL_POINTER
-    CAIRO_STATUS_INVALID_STRING
-    CAIRO_STATUS_INVALID_PATH_DATA
-    CAIRO_STATUS_READ_ERROR
-    CAIRO_STATUS_WRITE_ERROR
-    CAIRO_STATUS_SURFACE_FINISHED
-    CAIRO_STATUS_SURFACE_TYPE_MISMATCH
-    CAIRO_STATUS_PATTERN_TYPE_MISMATCH
-    CAIRO_STATUS_INVALID_CONTENT
-    CAIRO_STATUS_INVALID_FORMAT
-    CAIRO_STATUS_INVALID_VISUAL
-    CAIRO_STATUS_FILE_NOT_FOUND
-    CAIRO_STATUS_INVALID_DASH
-    CAIRO_STATUS_INVALID_DSC_COMMENT
-    CAIRO_STATUS_INVALID_INDEX
-    CAIRO_STATUS_CLIP_NOT_REPRESENTABLE
-    CAIRO_STATUS_TEMP_FILE_ERROR
-    CAIRO_STATUS_INVALID_STRIDE ;
-
-TYPEDEF: int cairo_content_t
-: CAIRO_CONTENT_COLOR          HEX: 1000 ;
-: CAIRO_CONTENT_ALPHA          HEX: 2000 ;
-: CAIRO_CONTENT_COLOR_ALPHA    HEX: 3000 ;
-
-TYPEDEF: void* cairo_write_func_t
-: cairo-write-func ( quot -- callback )
-    >r "cairo_status_t" { "void*" "uchar*" "int" }
-    "cdecl" r> alien-callback ; inline
-                          
-TYPEDEF: void* cairo_read_func_t
-: cairo-read-func ( quot -- callback )
-    >r "cairo_status_t" { "void*" "uchar*" "int" }
-    "cdecl" r> alien-callback ; inline
-
-! Functions for manipulating state objects
-FUNCTION: cairo_t*
-cairo_create ( cairo_surface_t* target ) ;
-
-FUNCTION: cairo_t*
-cairo_reference ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_destroy ( cairo_t* cr ) ;
-
-FUNCTION: uint
-cairo_get_reference_count ( cairo_t* cr ) ;
-
-FUNCTION: void*
-cairo_get_user_data ( cairo_t* cr, cairo_user_data_key_t* key ) ;
-
-FUNCTION: cairo_status_t
-cairo_set_user_data ( cairo_t* cr, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy ) ;
-
-FUNCTION: void
-cairo_save ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_restore ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_push_group ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_push_group_with_content  ( cairo_t* cr, cairo_content_t content ) ;
-
-FUNCTION: cairo_pattern_t*
-cairo_pop_group ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_pop_group_to_source ( cairo_t* cr ) ;
-
-! Modify state
-TYPEDEF: int cairo_operator_t
-C-ENUM:
-    CAIRO_OPERATOR_CLEAR
-
-    CAIRO_OPERATOR_SOURCE
-    CAIRO_OPERATOR_OVER
-    CAIRO_OPERATOR_IN
-    CAIRO_OPERATOR_OUT
-    CAIRO_OPERATOR_ATOP
-
-    CAIRO_OPERATOR_DEST
-    CAIRO_OPERATOR_DEST_OVER
-    CAIRO_OPERATOR_DEST_IN
-    CAIRO_OPERATOR_DEST_OUT
-    CAIRO_OPERATOR_DEST_ATOP
-
-    CAIRO_OPERATOR_XOR
-    CAIRO_OPERATOR_ADD
-    CAIRO_OPERATOR_SATURATE ;
-
-FUNCTION: void
-cairo_set_operator ( cairo_t* cr, cairo_operator_t op ) ;
-
-FUNCTION: void
-cairo_set_source ( cairo_t* cr, cairo_pattern_t* source ) ;
-
-FUNCTION: void
-cairo_set_source_rgb ( cairo_t* cr, double red, double green, double blue ) ;
-
-FUNCTION: void
-cairo_set_source_rgba ( cairo_t* cr, double red, double green, double blue, double alpha ) ;
-
-FUNCTION: void
-cairo_set_source_surface ( cairo_t* cr, cairo_surface_t* surface, double x, double y ) ;
-
-FUNCTION: void
-cairo_set_tolerance ( cairo_t* cr, double tolerance ) ;
-
-TYPEDEF: int cairo_antialias_t
-C-ENUM:
-    CAIRO_ANTIALIAS_DEFAULT
-    CAIRO_ANTIALIAS_NONE
-    CAIRO_ANTIALIAS_GRAY
-    CAIRO_ANTIALIAS_SUBPIXEL ;
-
-FUNCTION: void
-cairo_set_antialias ( cairo_t* cr, cairo_antialias_t antialias ) ;
-
-TYPEDEF: int cairo_fill_rule_t
-C-ENUM:
-    CAIRO_FILL_RULE_WINDING
-    CAIRO_FILL_RULE_EVEN_ODD ;
-
-FUNCTION: void
-cairo_set_fill_rule ( cairo_t* cr, cairo_fill_rule_t fill_rule ) ;
-
-FUNCTION: void
-cairo_set_line_width ( cairo_t* cr, double width ) ;
-
-TYPEDEF: int cairo_line_cap_t
-C-ENUM:
-    CAIRO_LINE_CAP_BUTT
-    CAIRO_LINE_CAP_ROUND
-    CAIRO_LINE_CAP_SQUARE ;
-
-FUNCTION: void
-cairo_set_line_cap ( cairo_t* cr, cairo_line_cap_t line_cap ) ;
-
-TYPEDEF: int cairo_line_join_t
-C-ENUM:
-    CAIRO_LINE_JOIN_MITER
-    CAIRO_LINE_JOIN_ROUND
-    CAIRO_LINE_JOIN_BEVEL ;
-
-FUNCTION: void
-cairo_set_line_join ( cairo_t* cr, cairo_line_join_t line_join ) ;
-
-FUNCTION: void
-cairo_set_dash ( cairo_t* cr, double* dashes, int num_dashes, double offset ) ;
-
-FUNCTION: void
-cairo_set_miter_limit ( cairo_t* cr, double limit ) ;
-
-FUNCTION: void
-cairo_translate ( cairo_t* cr, double tx, double ty ) ;
-
-FUNCTION: void
-cairo_scale ( cairo_t* cr, double sx, double sy ) ;
-
-FUNCTION: void
-cairo_rotate ( cairo_t* cr, double angle ) ;
-
-FUNCTION: void
-cairo_transform ( cairo_t* cr, cairo_matrix_t* matrix ) ;
-
-FUNCTION: void
-cairo_set_matrix ( cairo_t* cr, cairo_matrix_t* matrix ) ;
-
-FUNCTION: void
-cairo_identity_matrix ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_user_to_device ( cairo_t* cr, double* x, double* y ) ;
-
-FUNCTION: void
-cairo_user_to_device_distance ( cairo_t* cr, double* dx, double* dy ) ;
-
-FUNCTION: void
-cairo_device_to_user ( cairo_t* cr, double* x, double* y ) ;
-
-FUNCTION: void
-cairo_device_to_user_distance ( cairo_t* cr, double* dx, double* dy ) ;
-
-! Path creation functions
-FUNCTION: void
-cairo_new_path ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_move_to ( cairo_t* cr, double x, double y ) ;
-
-FUNCTION: void
-cairo_new_sub_path ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_line_to ( cairo_t* cr, double x, double y ) ;
-
-FUNCTION: void
-cairo_curve_to ( cairo_t* cr, double x1, double y1, double x2, double y2, double x3, double y3 ) ;
-
-FUNCTION: void
-cairo_arc ( cairo_t* cr, double xc, double yc, double radius, double angle1, double angle2 ) ;
-
-FUNCTION: void
-cairo_arc_negative ( cairo_t* cr, double xc, double yc, double radius, double angle1, double angle2 ) ;
-
-FUNCTION: void
-cairo_rel_move_to ( cairo_t* cr, double dx, double dy ) ;
-
-FUNCTION: void
-cairo_rel_line_to ( cairo_t* cr, double dx, double dy ) ;
-
-FUNCTION: void
-cairo_rel_curve_to ( cairo_t* cr, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3 ) ;
-
-FUNCTION: void
-cairo_rectangle ( cairo_t* cr, double x, double y, double width, double height ) ;
-
-FUNCTION: void
-cairo_close_path ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_path_extents ( cairo_t* cr, double* x1, double* y1, double* x2, double* y2 ) ;
-
-! Painting functions
-FUNCTION: void
-cairo_paint ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_paint_with_alpha ( cairo_t* cr, double alpha ) ;
-
-FUNCTION: void
-cairo_mask ( cairo_t* cr, cairo_pattern_t* pattern ) ;
-
-FUNCTION: void
-cairo_mask_surface ( cairo_t* cr, cairo_surface_t* surface, double surface_x, double surface_y ) ;
-
-FUNCTION: void
-cairo_stroke ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_stroke_preserve ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_fill ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_fill_preserve ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_copy_page ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_show_page ( cairo_t* cr ) ;
-
-! Insideness testing
-FUNCTION: cairo_bool_t
-cairo_in_stroke ( cairo_t* cr, double x, double y ) ;
-
-FUNCTION: cairo_bool_t
-cairo_in_fill ( cairo_t* cr, double x, double y ) ;
-
-! Rectangular extents
-FUNCTION: void
-cairo_stroke_extents ( cairo_t* cr, double* x1, double* y1, double* x2, double* y2 ) ;
-
-FUNCTION: void
-cairo_fill_extents ( cairo_t* cr, double* x1, double* y1, double* x2, double* y2 ) ;
-
-! Clipping
-FUNCTION: void
-cairo_reset_clip ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_clip ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_clip_preserve ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_clip_extents ( cairo_t* cr, double* x1, double* y1, double* x2, double* y2 ) ;
-
-C-STRUCT: cairo_rectangle_t
-    { "double" "x" }
-    { "double" "y" }
-    { "double" "width" }
-    { "double" "height" } ;
-    
-C-STRUCT: cairo_rectangle_list_t
-    { "cairo_status_t"     "status" }
-    { "cairo_rectangle_t*" "rectangles" }
-    { "int"                "num_rectangles" } ;
-
-FUNCTION: cairo_rectangle_list_t*
-cairo_copy_clip_rectangle_list ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_rectangle_list_destroy ( cairo_rectangle_list_t* rectangle_list ) ;
-
-! Font/Text functions
-
-TYPEDEF: void* cairo_scaled_font_t
-
-TYPEDEF: void* cairo_font_face_t
-
-C-STRUCT: cairo_glyph_t
-  { "ulong"     "index" }
-  { "double"    "x" }
-  { "double"    "y" } ;
-
-C-STRUCT: cairo_text_extents_t
-    { "double" "x_bearing" }
-    { "double" "y_bearing" }
-    { "double" "width" }
-    { "double" "height" }
-    { "double" "x_advance" }
-    { "double" "y_advance" } ;
-
-C-STRUCT: cairo_font_extents_t
-    { "double" "ascent" }
-    { "double" "descent" }
-    { "double" "height" }
-    { "double" "max_x_advance" }
-    { "double" "max_y_advance" } ;
-
-TYPEDEF: int cairo_font_slant_t
-C-ENUM:
-    CAIRO_FONT_SLANT_NORMAL
-    CAIRO_FONT_SLANT_ITALIC
-    CAIRO_FONT_SLANT_OBLIQUE ;
-
-TYPEDEF: int cairo_font_weight_t
-C-ENUM:
-    CAIRO_FONT_WEIGHT_NORMAL
-    CAIRO_FONT_WEIGHT_BOLD ;
-
-TYPEDEF: int cairo_subpixel_order_t
-C-ENUM:
-    CAIRO_SUBPIXEL_ORDER_DEFAULT
-    CAIRO_SUBPIXEL_ORDER_RGB
-    CAIRO_SUBPIXEL_ORDER_BGR
-    CAIRO_SUBPIXEL_ORDER_VRGB
-    CAIRO_SUBPIXEL_ORDER_VBGR ;
-
-TYPEDEF: int cairo_hint_style_t
-C-ENUM:
-    CAIRO_HINT_STYLE_DEFAULT
-    CAIRO_HINT_STYLE_NONE
-    CAIRO_HINT_STYLE_SLIGHT
-    CAIRO_HINT_STYLE_MEDIUM
-    CAIRO_HINT_STYLE_FULL ;
-
-TYPEDEF: int cairo_hint_metrics_t
-C-ENUM:
-    CAIRO_HINT_METRICS_DEFAULT
-    CAIRO_HINT_METRICS_OFF
-    CAIRO_HINT_METRICS_ON ;
-
-TYPEDEF: void* cairo_font_options_t
-
-FUNCTION: cairo_font_options_t*
-cairo_font_options_create ( ) ;
-
-FUNCTION: cairo_font_options_t*
-cairo_font_options_copy ( cairo_font_options_t* original ) ;
-
-FUNCTION: void
-cairo_font_options_destroy ( cairo_font_options_t* options ) ;
-
-FUNCTION: cairo_status_t
-cairo_font_options_status ( cairo_font_options_t* options ) ;
-
-FUNCTION: void
-cairo_font_options_merge ( cairo_font_options_t* options, cairo_font_options_t* other ) ;
-
-FUNCTION: cairo_bool_t
-cairo_font_options_equal ( cairo_font_options_t* options, cairo_font_options_t* other ) ;
-
-FUNCTION: ulong
-cairo_font_options_hash ( cairo_font_options_t* options ) ;
-
-FUNCTION: void
-cairo_font_options_set_antialias ( cairo_font_options_t* options, cairo_antialias_t antialias ) ;
-
-FUNCTION: cairo_antialias_t
-cairo_font_options_get_antialias ( cairo_font_options_t* options ) ;
-
-FUNCTION: void
-cairo_font_options_set_subpixel_order ( cairo_font_options_t* options, cairo_subpixel_order_t subpixel_order ) ;
-
-FUNCTION: cairo_subpixel_order_t
-cairo_font_options_get_subpixel_order ( cairo_font_options_t* options ) ;
-
-FUNCTION: void
-cairo_font_options_set_hint_style ( cairo_font_options_t* options, cairo_hint_style_t hint_style ) ;
-
-FUNCTION: cairo_hint_style_t
-cairo_font_options_get_hint_style ( cairo_font_options_t* options ) ;
-
-FUNCTION: void
-cairo_font_options_set_hint_metrics ( cairo_font_options_t* options, cairo_hint_metrics_t hint_metrics ) ;
-
-FUNCTION: cairo_hint_metrics_t
-cairo_font_options_get_hint_metrics ( cairo_font_options_t* options ) ;
-
-! This interface is for dealing with text as text, not caring about the
-!  font object inside the the cairo_t.
-
-FUNCTION: void
-cairo_select_font_face ( cairo_t* cr, char* family, cairo_font_slant_t slant, cairo_font_weight_t weight ) ;
-
-FUNCTION: void
-cairo_set_font_size ( cairo_t* cr, double size ) ;
-
-FUNCTION: void
-cairo_set_font_matrix ( cairo_t* cr, cairo_matrix_t* matrix ) ;
-
-FUNCTION: void
-cairo_get_font_matrix ( cairo_t* cr, cairo_matrix_t* matrix ) ;
-
-FUNCTION: void
-cairo_set_font_options ( cairo_t* cr, cairo_font_options_t* options ) ;
-
-FUNCTION: void
-cairo_get_font_options ( cairo_t* cr, cairo_font_options_t* options ) ;
-
-FUNCTION: void
-cairo_set_font_face ( cairo_t* cr, cairo_font_face_t* font_face ) ;
-
-FUNCTION: cairo_font_face_t*
-cairo_get_font_face ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_set_scaled_font ( cairo_t* cr, cairo_scaled_font_t* scaled_font ) ;
-
-FUNCTION: cairo_scaled_font_t*
-cairo_get_scaled_font ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_show_text ( cairo_t* cr, char* utf8 ) ;
-
-FUNCTION: void
-cairo_show_glyphs ( cairo_t* cr, cairo_glyph_t* glyphs, int num_glyphs ) ;
-
-FUNCTION: void
-cairo_text_path  ( cairo_t* cr, char* utf8 ) ;
-
-FUNCTION: void
-cairo_glyph_path ( cairo_t* cr, cairo_glyph_t* glyphs, int num_glyphs ) ;
-
-FUNCTION: void
-cairo_text_extents ( cairo_t* cr, char* utf8, cairo_text_extents_t* extents ) ;
-
-FUNCTION: void
-cairo_glyph_extents ( cairo_t* cr, cairo_glyph_t* glyphs, int num_glyphs, cairo_text_extents_t* extents ) ;
-
-FUNCTION: void
-cairo_font_extents ( cairo_t* cr, cairo_font_extents_t* extents ) ;
-
-! Generic identifier for a font style
-
-FUNCTION: cairo_font_face_t*
-cairo_font_face_reference ( cairo_font_face_t* font_face ) ;
-
-FUNCTION: void
-cairo_font_face_destroy ( cairo_font_face_t* font_face ) ;
-
-FUNCTION: uint
-cairo_font_face_get_reference_count ( cairo_font_face_t* font_face ) ;
-
-FUNCTION: cairo_status_t
-cairo_font_face_status ( cairo_font_face_t* font_face ) ;
-
-TYPEDEF: int cairo_font_type_t
-C-ENUM:
-    CAIRO_FONT_TYPE_TOY
-    CAIRO_FONT_TYPE_FT
-    CAIRO_FONT_TYPE_WIN32
-    CAIRO_FONT_TYPE_QUARTZ ;
-
-FUNCTION: cairo_font_type_t
-cairo_font_face_get_type ( cairo_font_face_t* font_face ) ;
-
-FUNCTION: void* 
-cairo_font_face_get_user_data ( cairo_font_face_t* font_face, cairo_user_data_key_t* key ) ;
-
-FUNCTION: cairo_status_t
-cairo_font_face_set_user_data ( cairo_font_face_t* font_face, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy ) ;
-
-! Portable interface to general font features.
-
-FUNCTION: cairo_scaled_font_t*
-cairo_scaled_font_create ( cairo_font_face_t* font_face, cairo_matrix_t* font_matrix, cairo_matrix_t* ctm, cairo_font_options_t* options ) ;
-
-FUNCTION: cairo_scaled_font_t*
-cairo_scaled_font_reference ( cairo_scaled_font_t* scaled_font ) ;
-
-FUNCTION: void
-cairo_scaled_font_destroy ( cairo_scaled_font_t* scaled_font ) ;
-
-FUNCTION: uint
-cairo_scaled_font_get_reference_count ( cairo_scaled_font_t* scaled_font ) ;
-
-FUNCTION: cairo_status_t
-cairo_scaled_font_status ( cairo_scaled_font_t* scaled_font ) ;
-
-FUNCTION: cairo_font_type_t
-cairo_scaled_font_get_type ( cairo_scaled_font_t* scaled_font ) ;
-
-FUNCTION: void* 
-cairo_scaled_font_get_user_data ( cairo_scaled_font_t* scaled_font, cairo_user_data_key_t* key ) ;
-
-FUNCTION: cairo_status_t
-cairo_scaled_font_set_user_data ( cairo_scaled_font_t* scaled_font, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy ) ;
-
-FUNCTION: void
-cairo_scaled_font_extents ( cairo_scaled_font_t* scaled_font, cairo_font_extents_t* extents ) ;
-
-FUNCTION: void
-cairo_scaled_font_text_extents ( cairo_scaled_font_t* scaled_font, char* utf8, cairo_text_extents_t* extents ) ;
-
-FUNCTION: void
-cairo_scaled_font_glyph_extents ( cairo_scaled_font_t* scaled_font, cairo_glyph_t* glyphs, int num_glyphs, cairo_text_extents_t* extents ) ;
-
-FUNCTION: cairo_font_face_t*
-cairo_scaled_font_get_font_face ( cairo_scaled_font_t* scaled_font ) ;
-
-FUNCTION: void
-cairo_scaled_font_get_font_matrix ( cairo_scaled_font_t* scaled_font, cairo_matrix_t* font_matrix ) ;
-
-FUNCTION: void
-cairo_scaled_font_get_ctm ( cairo_scaled_font_t* scaled_font, cairo_matrix_t* ctm ) ;
-
-FUNCTION: void
-cairo_scaled_font_get_font_options ( cairo_scaled_font_t* scaled_font, cairo_font_options_t* options ) ;
-
-! Query functions
-
-FUNCTION: cairo_operator_t
-cairo_get_operator ( cairo_t* cr ) ;
-
-FUNCTION: cairo_pattern_t*
-cairo_get_source ( cairo_t* cr ) ;
-
-FUNCTION: double
-cairo_get_tolerance ( cairo_t* cr ) ;
-
-FUNCTION: cairo_antialias_t
-cairo_get_antialias ( cairo_t* cr ) ;
-
-FUNCTION: cairo_bool_t
-cairo_has_current_point ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_get_current_point ( cairo_t* cr, double* x, double* y ) ;
-
-FUNCTION: cairo_fill_rule_t
-cairo_get_fill_rule ( cairo_t* cr ) ;
-
-FUNCTION: double
-cairo_get_line_width ( cairo_t* cr ) ;
-
-FUNCTION: cairo_line_cap_t
-cairo_get_line_cap ( cairo_t* cr ) ;
-
-FUNCTION: cairo_line_join_t
-cairo_get_line_join ( cairo_t* cr ) ;
-
-FUNCTION: double
-cairo_get_miter_limit ( cairo_t* cr ) ;
-
-FUNCTION: int
-cairo_get_dash_count ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_get_dash ( cairo_t* cr, double* dashes, double* offset ) ;
-
-FUNCTION: void
-cairo_get_matrix ( cairo_t* cr, cairo_matrix_t* matrix ) ;
-
-FUNCTION: cairo_surface_t*
-cairo_get_target ( cairo_t* cr ) ;
-
-FUNCTION: cairo_surface_t*
-cairo_get_group_target ( cairo_t* cr ) ;
-
-TYPEDEF: int cairo_path_data_type_t
-C-ENUM:
-    CAIRO_PATH_MOVE_TO
-    CAIRO_PATH_LINE_TO
-    CAIRO_PATH_CURVE_TO
-    CAIRO_PATH_CLOSE_PATH ;
-
-! NEED TO DO UNION HERE
-C-STRUCT: cairo_path_data_t-point
-    { "double" "x" }
-    { "double" "y" } ;
-
-C-STRUCT: cairo_path_data_t-header
-    { "cairo_path_data_type_t" "type" }
-    { "int" "length" } ;
-
-C-UNION: cairo_path_data_t "cairo_path_data_t-point" "cairo_path_data_t-header" ;
-
-C-STRUCT: cairo_path_t
-    { "cairo_status_t"      "status" }
-    { "cairo_path_data_t*"  "data" }
-    { "int"                 "num_data" } ;
-
-FUNCTION: cairo_path_t*
-cairo_copy_path ( cairo_t* cr ) ;
-
-FUNCTION: cairo_path_t*
-cairo_copy_path_flat ( cairo_t* cr ) ;
-
-FUNCTION: void
-cairo_append_path ( cairo_t* cr, cairo_path_t* path ) ;
-
-FUNCTION: void
-cairo_path_destroy ( cairo_path_t* path ) ;
-
-! Error status queries
-
-FUNCTION: cairo_status_t
-cairo_status ( cairo_t* cr ) ;
-
-FUNCTION: char* 
-cairo_status_to_string ( cairo_status_t status ) ;
-
-! Surface manipulation
-
-FUNCTION: cairo_surface_t*
-cairo_surface_create_similar ( cairo_surface_t* other, cairo_content_t content, int width, int height ) ;
-
-FUNCTION: cairo_surface_t*
-cairo_surface_reference ( cairo_surface_t* surface ) ;
-
-FUNCTION: void
-cairo_surface_finish ( cairo_surface_t* surface ) ;
-
-FUNCTION: void
-cairo_surface_destroy ( cairo_surface_t* surface ) ;
-
-FUNCTION: uint
-cairo_surface_get_reference_count ( cairo_surface_t* surface ) ;
-
-FUNCTION: cairo_status_t
-cairo_surface_status ( cairo_surface_t* surface ) ;
-
-TYPEDEF: int cairo_surface_type_t
-C-ENUM:
-    CAIRO_SURFACE_TYPE_IMAGE
-    CAIRO_SURFACE_TYPE_PDF
-    CAIRO_SURFACE_TYPE_PS
-    CAIRO_SURFACE_TYPE_XLIB
-    CAIRO_SURFACE_TYPE_XCB
-    CAIRO_SURFACE_TYPE_GLITZ
-    CAIRO_SURFACE_TYPE_QUARTZ
-    CAIRO_SURFACE_TYPE_WIN32
-    CAIRO_SURFACE_TYPE_BEOS
-    CAIRO_SURFACE_TYPE_DIRECTFB
-    CAIRO_SURFACE_TYPE_SVG
-    CAIRO_SURFACE_TYPE_OS2
-    CAIRO_SURFACE_TYPE_WIN32_PRINTING
-    CAIRO_SURFACE_TYPE_QUARTZ_IMAGE ;
-
-FUNCTION: cairo_surface_type_t
-cairo_surface_get_type ( cairo_surface_t* surface ) ;
-
-FUNCTION: cairo_content_t
-cairo_surface_get_content ( cairo_surface_t* surface ) ;
-
-FUNCTION: cairo_status_t
-cairo_surface_write_to_png ( cairo_surface_t* surface, char* filename ) ;
-
-FUNCTION: cairo_status_t
-cairo_surface_write_to_png_stream ( cairo_surface_t* surface, cairo_write_func_t write_func, void* closure ) ;
-
-FUNCTION: void* 
-cairo_surface_get_user_data ( cairo_surface_t* surface, cairo_user_data_key_t* key ) ;
-
-FUNCTION: cairo_status_t
-cairo_surface_set_user_data ( cairo_surface_t* surface, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy ) ;
-
-FUNCTION: void
-cairo_surface_get_font_options ( cairo_surface_t* surface, cairo_font_options_t* options ) ;
-
-FUNCTION: void
-cairo_surface_flush ( cairo_surface_t* surface ) ;
-
-FUNCTION: void
-cairo_surface_mark_dirty ( cairo_surface_t* surface ) ;
-
-FUNCTION: void
-cairo_surface_mark_dirty_rectangle ( cairo_surface_t* surface, int x, int y, int width, int height ) ;
-
-FUNCTION: void
-cairo_surface_set_device_offset ( cairo_surface_t* surface, double x_offset, double y_offset ) ;
-
-FUNCTION: void
-cairo_surface_get_device_offset ( cairo_surface_t* surface, double* x_offset, double* y_offset ) ;
-
-FUNCTION: void
-cairo_surface_set_fallback_resolution ( cairo_surface_t* surface, double x_pixels_per_inch, double y_pixels_per_inch ) ;
-
-FUNCTION: void
-cairo_surface_copy_page ( cairo_surface_t* surface ) ;
-
-FUNCTION: void
-cairo_surface_show_page ( cairo_surface_t* surface ) ;
-
-! Image-surface functions
-
-TYPEDEF: int cairo_format_t
-C-ENUM:
-    CAIRO_FORMAT_ARGB32
-    CAIRO_FORMAT_RGB24
-    CAIRO_FORMAT_A8
-    CAIRO_FORMAT_A1
-    CAIRO_FORMAT_RGB16_565 ;
-
-FUNCTION: cairo_surface_t*
-cairo_image_surface_create ( cairo_format_t format, int width, int height ) ;
-
-FUNCTION: int
-cairo_format_stride_for_width ( cairo_format_t format, int width ) ;
-
-FUNCTION: cairo_surface_t*
-cairo_image_surface_create_for_data ( uchar* data, cairo_format_t format, int width, int height, int stride ) ;
-
-FUNCTION: uchar*
-cairo_image_surface_get_data ( cairo_surface_t* surface ) ;
-
-FUNCTION: cairo_format_t
-cairo_image_surface_get_format ( cairo_surface_t* surface ) ;
-
-FUNCTION: int
-cairo_image_surface_get_width ( cairo_surface_t* surface ) ;
-
-FUNCTION: int
-cairo_image_surface_get_height ( cairo_surface_t* surface ) ;
-
-FUNCTION: int
-cairo_image_surface_get_stride ( cairo_surface_t* surface ) ;
-
-FUNCTION: cairo_surface_t*
-cairo_image_surface_create_from_png ( char* filename ) ;
-
-FUNCTION: cairo_surface_t*
-cairo_image_surface_create_from_png_stream ( cairo_read_func_t read_func, void* closure ) ;
-
-! Pattern creation functions
-
-FUNCTION: cairo_pattern_t*
-cairo_pattern_create_rgb ( double red, double green, double blue ) ;
-
-FUNCTION: cairo_pattern_t*
-cairo_pattern_create_rgba ( double red, double green, double blue, double alpha ) ;
-
-FUNCTION: cairo_pattern_t*
-cairo_pattern_create_for_surface ( cairo_surface_t* surface ) ;
-
-FUNCTION: cairo_pattern_t*
-cairo_pattern_create_linear ( double x0, double y0, double x1, double y1 ) ;
-
-FUNCTION: cairo_pattern_t*
-cairo_pattern_create_radial ( double cx0, double cy0, double radius0, double cx1, double cy1, double radius1 ) ;
-
-FUNCTION: cairo_pattern_t*
-cairo_pattern_reference ( cairo_pattern_t* pattern ) ;
-
-FUNCTION: void
-cairo_pattern_destroy ( cairo_pattern_t* pattern ) ;
-
-FUNCTION: uint
-cairo_pattern_get_reference_count ( cairo_pattern_t* pattern ) ;
-
-FUNCTION: cairo_status_t
-cairo_pattern_status ( cairo_pattern_t* pattern ) ;
-
-FUNCTION: void*
-cairo_pattern_get_user_data ( cairo_pattern_t* pattern, cairo_user_data_key_t* key ) ;
-
-FUNCTION: cairo_status_t
-cairo_pattern_set_user_data ( cairo_pattern_t* pattern, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy ) ;
-
-TYPEDEF: int cairo_pattern_type_t
-C-ENUM:
-    CAIRO_PATTERN_TYPE_SOLID
-    CAIRO_PATTERN_TYPE_SURFACE
-    CAIRO_PATTERN_TYPE_LINEAR
-    CAIRO_PATTERN_TYPE_RADIA ;
-
-FUNCTION: cairo_pattern_type_t
-cairo_pattern_get_type ( cairo_pattern_t* pattern ) ;
-
-FUNCTION: void
-cairo_pattern_add_color_stop_rgb ( cairo_pattern_t* pattern, double offset, double red, double green, double blue ) ;
-
-FUNCTION: void
-cairo_pattern_add_color_stop_rgba ( cairo_pattern_t* pattern, double offset, double red, double green, double blue, double alpha ) ;
-
-FUNCTION: void
-cairo_pattern_set_matrix ( cairo_pattern_t* pattern, cairo_matrix_t* matrix ) ;
-
-FUNCTION: void
-cairo_pattern_get_matrix ( cairo_pattern_t* pattern, cairo_matrix_t* matrix ) ;
-
-TYPEDEF: int cairo_extend_t
-C-ENUM:
-    CAIRO_EXTEND_NONE
-    CAIRO_EXTEND_REPEAT
-    CAIRO_EXTEND_REFLECT
-    CAIRO_EXTEND_PAD ;
-
-FUNCTION: void
-cairo_pattern_set_extend ( cairo_pattern_t* pattern, cairo_extend_t extend ) ;
-
-FUNCTION: cairo_extend_t
-cairo_pattern_get_extend ( cairo_pattern_t* pattern ) ;
-
-TYPEDEF: int cairo_filter_t
-C-ENUM:
-    CAIRO_FILTER_FAST
-    CAIRO_FILTER_GOOD
-    CAIRO_FILTER_BEST
-    CAIRO_FILTER_NEAREST
-    CAIRO_FILTER_BILINEAR
-    CAIRO_FILTER_GAUSSIAN ;
-
-FUNCTION: void
-cairo_pattern_set_filter ( cairo_pattern_t* pattern, cairo_filter_t filter ) ;
-
-FUNCTION: cairo_filter_t
-cairo_pattern_get_filter ( cairo_pattern_t* pattern ) ;
-
-FUNCTION: cairo_status_t
-cairo_pattern_get_rgba ( cairo_pattern_t* pattern, double* red, double* green, double* blue, double* alpha ) ;
-
-FUNCTION: cairo_status_t
-cairo_pattern_get_surface ( cairo_pattern_t* pattern, cairo_surface_t* *surface ) ;
-
-FUNCTION: cairo_status_t
-cairo_pattern_get_color_stop_rgba ( cairo_pattern_t* pattern, int index, double* offset, double* red, double* green, double* blue, double* alpha ) ;
-
-FUNCTION: cairo_status_t
-cairo_pattern_get_color_stop_count ( cairo_pattern_t* pattern, int* count ) ;
-
-FUNCTION: cairo_status_t
-cairo_pattern_get_linear_points ( cairo_pattern_t* pattern, double* x0, double* y0, double* x1, double* y1 ) ;
-
-FUNCTION: cairo_status_t
-cairo_pattern_get_radial_circles ( cairo_pattern_t* pattern, double* x0, double* y0, double* r0, double* x1, double* y1, double* r1 ) ;
-
-! Matrix functions
-
-FUNCTION: void
-cairo_matrix_init ( cairo_matrix_t* matrix, double  xx, double  yx, double  xy, double  yy, double  x0, double  y0 ) ;
-
-FUNCTION: void
-cairo_matrix_init_identity ( cairo_matrix_t* matrix ) ;
-
-FUNCTION: void
-cairo_matrix_init_translate ( cairo_matrix_t* matrix, double tx, double ty ) ;
-
-FUNCTION: void
-cairo_matrix_init_scale ( cairo_matrix_t* matrix, double sx, double sy ) ;
-
-FUNCTION: void
-cairo_matrix_init_rotate ( cairo_matrix_t* matrix, double radians ) ;
-
-FUNCTION: void
-cairo_matrix_translate ( cairo_matrix_t* matrix, double tx, double ty ) ;
-
-FUNCTION: void
-cairo_matrix_scale ( cairo_matrix_t* matrix, double sx, double sy ) ;
-
-FUNCTION: void
-cairo_matrix_rotate ( cairo_matrix_t* matrix, double radians ) ;
-
-FUNCTION: cairo_status_t
-cairo_matrix_invert ( cairo_matrix_t* matrix ) ;
-
-FUNCTION: void
-cairo_matrix_multiply ( cairo_matrix_t* result, cairo_matrix_t* a, cairo_matrix_t* b ) ;
-
-FUNCTION: void
-cairo_matrix_transform_distance ( cairo_matrix_t* matrix, double* dx, double* dy ) ;
-
-FUNCTION: void
-cairo_matrix_transform_point ( cairo_matrix_t* matrix, double* x, double* y ) ;
-
-! Functions to be used while debugging (not intended for use in production code)
-FUNCTION: void
-cairo_debug_reset_static_data ( ) ;
diff --git a/extra/cairo/gadgets/gadgets.factor b/extra/cairo/gadgets/gadgets.factor
deleted file mode 100644 (file)
index 8ed7a3c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-! Copyright (C) 2008 Matthew Willis.
-! See http://factorcode.org/license.txt for BSD license.
-USING: sequences math kernel byte-arrays cairo.ffi cairo
-io.backend ui.gadgets accessors opengl.gl arrays fry
-classes ui.render namespaces ;
-
-IN: cairo.gadgets
-
-: width>stride ( width -- stride ) 4 * ;
-    
-GENERIC: render-cairo* ( gadget -- )
-
-: render-cairo ( gadget -- byte-array )
-    dup dim>> first2 over width>stride
-    [ * nip <byte-array> dup CAIRO_FORMAT_ARGB32 ] 
-    [ cairo_image_surface_create_for_data ] 3bi
-    rot '[ _ render-cairo* ] with-cairo-from-surface ; inline
-
-TUPLE: cairo-gadget < gadget ;
-
-: <cairo-gadget> ( dim -- gadget )
-    cairo-gadget new-gadget
-        swap >>dim ;
-
-M: cairo-gadget draw-gadget*
-    [ dim>> ] [ render-cairo ] bi
-    origin get first2 glRasterPos2i
-    1.0 -1.0 glPixelZoom
-    >r first2 GL_BGRA GL_UNSIGNED_BYTE r>
-    glDrawPixels ;
-
-: copy-surface ( surface -- )
-    cr swap 0 0 cairo_set_source_surface
-    cr cairo_paint ;
diff --git a/extra/cairo/samples/samples.factor b/extra/cairo/samples/samples.factor
deleted file mode 100644 (file)
index bdd02c9..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-! Copyright (C) 2008 Matthew Willis
-! See http://factorcode.org/license.txt for BSD license.
-!
-! these samples are a subset of the samples on
-! http://cairographics.org/samples/
-USING: cairo cairo.ffi locals math.constants math
-io.backend kernel alien.c-types libc namespaces
-cairo.gadgets ui.gadgets accessors specialized-arrays.double ;
-
-IN: cairo.samples
-
-TUPLE: arc-gadget < cairo-gadget ;
-M:: arc-gadget render-cairo* ( gadget -- )
-    [let | xc [ 128.0 ]
-           yc [ 128.0 ]
-           radius [ 100.0 ]
-           angle1 [ pi 1/4 * ]
-           angle2 [ pi ] |
-        cr 10.0 cairo_set_line_width
-        cr xc yc radius angle1 angle2 cairo_arc
-        cr cairo_stroke
-        
-        ! draw helping lines
-        cr 1 0.2 0.2 0.6 cairo_set_source_rgba
-        cr 6.0 cairo_set_line_width
-        
-        cr xc yc 10.0 0 2 pi * cairo_arc
-        cr cairo_fill
-        
-        cr xc yc radius angle1 angle1 cairo_arc
-        cr xc yc cairo_line_to
-        cr xc yc radius angle2 angle2 cairo_arc
-        cr xc yc cairo_line_to
-        cr cairo_stroke
-    ] ;
-
-TUPLE: clip-gadget < cairo-gadget ;
-M: clip-gadget render-cairo* ( gadget -- )
-    drop
-    cr 128 128 76.8 0 2 pi * cairo_arc
-    cr cairo_clip
-    cr cairo_new_path
-    
-    cr 0 0 256 256 cairo_rectangle
-    cr cairo_fill
-    cr 0 1 0 cairo_set_source_rgb
-    cr 0 0 cairo_move_to
-    cr 256 256 cairo_line_to
-    cr 256 0 cairo_move_to
-    cr 0 256 cairo_line_to
-    cr 10 cairo_set_line_width
-    cr cairo_stroke ;
-
-TUPLE: clip-image-gadget < cairo-gadget ;
-M:: clip-image-gadget render-cairo* ( gadget -- )
-    [let* | png [ "resource:misc/icons/Factor_128x128.png"
-                  normalize-path cairo_image_surface_create_from_png ]
-            w [ png cairo_image_surface_get_width ]
-            h [ png cairo_image_surface_get_height ] |
-        cr 128 128 76.8 0 2 pi * cairo_arc
-        cr cairo_clip
-        cr cairo_new_path
-
-        cr 192.0 w / 192.0 h / cairo_scale
-        cr png 32 32 cairo_set_source_surface
-        cr cairo_paint
-        png cairo_surface_destroy
-    ] ;
-
-TUPLE: dash-gadget < cairo-gadget ;
-M:: dash-gadget render-cairo* ( gadget -- )
-    [let | dashes [ double-array{ 50 10 10 10 } underlying>> ]
-           ndash [ 4 ] |
-        cr dashes ndash -50 cairo_set_dash
-        cr 10 cairo_set_line_width
-        cr 128.0 25.6 cairo_move_to
-        cr 230.4 230.4 cairo_line_to
-        cr -102.4 0 cairo_rel_line_to
-        cr 51.2 230.4 51.2 128.0 128.0 128.0 cairo_curve_to
-        cr cairo_stroke
-    ] ;
-
-TUPLE: gradient-gadget < cairo-gadget ;
-M:: gradient-gadget render-cairo* ( gadget -- )
-    [let | pat [ 0 0 0 256 cairo_pattern_create_linear ]
-           radial [ 115.2 102.4 25.6 102.4 102.4 128.0
-                    cairo_pattern_create_radial ] |
-        pat 1 0 0 0 1 cairo_pattern_add_color_stop_rgba
-        pat 0 1 1 1 1 cairo_pattern_add_color_stop_rgba
-        cr 0 0 256 256 cairo_rectangle
-        cr pat cairo_set_source
-        cr cairo_fill
-        pat cairo_pattern_destroy
-        
-        radial 0 1 1 1 1 cairo_pattern_add_color_stop_rgba
-        radial 1 0 0 0 1 cairo_pattern_add_color_stop_rgba
-        cr radial cairo_set_source
-        cr 128.0 128.0 76.8 0 2 pi * cairo_arc
-        cr cairo_fill
-        radial cairo_pattern_destroy
-    ] ;
-
-TUPLE: text-gadget < cairo-gadget ;
-M: text-gadget render-cairo* ( gadget -- )
-    drop
-    cr "Serif" CAIRO_FONT_SLANT_NORMAL CAIRO_FONT_WEIGHT_BOLD
-    cairo_select_font_face
-    cr 50 cairo_set_font_size
-    cr 10 135 cairo_move_to
-    cr "Hello" cairo_show_text
-    
-    cr 70 165 cairo_move_to
-    cr "factor" cairo_text_path
-    cr 0.5 0.5 1 cairo_set_source_rgb
-    cr cairo_fill_preserve
-    cr 0 0 0 cairo_set_source_rgb
-    cr 2.56 cairo_set_line_width
-    cr cairo_stroke
-    
-    ! draw helping lines
-    cr 1 0.2 0.2 0.6 cairo_set_source_rgba
-    cr 10 135 5.12 0 2 pi * cairo_arc
-    cr cairo_close_path
-    cr 70 165 5.12 0 2 pi * cairo_arc
-    cr cairo_fill ;
-
-TUPLE: utf8-gadget < cairo-gadget ;
-M: utf8-gadget render-cairo* ( gadget -- )
-    drop
-    cr "Sans" CAIRO_FONT_SLANT_NORMAL CAIRO_FONT_WEIGHT_NORMAL
-    cairo_select_font_face
-    cr 50 cairo_set_font_size
-    "cairo_text_extents_t" malloc-object
-    cr "日本語" pick cairo_text_extents
-    cr over
-    [ cairo_text_extents_t-width 2 / ]
-    [ cairo_text_extents_t-x_bearing ] bi +
-    128 swap - pick
-    [ cairo_text_extents_t-height 2 / ]
-    [ cairo_text_extents_t-y_bearing ] bi +
-    128 swap - cairo_move_to
-    free
-    cr "日本語" cairo_show_text
-    
-    cr 1 0.2 0.2 0.6 cairo_set_source_rgba
-    cr 6 cairo_set_line_width
-    cr 128 0 cairo_move_to
-    cr 0 256 cairo_rel_line_to
-    cr 0 128 cairo_move_to
-    cr 256 0 cairo_rel_line_to
-    cr cairo_stroke ;
- USING: quotations cairo.gadgets ui.gadgets.panes sequences ;
- : samples ( -- )
-    {
-        arc-gadget clip-gadget clip-image-gadget dash-gadget
-        gradient-gadget text-gadget utf8-gadget
-    }
-    [ new-gadget { 256 256 } >>dim gadget. ] each ;
- MAIN: samples
diff --git a/extra/cairo/summary.txt b/extra/cairo/summary.txt
deleted file mode 100644 (file)
index f6cb370..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Cairo graphics library binding
diff --git a/extra/cairo/tags.txt b/extra/cairo/tags.txt
deleted file mode 100644 (file)
index bb863cf..0000000
+++ /dev/null
@@ -1 +0,0 @@
-bindings
index e1c89374fd2cae73de6f188dd9ea41d6e3084ca9..3168b4b27d8bff6a90a9e3fd885506cec465ce11 100644 (file)
@@ -1,12 +1,12 @@
 
 USING: kernel alien.c-types combinators namespaces make arrays
-       sequences sequences.lib namespaces.lib splitting
+       sequences splitting
        math math.functions math.vectors math.trig
        opengl.gl opengl.glu opengl ui ui.gadgets.slate
        vars colors self self.slots
        random-weighted colors.hsv cfdg.gl accessors
        ui.gadgets.handler ui.gestures assocs ui.gadgets macros
-       qualified specialized-arrays.double ;
+       specialized-arrays.double ;
 
 QUALIFIED: syntax
 
@@ -60,7 +60,7 @@ VAR: color-stack
 : double-nth* ( c-array indices -- seq )
   swap byte-array>double-array [ nth ] curry map ;
 
-: check-size ( modelview -- num ) { 0 1 4 5 } double-nth* [ abs ] map biggest ;
+: check-size ( modelview -- num ) { 0 1 4 5 } double-nth* [ abs ] map supremum ;
 
 VAR: threshold
 
index e57116a25b7ad1a6bc5c9f6adf8796eacc57d157..4a036b68665ede0577648e0cfc39ef17d904b8a3 100755 (executable)
@@ -1,6 +1,6 @@
 
 USING: kernel combinators words quotations arrays sequences locals macros
-       shuffle combinators.lib generalizations fry ;
+       shuffle generalizations fry ;
 
 IN: combinators.cleave
 
diff --git a/extra/combinators/lib/authors.txt b/extra/combinators/lib/authors.txt
deleted file mode 100755 (executable)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/extra/combinators/lib/lib-docs.factor b/extra/combinators/lib/lib-docs.factor
deleted file mode 100755 (executable)
index cde3b4d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-USING: help.syntax help.markup kernel prettyprint sequences
-quotations math ;
-IN: combinators.lib
-
-HELP: generate
-{ $values { "generator" quotation } { "predicate" quotation } { "obj" object } }
-{ $description "Loop until the generator quotation generates an object that satisfies predicate quotation." }
-{ $unchecked-example
-    "! Generate a random 20-bit prime number congruent to 3 (mod 4)"
-    "USING: combinators.lib math math.miller-rabin prettyprint ;"
-    "[ 20 random-prime ] [ 4 mod 3 = ] generate ."
-    "526367"
-} ;
-
-HELP: %chance
-{ $values { "quot" quotation } { "n" integer } }
-{ $description "Calls the quotation " { $snippet "n" } " percent of the time." }
-{ $unchecked-example
-    "USING: io ;"
-    "[ \"hello, world!  maybe.\" print ] 50 %chance"
-    ""
-} ;
diff --git a/extra/combinators/lib/lib-tests.factor b/extra/combinators/lib/lib-tests.factor
deleted file mode 100755 (executable)
index 9489798..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-USING: combinators.lib kernel math random sequences tools.test continuations
-    arrays vectors ;
-IN: combinators.lib.tests
-
-[ 6 -1 ] [ 5 0 1 [ + ] [ - ] bi, bi* ] unit-test
-[ 6 -1 1 ] [ 5 0 1 1 [ + ] [ - ] [ * ] tri, tri* ] unit-test
-
-[ 5 4 ] [ 5 0 1 [ + ] [ - ] bi*, bi ] unit-test
-[ 5 4 5 ] [ 5 0 1 1 [ + ] [ - ] [ * ] tri*, tri ] unit-test
-
-[ 5 6 ] [ 5 0 1 [ + ] bi@, bi ] unit-test
-[ 5 6 7 ] [ 5 0 1 2 [ + ] tri@, tri ] unit-test
-
-[ 5 ] [ [ 10 random ] [ 5 = ] generate ] unit-test
-[ t ] [ [ 10 random ] [ even? ] generate even? ] unit-test
-
-[ { "foo" "xbarx" } ]
-[
-    { "oof" "bar" } { [ reverse ] [ "x" dup surround ] } parallel-call
-] unit-test
-
-{ 1 1 } [
-    [ even? ] [ drop 1 ] [ drop 2 ] ifte
-] must-infer-as
diff --git a/extra/combinators/lib/lib.factor b/extra/combinators/lib/lib.factor
deleted file mode 100755 (executable)
index 5e78d18..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-! Copyright (C) 2007, 2008 Slava Pestov, Chris Double,
-!                          Doug Coleman, Eduardo Cavazos,
-!                          Daniel Ehrenberg.
-! See http://factorcode.org/license.txt for BSD license.
-USING: kernel combinators fry namespaces make quotations hashtables
-sequences assocs arrays stack-checker effects math math.ranges
-generalizations macros continuations random locals accessors ;
-
-IN: combinators.lib
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-! Currying cleave combinators
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: bi, ( obj quot quot -- quot' quot' )
-    [ [ curry ] curry ] bi@ bi ; inline
-: tri, ( obj quot quot quot -- quot' quot' quot' )
-    [ [ curry ] curry ] tri@ tri ; inline
-
-: bi*, ( obj obj quot quot -- quot' quot' )
-    [ [ curry ] curry ] bi@ bi* ; inline
-: tri*, ( obj obj obj quot quot quot -- quot' quot' quot' )
-    [ [ curry ] curry ] tri@ tri* ; inline
-
-: bi@, ( obj obj quot -- quot' quot' )
-    [ curry ] curry bi@ ; inline
-: tri@, ( obj obj obj quot -- quot' quot' quot' )
-    [ curry ] curry tri@ ; inline
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-! Generalized versions of core combinators
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: quad ( x p q r s -- ) [ keep ] 3dip [ keep ] 2dip [ keep ] dip call ; inline
-
-: 4slip ( quot a b c d -- a b c d ) 4 nslip ; inline
-
-: 4keep ( w x y z quot -- w x y z ) 4 nkeep ; inline 
-
-: 2with ( param1 param2 obj quot -- obj curry )
-    with with ; inline
-
-: 3with ( param1 param2 param3 obj quot -- obj curry )
-    with with with ; inline
-
-: with* ( obj assoc quot -- assoc curry )
-    swapd [ [ -rot ] dip call ] 2curry ; inline
-
-: 2with* ( obj1 obj2 assoc quot -- assoc curry )
-    with* with* ; inline
-
-: 3with* ( obj1 obj2 obj3 assoc quot -- assoc curry )
-    with* with* with* ; inline
-
-: assoc-each-with ( obj assoc quot -- )
-    with* assoc-each ; inline
-
-: assoc-map-with ( obj assoc quot -- assoc )
-    with* assoc-map ; inline
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-! ifte
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-MACRO: preserving ( predicate -- quot )
-    dup infer in>>
-    dup 1+
-    '[ _ _ nkeep _ nrot ] ;
-
-MACRO: ifte ( quot quot quot -- )
-    '[ _ preserving _ _ if ] ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-! switch
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-MACRO: switch ( quot -- )
-    [ [ [ preserving ] curry ] dip ] assoc-map
-    [ cond ] curry ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-! Conceptual implementation:
-
-! : pcall ( seq quots -- seq ) [ call ] 2map ;
-
-MACRO: parallel-call ( quots -- )
-    [ '[ [ unclip @ ] dip [ push ] keep ] ] map concat
-    '[ V{ } clone @ nip >array ] ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-! map-call and friends
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: (make-call-with) ( quots -- quot ) 
-    [ [ keep ] curry ] map concat [ drop ] append ;
-
-MACRO: map-call-with ( quots -- )
-    [ (make-call-with) ] keep length [ narray ] curry compose ;
-
-: (make-call-with2) ( quots -- quot )
-    [ [ 2dup >r >r ] prepend [ r> r> ] append ] map concat
-    [ 2drop ] append ;
-
-MACRO: map-call-with2 ( quots -- )
-    [
-        [ [ 2dup >r >r ] prepend [ r> r> ] append ] map concat
-        [ 2drop ] append    
-    ] keep length [ narray ] curry append ;
-
-MACRO: map-exec-with ( words -- )
-    [ 1quotation ] map [ map-call-with ] curry ;
-
-MACRO: construct-slots ( assoc tuple-class -- tuple ) 
-    [ new ] curry swap [
-        [ dip ] curry swap 1quotation [ keep ] curry compose
-    ] { } assoc>map concat compose ;
-
-: 2quot-with ( obj seq quot1 quot2 -- seq quot1 quot2 )
-    >r pick >r with r> r> swapd with ;
-
-MACRO: multikeep ( word out-indexes -- ... )
-    [
-        dup >r [ \ npick \ >r 3array % ] each
-        %
-        r> [ drop \ r> , ] each
-    ] [ ] make ;
-
-: do-while ( pred body tail -- )
-    [ tuck 2slip ] dip while ; inline
-
-: generate ( generator predicate -- obj )
-    '[ dup @ dup [ nip ] unless not ]
-    swap [ ] do-while ;
-
-MACRO: predicates ( seq -- quot/f )
-    dup [ 1quotation [ drop ] prepend ] map
-    [ [ [ dup ] prepend ] map ] dip zip [ drop f ] suffix
-    [ cond ] curry ;
-
-: %chance ( quot n -- ) 100 random > swap when ; inline
index 4d6479db915d00bb1bfb9fa31de98a05d29a5148..1879c52826035660476ec8fb72ae773d5932d481 100755 (executable)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io.files io.launcher io.styles io.encodings.ascii
-prettyprint io hashtables kernel sequences assocs system sorting
-math.parser sets ;
+USING: io.files io.launcher io.directories io.pathnames
+io.encodings.ascii io prettyprint hashtables kernel sequences
+assocs system sorting math.parser sets ;
 IN: contributors
 
 : changelog ( -- authors )
diff --git a/extra/cords/authors.txt b/extra/cords/authors.txt
deleted file mode 100644 (file)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/extra/cords/cords-tests.factor b/extra/cords/cords-tests.factor
deleted file mode 100644 (file)
index 0058c8f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-IN: cords.tests
-USING: cords strings tools.test kernel sequences ;
-
-[ "hello world" ] [ "hello" " world" cord-append dup like ] unit-test
-[ "hello world" ] [ { "he" "llo" " world" } cord-concat dup like ] unit-test
diff --git a/extra/cords/cords.factor b/extra/cords/cords.factor
deleted file mode 100644 (file)
index 9157444..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors assocs sequences sorting binary-search math
-math.order arrays combinators kernel ;
-IN: cords
-
-<PRIVATE
-
-TUPLE: simple-cord first second ;
-
-M: simple-cord length
-    [ first>> length ] [ second>> length ] bi + ;
-
-M: simple-cord virtual-seq first>> ;
-
-M: simple-cord virtual@
-    2dup first>> length <
-    [ first>> ] [ [ first>> length - ] [ second>> ] bi ] if ;
-
-TUPLE: multi-cord count seqs ;
-
-M: multi-cord length count>> ;
-
-M: multi-cord virtual@
-    dupd
-    seqs>> [ first <=> ] with search nip
-    [ first - ] [ second ] bi ;
-
-M: multi-cord virtual-seq
-    seqs>> [ f ] [ first second ] if-empty ;
-
-: <cord> ( seqs -- cord )
-    dup length 2 = [
-        first2 simple-cord boa
-    ] [
-        [ 0 [ length + ] accumulate ] keep zip multi-cord boa
-    ] if ;
-
-PRIVATE>
-
-UNION: cord simple-cord multi-cord ;
-
-INSTANCE: cord virtual-sequence
-
-INSTANCE: multi-cord virtual-sequence
-
-: cord-append ( seq1 seq2 -- cord )
-    {
-        { [ over empty? ] [ nip ] }
-        { [ dup empty? ] [ drop ] }
-        { [ 2dup [ cord? ] both? ] [ [ seqs>> values ] bi@ append <cord> ] }
-        { [ over cord? ] [ [ seqs>> values ] dip suffix <cord> ] }
-        { [ dup cord? ] [ seqs>> values swap prefix <cord> ] }
-        [ 2array <cord> ]
-    } cond ;
-
-: cord-concat ( seqs -- cord )
-    {
-        { [ dup empty? ] [ drop f ] }
-        { [ dup length 1 = ] [ first ] }
-        [
-            [
-                {
-                    { [ dup cord? ] [ seqs>> values ] }
-                    { [ dup empty? ] [ drop { } ] }
-                    [ 1array ]
-                } cond
-            ] map concat <cord>
-        ]
-    } cond ;
diff --git a/extra/cords/summary.txt b/extra/cords/summary.txt
deleted file mode 100644 (file)
index 3c69862..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Virtual sequence concatenation
diff --git a/extra/cords/tags.txt b/extra/cords/tags.txt
deleted file mode 100644 (file)
index 42d711b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-collections
index e07e9725d0d9c34da52e6c33678994d87a941dfe..f4ac97354dc65bfd8ece9054fbe43448094020db 100644 (file)
@@ -16,6 +16,6 @@ test1 dup *coresume . dup *coresume . dup *coresume . dup *coresume 2drop
 : test3 ( -- co )
   [ [ coyield* ] each ] cocreate ;
 
-{ "c" "b" "a" } [ test3 { "a" "b" "c" } over coresume >r dup *coresume >r *coresume r> r> ] unit-test
+{ "c" "b" "a" } [ test3 { "a" "b" "c" } over coresume [ dup *coresume [ *coresume ] dip ] dip ] unit-test
 
 { 4+2/3 } [ [ 1+ coyield 2 * coyield 3 / coreset ] cocreate 1 5 [ over coresume ] times nip ] unit-test
\ No newline at end of file
index b480c18913200d47f76145dd31222cfc68a8c0a2..62103bf5103fa159346fe53d616fc6c8977d0082 100755 (executable)
@@ -10,15 +10,15 @@ IN: crypto.hmac
     initialize-sha1 process-sha1-block
     stream>sha1 get-sha1
     initialize-sha1
-    >r process-sha1-block r>
-    process-sha1-block get-sha1 ;
+    [ process-sha1-block ]
+    [ process-sha1-block ] bi* get-sha1 ;
 
 : md5-hmac ( Ko Ki -- hmac )
     initialize-md5 process-md5-block
     stream>md5 get-md5
     initialize-md5
-    >r process-md5-block r>
-    process-md5-block get-md5 ;
+    [ process-md5-block ]
+    [ process-md5-block ] bi* get-md5 ;
 
 : seq-bitxor ( seq seq -- seq )
     [ bitxor ] 2map ;
index 32a913ef233ff69031874c5bc924568a5420162b..e292981876dcd60a9ad6d882183da8398432e436 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel base64 checksums.md5 symbols sequences checksums
+USING: kernel base64 checksums.md5 sequences checksums
 locals prettyprint math math.bitwise grouping io combinators
 fry make combinators.short-circuit math.functions splitting ;
 IN: crypto.passwd-md5
diff --git a/extra/curses/authors.txt b/extra/curses/authors.txt
new file mode 100644 (file)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/extra/curses/curses-tests.factor b/extra/curses/curses-tests.factor
new file mode 100644 (file)
index 0000000..21463b2
--- /dev/null
@@ -0,0 +1,18 @@
+! Copyright (C) 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors curses kernel threads tools.test ;
+IN: curses.tests
+
+: hello-curses ( -- )
+    [
+        curses-window new
+            "mainwin" >>name
+        add-curses-window
+
+        "mainwin" "hi" curses-printf
+
+        2000000 sleep
+    ] with-curses ;
+
+[
+] [ hello-curses ] unit-test
diff --git a/extra/curses/curses.factor b/extra/curses/curses.factor
new file mode 100644 (file)
index 0000000..f11b263
--- /dev/null
@@ -0,0 +1,155 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors alien.c-types alien.strings assocs byte-arrays
+combinators continuations destructors fry io.encodings.8-bit
+io io.encodings.string io.encodings.utf8 kernel math
+namespaces prettyprint sequences
+strings threads curses.ffi ;
+IN: curses
+
+SYMBOL: curses-windows
+SYMBOL: current-window
+
+: ERR -1 ; inline
+: FALSE 0 ; inline
+: TRUE 1 ; inline
+: >BOOLEAN ( n -- TRUE/FALSE ) >boolean TRUE FALSE ? ; inline
+
+ERROR: duplicate-window window ;
+ERROR: unnamed-window window ;
+ERROR: window-not-found window ;
+ERROR: curses-failed ;
+
+: get-window ( string -- window )
+    dup curses-windows get at*
+    [ nip ] [ drop window-not-found ] if ;
+
+: window-ptr ( string -- window ) get-window ptr>> ;
+
+: curses-error ( n -- ) ERR = [ curses-failed ] when ;
+
+: with-curses ( quot -- )
+    H{ } clone curses-windows [
+        initscr curses-error
+        [
+            curses-windows get values [ dispose ] each
+            nocbreak curses-error
+            echo curses-error
+            endwin curses-error
+        ] [ ] cleanup
+    ] with-variable ; inline
+
+: with-window ( name quot -- )
+    [ window-ptr current-window ] dip with-variable ; inline
+
+TUPLE: curses-window
+    name
+    parent-name
+    ptr
+    { lines integer initial: 0 }
+    { columns integer initial: 0 }
+    { y integer initial: 0 }
+    { x integer initial: 0 }
+
+    { cbreak initial: t }
+    { echo initial: t }
+    { raw initial: f }
+
+    { scrollok initial: t }
+    { leaveok initial: f }
+
+    idcok idlok immedok
+    { keypad initial: f } ;
+
+M: curses-window dispose ( window -- )
+    ptr>> delwin curses-error ;
+
+<PRIVATE
+
+: add-window ( window -- )
+    dup name>> [ unnamed-window ] unless*
+    curses-windows get 2dup key?
+    [ duplicate-window ] [ set-at ] if ;
+
+: delete-window ( window -- )
+    curses-windows get 2dup key?
+    [ delete-at ] [ drop window-not-found ] if ;
+
+: window-params ( window -- lines columns y x )
+    { [ lines>> ] [ columns>> ] [ y>> ] [ x>> ] } cleave ;
+
+: setup-window ( window -- )
+    {
+        [
+            dup
+            dup parent-name>> [
+                window-ptr swap window-params derwin
+            ] [
+                window-params newwin
+            ] if* [ curses-error ] keep >>ptr drop
+        ]
+        [ cbreak>> [ cbreak ] [ nocbreak ] if curses-error ]
+        [ echo>> [ echo ] [ noecho ] if curses-error ]
+        [ raw>> [ raw ] [ noraw ] if curses-error ]
+        [ [ ptr>> ] [ scrollok>> >BOOLEAN ] bi scrollok curses-error ]
+        [ [ ptr>> ] [ leaveok>> >BOOLEAN ] bi leaveok curses-error ]
+        [ [ ptr>> ] [ keypad>> >BOOLEAN ] bi keypad curses-error ]
+        [ add-window ]
+    } cleave ;
+
+PRIVATE>
+
+: add-curses-window ( window -- )
+    [ setup-window ] [ ] [ dispose ] cleanup ;
+
+: (curses-window-refresh) ( window-ptr -- ) wrefresh curses-error ;
+: wnrefresh ( window -- ) window-ptr (curses-window-refresh) ;
+: curses-refresh ( -- ) current-window get (curses-window-refresh) ;
+
+: (curses-wprint) ( window-ptr string -- )
+    waddstr curses-error ;
+
+: curses-nwrite ( window string -- )
+    [ window-ptr ] dip (curses-wprint) ;
+
+: curses-wprint ( window string -- )
+    [ window-ptr dup ] dip (curses-wprint) "\n" (curses-wprint) ;
+
+: curses-printf ( window string -- )
+    [ window-ptr dup dup ] dip (curses-wprint)
+    "\n" (curses-wprint)
+    (curses-window-refresh) ;
+
+: curses-writef ( window string -- )
+    [ window-ptr dup ] dip (curses-wprint) (curses-window-refresh) ;
+
+: (curses-read) ( window-ptr n encoding -- string )
+    [ [ <byte-array> tuck ] keep wgetnstr curses-error ] dip alien>string ;
+
+: curses-read ( window n -- string )
+    utf8 [ window-ptr ] 2dip (curses-read) ;
+
+: curses-erase ( window -- ) window-ptr werase curses-error ;
+
+: move-cursor ( window-name y x -- )
+    [
+        window-ptr
+        {
+            [ ]
+            [ (curses-window-refresh) ]
+            [ c-window-_curx ]
+            [ c-window-_cury ]
+        } cleave
+    ] 2dip mvcur curses-error (curses-window-refresh) ;
+
+: delete-line ( window-name y -- )
+    [ window-ptr dup ] dip
+    0 wmove curses-error wdeleteln curses-error ;
+
+: insert-blank-line ( window-name y -- )
+    [ window-ptr dup ] dip
+    0 wmove curses-error winsertln curses-error ;
+
+: insert-line ( window-name y string -- )
+    [ dupd insert-blank-line ] dip
+    curses-writef ;
diff --git a/extra/curses/ffi/ffi.factor b/extra/curses/ffi/ffi.factor
new file mode 100644 (file)
index 0000000..8d4a7dd
--- /dev/null
@@ -0,0 +1,231 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors alien alien.syntax combinators kernel system ;
+IN: curses.ffi
+
+<< "curses" {
+    { [ os winnt? ]  [ "libcurses.dll" ] }
+    { [ os macosx? ] [ "libcurses.dylib" ] }
+    { [ os unix?  ]  [ "libcurses.so" ] }
+} cond "cdecl" add-library >>
+
+TYPEDEF: void* WINDOW*
+TYPEDEF: void* SCREEN*
+TYPEDEF: void* va_list
+
+TYPEDEF: uint chtype
+TYPEDEF: chtype attr_t
+TYPEDEF: short NCURSES_SIZE_T
+TYPEDEF: ushort wchar_t
+
+: CCHARW_MAX  5 ; inline
+
+C-STRUCT: cchar_t
+    { "attr_t" "attr" }
+    { { "wchar_t" CCHARW_MAX } "chars" } ;
+
+C-STRUCT: pdat
+    { "NCURSES_SIZE_T" "_pad_y" }
+    { "NCURSES_SIZE_T" "_pad_x" }
+    { "NCURSES_SIZE_T" "_pad_top" }
+    { "NCURSES_SIZE_T" "_pad_left" }
+    { "NCURSES_SIZE_T" "_pad_bottom" }
+    { "NCURSES_SIZE_T" "_pad_right" } ;
+
+C-STRUCT: c-window
+    { "NCURSES_SIZE_T" "_cury" }
+    { "NCURSES_SIZE_T" "_curx" }
+
+    { "NCURSES_SIZE_T" "_maxy" }
+    { "NCURSES_SIZE_T" "_maxx" }
+    { "NCURSES_SIZE_T" "_begy" }
+    { "NCURSES_SIZE_T" "_begx" }
+
+    { "short"  " _flags" }
+
+    { "attr_t"  "_attrs" }
+    { "chtype"  "_bkgd" }
+
+    { "bool"    "_notimeout" }
+    { "bool"    "_clear" }
+    { "bool"    "_leaveok" }
+    { "bool"    "_scroll" }
+    { "bool"    "_idlok" }
+    { "bool"    "_idcok" }
+    { "bool"    "_immed" }
+    { "bool"    "_sync" }
+    { "bool"    "_use_keypad" }
+    { "int"     "_delay" }
+
+    { "char*" "_line" }
+    { "NCURSES_SIZE_T" "_regtop" }
+    { "NCURSES_SIZE_T" "_regbottom" }
+
+    { "int" "_parx" }
+    { "int" "_pary" }
+    { "WINDOW*" "_parent" }
+
+    { "pdat" "_pad" }
+
+    { "NCURSES_SIZE_T" "_yoffset" }
+
+    { "cchar_t"  "_bkgrnd" } ;
+
+LIBRARY: curses
+
+: stdscr ( -- alien )
+    "stdscr" "curses" library dll>> dlsym ;
+
+FUNCTION: WINDOW* initscr ( ) ;
+FUNCTION: int endwin ( ) ;
+FUNCTION: bool isendwin ( ) ;
+FUNCTION: SCREEN* newterm ( char* type, FILE* outfd, FILE* infd ) ;
+FUNCTION: SCREEN* set_term ( SCREEN* new ) ;
+FUNCTION: void delscreen ( SCREEN* sp ) ;
+
+FUNCTION: int def_prog_mode ( ) ;
+FUNCTION: int def_shell_mode ( ) ;
+FUNCTION: int reset_prog_mode ( ) ;
+FUNCTION: int reset_shell_mode ( ) ;
+FUNCTION: int resetty ( ) ;
+FUNCTION: int savetty ( ) ;
+FUNCTION: int ripoffline ( int line, void* callback ) ;
+FUNCTION: int curs_set ( int visibility ) ;
+FUNCTION: int napms ( int ms ) ;
+
+FUNCTION: WINDOW* newwin ( int nlines, int ncols, int begin_y, int begin_x ) ;
+FUNCTION: int delwin ( WINDOW* win ) ;
+FUNCTION: int mvwin ( WINDOW* win, int y, int x ) ;
+FUNCTION: WINDOW* subwin ( WINDOW* orig, int nlines, int ncols, int begin_y, int begin_x ) ;
+FUNCTION: WINDOW* derwin ( WINDOW* orig, int nlines, int ncols, int begin_y, int begin_x ) ;
+FUNCTION: int mvderwin ( WINDOW* win, int par_y, int par_x ) ;
+FUNCTION: WINDOW* dupwin ( WINDOW* win ) ;
+FUNCTION: void wsyncup ( WINDOW* win ) ;
+FUNCTION: int syncok ( WINDOW* win, bool bf ) ;
+FUNCTION: void wcursyncup ( WINDOW* win ) ;
+FUNCTION: void wsyncdown ( WINDOW* win ) ;
+
+FUNCTION: int cbreak ( ) ;
+FUNCTION: int nocbreak ( ) ;
+FUNCTION: int echo ( ) ;
+FUNCTION: int noecho ( ) ;
+FUNCTION: int halfdelay ( int tenths ) ;
+FUNCTION: int intrflush ( WINDOW* win, bool bf ) ;
+FUNCTION: int keypad ( WINDOW* win, bool bf ) ;
+FUNCTION: int meta ( WINDOW* win, bool bf ) ;
+FUNCTION: int nodelay ( WINDOW* win, bool bf ) ;
+FUNCTION: int raw ( ) ;
+FUNCTION: int noraw ( ) ;
+FUNCTION: void noqiflush ( ) ;
+FUNCTION: void qiflush ( ) ;
+FUNCTION: int notimeout ( WINDOW* win, bool bf ) ;
+FUNCTION: void timeout ( int delay ) ;
+FUNCTION: void wtimeout ( WINDOW* win, int delay ) ;
+FUNCTION: int typeahead ( int fd ) ;
+
+FUNCTION: int clearok ( WINDOW* win, bool bf ) ;
+FUNCTION: int idlok ( WINDOW* win, bool bf ) ;
+FUNCTION: void idcok ( WINDOW* win, bool bf ) ;
+FUNCTION: void immedok ( WINDOW* win, bool bf ) ;
+FUNCTION: int leaveok ( WINDOW* win, bool bf ) ;
+FUNCTION: int setscrreg ( int top, int bot ) ;
+FUNCTION: int wsetscrreg ( WINDOW* win, int top, int bot ) ;
+FUNCTION: int scrollok ( WINDOW* win, bool bf ) ;
+FUNCTION: int nl ( ) ;
+FUNCTION: int nonl ( ) ;
+
+FUNCTION: int erase (  ) ;
+FUNCTION: int werase ( WINDOW* win ) ;
+FUNCTION: int clear (  ) ;
+FUNCTION: int wclear ( WINDOW* win ) ;
+FUNCTION: int clrtobot (  ) ;
+FUNCTION: int wclrtobot ( WINDOW* win ) ;
+FUNCTION: int clrtoeol (  ) ;
+FUNCTION: int wclrtoeol ( WINDOW* win ) ;
+
+FUNCTION: int refresh ( ) ;
+FUNCTION: int wrefresh ( WINDOW* win ) ;
+FUNCTION: int wnoutrefresh ( WINDOW* win ) ;
+FUNCTION: int doupdate ( ) ;
+FUNCTION: int redrawwin ( WINDOW* win ) ;
+FUNCTION: int wredrawln ( WINDOW* win, int beg_line, int num_lines ) ;
+
+FUNCTION: int getch ( ) ;
+FUNCTION: int wgetch ( WINDOW* win ) ;
+FUNCTION: int mvgetch ( int y, int x ) ;
+FUNCTION: int mvwgetch ( WINDOW* win, int y, int x ) ;
+FUNCTION: int ungetch ( int ch ) ;
+FUNCTION: int has_key ( int ch ) ;
+
+FUNCTION: int getstr ( char* str ) ;
+FUNCTION: int getnstr ( char* str, int n ) ;
+FUNCTION: int wgetstr ( WINDOW* win, char* str ) ;
+FUNCTION: int wgetnstr ( WINDOW* win, char* str, int n ) ;
+FUNCTION: int mvgetstr ( int y, int x, char* str ) ;
+FUNCTION: int mvwgetstr ( WINDOW* win, int y, int x, char* str ) ;
+FUNCTION: int mvgetnstr ( int y, int x, char* str, int n ) ;
+FUNCTION: int mvwgetnstr ( WINDOW* win, int y, int x, char* str, int n ) ;
+
+FUNCTION: int printw ( char* fmt, int lol ) ;
+FUNCTION: int wprintw ( WINDOW* win, char* fmt, int lol ) ;
+FUNCTION: int mvprintw ( int y, int x, char* fmt, int lol ) ;
+FUNCTION: int mvwprintw ( WINDOW* win, int y, int x, char* fmt, int lol ) ;
+FUNCTION: int vwprintw ( WINDOW* win, char* fmt, va_list varglist ) ;
+FUNCTION: int vw_printw ( WINDOW* win, char* fmt, va_list varglist ) ;
+
+FUNCTION: int move ( int y, int x ) ;
+FUNCTION: int wmove ( WINDOW* win, int y, int x ) ;
+
+
+FUNCTION: int scroll ( WINDOW* win ) ;
+FUNCTION: int scrl ( int n ) ;
+FUNCTION: int wscrl ( WINDOW* win, int n ) ;
+
+       ! int setupterm(char *term, int fildes, int *errret);
+       ! int setterm(char *term);
+       ! TERMINAL *set_curterm(TERMINAL *nterm);
+       ! int del_curterm(TERMINAL *oterm);
+       ! int restartterm(const char *term, int fildes, int *errret);
+       ! char *tparm(char *str, ...);
+       ! int tputs(const char *str, int affcnt, int (*putc)(int));
+       ! int putp(const char *str);
+       ! int vidputs(chtype attrs, int (*putc)(int));
+       ! int vidattr(chtype attrs);
+       ! int vid_puts(attr_t attrs, short pair, void *opts, int (*putc)(char));
+       ! int vid_attr(attr_t attrs, short pair, void *opts);
+FUNCTION: int mvcur ( int oldrow, int oldcol, int newrow, int newcol ) ;
+       ! int tigetflag(char *capname);
+       ! int tigetnum(char *capname);
+       ! char *tigetstr(char *capname);
+
+FUNCTION: int touchwin ( WINDOW* win ) ;
+FUNCTION: int touchline ( WINDOW* win, int start, int count ) ;
+FUNCTION: int untouchwin ( WINDOW* win ) ;
+FUNCTION: int wtouchln ( WINDOW* win, int y, int n, int changed ) ;
+FUNCTION: bool is_linetouched ( WINDOW* win, int line ) ;
+FUNCTION: bool is_wintouched ( WINDOW* win ) ;
+
+FUNCTION: int insch ( chtype ch ) ;
+FUNCTION: int winsch ( WINDOW* win, chtype ch ) ;
+FUNCTION: int mvinsch ( int y, int x, chtype ch ) ;
+FUNCTION: int mvwinsch ( WINDOW* win, int y, int x, chtype ch ) ;
+FUNCTION: int delch ( ) ;
+FUNCTION: int wdelch ( WINDOW* win ) ;
+FUNCTION: int mvdelch ( int y, int x ) ;
+FUNCTION: int mvwdelch ( WINDOW* win, int y, int x ) ;
+
+FUNCTION: int deleteln ( ) ;
+FUNCTION: int wdeleteln ( WINDOW* win ) ;
+FUNCTION: int insdelln ( int n ) ;
+FUNCTION: int winsdelln ( WINDOW* win, int n ) ;
+FUNCTION: int insertln ( ) ;
+FUNCTION: int winsertln ( WINDOW* win ) ;
+
+FUNCTION: int addstr ( char* str ) ;
+FUNCTION: int addnstr ( char* str, int n ) ;
+FUNCTION: int waddstr ( WINDOW* win, char* str ) ;
+FUNCTION: int waddnstr ( WINDOW* win, char* str, int n ) ;
+FUNCTION: int mvaddstr ( int y, int x, char* str ) ;
+FUNCTION: int mvaddnstr ( int y, int x, char* str, int n ) ;
+FUNCTION: int mvwaddstr ( WINDOW* win, int y, int x, char* str ) ;
+FUNCTION: int mvwaddnstr ( WINDOW* win, int y, int x, char* str, int n ) ;
diff --git a/extra/curses/ffi/tags.txt b/extra/curses/ffi/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/extra/curses/summary.txt b/extra/curses/summary.txt
new file mode 100644 (file)
index 0000000..0eb839c
--- /dev/null
@@ -0,0 +1 @@
+ncurses binding
diff --git a/extra/curses/tags.txt b/extra/curses/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
index b1fdf2463e5b183eb6e2ab713d3eee47dc7e1263..dd0042455cc3d66e6ce6fefc0a94ca7a2afc574e 100755 (executable)
@@ -11,7 +11,7 @@ M: descriptive-error summary
 \r
 <PRIVATE\r
 : rethrower ( word inputs -- quot )\r
-    [ length ] keep [ >r narray r> swap 2array flip ] 2curry\r
+    [ length ] keep [ [ narray ] dip swap 2array flip ] 2curry\r
     [ 2 ndip descriptive-error ] 2curry ;\r
 \r
 : [descriptive] ( word def -- newdef )\r
index be3ba40ac008da4261d74951333af733e414683e..ca37691ba7fd9921908253d50291a9544c728101 100644 (file)
@@ -7,7 +7,6 @@ USING: kernel byte-arrays combinators strings arrays sequences splitting
        accessors
        combinators.cleave
        newfx
-       symbols
        ;
 
 IN: dns
@@ -414,11 +413,12 @@ SYMBOLS: NO-ERROR FORMAT-ERROR SERVER-FAILURE NAME-ERROR NOT-IMPLEMENTED
         [ 6 + get-double ]
       }
         2cleave
-      >r >r >r
-      get-question-section r>
-      get-rr-section       r>
-      get-rr-section       r>
-      get-rr-section
+      {
+        [ get-question-section ]
+        [ get-rr-section ]
+        [ get-rr-section ]
+        [ get-rr-section ]
+      } spread
       2drop
     ]
   }
@@ -426,7 +426,7 @@ SYMBOLS: NO-ERROR FORMAT-ERROR SERVER-FAILURE NAME-ERROR NOT-IMPLEMENTED
 
 : ba->message ( ba -- message ) parse-message ;
 
-: with-message-bytes ( ba quot -- ) >r ba->message r> call message->ba ; inline
+: with-message-bytes ( ba quot -- ) [ ba->message ] dip call message->ba ; inline
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
index ad16db7b4157a55e40def0551110bdab5bcde1b3..d8a8adc88e7b583981b0698404b18b8e42fb2a2d 100644 (file)
@@ -1,8 +1,8 @@
 
 USING: kernel combinators sequences sets math threads namespaces continuations
        debugger io io.sockets unicode.case accessors destructors
-       combinators.cleave combinators.lib combinators.short-circuit 
-       newfx bake bake.fry
+       combinators.cleave combinators.short-circuit 
+       newfx fry
        dns dns.util dns.misc ;
 
 IN: dns.server
@@ -204,5 +204,5 @@ DEFER: query->rrs
   [ receive-packet handle-request ] [ receive-loop ] bi ;
 
 : loop ( addr-spec -- )
-  [ <datagram> '[ , [ receive-loop ] with-disposal ] try ] [ loop ] bi ;
+  [ <datagram> '[ _ [ receive-loop ] with-disposal ] try ] [ loop ] bi ;
 
index 9ae738994054df9f22d657bcbae7416d2d982037..5b2e63838ab56d78b52fc80fcb399c71af82e9c1 100644 (file)
@@ -1,14 +1,12 @@
 
-USING: kernel sequences sorting math math.order macros bake bake.fry ;
+USING: kernel sequences sorting math math.order macros fry ;
 
 IN: dns.util
 
 : tri-chain ( obj p q r -- x y z )
-  >r >r call dup r> call dup r> call ; inline
+  [ [ call dup ] dip call dup ] dip call ; inline
 
-MACRO: 1if ( test then else -- ) '[ dup @ , , if ] ;
-
-! : 1if ( test then else -- ) >r >r >r dup r> call r> r> if ; inline ;
+MACRO: 1if ( test then else -- ) '[ dup @ _ _ if ] ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
diff --git a/extra/easy-help/easy-help.factor b/extra/easy-help/easy-help.factor
new file mode 100644 (file)
index 0000000..151e663
--- /dev/null
@@ -0,0 +1,111 @@
+
+USING: arrays assocs compiler.units 
+       grouping help help.markup help.topics kernel lexer multiline
+       namespaces parser sequences splitting words
+       easy-help.expand-markup ;
+
+IN: easy-help
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: parse-text-block ( -- array )
+  
+  ".." parse-multiline-string
+  string-lines
+  1 tail
+  [ dup "    " head? [ 4 tail ] [ ] if ] map
+  [ expand-markup ] map
+  concat
+  [ dup "" = [ drop { $nl } ] [ ] if ] map ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: Text: parse-text-block parsed ; parsing
+
+: Block: scan-word 1array parse-text-block append parsed ; parsing
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: Notes:           { $notes       } parse-text-block append parsed ; parsing
+: Description:     { $description } parse-text-block append parsed ; parsing
+: Contract:        { $contract    } parse-text-block append parsed ; parsing
+: Checked-Example: { $example     } parse-text-block append parsed ; parsing
+
+: Class-Description:
+  { $class-description } parse-text-block append parsed ; parsing
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: Code:
+  
+  { $code }
+  parse-text-block [ dup array? [ drop "" ] [ ] if ] map
+  append
+  parsed
+  
+  ; parsing
+
+: Example:
+  { $heading "Example" }
+  { $code }
+  parse-text-block
+  [ dup array? [ drop "" ] [ ] if ] map ! Each item in $code must be a string
+  append 
+  2array parsed ; parsing
+
+: Introduction:
+
+  { $heading "Introduction" }
+  parse-text-block
+  2array parsed ; parsing
+
+: Summary:
+
+  { $heading "Summary" }
+  parse-text-block
+  2array parsed ; parsing
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: Values:
+
+  ".." parse-multiline-string
+  string-lines
+  1 tail
+  [ dup "    " head? [ 4 tail ] [ ] if ] map
+  [ " " split1 [ " " first = ] trim-left 2array ] map
+  \ $values prefix
+  parsed
+
+  ; parsing
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: Word:
+
+  scan current-vocab create dup old-definitions get
+  [ delete-at ] with each dup set-word
+
+  bootstrap-word dup set-word
+  dup >link save-location
+  \ ; parse-until >array swap set-word-help ; parsing
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: Heading: { $heading } ".." parse-multiline-string suffix parsed ; parsing
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: List:
+
+  { $list }
+
+  ".." parse-multiline-string
+  string-lines
+  1 tail
+  [ dup "    " head? [ 4 tail ] [ ] if ] map
+  [ expand-markup ] map
+
+  append parsed
+
+  ; parsing
diff --git a/extra/easy-help/expand-markup/expand-markup.factor b/extra/easy-help/expand-markup/expand-markup.factor
new file mode 100644 (file)
index 0000000..7550158
--- /dev/null
@@ -0,0 +1,47 @@
+
+USING: accessors arrays kernel lexer locals math namespaces parser
+       sequences splitting ;
+
+IN: easy-help.expand-markup
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: scan-one-array ( string -- array rest )
+  string-lines
+  lexer-factory get call
+  [
+  [
+    \ } parse-until >array
+    lexer get line-text>>
+    lexer get column>> tail
+  ]
+  with-lexer
+  ]
+  with-scope ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: contains-markup? ( string -- ? ) "{ $" swap subseq? ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: expand-markup ( LINE -- lines )
+  
+  LINE contains-markup?
+    [
+    
+      [let | N [ "{ $" LINE start ] |
+
+        LINE N head
+
+        LINE N 2 + tail scan-one-array  dup " " head? [ 1 tail ] [ ] if
+
+        [ 2array ] dip
+
+        expand-markup
+
+        append ]
+        
+    ]
+    [ LINE 1array ]
+  if ;
diff --git a/extra/faq/authors.txt b/extra/faq/authors.txt
deleted file mode 100755 (executable)
index f990dd0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Daniel Ehrenberg
diff --git a/extra/faq/faq.factor b/extra/faq/faq.factor
deleted file mode 100644 (file)
index c0636c5..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-! Copyright (C) 2007 Daniel Ehrenberg
-! See http://factorcode.org/license.txt for BSD license.
-USING: xml kernel sequences xml.utilities math xml.data
-arrays assocs xml.generator xml.writer namespaces
-make math.parser io accessors ;
-IN: faq
-
-: find-after ( seq quot -- elem after )
-    over >r find r> rot 1+ tail ; inline
-
-: tag-named*? ( tag name -- ? )
-    assure-name swap tag-named? ;
-
-! Questions
-TUPLE: q/a question answer ;
-C: <q/a> q/a
-
-: li>q/a ( li -- q/a )
-    [ "br" tag-named*? not ] filter
-    [ "strong" tag-named*? ] find-after
-    >r children>> r> <q/a> ;
-
-: q/a>li ( q/a -- li )
-    [ question>> "strong" build-tag* f "br" build-tag* 2array ] keep
-    answer>> append "li" build-tag* ;
-
-: xml>q/a ( xml -- q/a )
-    [ "question" tag-named children>> ] keep
-    "answer" tag-named children>> <q/a> ;
-
-: q/a>xml ( q/a -- xml )
-    [ question>> "question" build-tag* ] keep
-    answer>> "answer" build-tag*
-    "\n" swap 3array "qa" build-tag* ;
-
-! Lists of questions
-TUPLE: question-list title seq ;
-C: <question-list> question-list
-
-: xml>question-list ( list -- question-list )
-    [ "title" swap at ] keep
-    children>> [ tag? ] filter [ xml>q/a ] map
-    <question-list> ;
-
-: question-list>xml ( question-list -- list )
-    [ seq>> [ q/a>xml "\n" swap 2array ]
-      map concat "list" build-tag* ] keep
-    title>> [ "title" pick set-at ] when* ;
-
-: html>question-list ( h3 ol -- question-list )
-    >r [ children>string ] [ f ] if* r>
-    children-tags [ li>q/a ] map <question-list> ;
-
-: question-list>h3 ( id question-list -- h3 )
-    title>> [
-        "h3" build-tag
-        swap number>string "id" pick set-at
-    ] [ drop f ] if* ;
-
-: question-list>html ( question-list start id -- h3/f ol )
-    -rot >r [ question-list>h3 ] keep
-    seq>> [ q/a>li ] map "ol" build-tag* r>
-    number>string "start" pick set-at
-    "margin-left: 5em" "style" pick set-at ;
-
-! Overall everything
-TUPLE: faq header lists ;
-C: <faq> faq
-
-: html>faq ( div -- faq )
-    unclip swap { "h3" "ol" } [ tags-named ] with map
-    first2 >r f prefix r> [ html>question-list ] 2map <faq> ;
-
-: header, ( faq -- )
-    dup header>> ,
-    lists>> first 1 -1 question-list>html nip , ;
-
-: br, ( -- )
-    "br" contained, nl, ;
-
-: toc-link, ( question-list number -- )
-    number>string "#" prepend "href" swap 2array 1array
-    "a" swap [ title>> , ] tag*, br, ;
-
-: toc, ( faq -- )
-    "div" { { "style" "background-color: #eee; margin-left: 30%; margin-right: 30%; width: auto; padding: 5px; margin-top: 1em; margin-bottom: 1em" } } [
-        "strong" [ "The big questions" , ] tag, br,
-        lists>> rest dup length [ toc-link, ] 2each
-    ] tag*, ;
-
-: faq-sections, ( question-lists -- )
-    unclip seq>> length 1+ dupd
-    [ seq>> length + ] accumulate nip
-    0 -rot [ pick question-list>html [ , nl, ] bi@ 1+ ] 2each drop ;
-
-: faq>html ( faq -- div )
-    "div" [
-        dup header,
-        dup toc,
-        lists>> faq-sections,
-    ] make-xml ;
-
-: xml>faq ( xml -- faq )
-    [ "header" tag-named children>string ] keep
-    "list" tags-named [ xml>question-list ] map <faq> ;
-
-: faq>xml ( faq -- xml )
-    "faq" [
-        "header" [ dup header>> , ] tag,
-        lists>> [ question-list>xml , nl, ] each
-    ] make-xml ;
-
-: read-write-faq ( xml-stream -- )
-    read-xml xml>faq faq>html write-xml ;
diff --git a/extra/faq/summary.txt b/extra/faq/summary.txt
deleted file mode 100755 (executable)
index c33f8cf..0000000
+++ /dev/null
@@ -1 +0,0 @@
-The Factor FAQ
index c308c94054db8b7860f73a5806a1c3587b71041e..cf733dbbfd8aa3a3f1a497c71fe25ba93b052e88 100755 (executable)
@@ -2,7 +2,8 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors kernel peg strings sequences math math.parser
 namespaces make words quotations arrays hashtables io
-io.streams.string assocs ascii peg.parsers accessors ;
+io.streams.string assocs ascii peg.parsers accessors
+words.symbol ;
 IN: fjsc
 
 TUPLE: ast-number value ;
diff --git a/extra/frame-buffer/frame-buffer.factor b/extra/frame-buffer/frame-buffer.factor
new file mode 100644 (file)
index 0000000..708c0d8
--- /dev/null
@@ -0,0 +1,112 @@
+
+USING: accessors alien.c-types combinators grouping kernel
+       locals math math.geometry.rect math.vectors opengl.gl sequences
+       ui.gadgets ui.render ;
+
+IN: frame-buffer
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+TUPLE: <frame-buffer> < gadget pixels last-dim ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+GENERIC: update-frame-buffer ( <frame-buffer> -- )
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: init-frame-buffer-pixels ( frame-buffer -- )
+  dup
+    rect-dim product "uint[4]" <c-array>
+  >>pixels
+  drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: frame-buffer ( -- <frame-buffer> ) <frame-buffer> new-gadget ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: draw-pixels ( FRAME-BUFFER -- )
+
+  FRAME-BUFFER rect-dim first2
+  GL_RGBA
+  GL_UNSIGNED_INT
+  FRAME-BUFFER pixels>>
+  glDrawPixels ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: read-pixels ( FRAME-BUFFER -- )
+
+  0
+  0
+  FRAME-BUFFER rect-dim first2
+  GL_RGBA
+  GL_UNSIGNED_INT
+  FRAME-BUFFER pixels>>
+  glReadPixels ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:: copy-row ( OLD NEW -- )
+  
+  [let | LEN [ OLD NEW min-length ] |
+
+    OLD LEN head-slice 0 NEW copy ] ;
+
+: copy-pixels ( old-pixels old-width new-pixels new-width -- )
+  [ 16 * <sliced-groups> ] 2bi@
+  [ copy-row ] 2each ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: update-last-dim ( frame-buffer -- ) dup rect-dim >>last-dim drop ;
+
+M:: <frame-buffer> layout* ( FRAME-BUFFER -- )
+
+  {
+    {
+      [ FRAME-BUFFER last-dim>> f = ]
+      [
+        FRAME-BUFFER init-frame-buffer-pixels
+
+        FRAME-BUFFER update-last-dim
+      ]
+    }
+    {
+      [ FRAME-BUFFER [ rect-dim ] [ last-dim>> ] bi = not ]
+      [
+        [let | OLD-PIXELS [ FRAME-BUFFER pixels>>         ]
+               OLD-WIDTH  [ FRAME-BUFFER last-dim>> first ] |
+
+          FRAME-BUFFER init-frame-buffer-pixels
+
+          FRAME-BUFFER update-last-dim
+
+          [let | NEW-PIXELS [ FRAME-BUFFER pixels>>         ]
+                 NEW-WIDTH  [ FRAME-BUFFER last-dim>> first ] |
+
+            OLD-PIXELS OLD-WIDTH NEW-PIXELS NEW-WIDTH copy-pixels ] ]
+      ]
+    }
+    { [ t ] [ ] }
+  }
+  cond ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+M:: <frame-buffer> draw-gadget* ( FRAME-BUFFER -- )
+
+  FRAME-BUFFER rect-dim { 0 1 } v* first2 glRasterPos2i
+
+  FRAME-BUFFER draw-pixels
+
+  FRAME-BUFFER update-frame-buffer
+
+  glFlush
+
+  FRAME-BUFFER read-pixels ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
index ecfb757fd2292d8f3ae26b854a77e24794064acd..43ae04c322ce1a9bf6912ca97c743e83385a6b99 100644 (file)
@@ -1,2 +1 @@
 Jose Antonio Ortega Ruiz
-Eduardo Cavazos
diff --git a/extra/fuel/eval/authors.txt b/extra/fuel/eval/authors.txt
new file mode 100644 (file)
index 0000000..48f802a
--- /dev/null
@@ -0,0 +1 @@
+Jose Antonio Ortega Ruiz
\ No newline at end of file
diff --git a/extra/fuel/eval/eval-tests.factor b/extra/fuel/eval/eval-tests.factor
new file mode 100644 (file)
index 0000000..845e912
--- /dev/null
@@ -0,0 +1,4 @@
+! Copyright (C) 2009 Jose Antonio Ortega Ruiz.
+! See http://factorcode.org/license.txt for BSD license.
+USING: tools.test fuel.eval ;
+IN: fuel.eval.tests
diff --git a/extra/fuel/eval/eval.factor b/extra/fuel/eval/eval.factor
new file mode 100644 (file)
index 0000000..c3b1a8a
--- /dev/null
@@ -0,0 +1,75 @@
+! Copyright (C) 2009 Jose Antonio Ortega Ruiz.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors arrays compiler.units continuations debugger
+fuel.pprint io io.streams.string kernel namespaces parser sequences
+vectors vocabs.parser ;
+
+IN: fuel.eval
+
+TUPLE: fuel-status in use restarts ;
+
+SYMBOL: fuel-status-stack
+V{ } clone fuel-status-stack set-global
+
+SYMBOL: fuel-eval-result
+f fuel-eval-result set-global
+
+SYMBOL: fuel-eval-output
+f fuel-eval-result set-global
+
+SYMBOL: fuel-eval-res-flag
+t fuel-eval-res-flag set-global
+
+: fuel-eval-restartable? ( -- ? )
+    fuel-eval-res-flag get-global ; inline
+
+: fuel-push-status ( -- )
+    in get use get clone restarts get-global clone
+    fuel-status boa
+    fuel-status-stack get push ;
+
+: fuel-pop-restarts ( restarts -- )
+    fuel-eval-restartable? [ drop ] [ clone restarts set-global ] if ; inline
+
+: fuel-pop-status ( -- )
+    fuel-status-stack get empty? [
+        fuel-status-stack get pop
+        [ in>> in set ]
+        [ use>> clone use set ]
+        [ restarts>> fuel-pop-restarts ] tri
+    ] unless ;
+
+: fuel-forget-error ( -- ) f error set-global ; inline
+: fuel-forget-result ( -- ) f fuel-eval-result set-global ; inline
+: fuel-forget-output ( -- ) f fuel-eval-output set-global ; inline
+: fuel-forget-status ( -- )
+    fuel-forget-error fuel-forget-result fuel-forget-output ; inline
+
+: fuel-send-retort ( -- )
+    error get fuel-eval-result get-global fuel-eval-output get-global
+    3array fuel-pprint flush nl "<~FUEL~>" write nl flush ;
+
+: (fuel-begin-eval) ( -- )
+    fuel-push-status fuel-forget-status ; inline
+
+: (fuel-end-eval) ( output -- )
+    fuel-eval-output set-global fuel-send-retort fuel-pop-status ; inline
+
+: (fuel-eval) ( lines -- )
+    [ [ parse-lines ] with-compilation-unit call ] curry
+    [ print-error ] recover ; inline
+
+: (fuel-eval-each) ( lines -- )
+    [ 1vector (fuel-eval) ] each ; inline
+
+: (fuel-eval-usings) ( usings -- )
+    [ "USING: " prepend " ;" append ] map
+    (fuel-eval-each) fuel-forget-error fuel-forget-output ;
+
+: (fuel-eval-in) ( in -- )
+    [ dup "IN: " prepend 1vector (fuel-eval) in set ] when* ; inline
+
+: (fuel-eval-in-context) ( lines in usings -- )
+    (fuel-begin-eval)
+    [ (fuel-eval-usings) (fuel-eval-in) (fuel-eval) ] with-string-writer
+    (fuel-end-eval) ;
index e2535ade30028148a7c6dab33cb708e91220563a..2bf8f1b98d36df37ec124185f2a1592b7c68412e 100644 (file)
-! Copyright (C) 2008 Jose Antonio Ortega Ruiz.
+! Copyright (C) 2008, 2009 Jose Antonio Ortega Ruiz.
 ! See http://factorcode.org/license.txt for BSD license.
 
-USING: accessors arrays classes classes.tuple compiler.units
-combinators continuations debugger definitions eval help
-io io.files io.streams.string kernel lexer listener listener.private
-make math namespaces parser prettyprint prettyprint.config
-quotations sequences strings source-files vectors vocabs.loader ;
+USING: assocs compiler.units fuel.eval fuel.help fuel.remote fuel.xref
+help.topics io.pathnames kernel namespaces parser sequences
+tools.scaffold vocabs.loader ;
 
 IN: fuel
 
-! Evaluation status:
+! Evaluation
 
-TUPLE: fuel-status in use ds? restarts ;
+: fuel-eval-restartable ( -- )
+    t fuel-eval-res-flag set-global ; inline
 
-SYMBOL: fuel-status-stack
-V{ } clone fuel-status-stack set-global
+: fuel-eval-non-restartable ( -- )
+    f fuel-eval-res-flag set-global ; inline
 
-SYMBOL: fuel-eval-result
-f clone fuel-eval-result set-global
+: fuel-eval-in-context ( lines in usings -- )
+    (fuel-eval-in-context) ;
 
-SYMBOL: fuel-eval-output
-f clone fuel-eval-result set-global
+: fuel-eval-set-result ( obj -- )
+    clone fuel-eval-result set-global ; inline
 
-SYMBOL: fuel-eval-res-flag
-t clone fuel-eval-res-flag set-global
+: fuel-retort ( -- ) fuel-send-retort ; inline
 
-: fuel-eval-restartable? ( -- ? )
-    fuel-eval-res-flag get-global ; inline
+! Loading files
 
-: fuel-eval-restartable ( -- )
-    t fuel-eval-res-flag set-global ; inline
+<PRIVATE
 
-: fuel-eval-non-restartable ( -- )
-    f fuel-eval-res-flag set-global ; inline
+SYMBOL: :uses
 
-: push-fuel-status ( -- )
-    in get use get clone display-stacks? get restarts get-global clone
-    fuel-status boa
-    fuel-status-stack get push ;
+: fuel-set-use-hook ( -- )
+    [ amended-use get clone :uses prefix fuel-eval-set-result ]
+    print-use-hook set ;
 
-: pop-fuel-status ( -- )
-    fuel-status-stack get empty? [
-        fuel-status-stack get pop {
-            [ in>> in set ]
-            [ use>> clone use set ]
-            [ ds?>> display-stacks? swap [ on ] [ off ] if ]
-            [
-                restarts>> fuel-eval-restartable? [ drop ] [
-                    clone restarts set-global
-                ] if
-            ]
-        } cleave
-    ] unless ;
+: (fuel-get-uses) ( lines -- )
+    [ parse-fresh drop ] curry with-compilation-unit ; inline
 
+PRIVATE>
 
-! Lispy pretty printing
+: fuel-run-file ( path -- )
+    [ fuel-set-use-hook run-file ] curry with-scope ; inline
 
-GENERIC: fuel-pprint ( obj -- )
+: fuel-with-autouse ( ... quot: ( ... -- ... ) -- ... )
+    [ auto-use? on fuel-set-use-hook call ] curry with-scope ; inline
 
-M: object fuel-pprint pprint ; inline
+: fuel-get-uses ( lines -- )
+    [ (fuel-get-uses) ] curry fuel-with-autouse ;
 
-M: f fuel-pprint drop "nil" write ; inline
+! Edit locations
 
-M: integer fuel-pprint pprint ; inline
+: fuel-get-word-location ( word -- )
+    word-location fuel-eval-set-result ;
 
-M: string fuel-pprint pprint ; inline
+: fuel-get-vocab-location ( vocab -- )
+    vocab-location fuel-eval-set-result ;
 
-M: sequence fuel-pprint
-    dup empty? [ drop f fuel-pprint ] [
-        "(" write
-        [ " " write ] [ fuel-pprint ] interleave
-        ")" write
-    ] if ;
+: fuel-get-doc-location ( word -- )
+    doc-location fuel-eval-set-result ;
 
-M: tuple fuel-pprint tuple>array fuel-pprint ; inline
+: fuel-get-article-location ( name -- )
+    article-location fuel-eval-set-result ;
 
-M: continuation fuel-pprint drop ":continuation" write ; inline
+: fuel-get-vocabs ( -- )
+    get-vocabs fuel-eval-set-result ;
 
-M: restart fuel-pprint name>> fuel-pprint ; inline
+: fuel-get-vocabs/prefix ( prefix -- )
+    get-vocabs/prefix fuel-eval-set-result ;
 
-SYMBOL: :restarts
+: fuel-get-words ( prefix names -- )
+    get-vocabs-words/prefix fuel-eval-set-result ;
 
-: fuel-restarts ( obj -- seq )
-    compute-restarts :restarts prefix ; inline
+! Cross-references
 
-M: condition fuel-pprint
-    [ error>> ] [ fuel-restarts ] bi 2array condition prefix fuel-pprint ;
+: fuel-callers-xref ( word -- ) callers-xref fuel-eval-set-result ;
 
-M: source-file-error fuel-pprint
-    [ file>> ] [ error>> ] bi 2array source-file-error prefix
-    fuel-pprint ;
+: fuel-callees-xref ( word -- ) callees-xref fuel-eval-set-result ;
 
-M: source-file fuel-pprint path>> fuel-pprint ;
+: fuel-apropos-xref ( str -- ) apropos-xref fuel-eval-set-result ;
 
-! Evaluation vocabulary
+: fuel-vocab-xref ( vocab -- ) vocab-xref fuel-eval-set-result ;
 
-: fuel-eval-set-result ( obj -- )
-    clone fuel-eval-result set-global ; inline
+: fuel-vocab-uses-xref ( vocab -- ) vocab-uses-xref fuel-eval-set-result ;
 
-: fuel-retort ( -- )
-    error get
-    fuel-eval-result get-global
-    fuel-eval-output get-global
-    3array fuel-pprint ;
+: fuel-vocab-usage-xref ( vocab -- ) vocab-usage-xref fuel-eval-set-result ;
 
-: fuel-forget-error ( -- ) f error set-global ; inline
-: fuel-forget-result ( -- ) f fuel-eval-result set-global ; inline
-: fuel-forget-output ( -- ) f fuel-eval-output set-global ; inline
+! Help support
 
-: (fuel-begin-eval) ( -- )
-    push-fuel-status
-    display-stacks? off
-    fuel-forget-error
-    fuel-forget-result
-    fuel-forget-output ;
+: fuel-get-article ( name -- ) article fuel-eval-set-result ;
 
-: (fuel-end-eval) ( quot -- )
-    with-string-writer fuel-eval-output set-global
-    fuel-retort pop-fuel-status ; inline
+: fuel-get-article-title ( name -- )
+    articles get at [ article-title ] [ f ] if* fuel-eval-set-result ;
 
-: (fuel-eval) ( lines -- )
-    [ [ parse-lines ] with-compilation-unit call ] curry
-    [ print-error ] recover ; inline
+: fuel-word-help ( name -- ) (fuel-word-help) fuel-eval-set-result ;
 
-: (fuel-eval-each) ( lines -- )
-    [ 1vector (fuel-eval) ] each ; inline
+: fuel-word-see ( name -- ) (fuel-word-see) fuel-eval-set-result ;
 
-: (fuel-eval-usings) ( usings -- )
-    [ "USING: " prepend " ;" append ] map
-    (fuel-eval-each) fuel-forget-error fuel-forget-output ;
+: fuel-word-def ( name -- ) (fuel-word-def) fuel-eval-set-result ;
 
-: (fuel-eval-in) ( in -- )
-    [ dup "IN: " prepend 1vector (fuel-eval) in set ] when* ; inline
+: fuel-vocab-help ( name -- ) (fuel-vocab-help) fuel-eval-set-result ;
 
-: fuel-eval-in-context ( lines in usings -- )
-    (fuel-begin-eval) [
-        (fuel-eval-usings)
-        (fuel-eval-in)
-        (fuel-eval)
-    ] (fuel-end-eval) ;
+: fuel-vocab-summary ( name -- )
+    (fuel-vocab-summary) fuel-eval-set-result ;
+
+: fuel-index ( quot -- ) call format-index fuel-eval-set-result ;
+
+: fuel-get-vocabs/tag ( tag -- )
+    (fuel-get-vocabs/tag) fuel-eval-set-result ;
 
-: fuel-begin-eval ( in -- )
-    (fuel-begin-eval)
-    (fuel-eval-in)
-    fuel-retort ;
+: fuel-get-vocabs/author ( author -- )
+    (fuel-get-vocabs/author) fuel-eval-set-result ;
 
-: fuel-eval ( lines -- )
-    (fuel-begin-eval) [ (fuel-eval) ] (fuel-end-eval) ; inline
+! Scaffold support
 
-: fuel-end-eval ( -- ) [ ] (fuel-end-eval) ; inline
+: fuel-scaffold-vocab ( root name devname -- )
+    developer-name set dup [ scaffold-vocab ] dip
+    dup require vocab-source-path (normalize-path) fuel-eval-set-result ;
 
-: fuel-get-edit-location ( defspec -- )
-    where [ first2 [ (normalize-path) ] dip 2array fuel-eval-set-result ]
-    when* ;
+: fuel-scaffold-help ( name devname -- )
+    developer-name set
+    dup require dup scaffold-help vocab-docs-path
+    (normalize-path) fuel-eval-set-result ;
 
-: fuel-run-file ( path -- ) run-file ; inline
+: fuel-scaffold-get-root ( name -- ) find-vocab-root fuel-eval-set-result ;
 
-: fuel-startup ( -- ) "listener" run ; inline
+! Remote connection
 
-MAIN: fuel-startup
+MAIN: fuel-start-remote-listener*
diff --git a/extra/fuel/help/authors.txt b/extra/fuel/help/authors.txt
new file mode 100644 (file)
index 0000000..48f802a
--- /dev/null
@@ -0,0 +1 @@
+Jose Antonio Ortega Ruiz
\ No newline at end of file
diff --git a/extra/fuel/help/help-tests.factor b/extra/fuel/help/help-tests.factor
new file mode 100644 (file)
index 0000000..3c6ca6f
--- /dev/null
@@ -0,0 +1,4 @@
+! Copyright (C) 2009 Jose Antonio Ortega Ruiz.
+! See http://factorcode.org/license.txt for BSD license.
+USING: tools.test fuel.help ;
+IN: fuel.help.tests
diff --git a/extra/fuel/help/help.factor b/extra/fuel/help/help.factor
new file mode 100644 (file)
index 0000000..e70327b
--- /dev/null
@@ -0,0 +1,114 @@
+! Copyright (C) 2009 Jose Antonio Ortega Ruiz.
+! See http://factorcode.org/license.txt for BSD license.
+
+USING: accessors arrays assocs combinators help help.crossref
+help.markup help.topics io io.streams.string kernel make memoize
+namespaces parser prettyprint sequences summary tools.vocabs
+tools.vocabs.browser vocabs vocabs.loader words ;
+
+IN: fuel.help
+
+<PRIVATE
+
+MEMO: fuel-find-word ( name -- word/f )
+    [ [ name>> ] dip = ] curry all-words swap filter
+    dup empty? not [ first ] [ drop f ] if ;
+
+: fuel-value-str ( word -- str )
+    [ pprint-short ] with-string-writer ; inline
+
+: fuel-definition-str ( word -- str )
+    [ see ] with-string-writer ; inline
+
+: fuel-methods-str ( word -- str )
+    methods dup empty? not [
+        [ [ see nl ] each ] with-string-writer
+    ] [ drop f ] if ; inline
+
+: fuel-related-words ( word -- seq )
+    dup "related" word-prop remove ; inline
+
+: fuel-parent-topics ( word -- seq )
+    help-path [ dup article-title swap 2array ] map ; inline
+
+: (fuel-word-element) ( word -- element )
+    \ article swap dup article-title swap
+    [
+        {
+            [ fuel-parent-topics [ \ $doc-path prefix , ] unless-empty ]
+            [ \ $vocabulary swap vocabulary>> 2array , ]
+            [ word-help % ]
+            [ fuel-related-words [ \ $related swap 2array , ] unless-empty ]
+            [ get-global [ \ $value swap fuel-value-str 2array , ] when* ]
+            [ \ $definition swap fuel-definition-str 2array , ]
+            [ fuel-methods-str [ \ $methods swap 2array , ] when* ]
+        } cleave
+    ] { } make 3array ;
+
+: fuel-vocab-help-row ( vocab -- element )
+    [ vocab-status-string ] [ vocab-name ] [ summary ] tri 3array ;
+
+: fuel-vocab-help-root-heading ( root -- element )
+    [ "Children from " prepend ] [ "Other children" ] if* \ $heading swap 2array ;
+
+SYMBOL: vocab-list
+
+: fuel-vocab-help-table ( vocabs -- element )
+    [ fuel-vocab-help-row ] map vocab-list prefix ;
+
+: fuel-vocab-list ( assoc -- seq )
+    [
+        [ drop f ] [
+            [ fuel-vocab-help-root-heading ]
+            [ fuel-vocab-help-table ] bi*
+            [ 2array ] [ drop f ] if*
+        ] if-empty
+    ] { } assoc>map [  ] filter ;
+
+: fuel-vocab-children-help ( name -- element )
+    all-child-vocabs fuel-vocab-list ; inline
+
+: fuel-vocab-describe-words ( name -- element )
+    [ describe-words ] with-string-writer \ describe-words swap 2array ; inline
+
+: (fuel-vocab-element) ( name -- element )
+    dup require \ article swap dup >vocab-link
+    [
+        {
+            [ vocab-authors [ \ $authors prefix , ] when* ]
+            [ vocab-tags [ \ $tags prefix , ] when* ]
+            [ summary [ { $heading "Summary" } swap 2array , ] when* ]
+            [ drop \ $nl , ]
+            [ vocab-help [ article content>> % ] when* ]
+            [ name>> fuel-vocab-describe-words , ]
+            [ name>> fuel-vocab-children-help % ]
+        } cleave
+    ] { } make 3array ;
+
+PRIVATE>
+
+: (fuel-word-help) ( name -- elem )
+    fuel-find-word [ [ auto-use? on (fuel-word-element) ] with-scope ] [ f ] if* ;
+
+: (fuel-word-see) ( word -- elem )
+    [ name>> \ article swap ]
+    [ [ see ] with-string-writer \ $code swap 2array ] bi 3array ; inline
+
+: (fuel-word-def) ( name -- str )
+    fuel-find-word [ [ def>> pprint ] with-string-writer ] [ f ] if* ; inline
+
+: (fuel-vocab-summary) ( name -- str ) >vocab-link summary ; inline
+
+: (fuel-vocab-help) ( name -- str )
+    dup empty? [ fuel-vocab-children-help ] [ (fuel-vocab-element) ] if ;
+
+MEMO: (fuel-get-vocabs/author) ( author -- element )
+    [ "Vocabularies by " prepend \ $heading swap 2array ]
+    [ authored fuel-vocab-list ] bi 2array ;
+
+MEMO: (fuel-get-vocabs/tag) ( tag -- element )
+    [ "Vocabularies tagged " prepend \ $heading swap 2array ]
+    [ tagged fuel-vocab-list ] bi 2array ;
+
+: format-index ( seq -- seq )
+    [ [ >link name>> ] [ article-title ] bi 2array \ $subsection prefix ] map ;
diff --git a/extra/fuel/pprint/authors.txt b/extra/fuel/pprint/authors.txt
new file mode 100644 (file)
index 0000000..48f802a
--- /dev/null
@@ -0,0 +1 @@
+Jose Antonio Ortega Ruiz
\ No newline at end of file
diff --git a/extra/fuel/pprint/pprint-tests.factor b/extra/fuel/pprint/pprint-tests.factor
new file mode 100644 (file)
index 0000000..a9868ea
--- /dev/null
@@ -0,0 +1,4 @@
+! Copyright (C) 2009 Jose Antonio Ortega Ruiz.
+! See http://factorcode.org/license.txt for BSD license.
+USING: tools.test fuel.pprint ;
+IN: fuel.pprint.tests
diff --git a/extra/fuel/pprint/pprint.factor b/extra/fuel/pprint/pprint.factor
new file mode 100644 (file)
index 0000000..25f3aec
--- /dev/null
@@ -0,0 +1,63 @@
+! Copyright (C) 2009 Jose Antonio Ortega Ruiz.
+! See http://factorcode.org/license.txt for BSD license.
+
+USING: accessors arrays classes.tuple combinators continuations io
+kernel lexer math prettyprint quotations sequences source-files
+strings words ;
+
+IN: fuel.pprint
+
+GENERIC: fuel-pprint ( obj -- )
+
+<PRIVATE
+
+: fuel-maybe-scape ( ch -- seq )
+    dup "\\\"?#()[]'`" member? [ CHAR: \ swap 2array ] [ 1array ] if ;
+
+SYMBOL: :restarts
+
+: fuel-restarts ( obj -- seq )
+    compute-restarts :restarts prefix ; inline
+
+: fuel-pprint-sequence ( seq open close -- )
+    [ write ] dip swap [ " " write ] [ fuel-pprint ] interleave write ; inline
+
+PRIVATE>
+
+M: object fuel-pprint pprint ; inline
+
+M: word fuel-pprint
+    name>> V{ } clone [ fuel-maybe-scape append ] reduce >string write ;
+
+M: f fuel-pprint drop "nil" write ; inline
+
+M: integer fuel-pprint pprint ; inline
+
+M: string fuel-pprint pprint ; inline
+
+M: sequence fuel-pprint "(" ")" fuel-pprint-sequence ; inline
+
+M: quotation fuel-pprint "[" "]" fuel-pprint-sequence ; inline
+
+M: tuple fuel-pprint tuple>array fuel-pprint ; inline
+
+M: continuation fuel-pprint drop ":continuation" write ; inline
+
+M: restart fuel-pprint name>> fuel-pprint ; inline
+
+M: condition fuel-pprint
+    [ error>> ] [ fuel-restarts ] bi 2array condition prefix fuel-pprint ;
+
+M: lexer-error fuel-pprint
+    {
+        [ line>> ]
+        [ column>> ]
+        [ line-text>> ]
+        [ fuel-restarts ]
+    } cleave 4array lexer-error prefix fuel-pprint ;
+
+M: source-file-error fuel-pprint
+    [ file>> ] [ error>> ] bi 2array source-file-error prefix
+    fuel-pprint ;
+
+M: source-file fuel-pprint path>> fuel-pprint ;
diff --git a/extra/fuel/remote/authors.txt b/extra/fuel/remote/authors.txt
new file mode 100644 (file)
index 0000000..48f802a
--- /dev/null
@@ -0,0 +1 @@
+Jose Antonio Ortega Ruiz
\ No newline at end of file
diff --git a/extra/fuel/remote/remote.factor b/extra/fuel/remote/remote.factor
new file mode 100644 (file)
index 0000000..d13aff8
--- /dev/null
@@ -0,0 +1,31 @@
+! Copyright (C) 2009 Jose Antonio Ortega Ruiz.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors debugger io io.encodings.utf8 io.servers.connection
+kernel listener math namespaces ;
+
+IN: fuel.remote
+
+<PRIVATE
+
+: start-listener ( -- )
+    [ [ print-error-and-restarts ] error-hook set listener ] with-scope ;
+
+: server ( port -- server )
+    <threaded-server>
+        "tty-server" >>name
+        utf8 >>encoding
+        swap local-server >>insecure
+        [ start-listener ] >>handler
+        f >>timeout ;
+
+: print-banner ( -- )
+    "Starting server. Connect with 'M-x connect-to-factor' in Emacs"
+    write nl flush ;
+
+PRIVATE>
+
+: fuel-start-remote-listener ( port/f -- )
+    print-banner integer? [ 9000 ] unless* server start-server ;
+
+: fuel-start-remote-listener* ( -- ) f fuel-start-remote-listener ;
+
diff --git a/extra/fuel/xref/authors.txt b/extra/fuel/xref/authors.txt
new file mode 100644 (file)
index 0000000..48f802a
--- /dev/null
@@ -0,0 +1 @@
+Jose Antonio Ortega Ruiz
\ No newline at end of file
diff --git a/extra/fuel/xref/xref.factor b/extra/fuel/xref/xref.factor
new file mode 100644 (file)
index 0000000..5f5e28d
--- /dev/null
@@ -0,0 +1,69 @@
+! Copyright (C) 2009 Jose Antonio Ortega Ruiz.
+! See http://factorcode.org/license.txt for BSD license.
+
+USING: accessors arrays assocs definitions help.topics io.pathnames
+kernel math math.order memoize namespaces sequences sets sorting
+tools.crossref tools.vocabs vocabs vocabs.parser words ;
+
+IN: fuel.xref
+
+<PRIVATE
+
+: normalize-loc ( seq -- path line )
+    [ dup length 0 > [ first (normalize-path) ] [ drop f ] if ]
+    [ dup length 1 > [ second ] [ drop 1 ] if ] bi ;
+
+: get-loc ( object -- loc ) normalize-loc 2array ;
+
+: word>xref ( word -- xref )
+    [ name>> ] [ vocabulary>> ] [ where normalize-loc ] tri 4array ;
+
+: vocab>xref ( vocab -- xref )
+    dup dup >vocab-link where normalize-loc 4array ;
+
+: sort-xrefs ( seq -- seq' )
+    [ [ first ] dip first <=> ] sort ; inline
+
+: format-xrefs ( seq -- seq' )
+    [ word? ] filter [ word>xref ] map ; inline
+
+: filter-prefix ( seq prefix -- seq )
+    [ drop-prefix nip length 0 = ] curry filter prune ; inline
+
+MEMO: (vocab-words) ( name -- seq )
+    >vocab-link words [ name>> ] map ;
+
+: current-words ( -- seq )
+    use get [ keys ] map concat ; inline
+
+: vocabs-words ( names -- seq )
+    prune [ (vocab-words) ] map concat ; inline
+
+PRIVATE>
+
+: callers-xref ( word -- seq ) usage format-xrefs sort-xrefs ;
+
+: callees-xref ( word -- seq ) uses format-xrefs sort-xrefs ;
+
+: apropos-xref ( str -- seq ) words-matching format-xrefs ;
+
+: vocab-xref ( vocab -- seq ) words format-xrefs ;
+
+: word-location ( word -- loc ) where get-loc ;
+
+: vocab-location ( vocab -- loc ) >vocab-link where get-loc ;
+
+: vocab-uses-xref ( vocab -- seq ) vocab-uses [ vocab>xref ] map ;
+
+: vocab-usage-xref ( vocab -- seq ) vocab-usage [ vocab>xref ] map ;
+
+: doc-location ( word -- loc ) props>> "help-loc" swap at get-loc ;
+
+: article-location ( name -- loc ) article loc>> get-loc ;
+
+: get-vocabs ( -- seq ) all-vocabs-seq [ vocab-name ] map ;
+
+: get-vocabs/prefix ( prefix -- seq ) get-vocabs swap filter-prefix ;
+
+: get-vocabs-words/prefix ( prefix names/f -- seq )
+    [ vocabs-words ] [ current-words ] if* natural-sort swap filter-prefix ;
diff --git a/extra/game-input/backend/authors.txt b/extra/game-input/backend/authors.txt
deleted file mode 100644 (file)
index f13c9c1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Joe Groff
diff --git a/extra/game-input/backend/backend.factor b/extra/game-input/backend/backend.factor
deleted file mode 100644 (file)
index df61179..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-USING: eval multiline system combinators ;
-IN: game-input.backend
-
-STRING: set-backend-for-macosx
-USING: namespaces parser game-input.backend.iokit ;
-<< "game-input" (use+) >>
-iokit-game-input-backend game-input-backend set-global
-;
-
-STRING: set-backend-for-windows
-USING: namespaces parser game-input.backend.dinput ;
-<< "game-input" (use+) >>
-dinput-game-input-backend game-input-backend set-global
-;
-
-{
-    { [ os macosx? ] [ set-backend-for-macosx eval ] }
-    { [ os windows? ] [ set-backend-for-windows eval ] }
-    { [ t ] [ ] }
-} cond
-
diff --git a/extra/game-input/backend/dinput/authors.txt b/extra/game-input/backend/dinput/authors.txt
deleted file mode 100755 (executable)
index f13c9c1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Joe Groff
diff --git a/extra/game-input/backend/dinput/dinput.factor b/extra/game-input/backend/dinput/dinput.factor
deleted file mode 100755 (executable)
index b66a722..0000000
+++ /dev/null
@@ -1,289 +0,0 @@
-USING: windows.dinput windows.dinput.constants parser symbols
-alien.c-types windows.ole32 namespaces assocs kernel arrays
-vectors windows.kernel32 windows.com windows.dinput shuffle
-windows.user32 windows.messages sequences combinators
-math.geometry.rect ui.windows accessors math windows alien
-alien.strings io.encodings.utf16 io.encodings.utf16n
-continuations byte-arrays locals
-game-input.backend.dinput.keys-array ;
-<< "game-input" (use+) >>
-IN: game-input.backend.dinput
-
-SINGLETON: dinput-game-input-backend
-
-SYMBOLS: +dinput+ +keyboard-device+ +keyboard-state+
-    +controller-devices+ +controller-guids+
-    +device-change-window+ +device-change-handle+ ;
-
-: create-dinput ( -- )
-    f GetModuleHandle DIRECTINPUT_VERSION IDirectInput8W-iid
-    f <void*> [ f DirectInput8Create ole32-error ] keep *void*
-    +dinput+ set-global ;
-
-: delete-dinput ( -- )
-    +dinput+ global [ com-release f ] change-at ;
-
-: device-for-guid ( guid -- device )
-    +dinput+ get swap f <void*>
-    [ f IDirectInput8W::CreateDevice ole32-error ] keep *void* ;
-
-: set-coop-level ( device -- )
-    +device-change-window+ get DISCL_BACKGROUND DISCL_NONEXCLUSIVE bitor
-    IDirectInputDevice8W::SetCooperativeLevel ole32-error ;
-
-: set-data-format ( device format-symbol -- )
-    get IDirectInputDevice8W::SetDataFormat ole32-error ;
-
-: configure-keyboard ( keyboard -- )
-    [ c_dfDIKeyboard_HID set-data-format ] [ set-coop-level ] bi ;
-: configure-controller ( controller -- )
-    [ c_dfDIJoystick2 set-data-format ] [ set-coop-level ] bi ;
-
-: find-keyboard ( -- )
-    GUID_SysKeyboard device-for-guid
-    [ configure-keyboard ]
-    [ +keyboard-device+ set-global ] bi
-    256 <byte-array> <keys-array> keyboard-state boa
-    +keyboard-state+ set-global ;
-
-: device-info ( device -- DIDEVICEIMAGEINFOW )
-    "DIDEVICEINSTANCEW" <c-object>
-    "DIDEVICEINSTANCEW" heap-size over set-DIDEVICEINSTANCEW-dwSize
-    [ IDirectInputDevice8W::GetDeviceInfo ole32-error ] keep ;
-: device-caps ( device -- DIDEVCAPS )
-    "DIDEVCAPS" <c-object>
-    "DIDEVCAPS" heap-size over set-DIDEVCAPS-dwSize
-    [ IDirectInputDevice8W::GetCapabilities ole32-error ] keep ;
-
-: <guid> ( memory -- byte-array )
-    "GUID" heap-size memory>byte-array ;
-
-: device-guid ( device -- guid )
-    device-info DIDEVICEINSTANCEW-guidInstance <guid> ;
-
-: device-attached? ( device -- ? )
-    +dinput+ get swap device-guid
-    IDirectInput8W::GetDeviceStatus S_OK = ;
-
-: find-device-axes-callback ( -- alien )
-    [ ! ( lpddoi pvRef -- BOOL )
-        +controller-devices+ get at
-        swap DIDEVICEOBJECTINSTANCEW-guidType <guid> {
-            { [ dup GUID_XAxis = ] [ drop 0.0 >>x ] }
-            { [ dup GUID_YAxis = ] [ drop 0.0 >>y ] }
-            { [ dup GUID_ZAxis = ] [ drop 0.0 >>z ] }
-            { [ dup GUID_RxAxis = ] [ drop 0.0 >>rx ] }
-            { [ dup GUID_RyAxis = ] [ drop 0.0 >>ry ] }
-            { [ dup GUID_RzAxis = ] [ drop 0.0 >>rz ] }
-            { [ dup GUID_Slider = ] [ drop 0.0 >>slider ] }
-            [ drop ]
-        } cond drop
-        DIENUM_CONTINUE
-    ] LPDIENUMDEVICEOBJECTSCALLBACKW ;
-
-: find-device-axes ( device controller-state -- controller-state )
-    swap [ +controller-devices+ get set-at ] 2keep
-    find-device-axes-callback over DIDFT_AXIS
-    IDirectInputDevice8W::EnumObjects ole32-error ;
-
-: controller-state-template ( device -- controller-state )
-    controller-state new
-    over device-caps
-    [ DIDEVCAPS-dwButtons f <array> >>buttons ]
-    [ DIDEVCAPS-dwPOVs zero? f pov-neutral ? >>pov ] bi
-    find-device-axes ;
-
-: device-known? ( guid -- ? )
-    +controller-guids+ get key? ; inline
-
-: (add-controller) ( guid -- )
-    device-for-guid {
-        [ configure-controller ]
-        [ controller-state-template ]
-        [ dup device-guid +controller-guids+ get set-at ]
-        [ +controller-devices+ get set-at ]
-    } cleave ;
-
-: add-controller ( guid -- )
-    dup <guid> device-known? [ drop ] [ (add-controller) ] if ;
-
-: remove-controller ( device -- )
-    [ +controller-devices+ get delete-at ]
-    [ device-guid +controller-guids+ get delete-at ]
-    [ com-release ] tri ;
-
-: find-controller-callback ( -- alien )
-    [ ! ( lpddi pvRef -- BOOL )
-        drop DIDEVICEINSTANCEW-guidInstance add-controller
-        DIENUM_CONTINUE
-    ] LPDIENUMDEVICESCALLBACKW ;
-
-: find-controllers ( -- )
-    +dinput+ get DI8DEVCLASS_GAMECTRL find-controller-callback
-    f DIEDFL_ATTACHEDONLY IDirectInput8W::EnumDevices ole32-error ;
-
-: set-up-controllers ( -- )
-    4 <vector> +controller-devices+ set-global
-    4 <vector> +controller-guids+ set-global
-    find-controllers ;
-
-: find-and-remove-detached-devices ( -- )
-    +controller-devices+ get keys
-    [ device-attached? not ] filter
-    [ remove-controller ] each ;
-
-: device-interface? ( dbt-broadcast-hdr -- ? )
-    DEV_BROADCAST_HDR-dbch_devicetype DBT_DEVTYP_DEVICEINTERFACE = ;
-
-: device-arrived ( dbt-broadcast-hdr -- )
-    device-interface? [ find-controllers ] when ;
-
-: device-removed ( dbt-broadcast-hdr -- )
-    device-interface? [ find-and-remove-detached-devices ] when ;
-
-: handle-wm-devicechange ( hWnd uMsg wParam lParam -- )
-    [ 2drop ] 2dip swap {
-        { [ dup DBT_DEVICEARRIVAL = ]         [ drop <alien> device-arrived ] }
-        { [ dup DBT_DEVICEREMOVECOMPLETE = ]  [ drop <alien> device-removed ] }
-        [ 2drop ]
-    } cond ;
-
-TUPLE: window-rect < rect window-loc ;
-: <zero-window-rect> ( -- window-rect )
-    window-rect new
-    { 0 0 } >>window-loc
-    { 0 0 } >>loc
-    { 0 0 } >>dim ;
-
-: (device-notification-filter) ( -- DEV_BROADCAST_DEVICEW )
-    "DEV_BROADCAST_DEVICEW" <c-object>
-    "DEV_BROADCAST_DEVICEW" heap-size over set-DEV_BROADCAST_DEVICEW-dbcc_size
-    DBT_DEVTYP_DEVICEINTERFACE over set-DEV_BROADCAST_DEVICEW-dbcc_devicetype ;
-
-: create-device-change-window ( -- )
-    <zero-window-rect> create-window
-    [
-        (device-notification-filter)
-        DEVICE_NOTIFY_WINDOW_HANDLE DEVICE_NOTIFY_ALL_INTERFACE_CLASSES bitor
-        RegisterDeviceNotification
-        +device-change-handle+ set-global
-    ]
-    [ +device-change-window+ set-global ] bi ;
-
-: close-device-change-window ( -- )
-    +device-change-handle+ global
-    [ UnregisterDeviceNotification drop f ] change-at
-    +device-change-window+ global
-    [ DestroyWindow win32-error=0/f f ] change-at ;
-
-: add-wm-devicechange ( -- )
-    [ 4dup handle-wm-devicechange DefWindowProc ]
-    WM_DEVICECHANGE add-wm-handler ;
-
-: remove-wm-devicechange ( -- )
-    WM_DEVICECHANGE wm-handlers get-global delete-at ;
-
-: release-controllers ( -- )
-    +controller-devices+ global [
-        [ drop com-release ] assoc-each f
-    ] change-at
-    f +controller-guids+ set-global ;
-
-: release-keyboard ( -- )
-    +keyboard-device+ global
-    [ com-release f ] change-at
-    f +keyboard-state+ set-global ;
-
-M: dinput-game-input-backend (open-game-input)
-    create-dinput
-    create-device-change-window
-    find-keyboard
-    set-up-controllers
-    add-wm-devicechange ;
-
-M: dinput-game-input-backend (close-game-input)
-    remove-wm-devicechange
-    release-controllers
-    release-keyboard
-    close-device-change-window
-    delete-dinput ;
-
-M: dinput-game-input-backend (reset-game-input)
-    {
-        +dinput+ +keyboard-device+ +keyboard-state+
-        +controller-devices+ +controller-guids+
-        +device-change-window+ +device-change-handle+
-    } [ f swap set-global ] each ;
-
-M: dinput-game-input-backend get-controllers
-    +controller-devices+ get
-    [ drop controller boa ] { } assoc>map ;
-
-M: dinput-game-input-backend product-string
-    handle>> device-info DIDEVICEINSTANCEW-tszProductName
-    utf16n alien>string ;
-
-M: dinput-game-input-backend product-id
-    handle>> device-info DIDEVICEINSTANCEW-guidProduct <guid> ;
-M: dinput-game-input-backend instance-id
-    handle>> device-guid ;
-
-:: with-acquisition ( device acquired-quot succeeded-quot failed-quot -- result/f )
-    device IDirectInputDevice8W::Acquire succeeded? [
-        device acquired-quot call
-        succeeded-quot call
-    ] failed-quot if ; inline
-
-: pov-values
-    {
-        pov-up pov-up-right pov-right pov-down-right
-        pov-down pov-down-left pov-left pov-up-left
-    } ; inline
-
-: >axis ( long -- float )
-    32767 - 32767.0 /f ;
-: >slider ( long -- float )
-    65535.0 /f ;
-: >pov ( long -- symbol )
-    dup HEX: FFFF bitand HEX: FFFF =
-    [ drop pov-neutral ]
-    [ 2750 + 4500 /i pov-values nth ] if ;
-: >buttons ( alien length -- array )
-    memory>byte-array <keys-array> ;
-
-: (fill-if) ( controller-state DIJOYSTATE2 ? quot -- )
-    [ drop ] compose [ 2drop ] if ; inline
-
-: fill-controller-state ( controller-state DIJOYSTATE2 -- controller-state )
-    {
-        [ over x>> [ DIJOYSTATE2-lX >axis >>x ] (fill-if) ]
-        [ over y>> [ DIJOYSTATE2-lY >axis >>y ] (fill-if) ]
-        [ over z>> [ DIJOYSTATE2-lZ >axis >>z ] (fill-if) ]
-        [ over rx>> [ DIJOYSTATE2-lRx >axis >>rx ] (fill-if) ]
-        [ over ry>> [ DIJOYSTATE2-lRy >axis >>ry ] (fill-if) ]
-        [ over rz>> [ DIJOYSTATE2-lRz >axis >>rz ] (fill-if) ]
-        [ over slider>> [ DIJOYSTATE2-rglSlider *long >slider >>slider ] (fill-if) ]
-        [ over pov>> [ DIJOYSTATE2-rgdwPOV *uint >pov >>pov ] (fill-if) ]
-        [ DIJOYSTATE2-rgbButtons over buttons>> length >buttons >>buttons ]
-    } 2cleave ;
-
-: get-device-state ( device byte-array -- )
-    [ dup IDirectInputDevice8W::Poll ole32-error ] dip
-    [ length ] keep
-    IDirectInputDevice8W::GetDeviceState ole32-error ;
-
-: (read-controller) ( handle template -- state )
-    swap [ "DIJOYSTATE2" heap-size <byte-array> [ get-device-state ] keep ]
-    [ fill-controller-state ] [ drop f ] with-acquisition ;
-
-M: dinput-game-input-backend read-controller
-    handle>> dup +controller-devices+ get at
-    [ (read-controller) ] [ drop f ] if* ;
-
-M: dinput-game-input-backend calibrate-controller
-    handle>> f 0 IDirectInputDevice8W::RunControlPanel ole32-error ;
-
-M: dinput-game-input-backend read-keyboard
-    +keyboard-device+ get
-    [ +keyboard-state+ get [ keys>> underlying>> get-device-state ] keep ]
-    [ ] [ f ] with-acquisition ;
diff --git a/extra/game-input/backend/dinput/keys-array/keys-array.factor b/extra/game-input/backend/dinput/keys-array/keys-array.factor
deleted file mode 100755 (executable)
index b2dbe9a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-USING: sequences sequences.private math alien.c-types
-accessors ;
-IN: game-input.backend.dinput.keys-array
-
-TUPLE: keys-array underlying ;
-C: <keys-array> keys-array
-
-: >key ( byte -- ? )
-    HEX: 80 bitand c-bool> ;
-
-M: keys-array length underlying>> length ;
-M: keys-array nth-unsafe underlying>> nth-unsafe >key ;
-
-INSTANCE: keys-array sequence
-
diff --git a/extra/game-input/backend/dinput/summary.txt b/extra/game-input/backend/dinput/summary.txt
deleted file mode 100755 (executable)
index f758a5f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-DirectInput backend for game-input
diff --git a/extra/game-input/backend/dinput/tags.txt b/extra/game-input/backend/dinput/tags.txt
deleted file mode 100755 (executable)
index 82506ff..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-unportable
-games
diff --git a/extra/game-input/backend/iokit/authors.txt b/extra/game-input/backend/iokit/authors.txt
deleted file mode 100644 (file)
index f13c9c1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Joe Groff
diff --git a/extra/game-input/backend/iokit/iokit.factor b/extra/game-input/backend/iokit/iokit.factor
deleted file mode 100755 (executable)
index 5267dd6..0000000
+++ /dev/null
@@ -1,278 +0,0 @@
-USING: cocoa cocoa.plists core-foundation iokit iokit.hid
-kernel cocoa.enumeration destructors math.parser cocoa.application 
-sequences locals combinators.short-circuit threads
-symbols namespaces assocs vectors arrays combinators
-core-foundation.run-loop accessors sequences.private
-alien.c-types math parser ;
-<< "game-input" (use+) >>
-IN: game-input.backend.iokit
-
-SINGLETON: iokit-game-input-backend
-
-: hid-manager-matching ( matching-seq -- alien )
-    f 0 IOHIDManagerCreate
-    [ swap >plist IOHIDManagerSetDeviceMatchingMultiple ]
-    keep ;
-
-: devices-from-hid-manager ( manager -- vector )
-    [
-        IOHIDManagerCopyDevices
-        [ &CFRelease NSFastEnumeration>vector ] [ f ] if*
-    ] with-destructors ;
-
-: game-devices-matching-seq
-    {
-        H{ { "DeviceUsage" 4 } { "DeviceUsagePage" 1 } } ! joysticks
-        H{ { "DeviceUsage" 5 } { "DeviceUsagePage" 1 } } ! gamepads
-        H{ { "DeviceUsage" 6 } { "DeviceUsagePage" 1 } } ! keyboards
-    } ; inline
-
-: buttons-matching-hash
-    H{ { "UsagePage" 9 } { "Type" 2 } } ; inline
-: keys-matching-hash
-    H{ { "UsagePage" 7 } { "Type" 2 } } ; inline
-: x-axis-matching-hash
-    H{ { "UsagePage" 1 } { "Usage" HEX: 30 } { "Type" 1 } } ; inline
-: y-axis-matching-hash
-    H{ { "UsagePage" 1 } { "Usage" HEX: 31 } { "Type" 1 } } ; inline
-: z-axis-matching-hash
-    H{ { "UsagePage" 1 } { "Usage" HEX: 32 } { "Type" 1 } } ; inline
-: rx-axis-matching-hash
-    H{ { "UsagePage" 1 } { "Usage" HEX: 33 } { "Type" 1 } } ; inline
-: ry-axis-matching-hash
-    H{ { "UsagePage" 1 } { "Usage" HEX: 34 } { "Type" 1 } } ; inline
-: rz-axis-matching-hash
-    H{ { "UsagePage" 1 } { "Usage" HEX: 35 } { "Type" 1 } } ; inline
-: slider-matching-hash
-    H{ { "UsagePage" 1 } { "Usage" HEX: 36 } { "Type" 1 } } ; inline
-: hat-switch-matching-hash
-    H{ { "UsagePage" 1 } { "Usage" HEX: 39 } { "Type" 1 } } ; inline
-
-: device-elements-matching ( device matching-hash -- vector )
-    [
-        >plist 0 IOHIDDeviceCopyMatchingElements
-        [ &CFRelease NSFastEnumeration>vector ] [ f ] if*
-    ] with-destructors ;
-
-: button-count ( device -- button-count )
-    buttons-matching-hash device-elements-matching length ;
-
-: ?axis ( device hash -- axis/f )
-    device-elements-matching [ f ] [ first ] if-empty ;
-
-: ?x-axis ( device -- ? )
-    x-axis-matching-hash ?axis ;
-: ?y-axis ( device -- ? )
-    y-axis-matching-hash ?axis ;
-: ?z-axis ( device -- ? )
-    z-axis-matching-hash ?axis ;
-: ?rx-axis ( device -- ? )
-    rx-axis-matching-hash ?axis ;
-: ?ry-axis ( device -- ? )
-    ry-axis-matching-hash ?axis ;
-: ?rz-axis ( device -- ? )
-    rz-axis-matching-hash ?axis ;
-: ?slider ( device -- ? )
-    slider-matching-hash ?axis ;
-: ?hat-switch ( device -- ? )
-    hat-switch-matching-hash ?axis ;
-
-: hid-manager-matching-game-devices ( -- alien )
-    game-devices-matching-seq hid-manager-matching ;
-
-: device-property ( device key -- value )
-    <NSString> IOHIDDeviceGetProperty plist> ;
-: element-property ( element key -- value )
-    <NSString> IOHIDElementGetProperty plist> ;
-: set-element-property ( element key value -- )
-    [ <NSString> ] [ >plist ] bi* IOHIDElementSetProperty drop ;
-: transfer-element-property ( element from-key to-key -- )
-    [ dupd element-property ] dip swap set-element-property ;
-
-: controller-device? ( device -- ? )
-    {
-        [ 1 4 IOHIDDeviceConformsTo ]
-        [ 1 5 IOHIDDeviceConformsTo ]
-    } 1|| ;
-
-: element-usage ( element -- {usage-page,usage} )
-    [ IOHIDElementGetUsagePage ] [ IOHIDElementGetUsage ] bi
-    2array ;
-
-: button? ( {usage-page,usage} -- ? )
-    first 9 = ; inline
-: keyboard-key? ( {usage-page,usage} -- ? )
-    first 7 = ; inline
-: x-axis? ( {usage-page,usage} -- ? )
-    { 1 HEX: 30 } = ; inline
-: y-axis? ( {usage-page,usage} -- ? )
-    { 1 HEX: 31 } = ; inline
-: z-axis? ( {usage-page,usage} -- ? )
-    { 1 HEX: 32 } = ; inline
-: rx-axis? ( {usage-page,usage} -- ? )
-    { 1 HEX: 33 } = ; inline
-: ry-axis? ( {usage-page,usage} -- ? )
-    { 1 HEX: 34 } = ; inline
-: rz-axis? ( {usage-page,usage} -- ? )
-    { 1 HEX: 35 } = ; inline
-: slider? ( {usage-page,usage} -- ? )
-    { 1 HEX: 36 } = ; inline
-: hat-switch? ( {usage-page,usage} -- ? )
-    { 1 HEX: 39 } = ; inline
-
-: pov-values
-    {
-        pov-up pov-up-right pov-right pov-down-right
-        pov-down pov-down-left pov-left pov-up-left
-        pov-neutral
-    } ; inline
-
-: button-value ( value -- f/(0,1] )
-    IOHIDValueGetIntegerValue dup zero? [ drop f ] when ;
-: axis-value ( value -- [-1,1] )
-    kIOHIDValueScaleTypeCalibrated IOHIDValueGetScaledValue ;
-: pov-value ( value -- pov-direction )
-    IOHIDValueGetIntegerValue pov-values ?nth [ pov-neutral ] unless* ;
-
-: record-controller ( controller-state value -- )
-    dup IOHIDValueGetElement element-usage {
-        { [ dup button? ] [ [ button-value ] [ second 1- ] bi* rot buttons>> set-nth ] } 
-        { [ dup x-axis? ] [ drop axis-value >>x drop ] }
-        { [ dup y-axis? ] [ drop axis-value >>y drop ] }
-        { [ dup z-axis? ] [ drop axis-value >>z drop ] }
-        { [ dup rx-axis? ] [ drop axis-value >>rx drop ] }
-        { [ dup ry-axis? ] [ drop axis-value >>ry drop ] }
-        { [ dup rz-axis? ] [ drop axis-value >>rz drop ] }
-        { [ dup slider? ] [ drop axis-value >>slider drop ] }
-        { [ dup hat-switch? ] [ drop pov-value >>pov drop ] }
-        [ 3drop ]
-    } cond ;
-
-SYMBOLS: +hid-manager+ +keyboard-state+ +controller-states+ ;
-
-: ?set-nth ( value nth seq -- )
-    2dup bounds-check? [ set-nth-unsafe ] [ 3drop ] if ;
-
-: record-keyboard ( value -- )
-    dup IOHIDValueGetElement element-usage keyboard-key? [
-        [ IOHIDValueGetIntegerValue c-bool> ]
-        [ IOHIDValueGetElement IOHIDElementGetUsage ] bi
-        +keyboard-state+ get ?set-nth
-    ] [ drop ] if ;
-
-: default-calibrate-saturation ( element -- )
-    [ kIOHIDElementMinKey kIOHIDElementCalibrationSaturationMinKey transfer-element-property ]
-    [ kIOHIDElementMaxKey kIOHIDElementCalibrationSaturationMaxKey transfer-element-property ]
-    bi ;
-
-: default-calibrate-axis ( element -- )
-    [ kIOHIDElementCalibrationMinKey -1.0 set-element-property ]
-    [ kIOHIDElementCalibrationMaxKey 1.0 set-element-property ]
-    [ default-calibrate-saturation ]
-    tri ;
-
-: default-calibrate-slider ( element -- )
-    [ kIOHIDElementCalibrationMinKey 0.0 set-element-property ]
-    [ kIOHIDElementCalibrationMaxKey 1.0 set-element-property ]
-    [ default-calibrate-saturation ]
-    tri ;
-
-: (default) ( ? quot -- )
-    [ f ] if* ; inline
-
-: <device-controller-state> ( device -- controller-state )
-    {
-        [ ?x-axis [ default-calibrate-axis 0.0 ] (default) ]
-        [ ?y-axis [ default-calibrate-axis 0.0 ] (default) ]
-        [ ?z-axis [ default-calibrate-axis 0.0 ] (default) ]
-        [ ?rx-axis [ default-calibrate-axis 0.0 ] (default) ]
-        [ ?ry-axis [ default-calibrate-axis 0.0 ] (default) ]
-        [ ?rz-axis [ default-calibrate-axis 0.0 ] (default) ]
-        [ ?slider [ default-calibrate-slider 0.0 ] (default) ]
-        [ ?hat-switch pov-neutral and ]
-        [ button-count f <array> ]
-    } cleave controller-state boa ;
-
-: device-matched-callback ( -- alien )
-    [| context result sender device |
-        device controller-device? [
-            device <device-controller-state>
-            device +controller-states+ get set-at
-        ] when
-    ] IOHIDDeviceCallback ;
-
-: device-removed-callback ( -- alien )
-    [| context result sender device |
-        device +controller-states+ get delete-at
-    ] IOHIDDeviceCallback ;
-
-: device-input-callback ( -- alien )
-    [| context result sender value |
-        sender controller-device?
-        [ sender +controller-states+ get at value record-controller ]
-        [ value record-keyboard ]
-        if
-    ] IOHIDValueCallback ;
-
-: initialize-variables ( manager -- )
-    +hid-manager+ set-global
-    4 <vector> +controller-states+ set-global
-    256 f <array> +keyboard-state+ set-global ;
-
-M: iokit-game-input-backend (open-game-input)
-    hid-manager-matching-game-devices {
-        [ initialize-variables ]
-        [ device-matched-callback f IOHIDManagerRegisterDeviceMatchingCallback ]
-        [ device-removed-callback f IOHIDManagerRegisterDeviceRemovalCallback ]
-        [ device-input-callback f IOHIDManagerRegisterInputValueCallback ]
-        [ 0 IOHIDManagerOpen mach-error ]
-        [
-            CFRunLoopGetMain CFRunLoopDefaultMode
-            IOHIDManagerScheduleWithRunLoop
-        ]
-    } cleave ;
-
-M: iokit-game-input-backend (reset-game-input)
-    { +hid-manager+ +keyboard-state+ +controller-states+ }
-    [ f swap set-global ] each ;
-
-M: iokit-game-input-backend (close-game-input)
-    +hid-manager+ get-global [
-        +hid-manager+ global [ 
-            [
-                CFRunLoopGetMain CFRunLoopDefaultMode
-                IOHIDManagerUnscheduleFromRunLoop
-            ]
-            [ 0 IOHIDManagerClose drop ]
-            [ CFRelease ] tri
-            f
-        ] change-at
-        f +keyboard-state+ set-global
-        f +controller-states+ set-global
-    ] when ;
-
-M: iokit-game-input-backend get-controllers ( -- sequence )
-    +controller-states+ get keys [ controller boa ] map ;
-
-: ?join ( pre post sep -- string )
-    2over start [ swap 2nip ] [ [ 2array ] dip join ] if ;
-
-M: iokit-game-input-backend product-string ( controller -- string )
-    handle>>
-    [ kIOHIDManufacturerKey device-property ]
-    [ kIOHIDProductKey      device-property ] bi " " ?join ;
-M: iokit-game-input-backend product-id ( controller -- integer )
-    handle>>
-    [ kIOHIDVendorIDKey  device-property ]
-    [ kIOHIDProductIDKey device-property ] bi 2array ;
-M: iokit-game-input-backend instance-id ( controller -- integer )
-    handle>> kIOHIDLocationIDKey device-property ;
-
-M: iokit-game-input-backend read-controller ( controller -- controller-state )
-    handle>> +controller-states+ get at clone ;
-
-M: iokit-game-input-backend read-keyboard ( -- keyboard-state )
-    +keyboard-state+ get clone keyboard-state boa ;
-
-M: iokit-game-input-backend calibrate-controller ( controller -- )
-    drop ;
diff --git a/extra/game-input/backend/iokit/summary.txt b/extra/game-input/backend/iokit/summary.txt
deleted file mode 100644 (file)
index 8fc5d82..0000000
+++ /dev/null
@@ -1 +0,0 @@
-IOKit HID Manager backend for game-input
diff --git a/extra/game-input/backend/iokit/tags.txt b/extra/game-input/backend/iokit/tags.txt
deleted file mode 100755 (executable)
index 82506ff..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-unportable
-games
diff --git a/extra/game-input/backend/summary.txt b/extra/game-input/backend/summary.txt
deleted file mode 100644 (file)
index 6a77f8e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Platform-specific backends for game-input
diff --git a/extra/game-input/backend/tags.txt b/extra/game-input/backend/tags.txt
deleted file mode 100755 (executable)
index 84d4140..0000000
+++ /dev/null
@@ -1 +0,0 @@
-games
diff --git a/extra/game-input/dinput/authors.txt b/extra/game-input/dinput/authors.txt
new file mode 100755 (executable)
index 0000000..f13c9c1
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
diff --git a/extra/game-input/dinput/dinput.factor b/extra/game-input/dinput/dinput.factor
new file mode 100755 (executable)
index 0000000..328e4ff
--- /dev/null
@@ -0,0 +1,290 @@
+USING: windows.dinput windows.dinput.constants parser
+alien.c-types windows.ole32 namespaces assocs kernel arrays
+vectors windows.kernel32 windows.com windows.dinput shuffle
+windows.user32 windows.messages sequences combinators locals
+math.geometry.rect ui.windows accessors math windows alien
+alien.strings io.encodings.utf16 io.encodings.utf16n
+continuations byte-arrays game-input.dinput.keys-array
+game-input ;
+IN: game-input.dinput
+
+SINGLETON: dinput-game-input-backend
+
+dinput-game-input-backend game-input-backend set-global
+
+SYMBOLS: +dinput+ +keyboard-device+ +keyboard-state+
+    +controller-devices+ +controller-guids+
+    +device-change-window+ +device-change-handle+ ;
+
+: create-dinput ( -- )
+    f GetModuleHandle DIRECTINPUT_VERSION IDirectInput8W-iid
+    f <void*> [ f DirectInput8Create ole32-error ] keep *void*
+    +dinput+ set-global ;
+
+: delete-dinput ( -- )
+    +dinput+ global [ com-release f ] change-at ;
+
+: device-for-guid ( guid -- device )
+    +dinput+ get swap f <void*>
+    [ f IDirectInput8W::CreateDevice ole32-error ] keep *void* ;
+
+: set-coop-level ( device -- )
+    +device-change-window+ get DISCL_BACKGROUND DISCL_NONEXCLUSIVE bitor
+    IDirectInputDevice8W::SetCooperativeLevel ole32-error ;
+
+: set-data-format ( device format-symbol -- )
+    get IDirectInputDevice8W::SetDataFormat ole32-error ;
+
+: configure-keyboard ( keyboard -- )
+    [ c_dfDIKeyboard_HID set-data-format ] [ set-coop-level ] bi ;
+: configure-controller ( controller -- )
+    [ c_dfDIJoystick2 set-data-format ] [ set-coop-level ] bi ;
+
+: find-keyboard ( -- )
+    GUID_SysKeyboard device-for-guid
+    [ configure-keyboard ]
+    [ +keyboard-device+ set-global ] bi
+    256 <byte-array> <keys-array> keyboard-state boa
+    +keyboard-state+ set-global ;
+
+: device-info ( device -- DIDEVICEIMAGEINFOW )
+    "DIDEVICEINSTANCEW" <c-object>
+    "DIDEVICEINSTANCEW" heap-size over set-DIDEVICEINSTANCEW-dwSize
+    [ IDirectInputDevice8W::GetDeviceInfo ole32-error ] keep ;
+: device-caps ( device -- DIDEVCAPS )
+    "DIDEVCAPS" <c-object>
+    "DIDEVCAPS" heap-size over set-DIDEVCAPS-dwSize
+    [ IDirectInputDevice8W::GetCapabilities ole32-error ] keep ;
+
+: <guid> ( memory -- byte-array )
+    "GUID" heap-size memory>byte-array ;
+
+: device-guid ( device -- guid )
+    device-info DIDEVICEINSTANCEW-guidInstance <guid> ;
+
+: device-attached? ( device -- ? )
+    +dinput+ get swap device-guid
+    IDirectInput8W::GetDeviceStatus S_OK = ;
+
+: find-device-axes-callback ( -- alien )
+    [ ! ( lpddoi pvRef -- BOOL )
+        +controller-devices+ get at
+        swap DIDEVICEOBJECTINSTANCEW-guidType <guid> {
+            { [ dup GUID_XAxis = ] [ drop 0.0 >>x ] }
+            { [ dup GUID_YAxis = ] [ drop 0.0 >>y ] }
+            { [ dup GUID_ZAxis = ] [ drop 0.0 >>z ] }
+            { [ dup GUID_RxAxis = ] [ drop 0.0 >>rx ] }
+            { [ dup GUID_RyAxis = ] [ drop 0.0 >>ry ] }
+            { [ dup GUID_RzAxis = ] [ drop 0.0 >>rz ] }
+            { [ dup GUID_Slider = ] [ drop 0.0 >>slider ] }
+            [ drop ]
+        } cond drop
+        DIENUM_CONTINUE
+    ] LPDIENUMDEVICEOBJECTSCALLBACKW ;
+
+: find-device-axes ( device controller-state -- controller-state )
+    swap [ +controller-devices+ get set-at ] 2keep
+    find-device-axes-callback over DIDFT_AXIS
+    IDirectInputDevice8W::EnumObjects ole32-error ;
+
+: controller-state-template ( device -- controller-state )
+    controller-state new
+    over device-caps
+    [ DIDEVCAPS-dwButtons f <array> >>buttons ]
+    [ DIDEVCAPS-dwPOVs zero? f pov-neutral ? >>pov ] bi
+    find-device-axes ;
+
+: device-known? ( guid -- ? )
+    +controller-guids+ get key? ; inline
+
+: (add-controller) ( guid -- )
+    device-for-guid {
+        [ configure-controller ]
+        [ controller-state-template ]
+        [ dup device-guid +controller-guids+ get set-at ]
+        [ +controller-devices+ get set-at ]
+    } cleave ;
+
+: add-controller ( guid -- )
+    dup <guid> device-known? [ drop ] [ (add-controller) ] if ;
+
+: remove-controller ( device -- )
+    [ +controller-devices+ get delete-at ]
+    [ device-guid +controller-guids+ get delete-at ]
+    [ com-release ] tri ;
+
+: find-controller-callback ( -- alien )
+    [ ! ( lpddi pvRef -- BOOL )
+        drop DIDEVICEINSTANCEW-guidInstance add-controller
+        DIENUM_CONTINUE
+    ] LPDIENUMDEVICESCALLBACKW ;
+
+: find-controllers ( -- )
+    +dinput+ get DI8DEVCLASS_GAMECTRL find-controller-callback
+    f DIEDFL_ATTACHEDONLY IDirectInput8W::EnumDevices ole32-error ;
+
+: set-up-controllers ( -- )
+    4 <vector> +controller-devices+ set-global
+    4 <vector> +controller-guids+ set-global
+    find-controllers ;
+
+: find-and-remove-detached-devices ( -- )
+    +controller-devices+ get keys
+    [ device-attached? not ] filter
+    [ remove-controller ] each ;
+
+: device-interface? ( dbt-broadcast-hdr -- ? )
+    DEV_BROADCAST_HDR-dbch_devicetype DBT_DEVTYP_DEVICEINTERFACE = ;
+
+: device-arrived ( dbt-broadcast-hdr -- )
+    device-interface? [ find-controllers ] when ;
+
+: device-removed ( dbt-broadcast-hdr -- )
+    device-interface? [ find-and-remove-detached-devices ] when ;
+
+: handle-wm-devicechange ( hWnd uMsg wParam lParam -- )
+    [ 2drop ] 2dip swap {
+        { [ dup DBT_DEVICEARRIVAL = ]         [ drop <alien> device-arrived ] }
+        { [ dup DBT_DEVICEREMOVECOMPLETE = ]  [ drop <alien> device-removed ] }
+        [ 2drop ]
+    } cond ;
+
+TUPLE: window-rect < rect window-loc ;
+: <zero-window-rect> ( -- window-rect )
+    window-rect new
+    { 0 0 } >>window-loc
+    { 0 0 } >>loc
+    { 0 0 } >>dim ;
+
+: (device-notification-filter) ( -- DEV_BROADCAST_DEVICEW )
+    "DEV_BROADCAST_DEVICEW" <c-object>
+    "DEV_BROADCAST_DEVICEW" heap-size over set-DEV_BROADCAST_DEVICEW-dbcc_size
+    DBT_DEVTYP_DEVICEINTERFACE over set-DEV_BROADCAST_DEVICEW-dbcc_devicetype ;
+
+: create-device-change-window ( -- )
+    <zero-window-rect> create-window
+    [
+        (device-notification-filter)
+        DEVICE_NOTIFY_WINDOW_HANDLE DEVICE_NOTIFY_ALL_INTERFACE_CLASSES bitor
+        RegisterDeviceNotification
+        +device-change-handle+ set-global
+    ]
+    [ +device-change-window+ set-global ] bi ;
+
+: close-device-change-window ( -- )
+    +device-change-handle+ global
+    [ UnregisterDeviceNotification drop f ] change-at
+    +device-change-window+ global
+    [ DestroyWindow win32-error=0/f f ] change-at ;
+
+: add-wm-devicechange ( -- )
+    [ 4dup handle-wm-devicechange DefWindowProc ]
+    WM_DEVICECHANGE add-wm-handler ;
+
+: remove-wm-devicechange ( -- )
+    WM_DEVICECHANGE wm-handlers get-global delete-at ;
+
+: release-controllers ( -- )
+    +controller-devices+ global [
+        [ drop com-release ] assoc-each f
+    ] change-at
+    f +controller-guids+ set-global ;
+
+: release-keyboard ( -- )
+    +keyboard-device+ global
+    [ com-release f ] change-at
+    f +keyboard-state+ set-global ;
+
+M: dinput-game-input-backend (open-game-input)
+    create-dinput
+    create-device-change-window
+    find-keyboard
+    set-up-controllers
+    add-wm-devicechange ;
+
+M: dinput-game-input-backend (close-game-input)
+    remove-wm-devicechange
+    release-controllers
+    release-keyboard
+    close-device-change-window
+    delete-dinput ;
+
+M: dinput-game-input-backend (reset-game-input)
+    {
+        +dinput+ +keyboard-device+ +keyboard-state+
+        +controller-devices+ +controller-guids+
+        +device-change-window+ +device-change-handle+
+    } [ f swap set-global ] each ;
+
+M: dinput-game-input-backend get-controllers
+    +controller-devices+ get
+    [ drop controller boa ] { } assoc>map ;
+
+M: dinput-game-input-backend product-string
+    handle>> device-info DIDEVICEINSTANCEW-tszProductName
+    utf16n alien>string ;
+
+M: dinput-game-input-backend product-id
+    handle>> device-info DIDEVICEINSTANCEW-guidProduct <guid> ;
+M: dinput-game-input-backend instance-id
+    handle>> device-guid ;
+
+:: with-acquisition ( device acquired-quot succeeded-quot failed-quot -- result/f )
+    device IDirectInputDevice8W::Acquire succeeded? [
+        device acquired-quot call
+        succeeded-quot call
+    ] failed-quot if ; inline
+
+: pov-values
+    {
+        pov-up pov-up-right pov-right pov-down-right
+        pov-down pov-down-left pov-left pov-up-left
+    } ; inline
+
+: >axis ( long -- float )
+    32767 - 32767.0 /f ;
+: >slider ( long -- float )
+    65535.0 /f ;
+: >pov ( long -- symbol )
+    dup HEX: FFFF bitand HEX: FFFF =
+    [ drop pov-neutral ]
+    [ 2750 + 4500 /i pov-values nth ] if ;
+: >buttons ( alien length -- array )
+    memory>byte-array <keys-array> ;
+
+: (fill-if) ( controller-state DIJOYSTATE2 ? quot -- )
+    [ drop ] compose [ 2drop ] if ; inline
+
+: fill-controller-state ( controller-state DIJOYSTATE2 -- controller-state )
+    {
+        [ over x>> [ DIJOYSTATE2-lX >axis >>x ] (fill-if) ]
+        [ over y>> [ DIJOYSTATE2-lY >axis >>y ] (fill-if) ]
+        [ over z>> [ DIJOYSTATE2-lZ >axis >>z ] (fill-if) ]
+        [ over rx>> [ DIJOYSTATE2-lRx >axis >>rx ] (fill-if) ]
+        [ over ry>> [ DIJOYSTATE2-lRy >axis >>ry ] (fill-if) ]
+        [ over rz>> [ DIJOYSTATE2-lRz >axis >>rz ] (fill-if) ]
+        [ over slider>> [ DIJOYSTATE2-rglSlider *long >slider >>slider ] (fill-if) ]
+        [ over pov>> [ DIJOYSTATE2-rgdwPOV *uint >pov >>pov ] (fill-if) ]
+        [ DIJOYSTATE2-rgbButtons over buttons>> length >buttons >>buttons ]
+    } 2cleave ;
+
+: get-device-state ( device byte-array -- )
+    [ dup IDirectInputDevice8W::Poll ole32-error ] dip
+    [ length ] keep
+    IDirectInputDevice8W::GetDeviceState ole32-error ;
+
+: (read-controller) ( handle template -- state )
+    swap [ "DIJOYSTATE2" heap-size <byte-array> [ get-device-state ] keep ]
+    [ fill-controller-state ] [ drop f ] with-acquisition ;
+
+M: dinput-game-input-backend read-controller
+    handle>> dup +controller-devices+ get at
+    [ (read-controller) ] [ drop f ] if* ;
+
+M: dinput-game-input-backend calibrate-controller
+    handle>> f 0 IDirectInputDevice8W::RunControlPanel ole32-error ;
+
+M: dinput-game-input-backend read-keyboard
+    +keyboard-device+ get
+    [ +keyboard-state+ get [ keys>> underlying>> get-device-state ] keep ]
+    [ ] [ f ] with-acquisition ;
diff --git a/extra/game-input/dinput/keys-array/keys-array.factor b/extra/game-input/dinput/keys-array/keys-array.factor
new file mode 100755 (executable)
index 0000000..12ad072
--- /dev/null
@@ -0,0 +1,15 @@
+USING: sequences sequences.private math alien.c-types
+accessors ;
+IN: game-input.dinput.keys-array
+
+TUPLE: keys-array underlying ;
+C: <keys-array> keys-array
+
+: >key ( byte -- ? )
+    HEX: 80 bitand c-bool> ;
+
+M: keys-array length underlying>> length ;
+M: keys-array nth-unsafe underlying>> nth-unsafe >key ;
+
+INSTANCE: keys-array sequence
+
diff --git a/extra/game-input/dinput/summary.txt b/extra/game-input/dinput/summary.txt
new file mode 100755 (executable)
index 0000000..f758a5f
--- /dev/null
@@ -0,0 +1 @@
+DirectInput backend for game-input
diff --git a/extra/game-input/dinput/tags.txt b/extra/game-input/dinput/tags.txt
new file mode 100755 (executable)
index 0000000..82506ff
--- /dev/null
@@ -0,0 +1,2 @@
+unportable
+games
index 18ec04df1f4474c6625d976bf36a24435c8df859..46e3ba9e8dafc0522a33b528cc4bea5db32e7f64 100755 (executable)
@@ -1,5 +1,5 @@
-USING: arrays accessors continuations kernel symbols
-combinators.lib sequences namespaces init vocabs ;
+USING: arrays accessors continuations kernel system
+sequences namespaces init vocabs vocabs.loader combinators ;
 IN: game-input
 
 SYMBOLS: game-input-backend game-input-opened ;
@@ -19,10 +19,6 @@ M: f (reset-game-input) ;
     game-input-opened off
     (reset-game-input) ;
 
-: load-game-input-backend ( -- )
-    game-input-backend get
-    [ "game-input.backend" load-vocab drop ] unless ;
-
 [ reset-game-input ] "game-input" add-init-hook
 
 PRIVATE>
@@ -62,9 +58,10 @@ HOOK: instance-id game-input-backend ( controller -- id )
     get-controllers [ product-id = ] with filter ;
 : find-controller-instance ( product-id instance-id -- controller/f )
     get-controllers [
+        tuck
         [ product-id  = ]
-        [ instance-id = ] bi, bi* and
-    ] 2with find nip ;
+        [ instance-id = ] 2bi* and
+    ] with with find nip ;
 
 HOOK: read-controller game-input-backend ( controller -- controller-state )
 HOOK: calibrate-controller game-input-backend ( controller -- )
@@ -76,5 +73,8 @@ M: keyboard-state clone
 
 HOOK: read-keyboard game-input-backend ( -- keyboard-state )
 
-load-game-input-backend
-
+{
+    { [ os windows? ] [ "game-input.dinput" require ] }
+    { [ os macosx? ] [ "game-input.iokit" require ] }
+    { [ t ] [ ] }
+} cond
diff --git a/extra/game-input/iokit/authors.txt b/extra/game-input/iokit/authors.txt
new file mode 100644 (file)
index 0000000..f13c9c1
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
diff --git a/extra/game-input/iokit/iokit.factor b/extra/game-input/iokit/iokit.factor
new file mode 100755 (executable)
index 0000000..26f2c40
--- /dev/null
@@ -0,0 +1,279 @@
+USING: cocoa cocoa.plists core-foundation iokit iokit.hid
+kernel cocoa.enumeration destructors math.parser cocoa.application 
+sequences locals combinators.short-circuit threads
+namespaces assocs vectors arrays combinators
+core-foundation.run-loop accessors sequences.private
+alien.c-types math parser game-input ;
+IN: game-input.iokit
+
+SINGLETON: iokit-game-input-backend
+
+iokit-game-input-backend game-input-backend set-global
+
+: hid-manager-matching ( matching-seq -- alien )
+    f 0 IOHIDManagerCreate
+    [ swap >plist IOHIDManagerSetDeviceMatchingMultiple ]
+    keep ;
+
+: devices-from-hid-manager ( manager -- vector )
+    [
+        IOHIDManagerCopyDevices
+        [ &CFRelease NSFastEnumeration>vector ] [ f ] if*
+    ] with-destructors ;
+
+: game-devices-matching-seq
+    {
+        H{ { "DeviceUsage" 4 } { "DeviceUsagePage" 1 } } ! joysticks
+        H{ { "DeviceUsage" 5 } { "DeviceUsagePage" 1 } } ! gamepads
+        H{ { "DeviceUsage" 6 } { "DeviceUsagePage" 1 } } ! keyboards
+    } ; inline
+
+: buttons-matching-hash
+    H{ { "UsagePage" 9 } { "Type" 2 } } ; inline
+: keys-matching-hash
+    H{ { "UsagePage" 7 } { "Type" 2 } } ; inline
+: x-axis-matching-hash
+    H{ { "UsagePage" 1 } { "Usage" HEX: 30 } { "Type" 1 } } ; inline
+: y-axis-matching-hash
+    H{ { "UsagePage" 1 } { "Usage" HEX: 31 } { "Type" 1 } } ; inline
+: z-axis-matching-hash
+    H{ { "UsagePage" 1 } { "Usage" HEX: 32 } { "Type" 1 } } ; inline
+: rx-axis-matching-hash
+    H{ { "UsagePage" 1 } { "Usage" HEX: 33 } { "Type" 1 } } ; inline
+: ry-axis-matching-hash
+    H{ { "UsagePage" 1 } { "Usage" HEX: 34 } { "Type" 1 } } ; inline
+: rz-axis-matching-hash
+    H{ { "UsagePage" 1 } { "Usage" HEX: 35 } { "Type" 1 } } ; inline
+: slider-matching-hash
+    H{ { "UsagePage" 1 } { "Usage" HEX: 36 } { "Type" 1 } } ; inline
+: hat-switch-matching-hash
+    H{ { "UsagePage" 1 } { "Usage" HEX: 39 } { "Type" 1 } } ; inline
+
+: device-elements-matching ( device matching-hash -- vector )
+    [
+        >plist 0 IOHIDDeviceCopyMatchingElements
+        [ &CFRelease NSFastEnumeration>vector ] [ f ] if*
+    ] with-destructors ;
+
+: button-count ( device -- button-count )
+    buttons-matching-hash device-elements-matching length ;
+
+: ?axis ( device hash -- axis/f )
+    device-elements-matching [ f ] [ first ] if-empty ;
+
+: ?x-axis ( device -- ? )
+    x-axis-matching-hash ?axis ;
+: ?y-axis ( device -- ? )
+    y-axis-matching-hash ?axis ;
+: ?z-axis ( device -- ? )
+    z-axis-matching-hash ?axis ;
+: ?rx-axis ( device -- ? )
+    rx-axis-matching-hash ?axis ;
+: ?ry-axis ( device -- ? )
+    ry-axis-matching-hash ?axis ;
+: ?rz-axis ( device -- ? )
+    rz-axis-matching-hash ?axis ;
+: ?slider ( device -- ? )
+    slider-matching-hash ?axis ;
+: ?hat-switch ( device -- ? )
+    hat-switch-matching-hash ?axis ;
+
+: hid-manager-matching-game-devices ( -- alien )
+    game-devices-matching-seq hid-manager-matching ;
+
+: device-property ( device key -- value )
+    <NSString> IOHIDDeviceGetProperty plist> ;
+: element-property ( element key -- value )
+    <NSString> IOHIDElementGetProperty plist> ;
+: set-element-property ( element key value -- )
+    [ <NSString> ] [ >plist ] bi* IOHIDElementSetProperty drop ;
+: transfer-element-property ( element from-key to-key -- )
+    [ dupd element-property ] dip swap set-element-property ;
+
+: controller-device? ( device -- ? )
+    {
+        [ 1 4 IOHIDDeviceConformsTo ]
+        [ 1 5 IOHIDDeviceConformsTo ]
+    } 1|| ;
+
+: element-usage ( element -- {usage-page,usage} )
+    [ IOHIDElementGetUsagePage ] [ IOHIDElementGetUsage ] bi
+    2array ;
+
+: button? ( {usage-page,usage} -- ? )
+    first 9 = ; inline
+: keyboard-key? ( {usage-page,usage} -- ? )
+    first 7 = ; inline
+: x-axis? ( {usage-page,usage} -- ? )
+    { 1 HEX: 30 } = ; inline
+: y-axis? ( {usage-page,usage} -- ? )
+    { 1 HEX: 31 } = ; inline
+: z-axis? ( {usage-page,usage} -- ? )
+    { 1 HEX: 32 } = ; inline
+: rx-axis? ( {usage-page,usage} -- ? )
+    { 1 HEX: 33 } = ; inline
+: ry-axis? ( {usage-page,usage} -- ? )
+    { 1 HEX: 34 } = ; inline
+: rz-axis? ( {usage-page,usage} -- ? )
+    { 1 HEX: 35 } = ; inline
+: slider? ( {usage-page,usage} -- ? )
+    { 1 HEX: 36 } = ; inline
+: hat-switch? ( {usage-page,usage} -- ? )
+    { 1 HEX: 39 } = ; inline
+
+: pov-values
+    {
+        pov-up pov-up-right pov-right pov-down-right
+        pov-down pov-down-left pov-left pov-up-left
+        pov-neutral
+    } ; inline
+
+: button-value ( value -- f/(0,1] )
+    IOHIDValueGetIntegerValue dup zero? [ drop f ] when ;
+: axis-value ( value -- [-1,1] )
+    kIOHIDValueScaleTypeCalibrated IOHIDValueGetScaledValue ;
+: pov-value ( value -- pov-direction )
+    IOHIDValueGetIntegerValue pov-values ?nth [ pov-neutral ] unless* ;
+
+: record-controller ( controller-state value -- )
+    dup IOHIDValueGetElement element-usage {
+        { [ dup button? ] [ [ button-value ] [ second 1- ] bi* rot buttons>> set-nth ] } 
+        { [ dup x-axis? ] [ drop axis-value >>x drop ] }
+        { [ dup y-axis? ] [ drop axis-value >>y drop ] }
+        { [ dup z-axis? ] [ drop axis-value >>z drop ] }
+        { [ dup rx-axis? ] [ drop axis-value >>rx drop ] }
+        { [ dup ry-axis? ] [ drop axis-value >>ry drop ] }
+        { [ dup rz-axis? ] [ drop axis-value >>rz drop ] }
+        { [ dup slider? ] [ drop axis-value >>slider drop ] }
+        { [ dup hat-switch? ] [ drop pov-value >>pov drop ] }
+        [ 3drop ]
+    } cond ;
+
+SYMBOLS: +hid-manager+ +keyboard-state+ +controller-states+ ;
+
+: ?set-nth ( value nth seq -- )
+    2dup bounds-check? [ set-nth-unsafe ] [ 3drop ] if ;
+
+: record-keyboard ( value -- )
+    dup IOHIDValueGetElement element-usage keyboard-key? [
+        [ IOHIDValueGetIntegerValue c-bool> ]
+        [ IOHIDValueGetElement IOHIDElementGetUsage ] bi
+        +keyboard-state+ get ?set-nth
+    ] [ drop ] if ;
+
+: default-calibrate-saturation ( element -- )
+    [ kIOHIDElementMinKey kIOHIDElementCalibrationSaturationMinKey transfer-element-property ]
+    [ kIOHIDElementMaxKey kIOHIDElementCalibrationSaturationMaxKey transfer-element-property ]
+    bi ;
+
+: default-calibrate-axis ( element -- )
+    [ kIOHIDElementCalibrationMinKey -1.0 set-element-property ]
+    [ kIOHIDElementCalibrationMaxKey 1.0 set-element-property ]
+    [ default-calibrate-saturation ]
+    tri ;
+
+: default-calibrate-slider ( element -- )
+    [ kIOHIDElementCalibrationMinKey 0.0 set-element-property ]
+    [ kIOHIDElementCalibrationMaxKey 1.0 set-element-property ]
+    [ default-calibrate-saturation ]
+    tri ;
+
+: (default) ( ? quot -- )
+    [ f ] if* ; inline
+
+: <device-controller-state> ( device -- controller-state )
+    {
+        [ ?x-axis [ default-calibrate-axis 0.0 ] (default) ]
+        [ ?y-axis [ default-calibrate-axis 0.0 ] (default) ]
+        [ ?z-axis [ default-calibrate-axis 0.0 ] (default) ]
+        [ ?rx-axis [ default-calibrate-axis 0.0 ] (default) ]
+        [ ?ry-axis [ default-calibrate-axis 0.0 ] (default) ]
+        [ ?rz-axis [ default-calibrate-axis 0.0 ] (default) ]
+        [ ?slider [ default-calibrate-slider 0.0 ] (default) ]
+        [ ?hat-switch pov-neutral and ]
+        [ button-count f <array> ]
+    } cleave controller-state boa ;
+
+: device-matched-callback ( -- alien )
+    [| context result sender device |
+        device controller-device? [
+            device <device-controller-state>
+            device +controller-states+ get set-at
+        ] when
+    ] IOHIDDeviceCallback ;
+
+: device-removed-callback ( -- alien )
+    [| context result sender device |
+        device +controller-states+ get delete-at
+    ] IOHIDDeviceCallback ;
+
+: device-input-callback ( -- alien )
+    [| context result sender value |
+        sender controller-device?
+        [ sender +controller-states+ get at value record-controller ]
+        [ value record-keyboard ]
+        if
+    ] IOHIDValueCallback ;
+
+: initialize-variables ( manager -- )
+    +hid-manager+ set-global
+    4 <vector> +controller-states+ set-global
+    256 f <array> +keyboard-state+ set-global ;
+
+M: iokit-game-input-backend (open-game-input)
+    hid-manager-matching-game-devices {
+        [ initialize-variables ]
+        [ device-matched-callback f IOHIDManagerRegisterDeviceMatchingCallback ]
+        [ device-removed-callback f IOHIDManagerRegisterDeviceRemovalCallback ]
+        [ device-input-callback f IOHIDManagerRegisterInputValueCallback ]
+        [ 0 IOHIDManagerOpen mach-error ]
+        [
+            CFRunLoopGetMain CFRunLoopDefaultMode
+            IOHIDManagerScheduleWithRunLoop
+        ]
+    } cleave ;
+
+M: iokit-game-input-backend (reset-game-input)
+    { +hid-manager+ +keyboard-state+ +controller-states+ }
+    [ f swap set-global ] each ;
+
+M: iokit-game-input-backend (close-game-input)
+    +hid-manager+ get-global [
+        +hid-manager+ global [ 
+            [
+                CFRunLoopGetMain CFRunLoopDefaultMode
+                IOHIDManagerUnscheduleFromRunLoop
+            ]
+            [ 0 IOHIDManagerClose drop ]
+            [ CFRelease ] tri
+            f
+        ] change-at
+        f +keyboard-state+ set-global
+        f +controller-states+ set-global
+    ] when ;
+
+M: iokit-game-input-backend get-controllers ( -- sequence )
+    +controller-states+ get keys [ controller boa ] map ;
+
+: ?join ( pre post sep -- string )
+    2over start [ swap 2nip ] [ [ 2array ] dip join ] if ;
+
+M: iokit-game-input-backend product-string ( controller -- string )
+    handle>>
+    [ kIOHIDManufacturerKey device-property ]
+    [ kIOHIDProductKey      device-property ] bi " " ?join ;
+M: iokit-game-input-backend product-id ( controller -- integer )
+    handle>>
+    [ kIOHIDVendorIDKey  device-property ]
+    [ kIOHIDProductIDKey device-property ] bi 2array ;
+M: iokit-game-input-backend instance-id ( controller -- integer )
+    handle>> kIOHIDLocationIDKey device-property ;
+
+M: iokit-game-input-backend read-controller ( controller -- controller-state )
+    handle>> +controller-states+ get at clone ;
+
+M: iokit-game-input-backend read-keyboard ( -- keyboard-state )
+    +keyboard-state+ get clone keyboard-state boa ;
+
+M: iokit-game-input-backend calibrate-controller ( controller -- )
+    drop ;
diff --git a/extra/game-input/iokit/summary.txt b/extra/game-input/iokit/summary.txt
new file mode 100644 (file)
index 0000000..8fc5d82
--- /dev/null
@@ -0,0 +1 @@
+IOKit HID Manager backend for game-input
diff --git a/extra/game-input/iokit/tags.txt b/extra/game-input/iokit/tags.txt
new file mode 100755 (executable)
index 0000000..82506ff
--- /dev/null
@@ -0,0 +1,2 @@
+unportable
+games
index aee53f24f50e1dda34747e1af1e6347b381f232d..ad6302ca55b4e7e71a814c4b4153e7031e76b078 100644 (file)
@@ -1,9 +1,10 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel sequences io.files io.launcher io.encodings.ascii
-io.streams.string http.client generalizations combinators
-math.parser math.vectors math.intervals interval-maps memoize
-csv accessors assocs strings math splitting grouping arrays ;
+USING: kernel sequences io.files io.files.temp io.launcher
+io.pathnames io.encodings.ascii io.streams.string http.client
+generalizations combinators math.parser math.vectors
+math.intervals interval-maps memoize csv accessors assocs
+strings math splitting grouping arrays combinators.smart ;
 IN: geo-ip
 
 : db-path ( -- path ) "IpToCountry.csv" temp-file ;
@@ -19,15 +20,17 @@ IN: geo-ip
 TUPLE: ip-entry from to registry assigned city cntry country ;
 
 : parse-ip-entry ( row -- ip-entry )
-    7 firstn {
-        [ string>number ]
-        [ string>number ]
-        [ ]
-        [ ]
-        [ ]
-        [ ]
-        [ ]
-    } spread ip-entry boa ;
+    [
+        {
+            [ string>number ]
+            [ string>number ]
+            [ ]
+            [ ]
+            [ ]
+            [ ]
+            [ ]
+        } spread
+    ] input<sequence ip-entry boa ;
 
 MEMO: ip-db ( -- seq )
     download-db ascii file-lines
diff --git a/extra/golden-section/authors.txt b/extra/golden-section/authors.txt
new file mode 100644 (file)
index 0000000..6cfd5da
--- /dev/null
@@ -0,0 +1 @@
+Eduardo Cavazos
diff --git a/extra/golden-section/deploy.factor b/extra/golden-section/deploy.factor
new file mode 100755 (executable)
index 0000000..0aa3185
--- /dev/null
@@ -0,0 +1,12 @@
+USING: tools.deploy.config ;
+V{
+    { deploy-ui? t }
+    { deploy-io 1 }
+    { deploy-reflection 1 }
+    { deploy-compiler? t }
+    { deploy-math? t }
+    { deploy-word-props? f }
+    { deploy-c-types? f }
+    { "stop-after-last-window?" t }
+    { deploy-name "Golden Section" }
+}
diff --git a/extra/golden-section/golden-section.factor b/extra/golden-section/golden-section.factor
new file mode 100644 (file)
index 0000000..8d1e6b4
--- /dev/null
@@ -0,0 +1,54 @@
+
+USING: kernel namespaces math math.constants math.functions math.order
+       arrays sequences
+       opengl opengl.gl opengl.glu ui ui.render ui.gadgets ui.gadgets.theme
+       ui.gadgets.cartesian colors accessors combinators.cleave
+       processing.shapes ;
+
+IN: golden-section
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+! omega(i) = 2*pi*i*(phi-1)
+
+! x(i) = 0.5*i*cos(omega(i))
+! y(i) = 0.5*i*sin(omega(i))
+
+! radius(i) = 10*sin((pi*i)/720)
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: omega ( i -- omega ) phi 1- * 2 * pi * ;
+
+: x ( i -- x ) [ omega cos ] [ 0.5 * ] bi * ;
+: y ( i -- y ) [ omega sin ] [ 0.5 * ] bi * ;
+
+: center ( i -- point ) { x y } 1arr ;
+
+: radius ( i -- radius ) pi * 720 / sin 10 * ;
+
+: color ( i -- i ) dup 360.0 / dup 0.25 1 rgba boa >fill-color ;
+
+: line-width ( i -- i ) dup radius 0.5 * 1 max glLineWidth ;
+
+: draw ( i -- ) [ center ] [ radius 1.5 * 2 * ] bi circle ;
+
+: dot ( i -- ) color line-width draw ;
+
+: golden-section ( -- ) 720 [ dot ] each ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: <golden-section> ( -- gadget )
+  <cartesian>
+    {  600 600 }       >>pdim
+    { -400 400 }       x-range
+    { -400 400 }       y-range
+    [ golden-section ] >>action ;
+
+: golden-section-window ( -- )
+  [ <golden-section> "Golden Section" open-window ] with-ui ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+MAIN: golden-section-window
diff --git a/extra/golden-section/summary.txt b/extra/golden-section/summary.txt
new file mode 100644 (file)
index 0000000..5f44091
--- /dev/null
@@ -0,0 +1 @@
+Golden section demo
diff --git a/extra/golden-section/tags.txt b/extra/golden-section/tags.txt
new file mode 100644 (file)
index 0000000..cb5fc20
--- /dev/null
@@ -0,0 +1 @@
+demos
index 3477fbe4bdfb788b797c0a19dc22bc025b5a3064..9bd3c5854b536a44ebbf4db7d69ad2238026da7d 100644 (file)
@@ -203,7 +203,7 @@ IN: google-tech-talk
         { $code "13 <circle> tell-me" }
         { $code "103 76 <rectangle> tell-me" }
         { $code "101 tell-me" }
-        { { $link integer } ", " { $link array } ", and others area built-in classes" }
+        { { $link integer } ", " { $link array } ", and others are built-in classes" }
     }
     { $slide "Object system"
         "Anyone can define new shapes..."
@@ -354,7 +354,7 @@ IN: google-tech-talk
             ": forever ( quot -- ) '[ @ t ] loop ; inline"
             ""
             "\"/tmp\" t <monitor>"
-            "'[ _ next-change . ] forever"
+            "'[ _ next-change . ] forever"
         }
     }
     { $slide "Example: time server"
index 9bb8db0f6d5302f791714577c1d780bc5a996971..a0212e47dedbb543e40f4991e6eeef35bc08e6ab 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2007 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 
-USING: alien arrays byte-arrays combinators summary io.backend
+USING: alien arrays byte-arrays combinators summary
 graphics.viewer io io.binary io.files kernel libc math
 math.functions math.bitwise namespaces opengl opengl.gl
 prettyprint sequences strings ui ui.gadgets.panes fry
@@ -91,7 +91,7 @@ M: bitmap-magic summary
     dup color-index-length read >>color-index drop ;
 
 : load-bitmap ( path -- bitmap )
-    normalize-path binary [
+    binary [
         bitmap new
             dup parse-file-header
             dup parse-bitmap-header
index a18bb31874730c4a5aed7c218efa73a77f175332..abe830c3faa20d4b643076b6c9bfad3e9e4617fd 100755 (executable)
@@ -130,7 +130,7 @@ TUPLE: link attributes clickable ;
 
 : find-forms ( vector -- vector' )
     "form" over find-opening-tags-by-name
-    swap [ >r first2 r> find-between* ] curry map
+    swap [ [ first2 ] dip find-between* ] curry map
     [ [ name>> { "form" "input" } member? ] filter ] map ;
 
 : find-html-objects ( vector string -- vector' )
index 836693026a41da1152f6851da2b6f79ca5c9376d..c445b708c5859bf73e2ad6bf6f317f7f2ca3608f 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays html.parser.utils hashtables io kernel
 namespaces make prettyprint quotations sequences splitting
-state-parser strings unicode.categories unicode.case ;
+html.parser.state strings unicode.categories unicode.case ;
 IN: html.parser
 
 TUPLE: tag name attributes text closing? ;
@@ -59,8 +59,8 @@ SYMBOL: tagstack
     [ get-char CHAR: " = ] take-until ;
 
 : read-quote ( -- string )
-    get-char next* CHAR: ' =
-    [ read-single-quote ] [ read-double-quote ] if next* ;
+    get-char next CHAR: ' =
+    [ read-single-quote ] [ read-double-quote ] if next ;
 
 : read-key ( -- string )
     read-whitespace*
@@ -68,7 +68,7 @@ SYMBOL: tagstack
 
 : read-= ( -- )
     read-whitespace*
-    [ get-char CHAR: = = ] take-until drop next* ;
+    [ get-char CHAR: = = ] take-until drop next ;
 
 : read-value ( -- string )
     read-whitespace*
@@ -76,14 +76,14 @@ SYMBOL: tagstack
     [ blank? ] trim ;
 
 : read-comment ( -- )
-    "-->" take-string* make-comment-tag push-tag ;
+    "-->" take-string make-comment-tag push-tag ;
 
 : read-dtd ( -- )
-    ">" take-string* make-dtd-tag push-tag ;
+    ">" take-string make-dtd-tag push-tag ;
 
 : read-bang ( -- )
-    next* get-char CHAR: - = get-next CHAR: - = and [
-        next* next*
+    next get-char CHAR: - = get-next CHAR: - = and [
+        next next
         read-comment
     ] [
         read-dtd
@@ -91,10 +91,10 @@ SYMBOL: tagstack
 
 : read-tag ( -- string )
     [ get-char CHAR: > = get-char CHAR: < = or ] take-until
-    get-char CHAR: < = [ next* ] unless ;
+    get-char CHAR: < = [ next ] unless ;
 
 : read-< ( -- string )
-    next* get-char CHAR: ! = [
+    next get-char CHAR: ! = [
         read-bang f
     ] [
         read-tag
diff --git a/extra/html/parser/state/state-tests.factor b/extra/html/parser/state/state-tests.factor
new file mode 100644 (file)
index 0000000..a9be38c
--- /dev/null
@@ -0,0 +1,13 @@
+USING: tools.test html.parser.state ascii kernel ;
+IN: html.parser.state.tests
+
+: take-rest ( -- string )
+    [ f ] take-until ;
+
+: take-char ( -- string )
+    [ get-char = ] curry take-until ;
+
+[ "hello" ] [ "hello" [ take-rest ] string-parse ] unit-test
+[ "hi" " how are you?" ] [ "hi how are you?" [ [ get-char blank? ] take-until take-rest ] string-parse ] unit-test
+[ "foo" ";bar" ] [ "foo;bar" [ CHAR: ; take-char take-rest ] string-parse ] unit-test
+! [ "foo " " bar" ] [ "foo and bar" [ "and" take-string take-rest ] string-parse ] unit-test
diff --git a/extra/html/parser/state/state.factor b/extra/html/parser/state/state.factor
new file mode 100644 (file)
index 0000000..4b1027d
--- /dev/null
@@ -0,0 +1,41 @@
+! Copyright (C) 2005, 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: namespaces math kernel sequences accessors fry circular ;
+IN: html.parser.state
+
+TUPLE: state string i ;
+
+: get-i ( -- i ) state get i>> ;
+
+: get-char ( -- char )
+    state get [ i>> ] [ string>> ] bi ?nth ;
+
+: get-next ( -- char )
+    state get [ i>> 1+ ] [ string>> ] bi ?nth ;
+
+: next ( -- )
+    state get [ 1+ ] change-i drop ;
+
+: string-parse ( string quot -- )
+    [ 0 state boa state ] dip with-variable ;
+
+: short* ( n seq -- n' seq )
+    over [ nip dup length swap ] unless ;
+
+: skip-until ( quot: ( -- ? ) -- )
+    get-char [
+        [ call ] keep swap
+        [ drop ] [ next skip-until ] if
+    ] [ drop ] if ; inline recursive
+
+: take-until ( quot: ( -- ? ) -- )
+    [ get-i ] dip skip-until get-i
+    state get string>> subseq ;
+
+: string-matches? ( string circular -- ? )
+    get-char over push-circular sequence= ;
+
+: take-string ( match -- string )
+    dup length <circular-string>
+    [ 2dup string-matches? ] take-until nip
+    dup length rot length 1- - head next ;
index 4b25db16fd860a3e1c578d099f32e8fb3239af76..6d8e3bc05f07128f9c288fd3247ecd74ef30d905 100644 (file)
@@ -1,7 +1,7 @@
 USING: assocs combinators continuations hashtables
 hashtables.private io kernel math
 namespaces prettyprint quotations sequences splitting
-state-parser strings tools.test ;
+strings tools.test ;
 USING: html.parser.utils ;
 IN: html.parser.utils.tests
 
index 2f414d2aa537614c5ac03d4eb8871ee332981d89..c913b9d306cebd77db6e8785706300fb7063b73e 100644 (file)
@@ -2,37 +2,33 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: assocs circular combinators continuations hashtables
 hashtables.private io kernel math namespaces prettyprint
-quotations sequences splitting state-parser strings ;
+quotations sequences splitting html.parser.state strings
+combinators.short-circuit ;
 IN: html.parser.utils
 
 : string-parse-end? ( -- ? ) get-next not ;
 
-: take-string* ( match -- string )
-    dup length <circular-string>
-    [ 2dup string-matches? ] take-until nip
-    dup length rot length 1- - head next* ;
-
 : trim1 ( seq ch -- newseq )
-    [ ?head drop ] [ ?tail drop ] bi ;
+    [ [ ?head-slice drop ] [ ?tail-slice drop ] bi ] 2keep drop like ;
+
+: quote? ( ch -- ? ) "'\"" member? ;
 
-: single-quote ( str -- newstr )
-    "'" dup surround ;
+: single-quote ( str -- newstr ) "'" dup surround ;
 
-: double-quote ( str -- newstr )
-    "\"" dup surround ;
+: double-quote ( str -- newstr ) "\"" dup surround ;
 
 : quote ( str -- newstr )
     CHAR: ' over member?
     [ double-quote ] [ single-quote ] if ;
 
 : quoted? ( str -- ? )
-    [ f ]
-    [ [ first ] [ peek ] bi [ = ] keep "'\"" member? and ] if-empty ;
+    {
+        [ length 1 > ]
+        [ first quote? ]
+        [ [ first ] [ peek ] bi = ]
+    } 1&& ;
 
-: ?quote ( str -- newstr )
-    dup quoted? [ quote ] unless ;
+: ?quote ( str -- newstr ) dup quoted? [ quote ] unless ;
 
 : unquote ( str -- newstr )
     dup quoted? [ but-last-slice rest-slice >string ] when ;
-
-: quote? ( ch -- ? ) "'\"" member? ;
index d12d35a6d2eef41e3556d246489865ff020a7486..819154f509f288d3326f546a4db86889618f3d95 100755 (executable)
@@ -46,19 +46,19 @@ SYMBOL: open-arrays
     get-cba rot reg-val zero? [
         2drop
     ] [
-        >r reg-val r> set-reg
+        [ reg-val ] dip set-reg
     ] if f ;
 
 : binary-op ( quot -- ? )
-    >r get-cba r>
-    swap >r >r [ reg-val ] bi@ swap r> call r>
+    [ get-cba ] dip
+    swap [ [ [ reg-val ] bi@ swap ] dip call ] dip
     set-reg f ; inline
 
 : op1 ( opcode -- ? )
     [ swap arr-val ] binary-op ;
 
 : op2 ( opcode -- ? )
-    get-cba >r [ reg-val ] bi@ r> reg-val set-arr f ;
+    get-cba [ [ reg-val ] bi@ ] dip reg-val set-arr f ;
 
 : op3 ( opcode -- ? )
     [ + >32bit ] binary-op ;
@@ -73,18 +73,18 @@ SYMBOL: open-arrays
     [ bitand HEX: ffffffff swap - ] binary-op ;
 
 : new-array ( size location -- )
-    >r 0 <array> r> arrays get set-nth ;
+    [ 0 <array> ] dip arrays get set-nth ;
 
 : ?grow-storage ( -- )
     open-arrays get dup empty? [
-        >r arrays get length r> push
+        [ arrays get length ] dip push
     ] [
         drop
     ] if ;
 
 : op8 ( opcode -- ? )
     ?grow-storage
-    get-cb >r reg-val open-arrays get pop [ new-array ] keep r>
+    get-cb [ reg-val open-arrays get pop [ new-array ] keep ] dip
     set-reg f ;
 
 : op9 ( opcode -- ? )
index 8204f7174c109c00e3832b55cdfaa4fd34607ab9..6b575d6d08723365494fc85ceab95234d2c06c5d 100644 (file)
@@ -14,7 +14,17 @@ HELP: undo
 HELP: define-inverse
 { $values { "word" "a word" } { "quot" "the inverse" } }
 { $description "Defines the inverse of a given word, taking no arguments from the quotation, only the stack." }
-{ $see-also define-pop-inverse } ;
+{ $see-also define-dual define-involution define-pop-inverse } ;
+
+HELP: define-dual
+{ $values { "word1" "a word" } { "word2" "a word" } }
+{ $description "Defines the inverse of each word as being the other one." }
+{ $see-also define-inverse define-involution } ;
+
+HELP: define-involution
+{ $values { "word" "a word" } }
+{ $description "Defines a word as being its own inverse." }
+{ $see-also define-dual define-inverse } ;
 
 HELP: define-pop-inverse
 { $values { "word" "a word" } { "n" "number of arguments to be taken from the inverted quotation" } { "quot" "a quotation" } }
index d106b1068a822c999dda5e1ec215f3efed68bf8a..a9234fcff40e7eba29d6a0f59d6809e2c6d6eb2f 100644 (file)
@@ -70,3 +70,13 @@ C: <nil> nil
 [ t ] [ pi [ pi ] matches? ] unit-test
 [ 0.0 ] [ 0.0 pi + [ pi + ] undo ] unit-test
 [ ] [ 3 [ _ ] undo ] unit-test
+
+[ { 1 } ] [ { 1 2 3 } [ { 2 3 } append ] undo ] unit-test
+[ { 3 } ] [ { 1 2 3 } [ { 1 2 } prepend ] undo ] unit-test
+[ { 1 2 3 } [ { 1 2 } append ] undo ] must-fail
+[ { 1 2 3 } [ { 2 3 } prepend ] undo ] must-fail
+
+[ [ sq ] ] [ [ sqrt ] [undo] ] unit-test
+[ [ sqrt ] ] [ [ sq ] [undo] ] unit-test
+[ [ not ] ] [ [ not ] [undo] ] unit-test
+[ { 3 2 1 } ] [ { 1 2 3 } [ reverse ] undo ] unit-test
index 0e3d48fe5bace99e55fa3e192e3a477f0fff4c2e..924a6d38142e3aff9c98ee01d9e3683f18d64b32 100755 (executable)
@@ -4,13 +4,13 @@ USING: accessors kernel words summary slots quotations
 sequences assocs math arrays stack-checker effects generalizations
 continuations debugger classes.tuple namespaces make vectors
 bit-arrays byte-arrays strings sbufs math.functions macros
-sequences.private combinators mirrors
-combinators.short-circuit fry qualified ;
+sequences.private combinators mirrors splitting
+combinators.short-circuit fry words.symbol ;
 RENAME: _ fry => __
 IN: inverse
 
 ERROR: fail ;
-M: fail summary drop "Unification failed" ;
+M: fail summary drop "Matching failed" ;
 
 : assure ( ? -- ) [ fail ] unless ;
 
@@ -20,6 +20,11 @@ M: fail summary drop "Unification failed" ;
 
 : define-inverse ( word quot -- ) "inverse" set-word-prop ;
 
+: define-dual ( word1 word2 -- )
+    2dup swap [ 1quotation define-inverse ] 2bi@ ;
+
+: define-involution ( word -- ) dup 1quotation define-inverse ;
+
 : define-math-inverse ( word quot1 quot2 -- )
     pick 1quotation 3array "math-inverse" set-word-prop ;
 
@@ -63,16 +68,20 @@ UNION: explicit-inverse normal-inverse math-inverse pop-inverse ;
 
 : enough? ( stack word -- ? )
     dup deferred? [ 2drop f ] [
-        [ [ length ] dip 1quotation infer in>> >= ]
+        [ [ length ] [ 1quotation infer in>> ] bi* >= ]
         [ 3drop f ] recover
     ] if ;
 
 : fold-word ( stack word -- stack )
     2dup enough?
-    [ 1quotation with-datastack ] [ [ % ] dip , { } ] if ;
+    [ 1quotation with-datastack ] [ [ % ] [ , ] bi* { } ] if ;
 
 : fold ( quot -- folded-quot )
-    [ { } swap [ fold-word ] each % ] [ ] make ; 
+    [ { } [ fold-word ] reduce % ] [ ] make ; 
+
+ERROR: no-recursive-inverse ;
+
+SYMBOL: visited
 
 : flattenable? ( object -- ? )
     { [ word? ] [ primitive? not ] [
@@ -80,18 +89,18 @@ UNION: explicit-inverse normal-inverse math-inverse pop-inverse ;
         [ word-prop ] with contains? not
     ] } 1&& ; 
 
-: (flatten) ( quot -- )
-    [ dup flattenable? [ def>> (flatten) ] [ , ] if ] each ;
-
- : retain-stack-overflow? ( error -- ? )
-    { "kernel-error" 14 f f } = ;
-
 : flatten ( quot -- expanded )
-    [ [ (flatten) ] [ ] make ] [
-        dup retain-stack-overflow?
-        [ drop "No inverse defined on recursive word" ] when
-        throw
-    ] recover ;
+    [
+        visited [ over suffix ] change
+        [
+            dup flattenable? [
+                def>>
+                [ visited get memq? [ no-recursive-inverse ] when ]
+                [ flatten ]
+                bi
+            ] [ 1quotation ] if
+        ] map concat
+    ] with-scope ;
 
 ERROR: undefined-inverse ;
 
@@ -125,31 +134,24 @@ MACRO: undo ( quot -- ) [undo] ;
 
 ! Inverse of selected words
 
-\ swap [ swap ] define-inverse
+\ swap define-involution
 \ dup [ [ =/fail ] keep ] define-inverse
 \ 2dup [ over =/fail over =/fail ] define-inverse
 \ 3dup [ pick =/fail pick =/fail pick =/fail ] define-inverse
 \ pick [ [ pick ] dip =/fail ] define-inverse
 \ tuck [ swapd [ =/fail ] keep ] define-inverse
 
-\ not [ not ] define-inverse
+\ not define-involution
 \ >boolean [ { t f } memq? assure ] define-inverse
 
-\ >r [ r> ] define-inverse
-\ r> [ >r ] define-inverse
-
-\ tuple>array [ >tuple ] define-inverse
-\ >tuple [ tuple>array ] define-inverse
-\ reverse [ reverse ] define-inverse
+\ tuple>array \ >tuple define-dual
+\ reverse define-involution
 
 \ undo 1 [ [ call ] curry ] define-pop-inverse
 \ map 1 [ [undo] [ over sequence? assure map ] curry ] define-pop-inverse
 
-\ exp [ log ] define-inverse
-\ log [ exp ] define-inverse
-\ not [ not ] define-inverse
-\ sq [ sqrt ] define-inverse
-\ sqrt [ sq ] define-inverse
+\ exp \ log define-dual
+\ sq \ sqrt define-dual
 
 ERROR: missing-literal ;
 
@@ -203,10 +205,12 @@ DEFER: _
 \ first3 [ 3array ] define-inverse
 \ first4 [ 4array ] define-inverse
 
-\ prefix [ unclip ] define-inverse
-\ unclip [ prefix ] define-inverse
+\ prefix \ unclip define-dual
 \ suffix [ dup but-last swap peek ] define-inverse
 
+\ append 1 [ [ ?tail assure ] curry ] define-pop-inverse
+\ prepend 1 [ [ ?head assure ] curry ] define-pop-inverse
+
 ! Constructor inverse
 : deconstruct-pred ( class -- quot )
     "predicate" word-prop [ dupd call assure ] curry ;
index 936bc182bc11465f8a86194e9f620fedbe5bc0ff..bcea984579f404b171929c776e8fe39688c2160d 100644 (file)
@@ -10,9 +10,8 @@ TUPLE: serial stream path baud
 
 ERROR: invalid-baud baud ;
 M: invalid-baud summary ( invalid-baud -- string )
-    "Baud rate "
-    swap baud>> number>string
-    " not supported" 3append ;
+    baud>> number>string
+    "Baud rate " " not supported" surround ;
 
 HOOK: lookup-baud os ( m -- n )
 HOOK: open-serial os ( serial -- stream )
index 11ba5d3687c99c920c5da94c2b9112caf44a2aa2..465c55c833807d1b8193cc3c580d9ea50bbefc4a 100644 (file)
@@ -53,7 +53,7 @@ IN: iokit.hid
 : kIOHIDElementDuplicateIndexKey              "DuplicateIndex" ; inline
 : kIOHIDElementParentCollectionKey            "ParentCollection" ; inline
 
-: kIOHIDElementVendorSpecificKey
+: kIOHIDElementVendorSpecificKey ( -- str )
     cpu ppc? "VendorSpecifc" "VendorSpecific" ? ; inline
 
 : kIOHIDElementCookieMinKey           "ElementCookieMin" ; inline
index 622b5eaa2ce3a20e149920bd8791b2f542d33d21..c1cbdcf8b8e022dd57a001a4cc3a0cfcd9d83334 100644 (file)
@@ -1,4 +1,4 @@
-USING: kernel tools.test accessors arrays sequences qualified
+USING: kernel tools.test accessors arrays sequences
        io io.streams.duplex namespaces threads destructors
        calendar irc.client.private irc.client irc.messages.private
        concurrency.mailboxes classes assocs combinators ;
index 8199347feb0c0a2b6529a8374b97044a9c3e99ca..0eba6f6af572148cdd0a520691a354c778a53de7 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Bruno Deferrari, Doug Coleman, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: concurrency.mailboxes kernel io.sockets io.encodings.8-bit calendar
-       accessors destructors namespaces io assocs arrays qualified fry
+       accessors destructors namespaces io assocs arrays fry
        continuations threads strings classes combinators splitting hashtables
        ascii irc.messages ;
 RENAME: join sequences => sjoin
index 41272a43f20109e9dbe9822c7d5bcf02b996bd50..ac1d003b1b7f475b6316657a46d2dc3cfc6ec88a 100644 (file)
@@ -1,4 +1,4 @@
-USING: kernel tools.test accessors arrays qualified
+USING: kernel tools.test accessors arrays
        irc.messages irc.messages.private ;
 EXCLUDE: sequences => join ;
 IN: irc.messages.tests
index 8054dc8075665a4b72e873d087a13bb6e2f6a6b6..c88bbc072ac3aa9c4c8b329ac1fa0614caa006f4 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Bruno Deferrari
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel fry splitting ascii calendar accessors combinators qualified
+USING: kernel fry splitting ascii calendar accessors combinators
        arrays classes.tuple math.order ;
 RENAME: join sequences => sjoin
 EXCLUDE: sequences => join ;
index e6f4d07b56492e25bbb8a449cc734fd701d2620e..6048d93711ed857f20c579bc5928c56255975098 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 William Schlieper\r
 ! See http://factorcode.org/license.txt for BSD license.\r
 \r
-USING: kernel io.files parser editors sequences ;\r
+USING: kernel io.files io.pathnames parser editors sequences ;\r
 \r
 IN: irc.ui.load\r
 \r
index fd64e9a07e7355b6839fc91a440d3f532e626ef9..59e4cf6cb4727e9d59881efb9e5ded70e502f9a8 100755 (executable)
@@ -3,7 +3,7 @@
 \r
 USING: accessors kernel threads combinators concurrency.mailboxes\r
        sequences strings hashtables splitting fry assocs hashtables colors\r
-       sorting qualified unicode.collation math.order\r
+       sorting unicode.collation math.order\r
        ui ui.gadgets ui.gadgets.panes ui.gadgets.editors\r
        ui.gadgets.scrollers ui.commands ui.gadgets.frames ui.gestures\r
        ui.gadgets.tabs ui.gadgets.grids ui.gadgets.packs ui.gadgets.labels\r
index 6a0b9f728f2b7d905c533c09d9bf6a3433a0d54c..9e457c7bddeaabca17e2d41dd3195a45a589374c 100755 (executable)
@@ -1,7 +1,7 @@
 USING: ui ui.gadgets sequences kernel arrays math colors
 ui.render math.vectors accessors fry ui.gadgets.packs game-input
 ui.gadgets.labels ui.gadgets.borders alarms
-calendar locals combinators.lib strings ui.gadgets.buttons
+calendar locals strings ui.gadgets.buttons
 combinators math.parser assocs threads ;
 IN: joystick-demo
 
@@ -51,9 +51,9 @@ M: axis-gadget pref-dim* drop SIZE ;
     [ (xy>loc) ] dip (z>loc) ;
 
 : move-axis ( gadget x y z -- )
-    (xyz>loc) rot
+    (xyz>loc) rot tuck
     [ indicator>>   (>>loc) ]
-    [ z-indicator>> (>>loc) ] bi, bi* ;
+    [ z-indicator>> (>>loc) ] 2bi* ;
 
 : move-pov ( gadget pov -- )
     swap pov>> [ interior>> -rot = [ gray ] [ white ] if >>color drop ]
@@ -82,10 +82,10 @@ TUPLE: joystick-demo-gadget < pack axis raxis controller buttons alarm ;
     [ >>controller ] [ product-string <label> add-gadget ] bi ;
 
 : add-axis-gadget ( gadget shelf -- gadget shelf )
-    <axis-gadget> [ >>axis ] [ add-gadget-with-border ] bi, bi* ;
+    <axis-gadget> tuck [ >>axis ] [ add-gadget-with-border ] 2bi* ;
 
 : add-raxis-gadget ( gadget shelf -- gadget shelf )
-    <axis-gadget> [ >>raxis ] [ add-gadget-with-border ] bi, bi* ;
+    <axis-gadget> tuck [ >>raxis ] [ add-gadget-with-border ] 2bi* ;
 
 :: (add-button-gadgets) ( gadget shelf -- )
     gadget controller>> read-controller buttons>> length [
index 01fba499956bcfdef8672f1691bc695f1cf060b2..13dc34135092ea4d14bbec6a381d0082484fe82c 100755 (executable)
@@ -1,5 +1,4 @@
-USING: koszul tools.test kernel sequences assocs namespaces
-symbols ;
+USING: koszul tools.test kernel sequences assocs namespaces ;
 IN: koszul.tests
 
 [
index 5bd679d92a737e29ae153b36669c120504db6ee5..7ac69d298057301e834cba23108c15083180005a 100755 (executable)
@@ -3,7 +3,7 @@
 USING: accessors arrays assocs hashtables assocs io kernel math
 math.vectors math.matrices math.matrices.elimination namespaces
 parser prettyprint sequences words combinators math.parser
-splitting sorting shuffle symbols sets math.order ;
+splitting sorting shuffle sets math.order ;
 IN: koszul
 
 ! Utilities
@@ -108,7 +108,7 @@ SYMBOL: boundaries
 
 : ((d)) ( basis -- value ) boundaries get at ;
 
-: dx.y ( x y -- vec ) >r ((d)) r> wedge ;
+: dx.y ( x y -- vec ) [ ((d)) ] dip wedge ;
 
 DEFER: (d)
 
@@ -120,7 +120,7 @@ DEFER: (d)
 : linear-op ( vec quot -- vec )
         [
         [
-            -rot >r swap call r> alt*n (alt+)
+            -rot [ swap call ] dip alt*n (alt+)
         ] curry assoc-each
     ] with-terms ; inline
 
@@ -165,7 +165,7 @@ DEFER: (d)
     swap call [ at 0 or ] curry map ; inline
 
 : op-matrix ( domain range quot -- matrix )
-    rot [ >r 2dup r> (op-matrix) ] map 2nip ; inline
+    rot [ [ 2dup ] dip (op-matrix) ] map 2nip ; inline
 
 : d-matrix ( domain range -- matrix )
     [ (d) ] op-matrix ;
@@ -176,7 +176,7 @@ DEFER: (d)
 ! Graded by degree
 : (graded-ker/im-d) ( n seq -- null/rank )
     #! d: C(n) ---> C(n+1)
-    [ ?nth ] 2keep >r 1+ r> ?nth
+    [ ?nth ] [ [ 1+ ] dip ?nth ] 2bi
     dim-im/ker-d ;
 
 : graded-ker/im-d ( graded-basis -- seq )
@@ -188,13 +188,13 @@ DEFER: (d)
 ! Bi-graded for two-step complexes
 : (bigraded-ker/im-d) ( u-deg z-deg bigraded-basis -- null/rank )
     #! d: C(u,z) ---> C(u+2,z-1)
-    [ ?nth ?nth ] 3keep >r >r 2 + r> 1 - r> ?nth ?nth
+    [ ?nth ?nth ] 3keep [ [ 2 + ] dip 1 - ] dip ?nth ?nth
     dim-im/ker-d ;
 
 : bigraded-ker/im-d ( bigraded-basis -- seq )
     dup length [
         over first length [
-            >r 2dup r> spin (bigraded-ker/im-d)
+            [ 2dup ] dip spin (bigraded-ker/im-d)
         ] map 2nip
     ] with map ;
 
@@ -224,13 +224,13 @@ DEFER: (d)
     ] if ;
 
 : laplacian-matrix ( basis1 basis2 basis3 -- matrix )
-    dupd d-matrix m.m' >r d-matrix m'.m r> ?m+ ;
+    dupd d-matrix m.m' [ d-matrix m'.m ] dip ?m+ ;
 
 : laplacian-betti ( basis1 basis2 basis3 -- n )
     laplacian-matrix null/rank drop ;
 
 : laplacian-kernel ( basis1 basis2 basis3 -- basis )
-    >r tuck r>
+    [ tuck ] dip
     laplacian-matrix dup empty-matrix? [
         2drop f
     ] [
@@ -246,7 +246,7 @@ DEFER: (d)
     dup length [ graded-triple ] with map ;
 
 : graded-laplacian ( generators quot -- seq )
-    >r basis graded graded-triples [ first3 ] r> compose map ;
+    [ basis graded graded-triples [ first3 ] ] dip compose map ;
     inline
 
 : graded-laplacian-betti ( generators -- seq )
@@ -273,12 +273,12 @@ DEFER: (d)
 : bigraded-triples ( grid -- triples )
     dup length [
         over first length [
-            >r 2dup r> spin bigraded-triple
+            [ 2dup ] dip spin bigraded-triple
         ] map 2nip
     ] with map ;
 
 : bigraded-laplacian ( u-generators z-generators quot -- seq )
-    >r [ basis graded ] bi@ tensor bigraded-triples r>
+    [ [ basis graded ] bi@ tensor bigraded-triples ] dip
     [ [ first3 ] prepose map ] curry map ; inline
 
 : bigraded-laplacian-betti ( u-generators z-generators -- seq )
index 77b0b11238745b74311de3c089dd175cbbc7fbf5..d3c8f7217fdd14ea326ed7f56ae00ff62c7fd53b 100644 (file)
@@ -15,13 +15,13 @@ SYMBOL: def-hash-keys
 
 : more-defs ( hash -- )
     {
-        { -rot [ swap >r swap r> ] }
+        { -rot [ swap [ swap ] dip ] }
         { -rot [ swap swapd ] }
-        { rot [ >r swap r> swap ] }
+        { rot [ [ swap ] dip swap ] }
         { rot [ swapd swap ] }
         { over [ dup swap ] }
         { tuck [ dup -rot ] }
-        { swapd [ >r swap r> ] }
+        { swapd [ [ swap ] dip ] }
         { 2nip [ nip nip ] }
         { 2drop [ drop drop ] }
         { 3drop [ drop drop drop ] }
diff --git a/extra/literals/authors.txt b/extra/literals/authors.txt
new file mode 100644 (file)
index 0000000..f13c9c1
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
diff --git a/extra/literals/literals-docs.factor b/extra/literals/literals-docs.factor
new file mode 100644 (file)
index 0000000..ae25c75
--- /dev/null
@@ -0,0 +1,61 @@
+! Copyright (C) 2008 Joe Groff.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax multiline ;
+IN: literals
+
+HELP: $
+{ $syntax "$ word" }
+{ $description "Executes " { $snippet "word" } " at parse time and adds the result(s) to the parser accumulator." }
+{ $notes "Since " { $snippet "word" } " is executed at parse time, " { $snippet "$" } " cannot be used with words defined in the same compilation unit." }
+{ $examples
+
+    { $example <"
+USING: kernel literals prettyprint ;
+IN: scratchpad
+
+<< : five 5 ; >>
+{ $ five } .
+    "> "{ 5 }" }
+
+    { $example <"
+USING: kernel literals prettyprint ;
+IN: scratchpad
+
+<< : seven-eleven 7 11 ; >>
+{ $ seven-eleven } .
+    "> "{ 7 11 }" }
+
+} ;
+
+HELP: $[
+{ $syntax "$[ code ]" }
+{ $description "Calls " { $snippet "code" } " at parse time and adds the result(s) to the parser accumulator." }
+{ $notes "Since " { $snippet "code" } " is executed at parse time, it cannot reference any words defined in the same compilation unit." }
+{ $examples
+
+    { $example <"
+USING: kernel literals math prettyprint ;
+IN: scratchpad
+
+<< : five 5 ; >>
+{ $[ five dup 1+ dup 2 + ] } .
+    "> "{ 5 6 8 }" }
+
+} ;
+
+{ POSTPONE: $ POSTPONE: $[ } related-words
+
+ARTICLE: "literals" "Interpolating code results into literal values"
+"The " { $vocab-link "literals" } " vocabulary contains words to run code at parse time and insert the results into more complex literal values."
+{ $example <"
+USING: kernel literals math prettyprint ;
+IN: scratchpad
+
+<< : five 5 ; >>
+{ $ five $[ five dup 1+ dup 2 + ] } .
+    "> "{ 5 5 6 8 }" }
+{ $subsection POSTPONE: $ }
+{ $subsection POSTPONE: $[ }
+;
+
+ABOUT: "literals"
index b88a286a59679a480760e4ae6028675b7b22351d..185d672dd3fb5f5a4319f1fed7d6e1190a16cee9 100644 (file)
@@ -1,4 +1,4 @@
-USING: kernel literals tools.test ;
+USING: kernel literals math tools.test ;
 IN: literals.tests
 
 <<
@@ -10,3 +10,5 @@ IN: literals.tests
 [ { 5 } ] [ { $ five } ] unit-test
 [ { 7 11 } ] [ { $ seven-eleven } ] unit-test
 [ { 6 6 6 } ] [ { $ six-six-six } ] unit-test
+
+[ { 8 8 8 } ] [ { $[ six-six-six [ 2 + ] tri@ ] } ] unit-test
index d46f492cd4a52708a86fd36edc1256b36882fdbb..a450c2118e3df4524651e7714aba9c3fe8952bb2 100644 (file)
@@ -1,4 +1,6 @@
-USING: continuations kernel parser words ;
+! (c) Joe Groff, see license for details
+USING: continuations kernel parser words quotations ;
 IN: literals
 
 : $ scan-word [ execute ] curry with-datastack ; parsing
+: $[ \ ] parse-until >quotation with-datastack ; parsing
diff --git a/extra/literals/summary.txt b/extra/literals/summary.txt
new file mode 100644 (file)
index 0000000..dfeb9fe
--- /dev/null
@@ -0,0 +1 @@
+Expression interpolation into sequence literals
diff --git a/extra/literals/tags.txt b/extra/literals/tags.txt
new file mode 100644 (file)
index 0000000..71c0ff7
--- /dev/null
@@ -0,0 +1 @@
+syntax
index 7bc63d3e3482cb5f4572e41351fbf86e5bf8dc72..08a5eac72d8b2469ce54a957bbbe9d8cc08c8940 100755 (executable)
@@ -1,4 +1,4 @@
-USING: kernel io io.files io.monitors io.encodings.utf8 ;\r
+USING: kernel io io.files io.pathnames io.monitors io.encodings.utf8 ;\r
 IN: log-viewer\r
 \r
 : read-lines ( stream -- )\r
@@ -6,7 +6,7 @@ IN: log-viewer
     [ print read-lines ] [ 2drop flush ] if ;\r
 \r
 : tail-file-loop ( stream monitor -- )\r
-    dup next-change 2drop over read-lines tail-file-loop ;\r
+    dup next-change drop over read-lines tail-file-loop ;\r
 \r
 : tail-file ( file -- )\r
     dup utf8 <file-reader> dup read-lines\r
index 35070d89023f275c6e61a57fe3a8d5b2191c0ff2..4d705610b4a7dd240056d7f1634c0908dc5b0483 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io.files io.launcher io.encodings.utf8 prettyprint arrays
-calendar namespaces mason.common mason.child
-mason.release mason.report mason.email mason.cleanup
-mason.help ;
+USING: arrays calendar io.directories io.encodings.utf8
+io.files io.launcher mason.child mason.cleanup mason.common
+mason.email mason.help mason.release mason.report namespaces
+prettyprint ;
 IN: mason.build
 
 : create-build-dir ( -- )
index 0c9669ed5a5a5425088dc0c54df89dfaf3c24665..5a3a0d6ceb939a3bf8dbac1428fe5aec19a21752 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel namespaces make debugger sequences io.files
-io.launcher arrays accessors calendar continuations
-combinators.short-circuit mason.common mason.report
-mason.platform mason.config http.client ;
+USING: accessors arrays calendar combinators.short-circuit
+continuations debugger http.client io.directories io.files
+io.launcher io.pathnames kernel make mason.common mason.config
+mason.platform mason.report namespaces sequences ;
 IN: mason.child
 
 : make-cmd ( -- args )
index ae24f533d6384be3fa805e7fcd1ad0f8fa6fe312..a2c087392a3aa5b698334587601cb4f0037456e8 100644 (file)
@@ -1,7 +1,8 @@
 ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel namespaces arrays continuations io.files io.launcher
-mason.common mason.platform mason.config ;
+USING: arrays continuations io.directories
+io.directories.hierarchy io.files io.launcher kernel
+mason.common mason.config mason.platform namespaces ;
 IN: mason.cleanup
 
 : compress-image ( -- )
index ed6ffecdd11f749fd5d93406bfdde3b59fd18443..095cbd1a80aa16ed726bc7085679db377ba17326 100644 (file)
@@ -1,6 +1,6 @@
 IN: mason.common.tests
 USING: prettyprint mason.common mason.config
-namespaces calendar tools.test io.files io.encodings.utf8 ;
+namespaces calendar tools.test io.files io.files.temp io.encodings.utf8 ;
 
 [ "00:01:01" ] [ 61000 milli-seconds>time ] unit-test
 
index 49f280fa84977ba8926d233d737b4398ccf1aff7..ec0cbdbc9c4e92bc96cccf4bd37e20cddffc06ac 100644 (file)
@@ -1,9 +1,10 @@
 ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel namespaces sequences splitting system accessors
-math.functions make io io.files io.launcher io.encodings.utf8
-prettyprint combinators.short-circuit parser combinators
-calendar calendar.format arrays mason.config locals ;
+math.functions make io io.files io.pathnames io.directories
+io.launcher io.encodings.utf8 prettyprint
+combinators.short-circuit parser combinators calendar
+calendar.format arrays mason.config locals ;
 IN: mason.common
 
 : short-running-process ( command -- )
index 9169fbf1960d036784f2c2e53aa629b6bba61672..b1739d85faff15c104a0ecdf3acbe86f2e9766ef 100644 (file)
@@ -1,6 +1,7 @@
 ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: system io.files namespaces kernel accessors assocs ;
+USING: system io.files io.pathnames namespaces kernel accessors
+assocs ;
 IN: mason.config
 
 ! (Optional) Location for build directories
index c9ca50f0c2a91faa8f2a134e67d641c1c0e16c0b..9a4e2be99630001a594b870551f96fd1229112cf 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: help.html sequences io.files io.launcher make namespaces
-kernel arrays mason.common mason.config ;
+USING: arrays help.html io.directories io.files io.launcher
+kernel make mason.common mason.config namespaces sequences ;
 IN: mason.help
 
 : make-help-archive ( -- )
index 4f9c8f65d37dbbbb217c0b691fcc4a90d86894cd..299a2f4e1fe1a885bd24cd656577f2269a4e8455 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel debugger io io.files threads debugger continuations
-namespaces accessors calendar mason.common mason.updates
-mason.build mason.email ;
+USING: accessors calendar continuations debugger debugger io
+io.directories io.files kernel mason.build mason.common
+mason.email mason.updates namespaces threads ;
 IN: mason
 
 : build-loop-error ( error -- )
index e76979d88527bda187acb5cce23f7fee5778a8fa..5ef424ad4f6e4e2a0e91e244092687dce31a7df5 100644 (file)
@@ -1,8 +1,9 @@
 ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel combinators sequences make namespaces io.files
-io.launcher prettyprint arrays
-mason.common mason.platform mason.config ;
+USING: arrays combinators io.directories
+io.directories.hierarchy io.files io.launcher io.pathnames
+kernel make mason.common mason.config mason.platform namespaces
+prettyprint sequences ;
 IN: mason.release.archive
 
 : base-name ( -- string )
index 600b08c6b66e4fbc0e05add1dca8eda90ec2f825..75ce828c2801cf1ad9570ab5e9917de65470fd05 100644 (file)
@@ -1,7 +1,8 @@
 ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel namespaces sequences prettyprint io.files
-io.launcher make mason.common mason.platform mason.config ;
+USING: io.directories io.files io.launcher kernel make
+mason.common mason.config mason.platform namespaces prettyprint
+sequences ;
 IN: mason.release.branch
 
 : branch-name ( -- string ) "clean-" platform append ;
index fb931650d448230b06f77083ea3abaf2a751cbbe..7327209a06d83146add465e0bdac920961b9fdc4 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel namespaces continuations debugger sequences fry
-io.files io.launcher bootstrap.image qualified mason.common
-mason.config ;
+USING: bootstrap.image continuations debugger fry
+io.directories io.directories.hierarchy io.files io.launcher
+kernel mason.common namespaces sequences ;
 FROM: mason.config => target-os ;
 IN: mason.release.tidy
 
index b23ad19e5e7d9836eaf9da261751c0e86fb56256..a15a96c63eaea977e65ee81fcc682affe86641b5 100644 (file)
@@ -1,9 +1,10 @@
 ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel namespaces assocs io.files io.encodings.utf8
-prettyprint help.lint benchmark tools.time bootstrap.stage2
-tools.test tools.vocabs help.html mason.common words generic
-accessors compiler.errors sequences sets sorting math ;
+USING: accessors assocs benchmark bootstrap.stage2
+compiler.errors generic help.html help.lint io.directories
+io.encodings.utf8 io.files kernel mason.common math namespaces
+prettyprint sequences sets sorting tools.test tools.time
+tools.vocabs words ;
 IN: mason.test
 
 : do-load ( -- )
index 36a29c7aa1fdfa7f44bc3b4da352ba2303221bc6..d995cab59d5f147ce6ac2868f25bce19f60459e7 100644 (file)
@@ -15,5 +15,5 @@ HELP: binpack*
 
 HELP: binpack!
 { $values { "items" sequence } { "quot" quotation } { "n" "number of bins" } { "bins" "packed bins" } } 
-{ $description "Packs a sequence of items into the specified number of bins, using the quotatino to determine the weight." } ;
+{ $description "Packs a sequence of items into the specified number of bins, using the quotation to determine the weight." } ;
 
diff --git a/extra/math/blas/cblas/authors.txt b/extra/math/blas/cblas/authors.txt
deleted file mode 100644 (file)
index f13c9c1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Joe Groff
diff --git a/extra/math/blas/cblas/cblas.factor b/extra/math/blas/cblas/cblas.factor
deleted file mode 100644 (file)
index 4c0a88f..0000000
+++ /dev/null
@@ -1,559 +0,0 @@
-USING: alien alien.c-types alien.syntax kernel system combinators ;
-IN: math.blas.cblas
-
-<< "cblas" {
-    { [ os macosx? ] [ "libblas.dylib" "cdecl" add-library ] }
-    { [ os windows? ] [ "blas.dll" "cdecl" add-library ] }
-    { [ os openbsd? ] [ "libcblas.so" "cdecl" add-library ] }
-    { [ os freebsd? ] [ "libcblas.so" "cdecl" add-library ] }
-    [ "libblas.so" "cdecl" add-library ]
-} cond >>
-
-LIBRARY: cblas
-
-TYPEDEF: int CBLAS_ORDER
-: CblasRowMajor 101 ; inline
-: CblasColMajor 102 ; inline
-
-TYPEDEF: int CBLAS_TRANSPOSE
-: CblasNoTrans   111 ; inline
-: CblasTrans     112 ; inline
-: CblasConjTrans 113 ; inline
-
-TYPEDEF: int CBLAS_UPLO
-: CblasUpper 121 ; inline
-: CblasLower 122 ; inline
-
-TYPEDEF: int CBLAS_DIAG
-: CblasNonUnit 131 ; inline
-: CblasUnit    132 ; inline
-
-TYPEDEF: int CBLAS_SIDE
-: CblasLeft  141 ; inline
-: CblasRight 142 ; inline
-
-TYPEDEF: int CBLAS_INDEX
-
-C-STRUCT: float-complex
-    { "float" "real" }
-    { "float" "imag" } ;
-C-STRUCT: double-complex
-    { "double" "real" }
-    { "double" "imag" } ;
-
-! Level 1 BLAS (scalar-vector and vector-vector)
-
-FUNCTION: float  cblas_sdsdot
-    ( int N, float    alpha, float*   X, int incX, float*   Y, int incY ) ;
-FUNCTION: double cblas_dsdot
-    ( int N,                 float*   X, int incX, float*   Y, int incY ) ;
-FUNCTION: float  cblas_sdot
-    ( int N,                 float*   X, int incX, float*   Y, int incY ) ;
-FUNCTION: double cblas_ddot
-    ( int N,                 double*  X, int incX, double*  Y, int incY ) ;
-
-FUNCTION: void   cblas_cdotu_sub
-    ( int N,                 void*    X, int incX, void*    Y, int incY, void*    dotu ) ;
-FUNCTION: void   cblas_cdotc_sub
-    ( int N,                 void*    X, int incX, void*    Y, int incY, void*    dotc ) ;
-
-FUNCTION: void   cblas_zdotu_sub
-    ( int N,                 void*    X, int incX, void*    Y, int incY, void*    dotu ) ;
-FUNCTION: void   cblas_zdotc_sub
-    ( int N,                 void*    X, int incX, void*    Y, int incY, void*    dotc ) ;
-
-FUNCTION: float  cblas_snrm2
-    ( int N,                 float*   X, int incX ) ;
-FUNCTION: float  cblas_sasum
-    ( int N,                 float*   X, int incX ) ;
-
-FUNCTION: double cblas_dnrm2
-    ( int N,                 double*  X, int incX ) ;
-FUNCTION: double cblas_dasum
-    ( int N,                 double*  X, int incX ) ;
-
-FUNCTION: float  cblas_scnrm2
-    ( int N,                 void*    X, int incX ) ;
-FUNCTION: float  cblas_scasum
-    ( int N,                 void*    X, int incX ) ;
-
-FUNCTION: double cblas_dznrm2
-    ( int N,                 void*    X, int incX ) ;
-FUNCTION: double cblas_dzasum
-    ( int N,                 void*    X, int incX ) ;
-
-FUNCTION: CBLAS_INDEX cblas_isamax
-    ( int N,                 float*   X, int incX ) ;
-FUNCTION: CBLAS_INDEX cblas_idamax
-    ( int N,                 double*  X, int incX ) ;
-FUNCTION: CBLAS_INDEX cblas_icamax
-    ( int N,                 void*    X, int incX ) ;
-FUNCTION: CBLAS_INDEX cblas_izamax
-    ( int N,                 void*    X, int incX ) ;
-
-FUNCTION: void cblas_sswap
-    ( int N,                 float*   X, int incX, float*   Y, int incY ) ;
-FUNCTION: void cblas_scopy
-    ( int N,                 float*   X, int incX, float*   Y, int incY ) ;
-FUNCTION: void cblas_saxpy
-    ( int N, float    alpha, float*   X, int incX, float*   Y, int incY ) ;
-
-FUNCTION: void cblas_dswap
-    ( int N,                 double*  X, int incX, double*  Y, int incY ) ;
-FUNCTION: void cblas_dcopy
-    ( int N,                 double*  X, int incX, double*  Y, int incY ) ;
-FUNCTION: void cblas_daxpy
-    ( int N, double   alpha, double*  X, int incX, double*  Y, int incY ) ;
-
-FUNCTION: void cblas_cswap
-    ( int N,                 void*    X, int incX, void*    Y, int incY ) ;
-FUNCTION: void cblas_ccopy
-    ( int N,                 void*    X, int incX, void*    Y, int incY ) ;
-FUNCTION: void cblas_caxpy
-    ( int N, void*    alpha, void*    X, int incX, void*    Y, int incY ) ;
-
-FUNCTION: void cblas_zswap
-    ( int N,                 void*    X, int incX, void*    Y, int incY ) ;
-FUNCTION: void cblas_zcopy
-    ( int N,                 void*    X, int incX, void*    Y, int incY ) ;
-FUNCTION: void cblas_zaxpy
-    ( int N, void*    alpha, void*    X, int incX, void*    Y, int incY ) ;
-
-FUNCTION: void cblas_sscal
-    ( int N, float    alpha, float*   X, int incX ) ;
-FUNCTION: void cblas_dscal
-    ( int N, double   alpha, double*  X, int incX ) ;
-FUNCTION: void cblas_cscal
-    ( int N, void*    alpha, void*    X, int incX ) ;
-FUNCTION: void cblas_zscal
-    ( int N, void*    alpha, void*    X, int incX ) ;
-FUNCTION: void cblas_csscal
-    ( int N, float    alpha, void*    X, int incX ) ;
-FUNCTION: void cblas_zdscal
-    ( int N, double   alpha, void*    X, int incX ) ;
-
-FUNCTION: void cblas_srotg
-    ( float* a, float* b, float* c, float* s ) ;
-FUNCTION: void cblas_srotmg
-    ( float* d1, float* d2, float* b1, float b2, float* P ) ;
-FUNCTION: void cblas_srot
-    ( int N, float* X, int incX, float* Y, int incY, float c, float s ) ;
-FUNCTION: void cblas_srotm
-    ( int N, float* X, int incX, float* Y, int incY, float* P ) ;
-
-FUNCTION: void cblas_drotg
-    ( double* a, double* b, double* c, double* s ) ;
-FUNCTION: void cblas_drotmg
-    ( double* d1, double* d2, double* b1, double b2, double* P ) ;
-FUNCTION: void cblas_drot
-    ( int N, double* X, int incX, double* Y, int incY, double c, double s ) ;
-FUNCTION: void cblas_drotm
-    ( int N, double* X, int incX, double* Y, int incY, double* P ) ;
-! Level 2 BLAS (matrix-vector)
-
-FUNCTION: void cblas_sgemv ( CBLAS_ORDER Order,
-                 CBLAS_TRANSPOSE TransA, int M, int N,
-                 float alpha, float* A, int lda,
-                 float* X, int incX, float beta,
-                 float* Y, int incY ) ;
-FUNCTION: void cblas_sgbmv ( CBLAS_ORDER Order,
-                 CBLAS_TRANSPOSE TransA, int M, int N,
-                 int KL, int KU, float alpha,
-                 float* A, int lda, float* X,
-                 int incX, float beta, float* Y, int incY ) ;
-FUNCTION: void cblas_strmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, float* A, int lda,
-                 float* X, int incX ) ;
-FUNCTION: void cblas_stbmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, int K, float* A, int lda,
-                 float* X, int incX ) ;
-FUNCTION: void cblas_stpmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, float* Ap, float* X, int incX ) ;
-FUNCTION: void cblas_strsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, float* A, int lda, float* X,
-                 int incX ) ;
-FUNCTION: void cblas_stbsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, int K, float* A, int lda,
-                 float* X, int incX ) ;
-FUNCTION: void cblas_stpsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, float* Ap, float* X, int incX ) ;
-
-FUNCTION: void cblas_dgemv ( CBLAS_ORDER Order,
-                 CBLAS_TRANSPOSE TransA, int M, int N,
-                 double alpha, double* A, int lda,
-                 double* X, int incX, double beta,
-                 double* Y, int incY ) ;
-FUNCTION: void cblas_dgbmv ( CBLAS_ORDER Order,
-                 CBLAS_TRANSPOSE TransA, int M, int N,
-                 int KL, int KU, double alpha,
-                 double* A, int lda, double* X,
-                 int incX, double beta, double* Y, int incY ) ;
-FUNCTION: void cblas_dtrmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, double* A, int lda,
-                 double* X, int incX ) ;
-FUNCTION: void cblas_dtbmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, int K, double* A, int lda,
-                 double* X, int incX ) ;
-FUNCTION: void cblas_dtpmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, double* Ap, double* X, int incX ) ;
-FUNCTION: void cblas_dtrsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, double* A, int lda, double* X,
-                 int incX ) ;
-FUNCTION: void cblas_dtbsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, int K, double* A, int lda,
-                 double* X, int incX ) ;
-FUNCTION: void cblas_dtpsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, double* Ap, double* X, int incX ) ;
-
-FUNCTION: void cblas_cgemv ( CBLAS_ORDER Order,
-                 CBLAS_TRANSPOSE TransA, int M, int N,
-                 void* alpha, void* A, int lda,
-                 void* X, int incX, void* beta,
-                 void* Y, int incY ) ;
-FUNCTION: void cblas_cgbmv ( CBLAS_ORDER Order,
-                 CBLAS_TRANSPOSE TransA, int M, int N,
-                 int KL, int KU, void* alpha,
-                 void* A, int lda, void* X,
-                 int incX, void* beta, void* Y, int incY ) ;
-FUNCTION: void cblas_ctrmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, void* A, int lda,
-                 void* X, int incX ) ;
-FUNCTION: void cblas_ctbmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, int K, void* A, int lda,
-                 void* X, int incX ) ;
-FUNCTION: void cblas_ctpmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, void* Ap, void* X, int incX ) ;
-FUNCTION: void cblas_ctrsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, void* A, int lda, void* X,
-                 int incX ) ;
-FUNCTION: void cblas_ctbsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, int K, void* A, int lda,
-                 void* X, int incX ) ;
-FUNCTION: void cblas_ctpsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, void* Ap, void* X, int incX ) ;
-
-FUNCTION: void cblas_zgemv ( CBLAS_ORDER Order,
-                 CBLAS_TRANSPOSE TransA, int M, int N,
-                 void* alpha, void* A, int lda,
-                 void* X, int incX, void* beta,
-                 void* Y, int incY ) ;
-FUNCTION: void cblas_zgbmv ( CBLAS_ORDER Order,
-                 CBLAS_TRANSPOSE TransA, int M, int N,
-                 int KL, int KU, void* alpha,
-                 void* A, int lda, void* X,
-                 int incX, void* beta, void* Y, int incY ) ;
-FUNCTION: void cblas_ztrmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, void* A, int lda,
-                 void* X, int incX ) ;
-FUNCTION: void cblas_ztbmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, int K, void* A, int lda,
-                 void* X, int incX ) ;
-FUNCTION: void cblas_ztpmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, void* Ap, void* X, int incX ) ;
-FUNCTION: void cblas_ztrsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, void* A, int lda, void* X,
-                 int incX ) ;
-FUNCTION: void cblas_ztbsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, int K, void* A, int lda,
-                 void* X, int incX ) ;
-FUNCTION: void cblas_ztpsv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
-                 int N, void* Ap, void* X, int incX ) ;
-
-
-FUNCTION: void cblas_ssymv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 int N, float alpha, float* A,
-                 int lda, float* X, int incX,
-                 float beta, float* Y, int incY ) ;
-FUNCTION: void cblas_ssbmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 int N, int K, float alpha, float* A,
-                 int lda, float* X, int incX,
-                 float beta, float* Y, int incY ) ;
-FUNCTION: void cblas_sspmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 int N, float alpha, float* Ap,
-                 float* X, int incX,
-                 float beta, float* Y, int incY ) ;
-FUNCTION: void cblas_sger ( CBLAS_ORDER Order, int M, int N,
-                float alpha, float* X, int incX,
-                float* Y, int incY, float* A, int lda ) ;
-FUNCTION: void cblas_ssyr ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                int N, float alpha, float* X,
-                int incX, float* A, int lda ) ;
-FUNCTION: void cblas_sspr ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                int N, float alpha, float* X,
-                int incX, float* Ap ) ;
-FUNCTION: void cblas_ssyr2 ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                int N, float alpha, float* X,
-                int incX, float* Y, int incY, float* A,
-                int lda ) ;
-FUNCTION: void cblas_sspr2 ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                int N, float alpha, float* X,
-                int incX, float* Y, int incY, float* A ) ;
-
-FUNCTION: void cblas_dsymv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 int N, double alpha, double* A,
-                 int lda, double* X, int incX,
-                 double beta, double* Y, int incY ) ;
-FUNCTION: void cblas_dsbmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 int N, int K, double alpha, double* A,
-                 int lda, double* X, int incX,
-                 double beta, double* Y, int incY ) ;
-FUNCTION: void cblas_dspmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 int N, double alpha, double* Ap,
-                 double* X, int incX,
-                 double beta, double* Y, int incY ) ;
-FUNCTION: void cblas_dger ( CBLAS_ORDER Order, int M, int N,
-                double alpha, double* X, int incX,
-                double* Y, int incY, double* A, int lda ) ;
-FUNCTION: void cblas_dsyr ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                int N, double alpha, double* X,
-                int incX, double* A, int lda ) ;
-FUNCTION: void cblas_dspr ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                int N, double alpha, double* X,
-                int incX, double* Ap ) ;
-FUNCTION: void cblas_dsyr2 ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                int N, double alpha, double* X,
-                int incX, double* Y, int incY, double* A,
-                int lda ) ;
-FUNCTION: void cblas_dspr2 ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                int N, double alpha, double* X,
-                int incX, double* Y, int incY, double* A ) ;
-
-
-FUNCTION: void cblas_chemv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 int N, void* alpha, void* A,
-                 int lda, void* X, int incX,
-                 void* beta, void* Y, int incY ) ;
-FUNCTION: void cblas_chbmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 int N, int K, void* alpha, void* A,
-                 int lda, void* X, int incX,
-                 void* beta, void* Y, int incY ) ;
-FUNCTION: void cblas_chpmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 int N, void* alpha, void* Ap,
-                 void* X, int incX,
-                 void* beta, void* Y, int incY ) ;
-FUNCTION: void cblas_cgeru ( CBLAS_ORDER Order, int M, int N,
-                 void* alpha, void* X, int incX,
-                 void* Y, int incY, void* A, int lda ) ;
-FUNCTION: void cblas_cgerc ( CBLAS_ORDER Order, int M, int N,
-                 void* alpha, void* X, int incX,
-                 void* Y, int incY, void* A, int lda ) ;
-FUNCTION: void cblas_cher ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                int N, float alpha, void* X, int incX,
-                void* A, int lda ) ;
-FUNCTION: void cblas_chpr ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                int N, float alpha, void* X,
-                int incX, void* A ) ;
-FUNCTION: void cblas_cher2 ( CBLAS_ORDER Order, CBLAS_UPLO Uplo, int N,
-                void* alpha, void* X, int incX,
-                void* Y, int incY, void* A, int lda ) ;
-FUNCTION: void cblas_chpr2 ( CBLAS_ORDER Order, CBLAS_UPLO Uplo, int N,
-                void* alpha, void* X, int incX,
-                void* Y, int incY, void* Ap ) ;
-
-FUNCTION: void cblas_zhemv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 int N, void* alpha, void* A,
-                 int lda, void* X, int incX,
-                 void* beta, void* Y, int incY ) ;
-FUNCTION: void cblas_zhbmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 int N, int K, void* alpha, void* A,
-                 int lda, void* X, int incX,
-                 void* beta, void* Y, int incY ) ;
-FUNCTION: void cblas_zhpmv ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 int N, void* alpha, void* Ap,
-                 void* X, int incX,
-                 void* beta, void* Y, int incY ) ;
-FUNCTION: void cblas_zgeru ( CBLAS_ORDER Order, int M, int N,
-                 void* alpha, void* X, int incX,
-                 void* Y, int incY, void* A, int lda ) ;
-FUNCTION: void cblas_zgerc ( CBLAS_ORDER Order, int M, int N,
-                 void* alpha, void* X, int incX,
-                 void* Y, int incY, void* A, int lda ) ;
-FUNCTION: void cblas_zher ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                int N, double alpha, void* X, int incX,
-                void* A, int lda ) ;
-FUNCTION: void cblas_zhpr ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                int N, double alpha, void* X,
-                int incX, void* A ) ;
-FUNCTION: void cblas_zher2 ( CBLAS_ORDER Order, CBLAS_UPLO Uplo, int N,
-                void* alpha, void* X, int incX,
-                void* Y, int incY, void* A, int lda ) ;
-FUNCTION: void cblas_zhpr2 ( CBLAS_ORDER Order, CBLAS_UPLO Uplo, int N,
-                void* alpha, void* X, int incX,
-                void* Y, int incY, void* Ap ) ;
-
-! Level 3 BLAS (matrix-matrix) 
-
-FUNCTION: void cblas_sgemm ( CBLAS_ORDER Order, CBLAS_TRANSPOSE TransA,
-                 CBLAS_TRANSPOSE TransB, int M, int N,
-                 int K, float alpha, float* A,
-                 int lda, float* B, int ldb,
-                 float beta, float* C, int ldc ) ;
-FUNCTION: void cblas_ssymm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
-                 CBLAS_UPLO Uplo, int M, int N,
-                 float alpha, float* A, int lda,
-                 float* B, int ldb, float beta,
-                 float* C, int ldc ) ;
-FUNCTION: void cblas_ssyrk ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE Trans, int N, int K,
-                 float alpha, float* A, int lda,
-                 float beta, float* C, int ldc ) ;
-FUNCTION: void cblas_ssyr2k ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                  CBLAS_TRANSPOSE Trans, int N, int K,
-                  float alpha, float* A, int lda,
-                  float* B, int ldb, float beta,
-                  float* C, int ldc ) ;
-FUNCTION: void cblas_strmm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
-                 CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
-                 CBLAS_DIAG Diag, int M, int N,
-                 float alpha, float* A, int lda,
-                 float* B, int ldb ) ;
-FUNCTION: void cblas_strsm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
-                 CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
-                 CBLAS_DIAG Diag, int M, int N,
-                 float alpha, float* A, int lda,
-                 float* B, int ldb ) ;
-
-FUNCTION: void cblas_dgemm ( CBLAS_ORDER Order, CBLAS_TRANSPOSE TransA,
-                 CBLAS_TRANSPOSE TransB, int M, int N,
-                 int K, double alpha, double* A,
-                 int lda, double* B, int ldb,
-                 double beta, double* C, int ldc ) ;
-FUNCTION: void cblas_dsymm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
-                 CBLAS_UPLO Uplo, int M, int N,
-                 double alpha, double* A, int lda,
-                 double* B, int ldb, double beta,
-                 double* C, int ldc ) ;
-FUNCTION: void cblas_dsyrk ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE Trans, int N, int K,
-                 double alpha, double* A, int lda,
-                 double beta, double* C, int ldc ) ;
-FUNCTION: void cblas_dsyr2k ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                  CBLAS_TRANSPOSE Trans, int N, int K,
-                  double alpha, double* A, int lda,
-                  double* B, int ldb, double beta,
-                  double* C, int ldc ) ;
-FUNCTION: void cblas_dtrmm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
-                 CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
-                 CBLAS_DIAG Diag, int M, int N,
-                 double alpha, double* A, int lda,
-                 double* B, int ldb ) ;
-FUNCTION: void cblas_dtrsm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
-                 CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
-                 CBLAS_DIAG Diag, int M, int N,
-                 double alpha, double* A, int lda,
-                 double* B, int ldb ) ;
-
-FUNCTION: void cblas_cgemm ( CBLAS_ORDER Order, CBLAS_TRANSPOSE TransA,
-                 CBLAS_TRANSPOSE TransB, int M, int N,
-                 int K, void* alpha, void* A,
-                 int lda, void* B, int ldb,
-                 void* beta, void* C, int ldc ) ;
-FUNCTION: void cblas_csymm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
-                 CBLAS_UPLO Uplo, int M, int N,
-                 void* alpha, void* A, int lda,
-                 void* B, int ldb, void* beta,
-                 void* C, int ldc ) ;
-FUNCTION: void cblas_csyrk ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE Trans, int N, int K,
-                 void* alpha, void* A, int lda,
-                 void* beta, void* C, int ldc ) ;
-FUNCTION: void cblas_csyr2k ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                  CBLAS_TRANSPOSE Trans, int N, int K,
-                  void* alpha, void* A, int lda,
-                  void* B, int ldb, void* beta,
-                  void* C, int ldc ) ;
-FUNCTION: void cblas_ctrmm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
-                 CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
-                 CBLAS_DIAG Diag, int M, int N,
-                 void* alpha, void* A, int lda,
-                 void* B, int ldb ) ;
-FUNCTION: void cblas_ctrsm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
-                 CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
-                 CBLAS_DIAG Diag, int M, int N,
-                 void* alpha, void* A, int lda,
-                 void* B, int ldb ) ;
-
-FUNCTION: void cblas_zgemm ( CBLAS_ORDER Order, CBLAS_TRANSPOSE TransA,
-                 CBLAS_TRANSPOSE TransB, int M, int N,
-                 int K, void* alpha, void* A,
-                 int lda, void* B, int ldb,
-                 void* beta, void* C, int ldc ) ;
-FUNCTION: void cblas_zsymm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
-                 CBLAS_UPLO Uplo, int M, int N,
-                 void* alpha, void* A, int lda,
-                 void* B, int ldb, void* beta,
-                 void* C, int ldc ) ;
-FUNCTION: void cblas_zsyrk ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE Trans, int N, int K,
-                 void* alpha, void* A, int lda,
-                 void* beta, void* C, int ldc ) ;
-FUNCTION: void cblas_zsyr2k ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                  CBLAS_TRANSPOSE Trans, int N, int K,
-                  void* alpha, void* A, int lda,
-                  void* B, int ldb, void* beta,
-                  void* C, int ldc ) ;
-FUNCTION: void cblas_ztrmm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
-                 CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
-                 CBLAS_DIAG Diag, int M, int N,
-                 void* alpha, void* A, int lda,
-                 void* B, int ldb ) ;
-FUNCTION: void cblas_ztrsm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
-                 CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
-                 CBLAS_DIAG Diag, int M, int N,
-                 void* alpha, void* A, int lda,
-                 void* B, int ldb ) ;
-
-FUNCTION: void cblas_chemm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
-                 CBLAS_UPLO Uplo, int M, int N,
-                 void* alpha, void* A, int lda,
-                 void* B, int ldb, void* beta,
-                 void* C, int ldc ) ;
-FUNCTION: void cblas_cherk ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE Trans, int N, int K,
-                 float alpha, void* A, int lda,
-                 float beta, void* C, int ldc ) ;
-FUNCTION: void cblas_cher2k ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                  CBLAS_TRANSPOSE Trans, int N, int K,
-                  void* alpha, void* A, int lda,
-                  void* B, int ldb, float beta,
-                  void* C, int ldc ) ;
-FUNCTION: void cblas_zhemm ( CBLAS_ORDER Order, CBLAS_SIDE Side,
-                 CBLAS_UPLO Uplo, int M, int N,
-                 void* alpha, void* A, int lda,
-                 void* B, int ldb, void* beta,
-                 void* C, int ldc ) ;
-FUNCTION: void cblas_zherk ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                 CBLAS_TRANSPOSE Trans, int N, int K,
-                 double alpha, void* A, int lda,
-                 double beta, void* C, int ldc ) ;
-FUNCTION: void cblas_zher2k ( CBLAS_ORDER Order, CBLAS_UPLO Uplo,
-                  CBLAS_TRANSPOSE Trans, int N, int K,
-                  void* alpha, void* A, int lda,
-                  void* B, int ldb, double beta,
-                  void* C, int ldc ) ;
-
diff --git a/extra/math/blas/cblas/summary.txt b/extra/math/blas/cblas/summary.txt
deleted file mode 100644 (file)
index c72e78e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Low-level bindings to the C Basic Linear Algebra Subroutines (BLAS) library
diff --git a/extra/math/blas/cblas/tags.txt b/extra/math/blas/cblas/tags.txt
deleted file mode 100644 (file)
index 5118958..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-math
-bindings
-unportable
diff --git a/extra/math/blas/matrices/authors.txt b/extra/math/blas/matrices/authors.txt
deleted file mode 100644 (file)
index f13c9c1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Joe Groff
diff --git a/extra/math/blas/matrices/matrices-docs.factor b/extra/math/blas/matrices/matrices-docs.factor
deleted file mode 100644 (file)
index 01e0997..0000000
+++ /dev/null
@@ -1,245 +0,0 @@
-USING: alien byte-arrays help.markup help.syntax math math.blas.vectors sequences strings ;
-IN: math.blas.matrices
-
-ARTICLE: "math.blas-summary" "Basic Linear Algebra Subroutines (BLAS) interface"
-"Factor provides an interface to high-performance vector and matrix math routines available in the system's BLAS library. A set of specialized types are provided for handling packed, unboxed vector data:"
-{ $subsection "math.blas-types" }
-"Scalar-vector and vector-vector operations are available in the " { $vocab-link "math.blas.vectors" } " vocabulary:"
-{ $subsection "math.blas.vectors" }
-"Vector-matrix and matrix-matrix operations are available in the " { $vocab-link "math.blas.matrices" } " vocabulary:"
-{ $subsection "math.blas.matrices" }
-"The low-level BLAS C interface can be accessed directly through the " { $vocab-link "math.blas.cblas" } " vocabulary." ;
-
-ARTICLE: "math.blas-types" "BLAS interface types"
-"BLAS vectors come in single- and double-precision, real and complex flavors:"
-{ $subsection float-blas-vector }
-{ $subsection double-blas-vector }
-{ $subsection float-complex-blas-vector }
-{ $subsection double-complex-blas-vector }
-"These vector types all follow the " { $link sequence } " protocol. In addition, there are corresponding types for matrix data:"
-{ $subsection float-blas-matrix }
-{ $subsection double-blas-matrix }
-{ $subsection float-complex-blas-matrix }
-{ $subsection double-complex-blas-matrix } 
-"Syntax words are provided for constructing literal vectors and matrices in the " { $vocab-link "math.blas.syntax" } " vocabulary:"
-{ $subsection "math.blas.syntax" }
-"There are BOA constructors for all vector and matrix types, which provide the most flexibility in specifying memory layout:"
-{ $subsection <float-blas-vector> }
-{ $subsection <double-blas-vector> }
-{ $subsection <float-complex-blas-vector> }
-{ $subsection <double-complex-blas-vector> }
-{ $subsection <float-blas-matrix> }
-{ $subsection <double-blas-matrix> }
-{ $subsection <float-complex-blas-matrix> }
-{ $subsection <double-complex-blas-matrix> }
-"For the simple case of creating a dense, zero-filled vector or matrix, simple empty object constructors are provided:"
-{ $subsection <empty-vector> }
-{ $subsection <empty-matrix> }
-"BLAS vectors and matrices can also be constructed from other Factor sequences:"
-{ $subsection >float-blas-vector }
-{ $subsection >double-blas-vector }
-{ $subsection >float-complex-blas-vector }
-{ $subsection >double-complex-blas-vector }
-{ $subsection >float-blas-matrix }
-{ $subsection >double-blas-matrix }
-{ $subsection >float-complex-blas-matrix }
-{ $subsection >double-complex-blas-matrix } ;
-
-ARTICLE: "math.blas.matrices" "BLAS interface matrix operations"
-"Transposing and slicing matrices:"
-{ $subsection Mtranspose }
-{ $subsection Mrows }
-{ $subsection Mcols }
-{ $subsection Msub }
-"Matrix-vector products:"
-{ $subsection n*M.V+n*V! }
-{ $subsection n*M.V+n*V }
-{ $subsection n*M.V }
-{ $subsection M.V }
-"Vector outer products:"
-{ $subsection n*V(*)V+M! }
-{ $subsection n*V(*)Vconj+M! }
-{ $subsection n*V(*)V+M }
-{ $subsection n*V(*)Vconj+M }
-{ $subsection n*V(*)V }
-{ $subsection n*V(*)Vconj }
-{ $subsection V(*) }
-{ $subsection V(*)conj }
-"Matrix products:"
-{ $subsection n*M.M+n*M! }
-{ $subsection n*M.M+n*M }
-{ $subsection n*M.M }
-{ $subsection M. }
-"Scalar-matrix products:"
-{ $subsection n*M! }
-{ $subsection n*M }
-{ $subsection M*n }
-{ $subsection M/n } ;
-
-ABOUT: "math.blas.matrices"
-
-HELP: blas-matrix-base
-{ $class-description "The base class for all BLAS matrix types. Objects of this type should not be created directly; instead, instantiate one of the typed subclasses:"
-{ $list
-    { { $link float-blas-matrix } }
-    { { $link double-blas-matrix } }
-    { { $link float-complex-blas-matrix } }
-    { { $link double-complex-blas-matrix } }
-}
-"All of these subclasses share the same tuple layout:"
-{ $list
-    { { $snippet "underlying" } " contains an alien pointer referencing or byte-array containing a packed, column-major array of float, double, float complex, or double complex values;" }
-    { { $snippet "ld" } " indicates the distance, in elements, between matrix columns;" }
-    { { $snippet "rows" } " and " { $snippet "cols" } " indicate the number of significant rows and columns in the matrix;" }
-    { "and " { $snippet "transpose" } ", if set to a true value, indicates that the matrix should be treated as transposed relative to its in-memory representation." }
-} } ;
-
-{ blas-vector-base blas-matrix-base } related-words
-
-HELP: float-blas-matrix
-{ $class-description "A matrix of single-precision floating-point values. For details on the tuple layout, see " { $link blas-matrix-base } "." } ;
-HELP: double-blas-matrix
-{ $class-description "A matrix of double-precision floating-point values. For details on the tuple layout, see " { $link blas-matrix-base } "." } ;
-HELP: float-complex-blas-matrix
-{ $class-description "A matrix of single-precision floating-point complex values. Complex values are stored in memory as two consecutive float values, real part then imaginary part. For details on the tuple layout, see " { $link blas-matrix-base } "." } ;
-HELP: double-complex-blas-matrix
-{ $class-description "A matrix of double-precision floating-point complex values. Complex values are stored in memory as two consecutive float values, real part then imaginary part. For details on the tuple layout, see " { $link blas-matrix-base } "." } ;
-
-{
-    float-blas-matrix double-blas-matrix float-complex-blas-matrix double-complex-blas-matrix
-    float-blas-vector double-blas-vector float-complex-blas-vector double-complex-blas-vector
-} related-words
-
-HELP: Mwidth
-{ $values { "matrix" blas-matrix-base } { "width" integer } }
-{ $description "Returns the number of columns in " { $snippet "matrix" } "." } ;
-
-HELP: Mheight
-{ $values { "matrix" blas-matrix-base } { "height" integer } }
-{ $description "Returns the number of rows in " { $snippet "matrix" } "." } ;
-
-{ Mwidth Mheight } related-words
-
-HELP: n*M.V+n*V!
-{ $values { "alpha" number } { "A" blas-matrix-base } { "x" blas-vector-base } { "beta" number } { "y" blas-vector-base } { "y=alpha*A.x+b*y" blas-vector-base } }
-{ $description "Calculate the matrix-vector product " { $snippet "αAx + Î²y" } ", and overwrite the current contents of " { $snippet "y" } " with the result. The width of " { $snippet "A" } " must match the length of " { $snippet "x" } ", and the height must match the length of " { $snippet "y" } ". Corresponds to the xGEMV routines in BLAS." }
-{ $side-effects "y" } ;
-
-HELP: n*V(*)V+M!
-{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "A" blas-matrix-base } { "A=alpha*x(*)y+A" blas-matrix-base } }
-{ $description "Calculate the outer product " { $snippet "αx⊗y + A" } " and overwrite the current contents of A with the result. The width of " { $snippet "A" } " must match the length of " { $snippet "y" } ", and its height must match the length of " { $snippet "x" } ". Corresponds to the xGER and xGERU routines in BLAS." }
-{ $side-effects "A" } ;
-
-HELP: n*V(*)Vconj+M!
-{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "A" blas-matrix-base } { "A=alpha*x(*)yconj+A" blas-matrix-base } }
-{ $description "Calculate the conjugate outer product " { $snippet "αx⊗yÌ… + A" } " and overwrite the current contents of A with the result. The width of " { $snippet "A" } " must match the length of " { $snippet "y" } ", and its height must match the length of " { $snippet "x" } ". Corresponds to the xGERC routines in BLAS." }
-{ $side-effects "A" } ;
-
-HELP: n*M.M+n*M!
-{ $values { "alpha" number } { "A" blas-matrix-base } { "B" blas-matrix-base } { "beta" number } { "C" blas-matrix-base } { "C=alpha*A.B+beta*C" blas-matrix-base } }
-{ $description "Calculate the matrix product " { $snippet "αAB + Î²C" } " and overwrite the current contents of C with the result. The width of " { $snippet "A" } " and the height of " { $snippet "B" } " must match, as must the heights of " { $snippet "A" } " and " { $snippet "C" } ", and the widths of " { $snippet "B" } " and " { $snippet "C" } ". Corresponds to the xGEMM routines in BLAS." }
-{ $side-effects "C" } ;
-
-HELP: <empty-matrix>
-{ $values { "rows" integer } { "cols" integer } { "exemplar" blas-vector-base blas-matrix-base } { "matrix" blas-matrix-base } }
-{ $description "Create a matrix of all zeros with the given dimensions and the same element type as " { $snippet "exemplar" } "." } ;
-
-{ <zero-vector> <empty-vector> <empty-matrix> } related-words
-
-HELP: n*M.V+n*V
-{ $values { "alpha" number } { "A" blas-matrix-base } { "x" blas-vector-base } { "beta" number } { "y" blas-vector-base } { "alpha*A.x+b*y" blas-vector-base } }
-{ $description "Calculate the matrix-vector product " { $snippet "αAx + Î²y" } " and return a freshly allocated vector containing the result. The width of " { $snippet "A" } " must match the length of " { $snippet "x" } ", and the height must match the length of " { $snippet "y" } ". The returned vector will have the same length as " { $snippet "y" } ". Corresponds to the xGEMV routines in BLAS." } ;
-
-HELP: n*V(*)V+M
-{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "A" blas-matrix-base } { "alpha*x(*)y+A" blas-matrix-base } }
-{ $description "Calculate the outer product " { $snippet "αx⊗y + A" } " and return a freshly allocated matrix containing the result. The width of " { $snippet "A" } " must match the length of " { $snippet "y" } ", and its height must match the length of " { $snippet "x" } ". The returned matrix will have the same dimensions as " { $snippet "A" } ". Corresponds to the xGER and xGERU routines in BLAS." } ;
-
-HELP: n*V(*)Vconj+M
-{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "A" blas-matrix-base } { "alpha*x(*)yconj+A" blas-matrix-base } }
-{ $description "Calculate the conjugate outer product " { $snippet "αx⊗yÌ… + A" } " and return a freshly allocated matrix containing the result. The width of " { $snippet "A" } " must match the length of " { $snippet "y" } ", and its height must match the length of " { $snippet "x" } ". The returned matrix will have the same dimensions as " { $snippet "A" } ". Corresponds to the xGERC routines in BLAS." } ;
-
-HELP: n*M.M+n*M
-{ $values { "alpha" number } { "A" blas-matrix-base } { "B" blas-matrix-base } { "beta" number } { "C" blas-matrix-base } { "alpha*A.B+beta*C" blas-matrix-base } }
-{ $description "Calculate the matrix product " { $snippet "αAB + Î²C" } " and overwrite the current contents of C with the result. The width of " { $snippet "A" } " and the height of " { $snippet "B" } " must match, as must the heights of " { $snippet "A" } " and " { $snippet "C" } ", and the widths of " { $snippet "B" } " and " { $snippet "C" } ". Corresponds to the xGEMM routines in BLAS." } ;
-
-HELP: n*M.V
-{ $values { "alpha" number } { "A" blas-matrix-base } { "x" blas-vector-base } { "alpha*A.x" blas-vector-base } }
-{ $description "Calculate the matrix-vector product " { $snippet "αAx" } " and return a freshly allocated vector containing the result. The width of " { $snippet "A" } " must match the length of " { $snippet "x" } ". The length of the returned vector will match the height of " { $snippet "A" } ". Corresponds to the xGEMV routines in BLAS." } ;
-
-HELP: M.V
-{ $values { "A" blas-matrix-base } { "x" blas-vector-base } { "A.x" blas-vector-base } }
-{ $description "Calculate the matrix-vector product " { $snippet "Ax" } " and return a freshly allocated vector containing the result. The width of " { $snippet "A" } " must match the length of " { $snippet "x" } ". The length of the returned vector will match the height of " { $snippet "A" } ". Corresponds to the xGEMV routines in BLAS." } ;
-
-{ n*M.V+n*V! n*M.V+n*V n*M.V M.V } related-words
-
-HELP: n*V(*)V
-{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "alpha*x(*)y" blas-matrix-base } }
-{ $description "Calculate the outer product " { $snippet "αx⊗y" } " and return a freshly allocated matrix containing the result. The returned matrix's height will match the length of " { $snippet "x" } ", and its width will match the length of " { $snippet "y" } ". Corresponds to the xGER and xGERU routines in BLAS." } ;
-
-HELP: n*V(*)Vconj
-{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "alpha*x(*)yconj" blas-matrix-base } }
-{ $description "Calculate the outer product " { $snippet "αx⊗yÌ…" } " and return a freshly allocated matrix containing the result. The returned matrix's height will match the length of " { $snippet "x" } ", and its width will match the length of " { $snippet "y" } ". Corresponds to the xGERC routines in BLAS." } ;
-
-HELP: V(*)
-{ $values { "x" blas-vector-base } { "y" blas-vector-base } { "x(*)y" blas-matrix-base } }
-{ $description "Calculate the outer product " { $snippet "x⊗y" } " and return a freshly allocated matrix containing the result. The returned matrix's height will match the length of " { $snippet "x" } ", and its width will match the length of " { $snippet "y" } ". Corresponds to the xGER and xGERU routines in BLAS." } ;
-
-HELP: V(*)conj
-{ $values { "x" blas-vector-base } { "y" blas-vector-base } { "x(*)yconj" blas-matrix-base } }
-{ $description "Calculate the conjugate outer product " { $snippet "x⊗yÌ…" } " and return a freshly allocated matrix containing the result. The returned matrix's height will match the length of " { $snippet "x" } ", and its width will match the length of " { $snippet "y" } ". Corresponds to the xGERC routines in BLAS." } ;
-
-{ n*V(*)V+M! n*V(*)Vconj+M! n*V(*)V+M n*V(*)Vconj+M n*V(*)V n*V(*)Vconj V(*) V(*)conj V. V.conj } related-words
-
-HELP: n*M.M
-{ $values { "alpha" number } { "A" blas-matrix-base } { "B" blas-matrix-base } { "alpha*A.B" blas-matrix-base } }
-{ $description "Calculate the matrix product " { $snippet "αAB" } " and return a freshly allocated matrix containing the result. The width of " { $snippet "A" } " and the height of " { $snippet "B" } " must match. The returned matrix's height will be the same as " { $snippet "A" } "'s, and its width will match " { $snippet "B" } "'s. Corresponds to the xGEMM routines in BLAS." } ;
-
-HELP: M.
-{ $values { "A" blas-matrix-base } { "B" blas-matrix-base } { "A.B" blas-matrix-base } }
-{ $description "Calculate the matrix product " { $snippet "AB" } " and return a freshly allocated matrix containing the result. The width of " { $snippet "A" } " and the height of " { $snippet "B" } " must match. The returned matrix's height will be the same as " { $snippet "A" } "'s, and its width will match " { $snippet "B" } "'s. Corresponds to the xGEMM routines in BLAS." } ;
-
-{ n*M.M+n*M! n*M.M+n*M n*M.M M. } related-words
-
-HELP: Msub
-{ $values { "matrix" blas-matrix-base } { "row" integer } { "col" integer } { "height" integer } { "width" integer } { "sub" blas-matrix-base } }
-{ $description "Select a rectangular submatrix of " { $snippet "matrix" } " with the given dimensions. The returned submatrix will share the parent matrix's storage." } ;
-
-HELP: Mrows
-{ $values { "A" blas-matrix-base } { "rows" sequence } }
-{ $description "Return a sequence of BLAS vectors representing the rows of " { $snippet "matrix" } ". Each vector will share the parent matrix's storage." } ;
-
-HELP: Mcols
-{ $values { "A" blas-matrix-base } { "cols" sequence } }
-{ $description "Return a sequence of BLAS vectors representing the columns of " { $snippet "matrix" } ". Each vector will share the parent matrix's storage." } ;
-
-HELP: n*M!
-{ $values { "n" number } { "A" blas-matrix-base } { "A=n*A" blas-matrix-base } }
-{ $description "Calculate the scalar-matrix product " { $snippet "nA" } " and overwrite the current contents of A with the result." }
-{ $side-effects "A" } ;
-
-HELP: n*M
-{ $values { "n" number } { "A" blas-matrix-base } { "n*A" blas-matrix-base } }
-{ $description "Calculate the scalar-matrix product " { $snippet "nA" } " and return a freshly allocated matrix with the same dimensions as " { $snippet "A" } " containing the result." } ;
-
-HELP: M*n
-{ $values { "A" blas-matrix-base } { "n" number } { "A*n" blas-matrix-base } }
-{ $description "Calculate the scalar-matrix product " { $snippet "nA" } " and return a freshly allocated matrix with the same dimensions as " { $snippet "A" } " containing the result." } ;
-
-HELP: M/n
-{ $values { "A" blas-matrix-base } { "n" number } { "A/n" blas-matrix-base } }
-{ $description "Calculate the scalar-matrix product " { $snippet "(1/n)A" } " and return a freshly allocated matrix with the same dimensions as " { $snippet "A" } " containing the result." } ;
-
-{ n*M! n*M M*n M/n } related-words
-
-HELP: Mtranspose
-{ $values { "matrix" blas-matrix-base } { "matrix^T" blas-matrix-base } }
-{ $description "Returns the transpose of " { $snippet "matrix" } ". The returned matrix shares storage with the original matrix." } ;
-
-HELP: element-type
-{ $values { "v" blas-vector-base blas-matrix-base } { "type" string } }
-{ $description "Return the C type of the elements in the given BLAS vector or matrix." } ;
-
-HELP: <empty-vector>
-{ $values { "length" "The length of the new vector" } { "exemplar" blas-vector-base blas-matrix-base } { "vector" blas-vector-base } }
-{ $description "Return a vector of zeros with the given " { $snippet "length" } " and the same element type as " { $snippet "v" } "." } ;
-
diff --git a/extra/math/blas/matrices/matrices-tests.factor b/extra/math/blas/matrices/matrices-tests.factor
deleted file mode 100644 (file)
index dabf3c3..0000000
+++ /dev/null
@@ -1,710 +0,0 @@
-USING: kernel math.blas.matrices math.blas.vectors math.blas.syntax
-sequences tools.test ;
-IN: math.blas.matrices.tests
-
-! clone
-
-[ smatrix{
-    { 1.0 2.0 3.0 }
-    { 4.0 5.0 6.0 }
-    { 7.0 8.0 9.0 }
-} ] [
-    smatrix{
-        { 1.0 2.0 3.0 }
-        { 4.0 5.0 6.0 }
-        { 7.0 8.0 9.0 }
-    } clone
-] unit-test
-[ f ] [
-    smatrix{
-        { 1.0 2.0 3.0 }
-        { 4.0 5.0 6.0 }
-        { 7.0 8.0 9.0 }
-    } dup clone eq?
-] unit-test
-
-[ dmatrix{
-    { 1.0 2.0 3.0 }
-    { 4.0 5.0 6.0 }
-    { 7.0 8.0 9.0 }
-} ] [
-    dmatrix{
-        { 1.0 2.0 3.0 }
-        { 4.0 5.0 6.0 }
-        { 7.0 8.0 9.0 }
-    } clone
-] unit-test
-[ f ] [
-    dmatrix{
-        { 1.0 2.0 3.0 }
-        { 4.0 5.0 6.0 }
-        { 7.0 8.0 9.0 }
-    } dup clone eq?
-] unit-test
-
-[ cmatrix{
-    { C{ 1.0 1.0 } 2.0          3.0          }
-    { 4.0          C{ 5.0 2.0 } 6.0          }
-    { 7.0          8.0          C{ 9.0 3.0 } }
-} ] [
-    cmatrix{
-        { C{ 1.0 1.0 } 2.0          3.0          }
-        { 4.0          C{ 5.0 2.0 } 6.0          }
-        { 7.0          8.0          C{ 9.0 3.0 } }
-    } clone
-] unit-test
-[ f ] [
-    cmatrix{
-        { C{ 1.0 1.0 } 2.0          3.0          }
-        { 4.0          C{ 5.0 2.0 } 6.0          }
-        { 7.0          8.0          C{ 9.0 3.0 } }
-    } dup clone eq?
-] unit-test
-
-[ zmatrix{
-    { C{ 1.0 1.0 } 2.0          3.0          }
-    { 4.0          C{ 5.0 2.0 } 6.0          }
-    { 7.0          8.0          C{ 9.0 3.0 } }
-} ] [
-    zmatrix{
-        { C{ 1.0 1.0 } 2.0          3.0          }
-        { 4.0          C{ 5.0 2.0 } 6.0          }
-        { 7.0          8.0          C{ 9.0 3.0 } }
-    } clone
-] unit-test
-[ f ] [
-    zmatrix{
-        { C{ 1.0 1.0 } 2.0          3.0          }
-        { 4.0          C{ 5.0 2.0 } 6.0          }
-        { 7.0          8.0          C{ 9.0 3.0 } }
-    } dup clone eq?
-] unit-test
-
-! M.V
-
-[ svector{ 3.0 1.0 6.0 } ] [
-    smatrix{
-        {  0.0 1.0 0.0 1.0 }
-        { -1.0 0.0 0.0 2.0 }
-        {  0.0 0.0 1.0 3.0 }
-    }
-    svector{ 1.0 2.0 3.0 1.0 }
-    M.V
-] unit-test 
-[ svector{ -2.0 1.0 3.0 14.0 } ] [
-    smatrix{
-        {  0.0 1.0 0.0 1.0 }
-        { -1.0 0.0 0.0 2.0 }
-        {  0.0 0.0 1.0 3.0 }
-    } Mtranspose
-    svector{ 1.0 2.0 3.0 }
-    M.V
-] unit-test 
-
-[ dvector{ 3.0 1.0 6.0 } ] [
-    dmatrix{
-        {  0.0 1.0 0.0 1.0 }
-        { -1.0 0.0 0.0 2.0 }
-        {  0.0 0.0 1.0 3.0 }
-    }
-    dvector{ 1.0 2.0 3.0 1.0 }
-    M.V
-] unit-test 
-[ dvector{ -2.0 1.0 3.0 14.0 } ] [
-    dmatrix{
-        {  0.0 1.0 0.0 1.0 }
-        { -1.0 0.0 0.0 2.0 }
-        {  0.0 0.0 1.0 3.0 }
-    } Mtranspose
-    dvector{ 1.0 2.0 3.0 }
-    M.V
-] unit-test 
-
-[ cvector{ 3.0 C{ 1.0 2.0 } 6.0 } ] [
-    cmatrix{
-        {  0.0 1.0          0.0 1.0 }
-        { -1.0 C{ 0.0 1.0 } 0.0 2.0 }
-        {  0.0 0.0          1.0 3.0 }
-    }
-    cvector{ 1.0 2.0 3.0 1.0 }
-    M.V
-] unit-test 
-[ cvector{ -2.0 C{ 1.0 2.0 } 3.0 14.0 } ] [
-    cmatrix{
-        {  0.0 1.0          0.0 1.0 }
-        { -1.0 C{ 0.0 1.0 } 0.0 2.0 }
-        {  0.0 0.0          1.0 3.0 }
-    } Mtranspose
-    cvector{ 1.0 2.0 3.0 }
-    M.V
-] unit-test 
-
-[ zvector{ 3.0 C{ 1.0 2.0 } 6.0 } ] [
-    zmatrix{
-        {  0.0 1.0          0.0 1.0 }
-        { -1.0 C{ 0.0 1.0 } 0.0 2.0 }
-        {  0.0 0.0          1.0 3.0 }
-    }
-    zvector{ 1.0 2.0 3.0 1.0 }
-    M.V
-] unit-test
-[ zvector{ -2.0 C{ 1.0 2.0 } 3.0 14.0 } ] [
-    zmatrix{
-        {  0.0 1.0          0.0 1.0 }
-        { -1.0 C{ 0.0 1.0 } 0.0 2.0 }
-        {  0.0 0.0          1.0 3.0 }
-    } Mtranspose
-    zvector{ 1.0 2.0 3.0 }
-    M.V
-] unit-test 
-
-! V(*)
-
-[ smatrix{
-    { 1.0 2.0 3.0  4.0 }
-    { 2.0 4.0 6.0  8.0 }
-    { 3.0 6.0 9.0 12.0 }
-} ] [
-    svector{ 1.0 2.0 3.0 } svector{ 1.0 2.0 3.0 4.0 } V(*)
-] unit-test
-
-[ dmatrix{
-    { 1.0 2.0 3.0  4.0 }
-    { 2.0 4.0 6.0  8.0 }
-    { 3.0 6.0 9.0 12.0 }
-} ] [
-    dvector{ 1.0 2.0 3.0 } dvector{ 1.0 2.0 3.0 4.0 } V(*)
-] unit-test
-
-[ cmatrix{
-    { 1.0          2.0          C{ 3.0 -3.0 } 4.0            }
-    { 2.0          4.0          C{ 6.0 -6.0 } 8.0            }
-    { C{ 3.0 3.0 } C{ 6.0 6.0 } 18.0          C{ 12.0 12.0 } }
-} ] [
-    cvector{ 1.0 2.0 C{ 3.0 3.0 } } cvector{ 1.0 2.0 C{ 3.0 -3.0 } 4.0 } V(*)
-] unit-test
-
-[ zmatrix{
-    { 1.0          2.0          C{ 3.0 -3.0 } 4.0            }
-    { 2.0          4.0          C{ 6.0 -6.0 } 8.0            }
-    { C{ 3.0 3.0 } C{ 6.0 6.0 } 18.0          C{ 12.0 12.0 } }
-} ] [
-    zvector{ 1.0 2.0 C{ 3.0 3.0 } } zvector{ 1.0 2.0 C{ 3.0 -3.0 } 4.0 } V(*)
-] unit-test
-
-! M.
-
-[ smatrix{
-    { 1.0 0.0  0.0 4.0  0.0 }
-    { 0.0 0.0 -3.0 0.0  0.0 }
-    { 0.0 4.0  0.0 0.0 10.0 }
-    { 0.0 0.0  0.0 0.0  0.0 }
-} ] [
-    smatrix{
-        { 1.0 0.0  0.0 }
-        { 0.0 0.0 -1.0 }
-        { 0.0 2.0  0.0 }
-        { 0.0 0.0  0.0 }
-    } smatrix{
-        { 1.0 0.0 0.0 4.0 0.0 }
-        { 0.0 2.0 0.0 0.0 5.0 }
-        { 0.0 0.0 3.0 0.0 0.0 }
-    } M.
-] unit-test
-
-[ smatrix{
-    { 1.0  0.0  0.0 0.0 }
-    { 0.0  0.0  4.0 0.0 }
-    { 0.0 -3.0  0.0 0.0 }
-    { 4.0  0.0  0.0 0.0 }
-    { 0.0  0.0 10.0 0.0 }
-} ] [
-    smatrix{
-        { 1.0 0.0 0.0 4.0 0.0 }
-        { 0.0 2.0 0.0 0.0 5.0 }
-        { 0.0 0.0 3.0 0.0 0.0 }
-    } Mtranspose smatrix{
-        { 1.0 0.0  0.0 }
-        { 0.0 0.0 -1.0 }
-        { 0.0 2.0  0.0 }
-        { 0.0 0.0  0.0 }
-    } Mtranspose M.
-] unit-test
-
-[ dmatrix{
-    { 1.0 0.0  0.0 4.0  0.0 }
-    { 0.0 0.0 -3.0 0.0  0.0 }
-    { 0.0 4.0  0.0 0.0 10.0 }
-    { 0.0 0.0  0.0 0.0  0.0 }
-} ] [
-    dmatrix{
-        { 1.0 0.0  0.0 }
-        { 0.0 0.0 -1.0 }
-        { 0.0 2.0  0.0 }
-        { 0.0 0.0  0.0 }
-    } dmatrix{
-        { 1.0 0.0 0.0 4.0 0.0 }
-        { 0.0 2.0 0.0 0.0 5.0 }
-        { 0.0 0.0 3.0 0.0 0.0 }
-    } M.
-] unit-test
-
-[ dmatrix{
-    { 1.0  0.0  0.0 0.0 }
-    { 0.0  0.0  4.0 0.0 }
-    { 0.0 -3.0  0.0 0.0 }
-    { 4.0  0.0  0.0 0.0 }
-    { 0.0  0.0 10.0 0.0 }
-} ] [
-    dmatrix{
-        { 1.0 0.0 0.0 4.0 0.0 }
-        { 0.0 2.0 0.0 0.0 5.0 }
-        { 0.0 0.0 3.0 0.0 0.0 }
-    } Mtranspose dmatrix{
-        { 1.0 0.0  0.0 }
-        { 0.0 0.0 -1.0 }
-        { 0.0 2.0  0.0 }
-        { 0.0 0.0  0.0 }
-    } Mtranspose M.
-] unit-test
-
-[ cmatrix{
-    { 1.0 0.0            0.0 4.0  0.0 }
-    { 0.0 0.0           -3.0 0.0  0.0 }
-    { 0.0 C{ 4.0 -4.0 }  0.0 0.0 10.0 }
-    { 0.0 0.0            0.0 0.0  0.0 }
-} ] [
-    cmatrix{
-        { 1.0 0.0  0.0 }
-        { 0.0 0.0 -1.0 }
-        { 0.0 2.0  0.0 }
-        { 0.0 0.0  0.0 }
-    } cmatrix{
-        { 1.0 0.0           0.0 4.0 0.0 }
-        { 0.0 C{ 2.0 -2.0 } 0.0 0.0 5.0 }
-        { 0.0 0.0           3.0 0.0 0.0 }
-    } M.
-] unit-test
-
-[ cmatrix{
-    { 1.0  0.0  0.0          0.0 }
-    { 0.0  0.0 C{ 4.0 -4.0 } 0.0 }
-    { 0.0 -3.0  0.0          0.0 }
-    { 4.0  0.0  0.0          0.0 }
-    { 0.0  0.0 10.0          0.0 }
-} ] [
-    cmatrix{
-        { 1.0 0.0           0.0 4.0 0.0 }
-        { 0.0 C{ 2.0 -2.0 } 0.0 0.0 5.0 }
-        { 0.0 0.0           3.0 0.0 0.0 }
-    } Mtranspose cmatrix{
-        { 1.0 0.0  0.0 }
-        { 0.0 0.0 -1.0 }
-        { 0.0 2.0  0.0 }
-        { 0.0 0.0  0.0 }
-    } Mtranspose M.
-] unit-test
-
-[ zmatrix{
-    { 1.0 0.0            0.0 4.0  0.0 }
-    { 0.0 0.0           -3.0 0.0  0.0 }
-    { 0.0 C{ 4.0 -4.0 }  0.0 0.0 10.0 }
-    { 0.0 0.0            0.0 0.0  0.0 }
-} ] [
-    zmatrix{
-        { 1.0 0.0  0.0 }
-        { 0.0 0.0 -1.0 }
-        { 0.0 2.0  0.0 }
-        { 0.0 0.0  0.0 }
-    } zmatrix{
-        { 1.0 0.0           0.0 4.0 0.0 }
-        { 0.0 C{ 2.0 -2.0 } 0.0 0.0 5.0 }
-        { 0.0 0.0           3.0 0.0 0.0 }
-    } M.
-] unit-test
-
-[ zmatrix{
-    { 1.0  0.0  0.0          0.0 }
-    { 0.0  0.0 C{ 4.0 -4.0 } 0.0 }
-    { 0.0 -3.0  0.0          0.0 }
-    { 4.0  0.0  0.0          0.0 }
-    { 0.0  0.0 10.0          0.0 }
-} ] [
-    zmatrix{
-        { 1.0 0.0           0.0 4.0 0.0 }
-        { 0.0 C{ 2.0 -2.0 } 0.0 0.0 5.0 }
-        { 0.0 0.0           3.0 0.0 0.0 }
-    } Mtranspose zmatrix{
-        { 1.0 0.0  0.0 }
-        { 0.0 0.0 -1.0 }
-        { 0.0 2.0  0.0 }
-        { 0.0 0.0  0.0 }
-    } Mtranspose M.
-] unit-test
-
-! n*M
-
-[ smatrix{
-    { 2.0 0.0 }
-    { 0.0 2.0 }
-} ] [
-    2.0 smatrix{
-        { 1.0 0.0 }
-        { 0.0 1.0 }
-    } n*M
-] unit-test
-
-[ dmatrix{
-    { 2.0 0.0 }
-    { 0.0 2.0 }
-} ] [
-    2.0 dmatrix{
-        { 1.0 0.0 }
-        { 0.0 1.0 }
-    } n*M
-] unit-test
-
-[ cmatrix{
-    { C{ 2.0 1.0 } 0.0           }
-    { 0.0          C{ -1.0 2.0 } }
-} ] [
-    C{ 2.0 1.0 } cmatrix{
-        { 1.0 0.0          }
-        { 0.0 C{ 0.0 1.0 } }
-    } n*M
-] unit-test
-
-[ zmatrix{
-    { C{ 2.0 1.0 } 0.0           }
-    { 0.0          C{ -1.0 2.0 } }
-} ] [
-    C{ 2.0 1.0 } zmatrix{
-        { 1.0 0.0          }
-        { 0.0 C{ 0.0 1.0 } }
-    } n*M
-] unit-test
-
-! Mrows, Mcols
-
-[ svector{ 3.0 3.0 3.0 } ] [
-    2 smatrix{
-        { 1.0 2.0 3.0 4.0 }
-        { 2.0 2.0 3.0 4.0 }
-        { 3.0 2.0 3.0 4.0 }
-    } Mcols nth
-] unit-test
-[ svector{ 3.0 2.0 3.0 4.0 } ] [
-    2 smatrix{
-        { 1.0 2.0 3.0 4.0 }
-        { 2.0 2.0 3.0 4.0 }
-        { 3.0 2.0 3.0 4.0 }
-    } Mrows nth
-] unit-test
-[ 3 ] [
-    smatrix{
-        { 1.0 2.0 3.0 4.0 }
-        { 2.0 2.0 3.0 4.0 }
-        { 3.0 2.0 3.0 4.0 }
-    } Mrows length
-] unit-test
-[ 4 ] [
-    smatrix{
-        { 1.0 2.0 3.0 4.0 }
-        { 2.0 2.0 3.0 4.0 }
-        { 3.0 2.0 3.0 4.0 }
-    } Mcols length
-] unit-test
-[ svector{ 3.0 3.0 3.0 } ] [
-    2 smatrix{
-        { 1.0 2.0 3.0 4.0 }
-        { 2.0 2.0 3.0 4.0 }
-        { 3.0 2.0 3.0 4.0 }
-    } Mtranspose Mrows nth
-] unit-test
-[ svector{ 3.0 2.0 3.0 4.0 } ] [
-    2 smatrix{
-        { 1.0 2.0 3.0 4.0 }
-        { 2.0 2.0 3.0 4.0 }
-        { 3.0 2.0 3.0 4.0 }
-    } Mtranspose Mcols nth
-] unit-test
-[ 3 ] [
-    smatrix{
-        { 1.0 2.0 3.0 4.0 }
-        { 2.0 2.0 3.0 4.0 }
-        { 3.0 2.0 3.0 4.0 }
-    } Mtranspose Mcols length
-] unit-test
-[ 4 ] [
-    smatrix{
-        { 1.0 2.0 3.0 4.0 }
-        { 2.0 2.0 3.0 4.0 }
-        { 3.0 2.0 3.0 4.0 }
-    } Mtranspose Mrows length
-] unit-test
-
-[ dvector{ 3.0 3.0 3.0 } ] [
-    2 dmatrix{
-        { 1.0 2.0 3.0 4.0 }
-        { 2.0 2.0 3.0 4.0 }
-        { 3.0 2.0 3.0 4.0 }
-    } Mcols nth
-] unit-test
-[ dvector{ 3.0 2.0 3.0 4.0 } ] [
-    2 dmatrix{
-        { 1.0 2.0 3.0 4.0 }
-        { 2.0 2.0 3.0 4.0 }
-        { 3.0 2.0 3.0 4.0 }
-    } Mrows nth
-] unit-test
-[ 3 ] [
-    dmatrix{
-        { 1.0 2.0 3.0 4.0 }
-        { 2.0 2.0 3.0 4.0 }
-        { 3.0 2.0 3.0 4.0 }
-    } Mrows length
-] unit-test
-[ 4 ] [
-    dmatrix{
-        { 1.0 2.0 3.0 4.0 }
-        { 2.0 2.0 3.0 4.0 }
-        { 3.0 2.0 3.0 4.0 }
-    } Mcols length
-] unit-test
-[ dvector{ 3.0 3.0 3.0 } ] [
-    2 dmatrix{
-        { 1.0 2.0 3.0 4.0 }
-        { 2.0 2.0 3.0 4.0 }
-        { 3.0 2.0 3.0 4.0 }
-    } Mtranspose Mrows nth
-] unit-test
-[ dvector{ 3.0 2.0 3.0 4.0 } ] [
-    2 dmatrix{
-        { 1.0 2.0 3.0 4.0 }
-        { 2.0 2.0 3.0 4.0 }
-        { 3.0 2.0 3.0 4.0 }
-    } Mtranspose Mcols nth
-] unit-test
-[ 3 ] [
-    dmatrix{
-        { 1.0 2.0 3.0 4.0 }
-        { 2.0 2.0 3.0 4.0 }
-        { 3.0 2.0 3.0 4.0 }
-    } Mtranspose Mcols length
-] unit-test
-[ 4 ] [
-    dmatrix{
-        { 1.0 2.0 3.0 4.0 }
-        { 2.0 2.0 3.0 4.0 }
-        { 3.0 2.0 3.0 4.0 }
-    } Mtranspose Mrows length
-] unit-test
-
-[ cvector{ C{ 3.0 1.0 } C{ 3.0 2.0 } C{ 3.0 3.0 } } ] [
-    2 cmatrix{
-        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
-        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
-        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
-    } Mcols nth
-] unit-test
-[ cvector{ C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } } ] [
-    2 cmatrix{
-        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
-        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
-        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
-    } Mrows nth
-] unit-test
-[ 3 ] [
-    cmatrix{
-        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
-        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
-        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
-    } Mrows length
-] unit-test
-[ 4 ] [
-    cmatrix{
-        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
-        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
-        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
-    } Mcols length
-] unit-test
-[ cvector{ C{ 3.0 1.0 } C{ 3.0 2.0 } C{ 3.0 3.0 } } ] [
-    2 cmatrix{
-        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
-        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
-        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
-    } Mtranspose Mrows nth
-] unit-test
-[ cvector{ C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } } ] [
-    2 cmatrix{
-        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
-        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
-        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
-    } Mtranspose Mcols nth
-] unit-test
-[ 3 ] [
-    cmatrix{
-        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
-        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
-        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
-    } Mtranspose Mcols length
-] unit-test
-[ 4 ] [
-    cmatrix{
-        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
-        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
-        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
-    } Mtranspose Mrows length
-] unit-test
-
-[ zvector{ C{ 3.0 1.0 } C{ 3.0 2.0 } C{ 3.0 3.0 } } ] [
-    2 zmatrix{
-        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
-        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
-        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
-    } Mcols nth
-] unit-test
-[ zvector{ C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } } ] [
-    2 zmatrix{
-        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
-        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
-        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
-    } Mrows nth
-] unit-test
-[ 3 ] [
-    zmatrix{
-        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
-        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
-        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
-    } Mrows length
-] unit-test
-[ 4 ] [
-    zmatrix{
-        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
-        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
-        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
-    } Mcols length
-] unit-test
-[ zvector{ C{ 3.0 1.0 } C{ 3.0 2.0 } C{ 3.0 3.0 } } ] [
-    2 zmatrix{
-        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
-        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
-        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
-    } Mtranspose Mrows nth
-] unit-test
-[ zvector{ C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } } ] [
-    2 zmatrix{
-        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
-        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
-        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
-    } Mtranspose Mcols nth
-] unit-test
-[ 3 ] [
-    zmatrix{
-        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
-        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
-        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
-    } Mtranspose Mcols length
-] unit-test
-[ 4 ] [
-    zmatrix{
-        { C{ 1.0 1.0 } C{ 2.0 1.0 } C{ 3.0 1.0 } C{ 4.0 1.0 } }
-        { C{ 1.0 2.0 } C{ 2.0 2.0 } C{ 3.0 2.0 } C{ 4.0 2.0 } }
-        { C{ 1.0 3.0 } C{ 2.0 3.0 } C{ 3.0 3.0 } C{ 4.0 3.0 } }
-    } Mtranspose Mrows length
-] unit-test
-
-! Msub
-
-[ smatrix{
-    { 3.0 2.0 1.0 }
-    { 0.0 1.0 0.0 }
-} ] [
-    smatrix{
-        { 0.0 1.0 2.0 3.0 2.0 }
-        { 1.0 0.0 3.0 2.0 1.0 }
-        { 2.0 3.0 0.0 1.0 0.0 }
-    } 1 2 2 3 Msub
-] unit-test
-
-[ smatrix{
-    { 3.0 0.0 }
-    { 2.0 1.0 }
-    { 1.0 0.0 }
-} ] [
-    smatrix{
-        { 0.0 1.0 2.0 3.0 2.0 }
-        { 1.0 0.0 3.0 2.0 1.0 }
-        { 2.0 3.0 0.0 1.0 0.0 }
-    } Mtranspose 2 1 3 2 Msub
-] unit-test
-
-[ dmatrix{
-    { 3.0 2.0 1.0 }
-    { 0.0 1.0 0.0 }
-} ] [
-    dmatrix{
-        { 0.0 1.0 2.0 3.0 2.0 }
-        { 1.0 0.0 3.0 2.0 1.0 }
-        { 2.0 3.0 0.0 1.0 0.0 }
-    } 1 2 2 3 Msub
-] unit-test
-
-[ dmatrix{
-    { 3.0 0.0 }
-    { 2.0 1.0 }
-    { 1.0 0.0 }
-} ] [
-    dmatrix{
-        { 0.0 1.0 2.0 3.0 2.0 }
-        { 1.0 0.0 3.0 2.0 1.0 }
-        { 2.0 3.0 0.0 1.0 0.0 }
-    } Mtranspose 2 1 3 2 Msub
-] unit-test
-
-[ cmatrix{
-    { C{ 3.0 3.0 } 2.0 1.0 }
-    { 0.0          1.0 0.0 }
-} ] [
-    cmatrix{
-        { 0.0 1.0 2.0          3.0 2.0 }
-        { 1.0 0.0 C{ 3.0 3.0 } 2.0 1.0 }
-        { 2.0 3.0 0.0          1.0 0.0 }
-    } 1 2 2 3 Msub
-] unit-test
-
-[ cmatrix{
-    { C{ 3.0 3.0 } 0.0 }
-    { 2.0          1.0 }
-    { 1.0          0.0 }
-} ] [
-    cmatrix{
-        { 0.0 1.0 2.0          3.0 2.0 }
-        { 1.0 0.0 C{ 3.0 3.0 } 2.0 1.0 }
-        { 2.0 3.0 0.0          1.0 0.0 }
-    } Mtranspose 2 1 3 2 Msub
-] unit-test
-
-[ zmatrix{
-    { C{ 3.0 3.0 } 2.0 1.0 }
-    { 0.0          1.0 0.0 }
-} ] [
-    zmatrix{
-        { 0.0 1.0 2.0          3.0 2.0 }
-        { 1.0 0.0 C{ 3.0 3.0 } 2.0 1.0 }
-        { 2.0 3.0 0.0          1.0 0.0 }
-    } 1 2 2 3 Msub
-] unit-test
-
-[ zmatrix{
-    { C{ 3.0 3.0 } 0.0 }
-    { 2.0          1.0 }
-    { 1.0          0.0 }
-} ] [
-    zmatrix{
-        { 0.0 1.0 2.0          3.0 2.0 }
-        { 1.0 0.0 C{ 3.0 3.0 } 2.0 1.0 }
-        { 2.0 3.0 0.0          1.0 0.0 }
-    } Mtranspose 2 1 3 2 Msub
-] unit-test
-
diff --git a/extra/math/blas/matrices/matrices.factor b/extra/math/blas/matrices/matrices.factor
deleted file mode 100755 (executable)
index c8a4ee6..0000000
+++ /dev/null
@@ -1,307 +0,0 @@
-USING: accessors alien alien.c-types arrays byte-arrays combinators
-combinators.short-circuit fry kernel locals macros
-math math.blas.cblas math.blas.vectors math.blas.vectors.private
-math.complex math.functions math.order functors words
-sequences sequences.merged sequences.private shuffle symbols
-specialized-arrays.direct.float specialized-arrays.direct.double
-specialized-arrays.float specialized-arrays.double ;
-IN: math.blas.matrices
-
-TUPLE: blas-matrix-base underlying ld rows cols transpose ;
-
-: Mtransposed? ( matrix -- ? )
-    transpose>> ; inline
-: Mwidth ( matrix -- width )
-    dup Mtransposed? [ rows>> ] [ cols>> ] if ; inline
-: Mheight ( matrix -- height )
-    dup Mtransposed? [ cols>> ] [ rows>> ] if ; inline
-
-GENERIC: n*M.V+n*V! ( alpha A x beta y -- y=alpha*A.x+b*y )
-GENERIC: n*V(*)V+M! ( alpha x y A -- A=alpha*x(*)y+A )
-GENERIC: n*V(*)Vconj+M! ( alpha x y A -- A=alpha*x(*)yconj+A )
-GENERIC: n*M.M+n*M! ( alpha A B beta C -- C=alpha*A.B+beta*C )
-
-<PRIVATE
-
-: (blas-transpose) ( matrix -- integer )
-    transpose>> [ CblasTrans ] [ CblasNoTrans ] if ;
-
-GENERIC: (blas-matrix-like) ( data ld rows cols transpose exemplar -- matrix )
-
-: (validate-gemv) ( A x y -- )
-    {
-        [ drop [ Mwidth  ] [ length>> ] bi* = ]
-        [ nip  [ Mheight ] [ length>> ] bi* = ]
-    } 3&&
-    [ "Mismatched matrix and vectors in matrix-vector multiplication" throw ]
-    unless ;
-
-:: (prepare-gemv)
-    ( alpha A x beta y >c-arg -- order A-trans m n alpha A-data A-ld x-data x-inc beta y-data y-inc
-                                 y )
-    A x y (validate-gemv)
-    CblasColMajor
-    A (blas-transpose)
-    A rows>>
-    A cols>>
-    alpha >c-arg call
-    A underlying>>
-    A ld>>
-    x underlying>>
-    x inc>>
-    beta >c-arg call
-    y underlying>>
-    y inc>>
-    y ; inline
-
-: (validate-ger) ( x y A -- )
-    {
-        [ nip  [ length>> ] [ Mheight ] bi* = ]
-        [ nipd [ length>> ] [ Mwidth  ] bi* = ]
-    } 3&&
-    [ "Mismatched vertices and matrix in vector outer product" throw ]
-    unless ;
-
-:: (prepare-ger)
-    ( alpha x y A >c-arg -- order m n alpha x-data x-inc y-data y-inc A-data A-ld
-                            A )
-    x y A (validate-ger)
-    CblasColMajor
-    A rows>>
-    A cols>>
-    alpha >c-arg call
-    x underlying>>
-    x inc>>
-    y underlying>>
-    y inc>>
-    A underlying>>
-    A ld>>
-    A f >>transpose ; inline
-
-: (validate-gemm) ( A B C -- )
-    {
-        [ drop [ Mwidth  ] [ Mheight ] bi* = ]
-        [ nip  [ Mheight ] bi@ = ]
-        [ nipd [ Mwidth  ] bi@ = ]
-    } 3&&
-    [ "Mismatched matrices in matrix multiplication" throw ]
-    unless ;
-
-:: (prepare-gemm)
-    ( alpha A B beta C >c-arg -- order A-trans B-trans m n k alpha A-data A-ld B-data B-ld beta C-data C-ld
-                                 C )
-    A B C (validate-gemm)
-    CblasColMajor
-    A (blas-transpose)
-    B (blas-transpose)
-    C rows>>
-    C cols>>
-    A Mwidth
-    alpha >c-arg call
-    A underlying>>
-    A ld>>
-    B underlying>>
-    B ld>>
-    beta >c-arg call
-    C underlying>>
-    C ld>>
-    C f >>transpose ; inline
-
-: (>matrix) ( arrays >c-array -- c-array ld rows cols transpose )
-    '[ <merged> @ ] [ length dup ] [ first length ] tri f ; inline
-
-PRIVATE>
-
-! XXX should do a dense clone
-M: blas-matrix-base clone
-    [ 
-        [ {
-            [ underlying>> ]
-            [ ld>> ]
-            [ cols>> ]
-            [ element-type heap-size ]
-        } cleave * * memory>byte-array ]
-        [ {
-            [ ld>> ]
-            [ rows>> ]
-            [ cols>> ]
-            [ transpose>> ]
-        } cleave ]
-        bi
-    ] keep (blas-matrix-like) ;
-
-! XXX try rounding stride to next 128 bit bound for better vectorizin'
-: <empty-matrix> ( rows cols exemplar -- matrix )
-    [ element-type [ * ] dip <c-array> ]
-    [ 2drop ]
-    [ f swap (blas-matrix-like) ] 3tri ;
-
-: n*M.V+n*V ( alpha A x beta y -- alpha*A.x+b*y )
-    clone n*M.V+n*V! ;
-: n*V(*)V+M ( alpha x y A -- alpha*x(*)y+A )
-    clone n*V(*)V+M! ;
-: n*V(*)Vconj+M ( alpha x y A -- alpha*x(*)yconj+A )
-    clone n*V(*)Vconj+M! ;
-: n*M.M+n*M ( alpha A B beta C -- alpha*A.B+beta*C )
-    clone n*M.M+n*M! ;
-
-: n*M.V ( alpha A x -- alpha*A.x )
-    1.0 2over [ Mheight ] dip <empty-vector>
-    n*M.V+n*V! ; inline
-
-: M.V ( A x -- A.x )
-    1.0 -rot n*M.V ; inline
-
-: n*V(*)V ( alpha x y -- alpha*x(*)y )
-    2dup [ length>> ] bi@ pick <empty-matrix>
-    n*V(*)V+M! ;
-: n*V(*)Vconj ( alpha x y -- alpha*x(*)yconj )
-    2dup [ length>> ] bi@ pick <empty-matrix>
-    n*V(*)Vconj+M! ;
-
-: V(*) ( x y -- x(*)y )
-    1.0 -rot n*V(*)V ; inline
-: V(*)conj ( x y -- x(*)yconj )
-    1.0 -rot n*V(*)Vconj ; inline
-
-: n*M.M ( alpha A B -- alpha*A.B )
-    2dup [ Mheight ] [ Mwidth ] bi* pick <empty-matrix> 
-    1.0 swap n*M.M+n*M! ;
-
-: M. ( A B -- A.B )
-    1.0 -rot n*M.M ; inline
-
-:: (Msub) ( matrix row col height width -- data ld rows cols )
-    matrix ld>> col * row + matrix element-type heap-size *
-    matrix underlying>> <displaced-alien>
-    matrix ld>>
-    height
-    width ;
-
-:: Msub ( matrix row col height width -- sub )
-    matrix dup transpose>>
-    [ col row width height ]
-    [ row col height width ] if (Msub)
-    matrix transpose>> matrix (blas-matrix-like) ;
-
-TUPLE: blas-matrix-rowcol-sequence
-    parent inc rowcol-length rowcol-jump length ;
-C: <blas-matrix-rowcol-sequence> blas-matrix-rowcol-sequence
-
-INSTANCE: blas-matrix-rowcol-sequence sequence
-
-M: blas-matrix-rowcol-sequence length
-    length>> ;
-M: blas-matrix-rowcol-sequence nth-unsafe
-    {
-        [
-            [ rowcol-jump>> ]
-            [ parent>> element-type heap-size ]
-            [ parent>> underlying>> ] tri
-            [ * * ] dip <displaced-alien>
-        ]
-        [ rowcol-length>> ]
-        [ inc>> ]
-        [ parent>> ]
-    } cleave (blas-vector-like) ;
-
-: (Mcols) ( A -- columns )
-    { [ ] [ drop 1 ] [ rows>> ] [ ld>> ] [ cols>> ] }
-    cleave <blas-matrix-rowcol-sequence> ;
-: (Mrows) ( A -- rows )
-    { [ ] [ ld>> ] [ cols>> ] [ drop 1 ] [ rows>> ] }
-    cleave <blas-matrix-rowcol-sequence> ;
-
-: Mrows ( A -- rows )
-    dup transpose>> [ (Mcols) ] [ (Mrows) ] if ;
-: Mcols ( A -- cols )
-    dup transpose>> [ (Mrows) ] [ (Mcols) ] if ;
-
-: n*M! ( n A -- A=n*A )
-    [ (Mcols) [ n*V! drop ] with each ] keep ;
-
-: n*M ( n A -- n*A )
-    clone n*M! ; inline
-
-: M*n ( A n -- A*n )
-    swap n*M ; inline
-: M/n ( A n -- A/n )
-    recip swap n*M ; inline
-
-: Mtranspose ( matrix -- matrix^T )
-    [ {
-        [ underlying>> ]
-        [ ld>> ] [ rows>> ]
-        [ cols>> ]
-        [ transpose>> not ]
-    } cleave ] keep (blas-matrix-like) ;
-
-M: blas-matrix-base equal?
-    {
-        [ [ Mwidth ] bi@ = ]
-        [ [ Mcols ] bi@ [ = ] 2all? ]
-    } 2&& ;
-
-<<
-
-FUNCTOR: (define-blas-matrix) ( TYPE T U C -- )
-
-VECTOR      IS ${TYPE}-blas-vector
-<VECTOR>    IS <${TYPE}-blas-vector>
->ARRAY      IS >${TYPE}-array
-TYPE>ARG    IS ${TYPE}>arg
-XGEMV       IS cblas_${T}gemv
-XGEMM       IS cblas_${T}gemm
-XGERU       IS cblas_${T}ger${U}
-XGERC       IS cblas_${T}ger${C}
-
-MATRIX      DEFINES ${TYPE}-blas-matrix
-<MATRIX>    DEFINES <${TYPE}-blas-matrix>
->MATRIX     DEFINES >${TYPE}-blas-matrix
-
-WHERE
-
-TUPLE: MATRIX < blas-matrix-base ;
-: <MATRIX> ( underlying ld rows cols transpose -- matrix )
-    MATRIX boa ; inline
-
-M: MATRIX element-type
-    drop TYPE ;
-M: MATRIX (blas-matrix-like)
-    drop <MATRIX> execute ;
-M: VECTOR (blas-matrix-like)
-    drop <MATRIX> execute ;
-M: MATRIX (blas-vector-like)
-    drop <VECTOR> execute ;
-
-: >MATRIX ( arrays -- matrix )
-    [ >ARRAY execute underlying>> ] (>matrix)
-    <MATRIX> execute ;
-
-M: VECTOR n*M.V+n*V!
-    [ TYPE>ARG execute ] (prepare-gemv)
-    [ XGEMV execute ] dip ;
-M: MATRIX n*M.M+n*M!
-    [ TYPE>ARG execute ] (prepare-gemm)
-    [ XGEMM execute ] dip ;
-M: MATRIX n*V(*)V+M!
-    [ TYPE>ARG execute ] (prepare-ger)
-    [ XGERU execute ] dip ;
-M: MATRIX n*V(*)Vconj+M!
-    [ TYPE>ARG execute ] (prepare-ger)
-    [ XGERC execute ] dip ;
-
-;FUNCTOR
-
-
-: define-real-blas-matrix ( TYPE T -- )
-    "" "" (define-blas-matrix) ;
-: define-complex-blas-matrix ( TYPE T -- )
-    "u" "c" (define-blas-matrix) ;
-
-"float"          "s" define-real-blas-matrix
-"double"         "d" define-real-blas-matrix
-"float-complex"  "c" define-complex-blas-matrix
-"double-complex" "z" define-complex-blas-matrix
-
->>
diff --git a/extra/math/blas/matrices/summary.txt b/extra/math/blas/matrices/summary.txt
deleted file mode 100644 (file)
index 4cc5684..0000000
+++ /dev/null
@@ -1 +0,0 @@
-BLAS level 2 and 3 matrix-vector and matrix-matrix operations
diff --git a/extra/math/blas/matrices/tags.txt b/extra/math/blas/matrices/tags.txt
deleted file mode 100644 (file)
index 5118958..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-math
-bindings
-unportable
diff --git a/extra/math/blas/syntax/authors.txt b/extra/math/blas/syntax/authors.txt
deleted file mode 100644 (file)
index f13c9c1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Joe Groff
diff --git a/extra/math/blas/syntax/summary.txt b/extra/math/blas/syntax/summary.txt
deleted file mode 100644 (file)
index a71bebb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Literal syntax for BLAS vectors and matrices
diff --git a/extra/math/blas/syntax/syntax-docs.factor b/extra/math/blas/syntax/syntax-docs.factor
deleted file mode 100644 (file)
index 6b58df7..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-USING: help.markup help.syntax math.blas.matrices math.blas.vectors multiline ;
-IN: math.blas.syntax
-
-ARTICLE: "math.blas.syntax" "BLAS interface literal syntax"
-"Vectors:"
-{ $subsection POSTPONE: svector{ }
-{ $subsection POSTPONE: dvector{ }
-{ $subsection POSTPONE: cvector{ }
-{ $subsection POSTPONE: zvector{ }
-"Matrices:"
-{ $subsection POSTPONE: smatrix{ }
-{ $subsection POSTPONE: dmatrix{ }
-{ $subsection POSTPONE: cmatrix{ }
-{ $subsection POSTPONE: zmatrix{ } ;
-
-ABOUT: "math.blas.syntax"
-
-HELP: svector{
-{ $syntax "svector{ 1.0 -2.0 3.0 }" }
-{ $description "Construct a literal " { $link float-blas-vector } "." } ;
-
-HELP: dvector{
-{ $syntax "dvector{ 1.0 -2.0 3.0 }" }
-{ $description "Construct a literal " { $link double-blas-vector } "." } ;
-
-HELP: cvector{
-{ $syntax "cvector{ 1.0 -2.0 C{ 3.0 -1.0 } }" }
-{ $description "Construct a literal " { $link float-complex-blas-vector } "." } ;
-
-HELP: zvector{
-{ $syntax "dvector{ 1.0 -2.0 C{ 3.0 -1.0 } }" }
-{ $description "Construct a literal " { $link double-complex-blas-vector } "." } ;
-
-{
-    POSTPONE: svector{ POSTPONE: dvector{
-    POSTPONE: cvector{ POSTPONE: zvector{
-} related-words
-
-HELP: smatrix{
-{ $syntax <" smatrix{
-    { 1.0 0.0 0.0 1.0 }
-    { 0.0 1.0 0.0 2.0 }
-    { 0.0 0.0 1.0 3.0 }
-    { 0.0 0.0 0.0 1.0 }
-} "> }
-{ $description "Construct a literal " { $link float-blas-matrix } ". Note that although BLAS matrices are stored in column-major order, the literal is specified in row-major order." } ;
-
-HELP: dmatrix{
-{ $syntax <" dmatrix{
-    { 1.0 0.0 0.0 1.0 }
-    { 0.0 1.0 0.0 2.0 }
-    { 0.0 0.0 1.0 3.0 }
-    { 0.0 0.0 0.0 1.0 }
-} "> }
-{ $description "Construct a literal " { $link double-blas-matrix } ". Note that although BLAS matrices are stored in column-major order, the literal is specified in row-major order." } ;
-
-HELP: cmatrix{
-{ $syntax <" cmatrix{
-    { 1.0 0.0           0.0 1.0           }
-    { 0.0 C{ 0.0 1.0 }  0.0 2.0           }
-    { 0.0 0.0          -1.0 3.0           }
-    { 0.0 0.0           0.0 C{ 0.0 -1.0 } }
-} "> }
-{ $description "Construct a literal " { $link float-complex-blas-matrix } ". Note that although BLAS matrices are stored in column-major order, the literal is specified in row-major order." } ;
-
-HELP: zmatrix{
-{ $syntax <" zmatrix{
-    { 1.0 0.0           0.0 1.0           }
-    { 0.0 C{ 0.0 1.0 }  0.0 2.0           }
-    { 0.0 0.0          -1.0 3.0           }
-    { 0.0 0.0           0.0 C{ 0.0 -1.0 } }
-} "> }
-{ $description "Construct a literal " { $link double-complex-blas-matrix } ". Note that although BLAS matrices are stored in column-major order, the literal is specified in row-major order." } ;
-
-{
-    POSTPONE: smatrix{ POSTPONE: dmatrix{
-    POSTPONE: cmatrix{ POSTPONE: zmatrix{
-} related-words
diff --git a/extra/math/blas/syntax/syntax.factor b/extra/math/blas/syntax/syntax.factor
deleted file mode 100644 (file)
index 95f9f7b..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-USING: kernel math.blas.vectors math.blas.matrices parser
-arrays prettyprint.backend sequences ;
-IN: math.blas.syntax
-
-: svector{
-    \ } [ >float-blas-vector ] parse-literal ; parsing
-: dvector{
-    \ } [ >double-blas-vector ] parse-literal ; parsing
-: cvector{
-    \ } [ >float-complex-blas-vector ] parse-literal ; parsing
-: zvector{
-    \ } [ >double-complex-blas-vector ] parse-literal ; parsing
-
-: smatrix{
-    \ } [ >float-blas-matrix ] parse-literal ; parsing
-: dmatrix{
-    \ } [ >double-blas-matrix ] parse-literal ; parsing
-: cmatrix{
-    \ } [ >float-complex-blas-matrix ] parse-literal ; parsing
-: zmatrix{
-    \ } [ >double-complex-blas-matrix ] parse-literal ; parsing
-
-M: float-blas-vector pprint-delims
-    drop \ svector{ \ } ;
-M: double-blas-vector pprint-delims
-    drop \ dvector{ \ } ;
-M: float-complex-blas-vector pprint-delims
-    drop \ cvector{ \ } ;
-M: double-complex-blas-vector pprint-delims
-    drop \ zvector{ \ } ;
-
-M: float-blas-matrix pprint-delims
-    drop \ smatrix{ \ } ;
-M: double-blas-matrix pprint-delims
-    drop \ dmatrix{ \ } ;
-M: float-complex-blas-matrix pprint-delims
-    drop \ cmatrix{ \ } ;
-M: double-complex-blas-matrix pprint-delims
-    drop \ zmatrix{ \ } ;
-
-M: blas-vector-base >pprint-sequence ;
-M: blas-vector-base pprint* pprint-object ;
-M: blas-matrix-base >pprint-sequence Mrows ;
-M: blas-matrix-base pprint* pprint-object ;
diff --git a/extra/math/blas/syntax/tags.txt b/extra/math/blas/syntax/tags.txt
deleted file mode 100644 (file)
index 6a932d9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-math
-unportable
diff --git a/extra/math/blas/vectors/authors.txt b/extra/math/blas/vectors/authors.txt
deleted file mode 100644 (file)
index f13c9c1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Joe Groff
diff --git a/extra/math/blas/vectors/summary.txt b/extra/math/blas/vectors/summary.txt
deleted file mode 100644 (file)
index f983e85..0000000
+++ /dev/null
@@ -1 +0,0 @@
-BLAS level 1 vector operations
diff --git a/extra/math/blas/vectors/tags.txt b/extra/math/blas/vectors/tags.txt
deleted file mode 100644 (file)
index 6a932d9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-math
-unportable
diff --git a/extra/math/blas/vectors/vectors-docs.factor b/extra/math/blas/vectors/vectors-docs.factor
deleted file mode 100644 (file)
index cb26d67..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-USING: alien byte-arrays help.markup help.syntax math sequences ;
-IN: math.blas.vectors
-
-ARTICLE: "math.blas.vectors" "BLAS interface vector operations"
-"Slicing vectors:"
-{ $subsection Vsub }
-"Taking the norm (magnitude) of a vector:"
-{ $subsection Vnorm }
-"Summing and taking the maximum of elements:"
-{ $subsection Vasum }
-{ $subsection Viamax }
-{ $subsection Vamax }
-"Scalar-vector products:"
-{ $subsection n*V! }
-{ $subsection n*V }
-{ $subsection V*n }
-{ $subsection V/n }
-{ $subsection Vneg }
-"Vector addition:" 
-{ $subsection n*V+V! }
-{ $subsection n*V+V }
-{ $subsection V+ }
-{ $subsection V- }
-"Vector inner products:"
-{ $subsection V. }
-{ $subsection V.conj } ;
-
-ABOUT: "math.blas.vectors"
-
-HELP: blas-vector-base
-{ $class-description "The base class for all BLAS vector types. Objects of this type should not be created directly; instead, instantiate one of the typed subclasses:"
-{ $list
-    { { $link float-blas-vector } }
-    { { $link double-blas-vector } }
-    { { $link float-complex-blas-vector } }
-    { { $link double-complex-blas-vector } }
-}
-"All of these subclasses share the same tuple layout:"
-{ $list
-    { { $snippet "underlying" } " contains an alien pointer referencing or byte-array containing a packed array of float, double, float complex, or double complex values;" }
-    { { $snippet "length" } " indicates the length of the vector;" }
-    { "and " { $snippet "inc" } " indicates the distance, in elements, between elements." }
-} } ;
-
-HELP: float-blas-vector
-{ $class-description "A vector of single-precision floating-point values. For details on the tuple layout, see " { $link blas-vector-base } "." } ;
-HELP: double-blas-vector
-{ $class-description "A vector of double-precision floating-point values. For details on the tuple layout, see " { $link blas-vector-base } "." } ;
-HELP: float-complex-blas-vector
-{ $class-description "A vector of single-precision floating-point complex values. Complex values are stored in memory as two consecutive float values, real part then imaginary part. For details on the tuple layout, see " { $link blas-vector-base } "." } ;
-HELP: double-complex-blas-vector
-{ $class-description "A vector of single-precision floating-point complex values. Complex values are stored in memory as two consecutive float values, real part then imaginary part. For details on the tuple layout, see " { $link blas-vector-base } "." } ;
-
-HELP: n*V+V!
-{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "y=alpha*x+y" blas-vector-base } }
-{ $description "Calculate the vector sum " { $snippet "αx + y" } " and replace the existing contents of y with the result. Corresponds to the xAXPY routines in BLAS." }
-{ $side-effects "y" } ;
-
-HELP: n*V!
-{ $values { "alpha" number } { "x" blas-vector-base } { "x=alpha*x" blas-vector-base } }
-{ $description "Calculate the scalar-vector product " { $snippet "αx" } " and replace the existing contents of x with the result. Corresponds to the xSCAL routines in BLAS." }
-{ $side-effects "x" } ;
-
-HELP: V.
-{ $values { "x" blas-vector-base } { "y" blas-vector-base } { "x.y" number } }
-{ $description "Calculate the inner product " { $snippet "xâ‹…y" } ". Corresponds to the xDOT and xDOTU routines in BLAS." } ;
-
-HELP: V.conj
-{ $values { "x" blas-vector-base } { "y" blas-vector-base } { "xconj.y" number } }
-{ $description "Calculate the conjugate inner product " { $snippet "xÌ…â‹…y" } ". Corresponds to the xDOTC routines in BLAS." } ;
-
-HELP: Vnorm
-{ $values { "x" blas-vector-base } { "norm" number } }
-{ $description "Calculate the norm-2, i.e., the magnitude or absolute value, of " { $snippet "x" } " (" { $snippet "‖x‖₂" } "). Corresponds to the xNRM2 routines in BLAS." } ;
-
-HELP: Vasum
-{ $values { "x" blas-vector-base } { "sum" number } }
-{ $description "Calculate the sum of the norm-1s of the elements of " { $snippet "x" } " (" { $snippet "Σ â€–xᵢ‖â‚" } "). Corresponds to the xASUM routines in BLAS." } ;
-
-HELP: Vswap
-{ $values { "x" blas-vector-base } { "y" blas-vector-base } { "x=y" blas-vector-base } { "y=x" blas-vector-base } }
-{ $description "Swap the contents of " { $snippet "x" } " and " { $snippet "y" } " in place. Corresponds to the xSWAP routines in BLAS." }
-{ $side-effects "x" "y" } ;
-
-HELP: Viamax
-{ $values { "x" blas-vector-base } { "max-i" integer } }
-{ $description "Return the index of the element in " { $snippet "x" } " with the largest norm-1. If more than one element has the same norm-1, returns the smallest index. Corresponds to the IxAMAX routines in BLAS." } ;
-
-HELP: Vamax
-{ $values { "x" blas-vector-base } { "max" number } }
-{ $description "Return the value of the element in " { $snippet "x" } " with the largest norm-1. If more than one element has the same norm-1, returns the first element. Corresponds to the IxAMAX routines in BLAS." } ;
-
-{ Viamax Vamax } related-words
-
-HELP: <zero-vector>
-{ $values { "exemplar" blas-vector-base } { "zero" blas-vector-base } }
-{ $description "Return a vector of zeros with the same length and element type as " { $snippet "v" } ". The vector is constructed with an " { $snippet "inc" } " of zero, so it is not suitable for receiving results from BLAS functions; it is intended to be used as a term in other vector calculations. To construct an empty vector that can be used to receive results, see " { $link <empty-vector> } "." } ;
-
-HELP: n*V+V
-{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "alpha*x+y" blas-vector-base } }
-{ $description "Calculate the vector sum " { $snippet "αx + y" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " and " { $snippet "y" } " containing the result. Corresponds to the xAXPY routines in BLAS." } ;
-
-HELP: n*V
-{ $values { "alpha" "a number" } { "x" blas-vector-base } { "alpha*x" blas-vector-base } }
-{ $description "Calculate the scalar-vector product " { $snippet "αx" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " containing the result. Corresponds to the xSCAL routines in BLAS." } ;
-
-HELP: V+
-{ $values { "x" blas-vector-base } { "y" blas-vector-base } { "x+y" blas-vector-base } }
-{ $description "Calculate the vector sum " { $snippet "x + y" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " and " { $snippet "y" } " containing the result. Corresponds to the xAXPY routines in BLAS." } ;
-
-HELP: V-
-{ $values { "x" blas-vector-base } { "y" blas-vector-base } { "x-y" blas-vector-base } }
-{ $description "Calculate the vector difference " { $snippet "x â€“ y" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " and " { $snippet "y" } " containing the result. Corresponds to the xAXPY routines in BLAS." } ;
-
-HELP: Vneg
-{ $values { "x" blas-vector-base } { "-x" blas-vector-base } }
-{ $description "Negate the elements of " { $snippet "x" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " containing the result." } ;
-
-HELP: V*n
-{ $values { "x" blas-vector-base } { "alpha" number } { "x*alpha" blas-vector-base } }
-{ $description "Calculate the scalar-vector product " { $snippet "αx" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " containing the result. Corresponds to the xSCAL routines in BLAS." } ;
-
-HELP: V/n
-{ $values { "x" blas-vector-base } { "alpha" number } { "x/alpha" blas-vector-base } }
-{ $description "Calculate the scalar-vector product " { $snippet "(1/α)x" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " containing the result. Corresponds to the xSCAL routines in BLAS." } ;
-
-{ n*V+V! n*V! n*V+V n*V V+ V- Vneg V*n V/n } related-words
-
-HELP: Vsub
-{ $values { "v" blas-vector-base } { "start" integer } { "length" integer } { "sub" blas-vector-base } }
-{ $description "Slice a subvector out of " { $snippet "v" } " starting at " { $snippet "start" } " with the given " { $snippet "length" } ". The subvector will share storage with the parent vector." } ;
diff --git a/extra/math/blas/vectors/vectors-tests.factor b/extra/math/blas/vectors/vectors-tests.factor
deleted file mode 100644 (file)
index 5f9e8fd..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-USING: kernel math.blas.vectors math.blas.syntax sequences tools.test ;
-IN: math.blas.vectors.tests
-
-! clone
-
-[ svector{ 1.0 2.0 3.0 } ] [ svector{ 1.0 2.0 3.0 } clone ] unit-test
-[ f ] [ svector{ 1.0 2.0 3.0 } dup clone eq? ] unit-test
-[ dvector{ 1.0 2.0 3.0 } ] [ dvector{ 1.0 2.0 3.0 } clone ] unit-test
-[ f ] [ dvector{ 1.0 2.0 3.0 } dup clone eq? ] unit-test
-[ cvector{ 1.0 C{ 2.0 3.0 } 4.0 } ] [ cvector{ 1.0 C{ 2.0 3.0 } 4.0 } clone ] unit-test
-[ f ] [ cvector{ 1.0 C{ 2.0 3.0 } 4.0 } dup clone eq? ] unit-test
-[ zvector{ 1.0 C{ 2.0 3.0 } 4.0 } ] [ zvector{ 1.0 C{ 2.0 3.0 } 4.0 } clone ] unit-test
-[ f ] [ zvector{ 1.0 C{ 2.0 3.0 } 4.0 } dup clone eq? ] unit-test
-
-! nth
-
-[ 1.0 ] [ 2 svector{ 3.0 2.0 1.0 } nth ] unit-test
-[ 1.0 ] [ 2 dvector{ 3.0 2.0 1.0 } nth ] unit-test
-
-[ C{ 1.0 2.0 } ]
-[ 2 cvector{ C{ -3.0 -2.0 } C{ -1.0 0.0 } C{ 1.0 2.0 } } nth ] unit-test
-
-[ C{ 1.0 2.0 } ]
-[ 2 zvector{ C{ -3.0 -2.0 } C{ -1.0 0.0 } C{ 1.0 2.0 } } nth ] unit-test
-
-! set-nth
-
-[ svector{ 3.0 2.0 0.0 } ] [ 0.0 2 svector{ 3.0 2.0 1.0 } [ set-nth ] keep ] unit-test
-[ dvector{ 3.0 2.0 0.0 } ] [ 0.0 2 dvector{ 3.0 2.0 1.0 } [ set-nth ] keep ] unit-test
-
-[ cvector{ C{ -3.0 -2.0 } C{ -1.0 0.0 } C{ 3.0 4.0 } } ] [
-    C{ 3.0 4.0 } 2
-    cvector{ C{ -3.0 -2.0 } C{ -1.0 0.0 } C{ 1.0 2.0 } }
-    [ set-nth ] keep
-] unit-test
-[ zvector{ C{ -3.0 -2.0 } C{ -1.0 0.0 } C{ 3.0 4.0 } } ] [
-    C{ 3.0 4.0 } 2
-    zvector{ C{ -3.0 -2.0 } C{ -1.0 0.0 } C{ 1.0 2.0 } }
-    [ set-nth ] keep
-] unit-test
-
-! V+
-
-[ svector{ 11.0 22.0 } ] [ svector{ 1.0 2.0 } svector{ 10.0 20.0 } V+ ] unit-test
-[ dvector{ 11.0 22.0 } ] [ dvector{ 1.0 2.0 } dvector{ 10.0 20.0 } V+ ] unit-test
-
-[ cvector{ 11.0 C{ 22.0 33.0 } } ]
-[ cvector{ 1.0 C{ 2.0 3.0 } } cvector{ 10.0 C{ 20.0 30.0 } } V+ ]
-unit-test
-
-[ zvector{ 11.0 C{ 22.0 33.0 } } ]
-[ zvector{ 1.0 C{ 2.0 3.0 } } zvector{ 10.0 C{ 20.0 30.0 } } V+ ]
-unit-test
-
-! V-
-
-[ svector{ 9.0 18.0 } ] [ svector{ 10.0 20.0 } svector{ 1.0 2.0 } V- ] unit-test
-[ dvector{ 9.0 18.0 } ] [ dvector{ 10.0 20.0 } dvector{ 1.0 2.0 } V- ] unit-test
-
-[ cvector{ 9.0 C{ 18.0 27.0 } } ]
-[ cvector{ 10.0 C{ 20.0 30.0 } } cvector{ 1.0 C{ 2.0 3.0 } } V- ]
-unit-test
-
-[ zvector{ 9.0 C{ 18.0 27.0 } } ]
-[ zvector{ 10.0 C{ 20.0 30.0 } } zvector{ 1.0 C{ 2.0 3.0 } } V- ]
-unit-test
-
-! Vneg
-
-[ svector{ 1.0 -2.0 } ] [ svector{ -1.0 2.0 } Vneg ] unit-test
-[ dvector{ 1.0 -2.0 } ] [ dvector{ -1.0 2.0 } Vneg ] unit-test
-
-[ cvector{ 1.0 C{ -2.0 3.0 } } ] [ cvector{ -1.0 C{ 2.0 -3.0 } } Vneg ] unit-test
-[ zvector{ 1.0 C{ -2.0 3.0 } } ] [ zvector{ -1.0 C{ 2.0 -3.0 } } Vneg ] unit-test
-
-! n*V
-
-[ svector{ 100.0 200.0 } ] [ 10.0 svector{ 10.0 20.0 } n*V ] unit-test
-[ dvector{ 100.0 200.0 } ] [ 10.0 dvector{ 10.0 20.0 } n*V ] unit-test
-
-[ cvector{ C{ 20.0 4.0 } C{ 8.0 12.0 } } ]
-[ C{ 10.0 2.0 } cvector{ 2.0 C{ 1.0 1.0 } } n*V ]
-unit-test
-
-[ zvector{ C{ 20.0 4.0 } C{ 8.0 12.0 } } ]
-[ C{ 10.0 2.0 } zvector{ 2.0 C{ 1.0 1.0 } } n*V ]
-unit-test
-
-! V*n
-
-[ svector{ 100.0 200.0 } ] [ svector{ 10.0 20.0 } 10.0 V*n ] unit-test
-[ dvector{ 100.0 200.0 } ] [ dvector{ 10.0 20.0 } 10.0 V*n ] unit-test
-
-[ cvector{ C{ 20.0 4.0 } C{ 8.0 12.0 } } ]
-[ cvector{ 2.0 C{ 1.0 1.0 } } C{ 10.0 2.0 } V*n ]
-unit-test
-
-[ zvector{ C{ 20.0 4.0 } C{ 8.0 12.0 } } ]
-[ zvector{ 2.0 C{ 1.0 1.0 } } C{ 10.0 2.0 } V*n ]
-unit-test
-
-! V/n
-
-[ svector{ 1.0 2.0 } ] [ svector{ 4.0 8.0 } 4.0 V/n ] unit-test
-[ dvector{ 1.0 2.0 } ] [ dvector{ 4.0 8.0 } 4.0 V/n ] unit-test
-
-[ cvector{ C{ 0.0 -4.0 } 1.0 } ]
-[ cvector{ C{ 4.0 -4.0 } C{ 1.0 1.0 } } C{ 1.0 1.0 } V/n ]
-unit-test
-
-[ zvector{ C{ 0.0 -4.0 } 1.0 } ]
-[ zvector{ C{ 4.0 -4.0 } C{ 1.0 1.0 } } C{ 1.0 1.0 } V/n ]
-unit-test
-
-! V.
-
-[ 7.0 ] [ svector{ 1.0 2.5 } svector{ 2.0 2.0 } V. ] unit-test
-[ 7.0 ] [ dvector{ 1.0 2.5 } dvector{ 2.0 2.0 } V. ] unit-test
-[ C{ 7.0 7.0 } ] [ cvector{ C{ 1.0 1.0 } 2.5 } cvector{ 2.0 C{ 2.0 2.0 } } V. ] unit-test
-[ C{ 7.0 7.0 } ] [ zvector{ C{ 1.0 1.0 } 2.5 } zvector{ 2.0 C{ 2.0 2.0 } } V. ] unit-test
-
-! V.conj
-
-[ C{ 7.0 3.0 } ] [ cvector{ C{ 1.0 1.0 } 2.5 } cvector{ 2.0 C{ 2.0 2.0 } } V.conj ] unit-test
-[ C{ 7.0 3.0 } ] [ zvector{ C{ 1.0 1.0 } 2.5 } zvector{ 2.0 C{ 2.0 2.0 } } V.conj ] unit-test
-
-! Vnorm
-
-[ 5.0 ] [ svector{ 3.0 4.0 } Vnorm ] unit-test
-[ 5.0 ] [ dvector{ 3.0 4.0 } Vnorm ] unit-test
-
-[ 13.0 ] [ cvector{ C{ 3.0 4.0 } 12.0 } Vnorm ] unit-test
-[ 13.0 ] [ zvector{ C{ 3.0 4.0 } 12.0 } Vnorm ] unit-test
-
-! Vasum
-
-[ 6.0 ] [ svector{ 1.0 2.0 -3.0 } Vasum ] unit-test
-[ 6.0 ] [ dvector{ 1.0 2.0 -3.0 } Vasum ] unit-test
-
-[ 15.0 ] [ cvector{ 1.0 C{ -2.0 3.0 } C{ 4.0 -5.0 } } Vasum ] unit-test
-[ 15.0 ] [ zvector{ 1.0 C{ -2.0 3.0 } C{ 4.0 -5.0 } } Vasum ] unit-test
-
-! Vswap
-
-[ svector{ 2.0 2.0 } svector{ 1.0 1.0 } ]
-[ svector{ 1.0 1.0 } svector{ 2.0 2.0 } Vswap ]
-unit-test
-
-[ dvector{ 2.0 2.0 } dvector{ 1.0 1.0 } ]
-[ dvector{ 1.0 1.0 } dvector{ 2.0 2.0 } Vswap ]
-unit-test
-
-[ cvector{ 2.0 C{ 2.0 2.0 } } cvector{ C{ 1.0 1.0 } 1.0 } ]
-[ cvector{ C{ 1.0 1.0 } 1.0 } cvector{ 2.0 C{ 2.0 2.0 } } Vswap ]
-unit-test
-
-[ zvector{ 2.0 C{ 2.0 2.0 } } zvector{ C{ 1.0 1.0 } 1.0 } ]
-[ zvector{ C{ 1.0 1.0 } 1.0 } zvector{ 2.0 C{ 2.0 2.0 } } Vswap ]
-unit-test
-
-! Viamax
-
-[ 3 ] [ svector{ 1.0 -5.0 4.0 -6.0 -1.0 } Viamax ] unit-test
-[ 3 ] [ dvector{ 1.0 -5.0 4.0 -6.0 -1.0 } Viamax ] unit-test
-[ 0 ] [ cvector{ C{ 2.0 -5.0 } 4.0 -6.0 -1.0 } Viamax ] unit-test
-[ 0 ] [ zvector{ C{ 2.0 -5.0 } 4.0 -6.0 -1.0 } Viamax ] unit-test
-
-! Vamax
-
-[ -6.0 ] [ svector{ 1.0 -5.0 4.0 -6.0 -1.0 } Vamax ] unit-test
-[ -6.0 ] [ dvector{ 1.0 -5.0 4.0 -6.0 -1.0 } Vamax ] unit-test
-[ C{ 2.0 -5.0 } ] [ cvector{ C{ 2.0 -5.0 } 4.0 -6.0 -1.0 } Vamax ] unit-test
-[ C{ 2.0 -5.0 } ] [ zvector{ C{ 2.0 -5.0 } 4.0 -6.0 -1.0 } Vamax ] unit-test
-
-! Vsub
-
-[ svector{ -5.0 4.0 -6.0 } ] [ svector{ 1.0 -5.0 4.0 -6.0 -1.0 } 1 3 Vsub ] unit-test
-[ dvector{ -5.0 4.0 -6.0 } ] [ dvector{ 1.0 -5.0 4.0 -6.0 -1.0 } 1 3 Vsub ] unit-test
-[ cvector{ -5.0 C{ 4.0 3.0 } -6.0 } ] [ cvector{ 1.0 -5.0 C{ 4.0 3.0 } -6.0 -1.0 } 1 3 Vsub ] unit-test
-[ zvector{ -5.0 C{ 4.0 3.0 } -6.0 } ] [ zvector{ 1.0 -5.0 C{ 4.0 3.0 } -6.0 -1.0 } 1 3 Vsub ] unit-test
diff --git a/extra/math/blas/vectors/vectors.factor b/extra/math/blas/vectors/vectors.factor
deleted file mode 100755 (executable)
index db027b0..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-USING: accessors alien alien.c-types arrays byte-arrays combinators
-combinators.short-circuit fry kernel math math.blas.cblas
-math.complex math.functions math.order sequences.complex
-sequences.complex-components sequences sequences.private
-functors words locals
-specialized-arrays.float specialized-arrays.double
-specialized-arrays.direct.float specialized-arrays.direct.double ;
-IN: math.blas.vectors
-
-TUPLE: blas-vector-base underlying length inc ;
-
-INSTANCE: blas-vector-base virtual-sequence
-
-GENERIC: element-type ( v -- type )
-
-GENERIC: n*V+V! ( alpha x y -- y=alpha*x+y )
-GENERIC: n*V!   ( alpha x -- x=alpha*x )
-GENERIC: V. ( x y -- x.y )
-GENERIC: V.conj ( x y -- xconj.y )
-GENERIC: Vnorm ( x -- norm )
-GENERIC: Vasum ( x -- sum )
-GENERIC: Vswap ( x y -- x=y y=x )
-GENERIC: Viamax ( x -- max-i )
-
-<PRIVATE
-
-GENERIC: (blas-vector-like) ( data length inc exemplar -- vector )
-
-GENERIC: (blas-direct-array) ( blas-vector -- direct-array )
-
-: shorter-length ( v1 v2 -- length )
-    [ length>> ] bi@ min ; inline
-: data-and-inc ( v -- data inc )
-    [ underlying>> ] [ inc>> ] bi ; inline
-: datas-and-incs ( v1 v2 -- v1-data v1-inc v2-data v2-inc )
-    [ data-and-inc ] bi@ ; inline
-
-:: (prepare-copy)
-    ( v element-size -- length v-data v-inc v-dest-data v-dest-inc
-                        copy-data copy-length copy-inc )
-    v [ length>> ] [ data-and-inc ] bi
-    v length>> element-size * <byte-array>
-    1 
-    over v length>> 1 ;
-
-: (prepare-swap)
-    ( v1 v2 -- length v1-data v1-inc v2-data v2-inc
-               v1 v2 )
-    [ shorter-length ] [ datas-and-incs ] [ ] 2tri ;
-
-:: (prepare-axpy)
-    ( n v1 v2 -- length n v1-data v1-inc v2-data v2-inc
-                 v2 )
-    v1 v2 shorter-length
-    n
-    v1 v2 datas-and-incs
-    v2 ;
-
-:: (prepare-scal)
-    ( n v -- length n v-data v-inc
-             v )
-    v length>>
-    n
-    v data-and-inc
-    v ;
-
-: (prepare-dot) ( v1 v2 -- length v1-data v1-inc v2-data v2-inc )
-    [ shorter-length ] [ datas-and-incs ] 2bi ;
-
-: (prepare-nrm2) ( v -- length data inc )
-    [ length>> ] [ data-and-inc ] bi ;
-
-PRIVATE>
-
-: n*V+V ( alpha x y -- alpha*x+y ) clone n*V+V! ; inline
-: n*V ( alpha x -- alpha*x ) clone n*V! ; inline
-
-: V+ ( x y -- x+y )
-    1.0 -rot n*V+V ; inline
-: V- ( x y -- x-y )
-    -1.0 spin n*V+V ; inline
-
-: Vneg ( x -- -x )
-    -1.0 swap n*V ; inline
-
-: V*n ( x alpha -- x*alpha )
-    swap n*V ; inline
-: V/n ( x alpha -- x/alpha )
-    recip swap n*V ; inline
-
-: Vamax ( x -- max )
-    [ Viamax ] keep nth ; inline
-
-:: Vsub ( v start length -- sub )
-    v inc>> start * v element-type heap-size *
-    v underlying>> <displaced-alien>
-    length v inc>> v (blas-vector-like) ;
-
-: <zero-vector> ( exemplar -- zero )
-    [ element-type <c-object> ]
-    [ length>> 0 ]
-    [ (blas-vector-like) ] tri ;
-
-: <empty-vector> ( length exemplar -- vector )
-    [ element-type <c-array> ]
-    [ 1 swap ] 2bi
-    (blas-vector-like) ;
-
-M: blas-vector-base equal?
-    {
-        [ [ length ] bi@ = ]
-        [ [ = ] 2all? ]
-    } 2&& ;
-
-M: blas-vector-base length
-    length>> ;
-M: blas-vector-base virtual-seq
-    (blas-direct-array) ;
-M: blas-vector-base virtual@
-    [ inc>> * ] [ nip (blas-direct-array) ] 2bi ;
-
-: float>arg ( f -- f ) ; inline
-: double>arg ( f -- f ) ; inline
-: arg>float ( f -- f ) ; inline
-: arg>double ( f -- f ) ; inline
-
-<<
-
-FUNCTOR: (define-blas-vector) ( TYPE T -- )
-
-<DIRECT-ARRAY> IS <direct-${TYPE}-array>
->ARRAY         IS >${TYPE}-array
-XCOPY          IS cblas_${T}copy
-XSWAP          IS cblas_${T}swap
-IXAMAX         IS cblas_i${T}amax
-
-VECTOR         DEFINES ${TYPE}-blas-vector
-<VECTOR>       DEFINES <${TYPE}-blas-vector>
->VECTOR        DEFINES >${TYPE}-blas-vector
-
-WHERE
-
-TUPLE: VECTOR < blas-vector-base ;
-: <VECTOR> ( underlying length inc -- vector ) VECTOR boa ; inline
-
-: >VECTOR ( seq -- v )
-    [ >ARRAY execute underlying>> ] [ length ] bi 1 <VECTOR> execute ;
-
-M: VECTOR clone
-    TYPE heap-size (prepare-copy)
-    [ XCOPY execute ] 3dip <VECTOR> execute ;
-
-M: VECTOR element-type
-    drop TYPE ;
-M: VECTOR Vswap
-    (prepare-swap) [ XSWAP execute ] 2dip ;
-M: VECTOR Viamax
-    (prepare-nrm2) IXAMAX execute ;
-
-M: VECTOR (blas-vector-like)
-    drop <VECTOR> execute ;
-
-M: VECTOR (blas-direct-array)
-    [ underlying>> ]
-    [ [ length>> ] [ inc>> ] bi * ] bi
-    <DIRECT-ARRAY> execute ;
-
-;FUNCTOR
-
-
-FUNCTOR: (define-real-blas-vector) ( TYPE T -- )
-
-VECTOR         IS ${TYPE}-blas-vector
-XDOT           IS cblas_${T}dot
-XNRM2          IS cblas_${T}nrm2
-XASUM          IS cblas_${T}asum
-XAXPY          IS cblas_${T}axpy
-XSCAL          IS cblas_${T}scal
-
-WHERE
-
-M: VECTOR V.
-    (prepare-dot) XDOT execute ;
-M: VECTOR V.conj
-    (prepare-dot) XDOT execute ;
-M: VECTOR Vnorm
-    (prepare-nrm2) XNRM2 execute ;
-M: VECTOR Vasum
-    (prepare-nrm2) XASUM execute ;
-M: VECTOR n*V+V!
-    (prepare-axpy) [ XAXPY execute ] dip ;
-M: VECTOR n*V!
-    (prepare-scal) [ XSCAL execute ] dip ;
-
-;FUNCTOR
-
-
-FUNCTOR: (define-complex-helpers) ( TYPE -- )
-
-<DIRECT-COMPLEX-ARRAY> DEFINES <direct-${TYPE}-complex-array>
->COMPLEX-ARRAY         DEFINES >${TYPE}-complex-array
-ARG>COMPLEX            DEFINES arg>${TYPE}-complex
-COMPLEX>ARG            DEFINES ${TYPE}-complex>arg
-<DIRECT-ARRAY>         IS      <direct-${TYPE}-array>
->ARRAY                 IS      >${TYPE}-array
-
-WHERE
-
-: <DIRECT-COMPLEX-ARRAY> ( alien len -- sequence )
-    1 shift <DIRECT-ARRAY> execute <complex-sequence> ;
-: >COMPLEX-ARRAY ( sequence -- sequence )
-    <complex-components> >ARRAY execute ;
-: COMPLEX>ARG ( complex -- alien )
-    >rect 2array >ARRAY execute underlying>> ;
-: ARG>COMPLEX ( alien -- complex )
-    2 <DIRECT-ARRAY> execute first2 rect> ;
-
-;FUNCTOR
-
-
-FUNCTOR: (define-complex-blas-vector) ( TYPE C S -- )
-
-VECTOR         IS ${TYPE}-blas-vector
-XDOTU_SUB      IS cblas_${C}dotu_sub
-XDOTC_SUB      IS cblas_${C}dotc_sub
-XXNRM2         IS cblas_${S}${C}nrm2
-XXASUM         IS cblas_${S}${C}asum
-XAXPY          IS cblas_${C}axpy
-XSCAL          IS cblas_${C}scal
-TYPE>ARG       IS ${TYPE}>arg
-ARG>TYPE       IS arg>${TYPE}
-
-WHERE
-
-M: VECTOR V.
-    (prepare-dot) TYPE <c-object>
-    [ XDOTU_SUB execute ] keep
-    ARG>TYPE execute ;
-M: VECTOR V.conj
-    (prepare-dot) TYPE <c-object>
-    [ XDOTC_SUB execute ] keep
-    ARG>TYPE execute ;
-M: VECTOR Vnorm
-    (prepare-nrm2) XXNRM2 execute ;
-M: VECTOR Vasum
-    (prepare-nrm2) XXASUM execute ;
-M: VECTOR n*V+V!
-    [ TYPE>ARG execute ] 2dip
-    (prepare-axpy) [ XAXPY execute ] dip ;
-M: VECTOR n*V!
-    [ TYPE>ARG execute ] dip
-    (prepare-scal) [ XSCAL execute ] dip ;
-
-;FUNCTOR
-
-
-: define-real-blas-vector ( TYPE T -- )
-    [ (define-blas-vector) ]
-    [ (define-real-blas-vector) ] 2bi ;
-:: define-complex-blas-vector ( TYPE C S -- )
-    TYPE (define-complex-helpers)
-    TYPE "-complex" append
-    [ C (define-blas-vector) ]
-    [ C S (define-complex-blas-vector) ] bi ;
-
-"float"  "s" define-real-blas-vector
-"double" "d" define-real-blas-vector
-"float"  "c" "s" define-complex-blas-vector
-"double" "z" "d" define-complex-blas-vector
-
->>
-
diff --git a/extra/math/erato/erato-docs.factor b/extra/math/erato/erato-docs.factor
deleted file mode 100644 (file)
index 29bd302..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-USING: help.markup help.syntax ;
-IN: math.erato
-
-HELP: lerato
-{ $values { "n" "a positive number" } { "lazy-list" "a lazy prime numbers generator" } }
-{ $description "Builds a lazy list containing the prime numbers between 2 and " { $snippet "n" } " (inclusive)." } ;
diff --git a/extra/math/erato/erato-tests.factor b/extra/math/erato/erato-tests.factor
deleted file mode 100644 (file)
index 041cb8d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-! Copyright (c) 2007 Samuel Tardieu.
-! See http://factorcode.org/license.txt for BSD license.
-USING: lists.lazy math.erato tools.test ;
-IN: math.erato.tests
-
-[ { 2 3 5 7 11 13 17 19 } ] [ 20 lerato list>array ] unit-test
diff --git a/extra/math/erato/erato.factor b/extra/math/erato/erato.factor
deleted file mode 100644 (file)
index 7f92623..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-! Copyright (c) 2007 Samuel Tardieu.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors bit-arrays fry kernel lists.lazy math math.functions
-    math.primes.list math.ranges sequences ;
-IN: math.erato
-
-<PRIVATE
-
-TUPLE: erato limit bits latest ;
-
-: ind ( n -- i )
-    2/ 1- ; inline
-
-: is-prime ( n limit -- bool )
-    [ ind ] [ bits>> ] bi* nth ; inline
-
-: indices ( n erato -- range )
-    limit>> ind over 3 * ind spin <range> ;
-
-: mark-multiples ( n erato -- )
-    2dup [ sq ] [ limit>> ] bi* <= [
-        [ indices ] keep bits>> '[ _ f -rot set-nth ] each
-    ] [ 2drop ] if ;
-
-: <erato> ( n -- erato )
-    dup ind 1+ <bit-array> dup set-bits 1 erato boa ;
-
-: next-prime ( erato -- prime/f )
-    [ 2 + ] change-latest [ latest>> ] keep
-    2dup limit>> <= [
-        2dup is-prime [ dupd mark-multiples ] [ nip next-prime ] if
-    ] [
-        2drop f
-    ] if ;
-
-PRIVATE>
-
-: lerato ( n -- lazy-list )
-    dup 1000003 < [
-        0 primes-under-million seq>list swap '[ _ <= ] lwhile
-    ] [
-        <erato> 2 [ drop next-prime ] with lfrom-by [ ] lwhile
-    ] if ;
index 3bc785c1b644393a30323fc080eae933f3244241..11e57d2639700258f3cbbaae4859977a12430069 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (c) 2008 Reginald Keith Ford II.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math arrays sequences sequences.lib ;
+USING: kernel math arrays sequences ;
 IN: math.function-tools
 
 ! Tools for quickly comparing, transforming, and evaluating mathematical functions
diff --git a/extra/math/miller-rabin/authors.txt b/extra/math/miller-rabin/authors.txt
deleted file mode 100755 (executable)
index 7c1b2f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/extra/math/miller-rabin/miller-rabin-tests.factor b/extra/math/miller-rabin/miller-rabin-tests.factor
deleted file mode 100644 (file)
index 9ca85ea..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-USING: math.miller-rabin tools.test ;
-IN: math.miller-rabin.tests
-
-[ f ] [ 473155932665450549999756893736999469773678960651272093993257221235459777950185377130233556540099119926369437865330559863 miller-rabin ] unit-test
-[ t ] [ 2 miller-rabin ] unit-test
-[ t ] [ 3 miller-rabin ] unit-test
-[ f ] [ 36 miller-rabin ] unit-test
-[ t ] [ 37 miller-rabin ] unit-test
-[ 101 ] [ 100 next-prime ] unit-test
-[ 100000000000031 ] [ 100000000000000 next-prime ] unit-test
diff --git a/extra/math/miller-rabin/miller-rabin.factor b/extra/math/miller-rabin/miller-rabin.factor
deleted file mode 100755 (executable)
index def8a04..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: combinators combinators.lib io locals kernel math
-math.functions math.ranges namespaces random sequences
-hashtables sets ;
-IN: math.miller-rabin
-
-: >even ( n -- int ) dup even? [ 1- ] unless ; foldable
-: >odd ( n -- int ) dup even? [ 1+ ] when ; foldable
-: next-odd ( m -- n ) dup even? [ 1+ ] [ 2 + ] if ;
-
-TUPLE: positive-even-expected n ;
-
-:: (miller-rabin) ( n trials -- ? )
-    [let | r [ n 1- factor-2s drop ]
-           s [ n 1- factor-2s nip ]
-           prime?! [ t ]
-           a! [ 0 ]
-           count! [ 0 ] |
-        trials [
-            n 1- [1,b] random a!
-            a s n ^mod 1 = [
-                0 count!
-                r [
-                    2^ s * a swap n ^mod n - -1 =
-                    [ count 1+ count! r + ] when
-                ] each
-                count zero? [ f prime?! trials + ] when
-            ] unless drop
-        ] each prime? ] ;
-
-: miller-rabin* ( n numtrials -- ? )
-    over {
-        { [ dup 1 <= ] [ 3drop f ] }
-        { [ dup 2 = ] [ 3drop t ] }
-        { [ dup even? ] [ 3drop f ] }
-        [ [ drop (miller-rabin) ] with-scope ]
-    } cond ;
-
-: miller-rabin ( n -- ? ) 10 miller-rabin* ;
-
-: next-prime ( n -- p )
-    next-odd dup miller-rabin [ next-prime ] unless ;
-
-: random-prime ( numbits -- p )
-    random-bits next-prime ;
-
-ERROR: no-relative-prime n ;
-
-: (find-relative-prime) ( n guess -- p )
-    over 1 <= [ over no-relative-prime ] when
-    dup 1 <= [ drop 3 ] when
-    2dup gcd nip 1 > [ 2 + (find-relative-prime) ] [ nip ] if ;
-
-: find-relative-prime* ( n guess -- p )
-    #! find a prime relative to n with initial guess
-    >odd (find-relative-prime) ;
-
-: find-relative-prime ( n -- p )
-    dup random find-relative-prime* ;
-
-ERROR: too-few-primes ;
-
-: unique-primes ( numbits n -- seq )
-    #! generate two primes
-    over 5 < [ too-few-primes ] when
-    [ [ drop random-prime ] with map ] [ all-unique? ] generate ;
diff --git a/extra/math/miller-rabin/summary.txt b/extra/math/miller-rabin/summary.txt
deleted file mode 100644 (file)
index b2591a3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Miller-Rabin probabilistic primality test
diff --git a/extra/math/primes/authors.txt b/extra/math/primes/authors.txt
deleted file mode 100644 (file)
index f3b0233..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Samuel Tardieu
diff --git a/extra/math/primes/factors/authors.txt b/extra/math/primes/factors/authors.txt
deleted file mode 100644 (file)
index f3b0233..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Samuel Tardieu
diff --git a/extra/math/primes/factors/factors-docs.factor b/extra/math/primes/factors/factors-docs.factor
deleted file mode 100644 (file)
index f9fe4d5..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-USING: help.markup help.syntax math sequences ;
-IN: math.primes.factors
-
-{ factors group-factors unique-factors } related-words
-
-HELP: factors
-{ $values { "n" "a positive integer" } { "seq" sequence } }
-{ $description { "Return an ordered list of a number's prime factors, possibly repeated." } }
-{ $examples { $example "USING: math.primes.factors prettyprint ;" "300 factors ." "{ 2 2 3 5 5 }" } } ;
-
-HELP: group-factors
-{ $values { "n" "a positive integer" } { "seq" sequence } }
-{ $description { "Return a sequence of pairs representing each prime factor in the number and its corresponding power (multiplicity)." } }
-{ $examples { $example "USING: math.primes.factors prettyprint ;" "300 group-factors ." "{ { 2 2 } { 3 1 } { 5 2 } }" } } ;
-
-HELP: unique-factors
-{ $values { "n" "a positive integer" } { "seq" sequence } }
-{ $description { "Return an ordered list of a number's unique prime factors." } }
-{ $examples { $example "USING: math.primes.factors prettyprint ;" "300 unique-factors ." "{ 2 3 5 }" } } ;
-
-HELP: totient
-{ $values { "n" "a positive integer" } { "t" integer } }
-{ $description { "Return the number of integers between 1 and " { $snippet "n-1" } " that are relatively prime to " { $snippet "n" } "." } } ;
diff --git a/extra/math/primes/factors/factors-tests.factor b/extra/math/primes/factors/factors-tests.factor
deleted file mode 100644 (file)
index 70b905f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-USING: math.primes.factors tools.test ;
-
-{ { 999983 999983 1000003 } } [ 999969000187000867 factors ] unit-test
-{ { { 999983 2 } { 1000003 1 } } } [ 999969000187000867 group-factors ] unit-test
-{ { 999983 1000003 } } [ 999969000187000867 unique-factors ] unit-test
-{ 999967000236000612 } [ 999969000187000867 totient ] unit-test
diff --git a/extra/math/primes/factors/factors.factor b/extra/math/primes/factors/factors.factor
deleted file mode 100644 (file)
index 80c93f2..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-! Copyright (C) 2007 Samuel Tardieu.
-! See http://factorcode.org/license.txt for BSD license.
-USING: arrays kernel lists make math math.primes sequences ;
-IN: math.primes.factors
-
-<PRIVATE
-
-: (factor) ( n d -- n' )
-    2dup mod zero? [ [ / ] keep dup , (factor) ] [ drop ] if ;
-
-: (count) ( n d -- n' )
-    [ (factor) ] { } make
-    [ [ first ] [ length ] bi 2array , ] unless-empty ;
-
-: (unique) ( n d -- n' )
-    [ (factor) ] { } make
-    [ first , ] unless-empty ;
-
-: (factors) ( quot list n -- )
-    dup 1 > [
-        swap uncons swap [ pick call ] dip swap (factors)
-    ] [ 3drop ] if ;
-
-: (decompose) ( n quot -- seq )
-    [ lprimes rot (factors) ] { } make ;
-
-PRIVATE>
-
-: factors ( n -- seq )
-    [ (factor) ] (decompose) ; foldable
-
-: group-factors ( n -- seq )
-    [ (count) ] (decompose) ; foldable
-
-: unique-factors ( n -- seq )
-    [ (unique) ] (decompose) ; foldable
-
-: totient ( n -- t )
-    dup 2 < [
-        drop 0
-    ] [
-        dup unique-factors [ 1 [ 1- * ] reduce ] [ product ] bi / *
-    ] if ; foldable
diff --git a/extra/math/primes/factors/summary.txt b/extra/math/primes/factors/summary.txt
deleted file mode 100644 (file)
index 1440ddd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Prime factors decomposition
diff --git a/extra/math/primes/list/authors.txt b/extra/math/primes/list/authors.txt
deleted file mode 100644 (file)
index 7c1b2f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/extra/math/primes/list/list.factor b/extra/math/primes/list/list.factor
deleted file mode 100644 (file)
index 7560538..0000000
+++ /dev/null
@@ -1,6421 +0,0 @@
-IN: math.primes.list
-
-: primes-under-million ( -- seq )
-{
-2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103
-107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211
-223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331
-337 347 349 353 359 367 373 379 383 389 397 401 409 419 421 431 433 439 443 449
-457 461 463 467 479 487 491 499 503 509 521 523 541 547 557 563 569 571 577 587
-593 599 601 607 613 617 619 631 641 643 647 653 659 661 673 677 683 691 701 709
-719 727 733 739 743 751 757 761 769 773 787 797 809 811 821 823 827 829 839 853
-857 859 863 877 881 883 887 907 911 919 929 937 941 947 953 967 971 977 983 991
-997
-1009 1013 1019 1021 1031 1033 1039 1049 1051 1061 1063 1069 1087 1091 1093 1097
-1103 1109 1117 1123 1129 1151 1153 1163 1171 1181 1187 1193 1201 1213 1217 1223
-1229 1231 1237 1249 1259 1277 1279 1283 1289 1291 1297 1301 1303 1307 1319 1321
-1327 1361 1367 1373 1381 1399 1409 1423 1427 1429 1433 1439 1447 1451 1453 1459
-1471 1481 1483 1487 1489 1493 1499 1511 1523 1531 1543 1549 1553 1559 1567 1571
-1579 1583 1597 1601 1607 1609 1613 1619 1621 1627 1637 1657 1663 1667 1669 1693
-1697 1699 1709 1721 1723 1733 1741 1747 1753 1759 1777 1783 1787 1789 1801 1811
-1823 1831 1847 1861 1867 1871 1873 1877 1879 1889 1901 1907 1913 1931 1933 1949
-1951 1973 1979 1987 1993 1997 1999 2003 2011 2017 2027 2029 2039 2053 2063 2069
-2081 2083 2087 2089 2099 2111 2113 2129 2131 2137 2141 2143 2153 2161 2179 2203
-2207 2213 2221 2237 2239 2243 2251 2267 2269 2273 2281 2287 2293 2297 2309 2311
-2333 2339 2341 2347 2351 2357 2371 2377 2381 2383 2389 2393 2399 2411 2417 2423
-2437 2441 2447 2459 2467 2473 2477 2503 2521 2531 2539 2543 2549 2551 2557 2579
-2591 2593 2609 2617 2621 2633 2647 2657 2659 2663 2671 2677 2683 2687 2689 2693
-2699 2707 2711 2713 2719 2729 2731 2741 2749 2753 2767 2777 2789 2791 2797 2801
-2803 2819 2833 2837 2843 2851 2857 2861 2879 2887 2897 2903 2909 2917 2927 2939
-2953 2957 2963 2969 2971 2999 3001 3011 3019 3023 3037 3041 3049 3061 3067 3079
-3083 3089 3109 3119 3121 3137 3163 3167 3169 3181 3187 3191 3203 3209 3217 3221
-3229 3251 3253 3257 3259 3271 3299 3301 3307 3313 3319 3323 3329 3331 3343 3347
-3359 3361 3371 3373 3389 3391 3407 3413 3433 3449 3457 3461 3463 3467 3469 3491
-3499 3511 3517 3527 3529 3533 3539 3541 3547 3557 3559 3571 3581 3583 3593 3607
-3613 3617 3623 3631 3637 3643 3659 3671 3673 3677 3691 3697 3701 3709 3719 3727
-3733 3739 3761 3767 3769 3779 3793 3797 3803 3821 3823 3833 3847 3851 3853 3863
-3877 3881 3889 3907 3911 3917 3919 3923 3929 3931 3943 3947 3967 3989 4001 4003
-4007 4013 4019 4021 4027 4049 4051 4057 4073 4079 4091 4093 4099 4111 4127 4129
-4133 4139 4153 4157 4159 4177 4201 4211 4217 4219 4229 4231 4241 4243 4253 4259
-4261 4271 4273 4283 4289 4297 4327 4337 4339 4349 4357 4363 4373 4391 4397 4409
-4421 4423 4441 4447 4451 4457 4463 4481 4483 4493 4507 4513 4517 4519 4523 4547
-4549 4561 4567 4583 4591 4597 4603 4621 4637 4639 4643 4649 4651 4657 4663 4673
-4679 4691 4703 4721 4723 4729 4733 4751 4759 4783 4787 4789 4793 4799 4801 4813
-4817 4831 4861 4871 4877 4889 4903 4909 4919 4931 4933 4937 4943 4951 4957 4967
-4969 4973 4987 4993 4999 5003 5009 5011 5021 5023 5039 5051 5059 5077 5081 5087
-5099 5101 5107 5113 5119 5147 5153 5167 5171 5179 5189 5197 5209 5227 5231 5233
-5237 5261 5273 5279 5281 5297 5303 5309 5323 5333 5347 5351 5381 5387 5393 5399
-5407 5413 5417 5419 5431 5437 5441 5443 5449 5471 5477 5479 5483 5501 5503 5507
-5519 5521 5527 5531 5557 5563 5569 5573 5581 5591 5623 5639 5641 5647 5651 5653
-5657 5659 5669 5683 5689 5693 5701 5711 5717 5737 5741 5743 5749 5779 5783 5791
-5801 5807 5813 5821 5827 5839 5843 5849 5851 5857 5861 5867 5869 5879 5881 5897
-5903 5923 5927 5939 5953 5981 5987 6007 6011 6029 6037 6043 6047 6053 6067 6073
-6079 6089 6091 6101 6113 6121 6131 6133 6143 6151 6163 6173 6197 6199 6203 6211
-6217 6221 6229 6247 6257 6263 6269 6271 6277 6287 6299 6301 6311 6317 6323 6329
-6337 6343 6353 6359 6361 6367 6373 6379 6389 6397 6421 6427 6449 6451 6469 6473
-6481 6491 6521 6529 6547 6551 6553 6563 6569 6571 6577 6581 6599 6607 6619 6637
-6653 6659 6661 6673 6679 6689 6691 6701 6703 6709 6719 6733 6737 6761 6763 6779
-6781 6791 6793 6803 6823 6827 6829 6833 6841 6857 6863 6869 6871 6883 6899 6907
-6911 6917 6947 6949 6959 6961 6967 6971 6977 6983 6991 6997 7001 7013 7019 7027
-7039 7043 7057 7069 7079 7103 7109 7121 7127 7129 7151 7159 7177 7187 7193 7207
-7211 7213 7219 7229 7237 7243 7247 7253 7283 7297 7307 7309 7321 7331 7333 7349
-7351 7369 7393 7411 7417 7433 7451 7457 7459 7477 7481 7487 7489 7499 7507 7517
-7523 7529 7537 7541 7547 7549 7559 7561 7573 7577 7583 7589 7591 7603 7607 7621
-7639 7643 7649 7669 7673 7681 7687 7691 7699 7703 7717 7723 7727 7741 7753 7757
-7759 7789 7793 7817 7823 7829 7841 7853 7867 7873 7877 7879 7883 7901 7907 7919
-7927 7933 7937 7949 7951 7963 7993 8009 8011 8017 8039 8053 8059 8069 8081 8087
-8089 8093 8101 8111 8117 8123 8147 8161 8167 8171 8179 8191 8209 8219 8221 8231
-8233 8237 8243 8263 8269 8273 8287 8291 8293 8297 8311 8317 8329 8353 8363 8369
-8377 8387 8389 8419 8423 8429 8431 8443 8447 8461 8467 8501 8513 8521 8527 8537
-8539 8543 8563 8573 8581 8597 8599 8609 8623 8627 8629 8641 8647 8663 8669 8677
-8681 8689 8693 8699 8707 8713 8719 8731 8737 8741 8747 8753 8761 8779 8783 8803
-8807 8819 8821 8831 8837 8839 8849 8861 8863 8867 8887 8893 8923 8929 8933 8941
-8951 8963 8969 8971 8999 9001 9007 9011 9013 9029 9041 9043 9049 9059 9067 9091
-9103 9109 9127 9133 9137 9151 9157 9161 9173 9181 9187 9199 9203 9209 9221 9227
-9239 9241 9257 9277 9281 9283 9293 9311 9319 9323 9337 9341 9343 9349 9371 9377
-9391 9397 9403 9413 9419 9421 9431 9433 9437 9439 9461 9463 9467 9473 9479 9491
-9497 9511 9521 9533 9539 9547 9551 9587 9601 9613 9619 9623 9629 9631 9643 9649
-9661 9677 9679 9689 9697 9719 9721 9733 9739 9743 9749 9767 9769 9781 9787 9791
-9803 9811 9817 9829 9833 9839 9851 9857 9859 9871 9883 9887 9901 9907 9923 9929
-9931 9941 9949 9967 9973
-10007 10009 10037 10039 10061 10067 10069 10079 10091 10093 10099 10103 10111 10133
-10139 10141 10151 10159 10163 10169 10177 10181 10193 10211 10223 10243 10247 10253
-10259 10267 10271 10273 10289 10301 10303 10313 10321 10331 10333 10337 10343 10357
-10369 10391 10399 10427 10429 10433 10453 10457 10459 10463 10477 10487 10499 10501
-10513 10529 10531 10559 10567 10589 10597 10601 10607 10613 10627 10631 10639 10651
-10657 10663 10667 10687 10691 10709 10711 10723 10729 10733 10739 10753 10771 10781
-10789 10799 10831 10837 10847 10853 10859 10861 10867 10883 10889 10891 10903 10909
-10937 10939 10949 10957 10973 10979 10987 10993 11003 11027 11047 11057 11059 11069
-11071 11083 11087 11093 11113 11117 11119 11131 11149 11159 11161 11171 11173 11177
-11197 11213 11239 11243 11251 11257 11261 11273 11279 11287 11299 11311 11317 11321
-11329 11351 11353 11369 11383 11393 11399 11411 11423 11437 11443 11447 11467 11471
-11483 11489 11491 11497 11503 11519 11527 11549 11551 11579 11587 11593 11597 11617
-11621 11633 11657 11677 11681 11689 11699 11701 11717 11719 11731 11743 11777 11779
-11783 11789 11801 11807 11813 11821 11827 11831 11833 11839 11863 11867 11887 11897
-11903 11909 11923 11927 11933 11939 11941 11953 11959 11969 11971 11981 11987 12007
-12011 12037 12041 12043 12049 12071 12073 12097 12101 12107 12109 12113 12119 12143
-12149 12157 12161 12163 12197 12203 12211 12227 12239 12241 12251 12253 12263 12269
-12277 12281 12289 12301 12323 12329 12343 12347 12373 12377 12379 12391 12401 12409
-12413 12421 12433 12437 12451 12457 12473 12479 12487 12491 12497 12503 12511 12517
-12527 12539 12541 12547 12553 12569 12577 12583 12589 12601 12611 12613 12619 12637
-12641 12647 12653 12659 12671 12689 12697 12703 12713 12721 12739 12743 12757 12763
-12781 12791 12799 12809 12821 12823 12829 12841 12853 12889 12893 12899 12907 12911
-12917 12919 12923 12941 12953 12959 12967 12973 12979 12983 13001 13003 13007 13009
-13033 13037 13043 13049 13063 13093 13099 13103 13109 13121 13127 13147 13151 13159
-13163 13171 13177 13183 13187 13217 13219 13229 13241 13249 13259 13267 13291 13297
-13309 13313 13327 13331 13337 13339 13367 13381 13397 13399 13411 13417 13421 13441
-13451 13457 13463 13469 13477 13487 13499 13513 13523 13537 13553 13567 13577 13591
-13597 13613 13619 13627 13633 13649 13669 13679 13681 13687 13691 13693 13697 13709
-13711 13721 13723 13729 13751 13757 13759 13763 13781 13789 13799 13807 13829 13831
-13841 13859 13873 13877 13879 13883 13901 13903 13907 13913 13921 13931 13933 13963
-13967 13997 13999 14009 14011 14029 14033 14051 14057 14071 14081 14083 14087 14107
-14143 14149 14153 14159 14173 14177 14197 14207 14221 14243 14249 14251 14281 14293
-14303 14321 14323 14327 14341 14347 14369 14387 14389 14401 14407 14411 14419 14423
-14431 14437 14447 14449 14461 14479 14489 14503 14519 14533 14537 14543 14549 14551
-14557 14561 14563 14591 14593 14621 14627 14629 14633 14639 14653 14657 14669 14683
-14699 14713 14717 14723 14731 14737 14741 14747 14753 14759 14767 14771 14779 14783
-14797 14813 14821 14827 14831 14843 14851 14867 14869 14879 14887 14891 14897 14923
-14929 14939 14947 14951 14957 14969 14983 15013 15017 15031 15053 15061 15073 15077
-15083 15091 15101 15107 15121 15131 15137 15139 15149 15161 15173 15187 15193 15199
-15217 15227 15233 15241 15259 15263 15269 15271 15277 15287 15289 15299 15307 15313
-15319 15329 15331 15349 15359 15361 15373 15377 15383 15391 15401 15413 15427 15439
-15443 15451 15461 15467 15473 15493 15497 15511 15527 15541 15551 15559 15569 15581
-15583 15601 15607 15619 15629 15641 15643 15647 15649 15661 15667 15671 15679 15683
-15727 15731 15733 15737 15739 15749 15761 15767 15773 15787 15791 15797 15803 15809
-15817 15823 15859 15877 15881 15887 15889 15901 15907 15913 15919 15923 15937 15959
-15971 15973 15991 16001 16007 16033 16057 16061 16063 16067 16069 16073 16087 16091
-16097 16103 16111 16127 16139 16141 16183 16187 16189 16193 16217 16223 16229 16231
-16249 16253 16267 16273 16301 16319 16333 16339 16349 16361 16363 16369 16381 16411
-16417 16421 16427 16433 16447 16451 16453 16477 16481 16487 16493 16519 16529 16547
-16553 16561 16567 16573 16603 16607 16619 16631 16633 16649 16651 16657 16661 16673
-16691 16693 16699 16703 16729 16741 16747 16759 16763 16787 16811 16823 16829 16831
-16843 16871 16879 16883 16889 16901 16903 16921 16927 16931 16937 16943 16963 16979
-16981 16987 16993 17011 17021 17027 17029 17033 17041 17047 17053 17077 17093 17099
-17107 17117 17123 17137 17159 17167 17183 17189 17191 17203 17207 17209 17231 17239
-17257 17291 17293 17299 17317 17321 17327 17333 17341 17351 17359 17377 17383 17387
-17389 17393 17401 17417 17419 17431 17443 17449 17467 17471 17477 17483 17489 17491
-17497 17509 17519 17539 17551 17569 17573 17579 17581 17597 17599 17609 17623 17627
-17657 17659 17669 17681 17683 17707 17713 17729 17737 17747 17749 17761 17783 17789
-17791 17807 17827 17837 17839 17851 17863 17881 17891 17903 17909 17911 17921 17923
-17929 17939 17957 17959 17971 17977 17981 17987 17989 18013 18041 18043 18047 18049
-18059 18061 18077 18089 18097 18119 18121 18127 18131 18133 18143 18149 18169 18181
-18191 18199 18211 18217 18223 18229 18233 18251 18253 18257 18269 18287 18289 18301
-18307 18311 18313 18329 18341 18353 18367 18371 18379 18397 18401 18413 18427 18433
-18439 18443 18451 18457 18461 18481 18493 18503 18517 18521 18523 18539 18541 18553
-18583 18587 18593 18617 18637 18661 18671 18679 18691 18701 18713 18719 18731 18743
-18749 18757 18773 18787 18793 18797 18803 18839 18859 18869 18899 18911 18913 18917
-18919 18947 18959 18973 18979 19001 19009 19013 19031 19037 19051 19069 19073 19079
-19081 19087 19121 19139 19141 19157 19163 19181 19183 19207 19211 19213 19219 19231
-19237 19249 19259 19267 19273 19289 19301 19309 19319 19333 19373 19379 19381 19387
-19391 19403 19417 19421 19423 19427 19429 19433 19441 19447 19457 19463 19469 19471
-19477 19483 19489 19501 19507 19531 19541 19543 19553 19559 19571 19577 19583 19597
-19603 19609 19661 19681 19687 19697 19699 19709 19717 19727 19739 19751 19753 19759
-19763 19777 19793 19801 19813 19819 19841 19843 19853 19861 19867 19889 19891 19913
-19919 19927 19937 19949 19961 19963 19973 19979 19991 19993 19997 20011 20021 20023
-20029 20047 20051 20063 20071 20089 20101 20107 20113 20117 20123 20129 20143 20147
-20149 20161 20173 20177 20183 20201 20219 20231 20233 20249 20261 20269 20287 20297
-20323 20327 20333 20341 20347 20353 20357 20359 20369 20389 20393 20399 20407 20411
-20431 20441 20443 20477 20479 20483 20507 20509 20521 20533 20543 20549 20551 20563
-20593 20599 20611 20627 20639 20641 20663 20681 20693 20707 20717 20719 20731 20743
-20747 20749 20753 20759 20771 20773 20789 20807 20809 20849 20857 20873 20879 20887
-20897 20899 20903 20921 20929 20939 20947 20959 20963 20981 20983 21001 21011 21013
-21017 21019 21023 21031 21059 21061 21067 21089 21101 21107 21121 21139 21143 21149
-21157 21163 21169 21179 21187 21191 21193 21211 21221 21227 21247 21269 21277 21283
-21313 21317 21319 21323 21341 21347 21377 21379 21383 21391 21397 21401 21407 21419
-21433 21467 21481 21487 21491 21493 21499 21503 21517 21521 21523 21529 21557 21559
-21563 21569 21577 21587 21589 21599 21601 21611 21613 21617 21647 21649 21661 21673
-21683 21701 21713 21727 21737 21739 21751 21757 21767 21773 21787 21799 21803 21817
-21821 21839 21841 21851 21859 21863 21871 21881 21893 21911 21929 21937 21943 21961
-21977 21991 21997 22003 22013 22027 22031 22037 22039 22051 22063 22067 22073 22079
-22091 22093 22109 22111 22123 22129 22133 22147 22153 22157 22159 22171 22189 22193
-22229 22247 22259 22271 22273 22277 22279 22283 22291 22303 22307 22343 22349 22367
-22369 22381 22391 22397 22409 22433 22441 22447 22453 22469 22481 22483 22501 22511
-22531 22541 22543 22549 22567 22571 22573 22613 22619 22621 22637 22639 22643 22651
-22669 22679 22691 22697 22699 22709 22717 22721 22727 22739 22741 22751 22769 22777
-22783 22787 22807 22811 22817 22853 22859 22861 22871 22877 22901 22907 22921 22937
-22943 22961 22963 22973 22993 23003 23011 23017 23021 23027 23029 23039 23041 23053
-23057 23059 23063 23071 23081 23087 23099 23117 23131 23143 23159 23167 23173 23189
-23197 23201 23203 23209 23227 23251 23269 23279 23291 23293 23297 23311 23321 23327
-23333 23339 23357 23369 23371 23399 23417 23431 23447 23459 23473 23497 23509 23531
-23537 23539 23549 23557 23561 23563 23567 23581 23593 23599 23603 23609 23623 23627
-23629 23633 23663 23669 23671 23677 23687 23689 23719 23741 23743 23747 23753 23761
-23767 23773 23789 23801 23813 23819 23827 23831 23833 23857 23869 23873 23879 23887
-23893 23899 23909 23911 23917 23929 23957 23971 23977 23981 23993 24001 24007 24019
-24023 24029 24043 24049 24061 24071 24077 24083 24091 24097 24103 24107 24109 24113
-24121 24133 24137 24151 24169 24179 24181 24197 24203 24223 24229 24239 24247 24251
-24281 24317 24329 24337 24359 24371 24373 24379 24391 24407 24413 24419 24421 24439
-24443 24469 24473 24481 24499 24509 24517 24527 24533 24547 24551 24571 24593 24611
-24623 24631 24659 24671 24677 24683 24691 24697 24709 24733 24749 24763 24767 24781
-24793 24799 24809 24821 24841 24847 24851 24859 24877 24889 24907 24917 24919 24923
-24943 24953 24967 24971 24977 24979 24989 25013 25031 25033 25037 25057 25073 25087
-25097 25111 25117 25121 25127 25147 25153 25163 25169 25171 25183 25189 25219 25229
-25237 25243 25247 25253 25261 25301 25303 25307 25309 25321 25339 25343 25349 25357
-25367 25373 25391 25409 25411 25423 25439 25447 25453 25457 25463 25469 25471 25523
-25537 25541 25561 25577 25579 25583 25589 25601 25603 25609 25621 25633 25639 25643
-25657 25667 25673 25679 25693 25703 25717 25733 25741 25747 25759 25763 25771 25793
-25799 25801 25819 25841 25847 25849 25867 25873 25889 25903 25913 25919 25931 25933
-25939 25943 25951 25969 25981 25997 25999 26003 26017 26021 26029 26041 26053 26083
-26099 26107 26111 26113 26119 26141 26153 26161 26171 26177 26183 26189 26203 26209
-26227 26237 26249 26251 26261 26263 26267 26293 26297 26309 26317 26321 26339 26347
-26357 26371 26387 26393 26399 26407 26417 26423 26431 26437 26449 26459 26479 26489
-26497 26501 26513 26539 26557 26561 26573 26591 26597 26627 26633 26641 26647 26669
-26681 26683 26687 26693 26699 26701 26711 26713 26717 26723 26729 26731 26737 26759
-26777 26783 26801 26813 26821 26833 26839 26849 26861 26863 26879 26881 26891 26893
-26903 26921 26927 26947 26951 26953 26959 26981 26987 26993 27011 27017 27031 27043
-27059 27061 27067 27073 27077 27091 27103 27107 27109 27127 27143 27179 27191 27197
-27211 27239 27241 27253 27259 27271 27277 27281 27283 27299 27329 27337 27361 27367
-27397 27407 27409 27427 27431 27437 27449 27457 27479 27481 27487 27509 27527 27529
-27539 27541 27551 27581 27583 27611 27617 27631 27647 27653 27673 27689 27691 27697
-27701 27733 27737 27739 27743 27749 27751 27763 27767 27773 27779 27791 27793 27799
-27803 27809 27817 27823 27827 27847 27851 27883 27893 27901 27917 27919 27941 27943
-27947 27953 27961 27967 27983 27997 28001 28019 28027 28031 28051 28057 28069 28081
-28087 28097 28099 28109 28111 28123 28151 28163 28181 28183 28201 28211 28219 28229
-28277 28279 28283 28289 28297 28307 28309 28319 28349 28351 28387 28393 28403 28409
-28411 28429 28433 28439 28447 28463 28477 28493 28499 28513 28517 28537 28541 28547
-28549 28559 28571 28573 28579 28591 28597 28603 28607 28619 28621 28627 28631 28643
-28649 28657 28661 28663 28669 28687 28697 28703 28711 28723 28729 28751 28753 28759
-28771 28789 28793 28807 28813 28817 28837 28843 28859 28867 28871 28879 28901 28909
-28921 28927 28933 28949 28961 28979 29009 29017 29021 29023 29027 29033 29059 29063
-29077 29101 29123 29129 29131 29137 29147 29153 29167 29173 29179 29191 29201 29207
-29209 29221 29231 29243 29251 29269 29287 29297 29303 29311 29327 29333 29339 29347
-29363 29383 29387 29389 29399 29401 29411 29423 29429 29437 29443 29453 29473 29483
-29501 29527 29531 29537 29567 29569 29573 29581 29587 29599 29611 29629 29633 29641
-29663 29669 29671 29683 29717 29723 29741 29753 29759 29761 29789 29803 29819 29833
-29837 29851 29863 29867 29873 29879 29881 29917 29921 29927 29947 29959 29983 29989
-30011 30013 30029 30047 30059 30071 30089 30091 30097 30103 30109 30113 30119 30133
-30137 30139 30161 30169 30181 30187 30197 30203 30211 30223 30241 30253 30259 30269
-30271 30293 30307 30313 30319 30323 30341 30347 30367 30389 30391 30403 30427 30431
-30449 30467 30469 30491 30493 30497 30509 30517 30529 30539 30553 30557 30559 30577
-30593 30631 30637 30643 30649 30661 30671 30677 30689 30697 30703 30707 30713 30727
-30757 30763 30773 30781 30803 30809 30817 30829 30839 30841 30851 30853 30859 30869
-30871 30881 30893 30911 30931 30937 30941 30949 30971 30977 30983 31013 31019 31033
-31039 31051 31063 31069 31079 31081 31091 31121 31123 31139 31147 31151 31153 31159
-31177 31181 31183 31189 31193 31219 31223 31231 31237 31247 31249 31253 31259 31267
-31271 31277 31307 31319 31321 31327 31333 31337 31357 31379 31387 31391 31393 31397
-31469 31477 31481 31489 31511 31513 31517 31531 31541 31543 31547 31567 31573 31583
-31601 31607 31627 31643 31649 31657 31663 31667 31687 31699 31721 31723 31727 31729
-31741 31751 31769 31771 31793 31799 31817 31847 31849 31859 31873 31883 31891 31907
-31957 31963 31973 31981 31991 32003 32009 32027 32029 32051 32057 32059 32063 32069
-32077 32083 32089 32099 32117 32119 32141 32143 32159 32173 32183 32189 32191 32203
-32213 32233 32237 32251 32257 32261 32297 32299 32303 32309 32321 32323 32327 32341
-32353 32359 32363 32369 32371 32377 32381 32401 32411 32413 32423 32429 32441 32443
-32467 32479 32491 32497 32503 32507 32531 32533 32537 32561 32563 32569 32573 32579
-32587 32603 32609 32611 32621 32633 32647 32653 32687 32693 32707 32713 32717 32719
-32749 32771 32779 32783 32789 32797 32801 32803 32831 32833 32839 32843 32869 32887
-32909 32911 32917 32933 32939 32941 32957 32969 32971 32983 32987 32993 32999 33013
-33023 33029 33037 33049 33053 33071 33073 33083 33091 33107 33113 33119 33149 33151
-33161 33179 33181 33191 33199 33203 33211 33223 33247 33287 33289 33301 33311 33317
-33329 33331 33343 33347 33349 33353 33359 33377 33391 33403 33409 33413 33427 33457
-33461 33469 33479 33487 33493 33503 33521 33529 33533 33547 33563 33569 33577 33581
-33587 33589 33599 33601 33613 33617 33619 33623 33629 33637 33641 33647 33679 33703
-33713 33721 33739 33749 33751 33757 33767 33769 33773 33791 33797 33809 33811 33827
-33829 33851 33857 33863 33871 33889 33893 33911 33923 33931 33937 33941 33961 33967
-33997 34019 34031 34033 34039 34057 34061 34123 34127 34129 34141 34147 34157 34159
-34171 34183 34211 34213 34217 34231 34253 34259 34261 34267 34273 34283 34297 34301
-34303 34313 34319 34327 34337 34351 34361 34367 34369 34381 34403 34421 34429 34439
-34457 34469 34471 34483 34487 34499 34501 34511 34513 34519 34537 34543 34549 34583
-34589 34591 34603 34607 34613 34631 34649 34651 34667 34673 34679 34687 34693 34703
-34721 34729 34739 34747 34757 34759 34763 34781 34807 34819 34841 34843 34847 34849
-34871 34877 34883 34897 34913 34919 34939 34949 34961 34963 34981 35023 35027 35051
-35053 35059 35069 35081 35083 35089 35099 35107 35111 35117 35129 35141 35149 35153
-35159 35171 35201 35221 35227 35251 35257 35267 35279 35281 35291 35311 35317 35323
-35327 35339 35353 35363 35381 35393 35401 35407 35419 35423 35437 35447 35449 35461
-35491 35507 35509 35521 35527 35531 35533 35537 35543 35569 35573 35591 35593 35597
-35603 35617 35671 35677 35729 35731 35747 35753 35759 35771 35797 35801 35803 35809
-35831 35837 35839 35851 35863 35869 35879 35897 35899 35911 35923 35933 35951 35963
-35969 35977 35983 35993 35999 36007 36011 36013 36017 36037 36061 36067 36073 36083
-36097 36107 36109 36131 36137 36151 36161 36187 36191 36209 36217 36229 36241 36251
-36263 36269 36277 36293 36299 36307 36313 36319 36341 36343 36353 36373 36383 36389
-36433 36451 36457 36467 36469 36473 36479 36493 36497 36523 36527 36529 36541 36551
-36559 36563 36571 36583 36587 36599 36607 36629 36637 36643 36653 36671 36677 36683
-36691 36697 36709 36713 36721 36739 36749 36761 36767 36779 36781 36787 36791 36793
-36809 36821 36833 36847 36857 36871 36877 36887 36899 36901 36913 36919 36923 36929
-36931 36943 36947 36973 36979 36997 37003 37013 37019 37021 37039 37049 37057 37061
-37087 37097 37117 37123 37139 37159 37171 37181 37189 37199 37201 37217 37223 37243
-37253 37273 37277 37307 37309 37313 37321 37337 37339 37357 37361 37363 37369 37379
-37397 37409 37423 37441 37447 37463 37483 37489 37493 37501 37507 37511 37517 37529
-37537 37547 37549 37561 37567 37571 37573 37579 37589 37591 37607 37619 37633 37643
-37649 37657 37663 37691 37693 37699 37717 37747 37781 37783 37799 37811 37813 37831
-37847 37853 37861 37871 37879 37889 37897 37907 37951 37957 37963 37967 37987 37991
-37993 37997 38011 38039 38047 38053 38069 38083 38113 38119 38149 38153 38167 38177
-38183 38189 38197 38201 38219 38231 38237 38239 38261 38273 38281 38287 38299 38303
-38317 38321 38327 38329 38333 38351 38371 38377 38393 38431 38447 38449 38453 38459
-38461 38501 38543 38557 38561 38567 38569 38593 38603 38609 38611 38629 38639 38651
-38653 38669 38671 38677 38693 38699 38707 38711 38713 38723 38729 38737 38747 38749
-38767 38783 38791 38803 38821 38833 38839 38851 38861 38867 38873 38891 38903 38917
-38921 38923 38933 38953 38959 38971 38977 38993 39019 39023 39041 39043 39047 39079
-39089 39097 39103 39107 39113 39119 39133 39139 39157 39161 39163 39181 39191 39199
-39209 39217 39227 39229 39233 39239 39241 39251 39293 39301 39313 39317 39323 39341
-39343 39359 39367 39371 39373 39383 39397 39409 39419 39439 39443 39451 39461 39499
-39503 39509 39511 39521 39541 39551 39563 39569 39581 39607 39619 39623 39631 39659
-39667 39671 39679 39703 39709 39719 39727 39733 39749 39761 39769 39779 39791 39799
-39821 39827 39829 39839 39841 39847 39857 39863 39869 39877 39883 39887 39901 39929
-39937 39953 39971 39979 39983 39989 40009 40013 40031 40037 40039 40063 40087 40093
-40099 40111 40123 40127 40129 40151 40153 40163 40169 40177 40189 40193 40213 40231
-40237 40241 40253 40277 40283 40289 40343 40351 40357 40361 40387 40423 40427 40429
-40433 40459 40471 40483 40487 40493 40499 40507 40519 40529 40531 40543 40559 40577
-40583 40591 40597 40609 40627 40637 40639 40693 40697 40699 40709 40739 40751 40759
-40763 40771 40787 40801 40813 40819 40823 40829 40841 40847 40849 40853 40867 40879
-40883 40897 40903 40927 40933 40939 40949 40961 40973 40993 41011 41017 41023 41039
-41047 41051 41057 41077 41081 41113 41117 41131 41141 41143 41149 41161 41177 41179
-41183 41189 41201 41203 41213 41221 41227 41231 41233 41243 41257 41263 41269 41281
-41299 41333 41341 41351 41357 41381 41387 41389 41399 41411 41413 41443 41453 41467
-41479 41491 41507 41513 41519 41521 41539 41543 41549 41579 41593 41597 41603 41609
-41611 41617 41621 41627 41641 41647 41651 41659 41669 41681 41687 41719 41729 41737
-41759 41761 41771 41777 41801 41809 41813 41843 41849 41851 41863 41879 41887 41893
-41897 41903 41911 41927 41941 41947 41953 41957 41959 41969 41981 41983 41999 42013
-42017 42019 42023 42043 42061 42071 42073 42083 42089 42101 42131 42139 42157 42169
-42179 42181 42187 42193 42197 42209 42221 42223 42227 42239 42257 42281 42283 42293
-42299 42307 42323 42331 42337 42349 42359 42373 42379 42391 42397 42403 42407 42409
-42433 42437 42443 42451 42457 42461 42463 42467 42473 42487 42491 42499 42509 42533
-42557 42569 42571 42577 42589 42611 42641 42643 42649 42667 42677 42683 42689 42697
-42701 42703 42709 42719 42727 42737 42743 42751 42767 42773 42787 42793 42797 42821
-42829 42839 42841 42853 42859 42863 42899 42901 42923 42929 42937 42943 42953 42961
-42967 42979 42989 43003 43013 43019 43037 43049 43051 43063 43067 43093 43103 43117
-43133 43151 43159 43177 43189 43201 43207 43223 43237 43261 43271 43283 43291 43313
-43319 43321 43331 43391 43397 43399 43403 43411 43427 43441 43451 43457 43481 43487
-43499 43517 43541 43543 43573 43577 43579 43591 43597 43607 43609 43613 43627 43633
-43649 43651 43661 43669 43691 43711 43717 43721 43753 43759 43777 43781 43783 43787
-43789 43793 43801 43853 43867 43889 43891 43913 43933 43943 43951 43961 43963 43969
-43973 43987 43991 43997 44017 44021 44027 44029 44041 44053 44059 44071 44087 44089
-44101 44111 44119 44123 44129 44131 44159 44171 44179 44189 44201 44203 44207 44221
-44249 44257 44263 44267 44269 44273 44279 44281 44293 44351 44357 44371 44381 44383
-44389 44417 44449 44453 44483 44491 44497 44501 44507 44519 44531 44533 44537 44543
-44549 44563 44579 44587 44617 44621 44623 44633 44641 44647 44651 44657 44683 44687
-44699 44701 44711 44729 44741 44753 44771 44773 44777 44789 44797 44809 44819 44839
-44843 44851 44867 44879 44887 44893 44909 44917 44927 44939 44953 44959 44963 44971
-44983 44987 45007 45013 45053 45061 45077 45083 45119 45121 45127 45131 45137 45139
-45161 45179 45181 45191 45197 45233 45247 45259 45263 45281 45289 45293 45307 45317
-45319 45329 45337 45341 45343 45361 45377 45389 45403 45413 45427 45433 45439 45481
-45491 45497 45503 45523 45533 45541 45553 45557 45569 45587 45589 45599 45613 45631
-45641 45659 45667 45673 45677 45691 45697 45707 45737 45751 45757 45763 45767 45779
-45817 45821 45823 45827 45833 45841 45853 45863 45869 45887 45893 45943 45949 45953
-45959 45971 45979 45989 46021 46027 46049 46051 46061 46073 46091 46093 46099 46103
-46133 46141 46147 46153 46171 46181 46183 46187 46199 46219 46229 46237 46261 46271
-46273 46279 46301 46307 46309 46327 46337 46349 46351 46381 46399 46411 46439 46441
-46447 46451 46457 46471 46477 46489 46499 46507 46511 46523 46549 46559 46567 46573
-46589 46591 46601 46619 46633 46639 46643 46649 46663 46679 46681 46687 46691 46703
-46723 46727 46747 46751 46757 46769 46771 46807 46811 46817 46819 46829 46831 46853
-46861 46867 46877 46889 46901 46919 46933 46957 46993 46997 47017 47041 47051 47057
-47059 47087 47093 47111 47119 47123 47129 47137 47143 47147 47149 47161 47189 47207
-47221 47237 47251 47269 47279 47287 47293 47297 47303 47309 47317 47339 47351 47353
-47363 47381 47387 47389 47407 47417 47419 47431 47441 47459 47491 47497 47501 47507
-47513 47521 47527 47533 47543 47563 47569 47581 47591 47599 47609 47623 47629 47639
-47653 47657 47659 47681 47699 47701 47711 47713 47717 47737 47741 47743 47777 47779
-47791 47797 47807 47809 47819 47837 47843 47857 47869 47881 47903 47911 47917 47933
-47939 47947 47951 47963 47969 47977 47981 48017 48023 48029 48049 48073 48079 48091
-48109 48119 48121 48131 48157 48163 48179 48187 48193 48197 48221 48239 48247 48259
-48271 48281 48299 48311 48313 48337 48341 48353 48371 48383 48397 48407 48409 48413
-48437 48449 48463 48473 48479 48481 48487 48491 48497 48523 48527 48533 48539 48541
-48563 48571 48589 48593 48611 48619 48623 48647 48649 48661 48673 48677 48679 48731
-48733 48751 48757 48761 48767 48779 48781 48787 48799 48809 48817 48821 48823 48847
-48857 48859 48869 48871 48883 48889 48907 48947 48953 48973 48989 48991 49003 49009
-49019 49031 49033 49037 49043 49057 49069 49081 49103 49109 49117 49121 49123 49139
-49157 49169 49171 49177 49193 49199 49201 49207 49211 49223 49253 49261 49277 49279
-49297 49307 49331 49333 49339 49363 49367 49369 49391 49393 49409 49411 49417 49429
-49433 49451 49459 49463 49477 49481 49499 49523 49529 49531 49537 49547 49549 49559
-49597 49603 49613 49627 49633 49639 49663 49667 49669 49681 49697 49711 49727 49739
-49741 49747 49757 49783 49787 49789 49801 49807 49811 49823 49831 49843 49853 49871
-49877 49891 49919 49921 49927 49937 49939 49943 49957 49991 49993 49999 50021 50023
-50033 50047 50051 50053 50069 50077 50087 50093 50101 50111 50119 50123 50129 50131
-50147 50153 50159 50177 50207 50221 50227 50231 50261 50263 50273 50287 50291 50311
-50321 50329 50333 50341 50359 50363 50377 50383 50387 50411 50417 50423 50441 50459
-50461 50497 50503 50513 50527 50539 50543 50549 50551 50581 50587 50591 50593 50599
-50627 50647 50651 50671 50683 50707 50723 50741 50753 50767 50773 50777 50789 50821
-50833 50839 50849 50857 50867 50873 50891 50893 50909 50923 50929 50951 50957 50969
-50971 50989 50993 51001 51031 51043 51047 51059 51061 51071 51109 51131 51133 51137
-51151 51157 51169 51193 51197 51199 51203 51217 51229 51239 51241 51257 51263 51283
-51287 51307 51329 51341 51343 51347 51349 51361 51383 51407 51413 51419 51421 51427
-51431 51437 51439 51449 51461 51473 51479 51481 51487 51503 51511 51517 51521 51539
-51551 51563 51577 51581 51593 51599 51607 51613 51631 51637 51647 51659 51673 51679
-51683 51691 51713 51719 51721 51749 51767 51769 51787 51797 51803 51817 51827 51829
-51839 51853 51859 51869 51871 51893 51899 51907 51913 51929 51941 51949 51971 51973
-51977 51991 52009 52021 52027 52051 52057 52067 52069 52081 52103 52121 52127 52147
-52153 52163 52177 52181 52183 52189 52201 52223 52237 52249 52253 52259 52267 52289
-52291 52301 52313 52321 52361 52363 52369 52379 52387 52391 52433 52453 52457 52489
-52501 52511 52517 52529 52541 52543 52553 52561 52567 52571 52579 52583 52609 52627
-52631 52639 52667 52673 52691 52697 52709 52711 52721 52727 52733 52747 52757 52769
-52783 52807 52813 52817 52837 52859 52861 52879 52883 52889 52901 52903 52919 52937
-52951 52957 52963 52967 52973 52981 52999 53003 53017 53047 53051 53069 53077 53087
-53089 53093 53101 53113 53117 53129 53147 53149 53161 53171 53173 53189 53197 53201
-53231 53233 53239 53267 53269 53279 53281 53299 53309 53323 53327 53353 53359 53377
-53381 53401 53407 53411 53419 53437 53441 53453 53479 53503 53507 53527 53549 53551
-53569 53591 53593 53597 53609 53611 53617 53623 53629 53633 53639 53653 53657 53681
-53693 53699 53717 53719 53731 53759 53773 53777 53783 53791 53813 53819 53831 53849
-53857 53861 53881 53887 53891 53897 53899 53917 53923 53927 53939 53951 53959 53987
-53993 54001 54011 54013 54037 54049 54059 54083 54091 54101 54121 54133 54139 54151
-54163 54167 54181 54193 54217 54251 54269 54277 54287 54293 54311 54319 54323 54331
-54347 54361 54367 54371 54377 54401 54403 54409 54413 54419 54421 54437 54443 54449
-54469 54493 54497 54499 54503 54517 54521 54539 54541 54547 54559 54563 54577 54581
-54583 54601 54617 54623 54629 54631 54647 54667 54673 54679 54709 54713 54721 54727
-54751 54767 54773 54779 54787 54799 54829 54833 54851 54869 54877 54881 54907 54917
-54919 54941 54949 54959 54973 54979 54983 55001 55009 55021 55049 55051 55057 55061
-55073 55079 55103 55109 55117 55127 55147 55163 55171 55201 55207 55213 55217 55219
-55229 55243 55249 55259 55291 55313 55331 55333 55337 55339 55343 55351 55373 55381
-55399 55411 55439 55441 55457 55469 55487 55501 55511 55529 55541 55547 55579 55589
-55603 55609 55619 55621 55631 55633 55639 55661 55663 55667 55673 55681 55691 55697
-55711 55717 55721 55733 55763 55787 55793 55799 55807 55813 55817 55819 55823 55829
-55837 55843 55849 55871 55889 55897 55901 55903 55921 55927 55931 55933 55949 55967
-55987 55997 56003 56009 56039 56041 56053 56081 56087 56093 56099 56101 56113 56123
-56131 56149 56167 56171 56179 56197 56207 56209 56237 56239 56249 56263 56267 56269
-56299 56311 56333 56359 56369 56377 56383 56393 56401 56417 56431 56437 56443 56453
-56467 56473 56477 56479 56489 56501 56503 56509 56519 56527 56531 56533 56543 56569
-56591 56597 56599 56611 56629 56633 56659 56663 56671 56681 56687 56701 56711 56713
-56731 56737 56747 56767 56773 56779 56783 56807 56809 56813 56821 56827 56843 56857
-56873 56891 56893 56897 56909 56911 56921 56923 56929 56941 56951 56957 56963 56983
-56989 56993 56999 57037 57041 57047 57059 57073 57077 57089 57097 57107 57119 57131
-57139 57143 57149 57163 57173 57179 57191 57193 57203 57221 57223 57241 57251 57259
-57269 57271 57283 57287 57301 57329 57331 57347 57349 57367 57373 57383 57389 57397
-57413 57427 57457 57467 57487 57493 57503 57527 57529 57557 57559 57571 57587 57593
-57601 57637 57641 57649 57653 57667 57679 57689 57697 57709 57713 57719 57727 57731
-57737 57751 57773 57781 57787 57791 57793 57803 57809 57829 57839 57847 57853 57859
-57881 57899 57901 57917 57923 57943 57947 57973 57977 57991 58013 58027 58031 58043
-58049 58057 58061 58067 58073 58099 58109 58111 58129 58147 58151 58153 58169 58171
-58189 58193 58199 58207 58211 58217 58229 58231 58237 58243 58271 58309 58313 58321
-58337 58363 58367 58369 58379 58391 58393 58403 58411 58417 58427 58439 58441 58451
-58453 58477 58481 58511 58537 58543 58549 58567 58573 58579 58601 58603 58613 58631
-58657 58661 58679 58687 58693 58699 58711 58727 58733 58741 58757 58763 58771 58787
-58789 58831 58889 58897 58901 58907 58909 58913 58921 58937 58943 58963 58967 58979
-58991 58997 59009 59011 59021 59023 59029 59051 59053 59063 59069 59077 59083 59093
-59107 59113 59119 59123 59141 59149 59159 59167 59183 59197 59207 59209 59219 59221
-59233 59239 59243 59263 59273 59281 59333 59341 59351 59357 59359 59369 59377 59387
-59393 59399 59407 59417 59419 59441 59443 59447 59453 59467 59471 59473 59497 59509
-59513 59539 59557 59561 59567 59581 59611 59617 59621 59627 59629 59651 59659 59663
-59669 59671 59693 59699 59707 59723 59729 59743 59747 59753 59771 59779 59791 59797
-59809 59833 59863 59879 59887 59921 59929 59951 59957 59971 59981 59999 60013 60017
-60029 60037 60041 60077 60083 60089 60091 60101 60103 60107 60127 60133 60139 60149
-60161 60167 60169 60209 60217 60223 60251 60257 60259 60271 60289 60293 60317 60331
-60337 60343 60353 60373 60383 60397 60413 60427 60443 60449 60457 60493 60497 60509
-60521 60527 60539 60589 60601 60607 60611 60617 60623 60631 60637 60647 60649 60659
-60661 60679 60689 60703 60719 60727 60733 60737 60757 60761 60763 60773 60779 60793
-60811 60821 60859 60869 60887 60889 60899 60901 60913 60917 60919 60923 60937 60943
-60953 60961 61001 61007 61027 61031 61043 61051 61057 61091 61099 61121 61129 61141
-61151 61153 61169 61211 61223 61231 61253 61261 61283 61291 61297 61331 61333 61339
-61343 61357 61363 61379 61381 61403 61409 61417 61441 61463 61469 61471 61483 61487
-61493 61507 61511 61519 61543 61547 61553 61559 61561 61583 61603 61609 61613 61627
-61631 61637 61643 61651 61657 61667 61673 61681 61687 61703 61717 61723 61729 61751
-61757 61781 61813 61819 61837 61843 61861 61871 61879 61909 61927 61933 61949 61961
-61967 61979 61981 61987 61991 62003 62011 62017 62039 62047 62053 62057 62071 62081
-62099 62119 62129 62131 62137 62141 62143 62171 62189 62191 62201 62207 62213 62219
-62233 62273 62297 62299 62303 62311 62323 62327 62347 62351 62383 62401 62417 62423
-62459 62467 62473 62477 62483 62497 62501 62507 62533 62539 62549 62563 62581 62591
-62597 62603 62617 62627 62633 62639 62653 62659 62683 62687 62701 62723 62731 62743
-62753 62761 62773 62791 62801 62819 62827 62851 62861 62869 62873 62897 62903 62921
-62927 62929 62939 62969 62971 62981 62983 62987 62989 63029 63031 63059 63067 63073
-63079 63097 63103 63113 63127 63131 63149 63179 63197 63199 63211 63241 63247 63277
-63281 63299 63311 63313 63317 63331 63337 63347 63353 63361 63367 63377 63389 63391
-63397 63409 63419 63421 63439 63443 63463 63467 63473 63487 63493 63499 63521 63527
-63533 63541 63559 63577 63587 63589 63599 63601 63607 63611 63617 63629 63647 63649
-63659 63667 63671 63689 63691 63697 63703 63709 63719 63727 63737 63743 63761 63773
-63781 63793 63799 63803 63809 63823 63839 63841 63853 63857 63863 63901 63907 63913
-63929 63949 63977 63997 64007 64013 64019 64033 64037 64063 64067 64081 64091 64109
-64123 64151 64153 64157 64171 64187 64189 64217 64223 64231 64237 64271 64279 64283
-64301 64303 64319 64327 64333 64373 64381 64399 64403 64433 64439 64451 64453 64483
-64489 64499 64513 64553 64567 64577 64579 64591 64601 64609 64613 64621 64627 64633
-64661 64663 64667 64679 64693 64709 64717 64747 64763 64781 64783 64793 64811 64817
-64849 64853 64871 64877 64879 64891 64901 64919 64921 64927 64937 64951 64969 64997
-65003 65011 65027 65029 65033 65053 65063 65071 65089 65099 65101 65111 65119 65123
-65129 65141 65147 65167 65171 65173 65179 65183 65203 65213 65239 65257 65267 65269
-65287 65293 65309 65323 65327 65353 65357 65371 65381 65393 65407 65413 65419 65423
-65437 65447 65449 65479 65497 65519 65521 65537 65539 65543 65551 65557 65563 65579
-65581 65587 65599 65609 65617 65629 65633 65647 65651 65657 65677 65687 65699 65701
-65707 65713 65717 65719 65729 65731 65761 65777 65789 65809 65827 65831 65837 65839
-65843 65851 65867 65881 65899 65921 65927 65929 65951 65957 65963 65981 65983 65993
-66029 66037 66041 66047 66067 66071 66083 66089 66103 66107 66109 66137 66161 66169
-66173 66179 66191 66221 66239 66271 66293 66301 66337 66343 66347 66359 66361 66373
-66377 66383 66403 66413 66431 66449 66457 66463 66467 66491 66499 66509 66523 66529
-66533 66541 66553 66569 66571 66587 66593 66601 66617 66629 66643 66653 66683 66697
-66701 66713 66721 66733 66739 66749 66751 66763 66791 66797 66809 66821 66841 66851
-66853 66863 66877 66883 66889 66919 66923 66931 66943 66947 66949 66959 66973 66977
-67003 67021 67033 67043 67049 67057 67061 67073 67079 67103 67121 67129 67139 67141
-67153 67157 67169 67181 67187 67189 67211 67213 67217 67219 67231 67247 67261 67271
-67273 67289 67307 67339 67343 67349 67369 67391 67399 67409 67411 67421 67427 67429
-67433 67447 67453 67477 67481 67489 67493 67499 67511 67523 67531 67537 67547 67559
-67567 67577 67579 67589 67601 67607 67619 67631 67651 67679 67699 67709 67723 67733
-67741 67751 67757 67759 67763 67777 67783 67789 67801 67807 67819 67829 67843 67853
-67867 67883 67891 67901 67927 67931 67933 67939 67943 67957 67961 67967 67979 67987
-67993 68023 68041 68053 68059 68071 68087 68099 68111 68113 68141 68147 68161 68171
-68207 68209 68213 68219 68227 68239 68261 68279 68281 68311 68329 68351 68371 68389
-68399 68437 68443 68447 68449 68473 68477 68483 68489 68491 68501 68507 68521 68531
-68539 68543 68567 68581 68597 68611 68633 68639 68659 68669 68683 68687 68699 68711
-68713 68729 68737 68743 68749 68767 68771 68777 68791 68813 68819 68821 68863 68879
-68881 68891 68897 68899 68903 68909 68917 68927 68947 68963 68993 69001 69011 69019
-69029 69031 69061 69067 69073 69109 69119 69127 69143 69149 69151 69163 69191 69193
-69197 69203 69221 69233 69239 69247 69257 69259 69263 69313 69317 69337 69341 69371
-69379 69383 69389 69401 69403 69427 69431 69439 69457 69463 69467 69473 69481 69491
-69493 69497 69499 69539 69557 69593 69623 69653 69661 69677 69691 69697 69709 69737
-69739 69761 69763 69767 69779 69809 69821 69827 69829 69833 69847 69857 69859 69877
-69899 69911 69929 69931 69941 69959 69991 69997 70001 70003 70009 70019 70039 70051
-70061 70067 70079 70099 70111 70117 70121 70123 70139 70141 70157 70163 70177 70181
-70183 70199 70201 70207 70223 70229 70237 70241 70249 70271 70289 70297 70309 70313
-70321 70327 70351 70373 70379 70381 70393 70423 70429 70439 70451 70457 70459 70481
-70487 70489 70501 70507 70529 70537 70549 70571 70573 70583 70589 70607 70619 70621
-70627 70639 70657 70663 70667 70687 70709 70717 70729 70753 70769 70783 70793 70823
-70841 70843 70849 70853 70867 70877 70879 70891 70901 70913 70919 70921 70937 70949
-70951 70957 70969 70979 70981 70991 70997 70999 71011 71023 71039 71059 71069 71081
-71089 71119 71129 71143 71147 71153 71161 71167 71171 71191 71209 71233 71237 71249
-71257 71261 71263 71287 71293 71317 71327 71329 71333 71339 71341 71347 71353 71359
-71363 71387 71389 71399 71411 71413 71419 71429 71437 71443 71453 71471 71473 71479
-71483 71503 71527 71537 71549 71551 71563 71569 71593 71597 71633 71647 71663 71671
-71693 71699 71707 71711 71713 71719 71741 71761 71777 71789 71807 71809 71821 71837
-71843 71849 71861 71867 71879 71881 71887 71899 71909 71917 71933 71941 71947 71963
-71971 71983 71987 71993 71999 72019 72031 72043 72047 72053 72073 72077 72089 72091
-72101 72103 72109 72139 72161 72167 72169 72173 72211 72221 72223 72227 72229 72251
-72253 72269 72271 72277 72287 72307 72313 72337 72341 72353 72367 72379 72383 72421
-72431 72461 72467 72469 72481 72493 72497 72503 72533 72547 72551 72559 72577 72613
-72617 72623 72643 72647 72649 72661 72671 72673 72679 72689 72701 72707 72719 72727
-72733 72739 72763 72767 72797 72817 72823 72859 72869 72871 72883 72889 72893 72901
-72907 72911 72923 72931 72937 72949 72953 72959 72973 72977 72997 73009 73013 73019
-73037 73039 73043 73061 73063 73079 73091 73121 73127 73133 73141 73181 73189 73237
-73243 73259 73277 73291 73303 73309 73327 73331 73351 73361 73363 73369 73379 73387
-73417 73421 73433 73453 73459 73471 73477 73483 73517 73523 73529 73547 73553 73561
-73571 73583 73589 73597 73607 73609 73613 73637 73643 73651 73673 73679 73681 73693
-73699 73709 73721 73727 73751 73757 73771 73783 73819 73823 73847 73849 73859 73867
-73877 73883 73897 73907 73939 73943 73951 73961 73973 73999 74017 74021 74027 74047
-74051 74071 74077 74093 74099 74101 74131 74143 74149 74159 74161 74167 74177 74189
-74197 74201 74203 74209 74219 74231 74257 74279 74287 74293 74297 74311 74317 74323
-74353 74357 74363 74377 74381 74383 74411 74413 74419 74441 74449 74453 74471 74489
-74507 74509 74521 74527 74531 74551 74561 74567 74573 74587 74597 74609 74611 74623
-74653 74687 74699 74707 74713 74717 74719 74729 74731 74747 74759 74761 74771 74779
-74797 74821 74827 74831 74843 74857 74861 74869 74873 74887 74891 74897 74903 74923
-74929 74933 74941 74959 75011 75013 75017 75029 75037 75041 75079 75083 75109 75133
-75149 75161 75167 75169 75181 75193 75209 75211 75217 75223 75227 75239 75253 75269
-75277 75289 75307 75323 75329 75337 75347 75353 75367 75377 75389 75391 75401 75403
-75407 75431 75437 75479 75503 75511 75521 75527 75533 75539 75541 75553 75557 75571
-75577 75583 75611 75617 75619 75629 75641 75653 75659 75679 75683 75689 75703 75707
-75709 75721 75731 75743 75767 75773 75781 75787 75793 75797 75821 75833 75853 75869
-75883 75913 75931 75937 75941 75967 75979 75983 75989 75991 75997 76001 76003 76031
-76039 76079 76081 76091 76099 76103 76123 76129 76147 76157 76159 76163 76207 76213
-76231 76243 76249 76253 76259 76261 76283 76289 76303 76333 76343 76367 76369 76379
-76387 76403 76421 76423 76441 76463 76471 76481 76487 76493 76507 76511 76519 76537
-76541 76543 76561 76579 76597 76603 76607 76631 76649 76651 76667 76673 76679 76697
-76717 76733 76753 76757 76771 76777 76781 76801 76819 76829 76831 76837 76847 76871
-76873 76883 76907 76913 76919 76943 76949 76961 76963 76991 77003 77017 77023 77029
-77041 77047 77069 77081 77093 77101 77137 77141 77153 77167 77171 77191 77201 77213
-77237 77239 77243 77249 77261 77263 77267 77269 77279 77291 77317 77323 77339 77347
-77351 77359 77369 77377 77383 77417 77419 77431 77447 77471 77477 77479 77489 77491
-77509 77513 77521 77527 77543 77549 77551 77557 77563 77569 77573 77587 77591 77611
-77617 77621 77641 77647 77659 77681 77687 77689 77699 77711 77713 77719 77723 77731
-77743 77747 77761 77773 77783 77797 77801 77813 77839 77849 77863 77867 77893 77899
-77929 77933 77951 77969 77977 77983 77999 78007 78017 78031 78041 78049 78059 78079
-78101 78121 78137 78139 78157 78163 78167 78173 78179 78191 78193 78203 78229 78233
-78241 78259 78277 78283 78301 78307 78311 78317 78341 78347 78367 78401 78427 78437
-78439 78467 78479 78487 78497 78509 78511 78517 78539 78541 78553 78569 78571 78577
-78583 78593 78607 78623 78643 78649 78653 78691 78697 78707 78713 78721 78737 78779
-78781 78787 78791 78797 78803 78809 78823 78839 78853 78857 78877 78887 78889 78893
-78901 78919 78929 78941 78977 78979 78989 79031 79039 79043 79063 79087 79103 79111
-79133 79139 79147 79151 79153 79159 79181 79187 79193 79201 79229 79231 79241 79259
-79273 79279 79283 79301 79309 79319 79333 79337 79349 79357 79367 79379 79393 79397
-79399 79411 79423 79427 79433 79451 79481 79493 79531 79537 79549 79559 79561 79579
-79589 79601 79609 79613 79621 79627 79631 79633 79657 79669 79687 79691 79693 79697
-79699 79757 79769 79777 79801 79811 79813 79817 79823 79829 79841 79843 79847 79861
-79867 79873 79889 79901 79903 79907 79939 79943 79967 79973 79979 79987 79997 79999
-80021 80039 80051 80071 80077 80107 80111 80141 80147 80149 80153 80167 80173 80177
-80191 80207 80209 80221 80231 80233 80239 80251 80263 80273 80279 80287 80309 80317
-80329 80341 80347 80363 80369 80387 80407 80429 80447 80449 80471 80473 80489 80491
-80513 80527 80537 80557 80567 80599 80603 80611 80621 80627 80629 80651 80657 80669
-80671 80677 80681 80683 80687 80701 80713 80737 80747 80749 80761 80777 80779 80783
-80789 80803 80809 80819 80831 80833 80849 80863 80897 80909 80911 80917 80923 80929
-80933 80953 80963 80989 81001 81013 81017 81019 81023 81031 81041 81043 81047 81049
-81071 81077 81083 81097 81101 81119 81131 81157 81163 81173 81181 81197 81199 81203
-81223 81233 81239 81281 81283 81293 81299 81307 81331 81343 81349 81353 81359 81371
-81373 81401 81409 81421 81439 81457 81463 81509 81517 81527 81533 81547 81551 81553
-81559 81563 81569 81611 81619 81629 81637 81647 81649 81667 81671 81677 81689 81701
-81703 81707 81727 81737 81749 81761 81769 81773 81799 81817 81839 81847 81853 81869
-81883 81899 81901 81919 81929 81931 81937 81943 81953 81967 81971 81973 82003 82007
-82009 82013 82021 82031 82037 82039 82051 82067 82073 82129 82139 82141 82153 82163
-82171 82183 82189 82193 82207 82217 82219 82223 82231 82237 82241 82261 82267 82279
-82301 82307 82339 82349 82351 82361 82373 82387 82393 82421 82457 82463 82469 82471
-82483 82487 82493 82499 82507 82529 82531 82549 82559 82561 82567 82571 82591 82601
-82609 82613 82619 82633 82651 82657 82699 82721 82723 82727 82729 82757 82759 82763
-82781 82787 82793 82799 82811 82813 82837 82847 82883 82889 82891 82903 82913 82939
-82963 82981 82997 83003 83009 83023 83047 83059 83063 83071 83077 83089 83093 83101
-83117 83137 83177 83203 83207 83219 83221 83227 83231 83233 83243 83257 83267 83269
-83273 83299 83311 83339 83341 83357 83383 83389 83399 83401 83407 83417 83423 83431
-83437 83443 83449 83459 83471 83477 83497 83537 83557 83561 83563 83579 83591 83597
-83609 83617 83621 83639 83641 83653 83663 83689 83701 83717 83719 83737 83761 83773
-83777 83791 83813 83833 83843 83857 83869 83873 83891 83903 83911 83921 83933 83939
-83969 83983 83987 84011 84017 84047 84053 84059 84061 84067 84089 84121 84127 84131
-84137 84143 84163 84179 84181 84191 84199 84211 84221 84223 84229 84239 84247 84263
-84299 84307 84313 84317 84319 84347 84349 84377 84389 84391 84401 84407 84421 84431
-84437 84443 84449 84457 84463 84467 84481 84499 84503 84509 84521 84523 84533 84551
-84559 84589 84629 84631 84649 84653 84659 84673 84691 84697 84701 84713 84719 84731
-84737 84751 84761 84787 84793 84809 84811 84827 84857 84859 84869 84871 84913 84919
-84947 84961 84967 84977 84979 84991 85009 85021 85027 85037 85049 85061 85081 85087
-85091 85093 85103 85109 85121 85133 85147 85159 85193 85199 85201 85213 85223 85229
-85237 85243 85247 85259 85297 85303 85313 85331 85333 85361 85363 85369 85381 85411
-85427 85429 85439 85447 85451 85453 85469 85487 85513 85517 85523 85531 85549 85571
-85577 85597 85601 85607 85619 85621 85627 85639 85643 85661 85667 85669 85691 85703
-85711 85717 85733 85751 85781 85793 85817 85819 85829 85831 85837 85843 85847 85853
-85889 85903 85909 85931 85933 85991 85999 86011 86017 86027 86029 86069 86077 86083
-86111 86113 86117 86131 86137 86143 86161 86171 86179 86183 86197 86201 86209 86239
-86243 86249 86257 86263 86269 86287 86291 86293 86297 86311 86323 86341 86351 86353
-86357 86369 86371 86381 86389 86399 86413 86423 86441 86453 86461 86467 86477 86491
-86501 86509 86531 86533 86539 86561 86573 86579 86587 86599 86627 86629 86677 86689
-86693 86711 86719 86729 86743 86753 86767 86771 86783 86813 86837 86843 86851 86857
-86861 86869 86923 86927 86929 86939 86951 86959 86969 86981 86993 87011 87013 87037
-87041 87049 87071 87083 87103 87107 87119 87121 87133 87149 87151 87179 87181 87187
-87211 87221 87223 87251 87253 87257 87277 87281 87293 87299 87313 87317 87323 87337
-87359 87383 87403 87407 87421 87427 87433 87443 87473 87481 87491 87509 87511 87517
-87523 87539 87541 87547 87553 87557 87559 87583 87587 87589 87613 87623 87629 87631
-87641 87643 87649 87671 87679 87683 87691 87697 87701 87719 87721 87739 87743 87751
-87767 87793 87797 87803 87811 87833 87853 87869 87877 87881 87887 87911 87917 87931
-87943 87959 87961 87973 87977 87991 88001 88003 88007 88019 88037 88069 88079 88093
-88117 88129 88169 88177 88211 88223 88237 88241 88259 88261 88289 88301 88321 88327
-88337 88339 88379 88397 88411 88423 88427 88463 88469 88471 88493 88499 88513 88523
-88547 88589 88591 88607 88609 88643 88651 88657 88661 88663 88667 88681 88721 88729
-88741 88747 88771 88789 88793 88799 88801 88807 88811 88813 88817 88819 88843 88853
-88861 88867 88873 88883 88897 88903 88919 88937 88951 88969 88993 88997 89003 89009
-89017 89021 89041 89051 89057 89069 89071 89083 89087 89101 89107 89113 89119 89123
-89137 89153 89189 89203 89209 89213 89227 89231 89237 89261 89269 89273 89293 89303
-89317 89329 89363 89371 89381 89387 89393 89399 89413 89417 89431 89443 89449 89459
-89477 89491 89501 89513 89519 89521 89527 89533 89561 89563 89567 89591 89597 89599
-89603 89611 89627 89633 89653 89657 89659 89669 89671 89681 89689 89753 89759 89767
-89779 89783 89797 89809 89819 89821 89833 89839 89849 89867 89891 89897 89899 89909
-89917 89923 89939 89959 89963 89977 89983 89989 90001 90007 90011 90017 90019 90023
-90031 90053 90059 90067 90071 90073 90089 90107 90121 90127 90149 90163 90173 90187
-90191 90197 90199 90203 90217 90227 90239 90247 90263 90271 90281 90289 90313 90353
-90359 90371 90373 90379 90397 90401 90403 90407 90437 90439 90469 90473 90481 90499
-90511 90523 90527 90529 90533 90547 90583 90599 90617 90619 90631 90641 90647 90659
-90677 90679 90697 90703 90709 90731 90749 90787 90793 90803 90821 90823 90833 90841
-90847 90863 90887 90901 90907 90911 90917 90931 90947 90971 90977 90989 90997 91009
-91019 91033 91079 91081 91097 91099 91121 91127 91129 91139 91141 91151 91153 91159
-91163 91183 91193 91199 91229 91237 91243 91249 91253 91283 91291 91297 91303 91309
-91331 91367 91369 91373 91381 91387 91393 91397 91411 91423 91433 91453 91457 91459
-91463 91493 91499 91513 91529 91541 91571 91573 91577 91583 91591 91621 91631 91639
-91673 91691 91703 91711 91733 91753 91757 91771 91781 91801 91807 91811 91813 91823
-91837 91841 91867 91873 91909 91921 91939 91943 91951 91957 91961 91967 91969 91997
-92003 92009 92033 92041 92051 92077 92083 92107 92111 92119 92143 92153 92173 92177
-92179 92189 92203 92219 92221 92227 92233 92237 92243 92251 92269 92297 92311 92317
-92333 92347 92353 92357 92363 92369 92377 92381 92383 92387 92399 92401 92413 92419
-92431 92459 92461 92467 92479 92489 92503 92507 92551 92557 92567 92569 92581 92593
-92623 92627 92639 92641 92647 92657 92669 92671 92681 92683 92693 92699 92707 92717
-92723 92737 92753 92761 92767 92779 92789 92791 92801 92809 92821 92831 92849 92857
-92861 92863 92867 92893 92899 92921 92927 92941 92951 92957 92959 92987 92993 93001
-93047 93053 93059 93077 93083 93089 93097 93103 93113 93131 93133 93139 93151 93169
-93179 93187 93199 93229 93239 93241 93251 93253 93257 93263 93281 93283 93287 93307
-93319 93323 93329 93337 93371 93377 93383 93407 93419 93427 93463 93479 93481 93487
-93491 93493 93497 93503 93523 93529 93553 93557 93559 93563 93581 93601 93607 93629
-93637 93683 93701 93703 93719 93739 93761 93763 93787 93809 93811 93827 93851 93871
-93887 93889 93893 93901 93911 93913 93923 93937 93941 93949 93967 93971 93979 93983
-93997 94007 94009 94033 94049 94057 94063 94079 94099 94109 94111 94117 94121 94151
-94153 94169 94201 94207 94219 94229 94253 94261 94273 94291 94307 94309 94321 94327
-94331 94343 94349 94351 94379 94397 94399 94421 94427 94433 94439 94441 94447 94463
-94477 94483 94513 94529 94531 94541 94543 94547 94559 94561 94573 94583 94597 94603
-94613 94621 94649 94651 94687 94693 94709 94723 94727 94747 94771 94777 94781 94789
-94793 94811 94819 94823 94837 94841 94847 94849 94873 94889 94903 94907 94933 94949
-94951 94961 94993 94999 95003 95009 95021 95027 95063 95071 95083 95087 95089 95093
-95101 95107 95111 95131 95143 95153 95177 95189 95191 95203 95213 95219 95231 95233
-95239 95257 95261 95267 95273 95279 95287 95311 95317 95327 95339 95369 95383 95393
-95401 95413 95419 95429 95441 95443 95461 95467 95471 95479 95483 95507 95527 95531
-95539 95549 95561 95569 95581 95597 95603 95617 95621 95629 95633 95651 95701 95707
-95713 95717 95723 95731 95737 95747 95773 95783 95789 95791 95801 95803 95813 95819
-95857 95869 95873 95881 95891 95911 95917 95923 95929 95947 95957 95959 95971 95987
-95989 96001 96013 96017 96043 96053 96059 96079 96097 96137 96149 96157 96167 96179
-96181 96199 96211 96221 96223 96233 96259 96263 96269 96281 96289 96293 96323 96329
-96331 96337 96353 96377 96401 96419 96431 96443 96451 96457 96461 96469 96479 96487
-96493 96497 96517 96527 96553 96557 96581 96587 96589 96601 96643 96661 96667 96671
-96697 96703 96731 96737 96739 96749 96757 96763 96769 96779 96787 96797 96799 96821
-96823 96827 96847 96851 96857 96893 96907 96911 96931 96953 96959 96973 96979 96989
-96997 97001 97003 97007 97021 97039 97073 97081 97103 97117 97127 97151 97157 97159
-97169 97171 97177 97187 97213 97231 97241 97259 97283 97301 97303 97327 97367 97369
-97373 97379 97381 97387 97397 97423 97429 97441 97453 97459 97463 97499 97501 97511
-97523 97547 97549 97553 97561 97571 97577 97579 97583 97607 97609 97613 97649 97651
-97673 97687 97711 97729 97771 97777 97787 97789 97813 97829 97841 97843 97847 97849
-97859 97861 97871 97879 97883 97919 97927 97931 97943 97961 97967 97973 97987 98009
-98011 98017 98041 98047 98057 98081 98101 98123 98129 98143 98179 98207 98213 98221
-98227 98251 98257 98269 98297 98299 98317 98321 98323 98327 98347 98369 98377 98387
-98389 98407 98411 98419 98429 98443 98453 98459 98467 98473 98479 98491 98507 98519
-98533 98543 98561 98563 98573 98597 98621 98627 98639 98641 98663 98669 98689 98711
-98713 98717 98729 98731 98737 98773 98779 98801 98807 98809 98837 98849 98867 98869
-98873 98887 98893 98897 98899 98909 98911 98927 98929 98939 98947 98953 98963 98981
-98993 98999 99013 99017 99023 99041 99053 99079 99083 99089 99103 99109 99119 99131
-99133 99137 99139 99149 99173 99181 99191 99223 99233 99241 99251 99257 99259 99277
-99289 99317 99347 99349 99367 99371 99377 99391 99397 99401 99409 99431 99439 99469
-99487 99497 99523 99527 99529 99551 99559 99563 99571 99577 99581 99607 99611 99623
-99643 99661 99667 99679 99689 99707 99709 99713 99719 99721 99733 99761 99767 99787
-99793 99809 99817 99823 99829 99833 99839 99859 99871 99877 99881 99901 99907 99923
-99929 99961 99971 99989 99991
-100003 100019 100043 100049 100057 100069 100103 100109 100129 100151 100153 100169
-100183 100189 100193 100207 100213 100237 100267 100271 100279 100291 100297 100313
-100333 100343 100357 100361 100363 100379 100391 100393 100403 100411 100417 100447
-100459 100469 100483 100493 100501 100511 100517 100519 100523 100537 100547 100549
-100559 100591 100609 100613 100621 100649 100669 100673 100693 100699 100703 100733
-100741 100747 100769 100787 100799 100801 100811 100823 100829 100847 100853 100907
-100913 100927 100931 100937 100943 100957 100981 100987 100999 101009 101021 101027
-101051 101063 101081 101089 101107 101111 101113 101117 101119 101141 101149 101159
-101161 101173 101183 101197 101203 101207 101209 101221 101267 101273 101279 101281
-101287 101293 101323 101333 101341 101347 101359 101363 101377 101383 101399 101411
-101419 101429 101449 101467 101477 101483 101489 101501 101503 101513 101527 101531
-101533 101537 101561 101573 101581 101599 101603 101611 101627 101641 101653 101663
-101681 101693 101701 101719 101723 101737 101741 101747 101749 101771 101789 101797
-101807 101833 101837 101839 101863 101869 101873 101879 101891 101917 101921 101929
-101939 101957 101963 101977 101987 101999 102001 102013 102019 102023 102031 102043
-102059 102061 102071 102077 102079 102101 102103 102107 102121 102139 102149 102161
-102181 102191 102197 102199 102203 102217 102229 102233 102241 102251 102253 102259
-102293 102299 102301 102317 102329 102337 102359 102367 102397 102407 102409 102433
-102437 102451 102461 102481 102497 102499 102503 102523 102533 102539 102547 102551
-102559 102563 102587 102593 102607 102611 102643 102647 102653 102667 102673 102677
-102679 102701 102761 102763 102769 102793 102797 102811 102829 102841 102859 102871
-102877 102881 102911 102913 102929 102931 102953 102967 102983 103001 103007 103043
-103049 103067 103069 103079 103087 103091 103093 103099 103123 103141 103171 103177
-103183 103217 103231 103237 103289 103291 103307 103319 103333 103349 103357 103387
-103391 103393 103399 103409 103421 103423 103451 103457 103471 103483 103511 103529
-103549 103553 103561 103567 103573 103577 103583 103591 103613 103619 103643 103651
-103657 103669 103681 103687 103699 103703 103723 103769 103787 103801 103811 103813
-103837 103841 103843 103867 103889 103903 103913 103919 103951 103963 103967 103969
-103979 103981 103991 103993 103997 104003 104009 104021 104033 104047 104053 104059
-104087 104089 104107 104113 104119 104123 104147 104149 104161 104173 104179 104183
-104207 104231 104233 104239 104243 104281 104287 104297 104309 104311 104323 104327
-104347 104369 104381 104383 104393 104399 104417 104459 104471 104473 104479 104491
-104513 104527 104537 104543 104549 104551 104561 104579 104593 104597 104623 104639
-104651 104659 104677 104681 104683 104693 104701 104707 104711 104717 104723 104729
-104743 104759 104761 104773 104779 104789 104801 104803 104827 104831 104849 104851
-104869 104879 104891 104911 104917 104933 104947 104953 104959 104971 104987 104999
-105019 105023 105031 105037 105071 105097 105107 105137 105143 105167 105173 105199
-105211 105227 105229 105239 105251 105253 105263 105269 105277 105319 105323 105331
-105337 105341 105359 105361 105367 105373 105379 105389 105397 105401 105407 105437
-105449 105467 105491 105499 105503 105509 105517 105527 105529 105533 105541 105557
-105563 105601 105607 105613 105619 105649 105653 105667 105673 105683 105691 105701
-105727 105733 105751 105761 105767 105769 105817 105829 105863 105871 105883 105899
-105907 105913 105929 105943 105953 105967 105971 105977 105983 105997 106013 106019
-106031 106033 106087 106103 106109 106121 106123 106129 106163 106181 106187 106189
-106207 106213 106217 106219 106243 106261 106273 106277 106279 106291 106297 106303
-106307 106319 106321 106331 106349 106357 106363 106367 106373 106391 106397 106411
-106417 106427 106433 106441 106451 106453 106487 106501 106531 106537 106541 106543
-106591 106619 106621 106627 106637 106649 106657 106661 106663 106669 106681 106693
-106699 106703 106721 106727 106739 106747 106751 106753 106759 106781 106783 106787
-106801 106823 106853 106859 106861 106867 106871 106877 106903 106907 106921 106937
-106949 106957 106961 106963 106979 106993 107021 107033 107053 107057 107069 107071
-107077 107089 107099 107101 107119 107123 107137 107171 107183 107197 107201 107209
-107227 107243 107251 107269 107273 107279 107309 107323 107339 107347 107351 107357
-107377 107441 107449 107453 107467 107473 107507 107509 107563 107581 107599 107603
-107609 107621 107641 107647 107671 107687 107693 107699 107713 107717 107719 107741
-107747 107761 107773 107777 107791 107827 107837 107839 107843 107857 107867 107873
-107881 107897 107903 107923 107927 107941 107951 107971 107981 107999 108007 108011
-108013 108023 108037 108041 108061 108079 108089 108107 108109 108127 108131 108139
-108161 108179 108187 108191 108193 108203 108211 108217 108223 108233 108247 108263
-108271 108287 108289 108293 108301 108343 108347 108359 108377 108379 108401 108413
-108421 108439 108457 108461 108463 108497 108499 108503 108517 108529 108533 108541
-108553 108557 108571 108587 108631 108637 108643 108649 108677 108707 108709 108727
-108739 108751 108761 108769 108791 108793 108799 108803 108821 108827 108863 108869
-108877 108881 108883 108887 108893 108907 108917 108923 108929 108943 108947 108949
-108959 108961 108967 108971 108991 109001 109013 109037 109049 109063 109073 109097
-109103 109111 109121 109133 109139 109141 109147 109159 109169 109171 109199 109201
-109211 109229 109253 109267 109279 109297 109303 109313 109321 109331 109357 109363
-109367 109379 109387 109391 109397 109423 109433 109441 109451 109453 109469 109471
-109481 109507 109517 109519 109537 109541 109547 109567 109579 109583 109589 109597
-109609 109619 109621 109639 109661 109663 109673 109717 109721 109741 109751 109789
-109793 109807 109819 109829 109831 109841 109843 109847 109849 109859 109873 109883
-109891 109897 109903 109913 109919 109937 109943 109961 109987 110017 110023 110039
-110051 110059 110063 110069 110083 110119 110129 110161 110183 110221 110233 110237
-110251 110261 110269 110273 110281 110291 110311 110321 110323 110339 110359 110419
-110431 110437 110441 110459 110477 110479 110491 110501 110503 110527 110533 110543
-110557 110563 110567 110569 110573 110581 110587 110597 110603 110609 110623 110629
-110641 110647 110651 110681 110711 110729 110731 110749 110753 110771 110777 110807
-110813 110819 110821 110849 110863 110879 110881 110899 110909 110917 110921 110923
-110927 110933 110939 110947 110951 110969 110977 110989 111029 111031 111043 111049
-111053 111091 111103 111109 111119 111121 111127 111143 111149 111187 111191 111211
-111217 111227 111229 111253 111263 111269 111271 111301 111317 111323 111337 111341
-111347 111373 111409 111427 111431 111439 111443 111467 111487 111491 111493 111497
-111509 111521 111533 111539 111577 111581 111593 111599 111611 111623 111637 111641
-111653 111659 111667 111697 111721 111731 111733 111751 111767 111773 111779 111781
-111791 111799 111821 111827 111829 111833 111847 111857 111863 111869 111871 111893
-111913 111919 111949 111953 111959 111973 111977 111997 112019 112031 112061 112067
-112069 112087 112097 112103 112111 112121 112129 112139 112153 112163 112181 112199
-112207 112213 112223 112237 112241 112247 112249 112253 112261 112279 112289 112291
-112297 112303 112327 112331 112337 112339 112349 112361 112363 112397 112403 112429
-112459 112481 112501 112507 112543 112559 112571 112573 112577 112583 112589 112601
-112603 112621 112643 112657 112663 112687 112691 112741 112757 112759 112771 112787
-112799 112807 112831 112843 112859 112877 112901 112909 112913 112919 112921 112927
-112939 112951 112967 112979 112997 113011 113017 113021 113023 113027 113039 113041
-113051 113063 113081 113083 113089 113093 113111 113117 113123 113131 113143 113147
-113149 113153 113159 113161 113167 113171 113173 113177 113189 113209 113213 113227
-113233 113279 113287 113327 113329 113341 113357 113359 113363 113371 113381 113383
-113417 113437 113453 113467 113489 113497 113501 113513 113537 113539 113557 113567
-113591 113621 113623 113647 113657 113683 113717 113719 113723 113731 113749 113759
-113761 113777 113779 113783 113797 113809 113819 113837 113843 113891 113899 113903
-113909 113921 113933 113947 113957 113963 113969 113983 113989 114001 114013 114031
-114041 114043 114067 114073 114077 114083 114089 114113 114143 114157 114161 114167
-114193 114197 114199 114203 114217 114221 114229 114259 114269 114277 114281 114299
-114311 114319 114329 114343 114371 114377 114407 114419 114451 114467 114473 114479
-114487 114493 114547 114553 114571 114577 114593 114599 114601 114613 114617 114641
-114643 114649 114659 114661 114671 114679 114689 114691 114713 114743 114749 114757
-114761 114769 114773 114781 114797 114799 114809 114827 114833 114847 114859 114883
-114889 114901 114913 114941 114967 114973 114997 115001 115013 115019 115021 115057
-115061 115067 115079 115099 115117 115123 115127 115133 115151 115153 115163 115183
-115201 115211 115223 115237 115249 115259 115279 115301 115303 115309 115319 115321
-115327 115331 115337 115343 115361 115363 115399 115421 115429 115459 115469 115471
-115499 115513 115523 115547 115553 115561 115571 115589 115597 115601 115603 115613
-115631 115637 115657 115663 115679 115693 115727 115733 115741 115751 115757 115763
-115769 115771 115777 115781 115783 115793 115807 115811 115823 115831 115837 115849
-115853 115859 115861 115873 115877 115879 115883 115891 115901 115903 115931 115933
-115963 115979 115981 115987 116009 116027 116041 116047 116089 116099 116101 116107
-116113 116131 116141 116159 116167 116177 116189 116191 116201 116239 116243 116257
-116269 116273 116279 116293 116329 116341 116351 116359 116371 116381 116387 116411
-116423 116437 116443 116447 116461 116471 116483 116491 116507 116531 116533 116537
-116539 116549 116579 116593 116639 116657 116663 116681 116687 116689 116707 116719
-116731 116741 116747 116789 116791 116797 116803 116819 116827 116833 116849 116867
-116881 116903 116911 116923 116927 116929 116933 116953 116959 116969 116981 116989
-116993 117017 117023 117037 117041 117043 117053 117071 117101 117109 117119 117127
-117133 117163 117167 117191 117193 117203 117209 117223 117239 117241 117251 117259
-117269 117281 117307 117319 117329 117331 117353 117361 117371 117373 117389 117413
-117427 117431 117437 117443 117497 117499 117503 117511 117517 117529 117539 117541
-117563 117571 117577 117617 117619 117643 117659 117671 117673 117679 117701 117703
-117709 117721 117727 117731 117751 117757 117763 117773 117779 117787 117797 117809
-117811 117833 117839 117841 117851 117877 117881 117883 117889 117899 117911 117917
-117937 117959 117973 117977 117979 117989 117991 118033 118037 118043 118051 118057
-118061 118081 118093 118127 118147 118163 118169 118171 118189 118211 118213 118219
-118247 118249 118253 118259 118273 118277 118297 118343 118361 118369 118373 118387
-118399 118409 118411 118423 118429 118453 118457 118463 118471 118493 118529 118543
-118549 118571 118583 118589 118603 118619 118621 118633 118661 118669 118673 118681
-118687 118691 118709 118717 118739 118747 118751 118757 118787 118799 118801 118819
-118831 118843 118861 118873 118891 118897 118901 118903 118907 118913 118927 118931
-118967 118973 119027 119033 119039 119047 119057 119069 119083 119087 119089 119099
-119101 119107 119129 119131 119159 119173 119179 119183 119191 119227 119233 119237
-119243 119267 119291 119293 119297 119299 119311 119321 119359 119363 119389 119417
-119419 119429 119447 119489 119503 119513 119533 119549 119551 119557 119563 119569
-119591 119611 119617 119627 119633 119653 119657 119659 119671 119677 119687 119689
-119699 119701 119723 119737 119747 119759 119771 119773 119783 119797 119809 119813
-119827 119831 119839 119849 119851 119869 119881 119891 119921 119923 119929 119953
-119963 119971 119981 119983 119993 120011 120017 120041 120047 120049 120067 120077
-120079 120091 120097 120103 120121 120157 120163 120167 120181 120193 120199 120209
-120223 120233 120247 120277 120283 120293 120299 120319 120331 120349 120371 120383
-120391 120397 120401 120413 120427 120431 120473 120503 120511 120539 120551 120557
-120563 120569 120577 120587 120607 120619 120623 120641 120647 120661 120671 120677
-120689 120691 120709 120713 120721 120737 120739 120749 120763 120767 120779 120811
-120817 120823 120829 120833 120847 120851 120863 120871 120877 120889 120899 120907
-120917 120919 120929 120937 120941 120943 120947 120977 120997 121001 121007 121013
-121019 121021 121039 121061 121063 121067 121081 121123 121139 121151 121157 121169
-121171 121181 121189 121229 121259 121267 121271 121283 121291 121309 121313 121321
-121327 121333 121343 121349 121351 121357 121367 121369 121379 121403 121421 121439
-121441 121447 121453 121469 121487 121493 121501 121507 121523 121531 121547 121553
-121559 121571 121577 121579 121591 121607 121609 121621 121631 121633 121637 121661
-121687 121697 121711 121721 121727 121763 121787 121789 121843 121853 121867 121883
-121889 121909 121921 121931 121937 121949 121951 121963 121967 121993 121997 122011
-122021 122027 122029 122033 122039 122041 122051 122053 122069 122081 122099 122117
-122131 122147 122149 122167 122173 122201 122203 122207 122209 122219 122231 122251
-122263 122267 122273 122279 122299 122321 122323 122327 122347 122363 122387 122389
-122393 122399 122401 122443 122449 122453 122471 122477 122489 122497 122501 122503
-122509 122527 122533 122557 122561 122579 122597 122599 122609 122611 122651 122653
-122663 122693 122701 122719 122741 122743 122753 122761 122777 122789 122819 122827
-122833 122839 122849 122861 122867 122869 122887 122891 122921 122929 122939 122953
-122957 122963 122971 123001 123007 123017 123031 123049 123059 123077 123083 123091
-123113 123121 123127 123143 123169 123191 123203 123209 123217 123229 123239 123259
-123269 123289 123307 123311 123323 123341 123373 123377 123379 123397 123401 123407
-123419 123427 123433 123439 123449 123457 123479 123491 123493 123499 123503 123517
-123527 123547 123551 123553 123581 123583 123593 123601 123619 123631 123637 123653
-123661 123667 123677 123701 123707 123719 123727 123731 123733 123737 123757 123787
-123791 123803 123817 123821 123829 123833 123853 123863 123887 123911 123923 123931
-123941 123953 123973 123979 123983 123989 123997 124001 124021 124067 124087 124097
-124121 124123 124133 124139 124147 124153 124171 124181 124183 124193 124199 124213
-124231 124247 124249 124277 124291 124297 124301 124303 124309 124337 124339 124343
-124349 124351 124363 124367 124427 124429 124433 124447 124459 124471 124477 124489
-124493 124513 124529 124541 124543 124561 124567 124577 124601 124633 124643 124669
-124673 124679 124693 124699 124703 124717 124721 124739 124753 124759 124769 124771
-124777 124781 124783 124793 124799 124819 124823 124847 124853 124897 124907 124909
-124919 124951 124979 124981 124987 124991 125003 125017 125029 125053 125063 125093
-125101 125107 125113 125117 125119 125131 125141 125149 125183 125197 125201 125207
-125219 125221 125231 125243 125261 125269 125287 125299 125303 125311 125329 125339
-125353 125371 125383 125387 125399 125407 125423 125429 125441 125453 125471 125497
-125507 125509 125527 125539 125551 125591 125597 125617 125621 125627 125639 125641
-125651 125659 125669 125683 125687 125693 125707 125711 125717 125731 125737 125743
-125753 125777 125789 125791 125803 125813 125821 125863 125887 125897 125899 125921
-125927 125929 125933 125941 125959 125963 126001 126011 126013 126019 126023 126031
-126037 126041 126047 126067 126079 126097 126107 126127 126131 126143 126151 126173
-126199 126211 126223 126227 126229 126233 126241 126257 126271 126307 126311 126317
-126323 126337 126341 126349 126359 126397 126421 126433 126443 126457 126461 126473
-126481 126487 126491 126493 126499 126517 126541 126547 126551 126583 126601 126611
-126613 126631 126641 126653 126683 126691 126703 126713 126719 126733 126739 126743
-126751 126757 126761 126781 126823 126827 126839 126851 126857 126859 126913 126923
-126943 126949 126961 126967 126989 127031 127033 127037 127051 127079 127081 127103
-127123 127133 127139 127157 127163 127189 127207 127217 127219 127241 127247 127249
-127261 127271 127277 127289 127291 127297 127301 127321 127331 127343 127363 127373
-127399 127403 127423 127447 127453 127481 127487 127493 127507 127529 127541 127549
-127579 127583 127591 127597 127601 127607 127609 127637 127643 127649 127657 127663
-127669 127679 127681 127691 127703 127709 127711 127717 127727 127733 127739 127747
-127763 127781 127807 127817 127819 127837 127843 127849 127859 127867 127873 127877
-127913 127921 127931 127951 127973 127979 127997 128021 128033 128047 128053 128099
-128111 128113 128119 128147 128153 128159 128173 128189 128201 128203 128213 128221
-128237 128239 128257 128273 128287 128291 128311 128321 128327 128339 128341 128347
-128351 128377 128389 128393 128399 128411 128413 128431 128437 128449 128461 128467
-128473 128477 128483 128489 128509 128519 128521 128549 128551 128563 128591 128599
-128603 128621 128629 128657 128659 128663 128669 128677 128683 128693 128717 128747
-128749 128761 128767 128813 128819 128831 128833 128837 128857 128861 128873 128879
-128903 128923 128939 128941 128951 128959 128969 128971 128981 128983 128987 128993
-129001 129011 129023 129037 129049 129061 129083 129089 129097 129113 129119 129121
-129127 129169 129187 129193 129197 129209 129221 129223 129229 129263 129277 129281
-129287 129289 129293 129313 129341 129347 129361 129379 129401 129403 129419 129439
-129443 129449 129457 129461 129469 129491 129497 129499 129509 129517 129527 129529
-129533 129539 129553 129581 129587 129589 129593 129607 129629 129631 129641 129643
-129671 129707 129719 129733 129737 129749 129757 129763 129769 129793 129803 129841
-129853 129887 129893 129901 129917 129919 129937 129953 129959 129967 129971 130003
-130021 130027 130043 130051 130057 130069 130073 130079 130087 130099 130121 130127
-130147 130171 130183 130199 130201 130211 130223 130241 130253 130259 130261 130267
-130279 130303 130307 130337 130343 130349 130363 130367 130369 130379 130399 130409
-130411 130423 130439 130447 130457 130469 130477 130483 130489 130513 130517 130523
-130531 130547 130553 130579 130589 130619 130621 130631 130633 130639 130643 130649
-130651 130657 130681 130687 130693 130699 130729 130769 130783 130787 130807 130811
-130817 130829 130841 130843 130859 130873 130927 130957 130969 130973 130981 130987
-131009 131011 131023 131041 131059 131063 131071 131101 131111 131113 131129 131143
-131149 131171 131203 131213 131221 131231 131249 131251 131267 131293 131297 131303
-131311 131317 131321 131357 131363 131371 131381 131413 131431 131437 131441 131447
-131449 131477 131479 131489 131497 131501 131507 131519 131543 131561 131581 131591
-131611 131617 131627 131639 131641 131671 131687 131701 131707 131711 131713 131731
-131743 131749 131759 131771 131777 131779 131783 131797 131837 131839 131849 131861
-131891 131893 131899 131909 131927 131933 131939 131941 131947 131959 131969 132001
-132019 132047 132049 132059 132071 132103 132109 132113 132137 132151 132157 132169
-132173 132199 132229 132233 132241 132247 132257 132263 132283 132287 132299 132313
-132329 132331 132347 132361 132367 132371 132383 132403 132409 132421 132437 132439
-132469 132491 132499 132511 132523 132527 132529 132533 132541 132547 132589 132607
-132611 132619 132623 132631 132637 132647 132661 132667 132679 132689 132697 132701
-132707 132709 132721 132739 132749 132751 132757 132761 132763 132817 132833 132851
-132857 132859 132863 132887 132893 132911 132929 132947 132949 132953 132961 132967
-132971 132989 133013 133033 133039 133051 133069 133073 133087 133097 133103 133109
-133117 133121 133153 133157 133169 133183 133187 133201 133213 133241 133253 133261
-133271 133277 133279 133283 133303 133319 133321 133327 133337 133349 133351 133379
-133387 133391 133403 133417 133439 133447 133451 133481 133493 133499 133519 133541
-133543 133559 133571 133583 133597 133631 133633 133649 133657 133669 133673 133691
-133697 133709 133711 133717 133723 133733 133769 133781 133801 133811 133813 133831
-133843 133853 133873 133877 133919 133949 133963 133967 133979 133981 133993 133999
-134033 134039 134047 134053 134059 134077 134081 134087 134089 134093 134129 134153
-134161 134171 134177 134191 134207 134213 134219 134227 134243 134257 134263 134269
-134287 134291 134293 134327 134333 134339 134341 134353 134359 134363 134369 134371
-134399 134401 134417 134437 134443 134471 134489 134503 134507 134513 134581 134587
-134591 134593 134597 134609 134639 134669 134677 134681 134683 134699 134707 134731
-134741 134753 134777 134789 134807 134837 134839 134851 134857 134867 134873 134887
-134909 134917 134921 134923 134947 134951 134989 134999 135007 135017 135019 135029
-135043 135049 135059 135077 135089 135101 135119 135131 135151 135173 135181 135193
-135197 135209 135211 135221 135241 135257 135271 135277 135281 135283 135301 135319
-135329 135347 135349 135353 135367 135389 135391 135403 135409 135427 135431 135433
-135449 135461 135463 135467 135469 135479 135497 135511 135533 135559 135571 135581
-135589 135593 135599 135601 135607 135613 135617 135623 135637 135647 135649 135661
-135671 135697 135701 135719 135721 135727 135731 135743 135757 135781 135787 135799
-135829 135841 135851 135859 135887 135893 135899 135911 135913 135929 135937 135977
-135979 136013 136027 136033 136043 136057 136067 136069 136093 136099 136111 136133
-136139 136163 136177 136189 136193 136207 136217 136223 136237 136247 136261 136273
-136277 136303 136309 136319 136327 136333 136337 136343 136351 136361 136373 136379
-136393 136397 136399 136403 136417 136421 136429 136447 136453 136463 136471 136481
-136483 136501 136511 136519 136523 136531 136537 136541 136547 136559 136573 136601
-136603 136607 136621 136649 136651 136657 136691 136693 136709 136711 136727 136733
-136739 136751 136753 136769 136777 136811 136813 136841 136849 136859 136861 136879
-136883 136889 136897 136943 136949 136951 136963 136973 136979 136987 136991 136993
-136999 137029 137077 137087 137089 137117 137119 137131 137143 137147 137153 137177
-137183 137191 137197 137201 137209 137219 137239 137251 137273 137279 137303 137321
-137339 137341 137353 137359 137363 137369 137383 137387 137393 137399 137413 137437
-137443 137447 137453 137477 137483 137491 137507 137519 137537 137567 137573 137587
-137593 137597 137623 137633 137639 137653 137659 137699 137707 137713 137723 137737
-137743 137771 137777 137791 137803 137827 137831 137849 137867 137869 137873 137909
-137911 137927 137933 137941 137947 137957 137983 137993 137999 138007 138041 138053
-138059 138071 138077 138079 138101 138107 138113 138139 138143 138157 138163 138179
-138181 138191 138197 138209 138239 138241 138247 138251 138283 138289 138311 138319
-138323 138337 138349 138371 138373 138389 138401 138403 138407 138427 138433 138449
-138451 138461 138469 138493 138497 138511 138517 138547 138559 138563 138569 138571
-138577 138581 138587 138599 138617 138629 138637 138641 138647 138661 138679 138683
-138727 138731 138739 138763 138793 138797 138799 138821 138829 138841 138863 138869
-138883 138889 138893 138899 138917 138923 138937 138959 138967 138977 139021 139033
-139067 139079 139091 139109 139121 139123 139133 139169 139177 139187 139199 139201
-139241 139267 139273 139291 139297 139301 139303 139309 139313 139333 139339 139343
-139361 139367 139369 139387 139393 139397 139409 139423 139429 139439 139457 139459
-139483 139487 139493 139501 139511 139537 139547 139571 139589 139591 139597 139609
-139619 139627 139661 139663 139681 139697 139703 139709 139721 139729 139739 139747
-139753 139759 139787 139801 139813 139831 139837 139861 139871 139883 139891 139901
-139907 139921 139939 139943 139967 139969 139981 139987 139991 139999 140009 140053
-140057 140069 140071 140111 140123 140143 140159 140167 140171 140177 140191 140197
-140207 140221 140227 140237 140249 140263 140269 140281 140297 140317 140321 140333
-140339 140351 140363 140381 140401 140407 140411 140417 140419 140423 140443 140449
-140453 140473 140477 140521 140527 140533 140549 140551 140557 140587 140593 140603
-140611 140617 140627 140629 140639 140659 140663 140677 140681 140683 140689 140717
-140729 140731 140741 140759 140761 140773 140779 140797 140813 140827 140831 140837
-140839 140863 140867 140869 140891 140893 140897 140909 140929 140939 140977 140983
-140989 141023 141041 141061 141067 141073 141079 141101 141107 141121 141131 141157
-141161 141179 141181 141199 141209 141221 141223 141233 141241 141257 141263 141269
-141277 141283 141301 141307 141311 141319 141353 141359 141371 141397 141403 141413
-141439 141443 141461 141481 141497 141499 141509 141511 141529 141539 141551 141587
-141601 141613 141619 141623 141629 141637 141649 141653 141667 141671 141677 141679
-141689 141697 141707 141709 141719 141731 141761 141767 141769 141773 141793 141803
-141811 141829 141833 141851 141853 141863 141871 141907 141917 141931 141937 141941
-141959 141961 141971 141991 142007 142019 142031 142039 142049 142057 142061 142067
-142097 142099 142111 142123 142151 142157 142159 142169 142183 142189 142193 142211
-142217 142223 142231 142237 142271 142297 142319 142327 142357 142369 142381 142391
-142403 142421 142427 142433 142453 142469 142501 142529 142537 142543 142547 142553
-142559 142567 142573 142589 142591 142601 142607 142609 142619 142657 142673 142697
-142699 142711 142733 142757 142759 142771 142787 142789 142799 142811 142837 142841
-142867 142871 142873 142897 142903 142907 142939 142949 142963 142969 142973 142979
-142981 142993 143053 143063 143093 143107 143111 143113 143137 143141 143159 143177
-143197 143239 143243 143249 143257 143261 143263 143281 143287 143291 143329 143333
-143357 143387 143401 143413 143419 143443 143461 143467 143477 143483 143489 143501
-143503 143509 143513 143519 143527 143537 143551 143567 143569 143573 143593 143609
-143617 143629 143651 143653 143669 143677 143687 143699 143711 143719 143729 143743
-143779 143791 143797 143807 143813 143821 143827 143831 143833 143873 143879 143881
-143909 143947 143953 143971 143977 143981 143999 144013 144031 144037 144061 144071
-144073 144103 144139 144161 144163 144167 144169 144173 144203 144223 144241 144247
-144253 144259 144271 144289 144299 144307 144311 144323 144341 144349 144379 144383
-144407 144409 144413 144427 144439 144451 144461 144479 144481 144497 144511 144539
-144541 144563 144569 144577 144583 144589 144593 144611 144629 144659 144667 144671
-144701 144709 144719 144731 144737 144751 144757 144763 144773 144779 144791 144817
-144829 144839 144847 144883 144887 144889 144899 144917 144931 144941 144961 144967
-144973 144983 145007 145009 145021 145031 145037 145043 145063 145069 145091 145109
-145121 145133 145139 145177 145193 145207 145213 145219 145253 145259 145267 145283
-145289 145303 145307 145349 145361 145381 145391 145399 145417 145423 145433 145441
-145451 145459 145463 145471 145477 145487 145501 145511 145513 145517 145531 145543
-145547 145549 145577 145589 145601 145603 145633 145637 145643 145661 145679 145681
-145687 145703 145709 145721 145723 145753 145757 145759 145771 145777 145799 145807
-145819 145823 145829 145861 145879 145897 145903 145931 145933 145949 145963 145967
-145969 145987 145991 146009 146011 146021 146023 146033 146051 146057 146059 146063
-146077 146093 146099 146117 146141 146161 146173 146191 146197 146203 146213 146221
-146239 146249 146273 146291 146297 146299 146309 146317 146323 146347 146359 146369
-146381 146383 146389 146407 146417 146423 146437 146449 146477 146513 146519 146521
-146527 146539 146543 146563 146581 146603 146609 146617 146639 146647 146669 146677
-146681 146683 146701 146719 146743 146749 146767 146777 146801 146807 146819 146833
-146837 146843 146849 146857 146891 146893 146917 146921 146933 146941 146953 146977
-146983 146987 146989 147011 147029 147031 147047 147073 147083 147089 147097 147107
-147137 147139 147151 147163 147179 147197 147209 147211 147221 147227 147229 147253
-147263 147283 147289 147293 147299 147311 147319 147331 147341 147347 147353 147377
-147391 147397 147401 147409 147419 147449 147451 147457 147481 147487 147503 147517
-147541 147547 147551 147557 147571 147583 147607 147613 147617 147629 147647 147661
-147671 147673 147689 147703 147709 147727 147739 147743 147761 147769 147773 147779
-147787 147793 147799 147811 147827 147853 147859 147863 147881 147919 147937 147949
-147977 147997 148013 148021 148061 148063 148073 148079 148091 148123 148139 148147
-148151 148153 148157 148171 148193 148199 148201 148207 148229 148243 148249 148279
-148301 148303 148331 148339 148361 148367 148381 148387 148399 148403 148411 148429
-148439 148457 148469 148471 148483 148501 148513 148517 148531 148537 148549 148573
-148579 148609 148627 148633 148639 148663 148667 148669 148691 148693 148711 148721
-148723 148727 148747 148763 148781 148783 148793 148817 148829 148853 148859 148861
-148867 148873 148891 148913 148921 148927 148931 148933 148949 148957 148961 148991
-148997 149011 149021 149027 149033 149053 149057 149059 149069 149077 149087 149099
-149101 149111 149113 149119 149143 149153 149159 149161 149173 149183 149197 149213
-149239 149249 149251 149257 149269 149287 149297 149309 149323 149333 149341 149351
-149371 149377 149381 149393 149399 149411 149417 149419 149423 149441 149459 149489
-149491 149497 149503 149519 149521 149531 149533 149543 149551 149561 149563 149579
-149603 149623 149627 149629 149689 149711 149713 149717 149729 149731 149749 149759
-149767 149771 149791 149803 149827 149837 149839 149861 149867 149873 149893 149899
-149909 149911 149921 149939 149953 149969 149971 149993 150001 150011 150041 150053
-150061 150067 150077 150083 150089 150091 150097 150107 150131 150151 150169 150193
-150197 150203 150209 150211 150217 150221 150223 150239 150247 150287 150299 150301
-150323 150329 150343 150373 150377 150379 150383 150401 150407 150413 150427 150431
-150439 150473 150497 150503 150517 150523 150533 150551 150559 150571 150583 150587
-150589 150607 150611 150617 150649 150659 150697 150707 150721 150743 150767 150769
-150779 150791 150797 150827 150833 150847 150869 150881 150883 150889 150893 150901
-150907 150919 150929 150959 150961 150967 150979 150989 150991 151007 151009 151013
-151027 151049 151051 151057 151091 151121 151141 151153 151157 151163 151169 151171
-151189 151201 151213 151237 151241 151243 151247 151253 151273 151279 151289 151303
-151337 151339 151343 151357 151379 151381 151391 151397 151423 151429 151433 151451
-151471 151477 151483 151499 151507 151517 151523 151531 151537 151549 151553 151561
-151573 151579 151597 151603 151607 151609 151631 151637 151643 151651 151667 151673
-151681 151687 151693 151703 151717 151729 151733 151769 151771 151783 151787 151799
-151813 151817 151841 151847 151849 151871 151883 151897 151901 151903 151909 151937
-151939 151967 151969 152003 152017 152027 152029 152039 152041 152063 152077 152081
-152083 152093 152111 152123 152147 152183 152189 152197 152203 152213 152219 152231
-152239 152249 152267 152287 152293 152297 152311 152363 152377 152381 152389 152393
-152407 152417 152419 152423 152429 152441 152443 152459 152461 152501 152519 152531
-152533 152539 152563 152567 152597 152599 152617 152623 152629 152639 152641 152657
-152671 152681 152717 152723 152729 152753 152767 152777 152783 152791 152809 152819
-152821 152833 152837 152839 152843 152851 152857 152879 152897 152899 152909 152939
-152941 152947 152953 152959 152981 152989 152993 153001 153059 153067 153071 153073
-153077 153089 153107 153113 153133 153137 153151 153191 153247 153259 153269 153271
-153277 153281 153287 153313 153319 153337 153343 153353 153359 153371 153379 153407
-153409 153421 153427 153437 153443 153449 153457 153469 153487 153499 153509 153511
-153521 153523 153529 153533 153557 153563 153589 153607 153611 153623 153641 153649
-153689 153701 153719 153733 153739 153743 153749 153757 153763 153817 153841 153871
-153877 153887 153889 153911 153913 153929 153941 153947 153949 153953 153991 153997
-154001 154027 154043 154057 154061 154067 154073 154079 154081 154087 154097 154111
-154127 154153 154157 154159 154181 154183 154211 154213 154229 154243 154247 154267
-154277 154279 154291 154303 154313 154321 154333 154339 154351 154369 154373 154387
-154409 154417 154423 154439 154459 154487 154493 154501 154523 154543 154571 154573
-154579 154589 154591 154613 154619 154621 154643 154667 154669 154681 154691 154699
-154723 154727 154733 154747 154753 154769 154787 154789 154799 154807 154823 154841
-154849 154871 154873 154877 154883 154897 154927 154933 154937 154943 154981 154991
-155003 155009 155017 155027 155047 155069 155081 155083 155087 155119 155137 155153
-155161 155167 155171 155191 155201 155203 155209 155219 155231 155251 155269 155291
-155299 155303 155317 155327 155333 155371 155377 155381 155383 155387 155399 155413
-155423 155443 155453 155461 155473 155501 155509 155521 155537 155539 155557 155569
-155579 155581 155593 155599 155609 155621 155627 155653 155657 155663 155671 155689
-155693 155699 155707 155717 155719 155723 155731 155741 155747 155773 155777 155783
-155797 155801 155809 155821 155833 155849 155851 155861 155863 155887 155891 155893
-155921 156007 156011 156019 156041 156059 156061 156071 156089 156109 156119 156127
-156131 156139 156151 156157 156217 156227 156229 156241 156253 156257 156259 156269
-156307 156319 156329 156347 156353 156361 156371 156419 156421 156437 156467 156487
-156491 156493 156511 156521 156539 156577 156589 156593 156601 156619 156623 156631
-156641 156659 156671 156677 156679 156683 156691 156703 156707 156719 156727 156733
-156749 156781 156797 156799 156817 156823 156833 156841 156887 156899 156901 156913
-156941 156943 156967 156971 156979 157007 157013 157019 157037 157049 157051 157057
-157061 157081 157103 157109 157127 157133 157141 157163 157177 157181 157189 157207
-157211 157217 157219 157229 157231 157243 157247 157253 157259 157271 157273 157277
-157279 157291 157303 157307 157321 157327 157349 157351 157363 157393 157411 157427
-157429 157433 157457 157477 157483 157489 157513 157519 157523 157543 157559 157561
-157571 157579 157627 157637 157639 157649 157667 157669 157679 157721 157733 157739
-157747 157769 157771 157793 157799 157813 157823 157831 157837 157841 157867 157877
-157889 157897 157901 157907 157931 157933 157951 157991 157999 158003 158009 158017
-158029 158047 158071 158077 158113 158129 158141 158143 158161 158189 158201 158209
-158227 158231 158233 158243 158261 158269 158293 158303 158329 158341 158351 158357
-158359 158363 158371 158393 158407 158419 158429 158443 158449 158489 158507 158519
-158527 158537 158551 158563 158567 158573 158581 158591 158597 158611 158617 158621
-158633 158647 158657 158663 158699 158731 158747 158749 158759 158761 158771 158777
-158791 158803 158843 158849 158863 158867 158881 158909 158923 158927 158941 158959
-158981 158993 159013 159017 159023 159059 159073 159079 159097 159113 159119 159157
-159161 159167 159169 159179 159191 159193 159199 159209 159223 159227 159233 159287
-159293 159311 159319 159337 159347 159349 159361 159389 159403 159407 159421 159431
-159437 159457 159463 159469 159473 159491 159499 159503 159521 159539 159541 159553
-159563 159569 159571 159589 159617 159623 159629 159631 159667 159671 159673 159683
-159697 159701 159707 159721 159737 159739 159763 159769 159773 159779 159787 159791
-159793 159799 159811 159833 159839 159853 159857 159869 159871 159899 159911 159931
-159937 159977 159979 160001 160009 160019 160031 160033 160049 160073 160079 160081
-160087 160091 160093 160117 160141 160159 160163 160169 160183 160201 160207 160217
-160231 160243 160253 160309 160313 160319 160343 160357 160367 160373 160387 160397
-160403 160409 160423 160441 160453 160481 160483 160499 160507 160541 160553 160579
-160583 160591 160603 160619 160621 160627 160637 160639 160649 160651 160663 160669
-160681 160687 160697 160709 160711 160723 160739 160751 160753 160757 160781 160789
-160807 160813 160817 160829 160841 160861 160877 160879 160883 160903 160907 160933
-160967 160969 160981 160997 161009 161017 161033 161039 161047 161053 161059 161071
-161087 161093 161123 161137 161141 161149 161159 161167 161201 161221 161233 161237
-161263 161267 161281 161303 161309 161323 161333 161339 161341 161363 161377 161387
-161407 161411 161453 161459 161461 161471 161503 161507 161521 161527 161531 161543
-161561 161563 161569 161573 161591 161599 161611 161627 161639 161641 161659 161683
-161717 161729 161731 161741 161743 161753 161761 161771 161773 161779 161783 161807
-161831 161839 161869 161873 161879 161881 161911 161921 161923 161947 161957 161969
-161971 161977 161983 161999 162007 162011 162017 162053 162059 162079 162091 162109
-162119 162143 162209 162221 162229 162251 162257 162263 162269 162277 162287 162289
-162293 162343 162359 162389 162391 162413 162419 162439 162451 162457 162473 162493
-162499 162517 162523 162527 162529 162553 162557 162563 162577 162593 162601 162611
-162623 162629 162641 162649 162671 162677 162683 162691 162703 162709 162713 162727
-162731 162739 162749 162751 162779 162787 162791 162821 162823 162829 162839 162847
-162853 162859 162881 162889 162901 162907 162917 162937 162947 162971 162973 162989
-162997 163003 163019 163021 163027 163061 163063 163109 163117 163127 163129 163147
-163151 163169 163171 163181 163193 163199 163211 163223 163243 163249 163259 163307
-163309 163321 163327 163337 163351 163363 163367 163393 163403 163409 163411 163417
-163433 163469 163477 163481 163483 163487 163517 163543 163561 163567 163573 163601
-163613 163621 163627 163633 163637 163643 163661 163673 163679 163697 163729 163733
-163741 163753 163771 163781 163789 163811 163819 163841 163847 163853 163859 163861
-163871 163883 163901 163909 163927 163973 163979 163981 163987 163991 163993 163997
-164011 164023 164039 164051 164057 164071 164089 164093 164113 164117 164147 164149
-164173 164183 164191 164201 164209 164231 164233 164239 164249 164251 164267 164279
-164291 164299 164309 164321 164341 164357 164363 164371 164377 164387 164413 164419
-164429 164431 164443 164447 164449 164471 164477 164503 164513 164531 164569 164581
-164587 164599 164617 164621 164623 164627 164653 164663 164677 164683 164701 164707
-164729 164743 164767 164771 164789 164809 164821 164831 164837 164839 164881 164893
-164911 164953 164963 164987 164999 165001 165037 165041 165047 165049 165059 165079
-165083 165089 165103 165133 165161 165173 165181 165203 165211 165229 165233 165247
-165287 165293 165311 165313 165317 165331 165343 165349 165367 165379 165383 165391
-165397 165437 165443 165449 165457 165463 165469 165479 165511 165523 165527 165533
-165541 165551 165553 165559 165569 165587 165589 165601 165611 165617 165653 165667
-165673 165701 165703 165707 165709 165713 165719 165721 165749 165779 165799 165811
-165817 165829 165833 165857 165877 165883 165887 165901 165931 165941 165947 165961
-165983 166013 166021 166027 166031 166043 166063 166081 166099 166147 166151 166157
-166169 166183 166189 166207 166219 166237 166247 166259 166273 166289 166297 166301
-166303 166319 166349 166351 166357 166363 166393 166399 166403 166409 166417 166429
-166457 166471 166487 166541 166561 166567 166571 166597 166601 166603 166609 166613
-166619 166627 166631 166643 166657 166667 166669 166679 166693 166703 166723 166739
-166741 166781 166783 166799 166807 166823 166841 166843 166847 166849 166853 166861
-166867 166871 166909 166919 166931 166949 166967 166973 166979 166987 167009 167017
-167021 167023 167033 167039 167047 167051 167071 167077 167081 167087 167099 167107
-167113 167117 167119 167149 167159 167173 167177 167191 167197 167213 167221 167249
-167261 167267 167269 167309 167311 167317 167329 167339 167341 167381 167393 167407
-167413 167423 167429 167437 167441 167443 167449 167471 167483 167491 167521 167537
-167543 167593 167597 167611 167621 167623 167627 167633 167641 167663 167677 167683
-167711 167729 167747 167759 167771 167777 167779 167801 167809 167861 167863 167873
-167879 167887 167891 167899 167911 167917 167953 167971 167987 168013 168023 168029
-168037 168043 168067 168071 168083 168089 168109 168127 168143 168151 168193 168197
-168211 168227 168247 168253 168263 168269 168277 168281 168293 168323 168331 168347
-168353 168391 168409 168433 168449 168451 168457 168463 168481 168491 168499 168523
-168527 168533 168541 168559 168599 168601 168617 168629 168631 168643 168673 168677
-168697 168713 168719 168731 168737 168743 168761 168769 168781 168803 168851 168863
-168869 168887 168893 168899 168901 168913 168937 168943 168977 168991 169003 169007
-169009 169019 169049 169063 169067 169069 169079 169093 169097 169111 169129 169151
-169159 169177 169181 169199 169217 169219 169241 169243 169249 169259 169283 169307
-169313 169319 169321 169327 169339 169343 169361 169369 169373 169399 169409 169427
-169457 169471 169483 169489 169493 169501 169523 169531 169553 169567 169583 169591
-169607 169627 169633 169639 169649 169657 169661 169667 169681 169691 169693 169709
-169733 169751 169753 169769 169777 169783 169789 169817 169823 169831 169837 169843
-169859 169889 169891 169909 169913 169919 169933 169937 169943 169951 169957 169987
-169991 170003 170021 170029 170047 170057 170063 170081 170099 170101 170111 170123
-170141 170167 170179 170189 170197 170207 170213 170227 170231 170239 170243 170249
-170263 170267 170279 170293 170299 170327 170341 170347 170351 170353 170363 170369
-170371 170383 170389 170393 170413 170441 170447 170473 170483 170497 170503 170509
-170537 170539 170551 170557 170579 170603 170609 170627 170633 170641 170647 170669
-170689 170701 170707 170711 170741 170749 170759 170761 170767 170773 170777 170801
-170809 170813 170827 170837 170843 170851 170857 170873 170881 170887 170899 170921
-170927 170953 170957 170971 171007 171023 171029 171043 171047 171049 171053 171077
-171079 171091 171103 171131 171161 171163 171167 171169 171179 171203 171233 171251
-171253 171263 171271 171293 171299 171317 171329 171341 171383 171401 171403 171427
-171439 171449 171467 171469 171473 171481 171491 171517 171529 171539 171541 171553
-171559 171571 171583 171617 171629 171637 171641 171653 171659 171671 171673 171679
-171697 171707 171713 171719 171733 171757 171761 171763 171793 171799 171803 171811
-171823 171827 171851 171863 171869 171877 171881 171889 171917 171923 171929 171937
-171947 172001 172009 172021 172027 172031 172049 172069 172079 172093 172097 172127
-172147 172153 172157 172169 172171 172181 172199 172213 172217 172219 172223 172243
-172259 172279 172283 172297 172307 172313 172321 172331 172343 172351 172357 172373
-172399 172411 172421 172423 172427 172433 172439 172441 172489 172507 172517 172519
-172541 172553 172561 172573 172583 172589 172597 172603 172607 172619 172633 172643
-172649 172657 172663 172673 172681 172687 172709 172717 172721 172741 172751 172759
-172787 172801 172807 172829 172849 172853 172859 172867 172871 172877 172883 172933
-172969 172973 172981 172987 172993 172999 173021 173023 173039 173053 173059 173081
-173087 173099 173137 173141 173149 173177 173183 173189 173191 173207 173209 173219
-173249 173263 173267 173273 173291 173293 173297 173309 173347 173357 173359 173429
-173431 173473 173483 173491 173497 173501 173531 173539 173543 173549 173561 173573
-173599 173617 173629 173647 173651 173659 173669 173671 173683 173687 173699 173707
-173713 173729 173741 173743 173773 173777 173779 173783 173807 173819 173827 173839
-173851 173861 173867 173891 173897 173909 173917 173923 173933 173969 173977 173981
-173993 174007 174017 174019 174047 174049 174061 174067 174071 174077 174079 174091
-174101 174121 174137 174143 174149 174157 174169 174197 174221 174241 174257 174259
-174263 174281 174289 174299 174311 174329 174331 174337 174347 174367 174389 174407
-174413 174431 174443 174457 174467 174469 174481 174487 174491 174527 174533 174569
-174571 174583 174599 174613 174617 174631 174637 174649 174653 174659 174673 174679
-174703 174721 174737 174749 174761 174763 174767 174773 174799 174821 174829 174851
-174859 174877 174893 174901 174907 174917 174929 174931 174943 174959 174989 174991
-175003 175013 175039 175061 175067 175069 175079 175081 175103 175129 175141 175211
-175229 175261 175267 175277 175291 175303 175309 175327 175333 175349 175361 175391
-175393 175403 175411 175433 175447 175453 175463 175481 175493 175499 175519 175523
-175543 175573 175601 175621 175631 175633 175649 175663 175673 175687 175691 175699
-175709 175723 175727 175753 175757 175759 175781 175783 175811 175829 175837 175843
-175853 175859 175873 175891 175897 175909 175919 175937 175939 175949 175961 175963
-175979 175991 175993 176017 176021 176023 176041 176047 176051 176053 176063 176081
-176087 176089 176123 176129 176153 176159 176161 176179 176191 176201 176207 176213
-176221 176227 176237 176243 176261 176299 176303 176317 176321 176327 176329 176333
-176347 176353 176357 176369 176383 176389 176401 176413 176417 176419 176431 176459
-176461 176467 176489 176497 176503 176507 176509 176521 176531 176537 176549 176551
-176557 176573 176591 176597 176599 176609 176611 176629 176641 176651 176677 176699
-176711 176713 176741 176747 176753 176777 176779 176789 176791 176797 176807 176809
-176819 176849 176857 176887 176899 176903 176921 176923 176927 176933 176951 176977
-176983 176989 177007 177011 177013 177019 177043 177091 177101 177109 177113 177127
-177131 177167 177173 177209 177211 177217 177223 177239 177257 177269 177283 177301
-177319 177323 177337 177347 177379 177383 177409 177421 177427 177431 177433 177467
-177473 177481 177487 177493 177511 177533 177539 177553 177589 177601 177623 177647
-177677 177679 177691 177739 177743 177761 177763 177787 177791 177797 177811 177823
-177839 177841 177883 177887 177889 177893 177907 177913 177917 177929 177943 177949
-177953 177967 177979 178001 178021 178037 178039 178067 178069 178091 178093 178103
-178117 178127 178141 178151 178169 178183 178187 178207 178223 178231 178247 178249
-178259 178261 178289 178301 178307 178327 178333 178349 178351 178361 178393 178397
-178403 178417 178439 178441 178447 178469 178481 178487 178489 178501 178513 178531
-178537 178559 178561 178567 178571 178597 178601 178603 178609 178613 178621 178627
-178639 178643 178681 178691 178693 178697 178753 178757 178781 178793 178799 178807
-178813 178817 178819 178831 178853 178859 178873 178877 178889 178897 178903 178907
-178909 178921 178931 178933 178939 178951 178973 178987 179021 179029 179033 179041
-179051 179057 179083 179089 179099 179107 179111 179119 179143 179161 179167 179173
-179203 179209 179213 179233 179243 179261 179269 179281 179287 179317 179321 179327
-179351 179357 179369 179381 179383 179393 179407 179411 179429 179437 179441 179453
-179461 179471 179479 179483 179497 179519 179527 179533 179549 179563 179573 179579
-179581 179591 179593 179603 179623 179633 179651 179657 179659 179671 179687 179689
-179693 179717 179719 179737 179743 179749 179779 179801 179807 179813 179819 179821
-179827 179833 179849 179897 179899 179903 179909 179917 179923 179939 179947 179951
-179953 179957 179969 179981 179989 179999 180001 180007 180023 180043 180053 180071
-180073 180077 180097 180137 180161 180179 180181 180211 180221 180233 180239 180241
-180247 180259 180263 180281 180287 180289 180307 180311 180317 180331 180337 180347
-180361 180371 180379 180391 180413 180419 180437 180463 180473 180491 180497 180503
-180511 180533 180539 180541 180547 180563 180569 180617 180623 180629 180647 180667
-180679 180701 180731 180749 180751 180773 180779 180793 180797 180799 180811 180847
-180871 180883 180907 180949 180959 181001 181003 181019 181031 181039 181061 181063
-181081 181087 181123 181141 181157 181183 181193 181199 181201 181211 181213 181219
-181243 181253 181273 181277 181283 181297 181301 181303 181361 181387 181397 181399
-181409 181421 181439 181457 181459 181499 181501 181513 181523 181537 181549 181553
-181603 181607 181609 181619 181639 181667 181669 181693 181711 181717 181721 181729
-181739 181751 181757 181759 181763 181777 181787 181789 181813 181837 181871 181873
-181889 181891 181903 181913 181919 181927 181931 181943 181957 181967 181981 181997
-182009 182011 182027 182029 182041 182047 182057 182059 182089 182099 182101 182107
-182111 182123 182129 182131 182141 182159 182167 182177 182179 182201 182209 182233
-182239 182243 182261 182279 182297 182309 182333 182339 182341 182353 182387 182389
-182417 182423 182431 182443 182453 182467 182471 182473 182489 182503 182509 182519
-182537 182549 182561 182579 182587 182593 182599 182603 182617 182627 182639 182641
-182653 182657 182659 182681 182687 182701 182711 182713 182747 182773 182779 182789
-182803 182813 182821 182839 182851 182857 182867 182887 182893 182899 182921 182927
-182929 182933 182953 182957 182969 182981 182999 183023 183037 183041 183047 183059
-183067 183089 183091 183119 183151 183167 183191 183203 183247 183259 183263 183283
-183289 183299 183301 183307 183317 183319 183329 183343 183349 183361 183373 183377
-183383 183389 183397 183437 183439 183451 183461 183473 183479 183487 183497 183499
-183503 183509 183511 183523 183527 183569 183571 183577 183581 183587 183593 183611
-183637 183661 183683 183691 183697 183707 183709 183713 183761 183763 183797 183809
-183823 183829 183871 183877 183881 183907 183917 183919 183943 183949 183959 183971
-183973 183979 184003 184007 184013 184031 184039 184043 184057 184073 184081 184087
-184111 184117 184133 184153 184157 184181 184187 184189 184199 184211 184231 184241
-184259 184271 184273 184279 184291 184309 184321 184333 184337 184351 184369 184409
-184417 184441 184447 184463 184477 184487 184489 184511 184517 184523 184553 184559
-184567 184571 184577 184607 184609 184627 184631 184633 184649 184651 184669 184687
-184693 184703 184711 184721 184727 184733 184753 184777 184823 184829 184831 184837
-184843 184859 184879 184901 184903 184913 184949 184957 184967 184969 184993 184997
-184999 185021 185027 185051 185057 185063 185069 185071 185077 185089 185099 185123
-185131 185137 185149 185153 185161 185167 185177 185183 185189 185221 185233 185243
-185267 185291 185299 185303 185309 185323 185327 185359 185363 185369 185371 185401
-185429 185441 185467 185477 185483 185491 185519 185527 185531 185533 185539 185543
-185551 185557 185567 185569 185593 185599 185621 185641 185651 185677 185681 185683
-185693 185699 185707 185711 185723 185737 185747 185749 185753 185767 185789 185797
-185813 185819 185821 185831 185833 185849 185869 185873 185893 185897 185903 185917
-185923 185947 185951 185957 185959 185971 185987 185993 186007 186013 186019 186023
-186037 186041 186049 186071 186097 186103 186107 186113 186119 186149 186157 186161
-186163 186187 186191 186211 186227 186229 186239 186247 186253 186259 186271 186283
-186299 186301 186311 186317 186343 186377 186379 186391 186397 186419 186437 186451
-186469 186479 186481 186551 186569 186581 186583 186587 186601 186619 186629 186647
-186649 186653 186671 186679 186689 186701 186707 186709 186727 186733 186743 186757
-186761 186763 186773 186793 186799 186841 186859 186869 186871 186877 186883 186889
-186917 186947 186959 187003 187009 187027 187043 187049 187067 187069 187073 187081
-187091 187111 187123 187127 187129 187133 187139 187141 187163 187171 187177 187181
-187189 187193 187211 187217 187219 187223 187237 187273 187277 187303 187337 187339
-187349 187361 187367 187373 187379 187387 187393 187409 187417 187423 187433 187441
-187463 187469 187471 187477 187507 187513 187531 187547 187559 187573 187597 187631
-187633 187637 187639 187651 187661 187669 187687 187699 187711 187721 187751 187763
-187787 187793 187823 187843 187861 187871 187877 187883 187897 187907 187909 187921
-187927 187931 187951 187963 187973 187987 188011 188017 188021 188029 188107 188137
-188143 188147 188159 188171 188179 188189 188197 188249 188261 188273 188281 188291
-188299 188303 188311 188317 188323 188333 188351 188359 188369 188389 188401 188407
-188417 188431 188437 188443 188459 188473 188483 188491 188519 188527 188533 188563
-188579 188603 188609 188621 188633 188653 188677 188681 188687 188693 188701 188707
-188711 188719 188729 188753 188767 188779 188791 188801 188827 188831 188833 188843
-188857 188861 188863 188869 188891 188911 188927 188933 188939 188941 188953 188957
-188983 188999 189011 189017 189019 189041 189043 189061 189067 189127 189139 189149
-189151 189169 189187 189199 189223 189229 189239 189251 189253 189257 189271 189307
-189311 189337 189347 189349 189353 189361 189377 189389 189391 189401 189407 189421
-189433 189437 189439 189463 189467 189473 189479 189491 189493 189509 189517 189523
-189529 189547 189559 189583 189593 189599 189613 189617 189619 189643 189653 189661
-189671 189691 189697 189701 189713 189733 189743 189757 189767 189797 189799 189817
-189823 189851 189853 189859 189877 189881 189887 189901 189913 189929 189947 189949
-189961 189967 189977 189983 189989 189997 190027 190031 190051 190063 190093 190097
-190121 190129 190147 190159 190181 190207 190243 190249 190261 190271 190283 190297
-190301 190313 190321 190331 190339 190357 190367 190369 190387 190391 190403 190409
-190471 190507 190523 190529 190537 190543 190573 190577 190579 190583 190591 190607
-190613 190633 190639 190649 190657 190667 190669 190699 190709 190711 190717 190753
-190759 190763 190769 190783 190787 190793 190807 190811 190823 190829 190837 190843
-190871 190889 190891 190901 190909 190913 190921 190979 190997 191021 191027 191033
-191039 191047 191057 191071 191089 191099 191119 191123 191137 191141 191143 191161
-191173 191189 191227 191231 191237 191249 191251 191281 191297 191299 191339 191341
-191353 191413 191441 191447 191449 191453 191459 191461 191467 191473 191491 191497
-191507 191509 191519 191531 191533 191537 191551 191561 191563 191579 191599 191621
-191627 191657 191669 191671 191677 191689 191693 191699 191707 191717 191747 191749
-191773 191783 191791 191801 191803 191827 191831 191833 191837 191861 191899 191903
-191911 191929 191953 191969 191977 191999 192007 192013 192029 192037 192043 192047
-192053 192091 192097 192103 192113 192121 192133 192149 192161 192173 192187 192191
-192193 192229 192233 192239 192251 192259 192263 192271 192307 192317 192319 192323
-192341 192343 192347 192373 192377 192383 192391 192407 192431 192461 192463 192497
-192499 192529 192539 192547 192553 192557 192571 192581 192583 192587 192601 192611
-192613 192617 192629 192631 192637 192667 192677 192697 192737 192743 192749 192757
-192767 192781 192791 192799 192811 192817 192833 192847 192853 192859 192877 192883
-192887 192889 192917 192923 192931 192949 192961 192971 192977 192979 192991 193003
-193009 193013 193031 193043 193051 193057 193073 193093 193133 193139 193147 193153
-193163 193181 193183 193189 193201 193243 193247 193261 193283 193301 193327 193337
-193357 193367 193373 193379 193381 193387 193393 193423 193433 193441 193447 193451
-193463 193469 193493 193507 193513 193541 193549 193559 193573 193577 193597 193601
-193603 193607 193619 193649 193663 193679 193703 193723 193727 193741 193751 193757
-193763 193771 193789 193793 193799 193811 193813 193841 193847 193859 193861 193871
-193873 193877 193883 193891 193937 193939 193943 193951 193957 193979 193993 194003
-194017 194027 194057 194069 194071 194083 194087 194093 194101 194113 194119 194141
-194149 194167 194179 194197 194203 194239 194263 194267 194269 194309 194323 194353
-194371 194377 194413 194431 194443 194471 194479 194483 194507 194521 194527 194543
-194569 194581 194591 194609 194647 194653 194659 194671 194681 194683 194687 194707
-194713 194717 194723 194729 194749 194767 194771 194809 194813 194819 194827 194839
-194861 194863 194867 194869 194891 194899 194911 194917 194933 194963 194977 194981
-194989 195023 195029 195043 195047 195049 195053 195071 195077 195089 195103 195121
-195127 195131 195137 195157 195161 195163 195193 195197 195203 195229 195241 195253
-195259 195271 195277 195281 195311 195319 195329 195341 195343 195353 195359 195389
-195401 195407 195413 195427 195443 195457 195469 195479 195493 195497 195511 195527
-195539 195541 195581 195593 195599 195659 195677 195691 195697 195709 195731 195733
-195737 195739 195743 195751 195761 195781 195787 195791 195809 195817 195863 195869
-195883 195887 195893 195907 195913 195919 195929 195931 195967 195971 195973 195977
-195991 195997 196003 196033 196039 196043 196051 196073 196081 196087 196111 196117
-196139 196159 196169 196171 196177 196181 196187 196193 196201 196247 196271 196277
-196279 196291 196303 196307 196331 196337 196379 196387 196429 196439 196453 196459
-196477 196499 196501 196519 196523 196541 196543 196549 196561 196579 196583 196597
-196613 196643 196657 196661 196663 196681 196687 196699 196709 196717 196727 196739
-196751 196769 196771 196799 196817 196831 196837 196853 196871 196873 196879 196901
-196907 196919 196927 196961 196991 196993 197003 197009 197023 197033 197059 197063
-197077 197083 197089 197101 197117 197123 197137 197147 197159 197161 197203 197207
-197221 197233 197243 197257 197261 197269 197273 197279 197293 197297 197299 197311
-197339 197341 197347 197359 197369 197371 197381 197383 197389 197419 197423 197441
-197453 197479 197507 197521 197539 197551 197567 197569 197573 197597 197599 197609
-197621 197641 197647 197651 197677 197683 197689 197699 197711 197713 197741 197753
-197759 197767 197773 197779 197803 197807 197831 197837 197887 197891 197893 197909
-197921 197927 197933 197947 197957 197959 197963 197969 197971 198013 198017 198031
-198043 198047 198073 198083 198091 198097 198109 198127 198139 198173 198179 198193
-198197 198221 198223 198241 198251 198257 198259 198277 198281 198301 198313 198323
-198337 198347 198349 198377 198391 198397 198409 198413 198427 198437 198439 198461
-198463 198469 198479 198491 198503 198529 198533 198553 198571 198589 198593 198599
-198613 198623 198637 198641 198647 198659 198673 198689 198701 198719 198733 198761
-198769 198811 198817 198823 198827 198829 198833 198839 198841 198851 198859 198899
-198901 198929 198937 198941 198943 198953 198959 198967 198971 198977 198997 199021
-199033 199037 199039 199049 199081 199103 199109 199151 199153 199181 199193 199207
-199211 199247 199261 199267 199289 199313 199321 199337 199343 199357 199373 199379
-199399 199403 199411 199417 199429 199447 199453 199457 199483 199487 199489 199499
-199501 199523 199559 199567 199583 199601 199603 199621 199637 199657 199669 199673
-199679 199687 199697 199721 199729 199739 199741 199751 199753 199777 199783 199799
-199807 199811 199813 199819 199831 199853 199873 199877 199889 199909 199921 199931
-199933 199961 199967 199999 200003 200009 200017 200023 200029 200033 200041 200063
-200087 200117 200131 200153 200159 200171 200177 200183 200191 200201 200227 200231
-200237 200257 200273 200293 200297 200323 200329 200341 200351 200357 200363 200371
-200381 200383 200401 200407 200437 200443 200461 200467 200483 200513 200569 200573
-200579 200587 200591 200597 200609 200639 200657 200671 200689 200699 200713 200723
-200731 200771 200779 200789 200797 200807 200843 200861 200867 200869 200881 200891
-200899 200903 200909 200927 200929 200971 200983 200987 200989 201007 201011 201031
-201037 201049 201073 201101 201107 201119 201121 201139 201151 201163 201167 201193
-201203 201209 201211 201233 201247 201251 201281 201287 201307 201329 201337 201359
-201389 201401 201403 201413 201437 201449 201451 201473 201491 201493 201497 201499
-201511 201517 201547 201557 201577 201581 201589 201599 201611 201623 201629 201653
-201661 201667 201673 201683 201701 201709 201731 201743 201757 201767 201769 201781
-201787 201791 201797 201809 201821 201823 201827 201829 201833 201847 201881 201889
-201893 201907 201911 201919 201923 201937 201947 201953 201961 201973 201979 201997
-202001 202021 202031 202049 202061 202063 202067 202087 202099 202109 202121 202127
-202129 202183 202187 202201 202219 202231 202243 202277 202289 202291 202309 202327
-202339 202343 202357 202361 202381 202387 202393 202403 202409 202441 202471 202481
-202493 202519 202529 202549 202567 202577 202591 202613 202621 202627 202637 202639
-202661 202667 202679 202693 202717 202729 202733 202747 202751 202753 202757 202777
-202799 202817 202823 202841 202859 202877 202879 202889 202907 202921 202931 202933
-202949 202967 202973 202981 202987 202999 203011 203017 203023 203039 203051 203057
-203117 203141 203173 203183 203207 203209 203213 203221 203227 203233 203249 203279
-203293 203309 203311 203317 203321 203323 203339 203341 203351 203353 203363 203381
-203383 203387 203393 203417 203419 203429 203431 203449 203459 203461 203531 203549
-203563 203569 203579 203591 203617 203627 203641 203653 203657 203659 203663 203669
-203713 203761 203767 203771 203773 203789 203807 203809 203821 203843 203857 203869
-203873 203897 203909 203911 203921 203947 203953 203969 203971 203977 203989 203999
-204007 204013 204019 204023 204047 204059 204067 204101 204107 204133 204137 204143
-204151 204161 204163 204173 204233 204251 204299 204301 204311 204319 204329 204331
-204353 204359 204361 204367 204371 204377 204397 204427 204431 204437 204439 204443
-204461 204481 204487 204509 204511 204517 204521 204557 204563 204583 204587 204599
-204601 204613 204623 204641 204667 204679 204707 204719 204733 204749 204751 204781
-204791 204793 204797 204803 204821 204857 204859 204871 204887 204913 204917 204923
-204931 204947 204973 204979 204983 205019 205031 205033 205043 205063 205069 205081
-205097 205103 205111 205129 205133 205141 205151 205157 205171 205187 205201 205211
-205213 205223 205237 205253 205267 205297 205307 205319 205327 205339 205357 205391
-205397 205399 205417 205421 205423 205427 205433 205441 205453 205463 205477 205483
-205487 205493 205507 205519 205529 205537 205549 205553 205559 205589 205603 205607
-205619 205627 205633 205651 205657 205661 205663 205703 205721 205759 205763 205783
-205817 205823 205837 205847 205879 205883 205913 205937 205949 205951 205957 205963
-205967 205981 205991 205993 206009 206021 206027 206033 206039 206047 206051 206069
-206077 206081 206083 206123 206153 206177 206179 206183 206191 206197 206203 206209
-206221 206233 206237 206249 206251 206263 206273 206279 206281 206291 206299 206303
-206341 206347 206351 206369 206383 206399 206407 206411 206413 206419 206447 206461
-206467 206477 206483 206489 206501 206519 206527 206543 206551 206593 206597 206603
-206623 206627 206639 206641 206651 206699 206749 206779 206783 206803 206807 206813
-206819 206821 206827 206879 206887 206897 206909 206911 206917 206923 206933 206939
-206951 206953 206993 207013 207017 207029 207037 207041 207061 207073 207079 207113
-207121 207127 207139 207169 207187 207191 207197 207199 207227 207239 207241 207257
-207269 207287 207293 207301 207307 207329 207331 207341 207343 207367 207371 207377
-207401 207409 207433 207443 207457 207463 207469 207479 207481 207491 207497 207509
-207511 207517 207521 207523 207541 207547 207551 207563 207569 207589 207593 207619
-207629 207643 207653 207661 207671 207673 207679 207709 207719 207721 207743 207763
-207769 207797 207799 207811 207821 207833 207847 207869 207877 207923 207931 207941
-207947 207953 207967 207971 207973 207997 208001 208003 208009 208037 208049 208057
-208067 208073 208099 208111 208121 208129 208139 208141 208147 208189 208207 208213
-208217 208223 208231 208253 208261 208277 208279 208283 208291 208309 208319 208333
-208337 208367 208379 208387 208391 208393 208409 208433 208441 208457 208459 208463
-208469 208489 208493 208499 208501 208511 208513 208519 208529 208553 208577 208589
-208591 208609 208627 208631 208657 208667 208673 208687 208697 208699 208721 208729
-208739 208759 208787 208799 208807 208837 208843 208877 208889 208891 208907 208927
-208931 208933 208961 208963 208991 208993 208997 209021 209029 209039 209063 209071
-209089 209123 209147 209159 209173 209179 209189 209201 209203 209213 209221 209227
-209233 209249 209257 209263 209267 209269 209299 209311 209317 209327 209333 209347
-209353 209357 209359 209371 209381 209393 209401 209431 209441 209449 209459 209471
-209477 209497 209519 209533 209543 209549 209563 209567 209569 209579 209581 209597
-209621 209623 209639 209647 209659 209669 209687 209701 209707 209717 209719 209743
-209767 209771 209789 209801 209809 209813 209819 209821 209837 209851 209857 209861
-209887 209917 209927 209929 209939 209953 209959 209971 209977 209983 209987 210011
-210019 210031 210037 210053 210071 210097 210101 210109 210113 210127 210131 210139
-210143 210157 210169 210173 210187 210191 210193 210209 210229 210233 210241 210247
-210257 210263 210277 210283 210299 210317 210319 210323 210347 210359 210361 210391
-210401 210403 210407 210421 210437 210461 210467 210481 210487 210491 210499 210523
-210527 210533 210557 210599 210601 210619 210631 210643 210659 210671 210709 210713
-210719 210731 210739 210761 210773 210803 210809 210811 210823 210827 210839 210853
-210857 210869 210901 210907 210911 210913 210923 210929 210943 210961 210967 211007
-211039 211049 211051 211061 211063 211067 211073 211093 211097 211129 211151 211153
-211177 211187 211193 211199 211213 211217 211219 211229 211231 211241 211247 211271
-211283 211291 211297 211313 211319 211333 211339 211349 211369 211373 211403 211427
-211433 211441 211457 211469 211493 211499 211501 211507 211543 211559 211571 211573
-211583 211597 211619 211639 211643 211657 211661 211663 211681 211691 211693 211711
-211723 211727 211741 211747 211777 211781 211789 211801 211811 211817 211859 211867
-211873 211877 211879 211889 211891 211927 211931 211933 211943 211949 211969 211979
-211997 212029 212039 212057 212081 212099 212117 212123 212131 212141 212161 212167
-212183 212203 212207 212209 212227 212239 212243 212281 212293 212297 212353 212369
-212383 212411 212419 212423 212437 212447 212453 212461 212467 212479 212501 212507
-212557 212561 212573 212579 212587 212593 212627 212633 212651 212669 212671 212677
-212683 212701 212777 212791 212801 212827 212837 212843 212851 212867 212869 212873
-212881 212897 212903 212909 212917 212923 212969 212981 212987 212999 213019 213023
-213029 213043 213067 213079 213091 213097 213119 213131 213133 213139 213149 213173
-213181 213193 213203 213209 213217 213223 213229 213247 213253 213263 213281 213287
-213289 213307 213319 213329 213337 213349 213359 213361 213383 213391 213397 213407
-213449 213461 213467 213481 213491 213523 213533 213539 213553 213557 213589 213599
-213611 213613 213623 213637 213641 213649 213659 213713 213721 213727 213737 213751
-213791 213799 213821 213827 213833 213847 213859 213881 213887 213901 213919 213929
-213943 213947 213949 213953 213973 213977 213989 214003 214007 214009 214021 214031
-214033 214043 214051 214063 214069 214087 214091 214129 214133 214141 214147 214163
-214177 214189 214211 214213 214219 214237 214243 214259 214283 214297 214309 214351
-214363 214373 214381 214391 214399 214433 214439 214451 214457 214463 214469 214481
-214483 214499 214507 214517 214519 214531 214541 214559 214561 214589 214603 214607
-214631 214639 214651 214657 214663 214667 214673 214691 214723 214729 214733 214741
-214759 214763 214771 214783 214787 214789 214807 214811 214817 214831 214849 214853
-214867 214883 214891 214913 214939 214943 214967 214987 214993 215051 215063 215077
-215087 215123 215141 215143 215153 215161 215179 215183 215191 215197 215239 215249
-215261 215273 215279 215297 215309 215317 215329 215351 215353 215359 215381 215389
-215393 215399 215417 215443 215447 215459 215461 215471 215483 215497 215503 215507
-215521 215531 215563 215573 215587 215617 215653 215659 215681 215687 215689 215693
-215723 215737 215753 215767 215771 215797 215801 215827 215833 215843 215851 215857
-215863 215893 215899 215909 215921 215927 215939 215953 215959 215981 215983 216023
-216037 216061 216071 216091 216103 216107 216113 216119 216127 216133 216149 216157
-216173 216179 216211 216217 216233 216259 216263 216289 216317 216319 216329 216347
-216371 216373 216379 216397 216401 216421 216431 216451 216481 216493 216509 216523
-216551 216553 216569 216571 216577 216607 216617 216641 216647 216649 216653 216661
-216679 216703 216719 216731 216743 216751 216757 216761 216779 216781 216787 216791
-216803 216829 216841 216851 216859 216877 216899 216901 216911 216917 216919 216947
-216967 216973 216991 217001 217003 217027 217033 217057 217069 217081 217111 217117
-217121 217157 217163 217169 217199 217201 217207 217219 217223 217229 217241 217253
-217271 217307 217309 217313 217319 217333 217337 217339 217351 217361 217363 217367
-217369 217387 217397 217409 217411 217421 217429 217439 217457 217463 217489 217499
-217517 217519 217559 217561 217573 217577 217579 217619 217643 217661 217667 217681
-217687 217691 217697 217717 217727 217733 217739 217747 217771 217781 217793 217823
-217829 217849 217859 217901 217907 217909 217933 217937 217969 217979 217981 218003
-218021 218047 218069 218077 218081 218083 218087 218107 218111 218117 218131 218137
-218143 218149 218171 218191 218213 218227 218233 218249 218279 218287 218357 218363
-218371 218381 218389 218401 218417 218419 218423 218437 218447 218453 218459 218461
-218479 218509 218513 218521 218527 218531 218549 218551 218579 218591 218599 218611
-218623 218627 218629 218641 218651 218657 218677 218681 218711 218717 218719 218723
-218737 218749 218761 218783 218797 218809 218819 218833 218839 218843 218849 218857
-218873 218887 218923 218941 218947 218963 218969 218971 218987 218989 218993 219001
-219017 219019 219031 219041 219053 219059 219071 219083 219091 219097 219103 219119
-219133 219143 219169 219187 219217 219223 219251 219277 219281 219293 219301 219311
-219313 219353 219361 219371 219377 219389 219407 219409 219433 219437 219451 219463
-219467 219491 219503 219517 219523 219529 219533 219547 219577 219587 219599 219607
-219613 219619 219629 219647 219649 219677 219679 219683 219689 219707 219721 219727
-219731 219749 219757 219761 219763 219767 219787 219797 219799 219809 219823 219829
-219839 219847 219851 219871 219881 219889 219911 219917 219931 219937 219941 219943
-219953 219959 219971 219977 219979 219983 220009 220013 220019 220021 220057 220063
-220123 220141 220147 220151 220163 220169 220177 220189 220217 220243 220279 220291
-220301 220307 220327 220333 220351 220357 220361 220369 220373 220391 220399 220403
-220411 220421 220447 220469 220471 220511 220513 220529 220537 220543 220553 220559
-220573 220579 220589 220613 220663 220667 220673 220681 220687 220699 220709 220721
-220747 220757 220771 220783 220789 220793 220807 220811 220841 220859 220861 220873
-220877 220879 220889 220897 220901 220903 220907 220919 220931 220933 220939 220973
-221021 221047 221059 221069 221071 221077 221083 221087 221093 221101 221159 221171
-221173 221197 221201 221203 221209 221219 221227 221233 221239 221251 221261 221281
-221303 221311 221317 221327 221393 221399 221401 221411 221413 221447 221453 221461
-221471 221477 221489 221497 221509 221537 221539 221549 221567 221581 221587 221603
-221621 221623 221653 221657 221659 221671 221677 221707 221713 221717 221719 221723
-221729 221737 221747 221773 221797 221807 221813 221827 221831 221849 221873 221891
-221909 221941 221951 221953 221957 221987 221989 221999 222007 222011 222023 222029
-222041 222043 222059 222067 222073 222107 222109 222113 222127 222137 222149 222151
-222161 222163 222193 222197 222199 222247 222269 222289 222293 222311 222317 222323
-222329 222337 222347 222349 222361 222367 222379 222389 222403 222419 222437 222461
-222493 222499 222511 222527 222533 222553 222557 222587 222601 222613 222619 222643
-222647 222659 222679 222707 222713 222731 222773 222779 222787 222791 222793 222799
-222823 222839 222841 222857 222863 222877 222883 222913 222919 222931 222941 222947
-222953 222967 222977 222979 222991 223007 223009 223019 223037 223049 223051 223061
-223063 223087 223099 223103 223129 223133 223151 223207 223211 223217 223219 223229
-223241 223243 223247 223253 223259 223273 223277 223283 223291 223303 223313 223319
-223331 223337 223339 223361 223367 223381 223403 223423 223429 223439 223441 223463
-223469 223481 223493 223507 223529 223543 223547 223549 223577 223589 223621 223633
-223637 223667 223679 223681 223697 223711 223747 223753 223757 223759 223781 223823
-223829 223831 223837 223841 223843 223849 223903 223919 223921 223939 223963 223969
-223999 224011 224027 224033 224041 224047 224057 224069 224071 224101 224113 224129
-224131 224149 224153 224171 224177 224197 224201 224209 224221 224233 224239 224251
-224261 224267 224291 224299 224303 224309 224317 224327 224351 224359 224363 224401
-224423 224429 224443 224449 224461 224467 224473 224491 224501 224513 224527 224563
-224569 224579 224591 224603 224611 224617 224629 224633 224669 224677 224683 224699
-224711 224717 224729 224737 224743 224759 224771 224797 224813 224831 224863 224869
-224881 224891 224897 224909 224911 224921 224929 224947 224951 224969 224977 224993
-225023 225037 225061 225067 225077 225079 225089 225109 225119 225133 225143 225149
-225157 225161 225163 225167 225217 225221 225223 225227 225241 225257 225263 225287
-225289 225299 225307 225341 225343 225347 225349 225353 225371 225373 225383 225427
-225431 225457 225461 225479 225493 225499 225503 225509 225523 225527 225529 225569
-225581 225583 225601 225611 225613 225619 225629 225637 225671 225683 225689 225697
-225721 225733 225749 225751 225767 225769 225779 225781 225809 225821 225829 225839
-225859 225871 225889 225919 225931 225941 225943 225949 225961 225977 225983 225989
-226001 226007 226013 226027 226063 226087 226099 226103 226123 226129 226133 226141
-226169 226183 226189 226199 226201 226217 226231 226241 226267 226283 226307 226313
-226337 226357 226367 226379 226381 226397 226409 226427 226433 226451 226453 226463
-226483 226487 226511 226531 226547 226549 226553 226571 226601 226609 226621 226631
-226637 226643 226649 226657 226663 226669 226691 226697 226741 226753 226769 226777
-226783 226789 226799 226813 226817 226819 226823 226843 226871 226901 226903 226907
-226913 226937 226943 226991 227011 227027 227053 227081 227089 227093 227111 227113
-227131 227147 227153 227159 227167 227177 227189 227191 227207 227219 227231 227233
-227251 227257 227267 227281 227299 227303 227363 227371 227377 227387 227393 227399
-227407 227419 227431 227453 227459 227467 227471 227473 227489 227497 227501 227519
-227531 227533 227537 227561 227567 227569 227581 227593 227597 227603 227609 227611
-227627 227629 227651 227653 227663 227671 227693 227699 227707 227719 227729 227743
-227789 227797 227827 227849 227869 227873 227893 227947 227951 227977 227989 227993
-228013 228023 228049 228061 228077 228097 228103 228113 228127 228131 228139 228181
-228197 228199 228203 228211 228223 228233 228251 228257 228281 228299 228301 228307
-228311 228331 228337 228341 228353 228359 228383 228409 228419 228421 228427 228443
-228451 228457 228461 228469 228479 228509 228511 228517 228521 228523 228539 228559
-228577 228581 228587 228593 228601 228611 228617 228619 228637 228647 228677 228707
-228713 228731 228733 228737 228751 228757 228773 228793 228797 228799 228829 228841
-228847 228853 228859 228869 228881 228883 228887 228901 228911 228913 228923 228929
-228953 228959 228961 228983 228989 229003 229027 229037 229081 229093 229123 229127
-229133 229139 229153 229157 229171 229181 229189 229199 229213 229217 229223 229237
-229247 229249 229253 229261 229267 229283 229309 229321 229343 229351 229373 229393
-229399 229403 229409 229423 229433 229459 229469 229487 229499 229507 229519 229529
-229547 229549 229553 229561 229583 229589 229591 229601 229613 229627 229631 229637
-229639 229681 229693 229699 229703 229711 229717 229727 229739 229751 229753 229759
-229763 229769 229771 229777 229781 229799 229813 229819 229837 229841 229847 229849
-229897 229903 229937 229939 229949 229961 229963 229979 229981 230003 230017 230047
-230059 230063 230077 230081 230089 230101 230107 230117 230123 230137 230143 230149
-230189 230203 230213 230221 230227 230233 230239 230257 230273 230281 230291 230303
-230309 230311 230327 230339 230341 230353 230357 230369 230383 230387 230389 230393
-230431 230449 230453 230467 230471 230479 230501 230507 230539 230551 230561 230563
-230567 230597 230611 230647 230653 230663 230683 230693 230719 230729 230743 230761
-230767 230771 230773 230779 230807 230819 230827 230833 230849 230861 230863 230873
-230891 230929 230933 230939 230941 230959 230969 230977 230999 231001 231017 231019
-231031 231041 231053 231067 231079 231107 231109 231131 231169 231197 231223 231241
-231269 231271 231277 231289 231293 231299 231317 231323 231331 231347 231349 231359
-231367 231379 231409 231419 231431 231433 231443 231461 231463 231479 231481 231493
-231503 231529 231533 231547 231551 231559 231563 231571 231589 231599 231607 231611
-231613 231631 231643 231661 231677 231701 231709 231719 231779 231799 231809 231821
-231823 231827 231839 231841 231859 231871 231877 231893 231901 231919 231923 231943
-231947 231961 231967 232003 232007 232013 232049 232051 232073 232079 232081 232091
-232103 232109 232117 232129 232153 232171 232187 232189 232207 232217 232259 232303
-232307 232333 232357 232363 232367 232381 232391 232409 232411 232417 232433 232439
-232451 232457 232459 232487 232499 232513 232523 232549 232567 232571 232591 232597
-232607 232621 232633 232643 232663 232669 232681 232699 232709 232711 232741 232751
-232753 232777 232801 232811 232819 232823 232847 232853 232861 232871 232877 232891
-232901 232907 232919 232937 232961 232963 232987 233021 233069 233071 233083 233113
-233117 233141 233143 233159 233161 233173 233183 233201 233221 233231 233239 233251
-233267 233279 233293 233297 233323 233327 233329 233341 233347 233353 233357 233371
-233407 233417 233419 233423 233437 233477 233489 233509 233549 233551 233557 233591
-233599 233609 233617 233621 233641 233663 233669 233683 233687 233689 233693 233713
-233743 233747 233759 233777 233837 233851 233861 233879 233881 233911 233917 233921
-233923 233939 233941 233969 233983 233993 234007 234029 234043 234067 234083 234089
-234103 234121 234131 234139 234149 234161 234167 234181 234187 234191 234193 234197
-234203 234211 234217 234239 234259 234271 234281 234287 234293 234317 234319 234323
-234331 234341 234343 234361 234383 234431 234457 234461 234463 234467 234473 234499
-234511 234527 234529 234539 234541 234547 234571 234587 234589 234599 234613 234629
-234653 234659 234673 234683 234713 234721 234727 234733 234743 234749 234769 234781
-234791 234799 234803 234809 234811 234833 234847 234851 234863 234869 234893 234907
-234917 234931 234947 234959 234961 234967 234977 234979 234989 235003 235007 235009
-235013 235043 235051 235057 235069 235091 235099 235111 235117 235159 235171 235177
-235181 235199 235211 235231 235241 235243 235273 235289 235307 235309 235337 235349
-235369 235397 235439 235441 235447 235483 235489 235493 235513 235519 235523 235537
-235541 235553 235559 235577 235591 235601 235607 235621 235661 235663 235673 235679
-235699 235723 235747 235751 235783 235787 235789 235793 235811 235813 235849 235871
-235877 235889 235891 235901 235919 235927 235951 235967 235979 235997 236017 236021
-236053 236063 236069 236077 236087 236107 236111 236129 236143 236153 236167 236207
-236209 236219 236231 236261 236287 236293 236297 236323 236329 236333 236339 236377
-236381 236387 236399 236407 236429 236449 236461 236471 236477 236479 236503 236507
-236519 236527 236549 236563 236573 236609 236627 236641 236653 236659 236681 236699
-236701 236707 236713 236723 236729 236737 236749 236771 236773 236779 236783 236807
-236813 236867 236869 236879 236881 236891 236893 236897 236909 236917 236947 236981
-236983 236993 237011 237019 237043 237053 237067 237071 237073 237089 237091 237137
-237143 237151 237157 237161 237163 237173 237179 237203 237217 237233 237257 237271
-237277 237283 237287 237301 237313 237319 237331 237343 237361 237373 237379 237401
-237409 237467 237487 237509 237547 237563 237571 237581 237607 237619 237631 237673
-237683 237689 237691 237701 237707 237733 237737 237749 237763 237767 237781 237791
-237821 237851 237857 237859 237877 237883 237901 237911 237929 237959 237967 237971
-237973 237977 237997 238001 238009 238019 238031 238037 238039 238079 238081 238093
-238099 238103 238109 238141 238151 238157 238159 238163 238171 238181 238201 238207
-238213 238223 238229 238237 238247 238261 238267 238291 238307 238313 238321 238331
-238339 238361 238363 238369 238373 238397 238417 238423 238439 238451 238463 238471
-238477 238481 238499 238519 238529 238531 238547 238573 238591 238627 238639 238649
-238657 238673 238681 238691 238703 238709 238723 238727 238729 238747 238759 238781
-238789 238801 238829 238837 238841 238853 238859 238877 238879 238883 238897 238919
-238921 238939 238943 238949 238967 238991 239017 239023 239027 239053 239069 239081
-239087 239119 239137 239147 239167 239171 239179 239201 239231 239233 239237 239243
-239251 239263 239273 239287 239297 239329 239333 239347 239357 239383 239387 239389
-239417 239423 239429 239431 239441 239461 239489 239509 239521 239527 239531 239539
-239543 239557 239567 239579 239587 239597 239611 239623 239633 239641 239671 239689
-239699 239711 239713 239731 239737 239753 239779 239783 239803 239807 239831 239843
-239849 239851 239857 239873 239879 239893 239929 239933 239947 239957 239963 239977
-239999 240007 240011 240017 240041 240043 240047 240049 240059 240073 240089 240101
-240109 240113 240131 240139 240151 240169 240173 240197 240203 240209 240257 240259
-240263 240271 240283 240287 240319 240341 240347 240349 240353 240371 240379 240421
-240433 240437 240473 240479 240491 240503 240509 240517 240551 240571 240587 240589
-240599 240607 240623 240631 240641 240659 240677 240701 240707 240719 240727 240733
-240739 240743 240763 240769 240797 240811 240829 240841 240853 240859 240869 240881
-240883 240893 240899 240913 240943 240953 240959 240967 240997 241013 241027 241037
-241049 241051 241061 241067 241069 241079 241093 241117 241127 241141 241169 241177
-241183 241207 241229 241249 241253 241259 241261 241271 241291 241303 241313 241321
-241327 241333 241337 241343 241361 241363 241391 241393 241421 241429 241441 241453
-241463 241469 241489 241511 241513 241517 241537 241543 241559 241561 241567 241589
-241597 241601 241603 241639 241643 241651 241663 241667 241679 241687 241691 241711
-241727 241739 241771 241781 241783 241793 241807 241811 241817 241823 241847 241861
-241867 241873 241877 241883 241903 241907 241919 241921 241931 241939 241951 241963
-241973 241979 241981 241993 242009 242057 242059 242069 242083 242093 242101 242119
-242129 242147 242161 242171 242173 242197 242201 242227 242243 242257 242261 242273
-242279 242309 242329 242357 242371 242377 242393 242399 242413 242419 242441 242447
-242449 242453 242467 242479 242483 242491 242509 242519 242521 242533 242551 242591
-242603 242617 242621 242629 242633 242639 242647 242659 242677 242681 242689 242713
-242729 242731 242747 242773 242779 242789 242797 242807 242813 242819 242863 242867
-242873 242887 242911 242923 242927 242971 242989 242999 243011 243031 243073 243077
-243091 243101 243109 243119 243121 243137 243149 243157 243161 243167 243197 243203
-243209 243227 243233 243239 243259 243263 243301 243311 243343 243367 243391 243401
-243403 243421 243431 243433 243437 243461 243469 243473 243479 243487 243517 243521
-243527 243533 243539 243553 243577 243583 243587 243589 243613 243623 243631 243643
-243647 243671 243673 243701 243703 243707 243709 243769 243781 243787 243799 243809
-243829 243839 243851 243857 243863 243871 243889 243911 243917 243931 243953 243973
-243989 244003 244009 244021 244033 244043 244087 244091 244109 244121 244129 244141
-244147 244157 244159 244177 244199 244217 244219 244243 244247 244253 244261 244291
-244297 244301 244303 244313 244333 244339 244351 244357 244367 244379 244381 244393
-244399 244403 244411 244423 244429 244451 244457 244463 244471 244481 244493 244507
-244529 244547 244553 244561 244567 244583 244589 244597 244603 244619 244633 244637
-244639 244667 244669 244687 244691 244703 244711 244721 244733 244747 244753 244759
-244781 244787 244813 244837 244841 244843 244859 244861 244873 244877 244889 244897
-244901 244939 244943 244957 244997 245023 245029 245033 245039 245071 245083 245087
-245107 245129 245131 245149 245171 245173 245177 245183 245209 245251 245257 245261
-245269 245279 245291 245299 245317 245321 245339 245383 245389 245407 245411 245417
-245419 245437 245471 245473 245477 245501 245513 245519 245521 245527 245533 245561
-245563 245587 245591 245593 245621 245627 245629 245639 245653 245671 245681 245683
-245711 245719 245723 245741 245747 245753 245759 245771 245783 245789 245821 245849
-245851 245863 245881 245897 245899 245909 245911 245941 245963 245977 245981 245983
-245989 246011 246017 246049 246073 246097 246119 246121 246131 246133 246151 246167
-246173 246187 246193 246203 246209 246217 246223 246241 246247 246251 246271 246277
-246289 246317 246319 246329 246343 246349 246361 246371 246391 246403 246439 246469
-246473 246497 246509 246511 246523 246527 246539 246557 246569 246577 246599 246607
-246611 246613 246637 246641 246643 246661 246683 246689 246707 246709 246713 246731
-246739 246769 246773 246781 246787 246793 246803 246809 246811 246817 246833 246839
-246889 246899 246907 246913 246919 246923 246929 246931 246937 246941 246947 246971
-246979 247001 247007 247031 247067 247069 247073 247087 247099 247141 247183 247193
-247201 247223 247229 247241 247249 247259 247279 247301 247309 247337 247339 247343
-247363 247369 247381 247391 247393 247409 247421 247433 247439 247451 247463 247501
-247519 247529 247531 247547 247553 247579 247591 247601 247603 247607 247609 247613
-247633 247649 247651 247691 247693 247697 247711 247717 247729 247739 247759 247769
-247771 247781 247799 247811 247813 247829 247847 247853 247873 247879 247889 247901
-247913 247939 247943 247957 247991 247993 247997 247999 248021 248033 248041 248051
-248057 248063 248071 248077 248089 248099 248117 248119 248137 248141 248161 248167
-248177 248179 248189 248201 248203 248231 248243 248257 248267 248291 248293 248299
-248309 248317 248323 248351 248357 248371 248389 248401 248407 248431 248441 248447
-248461 248473 248477 248483 248509 248533 248537 248543 248569 248579 248587 248593
-248597 248609 248621 248627 248639 248641 248657 248683 248701 248707 248719 248723
-248737 248749 248753 248779 248783 248789 248797 248813 248821 248827 248839 248851
-248861 248867 248869 248879 248887 248891 248893 248903 248909 248971 248981 248987
-249017 249037 249059 249079 249089 249097 249103 249107 249127 249131 249133 249143
-249181 249187 249199 249211 249217 249229 249233 249253 249257 249287 249311 249317
-249329 249341 249367 249377 249383 249397 249419 249421 249427 249433 249437 249439
-249449 249463 249497 249499 249503 249517 249521 249533 249539 249541 249563 249583
-249589 249593 249607 249647 249659 249671 249677 249703 249721 249727 249737 249749
-249763 249779 249797 249811 249827 249833 249853 249857 249859 249863 249871 249881
-249911 249923 249943 249947 249967 249971 249973 249989 250007 250013 250027 250031
-250037 250043 250049 250051 250057 250073 250091 250109 250123 250147 250153 250169
-250199 250253 250259 250267 250279 250301 250307 250343 250361 250403 250409 250423
-250433 250441 250451 250489 250499 250501 250543 250583 250619 250643 250673 250681
-250687 250693 250703 250709 250721 250727 250739 250741 250751 250753 250777 250787
-250793 250799 250807 250813 250829 250837 250841 250853 250867 250871 250889 250919
-250949 250951 250963 250967 250969 250979 250993 251003 251033 251051 251057 251059
-251063 251071 251081 251087 251099 251117 251143 251149 251159 251171 251177 251179
-251191 251197 251201 251203 251219 251221 251231 251233 251257 251261 251263 251287
-251291 251297 251323 251347 251353 251359 251387 251393 251417 251429 251431 251437
-251443 251467 251473 251477 251483 251491 251501 251513 251519 251527 251533 251539
-251543 251561 251567 251609 251611 251621 251623 251639 251653 251663 251677 251701
-251707 251737 251761 251789 251791 251809 251831 251833 251843 251857 251861 251879
-251887 251893 251897 251903 251917 251939 251941 251947 251969 251971 251983 252001
-252013 252017 252029 252037 252079 252101 252139 252143 252151 252157 252163 252169
-252173 252181 252193 252209 252223 252233 252253 252277 252283 252289 252293 252313
-252319 252323 252341 252359 252383 252391 252401 252409 252419 252431 252443 252449
-252457 252463 252481 252509 252533 252541 252559 252583 252589 252607 252611 252617
-252641 252667 252691 252709 252713 252727 252731 252737 252761 252767 252779 252817
-252823 252827 252829 252869 252877 252881 252887 252893 252899 252911 252913 252919
-252937 252949 252971 252979 252983 253003 253013 253049 253063 253081 253103 253109
-253133 253153 253157 253159 253229 253243 253247 253273 253307 253321 253343 253349
-253361 253367 253369 253381 253387 253417 253423 253427 253433 253439 253447 253469
-253481 253493 253501 253507 253531 253537 253543 253553 253567 253573 253601 253607
-253609 253613 253633 253637 253639 253651 253661 253679 253681 253703 253717 253733
-253741 253751 253763 253769 253777 253787 253789 253801 253811 253819 253823 253853
-253867 253871 253879 253901 253907 253909 253919 253937 253949 253951 253969 253987
-253993 253999 254003 254021 254027 254039 254041 254047 254053 254071 254083 254119
-254141 254147 254161 254179 254197 254207 254209 254213 254249 254257 254279 254281
-254291 254299 254329 254369 254377 254383 254389 254407 254413 254437 254447 254461
-254489 254491 254519 254537 254557 254593 254623 254627 254647 254659 254663 254699
-254713 254729 254731 254741 254747 254753 254773 254777 254783 254791 254803 254827
-254831 254833 254857 254869 254873 254879 254887 254899 254911 254927 254929 254941
-254959 254963 254971 254977 254987 254993 255007 255019 255023 255043 255049 255053
-255071 255077 255083 255097 255107 255121 255127 255133 255137 255149 255173 255179
-255181 255191 255193 255197 255209 255217 255239 255247 255251 255253 255259 255313
-255329 255349 255361 255371 255383 255413 255419 255443 255457 255467 255469 255473
-255487 255499 255503 255511 255517 255523 255551 255571 255587 255589 255613 255617
-255637 255641 255649 255653 255659 255667 255679 255709 255713 255733 255743 255757
-255763 255767 255803 255839 255841 255847 255851 255859 255869 255877 255887 255907
-255917 255919 255923 255947 255961 255971 255973 255977 255989 256019 256021 256031
-256033 256049 256057 256079 256093 256117 256121 256129 256133 256147 256163 256169
-256181 256187 256189 256199 256211 256219 256279 256301 256307 256313 256337 256349
-256363 256369 256391 256393 256423 256441 256469 256471 256483 256489 256493 256499
-256517 256541 256561 256567 256577 256579 256589 256603 256609 256639 256643 256651
-256661 256687 256699 256721 256723 256757 256771 256799 256801 256813 256831 256873
-256877 256889 256901 256903 256931 256939 256957 256967 256981 257003 257017 257053
-257069 257077 257093 257099 257107 257123 257141 257161 257171 257177 257189 257219
-257221 257239 257249 257263 257273 257281 257287 257293 257297 257311 257321 257339
-257351 257353 257371 257381 257399 257401 257407 257437 257443 257447 257459 257473
-257489 257497 257501 257503 257519 257539 257561 257591 257611 257627 257639 257657
-257671 257687 257689 257707 257711 257713 257717 257731 257783 257791 257797 257837
-257857 257861 257863 257867 257869 257879 257893 257903 257921 257947 257953 257981
-257987 257989 257993 258019 258023 258031 258061 258067 258101 258107 258109 258113
-258119 258127 258131 258143 258157 258161 258173 258197 258211 258233 258241 258253
-258277 258283 258299 258317 258319 258329 258331 258337 258353 258373 258389 258403
-258407 258413 258421 258437 258443 258449 258469 258487 258491 258499 258521 258527
-258539 258551 258563 258569 258581 258607 258611 258613 258617 258623 258631 258637
-258659 258673 258677 258691 258697 258703 258707 258721 258733 258737 258743 258763
-258779 258787 258803 258809 258827 258847 258871 258887 258917 258919 258949 258959
-258967 258971 258977 258983 258991 259001 259009 259019 259033 259099 259121 259123
-259151 259157 259159 259163 259169 259177 259183 259201 259211 259213 259219 259229
-259271 259277 259309 259321 259339 259379 259381 259387 259397 259411 259421 259429
-259451 259453 259459 259499 259507 259517 259531 259537 259547 259577 259583 259603
-259619 259621 259627 259631 259639 259643 259657 259667 259681 259691 259697 259717
-259723 259733 259751 259771 259781 259783 259801 259813 259823 259829 259837 259841
-259867 259907 259933 259937 259943 259949 259967 259991 259993 260003 260009 260011
-260017 260023 260047 260081 260089 260111 260137 260171 260179 260189 260191 260201
-260207 260209 260213 260231 260263 260269 260317 260329 260339 260363 260387 260399
-260411 260413 260417 260419 260441 260453 260461 260467 260483 260489 260527 260539
-260543 260549 260551 260569 260573 260581 260587 260609 260629 260647 260651 260671
-260677 260713 260717 260723 260747 260753 260761 260773 260791 260807 260809 260849
-260857 260861 260863 260873 260879 260893 260921 260941 260951 260959 260969 260983
-260987 260999 261011 261013 261017 261031 261043 261059 261061 261071 261077 261089
-261101 261127 261167 261169 261223 261229 261241 261251 261271 261281 261301 261323
-261329 261337 261347 261353 261379 261389 261407 261427 261431 261433 261439 261451
-261463 261467 261509 261523 261529 261557 261563 261577 261581 261587 261593 261601
-261619 261631 261637 261641 261643 261673 261697 261707 261713 261721 261739 261757
-261761 261773 261787 261791 261799 261823 261847 261881 261887 261917 261959 261971
-261973 261977 261983 262007 262027 262049 262051 262069 262079 262103 262109 262111
-262121 262127 262133 262139 262147 262151 262153 262187 262193 262217 262231 262237
-262253 262261 262271 262303 262313 262321 262331 262337 262349 262351 262369 262387
-262391 262399 262411 262433 262459 262469 262489 262501 262511 262513 262519 262541
-262543 262553 262567 262583 262597 262621 262627 262643 262649 262651 262657 262681
-262693 262697 262709 262723 262733 262739 262741 262747 262781 262783 262807 262819
-262853 262877 262883 262897 262901 262909 262937 262949 262957 262981 263009 263023
-263047 263063 263071 263077 263083 263089 263101 263111 263119 263129 263167 263171
-263183 263191 263201 263209 263213 263227 263239 263257 263267 263269 263273 263287
-263293 263303 263323 263369 263383 263387 263399 263401 263411 263423 263429 263437
-263443 263489 263491 263503 263513 263519 263521 263533 263537 263561 263567 263573
-263591 263597 263609 263611 263621 263647 263651 263657 263677 263723 263729 263737
-263759 263761 263803 263819 263821 263827 263843 263849 263863 263867 263869 263881
-263899 263909 263911 263927 263933 263941 263951 263953 263957 263983 264007 264013
-264029 264031 264053 264059 264071 264083 264091 264101 264113 264127 264133 264137
-264139 264167 264169 264179 264211 264221 264263 264269 264283 264289 264301 264323
-264331 264343 264349 264353 264359 264371 264391 264403 264437 264443 264463 264487
-264527 264529 264553 264559 264577 264581 264599 264601 264619 264631 264637 264643
-264659 264697 264731 264739 264743 264749 264757 264763 264769 264779 264787 264791
-264793 264811 264827 264829 264839 264871 264881 264889 264893 264899 264919 264931
-264949 264959 264961 264977 264991 264997 265003 265007 265021 265037 265079 265091
-265093 265117 265123 265129 265141 265151 265157 265163 265169 265193 265207 265231
-265241 265247 265249 265261 265271 265273 265277 265313 265333 265337 265339 265381
-265399 265403 265417 265423 265427 265451 265459 265471 265483 265493 265511 265513
-265541 265543 265547 265561 265567 265571 265579 265607 265613 265619 265621 265703
-265709 265711 265717 265729 265739 265747 265757 265781 265787 265807 265813 265819
-265831 265841 265847 265861 265871 265873 265883 265891 265921 265957 265961 265987
-266003 266009 266023 266027 266029 266047 266051 266053 266059 266081 266083 266089
-266093 266099 266111 266117 266129 266137 266153 266159 266177 266183 266221 266239
-266261 266269 266281 266291 266293 266297 266333 266351 266353 266359 266369 266381
-266401 266411 266417 266447 266449 266477 266479 266489 266491 266521 266549 266587
-266599 266603 266633 266641 266647 266663 266671 266677 266681 266683 266687 266689
-266701 266711 266719 266759 266767 266797 266801 266821 266837 266839 266863 266867
-266891 266897 266899 266909 266921 266927 266933 266947 266953 266957 266971 266977
-266983 266993 266999 267017 267037 267049 267097 267131 267133 267139 267143 267167
-267187 267193 267199 267203 267217 267227 267229 267233 267259 267271 267277 267299
-267301 267307 267317 267341 267353 267373 267389 267391 267401 267403 267413 267419
-267431 267433 267439 267451 267469 267479 267481 267493 267497 267511 267517 267521
-267523 267541 267551 267557 267569 267581 267587 267593 267601 267611 267613 267629
-267637 267643 267647 267649 267661 267667 267671 267677 267679 267713 267719 267721
-267727 267737 267739 267749 267763 267781 267791 267797 267803 267811 267829 267833
-267857 267863 267877 267887 267893 267899 267901 267907 267913 267929 267941 267959
-267961 268003 268013 268043 268049 268063 268069 268091 268123 268133 268153 268171
-268189 268199 268207 268211 268237 268253 268267 268271 268283 268291 268297 268343
-268403 268439 268459 268487 268493 268501 268507 268517 268519 268529 268531 268537
-268547 268573 268607 268613 268637 268643 268661 268693 268721 268729 268733 268747
-268757 268759 268771 268777 268781 268783 268789 268811 268813 268817 268819 268823
-268841 268843 268861 268883 268897 268909 268913 268921 268927 268937 268969 268973
-268979 268993 268997 268999 269023 269029 269039 269041 269057 269063 269069 269089
-269117 269131 269141 269167 269177 269179 269183 269189 269201 269209 269219 269221
-269231 269237 269251 269257 269281 269317 269327 269333 269341 269351 269377 269383
-269387 269389 269393 269413 269419 269429 269431 269441 269461 269473 269513 269519
-269527 269539 269543 269561 269573 269579 269597 269617 269623 269641 269651 269663
-269683 269701 269713 269719 269723 269741 269749 269761 269779 269783 269791 269851
-269879 269887 269891 269897 269923 269939 269947 269953 269981 269987 270001 270029
-270031 270037 270059 270071 270073 270097 270121 270131 270133 270143 270157 270163
-270167 270191 270209 270217 270223 270229 270239 270241 270269 270271 270287 270299
-270307 270311 270323 270329 270337 270343 270371 270379 270407 270421 270437 270443
-270451 270461 270463 270493 270509 270527 270539 270547 270551 270553 270563 270577
-270583 270587 270593 270601 270619 270631 270653 270659 270667 270679 270689 270701
-270709 270719 270737 270749 270761 270763 270791 270797 270799 270821 270833 270841
-270859 270899 270913 270923 270931 270937 270953 270961 270967 270973 271003 271013
-271021 271027 271043 271057 271067 271079 271097 271109 271127 271129 271163 271169
-271177 271181 271211 271217 271231 271241 271253 271261 271273 271277 271279 271289
-271333 271351 271357 271363 271367 271393 271409 271429 271451 271463 271471 271483
-271489 271499 271501 271517 271549 271553 271571 271573 271597 271603 271619 271637
-271639 271651 271657 271693 271703 271723 271729 271753 271769 271771 271787 271807
-271811 271829 271841 271849 271853 271861 271867 271879 271897 271903 271919 271927
-271939 271967 271969 271981 272003 272009 272011 272029 272039 272053 272059 272093
-272131 272141 272171 272179 272183 272189 272191 272201 272203 272227 272231 272249
-272257 272263 272267 272269 272287 272299 272317 272329 272333 272341 272347 272351
-272353 272359 272369 272381 272383 272399 272407 272411 272417 272423 272449 272453
-272477 272507 272533 272537 272539 272549 272563 272567 272581 272603 272621 272651
-272659 272683 272693 272717 272719 272737 272759 272761 272771 272777 272807 272809
-272813 272863 272879 272887 272903 272911 272917 272927 272933 272959 272971 272981
-272983 272989 272999 273001 273029 273043 273047 273059 273061 273067 273073 273083
-273107 273113 273127 273131 273149 273157 273181 273187 273193 273233 273253 273269
-273271 273281 273283 273289 273311 273313 273323 273349 273359 273367 273433 273457
-273473 273503 273517 273521 273527 273551 273569 273601 273613 273617 273629 273641
-273643 273653 273697 273709 273719 273727 273739 273773 273787 273797 273803 273821
-273827 273857 273881 273899 273901 273913 273919 273929 273941 273943 273967 273971
-273979 273997 274007 274019 274033 274061 274069 274081 274093 274103 274117 274121
-274123 274139 274147 274163 274171 274177 274187 274199 274201 274213 274223 274237
-274243 274259 274271 274277 274283 274301 274333 274349 274357 274361 274403 274423
-274441 274451 274453 274457 274471 274489 274517 274529 274579 274583 274591 274609
-274627 274661 274667 274679 274693 274697 274709 274711 274723 274739 274751 274777
-274783 274787 274811 274817 274829 274831 274837 274843 274847 274853 274861 274867
-274871 274889 274909 274931 274943 274951 274957 274961 274973 274993 275003 275027
-275039 275047 275053 275059 275083 275087 275129 275131 275147 275153 275159 275161
-275167 275183 275201 275207 275227 275251 275263 275269 275299 275309 275321 275323
-275339 275357 275371 275389 275393 275399 275419 275423 275447 275449 275453 275459
-275461 275489 275491 275503 275521 275531 275543 275549 275573 275579 275581 275591
-275593 275599 275623 275641 275651 275657 275669 275677 275699 275711 275719 275729
-275741 275767 275773 275783 275813 275827 275837 275881 275897 275911 275917 275921
-275923 275929 275939 275941 275963 275969 275981 275987 275999 276007 276011 276019
-276037 276041 276043 276047 276049 276079 276083 276091 276113 276137 276151 276173
-276181 276187 276191 276209 276229 276239 276247 276251 276257 276277 276293 276319
-276323 276337 276343 276347 276359 276371 276373 276389 276401 276439 276443 276449
-276461 276467 276487 276499 276503 276517 276527 276553 276557 276581 276587 276589
-276593 276599 276623 276629 276637 276671 276673 276707 276721 276739 276763 276767
-276779 276781 276817 276821 276823 276827 276833 276839 276847 276869 276883 276901
-276907 276917 276919 276929 276949 276953 276961 276977 277003 277007 277021 277051
-277063 277073 277087 277097 277099 277157 277163 277169 277177 277183 277213 277217
-277223 277231 277247 277259 277261 277273 277279 277297 277301 277309 277331 277363
-277373 277411 277421 277427 277429 277483 277493 277499 277513 277531 277547 277549
-277567 277577 277579 277597 277601 277603 277637 277639 277643 277657 277663 277687
-277691 277703 277741 277747 277751 277757 277787 277789 277793 277813 277829 277847
-277859 277883 277889 277891 277897 277903 277919 277961 277993 277999 278017 278029
-278041 278051 278063 278071 278087 278111 278119 278123 278143 278147 278149 278177
-278191 278207 278209 278219 278227 278233 278237 278261 278269 278279 278321 278329
-278347 278353 278363 278387 278393 278413 278437 278459 278479 278489 278491 278497
-278501 278503 278543 278549 278557 278561 278563 278581 278591 278609 278611 278617
-278623 278627 278639 278651 278671 278687 278689 278701 278717 278741 278743 278753
-278767 278801 278807 278809 278813 278819 278827 278843 278849 278867 278879 278881
-278891 278903 278909 278911 278917 278947 278981 279001 279007 279023 279029 279047
-279073 279109 279119 279121 279127 279131 279137 279143 279173 279179 279187 279203
-279211 279221 279269 279311 279317 279329 279337 279353 279397 279407 279413 279421
-279431 279443 279451 279479 279481 279511 279523 279541 279551 279553 279557 279571
-279577 279583 279593 279607 279613 279619 279637 279641 279649 279659 279679 279689
-279707 279709 279731 279751 279761 279767 279779 279817 279823 279847 279857 279863
-279883 279913 279919 279941 279949 279967 279977 279991 280001 280009 280013 280031
-280037 280061 280069 280097 280099 280103 280121 280129 280139 280183 280187 280199
-280207 280219 280223 280229 280243 280249 280253 280277 280297 280303 280321 280327
-280337 280339 280351 280373 280409 280411 280451 280463 280487 280499 280507 280513
-280537 280541 280547 280549 280561 280583 280589 280591 280597 280603 280607 280613
-280627 280639 280673 280681 280697 280699 280703 280711 280717 280729 280751 280759
-280769 280771 280811 280817 280837 280843 280859 280871 280879 280883 280897 280909
-280913 280921 280927 280933 280939 280949 280957 280963 280967 280979 280997 281023
-281033 281053 281063 281069 281081 281117 281131 281153 281159 281167 281189 281191
-281207 281227 281233 281243 281249 281251 281273 281279 281291 281297 281317 281321
-281327 281339 281353 281357 281363 281381 281419 281423 281429 281431 281509 281527
-281531 281539 281549 281551 281557 281563 281579 281581 281609 281621 281623 281627
-281641 281647 281651 281653 281663 281669 281683 281717 281719 281737 281747 281761
-281767 281777 281783 281791 281797 281803 281807 281833 281837 281839 281849 281857
-281867 281887 281893 281921 281923 281927 281933 281947 281959 281971 281989 281993
-282001 282011 282019 282053 282059 282071 282089 282091 282097 282101 282103 282127
-282143 282157 282167 282221 282229 282239 282241 282253 282281 282287 282299 282307
-282311 282313 282349 282377 282383 282389 282391 282407 282409 282413 282427 282439
-282461 282481 282487 282493 282559 282563 282571 282577 282589 282599 282617 282661
-282671 282677 282679 282683 282691 282697 282703 282707 282713 282767 282769 282773
-282797 282809 282827 282833 282847 282851 282869 282881 282889 282907 282911 282913
-282917 282959 282973 282977 282991 283001 283007 283009 283027 283051 283079 283093
-283097 283099 283111 283117 283121 283133 283139 283159 283163 283181 283183 283193
-283207 283211 283267 283277 283289 283303 283369 283397 283403 283411 283447 283463
-283487 283489 283501 283511 283519 283541 283553 283571 283573 283579 283583 283601
-283607 283609 283631 283637 283639 283669 283687 283697 283721 283741 283763 283769
-283771 283793 283799 283807 283813 283817 283831 283837 283859 283861 283873 283909
-283937 283949 283957 283961 283979 284003 284023 284041 284051 284057 284059 284083
-284093 284111 284117 284129 284131 284149 284153 284159 284161 284173 284191 284201
-284227 284231 284233 284237 284243 284261 284267 284269 284293 284311 284341 284357
-284369 284377 284387 284407 284413 284423 284429 284447 284467 284477 284483 284489
-284507 284509 284521 284527 284539 284551 284561 284573 284587 284591 284593 284623
-284633 284651 284657 284659 284681 284689 284701 284707 284723 284729 284731 284737
-284741 284743 284747 284749 284759 284777 284783 284803 284807 284813 284819 284831
-284833 284839 284857 284881 284897 284899 284917 284927 284957 284969 284989 285007
-285023 285031 285049 285071 285079 285091 285101 285113 285119 285121 285139 285151
-285161 285179 285191 285199 285221 285227 285251 285281 285283 285287 285289 285301
-285317 285343 285377 285421 285433 285451 285457 285463 285469 285473 285497 285517
-285521 285533 285539 285553 285557 285559 285569 285599 285611 285613 285629 285631
-285641 285643 285661 285667 285673 285697 285707 285709 285721 285731 285749 285757
-285763 285767 285773 285781 285823 285827 285839 285841 285871 285937 285949 285953
-285977 285979 285983 285997 286001 286009 286019 286043 286049 286061 286063 286073
-286103 286129 286163 286171 286199 286243 286249 286289 286301 286333 286367 286369
-286381 286393 286397 286411 286421 286427 286453 286457 286459 286469 286477 286483
-286487 286493 286499 286513 286519 286541 286543 286547 286553 286589 286591 286609
-286613 286619 286633 286651 286673 286687 286697 286703 286711 286721 286733 286751
-286753 286763 286771 286777 286789 286801 286813 286831 286859 286873 286927 286973
-286981 286987 286999 287003 287047 287057 287059 287087 287093 287099 287107 287117
-287137 287141 287149 287159 287167 287173 287179 287191 287219 287233 287237 287239
-287251 287257 287269 287279 287281 287291 287297 287321 287327 287333 287341 287347
-287383 287387 287393 287437 287449 287491 287501 287503 287537 287549 287557 287579
-287597 287611 287629 287669 287671 287681 287689 287701 287731 287747 287783 287789
-287801 287813 287821 287849 287851 287857 287863 287867 287873 287887 287921 287933
-287939 287977 288007 288023 288049 288053 288061 288077 288089 288109 288137 288179
-288181 288191 288199 288203 288209 288227 288241 288247 288257 288283 288293 288307
-288313 288317 288349 288359 288361 288383 288389 288403 288413 288427 288433 288461
-288467 288481 288493 288499 288527 288529 288539 288551 288559 288571 288577 288583
-288647 288649 288653 288661 288679 288683 288689 288697 288731 288733 288751 288767
-288773 288803 288817 288823 288833 288839 288851 288853 288877 288907 288913 288929
-288931 288947 288973 288979 288989 288991 288997 289001 289019 289021 289031 289033
-289039 289049 289063 289067 289099 289103 289109 289111 289127 289129 289139 289141
-289151 289169 289171 289181 289189 289193 289213 289241 289243 289249 289253 289273
-289283 289291 289297 289309 289319 289343 289349 289361 289369 289381 289397 289417
-289423 289439 289453 289463 289469 289477 289489 289511 289543 289559 289573 289577
-289589 289603 289607 289637 289643 289657 289669 289717 289721 289727 289733 289741
-289759 289763 289771 289789 289837 289841 289843 289847 289853 289859 289871 289889
-289897 289937 289951 289957 289967 289973 289987 289999 290011 290021 290023 290027
-290033 290039 290041 290047 290057 290083 290107 290113 290119 290137 290141 290161
-290183 290189 290201 290209 290219 290233 290243 290249 290317 290327 290347 290351
-290359 290369 290383 290393 290399 290419 290429 290441 290443 290447 290471 290473
-290489 290497 290509 290527 290531 290533 290539 290557 290593 290597 290611 290617
-290621 290623 290627 290657 290659 290663 290669 290671 290677 290701 290707 290711
-290737 290761 290767 290791 290803 290821 290827 290837 290839 290861 290869 290879
-290897 290923 290959 290963 290971 290987 290993 290999 291007 291013 291037 291041
-291043 291077 291089 291101 291103 291107 291113 291143 291167 291169 291173 291191
-291199 291209 291217 291253 291257 291271 291287 291293 291299 291331 291337 291349
-291359 291367 291371 291373 291377 291419 291437 291439 291443 291457 291481 291491
-291503 291509 291521 291539 291547 291559 291563 291569 291619 291647 291649 291661
-291677 291689 291691 291701 291721 291727 291743 291751 291779 291791 291817 291829
-291833 291853 291857 291869 291877 291887 291899 291901 291923 291971 291979 291983
-291997 292021 292027 292037 292057 292069 292079 292081 292091 292093 292133 292141
-292147 292157 292181 292183 292223 292231 292241 292249 292267 292283 292301 292309
-292319 292343 292351 292363 292367 292381 292393 292427 292441 292459 292469 292471
-292477 292483 292489 292493 292517 292531 292541 292549 292561 292573 292577 292601
-292627 292631 292661 292667 292673 292679 292693 292703 292709 292711 292717 292727
-292753 292759 292777 292793 292801 292807 292819 292837 292841 292849 292867 292879
-292909 292921 292933 292969 292973 292979 292993 293021 293071 293081 293087 293093
-293099 293107 293123 293129 293147 293149 293173 293177 293179 293201 293207 293213
-293221 293257 293261 293263 293269 293311 293329 293339 293351 293357 293399 293413
-293431 293441 293453 293459 293467 293473 293483 293507 293543 293599 293603 293617
-293621 293633 293639 293651 293659 293677 293681 293701 293717 293723 293729 293749
-293767 293773 293791 293803 293827 293831 293861 293863 293893 293899 293941 293957
-293983 293989 293999 294001 294013 294023 294029 294043 294053 294059 294067 294103
-294127 294131 294149 294157 294167 294169 294179 294181 294199 294211 294223 294227
-294241 294247 294251 294269 294277 294289 294293 294311 294313 294317 294319 294337
-294341 294347 294353 294383 294391 294397 294403 294431 294439 294461 294467 294479
-294499 294509 294523 294529 294551 294563 294629 294641 294647 294649 294659 294673
-294703 294731 294751 294757 294761 294773 294781 294787 294793 294799 294803 294809
-294821 294829 294859 294869 294887 294893 294911 294919 294923 294947 294949 294953
-294979 294989 294991 294997 295007 295033 295037 295039 295049 295073 295079 295081
-295111 295123 295129 295153 295187 295199 295201 295219 295237 295247 295259 295271
-295277 295283 295291 295313 295319 295333 295357 295363 295387 295411 295417 295429
-295433 295439 295441 295459 295513 295517 295541 295553 295567 295571 295591 295601
-295663 295693 295699 295703 295727 295751 295759 295769 295777 295787 295819 295831
-295837 295843 295847 295853 295861 295871 295873 295877 295879 295901 295903 295909
-295937 295943 295949 295951 295961 295973 295993 296011 296017 296027 296041 296047
-296071 296083 296099 296117 296129 296137 296159 296183 296201 296213 296221 296237
-296243 296249 296251 296269 296273 296279 296287 296299 296347 296353 296363 296369
-296377 296437 296441 296473 296477 296479 296489 296503 296507 296509 296519 296551
-296557 296561 296563 296579 296581 296587 296591 296627 296651 296663 296669 296683
-296687 296693 296713 296719 296729 296731 296741 296749 296753 296767 296771 296773
-296797 296801 296819 296827 296831 296833 296843 296909 296911 296921 296929 296941
-296969 296971 296981 296983 296987 297019 297023 297049 297061 297067 297079 297083
-297097 297113 297133 297151 297161 297169 297191 297233 297247 297251 297257 297263
-297289 297317 297359 297371 297377 297391 297397 297403 297421 297439 297457 297467
-297469 297481 297487 297503 297509 297523 297533 297581 297589 297601 297607 297613
-297617 297623 297629 297641 297659 297683 297691 297707 297719 297727 297757 297779
-297793 297797 297809 297811 297833 297841 297853 297881 297889 297893 297907 297911
-297931 297953 297967 297971 297989 297991 298013 298021 298031 298043 298049 298063
-298087 298093 298099 298153 298157 298159 298169 298171 298187 298201 298211 298213
-298223 298237 298247 298261 298283 298303 298307 298327 298339 298343 298349 298369
-298373 298399 298409 298411 298427 298451 298477 298483 298513 298559 298579 298583
-298589 298601 298607 298621 298631 298651 298667 298679 298681 298687 298691 298693
-298709 298723 298733 298757 298759 298777 298799 298801 298817 298819 298841 298847
-298853 298861 298897 298937 298943 298993 298999 299011 299017 299027 299029 299053
-299059 299063 299087 299099 299107 299113 299137 299147 299171 299179 299191 299197
-299213 299239 299261 299281 299287 299311 299317 299329 299333 299357 299359 299363
-299371 299389 299393 299401 299417 299419 299447 299471 299473 299477 299479 299501
-299513 299521 299527 299539 299567 299569 299603 299617 299623 299653 299671 299681
-299683 299699 299701 299711 299723 299731 299743 299749 299771 299777 299807 299843
-299857 299861 299881 299891 299903 299909 299933 299941 299951 299969 299977 299983
-299993 300007 300017 300023 300043 300073 300089 300109 300119 300137 300149 300151
-300163 300187 300191 300193 300221 300229 300233 300239 300247 300277 300299 300301
-300317 300319 300323 300331 300343 300347 300367 300397 300413 300427 300431 300439
-300463 300481 300491 300493 300497 300499 300511 300557 300569 300581 300583 300589
-300593 300623 300631 300647 300649 300661 300667 300673 300683 300691 300719 300721
-300733 300739 300743 300749 300757 300761 300779 300787 300799 300809 300821 300823
-300851 300857 300869 300877 300889 300893 300929 300931 300953 300961 300967 300973
-300977 300997 301013 301027 301039 301051 301057 301073 301079 301123 301127 301141
-301153 301159 301177 301181 301183 301211 301219 301237 301241 301243 301247 301267
-301303 301319 301331 301333 301349 301361 301363 301381 301403 301409 301423 301429
-301447 301459 301463 301471 301487 301489 301493 301501 301531 301577 301579 301583
-301591 301601 301619 301627 301643 301649 301657 301669 301673 301681 301703 301711
-301747 301751 301753 301759 301789 301793 301813 301831 301841 301843 301867 301877
-301897 301901 301907 301913 301927 301933 301943 301949 301979 301991 301993 301997
-301999 302009 302053 302111 302123 302143 302167 302171 302173 302189 302191 302213
-302221 302227 302261 302273 302279 302287 302297 302299 302317 302329 302399 302411
-302417 302429 302443 302459 302483 302507 302513 302551 302563 302567 302573 302579
-302581 302587 302593 302597 302609 302629 302647 302663 302681 302711 302723 302747
-302759 302767 302779 302791 302801 302831 302833 302837 302843 302851 302857 302873
-302891 302903 302909 302921 302927 302941 302959 302969 302971 302977 302983 302989
-302999 303007 303011 303013 303019 303029 303049 303053 303073 303089 303091 303097
-303119 303139 303143 303151 303157 303187 303217 303257 303271 303283 303287 303293
-303299 303307 303313 303323 303337 303341 303361 303367 303371 303377 303379 303389
-303409 303421 303431 303463 303469 303473 303491 303493 303497 303529 303539 303547
-303551 303553 303571 303581 303587 303593 303613 303617 303619 303643 303647 303649
-303679 303683 303689 303691 303703 303713 303727 303731 303749 303767 303781 303803
-303817 303827 303839 303859 303871 303889 303907 303917 303931 303937 303959 303983
-303997 304009 304013 304021 304033 304039 304049 304063 304067 304069 304081 304091
-304099 304127 304151 304153 304163 304169 304193 304211 304217 304223 304253 304259
-304279 304301 304303 304331 304349 304357 304363 304373 304391 304393 304411 304417
-304429 304433 304439 304457 304459 304477 304481 304489 304501 304511 304517 304523
-304537 304541 304553 304559 304561 304597 304609 304631 304643 304651 304663 304687
-304709 304723 304729 304739 304751 304757 304763 304771 304781 304789 304807 304813
-304831 304847 304849 304867 304879 304883 304897 304901 304903 304907 304933 304937
-304943 304949 304961 304979 304981 305017 305021 305023 305029 305033 305047 305069
-305093 305101 305111 305113 305119 305131 305143 305147 305209 305219 305231 305237
-305243 305267 305281 305297 305329 305339 305351 305353 305363 305369 305377 305401
-305407 305411 305413 305419 305423 305441 305449 305471 305477 305479 305483 305489
-305497 305521 305533 305551 305563 305581 305593 305597 305603 305611 305621 305633
-305639 305663 305717 305719 305741 305743 305749 305759 305761 305771 305783 305803
-305821 305839 305849 305857 305861 305867 305873 305917 305927 305933 305947 305971
-305999 306011 306023 306029 306041 306049 306083 306091 306121 306133 306139 306149
-306157 306167 306169 306191 306193 306209 306239 306247 306253 306259 306263 306301
-306329 306331 306347 306349 306359 306367 306377 306389 306407 306419 306421 306431
-306437 306457 306463 306473 306479 306491 306503 306511 306517 306529 306533 306541
-306563 306577 306587 306589 306643 306653 306661 306689 306701 306703 306707 306727
-306739 306749 306763 306781 306809 306821 306827 306829 306847 306853 306857 306871
-306877 306883 306893 306899 306913 306919 306941 306947 306949 306953 306991 307009
-307019 307031 307033 307067 307079 307091 307093 307103 307121 307129 307147 307163
-307169 307171 307187 307189 307201 307243 307253 307259 307261 307267 307273 307277
-307283 307289 307301 307337 307339 307361 307367 307381 307397 307399 307409 307423
-307451 307471 307481 307511 307523 307529 307537 307543 307577 307583 307589 307609
-307627 307631 307633 307639 307651 307669 307687 307691 307693 307711 307733 307759
-307817 307823 307831 307843 307859 307871 307873 307891 307903 307919 307939 307969
-308003 308017 308027 308041 308051 308081 308093 308101 308107 308117 308129 308137
-308141 308149 308153 308213 308219 308249 308263 308291 308293 308303 308309 308311
-308317 308323 308327 308333 308359 308383 308411 308423 308437 308447 308467 308489
-308491 308501 308507 308509 308519 308521 308527 308537 308551 308569 308573 308587
-308597 308621 308639 308641 308663 308681 308701 308713 308723 308761 308773 308801
-308809 308813 308827 308849 308851 308857 308887 308899 308923 308927 308929 308933
-308939 308951 308989 308999 309007 309011 309013 309019 309031 309037 309059 309079
-309083 309091 309107 309109 309121 309131 309137 309157 309167 309173 309193 309223
-309241 309251 309259 309269 309271 309277 309289 309293 309311 309313 309317 309359
-309367 309371 309391 309403 309433 309437 309457 309461 309469 309479 309481 309493
-309503 309521 309523 309539 309541 309559 309571 309577 309583 309599 309623 309629
-309637 309667 309671 309677 309707 309713 309731 309737 309769 309779 309781 309797
-309811 309823 309851 309853 309857 309877 309899 309929 309931 309937 309977 309989
-310019 310021 310027 310043 310049 310081 310087 310091 310111 310117 310127 310129
-310169 310181 310187 310223 310229 310231 310237 310243 310273 310283 310291 310313
-310333 310357 310361 310363 310379 310397 310423 310433 310439 310447 310459 310463
-310481 310489 310501 310507 310511 310547 310553 310559 310567 310571 310577 310591
-310627 310643 310663 310693 310697 310711 310721 310727 310729 310733 310741 310747
-310771 310781 310789 310801 310819 310823 310829 310831 310861 310867 310883 310889
-310901 310927 310931 310949 310969 310987 310997 311009 311021 311027 311033 311041
-311099 311111 311123 311137 311153 311173 311177 311183 311189 311197 311203 311237
-311279 311291 311293 311299 311303 311323 311329 311341 311347 311359 311371 311393
-311407 311419 311447 311453 311473 311533 311537 311539 311551 311557 311561 311567
-311569 311603 311609 311653 311659 311677 311681 311683 311687 311711 311713 311737
-311743 311747 311749 311791 311803 311807 311821 311827 311867 311869 311881 311897
-311951 311957 311963 311981 312007 312023 312029 312031 312043 312047 312071 312073
-312083 312089 312101 312107 312121 312161 312197 312199 312203 312209 312211 312217
-312229 312233 312241 312251 312253 312269 312281 312283 312289 312311 312313 312331
-312343 312349 312353 312371 312383 312397 312401 312407 312413 312427 312451 312469
-312509 312517 312527 312551 312553 312563 312581 312583 312589 312601 312617 312619
-312623 312643 312673 312677 312679 312701 312703 312709 312727 312737 312743 312757
-312773 312779 312799 312839 312841 312857 312863 312887 312899 312929 312931 312937
-312941 312943 312967 312971 312979 312989 313003 313009 313031 313037 313081 313087
-313109 313127 313129 313133 313147 313151 313153 313163 313207 313211 313219 313241
-313249 313267 313273 313289 313297 313301 313307 313321 313331 313333 313343 313351
-313373 313381 313387 313399 313409 313471 313477 313507 313517 313543 313549 313553
-313561 313567 313571 313583 313589 313597 313603 313613 313619 313637 313639 313661
-313669 313679 313699 313711 313717 313721 313727 313739 313741 313763 313777 313783
-313829 313849 313853 313879 313883 313889 313897 313909 313921 313931 313933 313949
-313961 313969 313979 313981 313987 313991 313993 313997 314003 314021 314059 314063
-314077 314107 314113 314117 314129 314137 314159 314161 314173 314189 314213 314219
-314227 314233 314239 314243 314257 314261 314263 314267 314299 314329 314339 314351
-314357 314359 314399 314401 314407 314423 314441 314453 314467 314491 314497 314513
-314527 314543 314549 314569 314581 314591 314597 314599 314603 314623 314627 314641
-314651 314693 314707 314711 314719 314723 314747 314761 314771 314777 314779 314807
-314813 314827 314851 314879 314903 314917 314927 314933 314953 314957 314983 314989
-315011 315013 315037 315047 315059 315067 315083 315097 315103 315109 315127 315179
-315181 315193 315199 315223 315247 315251 315257 315269 315281 315313 315349 315361
-315373 315377 315389 315407 315409 315421 315437 315449 315451 315461 315467 315481
-315493 315517 315521 315527 315529 315547 315551 315559 315569 315589 315593 315599
-315613 315617 315631 315643 315671 315677 315691 315697 315701 315703 315739 315743
-315751 315779 315803 315811 315829 315851 315857 315881 315883 315893 315899 315907
-315937 315949 315961 315967 315977 316003 316031 316033 316037 316051 316067 316073
-316087 316097 316109 316133 316139 316153 316177 316189 316193 316201 316213 316219
-316223 316241 316243 316259 316271 316291 316297 316301 316321 316339 316343 316363
-316373 316391 316403 316423 316429 316439 316453 316469 316471 316493 316499 316501
-316507 316531 316567 316571 316577 316583 316621 316633 316637 316649 316661 316663
-316681 316691 316697 316699 316703 316717 316753 316759 316769 316777 316783 316793
-316801 316817 316819 316847 316853 316859 316861 316879 316891 316903 316907 316919
-316937 316951 316957 316961 316991 317003 317011 317021 317029 317047 317063 317071
-317077 317087 317089 317123 317159 317171 317179 317189 317197 317209 317227 317257
-317263 317267 317269 317279 317321 317323 317327 317333 317351 317353 317363 317371
-317399 317411 317419 317431 317437 317453 317459 317483 317489 317491 317503 317539
-317557 317563 317587 317591 317593 317599 317609 317617 317621 317651 317663 317671
-317693 317701 317711 317717 317729 317731 317741 317743 317771 317773 317777 317783
-317789 317797 317827 317831 317839 317857 317887 317903 317921 317923 317957 317959
-317963 317969 317971 317983 317987 318001 318007 318023 318077 318103 318107 318127
-318137 318161 318173 318179 318181 318191 318203 318209 318211 318229 318233 318247
-318259 318271 318281 318287 318289 318299 318301 318313 318319 318323 318337 318347
-318349 318377 318403 318407 318419 318431 318443 318457 318467 318473 318503 318523
-318557 318559 318569 318581 318589 318601 318629 318641 318653 318671 318677 318679
-318683 318691 318701 318713 318737 318743 318749 318751 318781 318793 318809 318811
-318817 318823 318833 318841 318863 318881 318883 318889 318907 318911 318917 318919
-318949 318979 319001 319027 319031 319037 319049 319057 319061 319069 319093 319097
-319117 319127 319129 319133 319147 319159 319169 319183 319201 319211 319223 319237
-319259 319279 319289 319313 319321 319327 319339 319343 319351 319357 319387 319391
-319399 319411 319427 319433 319439 319441 319453 319469 319477 319483 319489 319499
-319511 319519 319541 319547 319567 319577 319589 319591 319601 319607 319639 319673
-319679 319681 319687 319691 319699 319727 319729 319733 319747 319757 319763 319811
-319817 319819 319829 319831 319849 319883 319897 319901 319919 319927 319931 319937
-319967 319973 319981 319993 320009 320011 320027 320039 320041 320053 320057 320063
-320081 320083 320101 320107 320113 320119 320141 320143 320149 320153 320179 320209
-320213 320219 320237 320239 320267 320269 320273 320291 320293 320303 320317 320329
-320339 320377 320387 320389 320401 320417 320431 320449 320471 320477 320483 320513
-320521 320533 320539 320561 320563 320591 320609 320611 320627 320647 320657 320659
-320669 320687 320693 320699 320713 320741 320759 320767 320791 320821 320833 320839
-320843 320851 320861 320867 320899 320911 320923 320927 320939 320941 320953 321007
-321017 321031 321037 321047 321053 321073 321077 321091 321109 321143 321163 321169
-321187 321193 321199 321203 321221 321227 321239 321247 321289 321301 321311 321313
-321319 321323 321329 321331 321341 321359 321367 321371 321383 321397 321403 321413
-321427 321443 321449 321467 321469 321509 321547 321553 321569 321571 321577 321593
-321611 321617 321619 321631 321647 321661 321679 321707 321709 321721 321733 321743
-321751 321757 321779 321799 321817 321821 321823 321829 321833 321847 321851 321889
-321901 321911 321947 321949 321961 321983 321991 322001 322009 322013 322037 322039
-322051 322057 322067 322073 322079 322093 322097 322109 322111 322139 322169 322171
-322193 322213 322229 322237 322243 322247 322249 322261 322271 322319 322327 322339
-322349 322351 322397 322403 322409 322417 322429 322433 322459 322463 322501 322513
-322519 322523 322537 322549 322559 322571 322573 322583 322589 322591 322607 322613
-322627 322631 322633 322649 322669 322709 322727 322747 322757 322769 322771 322781
-322783 322807 322849 322859 322871 322877 322891 322901 322919 322921 322939 322951
-322963 322969 322997 322999 323003 323009 323027 323053 323077 323083 323087 323093
-323101 323123 323131 323137 323149 323201 323207 323233 323243 323249 323251 323273
-323333 323339 323341 323359 323369 323371 323377 323381 323383 323413 323419 323441
-323443 323467 323471 323473 323507 323509 323537 323549 323567 323579 323581 323591
-323597 323599 323623 323641 323647 323651 323699 323707 323711 323717 323759 323767
-323789 323797 323801 323803 323819 323837 323879 323899 323903 323923 323927 323933
-323951 323957 323987 324011 324031 324053 324067 324073 324089 324097 324101 324113
-324119 324131 324143 324151 324161 324179 324199 324209 324211 324217 324223 324239
-324251 324293 324299 324301 324319 324329 324341 324361 324391 324397 324403 324419
-324427 324431 324437 324439 324449 324451 324469 324473 324491 324497 324503 324517
-324523 324529 324557 324587 324589 324593 324617 324619 324637 324641 324647 324661
-324673 324689 324697 324707 324733 324743 324757 324763 324773 324781 324791 324799
-324809 324811 324839 324847 324869 324871 324889 324893 324901 324931 324941 324949
-324953 324977 324979 324983 324991 324997 325001 325009 325019 325021 325027 325043
-325051 325063 325079 325081 325093 325133 325153 325163 325181 325187 325189 325201
-325217 325219 325229 325231 325249 325271 325301 325307 325309 325319 325333 325343
-325349 325379 325411 325421 325439 325447 325453 325459 325463 325477 325487 325513
-325517 325537 325541 325543 325571 325597 325607 325627 325631 325643 325667 325673
-325681 325691 325693 325697 325709 325723 325729 325747 325751 325753 325769 325777
-325781 325783 325807 325813 325849 325861 325877 325883 325889 325891 325901 325921
-325939 325943 325951 325957 325987 325993 325999 326023 326057 326063 326083 326087
-326099 326101 326113 326119 326141 326143 326147 326149 326153 326159 326171 326189
-326203 326219 326251 326257 326309 326323 326351 326353 326369 326437 326441 326449
-326467 326479 326497 326503 326537 326539 326549 326561 326563 326567 326581 326593
-326597 326609 326611 326617 326633 326657 326659 326663 326681 326687 326693 326701
-326707 326737 326741 326773 326779 326831 326863 326867 326869 326873 326881 326903
-326923 326939 326941 326947 326951 326983 326993 326999 327001 327007 327011 327017
-327023 327059 327071 327079 327127 327133 327163 327179 327193 327203 327209 327211
-327247 327251 327263 327277 327289 327307 327311 327317 327319 327331 327337 327343
-327347 327401 327407 327409 327419 327421 327433 327443 327463 327469 327473 327479
-327491 327493 327499 327511 327517 327529 327553 327557 327559 327571 327581 327583
-327599 327619 327629 327647 327661 327667 327673 327689 327707 327721 327737 327739
-327757 327779 327797 327799 327809 327823 327827 327829 327839 327851 327853 327869
-327871 327881 327889 327917 327923 327941 327953 327967 327979 327983 328007 328037
-328043 328051 328061 328063 328067 328093 328103 328109 328121 328127 328129 328171
-328177 328213 328243 328249 328271 328277 328283 328291 328303 328327 328331 328333
-328343 328357 328373 328379 328381 328397 328411 328421 328429 328439 328481 328511
-328513 328519 328543 328579 328589 328591 328619 328621 328633 328637 328639 328651
-328667 328687 328709 328721 328753 328777 328781 328787 328789 328813 328829 328837
-328847 328849 328883 328891 328897 328901 328919 328921 328931 328961 328981 329009
-329027 329053 329059 329081 329083 329089 329101 329111 329123 329143 329167 329177
-329191 329201 329207 329209 329233 329243 329257 329267 329269 329281 329293 329297
-329299 329309 329317 329321 329333 329347 329387 329393 329401 329419 329431 329471
-329473 329489 329503 329519 329533 329551 329557 329587 329591 329597 329603 329617
-329627 329629 329639 329657 329663 329671 329677 329683 329687 329711 329717 329723
-329729 329761 329773 329779 329789 329801 329803 329863 329867 329873 329891 329899
-329941 329947 329951 329957 329969 329977 329993 329999 330017 330019 330037 330041
-330047 330053 330061 330067 330097 330103 330131 330133 330139 330149 330167 330199
-330203 330217 330227 330229 330233 330241 330247 330271 330287 330289 330311 330313
-330329 330331 330347 330359 330383 330389 330409 330413 330427 330431 330433 330439
-330469 330509 330557 330563 330569 330587 330607 330611 330623 330641 330643 330653
-330661 330679 330683 330689 330697 330703 330719 330721 330731 330749 330767 330787
-330791 330793 330821 330823 330839 330853 330857 330859 330877 330887 330899 330907
-330917 330943 330983 330997 331013 331027 331031 331043 331063 331081 331099 331127
-331141 331147 331153 331159 331171 331183 331207 331213 331217 331231 331241 331249
-331259 331277 331283 331301 331307 331319 331333 331337 331339 331349 331367 331369
-331391 331399 331423 331447 331451 331489 331501 331511 331519 331523 331537 331543
-331547 331549 331553 331577 331579 331589 331603 331609 331613 331651 331663 331691
-331693 331697 331711 331739 331753 331769 331777 331781 331801 331819 331841 331843
-331871 331883 331889 331897 331907 331909 331921 331937 331943 331957 331967 331973
-331997 331999 332009 332011 332039 332053 332069 332081 332099 332113 332117 332147
-332159 332161 332179 332183 332191 332201 332203 332207 332219 332221 332251 332263
-332273 332287 332303 332309 332317 332393 332399 332411 332417 332441 332447 332461
-332467 332471 332473 332477 332489 332509 332513 332561 332567 332569 332573 332611
-332617 332623 332641 332687 332699 332711 332729 332743 332749 332767 332779 332791
-332803 332837 332851 332873 332881 332887 332903 332921 332933 332947 332951 332987
-332989 332993 333019 333023 333029 333031 333041 333049 333071 333097 333101 333103
-333107 333131 333139 333161 333187 333197 333209 333227 333233 333253 333269 333271
-333283 333287 333299 333323 333331 333337 333341 333349 333367 333383 333397 333419
-333427 333433 333439 333449 333451 333457 333479 333491 333493 333497 333503 333517
-333533 333539 333563 333581 333589 333623 333631 333647 333667 333673 333679 333691
-333701 333713 333719 333721 333737 333757 333769 333779 333787 333791 333793 333803
-333821 333857 333871 333911 333923 333929 333941 333959 333973 333989 333997 334021
-334031 334043 334049 334057 334069 334093 334099 334127 334133 334157 334171 334177
-334183 334189 334199 334231 334247 334261 334289 334297 334319 334331 334333 334349
-334363 334379 334387 334393 334403 334421 334423 334427 334429 334447 334487 334493
-334507 334511 334513 334541 334547 334549 334561 334603 334619 334637 334643 334651
-334661 334667 334681 334693 334699 334717 334721 334727 334751 334753 334759 334771
-334777 334783 334787 334793 334843 334861 334877 334889 334891 334897 334931 334963
-334973 334987 334991 334993 335009 335021 335029 335033 335047 335051 335057 335077
-335081 335089 335107 335113 335117 335123 335131 335149 335161 335171 335173 335207
-335213 335221 335249 335261 335273 335281 335299 335323 335341 335347 335381 335383
-335411 335417 335429 335449 335453 335459 335473 335477 335507 335519 335527 335539
-335557 335567 335579 335591 335609 335633 335641 335653 335663 335669 335681 335689
-335693 335719 335729 335743 335747 335771 335807 335809 335813 335821 335833 335843
-335857 335879 335893 335897 335917 335941 335953 335957 335999 336029 336031 336041
-336059 336079 336101 336103 336109 336113 336121 336143 336151 336157 336163 336181
-336199 336211 336221 336223 336227 336239 336247 336251 336253 336263 336307 336317
-336353 336361 336373 336397 336403 336419 336437 336463 336491 336499 336503 336521
-336527 336529 336533 336551 336563 336571 336577 336587 336593 336599 336613 336631
-336643 336649 336653 336667 336671 336683 336689 336703 336727 336757 336761 336767
-336769 336773 336793 336799 336803 336823 336827 336829 336857 336863 336871 336887
-336899 336901 336911 336929 336961 336977 336983 336989 336997 337013 337021 337031
-337039 337049 337069 337081 337091 337097 337121 337153 337189 337201 337213 337217
-337219 337223 337261 337277 337279 337283 337291 337301 337313 337327 337339 337343
-337349 337361 337367 337369 337397 337411 337427 337453 337457 337487 337489 337511
-337517 337529 337537 337541 337543 337583 337607 337609 337627 337633 337639 337651
-337661 337669 337681 337691 337697 337721 337741 337751 337759 337781 337793 337817
-337837 337853 337859 337861 337867 337871 337873 337891 337901 337903 337907 337919
-337949 337957 337969 337973 337999 338017 338027 338033 338119 338137 338141 338153
-338159 338161 338167 338171 338183 338197 338203 338207 338213 338231 338237 338251
-338263 338267 338269 338279 338287 338293 338297 338309 338321 338323 338339 338341
-338347 338369 338383 338389 338407 338411 338413 338423 338431 338449 338461 338473
-338477 338497 338531 338543 338563 338567 338573 338579 338581 338609 338659 338669
-338683 338687 338707 338717 338731 338747 338753 338761 338773 338777 338791 338803
-338839 338851 338857 338867 338893 338909 338927 338959 338993 338999 339023 339049
-339067 339071 339091 339103 339107 339121 339127 339137 339139 339151 339161 339173
-339187 339211 339223 339239 339247 339257 339263 339289 339307 339323 339331 339341
-339373 339389 339413 339433 339467 339491 339517 339527 339539 339557 339583 339589
-339601 339613 339617 339631 339637 339649 339653 339659 339671 339673 339679 339707
-339727 339749 339751 339761 339769 339799 339811 339817 339821 339827 339839 339841
-339863 339887 339907 339943 339959 339991 340007 340027 340031 340037 340049 340057
-340061 340063 340073 340079 340103 340111 340117 340121 340127 340129 340169 340183
-340201 340211 340237 340261 340267 340283 340297 340321 340337 340339 340369 340381
-340387 340393 340397 340409 340429 340447 340451 340453 340477 340481 340519 340541
-340559 340573 340577 340579 340583 340591 340601 340619 340633 340643 340649 340657
-340661 340687 340693 340709 340723 340757 340777 340787 340789 340793 340801 340811
-340819 340849 340859 340877 340889 340897 340903 340909 340913 340919 340927 340931
-340933 340937 340939 340957 340979 340999 341017 341027 341041 341057 341059 341063
-341083 341087 341123 341141 341171 341179 341191 341203 341219 341227 341233 341269
-341273 341281 341287 341293 341303 341311 341321 341323 341333 341339 341347 341357
-341423 341443 341447 341459 341461 341477 341491 341501 341507 341521 341543 341557
-341569 341587 341597 341603 341617 341623 341629 341641 341647 341659 341681 341687
-341701 341729 341743 341749 341771 341773 341777 341813 341821 341827 341839 341851
-341863 341879 341911 341927 341947 341951 341953 341959 341963 341983 341993 342037
-342047 342049 342059 342061 342071 342073 342077 342101 342107 342131 342143 342179
-342187 342191 342197 342203 342211 342233 342239 342241 342257 342281 342283 342299
-342319 342337 342341 342343 342347 342359 342371 342373 342379 342389 342413 342421
-342449 342451 342467 342469 342481 342497 342521 342527 342547 342553 342569 342593
-342599 342607 342647 342653 342659 342673 342679 342691 342697 342733 342757 342761
-342791 342799 342803 342821 342833 342841 342847 342863 342869 342871 342889 342899
-342929 342949 342971 342989 343019 343037 343051 343061 343073 343081 343087 343127
-343141 343153 343163 343169 343177 343193 343199 343219 343237 343243 343253 343261
-343267 343289 343303 343307 343309 343313 343327 343333 343337 343373 343379 343381
-343391 343393 343411 343423 343433 343481 343489 343517 343529 343531 343543 343547
-343559 343561 343579 343583 343589 343591 343601 343627 343631 343639 343649 343661
-343667 343687 343709 343727 343769 343771 343787 343799 343801 343813 343817 343823
-343829 343831 343891 343897 343901 343913 343933 343939 343943 343951 343963 343997
-344017 344021 344039 344053 344083 344111 344117 344153 344161 344167 344171 344173
-344177 344189 344207 344209 344213 344221 344231 344237 344243 344249 344251 344257
-344263 344269 344273 344291 344293 344321 344327 344347 344353 344363 344371 344417
-344423 344429 344453 344479 344483 344497 344543 344567 344587 344599 344611 344621
-344629 344639 344653 344671 344681 344683 344693 344719 344749 344753 344759 344791
-344797 344801 344807 344819 344821 344843 344857 344863 344873 344887 344893 344909
-344917 344921 344941 344957 344959 344963 344969 344987 345001 345011 345017 345019
-345041 345047 345067 345089 345109 345133 345139 345143 345181 345193 345221 345227
-345229 345259 345263 345271 345307 345311 345329 345379 345413 345431 345451 345461
-345463 345473 345479 345487 345511 345517 345533 345547 345551 345571 345577 345581
-345599 345601 345607 345637 345643 345647 345659 345673 345679 345689 345701 345707
-345727 345731 345733 345739 345749 345757 345769 345773 345791 345803 345811 345817
-345823 345853 345869 345881 345887 345889 345907 345923 345937 345953 345979 345997
-346013 346039 346043 346051 346079 346091 346097 346111 346117 346133 346139 346141
-346147 346169 346187 346201 346207 346217 346223 346259 346261 346277 346303 346309
-346321 346331 346337 346349 346361 346369 346373 346391 346393 346397 346399 346417
-346421 346429 346433 346439 346441 346447 346453 346469 346501 346529 346543 346547
-346553 346559 346561 346589 346601 346607 346627 346639 346649 346651 346657 346667
-346669 346699 346711 346721 346739 346751 346763 346793 346831 346849 346867 346873
-346877 346891 346903 346933 346939 346943 346961 346963 347003 347033 347041 347051
-347057 347059 347063 347069 347071 347099 347129 347131 347141 347143 347161 347167
-347173 347177 347183 347197 347201 347209 347227 347233 347239 347251 347257 347287
-347297 347299 347317 347329 347341 347359 347401 347411 347437 347443 347489 347509
-347513 347519 347533 347539 347561 347563 347579 347587 347591 347609 347621 347629
-347651 347671 347707 347717 347729 347731 347747 347759 347771 347773 347779 347801
-347813 347821 347849 347873 347887 347891 347899 347929 347933 347951 347957 347959
-347969 347981 347983 347987 347989 347993 348001 348011 348017 348031 348043 348053
-348077 348083 348097 348149 348163 348181 348191 348209 348217 348221 348239 348241
-348247 348253 348259 348269 348287 348307 348323 348353 348367 348389 348401 348407
-348419 348421 348431 348433 348437 348443 348451 348457 348461 348463 348487 348527
-348547 348553 348559 348563 348571 348583 348587 348617 348629 348637 348643 348661
-348671 348709 348731 348739 348757 348763 348769 348779 348811 348827 348833 348839
-348851 348883 348889 348911 348917 348919 348923 348937 348949 348989 348991 349007
-349039 349043 349051 349079 349081 349093 349099 349109 349121 349133 349171 349177
-349183 349187 349199 349207 349211 349241 349291 349303 349313 349331 349337 349343
-349357 349369 349373 349379 349381 349387 349397 349399 349403 349409 349411 349423
-349471 349477 349483 349493 349499 349507 349519 349529 349553 349567 349579 349589
-349603 349637 349663 349667 349697 349709 349717 349729 349753 349759 349787 349793
-349801 349813 349819 349829 349831 349837 349841 349849 349871 349903 349907 349913
-349919 349927 349931 349933 349939 349949 349963 349967 349981 350003 350029 350033
-350039 350087 350089 350093 350107 350111 350137 350159 350179 350191 350213 350219
-350237 350249 350257 350281 350293 350347 350351 350377 350381 350411 350423 350429
-350431 350437 350443 350447 350453 350459 350503 350521 350549 350561 350563 350587
-350593 350617 350621 350629 350657 350663 350677 350699 350711 350719 350729 350731
-350737 350741 350747 350767 350771 350783 350789 350803 350809 350843 350851 350869
-350881 350887 350891 350899 350941 350947 350963 350971 350981 350983 350989 351011
-351023 351031 351037 351041 351047 351053 351059 351061 351077 351079 351097 351121
-351133 351151 351157 351179 351217 351223 351229 351257 351259 351269 351287 351289
-351293 351301 351311 351341 351343 351347 351359 351361 351383 351391 351397 351401
-351413 351427 351437 351457 351469 351479 351497 351503 351517 351529 351551 351563
-351587 351599 351643 351653 351661 351667 351691 351707 351727 351731 351733 351749
-351751 351763 351773 351779 351797 351803 351811 351829 351847 351851 351859 351863
-351887 351913 351919 351929 351931 351959 351971 351991 352007 352021 352043 352049
-352057 352069 352073 352081 352097 352109 352111 352123 352133 352181 352193 352201
-352217 352229 352237 352249 352267 352271 352273 352301 352309 352327 352333 352349
-352357 352361 352367 352369 352381 352399 352403 352409 352411 352421 352423 352441
-352459 352463 352481 352483 352489 352493 352511 352523 352543 352549 352579 352589
-352601 352607 352619 352633 352637 352661 352691 352711 352739 352741 352753 352757
-352771 352813 352817 352819 352831 352837 352841 352853 352867 352883 352907 352909
-352931 352939 352949 352951 352973 352991 353011 353021 353047 353053 353057 353069
-353081 353099 353117 353123 353137 353147 353149 353161 353173 353179 353201 353203
-353237 353263 353293 353317 353321 353329 353333 353341 353359 353389 353401 353411
-353429 353443 353453 353459 353471 353473 353489 353501 353527 353531 353557 353567
-353603 353611 353621 353627 353629 353641 353653 353657 353677 353681 353687 353699
-353711 353737 353747 353767 353777 353783 353797 353807 353813 353819 353833 353867
-353869 353879 353891 353897 353911 353917 353921 353929 353939 353963 354001 354007
-354017 354023 354031 354037 354041 354043 354047 354073 354091 354097 354121 354139
-354143 354149 354163 354169 354181 354209 354247 354251 354253 354257 354259 354271
-354301 354307 354313 354317 354323 354329 354337 354353 354371 354373 354377 354383
-354391 354401 354421 354439 354443 354451 354461 354463 354469 354479 354533 354539
-354551 354553 354581 354587 354619 354643 354647 354661 354667 354677 354689 354701
-354703 354727 354737 354743 354751 354763 354779 354791 354799 354829 354833 354839
-354847 354869 354877 354881 354883 354911 354953 354961 354971 354973 354979 354983
-354997 355007 355009 355027 355031 355037 355039 355049 355057 355063 355073 355087
-355093 355099 355109 355111 355127 355139 355171 355193 355211 355261 355297 355307
-355321 355331 355339 355343 355361 355363 355379 355417 355427 355441 355457 355463
-355483 355499 355501 355507 355513 355517 355519 355529 355541 355549 355559 355571
-355573 355591 355609 355633 355643 355651 355669 355679 355697 355717 355721 355723
-355753 355763 355777 355783 355799 355811 355819 355841 355847 355853 355867 355891
-355909 355913 355933 355937 355939 355951 355967 355969 356023 356039 356077 356093
-356101 356113 356123 356129 356137 356141 356143 356171 356173 356197 356219 356243
-356261 356263 356287 356299 356311 356327 356333 356351 356387 356399 356441 356443
-356449 356453 356467 356479 356501 356509 356533 356549 356561 356563 356567 356579
-356591 356621 356647 356663 356693 356701 356731 356737 356749 356761 356803 356819
-356821 356831 356869 356887 356893 356927 356929 356933 356947 356959 356969 356977
-356981 356989 356999 357031 357047 357073 357079 357083 357103 357107 357109 357131
-357139 357169 357179 357197 357199 357211 357229 357239 357241 357263 357271 357281
-357283 357293 357319 357347 357349 357353 357359 357377 357389 357421 357431 357437
-357473 357503 357509 357517 357551 357559 357563 357569 357571 357583 357587 357593
-357611 357613 357619 357649 357653 357659 357661 357667 357671 357677 357683 357689
-357703 357727 357733 357737 357739 357767 357779 357781 357787 357793 357809 357817
-357823 357829 357839 357859 357883 357913 357967 357977 357983 357989 357997 358031
-358051 358069 358073 358079 358103 358109 358153 358157 358159 358181 358201 358213
-358219 358223 358229 358243 358273 358277 358279 358289 358291 358297 358301 358313
-358327 358331 358349 358373 358417 358427 358429 358441 358447 358459 358471 358483
-358487 358499 358531 358541 358571 358573 358591 358597 358601 358607 358613 358637
-358667 358669 358681 358691 358697 358703 358711 358723 358727 358733 358747 358753
-358769 358783 358793 358811 358829 358847 358859 358861 358867 358877 358879 358901
-358903 358907 358909 358931 358951 358973 358979 358987 358993 358999 359003 359017
-359027 359041 359063 359069 359101 359111 359129 359137 359143 359147 359153 359167
-359171 359207 359209 359231 359243 359263 359267 359279 359291 359297 359299 359311
-359323 359327 359353 359357 359377 359389 359407 359417 359419 359441 359449 359477
-359479 359483 359501 359509 359539 359549 359561 359563 359581 359587 359599 359621
-359633 359641 359657 359663 359701 359713 359719 359731 359747 359753 359761 359767
-359783 359837 359851 359869 359897 359911 359929 359981 359987 360007 360023 360037
-360049 360053 360071 360089 360091 360163 360167 360169 360181 360187 360193 360197
-360223 360229 360233 360257 360271 360277 360287 360289 360293 360307 360317 360323
-360337 360391 360407 360421 360439 360457 360461 360497 360509 360511 360541 360551
-360589 360593 360611 360637 360649 360653 360749 360769 360779 360781 360803 360817
-360821 360823 360827 360851 360853 360863 360869 360901 360907 360947 360949 360953
-360959 360973 360977 360979 360989 361001 361003 361013 361033 361069 361091 361093
-361111 361159 361183 361211 361213 361217 361219 361223 361237 361241 361271 361279
-361313 361321 361327 361337 361349 361351 361357 361363 361373 361409 361411 361421
-361433 361441 361447 361451 361463 361469 361481 361499 361507 361511 361523 361531
-361541 361549 361561 361577 361637 361643 361649 361651 361663 361679 361687 361723
-361727 361747 361763 361769 361787 361789 361793 361799 361807 361843 361871 361873
-361877 361901 361903 361909 361919 361927 361943 361961 361967 361973 361979 361993
-362003 362027 362051 362053 362059 362069 362081 362093 362099 362107 362137 362143
-362147 362161 362177 362191 362203 362213 362221 362233 362237 362281 362291 362293
-362303 362309 362333 362339 362347 362353 362357 362363 362371 362377 362381 362393
-362407 362419 362429 362431 362443 362449 362459 362473 362521 362561 362569 362581
-362599 362629 362633 362657 362693 362707 362717 362723 362741 362743 362749 362753
-362759 362801 362851 362863 362867 362897 362903 362911 362927 362941 362951 362953
-362969 362977 362983 362987 363017 363019 363037 363043 363047 363059 363061 363067
-363119 363149 363151 363157 363161 363173 363179 363199 363211 363217 363257 363269
-363271 363277 363313 363317 363329 363343 363359 363361 363367 363371 363373 363379
-363397 363401 363403 363431 363437 363439 363463 363481 363491 363497 363523 363529
-363533 363541 363551 363557 363563 363569 363577 363581 363589 363611 363619 363659
-363677 363683 363691 363719 363731 363751 363757 363761 363767 363773 363799 363809
-363829 363833 363841 363871 363887 363889 363901 363911 363917 363941 363947 363949
-363959 363967 363977 363989 364027 364031 364069 364073 364079 364103 364127 364129
-364141 364171 364183 364187 364193 364213 364223 364241 364267 364271 364289 364291
-364303 364313 364321 364333 364337 364349 364373 364379 364393 364411 364417 364423
-364433 364447 364451 364459 364471 364499 364513 364523 364537 364541 364543 364571
-364583 364601 364607 364621 364627 364643 364657 364669 364687 364691 364699 364717
-364739 364747 364751 364753 364759 364801 364829 364853 364873 364879 364883 364891
-364909 364919 364921 364937 364943 364961 364979 364993 364997 365003 365017 365021
-365039 365063 365069 365089 365107 365119 365129 365137 365147 365159 365173 365179
-365201 365213 365231 365249 365251 365257 365291 365293 365297 365303 365327 365333
-365357 365369 365377 365411 365413 365419 365423 365441 365461 365467 365471 365473
-365479 365489 365507 365509 365513 365527 365531 365537 365557 365567 365569 365587
-365591 365611 365627 365639 365641 365669 365683 365689 365699 365747 365749 365759
-365773 365779 365791 365797 365809 365837 365839 365851 365903 365929 365933 365941
-365969 365983 366001 366013 366019 366029 366031 366053 366077 366097 366103 366127
-366133 366139 366161 366167 366169 366173 366181 366193 366199 366211 366217 366221
-366227 366239 366259 366269 366277 366287 366293 366307 366313 366329 366341 366343
-366347 366383 366397 366409 366419 366433 366437 366439 366461 366463 366467 366479
-366497 366511 366517 366521 366547 366593 366599 366607 366631 366677 366683 366697
-366701 366703 366713 366721 366727 366733 366787 366791 366811 366829 366841 366851
-366853 366859 366869 366881 366889 366901 366907 366917 366923 366941 366953 366967
-366973 366983 366997 367001 367007 367019 367021 367027 367033 367049 367069 367097
-367121 367123 367127 367139 367163 367181 367189 367201 367207 367219 367229 367231
-367243 367259 367261 367273 367277 367307 367309 367313 367321 367357 367369 367391
-367397 367427 367453 367457 367469 367501 367519 367531 367541 367547 367559 367561
-367573 367597 367603 367613 367621 367637 367649 367651 367663 367673 367687 367699
-367711 367721 367733 367739 367751 367771 367777 367781 367789 367819 367823 367831
-367841 367849 367853 367867 367879 367883 367889 367909 367949 367957 368021 368029
-368047 368059 368077 368083 368089 368099 368107 368111 368117 368129 368141 368149
-368153 368171 368189 368197 368227 368231 368233 368243 368273 368279 368287 368293
-368323 368327 368359 368363 368369 368399 368411 368443 368447 368453 368471 368491
-368507 368513 368521 368531 368539 368551 368579 368593 368597 368609 368633 368647
-368651 368653 368689 368717 368729 368737 368743 368773 368783 368789 368791 368801
-368803 368833 368857 368873 368881 368899 368911 368939 368947 368957 369007 369013
-369023 369029 369067 369071 369077 369079 369097 369119 369133 369137 369143 369169
-369181 369191 369197 369211 369247 369253 369263 369269 369283 369293 369301 369319
-369331 369353 369361 369407 369409 369419 369469 369487 369491 369539 369553 369557
-369581 369637 369647 369659 369661 369673 369703 369709 369731 369739 369751 369791
-369793 369821 369827 369829 369833 369841 369851 369877 369893 369913 369917 369947
-369959 369961 369979 369983 369991 369997 370003 370009 370021 370033 370057 370061
-370067 370081 370091 370103 370121 370133 370147 370159 370169 370193 370199 370207
-370213 370217 370241 370247 370261 370373 370387 370399 370411 370421 370423 370427
-370439 370441 370451 370463 370471 370477 370483 370493 370511 370529 370537 370547
-370561 370571 370597 370603 370609 370613 370619 370631 370661 370663 370673 370679
-370687 370693 370723 370759 370793 370801 370813 370837 370871 370873 370879 370883
-370891 370897 370919 370949 371027 371029 371057 371069 371071 371083 371087 371099
-371131 371141 371143 371153 371177 371179 371191 371213 371227 371233 371237 371249
-371251 371257 371281 371291 371299 371303 371311 371321 371333 371339 371341 371353
-371359 371383 371387 371389 371417 371447 371453 371471 371479 371491 371509 371513
-371549 371561 371573 371587 371617 371627 371633 371639 371663 371669 371699 371719
-371737 371779 371797 371831 371837 371843 371851 371857 371869 371873 371897 371927
-371929 371939 371941 371951 371957 371971 371981 371999 372013 372023 372037 372049
-372059 372061 372067 372107 372121 372131 372137 372149 372167 372173 372179 372223
-372241 372263 372269 372271 372277 372289 372293 372299 372311 372313 372353 372367
-372371 372377 372397 372401 372409 372413 372443 372451 372461 372473 372481 372497
-372511 372523 372539 372607 372611 372613 372629 372637 372653 372661 372667 372677
-372689 372707 372709 372719 372733 372739 372751 372763 372769 372773 372797 372803
-372809 372817 372829 372833 372839 372847 372859 372871 372877 372881 372901 372917
-372941 372943 372971 372973 372979 373003 373007 373019 373049 373063 373073 373091
-373127 373151 373157 373171 373181 373183 373187 373193 373199 373207 373211 373213
-373229 373231 373273 373291 373297 373301 373327 373339 373343 373349 373357 373361
-373363 373379 373393 373447 373453 373459 373463 373487 373489 373501 373517 373553
-373561 373567 373613 373621 373631 373649 373657 373661 373669 373693 373717 373721
-373753 373757 373777 373783 373823 373837 373859 373861 373903 373909 373937 373943
-373951 373963 373969 373981 373987 373999 374009 374029 374039 374041 374047 374063
-374069 374083 374089 374093 374111 374117 374123 374137 374149 374159 374173 374177
-374189 374203 374219 374239 374287 374291 374293 374299 374317 374321 374333 374347
-374351 374359 374389 374399 374441 374443 374447 374461 374483 374501 374531 374537
-374557 374587 374603 374639 374641 374653 374669 374677 374681 374683 374687 374701
-374713 374719 374729 374741 374753 374761 374771 374783 374789 374797 374807 374819
-374837 374839 374849 374879 374887 374893 374903 374909 374929 374939 374953 374977
-374981 374987 374989 374993 375017 375019 375029 375043 375049 375059 375083 375091
-375097 375101 375103 375113 375119 375121 375127 375149 375157 375163 375169 375203
-375209 375223 375227 375233 375247 375251 375253 375257 375259 375281 375283 375311
-375341 375359 375367 375371 375373 375391 375407 375413 375443 375449 375451 375457
-375467 375481 375509 375511 375523 375527 375533 375553 375559 375563 375569 375593
-375607 375623 375631 375643 375647 375667 375673 375703 375707 375709 375743 375757
-375761 375773 375779 375787 375799 375833 375841 375857 375899 375901 375923 375931
-375967 375971 375979 375983 375997 376001 376003 376009 376021 376039 376049 376063
-376081 376097 376099 376127 376133 376147 376153 376171 376183 376199 376231 376237
-376241 376283 376291 376297 376307 376351 376373 376393 376399 376417 376463 376469
-376471 376477 376483 376501 376511 376529 376531 376547 376573 376577 376583 376589
-376603 376609 376627 376631 376633 376639 376657 376679 376687 376699 376709 376721
-376729 376757 376759 376769 376787 376793 376801 376807 376811 376819 376823 376837
-376841 376847 376853 376889 376891 376897 376921 376927 376931 376933 376949 376963
-376969 377011 377021 377051 377059 377071 377099 377123 377129 377137 377147 377171
-377173 377183 377197 377219 377231 377257 377263 377287 377291 377297 377327 377329
-377339 377347 377353 377369 377371 377387 377393 377459 377471 377477 377491 377513
-377521 377527 377537 377543 377557 377561 377563 377581 377593 377599 377617 377623
-377633 377653 377681 377687 377711 377717 377737 377749 377761 377771 377779 377789
-377801 377809 377827 377831 377843 377851 377873 377887 377911 377963 377981 377999
-378011 378019 378023 378041 378071 378083 378089 378101 378127 378137 378149 378151
-378163 378167 378179 378193 378223 378229 378239 378241 378253 378269 378277 378283
-378289 378317 378353 378361 378379 378401 378407 378439 378449 378463 378467 378493
-378503 378509 378523 378533 378551 378559 378569 378571 378583 378593 378601 378619
-378629 378661 378667 378671 378683 378691 378713 378733 378739 378757 378761 378779
-378793 378809 378817 378821 378823 378869 378883 378893 378901 378919 378929 378941
-378949 378953 378967 378977 378997 379007 379009 379013 379033 379039 379073 379081
-379087 379097 379103 379123 379133 379147 379157 379163 379177 379187 379189 379199
-379207 379273 379277 379283 379289 379307 379319 379333 379343 379369 379387 379391
-379397 379399 379417 379433 379439 379441 379451 379459 379499 379501 379513 379531
-379541 379549 379571 379573 379579 379597 379607 379633 379649 379663 379667 379679
-379681 379693 379699 379703 379721 379723 379727 379751 379777 379787 379811 379817
-379837 379849 379853 379859 379877 379889 379903 379909 379913 379927 379931 379963
-379979 379993 379997 379999 380041 380047 380059 380071 380117 380129 380131 380141
-380147 380179 380189 380197 380201 380203 380207 380231 380251 380267 380269 380287
-380291 380299 380309 380311 380327 380329 380333 380363 380377 380383 380417 380423
-380441 380447 380453 380459 380461 380483 380503 380533 380557 380563 380591 380621
-380623 380629 380641 380651 380657 380707 380713 380729 380753 380777 380797 380803
-380819 380837 380839 380843 380867 380869 380879 380881 380909 380917 380929 380951
-380957 380971 380977 380983 381001 381011 381019 381037 381047 381061 381071 381077
-381097 381103 381167 381169 381181 381209 381221 381223 381233 381239 381253 381287
-381289 381301 381319 381323 381343 381347 381371 381373 381377 381383 381389 381401
-381413 381419 381439 381443 381461 381467 381481 381487 381509 381523 381527 381529
-381533 381541 381559 381569 381607 381629 381631 381637 381659 381673 381697 381707
-381713 381737 381739 381749 381757 381761 381791 381793 381817 381841 381853 381859
-381911 381917 381937 381943 381949 381977 381989 381991 382001 382003 382021 382037
-382061 382069 382073 382087 382103 382117 382163 382171 382189 382229 382231 382241
-382253 382267 382271 382303 382331 382351 382357 382363 382373 382391 382427 382429
-382457 382463 382493 382507 382511 382519 382541 382549 382553 382567 382579 382583
-382589 382601 382621 382631 382643 382649 382661 382663 382693 382703 382709 382727
-382729 382747 382751 382763 382769 382777 382801 382807 382813 382843 382847 382861
-382867 382871 382873 382883 382919 382933 382939 382961 382979 382999 383011 383023
-383029 383041 383051 383069 383077 383081 383083 383099 383101 383107 383113 383143
-383147 383153 383171 383179 383219 383221 383261 383267 383281 383291 383297 383303
-383321 383347 383371 383393 383399 383417 383419 383429 383459 383483 383489 383519
-383521 383527 383533 383549 383557 383573 383587 383609 383611 383623 383627 383633
-383651 383657 383659 383681 383683 383693 383723 383729 383753 383759 383767 383777
-383791 383797 383807 383813 383821 383833 383837 383839 383869 383891 383909 383917
-383923 383941 383951 383963 383969 383983 383987 384001 384017 384029 384049 384061
-384067 384079 384089 384107 384113 384133 384143 384151 384157 384173 384187 384193
-384203 384227 384247 384253 384257 384259 384277 384287 384289 384299 384301 384317
-384331 384343 384359 384367 384383 384403 384407 384437 384469 384473 384479 384481
-384487 384497 384509 384533 384547 384577 384581 384589 384599 384611 384619 384623
-384641 384673 384691 384697 384701 384719 384733 384737 384751 384757 384773 384779
-384817 384821 384827 384841 384847 384851 384889 384907 384913 384919 384941 384961
-384973 385001 385013 385027 385039 385057 385069 385079 385081 385087 385109 385127
-385129 385139 385141 385153 385159 385171 385193 385199 385223 385249 385261 385267
-385279 385289 385291 385321 385327 385331 385351 385379 385391 385393 385397 385403
-385417 385433 385471 385481 385493 385501 385519 385531 385537 385559 385571 385573
-385579 385589 385591 385597 385607 385621 385631 385639 385657 385661 385663 385709
-385739 385741 385771 385783 385793 385811 385817 385831 385837 385843 385859 385877
-385897 385901 385907 385927 385939 385943 385967 385991 385997 386017 386039 386041
-386047 386051 386083 386093 386117 386119 386129 386131 386143 386149 386153 386159
-386161 386173 386219 386227 386233 386237 386249 386263 386279 386297 386299 386303
-386329 386333 386339 386363 386369 386371 386381 386383 386401 386411 386413 386429
-386431 386437 386471 386489 386501 386521 386537 386543 386549 386569 386587 386609
-386611 386621 386629 386641 386647 386651 386677 386689 386693 386713 386719 386723
-386731 386747 386777 386809 386839 386851 386887 386891 386921 386927 386963 386977
-386987 386989 386993 387007 387017 387031 387047 387071 387077 387083 387089 387109
-387137 387151 387161 387169 387173 387187 387197 387199 387203 387227 387253 387263
-387269 387281 387307 387313 387329 387341 387371 387397 387403 387433 387437 387449
-387463 387493 387503 387509 387529 387551 387577 387587 387613 387623 387631 387641
-387659 387677 387679 387683 387707 387721 387727 387743 387749 387763 387781 387791
-387799 387839 387853 387857 387911 387913 387917 387953 387967 387971 387973 387977
-388009 388051 388057 388067 388081 388099 388109 388111 388117 388133 388159 388163
-388169 388177 388181 388183 388187 388211 388231 388237 388253 388259 388273 388277
-388301 388313 388319 388351 388363 388369 388373 388391 388403 388459 388471 388477
-388481 388483 388489 388499 388519 388529 388541 388567 388573 388621 388651 388657
-388673 388691 388693 388697 388699 388711 388727 388757 388777 388781 388789 388793
-388813 388823 388837 388859 388879 388891 388897 388901 388903 388931 388933 388937
-388961 388963 388991 389003 389023 389027 389029 389041 389047 389057 389083 389089
-389099 389111 389117 389141 389149 389161 389167 389171 389173 389189 389219 389227
-389231 389269 389273 389287 389297 389299 389303 389357 389369 389381 389399 389401
-389437 389447 389461 389479 389483 389507 389513 389527 389531 389533 389539 389561
-389563 389567 389569 389579 389591 389621 389629 389651 389659 389663 389687 389699
-389713 389723 389743 389749 389761 389773 389783 389791 389797 389819 389839 389849
-389867 389891 389897 389903 389911 389923 389927 389941 389947 389953 389957 389971
-389981 389989 389999 390001 390043 390067 390077 390083 390097 390101 390107 390109
-390113 390119 390151 390157 390161 390191 390193 390199 390209 390211 390223 390263
-390281 390289 390307 390323 390343 390347 390353 390359 390367 390373 390389 390391
-390407 390413 390419 390421 390433 390437 390449 390463 390479 390487 390491 390493
-390499 390503 390527 390539 390553 390581 390647 390653 390671 390673 390703 390707
-390721 390727 390737 390739 390743 390751 390763 390781 390791 390809 390821 390829
-390851 390869 390877 390883 390889 390893 390953 390959 390961 390967 390989 390991
-391009 391019 391021 391031 391049 391057 391063 391067 391073 391103 391117 391133
-391151 391159 391163 391177 391199 391217 391219 391231 391247 391249 391273 391283
-391291 391301 391331 391337 391351 391367 391373 391379 391387 391393 391397 391399
-391403 391441 391451 391453 391487 391519 391537 391553 391579 391613 391619 391627
-391631 391639 391661 391679 391691 391693 391711 391717 391733 391739 391751 391753
-391757 391789 391801 391817 391823 391847 391861 391873 391879 391889 391891 391903
-391907 391921 391939 391961 391967 391987 391999 392011 392033 392053 392059 392069
-392087 392099 392101 392111 392113 392131 392143 392149 392153 392159 392177 392201
-392209 392213 392221 392233 392239 392251 392261 392263 392267 392269 392279 392281
-392297 392299 392321 392333 392339 392347 392351 392363 392383 392389 392423 392437
-392443 392467 392473 392477 392489 392503 392519 392531 392543 392549 392569 392593
-392599 392611 392629 392647 392663 392669 392699 392723 392737 392741 392759 392761
-392767 392803 392807 392809 392827 392831 392837 392849 392851 392857 392879 392893
-392911 392923 392927 392929 392957 392963 392969 392981 392983 393007 393013 393017
-393031 393059 393073 393077 393079 393083 393097 393103 393109 393121 393137 393143
-393157 393161 393181 393187 393191 393203 393209 393241 393247 393257 393271 393287
-393299 393301 393311 393331 393361 393373 393377 393383 393401 393403 393413 393451
-393473 393479 393487 393517 393521 393539 393541 393551 393557 393571 393577 393581
-393583 393587 393593 393611 393629 393637 393649 393667 393671 393677 393683 393697
-393709 393713 393721 393727 393739 393749 393761 393779 393797 393847 393853 393857
-393859 393863 393871 393901 393919 393929 393931 393947 393961 393977 393989 393997
-394007 394019 394039 394049 394063 394073 394099 394123 394129 394153 394157 394169
-394187 394201 394211 394223 394241 394249 394259 394271 394291 394319 394327 394357
-394363 394367 394369 394393 394409 394411 394453 394481 394489 394501 394507 394523
-394529 394549 394571 394577 394579 394601 394619 394631 394633 394637 394643 394673
-394699 394717 394721 394727 394729 394733 394739 394747 394759 394787 394811 394813
-394817 394819 394829 394837 394861 394879 394897 394931 394943 394963 394967 394969
-394981 394987 394993 395023 395027 395039 395047 395069 395089 395093 395107 395111
-395113 395119 395137 395141 395147 395159 395173 395189 395191 395201 395231 395243
-395251 395261 395273 395287 395293 395303 395309 395321 395323 395377 395383 395407
-395429 395431 395443 395449 395453 395459 395491 395509 395513 395533 395537 395543
-395581 395597 395611 395621 395627 395657 395671 395677 395687 395701 395719 395737
-395741 395749 395767 395803 395849 395851 395873 395887 395891 395897 395909 395921
-395953 395959 395971 396001 396029 396031 396041 396043 396061 396079 396091 396103
-396107 396119 396157 396173 396181 396197 396199 396203 396217 396239 396247 396259
-396269 396293 396299 396301 396311 396323 396349 396353 396373 396377 396379 396413
-396427 396437 396443 396449 396479 396509 396523 396527 396533 396541 396547 396563
-396577 396581 396601 396619 396623 396629 396631 396637 396647 396667 396679 396703
-396709 396713 396719 396733 396833 396871 396881 396883 396887 396919 396931 396937
-396943 396947 396953 396971 396983 396997 397013 397027 397037 397051 397057 397063
-397073 397093 397099 397127 397151 397153 397181 397183 397211 397217 397223 397237
-397253 397259 397283 397289 397297 397301 397303 397337 397351 397357 397361 397373
-397379 397427 397429 397433 397459 397469 397489 397493 397517 397519 397541 397543
-397547 397549 397567 397589 397591 397597 397633 397643 397673 397687 397697 397721
-397723 397729 397751 397753 397757 397759 397763 397799 397807 397811 397829 397849
-397867 397897 397907 397921 397939 397951 397963 397973 397981 398011 398023 398029
-398033 398039 398053 398059 398063 398077 398087 398113 398117 398119 398129 398143
-398149 398171 398207 398213 398219 398227 398249 398261 398267 398273 398287 398303
-398311 398323 398339 398341 398347 398353 398357 398369 398393 398407 398417 398423
-398441 398459 398467 398471 398473 398477 398491 398509 398539 398543 398549 398557
-398569 398581 398591 398609 398611 398621 398627 398669 398681 398683 398693 398711
-398729 398731 398759 398771 398813 398819 398821 398833 398857 398863 398887 398903
-398917 398921 398933 398941 398969 398977 398989 399023 399031 399043 399059 399067
-399071 399079 399097 399101 399107 399131 399137 399149 399151 399163 399173 399181
-399197 399221 399227 399239 399241 399263 399271 399277 399281 399283 399353 399379
-399389 399391 399401 399403 399409 399433 399439 399473 399481 399491 399493 399499
-399523 399527 399541 399557 399571 399577 399583 399587 399601 399613 399617 399643
-399647 399667 399677 399689 399691 399719 399727 399731 399739 399757 399761 399769
-399781 399787 399793 399851 399853 399871 399887 399899 399911 399913 399937 399941
-399953 399979 399983 399989 400009 400031 400033 400051 400067 400069 400087 400093
-400109 400123 400151 400157 400187 400199 400207 400217 400237 400243 400247 400249
-400261 400277 400291 400297 400307 400313 400321 400331 400339 400381 400391 400409
-400417 400429 400441 400457 400471 400481 400523 400559 400579 400597 400601 400607
-400619 400643 400651 400657 400679 400681 400703 400711 400721 400723 400739 400753
-400759 400823 400837 400849 400853 400859 400871 400903 400927 400931 400943 400949
-400963 400997 401017 401029 401039 401053 401057 401069 401077 401087 401101 401113
-401119 401161 401173 401179 401201 401209 401231 401237 401243 401279 401287 401309
-401311 401321 401329 401341 401347 401371 401381 401393 401407 401411 401417 401473
-401477 401507 401519 401537 401539 401551 401567 401587 401593 401627 401629 401651
-401669 401671 401689 401707 401711 401743 401771 401773 401809 401813 401827 401839
-401861 401867 401887 401903 401909 401917 401939 401953 401957 401959 401981 401987
-401993 402023 402029 402037 402043 402049 402053 402071 402089 402091 402107 402131
-402133 402137 402139 402197 402221 402223 402239 402253 402263 402277 402299 402307
-402313 402329 402331 402341 402343 402359 402361 402371 402379 402383 402403 402419
-402443 402487 402503 402511 402517 402527 402529 402541 402551 402559 402581 402583
-402587 402593 402601 402613 402631 402691 402697 402739 402751 402757 402761 402763
-402767 402769 402797 402803 402817 402823 402847 402851 402859 402863 402869 402881
-402923 402943 402947 402949 402991 403001 403003 403037 403043 403049 403057 403061
-403063 403079 403097 403103 403133 403141 403159 403163 403181 403219 403241 403243
-403253 403261 403267 403289 403301 403309 403327 403331 403339 403363 403369 403387
-403391 403433 403439 403483 403499 403511 403537 403547 403549 403553 403567 403577
-403591 403603 403607 403621 403649 403661 403679 403681 403687 403703 403717 403721
-403729 403757 403783 403787 403817 403829 403831 403849 403861 403867 403877 403889
-403901 403933 403951 403957 403969 403979 403981 403993 404009 404011 404017 404021
-404029 404051 404081 404099 404113 404119 404123 404161 404167 404177 404189 404191
-404197 404213 404221 404249 404251 404267 404269 404273 404291 404309 404321 404323
-404357 404381 404387 404389 404399 404419 404423 404429 404431 404449 404461 404483
-404489 404497 404507 404513 404527 404531 404533 404539 404557 404597 404671 404693
-404699 404713 404773 404779 404783 404819 404827 404837 404843 404849 404851 404941
-404951 404959 404969 404977 404981 404983 405001 405011 405029 405037 405047 405049
-405071 405073 405089 405091 405143 405157 405179 405199 405211 405221 405227 405239
-405241 405247 405253 405269 405277 405287 405299 405323 405341 405343 405347 405373
-405401 405407 405413 405437 405439 405473 405487 405491 405497 405499 405521 405527
-405529 405541 405553 405577 405599 405607 405611 405641 405659 405667 405677 405679
-405683 405689 405701 405703 405709 405719 405731 405749 405763 405767 405781 405799
-405817 405827 405829 405857 405863 405869 405871 405893 405901 405917 405947 405949
-405959 405967 405989 405991 405997 406013 406027 406037 406067 406073 406093 406117
-406123 406169 406171 406177 406183 406207 406247 406253 406267 406271 406309 406313
-406327 406331 406339 406349 406361 406381 406397 406403 406423 406447 406481 406499
-406501 406507 406513 406517 406531 406547 406559 406561 406573 406577 406579 406583
-406591 406631 406633 406649 406661 406673 406697 406699 406717 406729 406739 406789
-406807 406811 406817 406837 406859 406873 406883 406907 406951 406969 406981 406993
-407023 407047 407059 407083 407119 407137 407149 407153 407177 407179 407191 407203
-407207 407219 407221 407233 407249 407257 407263 407273 407287 407291 407299 407311
-407317 407321 407347 407357 407359 407369 407377 407383 407401 407437 407471 407483
-407489 407501 407503 407509 407521 407527 407567 407573 407579 407587 407599 407621
-407633 407639 407651 407657 407669 407699 407707 407713 407717 407723 407741 407747
-407783 407789 407791 407801 407807 407821 407833 407843 407857 407861 407879 407893
-407899 407917 407923 407947 407959 407969 407971 407977 407993 408011 408019 408041
-408049 408071 408077 408091 408127 408131 408137 408169 408173 408197 408203 408209
-408211 408217 408223 408229 408241 408251 408263 408271 408283 408311 408337 408341
-408347 408361 408379 408389 408403 408413 408427 408431 408433 408437 408461 408469
-408479 408491 408497 408533 408539 408553 408563 408607 408623 408631 408637 408643
-408659 408677 408689 408691 408701 408703 408713 408719 408743 408763 408769 408773
-408787 408803 408809 408817 408841 408857 408869 408911 408913 408923 408943 408953
-408959 408971 408979 408997 409007 409021 409027 409033 409043 409063 409069 409081
-409099 409121 409153 409163 409177 409187 409217 409237 409259 409261 409267 409271
-409289 409291 409327 409333 409337 409349 409351 409369 409379 409391 409397 409429
-409433 409441 409463 409471 409477 409483 409499 409517 409523 409529 409543 409573
-409579 409589 409597 409609 409639 409657 409691 409693 409709 409711 409723 409729
-409733 409753 409769 409777 409781 409813 409817 409823 409831 409841 409861 409867
-409879 409889 409891 409897 409901 409909 409933 409943 409951 409961 409967 409987
-409993 409999 410009 410029 410063 410087 410093 410117 410119 410141 410143 410149
-410171 410173 410203 410231 410233 410239 410243 410257 410279 410281 410299 410317
-410323 410339 410341 410353 410359 410383 410387 410393 410401 410411 410413 410453
-410461 410477 410489 410491 410497 410507 410513 410519 410551 410561 410587 410617
-410621 410623 410629 410651 410659 410671 410687 410701 410717 410731 410741 410747
-410749 410759 410783 410789 410801 410807 410819 410833 410857 410899 410903 410929
-410953 410983 410999 411001 411007 411011 411013 411031 411041 411049 411067 411071
-411083 411101 411113 411119 411127 411143 411157 411167 411193 411197 411211 411233
-411241 411251 411253 411259 411287 411311 411337 411347 411361 411371 411379 411409
-411421 411443 411449 411469 411473 411479 411491 411503 411527 411529 411557 411563
-411569 411577 411583 411589 411611 411613 411617 411637 411641 411667 411679 411683
-411703 411707 411709 411721 411727 411737 411739 411743 411751 411779 411799 411809
-411821 411823 411833 411841 411883 411919 411923 411937 411941 411947 411967 411991
-412001 412007 412019 412031 412033 412037 412039 412051 412067 412073 412081 412099
-412109 412123 412127 412133 412147 412157 412171 412187 412189 412193 412201 412211
-412213 412219 412249 412253 412273 412277 412289 412303 412333 412339 412343 412387
-412397 412411 412457 412463 412481 412487 412493 412537 412561 412567 412571 412589
-412591 412603 412609 412619 412627 412637 412639 412651 412663 412667 412717 412739
-412771 412793 412807 412831 412849 412859 412891 412901 412903 412939 412943 412949
-412967 412987 413009 413027 413033 413053 413069 413071 413081 413087 413089 413093
-413111 413113 413129 413141 413143 413159 413167 413183 413197 413201 413207 413233
-413243 413251 413263 413267 413293 413299 413353 413411 413417 413429 413443 413461
-413477 413521 413527 413533 413537 413551 413557 413579 413587 413597 413629 413653
-413681 413683 413689 413711 413713 413719 413737 413753 413759 413779 413783 413807
-413827 413849 413863 413867 413869 413879 413887 413911 413923 413951 413981 414013
-414017 414019 414031 414049 414053 414061 414077 414083 414097 414101 414107 414109
-414131 414157 414179 414199 414203 414209 414217 414221 414241 414259 414269 414277
-414283 414311 414313 414329 414331 414347 414361 414367 414383 414389 414397 414413
-414431 414433 414451 414457 414461 414467 414487 414503 414521 414539 414553 414559
-414571 414577 414607 414611 414629 414641 414643 414653 414677 414679 414683 414691
-414697 414703 414707 414709 414721 414731 414737 414763 414767 414769 414773 414779
-414793 414803 414809 414833 414857 414871 414889 414893 414899 414913 414923 414929
-414949 414959 414971 414977 414991 415013 415031 415039 415061 415069 415073 415087
-415097 415109 415111 415133 415141 415147 415153 415159 415171 415187 415189 415201
-415213 415231 415253 415271 415273 415319 415343 415379 415381 415391 415409 415427
-415447 415469 415477 415489 415507 415517 415523 415543 415553 415559 415567 415577
-415603 415607 415609 415627 415631 415643 415651 415661 415669 415673 415687 415691
-415697 415717 415721 415729 415759 415783 415787 415799 415801 415819 415823 415861
-415873 415879 415901 415931 415937 415949 415951 415957 415963 415969 415979 415993
-415999 416011 416023 416071 416077 416089 416107 416147 416149 416153 416159 416167
-416201 416219 416239 416243 416249 416257 416263 416281 416291 416333 416359 416387
-416389 416393 416399 416401 416407 416413 416417 416419 416441 416443 416459 416473
-416477 416491 416497 416501 416503 416513 416531 416543 416573 416579 416593 416621
-416623 416629 416659 416677 416693 416719 416761 416797 416821 416833 416839 416849
-416851 416873 416881 416887 416947 416957 416963 416989 417007 417017 417019 417023
-417037 417089 417097 417113 417119 417127 417133 417161 417169 417173 417181 417187
-417191 417203 417217 417227 417239 417251 417271 417283 417293 417311 417317 417331
-417337 417371 417377 417379 417383 417419 417437 417451 417457 417479 417491 417493
-417509 417511 417523 417541 417553 417559 417577 417581 417583 417617 417623 417631
-417643 417649 417671 417691 417719 417721 417727 417731 417733 417737 417751 417763
-417773 417793 417811 417821 417839 417863 417869 417881 417883 417899 417931 417941
-417947 417953 417959 417961 417983 417997 418007 418009 418027 418031 418043 418051
-418069 418073 418079 418087 418109 418129 418157 418169 418177 418181 418189 418199
-418207 418219 418259 418273 418279 418289 418303 418321 418331 418337 418339 418343
-418349 418351 418357 418373 418381 418391 418423 418427 418447 418459 418471 418493
-418511 418553 418559 418597 418601 418603 418631 418633 418637 418657 418667 418699
-418709 418721 418739 418751 418763 418771 418783 418787 418793 418799 418811 418813
-418819 418837 418843 418849 418861 418867 418871 418883 418889 418909 418921 418927
-418933 418939 418961 418981 418987 418993 418997 419047 419051 419053 419057 419059
-419087 419141 419147 419161 419171 419183 419189 419191 419201 419231 419249 419261
-419281 419291 419297 419303 419317 419329 419351 419383 419401 419417 419423 419429
-419443 419449 419459 419467 419473 419477 419483 419491 419513 419527 419537 419557
-419561 419563 419567 419579 419591 419597 419599 419603 419609 419623 419651 419687
-419693 419701 419711 419743 419753 419777 419789 419791 419801 419803 419821 419827
-419831 419873 419893 419921 419927 419929 419933 419953 419959 419999 420001 420029
-420037 420041 420047 420073 420097 420103 420149 420163 420191 420193 420221 420241
-420253 420263 420269 420271 420293 420307 420313 420317 420319 420323 420331 420341
-420349 420353 420361 420367 420383 420397 420419 420421 420439 420457 420467 420479
-420481 420499 420503 420521 420551 420557 420569 420571 420593 420599 420613 420671
-420677 420683 420691 420731 420737 420743 420757 420769 420779 420781 420799 420803
-420809 420811 420851 420853 420857 420859 420899 420919 420929 420941 420967 420977
-420997 421009 421019 421033 421037 421049 421079 421081 421093 421103 421121 421123
-421133 421147 421159 421163 421177 421181 421189 421207 421241 421273 421279 421303
-421313 421331 421339 421349 421361 421381 421397 421409 421417 421423 421433 421453
-421459 421469 421471 421483 421493 421501 421517 421559 421607 421609 421621 421633
-421639 421643 421657 421661 421691 421697 421699 421703 421709 421711 421717 421727
-421739 421741 421783 421801 421807 421831 421847 421891 421907 421913 421943 421973
-421987 421997 422029 422041 422057 422063 422069 422077 422083 422087 422089 422099
-422101 422111 422113 422129 422137 422141 422183 422203 422209 422231 422239 422243
-422249 422267 422287 422291 422309 422311 422321 422339 422353 422363 422369 422377
-422393 422407 422431 422453 422459 422479 422537 422549 422551 422557 422563 422567
-422573 422581 422621 422627 422657 422689 422701 422707 422711 422749 422753 422759
-422761 422789 422797 422803 422827 422857 422861 422867 422869 422879 422881 422893
-422897 422899 422911 422923 422927 422969 422987 423001 423013 423019 423043 423053
-423061 423067 423083 423091 423097 423103 423109 423121 423127 423133 423173 423179
-423191 423209 423221 423229 423233 423251 423257 423259 423277 423281 423287 423289
-423299 423307 423323 423341 423347 423389 423403 423413 423427 423431 423439 423457
-423461 423463 423469 423481 423497 423503 423509 423541 423547 423557 423559 423581
-423587 423601 423617 423649 423667 423697 423707 423713 423727 423749 423751 423763
-423769 423779 423781 423791 423803 423823 423847 423853 423859 423869 423883 423887
-423931 423949 423961 423977 423989 423991 424001 424003 424007 424019 424027 424037
-424079 424091 424093 424103 424117 424121 424129 424139 424147 424157 424163 424169
-424187 424199 424223 424231 424243 424247 424261 424267 424271 424273 424313 424331
-424339 424343 424351 424397 424423 424429 424433 424451 424471 424481 424493 424519
-424537 424547 424549 424559 424573 424577 424597 424601 424639 424661 424667 424679
-424687 424693 424709 424727 424729 424757 424769 424771 424777 424811 424817 424819
-424829 424841 424843 424849 424861 424867 424889 424891 424903 424909 424913 424939
-424961 424967 424997 425003 425027 425039 425057 425059 425071 425083 425101 425107
-425123 425147 425149 425189 425197 425207 425233 425237 425251 425273 425279 425281
-425291 425297 425309 425317 425329 425333 425363 425377 425387 425393 425417 425419
-425423 425441 425443 425471 425473 425489 425501 425519 425521 425533 425549 425563
-425591 425603 425609 425641 425653 425681 425701 425713 425779 425783 425791 425801
-425813 425819 425837 425839 425851 425857 425861 425869 425879 425899 425903 425911
-425939 425959 425977 425987 425989 426007 426011 426061 426073 426077 426089 426091
-426103 426131 426161 426163 426193 426197 426211 426229 426233 426253 426287 426301
-426311 426319 426331 426353 426383 426389 426401 426407 426421 426427 426469 426487
-426527 426541 426551 426553 426563 426583 426611 426631 426637 426641 426661 426691
-426697 426707 426709 426731 426737 426739 426743 426757 426761 426763 426773 426779
-426787 426799 426841 426859 426863 426871 426889 426893 426913 426917 426919 426931
-426941 426971 426973 426997 427001 427013 427039 427043 427067 427069 427073 427079
-427081 427103 427117 427151 427169 427181 427213 427237 427241 427243 427247 427249
-427279 427283 427307 427309 427327 427333 427351 427369 427379 427381 427403 427417
-427421 427423 427429 427433 427439 427447 427451 427457 427477 427513 427517 427523
-427529 427541 427579 427591 427597 427619 427621 427681 427711 427717 427723 427727
-427733 427751 427781 427787 427789 427813 427849 427859 427877 427879 427883 427913
-427919 427939 427949 427951 427957 427967 427969 427991 427993 427997 428003 428023
-428027 428033 428039 428041 428047 428083 428093 428137 428143 428147 428149 428161
-428167 428173 428177 428221 428227 428231 428249 428251 428273 428297 428299 428303
-428339 428353 428369 428401 428411 428429 428471 428473 428489 428503 428509 428531
-428539 428551 428557 428563 428567 428569 428579 428629 428633 428639 428657 428663
-428671 428677 428683 428693 428731 428741 428759 428777 428797 428801 428807 428809
-428833 428843 428851 428863 428873 428899 428951 428957 428977 429007 429017 429043
-429083 429101 429109 429119 429127 429137 429139 429161 429181 429197 429211 429217
-429223 429227 429241 429259 429271 429277 429281 429283 429329 429347 429349 429361
-429367 429389 429397 429409 429413 429427 429431 429449 429463 429467 429469 429487
-429497 429503 429509 429511 429521 429529 429547 429551 429563 429581 429587 429589
-429599 429631 429643 429659 429661 429673 429677 429679 429683 429701 429719 429727
-429731 429733 429773 429791 429797 429817 429823 429827 429851 429853 429881 429887
-429889 429899 429901 429907 429911 429917 429929 429931 429937 429943 429953 429971
-429973 429991 430007 430009 430013 430019 430057 430061 430081 430091 430093 430121
-430139 430147 430193 430259 430267 430277 430279 430289 430303 430319 430333 430343
-430357 430393 430411 430427 430433 430453 430487 430499 430511 430513 430517 430543
-430553 430571 430579 430589 430601 430603 430649 430663 430691 430697 430699 430709
-430723 430739 430741 430747 430751 430753 430769 430783 430789 430799 430811 430819
-430823 430841 430847 430861 430873 430879 430883 430891 430897 430907 430909 430921
-430949 430957 430979 430981 430987 430999 431017 431021 431029 431047 431051 431063
-431077 431083 431099 431107 431141 431147 431153 431173 431191 431203 431213 431219
-431237 431251 431257 431267 431269 431287 431297 431311 431329 431339 431363 431369
-431377 431381 431399 431423 431429 431441 431447 431449 431479 431513 431521 431533
-431567 431581 431597 431603 431611 431617 431621 431657 431659 431663 431671 431693
-431707 431729 431731 431759 431777 431797 431801 431803 431807 431831 431833 431857
-431863 431867 431869 431881 431887 431891 431903 431911 431929 431933 431947 431983
-431993 432001 432007 432023 432031 432037 432043 432053 432059 432067 432073 432097
-432121 432137 432139 432143 432149 432161 432163 432167 432199 432203 432227 432241
-432251 432277 432281 432287 432301 432317 432323 432337 432343 432349 432359 432373
-432389 432391 432401 432413 432433 432437 432449 432457 432479 432491 432499 432503
-432511 432527 432539 432557 432559 432569 432577 432587 432589 432613 432631 432637
-432659 432661 432713 432721 432727 432737 432743 432749 432781 432793 432797 432799
-432833 432847 432857 432869 432893 432907 432923 432931 432959 432961 432979 432983
-432989 433003 433033 433049 433051 433061 433073 433079 433087 433093 433099 433117
-433123 433141 433151 433187 433193 433201 433207 433229 433241 433249 433253 433259
-433261 433267 433271 433291 433309 433319 433337 433351 433357 433361 433369 433373
-433393 433399 433421 433429 433439 433453 433469 433471 433501 433507 433513 433549
-433571 433577 433607 433627 433633 433639 433651 433661 433663 433673 433679 433681
-433703 433723 433729 433747 433759 433777 433781 433787 433813 433817 433847 433859
-433861 433877 433883 433889 433931 433943 433963 433967 433981 434009 434011 434029
-434039 434081 434087 434107 434111 434113 434117 434141 434167 434179 434191 434201
-434209 434221 434237 434243 434249 434261 434267 434293 434297 434303 434311 434323
-434347 434353 434363 434377 434383 434387 434389 434407 434411 434431 434437 434459
-434461 434471 434479 434501 434509 434521 434561 434563 434573 434593 434597 434611
-434647 434659 434683 434689 434699 434717 434719 434743 434761 434783 434803 434807
-434813 434821 434827 434831 434839 434849 434857 434867 434873 434881 434909 434921
-434923 434927 434933 434939 434947 434957 434963 434977 434981 434989 435037 435041
-435059 435103 435107 435109 435131 435139 435143 435151 435161 435179 435181 435187
-435191 435221 435223 435247 435257 435263 435277 435283 435287 435307 435317 435343
-435349 435359 435371 435397 435401 435403 435419 435427 435437 435439 435451 435481
-435503 435529 435541 435553 435559 435563 435569 435571 435577 435583 435593 435619
-435623 435637 435641 435647 435649 435653 435661 435679 435709 435731 435733 435739
-435751 435763 435769 435779 435817 435839 435847 435857 435859 435881 435889 435893
-435907 435913 435923 435947 435949 435973 435983 435997 436003 436013 436027 436061
-436081 436087 436091 436097 436127 436147 436151 436157 436171 436181 436217 436231
-436253 436273 436279 436283 436291 436307 436309 436313 436343 436357 436399 436417
-436427 436439 436459 436463 436477 436481 436483 436507 436523 436529 436531 436547
-436549 436571 436591 436607 436621 436627 436649 436651 436673 436687 436693 436717
-436727 436729 436739 436741 436757 436801 436811 436819 436831 436841 436853 436871
-436889 436913 436957 436963 436967 436973 436979 436993 436999 437011 437033 437071
-437077 437083 437093 437111 437113 437137 437141 437149 437153 437159 437191 437201
-437219 437237 437243 437263 437273 437279 437287 437293 437321 437351 437357 437363
-437387 437389 437401 437413 437467 437471 437473 437497 437501 437509 437519 437527
-437533 437539 437543 437557 437587 437629 437641 437651 437653 437677 437681 437687
-437693 437719 437729 437743 437753 437771 437809 437819 437837 437849 437861 437867
-437881 437909 437923 437947 437953 437959 437977 438001 438017 438029 438047 438049
-438091 438131 438133 438143 438169 438203 438211 438223 438233 438241 438253 438259
-438271 438281 438287 438301 438313 438329 438341 438377 438391 438401 438409 438419
-438439 438443 438467 438479 438499 438517 438521 438523 438527 438533 438551 438569
-438589 438601 438611 438623 438631 438637 438661 438667 438671 438701 438707 438721
-438733 438761 438769 438793 438827 438829 438833 438847 438853 438869 438877 438887
-438899 438913 438937 438941 438953 438961 438967 438979 438983 438989 439007 439009
-439063 439081 439123 439133 439141 439157 439163 439171 439183 439199 439217 439253
-439273 439279 439289 439303 439339 439349 439357 439367 439381 439409 439421 439427
-439429 439441 439459 439463 439471 439493 439511 439519 439541 439559 439567 439573
-439577 439583 439601 439613 439631 439639 439661 439667 439687 439693 439697 439709
-439723 439729 439753 439759 439763 439771 439781 439787 439799 439811 439823 439849
-439853 439861 439867 439883 439891 439903 439919 439949 439961 439969 439973 439981
-439991 440009 440023 440039 440047 440087 440093 440101 440131 440159 440171 440177
-440179 440183 440203 440207 440221 440227 440239 440261 440269 440281 440303 440311
-440329 440333 440339 440347 440371 440383 440389 440393 440399 440431 440441 440443
-440471 440497 440501 440507 440509 440527 440537 440543 440549 440551 440567 440569
-440579 440581 440641 440651 440653 440669 440677 440681 440683 440711 440717 440723
-440731 440753 440761 440773 440807 440809 440821 440831 440849 440863 440893 440903
-440911 440939 440941 440953 440959 440983 440987 440989 441011 441029 441041 441043
-441053 441073 441079 441101 441107 441109 441113 441121 441127 441157 441169 441179
-441187 441191 441193 441229 441247 441251 441257 441263 441281 441307 441319 441349
-441359 441361 441403 441421 441443 441449 441461 441479 441499 441517 441523 441527
-441547 441557 441563 441569 441587 441607 441613 441619 441631 441647 441667 441697
-441703 441713 441737 441751 441787 441797 441799 441811 441827 441829 441839 441841
-441877 441887 441907 441913 441923 441937 441953 441971 442003 442007 442009 442019
-442027 442031 442033 442061 442069 442097 442109 442121 442139 442147 442151 442157
-442171 442177 442181 442193 442201 442207 442217 442229 442237 442243 442271 442283
-442291 442319 442327 442333 442363 442367 442397 442399 442439 442447 442457 442469
-442487 442489 442499 442501 442517 442531 442537 442571 442573 442577 442579 442601
-442609 442619 442633 442691 442699 442703 442721 442733 442747 442753 442763 442769
-442777 442781 442789 442807 442817 442823 442829 442831 442837 442843 442861 442879
-442903 442919 442961 442963 442973 442979 442987 442991 442997 443011 443017 443039
-443041 443057 443059 443063 443077 443089 443117 443123 443129 443147 443153 443159
-443161 443167 443171 443189 443203 443221 443227 443231 443237 443243 443249 443263
-443273 443281 443291 443293 443341 443347 443353 443363 443369 443389 443407 443413
-443419 443423 443431 443437 443453 443467 443489 443501 443533 443543 443551 443561
-443563 443567 443587 443591 443603 443609 443629 443659 443687 443689 443701 443711
-443731 443749 443753 443759 443761 443771 443777 443791 443837 443851 443867 443869
-443873 443879 443881 443893 443899 443909 443917 443939 443941 443953 443983 443987
-443999 444001 444007 444029 444043 444047 444079 444089 444109 444113 444121 444127
-444131 444151 444167 444173 444179 444181 444187 444209 444253 444271 444281 444287
-444289 444293 444307 444341 444343 444347 444349 444401 444403 444421 444443 444449
-444461 444463 444469 444473 444487 444517 444523 444527 444529 444539 444547 444553
-444557 444569 444589 444607 444623 444637 444641 444649 444671 444677 444701 444713
-444739 444767 444791 444793 444803 444811 444817 444833 444841 444859 444863 444869
-444877 444883 444887 444893 444901 444929 444937 444953 444967 444971 444979 445001
-445019 445021 445031 445033 445069 445087 445091 445097 445103 445141 445157 445169
-445183 445187 445199 445229 445261 445271 445279 445283 445297 445307 445321 445339
-445363 445427 445433 445447 445453 445463 445477 445499 445507 445537 445541 445567
-445573 445583 445589 445597 445619 445631 445633 445649 445657 445691 445699 445703
-445741 445747 445769 445771 445789 445799 445807 445829 445847 445853 445871 445877
-445883 445891 445931 445937 445943 445967 445969 446003 446009 446041 446053 446081
-446087 446111 446123 446129 446141 446179 446189 446191 446197 446221 446227 446231
-446261 446263 446273 446279 446293 446309 446323 446333 446353 446363 446387 446389
-446399 446401 446417 446441 446447 446461 446473 446477 446503 446533 446549 446561
-446569 446597 446603 446609 446647 446657 446713 446717 446731 446753 446759 446767
-446773 446819 446827 446839 446863 446881 446891 446893 446909 446911 446921 446933
-446951 446969 446983 447001 447011 447019 447053 447067 447079 447101 447107 447119
-447133 447137 447173 447179 447193 447197 447211 447217 447221 447233 447247 447257
-447259 447263 447311 447319 447323 447331 447353 447401 447409 447427 447439 447443
-447449 447451 447463 447467 447481 447509 447521 447527 447541 447569 447571 447611
-447617 447637 447641 447677 447683 447701 447703 447743 447749 447757 447779 447791
-447793 447817 447823 447827 447829 447841 447859 447877 447883 447893 447901 447907
-447943 447961 447983 447991 448003 448013 448027 448031 448057 448067 448073 448093
-448111 448121 448139 448141 448157 448159 448169 448177 448187 448193 448199 448207
-448241 448249 448303 448309 448313 448321 448351 448363 448367 448373 448379 448387
-448397 448421 448451 448519 448531 448561 448597 448607 448627 448631 448633 448667
-448687 448697 448703 448727 448733 448741 448769 448793 448801 448807 448829 448843
-448853 448859 448867 448871 448873 448879 448883 448907 448927 448939 448969 448993
-448997 448999 449003 449011 449051 449077 449083 449093 449107 449117 449129 449131
-449149 449153 449161 449171 449173 449201 449203 449209 449227 449243 449249 449261
-449263 449269 449287 449299 449303 449311 449321 449333 449347 449353 449363 449381
-449399 449411 449417 449419 449437 449441 449459 449473 449543 449549 449557 449563
-449567 449569 449591 449609 449621 449629 449653 449663 449671 449677 449681 449689
-449693 449699 449741 449759 449767 449773 449783 449797 449807 449821 449833 449851
-449879 449921 449929 449941 449951 449959 449963 449971 449987 449989 450001 450011
-450019 450029 450067 450071 450077 450083 450101 450103 450113 450127 450137 450161
-450169 450193 450199 450209 450217 450223 450227 450239 450257 450259 450277 450287
-450293 450299 450301 450311 450343 450349 450361 450367 450377 450383 450391 450403
-450413 450421 450431 450451 450473 450479 450481 450487 450493 450503 450529 450533
-450557 450563 450581 450587 450599 450601 450617 450641 450643 450649 450677 450691
-450707 450719 450727 450761 450767 450787 450797 450799 450803 450809 450811 450817
-450829 450839 450841 450847 450859 450881 450883 450887 450893 450899 450913 450917
-450929 450943 450949 450971 450991 450997 451013 451039 451051 451057 451069 451093
-451097 451103 451109 451159 451177 451181 451183 451201 451207 451249 451277 451279
-451301 451303 451309 451313 451331 451337 451343 451361 451387 451397 451411 451439
-451441 451481 451499 451519 451523 451541 451547 451553 451579 451601 451609 451621
-451637 451657 451663 451667 451669 451679 451681 451691 451699 451709 451723 451747
-451753 451771 451783 451793 451799 451823 451831 451837 451859 451873 451879 451897
-451901 451903 451909 451921 451933 451937 451939 451961 451967 451987 452009 452017
-452027 452033 452041 452077 452083 452087 452131 452159 452161 452171 452191 452201
-452213 452227 452233 452239 452269 452279 452293 452297 452329 452363 452377 452393
-452401 452443 452453 452497 452519 452521 452531 452533 452537 452539 452549 452579
-452587 452597 452611 452629 452633 452671 452687 452689 452701 452731 452759 452773
-452797 452807 452813 452821 452831 452857 452869 452873 452923 452953 452957 452983
-452989 453023 453029 453053 453073 453107 453119 453133 453137 453143 453157 453161
-453181 453197 453199 453209 453217 453227 453239 453247 453269 453289 453293 453301
-453311 453317 453329 453347 453367 453371 453377 453379 453421 453451 453461 453527
-453553 453559 453569 453571 453599 453601 453617 453631 453637 453641 453643 453659
-453667 453671 453683 453703 453707 453709 453737 453757 453797 453799 453823 453833
-453847 453851 453877 453889 453907 453913 453923 453931 453949 453961 453977 453983
-453991 454009 454021 454031 454033 454039 454061 454063 454079 454109 454141 454151
-454159 454183 454199 454211 454213 454219 454229 454231 454247 454253 454277 454297
-454303 454313 454331 454351 454357 454361 454379 454387 454409 454417 454451 454453
-454483 454501 454507 454513 454541 454543 454547 454577 454579 454603 454609 454627
-454637 454673 454679 454709 454711 454721 454723 454759 454763 454777 454799 454823
-454843 454847 454849 454859 454889 454891 454907 454919 454921 454931 454943 454967
-454969 454973 454991 455003 455011 455033 455047 455053 455093 455099 455123 455149
-455159 455167 455171 455177 455201 455219 455227 455233 455237 455261 455263 455269
-455291 455309 455317 455321 455333 455339 455341 455353 455381 455393 455401 455407
-455419 455431 455437 455443 455461 455471 455473 455479 455489 455491 455513 455527
-455531 455537 455557 455573 455579 455597 455599 455603 455627 455647 455659 455681
-455683 455687 455701 455711 455717 455737 455761 455783 455789 455809 455827 455831
-455849 455863 455881 455899 455921 455933 455941 455953 455969 455977 455989 455993
-455999 456007 456013 456023 456037 456047 456061 456091 456107 456109 456119 456149
-456151 456167 456193 456223 456233 456241 456283 456293 456329 456349 456353 456367
-456377 456403 456409 456427 456439 456451 456457 456461 456499 456503 456517 456523
-456529 456539 456553 456557 456559 456571 456581 456587 456607 456611 456613 456623
-456641 456647 456649 456653 456679 456683 456697 456727 456737 456763 456767 456769
-456791 456809 456811 456821 456871 456877 456881 456899 456901 456923 456949 456959
-456979 456991 457001 457003 457013 457021 457043 457049 457057 457087 457091 457097
-457099 457117 457139 457151 457153 457183 457189 457201 457213 457229 457241 457253
-457267 457271 457277 457279 457307 457319 457333 457339 457363 457367 457381 457393
-457397 457399 457403 457411 457421 457433 457459 457469 457507 457511 457517 457547
-457553 457559 457571 457607 457609 457621 457643 457651 457661 457669 457673 457679
-457687 457697 457711 457739 457757 457789 457799 457813 457817 457829 457837 457871
-457889 457903 457913 457943 457979 457981 457987 458009 458027 458039 458047 458053
-458057 458063 458069 458119 458123 458173 458179 458189 458191 458197 458207 458219
-458239 458309 458317 458323 458327 458333 458357 458363 458377 458399 458401 458407
-458449 458477 458483 458501 458531 458533 458543 458567 458569 458573 458593 458599
-458611 458621 458629 458639 458651 458663 458669 458683 458701 458719 458729 458747
-458789 458791 458797 458807 458819 458849 458863 458879 458891 458897 458917 458921
-458929 458947 458957 458959 458963 458971 458977 458981 458987 458993 459007 459013
-459023 459029 459031 459037 459047 459089 459091 459113 459127 459167 459169 459181
-459209 459223 459229 459233 459257 459271 459293 459301 459313 459317 459337 459341
-459343 459353 459373 459377 459383 459397 459421 459427 459443 459463 459467 459469
-459479 459509 459521 459523 459593 459607 459611 459619 459623 459631 459647 459649
-459671 459677 459691 459703 459749 459763 459791 459803 459817 459829 459841 459847
-459883 459913 459923 459929 459937 459961 460013 460039 460051 460063 460073 460079
-460081 460087 460091 460099 460111 460127 460147 460157 460171 460181 460189 460211
-460217 460231 460247 460267 460289 460297 460301 460337 460349 460373 460379 460387
-460393 460403 460409 460417 460451 460463 460477 460531 460543 460561 460571 460589
-460609 460619 460627 460633 460637 460643 460657 460673 460697 460709 460711 460721
-460771 460777 460787 460793 460813 460829 460841 460843 460871 460891 460903 460907
-460913 460919 460937 460949 460951 460969 460973 460979 460981 460987 460991 461009
-461011 461017 461051 461053 461059 461093 461101 461119 461143 461147 461171 461183
-461191 461207 461233 461239 461257 461269 461273 461297 461299 461309 461317 461323
-461327 461333 461359 461381 461393 461407 461411 461413 461437 461441 461443 461467
-461479 461507 461521 461561 461569 461581 461599 461603 461609 461627 461639 461653
-461677 461687 461689 461693 461707 461717 461801 461803 461819 461843 461861 461887
-461891 461917 461921 461933 461957 461971 461977 461983 462013 462041 462067 462073
-462079 462097 462103 462109 462113 462131 462149 462181 462191 462199 462221 462239
-462263 462271 462307 462311 462331 462337 462361 462373 462377 462401 462409 462419
-462421 462437 462443 462467 462481 462491 462493 462499 462529 462541 462547 462557
-462569 462571 462577 462589 462607 462629 462641 462643 462653 462659 462667 462673
-462677 462697 462713 462719 462727 462733 462739 462773 462827 462841 462851 462863
-462871 462881 462887 462899 462901 462911 462937 462947 462953 462983 463003 463031
-463033 463093 463103 463157 463181 463189 463207 463213 463219 463231 463237 463247
-463249 463261 463283 463291 463297 463303 463313 463319 463321 463339 463343 463363
-463387 463399 463433 463447 463451 463453 463457 463459 463483 463501 463511 463513
-463523 463531 463537 463549 463579 463613 463627 463633 463643 463649 463663 463679
-463693 463711 463717 463741 463747 463753 463763 463781 463787 463807 463823 463829
-463831 463849 463861 463867 463873 463889 463891 463907 463919 463921 463949 463963
-463973 463987 463993 464003 464011 464021 464033 464047 464069 464081 464089 464119
-464129 464131 464137 464141 464143 464171 464173 464197 464201 464213 464237 464251
-464257 464263 464279 464281 464291 464309 464311 464327 464351 464371 464381 464383
-464413 464419 464437 464447 464459 464467 464479 464483 464521 464537 464539 464549
-464557 464561 464587 464591 464603 464617 464621 464647 464663 464687 464699 464741
-464747 464749 464753 464767 464771 464773 464777 464801 464803 464809 464813 464819
-464843 464857 464879 464897 464909 464917 464923 464927 464939 464941 464951 464953
-464963 464983 464993 464999 465007 465011 465013 465019 465041 465061 465067 465071
-465077 465079 465089 465107 465119 465133 465151 465161 465163 465167 465169 465173
-465187 465209 465211 465259 465271 465277 465281 465293 465299 465317 465319 465331
-465337 465373 465379 465383 465407 465419 465433 465463 465469 465523 465529 465541
-465551 465581 465587 465611 465631 465643 465649 465659 465679 465701 465721 465739
-465743 465761 465781 465797 465799 465809 465821 465833 465841 465887 465893 465901
-465917 465929 465931 465947 465977 465989 466009 466019 466027 466033 466043 466061
-466069 466073 466079 466087 466091 466121 466139 466153 466171 466181 466183 466201
-466243 466247 466261 466267 466273 466283 466303 466321 466331 466339 466357 466369
-466373 466409 466423 466441 466451 466483 466517 466537 466547 466553 466561 466567
-466573 466579 466603 466619 466637 466649 466651 466673 466717 466723 466729 466733
-466747 466751 466777 466787 466801 466819 466853 466859 466897 466909 466913 466919
-466951 466957 466997 467003 467009 467017 467021 467063 467081 467083 467101 467119
-467123 467141 467147 467171 467183 467197 467209 467213 467237 467239 467261 467293
-467297 467317 467329 467333 467353 467371 467399 467417 467431 467437 467447 467471
-467473 467477 467479 467491 467497 467503 467507 467527 467531 467543 467549 467557
-467587 467591 467611 467617 467627 467629 467633 467641 467651 467657 467669 467671
-467681 467689 467699 467713 467729 467737 467743 467749 467773 467783 467813 467827
-467833 467867 467869 467879 467881 467893 467897 467899 467903 467927 467941 467953
-467963 467977 468001 468011 468019 468029 468049 468059 468067 468071 468079 468107
-468109 468113 468121 468133 468137 468151 468157 468173 468187 468191 468199 468239
-468241 468253 468271 468277 468289 468319 468323 468353 468359 468371 468389 468421
-468439 468451 468463 468473 468491 468493 468499 468509 468527 468551 468557 468577
-468581 468593 468599 468613 468619 468623 468641 468647 468653 468661 468667 468683
-468691 468697 468703 468709 468719 468737 468739 468761 468773 468781 468803 468817
-468821 468841 468851 468859 468869 468883 468887 468889 468893 468899 468913 468953
-468967 468973 468983 469009 469031 469037 469069 469099 469121 469127 469141 469153
-469169 469193 469207 469219 469229 469237 469241 469253 469267 469279 469283 469303
-469321 469331 469351 469363 469367 469369 469379 469397 469411 469429 469439 469457
-469487 469501 469529 469541 469543 469561 469583 469589 469613 469627 469631 469649
-469657 469673 469687 469691 469717 469723 469747 469753 469757 469769 469787 469793
-469801 469811 469823 469841 469849 469877 469879 469891 469907 469919 469939 469957
-469969 469979 469993 470021 470039 470059 470077 470081 470083 470087 470089 470131
-470149 470153 470161 470167 470179 470201 470207 470209 470213 470219 470227 470243
-470251 470263 470279 470297 470299 470303 470317 470333 470347 470359 470389 470399
-470411 470413 470417 470429 470443 470447 470453 470461 470471 470473 470489 470501
-470513 470521 470531 470539 470551 470579 470593 470597 470599 470609 470621 470627
-470647 470651 470653 470663 470669 470689 470711 470719 470731 470749 470779 470783
-470791 470819 470831 470837 470863 470867 470881 470887 470891 470903 470927 470933
-470941 470947 470957 470959 470993 470999 471007 471041 471061 471073 471089 471091
-471101 471137 471139 471161 471173 471179 471187 471193 471209 471217 471241 471253
-471259 471277 471281 471283 471299 471301 471313 471353 471389 471391 471403 471407
-471439 471451 471467 471481 471487 471503 471509 471521 471533 471539 471553 471571
-471589 471593 471607 471617 471619 471641 471649 471659 471671 471673 471677 471683
-471697 471703 471719 471721 471749 471769 471781 471791 471803 471817 471841 471847
-471853 471871 471893 471901 471907 471923 471929 471931 471943 471949 471959 471997
-472019 472027 472051 472057 472063 472067 472103 472111 472123 472127 472133 472139
-472151 472159 472163 472189 472193 472247 472249 472253 472261 472273 472289 472301
-472309 472319 472331 472333 472349 472369 472391 472393 472399 472411 472421 472457
-472469 472477 472523 472541 472543 472559 472561 472573 472597 472631 472639 472643
-472669 472687 472691 472697 472709 472711 472721 472741 472751 472763 472793 472799
-472817 472831 472837 472847 472859 472883 472907 472909 472921 472937 472939 472963
-472993 473009 473021 473027 473089 473101 473117 473141 473147 473159 473167 473173
-473191 473197 473201 473203 473219 473227 473257 473279 473287 473293 473311 473321
-473327 473351 473353 473377 473381 473383 473411 473419 473441 473443 473453 473471
-473477 473479 473497 473503 473507 473513 473519 473527 473531 473533 473549 473579
-473597 473611 473617 473633 473647 473659 473719 473723 473729 473741 473743 473761
-473789 473833 473839 473857 473861 473867 473887 473899 473911 473923 473927 473929
-473939 473951 473953 473971 473981 473987 473999 474017 474029 474037 474043 474049
-474059 474073 474077 474101 474119 474127 474137 474143 474151 474163 474169 474197
-474211 474223 474241 474263 474289 474307 474311 474319 474337 474343 474347 474359
-474379 474389 474391 474413 474433 474437 474443 474479 474491 474497 474499 474503
-474533 474541 474547 474557 474569 474571 474581 474583 474619 474629 474647 474659
-474667 474671 474707 474709 474737 474751 474757 474769 474779 474787 474809 474811
-474839 474847 474857 474899 474907 474911 474917 474923 474931 474937 474941 474949
-474959 474977 474983 475037 475051 475073 475081 475091 475093 475103 475109 475141
-475147 475151 475159 475169 475207 475219 475229 475243 475271 475273 475283 475289
-475297 475301 475327 475331 475333 475351 475367 475369 475379 475381 475403 475417
-475421 475427 475429 475441 475457 475469 475483 475511 475523 475529 475549 475583
-475597 475613 475619 475621 475637 475639 475649 475669 475679 475681 475691 475693
-475697 475721 475729 475751 475753 475759 475763 475777 475789 475793 475807 475823
-475831 475837 475841 475859 475877 475879 475889 475897 475903 475907 475921 475927
-475933 475957 475973 475991 475997 476009 476023 476027 476029 476039 476041 476059
-476081 476087 476089 476101 476107 476111 476137 476143 476167 476183 476219 476233
-476237 476243 476249 476279 476299 476317 476347 476351 476363 476369 476381 476401
-476407 476419 476423 476429 476467 476477 476479 476507 476513 476519 476579 476587
-476591 476599 476603 476611 476633 476639 476647 476659 476681 476683 476701 476713
-476719 476737 476743 476753 476759 476783 476803 476831 476849 476851 476863 476869
-476887 476891 476911 476921 476929 476977 476981 476989 477011 477013 477017 477019
-477031 477047 477073 477077 477091 477131 477149 477163 477209 477221 477229 477259
-477277 477293 477313 477317 477329 477341 477359 477361 477383 477409 477439 477461
-477469 477497 477511 477517 477523 477539 477551 477553 477557 477571 477577 477593
-477619 477623 477637 477671 477677 477721 477727 477731 477739 477767 477769 477791
-477797 477809 477811 477821 477823 477839 477847 477857 477863 477881 477899 477913
-477941 477947 477973 477977 477991 478001 478039 478063 478067 478069 478087 478099
-478111 478129 478139 478157 478169 478171 478189 478199 478207 478213 478241 478243
-478253 478259 478271 478273 478321 478339 478343 478351 478391 478399 478403 478411
-478417 478421 478427 478433 478441 478451 478453 478459 478481 478483 478493 478523
-478531 478571 478573 478579 478589 478603 478627 478631 478637 478651 478679 478697
-478711 478727 478729 478739 478741 478747 478763 478769 478787 478801 478811 478813
-478823 478831 478843 478853 478861 478871 478879 478897 478901 478913 478927 478931
-478937 478943 478963 478967 478991 478999 479023 479027 479029 479041 479081 479131
-479137 479147 479153 479189 479191 479201 479209 479221 479231 479239 479243 479263
-479267 479287 479299 479309 479317 479327 479357 479371 479377 479387 479419 479429
-479431 479441 479461 479473 479489 479497 479509 479513 479533 479543 479561 479569
-479581 479593 479599 479623 479629 479639 479701 479749 479753 479761 479771 479777
-479783 479797 479813 479821 479833 479839 479861 479879 479881 479891 479903 479909
-479939 479951 479953 479957 479971 480013 480017 480019 480023 480043 480047 480049
-480059 480061 480071 480091 480101 480107 480113 480133 480143 480157 480167 480169
-480203 480209 480287 480299 480317 480329 480341 480343 480349 480367 480373 480379
-480383 480391 480409 480419 480427 480449 480451 480461 480463 480499 480503 480509
-480517 480521 480527 480533 480541 480553 480563 480569 480583 480587 480647 480661
-480707 480713 480731 480737 480749 480761 480773 480787 480803 480827 480839 480853
-480881 480911 480919 480929 480937 480941 480959 480967 480979 480989 481001 481003
-481009 481021 481043 481051 481067 481073 481087 481093 481097 481109 481123 481133
-481141 481147 481153 481157 481171 481177 481181 481199 481207 481211 481231 481249
-481297 481301 481303 481307 481343 481363 481373 481379 481387 481409 481417 481433
-481447 481469 481489 481501 481513 481531 481549 481571 481577 481589 481619 481633
-481639 481651 481667 481673 481681 481693 481697 481699 481721 481751 481753 481769
-481787 481801 481807 481813 481837 481843 481847 481849 481861 481867 481879 481883
-481909 481939 481963 481997 482017 482021 482029 482033 482039 482051 482071 482093
-482099 482101 482117 482123 482179 482189 482203 482213 482227 482231 482233 482243
-482263 482281 482309 482323 482347 482351 482359 482371 482387 482393 482399 482401
-482407 482413 482423 482437 482441 482483 482501 482507 482509 482513 482519 482527
-482539 482569 482593 482597 482621 482627 482633 482641 482659 482663 482683 482687
-482689 482707 482711 482717 482719 482731 482743 482753 482759 482767 482773 482789
-482803 482819 482827 482837 482861 482863 482873 482897 482899 482917 482941 482947
-482957 482971 483017 483031 483061 483071 483097 483127 483139 483163 483167 483179
-483209 483211 483221 483229 483233 483239 483247 483251 483281 483289 483317 483323
-483337 483347 483367 483377 483389 483397 483407 483409 483433 483443 483467 483481
-483491 483499 483503 483523 483541 483551 483557 483563 483577 483611 483619 483629
-483643 483649 483671 483697 483709 483719 483727 483733 483751 483757 483761 483767
-483773 483787 483809 483811 483827 483829 483839 483853 483863 483869 483883 483907
-483929 483937 483953 483971 483991 484019 484027 484037 484061 484067 484079 484091
-484111 484117 484123 484129 484151 484153 484171 484181 484193 484201 484207 484229
-484243 484259 484283 484301 484303 484327 484339 484361 484369 484373 484397 484411
-484417 484439 484447 484457 484459 484487 484489 484493 484531 484543 484577 484597
-484607 484609 484613 484621 484639 484643 484691 484703 484727 484733 484751 484763
-484769 484777 484787 484829 484853 484867 484927 484951 484987 484999 485021 485029
-485041 485053 485059 485063 485081 485101 485113 485123 485131 485137 485161 485167
-485171 485201 485207 485209 485263 485311 485347 485351 485363 485371 485383 485389
-485411 485417 485423 485437 485447 485479 485497 485509 485519 485543 485567 485587
-485593 485603 485609 485647 485657 485671 485689 485701 485717 485729 485731 485753
-485777 485819 485827 485831 485833 485893 485899 485909 485923 485941 485959 485977
-485993 486023 486037 486041 486043 486053 486061 486071 486091 486103 486119 486133
-486139 486163 486179 486181 486193 486203 486221 486223 486247 486281 486293 486307
-486313 486323 486329 486331 486341 486349 486377 486379 486389 486391 486397 486407
-486433 486443 486449 486481 486491 486503 486509 486511 486527 486539 486559 486569
-486583 486589 486601 486617 486637 486641 486643 486653 486667 486671 486677 486679
-486683 486697 486713 486721 486757 486767 486769 486781 486797 486817 486821 486833
-486839 486869 486907 486923 486929 486943 486947 486949 486971 486977 486991 487007
-487013 487021 487049 487051 487057 487073 487079 487093 487099 487111 487133 487177
-487183 487187 487211 487213 487219 487247 487261 487283 487303 487307 487313 487349
-487363 487381 487387 487391 487397 487423 487427 487429 487447 487457 487463 487469
-487471 487477 487481 487489 487507 487561 487589 487601 487603 487607 487637 487649
-487651 487657 487681 487691 487703 487709 487717 487727 487733 487741 487757 487769
-487783 487789 487793 487811 487819 487829 487831 487843 487873 487889 487891 487897
-487933 487943 487973 487979 487997 488003 488009 488011 488021 488051 488057 488069
-488119 488143 488149 488153 488161 488171 488197 488203 488207 488209 488227 488231
-488233 488239 488249 488261 488263 488287 488303 488309 488311 488317 488321 488329
-488333 488339 488347 488353 488381 488399 488401 488407 488417 488419 488441 488459
-488473 488503 488513 488539 488567 488573 488603 488611 488617 488627 488633 488639
-488641 488651 488687 488689 488701 488711 488717 488723 488729 488743 488749 488759
-488779 488791 488797 488821 488827 488833 488861 488879 488893 488897 488909 488921
-488947 488959 488981 488993 489001 489011 489019 489043 489053 489061 489101 489109
-489113 489127 489133 489157 489161 489179 489191 489197 489217 489239 489241 489257
-489263 489283 489299 489329 489337 489343 489361 489367 489389 489407 489409 489427
-489431 489439 489449 489457 489479 489487 489493 489529 489539 489551 489553 489557
-489571 489613 489631 489653 489659 489673 489677 489679 489689 489691 489733 489743
-489761 489791 489793 489799 489803 489817 489823 489833 489847 489851 489869 489871
-489887 489901 489911 489913 489941 489943 489959 489961 489977 489989 490001 490003
-490019 490031 490033 490057 490097 490103 490111 490117 490121 490151 490159 490169
-490183 490201 490207 490223 490241 490247 490249 490267 490271 490277 490283 490309
-490313 490339 490367 490393 490417 490421 490453 490459 490463 490481 490493 490499
-490519 490537 490541 490543 490549 490559 490571 490573 490577 490579 490591 490619
-490627 490631 490643 490661 490663 490697 490733 490741 490769 490771 490783 490829
-490837 490849 490859 490877 490891 490913 490921 490927 490937 490949 490951 490957
-490967 490969 490991 490993 491003 491039 491041 491059 491081 491083 491129 491137
-491149 491159 491167 491171 491201 491213 491219 491251 491261 491273 491279 491297
-491299 491327 491329 491333 491339 491341 491353 491357 491371 491377 491417 491423
-491429 491461 491483 491489 491497 491501 491503 491527 491531 491537 491539 491581
-491591 491593 491611 491627 491633 491639 491651 491653 491669 491677 491707 491719
-491731 491737 491747 491773 491783 491789 491797 491819 491833 491837 491851 491857
-491867 491873 491899 491923 491951 491969 491977 491983 492007 492013 492017 492029
-492047 492053 492059 492061 492067 492077 492083 492103 492113 492227 492251 492253
-492257 492281 492293 492299 492319 492377 492389 492397 492403 492409 492413 492421
-492431 492463 492467 492487 492491 492511 492523 492551 492563 492587 492601 492617
-492619 492629 492631 492641 492647 492659 492671 492673 492707 492719 492721 492731
-492757 492761 492763 492769 492781 492799 492839 492853 492871 492883 492893 492901
-492911 492967 492979 493001 493013 493021 493027 493043 493049 493067 493093 493109
-493111 493121 493123 493127 493133 493139 493147 493159 493169 493177 493193 493201
-493211 493217 493219 493231 493243 493249 493277 493279 493291 493301 493313 493333
-493351 493369 493393 493397 493399 493403 493433 493447 493457 493463 493481 493523
-493531 493541 493567 493573 493579 493583 493607 493621 493627 493643 493657 493693
-493709 493711 493721 493729 493733 493747 493777 493793 493807 493811 493813 493817
-493853 493859 493873 493877 493897 493919 493931 493937 493939 493967 493973 493979
-493993 494023 494029 494041 494051 494069 494077 494083 494093 494101 494107 494129
-494141 494147 494167 494191 494213 494237 494251 494257 494267 494269 494281 494287
-494317 494327 494341 494353 494359 494369 494381 494383 494387 494407 494413 494441
-494443 494471 494497 494519 494521 494539 494561 494563 494567 494587 494591 494609
-494617 494621 494639 494647 494651 494671 494677 494687 494693 494699 494713 494719
-494723 494731 494737 494743 494749 494759 494761 494783 494789 494803 494843 494849
-494873 494899 494903 494917 494927 494933 494939 494959 494987 495017 495037 495041
-495043 495067 495071 495109 495113 495119 495133 495139 495149 495151 495161 495181
-495199 495211 495221 495241 495269 495277 495289 495301 495307 495323 495337 495343
-495347 495359 495361 495371 495377 495389 495401 495413 495421 495433 495437 495449
-495457 495461 495491 495511 495527 495557 495559 495563 495569 495571 495587 495589
-495611 495613 495617 495619 495629 495637 495647 495667 495679 495701 495707 495713
-495749 495751 495757 495769 495773 495787 495791 495797 495799 495821 495827 495829
-495851 495877 495893 495899 495923 495931 495947 495953 495959 495967 495973 495983
-496007 496019 496039 496051 496063 496073 496079 496123 496127 496163 496187 496193
-496211 496229 496231 496259 496283 496289 496291 496297 496303 496313 496333 496339
-496343 496381 496399 496427 496439 496453 496459 496471 496477 496481 496487 496493
-496499 496511 496549 496579 496583 496609 496631 496669 496681 496687 496703 496711
-496733 496747 496763 496789 496813 496817 496841 496849 496871 496877 496889 496891
-496897 496901 496913 496919 496949 496963 496997 496999 497011 497017 497041 497047
-497051 497069 497093 497111 497113 497117 497137 497141 497153 497171 497177 497197
-497239 497257 497261 497269 497279 497281 497291 497297 497303 497309 497323 497339
-497351 497389 497411 497417 497423 497449 497461 497473 497479 497491 497501 497507
-497509 497521 497537 497551 497557 497561 497579 497587 497597 497603 497633 497659
-497663 497671 497677 497689 497701 497711 497719 497729 497737 497741 497771 497773
-497801 497813 497831 497839 497851 497867 497869 497873 497899 497929 497957 497963
-497969 497977 497989 497993 497999 498013 498053 498061 498073 498089 498101 498103
-498119 498143 498163 498167 498181 498209 498227 498257 498259 498271 498301 498331
-498343 498361 498367 498391 498397 498401 498403 498409 498439 498461 498467 498469
-498493 498497 498521 498523 498527 498551 498557 498577 498583 498599 498611 498613
-498643 498647 498653 498679 498689 498691 498733 498739 498749 498761 498767 498779
-498781 498787 498791 498803 498833 498857 498859 498881 498907 498923 498931 498937
-498947 498961 498973 498977 498989 499021 499027 499033 499039 499063 499067 499099
-499117 499127 499129 499133 499139 499141 499151 499157 499159 499181 499183 499189
-499211 499229 499253 499267 499277 499283 499309 499321 499327 499349 499361 499363
-499391 499397 499403 499423 499439 499459 499481 499483 499493 499507 499519 499523
-499549 499559 499571 499591 499601 499607 499621 499633 499637 499649 499661 499663
-499669 499673 499679 499687 499691 499693 499711 499717 499729 499739 499747 499781
-499787 499801 499819 499853 499879 499883 499897 499903 499927 499943 499957 499969
-499973 499979 500009 500029 500041 500057 500069 500083 500107 500111 500113 500119
-500153 500167 500173 500177 500179 500197 500209 500231 500233 500237 500239 500249
-500257 500287 500299 500317 500321 500333 500341 500363 500369 500389 500393 500413
-500417 500431 500443 500459 500471 500473 500483 500501 500509 500519 500527 500567
-500579 500587 500603 500629 500671 500677 500693 500699 500713 500719 500723 500729
-500741 500777 500791 500807 500809 500831 500839 500861 500873 500881 500887 500891
-500909 500911 500921 500923 500933 500947 500953 500957 500977 501001 501013 501019
-501029 501031 501037 501043 501077 501089 501103 501121 501131 501133 501139 501157
-501173 501187 501191 501197 501203 501209 501217 501223 501229 501233 501257 501271
-501287 501299 501317 501341 501343 501367 501383 501401 501409 501419 501427 501451
-501463 501493 501503 501511 501563 501577 501593 501601 501617 501623 501637 501659
-501691 501701 501703 501707 501719 501731 501769 501779 501803 501817 501821 501827
-501829 501841 501863 501889 501911 501931 501947 501953 501967 501971 501997 502001
-502013 502039 502043 502057 502063 502079 502081 502087 502093 502121 502133 502141
-502171 502181 502217 502237 502247 502259 502261 502277 502301 502321 502339 502393
-502409 502421 502429 502441 502451 502487 502499 502501 502507 502517 502543 502549
-502553 502591 502597 502613 502631 502633 502643 502651 502669 502687 502699 502703
-502717 502729 502769 502771 502781 502787 502807 502819 502829 502841 502847 502861
-502883 502919 502921 502937 502961 502973 503003 503017 503039 503053 503077 503123
-503131 503137 503147 503159 503197 503207 503213 503227 503231 503233 503249 503267
-503287 503297 503303 503317 503339 503351 503359 503369 503381 503383 503389 503407
-503413 503423 503431 503441 503453 503483 503501 503543 503549 503551 503563 503593
-503599 503609 503611 503621 503623 503647 503653 503663 503707 503717 503743 503753
-503771 503777 503779 503791 503803 503819 503821 503827 503851 503857 503869 503879
-503911 503927 503929 503939 503947 503959 503963 503969 503983 503989 504001 504011
-504017 504047 504061 504073 504103 504121 504139 504143 504149 504151 504157 504181
-504187 504197 504209 504221 504247 504269 504289 504299 504307 504311 504323 504337
-504349 504353 504359 504377 504379 504389 504403 504457 504461 504473 504479 504521
-504523 504527 504547 504563 504593 504599 504607 504617 504619 504631 504661 504667
-504671 504677 504683 504727 504767 504787 504797 504799 504817 504821 504851 504853
-504857 504871 504877 504893 504901 504929 504937 504943 504947 504953 504967 504983
-504989 504991 505027 505031 505033 505049 505051 505061 505067 505073 505091 505097
-505111 505117 505123 505129 505139 505157 505159 505181 505187 505201 505213 505231
-505237 505277 505279 505283 505301 505313 505319 505321 505327 505339 505357 505367
-505369 505399 505409 505411 505429 505447 505459 505469 505481 505493 505501 505511
-505513 505523 505537 505559 505573 505601 505607 505613 505619 505633 505639 505643
-505657 505663 505669 505691 505693 505709 505711 505727 505759 505763 505777 505781
-505811 505819 505823 505867 505871 505877 505907 505919 505927 505949 505961 505969
-505979 506047 506071 506083 506101 506113 506119 506131 506147 506171 506173 506183
-506201 506213 506251 506263 506269 506281 506291 506327 506329 506333 506339 506347
-506351 506357 506381 506393 506417 506423 506449 506459 506461 506479 506491 506501
-506507 506531 506533 506537 506551 506563 506573 506591 506593 506599 506609 506629
-506647 506663 506683 506687 506689 506699 506729 506731 506743 506773 506783 506791
-506797 506809 506837 506843 506861 506873 506887 506893 506899 506903 506911 506929
-506941 506963 506983 506993 506999 507029 507049 507071 507077 507079 507103 507109
-507113 507119 507137 507139 507149 507151 507163 507193 507197 507217 507289 507301
-507313 507317 507329 507347 507349 507359 507361 507371 507383 507401 507421 507431
-507461 507491 507497 507499 507503 507523 507557 507571 507589 507593 507599 507607
-507631 507641 507667 507673 507691 507697 507713 507719 507743 507757 507779 507781
-507797 507803 507809 507821 507827 507839 507883 507901 507907 507917 507919 507937
-507953 507961 507971 507979 508009 508019 508021 508033 508037 508073 508087 508091
-508097 508103 508129 508159 508171 508187 508213 508223 508229 508237 508243 508259
-508271 508273 508297 508301 508327 508331 508349 508363 508367 508373 508393 508433
-508439 508451 508471 508477 508489 508499 508513 508517 508531 508549 508559 508567
-508577 508579 508583 508619 508621 508637 508643 508661 508693 508709 508727 508771
-508789 508799 508811 508817 508841 508847 508867 508901 508903 508909 508913 508919
-508931 508943 508951 508957 508961 508969 508973 508987 509023 509027 509053 509063
-509071 509087 509101 509123 509137 509147 509149 509203 509221 509227 509239 509263
-509281 509287 509293 509297 509317 509329 509359 509363 509389 509393 509413 509417
-509429 509441 509449 509477 509513 509521 509543 509549 509557 509563 509569 509573
-509581 509591 509603 509623 509633 509647 509653 509659 509681 509687 509689 509693
-509699 509723 509731 509737 509741 509767 509783 509797 509801 509833 509837 509843
-509863 509867 509879 509909 509911 509921 509939 509947 509959 509963 509989 510007
-510031 510047 510049 510061 510067 510073 510077 510079 510089 510101 510121 510127
-510137 510157 510179 510199 510203 510217 510227 510233 510241 510247 510253 510271
-510287 510299 510311 510319 510331 510361 510379 510383 510401 510403 510449 510451
-510457 510463 510481 510529 510551 510553 510569 510581 510583 510589 510611 510613
-510617 510619 510677 510683 510691 510707 510709 510751 510767 510773 510793 510803
-510817 510823 510827 510847 510889 510907 510919 510931 510941 510943 510989 511001
-511013 511019 511033 511039 511057 511061 511087 511109 511111 511123 511151 511153
-511163 511169 511171 511177 511193 511201 511211 511213 511223 511237 511243 511261
-511279 511289 511297 511327 511333 511337 511351 511361 511387 511391 511409 511417
-511439 511447 511453 511457 511463 511477 511487 511507 511519 511523 511541 511549
-511559 511573 511579 511583 511591 511603 511627 511631 511633 511669 511691 511703
-511711 511723 511757 511787 511793 511801 511811 511831 511843 511859 511867 511873
-511891 511897 511909 511933 511939 511961 511963 511991 511997 512009 512011 512021
-512047 512059 512093 512101 512137 512147 512167 512207 512249 512251 512269 512287
-512311 512321 512333 512353 512389 512419 512429 512443 512467 512497 512503 512507
-512521 512531 512537 512543 512569 512573 512579 512581 512591 512593 512597 512609
-512621 512641 512657 512663 512671 512683 512711 512713 512717 512741 512747 512761
-512767 512779 512797 512803 512819 512821 512843 512849 512891 512899 512903 512917
-512921 512927 512929 512959 512977 512989 512999 513001 513013 513017 513031 513041
-513047 513053 513059 513067 513083 513101 513103 513109 513131 513137 513157 513167
-513169 513173 513203 513239 513257 513269 513277 513283 513307 513311 513313 513319
-513341 513347 513353 513367 513371 513397 513407 513419 513427 513431 513439 513473
-513479 513481 513509 513511 513529 513533 513593 513631 513641 513649 513673 513679
-513683 513691 513697 513719 513727 513731 513739 513749 513761 513767 513769 513781
-513829 513839 513841 513871 513881 513899 513917 513923 513937 513943 513977 513991
-514001 514009 514013 514021 514049 514051 514057 514061 514079 514081 514093 514103
-514117 514123 514127 514147 514177 514187 514201 514219 514229 514243 514247 514249
-514271 514277 514289 514309 514313 514333 514343 514357 514361 514379 514399 514417
-514429 514433 514453 514499 514513 514519 514523 514529 514531 514543 514561 514571
-514621 514637 514639 514643 514649 514651 514669 514681 514711 514733 514739 514741
-514747 514751 514757 514769 514783 514793 514819 514823 514831 514841 514847 514853
-514859 514867 514873 514889 514903 514933 514939 514949 514967 515041 515087 515089
-515111 515143 515149 515153 515173 515191 515227 515231 515233 515237 515279 515293
-515311 515323 515351 515357 515369 515371 515377 515381 515401 515429 515477 515507
-515519 515539 515563 515579 515587 515597 515611 515621 515639 515651 515653 515663
-515677 515681 515687 515693 515701 515737 515741 515761 515771 515773 515777 515783
-515803 515813 515839 515843 515857 515861 515873 515887 515917 515923 515929 515941
-515951 515969 515993 516017 516023 516049 516053 516077 516091 516127 516151 516157
-516161 516163 516169 516179 516193 516199 516209 516223 516227 516233 516247 516251
-516253 516277 516283 516293 516319 516323 516349 516359 516361 516371 516377 516391
-516407 516421 516431 516433 516437 516449 516457 516469 516493 516499 516517 516521
-516539 516541 516563 516587 516589 516599 516611 516617 516619 516623 516643 516653
-516673 516679 516689 516701 516709 516713 516721 516727 516757 516793 516811 516821
-516829 516839 516847 516871 516877 516883 516907 516911 516931 516947 516949 516959
-516973 516977 516979 516991 517003 517043 517061 517067 517073 517079 517081 517087
-517091 517129 517151 517169 517177 517183 517189 517207 517211 517217 517229 517241
-517243 517249 517261 517267 517277 517289 517303 517337 517343 517367 517373 517381
-517393 517399 517403 517411 517417 517457 517459 517469 517471 517481 517487 517499
-517501 517507 517511 517513 517547 517549 517553 517571 517577 517589 517597 517603
-517609 517613 517619 517637 517639 517711 517717 517721 517729 517733 517739 517747
-517817 517823 517831 517861 517873 517877 517901 517919 517927 517931 517949 517967
-517981 517991 517999 518017 518047 518057 518059 518083 518099 518101 518113 518123
-518129 518131 518137 518153 518159 518171 518179 518191 518207 518209 518233 518237
-518239 518249 518261 518291 518299 518311 518327 518341 518387 518389 518411 518417
-518429 518431 518447 518467 518471 518473 518509 518521 518533 518543 518579 518587
-518597 518611 518621 518657 518689 518699 518717 518729 518737 518741 518743 518747
-518759 518761 518767 518779 518801 518803 518807 518809 518813 518831 518863 518867
-518893 518911 518933 518953 518981 518983 518989 519011 519031 519037 519067 519083
-519089 519091 519097 519107 519119 519121 519131 519151 519161 519193 519217 519227
-519229 519247 519257 519269 519283 519287 519301 519307 519349 519353 519359 519371
-519373 519383 519391 519413 519427 519433 519457 519487 519499 519509 519521 519523
-519527 519539 519551 519553 519577 519581 519587 519611 519619 519643 519647 519667
-519683 519691 519703 519713 519733 519737 519769 519787 519793 519797 519803 519817
-519863 519881 519889 519907 519917 519919 519923 519931 519943 519947 519971 519989
-519997 520019 520021 520031 520043 520063 520067 520073 520103 520111 520123 520129
-520151 520193 520213 520241 520279 520291 520297 520307 520309 520313 520339 520349
-520357 520361 520363 520369 520379 520381 520393 520409 520411 520423 520427 520433
-520447 520451 520529 520547 520549 520567 520571 520589 520607 520609 520621 520631
-520633 520649 520679 520691 520699 520703 520717 520721 520747 520759 520763 520787
-520813 520837 520841 520853 520867 520889 520913 520921 520943 520957 520963 520967
-520969 520981 521009 521021 521023 521039 521041 521047 521051 521063 521107 521119
-521137 521153 521161 521167 521173 521177 521179 521201 521231 521243 521251 521267
-521281 521299 521309 521317 521329 521357 521359 521363 521369 521377 521393 521399
-521401 521429 521447 521471 521483 521491 521497 521503 521519 521527 521533 521537
-521539 521551 521557 521567 521581 521603 521641 521657 521659 521669 521671 521693
-521707 521723 521743 521749 521753 521767 521777 521789 521791 521809 521813 521819
-521831 521861 521869 521879 521881 521887 521897 521903 521923 521929 521981 521993
-521999 522017 522037 522047 522059 522061 522073 522079 522083 522113 522127 522157
-522161 522167 522191 522199 522211 522227 522229 522233 522239 522251 522259 522281
-522283 522289 522317 522323 522337 522371 522373 522383 522391 522409 522413 522439
-522449 522469 522479 522497 522517 522521 522523 522541 522553 522569 522601 522623
-522637 522659 522661 522673 522677 522679 522689 522703 522707 522719 522737 522749
-522757 522761 522763 522787 522811 522827 522829 522839 522853 522857 522871 522881
-522883 522887 522919 522943 522947 522959 522961 522989 523007 523021 523031 523049
-523093 523097 523109 523129 523169 523177 523207 523213 523219 523261 523297 523307
-523333 523349 523351 523357 523387 523403 523417 523427 523433 523459 523463 523487
-523489 523493 523511 523519 523541 523543 523553 523571 523573 523577 523597 523603
-523631 523637 523639 523657 523667 523669 523673 523681 523717 523729 523741 523759
-523763 523771 523777 523793 523801 523829 523847 523867 523877 523903 523907 523927
-523937 523949 523969 523987 523997 524047 524053 524057 524063 524071 524081 524087
-524099 524113 524119 524123 524149 524171 524189 524197 524201 524203 524219 524221
-524231 524243 524257 524261 524269 524287 524309 524341 524347 524351 524353 524369
-524387 524389 524411 524413 524429 524453 524497 524507 524509 524519 524521 524591
-524593 524599 524633 524669 524681 524683 524701 524707 524731 524743 524789 524801
-524803 524827 524831 524857 524863 524869 524873 524893 524899 524921 524933 524939
-524941 524947 524957 524959 524963 524969 524971 524981 524983 524999 525001 525013
-525017 525029 525043 525101 525127 525137 525143 525157 525163 525167 525191 525193
-525199 525209 525221 525241 525247 525253 525257 525299 525313 525353 525359 525361
-525373 525377 525379 525391 525397 525409 525431 525433 525439 525457 525461 525467
-525491 525493 525517 525529 525533 525541 525571 525583 525593 525599 525607 525641
-525649 525671 525677 525697 525709 525713 525719 525727 525731 525739 525769 525773
-525781 525809 525817 525839 525869 525871 525887 525893 525913 525923 525937 525947
-525949 525953 525961 525979 525983 526027 526037 526049 526051 526063 526067 526069
-526073 526087 526117 526121 526139 526157 526159 526189 526193 526199 526213 526223
-526231 526249 526271 526283 526289 526291 526297 526307 526367 526373 526381 526387
-526391 526397 526423 526429 526441 526453 526459 526483 526499 526501 526511 526531
-526543 526571 526573 526583 526601 526619 526627 526633 526637 526649 526651 526657
-526667 526679 526681 526703 526709 526717 526733 526739 526741 526759 526763 526777
-526781 526829 526831 526837 526853 526859 526871 526909 526913 526931 526937 526943
-526951 526957 526963 526993 526997 527053 527057 527063 527069 527071 527081 527099
-527123 527129 527143 527159 527161 527173 527179 527203 527207 527209 527237 527251
-527273 527281 527291 527327 527333 527347 527353 527377 527381 527393 527399 527407
-527411 527419 527441 527447 527453 527489 527507 527533 527557 527563 527581 527591
-527599 527603 527623 527627 527633 527671 527699 527701 527729 527741 527749 527753
-527789 527803 527809 527819 527843 527851 527869 527881 527897 527909 527921 527929
-527941 527981 527983 527987 527993 528001 528013 528041 528043 528053 528091 528097
-528107 528127 528131 528137 528163 528167 528191 528197 528217 528223 528247 528263
-528289 528299 528313 528317 528329 528373 528383 528391 528401 528403 528413 528419
-528433 528469 528487 528491 528509 528511 528527 528559 528611 528623 528629 528631
-528659 528667 528673 528679 528691 528707 528709 528719 528763 528779 528791 528799
-528811 528821 528823 528833 528863 528877 528881 528883 528911 528929 528947 528967
-528971 528973 528991 529003 529007 529027 529033 529037 529043 529049 529051 529097
-529103 529117 529121 529127 529129 529153 529157 529181 529183 529213 529229 529237
-529241 529259 529271 529273 529301 529307 529313 529327 529343 529349 529357 529381
-529393 529411 529421 529423 529471 529489 529513 529517 529519 529531 529547 529577
-529579 529603 529619 529637 529649 529657 529673 529681 529687 529691 529693 529709
-529723 529741 529747 529751 529807 529811 529813 529819 529829 529847 529871 529927
-529933 529939 529957 529961 529973 529979 529981 529987 529999 530017 530021 530027
-530041 530051 530063 530087 530093 530129 530137 530143 530177 530183 530197 530203
-530209 530227 530237 530249 530251 530261 530267 530279 530293 530297 530303 530329
-530333 530339 530353 530359 530389 530393 530401 530429 530443 530447 530501 530507
-530513 530527 530531 530533 530539 530549 530567 530597 530599 530603 530609 530641
-530653 530659 530669 530693 530701 530711 530713 530731 530741 530743 530753 530767
-530773 530797 530807 530833 530837 530843 530851 530857 530861 530869 530897 530911
-530947 530969 530977 530983 530989 531017 531023 531043 531071 531079 531101 531103
-531121 531133 531143 531163 531169 531173 531197 531203 531229 531239 531253 531263
-531281 531287 531299 531331 531337 531343 531347 531353 531359 531383 531457 531481
-531497 531521 531547 531551 531569 531571 531581 531589 531611 531613 531623 531631
-531637 531667 531673 531689 531701 531731 531793 531799 531821 531823 531827 531833
-531841 531847 531857 531863 531871 531877 531901 531911 531919 531977 531983 531989
-531997 532001 532009 532027 532033 532061 532069 532093 532099 532141 532153 532159
-532163 532183 532187 532193 532199 532241 532249 532261 532267 532277 532283 532307
-532313 532327 532331 532333 532349 532373 532379 532391 532403 532417 532421 532439
-532447 532451 532453 532489 532501 532523 532529 532531 532537 532547 532561 532601
-532603 532607 532619 532621 532633 532639 532663 532669 532687 532691 532709 532733
-532739 532751 532757 532771 532781 532783 532789 532801 532811 532823 532849 532853
-532867 532907 532919 532949 532951 532981 532993 532999 533003 533009 533011 533033
-533051 533053 533063 533077 533089 533111 533129 533149 533167 533177 533189 533191
-533213 533219 533227 533237 533249 533257 533261 533263 533297 533303 533317 533321
-533327 533353 533363 533371 533389 533399 533413 533447 533453 533459 533509 533543
-533549 533573 533581 533593 533633 533641 533671 533693 533711 533713 533719 533723
-533737 533747 533777 533801 533809 533821 533831 533837 533857 533879 533887 533893
-533909 533921 533927 533959 533963 533969 533971 533989 533993 533999 534007 534013
-534019 534029 534043 534047 534049 534059 534073 534077 534091 534101 534113 534137
-534167 534173 534199 534203 534211 534229 534241 534253 534283 534301 534307 534311
-534323 534329 534341 534367 534371 534403 534407 534431 534439 534473 534491 534511
-534529 534553 534571 534577 534581 534601 534607 534617 534629 534631 534637 534647
-534649 534659 534661 534671 534697 534707 534739 534799 534811 534827 534839 534841
-534851 534857 534883 534889 534913 534923 534931 534943 534949 534971 535013 535019
-535033 535037 535061 535099 535103 535123 535133 535151 535159 535169 535181 535193
-535207 535219 535229 535237 535243 535273 535303 535319 535333 535349 535351 535361
-535387 535391 535399 535481 535487 535489 535499 535511 535523 535529 535547 535571
-535573 535589 535607 535609 535627 535637 535663 535669 535673 535679 535697 535709
-535727 535741 535751 535757 535771 535783 535793 535811 535849 535859 535861 535879
-535919 535937 535939 535943 535957 535967 535973 535991 535999 536017 536023 536051
-536057 536059 536069 536087 536099 536101 536111 536141 536147 536149 536189 536191
-536203 536213 536219 536227 536233 536243 536267 536273 536279 536281 536287 536293
-536311 536323 536353 536357 536377 536399 536407 536423 536441 536443 536447 536449
-536453 536461 536467 536479 536491 536509 536513 536531 536533 536561 536563 536593
-536609 536621 536633 536651 536671 536677 536687 536699 536717 536719 536729 536743
-536749 536771 536773 536777 536779 536791 536801 536803 536839 536849 536857 536867
-536869 536891 536909 536917 536923 536929 536933 536947 536953 536971 536989 536999
-537001 537007 537011 537023 537029 537037 537041 537067 537071 537079 537091 537127
-537133 537143 537157 537169 537181 537191 537197 537221 537233 537241 537269 537281
-537287 537307 537331 537343 537347 537373 537379 537401 537403 537413 537497 537527
-537547 537569 537583 537587 537599 537611 537637 537661 537673 537679 537703 537709
-537739 537743 537749 537769 537773 537781 537787 537793 537811 537841 537847 537853
-537877 537883 537899 537913 537919 537941 537991 538001 538019 538049 538051 538073
-538079 538093 538117 538121 538123 538127 538147 538151 538157 538159 538163 538199
-538201 538247 538249 538259 538267 538283 538297 538301 538303 538309 538331 538333
-538357 538367 538397 538399 538411 538423 538457 538471 538481 538487 538511 538513
-538519 538523 538529 538553 538561 538567 538579 538589 538597 538621 538649 538651
-538697 538709 538711 538721 538723 538739 538751 538763 538771 538777 538789 538799
-538801 538817 538823 538829 538841 538871 538877 538921 538927 538931 538939 538943
-538987 539003 539009 539039 539047 539089 539093 539101 539107 539111 539113 539129
-539141 539153 539159 539167 539171 539207 539219 539233 539237 539261 539267 539269
-539293 539303 539309 539311 539321 539323 539339 539347 539351 539389 539401 539447
-539449 539479 539501 539503 539507 539509 539533 539573 539621 539629 539633 539639
-539641 539653 539663 539677 539687 539711 539713 539723 539729 539743 539761 539783
-539797 539837 539839 539843 539849 539863 539881 539897 539899 539921 539947 539993
-540041 540061 540079 540101 540119 540121 540139 540149 540157 540167 540173 540179
-540181 540187 540203 540217 540233 540251 540269 540271 540283 540301 540307 540343
-540347 540349 540367 540373 540377 540383 540389 540391 540433 540437 540461 540469
-540509 540511 540517 540539 540541 540557 540559 540577 540587 540599 540611 540613
-540619 540629 540677 540679 540689 540691 540697 540703 540713 540751 540769 540773
-540779 540781 540803 540809 540823 540851 540863 540871 540877 540901 540907 540961
-540989 541001 541007 541027 541049 541061 541087 541097 541129 541133 541141 541153
-541181 541193 541201 541217 541231 541237 541249 541267 541271 541283 541301 541309
-541339 541349 541361 541363 541369 541381 541391 541417 541439 541447 541469 541483
-541507 541511 541523 541529 541531 541537 541543 541547 541549 541571 541577 541579
-541589 541613 541631 541657 541661 541669 541693 541699 541711 541721 541727 541759
-541763 541771 541777 541781 541799 541817 541831 541837 541859 541889 541901 541927
-541951 541967 541987 541991 541993 541999 542021 542023 542027 542053 542063 542071
-542081 542083 542093 542111 542117 542119 542123 542131 542141 542149 542153 542167
-542183 542189 542197 542207 542219 542237 542251 542261 542263 542281 542293 542299
-542323 542371 542401 542441 542447 542461 542467 542483 542489 542497 542519 542533
-542537 542539 542551 542557 542567 542579 542587 542599 542603 542683 542687 542693
-542713 542719 542723 542747 542761 542771 542783 542791 542797 542821 542831 542837
-542873 542891 542911 542921 542923 542933 542939 542947 542951 542981 542987 542999
-543017 543019 543029 543061 543097 543113 543131 543139 543143 543149 543157 543161
-543163 543187 543203 543217 543223 543227 543233 543241 543253 543259 543281 543287
-543289 543299 543307 543311 543313 543341 543349 543353 543359 543379 543383 543407
-543427 543463 543497 543503 543509 543539 543551 543553 543593 543601 543607 543611
-543617 543637 543659 543661 543671 543679 543689 543703 543707 543713 543769 543773
-543787 543791 543793 543797 543811 543827 543841 543853 543857 543859 543871 543877
-543883 543887 543889 543901 543911 543929 543967 543971 543997 544001 544007 544009
-544013 544021 544031 544097 544099 544109 544123 544129 544133 544139 544171 544177
-544183 544199 544223 544259 544273 544277 544279 544367 544373 544399 544403 544429
-544451 544471 544477 544487 544501 544513 544517 544543 544549 544601 544613 544627
-544631 544651 544667 544699 544717 544721 544723 544727 544757 544759 544771 544781
-544793 544807 544813 544837 544861 544877 544879 544883 544889 544897 544903 544919
-544927 544937 544961 544963 544979 545023 545029 545033 545057 545063 545087 545089
-545093 545117 545131 545141 545143 545161 545189 545203 545213 545231 545239 545257
-545267 545291 545329 545371 545387 545429 545437 545443 545449 545473 545477 545483
-545497 545521 545527 545533 545543 545549 545551 545579 545599 545609 545617 545621
-545641 545647 545651 545663 545711 545723 545731 545747 545749 545759 545773 545789
-545791 545827 545843 545863 545873 545893 545899 545911 545917 545929 545933 545939
-545947 545959 546001 546017 546019 546031 546047 546053 546067 546071 546097 546101
-546103 546109 546137 546149 546151 546173 546179 546197 546211 546233 546239 546241
-546253 546263 546283 546289 546317 546323 546341 546349 546353 546361 546367 546373
-546391 546461 546467 546479 546509 546523 546547 546569 546583 546587 546599 546613
-546617 546619 546631 546643 546661 546671 546677 546683 546691 546709 546719 546731
-546739 546781 546841 546859 546863 546869 546881 546893 546919 546937 546943 546947
-546961 546967 546977 547007 547021 547037 547061 547087 547093 547097 547103 547121
-547133 547139 547171 547223 547229 547237 547241 547249 547271 547273 547291 547301
-547321 547357 547361 547363 547369 547373 547387 547397 547399 547411 547441 547453
-547471 547483 547487 547493 547499 547501 547513 547529 547537 547559 547567 547577
-547583 547601 547609 547619 547627 547639 547643 547661 547663 547681 547709 547727
-547741 547747 547753 547763 547769 547787 547817 547819 547823 547831 547849 547853
-547871 547889 547901 547909 547951 547957 547999 548003 548039 548059 548069 548083
-548089 548099 548117 548123 548143 548153 548189 548201 548213 548221 548227 548239
-548243 548263 548291 548309 548323 548347 548351 548363 548371 548393 548399 548407
-548417 548423 548441 548453 548459 548461 548489 548501 548503 548519 548521 548533
-548543 548557 548567 548579 548591 548623 548629 548657 548671 548677 548687 548693
-548707 548719 548749 548753 548761 548771 548783 548791 548827 548831 548833 548837
-548843 548851 548861 548869 548893 548897 548903 548909 548927 548953 548957 548963
-549001 549011 549013 549019 549023 549037 549071 549089 549091 549097 549121 549139
-549149 549161 549163 549167 549169 549193 549203 549221 549229 549247 549257 549259
-549281 549313 549319 549323 549331 549379 549391 549403 549421 549431 549443 549449
-549481 549503 549509 549511 549517 549533 549547 549551 549553 549569 549587 549589
-549607 549623 549641 549643 549649 549667 549683 549691 549701 549707 549713 549719
-549733 549737 549739 549749 549751 549767 549817 549833 549839 549863 549877 549883
-549911 549937 549943 549949 549977 549979 550007 550009 550027 550049 550061 550063
-550073 550111 550117 550127 550129 550139 550163 550169 550177 550181 550189 550211
-550213 550241 550267 550279 550283 550289 550309 550337 550351 550369 550379 550427
-550439 550441 550447 550457 550469 550471 550489 550513 550519 550531 550541 550553
-550577 550607 550609 550621 550631 550637 550651 550657 550661 550663 550679 550691
-550703 550717 550721 550733 550757 550763 550789 550801 550811 550813 550831 550841
-550843 550859 550861 550903 550909 550937 550939 550951 550961 550969 550973 550993
-550997 551003 551017 551027 551039 551059 551063 551069 551093 551099 551107 551113
-551129 551143 551179 551197 551207 551219 551231 551233 551269 551281 551297 551311
-551321 551339 551347 551363 551381 551387 551407 551423 551443 551461 551483 551489
-551503 551519 551539 551543 551549 551557 551569 551581 551587 551597 551651 551653
-551659 551671 551689 551693 551713 551717 551723 551729 551731 551743 551753 551767
-551773 551801 551809 551813 551843 551849 551861 551909 551911 551917 551927 551933
-551951 551959 551963 551981 552001 552011 552029 552031 552047 552053 552059 552089
-552091 552103 552107 552113 552127 552137 552179 552193 552217 552239 552241 552259
-552263 552271 552283 552301 552317 552341 552353 552379 552397 552401 552403 552469
-552473 552481 552491 552493 552511 552523 552527 552553 552581 552583 552589 552611
-552649 552659 552677 552703 552707 552709 552731 552749 552751 552757 552787 552791
-552793 552809 552821 552833 552841 552847 552859 552883 552887 552899 552913 552917
-552971 552983 552991 553013 553037 553043 553051 553057 553067 553073 553093 553097
-553099 553103 553123 553139 553141 553153 553171 553181 553193 553207 553211 553229
-553249 553253 553277 553279 553309 553351 553363 553369 553411 553417 553433 553439
-553447 553457 553463 553471 553481 553507 553513 553517 553529 553543 553549 553561
-553573 553583 553589 553591 553601 553607 553627 553643 553649 553667 553681 553687
-553699 553703 553727 553733 553747 553757 553759 553769 553789 553811 553837 553849
-553867 553873 553897 553901 553919 553921 553933 553961 553963 553981 553991 554003
-554011 554017 554051 554077 554087 554089 554117 554123 554129 554137 554167 554171
-554179 554189 554207 554209 554233 554237 554263 554269 554293 554299 554303 554317
-554347 554377 554383 554417 554419 554431 554447 554453 554467 554503 554527 554531
-554569 554573 554597 554611 554627 554633 554639 554641 554663 554669 554677 554699
-554707 554711 554731 554747 554753 554759 554767 554779 554789 554791 554797 554803
-554821 554833 554837 554839 554843 554849 554887 554891 554893 554899 554923 554927
-554951 554959 554969 554977 555029 555041 555043 555053 555073 555077 555083 555091
-555097 555109 555119 555143 555167 555209 555221 555251 555253 555257 555277 555287
-555293 555301 555307 555337 555349 555361 555383 555391 555419 555421 555439 555461
-555487 555491 555521 555523 555557 555589 555593 555637 555661 555671 555677 555683
-555691 555697 555707 555739 555743 555761 555767 555823 555827 555829 555853 555857
-555871 555931 555941 555953 555967 556007 556021 556027 556037 556043 556051 556067
-556069 556093 556103 556123 556159 556177 556181 556211 556219 556229 556243 556253
-556261 556267 556271 556273 556279 556289 556313 556321 556327 556331 556343 556351
-556373 556399 556403 556441 556459 556477 556483 556487 556513 556519 556537 556559
-556573 556579 556583 556601 556607 556609 556613 556627 556639 556651 556679 556687
-556691 556693 556697 556709 556723 556727 556741 556753 556763 556769 556781 556789
-556793 556799 556811 556817 556819 556823 556841 556849 556859 556861 556867 556883
-556891 556931 556939 556943 556957 556967 556981 556987 556999 557017 557021 557027
-557033 557041 557057 557059 557069 557087 557093 557153 557159 557197 557201 557261
-557269 557273 557281 557303 557309 557321 557329 557339 557369 557371 557377 557423
-557443 557449 557461 557483 557489 557519 557521 557533 557537 557551 557567 557573
-557591 557611 557633 557639 557663 557671 557693 557717 557729 557731 557741 557743
-557747 557759 557761 557779 557789 557801 557803 557831 557857 557861 557863 557891
-557899 557903 557927 557981 557987 558007 558017 558029 558053 558067 558083 558091
-558109 558113 558121 558139 558149 558167 558179 558197 558203 558209 558223 558241
-558251 558253 558287 558289 558307 558319 558343 558401 558413 558421 558427 558431
-558457 558469 558473 558479 558491 558497 558499 558521 558529 558533 558539 558541
-558563 558583 558587 558599 558611 558629 558643 558661 558683 558703 558721 558731
-558757 558769 558781 558787 558791 558793 558827 558829 558863 558869 558881 558893
-558913 558931 558937 558947 558973 558979 558997 559001 559049 559051 559067 559081
-559093 559099 559123 559133 559157 559177 559183 559201 559211 559213 559217 559219
-559231 559243 559259 559277 559297 559313 559319 559343 559357 559367 559369 559397
-559421 559451 559459 559469 559483 559511 559513 559523 559529 559541 559547 559549
-559561 559571 559577 559583 559591 559597 559631 559633 559639 559649 559667 559673
-559679 559687 559703 559709 559739 559747 559777 559781 559799 559807 559813 559831
-559841 559849 559859 559877 559883 559901 559907 559913 559939 559967 559973 559991
-560017 560023 560029 560039 560047 560081 560083 560089 560093 560107 560113 560117
-560123 560137 560149 560159 560171 560173 560179 560191 560207 560213 560221 560227
-560233 560237 560239 560243 560249 560281 560293 560297 560299 560311 560317 560341
-560353 560393 560411 560437 560447 560459 560471 560477 560479 560489 560491 560501
-560503 560531 560543 560551 560561 560597 560617 560621 560639 560641 560653 560669
-560683 560689 560701 560719 560737 560753 560761 560767 560771 560783 560797 560803
-560827 560837 560863 560869 560873 560887 560891 560893 560897 560929 560939 560941
-560969 560977 561019 561047 561053 561059 561061 561079 561083 561091 561097 561101
-561103 561109 561161 561173 561181 561191 561199 561229 561251 561277 561307 561313
-561343 561347 561359 561367 561373 561377 561389 561409 561419 561439 561461 561521
-561529 561551 561553 561559 561599 561607 561667 561703 561713 561733 561761 561767
-561787 561797 561809 561829 561839 561907 561917 561923 561931 561943 561947 561961
-561973 561983 561997 562007 562019 562021 562043 562091 562103 562129 562147 562169
-562181 562193 562201 562231 562259 562271 562273 562283 562291 562297 562301 562307
-562313 562333 562337 562349 562351 562357 562361 562399 562403 562409 562417 562421
-562427 562439 562459 562477 562493 562501 562517 562519 562537 562577 562579 562589
-562591 562607 562613 562621 562631 562633 562651 562663 562669 562673 562691 562693
-562699 562703 562711 562721 562739 562753 562759 562763 562781 562789 562813 562831
-562841 562871 562897 562901 562909 562931 562943 562949 562963 562967 562973 562979
-562987 562997 563009 563011 563021 563039 563041 563047 563051 563077 563081 563099
-563113 563117 563119 563131 563149 563153 563183 563197 563219 563249 563263 563287
-563327 563351 563357 563359 563377 563401 563411 563413 563417 563419 563447 563449
-563467 563489 563501 563503 563543 563551 563561 563587 563593 563599 563623 563657
-563663 563723 563743 563747 563777 563809 563813 563821 563831 563837 563851 563869
-563881 563887 563897 563929 563933 563947 563971 563987 563999 564013 564017 564041
-564049 564059 564061 564089 564097 564103 564127 564133 564149 564163 564173 564191
-564197 564227 564229 564233 564251 564257 564269 564271 564299 564301 564307 564313
-564323 564353 564359 564367 564371 564373 564391 564401 564407 564409 564419 564437
-564449 564457 564463 564467 564491 564497 564523 564533 564593 564607 564617 564643
-564653 564667 564671 564679 564701 564703 564709 564713 564761 564779 564793 564797
-564827 564871 564881 564899 564917 564919 564923 564937 564959 564973 564979 564983
-564989 564997 565013 565039 565049 565057 565069 565109 565111 565127 565163 565171
-565177 565183 565189 565207 565237 565241 565247 565259 565261 565273 565283 565289
-565303 565319 565333 565337 565343 565361 565379 565381 565387 565391 565393 565427
-565429 565441 565451 565463 565469 565483 565489 565507 565511 565517 565519 565549
-565553 565559 565567 565571 565583 565589 565597 565603 565613 565637 565651 565661
-565667 565723 565727 565769 565771 565787 565793 565813 565849 565867 565889 565891
-565907 565909 565919 565921 565937 565973 565979 565997 566011 566023 566047 566057
-566077 566089 566101 566107 566131 566149 566161 566173 566179 566183 566201 566213
-566227 566231 566233 566273 566311 566323 566347 566387 566393 566413 566417 566429
-566431 566437 566441 566443 566453 566521 566537 566539 566543 566549 566551 566557
-566563 566567 566617 566633 566639 566653 566659 566677 566681 566693 566701 566707
-566717 566719 566723 566737 566759 566767 566791 566821 566833 566851 566857 566879
-566911 566939 566947 566963 566971 566977 566987 566999 567011 567013 567031 567053
-567059 567067 567097 567101 567107 567121 567143 567179 567181 567187 567209 567257
-567263 567277 567319 567323 567367 567377 567383 567389 567401 567407 567439 567449
-567451 567467 567487 567493 567499 567527 567529 567533 567569 567601 567607 567631
-567649 567653 567659 567661 567667 567673 567689 567719 567737 567751 567761 567767
-567779 567793 567811 567829 567841 567857 567863 567871 567877 567881 567883 567899
-567937 567943 567947 567949 567961 567979 567991 567997 568019 568027 568033 568049
-568069 568091 568097 568109 568133 568151 568153 568163 568171 568177 568187 568189
-568193 568201 568207 568231 568237 568241 568273 568279 568289 568303 568349 568363
-568367 568387 568391 568433 568439 568441 568453 568471 568481 568493 568523 568541
-568549 568577 568609 568619 568627 568643 568657 568669 568679 568691 568699 568709
-568723 568751 568783 568787 568807 568823 568831 568853 568877 568891 568903 568907
-568913 568921 568963 568979 568987 568991 568999 569003 569011 569021 569047 569053
-569057 569071 569077 569081 569083 569111 569117 569137 569141 569159 569161 569189
-569197 569201 569209 569213 569237 569243 569249 569251 569263 569267 569269 569321
-569323 569369 569417 569419 569423 569431 569447 569461 569479 569497 569507 569533
-569573 569579 569581 569599 569603 569609 569617 569623 569659 569663 569671 569683
-569711 569713 569717 569729 569731 569747 569759 569771 569773 569797 569809 569813
-569819 569831 569839 569843 569851 569861 569869 569887 569893 569897 569903 569927
-569939 569957 569983 570001 570013 570029 570041 570043 570047 570049 570071 570077
-570079 570083 570091 570107 570109 570113 570131 570139 570161 570173 570181 570191
-570217 570221 570233 570253 570329 570359 570373 570379 570389 570391 570403 570407
-570413 570419 570421 570461 570463 570467 570487 570491 570497 570499 570509 570511
-570527 570529 570539 570547 570553 570569 570587 570601 570613 570637 570643 570649
-570659 570667 570671 570677 570683 570697 570719 570733 570737 570743 570781 570821
-570827 570839 570841 570851 570853 570859 570881 570887 570901 570919 570937 570949
-570959 570961 570967 570991 571001 571019 571031 571037 571049 571069 571093 571099
-571111 571133 571147 571157 571163 571199 571201 571211 571223 571229 571231 571261
-571267 571279 571303 571321 571331 571339 571369 571381 571397 571399 571409 571433
-571453 571471 571477 571531 571541 571579 571583 571589 571601 571603 571633 571657
-571673 571679 571699 571709 571717 571721 571741 571751 571759 571777 571783 571789
-571799 571801 571811 571841 571847 571853 571861 571867 571871 571873 571877 571903
-571933 571939 571969 571973 572023 572027 572041 572051 572053 572059 572063 572069
-572087 572093 572107 572137 572161 572177 572179 572183 572207 572233 572239 572251
-572269 572281 572303 572311 572321 572323 572329 572333 572357 572387 572399 572417
-572419 572423 572437 572449 572461 572471 572479 572491 572497 572519 572521 572549
-572567 572573 572581 572587 572597 572599 572609 572629 572633 572639 572651 572653
-572657 572659 572683 572687 572699 572707 572711 572749 572777 572791 572801 572807
-572813 572821 572827 572833 572843 572867 572879 572881 572903 572909 572927 572933
-572939 572941 572963 572969 572993 573007 573031 573047 573101 573107 573109 573119
-573143 573161 573163 573179 573197 573247 573253 573263 573277 573289 573299 573317
-573329 573341 573343 573371 573379 573383 573409 573437 573451 573457 573473 573479
-573481 573487 573493 573497 573509 573511 573523 573527 573557 573569 573571 573637
-573647 573673 573679 573691 573719 573737 573739 573757 573761 573763 573787 573791
-573809 573817 573829 573847 573851 573863 573871 573883 573887 573899 573901 573929
-573941 573953 573967 573973 573977 574003 574031 574033 574051 574061 574081 574099
-574109 574127 574157 574159 574163 574169 574181 574183 574201 574219 574261 574279
-574283 574289 574297 574307 574309 574363 574367 574373 574393 574423 574429 574433
-574439 574477 574489 574493 574501 574507 574529 574543 574547 574597 574619 574621
-574627 574631 574643 574657 574667 574687 574699 574703 574711 574723 574727 574733
-574741 574789 574799 574801 574813 574817 574859 574907 574913 574933 574939 574949
-574963 574967 574969 575009 575027 575033 575053 575063 575077 575087 575119 575123
-575129 575131 575137 575153 575173 575177 575203 575213 575219 575231 575243 575249
-575251 575257 575261 575303 575317 575359 575369 575371 575401 575417 575429 575431
-575441 575473 575479 575489 575503 575513 575551 575557 575573 575579 575581 575591
-575593 575611 575623 575647 575651 575669 575677 575689 575693 575699 575711 575717
-575723 575747 575753 575777 575791 575821 575837 575849 575857 575863 575867 575893
-575903 575921 575923 575941 575957 575959 575963 575987 576001 576013 576019 576029
-576031 576041 576049 576089 576101 576119 576131 576151 576161 576167 576179 576193
-576203 576211 576217 576221 576223 576227 576287 576293 576299 576313 576319 576341
-576377 576379 576391 576421 576427 576431 576439 576461 576469 576473 576493 576509
-576523 576529 576533 576539 576551 576553 576577 576581 576613 576617 576637 576647
-576649 576659 576671 576677 576683 576689 576701 576703 576721 576727 576731 576739
-576743 576749 576757 576769 576787 576791 576881 576883 576889 576899 576943 576949
-576967 576977 577007 577009 577033 577043 577063 577067 577069 577081 577097 577111
-577123 577147 577151 577153 577169 577177 577193 577219 577249 577259 577271 577279
-577307 577327 577331 577333 577349 577351 577363 577387 577397 577399 577427 577453
-577457 577463 577471 577483 577513 577517 577523 577529 577531 577537 577547 577559
-577573 577589 577601 577613 577627 577637 577639 577667 577721 577739 577751 577757
-577781 577799 577807 577817 577831 577849 577867 577873 577879 577897 577901 577909
-577919 577931 577937 577939 577957 577979 577981 578021 578029 578041 578047 578063
-578077 578093 578117 578131 578167 578183 578191 578203 578209 578213 578251 578267
-578297 578299 578309 578311 578317 578327 578353 578363 578371 578399 578401 578407
-578419 578441 578453 578467 578477 578483 578489 578497 578503 578509 578533 578537
-578563 578573 578581 578587 578597 578603 578609 578621 578647 578659 578687 578689
-578693 578701 578719 578729 578741 578777 578779 578789 578803 578819 578821 578827
-578839 578843 578857 578861 578881 578917 578923 578957 578959 578971 578999 579011
-579017 579023 579053 579079 579083 579107 579113 579119 579133 579179 579197 579199
-579239 579251 579259 579263 579277 579281 579283 579287 579311 579331 579353 579379
-579407 579409 579427 579433 579451 579473 579497 579499 579503 579517 579521 579529
-579533 579539 579541 579563 579569 579571 579583 579587 579611 579613 579629 579637
-579641 579643 579653 579673 579701 579707 579713 579721 579737 579757 579763 579773
-579779 579809 579829 579851 579869 579877 579881 579883 579893 579907 579947 579949
-579961 579967 579973 579983 580001 580031 580033 580079 580081 580093 580133 580163
-580169 580183 580187 580201 580213 580219 580231 580259 580291 580301 580303 580331
-580339 580343 580357 580361 580373 580379 580381 580409 580417 580471 580477 580487
-580513 580529 580549 580553 580561 580577 580607 580627 580631 580633 580639 580663
-580673 580687 580691 580693 580711 580717 580733 580747 580757 580759 580763 580787
-580793 580807 580813 580837 580843 580859 580871 580889 580891 580901 580913 580919
-580927 580939 580969 580981 580997 581029 581041 581047 581069 581071 581089 581099
-581101 581137 581143 581149 581171 581173 581177 581183 581197 581201 581227 581237
-581239 581261 581263 581293 581303 581311 581323 581333 581341 581351 581353 581369
-581377 581393 581407 581411 581429 581443 581447 581459 581473 581491 581521 581527
-581549 581551 581557 581573 581597 581599 581617 581639 581657 581663 581683 581687
-581699 581701 581729 581731 581743 581753 581767 581773 581797 581809 581821 581843
-581857 581863 581869 581873 581891 581909 581921 581941 581947 581953 581981 581983
-582011 582013 582017 582031 582037 582067 582083 582119 582137 582139 582157 582161
-582167 582173 582181 582203 582209 582221 582223 582227 582247 582251 582299 582317
-582319 582371 582391 582409 582419 582427 582433 582451 582457 582469 582499 582509
-582511 582541 582551 582563 582587 582601 582623 582643 582649 582677 582689 582691
-582719 582721 582727 582731 582737 582761 582763 582767 582773 582781 582793 582809
-582821 582851 582853 582859 582887 582899 582931 582937 582949 582961 582971 582973
-582983 583007 583013 583019 583021 583031 583069 583087 583127 583139 583147 583153
-583169 583171 583181 583189 583207 583213 583229 583237 583249 583267 583273 583279
-583291 583301 583337 583339 583351 583367 583391 583397 583403 583409 583417 583421
-583447 583459 583469 583481 583493 583501 583511 583519 583523 583537 583543 583577
-583603 583613 583619 583621 583631 583651 583657 583669 583673 583697 583727 583733
-583753 583769 583777 583783 583789 583801 583841 583853 583859 583861 583873 583879
-583903 583909 583937 583969 583981 583991 583997 584011 584027 584033 584053 584057
-584063 584081 584099 584141 584153 584167 584183 584203 584249 584261 584279 584281
-584303 584347 584357 584359 584377 584387 584393 584399 584411 584417 584429 584447
-584471 584473 584509 584531 584557 584561 584587 584593 584599 584603 584609 584621
-584627 584659 584663 584677 584693 584699 584707 584713 584719 584723 584737 584767
-584777 584789 584791 584809 584849 584863 584869 584873 584879 584897 584911 584917
-584923 584951 584963 584971 584981 584993 584999 585019 585023 585031 585037 585041
-585043 585049 585061 585071 585073 585077 585107 585113 585119 585131 585149 585163
-585199 585217 585251 585269 585271 585283 585289 585313 585317 585337 585341 585367
-585383 585391 585413 585437 585443 585461 585467 585493 585503 585517 585547 585551
-585569 585577 585581 585587 585593 585601 585619 585643 585653 585671 585677 585691
-585721 585727 585733 585737 585743 585749 585757 585779 585791 585799 585839 585841
-585847 585853 585857 585863 585877 585881 585883 585889 585899 585911 585913 585917
-585919 585953 585989 585997 586009 586037 586051 586057 586067 586073 586087 586111
-586121 586123 586129 586139 586147 586153 586189 586213 586237 586273 586277 586291
-586301 586309 586319 586349 586361 586363 586367 586387 586403 586429 586433 586457
-586459 586463 586471 586493 586499 586501 586541 586543 586567 586571 586577 586589
-586601 586603 586609 586627 586631 586633 586667 586679 586693 586711 586723 586741
-586769 586787 586793 586801 586811 586813 586819 586837 586841 586849 586871 586897
-586903 586909 586919 586921 586933 586939 586951 586961 586973 586979 586981 587017
-587021 587033 587051 587053 587057 587063 587087 587101 587107 587117 587123 587131
-587137 587143 587149 587173 587179 587189 587201 587219 587263 587267 587269 587281
-587287 587297 587303 587341 587371 587381 587387 587413 587417 587429 587437 587441
-587459 587467 587473 587497 587513 587519 587527 587533 587539 587549 587551 587563
-587579 587599 587603 587617 587621 587623 587633 587659 587669 587677 587687 587693
-587711 587731 587737 587747 587749 587753 587771 587773 587789 587813 587827 587833
-587849 587863 587887 587891 587897 587927 587933 587947 587959 587969 587971 587987
-587989 587999 588011 588019 588037 588043 588061 588073 588079 588083 588097 588113
-588121 588131 588151 588167 588169 588173 588191 588199 588229 588239 588241 588257
-588277 588293 588311 588347 588359 588361 588383 588389 588397 588403 588433 588437
-588463 588481 588493 588503 588509 588517 588521 588529 588569 588571 588619 588631
-588641 588647 588649 588667 588673 588683 588703 588733 588737 588743 588767 588773
-588779 588811 588827 588839 588871 588877 588881 588893 588911 588937 588941 588947
-588949 588953 588977 589021 589027 589049 589063 589109 589111 589123 589139 589159
-589163 589181 589187 589189 589207 589213 589219 589231 589241 589243 589273 589289
-589291 589297 589327 589331 589349 589357 589387 589409 589439 589451 589453 589471
-589481 589493 589507 589529 589531 589579 589583 589591 589601 589607 589609 589639
-589643 589681 589711 589717 589751 589753 589759 589763 589783 589793 589807 589811
-589829 589847 589859 589861 589873 589877 589903 589921 589933 589993 589997 590021
-590027 590033 590041 590071 590077 590099 590119 590123 590129 590131 590137 590141
-590153 590171 590201 590207 590243 590251 590263 590267 590269 590279 590309 590321
-590323 590327 590357 590363 590377 590383 590389 590399 590407 590431 590437 590489
-590537 590543 590567 590573 590593 590599 590609 590627 590641 590647 590657 590659
-590669 590713 590717 590719 590741 590753 590771 590797 590809 590813 590819 590833
-590839 590867 590899 590921 590923 590929 590959 590963 590983 590987 591023 591053
-591061 591067 591079 591089 591091 591113 591127 591131 591137 591161 591163 591181
-591193 591233 591259 591271 591287 591289 591301 591317 591319 591341 591377 591391
-591403 591407 591421 591431 591443 591457 591469 591499 591509 591523 591553 591559
-591581 591599 591601 591611 591623 591649 591653 591659 591673 591691 591709 591739
-591743 591749 591751 591757 591779 591791 591827 591841 591847 591863 591881 591887
-591893 591901 591937 591959 591973 592019 592027 592049 592057 592061 592073 592087
-592099 592121 592129 592133 592139 592157 592199 592217 592219 592223 592237 592261
-592289 592303 592307 592309 592321 592337 592343 592351 592357 592367 592369 592387
-592391 592393 592429 592451 592453 592463 592469 592483 592489 592507 592517 592531
-592547 592561 592577 592589 592597 592601 592609 592621 592639 592643 592649 592661
-592663 592681 592693 592723 592727 592741 592747 592759 592763 592793 592843 592849
-592853 592861 592873 592877 592897 592903 592919 592931 592939 592967 592973 592987
-592993 593003 593029 593041 593051 593059 593071 593081 593083 593111 593119 593141
-593143 593149 593171 593179 593183 593207 593209 593213 593227 593231 593233 593251
-593261 593273 593291 593293 593297 593321 593323 593353 593381 593387 593399 593401
-593407 593429 593447 593449 593473 593479 593491 593497 593501 593507 593513 593519
-593531 593539 593573 593587 593597 593603 593627 593629 593633 593641 593647 593651
-593689 593707 593711 593767 593777 593783 593839 593851 593863 593869 593899 593903
-593933 593951 593969 593977 593987 593993 594023 594037 594047 594091 594103 594107
-594119 594137 594151 594157 594161 594163 594179 594193 594203 594211 594227 594241
-594271 594281 594283 594287 594299 594311 594313 594329 594359 594367 594379 594397
-594401 594403 594421 594427 594449 594457 594467 594469 594499 594511 594521 594523
-594533 594551 594563 594569 594571 594577 594617 594637 594641 594653 594667 594679
-594697 594709 594721 594739 594749 594751 594773 594793 594821 594823 594827 594829
-594857 594889 594899 594911 594917 594929 594931 594953 594959 594961 594977 594989
-595003 595037 595039 595043 595057 595069 595073 595081 595087 595093 595097 595117
-595123 595129 595139 595141 595157 595159 595181 595183 595201 595207 595229 595247
-595253 595261 595267 595271 595277 595291 595303 595313 595319 595333 595339 595351
-595363 595373 595379 595381 595411 595451 595453 595481 595513 595519 595523 595547
-595549 595571 595577 595579 595613 595627 595687 595703 595709 595711 595717 595733
-595741 595801 595807 595817 595843 595873 595877 595927 595939 595943 595949 595951
-595957 595961 595963 595967 595981 596009 596021 596027 596047 596053 596059 596069
-596081 596083 596093 596117 596119 596143 596147 596159 596179 596209 596227 596231
-596243 596251 596257 596261 596273 596279 596291 596293 596317 596341 596363 596369
-596399 596419 596423 596461 596489 596503 596507 596537 596569 596573 596579 596587
-596593 596599 596611 596623 596633 596653 596663 596669 596671 596693 596707 596737
-596741 596749 596767 596779 596789 596803 596821 596831 596839 596851 596857 596861
-596863 596879 596899 596917 596927 596929 596933 596941 596963 596977 596983 596987
-597031 597049 597053 597059 597073 597127 597131 597133 597137 597169 597209 597221
-597239 597253 597263 597269 597271 597301 597307 597349 597353 597361 597367 597383
-597391 597403 597407 597409 597419 597433 597437 597451 597473 597497 597521 597523
-597539 597551 597559 597577 597581 597589 597593 597599 597613 597637 597643 597659
-597671 597673 597677 597679 597689 597697 597757 597761 597767 597769 597781 597803
-597823 597827 597833 597853 597859 597869 597889 597899 597901 597923 597929 597967
-597997 598007 598049 598051 598057 598079 598093 598099 598123 598127 598141 598151
-598159 598163 598187 598189 598193 598219 598229 598261 598303 598307 598333 598363
-598369 598379 598387 598399 598421 598427 598439 598447 598457 598463 598487 598489
-598501 598537 598541 598571 598613 598643 598649 598651 598657 598669 598681 598687
-598691 598711 598721 598727 598729 598777 598783 598789 598799 598817 598841 598853
-598867 598877 598883 598891 598903 598931 598933 598963 598967 598973 598981 598987
-598999 599003 599009 599021 599023 599069 599087 599117 599143 599147 599149 599153
-599191 599213 599231 599243 599251 599273 599281 599303 599309 599321 599341 599353
-599359 599371 599383 599387 599399 599407 599413 599419 599429 599477 599479 599491
-599513 599519 599537 599551 599561 599591 599597 599603 599611 599623 599629 599657
-599663 599681 599693 599699 599701 599713 599719 599741 599759 599779 599783 599803
-599831 599843 599857 599869 599891 599899 599927 599933 599939 599941 599959 599983
-599993 599999 600011 600043 600053 600071 600073 600091 600101 600109 600167 600169
-600203 600217 600221 600233 600239 600241 600247 600269 600283 600289 600293 600307
-600311 600317 600319 600337 600359 600361 600367 600371 600401 600403 600407 600421
-600433 600449 600451 600463 600469 600487 600517 600529 600557 600569 600577 600601
-600623 600631 600641 600659 600673 600689 600697 600701 600703 600727 600751 600791
-600823 600827 600833 600841 600857 600877 600881 600883 600889 600893 600931 600947
-600949 600959 600961 600973 600979 600983 601021 601031 601037 601039 601043 601061
-601067 601079 601093 601127 601147 601187 601189 601193 601201 601207 601219 601231
-601241 601247 601259 601267 601283 601291 601297 601309 601313 601319 601333 601339
-601357 601379 601397 601411 601423 601439 601451 601457 601487 601507 601541 601543
-601589 601591 601607 601631 601651 601669 601687 601697 601717 601747 601751 601759
-601763 601771 601801 601807 601813 601819 601823 601831 601849 601873 601883 601889
-601897 601903 601943 601949 601961 601969 601981 602029 602033 602039 602047 602057
-602081 602083 602087 602093 602099 602111 602137 602141 602143 602153 602179 602197
-602201 602221 602227 602233 602257 602267 602269 602279 602297 602309 602311 602317
-602321 602333 602341 602351 602377 602383 602401 602411 602431 602453 602461 602477
-602479 602489 602501 602513 602521 602543 602551 602593 602597 602603 602621 602627
-602639 602647 602677 602687 602689 602711 602713 602717 602729 602743 602753 602759
-602773 602779 602801 602821 602831 602839 602867 602873 602887 602891 602909 602929
-602947 602951 602971 602977 602983 602999 603011 603013 603023 603047 603077 603091
-603101 603103 603131 603133 603149 603173 603191 603203 603209 603217 603227 603257
-603283 603311 603319 603349 603389 603391 603401 603431 603443 603457 603467 603487
-603503 603521 603523 603529 603541 603553 603557 603563 603569 603607 603613 603623
-603641 603667 603679 603689 603719 603731 603739 603749 603761 603769 603781 603791
-603793 603817 603821 603833 603847 603851 603853 603859 603881 603893 603899 603901
-603907 603913 603917 603919 603923 603931 603937 603947 603949 603989 604001 604007
-604013 604031 604057 604063 604069 604073 604171 604189 604223 604237 604243 604249
-604259 604277 604291 604309 604313 604319 604339 604343 604349 604361 604369 604379
-604397 604411 604427 604433 604441 604477 604481 604517 604529 604547 604559 604579
-604589 604603 604609 604613 604619 604649 604651 604661 604697 604699 604711 604727
-604729 604733 604753 604759 604781 604787 604801 604811 604819 604823 604829 604837
-604859 604861 604867 604883 604907 604931 604939 604949 604957 604973 604997 605009
-605021 605023 605039 605051 605069 605071 605113 605117 605123 605147 605167 605173
-605177 605191 605221 605233 605237 605239 605249 605257 605261 605309 605323 605329
-605333 605347 605369 605393 605401 605411 605413 605443 605471 605477 605497 605503
-605509 605531 605533 605543 605551 605573 605593 605597 605599 605603 605609 605617
-605629 605639 605641 605687 605707 605719 605779 605789 605809 605837 605849 605861
-605867 605873 605879 605887 605893 605909 605921 605933 605947 605953 605977 605987
-605993 606017 606029 606031 606037 606041 606049 606059 606077 606079 606083 606091
-606113 606121 606131 606173 606181 606223 606241 606247 606251 606299 606301 606311
-606313 606323 606341 606379 606383 606413 606433 606443 606449 606493 606497 606503
-606521 606527 606539 606559 606569 606581 606587 606589 606607 606643 606649 606653
-606659 606673 606721 606731 606733 606737 606743 606757 606791 606811 606829 606833
-606839 606847 606857 606863 606899 606913 606919 606943 606959 606961 606967 606971
-606997 607001 607003 607007 607037 607043 607049 607063 607067 607081 607091 607093
-607097 607109 607127 607129 607147 607151 607153 607157 607163 607181 607199 607213
-607219 607249 607253 607261 607301 607303 607307 607309 607319 607331 607337 607339
-607349 607357 607363 607417 607421 607423 607471 607493 607517 607531 607549 607573
-607583 607619 607627 607667 607669 607681 607697 607703 607721 607723 607727 607741
-607769 607813 607819 607823 607837 607843 607861 607883 607889 607909 607921 607931
-607933 607939 607951 607961 607967 607991 607993 608011 608029 608033 608087 608089
-608099 608117 608123 608129 608131 608147 608161 608177 608191 608207 608213 608269
-608273 608297 608299 608303 608339 608347 608357 608359 608369 608371 608383 608389
-608393 608401 608411 608423 608429 608431 608459 608471 608483 608497 608519 608521
-608527 608581 608591 608593 608609 608611 608633 608653 608659 608669 608677 608693
-608701 608737 608743 608749 608759 608767 608789 608819 608831 608843 608851 608857
-608863 608873 608887 608897 608899 608903 608941 608947 608953 608977 608987 608989
-608999 609043 609047 609067 609071 609079 609101 609107 609113 609143 609149 609163
-609173 609179 609199 609209 609221 609227 609233 609241 609253 609269 609277 609283
-609289 609307 609313 609337 609359 609361 609373 609379 609391 609397 609403 609407
-609421 609437 609443 609461 609487 609503 609509 609517 609527 609533 609541 609571
-609589 609593 609599 609601 609607 609613 609617 609619 609641 609673 609683 609701
-609709 609743 609751 609757 609779 609781 609803 609809 609821 609859 609877 609887
-609907 609911 609913 609923 609929 609979 609989 609991 609997 610031 610063 610081
-610123 610157 610163 610187 610193 610199 610217 610219 610229 610243 610271 610279
-610289 610301 610327 610331 610339 610391 610409 610417 610429 610439 610447 610457
-610469 610501 610523 610541 610543 610553 610559 610567 610579 610583 610619 610633
-610639 610651 610661 610667 610681 610699 610703 610721 610733 610739 610741 610763
-610781 610783 610787 610801 610817 610823 610829 610837 610843 610847 610849 610867
-610877 610879 610891 610913 610919 610921 610933 610957 610969 610993 611011 611027
-611033 611057 611069 611071 611081 611101 611111 611113 611131 611137 611147 611189
-611207 611213 611257 611263 611279 611293 611297 611323 611333 611389 611393 611411
-611419 611441 611449 611453 611459 611467 611483 611497 611531 611543 611549 611551
-611557 611561 611587 611603 611621 611641 611657 611671 611693 611707 611729 611753
-611791 611801 611803 611827 611833 611837 611839 611873 611879 611887 611903 611921
-611927 611939 611951 611953 611957 611969 611977 611993 611999 612011 612023 612037
-612041 612043 612049 612061 612067 612071 612083 612107 612109 612113 612133 612137
-612149 612169 612173 612181 612193 612217 612223 612229 612259 612263 612301 612307
-612317 612319 612331 612341 612349 612371 612373 612377 612383 612401 612407 612439
-612481 612497 612511 612553 612583 612589 612611 612613 612637 612643 612649 612671
-612679 612713 612719 612727 612737 612751 612763 612791 612797 612809 612811 612817
-612823 612841 612847 612853 612869 612877 612889 612923 612929 612947 612967 612971
-612977 613007 613009 613013 613049 613061 613097 613099 613141 613153 613163 613169
-613177 613181 613189 613199 613213 613219 613229 613231 613243 613247 613253 613267
-613279 613289 613297 613337 613357 613363 613367 613381 613421 613427 613439 613441
-613447 613451 613463 613469 613471 613493 613499 613507 613523 613549 613559 613573
-613577 613597 613607 613609 613633 613637 613651 613661 613667 613673 613699 613733
-613741 613747 613759 613763 613807 613813 613817 613829 613841 613849 613861 613883
-613889 613903 613957 613967 613969 613981 613993 613999 614041 614051 614063 614071
-614093 614101 614113 614129 614143 614147 614153 614167 614177 614179 614183 614219
-614267 614279 614291 614293 614297 614321 614333 614377 614387 614413 614417 614437
-614477 614483 614503 614527 614531 614543 614561 614563 614569 614609 614611 614617
-614623 614633 614639 614657 614659 614671 614683 614687 614693 614701 614717 614729
-614741 614743 614749 614753 614759 614773 614827 614843 614849 614851 614863 614881
-614893 614909 614917 614927 614963 614981 614983 615019 615031 615047 615053 615067
-615101 615103 615107 615137 615151 615161 615187 615229 615233 615253 615259 615269
-615289 615299 615313 615337 615341 615343 615367 615379 615389 615401 615403 615413
-615427 615431 615437 615449 615473 615479 615491 615493 615497 615509 615521 615539
-615557 615577 615599 615607 615617 615623 615661 615677 615679 615709 615721 615731
-615739 615743 615749 615751 615761 615767 615773 615793 615799 615821 615827 615829
-615833 615869 615883 615887 615907 615919 615941 615949 615971 615997 616003 616027
-616051 616069 616073 616079 616103 616111 616117 616129 616139 616141 616153 616157
-616169 616171 616181 616207 616211 616219 616223 616229 616243 616261 616277 616289
-616307 616313 616321 616327 616361 616367 616387 616391 616393 616409 616411 616433
-616439 616459 616463 616481 616489 616501 616507 616513 616519 616523 616529 616537
-616547 616579 616589 616597 616639 616643 616669 616673 616703 616717 616723 616729
-616741 616757 616769 616783 616787 616789 616793 616799 616829 616841 616843 616849
-616871 616877 616897 616909 616933 616943 616951 616961 616991 616997 616999 617011
-617027 617039 617051 617053 617059 617077 617087 617107 617119 617129 617131 617147
-617153 617161 617189 617191 617231 617233 617237 617249 617257 617269 617273 617293
-617311 617327 617333 617339 617341 617359 617363 617369 617387 617401 617411 617429
-617447 617453 617467 617471 617473 617479 617509 617521 617531 617537 617579 617587
-617647 617651 617657 617677 617681 617689 617693 617699 617707 617717 617719 617723
-617731 617759 617761 617767 617777 617791 617801 617809 617819 617843 617857 617873
-617879 617887 617917 617951 617959 617963 617971 617983 618029 618031 618041 618049
-618053 618083 618119 618131 618161 618173 618199 618227 618229 618253 618257 618269
-618271 618287 618301 618311 618323 618329 618337 618347 618349 618361 618377 618407
-618413 618421 618437 618439 618463 618509 618521 618547 618559 618571 618577 618581
-618587 618589 618593 618619 618637 618643 618671 618679 618703 618707 618719 618799
-618823 618833 618841 618847 618857 618859 618869 618883 618913 618929 618941 618971
-618979 618991 618997 619007 619009 619019 619027 619033 619057 619061 619067 619079
-619111 619117 619139 619159 619169 619181 619187 619189 619207 619247 619253 619261
-619273 619277 619279 619303 619309 619313 619331 619363 619373 619391 619397 619471
-619477 619511 619537 619543 619561 619573 619583 619589 619603 619607 619613 619621
-619657 619669 619681 619687 619693 619711 619739 619741 619753 619763 619771 619793
-619807 619811 619813 619819 619831 619841 619849 619867 619897 619909 619921 619967
-619979 619981 619987 619999 620003 620029 620033 620051 620099 620111 620117 620159
-620161 620171 620183 620197 620201 620227 620233 620237 620239 620251 620261 620297
-620303 620311 620317 620329 620351 620359 620363 620377 620383 620393 620401 620413
-620429 620437 620441 620461 620467 620491 620507 620519 620531 620549 620561 620567
-620569 620579 620603 620623 620639 620647 620657 620663 620671 620689 620693 620717
-620731 620743 620759 620771 620773 620777 620813 620821 620827 620831 620849 620869
-620887 620909 620911 620929 620933 620947 620957 620981 620999 621007 621013 621017
-621029 621031 621043 621059 621083 621097 621113 621133 621139 621143 621217 621223
-621227 621239 621241 621259 621289 621301 621317 621337 621343 621347 621353 621359
-621371 621389 621419 621427 621431 621443 621451 621461 621473 621521 621527 621541
-621583 621611 621617 621619 621629 621631 621641 621671 621679 621697 621701 621703
-621721 621739 621749 621757 621769 621779 621799 621821 621833 621869 621871 621883
-621893 621913 621923 621937 621941 621983 621997 622009 622019 622043 622049 622051
-622067 622073 622091 622103 622109 622123 622129 622133 622151 622157 622159 622177
-622187 622189 622241 622243 622247 622249 622277 622301 622313 622331 622333 622337
-622351 622367 622397 622399 622423 622477 622481 622483 622493 622513 622519 622529
-622547 622549 622561 622571 622577 622603 622607 622613 622619 622621 622637 622639
-622663 622669 622709 622723 622729 622751 622777 622781 622793 622813 622849 622861
-622879 622889 622901 622927 622943 622957 622967 622987 622997 623003 623009 623017
-623023 623041 623057 623059 623071 623107 623171 623209 623221 623261 623263 623269
-623279 623281 623291 623299 623303 623321 623327 623341 623351 623353 623383 623387
-623393 623401 623417 623423 623431 623437 623477 623521 623531 623537 623563 623591
-623617 623621 623633 623641 623653 623669 623671 623677 623681 623683 623699 623717
-623719 623723 623729 623743 623759 623767 623771 623803 623839 623851 623867 623869
-623879 623881 623893 623923 623929 623933 623947 623957 623963 623977 623983 623989
-624007 624031 624037 624047 624049 624067 624089 624097 624119 624133 624139 624149
-624163 624191 624199 624203 624209 624229 624233 624241 624251 624259 624271 624277
-624311 624313 624319 624329 624331 624347 624391 624401 624419 624443 624451 624467
-624469 624479 624487 624497 624509 624517 624521 624539 624541 624577 624593 624599
-624601 624607 624643 624649 624667 624683 624707 624709 624721 624727 624731 624737
-624763 624769 624787 624791 624797 624803 624809 624829 624839 624847 624851 624859
-624917 624961 624973 624977 624983 624997 625007 625033 625057 625063 625087 625103
-625109 625111 625129 625133 625169 625171 625181 625187 625199 625213 625231 625237
-625253 625267 625279 625283 625307 625319 625343 625351 625367 625369 625397 625409
-625451 625477 625483 625489 625507 625517 625529 625543 625589 625591 625609 625621
-625627 625631 625637 625643 625657 625661 625663 625697 625699 625763 625777 625789
-625811 625819 625831 625837 625861 625871 625883 625909 625913 625927 625939 625943
-625969 625979 625997 626009 626011 626033 626051 626063 626113 626117 626147 626159
-626173 626177 626189 626191 626201 626207 626239 626251 626261 626317 626323 626333
-626341 626347 626363 626377 626389 626393 626443 626477 626489 626519 626533 626539
-626581 626597 626599 626609 626611 626617 626621 626623 626627 626629 626663 626683
-626687 626693 626701 626711 626713 626723 626741 626749 626761 626771 626783 626797
-626809 626833 626837 626861 626887 626917 626921 626929 626947 626953 626959 626963
-626987 627017 627041 627059 627071 627073 627083 627089 627091 627101 627119 627131
-627139 627163 627169 627191 627197 627217 627227 627251 627257 627269 627271 627293
-627301 627329 627349 627353 627377 627379 627383 627391 627433 627449 627479 627481
-627491 627511 627541 627547 627559 627593 627611 627617 627619 627637 627643 627659
-627661 627667 627673 627709 627721 627733 627749 627773 627787 627791 627797 627799
-627811 627841 627859 627901 627911 627919 627943 627947 627953 627961 627973 628013
-628021 628037 628049 628051 628057 628063 628093 628097 628127 628139 628171 628183
-628189 628193 628207 628213 628217 628219 628231 628261 628267 628289 628301 628319
-628357 628363 628373 628379 628391 628399 628423 628427 628447 628477 628487 628493
-628499 628547 628561 628583 628591 628651 628673 628679 628681 628687 628699 628709
-628721 628753 628757 628759 628781 628783 628787 628799 628801 628811 628819 628841
-628861 628877 628909 628913 628921 628937 628939 628973 628993 628997 629003 629009
-629011 629023 629029 629059 629081 629113 629137 629143 629171 629177 629203 629243
-629249 629263 629281 629311 629339 629341 629351 629371 629381 629383 629401 629411
-629417 629429 629449 629467 629483 629491 629509 629513 629537 629567 629569 629591
-629593 629609 629611 629617 629623 629653 629683 629687 629689 629701 629711 629723
-629737 629743 629747 629767 629773 629779 629803 629807 629819 629843 629857 629861
-629873 629891 629897 629899 629903 629921 629927 629929 629939 629963 629977 629987
-629989 630017 630023 630029 630043 630067 630101 630107 630127 630151 630163 630167
-630169 630181 630193 630197 630229 630247 630263 630281 630299 630307 630319 630349
-630353 630391 630433 630451 630467 630473 630481 630493 630521 630523 630529 630559
-630577 630583 630587 630589 630593 630607 630613 630659 630677 630689 630701 630709
-630713 630719 630733 630737 630797 630803 630823 630827 630841 630863 630871 630893
-630899 630901 630907 630911 630919 630941 630967 630997 631003 631013 631039 631061
-631121 631133 631139 631151 631153 631157 631171 631181 631187 631223 631229 631247
-631249 631259 631271 631273 631291 631307 631339 631357 631361 631387 631391 631399
-631409 631429 631453 631457 631459 631469 631471 631483 631487 631507 631513 631529
-631531 631537 631549 631559 631573 631577 631583 631597 631613 631619 631643 631667
-631679 631681 631711 631717 631723 631733 631739 631751 631753 631789 631817 631819
-631843 631847 631853 631859 631861 631867 631889 631901 631903 631913 631927 631931
-631937 631979 631987 631991 631993 632029 632041 632053 632081 632083 632087 632089
-632101 632117 632123 632141 632147 632153 632189 632209 632221 632227 632231 632251
-632257 632267 632273 632297 632299 632321 632323 632327 632329 632347 632351 632353
-632363 632371 632381 632389 632393 632447 632459 632473 632483 632497 632501 632503
-632521 632557 632561 632591 632609 632623 632627 632629 632647 632669 632677 632683
-632699 632713 632717 632743 632747 632773 632777 632813 632839 632843 632851 632857
-632881 632897 632911 632923 632939 632941 632971 632977 632987 632993 633001 633013
-633037 633053 633067 633079 633091 633133 633151 633161 633187 633197 633209 633221
-633253 633257 633263 633271 633287 633307 633317 633337 633359 633377 633379 633383
-633401 633407 633427 633449 633461 633463 633467 633469 633473 633487 633497 633559
-633569 633571 633583 633599 633613 633623 633629 633649 633653 633667 633739 633751
-633757 633767 633781 633791 633793 633797 633799 633803 633823 633833 633877 633883
-633923 633931 633937 633943 633953 633961 633967 633991 634003 634013 634031 634061
-634079 634091 634097 634103 634141 634157 634159 634169 634177 634181 634187 634199
-634211 634223 634237 634241 634247 634261 634267 634273 634279 634301 634307 634313
-634327 634331 634343 634367 634373 634397 634421 634441 634471 634483 634493 634499
-634511 634519 634523 634531 634541 634567 634573 634577 634597 634603 634609 634643
-634649 634651 634679 634681 634687 634703 634709 634717 634727 634741 634747 634757
-634759 634793 634807 634817 634841 634853 634859 634861 634871 634891 634901 634903
-634927 634937 634939 634943 634969 634979 635003 635021 635039 635051 635057 635087
-635119 635147 635149 635197 635203 635207 635249 635251 635263 635267 635279 635287
-635291 635293 635309 635317 635333 635339 635347 635351 635353 635359 635363 635387
-635389 635413 635423 635431 635441 635449 635461 635471 635483 635507 635519 635527
-635533 635563 635567 635599 635603 635617 635639 635653 635659 635689 635707 635711
-635729 635731 635737 635777 635801 635809 635813 635821 635837 635849 635867 635879
-635891 635893 635909 635917 635923 635939 635959 635969 635977 635981 635983 635989
-636017 636023 636043 636059 636061 636071 636073 636107 636109 636133 636137 636149
-636193 636211 636217 636241 636247 636257 636263 636277 636283 636287 636301 636313
-636319 636331 636343 636353 636359 636403 636407 636409 636421 636469 636473 636499
-636533 636539 636541 636547 636553 636563 636569 636613 636619 636631 636653 636673
-636697 636719 636721 636731 636739 636749 636761 636763 636773 636781 636809 636817
-636821 636829 636851 636863 636877 636917 636919 636931 636947 636953 636967 636983
-636997 637001 637003 637067 637073 637079 637097 637129 637139 637157 637163 637171
-637199 637201 637229 637243 637271 637277 637283 637291 637297 637309 637319 637321
-637327 637337 637339 637349 637369 637379 637409 637421 637423 637447 637459 637463
-637471 637489 637499 637513 637519 637529 637531 637543 637573 637597 637601 637603
-637607 637627 637657 637669 637691 637699 637709 637711 637717 637723 637727 637729
-637751 637771 637781 637783 637787 637817 637829 637831 637841 637873 637883 637909
-637933 637937 637939 638023 638047 638051 638059 638063 638081 638117 638123 638147
-638159 638161 638171 638177 638179 638201 638233 638263 638269 638303 638317 638327
-638347 638359 638371 638423 638431 638437 638453 638459 638467 638489 638501 638527
-638567 638581 638587 638621 638629 638633 638663 638669 638689 638699 638717 638719
-638767 638801 638819 638839 638857 638861 638893 638923 638933 638959 638971 638977
-638993 638999 639007 639011 639043 639049 639053 639083 639091 639137 639143 639151
-639157 639167 639169 639181 639211 639253 639257 639259 639263 639269 639299 639307
-639311 639329 639337 639361 639371 639391 639433 639439 639451 639487 639491 639493
-639511 639517 639533 639547 639563 639571 639577 639589 639599 639601 639631 639637
-639647 639671 639677 639679 639689 639697 639701 639703 639713 639719 639731 639739
-639757 639833 639839 639851 639853 639857 639907 639911 639937 639941 639949 639959
-639983 639997 640007 640009 640019 640027 640039 640043 640049 640061 640069 640099
-640109 640121 640127 640139 640151 640153 640163 640193 640219 640223 640229 640231
-640247 640249 640259 640261 640267 640279 640303 640307 640333 640363 640369 640411
-640421 640457 640463 640477 640483 640499 640529 640531 640579 640583 640589 640613
-640621 640631 640649 640663 640667 640669 640687 640691 640727 640733 640741 640771
-640777 640793 640837 640847 640853 640859 640873 640891 640901 640907 640919 640933
-640943 640949 640957 640963 640967 640973 640993 641051 641057 641077 641083 641089
-641093 641101 641129 641131 641143 641167 641197 641203 641213 641227 641239 641261
-641279 641287 641299 641317 641327 641371 641387 641411 641413 641419 641437 641441
-641453 641467 641471 641479 641491 641513 641519 641521 641549 641551 641579 641581
-641623 641633 641639 641681 641701 641713 641747 641749 641761 641789 641791 641803
-641813 641819 641821 641827 641833 641843 641863 641867 641873 641881 641891 641897
-641909 641923 641929 641959 641969 641981 642011 642013 642049 642071 642077 642079
-642113 642121 642133 642149 642151 642157 642163 642197 642199 642211 642217 642223
-642233 642241 642247 642253 642281 642359 642361 642373 642403 642407 642419 642427
-642457 642487 642517 642527 642529 642533 642547 642557 642563 642581 642613 642623
-642673 642683 642701 642737 642739 642769 642779 642791 642797 642799 642809 642833
-642853 642869 642871 642877 642881 642899 642907 642931 642937 642947 642953 642973
-642977 642997 643009 643021 643031 643039 643043 643051 643061 643073 643081 643087
-643099 643121 643129 643183 643187 643199 643213 643217 643231 643243 643273 643301
-643303 643369 643373 643403 643421 643429 643439 643453 643457 643463 643469 643493
-643507 643523 643547 643553 643567 643583 643589 643619 643633 643639 643649 643651
-643661 643681 643691 643693 643697 643703 643723 643729 643751 643781 643847 643849
-643859 643873 643879 643883 643889 643919 643927 643949 643957 643961 643969 643991
-644009 644029 644047 644051 644053 644057 644089 644101 644107 644117 644123 644129
-644131 644141 644143 644153 644159 644173 644191 644197 644201 644227 644239 644257
-644261 644291 644297 644327 644341 644353 644359 644363 644377 644381 644383 644401
-644411 644431 644443 644447 644489 644491 644507 644513 644519 644531 644549 644557
-644563 644569 644593 644597 644599 644617 644629 644647 644653 644669 644671 644687
-644701 644717 644729 644731 644747 644753 644767 644783 644789 644797 644801 644837
-644843 644857 644863 644867 644869 644881 644899 644909 644911 644923 644933 644951
-644977 644999 645011 645013 645019 645023 645037 645041 645049 645067 645077 645083
-645091 645097 645131 645137 645149 645179 645187 645233 645257 645313 645329 645347
-645353 645367 645383 645397 645409 645419 645431 645433 645443 645467 645481 645493
-645497 645499 645503 645521 645527 645529 645571 645577 645581 645583 645599 645611
-645629 645641 645647 645649 645661 645683 645691 645703 645713 645727 645737 645739
-645751 645763 645787 645803 645833 645839 645851 645857 645877 645889 645893 645901
-645907 645937 645941 645973 645979 646003 646013 646027 646039 646067 646073 646099
-646103 646147 646157 646159 646169 646181 646183 646189 646193 646199 646237 646253
-646259 646267 646271 646273 646291 646301 646307 646309 646339 646379 646397 646403
-646411 646421 646423 646433 646453 646519 646523 646537 646543 646549 646571 646573
-646577 646609 646619 646631 646637 646643 646669 646687 646721 646757 646771 646781
-646823 646831 646837 646843 646859 646873 646879 646883 646889 646897 646909 646913
-646927 646937 646957 646979 646981 646991 646993 647011 647033 647039 647047 647057
-647069 647081 647099 647111 647113 647117 647131 647147 647161 647189 647201 647209
-647219 647261 647263 647293 647303 647321 647327 647333 647341 647357 647359 647363
-647371 647399 647401 647417 647429 647441 647453 647477 647489 647503 647509 647527
-647531 647551 647557 647579 647587 647593 647609 647617 647627 647641 647651 647659
-647663 647687 647693 647719 647723 647741 647743 647747 647753 647771 647783 647789
-647809 647821 647837 647839 647851 647861 647891 647893 647909 647917 647951 647953
-647963 647987 648007 648019 648029 648041 648047 648059 648061 648073 648079 648097
-648101 648107 648119 648133 648173 648181 648191 648199 648211 648217 648229 648239
-648257 648259 648269 648283 648289 648293 648317 648331 648341 648343 648371 648377
-648379 648383 648391 648433 648437 648449 648481 648509 648563 648607 648617 648619
-648629 648631 648649 648653 648671 648677 648689 648709 648719 648731 648763 648779
-648803 648841 648859 648863 648871 648887 648889 648911 648917 648931 648937 648953
-648961 648971 648997 649001 649007 649039 649063 649069 649073 649079 649081 649087
-649093 649123 649141 649147 649151 649157 649183 649217 649261 649273 649277 649279
-649283 649291 649307 649321 649361 649379 649381 649403 649421 649423 649427 649457
-649469 649471 649483 649487 649499 649501 649507 649511 649529 649541 649559 649567
-649573 649577 649613 649619 649631 649633 649639 649643 649651 649657 649661 649697
-649709 649717 649739 649751 649769 649771 649777 649783 649787 649793 649799 649801
-649813 649829 649843 649849 649867 649871 649877 649879 649897 649907 649921 649937
-649969 649981 649991 650011 650017 650059 650071 650081 650099 650107 650179 650183
-650189 650213 650227 650261 650269 650281 650291 650317 650327 650329 650347 650359
-650387 650401 650413 650449 650477 650479 650483 650519 650537 650543 650549 650563
-650567 650581 650591 650599 650609 650623 650627 650669 650701 650759 650761 650779
-650813 650821 650827 650833 650851 650861 650863 650869 650873 650911 650917 650927
-650933 650953 650971 650987 651017 651019 651029 651043 651067 651071 651097 651103
-651109 651127 651139 651143 651169 651179 651181 651191 651193 651221 651223 651239
-651247 651251 651257 651271 651281 651289 651293 651323 651331 651347 651361 651397
-651401 651437 651439 651461 651473 651481 651487 651503 651509 651517 651587 651617
-651641 651647 651649 651667 651683 651689 651697 651727 651731 651733 651767 651769
-651793 651803 651809 651811 651821 651839 651841 651853 651857 651863 651869 651877
-651881 651901 651913 651943 651971 651997 652019 652033 652039 652063 652079 652081
-652087 652117 652121 652153 652189 652207 652217 652229 652237 652241 652243 652261
-652279 652283 652291 652319 652321 652331 652339 652343 652357 652361 652369 652373
-652381 652411 652417 652429 652447 652451 652453 652493 652499 652507 652541 652543
-652549 652559 652567 652573 652577 652591 652601 652607 652609 652621 652627 652651
-652657 652667 652699 652723 652727 652733 652739 652741 652747 652753 652759 652787
-652811 652831 652837 652849 652853 652871 652903 652909 652913 652921 652931 652933
-652937 652943 652957 652969 652991 652997 652999 653033 653057 653083 653111 653113
-653117 653143 653153 653197 653203 653207 653209 653243 653267 653273 653281 653311
-653321 653339 653357 653363 653431 653461 653473 653491 653501 653503 653507 653519
-653537 653539 653561 653563 653579 653593 653617 653621 653623 653641 653647 653651
-653659 653687 653693 653707 653711 653713 653743 653749 653761 653777 653789 653797
-653801 653819 653831 653879 653881 653893 653899 653903 653927 653929 653941 653951
-653963 653969 653977 653993 654001 654011 654019 654023 654029 654047 654053 654067
-654089 654107 654127 654149 654161 654163 654167 654169 654187 654191 654209 654221
-654223 654229 654233 654257 654293 654301 654307 654323 654343 654349 654371 654397
-654413 654421 654427 654439 654491 654499 654509 654527 654529 654539 654541 654553
-654571 654587 654593 654601 654611 654613 654623 654629 654671 654679 654697 654701
-654727 654739 654743 654749 654767 654779 654781 654799 654803 654817 654821 654827
-654839 654853 654877 654889 654917 654923 654931 654943 654967 654991 655001 655003
-655013 655021 655033 655037 655043 655069 655087 655103 655111 655121 655157 655181
-655211 655219 655223 655229 655241 655243 655261 655267 655273 655283 655289 655301
-655331 655337 655351 655357 655373 655379 655387 655399 655439 655453 655471 655489
-655507 655511 655517 655531 655541 655547 655559 655561 655579 655583 655597 655601
-655637 655643 655649 655651 655657 655687 655693 655717 655723 655727 655757 655807
-655847 655849 655859 655883 655901 655909 655913 655927 655943 655961 655987 656023
-656039 656063 656077 656113 656119 656129 656141 656147 656153 656171 656221 656237
-656263 656267 656273 656291 656297 656303 656311 656321 656323 656329 656333 656347
-656371 656377 656389 656407 656423 656429 656459 656471 656479 656483 656519 656527
-656561 656587 656597 656599 656603 656609 656651 656657 656671 656681 656683 656687
-656701 656707 656737 656741 656749 656753 656771 656783 656791 656809 656819 656833
-656839 656891 656917 656923 656939 656951 656959 656977 656989 656993 657017 657029
-657047 657049 657061 657071 657079 657089 657091 657113 657121 657127 657131 657187
-657193 657197 657233 657257 657269 657281 657289 657299 657311 657313 657323 657347
-657361 657383 657403 657413 657431 657439 657451 657469 657473 657491 657493 657497
-657499 657523 657529 657539 657557 657581 657583 657589 657607 657617 657649 657653
-657659 657661 657703 657707 657719 657743 657779 657793 657809 657827 657841 657863
-657893 657911 657929 657931 657947 657959 657973 657983 658001 658043 658051 658057
-658069 658079 658111 658117 658123 658127 658139 658153 658159 658169 658187 658199
-658211 658219 658247 658253 658261 658277 658279 658303 658309 658319 658321 658327
-658349 658351 658367 658379 658391 658403 658417 658433 658447 658453 658477 658487
-658507 658547 658549 658573 658579 658589 658591 658601 658607 658613 658633 658639
-658643 658649 658663 658681 658703 658751 658753 658783 658807 658817 658831 658837
-658841 658871 658873 658883 658897 658907 658913 658919 658943 658961 658963 658969
-658979 658991 658997 659011 659023 659047 659059 659063 659069 659077 659101 659137
-659159 659171 659173 659177 659189 659221 659231 659237 659251 659279 659299 659317
-659327 659333 659353 659371 659419 659423 659437 659453 659467 659473 659497 659501
-659513 659521 659531 659539 659563 659569 659591 659597 659609 659611 659621 659629
-659639 659653 659657 659669 659671 659689 659693 659713 659723 659741 659759 659761
-659783 659819 659831 659843 659849 659863 659873 659881 659899 659917 659941 659947
-659951 659963 659983 659999 660001 660013 660029 660047 660053 660061 660067 660071
-660073 660097 660103 660119 660131 660137 660157 660167 660181 660197 660199 660217
-660227 660241 660251 660271 660277 660281 660299 660329 660337 660347 660349 660367
-660377 660379 660391 660403 660409 660449 660493 660503 660509 660521 660529 660547
-660557 660559 660563 660589 660593 660599 660601 660607 660617 660619 660643 660659
-660661 660683 660719 660727 660731 660733 660757 660769 660787 660791 660799 660809
-660811 660817 660833 660851 660853 660887 660893 660899 660901 660917 660923 660941
-660949 660973 660983 661009 661019 661027 661049 661061 661091 661093 661097 661099
-661103 661109 661117 661121 661139 661183 661187 661189 661201 661217 661231 661237
-661253 661259 661267 661321 661327 661343 661361 661373 661393 661417 661421 661439
-661459 661477 661481 661483 661513 661517 661541 661547 661553 661603 661607 661613
-661621 661663 661673 661679 661697 661721 661741 661769 661777 661823 661849 661873
-661877 661879 661883 661889 661897 661909 661931 661939 661949 661951 661961 661987
-661993 662003 662021 662029 662047 662059 662063 662083 662107 662111 662141 662143
-662149 662177 662203 662227 662231 662251 662261 662267 662281 662287 662309 662323
-662327 662339 662351 662353 662357 662369 662401 662407 662443 662449 662477 662483
-662491 662513 662527 662531 662537 662539 662551 662567 662591 662617 662639 662647
-662657 662671 662681 662689 662693 662713 662719 662743 662771 662773 662789 662797
-662819 662833 662839 662843 662867 662897 662899 662917 662939 662941 662947 662951
-662953 662957 662999 663001 663007 663031 663037 663049 663053 663071 663097 663127
-663149 663161 663163 663167 663191 663203 663209 663239 663241 663263 663269 663281
-663283 663301 663319 663331 663349 663359 663371 663407 663409 663437 663463 663517
-663529 663539 663541 663547 663557 663563 663569 663571 663581 663583 663587 663589
-663599 663601 663631 663653 663659 663661 663683 663709 663713 663737 663763 663787
-663797 663821 663823 663827 663853 663857 663869 663881 663893 663907 663937 663959
-663961 663967 663973 663977 663979 663983 663991 663997 664009 664019 664043 664061
-664067 664091 664099 664109 664117 664121 664123 664133 664141 664151 664177 664193
-664199 664211 664243 664253 664271 664273 664289 664319 664331 664357 664369 664379
-664381 664403 664421 664427 664441 664459 664471 664507 664511 664529 664537 664549
-664561 664571 664579 664583 664589 664597 664603 664613 664619 664621 664633 664661
-664663 664667 664669 664679 664687 664691 664693 664711 664739 664757 664771 664777
-664789 664793 664799 664843 664847 664849 664879 664891 664933 664949 664967 664973
-664997 665011 665017 665029 665039 665047 665051 665053 665069 665089 665111 665113
-665117 665123 665131 665141 665153 665177 665179 665201 665207 665213 665221 665233
-665239 665251 665267 665279 665293 665299 665303 665311 665351 665359 665369 665381
-665387 665419 665429 665447 665479 665501 665503 665507 665527 665549 665557 665563
-665569 665573 665591 665603 665617 665629 665633 665659 665677 665713 665719 665723
-665747 665761 665773 665783 665789 665801 665803 665813 665843 665857 665897 665921
-665923 665947 665953 665981 665983 665993 666013 666019 666023 666031 666041 666067
-666073 666079 666089 666091 666109 666119 666139 666143 666167 666173 666187 666191
-666203 666229 666233 666269 666277 666301 666329 666353 666403 666427 666431 666433
-666437 666439 666461 666467 666493 666511 666527 666529 666541 666557 666559 666599
-666607 666637 666643 666647 666649 666667 666671 666683 666697 666707 666727 666733
-666737 666749 666751 666769 666773 666811 666821 666823 666829 666857 666871 666889
-666901 666929 666937 666959 666979 666983 666989 667013 667019 667021 667081 667091
-667103 667123 667127 667129 667141 667171 667181 667211 667229 667241 667243 667273
-667283 667309 667321 667333 667351 667361 667363 667367 667379 667417 667421 667423
-667427 667441 667463 667477 667487 667501 667507 667519 667531 667547 667549 667553
-667559 667561 667577 667631 667643 667649 667657 667673 667687 667691 667697 667699
-667727 667741 667753 667769 667781 667801 667817 667819 667829 667837 667859 667861
-667867 667883 667903 667921 667949 667963 667987 667991 667999 668009 668029 668033
-668047 668051 668069 668089 668093 668111 668141 668153 668159 668179 668201 668203
-668209 668221 668243 668273 668303 668347 668407 668417 668471 668509 668513 668527
-668531 668533 668539 668543 668567 668579 668581 668599 668609 668611 668617 668623
-668671 668677 668687 668699 668713 668719 668737 668741 668747 668761 668791 668803
-668813 668821 668851 668867 668869 668873 668879 668903 668929 668939 668947 668959
-668963 668989 668999 669023 669029 669049 669077 669089 669091 669107 669113 669121
-669127 669133 669167 669173 669181 669241 669247 669271 669283 669287 669289 669301
-669311 669329 669359 669371 669377 669379 669391 669401 669413 669419 669433 669437
-669451 669463 669479 669481 669527 669551 669577 669607 669611 669637 669649 669659
-669661 669667 669673 669677 669679 669689 669701 669707 669733 669763 669787 669791
-669839 669847 669853 669857 669859 669863 669869 669887 669901 669913 669923 669931
-669937 669943 669947 669971 669989 670001 670031 670037 670039 670049 670051 670097
-670099 670129 670139 670147 670177 670193 670199 670211 670217 670223 670231 670237
-670249 670261 670279 670297 670303 670321 670333 670343 670349 670363 670379 670399
-670409 670447 670457 670471 670487 670489 670493 670507 670511 670517 670541 670543
-670559 670577 670583 670597 670613 670619 670627 670639 670669 670673 670693 670711
-670727 670729 670739 670763 670777 670781 670811 670823 670849 670853 670867 670877
-670897 670903 670919 670931 670951 670963 670987 670991 671003 671017 671029 671039
-671059 671063 671081 671087 671093 671123 671131 671141 671159 671161 671189 671201
-671219 671233 671249 671257 671261 671269 671287 671299 671303 671323 671339 671353
-671357 671369 671383 671401 671417 671431 671443 671467 671471 671477 671501 671519
-671533 671537 671557 671581 671591 671603 671609 671633 671647 671651 671681 671701
-671717 671729 671743 671753 671777 671779 671791 671831 671837 671851 671887 671893
-671903 671911 671917 671921 671933 671939 671941 671947 671969 671971 671981 671999
-672019 672029 672041 672043 672059 672073 672079 672097 672103 672107 672127 672131
-672137 672143 672151 672167 672169 672181 672193 672209 672223 672227 672229 672251
-672271 672283 672289 672293 672311 672317 672323 672341 672349 672377 672379 672439
-672443 672473 672493 672499 672521 672557 672577 672587 672593 672629 672641 672643
-672653 672667 672703 672743 672757 672767 672779 672781 672787 672799 672803 672811
-672817 672823 672827 672863 672869 672871 672883 672901 672913 672937 672943 672949
-672953 672967 672977 672983 673019 673039 673063 673069 673073 673091 673093 673109
-673111 673117 673121 673129 673157 673193 673199 673201 673207 673223 673241 673247
-673271 673273 673291 673297 673313 673327 673339 673349 673381 673391 673397 673399
-673403 673411 673427 673429 673441 673447 673451 673457 673459 673469 673487 673499
-673513 673529 673549 673553 673567 673573 673579 673609 673613 673619 673637 673639
-673643 673649 673667 673669 673747 673769 673781 673787 673793 673801 673811 673817
-673837 673879 673891 673921 673943 673951 673961 673979 673991 674017 674057 674059
-674071 674083 674099 674117 674123 674131 674159 674161 674173 674183 674189 674227
-674231 674239 674249 674263 674269 674273 674299 674321 674347 674357 674363 674371
-674393 674419 674431 674449 674461 674483 674501 674533 674537 674551 674563 674603
-674647 674669 674677 674683 674693 674699 674701 674711 674717 674719 674731 674741
-674749 674759 674761 674767 674771 674789 674813 674827 674831 674833 674837 674851
-674857 674867 674879 674903 674929 674941 674953 674957 674977 674987 675029 675067
-675071 675079 675083 675097 675109 675113 675131 675133 675151 675161 675163 675173
-675179 675187 675197 675221 675239 675247 675251 675253 675263 675271 675299 675313
-675319 675341 675347 675391 675407 675413 675419 675449 675457 675463 675481 675511
-675539 675541 675551 675553 675559 675569 675581 675593 675601 675607 675611 675617
-675629 675643 675713 675739 675743 675751 675781 675797 675817 675823 675827 675839
-675841 675859 675863 675877 675881 675889 675923 675929 675931 675959 675973 675977
-675979 676007 676009 676031 676037 676043 676051 676057 676061 676069 676099 676103
-676111 676129 676147 676171 676211 676217 676219 676241 676253 676259 676279 676289
-676297 676337 676339 676349 676363 676373 676387 676391 676409 676411 676421 676427
-676463 676469 676493 676523 676573 676589 676597 676601 676649 676661 676679 676703
-676717 676721 676727 676733 676747 676751 676763 676771 676807 676829 676859 676861
-676883 676891 676903 676909 676919 676927 676931 676937 676943 676961 676967 676979
-676981 676987 676993 677011 677021 677029 677041 677057 677077 677081 677107 677111
-677113 677119 677147 677167 677177 677213 677227 677231 677233 677239 677309 677311
-677321 677323 677333 677357 677371 677387 677423 677441 677447 677459 677461 677471
-677473 677531 677533 677539 677543 677561 677563 677587 677627 677639 677647 677657
-677681 677683 677687 677717 677737 677767 677779 677783 677791 677813 677827 677857
-677891 677927 677947 677953 677959 677983 678023 678037 678047 678061 678077 678101
-678103 678133 678157 678169 678179 678191 678199 678203 678211 678217 678221 678229
-678253 678289 678299 678329 678341 678343 678367 678371 678383 678401 678407 678409
-678413 678421 678437 678451 678463 678479 678481 678493 678499 678533 678541 678553
-678563 678577 678581 678593 678599 678607 678611 678631 678637 678641 678647 678649
-678653 678659 678719 678721 678731 678739 678749 678757 678761 678763 678767 678773
-678779 678809 678823 678829 678833 678859 678871 678883 678901 678907 678941 678943
-678949 678959 678971 678989 679033 679037 679039 679051 679067 679087 679111 679123
-679127 679153 679157 679169 679171 679183 679207 679219 679223 679229 679249 679277
-679279 679297 679309 679319 679333 679361 679363 679369 679373 679381 679403 679409
-679417 679423 679433 679451 679463 679487 679501 679517 679519 679531 679537 679561
-679597 679603 679607 679633 679639 679669 679681 679691 679699 679709 679733 679741
-679747 679751 679753 679781 679793 679807 679823 679829 679837 679843 679859 679867
-679879 679883 679891 679897 679907 679909 679919 679933 679951 679957 679961 679969
-679981 679993 679999 680003 680027 680039 680059 680077 680081 680083 680107 680123
-680129 680159 680161 680177 680189 680203 680209 680213 680237 680249 680263 680291
-680293 680297 680299 680321 680327 680341 680347 680353 680377 680387 680399 680401
-680411 680417 680431 680441 680443 680453 680489 680503 680507 680509 680531 680539
-680567 680569 680587 680597 680611 680623 680633 680651 680657 680681 680707 680749
-680759 680767 680783 680803 680809 680831 680857 680861 680873 680879 680881 680917
-680929 680959 680971 680987 680989 680993 681001 681011 681019 681041 681047 681049
-681061 681067 681089 681091 681113 681127 681137 681151 681167 681179 681221 681229
-681251 681253 681257 681259 681271 681293 681311 681337 681341 681361 681367 681371
-681403 681407 681409 681419 681427 681449 681451 681481 681487 681493 681497 681521
-681523 681539 681557 681563 681589 681607 681613 681623 681631 681647 681673 681677
-681689 681719 681727 681731 681763 681773 681781 681787 681809 681823 681833 681839
-681841 681883 681899 681913 681931 681943 681949 681971 681977 681979 681983 681997
-682001 682009 682037 682049 682063 682069 682079 682141 682147 682151 682153 682183
-682207 682219 682229 682237 682247 682259 682277 682289 682291 682303 682307 682321
-682327 682333 682337 682361 682373 682411 682417 682421 682427 682439 682447 682463
-682471 682483 682489 682511 682519 682531 682547 682597 682607 682637 682657 682673
-682679 682697 682699 682723 682729 682733 682739 682751 682763 682777 682789 682811
-682819 682901 682933 682943 682951 682967 683003 683021 683041 683047 683071 683083
-683087 683119 683129 683143 683149 683159 683201 683231 683251 683257 683273 683299
-683303 683317 683323 683341 683351 683357 683377 683381 683401 683407 683437 683447
-683453 683461 683471 683477 683479 683483 683489 683503 683513 683567 683591 683597
-683603 683651 683653 683681 683687 683693 683699 683701 683713 683719 683731 683737
-683747 683759 683777 683783 683789 683807 683819 683821 683831 683833 683843 683857
-683861 683863 683873 683887 683899 683909 683911 683923 683933 683939 683957 683983
-684007 684017 684037 684053 684091 684109 684113 684119 684121 684127 684157 684163
-684191 684217 684221 684239 684269 684287 684289 684293 684311 684329 684337 684347
-684349 684373 684379 684407 684419 684427 684433 684443 684451 684469 684473 684493
-684527 684547 684557 684559 684569 684581 684587 684599 684617 684637 684643 684647
-684683 684713 684727 684731 684751 684757 684767 684769 684773 684791 684793 684799
-684809 684829 684841 684857 684869 684889 684923 684949 684961 684973 684977 684989
-685001 685019 685031 685039 685051 685057 685063 685073 685081 685093 685099 685103
-685109 685123 685141 685169 685177 685199 685231 685247 685249 685271 685297 685301
-685319 685337 685339 685361 685367 685369 685381 685393 685417 685427 685429 685453
-685459 685471 685493 685511 685513 685519 685537 685541 685547 685591 685609 685613
-685621 685631 685637 685649 685669 685679 685697 685717 685723 685733 685739 685747
-685753 685759 685781 685793 685819 685849 685859 685907 685939 685963 685969 685973
-685987 685991 686003 686009 686011 686027 686029 686039 686041 686051 686057 686087
-686089 686099 686117 686131 686141 686143 686149 686173 686177 686197 686201 686209
-686267 686269 686293 686317 686321 686333 686339 686353 686359 686363 686417 686423
-686437 686449 686453 686473 686479 686503 686513 686519 686551 686563 686593 686611
-686639 686669 686671 686687 686723 686729 686731 686737 686761 686773 686789 686797
-686801 686837 686843 686863 686879 686891 686893 686897 686911 686947 686963 686969
-686971 686977 686989 686993 687007 687013 687017 687019 687023 687031 687041 687061
-687073 687083 687101 687107 687109 687121 687131 687139 687151 687161 687163 687179
-687223 687233 687277 687289 687299 687307 687311 687317 687331 687341 687343 687359
-687383 687389 687397 687403 687413 687431 687433 687437 687443 687457 687461 687473
-687481 687499 687517 687521 687523 687541 687551 687559 687581 687593 687623 687637
-687641 687647 687679 687683 687691 687707 687721 687737 687749 687767 687773 687779
-687787 687809 687823 687829 687839 687847 687893 687901 687917 687923 687931 687949
-687961 687977 688003 688013 688027 688031 688063 688067 688073 688087 688097 688111
-688133 688139 688147 688159 688187 688201 688217 688223 688249 688253 688277 688297
-688309 688333 688339 688357 688379 688393 688397 688403 688411 688423 688433 688447
-688451 688453 688477 688511 688531 688543 688561 688573 688591 688621 688627 688631
-688637 688657 688661 688669 688679 688697 688717 688729 688733 688741 688747 688757
-688763 688777 688783 688799 688813 688861 688867 688871 688889 688907 688939 688951
-688957 688969 688979 688999 689021 689033 689041 689063 689071 689077 689081 689089
-689093 689107 689113 689131 689141 689167 689201 689219 689233 689237 689257 689261
-689267 689279 689291 689309 689317 689321 689341 689357 689369 689383 689389 689393
-689411 689431 689441 689459 689461 689467 689509 689551 689561 689581 689587 689597
-689599 689603 689621 689629 689641 689693 689699 689713 689723 689761 689771 689779
-689789 689797 689803 689807 689827 689831 689851 689867 689869 689873 689879 689891
-689893 689903 689917 689921 689929 689951 689957 689959 689963 689981 689987 690037
-690059 690073 690089 690103 690119 690127 690139 690143 690163 690187 690233 690259
-690269 690271 690281 690293 690323 690341 690367 690377 690397 690407 690419 690427
-690433 690439 690449 690467 690491 690493 690509 690511 690533 690541 690553 690583
-690589 690607 690611 690629 690661 690673 690689 690719 690721 690757 690787 690793
-690817 690839 690841 690869 690871 690887 690889 690919 690929 690953 690997 691001
-691037 691051 691063 691079 691109 691111 691121 691129 691147 691151 691153 691181
-691183 691189 691193 691199 691231 691241 691267 691289 691297 691309 691333 691337
-691343 691349 691363 691381 691399 691409 691433 691451 691463 691489 691499 691531
-691553 691573 691583 691589 691591 691631 691637 691651 691661 691681 691687 691693
-691697 691709 691721 691723 691727 691729 691739 691759 691763 691787 691799 691813
-691829 691837 691841 691843 691871 691877 691891 691897 691903 691907 691919 691921
-691931 691949 691973 691979 691991 691997 692009 692017 692051 692059 692063 692071
-692089 692099 692117 692141 692147 692149 692161 692191 692221 692239 692249 692269
-692273 692281 692287 692297 692299 692309 692327 692333 692347 692353 692371 692387
-692389 692399 692401 692407 692413 692423 692431 692441 692453 692459 692467 692513
-692521 692537 692539 692543 692567 692581 692591 692621 692641 692647 692651 692663
-692689 692707 692711 692717 692729 692743 692753 692761 692771 692779 692789 692821
-692851 692863 692893 692917 692927 692929 692933 692957 692963 692969 692983 693019
-693037 693041 693061 693079 693089 693097 693103 693127 693137 693149 693157 693167
-693169 693179 693223 693257 693283 693317 693323 693337 693353 693359 693373 693397
-693401 693403 693409 693421 693431 693437 693487 693493 693503 693523 693527 693529
-693533 693569 693571 693601 693607 693619 693629 693659 693661 693677 693683 693689
-693691 693697 693701 693727 693731 693733 693739 693743 693757 693779 693793 693799
-693809 693827 693829 693851 693859 693871 693877 693881 693943 693961 693967 693989
-694019 694033 694039 694061 694069 694079 694081 694087 694091 694123 694189 694193
-694201 694207 694223 694259 694261 694271 694273 694277 694313 694319 694327 694333
-694339 694349 694357 694361 694367 694373 694381 694387 694391 694409 694427 694457
-694471 694481 694483 694487 694511 694513 694523 694541 694549 694559 694567 694571
-694591 694597 694609 694619 694633 694649 694651 694717 694721 694747 694763 694781
-694783 694789 694829 694831 694867 694871 694873 694879 694901 694919 694951 694957
-694979 694987 694997 694999 695003 695017 695021 695047 695059 695069 695081 695087
-695089 695099 695111 695117 695131 695141 695171 695207 695239 695243 695257 695263
-695269 695281 695293 695297 695309 695323 695327 695329 695347 695369 695371 695377
-695389 695407 695411 695441 695447 695467 695477 695491 695503 695509 695561 695567
-695573 695581 695593 695599 695603 695621 695627 695641 695659 695663 695677 695687
-695689 695701 695719 695743 695749 695771 695777 695791 695801 695809 695839 695843
-695867 695873 695879 695881 695899 695917 695927 695939 695999 696019 696053 696061
-696067 696077 696079 696083 696107 696109 696119 696149 696181 696239 696253 696257
-696263 696271 696281 696313 696317 696323 696343 696349 696359 696361 696373 696379
-696403 696413 696427 696433 696457 696481 696491 696497 696503 696517 696523 696533
-696547 696569 696607 696611 696617 696623 696629 696653 696659 696679 696691 696719
-696721 696737 696743 696757 696763 696793 696809 696811 696823 696827 696833 696851
-696853 696887 696889 696893 696907 696929 696937 696961 696989 696991 697009 697013
-697019 697033 697049 697063 697069 697079 697087 697093 697111 697121 697127 697133
-697141 697157 697181 697201 697211 697217 697259 697261 697267 697271 697303 697327
-697351 697373 697379 697381 697387 697397 697399 697409 697423 697441 697447 697453
-697457 697481 697507 697511 697513 697519 697523 697553 697579 697583 697591 697601
-697603 697637 697643 697673 697681 697687 697691 697693 697703 697727 697729 697733
-697757 697759 697787 697819 697831 697877 697891 697897 697909 697913 697937 697951
-697967 697973 697979 697993 697999 698017 698021 698039 698051 698053 698077 698083
-698111 698171 698183 698239 698249 698251 698261 698263 698273 698287 698293 698297
-698311 698329 698339 698359 698371 698387 698393 698413 698417 698419 698437 698447
-698471 698483 698491 698507 698521 698527 698531 698539 698543 698557 698567 698591
-698641 698653 698669 698701 698713 698723 698729 698773 698779 698821 698827 698849
-698891 698899 698903 698923 698939 698977 698983 699001 699007 699037 699053 699059
-699073 699077 699089 699113 699119 699133 699151 699157 699169 699187 699191 699197
-699211 699217 699221 699241 699253 699271 699287 699289 699299 699319 699323 699343
-699367 699373 699379 699383 699401 699427 699437 699443 699449 699463 699469 699493
-699511 699521 699527 699529 699539 699541 699557 699571 699581 699617 699631 699641
-699649 699697 699709 699719 699733 699757 699761 699767 699791 699793 699817 699823
-699863 699931 699943 699947 699953 699961 699967 700001 700027 700057 700067 700079
-700081 700087 700099 700103 700109 700127 700129 700171 700199 700201 700211 700223
-700229 700237 700241 700277 700279 700303 700307 700319 700331 700339 700361 700363
-700367 700387 700391 700393 700423 700429 700433 700459 700471 700499 700523 700537
-700561 700571 700573 700577 700591 700597 700627 700633 700639 700643 700673 700681
-700703 700717 700751 700759 700781 700789 700801 700811 700831 700837 700849 700871
-700877 700883 700897 700907 700919 700933 700937 700949 700963 700993 701009 701011
-701023 701033 701047 701089 701117 701147 701159 701177 701179 701209 701219 701221
-701227 701257 701279 701291 701299 701329 701341 701357 701359 701377 701383 701399
-701401 701413 701417 701419 701443 701447 701453 701473 701479 701489 701497 701507
-701509 701527 701531 701549 701579 701581 701593 701609 701611 701621 701627 701629
-701653 701669 701671 701681 701699 701711 701719 701731 701741 701761 701783 701791
-701819 701837 701863 701881 701903 701951 701957 701963 701969 702007 702011 702017
-702067 702077 702101 702113 702127 702131 702137 702139 702173 702179 702193 702199
-702203 702211 702239 702257 702269 702281 702283 702311 702313 702323 702329 702337
-702341 702347 702349 702353 702379 702391 702407 702413 702431 702433 702439 702451
-702469 702497 702503 702511 702517 702523 702529 702539 702551 702557 702587 702589
-702599 702607 702613 702623 702671 702679 702683 702701 702707 702721 702731 702733
-702743 702773 702787 702803 702809 702817 702827 702847 702851 702853 702869 702881
-702887 702893 702913 702937 702983 702991 703013 703033 703039 703081 703117 703121
-703123 703127 703139 703141 703169 703193 703211 703217 703223 703229 703231 703243
-703249 703267 703277 703301 703309 703321 703327 703331 703349 703357 703379 703393
-703411 703441 703447 703459 703463 703471 703489 703499 703531 703537 703559 703561
-703631 703643 703657 703663 703673 703679 703691 703699 703709 703711 703721 703733
-703753 703763 703789 703819 703837 703849 703861 703873 703883 703897 703903 703907
-703943 703949 703957 703981 703991 704003 704009 704017 704023 704027 704029 704059
-704069 704087 704101 704111 704117 704131 704141 704153 704161 704177 704183 704189
-704213 704219 704233 704243 704251 704269 704279 704281 704287 704299 704303 704309
-704321 704357 704393 704399 704419 704441 704447 704449 704453 704461 704477 704507
-704521 704527 704549 704551 704567 704569 704579 704581 704593 704603 704617 704647
-704657 704663 704681 704687 704713 704719 704731 704747 704761 704771 704777 704779
-704783 704797 704801 704807 704819 704833 704839 704849 704857 704861 704863 704867
-704897 704929 704933 704947 704983 704989 704993 704999 705011 705013 705017 705031
-705043 705053 705073 705079 705097 705113 705119 705127 705137 705161 705163 705167
-705169 705181 705191 705197 705209 705247 705259 705269 705277 705293 705307 705317
-705389 705403 705409 705421 705427 705437 705461 705491 705493 705499 705521 705533
-705559 705613 705631 705643 705689 705713 705737 705751 705763 705769 705779 705781
-705787 705821 705827 705829 705833 705841 705863 705871 705883 705899 705919 705937
-705949 705967 705973 705989 706001 706003 706009 706019 706033 706039 706049 706051
-706067 706099 706109 706117 706133 706141 706151 706157 706159 706183 706193 706201
-706207 706213 706229 706253 706267 706283 706291 706297 706301 706309 706313 706337
-706357 706369 706373 706403 706417 706427 706463 706481 706487 706499 706507 706523
-706547 706561 706597 706603 706613 706621 706631 706633 706661 706669 706679 706703
-706709 706729 706733 706747 706751 706753 706757 706763 706787 706793 706801 706829
-706837 706841 706847 706883 706897 706907 706913 706919 706921 706943 706961 706973
-706987 706999 707011 707027 707029 707053 707071 707099 707111 707117 707131 707143
-707153 707159 707177 707191 707197 707219 707249 707261 707279 707293 707299 707321
-707341 707359 707383 707407 707429 707431 707437 707459 707467 707501 707527 707543
-707561 707563 707573 707627 707633 707647 707653 707669 707671 707677 707683 707689
-707711 707717 707723 707747 707753 707767 707789 707797 707801 707813 707827 707831
-707849 707857 707869 707873 707887 707911 707923 707929 707933 707939 707951 707953
-707957 707969 707981 707983 708007 708011 708017 708023 708031 708041 708047 708049
-708053 708061 708091 708109 708119 708131 708137 708139 708161 708163 708179 708199
-708221 708223 708229 708251 708269 708283 708287 708293 708311 708329 708343 708347
-708353 708359 708361 708371 708403 708437 708457 708473 708479 708481 708493 708497
-708517 708527 708559 708563 708569 708583 708593 708599 708601 708641 708647 708667
-708689 708703 708733 708751 708803 708823 708839 708857 708859 708893 708899 708907
-708913 708923 708937 708943 708959 708979 708989 708991 708997 709043 709057 709097
-709117 709123 709139 709141 709151 709153 709157 709201 709211 709217 709231 709237
-709271 709273 709279 709283 709307 709321 709337 709349 709351 709381 709409 709417
-709421 709433 709447 709451 709453 709469 709507 709519 709531 709537 709547 709561
-709589 709603 709607 709609 709649 709651 709663 709673 709679 709691 709693 709703
-709729 709739 709741 709769 709777 709789 709799 709817 709823 709831 709843 709847
-709853 709861 709871 709879 709901 709909 709913 709921 709927 709957 709963 709967
-709981 709991 710009 710023 710027 710051 710053 710081 710089 710119 710189 710207
-710219 710221 710257 710261 710273 710293 710299 710321 710323 710327 710341 710351
-710371 710377 710383 710389 710399 710441 710443 710449 710459 710473 710483 710491
-710503 710513 710519 710527 710531 710557 710561 710569 710573 710599 710603 710609
-710621 710623 710627 710641 710663 710683 710693 710713 710777 710779 710791 710813
-710837 710839 710849 710851 710863 710867 710873 710887 710903 710909 710911 710917
-710929 710933 710951 710959 710971 710977 710987 710989 711001 711017 711019 711023
-711041 711049 711089 711097 711121 711131 711133 711143 711163 711173 711181 711187
-711209 711223 711259 711287 711299 711307 711317 711329 711353 711371 711397 711409
-711427 711437 711463 711479 711497 711499 711509 711517 711523 711539 711563 711577
-711583 711589 711617 711629 711649 711653 711679 711691 711701 711707 711709 711713
-711727 711731 711749 711751 711757 711793 711811 711817 711829 711839 711847 711859
-711877 711889 711899 711913 711923 711929 711937 711947 711959 711967 711973 711983
-712007 712021 712051 712067 712093 712109 712121 712133 712157 712169 712171 712183
-712199 712219 712237 712279 712289 712301 712303 712319 712321 712331 712339 712357
-712409 712417 712427 712429 712433 712447 712477 712483 712489 712493 712499 712507
-712511 712531 712561 712571 712573 712601 712603 712631 712651 712669 712681 712687
-712693 712697 712711 712717 712739 712781 712807 712819 712837 712841 712843 712847
-712883 712889 712891 712909 712913 712927 712939 712951 712961 712967 712973 712981
-713021 713039 713059 713077 713107 713117 713129 713147 713149 713159 713171 713177
-713183 713189 713191 713227 713233 713239 713243 713261 713267 713281 713287 713309
-713311 713329 713347 713351 713353 713357 713381 713389 713399 713407 713411 713417
-713467 713477 713491 713497 713501 713509 713533 713563 713569 713597 713599 713611
-713627 713653 713663 713681 713737 713743 713747 713753 713771 713807 713827 713831
-713833 713861 713863 713873 713891 713903 713917 713927 713939 713941 713957 713981
-713987 714029 714037 714061 714073 714107 714113 714139 714143 714151 714163 714169
-714199 714223 714227 714247 714257 714283 714341 714349 714361 714377 714443 714463
-714479 714481 714487 714503 714509 714517 714521 714529 714551 714557 714563 714569
-714577 714601 714619 714673 714677 714691 714719 714739 714751 714773 714781 714787
-714797 714809 714827 714839 714841 714851 714853 714869 714881 714887 714893 714907
-714911 714919 714943 714947 714949 714971 714991 715019 715031 715049 715063 715069
-715073 715087 715109 715123 715151 715153 715157 715159 715171 715189 715193 715223
-715229 715237 715243 715249 715259 715289 715301 715303 715313 715339 715357 715361
-715373 715397 715417 715423 715439 715441 715453 715457 715489 715499 715523 715537
-715549 715567 715571 715577 715579 715613 715621 715639 715643 715651 715657 715679
-715681 715699 715727 715739 715753 715777 715789 715801 715811 715817 715823 715843
-715849 715859 715867 715873 715877 715879 715889 715903 715909 715919 715927 715943
-715961 715963 715969 715973 715991 715999 716003 716033 716063 716087 716117 716123
-716137 716143 716161 716171 716173 716249 716257 716279 716291 716299 716321 716351
-716383 716389 716399 716411 716413 716447 716449 716453 716459 716477 716479 716483
-716491 716501 716531 716543 716549 716563 716581 716591 716621 716629 716633 716659
-716663 716671 716687 716693 716707 716713 716731 716741 716743 716747 716783 716789
-716809 716819 716827 716857 716861 716869 716897 716899 716917 716929 716951 716953
-716959 716981 716987 717001 717011 717047 717089 717091 717103 717109 717113 717127
-717133 717139 717149 717151 717161 717191 717229 717259 717271 717289 717293 717317
-717323 717331 717341 717397 717413 717419 717427 717443 717449 717463 717491 717511
-717527 717529 717533 717539 717551 717559 717581 717589 717593 717631 717653 717659
-717667 717679 717683 717697 717719 717751 717797 717803 717811 717817 717841 717851
-717883 717887 717917 717919 717923 717967 717979 717989 718007 718043 718049 718051
-718087 718093 718121 718139 718163 718169 718171 718183 718187 718241 718259 718271
-718303 718321 718331 718337 718343 718349 718357 718379 718381 718387 718391 718411
-718423 718427 718433 718453 718457 718463 718493 718511 718513 718541 718547 718559
-718579 718603 718621 718633 718657 718661 718691 718703 718717 718723 718741 718747
-718759 718801 718807 718813 718841 718847 718871 718897 718901 718919 718931 718937
-718943 718973 718999 719009 719011 719027 719041 719057 719063 719071 719101 719119
-719143 719149 719153 719167 719177 719179 719183 719189 719197 719203 719227 719237
-719239 719267 719281 719297 719333 719351 719353 719377 719393 719413 719419 719441
-719447 719483 719503 719533 719557 719567 719569 719573 719597 719599 719633 719639
-719659 719671 719681 719683 719689 719699 719713 719717 719723 719731 719749 719753
-719773 719779 719791 719801 719813 719821 719833 719839 719893 719903 719911 719941
-719947 719951 719959 719981 719989 720007 720019 720023 720053 720059 720089 720091
-720101 720127 720133 720151 720173 720179 720193 720197 720211 720221 720229 720241
-720253 720257 720281 720283 720289 720299 720301 720311 720319 720359 720361 720367
-720373 720397 720403 720407 720413 720439 720481 720491 720497 720527 720547 720569
-720571 720607 720611 720617 720619 720653 720661 720677 720683 720697 720703 720743
-720763 720767 720773 720779 720791 720793 720829 720847 720857 720869 720877 720887
-720899 720901 720913 720931 720943 720947 720961 720971 720983 720991 720997 721003
-721013 721037 721043 721051 721057 721079 721087 721109 721111 721117 721129 721139
-721141 721159 721163 721169 721177 721181 721199 721207 721213 721219 721223 721229
-721243 721261 721267 721283 721291 721307 721319 721321 721333 721337 721351 721363
-721379 721381 721387 721397 721439 721451 721481 721499 721529 721547 721561 721571
-721577 721597 721613 721619 721621 721631 721661 721663 721687 721697 721703 721709
-721733 721739 721783 721793 721843 721849 721859 721883 721891 721909 721921 721951
-721961 721979 721991 721997 722011 722023 722027 722047 722063 722069 722077 722093
-722119 722123 722147 722149 722153 722159 722167 722173 722213 722237 722243 722257
-722273 722287 722291 722299 722311 722317 722321 722333 722341 722353 722363 722369
-722377 722389 722411 722417 722431 722459 722467 722479 722489 722509 722521 722537
-722539 722563 722581 722599 722611 722633 722639 722663 722669 722713 722723 722737
-722749 722783 722791 722797 722807 722819 722833 722849 722881 722899 722903 722921
-722933 722963 722971 722977 722983 723029 723031 723043 723049 723053 723067 723071
-723089 723101 723103 723109 723113 723119 723127 723133 723157 723161 723167 723169
-723181 723193 723209 723221 723227 723257 723259 723263 723269 723271 723287 723293
-723319 723337 723353 723361 723379 723391 723407 723409 723413 723421 723439 723451
-723467 723473 723479 723491 723493 723529 723551 723553 723559 723563 723587 723589
-723601 723607 723617 723623 723661 723721 723727 723739 723761 723791 723797 723799
-723803 723823 723829 723839 723851 723857 723859 723893 723901 723907 723913 723917
-723923 723949 723959 723967 723973 723977 723997 724001 724007 724021 724079 724093
-724099 724111 724117 724121 724123 724153 724187 724211 724219 724259 724267 724277
-724291 724303 724309 724313 724331 724393 724403 724433 724441 724447 724453 724459
-724469 724481 724487 724499 724513 724517 724519 724531 724547 724553 724567 724573
-724583 724597 724601 724609 724621 724627 724631 724639 724643 724651 724721 724723
-724729 724733 724747 724751 724769 724777 724781 724783 724807 724813 724837 724847
-724853 724879 724901 724903 724939 724949 724961 724967 724991 724993 725009 725041
-725057 725071 725077 725099 725111 725113 725119 725147 725149 725159 725161 725189
-725201 725209 725273 725293 725303 725317 725321 725323 725327 725341 725357 725359
-725371 725381 725393 725399 725423 725437 725447 725449 725479 725507 725519 725531
-725537 725579 725587 725597 725603 725639 725653 725663 725671 725687 725723 725731
-725737 725749 725789 725801 725807 725827 725861 725863 725867 725891 725897 725909
-725929 725939 725953 725981 725983 725993 725999 726007 726013 726023 726043 726071
-726091 726097 726101 726107 726109 726137 726139 726149 726157 726163 726169 726181
-726191 726221 726287 726289 726301 726307 726331 726337 726367 726371 726377 726379
-726391 726413 726419 726431 726457 726463 726469 726487 726497 726521 726527 726533
-726559 726589 726599 726601 726611 726619 726623 726629 726641 726647 726659 726679
-726689 726697 726701 726707 726751 726779 726787 726797 726809 726811 726839 726841
-726853 726893 726899 726911 726917 726923 726941 726953 726983 726989 726991 727003
-727009 727019 727021 727049 727061 727063 727079 727121 727123 727157 727159 727169
-727183 727189 727201 727211 727241 727247 727249 727261 727267 727271 727273 727289
-727297 727313 727327 727343 727351 727369 727399 727409 727427 727451 727459 727471
-727483 727487 727499 727501 727541 727561 727577 727589 727613 727621 727633 727667
-727673 727691 727703 727711 727717 727729 727733 727747 727759 727763 727777 727781
-727799 727807 727817 727823 727843 727847 727877 727879 727891 727933 727939 727949
-727981 727997 728003 728017 728027 728047 728069 728087 728113 728129 728131 728173
-728191 728207 728209 728261 728267 728269 728281 728293 728303 728317 728333 728369
-728381 728383 728417 728423 728437 728471 728477 728489 728521 728527 728537 728551
-728557 728561 728573 728579 728627 728639 728647 728659 728681 728687 728699 728701
-728713 728723 728729 728731 728743 728747 728771 728809 728813 728831 728837 728839
-728843 728851 728867 728869 728873 728881 728891 728899 728911 728921 728927 728929
-728941 728947 728953 728969 728971 728993 729019 729023 729037 729041 729059 729073
-729139 729143 729173 729187 729191 729199 729203 729217 729257 729269 729271 729293
-729301 729329 729331 729359 729367 729371 729373 729389 729403 729413 729451 729457
-729473 729493 729497 729503 729511 729527 729551 729557 729559 729569 729571 729577
-729587 729601 729607 729613 729637 729643 729649 729661 729671 729679 729689 729713
-729719 729737 729749 729761 729779 729787 729791 729821 729851 729871 729877 729907
-729913 729919 729931 729941 729943 729947 729977 729979 729991 730003 730021 730033
-730049 730069 730091 730111 730139 730157 730187 730199 730217 730237 730253 730277
-730283 730297 730321 730339 730363 730397 730399 730421 730447 730451 730459 730469
-730487 730537 730553 730559 730567 730571 730573 730589 730591 730603 730619 730633
-730637 730663 730669 730679 730727 730747 730753 730757 730777 730781 730783 730789
-730799 730811 730819 730823 730837 730843 730853 730867 730879 730889 730901 730909
-730913 730943 730969 730973 730993 730999 731033 731041 731047 731053 731057 731113
-731117 731141 731173 731183 731189 731191 731201 731209 731219 731233 731243 731249
-731251 731257 731261 731267 731287 731299 731327 731333 731359 731363 731369 731389
-731413 731447 731483 731501 731503 731509 731531 731539 731567 731587 731593 731597
-731603 731611 731623 731639 731651 731681 731683 731711 731713 731719 731729 731737
-731741 731761 731767 731779 731803 731807 731821 731827 731831 731839 731851 731869
-731881 731893 731909 731911 731921 731923 731933 731957 731981 731999 732023 732029
-732041 732073 732077 732079 732097 732101 732133 732157 732169 732181 732187 732191
-732197 732209 732211 732217 732229 732233 732239 732257 732271 732283 732287 732293
-732299 732311 732323 732331 732373 732439 732449 732461 732467 732491 732493 732497
-732509 732521 732533 732541 732601 732617 732631 732653 732673 732689 732703 732709
-732713 732731 732749 732761 732769 732799 732817 732827 732829 732833 732841 732863
-732877 732889 732911 732923 732943 732959 732967 732971 732997 733003 733009 733067
-733097 733099 733111 733123 733127 733133 733141 733147 733157 733169 733177 733189
-733237 733241 733273 733277 733283 733289 733301 733307 733321 733331 733333 733339
-733351 733373 733387 733391 733393 733399 733409 733427 733433 733459 733477 733489
-733511 733517 733519 733559 733561 733591 733619 733639 733651 733687 733697 733741
-733751 733753 733757 733793 733807 733813 733823 733829 733841 733847 733849 733867
-733871 733879 733883 733919 733921 733937 733939 733949 733963 733973 733981 733991
-734003 734017 734021 734047 734057 734087 734113 734131 734143 734159 734171 734177
-734189 734197 734203 734207 734221 734233 734263 734267 734273 734291 734303 734329
-734347 734381 734389 734401 734411 734423 734429 734431 734443 734471 734473 734477
-734479 734497 734537 734543 734549 734557 734567 734627 734647 734653 734659 734663
-734687 734693 734707 734717 734729 734737 734743 734759 734771 734803 734807 734813
-734819 734837 734849 734869 734879 734887 734897 734911 734933 734941 734953 734957
-734959 734971 735001 735019 735043 735061 735067 735071 735073 735083 735107 735109
-735113 735139 735143 735157 735169 735173 735181 735187 735193 735209 735211 735239
-735247 735263 735271 735283 735307 735311 735331 735337 735341 735359 735367 735373
-735389 735391 735419 735421 735431 735439 735443 735451 735461 735467 735473 735479
-735491 735529 735533 735557 735571 735617 735649 735653 735659 735673 735689 735697
-735719 735731 735733 735739 735751 735781 735809 735821 735829 735853 735871 735877
-735883 735901 735919 735937 735949 735953 735979 735983 735997 736007 736013 736027
-736037 736039 736051 736061 736063 736091 736093 736097 736111 736121 736147 736159
-736181 736187 736243 736247 736249 736259 736273 736277 736279 736357 736361 736363
-736367 736369 736381 736387 736399 736403 736409 736429 736433 736441 736447 736469
-736471 736511 736577 736607 736639 736657 736679 736691 736699 736717 736721 736741
-736787 736793 736817 736823 736843 736847 736867 736871 736889 736903 736921 736927
-736937 736951 736961 736973 736987 736993 737017 737039 737041 737047 737053 737059
-737083 737089 737111 737119 737129 737131 737147 737159 737179 737183 737203 737207
-737251 737263 737279 737281 737287 737291 737293 737309 737327 737339 737351 737353
-737411 737413 737423 737431 737479 737483 737497 737501 737507 737509 737531 737533
-737537 737563 737567 737573 737591 737593 737617 737629 737641 737657 737663 737683
-737687 737717 737719 737729 737747 737753 737767 737773 737797 737801 737809 737819
-737843 737857 737861 737873 737887 737897 737921 737927 737929 737969 737981 737999
-738011 738029 738043 738053 738071 738083 738107 738109 738121 738151 738163 738173
-738197 738211 738217 738223 738247 738263 738301 738313 738317 738319 738341 738349
-738373 738379 738383 738391 738401 738403 738421 738443 738457 738469 738487 738499
-738509 738523 738539 738547 738581 738583 738589 738623 738643 738677 738707 738713
-738721 738743 738757 738781 738791 738797 738811 738827 738839 738847 738851 738863
-738877 738889 738917 738919 738923 738937 738953 738961 738977 738989 739003 739021
-739027 739031 739051 739061 739069 739087 739099 739103 739111 739117 739121 739153
-739163 739171 739183 739187 739199 739201 739217 739241 739253 739273 739283 739301
-739303 739307 739327 739331 739337 739351 739363 739369 739373 739379 739391 739393
-739397 739399 739433 739439 739463 739469 739493 739507 739511 739513 739523 739549
-739553 739579 739601 739603 739621 739631 739633 739637 739649 739693 739699 739723
-739751 739759 739771 739777 739787 739799 739813 739829 739847 739853 739859 739861
-739909 739931 739943 739951 739957 739967 739969 740011 740021 740023 740041 740053
-740059 740087 740099 740123 740141 740143 740153 740161 740171 740189 740191 740227
-740237 740279 740287 740303 740321 740323 740329 740351 740359 740371 740387 740423
-740429 740461 740473 740477 740483 740513 740521 740527 740533 740549 740561 740581
-740591 740599 740603 740651 740653 740659 740671 740681 740687 740693 740711 740713
-740717 740737 740749 740801 740849 740891 740893 740897 740903 740923 740939 740951
-740969 740989 741001 741007 741011 741031 741043 741053 741061 741071 741077 741079
-741101 741119 741121 741127 741131 741137 741163 741187 741193 741227 741229 741233
-741253 741283 741337 741341 741343 741347 741373 741401 741409 741413 741431 741457
-741467 741469 741473 741479 741491 741493 741509 741541 741547 741563 741569 741593
-741599 741641 741661 741667 741677 741679 741683 741691 741709 741721 741781 741787
-741803 741809 741827 741833 741847 741857 741859 741869 741877 741883 741913 741929
-741941 741967 741973 741991 742009 742031 742037 742057 742069 742073 742111 742117
-742127 742151 742153 742193 742199 742201 742211 742213 742219 742229 742241 742243
-742253 742277 742283 742289 742307 742327 742333 742351 742369 742381 742393 742409
-742439 742457 742499 742507 742513 742519 742531 742537 742541 742549 742559 742579
-742591 742607 742619 742657 742663 742673 742681 742697 742699 742711 742717 742723
-742757 742759 742783 742789 742801 742817 742891 742897 742909 742913 742943 742949
-742967 742981 742991 742993 742999 743027 743047 743059 743069 743089 743111 743123
-743129 743131 743137 743143 743159 743161 743167 743173 743177 743179 743203 743209
-743221 743251 743263 743269 743273 743279 743297 743321 743333 743339 743363 743377
-743401 743423 743447 743507 743549 743551 743573 743579 743591 743609 743657 743669
-743671 743689 743693 743711 743731 743747 743777 743779 743791 743803 743819 743833
-743837 743849 743851 743881 743891 743917 743921 743923 743933 743947 743987 743989
-744019 744043 744071 744077 744083 744113 744127 744137 744179 744187 744199 744203
-744221 744239 744251 744253 744283 744301 744313 744353 744371 744377 744389 744391
-744397 744407 744409 744431 744451 744493 744503 744511 744539 744547 744559 744599
-744607 744637 744641 744649 744659 744661 744677 744701 744707 744721 744727 744739
-744761 744767 744791 744811 744817 744823 744829 744833 744859 744893 744911 744917
-744941 744949 744959 744977 745001 745013 745027 745033 745037 745051 745067 745103
-745117 745133 745141 745181 745187 745189 745201 745231 745243 745247 745249 745273
-745301 745307 745337 745343 745357 745369 745379 745391 745397 745471 745477 745517
-745529 745531 745543 745567 745573 745601 745609 745621 745631 745649 745673 745697
-745699 745709 745711 745727 745733 745741 745747 745751 745753 745757 745817 745837
-745859 745873 745903 745931 745933 745939 745951 745973 745981 745993 745999 746017
-746023 746033 746041 746047 746069 746099 746101 746107 746117 746129 746153 746167
-746171 746177 746183 746191 746197 746203 746209 746227 746231 746233 746243 746267
-746287 746303 746309 746329 746353 746363 746371 746411 746413 746429 746477 746479
-746483 746497 746503 746507 746509 746531 746533 746561 746563 746597 746653 746659
-746671 746677 746723 746737 746743 746747 746749 746773 746777 746791 746797 746807
-746813 746839 746843 746869 746873 746891 746899 746903 746939 746951 746957 746959
-746969 746981 746989 747037 747049 747053 747073 747107 747113 747139 747157 747161
-747199 747203 747223 747239 747259 747277 747283 747287 747319 747323 747343 747361
-747377 747391 747401 747407 747421 747427 747449 747451 747457 747463 747493 747497
-747499 747521 747529 747547 747557 747563 747583 747587 747599 747611 747619 747647
-747673 747679 747713 747731 747737 747743 747763 747781 747811 747827 747829 747833
-747839 747841 747853 747863 747869 747871 747889 747917 747919 747941 747953 747977
-747979 747991 748003 748019 748021 748039 748057 748091 748093 748133 748169 748183
-748199 748207 748211 748217 748219 748249 748271 748273 748283 748301 748331 748337
-748339 748343 748361 748379 748387 748441 748453 748463 748471 748481 748487 748499
-748513 748523 748541 748567 748589 748597 748603 748609 748613 748633 748637 748639
-748669 748687 748691 748703 748711 748717 748723 748729 748763 748777 748789 748801
-748807 748817 748819 748823 748829 748831 748849 748861 748871 748877 748883 748889
-748921 748933 748963 748973 748981 748987 749011 749027 749051 749069 749081 749083
-749093 749129 749137 749143 749149 749153 749167 749171 749183 749197 749209 749219
-749237 749249 749257 749267 749279 749297 749299 749323 749339 749347 749351 749383
-749393 749401 749423 749429 749431 749443 749449 749453 749461 749467 749471 749543
-749557 749587 749641 749653 749659 749677 749701 749711 749729 749741 749747 749761
-749773 749779 749803 749807 749809 749843 749851 749863 749891 749893 749899 749909
-749923 749927 749939 749941 749971 749993 750019 750037 750059 750077 750083 750097
-750119 750121 750131 750133 750137 750151 750157 750161 750163 750173 750179 750203
-750209 750223 750229 750287 750311 750313 750353 750383 750401 750413 750419 750437
-750457 750473 750487 750509 750517 750521 750553 750571 750599 750613 750641 750653
-750661 750667 750679 750691 750707 750713 750719 750721 750749 750769 750787 750791
-750797 750803 750809 750817 750829 750853 750857 750863 750917 750929 750943 750961
-750977 750983 751001 751007 751021 751027 751057 751061 751087 751103 751123 751133
-751139 751141 751147 751151 751181 751183 751189 751193 751199 751207 751217 751237
-751259 751273 751277 751291 751297 751301 751307 751319 751321 751327 751343 751351
-751357 751363 751367 751379 751411 751423 751447 751453 751463 751481 751523 751529
-751549 751567 751579 751609 751613 751627 751631 751633 751637 751643 751661 751669
-751691 751711 751717 751727 751739 751747 751753 751759 751763 751787 751799 751813
-751823 751841 751853 751867 751871 751879 751901 751909 751913 751921 751943 751957
-751969 751987 751997 752009 752023 752033 752053 752083 752093 752107 752111 752117
-752137 752149 752177 752183 752189 752197 752201 752203 752207 752251 752263 752273
-752281 752287 752291 752293 752299 752303 752351 752359 752383 752413 752431 752447
-752449 752459 752483 752489 752503 752513 752519 752527 752569 752581 752593 752603
-752627 752639 752651 752681 752683 752699 752701 752707 752747 752771 752789 752797
-752803 752809 752819 752821 752831 752833 752861 752867 752881 752891 752903 752911
-752929 752933 752977 752993 753001 753007 753019 753023 753031 753079 753091 753127
-753133 753139 753143 753161 753187 753191 753197 753229 753257 753307 753329 753341
-753353 753367 753373 753383 753409 753421 753427 753437 753439 753461 753463 753497
-753499 753527 753547 753569 753583 753587 753589 753611 753617 753619 753631 753647
-753659 753677 753679 753689 753691 753707 753719 753721 753737 753743 753751 753773
-753793 753799 753803 753811 753821 753839 753847 753859 753931 753937 753941 753947
-753959 753979 753983 754003 754027 754037 754043 754057 754067 754073 754081 754093
-754099 754109 754111 754121 754123 754133 754153 754157 754181 754183 754207 754211
-754217 754223 754241 754249 754267 754279 754283 754289 754297 754301 754333 754337
-754343 754367 754373 754379 754381 754399 754417 754421 754427 754451 754463 754483
-754489 754513 754531 754549 754573 754577 754583 754597 754627 754639 754651 754703
-754709 754711 754717 754723 754739 754751 754771 754781 754811 754829 754861 754877
-754891 754903 754907 754921 754931 754937 754939 754967 754969 754973 754979 754981
-754991 754993 755009 755033 755057 755071 755077 755081 755087 755107 755137 755143
-755147 755171 755173 755203 755213 755233 755239 755257 755267 755273 755309 755311
-755317 755329 755333 755351 755357 755371 755387 755393 755399 755401 755413 755437
-755441 755449 755473 755483 755509 755539 755551 755561 755567 755569 755593 755597
-755617 755627 755663 755681 755707 755717 755719 755737 755759 755767 755771 755789
-755791 755809 755813 755861 755863 755869 755879 755899 755903 755959 755969 755977
-756011 756023 756043 756053 756097 756101 756127 756131 756139 756149 756167 756179
-756191 756199 756227 756247 756251 756253 756271 756281 756289 756293 756319 756323
-756331 756373 756403 756419 756421 756433 756443 756463 756467 756527 756533 756541
-756563 756571 756593 756601 756607 756629 756641 756649 756667 756673 756683 756689
-756703 756709 756719 756727 756739 756773 756799 756829 756839 756853 756869 756881
-756887 756919 756923 756961 756967 756971 757019 757039 757063 757067 757109 757111
-757151 757157 757171 757181 757201 757241 757243 757247 757259 757271 757291 757297
-757307 757319 757327 757331 757343 757363 757381 757387 757403 757409 757417 757429
-757433 757457 757481 757487 757507 757513 757517 757543 757553 757577 757579 757583
-757607 757633 757651 757661 757693 757699 757709 757711 757727 757751 757753 757763
-757793 757807 757811 757819 757829 757879 757903 757909 757927 757937 757943 757951
-757993 757997 758003 758029 758041 758053 758071 758083 758099 758101 758111 758137
-758141 758159 758179 758189 758201 758203 758227 758231 758237 758243 758267 758269
-758273 758279 758299 758323 758339 758341 758357 758363 758383 758393 758411 758431
-758441 758449 758453 758491 758501 758503 758519 758521 758551 758561 758573 758579
-758599 758617 758629 758633 758671 758687 758699 758707 758711 758713 758729 758731
-758741 758743 758753 758767 758783 758789 758819 758827 758837 758851 758867 758887
-758893 758899 758929 758941 758957 758963 758969 758971 758987 759001 759019 759029
-759037 759047 759053 759089 759103 759113 759131 759149 759167 759173 759179 759181
-759193 759223 759229 759263 759287 759293 759301 759313 759329 759359 759371 759377
-759397 759401 759431 759433 759457 759463 759467 759491 759503 759523 759547 759553
-759557 759559 759569 759571 759581 759589 759599 759617 759623 759631 759637 759641
-759653 759659 759673 759691 759697 759701 759709 759719 759727 759739 759757 759763
-759797 759799 759821 759833 759881 759893 759911 759923 759929 759947 759953 759959
-759961 759973 760007 760043 760063 760079 760093 760103 760117 760129 760141 760147
-760153 760163 760169 760183 760187 760211 760229 760231 760237 760241 760261 760267
-760273 760289 760297 760301 760321 760343 760367 760373 760411 760423 760433 760447
-760453 760457 760477 760489 760499 760511 760519 760531 760537 760549 760553 760561
-760567 760579 760607 760619 760621 760637 760649 760657 760693 760723 760729 760759
-760769 760783 760807 760813 760841 760843 760847 760871 760891 760897 760901 760913
-760927 760933 760939 760951 760961 760993 760997 761003 761009 761023 761051 761069
-761087 761113 761119 761129 761153 761161 761177 761179 761183 761203 761207 761213
-761227 761249 761251 761261 761263 761291 761297 761347 761351 761357 761363 761377
-761381 761389 761393 761399 761407 761417 761429 761437 761441 761443 761459 761471
-761477 761483 761489 761521 761531 761533 761543 761561 761567 761591 761597 761603
-761611 761623 761633 761669 761671 761681 761689 761711 761713 761731 761773 761777
-761779 761807 761809 761833 761861 761863 761869 761879 761897 761927 761939 761963
-761977 761983 761993 762001 762007 762017 762031 762037 762049 762053 762061 762101
-762121 762187 762211 762227 762233 762239 762241 762253 762257 762277 762319 762329
-762367 762371 762373 762379 762389 762397 762401 762407 762409 762479 762491 762499
-762529 762539 762547 762557 762563 762571 762577 762583 762599 762647 762653 762659
-762667 762721 762737 762743 762761 762779 762791 762809 762821 762823 762847 762871
-762877 762893 762899 762901 762913 762917 762919 762959 762967 762973 762989 763001
-763013 763027 763031 763039 763043 763067 763073 763093 763111 763123 763141 763157
-763159 763183 763201 763223 763237 763261 763267 763271 763303 763307 763339 763349
-763369 763381 763391 763403 763409 763417 763423 763429 763447 763457 763471 763481
-763493 763513 763523 763549 763559 763573 763579 763583 763597 763601 763613 763619
-763621 763627 763649 763663 763673 763699 763739 763751 763753 763757 763771 763787
-763801 763811 763823 763843 763859 763879 763883 763897 763901 763907 763913 763921
-763927 763937 763943 763957 763967 763999 764003 764011 764017 764021 764041 764051
-764053 764059 764081 764089 764111 764131 764143 764149 764171 764189 764209 764233
-764249 764251 764261 764273 764293 764317 764321 764327 764339 764341 764369 764381
-764399 764431 764447 764459 764471 764501 764521 764539 764551 764563 764587 764591
-764593 764611 764623 764627 764629 764657 764683 764689 764717 764719 764723 764783
-764789 764809 764837 764839 764849 764857 764887 764891 764893 764899 764903 764947
-764969 764971 764977 764989 764993 764999 765007 765031 765041 765043 765047 765059
-765091 765097 765103 765109 765131 765137 765139 765143 765151 765169 765181 765199
-765203 765209 765211 765227 765229 765241 765251 765257 765283 765287 765293 765307
-765313 765319 765329 765353 765379 765383 765389 765409 765437 765439 765461 765467
-765487 765497 765503 765521 765533 765539 765577 765581 765587 765613 765619 765623
-765649 765659 765673 765707 765727 765749 765763 765767 765773 765781 765823 765827
-765847 765851 765857 765859 765881 765889 765893 765899 765907 765913 765931 765949
-765953 765971 765983 765991 766021 766039 766049 766067 766079 766091 766097 766109
-766111 766127 766163 766169 766177 766187 766211 766223 766229 766231 766237 766247
-766261 766273 766277 766301 766313 766321 766333 766357 766361 766369 766373 766387
-766393 766399 766421 766439 766453 766457 766471 766477 766487 766501 766511 766531
-766541 766543 766553 766559 766583 766609 766637 766639 766651 766679 766687 766721
-766739 766757 766763 766769 766793 766807 766811 766813 766817 766861 766867 766873
-766877 766891 766901 766907 766937 766939 766943 766957 766967 766999 767017 767029
-767051 767071 767089 767093 767101 767111 767131 767147 767153 767161 767167 767203
-767243 767279 767287 767293 767309 767317 767321 767323 767339 767357 767359 767381
-767399 767423 767443 767471 767489 767509 767513 767521 767527 767537 767539 767549
-767551 767587 767597 767603 767617 767623 767633 767647 767677 767681 767707 767729
-767747 767749 767759 767761 767773 767783 767813 767827 767831 767843 767857 767863
-767867 767869 767881 767909 767951 767957 768013 768029 768041 768049 768059 768073
-768101 768107 768127 768133 768139 768161 768167 768169 768191 768193 768197 768199
-768203 768221 768241 768259 768263 768301 768319 768323 768329 768343 768347 768353
-768359 768371 768373 768377 768389 768401 768409 768419 768431 768437 768457 768461
-768479 768491 768503 768541 768563 768571 768589 768613 768623 768629 768631 768641
-768643 768653 768671 768727 768751 768767 768773 768787 768793 768799 768811 768841
-768851 768853 768857 768869 768881 768923 768931 768941 768953 768979 768983 769003
-769007 769019 769033 769039 769057 769073 769081 769091 769117 769123 769147 769151
-769159 769169 769207 769231 769243 769247 769259 769261 769273 769289 769297 769309
-769319 769339 769357 769387 769411 769421 769423 769429 769453 769459 769463 769469
-769487 769541 769543 769547 769553 769577 769579 769589 769591 769597 769619 769627
-769661 769663 769673 769687 769723 769729 769733 769739 769751 769781 769789 769799
-769807 769837 769871 769903 769919 769927 769943 769961 769963 769973 769987 769997
-769999 770027 770039 770041 770047 770053 770057 770059 770069 770101 770111 770113
-770123 770129 770167 770177 770179 770183 770191 770207 770227 770233 770239 770261
-770281 770291 770309 770311 770353 770359 770387 770401 770417 770437 770447 770449
-770459 770503 770519 770527 770533 770537 770551 770557 770573 770579 770587 770591
-770597 770611 770639 770641 770647 770657 770663 770669 770741 770761 770767 770771
-770789 770801 770813 770837 770839 770843 770863 770867 770873 770881 770897 770909
-770927 770929 770951 770971 770981 770993 771011 771013 771019 771031 771037 771047
-771049 771073 771079 771091 771109 771143 771163 771179 771181 771209 771217 771227
-771233 771269 771283 771289 771293 771299 771301 771349 771359 771389 771401 771403
-771427 771431 771437 771439 771461 771473 771481 771499 771503 771509 771517 771527
-771553 771569 771583 771587 771607 771619 771623 771629 771637 771643 771653 771679
-771691 771697 771703 771739 771763 771769 771781 771809 771853 771863 771877 771887
-771889 771899 771917 771937 771941 771961 771971 771973 771997 772001 772003 772019
-772061 772073 772081 772091 772097 772127 772139 772147 772159 772169 772181 772207
-772229 772231 772273 772279 772297 772313 772333 772339 772349 772367 772379 772381
-772391 772393 772403 772439 772441 772451 772459 772477 772493 772517 772537 772567
-772571 772573 772591 772619 772631 772649 772657 772661 772663 772669 772691 772697
-772703 772721 772757 772771 772789 772843 772847 772853 772859 772867 772903 772907
-772909 772913 772921 772949 772963 772987 772991 773021 773023 773027 773029 773039
-773057 773063 773081 773083 773093 773117 773147 773153 773159 773207 773209 773231
-773239 773249 773251 773273 773287 773299 773317 773341 773363 773371 773387 773393
-773407 773417 773447 773453 773473 773491 773497 773501 773533 773537 773561 773567
-773569 773579 773599 773603 773609 773611 773657 773659 773681 773683 773693 773713
-773719 773723 773767 773777 773779 773803 773821 773831 773837 773849 773863 773867
-773869 773879 773897 773909 773933 773939 773951 773953 773987 773989 773999 774001
-774017 774023 774047 774071 774073 774083 774107 774119 774127 774131 774133 774143
-774149 774161 774173 774181 774199 774217 774223 774229 774233 774239 774283 774289
-774313 774317 774337 774343 774377 774427 774439 774463 774467 774491 774511 774523
-774541 774551 774577 774583 774589 774593 774601 774629 774643 774661 774667 774671
-774679 774691 774703 774733 774757 774773 774779 774791 774797 774799 774803 774811
-774821 774833 774853 774857 774863 774901 774919 774929 774931 774959 774997 775007
-775037 775043 775057 775063 775079 775087 775091 775097 775121 775147 775153 775157
-775163 775189 775193 775237 775241 775259 775267 775273 775309 775343 775349 775361
-775363 775367 775393 775417 775441 775451 775477 775507 775513 775517 775531 775553
-775573 775601 775603 775613 775627 775633 775639 775661 775669 775681 775711 775729
-775739 775741 775757 775777 775787 775807 775811 775823 775861 775871 775889 775919
-775933 775937 775939 775949 775963 775987 776003 776029 776047 776057 776059 776077
-776099 776117 776119 776137 776143 776159 776173 776177 776179 776183 776201 776219
-776221 776233 776249 776257 776267 776287 776317 776327 776357 776389 776401 776429
-776449 776453 776467 776471 776483 776497 776507 776513 776521 776551 776557 776561
-776563 776569 776599 776627 776651 776683 776693 776719 776729 776749 776753 776759
-776801 776813 776819 776837 776851 776861 776869 776879 776887 776899 776921 776947
-776969 776977 776983 776987 777001 777011 777013 777031 777041 777071 777097 777103
-777109 777137 777143 777151 777167 777169 777173 777181 777187 777191 777199 777209
-777221 777241 777247 777251 777269 777277 777313 777317 777349 777353 777373 777383
-777389 777391 777419 777421 777431 777433 777437 777451 777463 777473 777479 777541
-777551 777571 777583 777589 777617 777619 777641 777643 777661 777671 777677 777683
-777731 777737 777743 777761 777769 777781 777787 777817 777839 777857 777859 777863
-777871 777877 777901 777911 777919 777977 777979 777989 778013 778027 778049 778051
-778061 778079 778081 778091 778097 778109 778111 778121 778123 778153 778163 778187
-778201 778213 778223 778237 778241 778247 778301 778307 778313 778319 778333 778357
-778361 778363 778391 778397 778403 778409 778417 778439 778469 778507 778511 778513
-778523 778529 778537 778541 778553 778559 778567 778579 778597 778633 778643 778663
-778667 778681 778693 778697 778699 778709 778717 778727 778733 778759 778763 778769
-778777 778793 778819 778831 778847 778871 778873 778879 778903 778907 778913 778927
-778933 778951 778963 778979 778993 779003 779011 779021 779039 779063 779069 779081
-779101 779111 779131 779137 779159 779173 779189 779221 779231 779239 779249 779267
-779327 779329 779341 779347 779351 779353 779357 779377 779413 779477 779489 779507
-779521 779531 779543 779561 779563 779573 779579 779591 779593 779599 779609 779617
-779621 779657 779659 779663 779693 779699 779707 779731 779747 779749 779761 779767
-779771 779791 779797 779827 779837 779869 779873 779879 779887 779899 779927 779939
-779971 779981 779983 779993 780029 780037 780041 780047 780049 780061 780119 780127
-780163 780173 780179 780191 780193 780211 780223 780233 780253 780257 780287 780323
-780343 780347 780371 780379 780383 780389 780397 780401 780421 780433 780457 780469
-780499 780523 780553 780583 780587 780601 780613 780631 780649 780667 780671 780679
-780683 780697 780707 780719 780721 780733 780799 780803 780809 780817 780823 780833
-780841 780851 780853 780869 780877 780887 780889 780917 780931 780953 780961 780971
-780973 780991 781003 781007 781021 781043 781051 781063 781069 781087 781111 781117
-781127 781129 781139 781163 781171 781199 781211 781217 781229 781243 781247 781271
-781283 781301 781307 781309 781321 781327 781351 781357 781367 781369 781387 781397
-781399 781409 781423 781427 781433 781453 781481 781483 781493 781511 781513 781519
-781523 781531 781559 781567 781589 781601 781607 781619 781631 781633 781661 781673
-781681 781721 781733 781741 781771 781799 781801 781817 781819 781853 781861 781867
-781883 781889 781897 781919 781951 781961 781967 781969 781973 781987 781997 781999
-782003 782009 782011 782053 782057 782071 782083 782087 782107 782113 782123 782129
-782137 782141 782147 782149 782183 782189 782191 782209 782219 782231 782251 782263
-782267 782297 782311 782329 782339 782371 782381 782387 782389 782393 782429 782443
-782461 782473 782489 782497 782501 782519 782539 782581 782611 782641 782659 782669
-782671 782687 782689 782707 782711 782723 782777 782783 782791 782839 782849 782861
-782891 782911 782921 782941 782963 782981 782983 782993 783007 783011 783019 783023
-783043 783077 783089 783119 783121 783131 783137 783143 783149 783151 783191 783193
-783197 783227 783247 783257 783259 783269 783283 783317 783323 783329 783337 783359
-783361 783373 783379 783407 783413 783421 783473 783487 783527 783529 783533 783553
-783557 783569 783571 783599 783613 783619 783641 783647 783661 783677 783689 783691
-783701 783703 783707 783719 783721 783733 783737 783743 783749 783763 783767 783779
-783781 783787 783791 783793 783799 783803 783829 783869 783877 783931 783953 784009
-784039 784061 784081 784087 784097 784103 784109 784117 784129 784153 784171 784181
-784183 784211 784213 784219 784229 784243 784249 784283 784307 784309 784313 784321
-784327 784349 784351 784367 784373 784379 784387 784409 784411 784423 784447 784451
-784457 784463 784471 784481 784489 784501 784513 784541 784543 784547 784561 784573
-784577 784583 784603 784627 784649 784661 784687 784697 784717 784723 784727 784753
-784789 784799 784831 784837 784841 784859 784867 784897 784913 784919 784939 784957
-784961 784981 785003 785017 785033 785053 785093 785101 785107 785119 785123 785129
-785143 785153 785159 785167 785203 785207 785219 785221 785227 785249 785269 785287
-785293 785299 785303 785311 785321 785329 785333 785341 785347 785353 785357 785363
-785377 785413 785423 785431 785459 785461 785483 785501 785503 785527 785537 785549
-785569 785573 785579 785591 785597 785623 785627 785641 785651 785671 785693 785717
-785731 785737 785753 785773 785777 785779 785801 785803 785809 785839 785857 785861
-785879 785903 785921 785923 785947 785951 785963 786001 786013 786017 786031 786047
-786053 786059 786061 786077 786109 786127 786151 786167 786173 786179 786197 786211
-786223 786241 786251 786271 786307 786311 786319 786329 786337 786349 786371 786407
-786419 786431 786433 786449 786469 786491 786547 786551 786553 786587 786589 786613
-786629 786659 786661 786673 786691 786697 786701 786703 786707 786719 786739 786763
-786803 786823 786829 786833 786859 786881 786887 786889 786901 786931 786937 786941
-786949 786959 786971 786979 786983 787021 787043 787051 787057 787067 787069 787079
-787091 787099 787123 787139 787153 787181 787187 787207 787217 787243 787261 787277
-787289 787309 787331 787333 787337 787357 787361 787427 787429 787433 787439 787447
-787469 787477 787483 787489 787513 787517 787519 787529 787537 787541 787547 787573
-787601 787609 787621 787639 787649 787667 787697 787711 787747 787751 787757 787769
-787771 787777 787783 787793 787807 787811 787817 787823 787837 787879 787883 787903
-787907 787939 787973 787981 787993 787999 788009 788023 788027 788033 788041 788071
-788077 788087 788089 788093 788107 788129 788153 788159 788167 788173 788189 788209
-788213 788231 788261 788267 788287 788309 788317 788321 788351 788353 788357 788363
-788369 788377 788383 788387 788393 788399 788413 788419 788429 788449 788467 788479
-788497 788521 788527 788531 788537 788549 788561 788563 788569 788603 788621 788651
-788659 788677 788687 788701 788719 788761 788779 788789 788813 788819 788849 788863
-788867 788869 788873 788891 788897 788903 788927 788933 788941 788947 788959 788971
-788993 788999 789001 789017 789029 789031 789067 789077 789091 789097 789101 789109
-789121 789133 789137 789149 789169 789181 789221 789227 789251 789311 789323 789331
-789343 789367 789377 789389 789391 789407 789419 789443 789473 789491 789493 789511
-789527 789533 789557 789571 789577 789587 789589 789611 789623 789631 789653 789671
-789673 789683 789689 789709 789713 789721 789731 789739 789749 789793 789823 789829
-789847 789851 789857 789883 789941 789959 789961 789967 789977 789979 790003 790021
-790033 790043 790051 790057 790063 790087 790093 790099 790121 790169 790171 790189
-790199 790201 790219 790241 790261 790271 790277 790289 790291 790327 790331 790333
-790351 790369 790379 790397 790403 790417 790421 790429 790451 790459 790481 790501
-790513 790519 790523 790529 790547 790567 790583 790589 790607 790613 790633 790637
-790649 790651 790693 790697 790703 790709 790733 790739 790747 790753 790781 790793
-790817 790819 790831 790843 790861 790871 790879 790883 790897 790927 790957 790961
-790967 790969 790991 790997 791003 791009 791017 791029 791047 791053 791081 791093
-791099 791111 791117 791137 791159 791191 791201 791209 791227 791233 791251 791257
-791261 791291 791309 791311 791317 791321 791347 791363 791377 791387 791411 791419
-791431 791443 791447 791473 791489 791519 791543 791561 791563 791569 791573 791599
-791627 791629 791657 791663 791677 791699 791773 791783 791789 791797 791801 791803
-791827 791849 791851 791887 791891 791897 791899 791909 791927 791929 791933 791951
-791969 791971 791993 792023 792031 792037 792041 792049 792061 792067 792073 792101
-792107 792109 792119 792131 792151 792163 792179 792223 792227 792229 792241 792247
-792257 792263 792277 792283 792293 792299 792301 792307 792317 792359 792371 792377
-792383 792397 792413 792443 792461 792479 792481 792487 792521 792529 792551 792553
-792559 792563 792581 792593 792601 792613 792629 792637 792641 792643 792647 792667
-792679 792689 792691 792697 792703 792709 792713 792731 792751 792769 792793 792797
-792821 792871 792881 792893 792907 792919 792929 792941 792959 792973 792983 792989
-792991 793043 793069 793099 793103 793123 793129 793139 793159 793181 793187 793189
-793207 793229 793253 793279 793297 793301 793327 793333 793337 793343 793379 793399
-793439 793447 793453 793487 793489 793493 793511 793517 793519 793537 793547 793553
-793561 793591 793601 793607 793621 793627 793633 793669 793673 793691 793699 793711
-793717 793721 793733 793739 793757 793769 793777 793787 793789 793813 793841 793843
-793853 793867 793889 793901 793927 793931 793939 793957 793967 793979 793981 793999
-794009 794011 794023 794033 794039 794041 794063 794071 794077 794089 794111 794113
-794119 794137 794141 794149 794153 794161 794173 794179 794191 794201 794203 794207
-794221 794231 794239 794249 794327 794341 794363 794383 794389 794399 794407 794413
-794449 794471 794473 794477 794483 794491 794509 794531 794537 794543 794551 794557
-794569 794579 794587 794593 794641 794653 794657 794659 794669 794693 794711 794741
-794743 794749 794779 794831 794879 794881 794887 794921 794923 794953 794957 794993
-794999 795001 795007 795023 795071 795077 795079 795083 795097 795101 795103 795121
-795127 795139 795149 795161 795187 795203 795211 795217 795233 795239 795251 795253
-795299 795307 795323 795329 795337 795343 795349 795427 795449 795461 795467 795479
-795493 795503 795517 795527 795533 795539 795551 795581 795589 795601 795643 795647
-795649 795653 795659 795661 795667 795679 795703 795709 795713 795727 795737 795761
-795763 795791 795793 795797 795799 795803 795827 795829 795871 795877 795913 795917
-795931 795937 795941 795943 795947 795979 795983 795997 796001 796009 796063 796067
-796091 796121 796139 796141 796151 796171 796177 796181 796189 796193 796217 796247
-796259 796267 796291 796303 796307 796337 796339 796361 796363 796373 796379 796387
-796391 796409 796447 796451 796459 796487 796493 796517 796531 796541 796553 796561
-796567 796571 796583 796591 796619 796633 796657 796673 796687 796693 796699 796709
-796711 796751 796759 796769 796777 796781 796799 796801 796813 796819 796847 796849
-796853 796867 796871 796877 796889 796921 796931 796933 796937 796951 796967 796969
-796981 797003 797009 797021 797029 797033 797039 797051 797053 797057 797063 797077
-797119 797131 797143 797161 797171 797201 797207 797273 797281 797287 797309 797311
-797333 797353 797359 797383 797389 797399 797417 797429 797473 797497 797507 797509
-797539 797549 797551 797557 797561 797567 797569 797579 797581 797591 797593 797611
-797627 797633 797647 797681 797689 797701 797711 797729 797743 797747 797767 797773
-797813 797833 797851 797869 797887 797897 797911 797917 797933 797947 797957 797977
-797987 798023 798043 798059 798067 798071 798079 798089 798097 798101 798121 798131
-798139 798143 798151 798173 798179 798191 798197 798199 798221 798223 798227 798251
-798257 798263 798271 798293 798319 798331 798373 798383 798397 798403 798409 798443
-798451 798461 798481 798487 798503 798517 798521 798527 798533 798569 798599 798613
-798641 798647 798649 798667 798691 798697 798701 798713 798727 798737 798751 798757
-798773 798781 798799 798823 798871 798887 798911 798923 798929 798937 798943 798961
-799003 799021 799031 799061 799063 799091 799093 799103 799147 799151 799171 799217
-799219 799223 799259 799291 799301 799303 799307 799313 799333 799343 799361 799363
-799369 799417 799427 799441 799453 799471 799481 799483 799489 799507 799523 799529
-799543 799553 799573 799609 799613 799619 799621 799633 799637 799651 799657 799661
-799679 799723 799727 799739 799741 799753 799759 799789 799801 799807 799817 799837
-799853 799859 799873 799891 799921 799949 799961 799979 799991 799993 799999 800011
-800029 800053 800057 800077 800083 800089 800113 800117 800119 800123 800131 800143
-800159 800161 800171 800209 800213 800221 800231 800237 800243 800281 800287 800291
-800311 800329 800333 800351 800357 800399 800407 800417 800419 800441 800447 800473
-800477 800483 800497 800509 800519 800521 800533 800537 800539 800549 800557 800573
-800587 800593 800599 800621 800623 800647 800651 800659 800663 800669 800677 800687
-800693 800707 800711 800729 800731 800741 800743 800759 800773 800783 800801 800861
-800873 800879 800897 800903 800909 800923 800953 800959 800971 800977 800993 800999
-801001 801007 801011 801019 801037 801061 801077 801079 801103 801107 801127 801137
-801179 801187 801197 801217 801247 801277 801289 801293 801301 801331 801337 801341
-801349 801371 801379 801403 801407 801419 801421 801461 801469 801487 801503 801517
-801539 801551 801557 801569 801571 801607 801611 801617 801631 801641 801677 801683
-801701 801707 801709 801733 801761 801791 801809 801811 801817 801833 801841 801859
-801883 801947 801949 801959 801973 801989 802007 802019 802027 802031 802037 802073
-802103 802121 802127 802129 802133 802141 802147 802159 802163 802177 802181 802183
-802189 802231 802253 802279 802283 802297 802331 802339 802357 802387 802421 802441
-802453 802463 802471 802499 802511 802523 802531 802573 802583 802589 802597 802603
-802609 802643 802649 802651 802661 802667 802709 802721 802729 802733 802751 802759
-802777 802783 802787 802793 802799 802811 802829 802831 802873 802909 802913 802933
-802951 802969 802979 802987 803027 803041 803053 803057 803059 803087 803093 803119
-803141 803171 803189 803207 803227 803237 803251 803269 803273 803287 803311 803323
-803333 803347 803359 803389 803393 803399 803417 803441 803443 803447 803449 803461
-803479 803483 803497 803501 803513 803519 803549 803587 803591 803609 803611 803623
-803629 803651 803659 803669 803687 803717 803729 803731 803741 803749 803813 803819
-803849 803857 803867 803893 803897 803911 803921 803927 803939 803963 803977 803987
-803989 804007 804017 804031 804043 804059 804073 804077 804091 804107 804113 804119
-804127 804157 804161 804179 804191 804197 804203 804211 804239 804259 804281 804283
-804313 804317 804329 804337 804341 804367 804371 804383 804409 804443 804449 804473
-804493 804497 804511 804521 804523 804541 804553 804571 804577 804581 804589 804607
-804611 804613 804619 804653 804689 804697 804703 804709 804743 804751 804757 804761
-804767 804803 804823 804829 804833 804847 804857 804877 804889 804893 804901 804913
-804919 804929 804941 804943 804983 804989 804997 805019 805027 805031 805033 805037
-805061 805067 805073 805081 805097 805099 805109 805111 805121 805153 805159 805177
-805187 805213 805219 805223 805241 805249 805267 805271 805279 805289 805297 805309
-805313 805327 805331 805333 805339 805369 805381 805397 805403 805421 805451 805463
-805471 805487 805499 805501 805507 805517 805523 805531 805537 805559 805573 805583
-805589 805633 805639 805687 805703 805711 805723 805729 805741 805757 805789 805799
-805807 805811 805843 805853 805859 805867 805873 805877 805891 805901 805913 805933
-805967 805991 806009 806011 806017 806023 806027 806033 806041 806051 806059 806087
-806107 806111 806129 806137 806153 806159 806177 806203 806213 806233 806257 806261
-806263 806269 806291 806297 806317 806329 806363 806369 806371 806381 806383 806389
-806447 806453 806467 806483 806503 806513 806521 806543 806549 806579 806581 806609
-806639 806657 806671 806719 806737 806761 806783 806789 806791 806801 806807 806821
-806857 806893 806903 806917 806929 806941 806947 806951 806977 806999 807011 807017
-807071 807077 807083 807089 807097 807113 807119 807127 807151 807181 807187 807193
-807197 807203 807217 807221 807241 807251 807259 807281 807299 807337 807371 807379
-807383 807403 807407 807409 807419 807427 807463 807473 807479 807487 807491 807493
-807509 807511 807523 807539 807559 807571 807607 807613 807629 807637 807647 807689
-807707 807731 807733 807749 807757 807787 807797 807809 807817 807869 807871 807901
-807907 807923 807931 807941 807943 807949 807973 807997 808019 808021 808039 808081
-808097 808111 808147 808153 808169 808177 808187 808211 808217 808229 808237 808261
-808267 808307 808309 808343 808349 808351 808361 808363 808369 808373 808391 808399
-808417 808421 808439 808441 808459 808481 808517 808523 808553 808559 808579 808589
-808597 808601 808603 808627 808637 808651 808679 808681 808693 808699 808721 808733
-808739 808747 808751 808771 808777 808789 808793 808837 808853 808867 808919 808937
-808957 808961 808981 808991 808993 809023 809041 809051 809063 809087 809093 809101
-809141 809143 809147 809173 809177 809189 809201 809203 809213 809231 809239 809243
-809261 809269 809273 809297 809309 809323 809339 809357 809359 809377 809383 809399
-809401 809407 809423 809437 809443 809447 809453 809461 809491 809507 809521 809527
-809563 809569 809579 809581 809587 809603 809629 809701 809707 809719 809729 809737
-809741 809747 809749 809759 809771 809779 809797 809801 809803 809821 809827 809833
-809839 809843 809869 809891 809903 809909 809917 809929 809981 809983 809993 810013
-810023 810049 810053 810059 810071 810079 810091 810109 810137 810149 810151 810191
-810193 810209 810223 810239 810253 810259 810269 810281 810307 810319 810343 810349
-810353 810361 810367 810377 810379 810389 810391 810401 810409 810419 810427 810437
-810443 810457 810473 810487 810493 810503 810517 810533 810539 810541 810547 810553
-810571 810581 810583 810587 810643 810653 810659 810671 810697 810737 810757 810763
-810769 810791 810809 810839 810853 810871 810881 810893 810907 810913 810923 810941
-810949 810961 810967 810973 810989 811037 811039 811067 811081 811099 811123 811127
-811147 811157 811163 811171 811183 811193 811199 811207 811231 811241 811253 811259
-811273 811277 811289 811297 811337 811351 811379 811387 811411 811429 811441 811457
-811469 811493 811501 811511 811519 811523 811553 811561 811583 811607 811619 811627
-811637 811649 811651 811667 811691 811697 811703 811709 811729 811747 811753 811757
-811763 811771 811777 811799 811819 811861 811871 811879 811897 811919 811931 811933
-811957 811961 811981 811991 811997 812011 812033 812047 812051 812057 812081 812101
-812129 812137 812167 812173 812179 812183 812191 812213 812221 812233 812249 812257
-812267 812281 812297 812299 812309 812341 812347 812351 812353 812359 812363 812381
-812387 812393 812401 812431 812443 812467 812473 812477 812491 812501 812503 812519
-812527 812587 812597 812599 812627 812633 812639 812641 812671 812681 812689 812699
-812701 812711 812717 812731 812759 812761 812807 812849 812857 812869 812921 812939
-812963 812969 813013 813017 813023 813041 813049 813061 813083 813089 813091 813097
-813107 813121 813133 813157 813167 813199 813203 813209 813217 813221 813227 813251
-813269 813277 813283 813287 813299 813301 813311 813343 813361 813367 813377 813383
-813401 813419 813427 813443 813493 813499 813503 813511 813529 813541 813559 813577
-813583 813601 813613 813623 813647 813677 813697 813707 813721 813749 813767 813797
-813811 813817 813829 813833 813847 813863 813871 813893 813907 813931 813961 813971
-813991 813997 814003 814007 814013 814019 814031 814043 814049 814061 814063 814067
-814069 814081 814097 814127 814129 814139 814171 814183 814193 814199 814211 814213
-814237 814241 814243 814279 814309 814327 814337 814367 814379 814381 814393 814399
-814403 814423 814447 814469 814477 814493 814501 814531 814537 814543 814559 814577
-814579 814601 814603 814609 814631 814633 814643 814687 814699 814717 814741 814747
-814763 814771 814783 814789 814799 814823 814829 814841 814859 814873 814883 814889
-814901 814903 814927 814937 814939 814943 814949 814991 815029 815033 815047 815053
-815063 815123 815141 815149 815159 815173 815197 815209 815231 815251 815257 815261
-815273 815279 815291 815317 815333 815341 815351 815389 815401 815411 815413 815417
-815431 815453 815459 815471 815491 815501 815519 815527 815533 815539 815543 815569
-815587 815599 815621 815623 815627 815653 815663 815669 815671 815681 815687 815693
-815713 815729 815809 815819 815821 815831 815851 815869 815891 815897 815923 815933
-815939 815953 815963 815977 815989 816019 816037 816043 816047 816077 816091 816103
-816113 816121 816131 816133 816157 816161 816163 816169 816191 816203 816209 816217
-816223 816227 816239 816251 816271 816317 816329 816341 816353 816367 816377 816401
-816427 816443 816451 816469 816499 816521 816539 816547 816559 816581 816587 816589
-816593 816649 816653 816667 816689 816691 816703 816709 816743 816763 816769 816779
-816811 816817 816821 816839 816841 816847 816857 816859 816869 816883 816887 816899
-816911 816917 816919 816929 816941 816947 816961 816971 817013 817027 817039 817049
-817051 817073 817081 817087 817093 817111 817123 817127 817147 817151 817153 817163
-817169 817183 817211 817237 817273 817277 817279 817291 817303 817319 817321 817331
-817337 817357 817379 817403 817409 817433 817457 817463 817483 817519 817529 817549
-817561 817567 817603 817637 817651 817669 817679 817697 817709 817711 817721 817723
-817727 817757 817769 817777 817783 817787 817793 817823 817837 817841 817867 817871
-817877 817889 817891 817897 817907 817913 817919 817933 817951 817979 817987 818011
-818017 818021 818093 818099 818101 818113 818123 818143 818171 818173 818189 818219
-818231 818239 818249 818281 818287 818291 818303 818309 818327 818339 818341 818347
-818353 818359 818371 818383 818393 818399 818413 818429 818453 818473 818509 818561
-818569 818579 818581 818603 818621 818659 818683 818687 818689 818707 818717 818723
-818813 818819 818821 818827 818837 818887 818897 818947 818959 818963 818969 818977
-818999 819001 819017 819029 819031 819037 819061 819073 819083 819101 819131 819149
-819157 819167 819173 819187 819229 819239 819241 819251 819253 819263 819271 819289
-819307 819311 819317 819319 819367 819373 819389 819391 819407 819409 819419 819431
-819437 819443 819449 819457 819463 819473 819487 819491 819493 819499 819503 819509
-819523 819563 819583 819593 819607 819617 819619 819629 819647 819653 819659 819673
-819691 819701 819719 819737 819739 819761 819769 819773 819781 819787 819799 819811
-819823 819827 819829 819853 819899 819911 819913 819937 819943 819977 819989 819991
-820037 820051 820067 820073 820093 820109 820117 820129 820133 820163 820177 820187
-820201 820213 820223 820231 820241 820243 820247 820271 820273 820279 820319 820321
-820331 820333 820343 820349 820361 820367 820399 820409 820411 820427 820429 820441
-820459 820481 820489 820537 820541 820559 820577 820597 820609 820619 820627 820637
-820643 820649 820657 820679 820681 820691 820711 820723 820733 820747 820753 820759
-820763 820789 820793 820837 820873 820891 820901 820907 820909 820921 820927 820957
-820969 820991 820997 821003 821027 821039 821053 821057 821063 821069 821081 821089
-821099 821101 821113 821131 821143 821147 821153 821167 821173 821207 821209 821263
-821281 821291 821297 821311 821329 821333 821377 821383 821411 821441 821449 821459
-821461 821467 821477 821479 821489 821497 821507 821519 821551 821573 821603 821641
-821647 821651 821663 821677 821741 821747 821753 821759 821771 821801 821803 821809
-821819 821827 821833 821851 821857 821861 821869 821879 821897 821911 821939 821941
-821971 821993 821999 822007 822011 822013 822037 822049 822067 822079 822113 822131
-822139 822161 822163 822167 822169 822191 822197 822221 822223 822229 822233 822253
-822259 822277 822293 822299 822313 822317 822323 822329 822343 822347 822361 822379
-822383 822389 822391 822407 822431 822433 822517 822539 822541 822551 822553 822557
-822571 822581 822587 822589 822599 822607 822611 822631 822667 822671 822673 822683
-822691 822697 822713 822721 822727 822739 822743 822761 822763 822781 822791 822793
-822803 822821 822823 822839 822853 822881 822883 822889 822893 822901 822907 822949
-822971 822973 822989 823001 823003 823013 823033 823051 823117 823127 823129 823153
-823169 823177 823183 823201 823219 823231 823237 823241 823243 823261 823271 823283
-823309 823337 823349 823351 823357 823373 823399 823421 823447 823451 823457 823481
-823483 823489 823499 823519 823541 823547 823553 823573 823591 823601 823619 823621
-823637 823643 823651 823663 823679 823703 823709 823717 823721 823723 823727 823729
-823741 823747 823759 823777 823787 823789 823799 823819 823829 823831 823841 823843
-823877 823903 823913 823961 823967 823969 823981 823993 823997 824017 824029 824039
-824063 824069 824077 824081 824099 824123 824137 824147 824179 824183 824189 824191
-824227 824231 824233 824269 824281 824287 824339 824393 824399 824401 824413 824419
-824437 824443 824459 824477 824489 824497 824501 824513 824531 824539 824563 824591
-824609 824641 824647 824651 824669 824671 824683 824699 824701 824723 824741 824749
-824753 824773 824777 824779 824801 824821 824833 824843 824861 824893 824899 824911
-824921 824933 824939 824947 824951 824977 824981 824983 825001 825007 825017 825029
-825047 825049 825059 825067 825073 825101 825107 825109 825131 825161 825191 825193
-825199 825203 825229 825241 825247 825259 825277 825281 825283 825287 825301 825329
-825337 825343 825347 825353 825361 825389 825397 825403 825413 825421 825439 825443
-825467 825479 825491 825509 825527 825533 825547 825551 825553 825577 825593 825611
-825613 825637 825647 825661 825679 825689 825697 825701 825709 825733 825739 825749
-825763 825779 825791 825821 825827 825829 825857 825883 825889 825919 825947 825959
-825961 825971 825983 825991 825997 826019 826037 826039 826051 826061 826069 826087
-826093 826097 826129 826151 826153 826169 826171 826193 826201 826211 826271 826283
-826289 826303 826313 826333 826339 826349 826351 826363 826379 826381 826391 826393
-826403 826411 826453 826477 826493 826499 826541 826549 826559 826561 826571 826583
-826603 826607 826613 826621 826663 826667 826669 826673 826681 826697 826699 826711
-826717 826723 826729 826753 826759 826783 826799 826807 826811 826831 826849 826867
-826879 826883 826907 826921 826927 826939 826957 826963 826967 826979 826997 827009
-827023 827039 827041 827063 827087 827129 827131 827143 827147 827161 827213 827227
-827231 827251 827269 827293 827303 827311 827327 827347 827369 827389 827417 827423
-827429 827443 827447 827461 827473 827501 827521 827537 827539 827549 827581 827591
-827599 827633 827639 827677 827681 827693 827699 827719 827737 827741 827767 827779
-827791 827803 827809 827821 827833 827837 827843 827851 827857 827867 827873 827899
-827903 827923 827927 827929 827941 827969 827987 827989 828007 828011 828013 828029
-828043 828059 828067 828071 828101 828109 828119 828127 828131 828133 828169 828199
-828209 828221 828239 828277 828349 828361 828371 828379 828383 828397 828407 828409
-828431 828449 828517 828523 828547 828557 828577 828587 828601 828637 828643 828649
-828673 828677 828691 828697 828701 828703 828721 828731 828743 828757 828787 828797
-828809 828811 828823 828829 828833 828859 828871 828881 828889 828899 828901 828917
-828923 828941 828953 828967 828977 829001 829013 829057 829063 829069 829093 829097
-829111 829121 829123 829151 829159 829177 829187 829193 829211 829223 829229 829237
-829249 829267 829273 829289 829319 829349 829399 829453 829457 829463 829469 829501
-829511 829519 829537 829547 829561 829601 829613 829627 829637 829639 829643 829657
-829687 829693 829709 829721 829723 829727 829729 829733 829757 829789 829811 829813
-829819 829831 829841 829847 829849 829867 829877 829883 829949 829967 829979 829987
-829993 830003 830017 830041 830051 830099 830111 830117 830131 830143 830153 830173
-830177 830191 830233 830237 830257 830267 830279 830293 830309 830311 830327 830329
-830339 830341 830353 830359 830363 830383 830387 830411 830413 830419 830441 830447
-830449 830477 830483 830497 830503 830513 830549 830551 830561 830567 830579 830587
-830591 830597 830617 830639 830657 830677 830693 830719 830729 830741 830743 830777
-830789 830801 830827 830833 830839 830849 830861 830873 830887 830891 830899 830911
-830923 830939 830957 830981 830989 831023 831031 831037 831043 831067 831071 831073
-831091 831109 831139 831161 831163 831167 831191 831217 831221 831239 831253 831287
-831301 831323 831329 831361 831367 831371 831373 831407 831409 831431 831433 831437
-831443 831461 831503 831529 831539 831541 831547 831553 831559 831583 831587 831599
-831617 831619 831631 831643 831647 831653 831659 831661 831679 831683 831697 831707
-831709 831713 831731 831739 831751 831757 831769 831781 831799 831811 831821 831829
-831847 831851 831863 831881 831889 831893 831899 831911 831913 831917 831967 831983
-832003 832063 832079 832081 832103 832109 832121 832123 832129 832141 832151 832157
-832159 832189 832211 832217 832253 832291 832297 832309 832327 832331 832339 832361
-832367 832369 832373 832379 832399 832411 832421 832427 832451 832457 832477 832483
-832487 832493 832499 832519 832583 832591 832597 832607 832613 832621 832627 832631
-832633 832639 832673 832679 832681 832687 832693 832703 832709 832717 832721 832729
-832747 832757 832763 832771 832787 832801 832837 832841 832861 832879 832883 832889
-832913 832919 832927 832933 832943 832957 832963 832969 832973 832987 833009 833023
-833033 833047 833057 833099 833101 833117 833171 833177 833179 833191 833197 833201
-833219 833251 833269 833281 833293 833299 833309 833347 833353 833363 833377 833389
-833429 833449 833453 833461 833467 833477 833479 833491 833509 833537 833557 833563
-833593 833597 833617 833633 833659 833669 833689 833711 833713 833717 833719 833737
-833747 833759 833783 833801 833821 833839 833843 833857 833873 833887 833893 833897
-833923 833927 833933 833947 833977 833999 834007 834013 834023 834059 834107 834131
-834133 834137 834143 834149 834151 834181 834199 834221 834257 834259 834269 834277
-834283 834287 834299 834311 834341 834367 834433 834439 834469 834487 834497 834503
-834511 834523 834527 834569 834571 834593 834599 834607 834611 834623 834629 834641
-834643 834653 834671 834703 834709 834721 834761 834773 834781 834787 834797 834809
-834811 834829 834857 834859 834893 834913 834941 834947 834949 834959 834961 834983
-834991 835001 835013 835019 835033 835039 835097 835099 835117 835123 835139 835141
-835207 835213 835217 835249 835253 835271 835313 835319 835321 835327 835369 835379
-835391 835399 835421 835427 835441 835451 835453 835459 835469 835489 835511 835531
-835553 835559 835591 835603 835607 835609 835633 835643 835661 835663 835673 835687
-835717 835721 835733 835739 835759 835789 835811 835817 835819 835823 835831 835841
-835847 835859 835897 835909 835927 835931 835937 835951 835957 835973 835979 835987
-835993 835997 836047 836063 836071 836107 836117 836131 836137 836149 836153 836159
-836161 836183 836189 836191 836203 836219 836233 836239 836243 836267 836291 836299
-836317 836327 836347 836351 836369 836377 836387 836413 836449 836471 836477 836491
-836497 836501 836509 836567 836569 836573 836609 836611 836623 836657 836663 836677
-836683 836699 836701 836707 836713 836729 836747 836749 836753 836761 836789 836807
-836821 836833 836839 836861 836863 836873 836879 836881 836917 836921 836939 836951
-836971 837017 837043 837047 837059 837071 837073 837077 837079 837107 837113 837139
-837149 837157 837191 837203 837257 837271 837283 837293 837307 837313 837359 837367
-837373 837377 837379 837409 837413 837439 837451 837461 837467 837497 837503 837509
-837521 837533 837583 837601 837611 837619 837631 837659 837667 837673 837677 837679
-837721 837731 837737 837773 837779 837797 837817 837833 837847 837853 837887 837923
-837929 837931 837937 837943 837979 838003 838021 838037 838039 838043 838063 838069
-838091 838093 838099 838133 838139 838141 838153 838157 838169 838171 838193 838207
-838247 838249 838349 838351 838363 838367 838379 838391 838393 838399 838403 838421
-838429 838441 838447 838459 838463 838471 838483 838517 838547 838553 838561 838571
-838583 838589 838597 838601 838609 838613 838631 838633 838657 838667 838687 838693
-838711 838751 838757 838769 838771 838777 838781 838807 838813 838837 838853 838889
-838897 838909 838913 838919 838927 838931 838939 838949 838951 838963 838969 838991
-838993 839009 839029 839051 839071 839087 839117 839131 839161 839203 839207 839221
-839227 839261 839269 839303 839323 839327 839351 839353 839369 839381 839413 839429
-839437 839441 839453 839459 839471 839473 839483 839491 839497 839519 839539 839551
-839563 839599 839603 839609 839611 839617 839621 839633 839651 839653 839669 839693
-839723 839731 839767 839771 839791 839801 839809 839831 839837 839873 839879 839887
-839897 839899 839903 839911 839921 839957 839959 839963 839981 839999 840023 840053
-840061 840067 840083 840109 840137 840139 840149 840163 840179 840181 840187 840197
-840223 840239 840241 840253 840269 840277 840289 840299 840319 840331 840341 840347
-840353 840439 840451 840457 840467 840473 840479 840491 840523 840547 840557 840571
-840589 840601 840611 840643 840661 840683 840703 840709 840713 840727 840733 840743
-840757 840761 840767 840817 840821 840823 840839 840841 840859 840863 840907 840911
-840923 840929 840941 840943 840967 840979 840989 840991 841003 841013 841019 841021
-841063 841069 841079 841081 841091 841097 841103 841147 841157 841189 841193 841207
-841213 841219 841223 841231 841237 841241 841259 841273 841277 841283 841289 841297
-841307 841327 841333 841349 841369 841391 841397 841411 841427 841447 841457 841459
-841541 841549 841559 841573 841597 841601 841637 841651 841661 841663 841691 841697
-841727 841741 841751 841793 841801 841849 841859 841873 841879 841889 841913 841921
-841927 841931 841933 841979 841987 842003 842021 842041 842047 842063 842071 842077
-842081 842087 842089 842111 842113 842141 842147 842159 842161 842167 842173 842183
-842203 842209 842249 842267 842279 842291 842293 842311 842321 842323 842339 842341
-842351 842353 842371 842383 842393 842399 842407 842417 842419 842423 842447 842449
-842473 842477 842483 842489 842497 842507 842519 842521 842531 842551 842581 842587
-842599 842617 842623 842627 842657 842701 842729 842747 842759 842767 842771 842791
-842801 842813 842819 842857 842869 842879 842887 842923 842939 842951 842957 842969
-842977 842981 842987 842993 843043 843067 843079 843091 843103 843113 843127 843131
-843137 843173 843179 843181 843209 843211 843229 843253 843257 843289 843299 843301
-843307 843331 843347 843361 843371 843377 843379 843383 843397 843443 843449 843457
-843461 843473 843487 843497 843503 843527 843539 843553 843559 843587 843589 843607
-843613 843629 843643 843649 843677 843679 843701 843737 843757 843763 843779 843781
-843793 843797 843811 843823 843833 843841 843881 843883 843889 843901 843907 843911
-844001 844013 844043 844061 844069 844087 844093 844111 844117 844121 844127 844139
-844141 844153 844157 844163 844183 844187 844199 844201 844243 844247 844253 844279
-844289 844297 844309 844321 844351 844369 844421 844427 844429 844433 844439 844447
-844453 844457 844463 844469 844483 844489 844499 844507 844511 844513 844517 844523
-844549 844553 844601 844603 844609 844619 844621 844631 844639 844643 844651 844709
-844717 844733 844757 844763 844769 844771 844777 844841 844847 844861 844867 844891
-844897 844903 844913 844927 844957 844999 845003 845017 845021 845027 845041 845069
-845083 845099 845111 845129 845137 845167 845179 845183 845197 845203 845209 845219
-845231 845237 845261 845279 845287 845303 845309 845333 845347 845357 845363 845371
-845381 845387 845431 845441 845447 845459 845489 845491 845531 845567 845599 845623
-845653 845657 845659 845683 845717 845723 845729 845749 845753 845771 845777 845809
-845833 845849 845863 845879 845881 845893 845909 845921 845927 845941 845951 845969
-845981 845983 845987 845989 846037 846059 846061 846067 846113 846137 846149 846161
-846179 846187 846217 846229 846233 846247 846259 846271 846323 846341 846343 846353
-846359 846361 846383 846389 846397 846401 846403 846407 846421 846427 846437 846457
-846487 846493 846499 846529 846563 846577 846589 846647 846661 846667 846673 846689
-846721 846733 846739 846749 846751 846757 846779 846823 846841 846851 846869 846871
-846877 846913 846917 846919 846931 846943 846949 846953 846961 846973 846977 846983
-846997 847009 847031 847037 847043 847051 847069 847073 847079 847097 847103 847109
-847129 847139 847151 847157 847163 847169 847193 847201 847213 847219 847237 847247
-847271 847277 847279 847283 847309 847321 847339 847361 847367 847373 847393 847423
-847453 847477 847493 847499 847507 847519 847531 847537 847543 847549 847577 847589
-847601 847607 847621 847657 847663 847673 847681 847687 847697 847703 847727 847729
-847741 847787 847789 847813 847817 847853 847871 847883 847901 847919 847933 847937
-847949 847967 847969 847991 847993 847997 848017 848051 848087 848101 848119 848123
-848131 848143 848149 848173 848201 848203 848213 848227 848251 848269 848273 848297
-848321 848359 848363 848383 848387 848399 848417 848423 848429 848443 848461 848467
-848473 848489 848531 848537 848557 848567 848579 848591 848593 848599 848611 848629
-848633 848647 848651 848671 848681 848699 848707 848713 848737 848747 848761 848779
-848789 848791 848797 848803 848807 848839 848843 848849 848851 848857 848879 848893
-848909 848921 848923 848927 848933 848941 848959 848983 848993 849019 849047 849049
-849061 849083 849097 849103 849119 849127 849131 849143 849161 849179 849197 849203
-849217 849221 849223 849241 849253 849271 849301 849311 849347 849349 849353 849383
-849391 849419 849427 849461 849467 849481 849523 849533 849539 849571 849581 849587
-849593 849599 849601 849649 849691 849701 849703 849721 849727 849731 849733 849743
-849763 849767 849773 849829 849833 849839 849857 849869 849883 849917 849923 849931
-849943 849967 849973 849991 849997 850009 850021 850027 850033 850043 850049 850061
-850063 850081 850093 850121 850133 850139 850147 850177 850181 850189 850207 850211
-850229 850243 850247 850253 850261 850271 850273 850301 850303 850331 850337 850349
-850351 850373 850387 850393 850397 850403 850417 850427 850433 850439 850453 850457
-850481 850529 850537 850567 850571 850613 850631 850637 850673 850679 850691 850711
-850727 850753 850781 850807 850823 850849 850853 850879 850891 850897 850933 850943
-850951 850973 850979 851009 851017 851033 851041 851051 851057 851087 851093 851113
-851117 851131 851153 851159 851171 851177 851197 851203 851209 851231 851239 851251
-851261 851267 851273 851293 851297 851303 851321 851327 851351 851359 851363 851381
-851387 851393 851401 851413 851419 851423 851449 851471 851491 851507 851519 851537
-851549 851569 851573 851597 851603 851623 851633 851639 851647 851659 851671 851677
-851689 851723 851731 851749 851761 851797 851801 851803 851813 851821 851831 851839
-851843 851863 851881 851891 851899 851953 851957 851971 852011 852013 852031 852037
-852079 852101 852121 852139 852143 852149 852151 852167 852179 852191 852197 852199
-852211 852233 852239 852253 852259 852263 852287 852289 852301 852323 852347 852367
-852391 852409 852427 852437 852457 852463 852521 852557 852559 852563 852569 852581
-852583 852589 852613 852617 852623 852641 852661 852671 852673 852689 852749 852751
-852757 852763 852769 852793 852799 852809 852827 852829 852833 852847 852851 852857
-852871 852881 852889 852893 852913 852937 852953 852959 852989 852997 853007 853031
-853033 853049 853057 853079 853091 853103 853123 853133 853159 853187 853189 853211
-853217 853241 853283 853289 853291 853319 853339 853357 853387 853403 853427 853429
-853439 853477 853481 853493 853529 853543 853547 853571 853577 853597 853637 853663
-853667 853669 853687 853693 853703 853717 853733 853739 853759 853763 853793 853799
-853807 853813 853819 853823 853837 853843 853873 853889 853901 853903 853913 853933
-853949 853969 853981 853999 854017 854033 854039 854041 854047 854053 854083 854089
-854093 854099 854111 854123 854129 854141 854149 854159 854171 854213 854257 854263
-854299 854303 854323 854327 854333 854351 854353 854363 854383 854387 854407 854417
-854419 854423 854431 854443 854459 854461 854467 854479 854527 854533 854569 854587
-854593 854599 854617 854621 854629 854647 854683 854713 854729 854747 854771 854801
-854807 854849 854869 854881 854897 854899 854921 854923 854927 854929 854951 854957
-854963 854993 854999 855031 855059 855061 855067 855079 855089 855119 855131 855143
-855187 855191 855199 855203 855221 855229 855241 855269 855271 855277 855293 855307
-855311 855317 855331 855359 855373 855377 855391 855397 855401 855419 855427 855431
-855461 855467 855499 855511 855521 855527 855581 855601 855607 855619 855641 855667
-855671 855683 855697 855709 855713 855719 855721 855727 855731 855733 855737 855739
-855781 855787 855821 855851 855857 855863 855887 855889 855901 855919 855923 855937
-855947 855983 855989 855997 856021 856043 856057 856061 856073 856081 856099 856111
-856117 856133 856139 856147 856153 856169 856181 856187 856213 856237 856241 856249
-856277 856279 856301 856309 856333 856343 856351 856369 856381 856391 856393 856411
-856417 856421 856441 856459 856469 856483 856487 856507 856519 856529 856547 856549
-856553 856567 856571 856627 856637 856649 856693 856697 856699 856703 856711 856717
-856721 856733 856759 856787 856789 856799 856811 856813 856831 856841 856847 856853
-856897 856901 856903 856909 856927 856939 856943 856949 856969 856993 857009 857011
-857027 857029 857039 857047 857053 857069 857081 857083 857099 857107 857137 857161
-857167 857201 857203 857221 857249 857267 857273 857281 857287 857309 857321 857333
-857341 857347 857357 857369 857407 857411 857419 857431 857453 857459 857471 857513
-857539 857551 857567 857569 857573 857579 857581 857629 857653 857663 857669 857671
-857687 857707 857711 857713 857723 857737 857741 857743 857749 857809 857821 857827
-857839 857851 857867 857873 857897 857903 857929 857951 857953 857957 857959 857963
-857977 857981 858001 858029 858043 858073 858083 858101 858103 858113 858127 858149
-858161 858167 858217 858223 858233 858239 858241 858251 858259 858269 858281 858293
-858301 858307 858311 858317 858373 858397 858427 858433 858457 858463 858467 858479
-858497 858503 858527 858563 858577 858589 858623 858631 858673 858691 858701 858707
-858709 858713 858749 858757 858763 858769 858787 858817 858821 858833 858841 858859
-858877 858883 858899 858911 858919 858931 858943 858953 858961 858989 858997 859003
-859031 859037 859049 859051 859057 859081 859091 859093 859109 859121 859181 859189
-859213 859223 859249 859259 859267 859273 859277 859279 859297 859321 859361 859363
-859373 859381 859393 859423 859433 859447 859459 859477 859493 859513 859553 859559
-859561 859567 859577 859601 859603 859609 859619 859633 859657 859667 859669 859679
-859681 859697 859709 859751 859783 859787 859799 859801 859823 859841 859849 859853
-859861 859891 859913 859919 859927 859933 859939 859973 859981 859987 860009 860011
-860029 860051 860059 860063 860071 860077 860087 860089 860107 860113 860117 860143
-860239 860257 860267 860291 860297 860309 860311 860317 860323 860333 860341 860351
-860357 860369 860381 860383 860393 860399 860413 860417 860423 860441 860479 860501
-860507 860513 860533 860543 860569 860579 860581 860593 860599 860609 860623 860641
-860647 860663 860689 860701 860747 860753 860759 860779 860789 860791 860809 860813
-860819 860843 860861 860887 860891 860911 860917 860921 860927 860929 860939 860941
-860957 860969 860971 861001 861013 861019 861031 861037 861043 861053 861059 861079
-861083 861089 861109 861121 861131 861139 861163 861167 861191 861199 861221 861239
-861293 861299 861317 861347 861353 861361 861391 861433 861437 861439 861491 861493
-861499 861541 861547 861551 861559 861563 861571 861589 861599 861613 861617 861647
-861659 861691 861701 861703 861719 861733 861739 861743 861761 861797 861799 861803
-861823 861829 861853 861857 861871 861877 861881 861899 861901 861907 861929 861937
-861941 861947 861977 861979 861997 862009 862013 862031 862033 862061 862067 862097
-862117 862123 862129 862139 862157 862159 862171 862177 862181 862187 862207 862219
-862229 862231 862241 862249 862259 862261 862273 862283 862289 862297 862307 862319
-862331 862343 862369 862387 862397 862399 862409 862417 862423 862441 862447 862471
-862481 862483 862487 862493 862501 862541 862553 862559 862567 862571 862573 862583
-862607 862627 862633 862649 862651 862669 862703 862727 862739 862769 862777 862783
-862789 862811 862819 862861 862879 862907 862909 862913 862919 862921 862943 862957
-862973 862987 862991 862997 863003 863017 863047 863081 863087 863119 863123 863131
-863143 863153 863179 863197 863231 863251 863279 863287 863299 863309 863323 863363
-863377 863393 863479 863491 863497 863509 863521 863537 863539 863561 863593 863609
-863633 863641 863671 863689 863693 863711 863729 863743 863749 863767 863771 863783
-863801 863803 863833 863843 863851 863867 863869 863879 863887 863897 863899 863909
-863917 863921 863959 863983 864007 864011 864013 864029 864037 864047 864049 864053
-864077 864079 864091 864103 864107 864119 864121 864131 864137 864151 864167 864169
-864191 864203 864211 864221 864223 864251 864277 864289 864299 864301 864307 864319
-864323 864341 864359 864361 864379 864407 864419 864427 864439 864449 864491 864503
-864509 864511 864533 864541 864551 864581 864583 864587 864613 864623 864629 864631
-864641 864673 864679 864691 864707 864733 864737 864757 864781 864793 864803 864811
-864817 864883 864887 864901 864911 864917 864947 864953 864959 864967 864979 864989
-865001 865003 865043 865049 865057 865061 865069 865087 865091 865103 865121 865153
-865159 865177 865201 865211 865213 865217 865231 865247 865253 865259 865261 865301
-865307 865313 865321 865327 865339 865343 865349 865357 865363 865379 865409 865457
-865477 865481 865483 865493 865499 865511 865537 865577 865591 865597 865609 865619
-865637 865639 865643 865661 865681 865687 865717 865721 865729 865741 865747 865751
-865757 865769 865771 865783 865801 865807 865817 865819 865829 865847 865859 865867
-865871 865877 865889 865933 865937 865957 865979 865993 866003 866009 866011 866029
-866051 866053 866057 866081 866083 866087 866093 866101 866119 866123 866161 866183
-866197 866213 866221 866231 866279 866293 866309 866311 866329 866353 866389 866399
-866417 866431 866443 866461 866471 866477 866513 866519 866573 866581 866623 866629
-866639 866641 866653 866683 866689 866693 866707 866713 866717 866737 866743 866759
-866777 866783 866819 866843 866849 866851 866857 866869 866909 866917 866927 866933
-866941 866953 866963 866969 867001 867007 867011 867023 867037 867059 867067 867079
-867091 867121 867131 867143 867151 867161 867173 867203 867211 867227 867233 867253
-867257 867259 867263 867271 867281 867301 867319 867337 867343 867371 867389 867397
-867401 867409 867413 867431 867443 867457 867463 867467 867487 867509 867511 867541
-867547 867553 867563 867571 867577 867589 867617 867619 867623 867631 867641 867653
-867677 867679 867689 867701 867719 867733 867743 867773 867781 867793 867803 867817
-867827 867829 867857 867871 867887 867913 867943 867947 867959 867991 868019 868033
-868039 868051 868069 868073 868081 868103 868111 868121 868123 868151 868157 868171
-868177 868199 868211 868229 868249 868267 868271 868277 868291 868313 868327 868331
-868337 868349 868369 868379 868381 868397 868409 868423 868451 868453 868459 868487
-868489 868493 868529 868531 868537 868559 868561 868577 868583 868603 868613 868639
-868663 868669 868691 868697 868727 868739 868741 868771 868783 868787 868793 868799
-868801 868817 868841 868849 868867 868873 868877 868883 868891 868909 868937 868939
-868943 868951 868957 868993 868997 868999 869017 869021 869039 869053 869059 869069
-869081 869119 869131 869137 869153 869173 869179 869203 869233 869249 869251 869257
-869273 869291 869293 869299 869303 869317 869321 869339 869369 869371 869381 869399
-869413 869419 869437 869443 869461 869467 869471 869489 869501 869521 869543 869551
-869563 869579 869587 869597 869599 869657 869663 869683 869689 869707 869717 869747
-869753 869773 869777 869779 869807 869809 869819 869849 869863 869879 869887 869893
-869899 869909 869927 869951 869959 869983 869989 870007 870013 870031 870047 870049
-870059 870083 870097 870109 870127 870131 870137 870151 870161 870169 870173 870197
-870211 870223 870229 870239 870241 870253 870271 870283 870301 870323 870329 870341
-870367 870391 870403 870407 870413 870431 870433 870437 870461 870479 870491 870497
-870517 870533 870547 870577 870589 870593 870601 870613 870629 870641 870643 870679
-870691 870703 870731 870739 870743 870773 870787 870809 870811 870823 870833 870847
-870853 870871 870889 870901 870907 870911 870917 870929 870931 870953 870967 870977
-870983 870997 871001 871021 871027 871037 871061 871103 871147 871159 871163 871177
-871181 871229 871231 871249 871259 871271 871289 871303 871337 871349 871393 871439
-871459 871463 871477 871513 871517 871531 871553 871571 871589 871597 871613 871621
-871639 871643 871649 871657 871679 871681 871687 871727 871763 871771 871789 871817
-871823 871837 871867 871883 871901 871919 871931 871957 871963 871973 871987 871993
-872017 872023 872033 872041 872057 872071 872077 872089 872099 872107 872129 872141
-872143 872149 872159 872161 872173 872177 872189 872203 872227 872231 872237 872243
-872251 872257 872269 872281 872317 872323 872351 872353 872369 872381 872383 872387
-872393 872411 872419 872429 872437 872441 872453 872471 872477 872479 872533 872549
-872561 872563 872567 872587 872609 872611 872621 872623 872647 872657 872659 872671
-872687 872731 872737 872747 872749 872761 872789 872791 872843 872863 872923 872947
-872951 872953 872959 872999 873017 873043 873049 873073 873079 873083 873091 873109
-873113 873121 873133 873139 873157 873209 873247 873251 873263 873293 873317 873319
-873331 873343 873349 873359 873403 873407 873419 873421 873427 873437 873461 873463
-873469 873497 873527 873529 873539 873541 873553 873569 873571 873617 873619 873641
-873643 873659 873667 873671 873689 873707 873709 873721 873727 873739 873767 873773
-873781 873787 873863 873877 873913 873959 873979 873989 873991 874001 874009 874037
-874063 874087 874091 874099 874103 874109 874117 874121 874127 874151 874193 874213
-874217 874229 874249 874267 874271 874277 874301 874303 874331 874337 874343 874351
-874373 874387 874397 874403 874409 874427 874457 874459 874477 874487 874537 874543
-874547 874567 874583 874597 874619 874637 874639 874651 874661 874673 874681 874693
-874697 874711 874721 874723 874729 874739 874763 874771 874777 874799 874807 874813
-874823 874831 874847 874859 874873 874879 874889 874891 874919 874957 874967 874987
-875011 875027 875033 875089 875107 875113 875117 875129 875141 875183 875201 875209
-875213 875233 875239 875243 875261 875263 875267 875269 875297 875299 875317 875323
-875327 875333 875339 875341 875363 875377 875389 875393 875417 875419 875429 875443
-875447 875477 875491 875503 875509 875513 875519 875521 875543 875579 875591 875593
-875617 875621 875627 875629 875647 875659 875663 875681 875683 875689 875701 875711
-875717 875731 875741 875759 875761 875773 875779 875783 875803 875821 875837 875851
-875893 875923 875929 875933 875947 875969 875981 875983 876011 876013 876017 876019
-876023 876041 876067 876077 876079 876097 876103 876107 876121 876131 876137 876149
-876181 876191 876193 876199 876203 876229 876233 876257 876263 876287 876301 876307
-876311 876329 876331 876341 876349 876371 876373 876431 876433 876443 876479 876481
-876497 876523 876529 876569 876581 876593 876607 876611 876619 876643 876647 876653
-876661 876677 876719 876721 876731 876749 876751 876761 876769 876787 876791 876797
-876817 876823 876833 876851 876853 876871 876893 876913 876929 876947 876971 877003
-877027 877043 877057 877073 877091 877109 877111 877117 877133 877169 877181 877187
-877199 877213 877223 877237 877267 877291 877297 877301 877313 877321 877333 877343
-877351 877361 877367 877379 877397 877399 877403 877411 877423 877463 877469 877531
-877543 877567 877573 877577 877601 877609 877619 877621 877651 877661 877699 877739
-877771 877783 877817 877823 877837 877843 877853 877867 877871 877873 877879 877883
-877907 877909 877937 877939 877949 877997 878011 878021 878023 878039 878041 878077
-878083 878089 878099 878107 878113 878131 878147 878153 878159 878167 878173 878183
-878191 878197 878201 878221 878239 878279 878287 878291 878299 878309 878359 878377
-878387 878411 878413 878419 878443 878453 878467 878489 878513 878539 878551 878567
-878573 878593 878597 878609 878621 878629 878641 878651 878659 878663 878677 878681
-878699 878719 878737 878743 878749 878777 878783 878789 878797 878821 878831 878833
-878837 878851 878863 878869 878873 878893 878929 878939 878953 878957 878987 878989
-879001 879007 879023 879031 879061 879089 879097 879103 879113 879119 879133 879143
-879167 879169 879181 879199 879227 879239 879247 879259 879269 879271 879283 879287
-879299 879331 879341 879343 879353 879371 879391 879401 879413 879449 879457 879493
-879523 879533 879539 879553 879581 879583 879607 879617 879623 879629 879649 879653
-879661 879667 879673 879679 879689 879691 879701 879707 879709 879713 879721 879743
-879797 879799 879817 879821 879839 879859 879863 879881 879917 879919 879941 879953
-879961 879973 879979 880001 880007 880021 880027 880031 880043 880057 880067 880069
-880091 880097 880109 880127 880133 880151 880153 880199 880211 880219 880223 880247
-880249 880259 880283 880301 880303 880331 880337 880343 880349 880361 880367 880409
-880421 880423 880427 880483 880487 880513 880519 880531 880541 880543 880553 880559
-880571 880573 880589 880603 880661 880667 880673 880681 880687 880699 880703 880709
-880723 880727 880729 880751 880793 880799 880801 880813 880819 880823 880853 880861
-880871 880883 880903 880907 880909 880939 880949 880951 880961 880981 880993 881003
-881009 881017 881029 881057 881071 881077 881099 881119 881141 881143 881147 881159
-881171 881173 881191 881197 881207 881219 881233 881249 881269 881273 881311 881317
-881327 881333 881351 881357 881369 881393 881407 881411 881417 881437 881449 881471
-881473 881477 881479 881509 881527 881533 881537 881539 881591 881597 881611 881641
-881663 881669 881681 881707 881711 881729 881743 881779 881813 881833 881849 881897
-881899 881911 881917 881939 881953 881963 881983 881987 882017 882019 882029 882031
-882047 882061 882067 882071 882083 882103 882139 882157 882169 882173 882179 882187
-882199 882239 882241 882247 882251 882253 882263 882289 882313 882359 882367 882377
-882389 882391 882433 882439 882449 882451 882461 882481 882491 882517 882529 882551
-882571 882577 882587 882593 882599 882617 882631 882653 882659 882697 882701 882703
-882719 882727 882733 882751 882773 882779 882823 882851 882863 882877 882881 882883
-882907 882913 882923 882943 882953 882961 882967 882979 883013 883049 883061 883073
-883087 883093 883109 883111 883117 883121 883163 883187 883193 883213 883217 883229
-883231 883237 883241 883247 883249 883273 883279 883307 883327 883331 883339 883343
-883357 883391 883397 883409 883411 883423 883429 883433 883451 883471 883483 883489
-883517 883537 883549 883577 883579 883613 883621 883627 883639 883661 883667 883691
-883697 883699 883703 883721 883733 883739 883763 883777 883781 883783 883807 883871
-883877 883889 883921 883933 883963 883969 883973 883979 883991 884003 884011 884029
-884057 884069 884077 884087 884111 884129 884131 884159 884167 884171 884183 884201
-884227 884231 884243 884251 884267 884269 884287 884293 884309 884311 884321 884341
-884353 884363 884369 884371 884417 884423 884437 884441 884453 884483 884489 884491
-884497 884501 884537 884573 884579 884591 884593 884617 884651 884669 884693 884699
-884717 884743 884789 884791 884803 884813 884827 884831 884857 884881 884899 884921
-884951 884959 884977 884981 884987 884999 885023 885041 885061 885083 885091 885097
-885103 885107 885127 885133 885161 885163 885169 885187 885217 885223 885233 885239
-885251 885257 885263 885289 885301 885307 885331 885359 885371 885383 885389 885397
-885403 885421 885427 885449 885473 885487 885497 885503 885509 885517 885529 885551
-885553 885589 885607 885611 885623 885679 885713 885721 885727 885733 885737 885769
-885791 885793 885803 885811 885821 885823 885839 885869 885881 885883 885889 885893
-885919 885923 885931 885943 885947 885959 885961 885967 885971 885977 885991 886007
-886013 886019 886021 886031 886043 886069 886097 886117 886129 886163 886177 886181
-886183 886189 886199 886241 886243 886247 886271 886283 886307 886313 886337 886339
-886349 886367 886381 886387 886421 886427 886429 886433 886453 886463 886469 886471
-886493 886511 886517 886519 886537 886541 886547 886549 886583 886591 886607 886609
-886619 886643 886651 886663 886667 886741 886747 886751 886759 886777 886793 886799
-886807 886819 886859 886867 886891 886909 886913 886967 886969 886973 886979 886981
-886987 886993 886999 887017 887057 887059 887069 887093 887101 887113 887141 887143
-887153 887171 887177 887191 887203 887233 887261 887267 887269 887291 887311 887323
-887333 887377 887387 887399 887401 887423 887441 887449 887459 887479 887483 887503
-887533 887543 887567 887569 887573 887581 887599 887617 887629 887633 887641 887651
-887657 887659 887669 887671 887681 887693 887701 887707 887717 887743 887749 887759
-887819 887827 887837 887839 887849 887867 887903 887911 887921 887923 887941 887947
-887987 887989 888001 888011 888047 888059 888061 888077 888091 888103 888109 888133
-888143 888157 888161 888163 888179 888203 888211 888247 888257 888263 888271 888287
-888313 888319 888323 888359 888361 888373 888389 888397 888409 888413 888427 888431
-888443 888451 888457 888469 888479 888493 888499 888533 888541 888557 888623 888631
-888637 888653 888659 888661 888683 888689 888691 888721 888737 888751 888761 888773
-888779 888781 888793 888799 888809 888827 888857 888869 888871 888887 888917 888919
-888931 888959 888961 888967 888983 888989 888997 889001 889027 889037 889039 889043
-889051 889069 889081 889087 889123 889139 889171 889177 889211 889237 889247 889261
-889271 889279 889289 889309 889313 889327 889337 889349 889351 889363 889367 889373
-889391 889411 889429 889439 889453 889481 889489 889501 889519 889579 889589 889597
-889631 889639 889657 889673 889687 889697 889699 889703 889727 889747 889769 889783
-889829 889871 889873 889877 889879 889891 889901 889907 889909 889921 889937 889951
-889957 889963 889997 890003 890011 890027 890053 890063 890083 890107 890111 890117
-890119 890129 890147 890159 890161 890177 890221 890231 890237 890287 890291 890303
-890317 890333 890371 890377 890419 890429 890437 890441 890459 890467 890501 890531
-890543 890551 890563 890597 890609 890653 890657 890671 890683 890707 890711 890717
-890737 890761 890789 890797 890803 890809 890821 890833 890843 890861 890863 890867
-890881 890887 890893 890927 890933 890941 890957 890963 890969 890993 890999 891001
-891017 891047 891049 891061 891067 891091 891101 891103 891133 891151 891161 891173
-891179 891223 891239 891251 891277 891287 891311 891323 891329 891349 891377 891379
-891389 891391 891409 891421 891427 891439 891481 891487 891491 891493 891509 891521
-891523 891551 891557 891559 891563 891571 891577 891587 891593 891601 891617 891629
-891643 891647 891659 891661 891677 891679 891707 891743 891749 891763 891767 891797
-891799 891809 891817 891823 891827 891829 891851 891859 891887 891889 891893 891899
-891907 891923 891929 891967 891983 891991 891997 892019 892027 892049 892057 892079
-892091 892093 892097 892103 892123 892141 892153 892159 892169 892189 892219 892237
-892249 892253 892261 892267 892271 892291 892321 892351 892357 892387 892391 892421
-892433 892439 892457 892471 892481 892513 892523 892531 892547 892553 892559 892579
-892597 892603 892609 892627 892643 892657 892663 892667 892709 892733 892747 892757
-892763 892777 892781 892783 892817 892841 892849 892861 892877 892901 892919 892933
-892951 892973 892987 892999 893003 893023 893029 893033 893041 893051 893059 893093
-893099 893107 893111 893117 893119 893131 893147 893149 893161 893183 893213 893219
-893227 893237 893257 893261 893281 893317 893339 893341 893351 893359 893363 893381
-893383 893407 893413 893419 893429 893441 893449 893479 893489 893509 893521 893549
-893567 893591 893603 893609 893653 893657 893671 893681 893701 893719 893723 893743
-893777 893797 893821 893839 893857 893863 893873 893881 893897 893903 893917 893929
-893933 893939 893989 893999 894011 894037 894059 894067 894073 894097 894109 894119
-894137 894139 894151 894161 894167 894181 894191 894193 894203 894209 894211 894221
-894227 894233 894239 894247 894259 894277 894281 894287 894301 894329 894343 894371
-894391 894403 894407 894409 894419 894427 894431 894449 894451 894503 894511 894521
-894527 894541 894547 894559 894581 894589 894611 894613 894637 894643 894667 894689
-894709 894713 894721 894731 894749 894763 894779 894791 894793 894811 894869 894871
-894893 894917 894923 894947 894973 894997 895003 895007 895009 895039 895049 895051
-895079 895087 895127 895133 895151 895157 895159 895171 895189 895211 895231 895241
-895243 895247 895253 895277 895283 895291 895309 895313 895319 895333 895343 895351
-895357 895361 895387 895393 895421 895423 895457 895463 895469 895471 895507 895529
-895553 895571 895579 895591 895613 895627 895633 895649 895651 895667 895669 895673
-895681 895691 895703 895709 895721 895729 895757 895771 895777 895787 895789 895799
-895801 895813 895823 895841 895861 895879 895889 895901 895903 895913 895927 895933
-895957 895987 896003 896009 896047 896069 896101 896107 896111 896113 896123 896143
-896167 896191 896201 896263 896281 896293 896297 896299 896323 896327 896341 896347
-896353 896369 896381 896417 896443 896447 896449 896453 896479 896491 896509 896521
-896531 896537 896543 896549 896557 896561 896573 896587 896617 896633 896647 896669
-896677 896681 896717 896719 896723 896771 896783 896803 896837 896867 896879 896897
-896921 896927 896947 896953 896963 896983 897007 897011 897019 897049 897053 897059
-897067 897077 897101 897103 897119 897133 897137 897157 897163 897191 897223 897229
-897241 897251 897263 897269 897271 897301 897307 897317 897319 897329 897349 897359
-897373 897401 897433 897443 897461 897467 897469 897473 897497 897499 897517 897527
-897553 897557 897563 897571 897577 897581 897593 897601 897607 897629 897647 897649
-897671 897691 897703 897707 897709 897727 897751 897779 897781 897817 897829 897847
-897877 897881 897887 897899 897907 897931 897947 897971 897983 898013 898019 898033
-898063 898067 898069 898091 898097 898109 898129 898133 898147 898153 898171 898181
-898189 898199 898211 898213 898223 898231 898241 898243 898253 898259 898279 898283
-898291 898307 898319 898327 898361 898369 898409 898421 898423 898427 898439 898459
-898477 898481 898483 898493 898519 898523 898543 898549 898553 898561 898607 898613
-898621 898661 898663 898669 898673 898691 898717 898727 898753 898763 898769 898787
-898813 898819 898823 898853 898867 898873 898889 898897 898921 898927 898951 898981
-898987 899009 899051 899057 899069 899123 899149 899153 899159 899161 899177 899179
-899183 899189 899209 899221 899233 899237 899263 899273 899291 899309 899321 899387
-899401 899413 899429 899447 899467 899473 899477 899491 899519 899531 899537 899611
-899617 899659 899671 899681 899687 899693 899711 899719 899749 899753 899761 899779
-899791 899807 899831 899849 899851 899863 899881 899891 899893 899903 899917 899939
-899971 899981 900001 900007 900019 900037 900061 900089 900091 900103 900121 900139
-900143 900149 900157 900161 900169 900187 900217 900233 900241 900253 900259 900283
-900287 900293 900307 900329 900331 900349 900397 900409 900443 900461 900481 900491
-900511 900539 900551 900553 900563 900569 900577 900583 900587 900589 900593 900607
-900623 900649 900659 900671 900673 900689 900701 900719 900737 900743 900751 900761
-900763 900773 900797 900803 900817 900821 900863 900869 900917 900929 900931 900937
-900959 900971 900973 900997 901007 901009 901013 901063 901067 901079 901093 901097
-901111 901133 901141 901169 901171 901177 901183 901193 901207 901211 901213 901247
-901249 901253 901273 901279 901309 901333 901339 901367 901399 901403 901423 901427
-901429 901441 901447 901451 901457 901471 901489 901499 901501 901513 901517 901529
-901547 901567 901591 901613 901643 901657 901679 901687 901709 901717 901739 901741
-901751 901781 901787 901811 901819 901841 901861 901891 901907 901909 901919 901931
-901937 901963 901973 901993 901997 902009 902017 902029 902039 902047 902053 902087
-902089 902119 902137 902141 902179 902191 902201 902227 902261 902263 902281 902299
-902303 902311 902333 902347 902351 902357 902389 902401 902413 902437 902449 902471
-902477 902483 902501 902507 902521 902563 902569 902579 902591 902597 902599 902611
-902639 902653 902659 902669 902677 902687 902719 902723 902753 902761 902767 902771
-902777 902789 902807 902821 902827 902849 902873 902903 902933 902953 902963 902971
-902977 902981 902987 903017 903029 903037 903073 903079 903103 903109 903143 903151
-903163 903179 903197 903211 903223 903251 903257 903269 903311 903323 903337 903347
-903359 903367 903389 903391 903403 903407 903421 903443 903449 903451 903457 903479
-903493 903527 903541 903547 903563 903569 903607 903613 903641 903649 903673 903677
-903691 903701 903709 903751 903757 903761 903781 903803 903827 903841 903871 903883
-903899 903913 903919 903949 903967 903979 904019 904027 904049 904067 904069 904073
-904087 904093 904097 904103 904117 904121 904147 904157 904181 904193 904201 904207
-904217 904219 904261 904283 904289 904297 904303 904357 904361 904369 904399 904441
-904459 904483 904489 904499 904511 904513 904517 904523 904531 904559 904573 904577
-904601 904619 904627 904633 904637 904643 904661 904663 904667 904679 904681 904693
-904697 904721 904727 904733 904759 904769 904777 904781 904789 904793 904801 904811
-904823 904847 904861 904867 904873 904879 904901 904903 904907 904919 904931 904933
-904987 904997 904999 905011 905053 905059 905071 905083 905087 905111 905123 905137
-905143 905147 905161 905167 905171 905189 905197 905207 905209 905213 905227 905249
-905269 905291 905297 905299 905329 905339 905347 905381 905413 905449 905453 905461
-905477 905491 905497 905507 905551 905581 905587 905599 905617 905621 905629 905647
-905651 905659 905677 905683 905687 905693 905701 905713 905719 905759 905761 905767
-905783 905803 905819 905833 905843 905897 905909 905917 905923 905951 905959 905963
-905999 906007 906011 906013 906023 906029 906043 906089 906107 906119 906121 906133
-906179 906187 906197 906203 906211 906229 906233 906259 906263 906289 906293 906313
-906317 906329 906331 906343 906349 906371 906377 906383 906391 906403 906421 906427
-906431 906461 906473 906481 906487 906497 906517 906523 906539 906541 906557 906589
-906601 906613 906617 906641 906649 906673 906679 906691 906701 906707 906713 906727
-906749 906751 906757 906767 906779 906793 906809 906817 906823 906839 906847 906869
-906881 906901 906911 906923 906929 906931 906943 906949 906973 907019 907021 907031
-907063 907073 907099 907111 907133 907139 907141 907163 907169 907183 907199 907211
-907213 907217 907223 907229 907237 907259 907267 907279 907297 907301 907321 907331
-907363 907367 907369 907391 907393 907397 907399 907427 907433 907447 907457 907469
-907471 907481 907493 907507 907513 907549 907561 907567 907583 907589 907637 907651
-907657 907663 907667 907691 907693 907703 907717 907723 907727 907733 907757 907759
-907793 907807 907811 907813 907831 907843 907849 907871 907891 907909 907913 907927
-907957 907967 907969 907997 907999 908003 908041 908053 908057 908071 908081 908101
-908113 908129 908137 908153 908179 908183 908197 908213 908221 908233 908249 908287
-908317 908321 908353 908359 908363 908377 908381 908417 908419 908441 908449 908459
-908471 908489 908491 908503 908513 908521 908527 908533 908539 908543 908549 908573
-908581 908591 908597 908603 908617 908623 908627 908653 908669 908671 908711 908723
-908731 908741 908749 908759 908771 908797 908807 908813 908819 908821 908849 908851
-908857 908861 908863 908879 908881 908893 908909 908911 908927 908953 908959 908993
-909019 909023 909031 909037 909043 909047 909061 909071 909089 909091 909107 909113
-909119 909133 909151 909173 909203 909217 909239 909241 909247 909253 909281 909287
-909289 909299 909301 909317 909319 909329 909331 909341 909343 909371 909379 909383
-909401 909409 909437 909451 909457 909463 909481 909521 909529 909539 909541 909547
-909577 909599 909611 909613 909631 909637 909679 909683 909691 909697 909731 909737
-909743 909761 909767 909773 909787 909791 909803 909809 909829 909833 909859 909863
-909877 909889 909899 909901 909907 909911 909917 909971 909973 909977 910003 910031
-910051 910069 910093 910097 910099 910103 910109 910121 910127 910139 910141 910171
-910177 910199 910201 910207 910213 910219 910229 910277 910279 910307 910361 910369
-910421 910447 910451 910453 910457 910471 910519 910523 910561 910577 910583 910603
-910619 910621 910627 910631 910643 910661 910691 910709 910711 910747 910751 910771
-910781 910787 910799 910807 910817 910849 910853 910883 910909 910939 910957 910981
-911003 911011 911023 911033 911039 911063 911077 911087 911089 911101 911111 911129
-911147 911159 911161 911167 911171 911173 911179 911201 911219 911227 911231 911233
-911249 911269 911291 911293 911303 911311 911321 911327 911341 911357 911359 911363
-911371 911413 911419 911437 911453 911459 911503 911507 911527 911549 911593 911597
-911621 911633 911657 911663 911671 911681 911683 911689 911707 911719 911723 911737
-911749 911773 911777 911783 911819 911831 911837 911839 911851 911861 911873 911879
-911893 911899 911903 911917 911947 911951 911957 911959 911969 912007 912031 912047
-912049 912053 912061 912083 912089 912103 912167 912173 912187 912193 912211 912217
-912227 912239 912251 912269 912287 912337 912343 912349 912367 912391 912397 912403
-912409 912413 912449 912451 912463 912467 912469 912481 912487 912491 912497 912511
-912521 912523 912533 912539 912559 912581 912631 912647 912649 912727 912763 912773
-912797 912799 912809 912823 912829 912839 912851 912853 912859 912869 912871 912911
-912929 912941 912953 912959 912971 912973 912979 912991 913013 913027 913037 913039
-913063 913067 913103 913139 913151 913177 913183 913217 913247 913259 913279 913309
-913321 913327 913331 913337 913373 913397 913417 913421 913433 913441 913447 913457
-913483 913487 913513 913571 913573 913579 913589 913637 913639 913687 913709 913723
-913739 913753 913771 913799 913811 913853 913873 913889 913907 913921 913933 913943
-913981 913999 914021 914027 914041 914047 914117 914131 914161 914189 914191 914213
-914219 914237 914239 914257 914269 914279 914293 914321 914327 914339 914351 914357
-914359 914363 914369 914371 914429 914443 914449 914461 914467 914477 914491 914513
-914519 914521 914533 914561 914569 914579 914581 914591 914597 914609 914611 914629
-914647 914657 914701 914713 914723 914731 914737 914777 914783 914789 914791 914801
-914813 914819 914827 914843 914857 914861 914867 914873 914887 914891 914897 914941
-914951 914971 914981 915007 915017 915029 915041 915049 915053 915067 915071 915113
-915139 915143 915157 915181 915191 915197 915199 915203 915221 915223 915247 915251
-915253 915259 915283 915301 915311 915353 915367 915379 915391 915437 915451 915479
-915487 915527 915533 915539 915547 915557 915587 915589 915601 915611 915613 915623
-915631 915641 915659 915683 915697 915703 915727 915731 915737 915757 915763 915769
-915799 915839 915851 915869 915881 915911 915917 915919 915947 915949 915961 915973
-915991 916031 916033 916049 916057 916061 916073 916099 916103 916109 916121 916127
-916129 916141 916169 916177 916183 916187 916189 916213 916217 916219 916259 916261
-916273 916291 916319 916337 916339 916361 916367 916387 916411 916417 916441 916451
-916457 916463 916469 916471 916477 916501 916507 916511 916537 916561 916571 916583
-916613 916621 916633 916649 916651 916679 916703 916733 916771 916781 916787 916831
-916837 916841 916859 916871 916879 916907 916913 916931 916933 916939 916961 916973
-916999 917003 917039 917041 917051 917053 917083 917089 917093 917101 917113 917117
-917123 917141 917153 917159 917173 917179 917209 917219 917227 917237 917239 917243
-917251 917281 917291 917317 917327 917333 917353 917363 917381 917407 917443 917459
-917461 917471 917503 917513 917519 917549 917557 917573 917591 917593 917611 917617
-917629 917633 917641 917659 917669 917687 917689 917713 917729 917737 917753 917759
-917767 917771 917773 917783 917789 917803 917809 917827 917831 917837 917843 917849
-917869 917887 917893 917923 917927 917951 917971 917993 918011 918019 918041 918067
-918079 918089 918103 918109 918131 918139 918143 918149 918157 918161 918173 918193
-918199 918209 918223 918257 918259 918263 918283 918301 918319 918329 918341 918347
-918353 918361 918371 918389 918397 918431 918433 918439 918443 918469 918481 918497
-918529 918539 918563 918581 918583 918587 918613 918641 918647 918653 918677 918679
-918683 918733 918737 918751 918763 918767 918779 918787 918793 918823 918829 918839
-918857 918877 918889 918899 918913 918943 918947 918949 918959 918971 918989 919013
-919019 919021 919031 919033 919063 919067 919081 919109 919111 919129 919147 919153
-919169 919183 919189 919223 919229 919231 919249 919253 919267 919301 919313 919319
-919337 919349 919351 919381 919393 919409 919417 919421 919423 919427 919447 919511
-919519 919531 919559 919571 919591 919613 919621 919631 919679 919691 919693 919703
-919729 919757 919759 919769 919781 919799 919811 919817 919823 919859 919871 919883
-919901 919903 919913 919927 919937 919939 919949 919951 919969 919979 920011 920021
-920039 920053 920107 920123 920137 920147 920149 920167 920197 920201 920203 920209
-920219 920233 920263 920267 920273 920279 920281 920291 920323 920333 920357 920371
-920377 920393 920399 920407 920411 920419 920441 920443 920467 920473 920477 920497
-920509 920519 920539 920561 920609 920641 920651 920653 920677 920687 920701 920707
-920729 920741 920743 920753 920761 920783 920789 920791 920807 920827 920833 920849
-920863 920869 920891 920921 920947 920951 920957 920963 920971 920999 921001 921007
-921013 921029 921031 921073 921079 921091 921121 921133 921143 921149 921157 921169
-921191 921197 921199 921203 921223 921233 921241 921257 921259 921287 921293 921331
-921353 921373 921379 921407 921409 921457 921463 921467 921491 921497 921499 921517
-921523 921563 921581 921589 921601 921611 921629 921637 921643 921647 921667 921677
-921703 921733 921737 921743 921749 921751 921761 921779 921787 921821 921839 921841
-921871 921887 921889 921901 921911 921913 921919 921931 921959 921989 922021 922027
-922037 922039 922043 922057 922067 922069 922073 922079 922081 922087 922099 922123
-922169 922211 922217 922223 922237 922247 922261 922283 922289 922291 922303 922309
-922321 922331 922333 922351 922357 922367 922391 922423 922451 922457 922463 922487
-922489 922499 922511 922513 922517 922531 922549 922561 922601 922613 922619 922627
-922631 922637 922639 922643 922667 922679 922681 922699 922717 922729 922739 922741
-922781 922807 922813 922853 922861 922897 922907 922931 922973 922993 923017 923023
-923029 923047 923051 923053 923107 923123 923129 923137 923141 923147 923171 923177
-923179 923183 923201 923203 923227 923233 923239 923249 923309 923311 923333 923341
-923347 923369 923371 923387 923399 923407 923411 923437 923441 923449 923453 923467
-923471 923501 923509 923513 923539 923543 923551 923561 923567 923579 923581 923591
-923599 923603 923617 923641 923653 923687 923693 923701 923711 923719 923743 923773
-923789 923809 923833 923849 923851 923861 923869 923903 923917 923929 923939 923947
-923953 923959 923963 923971 923977 923983 923987 924019 924023 924031 924037 924041
-924043 924059 924073 924083 924097 924101 924109 924139 924151 924173 924191 924197
-924241 924269 924281 924283 924299 924323 924337 924359 924361 924383 924397 924401
-924403 924419 924421 924431 924437 924463 924493 924499 924503 924523 924527 924529
-924551 924557 924601 924617 924641 924643 924659 924661 924683 924697 924709 924713
-924719 924727 924731 924743 924751 924757 924769 924773 924779 924793 924809 924811
-924827 924829 924841 924871 924877 924881 924907 924929 924961 924967 924997 925019
-925027 925033 925039 925051 925063 925073 925079 925081 925087 925097 925103 925109
-925117 925121 925147 925153 925159 925163 925181 925189 925193 925217 925237 925241
-925271 925273 925279 925291 925307 925339 925349 925369 925373 925387 925391 925399
-925409 925423 925447 925469 925487 925499 925501 925513 925517 925523 925559 925577
-925579 925597 925607 925619 925621 925637 925649 925663 925669 925679 925697 925721
-925733 925741 925783 925789 925823 925831 925843 925849 925891 925901 925913 925921
-925937 925943 925949 925961 925979 925987 925997 926017 926027 926033 926077 926087
-926089 926099 926111 926113 926129 926131 926153 926161 926171 926179 926183 926203
-926227 926239 926251 926273 926293 926309 926327 926351 926353 926357 926377 926389
-926399 926411 926423 926437 926461 926467 926489 926503 926507 926533 926537 926557
-926561 926567 926581 926587 926617 926623 926633 926657 926659 926669 926671 926689
-926701 926707 926741 926747 926767 926777 926797 926803 926819 926843 926851 926867
-926879 926899 926903 926921 926957 926963 926971 926977 926983 927001 927007 927013
-927049 927077 927083 927089 927097 927137 927149 927161 927167 927187 927191 927229
-927233 927259 927287 927301 927313 927317 927323 927361 927373 927397 927403 927431
-927439 927491 927497 927517 927529 927533 927541 927557 927569 927587 927629 927631
-927643 927649 927653 927671 927677 927683 927709 927727 927743 927763 927769 927779
-927791 927803 927821 927833 927841 927847 927853 927863 927869 927961 927967 927973
-928001 928043 928051 928063 928079 928097 928099 928111 928139 928141 928153 928157
-928159 928163 928177 928223 928231 928253 928267 928271 928273 928289 928307 928313
-928331 928337 928351 928399 928409 928423 928427 928429 928453 928457 928463 928469
-928471 928513 928547 928559 928561 928597 928607 928619 928621 928637 928643 928649
-928651 928661 928679 928699 928703 928769 928771 928787 928793 928799 928813 928817
-928819 928849 928859 928871 928883 928903 928913 928927 928933 928979 929003 929009
-929011 929023 929029 929051 929057 929059 929063 929069 929077 929083 929087 929113
-929129 929141 929153 929161 929171 929197 929207 929209 929239 929251 929261 929281
-929293 929303 929311 929323 929333 929381 929389 929393 929399 929417 929419 929431
-929459 929483 929497 929501 929507 929527 929549 929557 929561 929573 929581 929587
-929609 929623 929627 929629 929639 929641 929647 929671 929693 929717 929737 929741
-929743 929749 929777 929791 929807 929809 929813 929843 929861 929869 929881 929891
-929897 929941 929953 929963 929977 929983 930011 930043 930071 930073 930077 930079
-930089 930101 930113 930119 930157 930173 930179 930187 930191 930197 930199 930211
-930229 930269 930277 930283 930287 930289 930301 930323 930337 930379 930389 930409
-930437 930467 930469 930481 930491 930499 930509 930547 930551 930569 930571 930583
-930593 930617 930619 930637 930653 930667 930689 930707 930719 930737 930749 930763
-930773 930779 930817 930827 930841 930847 930859 930863 930889 930911 930931 930973
-930977 930989 930991 931003 931013 931067 931087 931097 931123 931127 931129 931153
-931163 931169 931181 931193 931199 931213 931237 931241 931267 931289 931303 931309
-931313 931319 931351 931363 931387 931417 931421 931487 931499 931517 931529 931537
-931543 931571 931573 931577 931597 931621 931639 931657 931691 931709 931727 931729
-931739 931747 931751 931757 931781 931783 931789 931811 931837 931849 931859 931873
-931877 931883 931901 931907 931913 931921 931933 931943 931949 931967 931981 931999
-932003 932021 932039 932051 932081 932101 932117 932119 932131 932149 932153 932177
-932189 932203 932207 932209 932219 932221 932227 932231 932257 932303 932317 932333
-932341 932353 932357 932413 932417 932419 932431 932441 932447 932471 932473 932483
-932497 932513 932521 932537 932549 932557 932563 932567 932579 932587 932593 932597
-932609 932647 932651 932663 932677 932681 932683 932749 932761 932779 932783 932801
-932803 932819 932839 932863 932879 932887 932917 932923 932927 932941 932947 932951
-932963 932969 932983 932999 933001 933019 933047 933059 933061 933067 933073 933151
-933157 933173 933199 933209 933217 933221 933241 933259 933263 933269 933293 933301
-933313 933319 933329 933349 933389 933397 933403 933407 933421 933433 933463 933479
-933497 933523 933551 933553 933563 933601 933607 933613 933643 933649 933671 933677
-933703 933707 933739 933761 933781 933787 933797 933809 933811 933817 933839 933847
-933851 933853 933883 933893 933923 933931 933943 933949 933953 933967 933973 933979
-934001 934009 934033 934039 934049 934051 934057 934067 934069 934079 934111 934117
-934121 934127 934151 934159 934187 934223 934229 934243 934253 934259 934277 934291
-934301 934319 934343 934387 934393 934399 934403 934429 934441 934463 934469 934481
-934487 934489 934499 934517 934523 934537 934543 934547 934561 934567 934579 934597
-934603 934607 934613 934639 934669 934673 934693 934721 934723 934733 934753 934763
-934771 934793 934799 934811 934831 934837 934853 934861 934883 934889 934891 934897
-934907 934909 934919 934939 934943 934951 934961 934979 934981 935003 935021 935023
-935059 935063 935071 935093 935107 935113 935147 935149 935167 935183 935189 935197
-935201 935213 935243 935257 935261 935303 935339 935353 935359 935377 935381 935393
-935399 935413 935423 935443 935447 935461 935489 935507 935513 935531 935537 935581
-935587 935591 935593 935603 935621 935639 935651 935653 935677 935687 935689 935699
-935707 935717 935719 935761 935771 935777 935791 935813 935819 935827 935839 935843
-935861 935899 935903 935971 935999 936007 936029 936053 936097 936113 936119 936127
-936151 936161 936179 936181 936197 936203 936223 936227 936233 936253 936259 936281
-936283 936311 936319 936329 936361 936379 936391 936401 936407 936413 936437 936451
-936469 936487 936493 936499 936511 936521 936527 936539 936557 936577 936587 936599
-936619 936647 936659 936667 936673 936679 936697 936709 936713 936731 936737 936739
-936769 936773 936779 936797 936811 936827 936869 936889 936907 936911 936917 936919
-936937 936941 936953 936967 937003 937007 937009 937031 937033 937049 937067 937121
-937127 937147 937151 937171 937187 937207 937229 937231 937241 937243 937253 937331
-937337 937351 937373 937379 937421 937429 937459 937463 937477 937481 937501 937511
-937537 937571 937577 937589 937591 937613 937627 937633 937637 937639 937661 937663
-937667 937679 937681 937693 937709 937721 937747 937751 937777 937789 937801 937813
-937819 937823 937841 937847 937877 937883 937891 937901 937903 937919 937927 937943
-937949 937969 937991 938017 938023 938027 938033 938051 938053 938057 938059 938071
-938083 938089 938099 938107 938117 938129 938183 938207 938219 938233 938243 938251
-938257 938263 938279 938293 938309 938323 938341 938347 938351 938359 938369 938387
-938393 938437 938447 938453 938459 938491 938507 938533 938537 938563 938569 938573
-938591 938611 938617 938659 938677 938681 938713 938747 938761 938803 938807 938827
-938831 938843 938857 938869 938879 938881 938921 938939 938947 938953 938963 938969
-938981 938983 938989 939007 939011 939019 939061 939089 939091 939109 939119 939121
-939157 939167 939179 939181 939193 939203 939229 939247 939287 939293 939299 939317
-939347 939349 939359 939361 939373 939377 939391 939413 939431 939439 939443 939451
-939469 939487 939511 939551 939581 939599 939611 939613 939623 939649 939661 939677
-939707 939713 939737 939739 939749 939767 939769 939773 939791 939793 939823 939839
-939847 939853 939871 939881 939901 939923 939931 939971 939973 939989 939997 940001
-940003 940019 940031 940067 940073 940087 940097 940127 940157 940169 940183 940189
-940201 940223 940229 940241 940249 940259 940271 940279 940297 940301 940319 940327
-940349 940351 940361 940369 940399 940403 940421 940469 940477 940483 940501 940523
-940529 940531 940543 940547 940549 940553 940573 940607 940619 940649 940669 940691
-940703 940721 940727 940733 940739 940759 940781 940783 940787 940801 940813 940817
-940829 940853 940871 940879 940889 940903 940913 940921 940931 940949 940957 940981
-940993 941009 941011 941023 941027 941041 941093 941099 941117 941119 941123 941131
-941153 941159 941167 941179 941201 941207 941209 941221 941249 941251 941263 941267
-941299 941309 941323 941329 941351 941359 941383 941407 941429 941441 941449 941453
-941461 941467 941471 941489 941491 941503 941509 941513 941519 941537 941557 941561
-941573 941593 941599 941609 941617 941641 941653 941663 941669 941671 941683 941701
-941723 941737 941741 941747 941753 941771 941791 941813 941839 941861 941879 941903
-941911 941929 941933 941947 941971 941981 941989 941999 942013 942017 942031 942037
-942041 942043 942049 942061 942079 942091 942101 942113 942143 942163 942167 942169
-942187 942199 942217 942223 942247 942257 942269 942301 942311 942313 942317 942341
-942367 942371 942401 942433 942437 942439 942449 942479 942509 942521 942527 942541
-942569 942577 942583 942593 942607 942637 942653 942659 942661 942691 942709 942719
-942727 942749 942763 942779 942787 942811 942827 942847 942853 942857 942859 942869
-942883 942889 942899 942901 942917 942943 942979 942983 943003 943009 943013 943031
-943043 943057 943073 943079 943081 943091 943097 943127 943139 943153 943157 943183
-943199 943213 943219 943231 943249 943273 943277 943289 943301 943303 943307 943321
-943343 943357 943363 943367 943373 943387 943403 943409 943421 943429 943471 943477
-943499 943511 943541 943543 943567 943571 943589 943601 943603 943637 943651 943693
-943699 943729 943741 943751 943757 943763 943769 943777 943781 943783 943799 943801
-943819 943837 943841 943843 943849 943871 943903 943909 943913 943931 943951 943967
-944003 944017 944029 944039 944071 944077 944123 944137 944143 944147 944149 944161
-944179 944191 944233 944239 944257 944261 944263 944297 944309 944329 944369 944387
-944389 944393 944399 944417 944429 944431 944453 944467 944473 944491 944497 944519
-944521 944527 944533 944543 944551 944561 944563 944579 944591 944609 944621 944651
-944659 944677 944687 944689 944701 944711 944717 944729 944731 944773 944777 944803
-944821 944833 944857 944873 944887 944893 944897 944899 944929 944953 944963 944969
-944987 945031 945037 945059 945089 945103 945143 945151 945179 945209 945211 945227
-945233 945289 945293 945331 945341 945349 945359 945367 945377 945389 945391 945397
-945409 945431 945457 945463 945473 945479 945481 945521 945547 945577 945587 945589
-945601 945629 945631 945647 945671 945673 945677 945701 945731 945733 945739 945767
-945787 945799 945809 945811 945817 945823 945851 945881 945883 945887 945899 945907
-945929 945937 945941 945943 945949 945961 945983 946003 946021 946031 946037 946079
-946081 946091 946093 946109 946111 946123 946133 946163 946177 946193 946207 946223
-946249 946273 946291 946307 946327 946331 946367 946369 946391 946397 946411 946417
-946453 946459 946469 946487 946489 946507 946511 946513 946549 946573 946579 946607
-946661 946663 946667 946669 946681 946697 946717 946727 946733 946741 946753 946769
-946783 946801 946819 946823 946853 946859 946861 946873 946877 946901 946919 946931
-946943 946949 946961 946969 946987 946993 946997 947027 947033 947083 947119 947129
-947137 947171 947183 947197 947203 947239 947263 947299 947327 947341 947351 947357
-947369 947377 947381 947383 947389 947407 947411 947413 947417 947423 947431 947449
-947483 947501 947509 947539 947561 947579 947603 947621 947627 947641 947647 947651
-947659 947707 947711 947719 947729 947741 947743 947747 947753 947773 947783 947803
-947819 947833 947851 947857 947861 947873 947893 947911 947917 947927 947959 947963
-947987 948007 948019 948029 948041 948049 948053 948061 948067 948089 948091 948133
-948139 948149 948151 948169 948173 948187 948247 948253 948263 948281 948287 948293
-948317 948331 948349 948377 948391 948401 948403 948407 948427 948439 948443 948449
-948457 948469 948487 948517 948533 948547 948551 948557 948581 948593 948659 948671
-948707 948713 948721 948749 948767 948797 948799 948839 948847 948853 948877 948887
-948901 948907 948929 948943 948947 948971 948973 948989 949001 949019 949021 949033
-949037 949043 949051 949111 949121 949129 949147 949153 949159 949171 949211 949213
-949241 949243 949253 949261 949303 949307 949381 949387 949391 949409 949423 949427
-949439 949441 949451 949453 949471 949477 949513 949517 949523 949567 949583 949589
-949607 949609 949621 949631 949633 949643 949649 949651 949667 949673 949687 949691
-949699 949733 949759 949771 949777 949789 949811 949849 949853 949889 949891 949903
-949931 949937 949939 949951 949957 949961 949967 949973 949979 949987 949997 950009
-950023 950029 950039 950041 950071 950083 950099 950111 950149 950161 950177 950179
-950207 950221 950227 950231 950233 950239 950251 950269 950281 950329 950333 950347
-950357 950363 950393 950401 950423 950447 950459 950461 950473 950479 950483 950497
-950501 950507 950519 950527 950531 950557 950569 950611 950617 950633 950639 950647
-950671 950681 950689 950693 950699 950717 950723 950737 950743 950753 950783 950791
-950809 950813 950819 950837 950839 950867 950869 950879 950921 950927 950933 950947
-950953 950959 950993 951001 951019 951023 951029 951047 951053 951059 951061 951079
-951089 951091 951101 951107 951109 951131 951151 951161 951193 951221 951259 951277
-951281 951283 951299 951331 951341 951343 951361 951367 951373 951389 951407 951413
-951427 951437 951449 951469 951479 951491 951497 951553 951557 951571 951581 951583
-951589 951623 951637 951641 951647 951649 951659 951689 951697 951749 951781 951787
-951791 951803 951829 951851 951859 951887 951893 951911 951941 951943 951959 951967
-951997 952001 952009 952037 952057 952073 952087 952097 952111 952117 952123 952129
-952141 952151 952163 952169 952183 952199 952207 952219 952229 952247 952253 952277
-952279 952291 952297 952313 952349 952363 952379 952381 952397 952423 952429 952439
-952481 952487 952507 952513 952541 952547 952559 952573 952583 952597 952619 952649
-952657 952667 952669 952681 952687 952691 952709 952739 952741 952753 952771 952789
-952811 952813 952823 952829 952843 952859 952873 952877 952883 952921 952927 952933
-952937 952943 952957 952967 952979 952981 952997 953023 953039 953041 953053 953077
-953081 953093 953111 953131 953149 953171 953179 953191 953221 953237 953243 953261
-953273 953297 953321 953333 953341 953347 953399 953431 953437 953443 953473 953483
-953497 953501 953503 953507 953521 953539 953543 953551 953567 953593 953621 953639
-953647 953651 953671 953681 953699 953707 953731 953747 953773 953789 953791 953831
-953851 953861 953873 953881 953917 953923 953929 953941 953969 953977 953983 953987
-954001 954007 954011 954043 954067 954097 954103 954131 954133 954139 954157 954167
-954181 954203 954209 954221 954229 954253 954257 954259 954263 954269 954277 954287
-954307 954319 954323 954367 954377 954379 954391 954409 954433 954451 954461 954469
-954491 954497 954509 954517 954539 954571 954599 954619 954623 954641 954649 954671
-954677 954697 954713 954719 954727 954743 954757 954763 954827 954829 954847 954851
-954853 954857 954869 954871 954911 954917 954923 954929 954971 954973 954977 954979
-954991 955037 955039 955051 955061 955063 955091 955093 955103 955127 955139 955147
-955153 955183 955193 955211 955217 955223 955243 955261 955267 955271 955277 955307
-955309 955313 955319 955333 955337 955363 955379 955391 955433 955439 955441 955457
-955469 955477 955481 955483 955501 955511 955541 955601 955607 955613 955649 955657
-955693 955697 955709 955711 955727 955729 955769 955777 955781 955793 955807 955813
-955819 955841 955853 955879 955883 955891 955901 955919 955937 955939 955951 955957
-955963 955967 955987 955991 955993 956003 956051 956057 956083 956107 956113 956119
-956143 956147 956177 956231 956237 956261 956269 956273 956281 956303 956311 956341
-956353 956357 956377 956383 956387 956393 956399 956401 956429 956477 956503 956513
-956521 956569 956587 956617 956633 956689 956699 956713 956723 956749 956759 956789
-956801 956831 956843 956849 956861 956881 956903 956909 956929 956941 956951 956953
-956987 956993 956999 957031 957037 957041 957043 957059 957071 957091 957097 957107
-957109 957119 957133 957139 957161 957169 957181 957193 957211 957221 957241 957247
-957263 957289 957317 957331 957337 957349 957361 957403 957409 957413 957419 957431
-957433 957499 957529 957547 957553 957557 957563 957587 957599 957601 957611 957641
-957643 957659 957701 957703 957709 957721 957731 957751 957769 957773 957811 957821
-957823 957851 957871 957877 957889 957917 957937 957949 957953 957959 957977 957991
-958007 958021 958039 958043 958049 958051 958057 958063 958121 958123 958141 958159
-958163 958183 958193 958213 958259 958261 958289 958313 958319 958327 958333 958339
-958343 958351 958357 958361 958367 958369 958381 958393 958423 958439 958459 958481
-958487 958499 958501 958519 958523 958541 958543 958547 958549 958553 958577 958609
-958627 958637 958667 958669 958673 958679 958687 958693 958729 958739 958777 958787
-958807 958819 958829 958843 958849 958871 958877 958883 958897 958901 958921 958931
-958933 958957 958963 958967 958973 959009 959083 959093 959099 959131 959143 959149
-959159 959173 959183 959207 959209 959219 959227 959237 959263 959267 959269 959279
-959323 959333 959339 959351 959363 959369 959377 959383 959389 959449 959461 959467
-959471 959473 959477 959479 959489 959533 959561 959579 959597 959603 959617 959627
-959659 959677 959681 959689 959719 959723 959737 959759 959773 959779 959801 959809
-959831 959863 959867 959869 959873 959879 959887 959911 959921 959927 959941 959947
-959953 959969 960017 960019 960031 960049 960053 960059 960077 960119 960121 960131
-960137 960139 960151 960173 960191 960199 960217 960229 960251 960259 960293 960299
-960329 960331 960341 960353 960373 960383 960389 960419 960467 960493 960497 960499
-960521 960523 960527 960569 960581 960587 960593 960601 960637 960643 960647 960649
-960667 960677 960691 960703 960709 960737 960763 960793 960803 960809 960829 960833
-960863 960889 960931 960937 960941 960961 960977 960983 960989 960991 961003 961021
-961033 961063 961067 961069 961073 961087 961091 961097 961099 961109 961117 961123
-961133 961139 961141 961151 961157 961159 961183 961187 961189 961201 961241 961243
-961273 961277 961283 961313 961319 961339 961393 961397 961399 961427 961447 961451
-961453 961459 961487 961507 961511 961529 961531 961547 961549 961567 961601 961613
-961619 961627 961633 961637 961643 961657 961661 961663 961679 961687 961691 961703
-961729 961733 961739 961747 961757 961769 961777 961783 961789 961811 961813 961817
-961841 961847 961853 961861 961871 961879 961927 961937 961943 961957 961973 961981
-961991 961993 962009 962011 962033 962041 962051 962063 962077 962099 962119 962131
-962161 962177 962197 962233 962237 962243 962257 962267 962303 962309 962341 962363
-962413 962417 962431 962441 962447 962459 962461 962471 962477 962497 962503 962509
-962537 962543 962561 962569 962587 962603 962609 962617 962623 962627 962653 962669
-962671 962677 962681 962683 962737 962743 962747 962779 962783 962789 962791 962807
-962837 962839 962861 962867 962869 962903 962909 962911 962921 962959 962963 962971
-962993 963019 963031 963043 963047 963097 963103 963121 963143 963163 963173 963181
-963187 963191 963211 963223 963227 963239 963241 963253 963283 963299 963301 963311
-963323 963331 963341 963343 963349 963367 963379 963397 963419 963427 963461 963481
-963491 963497 963499 963559 963581 963601 963607 963629 963643 963653 963659 963667
-963689 963691 963701 963707 963709 963719 963731 963751 963761 963763 963779 963793
-963799 963811 963817 963839 963841 963847 963863 963871 963877 963899 963901 963913
-963943 963973 963979 964009 964021 964027 964039 964049 964081 964097 964133 964151
-964153 964199 964207 964213 964217 964219 964253 964259 964261 964267 964283 964289
-964297 964303 964309 964333 964339 964351 964357 964363 964373 964417 964423 964433
-964463 964499 964501 964507 964517 964519 964531 964559 964571 964577 964583 964589
-964609 964637 964661 964679 964693 964697 964703 964721 964753 964757 964783 964787
-964793 964823 964829 964861 964871 964879 964883 964889 964897 964913 964927 964933
-964939 964967 964969 964973 964981 965023 965047 965059 965087 965089 965101 965113
-965117 965131 965147 965161 965171 965177 965179 965189 965191 965197 965201 965227
-965233 965249 965267 965291 965303 965317 965329 965357 965369 965399 965401 965407
-965411 965423 965429 965443 965453 965467 965483 965491 965507 965519 965533 965551
-965567 965603 965611 965621 965623 965639 965647 965659 965677 965711 965749 965759
-965773 965777 965779 965791 965801 965843 965851 965857 965893 965927 965953 965963
-965969 965983 965989 966011 966013 966029 966041 966109 966113 966139 966149 966157
-966191 966197 966209 966211 966221 966227 966233 966241 966257 966271 966293 966307
-966313 966319 966323 966337 966347 966353 966373 966377 966379 966389 966401 966409
-966419 966431 966439 966463 966481 966491 966499 966509 966521 966527 966547 966557
-966583 966613 966617 966619 966631 966653 966659 966661 966677 966727 966751 966781
-966803 966817 966863 966869 966871 966883 966893 966907 966913 966919 966923 966937
-966961 966971 966991 966997 967003 967019 967049 967061 967111 967129 967139 967171
-967201 967229 967259 967261 967289 967297 967319 967321 967327 967333 967349 967361
-967363 967391 967397 967427 967429 967441 967451 967459 967481 967493 967501 967507
-967511 967529 967567 967583 967607 967627 967663 967667 967693 967699 967709 967721
-967739 967751 967753 967763 967781 967787 967819 967823 967831 967843 967847 967859
-967873 967877 967903 967919 967931 967937 967951 967961 967979 967999 968003 968017
-968021 968027 968041 968063 968089 968101 968111 968113 968117 968137 968141 968147
-968159 968173 968197 968213 968237 968239 968251 968263 968267 968273 968291 968299
-968311 968321 968329 968333 968353 968377 968381 968389 968419 968423 968431 968437
-968459 968467 968479 968501 968503 968519 968521 968537 968557 968567 968573 968593
-968641 968647 968659 968663 968689 968699 968713 968729 968731 968761 968801 968809
-968819 968827 968831 968857 968879 968897 968909 968911 968917 968939 968959 968963
-968971 969011 969037 969041 969049 969071 969083 969097 969109 969113 969131 969139
-969167 969179 969181 969233 969239 969253 969257 969259 969271 969301 969341 969343
-969347 969359 969377 969403 969407 969421 969431 969433 969443 969457 969461 969467
-969481 969497 969503 969509 969533 969559 969569 969593 969599 969637 969641 969667
-969671 969677 969679 969713 969719 969721 969743 969757 969763 969767 969791 969797
-969809 969821 969851 969863 969869 969877 969889 969907 969911 969919 969923 969929
-969977 969989 970027 970031 970043 970051 970061 970063 970069 970087 970091 970111
-970133 970147 970201 970213 970217 970219 970231 970237 970247 970259 970261 970267
-970279 970297 970303 970313 970351 970391 970421 970423 970433 970441 970447 970457
-970469 970481 970493 970537 970549 970561 970573 970583 970603 970633 970643 970657
-970667 970687 970699 970721 970747 970777 970787 970789 970793 970799 970813 970817
-970829 970847 970859 970861 970867 970877 970883 970903 970909 970927 970939 970943
-970961 970967 970969 970987 970997 970999 971021 971027 971029 971039 971051 971053
-971063 971077 971093 971099 971111 971141 971143 971149 971153 971171 971177 971197
-971207 971237 971251 971263 971273 971279 971281 971291 971309 971339 971353 971357
-971371 971381 971387 971389 971401 971419 971429 971441 971473 971479 971483 971491
-971501 971513 971521 971549 971561 971563 971569 971591 971639 971651 971653 971683
-971693 971699 971713 971723 971753 971759 971767 971783 971821 971833 971851 971857
-971863 971899 971903 971917 971921 971933 971939 971951 971959 971977 971981 971989
-972001 972017 972029 972031 972047 972071 972079 972091 972113 972119 972121 972131
-972133 972137 972161 972163 972197 972199 972221 972227 972229 972259 972263 972271
-972277 972313 972319 972329 972337 972343 972347 972353 972373 972403 972407 972409
-972427 972431 972443 972469 972473 972481 972493 972533 972557 972577 972581 972599
-972611 972613 972623 972637 972649 972661 972679 972683 972701 972721 972787 972793
-972799 972823 972827 972833 972847 972869 972887 972899 972901 972941 972943 972967
-972977 972991 973001 973003 973031 973033 973051 973057 973067 973069 973073 973081
-973099 973129 973151 973169 973177 973187 973213 973253 973277 973279 973283 973289
-973321 973331 973333 973367 973373 973387 973397 973409 973411 973421 973439 973459
-973487 973523 973529 973537 973547 973561 973591 973597 973631 973657 973669 973681
-973691 973727 973757 973759 973781 973787 973789 973801 973813 973823 973837 973853
-973891 973897 973901 973919 973957 974003 974009 974033 974041 974053 974063 974089
-974107 974123 974137 974143 974147 974159 974161 974167 974177 974179 974189 974213
-974249 974261 974269 974273 974279 974293 974317 974329 974359 974383 974387 974401
-974411 974417 974419 974431 974437 974443 974459 974473 974489 974497 974507 974513
-974531 974537 974539 974551 974557 974563 974581 974591 974599 974651 974653 974657
-974707 974711 974713 974737 974747 974749 974761 974773 974803 974819 974821 974837
-974849 974861 974863 974867 974873 974879 974887 974891 974923 974927 974957 974959
-974969 974971 974977 974983 974989 974999 975011 975017 975049 975053 975071 975083
-975089 975133 975151 975157 975181 975187 975193 975199 975217 975257 975259 975263
-975277 975281 975287 975313 975323 975343 975367 975379 975383 975389 975421 975427
-975433 975439 975463 975493 975497 975509 975521 975523 975551 975553 975581 975599
-975619 975629 975643 975649 975661 975671 975691 975701 975731 975739 975743 975797
-975803 975811 975823 975827 975847 975857 975869 975883 975899 975901 975907 975941
-975943 975967 975977 975991 976009 976013 976033 976039 976091 976093 976103 976109
-976117 976127 976147 976177 976187 976193 976211 976231 976253 976271 976279 976301
-976303 976307 976309 976351 976369 976403 976411 976439 976447 976453 976457 976471
-976477 976483 976489 976501 976513 976537 976553 976559 976561 976571 976601 976607
-976621 976637 976639 976643 976669 976699 976709 976721 976727 976777 976799 976817
-976823 976849 976853 976883 976909 976919 976933 976951 976957 976991 977021 977023
-977047 977057 977069 977087 977107 977147 977149 977167 977183 977191 977203 977209
-977233 977239 977243 977257 977269 977299 977323 977351 977357 977359 977363 977369
-977407 977411 977413 977437 977447 977507 977513 977521 977539 977567 977591 977593
-977609 977611 977629 977671 977681 977693 977719 977723 977747 977761 977791 977803
-977813 977819 977831 977849 977861 977881 977897 977923 977927 977971 978001 978007
-978011 978017 978031 978037 978041 978049 978053 978067 978071 978073 978077 978079
-978091 978113 978149 978151 978157 978179 978181 978203 978209 978217 978223 978233
-978239 978269 978277 978283 978287 978323 978337 978343 978347 978349 978359 978389
-978403 978413 978427 978449 978457 978463 978473 978479 978491 978511 978521 978541
-978569 978599 978611 978617 978619 978643 978647 978683 978689 978697 978713 978727
-978743 978749 978773 978797 978799 978821 978839 978851 978853 978863 978871 978883
-978907 978917 978931 978947 978973 978997 979001 979009 979031 979037 979061 979063
-979093 979103 979109 979117 979159 979163 979171 979177 979189 979201 979207 979211
-979219 979229 979261 979273 979283 979291 979313 979327 979333 979337 979343 979361
-979369 979373 979379 979403 979423 979439 979457 979471 979481 979519 979529 979541
-979543 979549 979553 979567 979651 979691 979709 979717 979747 979757 979787 979807
-979819 979831 979873 979883 979889 979907 979919 979921 979949 979969 979987 980027
-980047 980069 980071 980081 980107 980117 980131 980137 980149 980159 980173 980179
-980197 980219 980249 980261 980293 980299 980321 980327 980363 980377 980393 980401
-980417 980423 980431 980449 980459 980471 980489 980491 980503 980549 980557 980579
-980587 980591 980593 980599 980621 980641 980677 980687 980689 980711 980717 980719
-980729 980731 980773 980801 980803 980827 980831 980851 980887 980893 980897 980899
-980909 980911 980921 980957 980963 980999 981011 981017 981023 981037 981049 981061
-981067 981073 981077 981091 981133 981137 981139 981151 981173 981187 981199 981209
-981221 981241 981263 981271 981283 981287 981289 981301 981311 981319 981373 981377
-981391 981397 981419 981437 981439 981443 981451 981467 981473 981481 981493 981517
-981523 981527 981569 981577 981587 981599 981601 981623 981637 981653 981683 981691
-981697 981703 981707 981713 981731 981769 981797 981809 981811 981817 981823 981887
-981889 981913 981919 981941 981947 981949 981961 981979 981983 982021 982057 982061
-982063 982067 982087 982097 982099 982103 982117 982133 982147 982151 982171 982183
-982187 982211 982213 982217 982231 982271 982273 982301 982321 982337 982339 982343
-982351 982363 982381 982393 982403 982453 982489 982493 982559 982571 982573 982577
-982589 982603 982613 982621 982633 982643 982687 982693 982697 982703 982741 982759
-982769 982777 982783 982789 982801 982819 982829 982841 982843 982847 982867 982871
-982903 982909 982931 982939 982967 982973 982981 983063 983069 983083 983113 983119
-983123 983131 983141 983149 983153 983173 983179 983189 983197 983209 983233 983239
-983243 983261 983267 983299 983317 983327 983329 983347 983363 983371 983377 983407
-983429 983431 983441 983443 983447 983449 983461 983491 983513 983519 983527 983531
-983533 983557 983579 983581 983597 983617 983659 983699 983701 983737 983771 983777
-983783 983789 983791 983803 983809 983813 983819 983849 983861 983863 983881 983911
-983923 983929 983951 983987 983993 984007 984017 984037 984047 984059 984083 984091
-984119 984121 984127 984149 984167 984199 984211 984241 984253 984299 984301 984307
-984323 984329 984337 984341 984349 984353 984359 984367 984383 984391 984397 984407
-984413 984421 984427 984437 984457 984461 984481 984491 984497 984539 984541 984563
-984583 984587 984593 984611 984617 984667 984689 984701 984703 984707 984733 984749
-984757 984761 984817 984847 984853 984859 984877 984881 984911 984913 984917 984923
-984931 984947 984959 985003 985007 985013 985027 985057 985063 985079 985097 985109
-985121 985129 985151 985177 985181 985213 985219 985253 985277 985279 985291 985301
-985307 985331 985339 985351 985379 985399 985403 985417 985433 985447 985451 985463
-985471 985483 985487 985493 985499 985519 985529 985531 985547 985571 985597 985601
-985613 985631 985639 985657 985667 985679 985703 985709 985723 985729 985741 985759
-985781 985783 985799 985807 985819 985867 985871 985877 985903 985921 985937 985951
-985969 985973 985979 985981 985991 985993 985997 986023 986047 986053 986071 986101
-986113 986131 986137 986143 986147 986149 986177 986189 986191 986197 986207 986213
-986239 986257 986267 986281 986287 986333 986339 986351 986369 986411 986417 986429
-986437 986471 986477 986497 986507 986509 986519 986533 986543 986563 986567 986569
-986581 986593 986597 986599 986617 986633 986641 986659 986693 986707 986717 986719
-986729 986737 986749 986759 986767 986779 986801 986813 986819 986837 986849 986851
-986857 986903 986927 986929 986933 986941 986959 986963 986981 986983 986989 987013
-987023 987029 987043 987053 987061 987067 987079 987083 987089 987097 987101 987127
-987143 987191 987193 987199 987209 987211 987227 987251 987293 987299 987313 987353
-987361 987383 987391 987433 987457 987463 987473 987491 987509 987523 987533 987541
-987559 987587 987593 987599 987607 987631 987659 987697 987713 987739 987793 987797
-987803 987809 987821 987851 987869 987911 987913 987929 987941 987971 987979 987983
-987991 987997 988007 988021 988033 988051 988061 988067 988069 988093 988109 988111
-988129 988147 988157 988199 988213 988217 988219 988231 988237 988243 988271 988279
-988297 988313 988319 988321 988343 988357 988367 988409 988417 988439 988453 988459
-988483 988489 988501 988511 988541 988549 988571 988577 988579 988583 988591 988607
-988643 988649 988651 988661 988681 988693 988711 988727 988733 988759 988763 988783
-988789 988829 988837 988849 988859 988861 988877 988901 988909 988937 988951 988963
-988979 989011 989029 989059 989071 989081 989099 989119 989123 989171 989173 989231
-989239 989249 989251 989279 989293 989309 989321 989323 989327 989341 989347 989353
-989377 989381 989411 989419 989423 989441 989467 989477 989479 989507 989533 989557
-989561 989579 989581 989623 989629 989641 989647 989663 989671 989687 989719 989743
-989749 989753 989761 989777 989783 989797 989803 989827 989831 989837 989839 989869
-989873 989887 989909 989917 989921 989929 989939 989951 989959 989971 989977 989981
-989999 990001 990013 990023 990037 990043 990053 990137 990151 990163 990169 990179
-990181 990211 990239 990259 990277 990281 990287 990289 990293 990307 990313 990323
-990329 990331 990349 990359 990361 990371 990377 990383 990389 990397 990463 990469
-990487 990497 990503 990511 990523 990529 990547 990559 990589 990593 990599 990631
-990637 990643 990673 990707 990719 990733 990761 990767 990797 990799 990809 990841
-990851 990881 990887 990889 990893 990917 990923 990953 990961 990967 990973 990989
-991009 991027 991031 991037 991043 991057 991063 991069 991073 991079 991091 991127
-991129 991147 991171 991181 991187 991201 991217 991223 991229 991261 991273 991313
-991327 991343 991357 991381 991387 991409 991427 991429 991447 991453 991483 991493
-991499 991511 991531 991541 991547 991567 991579 991603 991607 991619 991621 991633
-991643 991651 991663 991693 991703 991717 991723 991733 991741 991751 991777 991811
-991817 991867 991871 991873 991883 991889 991901 991909 991927 991931 991943 991951
-991957 991961 991973 991979 991981 991987 991999 992011 992021 992023 992051 992087
-992111 992113 992129 992141 992153 992179 992183 992219 992231 992249 992263 992267
-992269 992281 992309 992317 992357 992359 992363 992371 992393 992417 992429 992437
-992441 992449 992461 992513 992521 992539 992549 992561 992591 992603 992609 992623
-992633 992659 992689 992701 992707 992723 992737 992777 992801 992809 992819 992843
-992857 992861 992863 992867 992891 992903 992917 992923 992941 992947 992963 992983
-993001 993011 993037 993049 993053 993079 993103 993107 993121 993137 993169 993197
-993199 993203 993211 993217 993233 993241 993247 993253 993269 993283 993287 993319
-993323 993341 993367 993397 993401 993407 993431 993437 993451 993467 993479 993481
-993493 993527 993541 993557 993589 993611 993617 993647 993679 993683 993689 993703
-993763 993779 993781 993793 993821 993823 993827 993841 993851 993869 993887 993893
-993907 993913 993919 993943 993961 993977 993983 993997 994013 994027 994039 994051
-994067 994069 994073 994087 994093 994141 994163 994181 994183 994193 994199 994229
-994237 994241 994247 994249 994271 994297 994303 994307 994309 994319 994321 994337
-994339 994363 994369 994391 994393 994417 994447 994453 994457 994471 994489 994501
-994549 994559 994561 994571 994579 994583 994603 994621 994657 994663 994667 994691
-994699 994709 994711 994717 994723 994751 994769 994793 994811 994813 994817 994831
-994837 994853 994867 994871 994879 994901 994907 994913 994927 994933 994949 994963
-994991 994997 995009 995023 995051 995053 995081 995117 995119 995147 995167 995173
-995219 995227 995237 995243 995273 995303 995327 995329 995339 995341 995347 995363
-995369 995377 995381 995387 995399 995431 995443 995447 995461 995471 995513 995531
-995539 995549 995551 995567 995573 995587 995591 995593 995611 995623 995641 995651
-995663 995669 995677 995699 995713 995719 995737 995747 995783 995791 995801 995833
-995881 995887 995903 995909 995927 995941 995957 995959 995983 995987 995989 996001
-996011 996019 996049 996067 996103 996109 996119 996143 996157 996161 996167 996169
-996173 996187 996197 996209 996211 996253 996257 996263 996271 996293 996301 996311
-996323 996329 996361 996367 996403 996407 996409 996431 996461 996487 996511 996529
-996539 996551 996563 996571 996599 996601 996617 996629 996631 996637 996647 996649
-996689 996703 996739 996763 996781 996803 996811 996841 996847 996857 996859 996871
-996881 996883 996887 996899 996953 996967 996973 996979 997001 997013 997019 997021
-997037 997043 997057 997069 997081 997091 997097 997099 997103 997109 997111 997121
-997123 997141 997147 997151 997153 997163 997201 997207 997219 997247 997259 997267
-997273 997279 997307 997309 997319 997327 997333 997343 997357 997369 997379 997391
-997427 997433 997439 997453 997463 997511 997541 997547 997553 997573 997583 997589
-997597 997609 997627 997637 997649 997651 997663 997681 997693 997699 997727 997739
-997741 997751 997769 997783 997793 997807 997811 997813 997877 997879 997889 997891
-997897 997933 997949 997961 997963 997973 997991 998009 998017 998027 998029 998069
-998071 998077 998083 998111 998117 998147 998161 998167 998197 998201 998213 998219
-998237 998243 998273 998281 998287 998311 998329 998353 998377 998381 998399 998411
-998419 998423 998429 998443 998471 998497 998513 998527 998537 998539 998551 998561
-998617 998623 998629 998633 998651 998653 998681 998687 998689 998717 998737 998743
-998749 998759 998779 998813 998819 998831 998839 998843 998857 998861 998897 998909
-998917 998927 998941 998947 998951 998957 998969 998983 998989 999007 999023 999029
-999043 999049 999067 999083 999091 999101 999133 999149 999169 999181 999199 999217
-999221 999233 999239 999269 999287 999307 999329 999331 999359 999371 999377 999389
-999431 999433 999437 999451 999491 999499 999521 999529 999541 999553 999563 999599
-999611 999613 999623 999631 999653 999667 999671 999683 999721 999727 999749 999763
-999769 999773 999809 999853 999863 999883 999907 999917 999931 999953 999959 999961
-999979 999983 } ; inline
diff --git a/extra/math/primes/lists/authors.txt b/extra/math/primes/lists/authors.txt
new file mode 100644 (file)
index 0000000..f3b0233
--- /dev/null
@@ -0,0 +1 @@
+Samuel Tardieu
diff --git a/extra/math/primes/lists/lists-docs.factor b/extra/math/primes/lists/lists-docs.factor
new file mode 100644 (file)
index 0000000..ecab12c
--- /dev/null
@@ -0,0 +1,10 @@
+USING: help.markup help.syntax ;
+IN: math.primes.lists
+
+HELP: lprimes
+{ $values { "list" "a lazy list" } }
+{ $description "Return a sorted list containing all the prime numbers." } ;
+
+HELP: lprimes-from
+{ $values { "n" "an integer" } { "list" "a lazy list" } }
+{ $description "Return a sorted list containing all the prime numbers greater or equal to " { $snippet "n" } "." } ;
diff --git a/extra/math/primes/lists/lists-tests.factor b/extra/math/primes/lists/lists-tests.factor
new file mode 100644 (file)
index 0000000..3bd7d70
--- /dev/null
@@ -0,0 +1,6 @@
+USING: lists.lazy math.primes.lists tools.test ;
+
+{ { 2 3 5 7 11 13 17 19 23 29 } } [ 10 lprimes ltake list>array ] unit-test
+{ { 101 103 107 109 113 } } [ 5 100 lprimes-from ltake list>array ] unit-test
+{ { 1000117 1000121 } } [ 2 1000100 lprimes-from ltake list>array ] unit-test
+{ { 999983 1000003 } } [ 2 999982 lprimes-from ltake list>array ] unit-test
diff --git a/extra/math/primes/lists/lists.factor b/extra/math/primes/lists/lists.factor
new file mode 100644 (file)
index 0000000..13f314f
--- /dev/null
@@ -0,0 +1,9 @@
+! Copyright (C) 2007-2009 Samuel Tardieu.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel lists.lazy math math.primes ;
+IN: math.primes.lists
+
+: lprimes ( -- list ) 2 [ next-prime ] lfrom-by ;
+
+: lprimes-from ( n -- list )
+    dup 3 < [ drop lprimes ] [ 1- next-prime [ next-prime ] lfrom-by ] if ;
diff --git a/extra/math/primes/lists/summary.txt b/extra/math/primes/lists/summary.txt
new file mode 100644 (file)
index 0000000..39a780a
--- /dev/null
@@ -0,0 +1 @@
+Infinite stream of prime numbers through lazy lists
diff --git a/extra/math/primes/primes-docs.factor b/extra/math/primes/primes-docs.factor
deleted file mode 100644 (file)
index 1077659..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-USING: help.markup help.syntax ;
-IN: math.primes
-
-{ next-prime prime? } related-words
-
-HELP: next-prime
-{ $values { "n" "a positive integer" } { "p" "a prime number" } }
-{ $description "Return the next prime number greater than " { $snippet "n" } "." } ;
-
-HELP: prime?
-{ $values { "n" "an integer" } { "?" "a boolean" } }
-{ $description "Test if an integer is a prime number." } ;
-
-{ lprimes lprimes-from primes-upto primes-between } related-words
-
-HELP: lprimes
-{ $values { "list" "a lazy list" } }
-{ $description "Return a sorted list containing all the prime numbers." } ;
-
-HELP: lprimes-from
-{ $values { "n" "an integer" } { "list" "a lazy list" } }
-{ $description "Return a sorted list containing all the prime numbers greater or equal to " { $snippet "n" } "." } ;
-
-HELP: primes-upto
-{ $values { "n" "an integer" } { "seq" "a sequence" } }
-{ $description "Return a sequence containing all the prime numbers smaller or equal to " { $snippet "n" } "." } ;
-
-HELP: primes-between
-{ $values { "low" "an integer" } { "high" "an integer" } { "seq" "a sequence" } }
-{ $description "Return a sequence containing all the prime numbers between " { $snippet "low" } " and " { $snippet "high" } "." } ;
diff --git a/extra/math/primes/primes-tests.factor b/extra/math/primes/primes-tests.factor
deleted file mode 100644 (file)
index 186acc9..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-USING: arrays math.primes tools.test lists.lazy ;
-
-{ 1237 } [ 1234 next-prime ] unit-test
-{ f t } [ 1234 prime? 1237 prime? ] unit-test
-{ { 2 3 5 7 11 13 17 19 23 29 } } [ 10 lprimes ltake list>array ] unit-test
-{ { 101 103 107 109 113 } } [ 5 100 lprimes-from ltake list>array ] unit-test
-{ { 1000117 1000121 } } [ 2 1000100 lprimes-from ltake list>array ] unit-test
-{ { 999983 1000003 } } [ 2 999982 lprimes-from ltake list>array ] unit-test
-{ { 2 3 5 7 } } [ 10 primes-upto >array ] unit-test
-{ { 999983 1000003 } } [ 999982 1000010 primes-between >array ] unit-test
diff --git a/extra/math/primes/primes.factor b/extra/math/primes/primes.factor
deleted file mode 100644 (file)
index 820d5b6..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-! Copyright (C) 2007 Samuel Tardieu.
-! See http://factorcode.org/license.txt for BSD license.
-USING: binary-search combinators kernel lists.lazy math math.functions
-    math.miller-rabin math.primes.list sequences ;
-IN: math.primes
-
-<PRIVATE
-
-: find-prime-miller-rabin ( n -- p )
-    dup miller-rabin [ 2 + find-prime-miller-rabin ] unless ; foldable
-
-PRIVATE>
-
-: next-prime ( n -- p )
-    dup 999983 < [
-        primes-under-million [ natural-search drop 1+ ] keep nth
-    ] [
-        next-odd find-prime-miller-rabin
-    ] if ; foldable
-
-: prime? ( n -- ? )
-    dup 1000000 < [
-        dup primes-under-million natural-search nip =
-    ] [
-        miller-rabin
-    ] if ; foldable
-
-: lprimes ( -- list )
-    0 primes-under-million seq>list
-    1000003 [ 2 + find-prime-miller-rabin ] lfrom-by
-    lappend ;
-
-: lprimes-from ( n -- list )
-    dup 3 < [ drop lprimes ] [ 1- next-prime [ next-prime ] lfrom-by ] if ;
-
-: primes-upto ( n -- seq )
-    {
-        { [ dup 2 < ] [ drop { } ] }
-        { [ dup 1000003 < ] [
-            primes-under-million [ natural-search drop 1+ 0 swap ] keep <slice>
-        ] }
-        [ primes-under-million 1000003 lprimes-from
-            rot [ <= ] curry lwhile list>array append ]
-    } cond ; foldable
-
-: primes-between ( low high -- seq )
-    primes-upto [ 1- next-prime ] dip
-    [ natural-search drop ] [ length ] [ ] tri <slice> ; foldable
-
-: coprime? ( a b -- ? ) gcd nip 1 = ; foldable
diff --git a/extra/math/primes/summary.txt b/extra/math/primes/summary.txt
deleted file mode 100644 (file)
index 41b4197..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Prime numbers test and generation
-
index 41f19b9b07b7e2a93d53a27006d6bf5d5635a46c..5a10e7af37009b412edecb9adb2b4d773aba2e1d 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (c) 2007, 2008 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: combinators.short-circuit grouping kernel math math.parser namespaces
-    sequences ;
+USING: combinators.short-circuit grouping kernel math math.parser
+math.text.utils namespaces sequences ;
 IN: math.text.english
 
 <PRIVATE
@@ -31,24 +31,20 @@ SYMBOL: and-needed?
 : negative-text ( n -- str )
     0 < "Negative " "" ? ;
 
-: 3digit-groups ( n -- seq )
-    number>string <reversed> 3 <groups>
-    [ reverse string>number ] map ;
-
 : hundreds-place ( n -- str )
-    100 /mod swap dup zero? [
+    100 /mod over 0 = [
         2drop ""
     ] [
-        small-numbers " Hundred" append
-        swap zero? [ " and " append ] unless
+        [ small-numbers " Hundred" append ] dip
+        0 = [ " and " append ] unless
     ] if ;
 
 : tens-place ( n -- str )
     100 mod dup 20 >= [
         10 /mod [ tens ] dip
-        dup zero? [ drop ] [ "-" swap small-numbers 3append ] if
+        dup 0 = [ drop ] [ small-numbers "-" glue ] if
     ] [
-        dup zero? [ drop "" ] [ small-numbers ] if
+        dup 0 = [ drop "" ] [ small-numbers ] if
     ] if ;
 
 : 3digits>text ( n -- str )
@@ -59,15 +55,15 @@ SYMBOL: and-needed?
     [ " " glue ] unless-empty ;
 
 : append-with-conjunction ( str1 str2 -- newstr )
-    over length zero? [
+    over length 0 = [
         nip
     ] [
-        and-needed? get " and " ", " ? rot 3append
-        and-needed? off
+        swap and-needed? get " and " ", " ?
+        glue and-needed? off
     ] if ;
 
 : (recombine) ( str index seq -- newstr )
-    2dup nth zero? [
+    2dup nth 0 = [
         2drop
     ] [
         text-with-scale append-with-conjunction
diff --git a/extra/math/text/french/authors.txt b/extra/math/text/french/authors.txt
new file mode 100644 (file)
index 0000000..f3b0233
--- /dev/null
@@ -0,0 +1 @@
+Samuel Tardieu
diff --git a/extra/math/text/french/french-docs.factor b/extra/math/text/french/french-docs.factor
new file mode 100644 (file)
index 0000000..702a963
--- /dev/null
@@ -0,0 +1,6 @@
+USING: help.markup help.syntax ;
+IN: math.text.french
+
+HELP: number>text
+{ $values { "n" "an integer" } { "str" "a string" } }
+{ $description "Return the a string describing " { $snippet "n" } " in French. Numbers with absolute value equal to or greater than 10^12 will be returned using their numeric representation." } ;
diff --git a/extra/math/text/french/french-tests.factor b/extra/math/text/french/french-tests.factor
new file mode 100644 (file)
index 0000000..fd84387
--- /dev/null
@@ -0,0 +1,22 @@
+USING: math math.functions math.parser math.text.french sequences tools.test ;
+
+[ "zéro" ] [ 0 number>text ] unit-test
+[ "vingt et un" ] [ 21 number>text ] unit-test
+[ "vingt-deux" ] [ 22 number>text ] unit-test
+[ "deux mille" ] [ 2000 number>text ] unit-test
+[ "soixante et un" ] [ 61 number>text ] unit-test
+[ "soixante-deux" ] [ 62 number>text ] unit-test
+[ "quatre-vingts" ] [ 80 number>text ] unit-test
+[ "quatre-vingt-un" ] [ 81 number>text ] unit-test
+[ "quatre-vingt-onze" ] [ 91 number>text ] unit-test
+[ "deux cents" ] [ 200 number>text ] unit-test
+[ "mille deux cents" ] [ 1200 number>text ] unit-test
+[ "mille deux cent quatre-vingts" ] [ 1280 number>text ] unit-test
+[ "mille deux cent quatre-vingt-un" ] [ 1281 number>text ] unit-test
+[ "un billion deux cent vingt milliards quatre-vingts millions trois cent quatre-vingt mille deux cents" ] [ 1220080380200 number>text ] unit-test
+[ "un million" ] [ 1000000 number>text ] unit-test
+[ "un million un" ] [ 1000001 number>text ] unit-test
+[ "moins vingt" ] [ -20 number>text ] unit-test
+[ 104 ] [ -1 10 102 ^ - number>text length ] unit-test
+! Check that we do not exhaust stack
+[ 1484 ] [ 10 100 ^ 1 - number>text length ] unit-test
diff --git a/extra/math/text/french/french.factor b/extra/math/text/french/french.factor
new file mode 100644 (file)
index 0000000..f8b9710
--- /dev/null
@@ -0,0 +1,97 @@
+! Copyright (c) 2009 Samuel Tardieu.
+! See http://factorcode.org/license.txt for BSD license.
+USING: arrays assocs combinators kernel math math.functions
+math.parser math.text.utils memoize sequences ;
+IN: math.text.french
+
+<PRIVATE
+
+DEFER: basic ( n -- str )
+
+CONSTANT: literals
+    H{ { 0 "zéro" } { 1 "un" } { 2 "deux" } { 3 "trois" } { 4 "quatre" }
+       { 5 "cinq" } { 6 "six" } { 7 "sept" } { 8 "huit" } { 9 "neuf" }
+       { 10 "dix" } { 11 "onze" } { 12 "douze" } { 13 "treize" }
+       { 14 "quatorze" } { 15 "quinze" } { 16 "seize" } { 17 "dix-sept" }
+       { 18 "dix-huit" } { 19 "dix-neuf" } { 20 "vingt" } { 30 "trente" }
+       { 40 "quarante" } { 50 "cinquante" } { 60 "soixante" }
+       { 71 "soixante et onze" } { 80 "quatre-vingts" }
+       { 81 "quatre-vingt-un" }
+       { 100 "cent" } { 1000 "mille" } }
+
+MEMO: units ( -- seq ) ! up to 10^99
+    { "m" "b" "tr" "quadr" "quint" "sext" "sept" "oct"
+      "non" "déc" "unodéc" "duodéc" "trédéc" "quattuordéc"
+      "quindéc" "sexdéc" }
+      [ [ "illion" append ] [ "illiard" append ] bi 2array ] map concat
+      "mille" prefix ;
+
+! The only plurals we have to remove are "quatre-vingts" and "cents",
+! which are also the only strings ending with "ts".
+: unpluralize ( str -- newstr ) dup "ts" tail? [ but-last ] when ;
+: pluralize ( str -- newstr ) CHAR: s suffix ;
+
+: space-append ( str1 str2 -- str ) " " glue ;
+
+! Small numbers (below 100) use dashes between them unless they are
+! separated with "et". Pluralized prefixes must be unpluralized.
+: complete-small ( str n -- str )
+    { { 0 [ ] }
+      { 1 [ " et un" append ] }
+      [ [ unpluralize ] dip basic "-" glue ] } case ;
+
+: smaller-than-60 ( n -- str )
+    dup 10 mod [ - ] keep [ basic ] dip complete-small ;
+
+: base-onto ( n b -- str ) [ nip literals at ] [ - ] 2bi complete-small ;
+
+: smaller-than-80 ( n -- str ) 60 base-onto ;
+
+: smaller-than-100 ( n -- str ) 80 base-onto ;
+
+: if-zero ( n quot quot -- )
+    [ dup zero? ] 2dip [ [ drop ] prepose ] dip if ; inline
+
+: complete ( str n -- newstr )
+    [ ] [ basic space-append ] if-zero ;
+
+: smaller-than-1000 ( n -- str )
+    100 /mod
+    [ "cent" swap dup 1 = [ drop ] [ basic swap space-append ] if ]
+    [ [ pluralize ] [ basic space-append ] if-zero ] bi* ;
+
+: smaller-than-2000 ( n -- str ) "mille" swap 1000 - complete ;
+
+: smaller-than-1000000 ( n -- str )
+    1000 /mod [ basic unpluralize " mille" append ] dip complete ;
+
+: n-units ( n unit -- str/f )
+    {
+        { [ over zero? ] [ 2drop f ] }
+        { [ over 1 = ] [ [ basic ] dip space-append ] }
+        [ [ basic ] dip space-append pluralize ]
+    } cond ;
+
+: over-1000000 ( n -- str )
+    3digit-groups [ 1+ units nth n-units ] map-index sift
+    reverse " " join ;
+
+: decompose ( n -- str ) 1000000 /mod [ over-1000000 ] dip complete ;
+
+: basic ( n -- str )
+    {
+        { [ dup literals key? ] [ literals at ] }
+        { [ dup 0 < ] [ abs basic "moins " swap append ] }
+        { [ dup 60 < ] [ smaller-than-60 ] }
+        { [ dup 80 < ] [ smaller-than-80 ] }
+        { [ dup 100 < ] [ smaller-than-100 ] }
+        { [ dup 1000 < ] [ smaller-than-1000 ] }
+        { [ dup 2000 < ] [ smaller-than-2000 ] }
+        { [ dup 1000000 < ] [ smaller-than-1000000 ] }
+        [ decompose ]
+    } cond ;
+
+PRIVATE>
+
+: number>text ( n -- str )
+    dup abs 10 102 ^ >= [ number>string ] [ basic ] if ;
diff --git a/extra/math/text/french/summary.txt b/extra/math/text/french/summary.txt
new file mode 100644 (file)
index 0000000..c4c89dc
--- /dev/null
@@ -0,0 +1 @@
+Convert integers to French text
diff --git a/extra/math/text/utils/authors.txt b/extra/math/text/utils/authors.txt
new file mode 100644 (file)
index 0000000..4eec9c9
--- /dev/null
@@ -0,0 +1 @@
+Aaron Schaefer
diff --git a/extra/math/text/utils/summary.txt b/extra/math/text/utils/summary.txt
new file mode 100644 (file)
index 0000000..b2d8744
--- /dev/null
@@ -0,0 +1 @@
+Number to text conversion utilities
diff --git a/extra/math/text/utils/utils-docs.factor b/extra/math/text/utils/utils-docs.factor
new file mode 100644 (file)
index 0000000..e1d1a00
--- /dev/null
@@ -0,0 +1,6 @@
+USING: help.markup help.syntax ;
+IN: math.text.utils
+
+HELP: 3digit-groups
+{ $values { "n" "a positive integer" } { "seq" "a sequence" } }
+{ $description "Decompose a number into 3 digits groups and return them in a sequence, starting with the units, then the tenths, etc." } ;
diff --git a/extra/math/text/utils/utils-tests.factor b/extra/math/text/utils/utils-tests.factor
new file mode 100644 (file)
index 0000000..d14bb06
--- /dev/null
@@ -0,0 +1,3 @@
+USING: math.text.utils tools.test ;
+
+[ { 1 999 2 } ] [ 2999001 3digit-groups ] unit-test
diff --git a/extra/math/text/utils/utils.factor b/extra/math/text/utils/utils.factor
new file mode 100644 (file)
index 0000000..73326de
--- /dev/null
@@ -0,0 +1,7 @@
+! Copyright (c) 2007, 2008 Aaron Schaefer.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel math sequences ;
+IN: math.text.utils
+
+: 3digit-groups ( n -- seq )
+    [ dup 0 > ] [ 1000 /mod ] [ ] produce nip ;
index 3d9428adda4a5a2918a36cb96f3299eb34c3f994..515d7c7b993e4def7e215e3062ef65bd259e4a2c 100644 (file)
@@ -3,5 +3,5 @@
 USING: math math.constants ;
 IN: math.trig
 
-: deg>rad pi * 180 / ; inline
-: rad>deg 180 * pi / ; inline
+: deg>rad ( x -- y ) pi * 180 / ; inline
+: rad>deg ( x -- y ) 180 * pi / ; inline
index cfdc28bb3d607160194a9b6ec0342a3c944ff9bc..5ad1d944d37276fc770c4e3048ffd15359e7b1e8 100755 (executable)
@@ -31,32 +31,33 @@ SYMBOL: total
 
 : canonicalize-specializer-2 ( specializer -- specializer' )
     [
-        >r
-        {
-            { [ dup integer? ] [ ] }
-            { [ dup word? ] [ hooks get index ] }
-        } cond args get + r>
+        [
+            {
+                { [ dup integer? ] [ ] }
+                { [ dup word? ] [ hooks get index ] }
+            } cond args get +
+        ] dip
     ] assoc-map ;
 
 : canonicalize-specializer-3 ( specializer -- specializer' )
-    >r total get object <array> dup <enum> r> update ;
+    [ total get object <array> dup <enum> ] dip update ;
 
 : canonicalize-specializers ( methods -- methods' hooks )
     [
-        [ >r canonicalize-specializer-0 r> ] assoc-map
+        [ [ canonicalize-specializer-0 ] dip ] assoc-map
 
         0 args set
         V{ } clone hooks set
 
-        [ >r canonicalize-specializer-1 r> ] assoc-map
+        [ [ canonicalize-specializer-1 ] dip ] assoc-map
 
         hooks [ natural-sort ] change
 
-        [ >r canonicalize-specializer-2 r> ] assoc-map
+        [ [ canonicalize-specializer-2 ] dip ] assoc-map
 
         args get hooks get length + total set
 
-        [ >r canonicalize-specializer-3 r> ] assoc-map
+        [ [ canonicalize-specializer-3 ] dip ] assoc-map
 
         hooks get
     ] with-scope ;
@@ -79,8 +80,8 @@ SYMBOL: total
     inline
 
 : topological-sort ( seq quot -- newseq )
-    >r >vector [ dup empty? not ] r>
-    [ dupd maximal-element >r over delete-nth r> ] curry
+    [ >vector [ dup empty? not ] ] dip
+    [ dupd maximal-element [ over delete-nth ] dip ] curry
     [ ] produce nip ; inline
 
 : classes< ( seq1 seq2 -- lt/eq/gt )
@@ -103,7 +104,7 @@ SYMBOL: total
         { 0 [ [ dup ] ] }
         { 1 [ [ over ] ] }
         { 2 [ [ pick ] ] }
-        [ 1- picker [ >r ] [ r> swap ] surround ]
+        [ 1- picker [ dip swap ] curry ]
     } case ;
 
 : (multi-predicate) ( class picker -- quot )
@@ -124,11 +125,11 @@ SYMBOL: total
 ERROR: no-method arguments generic ;
 
 : make-default-method ( methods generic -- quot )
-    >r argument-count r> [ >r narray r> no-method ] 2curry ;
+    [ argument-count ] dip [ [ narray ] dip no-method ] 2curry ;
 
 : multi-dispatch-quot ( methods generic -- quot )
     [ make-default-method ]
-    [ drop [ >r multi-predicate r> ] assoc-map reverse ]
+    [ drop [ [ multi-predicate ] dip ] assoc-map reverse ]
     2bi alist>quot ;
 
 ! Generic words
@@ -172,8 +173,9 @@ M: method-body crossref?
     swap >>props ;
 
 : with-methods ( word quot -- )
-    over >r >r "multi-methods" word-prop
-    r> call r> update-generic ; inline
+    over [
+        [ "multi-methods" word-prop ] dip call
+    ] dip update-generic ; inline
 
 : reveal-method ( method classes generic -- )
     [ set-at ] with-methods ;
@@ -245,7 +247,6 @@ M: no-method error.
     define ; parsing
 
 ! Definition protocol. We qualify core generics here
-USE: qualified
 QUALIFIED: syntax
 
 syntax:M: generic definer drop \ GENERIC: f ;
@@ -253,7 +254,7 @@ syntax:M: generic definer drop \ GENERIC: f ;
 syntax:M: generic definition drop f ;
 
 PREDICATE: method-spec < array
-    unclip generic? >r [ class? ] all? r> and ;
+    unclip generic? [ [ class? ] all? ] dip and ;
 
 syntax:M: method-spec where
     dup unclip method [ ] [ first ] ?if where ;
index c112a677768202a7355985e32aeb8699a1caff0c..64363af428ae724959cc627be064c722bf2c12c0 100644 (file)
@@ -16,7 +16,7 @@ DEFER: fake
 [ t ] [ { } \ fake <method> method-body? ] unit-test
 
 [
-    [ { } [ ] ] [ \ fake methods prepare-methods >r sort-methods r> ] unit-test
+    [ { } [ ] ] [ \ fake methods prepare-methods [ sort-methods ] dip ] unit-test
 
     [ t ] [ { } \ fake multi-dispatch-quot callable? ] unit-test
 
diff --git a/extra/namespaces/lib/authors.txt b/extra/namespaces/lib/authors.txt
deleted file mode 100644 (file)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/extra/namespaces/lib/lib-tests.factor b/extra/namespaces/lib/lib-tests.factor
deleted file mode 100755 (executable)
index d3f5a12..0000000
+++ /dev/null
@@ -1 +0,0 @@
-\r
diff --git a/extra/namespaces/lib/lib.factor b/extra/namespaces/lib/lib.factor
deleted file mode 100755 (executable)
index ae0887e..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-USING: kernel namespaces namespaces.private quotations sequences
-       assocs.lib math.parser math generalizations locals mirrors
-       macros ;
-
-IN: namespaces.lib
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: save-namestack ( quot -- ) namestack >r call r> set-namestack ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: make* ( seq -- seq ) [ dup quotation? [ call ] [ ] if ] map ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: set* ( val var -- ) namestack* set-assoc-stack ;
-
-: make-object ( quot class -- object )
-    new [ <mirror> swap bind ] keep ; inline
-
-: with-object ( object quot -- )
-    [ <mirror> ] dip bind ; inline
diff --git a/extra/namespaces/lib/summary.txt b/extra/namespaces/lib/summary.txt
deleted file mode 100644 (file)
index ec8129b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Non-core namespace words
diff --git a/extra/namespaces/lib/tags.txt b/extra/namespaces/lib/tags.txt
deleted file mode 100644 (file)
index 42d711b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-collections
diff --git a/extra/nehe/2/2.factor b/extra/nehe/2/2.factor
new file mode 100644 (file)
index 0000000..29d4ccf
--- /dev/null
@@ -0,0 +1,46 @@
+USING: arrays kernel math opengl opengl.gl opengl.glu
+opengl.demo-support ui ui.gadgets ui.render ;
+IN: nehe.2
+
+TUPLE: nehe2-gadget < gadget ;
+
+: width 256 ;
+: height 256 ;
+
+: <nehe2-gadget> (  -- gadget )
+  nehe2-gadget new-gadget ;
+
+M: nehe2-gadget pref-dim* ( gadget -- dim )
+  drop width height 2array ;
+
+M: nehe2-gadget draw-gadget* ( gadget -- )
+  drop
+  GL_PROJECTION glMatrixMode
+  glLoadIdentity
+  45.0 width height / >float 0.1 100.0 gluPerspective
+  GL_MODELVIEW glMatrixMode
+  glLoadIdentity
+  GL_SMOOTH glShadeModel
+  0.0 0.0 0.0 0.0 glClearColor
+  1.0 glClearDepth
+  GL_DEPTH_TEST glEnable
+  GL_LEQUAL glDepthFunc
+  GL_PERSPECTIVE_CORRECTION_HINT GL_NICEST glHint
+  GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT bitor glClear
+  glLoadIdentity
+  -1.5 0.0 -6.0 glTranslatef
+  GL_TRIANGLES [
+    0.0 1.0 0.0 glVertex3f
+    -1.0 -1.0 0.0 glVertex3f
+    1.0 -1.0 0.0 glVertex3f
+  ] do-state
+  3.0 0.0 0.0 glTranslatef
+  GL_QUADS [
+    -1.0 1.0 0.0 glVertex3f
+    1.0 1.0 0.0 glVertex3f
+    1.0 -1.0 0.0 glVertex3f
+    -1.0 -1.0 0.0 glVertex3f
+  ] do-state ;
+
+: run2 ( -- )
+  <nehe2-gadget> "NeHe Tutorial 2" open-window ;
diff --git a/extra/nehe/2/authors.txt b/extra/nehe/2/authors.txt
new file mode 100755 (executable)
index 0000000..44b06f9
--- /dev/null
@@ -0,0 +1 @@
+Chris Double
diff --git a/extra/nehe/3/3.factor b/extra/nehe/3/3.factor
new file mode 100644 (file)
index 0000000..75f2e57
--- /dev/null
@@ -0,0 +1,50 @@
+USING: arrays kernel math opengl opengl.gl opengl.glu
+opengl.demo-support ui ui.gadgets ui.render ;
+IN: nehe.3
+
+TUPLE: nehe3-gadget < gadget ;
+
+: width 256 ;
+: height 256 ;
+
+: <nehe3-gadget> (  -- gadget )
+  nehe3-gadget new-gadget ;
+
+M: nehe3-gadget pref-dim* ( gadget -- dim )
+  drop width height 2array ;
+
+M: nehe3-gadget draw-gadget* ( gadget -- )
+  drop
+  GL_PROJECTION glMatrixMode
+  glLoadIdentity
+  45.0 width height / >float 0.1 100.0 gluPerspective
+  GL_MODELVIEW glMatrixMode
+  glLoadIdentity
+  GL_SMOOTH glShadeModel
+  0.0 0.0 0.0 0.0 glClearColor
+  1.0 glClearDepth
+  GL_DEPTH_TEST glEnable
+  GL_LEQUAL glDepthFunc
+  GL_PERSPECTIVE_CORRECTION_HINT GL_NICEST glHint
+  GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT bitor glClear
+  glLoadIdentity
+  -1.5 0.0 -6.0 glTranslatef
+  GL_TRIANGLES [
+    1.0 0.0 0.0 glColor3f
+    0.0 1.0 0.0 glVertex3f
+    0.0 1.0 0.0 glColor3f
+    -1.0 -1.0 0.0 glVertex3f
+    0.0 0.0 1.0 glColor3f
+    1.0 -1.0 0.0 glVertex3f
+  ] do-state
+  3.0 0.0 0.0 glTranslatef
+  0.5 0.5 1.0 glColor3f
+  GL_QUADS [
+    -1.0 1.0 0.0 glVertex3f
+    1.0 1.0 0.0 glVertex3f
+    1.0 -1.0 0.0 glVertex3f
+    -1.0 -1.0 0.0 glVertex3f
+  ] do-state ;
+
+: run3 ( -- )
+  <nehe3-gadget> "NeHe Tutorial 3" open-window ;
diff --git a/extra/nehe/3/authors.txt b/extra/nehe/3/authors.txt
new file mode 100755 (executable)
index 0000000..44b06f9
--- /dev/null
@@ -0,0 +1 @@
+Chris Double
diff --git a/extra/nehe/4/4.factor b/extra/nehe/4/4.factor
new file mode 100644 (file)
index 0000000..fda22d2
--- /dev/null
@@ -0,0 +1,75 @@
+USING: arrays kernel math opengl opengl.gl opengl.glu
+opengl.demo-support ui ui.gadgets ui.render threads accessors
+calendar ;
+IN: nehe.4
+
+TUPLE: nehe4-gadget < gadget rtri rquad thread quit? ;
+
+: width 256 ;
+: height 256 ;
+: redraw-interval ( -- dt ) 10 milliseconds ;
+
+: <nehe4-gadget> (  -- gadget )
+  nehe4-gadget new-gadget
+    0.0 >>rtri
+    0.0 >>rquad ;
+
+M: nehe4-gadget pref-dim* ( gadget -- dim )
+  drop width height 2array ;
+
+M: nehe4-gadget draw-gadget* ( gadget -- )
+  GL_PROJECTION glMatrixMode
+  glLoadIdentity
+  45.0 width height / >float 0.1 100.0 gluPerspective
+  GL_MODELVIEW glMatrixMode
+  glLoadIdentity
+  GL_SMOOTH glShadeModel
+  0.0 0.0 0.0 0.0 glClearColor
+  1.0 glClearDepth
+  GL_DEPTH_TEST glEnable
+  GL_LEQUAL glDepthFunc
+  GL_PERSPECTIVE_CORRECTION_HINT GL_NICEST glHint
+  GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT bitor glClear
+  glLoadIdentity
+  -1.5 0.0 -6.0 glTranslatef
+  dup rtri>> 0.0 1.0 0.0 glRotatef
+
+  GL_TRIANGLES [
+    1.0 0.0 0.0 glColor3f
+    0.0 1.0 0.0 glVertex3f
+    0.0 1.0 0.0 glColor3f
+    -1.0 -1.0 0.0 glVertex3f
+    0.0 0.0 1.0 glColor3f
+    1.0 -1.0 0.0 glVertex3f
+  ] do-state
+
+  glLoadIdentity
+
+  1.5 0.0 -6.0 glTranslatef
+  dup rquad>> 1.0 0.0 0.0 glRotatef
+  0.5 0.5 1.0 glColor3f
+  GL_QUADS [
+    -1.0 1.0 0.0 glVertex3f
+    1.0 1.0 0.0 glVertex3f
+    1.0 -1.0 0.0 glVertex3f
+    -1.0 -1.0 0.0 glVertex3f
+  ] do-state
+  [ 0.2 + ] change-rtri
+  [ 0.15 - ] change-rquad drop ;
+
+: nehe4-update-thread ( gadget -- )
+  dup quit?>> [ drop ] [
+    redraw-interval sleep
+    dup relayout-1
+    nehe4-update-thread
+  ] if ;
+
+M: nehe4-gadget graft* ( gadget -- )
+  f >>quit?
+  [ nehe4-update-thread ] curry in-thread ;
+
+M: nehe4-gadget ungraft* ( gadget -- )
+  t >>quit? drop ;
+
+: run4 ( -- )
+  <nehe4-gadget> "NeHe Tutorial 4" open-window ;
diff --git a/extra/nehe/4/authors.txt b/extra/nehe/4/authors.txt
new file mode 100755 (executable)
index 0000000..44b06f9
--- /dev/null
@@ -0,0 +1 @@
+Chris Double
diff --git a/extra/nehe/5/5.factor b/extra/nehe/5/5.factor
new file mode 100755 (executable)
index 0000000..30d0991
--- /dev/null
@@ -0,0 +1,128 @@
+USING: arrays kernel math opengl opengl.gl opengl.glu\r
+opengl.demo-support ui ui.gadgets ui.render threads accessors\r
+calendar ;\r
+IN: nehe.5\r
+\r
+TUPLE: nehe5-gadget < gadget rtri rquad thread quit? ;\r
+: width 256 ;\r
+: height 256 ;\r
+: redraw-interval ( -- dt ) 10 milliseconds ;\r
+\r
+: <nehe5-gadget> (  -- gadget )\r
+  nehe5-gadget new-gadget\r
+    0.0 >>rtri\r
+    0.0 >>rquad ;\r
+\r
+M: nehe5-gadget pref-dim* ( gadget -- dim )\r
+  drop width height 2array ;\r
+\r
+M: nehe5-gadget draw-gadget* ( gadget -- )\r
+  GL_PROJECTION glMatrixMode\r
+  glLoadIdentity\r
+  45.0 width height / >float 0.1 100.0 gluPerspective\r
+  GL_MODELVIEW glMatrixMode\r
+  glLoadIdentity\r
+  GL_SMOOTH glShadeModel\r
+  0.0 0.0 0.0 0.0 glClearColor\r
+  1.0 glClearDepth\r
+  GL_DEPTH_TEST glEnable\r
+  GL_LEQUAL glDepthFunc\r
+  GL_PERSPECTIVE_CORRECTION_HINT GL_NICEST glHint\r
+  GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT bitor glClear\r
+  glLoadIdentity\r
+  -1.5 0.0 -6.0 glTranslatef\r
+  dup rtri>> 0.0 1.0 0.0 glRotatef\r
+\r
+  GL_TRIANGLES [\r
+    1.0 0.0 0.0 glColor3f\r
+    0.0 1.0 0.0 glVertex3f\r
+    0.0 1.0 0.0 glColor3f\r
+    -1.0 -1.0 1.0 glVertex3f\r
+    0.0 0.0 1.0 glColor3f\r
+    1.0 -1.0 1.0 glVertex3f\r
+\r
+    1.0 0.0 0.0 glColor3f\r
+    0.0 1.0 0.0 glVertex3f\r
+    0.0 0.0 1.0 glColor3f\r
+    1.0 -1.0 1.0 glVertex3f\r
+    0.0 1.0 0.0 glColor3f\r
+    1.0 -1.0 -1.0 glVertex3f\r
+\r
+    1.0 0.0 0.0 glColor3f\r
+    0.0 1.0 0.0 glVertex3f\r
+    0.0 1.0 0.0 glColor3f\r
+    1.0 -1.0 -1.0 glVertex3f\r
+    0.0 0.0 1.0 glColor3f\r
+    -1.0 -1.0 -1.0 glVertex3f\r
+\r
+    1.0 0.0 0.0 glColor3f\r
+    0.0 1.0 0.0 glVertex3f\r
+    0.0 0.0 1.0 glColor3f\r
+    -1.0 -1.0 -1.0 glVertex3f\r
+    0.0 1.0 0.0 glColor3f\r
+    -1.0 -1.0 1.0 glVertex3f\r
+  ] do-state\r
+\r
+  glLoadIdentity\r
+\r
+  1.5 0.0 -7.0 glTranslatef\r
+  dup rquad>> 1.0 0.0 0.0 glRotatef\r
+  GL_QUADS [\r
+    0.0 1.0 0.0 glColor3f\r
+    1.0 1.0 -1.0 glVertex3f\r
+    -1.0 1.0 -1.0 glVertex3f\r
+    -1.0 1.0 1.0 glVertex3f\r
+    1.0 1.0 1.0 glVertex3f\r
+\r
+    1.0 0.5 0.0 glColor3f\r
+    1.0 -1.0 1.0 glVertex3f\r
+    -1.0 -1.0 1.0 glVertex3f\r
+    -1.0 -1.0 -1.0 glVertex3f\r
+    1.0 -1.0 -1.0 glVertex3f\r
+\r
+    1.0 0.0 0.0 glColor3f\r
+    1.0 1.0 1.0 glVertex3f\r
+    -1.0 1.0 1.0 glVertex3f\r
+    -1.0 -1.0 1.0 glVertex3f\r
+    1.0 -1.0 1.0 glVertex3f\r
+\r
+    1.0 1.0 0.0 glColor3f\r
+    1.0 -1.0 -1.0 glVertex3f\r
+    -1.0 -1.0 -1.0 glVertex3f\r
+    -1.0 1.0 -1.0 glVertex3f\r
+    1.0 1.0 -1.0 glVertex3f\r
+\r
+    0.0 0.0 1.0 glColor3f\r
+    -1.0 1.0 1.0 glVertex3f\r
+    -1.0 1.0 -1.0 glVertex3f\r
+    -1.0 -1.0 -1.0 glVertex3f\r
+    -1.0 -1.0 1.0 glVertex3f\r
+\r
+    1.0 0.0 1.0 glColor3f\r
+    1.0 1.0 -1.0 glVertex3f\r
+    1.0 1.0 1.0 glVertex3f\r
+    1.0 -1.0 1.0 glVertex3f\r
+    1.0 -1.0 -1.0 glVertex3f\r
+  ] do-state \r
+  [ 0.2 + ] change-rtri\r
+  [ 0.15 - ] change-rquad drop ;\r
+\r
+: nehe5-update-thread ( gadget -- )  \r
+  dup quit?>> [\r
+    drop\r
+  ] [\r
+    redraw-interval sleep \r
+    dup relayout-1  \r
+    nehe5-update-thread \r
+  ] if ;\r
+\r
+M: nehe5-gadget graft* ( gadget -- )\r
+  f >>quit?\r
+  [ nehe5-update-thread ] curry in-thread ;\r
+\r
+M: nehe5-gadget ungraft* ( gadget -- )\r
+  t >>quit? drop ;\r
+\r
+\r
+: run5 ( -- )\r
+  <nehe5-gadget> "NeHe Tutorial 5" open-window ;\r
diff --git a/extra/nehe/5/authors.txt b/extra/nehe/5/authors.txt
new file mode 100755 (executable)
index 0000000..44b06f9
--- /dev/null
@@ -0,0 +1 @@
+Chris Double
diff --git a/extra/nehe/authors.txt b/extra/nehe/authors.txt
new file mode 100644 (file)
index 0000000..44b06f9
--- /dev/null
@@ -0,0 +1 @@
+Chris Double
diff --git a/extra/nehe/deploy.factor b/extra/nehe/deploy.factor
new file mode 100755 (executable)
index 0000000..6cf9543
--- /dev/null
@@ -0,0 +1,12 @@
+USING: tools.deploy.config ;
+V{
+    { deploy-ui? t }
+    { deploy-io 1 }
+    { deploy-reflection 1 }
+    { deploy-compiler? t }
+    { deploy-math? t }
+    { deploy-word-props? f }
+    { deploy-c-types? f }
+    { "stop-after-last-window?" t }
+    { deploy-name "NeHe OpenGL demos" }
+}
diff --git a/extra/nehe/nehe.factor b/extra/nehe/nehe.factor
new file mode 100644 (file)
index 0000000..a96c024
--- /dev/null
@@ -0,0 +1,15 @@
+USING: ui.gadgets.buttons ui.gadgets.packs ui.gadgets ui
+nehe.2 nehe.3 nehe.4 nehe.5 kernel ;
+IN: nehe
+
+: nehe-window ( -- )
+    [
+        <filled-pile>
+            "Nehe 2" [ drop run2 ] <bevel-button> add-gadget
+            "Nehe 3" [ drop run3 ] <bevel-button> add-gadget
+            "Nehe 4" [ drop run4 ] <bevel-button> add-gadget
+            "Nehe 5" [ drop run5 ] <bevel-button> add-gadget
+        "Nehe examples" open-window
+    ] with-ui ;
+
+MAIN: nehe-window
diff --git a/extra/nehe/summary.txt b/extra/nehe/summary.txt
new file mode 100644 (file)
index 0000000..7811f84
--- /dev/null
@@ -0,0 +1 @@
+NeHe OpenGL tutorials ported to Factor
diff --git a/extra/nehe/tags.txt b/extra/nehe/tags.txt
new file mode 100644 (file)
index 0000000..cb5fc20
--- /dev/null
@@ -0,0 +1 @@
+demos
index 0da7a9c9fbd0171cb0de22f23e6aec84866a2187..4169050e6fc171006c7e49b65023ec9a36515a5e 100644 (file)
@@ -1,5 +1,5 @@
 
-USING: kernel sequences assocs qualified circular sets fry sequences.lib ;
+USING: kernel sequences assocs circular sets fry ;
 
 USING: math multi-methods ;
 
@@ -62,8 +62,8 @@ METHOD: as { sequence object  number }      pick set-nth ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-METHOD: is-of { number object  sequence } dup >r swapd set-nth r> ;
-METHOD: as-of { object  number sequence } dup >r       set-nth r> ;
+METHOD: is-of { number object  sequence } dup [ swapd set-nth ] dip ;
+METHOD: as-of { object  number sequence } dup [       set-nth ] dip ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
@@ -93,8 +93,8 @@ METHOD: as { assoc object object }      pick set-at ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-METHOD: is-of { object object assoc } dup >r swapd set-at r> ;
-METHOD: as-of { object object assoc } dup >r       set-at r> ;
+METHOD: is-of { object object assoc } dup [ swapd set-at ] dip ;
+METHOD: as-of { object object assoc } dup [       set-at ] dip ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
@@ -213,7 +213,7 @@ METHOD: as-mutate { object object assoc }       set-at ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: snip          ( seq a b -- seq ) >r over r> [ head ] [ tail ] 2bi* append ;
+: snip          ( seq a b -- seq ) [ over ] dip [ head ] [ tail ] 2bi* append ;
 : snip-this     ( a b seq -- seq ) -rot snip ;
 : snip!         ( seq a b -- seq )      pick delete-slice ;
 : snip-this!    ( a b seq -- seq ) -rot pick delete-slice ;
@@ -222,7 +222,7 @@ METHOD: as-mutate { object object assoc }       set-at ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: invert-index ( seq i -- seq i ) >r dup length 1 - r> - ;
+: invert-index ( seq i -- seq i ) [ dup length 1 - ] dip - ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
@@ -236,9 +236,9 @@ METHOD: as-mutate { object object assoc }       set-at ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: insert ( seq i obj -- seq ) >r cut r> prefix append ;
+: insert ( seq i obj -- seq ) [ cut ] dip prefix append ;
 
-: splice ( seq i seq -- seq ) >r cut r> prepend append ;
+: splice ( seq i seq -- seq ) [ cut ] dip prepend append ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
diff --git a/extra/obj/alist/alist.factor b/extra/obj/alist/alist.factor
deleted file mode 100644 (file)
index a4e8ebb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-
-USING: arrays sequences ;
-
-IN: obj.alist
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-PREDICATE: alist < sequence [ pair? ] all? ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
diff --git a/extra/obj/examples/todo/todo.factor b/extra/obj/examples/todo/todo.factor
deleted file mode 100644 (file)
index 3d54547..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-
-USING: kernel sequences sets combinators.cleave
-       obj obj.view obj.util obj.print ;
-
-IN: obj.examples.todo
-
-SYM: person types adjoin
-SYM: todo   types adjoin
-
-SYM: owners properties adjoin
-SYM: eta    properties adjoin
-SYM: notes  properties adjoin
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: slava { type person } define-object
-SYM: doug  { type person } define-object
-SYM: ed    { type person } define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: compiler-bugs
-  {
-    type todo
-    owners { slava }
-    notes  {
-             "Investitage FEP on Terrorist"
-             "Problem with cutler in VirtualBox?"
-           }
-  }
-define-object
-
-SYM: remove-old-accessors-from-core
-  {
-    type todo
-    owners { slava }
-  }
-define-object
-
-SYM: move-db-and-web-framework-to-basis
-  {
-   type todo
-   owners { slava }
-  }
-define-object
-
-SYM: remove-old-accessors-from-basis
-  {
-    type todo
-    owners { doug ed }
-  }
-define-object
-
-SYM: blas-on-bsd
-  {
-    type todo
-    owners { slava doug }
-  }
-define-object
-
-SYM: multi-methods-backend
-  {
-    type todo
-    owners { slava }
-  }
-define-object
-
-SYM: update-core-for-multi-methods { type todo owners { slava } } define-object
-SYM: update-basis-for-multi-methods { type todo } define-object
-SYM: update-extra-for-multi-methods { type todo } define-object
-
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: todo-list ( -- )
-  objects [ type -> todo = ] filter
-    [ { [ self -> ] [ owners -> ] [ eta -> ] } 1arr ]
-  map
-  { "ITEM" "OWNERS" "ETA" } prefix
-  print-table ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
diff --git a/extra/obj/misc/misc.factor b/extra/obj/misc/misc.factor
deleted file mode 100644 (file)
index 06b3056..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-
-USING: kernel namespaces sequences assocs sequences.deep obj ;
-
-IN: obj.misc
-
-: related ( obj -- seq )
-  objects dupd remove [ get values flatten member? ] with filter ;
-
diff --git a/extra/obj/obj.factor b/extra/obj/obj.factor
deleted file mode 100644 (file)
index a4af627..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-
-USING: kernel words namespaces arrays vectors hashtables
-       sequences assocs sets grouping
-       combinators.conditional
-       combinators.short-circuit
-       obj.util obj.alist ;
-
-IN: obj
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: properties ( -- properties ) V{ } ;
-
-SYM: self  properties adjoin
-SYM: type  properties adjoin
-SYM: title properties adjoin
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: types ( -- types ) V{ } ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: >obj ( val -- obj ) [ symbol? ] [ get ] [ ] 1if ;
-
-: -> ( obj pro -- val ) swap >obj at ;
-
-PREDICATE: obj < alist { [ self -> ] [ type -> ] } 1&& ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: objects ( -- objects ) V{ } ;
-
-: define-object ( symbol table -- )
-  2 group >vector
-  self rot 2array prefix
-  dup dup self -> set-global
-  self -> objects adjoin ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-PREDICATE: ptr < symbol get obj? ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
diff --git a/extra/obj/papers/papers.factor b/extra/obj/papers/papers.factor
deleted file mode 100644 (file)
index 46683ad..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-
-USING: sets obj obj.util obj.view ;
-
-IN: obj.papers
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: title        properties adjoin
-SYM: abstract     properties adjoin
-SYM: authors      properties adjoin
-SYM: file         properties adjoin
-SYM: date         properties adjoin
-SYM: participants properties adjoin
-SYM: description  properties adjoin
-
-SYM: chapter      properties adjoin
-SYM: section      properties adjoin
-SYM: paragraph    properties adjoin
-SYM: content      properties adjoin
-
-SYM: subjects     properties adjoin
-SYM: source       properties adjoin
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: paper  types adjoin
-SYM: person types adjoin
-SYM: event  types adjoin
-
-SYM: excerpt types adjoin
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: bay-wei-chang       { type person } define-object
-SYM: chuck-moore         { type person } define-object
-SYM: craig-chambers      { type person } define-object
-SYM: david-ungar         { type person } define-object
-SYM: frank-g-halasz      { type person } define-object
-SYM: gerald-jay-sussman  { type person } define-object
-SYM: guy-lewis-steele-jr { type person } define-object
-SYM: randall-b-smith     { type person } define-object
-SYM: randall-h-trigg     { type person } define-object
-SYM: robert-adams        { type person } define-object
-SYM: russell-noftsker    { type person } define-object
-SYM: thomas-p-moran      { type person } define-object
-SYM: urs-holzle          { type person } define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: programming-as-an-experience
-  {
-    type     paper
-    title    "Programming as an Experience: The Inspiration for Self"
-    abstract "The Self system attempts to integrate intellectual and non-intellectual aspects of programming to create an overall experience. The language semantics, user interface, and implementation each help create this integrated experience. The language semantics embed the programmer in a uniform world of simple ob jects that can be modified without appealing to definitions of abstractions. In a similar way, the graphical interface puts the user into a uniform world of tangible objects that can be directly manipulated and changed without switching modes. The implementation strives to support the world-of-objects illusion by minimiz ing perceptible pauses and by providing true source-level semantics without sac rificing performance. As a side benefit, it encourages factoring. Although we see areas that fall short of the vision, on the whole, the language, interface, and im plementation conspire so that the Self programmer lives and acts in a consistent and malleable world of objects."
-    authors  { randall-b-smith david-ungar }
-    date     1995
-  }
-define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: self-the-power-of-simplicity
-  {
-    type paper
-    title "Self: The Power of Simplicity"
-    abstract "Self is an object-oriented language for exploratory programming based on a small number of simple and concrete ideas: prototypes, slots, and behavior. Prototypes combine inheritance and instantiation to provide a framework that is simpler and more flexible than most object-oriented languages. Slots unite variables and procedures into a single construct. This permits the inheritance hierarchy to take over the function of lexical scoping in conventional languages. Finally, because Self does not distinguish state from behavior, it narrows the gaps between ordinary objects, procedures, and closures. Self's simplicity and expressiveness offer new insights into object-oriented computation."
-    authors { randall-b-smith david-ungar }
-    date 1987
-  }
-define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: parents-are-shared-parts
-  {
-    type paper
-    title "Parents are Shared Parts: Inheritance and Encapsulation in Self"
-    abstract "The design of inheritance and encapsulation in Self, an object-oriented language based on prototypes, results from understanding that inheritance allows parents to be shared parts of their children. The programmer resolves ambiguities arising from multiple inheritance by prioritizing an object's parents. Unifying unordered and ordered multiple inheritance supports differential programming of abstractions and methods, combination of unrelated abstractions, unequal combination of abstractions, and mixins. In Self, a private slot may be accessed if the sending method is a shared part of the receiver, allowing privileged communication between related objects. Thus, classless Self enjoys the benefits of class-based encapsulation."
-    authors { craig-chambers david-ungar bay-wei-chang urs-holzle }
-    date 1991
-  }
-define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: organizing-programs-without-classes
-  {
-    type paper
-    title "Organizing Programs Without Classes"
-    abstract "All organizational functions carried out by classes can be accomplished in a simple and natural way by object inheritance in classless languages, with no need for special mechanisms. A single model--dividing types into prototypes and traits--supports sharing of behavior and extending or replacing representations. A natural extension, dynamic object inheritance, can model behavioral modes. Object inheritance can also be used to provide structured name spaces for well-known objects. Classless languages can even express 'class-based' encapsulation. These stylized uses of object inheritance become instantly recognizable idioms, and extend the repertory of organizing principles to cover a wider range of programs."
-    authors { david-ungar craig-chambers bay-wei-chang urs-holzle }
-    date 1991
-  }
-define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: scheme-an-interpreter-for-extended-lambda-calculus
-  {
-    type paper
-    title "Scheme: An Interpreter for Extended Lambda Calculus"
-    abstract "Inspired by ACTORS [Greif and Hewitt] [Smith and Hewitt], we have implemented an interpreter for a LISP-like language, SCHEME, based on the lambda calculus [Church], but extended for side effects, multiprocessing, and process synchronization. The purpose of this implementation is tutorial. We wish to: (1) alleviate the confusion caused by Micro-PLANNER, CONNIVER, etc. by clarifying the embedding of non-recursive control structures in a recursive host language like LISP. (2) explain how to use these control structures, independent of such issues as pattern matching and data base manipulation. (3) have a simple concrete experimental domain for certain issues of programming semantics and style."
-    authors { gerald-jay-sussman guy-lewis-steele-jr }
-    date 1975
-  }
-define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: symbolics-is-founded
-  {
-    type         event
-    participants { russell-noftsker robert-adams }
-    date         1980
-  }
-define-object
-
-SYM: symbolics-funding-from-gi
-  {
-    type        event
-    description "Symbolics receives $500,000 from General Instruments"
-    date        1982
-  }
-define-object
-
-SYM: symbolics-files-for-bankruptcy
-  {
-    type event
-    date "1993-01-28"
-  }
-define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: the-evolution-of-forth
-  {
-    type paper
-    title "The Evolution of Forth"
-    authors { chuck-moore "elizabeth-d-rather" "donald-r-colburn" }
-    abstract
-    "Forth is unique among programming languages in that its development and proliferation has been a grass-roots effort unsupported by any major corporate or academic sponsors. Originally conceived and developed by a single individual, its later development has progressed under two significant influences: professional programmers who developed tools to solve application problems and then commercialized them, and the interests of hobbyists concerned with free distribution of Forth. These influences have produced a language markedly different from traditional programming languages."
-    date 1993
-  }
-define-object
-
-SYM: first-complete-stand-alone-forth
-  {
-    type event
-    participants { chuck-moore }
-    date 1971
-  }
-define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: notecards-in-a-nutshell
-  {
-    type paper
-    authors { frank-g-halasz thomas-p-moran randall-h-trigg }
-    date 1987
-  }
-define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: the-evolution-of-forth-excerpt-2-1-1
-  {
-    type excerpt
-    source the-evolution-of-forth
-    chapter 2
-    section 1
-    paragraph 1
-    content
-    "Moore developed the first complete, stand-alone implementation of Forth in 1971 for the 11-meter radio telescope operated by the National Radio Astronomy Observatory (NRAO) at Kitt Peak, Arizona. This system ran on two early minicomputers (a 16 KB DDP-116 and a 32 KB H316) joined by a serial link. Both a multiprogrammed system and a multiprocessor system (in that both computers shared responsibility for controlling the telescope and its scientific instruments), it was responsible for pointing and tracking the telescope, collecting data and recording it on magnetic tape, and supporting an interactive graphics terminal on which an astronomer could analyze previously recorded data. The multiprogrammed nature of the system allowed all these functions to be performed concurrently, without timing conflicts or other interference."
-    subjects { chuck-moore first-complete-stand-alone-forth }
-  }
-define-object
-
diff --git a/extra/obj/print/print.factor b/extra/obj/print/print.factor
deleted file mode 100644 (file)
index 000e161..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-
-USING: kernel arrays strings sequences assocs io io.styles prettyprint colors
-       combinators.conditional ;
-
-IN: obj.print
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: write-wrapped ( string -- ) H{ { wrap-margin 500 } } [ write ] with-nesting ;
-
-! : print-elt ( val -- )
-!   {
-!     { [ string? ] [ write-wrapped ] }
-!     { [ array?  ] [ [ . ] each    ] }
-!     { [ drop t  ] [ . ] }
-!   }
-!   1cond ;
-
-USING: accessors vocabs help.markup ;
-
-: print-elt ( val -- )
-  {
-    { [ vocab?  ] [ [ name>> ] [ ] bi write-object ] }
-    { [ string? ] [ write-wrapped ] }
-    { [ array?  ] [ [ . ] each    ] }
-    { [ drop t  ] [ . ] }
-  }
-  1cond ;
-
-: print-grid ( grid -- )
-  H{ { table-gap { 10 10 } } { table-border T{ rgba f 0 0 0 1 } } }
-  [ [ [ [ [ print-elt ] with-cell ] each ] with-row ] each ] tabular-output ;
-
-: print-table ( assoc -- ) >alist print-grid ;
-
-: print-seq ( seq -- ) [ 1array ] map print-grid ;
-
diff --git a/extra/obj/util/util.factor b/extra/obj/util/util.factor
deleted file mode 100644 (file)
index 086fcd1..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-
-USING: kernel parser words ;
-
-IN: obj.util
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: SYM: CREATE-WORD dup define-symbol parsed ; parsing
\ No newline at end of file
diff --git a/extra/obj/view/view.factor b/extra/obj/view/view.factor
deleted file mode 100644 (file)
index cf5ca33..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-
-USING: kernel words namespaces arrays sequences prettyprint
-       help.topics help.markup bake combinators.cleave
-       obj obj.misc obj.print ;
-
-IN: obj.view
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: $tab ( seq -- ) first print-table ;
-: $obj ( seq -- ) first print-table ;
-: $seq ( seq -- ) first print-seq   ;
-: $ptr ( seq -- ) first get print-table ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-PREDICATE: obj-type < symbol types member? ;
-
-M: obj-type article-title ( type -- title ) unparse ;
-
-M: obj-type article-content ( type -- content )
-   objects [ type -> = ] with filter
-   { $seq , } bake ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-M: ptr article-title ( ptr -- title ) [ title -> ] [ unparse ] bi or ;
-
-M: ptr article-content ( ptr -- content )
-   {
-     [ get     { $obj , } bake ]
-     [ drop { $heading "Related\n" } ]
-     [ related { $seq , } bake ]
-   }
-   1arr ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-PREDICATE: obj-list < word \ objects = ;
-
-M: obj-list article-title ( objects -- title ) drop "Objects" ;
-
-! M: obj-list article-content ( objects -- title )
-!    execute
-!    [ [ type -> ] [ ] bi 2array ] map
-!    { $tab , } bake ;
-
-M: obj-list article-content ( objects -- title )
-   drop
-   objects
-   [ [ type -> ] [ ] bi 2array ] map
-   { $tab , } bake ;
\ No newline at end of file
diff --git a/extra/opengl/capabilities/authors.txt b/extra/opengl/capabilities/authors.txt
deleted file mode 100644 (file)
index 6a0dc72..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Joe Groff
\ No newline at end of file
diff --git a/extra/opengl/capabilities/capabilities-docs.factor b/extra/opengl/capabilities/capabilities-docs.factor
deleted file mode 100644 (file)
index f5424e1..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-USING: help.markup help.syntax io kernel math quotations
-opengl.gl multiline assocs ;
-IN: opengl.capabilities
-
-HELP: gl-version
-{ $values { "version" "The version string from the OpenGL implementation" } }
-{ $description "Wrapper for " { $snippet "GL_VERSION glGetString" } " that removes the vendor-specific information from the version string." } ;
-
-HELP: gl-vendor-version
-{ $values { "version" "The vendor-specific version information from the OpenGL implementation" } }
-{ $description "Wrapper for " { $snippet "GL_VERSION glGetString" } " that returns only the vendor-specific information from the version string." } ;
-
-HELP: has-gl-version?
-{ $values { "version" "A version string" } { "?" "A boolean value" } }
-{ $description "Compares the version string returned by " { $link gl-version } " to " { $snippet "version" } ". Returns true if the implementation version meets or exceeds " { $snippet "version" } "." } ;
-
-HELP: require-gl-version
-{ $values { "version" "A version string" } }
-{ $description "Throws an exception if " { $link has-gl-version? } " returns false for " { $snippet "version" } "." } ;
-
-HELP: glsl-version
-{ $values { "version" "The GLSL version string from the OpenGL implementation" } }
-{ $description "Wrapper for " { $snippet "GL_SHADING_LANGUAGE_VERSION glGetString" } " that removes the vendor-specific information from the version string." } ;
-
-HELP: glsl-vendor-version
-{ $values { "version" "The vendor-specific GLSL version information from the OpenGL implementation" } }
-{ $description "Wrapper for " { $snippet "GL_SHADING_LANGUAGE_VERSION glGetString" } " that returns only the vendor-specific information from the version string." } ;
-
-HELP: has-glsl-version?
-{ $values { "version" "A version string" } { "?" "A boolean value" } }
-{ $description "Compares the version string returned by " { $link glsl-version } " to " { $snippet "version" } ". Returns true if the implementation version meets or exceeds " { $snippet "version" } "." } ;
-
-HELP: require-glsl-version
-{ $values { "version" "A version string" } }
-{ $description "Throws an exception if " { $link has-glsl-version? } " returns false for " { $snippet "version" } "." } ;
-
-HELP: gl-extensions
-{ $values { "seq" "A sequence of strings naming the implementation-supported OpenGL extensions" } }
-{ $description "Wrapper for " { $snippet "GL_EXTENSIONS glGetString" } " that returns a sequence of extension names supported by the OpenGL implementation." } ;
-
-HELP: has-gl-extensions?
-{ $values { "extensions" "A sequence of extension name strings" } { "?" "A boolean value" } }
-{ $description "Returns true if the set of " { $snippet "extensions" } " is a subset of the implementation-supported extensions returned by " { $link gl-extensions } "." } ;
-
-HELP: has-gl-version-or-extensions?
-{ $values { "version" "A version string" } { "extensions" "A sequence of extension name strings" } { "?" "a boolean" } }
-{ $description "Returns true if either " { $link has-gl-version? } " or " { $link has-gl-extensions? } " returns true for " { $snippet "version" } " or " { $snippet "extensions" } ", respectively. Intended for use when required OpenGL functionality can be verified either by a minimum version or a set of equivalent extensions." } ;
-
-HELP: require-gl-extensions
-{ $values { "extensions" "A sequence of extension name strings" } }
-{ $description "Throws an exception if " { $link has-gl-extensions? } " returns false for " { $snippet "extensions" } "." } ;
-
-HELP: require-gl-version-or-extensions
-{ $values { "version" "A version string" } { "extensions" "A sequence of extension name strings" } }
-{ $description "Throws an exception if neither " { $link has-gl-version? } " nor " { $link has-gl-extensions? } " returns true for " { $snippet "version" } " or " { $snippet "extensions" } ", respectively. Intended for use when required OpenGL functionality can be verified either by a minimum version or a set of equivalent extensions." } ;
-
-{ require-gl-version require-glsl-version require-gl-extensions require-gl-version-or-extensions has-gl-version? has-glsl-version? has-gl-extensions? has-gl-version-or-extensions? gl-version glsl-version gl-extensions } related-words
-
-ABOUT: "gl-utilities"
diff --git a/extra/opengl/capabilities/capabilities.factor b/extra/opengl/capabilities/capabilities.factor
deleted file mode 100755 (executable)
index 3972fea..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-! Copyright (C) 2008 Joe Groff.
-! See http://factorcode.org/license.txt for BSD license.
-USING: kernel namespaces make sequences splitting opengl.gl
-continuations math.parser math arrays sets math.order ;
-IN: opengl.capabilities
-
-: (require-gl) ( thing require-quot make-error-quot -- )
-    -rot dupd call
-    [ 2drop ]
-    [ swap " " make throw ]
-    if ; inline
-
-: gl-extensions ( -- seq )
-    GL_EXTENSIONS glGetString " " split ;
-: has-gl-extensions? ( extensions -- ? )
-    gl-extensions swap [ over member? ] all? nip ;
-: (make-gl-extensions-error) ( required-extensions -- )
-    gl-extensions diff
-    "Required OpenGL extensions not supported:\n" %
-    [ "    " % % "\n" % ] each ;
-: require-gl-extensions ( extensions -- )
-    [ has-gl-extensions? ]
-    [ (make-gl-extensions-error) ]
-    (require-gl) ;
-
-: version-seq ( version-string -- version-seq )
-    "." split [ string>number ] map ;
-
-: version-before? ( version1 version2 -- ? )
-    swap version-seq swap version-seq before=? ;
-
-: (gl-version) ( -- version vendor )
-    GL_VERSION glGetString " " split1 ;
-: gl-version ( -- version )
-    (gl-version) drop ;
-: gl-vendor-version ( -- version )
-    (gl-version) nip ;
-: has-gl-version? ( version -- ? )
-    gl-version version-before? ;
-: (make-gl-version-error) ( required-version -- )
-    "Required OpenGL version " % % " not supported (" % gl-version % " available)" % ;
-: require-gl-version ( version -- )
-    [ has-gl-version? ]
-    [ (make-gl-version-error) ]
-    (require-gl) ;
-
-: (glsl-version) ( -- version vendor )
-    GL_SHADING_LANGUAGE_VERSION glGetString " " split1 ;
-: glsl-version ( -- version )
-    (glsl-version) drop ;
-: glsl-vendor-version ( -- version )
-    (glsl-version) nip ;
-: has-glsl-version? ( version -- ? )
-    glsl-version version-before? ;
-: require-glsl-version ( version -- )
-    [ has-glsl-version? ]
-    [ "Required GLSL version " % % " not supported (" % glsl-version % " available)" % ]
-    (require-gl) ;
-
-: has-gl-version-or-extensions? ( version extensions -- ? )
-    has-gl-extensions? swap has-gl-version? or ;
-
-: require-gl-version-or-extensions ( version extensions -- )
-    2array [ first2 has-gl-version-or-extensions? ] [
-        dup first (make-gl-version-error) "\n" %
-        second (make-gl-extensions-error) "\n" %
-    ] (require-gl) ;
diff --git a/extra/opengl/capabilities/summary.txt b/extra/opengl/capabilities/summary.txt
deleted file mode 100644 (file)
index d31b63b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Testing for OpenGL versions and extensions
\ No newline at end of file
diff --git a/extra/opengl/capabilities/tags.txt b/extra/opengl/capabilities/tags.txt
deleted file mode 100644 (file)
index 77282be..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-opengl
-bindings
index 92778194e3011c417cee13174fb27a1942149393..c8fe2b4882a1d9a59ad562664f8987dada4e2086 100755 (executable)
@@ -3,7 +3,7 @@ namespaces opengl opengl.gl sequences ui ui.gadgets ui.gestures
 ui.render accessors combinators ;
 IN: opengl.demo-support
 
-: FOV 2.0 sqrt 1+ ; inline
+: FOV ( -- x ) 2.0 sqrt 1+ ; inline
 : MOUSE-MOTION-SCALE 0.5 ; inline
 : KEY-ROTATE-STEP 10.0 ; inline
 
@@ -60,7 +60,7 @@ M: demo-gadget pref-dim* ( gadget -- dim )
     ] [
         GL_MODELVIEW glMatrixMode
         glLoadIdentity
-        [ >r 0.0 0.0 r> distance>> neg glTranslatef ]
+        [ [ 0.0 0.0 ] dip distance>> neg glTranslatef ]
         [ pitch>> 1.0 0.0 0.0 glRotatef ]
         [ yaw>>   0.0 1.0 0.0 glRotatef ]
         tri
diff --git a/extra/opengl/framebuffers/authors.txt b/extra/opengl/framebuffers/authors.txt
deleted file mode 100644 (file)
index 6a0dc72..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Joe Groff
\ No newline at end of file
diff --git a/extra/opengl/framebuffers/framebuffers-docs.factor b/extra/opengl/framebuffers/framebuffers-docs.factor
deleted file mode 100644 (file)
index c5507dc..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-USING: help.markup help.syntax io kernel math quotations
-opengl.gl multiline assocs ;
-IN: opengl.framebuffers
-
-HELP: gen-framebuffer
-{ $values { "id" integer } }
-{ $description "Wrapper for " { $link glGenFramebuffersEXT } " to handle the common case of generating a single framebuffer ID." } ;
-
-HELP: gen-renderbuffer
-{ $values { "id" integer } }
-{ $description "Wrapper for " { $link glGenRenderbuffersEXT } " to handle the common case of generating a single render buffer ID." } ;
-
-HELP: delete-framebuffer
-{ $values { "id" integer } }
-{ $description "Wrapper for " { $link glDeleteFramebuffersEXT } " to handle the common case of deleting a single framebuffer ID." } ;
-
-HELP: delete-renderbuffer
-{ $values { "id" integer } }
-{ $description "Wrapper for " { $link glDeleteRenderbuffersEXT } " to handle the common case of deleting a single render buffer ID." } ;
-
-{ gen-framebuffer delete-framebuffer } related-words
-{ gen-renderbuffer delete-renderbuffer } related-words
-
-HELP: framebuffer-incomplete?
-{ $values { "status/f" "The framebuffer error code, or " { $snippet "f" } " if the framebuffer is render-complete." } }
-{ $description "Checks the framebuffer currently bound by " { $link glBindFramebufferEXT } " or " { $link with-framebuffer } " to see if it is incomplete, i.e., it is not ready to be rendered to." } ;
-
-HELP: check-framebuffer
-{ $description "Checks the framebuffer currently bound by " { $link glBindFramebufferEXT } " or " { $link with-framebuffer } " with " { $link framebuffer-incomplete? } ", and throws a descriptive error if the framebuffer is incomplete." } ;
-
-HELP: with-framebuffer
-{ $values { "id" "The id of a framebuffer object." } { "quot" "a quotation" } }
-{ $description "Binds framebuffer " { $snippet "id" } " in the dynamic extent of " { $snippet "quot" } ", restoring the window framebuffer when finished." } ;
-
-ABOUT: "gl-utilities"
\ No newline at end of file
diff --git a/extra/opengl/framebuffers/framebuffers.factor b/extra/opengl/framebuffers/framebuffers.factor
deleted file mode 100644 (file)
index 346789e..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-! Copyright (C) 2008 Joe Groff.
-! See http://factorcode.org/license.txt for BSD license.
-USING: opengl opengl.gl combinators continuations kernel
-alien.c-types ;
-IN: opengl.framebuffers
-
-: gen-framebuffer ( -- id )
-    [ glGenFramebuffersEXT ] (gen-gl-object) ;
-: gen-renderbuffer ( -- id )
-    [ glGenRenderbuffersEXT ] (gen-gl-object) ;
-
-: delete-framebuffer ( id -- )
-    [ glDeleteFramebuffersEXT ] (delete-gl-object) ;
-: delete-renderbuffer ( id -- )
-    [ glDeleteRenderbuffersEXT ] (delete-gl-object) ;
-
-: framebuffer-incomplete? ( -- status/f )
-    GL_FRAMEBUFFER_EXT glCheckFramebufferStatusEXT
-    dup GL_FRAMEBUFFER_COMPLETE_EXT = f rot ? ;
-
-: framebuffer-error ( status -- * )
-    { 
-        { GL_FRAMEBUFFER_COMPLETE_EXT [ "framebuffer complete" ] }
-        { GL_FRAMEBUFFER_UNSUPPORTED_EXT [ "framebuffer configuration unsupported" ] }
-        { GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT [ "framebuffer incomplete (incomplete attachment)" ] }
-        { GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT [ "framebuffer incomplete (missing attachment)" ] }
-        { GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT [ "framebuffer incomplete (dimension mismatch)" ] }
-        { GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT [ "framebuffer incomplete (format mismatch)" ] }
-        { GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT [ "framebuffer incomplete (draw buffer(s) have no attachment)" ] }
-        { GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT [ "framebuffer incomplete (read buffer has no attachment)" ] }
-        [ drop gl-error "unknown framebuffer error" ]
-    } case throw ;
-
-: check-framebuffer ( -- )
-    framebuffer-incomplete? [ framebuffer-error ] when* ;
-
-: with-framebuffer ( id quot -- )
-    GL_FRAMEBUFFER_EXT rot glBindFramebufferEXT
-    [ GL_FRAMEBUFFER_EXT 0 glBindFramebufferEXT ] [ ] cleanup ; inline
-
-: framebuffer-attachment ( attachment -- id )
-    GL_FRAMEBUFFER_EXT swap GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT
-    0 <uint> [ glGetFramebufferAttachmentParameterivEXT ] keep *uint ;
diff --git a/extra/opengl/framebuffers/summary.txt b/extra/opengl/framebuffers/summary.txt
deleted file mode 100644 (file)
index 3ef713a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Rendering to offscreen textures using the GL_EXT_framebuffer_object extension
\ No newline at end of file
diff --git a/extra/opengl/framebuffers/tags.txt b/extra/opengl/framebuffers/tags.txt
deleted file mode 100644 (file)
index 77282be..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-opengl
-bindings
index d028ea958cfd40fb90081611e58a82c6b97808a0..b24783e4ef68e2537f30e3ac709c2a50e51a2267 100644 (file)
@@ -23,8 +23,7 @@ textures init-cache
 refcounts init-cache
 
 : refcount-change ( gadget quot -- )
-    >r cache-key* refcounts get
-    [ [ 0 ] unless* ] r> compose change-at ;
+    [ cache-key* refcounts get [ [ 0 ] unless* ] ] dip compose change-at ;
 
 TUPLE: cache-entry tex dims ;
 C: <entry> cache-entry
@@ -86,7 +85,7 @@ M: texture-gadget ungraft* ( gadget -- )
     gen-texture [ (render-bytes) ] keep ;
 
 : render-bytes* ( dims bytes format -- texture dims )
-    pick >r render-bytes r> ;
+    pick [ render-bytes ] dip ;
 
 :: four-corners ( dim -- )
     [let* | w [ dim first ]
diff --git a/extra/opengl/shaders/authors.txt b/extra/opengl/shaders/authors.txt
deleted file mode 100644 (file)
index 6a0dc72..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Joe Groff
\ No newline at end of file
diff --git a/extra/opengl/shaders/shaders-docs.factor b/extra/opengl/shaders/shaders-docs.factor
deleted file mode 100644 (file)
index 1a10071..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-USING: help.markup help.syntax io kernel math quotations
-opengl.gl multiline assocs strings ;
-IN: opengl.shaders
-
-HELP: gl-shader
-{ $class-description { $snippet "gl-shader" } " is a predicate class comprising values returned by OpenGL to represent shader objects. The following words are provided for creating and manipulating these objects:"
-    { $list
-        { { $link <gl-shader> } " - Compile GLSL code into a shader object" }
-        { { $link gl-shader-ok? } " - Check whether a shader object compiled successfully" }
-        { { $link check-gl-shader } " - Throw an error unless a shader object compiled successfully" }
-        { { $link gl-shader-info-log } " - Retrieve the info log of messages generated by the GLSL compiler" }
-        { { $link delete-gl-shader } " - Invalidate a shader object" }
-    }
-  "The derived predicate classes " { $link vertex-shader } " and " { $link fragment-shader } " are also defined for the two standard kinds of shader defined by the OpenGL specification." } ;
-
-HELP: vertex-shader
-{ $class-description { $snippet "vertex-shader" } " is the predicate class of " { $link gl-shader } " objects that refer to shaders of type " { $snippet "GL_VERTEX_SHADER" } ". In addition to the " { $snippet "gl-shader" } " words, the following vertex shader-specific functions are defined:"
-    { $list
-        { { $link <vertex-shader> } " - Compile GLSL code into a vertex shader object "}
-    }
-} ;
-
-HELP: fragment-shader
-{ $class-description { $snippet "fragment-shader" } " is the predicate class of " { $link gl-shader } " objects that refer to shaders of type " { $snippet "GL_FRAGMENT_SHADER" } ". In addition to the " { $snippet "gl-shader" } " words, the following fragment shader-specific functions are defined:"
-    { $list
-        { { $link <fragment-shader> } " - Compile GLSL code into a fragment shader object "}
-    }
-} ;
-
-HELP: <gl-shader>
-{ $values { "source" "The GLSL source code to compile" } { "kind" "The kind of shader to compile, such as " { $snippet "GL_VERTEX_SHADER" } " or " { $snippet "GL_FRAGMENT_SHADER" } } { "shader" "a new " { $link gl-shader } } }
-{ $description "Tries to compile the given GLSL source into a shader object. The returned object can be checked for validity by " { $link check-gl-shader } " or " { $link gl-shader-ok? } ". Errors and warnings generated by the GLSL compiler will be collected in the info log, available from " { $link gl-shader-info-log } ".\n\nWhen the shader object is no longer needed, it should be deleted using " { $link delete-gl-shader } " or else be attached to a " { $link gl-program } " object deleted using " { $link delete-gl-program } "." } ;
-
-HELP: <vertex-shader>
-{ $values { "source" "The GLSL source code to compile" } { "vertex-shader" "a new " { $link vertex-shader } } }
-{ $description "Tries to compile the given GLSL source into a vertex shader object. Equivalent to " { $snippet "GL_VERTEX_SHADER <gl-shader>" } "." } ;
-
-HELP: <fragment-shader>
-{ $values { "source" "The GLSL source code to compile" } { "fragment-shader" "a new " { $link fragment-shader } } }
-{ $description "Tries to compile the given GLSL source into a fragment shader object. Equivalent to " { $snippet "GL_FRAGMENT_SHADER <gl-shader>" } "." } ;
-
-HELP: gl-shader-ok?
-{ $values { "shader" "A " { $link gl-shader } " object" } { "?" "a boolean" } }
-{ $description "Returns a boolean value indicating whether the given shader object compiled successfully. Compilation errors and warnings are available in the shader's info log, which can be gotten using " { $link gl-shader-info-log } "." } ;
-
-HELP: check-gl-shader
-{ $values { "shader" "A " { $link gl-shader } " object" } }
-{ $description "Throws an error containing the " { $link gl-shader-info-log } " for the shader object if it failed to compile. Otherwise, the shader object is left on the stack." } ;
-
-HELP: delete-gl-shader
-{ $values { "shader" "A " { $link gl-shader } " object" } }
-{ $description "Deletes the shader object, invalidating it and releasing any resources allocated for it by the OpenGL implementation." } ;
-
-HELP: gl-shader-info-log
-{ $values { "shader" "A " { $link gl-shader } " object" } { "shader" "a new " { $link gl-shader } } { "log" string } }
-{ $description "Retrieves the info log for " { $snippet "shader" } ", including any errors or warnings generated in compiling the shader object." } ;
-
-HELP: gl-program
-{ $class-description { $snippet "gl-program" } " is a predicate class comprising values returned by OpenGL to represent proram objects. The following words are provided for creating and manipulating these objects:"
-    { $list
-        { { $link <gl-program> } ", " { $link <simple-gl-program> } " - Link a set of shaders into a GLSL program" }
-        { { $link gl-program-ok? } " - Check whether a program object linked successfully" }
-        { { $link check-gl-program } " - Throw an error unless a program object linked successfully" }
-        { { $link gl-program-info-log } " - Retrieve the info log of messages generated by the GLSL linker" }
-        { { $link gl-program-shaders } " - Retrieve the set of shader objects composing the GLSL program" }
-        { { $link delete-gl-program } " - Invalidate a program object and all its attached shaders" }
-        { { $link with-gl-program } " - Use a program object" }
-    }
-} ;
-
-HELP: <gl-program>
-{ $values { "shaders" "A sequence of " { $link gl-shader } " objects." } { "program" "a new " { $link gl-program } } } 
-{ $description "Creates a new GLSL program object, attaches all the shader objects in the " { $snippet "shaders" } " sequence, and attempts to link them. The returned object can be checked for validity by " { $link check-gl-program } " or " { $link gl-program-ok? } ". Errors and warnings generated by the GLSL linker will be collected in the info log, available from " { $link gl-program-info-log } ".\n\nWhen the program object and its attached shaders are no longer needed, it should be deleted using " { $link delete-gl-program } "." } ;
-
-HELP: <simple-gl-program>
-{ $values { "vertex-shader-source" "A string containing GLSL vertex shader source" } { "fragment-shader-source" "A string containing GLSL fragment shader source" } { "program" "a new " { $link gl-program } } }
-{ $description "Wrapper for " { $link <gl-program> } " for the simple case of compiling a single vertex shader and fragment shader and linking them into a GLSL program. Throws an exception if compiling or linking fails." } ;
-
-{ <gl-program> <simple-gl-program> } related-words
-
-HELP: gl-program-ok?
-{ $values { "program" "A " { $link gl-program } " object" } { "?" "a boolean" } }
-{ $description "Returns a boolean value indicating whether the given program object linked successfully. Link errors and warnings are available in the program's info log, which can be gotten using " { $link gl-program-info-log } "." } ;
-
-HELP: check-gl-program
-{ $values { "program" "A " { $link gl-program } " object" } }
-{ $description "Throws an error containing the " { $link gl-program-info-log } " for the program object if it failed to link. Otherwise, the program object is left on the stack." } ;
-
-HELP: gl-program-info-log
-{ $values { "program" "A " { $link gl-program } " object" } { "log" string } }
-{ $description "Retrieves the info log for " { $snippet "program" } ", including any errors or warnings generated in linking the program object." } ;
-
-HELP: delete-gl-program
-{ $values { "program" "A " { $link gl-program } " object" } }
-{ $description "Deletes the program object, invalidating it and releasing any resources allocated for it by the OpenGL implementation. Any attached " { $link gl-shader } "s are also deleted.\n\nIf the shader objects should be preserved, they should each be detached using " { $link detach-gl-program-shader } ". The program object can then be destroyed alone using " { $link delete-gl-program-only } "." } ;
-
-HELP: with-gl-program
-{ $values { "program" "A " { $link gl-program } " object" } { "quot" "A quotation with stack effect " { $snippet "( program -- )" } } }
-{ $description "Enables " { $snippet "program" } " for all OpenGL calls made in the dynamic extent of " { $snippet "quot" } ". " { $snippet "program" } " is left on the top of the stack when " { $snippet "quot" } " is called. The fixed-function pipeline is restored at the end of " { $snippet "quot" } "." } ;
-
-ABOUT: "gl-utilities"
diff --git a/extra/opengl/shaders/shaders.factor b/extra/opengl/shaders/shaders.factor
deleted file mode 100755 (executable)
index 476bb1b..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-! Copyright (C) 2008 Joe Groff.
-! See http://factorcode.org/license.txt for BSD license.
-USING: kernel opengl.gl alien.c-types continuations namespaces
-assocs alien alien.strings libc opengl math sequences combinators
-combinators.lib macros arrays io.encodings.ascii fry
-specialized-arrays.uint destructors accessors ;
-IN: opengl.shaders
-
-: with-gl-shader-source-ptr ( string quot -- )
-    swap ascii malloc-string [ <void*> swap call ] keep free ; inline
-
-: <gl-shader> ( source kind -- shader )
-    glCreateShader dup rot
-    [ 1 swap f glShaderSource ] with-gl-shader-source-ptr
-    [ glCompileShader ] keep
-    gl-error ;
-
-: (gl-shader?) ( object -- ? )
-    dup integer? [ glIsShader c-bool> ] [ drop f ] if ;
-
-: gl-shader-get-int ( shader enum -- value )
-    0 <int> [ glGetShaderiv ] keep *int ;
-
-: gl-shader-ok? ( shader -- ? )
-    GL_COMPILE_STATUS gl-shader-get-int c-bool> ;
-
-: <vertex-shader> ( source -- vertex-shader )
-    GL_VERTEX_SHADER <gl-shader> ; inline
-
-: (vertex-shader?) ( object -- ? )
-    dup (gl-shader?)
-    [ GL_SHADER_TYPE gl-shader-get-int GL_VERTEX_SHADER = ]
-    [ drop f ] if ;
-
-: <fragment-shader> ( source -- fragment-shader )
-    GL_FRAGMENT_SHADER <gl-shader> ; inline
-
-: (fragment-shader?) ( object -- ? )
-    dup (gl-shader?)
-    [ GL_SHADER_TYPE gl-shader-get-int GL_FRAGMENT_SHADER = ]
-    [ drop f ] if ;
-
-: gl-shader-info-log-length ( shader -- log-length )
-    GL_INFO_LOG_LENGTH gl-shader-get-int ; inline
-
-: gl-shader-info-log ( shader -- log )
-    dup gl-shader-info-log-length dup [
-        1 calloc &free
-        [ 0 <int> swap glGetShaderInfoLog ] keep
-        ascii alien>string
-    ] with-destructors ;
-
-: check-gl-shader ( shader -- shader )
-    dup gl-shader-ok? [ dup gl-shader-info-log throw ] unless ;
-
-: delete-gl-shader ( shader -- ) glDeleteShader ; inline
-
-PREDICATE: gl-shader < integer (gl-shader?) ;
-PREDICATE: vertex-shader < gl-shader (vertex-shader?) ;
-PREDICATE: fragment-shader < gl-shader (fragment-shader?) ;
-
-! Programs
-
-: <gl-program> ( shaders -- program )
-    glCreateProgram swap
-    [ dupd glAttachShader ] each
-    [ glLinkProgram ] keep
-    gl-error ;
-    
-: (gl-program?) ( object -- ? )
-    dup integer? [ glIsProgram c-bool> ] [ drop f ] if ;
-
-: gl-program-get-int ( program enum -- value )
-    0 <int> [ glGetProgramiv ] keep *int ;
-
-: gl-program-ok? ( program -- ? )
-    GL_LINK_STATUS gl-program-get-int c-bool> ;
-
-: gl-program-info-log-length ( program -- log-length )
-    GL_INFO_LOG_LENGTH gl-program-get-int ; inline
-
-: gl-program-info-log ( program -- log )
-    dup gl-program-info-log-length dup [
-        1 calloc &free
-        [ 0 <int> swap glGetProgramInfoLog ] keep
-        ascii alien>string
-    ] with-destructors ;
-
-: check-gl-program ( program -- program )
-    dup gl-program-ok? [ dup gl-program-info-log throw ] unless ;
-
-: gl-program-shaders-length ( program -- shaders-length )
-    GL_ATTACHED_SHADERS gl-program-get-int ; inline
-
-: gl-program-shaders ( program -- shaders )
-    dup gl-program-shaders-length
-    0 <int>
-    over <uint-array>
-    [ underlying>> glGetAttachedShaders ] keep ;
-
-: delete-gl-program-only ( program -- )
-    glDeleteProgram ; inline
-
-: detach-gl-program-shader ( program shader -- )
-    glDetachShader ; inline
-
-: delete-gl-program ( program -- )
-    dup gl-program-shaders [
-        2dup detach-gl-program-shader delete-gl-shader
-    ] each delete-gl-program-only ;
-
-: with-gl-program ( program quot -- )
-    over glUseProgram [ 0 glUseProgram ] [ ] cleanup ; inline
-
-PREDICATE: gl-program < integer (gl-program?) ;
-
-: <simple-gl-program> ( vertex-shader-source fragment-shader-source -- program )
-    >r <vertex-shader> check-gl-shader
-    r> <fragment-shader> check-gl-shader
-    2array <gl-program> check-gl-program ;
-
diff --git a/extra/opengl/shaders/summary.txt b/extra/opengl/shaders/summary.txt
deleted file mode 100644 (file)
index c55f766..0000000
+++ /dev/null
@@ -1 +0,0 @@
-OpenGL Shading Language (GLSL) support
\ No newline at end of file
diff --git a/extra/opengl/shaders/tags.txt b/extra/opengl/shaders/tags.txt
deleted file mode 100755 (executable)
index 21154b6..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-opengl
-bindings
\ No newline at end of file
diff --git a/extra/oracle/authors.txt b/extra/oracle/authors.txt
deleted file mode 100644 (file)
index 7c29e7c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Elie Chaftari
diff --git a/extra/oracle/liboci/authors.txt b/extra/oracle/liboci/authors.txt
deleted file mode 100755 (executable)
index 7c29e7c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Elie Chaftari
diff --git a/extra/oracle/liboci/liboci.factor b/extra/oracle/liboci/liboci.factor
deleted file mode 100644 (file)
index aa04aef..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-! Copyright (C) 2007 Elie CHAFTARI
-! See http://factorcode.org/license.txt for BSD license.
-!
-! Adapted from oci.h and ociap.h
-! Tested with Oracle version - 10.1.0.3 Instant Client
-!
-! DYLD_LIBRARY_PATH="/usr/local/oracle/instantclient10_1"
-! export DYLD_LIBRARY_PATH
-
-USING: alien alien.syntax combinators kernel system ;
-
-IN: oracle.liboci
-
-"oci" {
-    { [ os winnt? ] [ "oci.dll" "stdcall" ] }
-    { [ os macosx? ] [ "$DYLD_LIBRARY_PATH/libclntsh.dylib" "cdecl" ] }
-    { [ os unix? ] [ "$DYLD_LIBRARY_PATH/libclntsh.so.10.1" "cdecl" ] }
-} cond add-library
-
-! ===============================================
-! Attribute Types
-! ===============================================
-
-: OCI_ATTR_USERNAME 22  ; inline ! username attribute
-: OCI_ATTR_PASSWORD 23  ; inline ! password attribute
-
-! ===============================================
-! Various Modes
-! ===============================================
-
-: OCI_DEFAULT   HEX: 00 ; inline ! default value for parameters and attributes
-: OCI_THREADED  HEX: 01 ; inline ! appl. in threaded environment
-: OCI_OBJECT    HEX: 02 ; inline ! application in object environment
-
-! ===============================================
-! Execution Modes
-! ===============================================
-
-: OCI_DESCRIBE_ONLY   HEX: 10 ; inline ! only describe the statement
-
-! ===============================================
-! Credential Types
-! ===============================================
-
-: OCI_CRED_RDBMS      1 ; inline ! database username/password
-: OCI_CRED_EXT        2 ; inline ! externally provided credentials
-: OCI_CRED_PROXY      3 ; inline ! proxy authentication
-
-! ===============================================
-! Error Return Values
-! ===============================================
-
-: OCI_SUCCESS               0     ; inline ! maps to SQL_SUCCESS of SAG CLI
-: OCI_SUCCESS_WITH_INFO     1     ; inline ! maps to SQL_SUCCESS_WITH_INFO
-: OCI_RESERVED_FOR_INT_USE  200   ; inline ! reserved
-: OCI_NO_DATA               100   ; inline ! maps to SQL_NO_DATA
-: OCI_ERROR                 -1    ; inline ! maps to SQL_ERROR
-: OCI_INVALID_HANDLE        -2    ; inline ! maps to SQL_INVALID_HANDLE
-: OCI_NEED_DATA             99    ; inline ! maps to SQL_NEED_DATA
-: OCI_STILL_EXECUTING       -3123 ; inline ! OCI would block error
-
-! ===============================================
-! Parsing Syntax Types
-! ===============================================
-
-: OCI_V7_SYNTAX            2 ; inline ! V815 language - for backwards compatibility
-: OCI_V8_SYNTAX            3 ; inline ! V815 language - for backwards compatibility
-: OCI_NTV_SYNTAX           1 ; inline ! Use what so ever is the native lang of server
-
-! ===============================================
-! Scrollable Cursor Fetch Options
-! For non-scrollable cursor, the only valid
-! (and default) orientation is OCI_FETCH_NEXT
-! ===============================================
-
-: OCI_FETCH_CURRENT       HEX: 01 ; inline ! refetching current position
-: OCI_FETCH_NEXT          HEX: 02 ; inline ! next row
-: OCI_FETCH_FIRST         HEX: 04 ; inline ! first row of the result set
-: OCI_FETCH_LAST          HEX: 08 ; inline ! the last row of the result set
-: OCI_FETCH_PRIOR         HEX: 10 ; inline ! the previous row relative to current
-: OCI_FETCH_ABSOLUTE      HEX: 20 ; inline ! absolute offset from first
-: OCI_FETCH_RELATIVE      HEX: 40 ; inline ! offset relative to current
-: OCI_FETCH_RESERVED_1    HEX: 80 ; inline ! reserved
-
-! ===============================================
-! Handle Types
-! ===============================================
-
-: OCI_HTYPE_ENV            1  ; inline ! environment handle
-: OCI_HTYPE_ERROR          2  ; inline ! error handle
-: OCI_HTYPE_SVCCTX         3  ; inline ! service handle
-: OCI_HTYPE_STMT           4  ; inline ! statement handle
-: OCI_HTYPE_BIND           5  ; inline ! bind handle
-: OCI_HTYPE_DEFINE         6  ; inline ! define handle
-: OCI_HTYPE_DESCRIBE       7  ; inline ! describe handle
-: OCI_HTYPE_SERVER         8  ; inline ! server handle
-: OCI_HTYPE_SESSION        9  ; inline ! authentication handle
-
-! ===============================================
-! Attribute Types
-! ===============================================
-
-: OCI_ATTR_FNCODE                   1  ; inline ! the OCI function code
-: OCI_ATTR_OBJECT                   2  ; inline ! is the environment initialized in object mode
-: OCI_ATTR_NONBLOCKING_MODE         3  ; inline ! non blocking mode
-: OCI_ATTR_SQLCODE                  4  ; inline ! the SQL verb
-: OCI_ATTR_ENV                      5  ; inline ! the environment handle
-: OCI_ATTR_SERVER                   6  ; inline ! the server handle
-: OCI_ATTR_SESSION                  7  ; inline ! the user session handle
-: OCI_ATTR_TRANS                    8  ; inline ! the transaction handle
-: OCI_ATTR_ROW_COUNT                9  ; inline ! the rows processed so far
-: OCI_ATTR_SQLFNCODE                10 ; inline ! the SQL verb of the statement
-: OCI_ATTR_PREFETCH_ROWS            11 ; inline ! sets the number of rows to prefetch
-: OCI_ATTR_NESTED_PREFETCH_ROWS     12 ; inline ! the prefetch rows of nested table
-: OCI_ATTR_PREFETCH_MEMORY          13 ; inline ! memory limit for rows fetched
-: OCI_ATTR_NESTED_PREFETCH_MEMORY   14 ; inline ! memory limit for nested rows
-: OCI_ATTR_CHAR_COUNT               15 ; inline ! this specifies the bind and define size in characters
-
-! ===============================================
-! OCI integer types
-! ===============================================
-
-TYPEDEF: ushort ub2
-TYPEDEF: short sb2
-TYPEDEF: uint ub4
-TYPEDEF: int sb4
-
-! ===============================================
-! Input data types (ocidfn.h)
-! ===============================================
-
-: SQLT_CHR                  1    ; inline ! (ORANET TYPE) character string
-: SQLT_NUM                  2    ; inline ! (ORANET TYPE) oracle numeric
-: SQLT_INT                  3    ; inline ! (ORANET TYPE) integer
-: SQLT_FLT                  4    ; inline ! (ORANET TYPE) Floating point number
-: SQLT_STR                  5    ; inline ! zero terminated string
-: SQLT_ODT                  156  ; inline ! OCIDate type
-
-! ===============================================
-! Input datetimes and intervals (ocidfn.h)
-! ===============================================
-
-: SQLT_DATE                184   ; inline ! ANSI Date
-: SQLT_TIME                185   ; inline ! TIME
-: SQLT_TIME_TZ             186   ; inline ! TIME WITH TIME ZONE
-: SQLT_TIMESTAMP           187   ; inline ! TIMESTAMP
-: SQLT_TIMESTAMP_TZ        188   ; inline ! TIMESTAMP WITH TIME ZONE
-: SQLT_INTERVAL_YM         189   ; inline ! INTERVAL YEAR TO MONTH
-: SQLT_INTERVAL_DS         190   ; inline ! INTERVAL DAY TO SECOND
-: SQLT_TIMESTAMP_LTZ       232   ; inline ! TIMESTAMP WITH LOCAL TZ
-
-! ===============================================
-! Opaque pointer types
-! ===============================================
-
-TYPEDEF: void dvoid
-TYPEDEF: void oci_env
-TYPEDEF: void oci_server
-TYPEDEF: void oci_error
-TYPEDEF: void oci_svc_ctx
-TYPEDEF: void oci_session
-TYPEDEF: void oci_stmt
-
-LIBRARY: oci
-
-! ===============================================
-! ociap.h
-! ===============================================
-
-FUNCTION: int OCIInitialize ( ub4 mode, void* ctxp, void* malocfp, void* ralocfp, dvoid* mfreefp ) ;
-FUNCTION: int OCITerminate ( ub4 mode ) ;
-FUNCTION: int OCIEnvInit ( void* envhpp, ub4 mode, size_t xtramem_sz, dvoid* usrmempp ) ;
-FUNCTION: int OCIEnvCreate ( dvoid* envhpp, ub4 mode, void* ctxp, void* malocfp, void* ralocfp, void* mfreefp, size_t xtramemz, dvoid* usrmempp ) ;
-FUNCTION: int OCIHandleAlloc ( void* parenth, dvoid* hndlpp, ub4 type, size_t xtramem_sz, dvoid* usrmempp ) ;
-FUNCTION: int OCIServerAttach ( void* srvhp, void* errhp, char* dblink, sb4 dblink_len, ub4 mode ) ;
-FUNCTION: int OCIServerDetach ( void* srvhp, void* errhp, ub4 mode ) ;
-FUNCTION: int OCIHandleFree ( dvoid* p0, ub4 p1 ) ;
-FUNCTION: int OCILogon ( void* envhp, void* errhp, dvoid* svchpp, uchar* username, ub4 uname_len, uchar* passwd, ub4 password_len, uchar* dsn, ub4 dsn_len ) ;
-FUNCTION: int OCILogoff ( void* p0, void* p1 ) ;
-FUNCTION: void OCIErrorGet ( void* handlp, ub4 recordno, char* sqlstate, sb4* errcodep, uchar* bufp, ub4 bufsize, ub4 type ) ;
-FUNCTION: int OCIStmtPrepare ( void* stmtp, void* errhp, uchar* stmt, ub4 stmt_len, ub4 language, ub4 mode ) ;
-FUNCTION: int OCIStmtExecute ( void* svchp, void* stmtp1, void* errhp, ub4 iters, ub4 rowoff, void* snap_in, void* snap_out, ub4 mode ) ;
-FUNCTION: int OCIParamGet ( void* hndlp, ub4 htype, void* errhp, dvoid* parmdpp, ub4 pos ) ;
-FUNCTION: int OCIAttrGet ( void* trgthndlp, ub4 trghndltyp, void* attributep, ub4* sizep, ub4 attrtype, void* errhp ) ;
-FUNCTION: int OCIAttrSet ( dvoid* trgthndlp, ub4 trgthndltyp, dvoid* attributep, ub4 size, ub4 attrtype, oci_error* errhp ) ;
-FUNCTION: int OCIDefineByPos ( void* stmtp, dvoid* defnpp, void* errhp, ub4 position, void* valuep, sb4 value_sz, ub2 dty, sb2* indp, ub2* rlenp, ub2* rcodep, ub4 mode ) ;
-FUNCTION: int OCIStmtFetch ( void* stmthp, void* errhp, ub4 p2, ub2 p3, ub4 p4 ) ;
-FUNCTION: int OCITransStart ( void* svchp, void* errhp, ushort p2, ushort p3 ) ;
-FUNCTION: int OCITransCommit ( void* svchp, void* errhp, ushort p2 ) ;
-FUNCTION: int OCITransRollback ( void* svchp, void* errhp, ushort p2 ) ;
-FUNCTION: int OCISessionBegin ( oci_svc_ctx* svchp, oci_error* errhp,  oci_session* usrhp, ub4 credt, ub4 mode ) ;
-FUNCTION: int OCISessionEnd ( oci_svc_ctx* svchp, oci_error* errhp,  oci_session* usrhp, ub4 mode ) ;
-FUNCTION: int OCIServerVersion ( void* handlp, void* errhp, uchar* bufsz, int bufsz, short hndltype ) ;
diff --git a/extra/oracle/oracle-tests.factor b/extra/oracle/oracle-tests.factor
deleted file mode 100755 (executable)
index 2f957ac..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-USING: oracle oracle.liboci prettyprint tools.test
-kernel ;
-
-[
-    "testuser" "testpassword" "//localhost/test1" log-on .
-
-    allocate-statement-handle
-
-    "CREATE TABLE TESTTABLE ( COL1 VARCHAR(40), COL2 NUMBER)" prepare-statement
-
-    [ t ] [ execute-statement ] unit-test
-
-    "INSERT INTO TESTTABLE (COL1, COL2) VALUES('hello', 50)" prepare-statement
-
-    [ t ] [ execute-statement ] unit-test
-
-    "INSERT INTO TESTTABLE (COL1, COL2) VALUES('hi', 60)" prepare-statement
-
-    [ t ] [ execute-statement ] unit-test
-
-    "INSERT INTO TESTTABLE (COL1, COL2) VALUES('bye', 70)" prepare-statement
-
-    [ t ] [ execute-statement ] unit-test
-
-    "COMMIT" prepare-statement
-
-    [ t ] [ execute-statement ] unit-test
-
-    "SELECT * FROM TESTTABLE" prepare-statement
-
-    1 SQLT_STR define-by-position run-query
-
-    [ V{ "hello" "hi" "bye" "50" "60" "70" } ] [
-    2 SQLT_STR define-by-position run-query gather-results
-    ] unit-test
-
-    clear-result
-
-    "UPDATE TESTTABLE SET COL2 = 10 WHERE COL1='hi'" prepare-statement
-
-    [ t ] [ execute-statement ] unit-test
-
-    "COMMIT" prepare-statement
-
-    [ t ] [ execute-statement ] unit-test
-
-    "SELECT * FROM TESTTABLE WHERE COL1 = 'hi'" prepare-statement
-
-    [ V{ "10" } ] [
-    2 SQLT_STR define-by-position run-query gather-results
-    ] unit-test
-
-    clear-result
-
-    "DROP TABLE TESTTABLE" prepare-statement
-
-    execute-statement
-
-    free-statement-handle log-off clean-up terminate
-] drop
diff --git a/extra/oracle/oracle.factor b/extra/oracle/oracle.factor
deleted file mode 100644 (file)
index e61a47a..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-! Copyright (C) 2007 Elie CHAFTARI
-! See http://factorcode.org/license.txt for BSD license.
-!
-! Adapted from oci.h and ociap.h
-! Tested with Oracle version - 10.1.0.3 Instant Client
-
-USING: alien alien.c-types alien.strings combinators kernel math
-namespaces oracle.liboci prettyprint sequences
-io.encodings.ascii accessors ;
-
-IN: oracle
-
-SYMBOL: env
-SYMBOL: err
-SYMBOL: srv
-SYMBOL: svc
-SYMBOL: ses
-SYMBOL: stm
-SYMBOL: buf
-SYMBOL: res
-
-SYMBOL: con
-
-TUPLE: connection username password db ;
-
-C: <connection> connection
-
-! =========================================================
-! Error-handling routines
-! =========================================================
-
-: get-oci-error ( object -- * )
-    1 f "uint*" <c-object> dup >r 512 "uchar" <c-array> dup >r
-    512 OCI_HTYPE_ERROR OCIErrorGet r> r> *uint drop
-    ascii alien>string throw ;
-
-: check-result ( result -- )
-    {
-        { OCI_SUCCESS [ ] }
-        { OCI_ERROR [ err get get-oci-error ] }
-        { OCI_INVALID_HANDLE [ "invalid handle" throw ] }
-        [ "operation failed" throw ]
-    } case ;
-
-: check-status ( status -- bool )
-    {
-        { OCI_SUCCESS [ t ] }
-        { OCI_ERROR [ err get get-oci-error ] }
-        { OCI_INVALID_HANDLE [ "invalid handle" throw ] }
-        { OCI_NO_DATA [ f ] }
-        [ "operation failed" throw ]
-    } case ;
-
-! =========================================================
-! Initialization and handle-allocation routines
-! =========================================================
-
-! Legacy initialization routine
-: oci-initialize ( -- )
-    OCI_DEFAULT f f f f OCIInitialize check-result ;
-
-! Legacy initialization routine
-: oci-env-init ( -- )
-    "void*" <c-object> dup OCI_DEFAULT 0 f OCIEnvInit
-    check-result *void* env set ;
-
-: create-environment ( -- )
-    "void*" <c-object> dup OCI_DEFAULT f f f f 0 f OCIEnvCreate 
-    check-result *void* env set ;
-
-: allocate-error-handle ( -- )
-    env get
-    "void*" <c-object> tuck OCI_HTYPE_ERROR 0 f OCIHandleAlloc 
-    check-result *void* err set ;
-
-: allocate-service-handle ( -- )
-    env get
-    "void*" <c-object> tuck OCI_HTYPE_SVCCTX 0 f OCIHandleAlloc 
-    check-result *void* svc set ;
-
-: allocate-session-handle ( -- )
-    env get
-    "void*" <c-object> tuck OCI_HTYPE_SESSION 0 f OCIHandleAlloc 
-    check-result *void* ses set ;
-
-: allocate-server-handle ( -- )
-    env get
-    "void*" <c-object> tuck OCI_HTYPE_SERVER 0 f OCIHandleAlloc 
-    check-result *void* srv set ;
-
-: init ( -- )
-    oci-initialize
-    oci-env-init
-    allocate-error-handle
-    allocate-service-handle
-    allocate-session-handle
-    allocate-server-handle ;
-
-! =========================================================
-! Single user session logon routine
-! =========================================================
-
-: oci-log-on ( -- )
-    env get err get svc get 
-    con get username>> dup length swap ascii malloc-string swap 
-    con get password>> dup length swap ascii malloc-string swap
-    con get db>> dup length swap ascii malloc-string swap
-    OCILogon check-result ;
-
-! =========================================================
-! Attach to server and attribute-setting routines
-! =========================================================
-
-: attach-to-server ( -- )
-    srv get err get con get db>> dup length OCI_DEFAULT
-    OCIServerAttach check-result ;
-
-: set-service-attribute ( -- )
-    svc get OCI_HTYPE_SVCCTX srv get 0 OCI_ATTR_SERVER err get OCIAttrSet check-result ;
-
-: set-username-attribute ( -- )
-    ses get OCI_HTYPE_SESSION con get username>> dup length swap ascii malloc-string swap 
-    OCI_ATTR_USERNAME err get OCIAttrSet check-result ;
-
-: set-password-attribute ( -- )
-    ses get OCI_HTYPE_SESSION con get password>> dup length swap ascii malloc-string swap 
-    OCI_ATTR_PASSWORD err get OCIAttrSet check-result ;
-
-: set-attributes ( -- )
-    set-service-attribute
-    set-username-attribute
-    set-password-attribute ;
-
-! =========================================================
-! Session startup routines
-! =========================================================
-
-: begin-session ( -- )
-    svc get err get ses get OCI_CRED_RDBMS OCI_DEFAULT OCISessionBegin check-result ;
-
-: set-authentication-handle ( -- )
-    svc get OCI_HTYPE_SVCCTX ses get 0 OCI_ATTR_SESSION err get OCIAttrSet check-result ;
-
-! =========================================================
-! Statement preparation and execution routines
-! =========================================================
-
-: allocate-statement-handle ( -- )
-    env get
-    "void*" <c-object> tuck OCI_HTYPE_STMT 0 f OCIHandleAlloc 
-    check-result *void* stm set ;
-
-: prepare-statement ( statement -- )
-    >r stm get err get r> dup length swap ascii malloc-string swap
-    OCI_NTV_SYNTAX OCI_DEFAULT OCIStmtPrepare check-result ;
-
-: calculate-size ( type -- size )
-    {
-        { SQLT_INT [ "int" heap-size ] }
-        { SQLT_FLT [ "float" heap-size ] }
-        { SQLT_CHR [ "char" heap-size ] }
-        { SQLT_NUM [ "int" heap-size 10 * ] }
-        { SQLT_STR [ 64 ] }
-        { SQLT_ODT [ 256 ] }
-    } case ;
-
-: define-by-position ( position type -- )
-    >r >r stm get f <void*> err get
-    r> r> dup calculate-size >r [ "char" malloc-array dup buf set ] keep 1+
-    r> f f f OCI_DEFAULT OCIDefineByPos check-result ;
-
-: execute-statement ( -- bool )
-    svc get stm get err get 1 0 f f OCI_DEFAULT OCIStmtExecute check-status ;
-
-: fetch-statement ( -- bool )
-    stm get err get 1 OCI_FETCH_NEXT OCI_DEFAULT OCIStmtFetch check-status ;
-
-: free-statement-handle ( -- )
-    stm get OCI_HTYPE_STMT OCIHandleFree check-result ;
-
-! =========================================================
-! Log off and detach from server routines
-! =========================================================
-
-: end-session ( -- )
-    svc get err get ses get OCI_DEFAULT OCISessionEnd check-result ;
-
-: detach-from-server ( -- )
-    srv get err get OCI_DEFAULT OCIServerDetach check-result ;
-
-: log-off ( -- )
-    end-session
-    detach-from-server ;
-
-! =========================================================
-! Clean-up and termination routines
-! =========================================================
-
-: free-service-handle ( -- )
-    svc get OCI_HTYPE_SVCCTX OCIHandleFree check-result ;
-
-: free-server-handle ( -- )
-    srv get OCI_HTYPE_SERVER OCIHandleFree check-result ;
-
-: free-error-handle ( -- )
-    err get OCI_HTYPE_ERROR OCIHandleFree check-result ;
-
-: free-environment-handle ( -- )
-    env get OCI_HTYPE_ENV OCIHandleFree check-result ;
-
-: clean-up ( -- )
-    free-service-handle
-    free-server-handle
-    free-error-handle
-    free-environment-handle ;
-
-: terminate ( -- )
-    OCI_DEFAULT OCITerminate check-result ;
-
-! =========================================================
-! Utility routines
-! =========================================================
-
-: server-version ( -- )
-    srv get err get 512 "uchar" malloc-array dup >r 512 OCI_HTYPE_SERVER
-    OCIServerVersion check-result r> ascii alien>string . ;
-
-! =========================================================
-! Public routines
-! =========================================================
-
-: log-on ( username password db -- )
-    <connection> con set 
-    init attach-to-server set-attributes
-    begin-session set-authentication-handle 
-    V{ } clone res set ;
-
-: fetch-each ( object -- object )
-    fetch-statement [
-        buf get ascii alien>string res get swap suffix res set
-        fetch-each
-    ] [ ] if ;
-
-: run-query ( object -- object )
-    execute-statement [
-        buf get ascii alien>string res get swap suffix res set
-        fetch-each
-    ] [ ] if ;
-
-: gather-results ( -- seq )
-    res get ;
-
-: show-result ( -- )
-    res get [ . ] each ;
-
-: clear-result ( -- )
-    V{ } clone res set ;
diff --git a/extra/oracle/summary.txt b/extra/oracle/summary.txt
deleted file mode 100644 (file)
index 0596680..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Oracle database bindings
diff --git a/extra/oracle/tags.txt b/extra/oracle/tags.txt
deleted file mode 100644 (file)
index aa0d57e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-database
index 84d33bb77fdf960d15215143978c7f082e04dd6d..b7c2458c6b032db74434f15d64880b026714a43b 100644 (file)
@@ -17,7 +17,7 @@ C: <ori> ori
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: make-matrix ( quot width -- matrix ) >r { } make r> group ; inline
+: make-matrix ( quot width -- matrix ) [ { } make ] dip group ; inline
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
diff --git a/extra/otug-talk/2bi.png b/extra/otug-talk/2bi.png
new file mode 100644 (file)
index 0000000..8f431f8
Binary files /dev/null and b/extra/otug-talk/2bi.png differ
diff --git a/extra/otug-talk/2bi_at.png b/extra/otug-talk/2bi_at.png
new file mode 100644 (file)
index 0000000..55d42c2
Binary files /dev/null and b/extra/otug-talk/2bi_at.png differ
diff --git a/extra/otug-talk/2bi_star.png b/extra/otug-talk/2bi_star.png
new file mode 100644 (file)
index 0000000..0fff376
Binary files /dev/null and b/extra/otug-talk/2bi_star.png differ
diff --git a/extra/otug-talk/authors.txt b/extra/otug-talk/authors.txt
new file mode 100644 (file)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/extra/otug-talk/bi.png b/extra/otug-talk/bi.png
new file mode 100644 (file)
index 0000000..2470c9f
Binary files /dev/null and b/extra/otug-talk/bi.png differ
diff --git a/extra/otug-talk/bi_at.png b/extra/otug-talk/bi_at.png
new file mode 100644 (file)
index 0000000..282f2f1
Binary files /dev/null and b/extra/otug-talk/bi_at.png differ
diff --git a/extra/otug-talk/bi_star.png b/extra/otug-talk/bi_star.png
new file mode 100644 (file)
index 0000000..e94e371
Binary files /dev/null and b/extra/otug-talk/bi_star.png differ
diff --git a/extra/otug-talk/otug-talk.factor b/extra/otug-talk/otug-talk.factor
new file mode 100644 (file)
index 0000000..b52749d
--- /dev/null
@@ -0,0 +1,368 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: slides help.markup math arrays hashtables namespaces
+sequences kernel sequences parser memoize io.encodings.binary
+locals kernel.private tools.vocabs.browser assocs quotations
+ tools.vocabs tools.annotations tools.crossref
+help.topics math.functions compiler.tree.optimizer
+compiler.cfg.optimizer fry
+ui.gadgets.panes tetris tetris.game combinators generalizations
+multiline sequences.private ;
+IN: otug-talk
+
+USING: cairo cairo.ffi cairo.gadgets accessors
+io.backend ui.gadgets ;
+
+TUPLE: png-gadget < cairo-gadget surface ;
+
+: <png-gadget> ( file -- gadget )
+    png-gadget new-gadget
+    swap normalize-path
+    cairo_image_surface_create_from_png >>surface ; inline
+
+M: png-gadget pref-dim* ( gadget -- )
+    surface>>
+    [ cairo_image_surface_get_width ]
+    [ cairo_image_surface_get_height ]
+    bi 2array ;
+
+M: png-gadget render-cairo* ( gadget -- )
+    cr swap surface>> 0 0 cairo_set_source_surface
+    cr cairo_paint ;
+
+M: png-gadget ungraft* ( gadget -- )
+    surface>> cairo_surface_destroy ;
+
+: $bitmap ( element -- )
+    [ first <png-gadget> gadget. ] ($block) ;
+
+: $tetris ( element -- )
+    drop [ <default-tetris> <tetris-gadget> gadget. ] ($block) ;
+
+: otug-slides
+{
+    { $slide "Factor!"
+        { $url "http://factorcode.org" }
+        "Development started in 2003"
+        "Open source (BSD license)"
+        "Influenced by Forth, Lisp, and Smalltalk"
+        "Blurs the line between language and library"
+        "Interactive development"
+    }
+    { $slide "Part 1: the language" }
+    { $slide "Basics"
+        "Stack based, dynamically typed"
+        { "A " { $emphasis "word" } " is a named piece of code" }
+        { "Values are passed between words on a " { $emphasis "stack" } }
+        "Code evaluates left to right"
+        "Example:"
+        { $code "2 3 + ." }
+    }
+    { $slide "Quotations"
+        { "A " { $emphasis "quotation" } " is a block of code pushed on the stack" }
+        { "Syntax: " { $snippet "[ ... ]" } }
+        "Example:"
+        { $code
+            "\"/etc/passwd\" ascii file-lines"
+            "[ \"#\" head? not ] filter"
+            "[ \":\" split first ] map"
+            "."
+        }
+    }
+    { $slide "Words"
+        { "We can define new words with " { $snippet ": name ... ;" } " syntax" }
+        { $code ": remove-comments ( lines -- lines' )" "    [ \"#\" head? not ] filter ;" }
+        { "Words are grouped into " { $emphasis "vocabularies" } }
+        { $link "vocab-index" }
+        "Libraries and applications are vocabularies"
+        { $vocab-link "spheres" }
+    }
+    { $slide "Constructing quotations"
+        { "Suppose we want a " { $snippet "remove-comments*" } " word" }
+        { $code ": remove-comments* ( lines string -- lines' )" "    [ ??? head? not ] filter ;" }
+        { "We use " { $link POSTPONE: '[ } " instead of " { $link POSTPONE: [ } }
+        { "Create â€œholes†with " { $link _ } }
+        "Holes filled in left to right when quotation pushed on the stack"
+    }
+    { $slide "Constructing quotations"
+        { $code ": remove-comments* ( lines string -- lines' )" "    '[ _ head? not ] filter ;" "" ": remove-comments ( lines -- lines' )" "    \"#\" remove-comments* ;" }
+        { { $link @ } " inserts a quotation" }
+        { $code ": replicate ( n quot -- seq )" "    '[ drop @ ] map ;" }
+        { $code "10 [ 1 10 [a,b] random ] replicate ." }
+    }
+    { $slide "Combinators"
+        { "A " { $emphasis "combinator" } " is a word taking quotations as input" }
+        { "Used for control flow, data flow, iteration" }
+        { $code "100 [ 5 mod 3 = [ \"Fizz!\" print ] when ] each" }
+        { "Control flow: " { $link if } ", " { $link when } ", " { $link unless } ", " { $link cond } }
+        { "Iteration: " { $link map } ", " { $link filter } ", " { $link all? } ", ..." }
+    }
+    { $slide "Data flow combinators - simple example"
+        "All examples so far used â€œpipeline styleâ€"
+        "What about using a value more than once, or operating on values not at top of stack?"
+        { $code "{ 10 70 54 } [ sum ] [ length ] bi / ." }
+        { $code "5 [ 1 + ] [ sqrt ] [ 1 - ] tri 3array ." }
+    }
+    { $slide "Data flow combinators - cleave family"
+        { { $link bi } ", " { $link tri } ", " { $link cleave } }
+        { $bitmap "resource:extra/otug-talk/bi.png" }
+    }
+    { $slide "Data flow combinators - cleave family"
+        { { $link 2bi } ", " { $link 2tri } ", " { $link 2cleave } }
+        { $bitmap "resource:extra/otug-talk/2bi.png" }
+    }
+    { $slide "Data flow combinators"
+        "First, let's define a data type:"
+        { $code "TUPLE: person first-name last-name ;" }
+        "Make an instance:"
+        { $code "person new" "    \"Joe\" >>first-name" "    \"Sixpack\" >>last-name" }
+    }
+    { $slide "Data flow combinators"
+        "Let's do stuff with it:"
+        { $code
+            "[ first-name>> ] [ last-name>> ] bi"
+            "[ 2 head ] [ 5 head ] bi*"
+            "[ >upper ] bi@"
+            "\".\" glue ."
+        }
+    }
+    { $slide "Data flow combinators - spread family"
+        { { $link bi* } ", " { $link tri* } ", " { $link spread } }
+        { $bitmap "resource:extra/otug-talk/bi_star.png" }
+    }
+    { $slide "Data flow combinators - spread family"
+        { { $link 2bi* } }
+        { $bitmap "resource:extra/otug-talk/2bi_star.png" }
+    }
+    { $slide "Data flow combinators - apply family"
+        { { $link bi@ } ", " { $link tri@ } ", " { $link napply } }
+        { $bitmap "resource:extra/otug-talk/bi_at.png" }
+    }
+    { $slide "Data flow combinators - apply family"
+        { { $link 2bi@ } }
+        { $bitmap "resource:extra/otug-talk/2bi_at.png" }
+    }
+    { $slide "Shuffle words"
+        "When data flow combinators are not enough"
+        { $link "shuffle-words" }
+        "Lower-level, Forth/PostScript-style stack manipulation"
+    }
+    { $slide "Locals"
+        "When data flow combinators and shuffle words are not enough"
+        "Name your input parameters"
+        "Used in about 1% of all words"
+    }
+    { $slide "Locals example"
+        "Area of a triangle using Heron's formula"
+        { $code
+            <" :: area ( a b c -- x )
+    a b c + + 2 / :> p
+    p
+    p a - *
+    p b - *
+    p c - * sqrt ;">
+        }
+    }
+    { $slide "Previous example without locals"
+        "A bit unwieldy..."
+        { $code
+            <" : area ( a b c -- x )
+    [ ] [ + + 2 / ] 3bi
+    [ '[ _ - ] tri@ ] [ neg ] bi
+    * * * sqrt ;"> }
+    }
+    { $slide "More idiomatic version"
+        "But there's a trick: put the points in an array"
+        { $code <" : v-n ( v n -- w ) '[ _ - ] map ;
+
+: area ( points -- x )
+    [ 0 suffix ] [ sum 2 / ] bi
+    v-n product sqrt ;"> }
+    }
+    ! { $slide "The parser"
+    !     "All data types have a literal syntax"
+    !     "Literal hashtables and arrays are very useful in data-driven code"
+    !     { $code "H{ { \"cookies\" 12 } { \"milk\" 10 } }" }
+    !     "Libraries can define new parsing words"
+    ! }
+    { $slide "Programming without named values"
+        "Minimal glue between words"
+        "Easy multiple return values"
+        { "Avoid useless variable names: " { $snippet "x" } ", " { $snippet "n" } ", " { $snippet "a" } ", ..." }
+        { { $link at } " and " { $link at* } }
+        { $code "at* [ ... ] [ ... ] if" }
+    }
+    { $slide "Stack language idioms"
+        "Enables new idioms not possible before"
+        "We get the effect of â€œkeyword parameters†for free"
+        { $vocab-link "smtp-example" }
+    }
+    { $slide "“Perfect†factoring"
+        { $table
+            { { $link head } { $link head-slice } }
+            { { $link tail } { $link tail-slice } }
+        }
+        { "Modifier: " { $link from-end } }
+        { "Modifier: " { $link short } }
+        "4*2*2=16 operations, 6 words!"
+    }
+    { $slide "Modifiers"
+        "“Modifiers†can express MN combinations using M+N words"
+        { $code
+            "\"Hello, Joe\" 4 head ."
+            "\"Hello, Joe\" 3 tail ."
+            "\"Hello, Joe\" 3 from-end tail ."
+        }
+        { $code
+            "\"Hello world\" 5 short head ."
+            "\"Hi\" 5 short tail ."
+        }
+    }
+    { $slide "Modifiers"
+        { "C-style " { $snippet "while" } " and " { $snippet "do while" } " loops" }
+    }
+    { $slide "Modifiers"
+        { $code ": bank ( n -- n )" "    readln string>number +" "    dup \"Balance: $\" write . ;" }
+        { $code "0 [ dup 0 > ] [ bank ] [ ] while" }
+    }
+    { $slide "Modifiers"
+        { $code "0 [ dup 0 > ] [ bank ] [ ] do while" }
+        { { $link do } " executes one iteration of a " { $link while } " loop" }
+        { { $link while } " calls " { $link do } }
+    }
+    { $slide "More â€œpipeline style†code"
+        { "Suppose we want to get the price of the customer's first order, but any one of the steps along the way could be a nil value (" { $link f } " in Factor):" }
+        { $code
+            "dup [ orders>> ] when"
+            "dup [ first ] when"
+            "dup [ price>> ] when"
+        }
+    }
+    { $slide "This is hard with mainstream syntax!"
+        { $code
+            <" var customer = ...;
+var orders = (customer == null ? null : customer.orders);
+var order = (orders == null ? null : orders[0]);
+var price = (order == null ? null : order.price);"> }
+    }
+    { $slide "An ad-hoc solution"
+        "Something like..."
+        { $code "var price = customer.?orders.?[0].?price;" }
+    }
+    ! { $slide "Stack languages are fundamental"
+    !     "Very simple semantics"
+    !     "Easy to generate stack code programatically"
+    !     "Everything is almost entirely library code in Factor"
+    !     "Factor is easy to extend"
+    ! }
+    { $slide "Part 2: the implementation" }
+    { $slide "Interactive development"
+        { $tetris }
+    }
+    { $slide "Application deployment"
+        { $vocab-link "webkit-demo" }
+        "Demonstrates Cocoa binding"
+        "Let's deploy a stand-alone binary with the deploy tool"
+        "Deploy tool generates binaries with no external dependencies"
+    }
+    { $slide "The UI"
+        "Renders with OpenGL"
+        "Backends for Cocoa, Windows, X11: managing windows, input events, clipboard"
+        "Cross-platform API"
+    }
+    { $slide "UI example"
+        { $code
+    <" <pile>
+    { 5 5 } >>gap
+    1 >>fill
+    "Hello world!" <label> add-gadget
+    "Click me!" [ drop beep ]
+    <bevel-button> add-gadget
+    <editor> <scroller> add-gadget
+"UI test" open-window "> }
+    }
+    { $slide "Help system"
+        "Help markup is just literal data"
+        { "Look at the help for " { $link T{ link f + } } }
+        "These slides are built with the help system and a custom style sheet"
+        { $vocab-link "otug-talk" }
+    }
+    { $slide "The VM"
+        "Lowest level is the VM: ~12,000 lines of C"
+        "Generational garbage collection"
+        "Non-optimizing compiler"
+        "Loads an image file and runs it"
+        "Initial image generated from another Factor instance:"
+        { $code "\"x86.32\" make-image" }
+    }
+    { $slide "The core library"
+        "Core library, ~9,000 lines of Factor"
+        "Source parser, arrays, strings, math, hashtables, basic I/O, ..."
+        "Packaged into boot image because VM doesn't have a parser"
+    }
+    { $slide "The basis library"
+        "Basis library, ~80,000 lines of Factor"
+        "Bootstrap process loads code from basis, runs compiler, saves image"
+        "Loaded by default: optimizing compiler, tools, help system, UI, ..."
+        "Optional: HTTP server, XML, database access, ..."
+    }
+    { $slide "Non-optimizing compiler"
+        "Glues together chunks of machine code"
+        "Most words compiled as calls, some inlined"
+        "Used for listener interactions, and bootstrap"
+    }
+    { $slide "Optimizing compiler"
+        "Converts Factor code into high-level SSA form"
+        "Performs global optimizations"
+        "Converts high-level SSA into low-level SSA"
+        "Performs local optimizations"
+        "Register allocation"
+        "Machine code generation: x86, x86-64, PowerPC"
+    }
+    { $slide "Optimizing compiler"
+        "Makes high-level language features cheap to use"
+        "Eliminate redundant method dispatch by inferring types"
+        "Eliminate redundant integer overflow checks by inferring ranges"
+    }
+    { $slide "Optimizing compiler"
+        "Eliminate redundant memory allocation (escape analysis)"
+        "Eliminate redundant loads/stores (alias analysis)"
+        "Eliminate redundant computations (value numbering)"
+    }
+    { $slide "Project infrastructure"
+        { $url "http://factorcode.org" }
+        { $url "http://concatenative.org" }
+        { $url "http://docs.factorcode.org" }
+        { $url "http://planet.factorcode.org" }
+        "Uses our HTTP server, SSL, DB, Atom libraries..."
+    }
+    { $slide "Project infrastructure"
+        "Build farm, written in Factor"
+        "12 platforms"
+        "Builds Factor and all libraries, runs tests, makes binaries"
+        "Good for increasing stability"
+    }
+    { $slide "Community"
+        "#concatenative irc.freenode.net: 60-70 users"
+        "factor-talk@lists.sf.net: 189 subscribers"
+        "About 30 people have code in the Factor repository"
+        "Easy to get started: binaries, lots of docs, friendly community..."
+    }
+    { $slide "Selling points"
+        "Expressive language"
+        "Comprehensive library"
+        "Efficient implementation"
+        "Powerful interactive tools"
+        "Stand-alone application deployment"
+        "Moving fast"
+    }
+    { $slide "That's all, folks"
+        "It is hard to cover everything in a single talk"
+        "Factor has many cool things that I didn't talk about"
+        "Questions?"
+    }
+} ;
+
+: otug-talk ( -- ) otug-slides slides-window ;
+
+MAIN: otug-talk
diff --git a/extra/otug-talk/summary.txt b/extra/otug-talk/summary.txt
new file mode 100644 (file)
index 0000000..571a4c2
--- /dev/null
@@ -0,0 +1 @@
+Slides from a talk at OTUG by Slava Pestov, December 2008
diff --git a/extra/otug-talk/tags.txt b/extra/otug-talk/tags.txt
new file mode 100644 (file)
index 0000000..cb5fc20
--- /dev/null
@@ -0,0 +1 @@
+demos
diff --git a/extra/pack/authors.txt b/extra/pack/authors.txt
deleted file mode 100644 (file)
index 7c1b2f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/extra/pack/pack-tests.factor b/extra/pack/pack-tests.factor
deleted file mode 100755 (executable)
index b1a354c..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-USING: io io.streams.string kernel namespaces make
-pack strings tools.test ;
-
-[ B{ 1 0 2 0 0 3 0 0 0 4 0 0 0 0 0 0 0 5 } ] [
-    { 1 2 3 4 5 }
-    "cstiq" pack-be
-] unit-test
-
-[ { 1 2 3 4 5 } ] [
-    { 1 2 3 4 5 }
-    "cstiq" [ pack-be ] keep unpack-be
-] unit-test
-
-[ B{ 1 2 0 3 0 0 4 0 0 0 5 0 0 0 0 0 0 0 } ] [
-    [
-        { 1 2 3 4 5 } "cstiq" pack-le
-    ] with-scope
-] unit-test
-
-[ { 1 2 3 4 5 } ] [
-    { 1 2 3 4 5 }
-    "cstiq" [ pack-le ] keep unpack-le
-] unit-test
-
-[ { -1 -2 -3 -4 -5 } ] [
-    { -1 -2 -3 -4 -5 }
-    "cstiq" [ pack-le ] keep unpack-le
-] unit-test
-
-[ { -1 -2 -3 -4 -5 3.14 } ] [
-    { -1 -2 -3 -4 -5 3.14 }
-    "cstiqd" [ pack-be ] keep unpack-be
-] unit-test
-
-[ { -1 -2 -3 -4 -5 } ] [
-    { -1 -2 -3 -4 -5 }
-    "cstiq" [ pack-native ] keep unpack-native
-] unit-test
-
-[ 2 ] [
-    [ 2 "int" b, ] B{ } make
-    <string-reader> [ "int" read-native ] with-input-stream
-] unit-test
-
-[ "FRAM" ] [ "FRAM\0" [ read-c-string ] with-string-reader ] unit-test
-[ f ] [ "" [ read-c-string ] with-string-reader ] unit-test
-[ 5 ] [ "FRAM\0\u000005\0\0\0\0\0\0\0" [ read-c-string drop read-u64 ] with-string-reader ] unit-test
-
diff --git a/extra/pack/pack.factor b/extra/pack/pack.factor
deleted file mode 100755 (executable)
index 0e5cb7d..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-USING: alien alien.c-types arrays assocs byte-arrays io
-io.binary io.streams.string kernel math math.parser namespaces
-make parser prettyprint quotations sequences strings vectors
-words macros math.functions math.bitwise ;
-IN: pack
-
-SYMBOL: big-endian
-
-: big-endian? ( -- ? )
-    1 <int> *char zero? ;
-
-: >endian ( obj n -- str )
-    big-endian get [ >be ] [ >le ] if ; inline
-
-: endian> ( obj -- str )
-    big-endian get [ be> ] [ le> ] if ; inline
-
-GENERIC: b, ( n obj -- )
-M: integer b, ( m n -- ) >endian % ;
-
-! for doing native, platform-dependent sized values
-M: string b, ( n string -- ) heap-size b, ;
-: read-native ( string -- n ) heap-size read endian> ;
-
-! Portable
-: s8, ( n -- ) 1 b, ;
-: u8, ( n -- ) 1 b, ;
-: s16, ( n -- ) 2 b, ;
-: u16, ( n -- ) 2 b, ;
-: s24, ( n -- ) 3 b, ;
-: u24, ( n -- ) 3 b, ;
-: s32, ( n -- ) 4 b, ;
-: u32, ( n -- ) 4 b, ;
-: s64, ( n -- ) 8 b, ;
-: u64, ( n -- ) 8 b, ;
-: s128, ( n -- ) 16 b, ;
-: u128, ( n -- ) 16 b, ;
-: float, ( n -- ) float>bits 4 b, ;
-: double, ( n -- ) double>bits 8 b, ;
-: c-string, ( str -- ) % 0 u8, ;
-
-: (>128-ber) ( n -- )
-    dup 0 > [
-        [ HEX: 7f bitand HEX: 80 bitor , ] keep -7 shift
-        (>128-ber)
-    ] [
-        drop
-    ] if ;
-
-: >128-ber ( n -- str )
-    [
-        [ HEX: 7f bitand , ] keep -7 shift
-        (>128-ber)
-    ] { } make reverse ;
-
-: >signed ( x n -- y )
-    2dup neg 1+ shift 1 = [ 2^ - ] [ drop ] if ;
-
-: read-signed ( n -- str )
-    dup read endian> swap 8 * >signed ;
-
-: read-unsigned ( n -- m ) read endian> ;
-
-: read-s8 ( -- n ) 1 read-signed ;
-: read-u8 ( -- n ) 1 read-unsigned ;
-: read-s16 ( -- n ) 2 read-signed ;
-: read-u16 ( -- n ) 2 read-unsigned ;
-: read-s24 ( -- n ) 3 read-signed ;
-: read-u24 ( -- n ) 3 read-unsigned ;
-: read-s32 ( -- n ) 4 read-signed ;
-: read-u32 ( -- n ) 4 read-unsigned ;
-: read-s64 ( -- n ) 8 read-signed ;
-: read-u64 ( -- n ) 8 read-signed ;
-: read-s128 ( -- n ) 16 read-signed ;
-: read-u128 ( -- n ) 16 read-unsigned ;
-
-: read-float ( -- n )
-    4 read endian> bits>float ;
-
-: read-double ( -- n )
-    8 read endian> bits>double ;
-
-: read-c-string ( -- str/f )
-    "\0" read-until [ drop f ] unless ;
-
-: read-c-string* ( n -- str/f )
-    read [ zero? ] trim-right [ f ] when-empty ;
-
-: (read-128-ber) ( n -- n )
-    read1
-    [ [ 7 shift ] [ 7 clear-bit ] bi* bitor ] keep
-    7 bit? [ (read-128-ber) ] when ;
-    
-: read-128-ber ( -- n )
-    0 (read-128-ber) ;
-
-: pack-table ( -- hash )
-    H{
-        { CHAR: c s8, }
-        { CHAR: C u8, }
-        { CHAR: s s16, }
-        { CHAR: S u16, }
-        { CHAR: t s24, }
-        { CHAR: T u24, }
-        { CHAR: i s32, }
-        { CHAR: I u32, }
-        { CHAR: q s64, }
-        { CHAR: Q u64, }
-        { CHAR: f float, }
-        { CHAR: F float, }
-        { CHAR: d double, }
-        { CHAR: D double, }
-    } ;
-
-: unpack-table ( -- hash )
-    H{
-        { CHAR: c read-s8 }
-        { CHAR: C read-u8 }
-        { CHAR: s read-s16 }
-        { CHAR: S read-u16 }
-        { CHAR: t read-s24 }
-        { CHAR: T read-u24 }
-        { CHAR: i read-s32 }
-        { CHAR: I read-u32 }
-        { CHAR: q read-s64 }
-        { CHAR: Q read-u64 }
-        { CHAR: f read-float }
-        { CHAR: F read-float }
-        { CHAR: d read-double }
-        { CHAR: D read-double }
-    } ;
-
-MACRO: (pack) ( seq str -- quot )
-    [
-        [
-            [
-                swap , pack-table at ,
-            ] 2each
-        ] [ ] make 1quotation %
-       [ B{ } make ] %
-    ] [ ] make ;
-
-: pack-native ( seq str -- seq )
-    [
-        big-endian? big-endian set (pack)
-    ] with-scope ;
-
-: pack-be ( seq str -- seq )
-    [ big-endian on (pack) ] with-scope ;
-
-: pack-le ( seq str -- seq )
-    [ big-endian off (pack) ] with-scope ;
-
-
-MACRO: (unpack) ( str -- quot )
-    [
-        [
-            [ unpack-table at , \ , , ] each
-        ] [ ] make
-        1quotation [ { } make ] append
-        1quotation %
-        \ with-string-reader ,
-    ] [ ] make ;
-
-: unpack-native ( seq str -- seq )
-    [
-        big-endian? big-endian set (unpack)
-    ] with-scope ;
-
-: unpack-be ( seq str -- seq )
-    [ big-endian on (unpack) ] with-scope ;
-
-: unpack-le ( seq str -- seq )
-    [ big-endian off (unpack) ] with-scope ;
index 0ee91bc326bbfb325c61ef8b6c234a4e712d22c0..69f7a3bb921c9226db30cc5d4106dbbaf2d4241f 100755 (executable)
@@ -43,11 +43,11 @@ C: <parse-result> parse-result
     2over shorter? [
         3drop f
     ] [
-        >r [ length head-slice ] keep r> string=
+        [ [ length head-slice ] keep ] dip string=
     ] if ;
 
 : ?string-head ( str head ignore-case -- newstr ? )
-    >r 2dup r> string-head?
+    [ 2dup ] dip string-head?
     [ length tail-slice t ] [ drop f ] if ;
 
 TUPLE: token-parser string ignore-case? ;
@@ -60,7 +60,7 @@ C: <token-parser> token-parser
 
 M: token-parser parse ( input parser -- list )
     [ string>> ] [ ignore-case?>> ] bi
-    >r tuck r> ?string-head
+    [ tuck ] dip ?string-head
     [ <parse-results> ] [ 2drop nil ] if ;
 
 : 1token ( n -- parser ) 1string token ;
@@ -76,7 +76,7 @@ M: satisfy-parser parse ( input parser -- list )
     over empty? [
         2drop nil
     ] [
-        quot>> >r unclip-slice dup r> call
+        quot>> [ unclip-slice dup ] dip call
         [ swap <parse-results> ] [ 2drop nil ] if
     ] if ;
 
@@ -134,7 +134,7 @@ TUPLE: and-parser parsers ;
 
 : <&> ( parser1 parser2 -- parser )
     over and-parser? [
-        >r parsers>> r> suffix
+        [ parsers>> ] dip suffix
     ] [
         2array
     ] if and-parser boa ;
@@ -146,7 +146,7 @@ TUPLE: and-parser parsers ;
     swap [
         dup unparsed>> rot parse
         [
-            >r parsed>> r>
+            [ parsed>> ] dip
             [ parsed>> 2array ] keep
             unparsed>> <parse-result>
         ] lazy-map-with
@@ -191,7 +191,7 @@ C: sp sp-parser ( p1 -- parser )
 M: sp-parser parse ( input parser -- list )
     #! Skip all leading whitespace from the input then call
     #! the parser on the remaining input.
-    >r trim-left-slice r> p1>> parse ;
+    [ trim-left-slice ] dip p1>> parse ;
 
 TUPLE: just-parser p1 ;
 
@@ -346,4 +346,4 @@ LAZY: surrounded-by ( parser start end -- parser' )
     dupd exactly-n swap <*> <&> ;
 
 : from-m-to-n ( parser m n -- parser' )
-    >r [ exactly-n ] 2keep r> swap - at-most-n <:&:> ;
+    [ [ exactly-n ] 2keep ] dip swap - at-most-n <:&:> ;
index 7c23dcce0b2e31eecee52595e3e82967f8b52ca2..1c94308e936b924b8007ef44573463bdee7ea135 100755 (executable)
@@ -2,7 +2,7 @@ USING: arrays combinators kernel lists math math.parser
 namespaces parser lexer parser-combinators
 parser-combinators.simple promises quotations sequences strings
 math.order assocs prettyprint.backend prettyprint.custom memoize
-unicode.case unicode.categories combinators.short-circuit
+ascii unicode.categories combinators.short-circuit
 accessors make io ;
 IN: parser-combinators.regexp
 
@@ -17,7 +17,7 @@ SYMBOL: ignore-case?
 
 : char-between?-quot ( ch1 ch2 -- quot )
     ignore-case? get
-    [ [ ch>upper ] bi@ [ >r >r ch>upper r> r> between? ] ]
+    [ [ ch>upper ] bi@ [ [ ch>upper ] 2dip between? ] ]
     [ [ between? ] ]
     if 2curry ;
 
@@ -79,7 +79,7 @@ PRIVATE>
     [ hex> ] <@ ;
 
 : satisfy-tokens ( assoc -- parser )
-    [ >r token r> <@literal ] { } assoc>map <or-parser> ;
+    [ [ token ] dip <@literal ] { } assoc>map <or-parser> ;
 
 : 'simple-escape-char' ( -- parser )
     {
@@ -270,7 +270,7 @@ TUPLE: regexp source parser ignore-case? ;
     ] keep regexp boa ;
 
 : do-ignore-case ( string regexp -- string regexp )
-    dup ignore-case?>> [ >r >upper r> ] when ;
+    dup ignore-case?>> [ [ >upper ] dip ] when ;
 
 : matches? ( string regexp -- ? )
     do-ignore-case parser>> just parse nil? not ;
index a70109347bdbc6295e76ff3b884d5d75556f71f8..ef155651725d19ef60ab52c098d34d3bc502ee70 100644 (file)
@@ -12,9 +12,9 @@ HELP: bshift
 { $notes "It is important to note that even if the quotation discards items on the stack, the stack will be restored to the way it was before it is called (which is true of continuation usage in general)." } ;
 
 ARTICLE: "partial-continuations" "Partial continuations"
-"Based on Scheme code for bshift and breset from"
+"Based on Scheme code for bshift and breset from "
 { $url "http://groups.google.com/group/comp.lang.scheme/msg/9f0d61da01540816" } "."
-"See this blog entry for more details:"
+" See this blog entry for more details:"
 { $url "http://www.bluishcoder.co.nz/2006/03/factor-partial-continuation-updates.html" }
 { $subsection breset }
 { $subsection bshift } ;
index b80e3a9ddbb499fce1ab8ad629504e27c2ef8f85..7ec294ca2e9137d5364b774c41481725374c878f 100755 (executable)
@@ -7,16 +7,16 @@ USING: kernel continuations arrays sequences quotations ;
     [ 1array swap keep first continue-with ] callcc1 nip ;
 
 : (bshift) ( v r k -- obj )
-    >r dup first -rot r>
+    [ dup first -rot ] dip
     [
         rot set-first
         continue-with
     ] callcc1
-    >r drop nip set-first r> ;
+    [ drop nip set-first ] dip ;
 
 : bshift ( r quot -- )
     swap [ ! quot r k
-        over >r
-        [ (bshift) ] 2curry swap call
-        r> first continue-with
+        over [
+            [ (bshift) ] 2curry swap call
+        ] dip first continue-with
     ] callcc1 2nip ; inline
diff --git a/extra/porter-stemmer/authors.txt b/extra/porter-stemmer/authors.txt
deleted file mode 100644 (file)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/extra/porter-stemmer/porter-stemmer-docs.factor b/extra/porter-stemmer/porter-stemmer-docs.factor
deleted file mode 100644 (file)
index e16190f..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-IN: porter-stemmer
-USING: help.markup help.syntax ;
-
-HELP: step1a
-{ $values { "str" "a string" } { "newstr" "a new string" } }
-{ $description "Gets rid of plurals." }
-{ $examples
-    { $table
-        { "Input:" "Output:" }
-        { "caresses" "caress" }
-        { "ponies" "poni" }
-        { "ties" "ti" }
-        { "caress" "caress" }
-        { "cats" "cat" }
-    }
-} ;
-
-HELP: step1b
-{ $values { "str" "a string" } { "newstr" "a new string" } }
-{ $description "Gets rid of \"-ed\" and \"-ing\" suffixes." }
-{ $examples
-    { $table
-        { "Input:" "Output:" }
-        { "feed"  "feed" }
-        { "agreed"  "agree" }
-        { "disabled"  "disable" }
-        { "matting"  "mat" }
-        { "mating"  "mate" }
-        { "meeting"  "meet" }
-        { "milling"  "mill" }
-        { "messing"  "mess" }
-        { "meetings"  "meet" }
-    }
-} ;
-
-HELP: step1c
-{ $values { "str" "a string" } { "newstr" "a new string" } }
-{ $description "Turns a terminal y to i when there is another vowel in the stem." } ;
-
-HELP: step2
-{ $values { "str" "a string" } { "newstr" "a new string" } }
-{ $description "Maps double suffices to single ones. so -ization maps to -ize etc. note that the string before the suffix must give positive " { $link consonant-seq } "." } ;
-
-HELP: step3
-{ $values { "str" "a string" } { "newstr" "a new string" } }
-{ $description "Deals with -c-, -full, -ness, etc. Similar strategy to " { $link step2 } "." } ;
-
-HELP: step5
-{ $values { "str" "a string" } { "newstr" "a new string" } }
-{ $description "Removes a final -e and changes a final -ll to -l if " { $link consonant-seq } " is greater than 1," } ;
-
-HELP: stem
-{ $values { "str" "a string" } { "newstr" "a new string" } }
-{ $description "Applies the Porter stemming algorithm to the input string." } ;
-
-ARTICLE: "porter-stemmer" "Porter stemming algorithm"
-"The help system uses the Porter stemming algorithm to normalize words when building the full-text search index."
-$nl
-"The Factor implementation of the algorithm is based on the Common Lisp version, which was hand-translated from ANSI C by Steven M. Haflich. The original ANSI C was written by Martin Porter."
-$nl
-"A detailed description of the algorithm, along with implementations in various languages, can be at in " { $url "http://www.tartarus.org/~martin/PorterStemmer" } "."
-$nl
-"The main word of the algorithm takes an English word as input and outputs its stem:"
-{ $subsection stem }
-"The algorithm consists of a number of steps:"
-{ $subsection step1a }
-{ $subsection step1b }
-{ $subsection step1c }
-{ $subsection step2 }
-{ $subsection step3 }
-{ $subsection step4 }
-{ $subsection step5 } ;
-
-ABOUT: "porter-stemmer"
diff --git a/extra/porter-stemmer/porter-stemmer-tests.factor b/extra/porter-stemmer/porter-stemmer-tests.factor
deleted file mode 100644 (file)
index 42c3586..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-IN: porter-stemmer.tests
-USING: arrays io kernel porter-stemmer sequences tools.test
-io.files io.encodings.utf8 ;
-
-[ 0 ] [ "xa" consonant-seq ] unit-test
-[ 0 ] [ "xxaa" consonant-seq ] unit-test
-[ 1 ] [ "xaxa" consonant-seq ] unit-test
-[ 2 ] [ "xaxaxa" consonant-seq ] unit-test
-[ 3 ] [ "xaxaxaxa" consonant-seq ] unit-test
-[ 3 ] [ "zzzzxaxaxaxaeee" consonant-seq ] unit-test
-
-[ t ] [ 0 "fish" consonant? ] unit-test
-[ f ] [ 0 "and" consonant? ] unit-test
-[ t ] [ 0 "yes" consonant? ] unit-test
-[ f ] [ 1 "gym" consonant? ] unit-test
-
-[ t ] [ 5 "splitting" double-consonant? ] unit-test
-[ f ] [ 2 "feel" double-consonant? ] unit-test
-
-[ f ] [ "xxxz" stem-vowel? ] unit-test
-[ t ] [ "baobab" stem-vowel? ] unit-test
-
-[ t ] [ "hop" cvc? ] unit-test
-[ t ] [ "cav" cvc? ] unit-test
-[ t ] [ "lov" cvc? ] unit-test
-[ t ] [ "crim" cvc? ] unit-test
-[ f ] [ "show" cvc? ] unit-test
-[ f ] [ "box" cvc? ] unit-test
-[ f ] [ "tray" cvc? ] unit-test
-[ f ] [ "meet" cvc? ] unit-test
-
-[ "caress" ] [ "caresses" step1a step1b "" like ] unit-test
-[ "poni" ] [ "ponies" step1a step1b "" like ] unit-test
-[ "ti" ] [ "ties" step1a step1b "" like ] unit-test
-[ "caress" ] [ "caress" step1a step1b "" like ] unit-test
-[ "cat" ] [ "cats" step1a step1b "" like ] unit-test
-[ "feed" ] [ "feed" step1a step1b "" like ] unit-test
-[ "agree" ] [ "agreed" step1a step1b "" like ] unit-test
-[ "disable" ] [ "disabled" step1a step1b "" like ] unit-test
-[ "mat" ] [ "matting" step1a step1b "" like ] unit-test
-[ "mate" ] [ "mating" step1a step1b "" like ] unit-test
-[ "meet" ] [ "meeting" step1a step1b "" like ] unit-test
-[ "mill" ] [ "milling" step1a step1b "" like ] unit-test
-[ "mess" ] [ "messing" step1a step1b "" like ] unit-test
-[ "meet" ] [ "meetings" step1a step1b "" like ] unit-test
-
-[ "fishi" ] [ "fishy" step1c ] unit-test
-[ "by" ] [ "by" step1c ] unit-test
-
-[ "realizat" ] [ "realization" step4 ] unit-test
-[ "ion" ] [ "ion" step4 ] unit-test
-[ "able" ] [ "able" step4 ] unit-test
-
-[ "fear" ] [ "feare" step5 "" like ] unit-test
-[ "mate" ] [ "mate" step5 "" like ] unit-test
-[ "hell" ] [ "hell" step5 "" like ] unit-test
-[ "mate" ] [ "mate" step5 "" like ] unit-test
-
-[ { } ] [
-    "resource:extra/porter-stemmer/test/voc.txt" utf8 file-lines
-    [ stem ] map
-    "resource:extra/porter-stemmer/test/output.txt" utf8 file-lines
-    [ 2array ] 2map [ first2 = not ] filter
-] unit-test
diff --git a/extra/porter-stemmer/porter-stemmer.factor b/extra/porter-stemmer/porter-stemmer.factor
deleted file mode 100644 (file)
index 7ae273f..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-IN: porter-stemmer
-USING: kernel math parser sequences combinators splitting ;
-
-: consonant? ( i str -- ? )
-    2dup nth dup "aeiou" member? [
-        3drop f
-    ] [
-        CHAR: y = [
-            over zero?
-            [ 2drop t ] [ >r 1- r> consonant? not ] if
-        ] [
-            2drop t
-        ] if
-    ] if ;
-
-: skip-vowels ( i str -- i str )
-    2dup bounds-check? [
-        2dup consonant? [ >r 1+ r> skip-vowels ] unless
-    ] when ;
-
-: skip-consonants ( i str -- i str )
-    2dup bounds-check? [
-        2dup consonant? [ >r 1+ r> skip-consonants ] when
-    ] when ;
-
-: (consonant-seq) ( n i str -- n )
-    skip-vowels
-    2dup bounds-check? [
-        >r 1+ >r 1+ r> r> skip-consonants >r 1+ r>
-        (consonant-seq)
-    ] [
-        2drop
-    ] if ;
-
-: consonant-seq ( str -- n )
-    0 0 rot skip-consonants (consonant-seq) ;
-
-: stem-vowel? ( str -- ? )
-    [ length ] keep [ consonant? ] curry all? not ;
-
-: double-consonant? ( i str -- ? )
-    over 1 < [
-        2drop f
-    ] [
-        2dup nth >r over 1- over nth r> = [
-            consonant?
-        ] [
-            2drop f
-        ] if
-    ] if ;
-
-: consonant-end? ( n seq -- ? )
-    [ length swap - ] keep consonant? ;
-
-: last-is? ( str possibilities -- ? ) >r peek r> member? ;
-
-: cvc? ( str -- ? )
-    {
-        { [ dup length 3 < ] [ drop f ] }
-        { [ 1 over consonant-end? not ] [ drop f ] }
-        { [ 2 over consonant-end? ] [ drop f ] }
-        { [ 3 over consonant-end? not ] [ drop f ] }
-        [ "wxy" last-is? not ]
-    } cond ;
-
-: r ( str oldsuffix newsuffix -- str )
-    pick consonant-seq 0 > [ nip ] [ drop ] if append ;
-
-: step1a ( str -- newstr )
-    dup peek CHAR: s = [
-        {
-            { [ "sses" ?tail ] [ "ss" append ] }
-            { [ "ies" ?tail ] [ "i" append ] }
-            { [ dup "ss" tail? ] [ ] }
-            { [ "s" ?tail ] [ ] }
-            [ ]
-        } cond
-    ] when ;
-
-: -eed ( str -- str )
-    dup consonant-seq 0 > "ee" "eed" ? append ;
-
-: -ed ( str -- str ? )
-    dup stem-vowel? [ [ "ed" append ] unless ] keep ;
-
-: -ing ( str -- str ? )
-    dup stem-vowel? [ [ "ing" append ] unless ] keep ;
-
-: -ed/ing ( str -- str )
-    {
-        { [ "at" ?tail ] [ "ate" append ] }
-        { [ "bl" ?tail ] [ "ble" append ] }
-        { [ "iz" ?tail ] [ "ize" append ] }
-        {
-            [ dup length 1- over double-consonant? ]
-            [ dup "lsz" last-is? [ but-last-slice ] unless ]
-        }
-        {
-            [ t ]
-            [
-                dup consonant-seq 1 = over cvc? and
-                [ "e" append ] when
-            ]
-        }
-    } cond ;
-
-: step1b ( str -- newstr )
-    {
-        { [ "eed" ?tail ] [ -eed ] }
-        {
-            [
-                {
-                    { [ "ed" ?tail ] [ -ed ] }
-                    { [ "ing" ?tail ] [ -ing ] }
-                    [ f ]
-                } cond
-            ] [ -ed/ing ]
-        }
-        [ ]
-    } cond ;
-
-: step1c ( str -- newstr )
-    dup but-last-slice stem-vowel? [
-        "y" ?tail [ "i" append ] when
-    ] when ;
-
-: step2 ( str -- newstr )
-    {
-        { [ "ational" ?tail ] [ "ational" "ate"  r ] }
-        { [ "tional"  ?tail ] [ "tional"  "tion" r ] }
-        { [ "enci"    ?tail ] [ "enci"    "ence" r ] }
-        { [ "anci"    ?tail ] [ "anci"    "ance" r ] }
-        { [ "izer"    ?tail ] [ "izer"    "ize"  r ] }
-        { [ "bli"     ?tail ] [ "bli"     "ble"  r ] }
-        { [ "alli"    ?tail ] [ "alli"    "al"   r ] }
-        { [ "entli"   ?tail ] [ "entli"   "ent"  r ] }
-        { [ "eli"     ?tail ] [ "eli"     "e"    r ] }
-        { [ "ousli"   ?tail ] [ "ousli"   "ous"  r ] }
-        { [ "ization" ?tail ] [ "ization" "ize"  r ] }
-        { [ "ation"   ?tail ] [ "ation"   "ate"  r ] }
-        { [ "ator"    ?tail ] [ "ator"    "ate"  r ] }
-        { [ "alism"   ?tail ] [ "alism"   "al"   r ] }
-        { [ "iveness" ?tail ] [ "iveness" "ive"  r ] }
-        { [ "fulness" ?tail ] [ "fulness" "ful"  r ] }
-        { [ "ousness" ?tail ] [ "ousness" "ous"  r ] }
-        { [ "aliti"   ?tail ] [ "aliti"   "al"   r ] }
-        { [ "iviti"   ?tail ] [ "iviti"   "ive"  r ] }
-        { [ "biliti"  ?tail ] [ "biliti"  "ble"  r ] }
-        { [ "logi"    ?tail ] [ "logi"    "log"  r ] }
-        [ ]
-    } cond ;
-
-: step3 ( str -- newstr )
-    {
-        { [ "icate" ?tail ] [ "icate" "ic" r ] }
-        { [ "ative" ?tail ] [ "ative" ""   r ] }
-        { [ "alize" ?tail ] [ "alize" "al" r ] }
-        { [ "iciti" ?tail ] [ "iciti" "ic" r ] }
-        { [ "ical"  ?tail ] [ "ical"  "ic" r ] }
-        { [ "ful"   ?tail ] [ "ful"   ""   r ] }
-        { [ "ness"  ?tail ] [ "ness"  ""   r ] }
-        [ ]
-    } cond ;
-
-: -ion ( str -- newstr )
-    [
-        "ion"
-    ] [
-        dup "st" last-is? [ "ion" append ] unless
-    ] if-empty ;
-
-: step4 ( str -- newstr )
-    dup {
-        { [ "al"    ?tail ] [ ] }
-        { [ "ance"  ?tail ] [ ] }
-        { [ "ence"  ?tail ] [ ] }
-        { [ "er"    ?tail ] [ ] }
-        { [ "ic"    ?tail ] [ ] }
-        { [ "able"  ?tail ] [ ] }
-        { [ "ible"  ?tail ] [ ] }
-        { [ "ant"   ?tail ] [ ] }
-        { [ "ement" ?tail ] [ ] }
-        { [ "ment"  ?tail ] [ ] }
-        { [ "ent"   ?tail ] [ ] }
-        { [ "ion"   ?tail ] [ -ion ] }
-        { [ "ou"    ?tail ] [ ] }
-        { [ "ism"   ?tail ] [ ] }
-        { [ "ate"   ?tail ] [ ] }
-        { [ "iti"   ?tail ] [ ] }
-        { [ "ous"   ?tail ] [ ] }
-        { [ "ive"   ?tail ] [ ] }
-        { [ "ize"   ?tail ] [ ] }
-        [ ]
-    } cond dup consonant-seq 1 > [ nip ] [ drop ] if ;
-
-: remove-e? ( str -- ? )
-    dup consonant-seq dup 1 >
-    [ 2drop t ]
-    [ 1 = [ but-last-slice cvc? not ] [ drop f ] if ] if ;
-
-: remove-e ( str -- newstr )
-    dup peek CHAR: e = [
-        dup remove-e? [ but-last-slice ] when
-    ] when ;
-
-: ll->l ( str -- newstr )
-    {
-        { [ dup peek CHAR: l = not ] [ ] }
-        { [ dup length 1- over double-consonant? not ] [ ] }
-        { [ dup consonant-seq 1 > ] [ but-last-slice ] }
-        [ ]
-    } cond ;
-
-: step5 ( str -- newstr ) remove-e ll->l ;
-
-: stem ( str -- newstr )
-    dup length 2 <= [
-        step1a step1b step1c step2 step3 step4 step5 "" like
-    ] unless ;
diff --git a/extra/porter-stemmer/summary.txt b/extra/porter-stemmer/summary.txt
deleted file mode 100644 (file)
index dd7746b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Porter stemming algorithm
diff --git a/extra/porter-stemmer/test/output.txt b/extra/porter-stemmer/test/output.txt
deleted file mode 100644 (file)
index 595cb67..0000000
+++ /dev/null
@@ -1,23531 +0,0 @@
-a
-aaron
-abaissiez
-abandon
-abandon
-abas
-abash
-abat
-abat
-abat
-abat
-abat
-abbess
-abbei
-abbei
-abbomin
-abbot
-abbot
-abbrevi
-ab
-abel
-aberga
-abergavenni
-abet
-abet
-abhomin
-abhor
-abhorr
-abhor
-abhor
-abhor
-abhorson
-abid
-abid
-abil
-abil
-abject
-abjectli
-abject
-abjur
-abjur
-abl
-abler
-aboard
-abod
-abod
-abod
-abod
-abomin
-abomin
-abomin
-abort
-abort
-abound
-abound
-about
-abov
-abr
-abraham
-abram
-abreast
-abridg
-abridg
-abridg
-abridg
-abroach
-abroad
-abrog
-abrook
-abrupt
-abrupt
-abruptli
-absenc
-absent
-absei
-absolut
-absolut
-absolv
-absolv
-abstain
-abstemi
-abstin
-abstract
-absurd
-absyrtu
-abund
-abund
-abundantli
-abu
-abus
-abus
-abus
-abus
-abus
-abut
-abi
-abysm
-ac
-academ
-academ
-accent
-accent
-accept
-accept
-accept
-accept
-accept
-access
-accessari
-access
-accid
-accid
-accident
-accident
-accid
-accit
-accit
-accit
-acclam
-accommod
-accommod
-accommod
-accommod
-accommodo
-accompani
-accompani
-accompani
-accomplic
-accomplish
-accomplish
-accomplish
-accomplish
-accompt
-accord
-accord
-accord
-accordeth
-accord
-accordingli
-accord
-accost
-accost
-account
-account
-account
-account
-accoutr
-accoutr
-accoutr
-accru
-accumul
-accumul
-accumul
-accur
-accurs
-accurst
-accu
-accus
-accus
-accus
-accusativo
-accus
-accus
-accus
-accus
-accus
-accuseth
-accus
-accustom
-accustom
-ac
-acerb
-ach
-acheron
-ach
-achiev
-achiev
-achiev
-achiev
-achiev
-achiev
-achiev
-achiev
-achil
-ach
-achitophel
-acknowledg
-acknowledg
-acknowledg
-acknowledg
-acknown
-acold
-aconitum
-acordo
-acorn
-acquaint
-acquaint
-acquaint
-acquaint
-acquir
-acquir
-acquisit
-acquit
-acquitt
-acquitt
-acquit
-acr
-acr
-across
-act
-actaeon
-act
-act
-action
-action
-actium
-activ
-activ
-activ
-actor
-actor
-act
-actual
-actur
-acut
-acut
-ad
-adag
-adalla
-adam
-adam
-add
-ad
-adder
-adder
-addeth
-addict
-addict
-addict
-ad
-addit
-addit
-addl
-address
-address
-addrest
-add
-adher
-adher
-adieu
-adieu
-adjac
-adjoin
-adjoin
-adjourn
-adjudg
-adjudg
-adjunct
-administ
-administr
-admir
-admir
-admir
-admir
-admir
-admir
-admir
-admir
-admiringli
-admiss
-admit
-admit
-admitt
-admit
-admit
-admonish
-admonish
-admonish
-admonish
-admonit
-ado
-adoni
-adopt
-adopt
-adoptedli
-adopt
-adopti
-adopt
-ador
-ador
-ador
-ador
-ador
-ador
-adorest
-adoreth
-ador
-adorn
-adorn
-adorn
-adorn
-adorn
-adown
-adramadio
-adrian
-adriana
-adriano
-adriat
-adsum
-adul
-adulter
-adulter
-adulter
-adulteress
-adulteri
-adulter
-adulteri
-adultress
-advanc
-advanc
-advanc
-advanc
-advanc
-advanc
-advanc
-advantag
-advantag
-advantag
-advantag
-advantag
-advantag
-advent
-adventur
-adventur
-adventur
-adventur
-adventur
-adventur
-adversari
-adversari
-advers
-advers
-advers
-advers
-adverti
-advertis
-advertis
-advertis
-advertis
-advic
-advi
-advis
-advis
-advisedli
-advis
-advis
-advoc
-advoc
-aeacida
-aeacid
-aedil
-aedil
-aegeon
-aegion
-aegl
-aemelia
-aemilia
-aemiliu
-aenea
-aeolu
-aer
-aerial
-aeri
-aesculapiu
-aeson
-aesop
-aetna
-afar
-afear
-afeard
-affabl
-affabl
-affair
-affair
-affair
-affect
-affect
-affect
-affect
-affectedli
-affecteth
-affect
-affect
-affection
-affection
-affect
-affect
-affeer
-affianc
-affianc
-affianc
-affi
-affin
-affin
-affin
-affirm
-affirm
-affirm
-afflict
-afflict
-afflict
-afflict
-afflict
-afford
-affordeth
-afford
-affrai
-affright
-affright
-affright
-affront
-affront
-affi
-afield
-afir
-afloat
-afoot
-afor
-aforehand
-aforesaid
-afraid
-afresh
-afric
-africa
-african
-afront
-after
-afternoon
-afterward
-afterward
-ag
-again
-against
-agamemmon
-agamemnon
-agat
-agaz
-ag
-ag
-agenor
-agent
-agent
-ag
-aggrav
-aggrief
-agil
-agincourt
-agit
-aglet
-agniz
-ago
-agon
-agoni
-agre
-agre
-agre
-agreement
-agre
-agrippa
-aground
-agu
-aguecheek
-agu
-aguefac
-agu
-ah
-aha
-ahungri
-ai
-aialvolio
-aiaria
-aid
-aidanc
-aidant
-aid
-aid
-aidless
-aid
-ail
-aim
-aim
-aimest
-aim
-aim
-ainsi
-aio
-air
-air
-airless
-air
-airi
-ajax
-akil
-al
-alabast
-alack
-alacr
-alarbu
-alarm
-alarm
-alarum
-alarum
-ala
-alb
-alban
-alban
-albani
-albeit
-albion
-alchemist
-alchemi
-alcibiad
-alcid
-alder
-alderman
-aldermen
-al
-alecto
-alehous
-alehous
-alencon
-alengon
-aleppo
-al
-alewif
-alexand
-alexand
-alexandria
-alexandrian
-alexa
-alia
-alic
-alien
-aliena
-alight
-alight
-alight
-alii
-alik
-alisand
-aliv
-all
-alla
-allai
-allai
-allai
-allay
-allay
-allai
-alleg
-alleg
-alleg
-alleg
-allegi
-allegi
-allei
-allei
-allhallowma
-allianc
-allicholi
-alli
-alli
-allig
-allig
-allon
-allot
-allot
-allot
-allotteri
-allow
-allow
-allow
-allow
-allow
-allur
-allur
-allur
-allur
-allus
-alli
-allycholli
-almain
-almanac
-almanack
-almanac
-almighti
-almond
-almost
-alm
-almsman
-alo
-aloft
-alon
-along
-alonso
-aloof
-aloud
-alphabet
-alphabet
-alphonso
-alp
-alreadi
-also
-alt
-altar
-altar
-alter
-alter
-alter
-alter
-althaea
-although
-altitud
-altogeth
-alton
-alwai
-alwai
-am
-amaimon
-amain
-amak
-amamon
-amaz
-amaz
-amaz
-amazedli
-amazed
-amaz
-amaz
-amazeth
-amaz
-amazon
-amazonian
-amazon
-ambassador
-ambassador
-amber
-ambiguid
-ambigu
-ambigu
-ambit
-ambit
-ambiti
-ambiti
-ambl
-ambl
-ambl
-ambl
-ambo
-ambuscado
-ambush
-amen
-amend
-amend
-amend
-amend
-amerc
-america
-am
-amiabl
-amid
-amidst
-amien
-ami
-amiss
-amiti
-amiti
-amnipot
-among
-amongst
-amor
-amor
-amort
-amount
-amount
-amour
-amphimacu
-ampl
-ampler
-amplest
-amplifi
-amplifi
-ampli
-ampthil
-amurath
-amynta
-an
-anatomiz
-anatom
-anatomi
-ancestor
-ancestor
-ancestri
-anchis
-anchor
-anchorag
-anchor
-anchor
-anchor
-anchovi
-ancient
-ancientri
-ancient
-ancu
-and
-andiron
-andpholu
-andren
-andrew
-andromach
-andronici
-andronicu
-anew
-ang
-angel
-angelica
-angel
-angelo
-angel
-anger
-angerli
-anger
-ang
-angier
-angl
-anglai
-angl
-angler
-angleterr
-anglia
-angl
-anglish
-angrili
-angri
-anguish
-angu
-anim
-anim
-animi
-anjou
-ankl
-anna
-annal
-ann
-annex
-annex
-annexion
-annex
-annothan
-announc
-annoi
-annoy
-annoi
-annual
-anoint
-anoint
-anon
-anoth
-anselmo
-answer
-answer
-answer
-answerest
-answer
-answer
-ant
-ant
-antenor
-antenorid
-anteroom
-anthem
-anthem
-anthoni
-anthropophagi
-anthropophaginian
-antiat
-antic
-anticip
-anticip
-anticipatest
-anticip
-anticip
-antick
-anticli
-antic
-antidot
-antidot
-antigonu
-antiopa
-antipathi
-antipholu
-antipholus
-antipod
-antiquari
-antiqu
-antiqu
-antium
-antoniad
-antonio
-antoniu
-antoni
-antr
-anvil
-ani
-anybodi
-anyon
-anyth
-anywher
-ap
-apac
-apart
-apart
-apart
-ap
-apemantu
-apennin
-ap
-apiec
-apish
-apollinem
-apollo
-apollodoru
-apolog
-apoplex
-apoplexi
-apostl
-apostl
-apostropha
-apoth
-apothecari
-appal
-appal
-appal
-appal
-apparel
-apparel
-apparel
-appar
-appar
-apparit
-apparit
-appeach
-appeal
-appeal
-appear
-appear
-appear
-appeareth
-appear
-appear
-appea
-appeas
-appeas
-appel
-appel
-appele
-appel
-appelez
-appel
-appel
-appelon
-appendix
-apperil
-appertain
-appertain
-appertain
-appertain
-appertin
-appertin
-appetit
-appetit
-applaud
-applaud
-applaud
-applaus
-applaus
-appl
-appl
-appletart
-applianc
-applianc
-applic
-appli
-appli
-appli
-appli
-appoint
-appoint
-appoint
-appoint
-appoint
-apprehend
-apprehend
-apprehend
-apprehens
-apprehens
-apprehens
-apprendr
-apprenn
-apprenticehood
-appri
-approach
-approach
-approach
-approacheth
-approach
-approb
-approof
-appropri
-approv
-approv
-approv
-approv
-approv
-appurten
-appurten
-apricock
-april
-apron
-apron
-apt
-apter
-aptest
-aptli
-apt
-aqua
-aquilon
-aquitain
-arabia
-arabian
-arais
-arbitr
-arbitr
-arbitr
-arbitr
-arbor
-arbour
-arc
-arch
-archbishop
-archbishopr
-archdeacon
-arch
-archelau
-archer
-archer
-archeri
-archibald
-archidamu
-architect
-arcu
-ard
-arden
-ardent
-ardour
-ar
-argal
-argier
-argo
-argosi
-argosi
-argu
-argu
-argu
-argu
-argu
-argument
-argument
-argu
-ariachn
-ariadn
-ariel
-ari
-aright
-arinado
-arini
-arion
-aris
-aris
-ariseth
-aris
-aristod
-aristotl
-arithmet
-arithmetician
-ark
-arm
-arma
-armado
-armado
-armagnac
-arm
-arm
-armenia
-armi
-armigero
-arm
-armipot
-armor
-armour
-armour
-armour
-armour
-armouri
-arm
-armi
-arn
-aroint
-aros
-arous
-arous
-arragon
-arraign
-arraign
-arraign
-arraign
-arrant
-arra
-arrai
-arrearag
-arrest
-arrest
-arrest
-arriv
-arriv
-arriv
-arriv
-arriv
-arriv
-arriv
-arrog
-arrog
-arrog
-arrow
-arrow
-art
-artemidoru
-arteri
-arthur
-articl
-articl
-articul
-artific
-artifici
-artilleri
-artir
-artist
-artist
-artless
-artoi
-art
-artu
-arviragu
-as
-asaph
-ascaniu
-ascend
-ascend
-ascendeth
-ascend
-ascens
-ascent
-ascrib
-ascrib
-ash
-asham
-asham
-asher
-ash
-ashford
-ashor
-ashout
-ashi
-asia
-asid
-ask
-askanc
-ask
-asker
-asketh
-ask
-ask
-aslant
-asleep
-asmath
-asp
-aspect
-aspect
-aspen
-aspers
-aspic
-aspici
-aspic
-aspir
-aspir
-aspir
-aspir
-asquint
-ass
-assail
-assail
-assail
-assail
-assail
-assaileth
-assail
-assail
-assassin
-assault
-assault
-assault
-assai
-assai
-assai
-assembl
-assembl
-assembl
-assembl
-assembl
-assent
-ass
-assez
-assign
-assign
-assign
-assinico
-assist
-assist
-assist
-assist
-assist
-assist
-assist
-associ
-associ
-associ
-assuag
-assubjug
-assum
-assum
-assum
-assumpt
-assur
-assur
-assur
-assur
-assuredli
-assur
-assyrian
-astonish
-astonish
-astraea
-astrai
-astrea
-astronom
-astronom
-astronom
-astronomi
-asund
-at
-atalanta
-at
-at
-athenian
-athenian
-athen
-athol
-athversari
-athwart
-atla
-atomi
-atomi
-aton
-aton
-aton
-atropo
-attach
-attach
-attach
-attain
-attaind
-attain
-attaint
-attaint
-attaintur
-attempt
-attempt
-attempt
-attempt
-attempt
-attend
-attend
-attend
-attend
-attend
-attend
-attendeth
-attend
-attend
-attent
-attent
-attent
-attentiven
-attest
-attest
-attir
-attir
-attir
-attir
-attornei
-attornei
-attornei
-attorneyship
-attract
-attract
-attract
-attract
-attribut
-attribut
-attribut
-attribut
-attribut
-atwain
-au
-aubrei
-auburn
-aucun
-audaci
-audaci
-audac
-audibl
-audienc
-audi
-audit
-auditor
-auditor
-auditori
-audr
-audrei
-aufidiu
-aufidius
-auger
-aught
-augment
-augment
-augment
-augment
-augur
-augur
-augur
-augur
-augur
-auguri
-august
-augustu
-auld
-aumerl
-aunchient
-aunt
-aunt
-auricular
-aurora
-auspici
-aussi
-auster
-auster
-auster
-auster
-austria
-aut
-authent
-author
-author
-author
-author
-author
-author
-autolycu
-autr
-autumn
-auvergn
-avail
-avail
-avaric
-avarici
-avaunt
-av
-aveng
-aveng
-aveng
-aver
-avert
-av
-avez
-avi
-avoid
-avoid
-avoid
-avoid
-avoirdupoi
-avouch
-avouch
-avouch
-avouch
-avow
-aw
-await
-await
-awak
-awak
-awak
-awaken
-awaken
-awaken
-awak
-awak
-award
-award
-awasi
-awai
-aw
-aweari
-aweless
-aw
-awhil
-awkward
-awl
-awoo
-awork
-awri
-ax
-axl
-axletre
-ay
-ay
-ayez
-ayli
-azur
-azur
-b
-ba
-baa
-babbl
-babbl
-babbl
-babe
-babe
-babi
-baboon
-baboon
-babi
-babylon
-bacar
-bacchan
-bacchu
-bach
-bachelor
-bachelor
-back
-backbit
-backbitten
-back
-back
-backward
-backwardli
-backward
-bacon
-bacon
-bad
-bade
-badg
-badg
-badg
-badli
-bad
-bae
-baffl
-baffl
-baffl
-bag
-baggag
-bagot
-bagpip
-bag
-bail
-bailiff
-baillez
-baili
-baisant
-baise
-baiser
-bait
-bait
-bait
-bait
-bait
-bajazet
-bak
-bake
-bake
-baker
-baker
-bake
-bake
-bal
-balanc
-balanc
-balconi
-bald
-baldrick
-bale
-bale
-balk
-ball
-ballad
-ballad
-ballast
-ballast
-ballet
-ballow
-ball
-balm
-balm
-balmi
-balsam
-balsamum
-balth
-balthasar
-balthazar
-bame
-ban
-banburi
-band
-bandi
-band
-bandit
-banditti
-banditto
-band
-bandi
-bandi
-bane
-bane
-bang
-bangor
-banish
-banish
-banish
-banish
-banist
-bank
-bankrout
-bankrupt
-bankrupt
-bank
-banner
-banneret
-banner
-ban
-bann
-banquet
-banquet
-banquet
-banquet
-banquo
-ban
-baptism
-baptista
-baptiz
-bar
-barbarian
-barbarian
-barbar
-barbar
-barbari
-barbason
-barb
-barber
-barbermong
-bard
-bardolph
-bard
-bare
-bare
-barefac
-barefac
-barefoot
-barehead
-bare
-bare
-bar
-bargain
-bargain
-barg
-bargulu
-bare
-bark
-bark
-barkloughli
-bark
-barki
-barlei
-barm
-barn
-barnacl
-barnardin
-barn
-barn
-barnet
-barn
-baron
-baron
-baroni
-barr
-barraba
-barrel
-barrel
-barren
-barrenli
-barren
-barricado
-barricado
-barrow
-bar
-barson
-barter
-bartholomew
-ba
-basan
-base
-baseless
-base
-base
-baser
-base
-basest
-bash
-bash
-basilisco
-basilisk
-basilisk
-basimecu
-basin
-basingstok
-basin
-basi
-bask
-basket
-basket
-bass
-bassanio
-basset
-bassianu
-basta
-bastard
-bastard
-bastardli
-bastard
-bastardi
-bast
-bast
-bastinado
-bast
-bat
-batail
-batch
-bate
-bate
-bate
-bath
-bath
-bath
-bath
-bath
-bate
-batler
-bat
-batt
-battalia
-battalion
-batten
-batter
-batter
-batter
-batteri
-battl
-battl
-battlefield
-battlement
-battl
-batti
-baubl
-baubl
-baubl
-baulk
-bavin
-bawcock
-bawd
-bawdri
-bawd
-bawdi
-bawl
-bawl
-bai
-bai
-baynard
-bayonn
-bai
-be
-beach
-beach
-beachi
-beacon
-bead
-bead
-beadl
-beadl
-bead
-beadsmen
-beagl
-beagl
-beak
-beak
-beam
-beam
-beam
-bean
-bean
-bear
-beard
-beard
-beardless
-beard
-bearer
-bearer
-bearest
-beareth
-bear
-bear
-beast
-beastliest
-beastli
-beastli
-beast
-beat
-beat
-beaten
-beat
-beatric
-beat
-beau
-beaufort
-beaumond
-beaumont
-beauteou
-beauti
-beauti
-beautifi
-beauti
-beautifi
-beauti
-beaver
-beaver
-becam
-becaus
-bechanc
-bechanc
-bechanc
-beck
-beckon
-beckon
-beck
-becom
-becom
-becom
-becom
-becom
-becom
-bed
-bedabbl
-bedash
-bedaub
-bedazzl
-bedchamb
-bedcloth
-bed
-bedeck
-bedeck
-bedew
-bedfellow
-bedfellow
-bedford
-bedlam
-bedrench
-bedrid
-bed
-bedtim
-bedward
-bee
-beef
-beef
-beehiv
-been
-beer
-bee
-beest
-beetl
-beetl
-beev
-befal
-befallen
-befal
-befel
-befit
-befit
-befit
-befor
-befor
-beforehand
-befortun
-befriend
-befriend
-befriend
-beg
-began
-beget
-beget
-beget
-begg
-beggar
-beggar
-beggarli
-beggarman
-beggar
-beggari
-beg
-begin
-beginn
-begin
-begin
-begin
-begnawn
-begon
-begot
-begotten
-begrim
-beg
-beguil
-beguil
-beguil
-beguil
-beguil
-begun
-behalf
-behalf
-behav
-behav
-behavedst
-behavior
-behavior
-behaviour
-behaviour
-behead
-behead
-beheld
-behest
-behest
-behind
-behold
-behold
-behold
-beholdest
-behold
-behold
-behoof
-behoofful
-behoov
-behov
-behov
-behowl
-be
-bel
-belariu
-belch
-belch
-beldam
-beldam
-beldam
-bele
-belgia
-beli
-beli
-belief
-beliest
-believ
-believ
-believ
-believ
-believest
-believ
-belik
-bell
-bellario
-bell
-belli
-belli
-bellman
-bellona
-bellow
-bellow
-bellow
-bellow
-bell
-belli
-belly
-belman
-belmont
-belock
-belong
-belong
-belong
-belong
-belov
-belov
-belov
-below
-belt
-belzebub
-bemad
-bemet
-bemet
-bemoan
-bemoan
-bemock
-bemoil
-bemonst
-ben
-bench
-bencher
-bench
-bend
-bend
-bend
-bend
-bene
-beneath
-benedicit
-benedick
-benedict
-benedictu
-benefactor
-benefic
-benefici
-benefit
-benefit
-benefit
-benet
-benevol
-benevol
-beni
-benison
-bennet
-bent
-bentii
-bentivolii
-bent
-benumb
-benvolio
-bepaint
-beprai
-bequeath
-bequeath
-bequeath
-bequest
-ber
-berard
-berattl
-berai
-bere
-bereav
-bereav
-bereav
-bereft
-bergamo
-bergomask
-berhym
-berhym
-berkelei
-bermooth
-bernardo
-berod
-berown
-berri
-berri
-berrord
-berri
-bertram
-berwick
-bescreen
-beseech
-beseech
-beseech
-beseech
-beseek
-beseem
-beseemeth
-beseem
-beseem
-beset
-beshrew
-besid
-besid
-besieg
-besieg
-besieg
-beslubb
-besmear
-besmear
-besmirch
-besom
-besort
-besot
-bespak
-bespeak
-bespic
-bespok
-bespot
-bess
-bessi
-best
-bestain
-best
-bestial
-bestir
-bestirr
-bestow
-bestow
-bestow
-bestow
-bestraught
-bestrew
-bestrid
-bestrid
-bestrid
-bet
-betak
-beteem
-bethink
-bethought
-bethroth
-bethump
-betid
-betid
-betideth
-betim
-betim
-betoken
-betook
-betoss
-betrai
-betrai
-betrai
-betrai
-betrim
-betroth
-betroth
-betroth
-bett
-bet
-better
-better
-better
-better
-bet
-bettr
-between
-betwixt
-bevel
-beverag
-bevi
-bevi
-bewail
-bewail
-bewail
-bewail
-bewar
-bewast
-beweep
-bewept
-bewet
-bewhor
-bewitch
-bewitch
-bewitch
-bewrai
-beyond
-bezonian
-bezonian
-bianca
-bianco
-bia
-bibbl
-bicker
-bid
-bidden
-bid
-bid
-biddi
-bide
-bide
-bide
-bid
-bien
-bier
-bifold
-big
-bigami
-biggen
-bigger
-big
-bigot
-bilberri
-bilbo
-bilbo
-bilbow
-bill
-billet
-billet
-billiard
-bill
-billow
-billow
-bill
-bin
-bind
-bindeth
-bind
-bind
-biondello
-birch
-bird
-bird
-birdlim
-bird
-birnam
-birth
-birthdai
-birthdom
-birthplac
-birthright
-birthright
-birth
-bi
-biscuit
-bishop
-bishop
-bisson
-bit
-bitch
-bite
-biter
-bite
-bite
-bit
-bitt
-bitten
-bitter
-bitterest
-bitterli
-bitter
-blab
-blabb
-blab
-blab
-black
-blackamoor
-blackamoor
-blackberri
-blackberri
-blacker
-blackest
-blackfriar
-blackheath
-blackmer
-black
-black
-bladder
-bladder
-blade
-blade
-blade
-blain
-blam
-blame
-blame
-blame
-blameless
-blame
-blanc
-blanca
-blanch
-blank
-blanket
-blank
-blasphem
-blasphem
-blasphem
-blasphemi
-blast
-blast
-blast
-blastment
-blast
-blaz
-blaze
-blaze
-blaze
-blazon
-blazon
-blazon
-bleach
-bleach
-bleak
-blear
-blear
-bleat
-bleat
-bleat
-bled
-bleed
-bleedest
-bleedeth
-bleed
-bleed
-blemish
-blemish
-blench
-blench
-blend
-blend
-blent
-bless
-bless
-blessedli
-blessed
-bless
-blesseth
-bless
-bless
-blest
-blew
-blind
-blind
-blindfold
-blind
-blindli
-blind
-blind
-blink
-blink
-bliss
-blist
-blister
-blister
-blith
-blithild
-bloat
-block
-blockish
-block
-bloi
-blood
-blood
-bloodhound
-bloodi
-bloodier
-bloodiest
-bloodili
-bloodless
-blood
-bloodsh
-bloodshed
-bloodstain
-bloodi
-bloom
-bloom
-blossom
-blossom
-blossom
-blot
-blot
-blot
-blot
-blount
-blow
-blow
-blower
-blowest
-blow
-blown
-blow
-blows
-blubb
-blubber
-blubber
-blue
-bluecap
-bluest
-blunt
-blunt
-blunter
-bluntest
-blunt
-bluntli
-blunt
-blunt
-blur
-blurr
-blur
-blush
-blush
-blushest
-blush
-blust
-bluster
-bluster
-bluster
-bo
-boar
-board
-board
-board
-board
-boarish
-boar
-boast
-boast
-boast
-boast
-boast
-boat
-boat
-boatswain
-bob
-bobb
-boblibindo
-bobtail
-bocchu
-bode
-bode
-bodement
-bode
-bodg
-bodi
-bodi
-bodiless
-bodili
-bode
-bodkin
-bodi
-bodykin
-bog
-boggl
-boggler
-bog
-bohemia
-bohemian
-bohun
-boil
-boil
-boil
-boist
-boister
-boister
-boitier
-bold
-bolden
-bolder
-boldest
-boldli
-bold
-bold
-bolingbrok
-bolster
-bolt
-bolt
-bolter
-bolter
-bolt
-bolt
-bombard
-bombard
-bombast
-bon
-bona
-bond
-bondag
-bond
-bondmaid
-bondman
-bondmen
-bond
-bondslav
-bone
-boneless
-bone
-bonfir
-bonfir
-bonjour
-bonn
-bonnet
-bonnet
-bonni
-bono
-bonto
-bonvil
-bood
-book
-bookish
-book
-boon
-boor
-boorish
-boor
-boot
-boot
-booti
-bootless
-boot
-booti
-bor
-bora
-borachio
-bordeaux
-border
-border
-border
-border
-bore
-borea
-bore
-bore
-born
-born
-borough
-borough
-borrow
-borrow
-borrow
-borrow
-borrow
-bosko
-bosko
-boski
-bosom
-bosom
-boson
-boss
-bosworth
-botch
-botcher
-botch
-botchi
-both
-bot
-bottl
-bottl
-bottl
-bottom
-bottomless
-bottom
-bouciqualt
-boug
-bough
-bough
-bought
-bounc
-bounc
-bound
-bound
-bounden
-boundeth
-bound
-boundless
-bound
-bounteou
-bounteous
-bounti
-bounti
-bountifulli
-bounti
-bourbier
-bourbon
-bourchier
-bourdeaux
-bourn
-bout
-bout
-bove
-bow
-bowcas
-bow
-bowel
-bower
-bow
-bowl
-bowler
-bowl
-bowl
-bow
-bowsprit
-bowstr
-box
-box
-boi
-boyet
-boyish
-boi
-brabant
-brabantio
-brabbl
-brabbler
-brac
-brace
-bracelet
-bracelet
-brach
-braci
-brag
-bragg
-braggard
-braggard
-braggart
-braggart
-brag
-brag
-bragless
-brag
-braid
-braid
-brain
-brain
-brainford
-brainish
-brainless
-brain
-brainsick
-brainsickli
-brake
-brakenburi
-brake
-brambl
-bran
-branch
-branch
-branchless
-brand
-brand
-brandish
-brandon
-brand
-bra
-brass
-brassi
-brat
-brat
-brav
-brave
-brave
-brave
-braver
-braveri
-brave
-bravest
-brave
-brawl
-brawler
-brawl
-brawl
-brawn
-brawn
-brai
-brai
-braz
-brazen
-brazier
-breach
-breach
-bread
-breadth
-break
-breaker
-breakfast
-break
-break
-breast
-breast
-breast
-breastplat
-breast
-breath
-breath
-breath
-breather
-breather
-breath
-breathest
-breath
-breathless
-breath
-brecknock
-bred
-breech
-breech
-breech
-breed
-breeder
-breeder
-breed
-breed
-brees
-breez
-breff
-bretagn
-brethen
-bretheren
-brethren
-brevi
-breviti
-brew
-brewag
-brewer
-brewer
-brew
-brew
-briareu
-briar
-brib
-bribe
-briber
-bribe
-brick
-bricklay
-brick
-bridal
-bride
-bridegroom
-bridegroom
-bride
-bridg
-bridgenorth
-bridg
-bridget
-bridl
-bridl
-brief
-briefer
-briefest
-briefli
-brief
-brier
-brier
-brigandin
-bright
-brighten
-brightest
-brightli
-bright
-brim
-brim
-brim
-brimston
-brind
-brine
-bring
-bringer
-bringeth
-bring
-bring
-bring
-brinish
-brink
-brisk
-briski
-bristl
-bristl
-bristli
-bristol
-bristow
-britain
-britain
-britain
-british
-briton
-briton
-brittani
-brittl
-broach
-broach
-broad
-broader
-broadsid
-broca
-brock
-brogu
-broil
-broil
-broil
-broke
-broken
-brokenli
-broker
-broker
-broke
-broke
-brooch
-brooch
-brood
-brood
-brood
-brook
-brook
-broom
-broomstaff
-broth
-brothel
-brother
-brotherhood
-brotherhood
-brotherli
-brother
-broth
-brought
-brow
-brown
-browner
-brownist
-browni
-brow
-brows
-brows
-brui
-bruis
-bruis
-bruis
-bruis
-bruit
-bruit
-brundusium
-brunt
-brush
-brush
-brute
-brutish
-brutu
-bubbl
-bubbl
-bubbl
-bubukl
-buck
-bucket
-bucket
-buck
-buckingham
-buckl
-buckl
-buckler
-buckler
-bucklersburi
-buckl
-buckram
-buck
-bud
-bud
-bud
-budg
-budger
-budget
-bud
-buff
-buffet
-buffet
-buffet
-bug
-bugbear
-bugl
-bug
-build
-build
-buildeth
-build
-build
-build
-built
-bulk
-bulk
-bull
-bullcalf
-bullen
-bullen
-bullet
-bullet
-bullock
-bull
-bulli
-bulmer
-bulwark
-bulwark
-bum
-bumbast
-bump
-bumper
-bum
-bunch
-bunch
-bundl
-bung
-bunghol
-bungl
-bunt
-buoi
-bur
-burbolt
-burd
-burden
-burden
-burden
-burden
-burden
-burgh
-burgher
-burgher
-burglari
-burgomast
-burgonet
-burgundi
-burial
-buri
-burier
-buriest
-burli
-burn
-burn
-burnet
-burneth
-burn
-burnish
-burn
-burnt
-burr
-burrow
-bur
-burst
-burst
-burst
-burthen
-burthen
-burton
-buri
-buri
-bush
-bushel
-bush
-bushi
-busi
-busili
-busin
-busi
-busi
-buskin
-buski
-buss
-buss
-buss
-bustl
-bustl
-busi
-but
-butche
-butcher
-butcher
-butcheri
-butcherli
-butcher
-butcheri
-butler
-butt
-butter
-butter
-butterfli
-butterfli
-butterwoman
-butteri
-buttock
-buttock
-button
-buttonhol
-button
-buttress
-buttri
-butt
-buxom
-bui
-buyer
-bui
-bui
-buzz
-buzzard
-buzzard
-buzzer
-buzz
-by
-bye
-byzantium
-c
-ca
-cabbag
-cabilero
-cabin
-cabin
-cabl
-cabl
-cackl
-cacodemon
-caddi
-caddiss
-cade
-cadenc
-cadent
-cade
-cadmu
-caduceu
-cadwal
-cadwallad
-caeliu
-caelo
-caesar
-caesarion
-caesar
-cage
-cage
-cagion
-cain
-caith
-caitiff
-caitiff
-caiu
-cak
-cake
-cake
-calab
-calai
-calam
-calam
-calcha
-calcul
-calen
-calendar
-calendar
-calf
-caliban
-caliban
-calipoli
-caliti
-caliv
-call
-callat
-call
-callet
-call
-call
-calm
-calmest
-calmli
-calm
-calm
-calpurnia
-calumni
-calumni
-calumni
-calumni
-calv
-calv
-calv
-calveskin
-calydon
-cam
-cambio
-cambria
-cambric
-cambric
-cambridg
-cambys
-came
-camel
-camelot
-camel
-camest
-camillo
-camlet
-camomil
-camp
-campeiu
-camp
-camp
-can
-canakin
-canari
-canari
-cancel
-cancel
-cancel
-cancel
-cancel
-cancer
-candidatu
-candi
-candl
-candl
-candlestick
-candi
-canidiu
-cank
-canker
-cankerblossom
-canker
-cannib
-cannib
-cannon
-cannon
-cannon
-cannot
-canon
-canoniz
-canon
-canon
-canon
-canopi
-canopi
-canopi
-canst
-canstick
-canterburi
-cantl
-canton
-canu
-canva
-canvass
-canzonet
-cap
-capabl
-capabl
-capac
-capac
-caparison
-capdv
-cape
-capel
-capel
-caper
-caper
-capet
-caphi
-capilet
-capitain
-capit
-capit
-capitol
-capitul
-capocchia
-capon
-capon
-capp
-cappadocia
-capriccio
-caprici
-cap
-capt
-captain
-captain
-captainship
-captiou
-captiv
-captiv
-captiv
-captiv
-captiv
-captiv
-captum
-capuciu
-capulet
-capulet
-car
-carack
-carack
-carat
-carawai
-carbonado
-carbuncl
-carbuncl
-carbuncl
-carcanet
-carcas
-carcas
-carcass
-carcass
-card
-cardecu
-card
-carder
-cardin
-cardin
-cardin
-cardmak
-card
-carduu
-care
-care
-career
-career
-care
-carefulli
-careless
-carelessli
-careless
-care
-caret
-cargo
-carl
-carlisl
-carlot
-carman
-carmen
-carnal
-carnal
-carnarvonshir
-carnat
-carnat
-carol
-carou
-carous
-carous
-carous
-carous
-carp
-carpent
-carper
-carpet
-carpet
-carp
-carriag
-carriag
-carri
-carrier
-carrier
-carri
-carrion
-carrion
-carri
-carri
-car
-cart
-carter
-carthag
-cart
-carv
-carv
-carv
-carver
-carv
-carv
-ca
-casa
-casaer
-casca
-case
-casement
-casement
-case
-cash
-cashier
-case
-cask
-casket
-casket
-casket
-casqu
-casqu
-cassado
-cassandra
-cassibelan
-cassio
-cassiu
-cassock
-cast
-castalion
-castawai
-castawai
-cast
-caster
-castig
-castig
-castil
-castiliano
-cast
-castl
-castl
-cast
-casual
-casual
-casualti
-casualti
-cat
-cataian
-catalogu
-cataplasm
-cataract
-catarrh
-catastroph
-catch
-catcher
-catch
-catch
-cate
-catechis
-catech
-catech
-cater
-caterpillar
-cater
-caterwaul
-cate
-catesbi
-cathedr
-catlik
-catl
-catl
-cato
-cat
-cattl
-caucasu
-caudl
-cauf
-caught
-cauldron
-cau
-caus
-caus
-causeless
-causer
-caus
-causest
-causeth
-cautel
-cautel
-cautel
-cauter
-caution
-caution
-cavaleiro
-cavaleri
-cavali
-cave
-cavern
-cavern
-cave
-caveto
-caviari
-cavil
-cavil
-cawdor
-cawdron
-caw
-ce
-cea
-ceas
-ceas
-ceaseth
-cedar
-cedar
-cediu
-celebr
-celebr
-celebr
-celebr
-celer
-celesti
-celia
-cell
-cellar
-cellarag
-celsa
-cement
-censer
-censor
-censorinu
-censur
-censur
-censur
-censur
-censur
-censur
-centaur
-centaur
-centr
-cent
-centuri
-centurion
-centurion
-centuri
-cerberu
-cerecloth
-cerement
-ceremoni
-ceremoni
-ceremoni
-ceremoni
-ceremoni
-cere
-cern
-certain
-certain
-certainli
-certainti
-certainti
-cert
-certif
-certifi
-certifi
-certifi
-ce
-cesario
-cess
-cess
-cestern
-cetera
-cett
-chace
-chaf
-chafe
-chafe
-chafe
-chaff
-chaffless
-chafe
-chain
-chain
-chair
-chair
-chalic
-chalic
-chalic
-chalk
-chalk
-chalki
-challeng
-challeng
-challeng
-challeng
-challeng
-challeng
-cham
-chamber
-chamber
-chamberlain
-chamberlain
-chambermaid
-chambermaid
-chamber
-chameleon
-champ
-champagn
-champain
-champain
-champion
-champion
-chanc
-chanc
-chanc
-chancellor
-chanc
-chandler
-chang
-chang
-changeabl
-chang
-chang
-changel
-changel
-changer
-chang
-changest
-chang
-channel
-channel
-chanson
-chant
-chanticl
-chant
-chantri
-chantri
-chant
-chao
-chap
-chape
-chapel
-chapeless
-chapel
-chaplain
-chaplain
-chapless
-chaplet
-chapmen
-chap
-chapter
-charact
-charact
-characterless
-charact
-characteri
-charact
-charbon
-chare
-chare
-charg
-charg
-charg
-charg
-charg
-chargeth
-charg
-chariest
-chari
-chare
-chariot
-chariot
-charit
-charit
-chariti
-chariti
-charlemain
-charl
-charm
-charm
-charmer
-charmeth
-charmian
-charm
-charmingli
-charm
-charneco
-charnel
-charoloi
-charon
-charter
-charter
-chartreux
-chari
-charybdi
-cha
-chase
-chase
-chaser
-chaseth
-chase
-chast
-chast
-chasti
-chastis
-chastis
-chastis
-chastiti
-chat
-chatham
-chatillon
-chat
-chatt
-chattel
-chatter
-chatter
-chattl
-chaud
-chaunt
-chaw
-chawdron
-che
-cheap
-cheapen
-cheaper
-cheapest
-cheapli
-cheapsid
-cheat
-cheat
-cheater
-cheater
-cheat
-cheat
-check
-check
-checker
-check
-check
-cheek
-cheek
-cheer
-cheer
-cheerer
-cheer
-cheerfulli
-cheer
-cheerless
-cheerli
-cheer
-chees
-chequer
-cher
-cherish
-cherish
-cherish
-cherish
-cherish
-cherri
-cherri
-cherrypit
-chertsei
-cherub
-cherubim
-cherubin
-cherubin
-cheshu
-chess
-chest
-chester
-chestnut
-chestnut
-chest
-cheta
-chev
-cheval
-chevali
-chevali
-cheveril
-chew
-chew
-chewet
-chew
-chez
-chi
-chick
-chicken
-chicken
-chicurmurco
-chid
-chidden
-chide
-chider
-chide
-chide
-chief
-chiefest
-chiefli
-chien
-child
-child
-childer
-childhood
-childhood
-child
-childish
-childish
-childlik
-child
-children
-chill
-chill
-chime
-chime
-chimnei
-chimneypiec
-chimnei
-chimurcho
-chin
-china
-chine
-chine
-chink
-chink
-chin
-chipp
-chipper
-chip
-chiron
-chirp
-chirrah
-chirurgeonli
-chisel
-chitoph
-chivalr
-chivalri
-choic
-choic
-choicest
-choir
-choir
-chok
-choke
-choke
-choke
-choke
-choler
-choler
-choler
-chollor
-choos
-chooser
-choos
-chooseth
-choos
-chop
-chopin
-choplog
-chopp
-chop
-chop
-choppi
-chop
-chopt
-chor
-chorist
-choru
-chose
-chosen
-chough
-chough
-chrish
-christ
-christen
-christendom
-christendom
-christen
-christen
-christian
-christianlik
-christian
-christma
-christom
-christoph
-christophero
-chronicl
-chronicl
-chronicl
-chronicl
-chronicl
-chrysolit
-chuck
-chuck
-chud
-chuff
-church
-church
-churchman
-churchmen
-churchyard
-churchyard
-churl
-churlish
-churlishli
-churl
-churn
-chu
-cicatric
-cicatric
-cice
-cicero
-cicet
-ciel
-ciitzen
-cilicia
-cimber
-cimmerian
-cinabl
-cinctur
-cinder
-cine
-cinna
-cinqu
-cipher
-cipher
-circa
-circ
-circl
-circl
-circlet
-circl
-circuit
-circum
-circumcis
-circumfer
-circummur
-circumscrib
-circumscrib
-circumscript
-circumspect
-circumst
-circumstanc
-circumst
-circumstanti
-circumv
-circumvent
-cistern
-citadel
-cital
-cite
-cite
-cite
-citi
-cite
-citizen
-citizen
-cittern
-citi
-civet
-civil
-civil
-civilli
-clack
-clad
-claim
-claim
-claim
-clamb
-clamber
-clammer
-clamor
-clamor
-clamor
-clamour
-clamour
-clang
-clangor
-clap
-clapp
-clap
-clapper
-clap
-clap
-clare
-clarenc
-claret
-claribel
-clasp
-clasp
-clatter
-claud
-claudio
-claudiu
-claus
-claw
-claw
-claw
-claw
-clai
-clai
-clean
-cleanliest
-cleanli
-clean
-cleans
-cleans
-clear
-clearer
-clearest
-clearli
-clear
-clear
-cleav
-cleav
-clef
-cleft
-cleitu
-clemenc
-clement
-cleomen
-cleopatpa
-cleopatra
-clepeth
-clept
-clerestori
-clergi
-clergyman
-clergymen
-clerk
-clerkli
-clerk
-clew
-client
-client
-cliff
-clifford
-clifford
-cliff
-clifton
-climat
-climatur
-climb
-climb
-climber
-climbeth
-climb
-climb
-clime
-cling
-clink
-clink
-clinquant
-clip
-clipp
-clipper
-clippeth
-clip
-clipt
-clitu
-clo
-cloak
-cloakbag
-cloak
-clock
-clock
-clod
-cloddi
-clodpol
-clog
-clog
-clog
-cloister
-cloistress
-cloquenc
-clo
-close
-close
-close
-close
-closer
-close
-closest
-closet
-close
-closur
-cloten
-cloten
-cloth
-clothair
-clothariu
-cloth
-cloth
-clothier
-clothier
-cloth
-cloth
-clotpol
-clotpol
-cloud
-cloud
-cloudi
-cloud
-cloudi
-clout
-clout
-clout
-cloven
-clover
-clove
-clovest
-clowder
-clown
-clownish
-clown
-cloi
-cloi
-cloi
-cloyless
-cloyment
-cloi
-club
-club
-cluck
-clung
-clust
-cluster
-clutch
-clyster
-cneiu
-cnemi
-co
-coach
-coach
-coachmak
-coact
-coactiv
-coagul
-coal
-coal
-coars
-coars
-coast
-coast
-coast
-coat
-coat
-coat
-cobbl
-cobbl
-cobbler
-cobham
-cobloaf
-cobweb
-cobweb
-cock
-cockatric
-cockatric
-cockl
-cockl
-cocknei
-cockpit
-cock
-cocksur
-coctu
-cocytu
-cod
-cod
-codl
-codpiec
-codpiec
-cod
-coelestibu
-coesar
-coeur
-coffer
-coffer
-coffin
-coffin
-cog
-cog
-cogit
-cogit
-cognit
-cogniz
-cogscomb
-cohabit
-coher
-coher
-coher
-coher
-cohort
-coif
-coign
-coil
-coin
-coinag
-coiner
-coin
-coin
-col
-colbrand
-colcho
-cold
-colder
-coldest
-coldli
-cold
-coldspur
-colebrook
-colic
-collar
-collar
-collater
-colleagu
-collect
-collect
-collect
-colleg
-colleg
-colli
-collier
-collier
-collop
-collus
-colm
-colmekil
-coloquintida
-color
-color
-colossu
-colour
-colour
-colour
-colour
-colour
-colt
-colt
-colt
-columbin
-columbin
-colvil
-com
-comagen
-comart
-comb
-combat
-combat
-combat
-combat
-combat
-combin
-combin
-combin
-combin
-combin
-combless
-combust
-come
-comedian
-comedian
-comedi
-comeli
-come
-comer
-comer
-come
-comest
-comet
-cometh
-comet
-comfect
-comfit
-comfit
-comfort
-comfort
-comfort
-comfort
-comfort
-comfortless
-comfort
-comic
-comic
-come
-come
-cominiu
-comma
-command
-command
-command
-command
-command
-command
-command
-command
-command
-comm
-commenc
-commenc
-commenc
-commenc
-commenc
-commenc
-commend
-commend
-commend
-commend
-commend
-commend
-commend
-comment
-commentari
-comment
-comment
-commerc
-commingl
-commiser
-commiss
-commission
-commiss
-commit
-commit
-committ
-commit
-commit
-commix
-commix
-commixt
-commixtur
-commodi
-commod
-commod
-common
-commonalti
-common
-common
-commonli
-common
-commonw
-commonwealth
-commot
-commot
-commun
-communicat
-commun
-commun
-commun
-commun
-comonti
-compact
-compani
-companion
-companion
-companionship
-compani
-compar
-compar
-compar
-compar
-compar
-comparison
-comparison
-compartn
-compass
-compass
-compass
-compass
-compassion
-compeer
-compel
-compel
-compel
-compel
-compel
-compens
-compet
-compet
-compet
-competitor
-competitor
-compil
-compil
-compil
-complain
-complain
-complainest
-complain
-complain
-complain
-complaint
-complaint
-complement
-complement
-complet
-complexion
-complexion
-complexion
-complic
-compli
-compliment
-compliment
-compliment
-complot
-complot
-complot
-compli
-compo
-compos
-compos
-composit
-compost
-compostur
-composur
-compound
-compound
-compound
-comprehend
-comprehend
-comprehend
-compremis
-compri
-compris
-compromi
-compromis
-compt
-comptibl
-comptrol
-compulsatori
-compuls
-compuls
-compuncti
-comput
-comrad
-comrad
-comutu
-con
-concav
-concav
-conceal
-conceal
-conceal
-conceal
-conceal
-conceal
-conceit
-conceit
-conceitless
-conceit
-conceiv
-conceiv
-conceiv
-conceiv
-conceiv
-concept
-concept
-concepti
-concern
-concern
-concerneth
-concern
-concern
-concern
-conclav
-conclud
-conclud
-conclud
-conclud
-conclud
-conclus
-conclus
-concolinel
-concord
-concubin
-concupisc
-concupi
-concur
-concur
-concur
-condemn
-condemn
-condemn
-condemn
-condemn
-condescend
-condign
-condit
-condition
-condit
-condol
-condol
-condol
-conduc
-conduct
-conduct
-conduct
-conductor
-conduit
-conduit
-conect
-conei
-confect
-confectionari
-confect
-confederaci
-confeder
-confeder
-confer
-confer
-conferr
-confer
-confess
-confess
-confess
-confesseth
-confess
-confess
-confess
-confessor
-confid
-confid
-confid
-confin
-confin
-confin
-confineless
-confin
-confin
-confin
-confirm
-confirm
-confirm
-confirm
-confirm
-confirm
-confirm
-confirm
-confirm
-confisc
-confisc
-confisc
-confix
-conflict
-conflict
-conflict
-confluenc
-conflux
-conform
-conform
-confound
-confound
-confound
-confound
-confront
-confront
-confu
-confus
-confusedli
-confus
-confus
-confut
-confut
-congeal
-congeal
-congeal
-conge
-conger
-congest
-congi
-congratul
-congre
-congreet
-congreg
-congreg
-congreg
-congreg
-congruent
-congru
-coni
-conjectur
-conjectur
-conjectur
-conjoin
-conjoin
-conjoin
-conjointli
-conjunct
-conjunct
-conjunct
-conjur
-conjur
-conjur
-conjur
-conjur
-conjur
-conjur
-conjur
-conjur
-conjuro
-conn
-connect
-conniv
-conqu
-conquer
-conquer
-conquer
-conqueror
-conqueror
-conquer
-conquest
-conquest
-conqur
-conrad
-con
-consanguin
-consanguin
-conscienc
-conscienc
-conscienc
-conscion
-consecr
-consecr
-consecr
-consent
-consent
-consent
-consent
-consequ
-consequ
-consequ
-conserv
-conserv
-conserv
-consid
-consider
-consider
-consider
-consider
-consid
-consid
-consid
-consid
-consign
-consign
-consist
-consisteth
-consist
-consistori
-consist
-consol
-consol
-conson
-conson
-consort
-consort
-consortest
-conspectu
-conspir
-conspiraci
-conspir
-conspir
-conspir
-conspir
-conspir
-conspir
-conspir
-conspir
-constabl
-constabl
-constanc
-constanc
-constanc
-constant
-constantin
-constantinopl
-constantli
-constel
-constitut
-constrain
-constrain
-constraineth
-constrain
-constraint
-constr
-construct
-constru
-consul
-consul
-consulship
-consulship
-consult
-consult
-consult
-consum
-consum
-consum
-consum
-consum
-consumm
-consumm
-consumpt
-consumpt
-contagion
-contagi
-contain
-contain
-contain
-contamin
-contamin
-contemn
-contemn
-contemn
-contemn
-contempl
-contempl
-contempl
-contempt
-contempt
-contempt
-contemptu
-contemptu
-contend
-contend
-contend
-contendon
-content
-contenta
-content
-contenteth
-content
-contenti
-contentless
-contento
-content
-contest
-contest
-contin
-contin
-contin
-contin
-continu
-continu
-continu
-continu
-continuantli
-continu
-continu
-continu
-continu
-continu
-continu
-contract
-contract
-contract
-contract
-contradict
-contradict
-contradict
-contradict
-contrari
-contrarieti
-contrarieti
-contrari
-contrari
-contrari
-contr
-contribut
-contributor
-contrit
-contriv
-contriv
-contriv
-contriv
-contriv
-contriv
-control
-control
-control
-control
-control
-control
-controversi
-contumeli
-contumeli
-contum
-contus
-conveni
-conveni
-conveni
-conveni
-conveni
-convent
-conventicl
-convent
-conver
-convers
-convers
-convers
-convers
-convers
-convers
-convers
-convers
-convert
-convert
-convertest
-convert
-convertit
-convertit
-convert
-convei
-convey
-convey
-convey
-convei
-convict
-convict
-convinc
-convinc
-convinc
-conviv
-convoc
-convoi
-convuls
-coni
-cook
-cookeri
-cook
-cool
-cool
-cool
-cool
-coop
-coop
-cop
-copatain
-cope
-cophetua
-copi
-copi
-copiou
-copper
-copperspur
-coppic
-copul
-copul
-copi
-cor
-coragio
-coral
-coram
-corambu
-coranto
-coranto
-corbo
-cord
-cord
-cordelia
-cordial
-cordi
-cord
-core
-corin
-corinth
-corinthian
-coriolanu
-corioli
-cork
-corki
-cormor
-corn
-cornelia
-corneliu
-corner
-corner
-cornerston
-cornet
-cornish
-corn
-cornuto
-cornwal
-corollari
-coron
-coron
-coronet
-coronet
-corpor
-corpor
-corpor
-corps
-corpul
-correct
-correct
-correct
-correct
-correction
-correct
-correspond
-correspond
-correspond
-correspons
-corrig
-corriv
-corriv
-corrobor
-corros
-corrupt
-corrupt
-corrupt
-corrupt
-corrupt
-corrupt
-corrupt
-corrupt
-corruptli
-corrupt
-cors
-cors
-corslet
-cosmo
-cost
-costard
-costermong
-costlier
-costli
-cost
-cot
-cote
-cote
-cotsal
-cotsol
-cotswold
-cottag
-cottag
-cotu
-couch
-couch
-couch
-couch
-coud
-cough
-cough
-could
-couldst
-coulter
-council
-councillor
-council
-counsel
-counsel
-counsellor
-counsellor
-counselor
-counselor
-counsel
-count
-count
-countenanc
-counten
-counten
-counter
-counterchang
-countercheck
-counterfeit
-counterfeit
-counterfeit
-counterfeitli
-counterfeit
-countermand
-countermand
-countermin
-counterpart
-counterpoint
-counterpoi
-counterpois
-counter
-countervail
-countess
-countess
-counti
-count
-countless
-countri
-countrv
-countri
-countryman
-countrymen
-count
-counti
-couper
-coupl
-coupl
-couplement
-coupl
-couplet
-couplet
-cour
-courag
-courag
-courag
-courag
-courier
-courier
-couronn
-cour
-cours
-cours
-courser
-courser
-cours
-cours
-court
-court
-courteou
-courteous
-courtesan
-courtesi
-courtesi
-courtezan
-courtezan
-courtier
-courtier
-courtlik
-courtli
-courtnei
-court
-courtship
-cousin
-cousin
-couterfeit
-coutum
-coven
-coven
-covent
-coventri
-cover
-cover
-cover
-coverlet
-cover
-covert
-covertli
-covertur
-covet
-covet
-covet
-covet
-covet
-covet
-covet
-covet
-cow
-coward
-coward
-cowardic
-cowardli
-coward
-cowardship
-cowish
-cowl
-cowslip
-cowslip
-cox
-coxcomb
-coxcomb
-coi
-coystril
-coz
-cozen
-cozenag
-cozen
-cozen
-cozen
-cozen
-cozier
-crab
-crab
-crab
-crack
-crack
-cracker
-cracker
-crack
-crack
-cradl
-cradl
-cradl
-craft
-craft
-crafti
-craftier
-craftili
-craft
-craftsmen
-crafti
-cram
-cramm
-cramp
-cramp
-cram
-crank
-crank
-cranmer
-cranni
-cranni
-cranni
-crant
-crare
-crash
-crassu
-crav
-crave
-crave
-craven
-craven
-crave
-craveth
-crave
-crawl
-crawl
-crawl
-craz
-craze
-crazi
-creak
-cream
-creat
-creat
-creat
-creat
-creation
-creator
-creatur
-creatur
-credenc
-credent
-credibl
-credit
-creditor
-creditor
-credo
-credul
-credul
-creed
-creek
-creek
-creep
-creep
-creep
-crept
-crescent
-cresciv
-cresset
-cressid
-cressida
-cressid
-cressi
-crest
-crest
-crestfal
-crestless
-crest
-cretan
-crete
-crevic
-crew
-crew
-crib
-cribb
-crib
-cricket
-cricket
-cri
-criedst
-crier
-cri
-criest
-crieth
-crime
-crime
-crimeless
-crime
-crimin
-crimson
-cring
-crippl
-crisp
-crisp
-crispian
-crispianu
-crispin
-critic
-critic
-critic
-croak
-croak
-croak
-crocodil
-cromer
-cromwel
-crone
-crook
-crookback
-crook
-crook
-crop
-cropp
-crosbi
-cross
-cross
-cross
-crossest
-cross
-cross
-crossli
-cross
-crost
-crotchet
-crouch
-crouch
-crow
-crowd
-crowd
-crowd
-crowd
-crowflow
-crow
-crowkeep
-crown
-crown
-crowner
-crownet
-crownet
-crown
-crown
-crow
-crudi
-cruel
-cruell
-crueller
-cruelli
-cruel
-cruelti
-crum
-crumbl
-crumb
-crupper
-crusado
-crush
-crush
-crushest
-crush
-crust
-crust
-crusti
-crutch
-crutch
-cry
-cry
-crystal
-crystallin
-crystal
-cub
-cubbert
-cubiculo
-cubit
-cub
-cuckold
-cuckoldli
-cuckold
-cuckoo
-cucullu
-cudgel
-cudgel
-cudgel
-cudgel
-cudgel
-cue
-cue
-cuff
-cuff
-cuiqu
-cull
-cull
-cullion
-cullionli
-cullion
-culpabl
-culverin
-cum
-cumber
-cumberland
-cun
-cunningli
-cun
-cuor
-cup
-cupbear
-cupboard
-cupid
-cupid
-cuppel
-cup
-cur
-curan
-curat
-curb
-curb
-curb
-curb
-curd
-curdi
-curd
-cure
-cure
-cureless
-curer
-cure
-curfew
-cure
-curio
-curios
-curiou
-curious
-curl
-curl
-curl
-curl
-curranc
-currant
-current
-current
-currish
-curri
-cur
-curs
-curs
-curs
-cursi
-curs
-cursorari
-curst
-curster
-curstest
-curst
-cursi
-curtail
-curtain
-curtain
-curtal
-curti
-curtl
-curtsi
-curtsi
-curtsi
-curvet
-curvet
-cush
-cushion
-cushion
-custalorum
-custard
-custodi
-custom
-customari
-custom
-custom
-custom
-custom
-custur
-cut
-cutler
-cutpurs
-cutpurs
-cut
-cutter
-cut
-cuttl
-cxsar
-cyclop
-cydnu
-cygnet
-cygnet
-cym
-cymbal
-cymbelin
-cyme
-cynic
-cynthia
-cypress
-cypriot
-cypru
-cyru
-cytherea
-d
-dabbl
-dace
-dad
-daedalu
-daemon
-daff
-daf
-daffest
-daffodil
-dagger
-dagger
-dagonet
-daili
-daintier
-dainti
-daintiest
-daintili
-dainti
-daintri
-dainti
-daisi
-daisi
-daisi
-dale
-dallianc
-dalli
-dalli
-dalli
-dalli
-dalmatian
-dam
-damag
-damascu
-damask
-damask
-dame
-dame
-damm
-damn
-damnabl
-damnabl
-damnat
-damn
-damn
-damoisel
-damon
-damosella
-damp
-dam
-damsel
-damson
-dan
-danc
-danc
-dancer
-danc
-danc
-dandl
-dandi
-dane
-dang
-danger
-danger
-danger
-danger
-dangl
-daniel
-danish
-dank
-dankish
-dansker
-daphn
-dappl
-dappl
-dar
-dardan
-dardanian
-dardaniu
-dare
-dare
-dare
-dare
-darest
-dare
-dariu
-dark
-darken
-darken
-darken
-darker
-darkest
-darkl
-darkli
-dark
-darl
-darl
-darnel
-darraign
-dart
-dart
-darter
-dartford
-dart
-dart
-dash
-dash
-dash
-dastard
-dastard
-dat
-datchet
-date
-date
-dateless
-date
-daub
-daughter
-daughter
-daunt
-daunt
-dauntless
-dauphin
-daventri
-davi
-daw
-dawn
-dawn
-daw
-dai
-daylight
-dai
-dazzl
-dazzl
-dazzl
-de
-dead
-deadli
-deaf
-deaf
-deaf
-deaf
-deal
-dealer
-dealer
-dealest
-deal
-deal
-deal
-dealt
-dean
-deaneri
-dear
-dearer
-dearest
-dearli
-dear
-dear
-dearth
-dearth
-death
-deathb
-death
-death
-deathsman
-deathsmen
-debar
-debas
-debat
-debat
-debat
-debateth
-debat
-debauch
-debil
-debil
-debitor
-debonair
-deborah
-debosh
-debt
-debt
-debtor
-debtor
-debt
-debuti
-decai
-decai
-decay
-decai
-decai
-decea
-deceas
-deceas
-deceit
-deceit
-deceit
-deceiv
-deceiv
-deceiv
-deceiv
-deceiv
-deceiv
-deceiv
-deceivest
-deceiveth
-deceiv
-decemb
-decent
-decepti
-decern
-decid
-decid
-decim
-deciph
-deciph
-decis
-deciu
-deck
-deck
-deck
-deckt
-declar
-declar
-declens
-declens
-declin
-declin
-declin
-declin
-declin
-decoct
-decorum
-decrea
-decreas
-decreas
-decre
-decre
-decre
-decrepit
-dedic
-dedic
-dedic
-dedic
-deed
-deedless
-deed
-deem
-deem
-deep
-deeper
-deepest
-deepli
-deep
-deepvow
-deer
-deess
-defac
-defac
-defac
-defac
-defac
-defac
-defam
-default
-defeat
-defeat
-defeat
-defeatur
-defect
-defect
-defect
-defenc
-defenc
-defend
-defend
-defend
-defend
-defend
-defend
-defend
-defens
-defens
-defens
-defer
-deferr
-defianc
-defici
-defi
-defi
-defil
-defil
-defil
-defil
-defil
-defin
-defin
-definit
-definit
-definit
-deflow
-deflow
-deflow
-deform
-deform
-deform
-deform
-deftli
-defunct
-defunct
-defus
-defi
-defi
-degener
-degrad
-degre
-degre
-deifi
-deifi
-deign
-deign
-deiphobu
-deiti
-deiti
-deja
-deject
-deject
-delabreth
-delai
-delai
-delai
-delai
-delect
-deliber
-delic
-delic
-delici
-delici
-delight
-delight
-delight
-delight
-delinqu
-deliv
-deliv
-deliver
-deliv
-deliv
-deliv
-deliveri
-delpho
-delud
-delud
-delug
-delv
-delver
-delv
-demand
-demand
-demand
-demand
-demean
-demeanor
-demeanour
-demerit
-demesn
-demetriu
-demi
-demigod
-demis
-demoisel
-demon
-demonstr
-demonstr
-demonstr
-demonstr
-demonstr
-demonstr
-demur
-demur
-demur
-den
-denai
-deni
-denial
-denial
-deni
-denier
-deni
-deniest
-deni
-denmark
-denni
-denni
-denot
-denot
-denot
-denounc
-denounc
-denounc
-den
-denunci
-deni
-deni
-deo
-depart
-depart
-departest
-depart
-departur
-depech
-depend
-depend
-depend
-depend
-depend
-depend
-depend
-depend
-depend
-depend
-depend
-depend
-deplor
-deplor
-depopul
-depo
-depos
-depos
-depos
-depositari
-deprav
-deprav
-deprav
-deprav
-deprav
-depress
-depriv
-depriv
-depth
-depth
-deput
-deput
-deput
-deputi
-deput
-deputi
-deracin
-derbi
-derceta
-dere
-derid
-deris
-deriv
-deriv
-deriv
-deriv
-deriv
-deriv
-derog
-derog
-derog
-de
-desartless
-descant
-descend
-descend
-descend
-descend
-descens
-descent
-descent
-describ
-describ
-describ
-descri
-descript
-descript
-descri
-desdemon
-desdemona
-desert
-desert
-deserv
-deserv
-deserv
-deservedli
-deserv
-deserv
-deserv
-deservest
-deserv
-deserv
-design
-design
-design
-design
-desir
-desir
-desir
-desir
-desir
-desirest
-desir
-desir
-desist
-desk
-desol
-desol
-desp
-despair
-despair
-despair
-despatch
-desper
-desper
-desper
-despi
-despis
-despis
-despis
-despiseth
-despis
-despit
-despit
-despoil
-dest
-destin
-destin
-destini
-destini
-destitut
-destroi
-destroi
-destroy
-destroy
-destroi
-destroi
-destruct
-destruct
-det
-detain
-detain
-detect
-detect
-detect
-detect
-detector
-detect
-detent
-determin
-determin
-determin
-determin
-determin
-determin
-determin
-detest
-detest
-detest
-detest
-detest
-detract
-detract
-detract
-deucalion
-deuc
-deum
-deux
-devant
-devest
-devic
-devic
-devil
-devilish
-devil
-devi
-devis
-devis
-devis
-devis
-devoid
-devonshir
-devot
-devot
-devot
-devour
-devour
-devour
-devour
-devour
-devout
-devoutli
-dew
-dewberri
-dewdrop
-dewlap
-dewlapp
-dew
-dewi
-dexter
-dexteri
-dexter
-di
-diabl
-diablo
-diadem
-dial
-dialect
-dialogu
-dialogu
-dial
-diamet
-diamond
-diamond
-dian
-diana
-diaper
-dibbl
-dic
-dice
-dicer
-dich
-dick
-dicken
-dickon
-dicki
-dictat
-diction
-dictynna
-did
-diddl
-didest
-dido
-didst
-die
-di
-diedst
-di
-diest
-diet
-diet
-dieter
-dieu
-diff
-differ
-differ
-differ
-differ
-differ
-differ
-differ
-difficil
-difficult
-difficulti
-difficulti
-diffid
-diffid
-diffu
-diffus
-diffusest
-dig
-digest
-digest
-digest
-digest
-digg
-dig
-dighton
-dignifi
-dignifi
-dignifi
-digniti
-digniti
-digress
-digress
-digress
-dig
-digt
-dilat
-dilat
-dilat
-dilatori
-dild
-dildo
-dilemma
-dilemma
-dilig
-dilig
-diluculo
-dim
-dimens
-dimens
-diminish
-diminish
-diminut
-diminut
-diminut
-dimm
-dim
-dim
-dimpl
-dimpl
-dim
-din
-dine
-dine
-diner
-dine
-ding
-dine
-dinner
-dinner
-dinnertim
-dint
-diom
-diomed
-diomed
-dion
-dip
-dipp
-dip
-dip
-dir
-dire
-direct
-direct
-direct
-direct
-direct
-directitud
-direct
-directli
-direct
-dire
-dire
-direst
-dirg
-dirg
-dirt
-dirti
-di
-disabl
-disabl
-disabl
-disabl
-disadvantag
-disagre
-disallow
-disanim
-disannul
-disannul
-disappoint
-disarm
-disarm
-disarmeth
-disarm
-disast
-disast
-disastr
-disbench
-disbranch
-disburden
-disbur
-disburs
-disburs
-discandi
-discandi
-discard
-discard
-discas
-discas
-discern
-discern
-discern
-discern
-discern
-discharg
-discharg
-discharg
-discharg
-discipl
-discipl
-disciplin
-disciplin
-disciplin
-disciplin
-disclaim
-disclaim
-disclaim
-disclo
-disclos
-disclos
-disclos
-discolour
-discolour
-discolour
-discomfit
-discomfit
-discomfitur
-discomfort
-discomfort
-discommend
-disconsol
-discont
-discont
-discontentedli
-discont
-discont
-discontinu
-discontinu
-discord
-discord
-discord
-discours
-discours
-discours
-discours
-discours
-discourtesi
-discov
-discov
-discov
-discover
-discoveri
-discov
-discov
-discoveri
-discredit
-discredit
-discredit
-discreet
-discreetli
-discret
-discret
-discuss
-disdain
-disdain
-disdaineth
-disdain
-disdainfulli
-disdain
-disdain
-disdnguish
-disea
-diseas
-diseas
-diseas
-disedg
-disembark
-disfigur
-disfigur
-disfurnish
-disgorg
-disgrac
-disgrac
-disgrac
-disgrac
-disgrac
-disgrac
-disgraci
-disgui
-disguis
-disguis
-disguis
-disguis
-disguis
-dish
-dishabit
-dishclout
-dishearten
-dishearten
-dish
-dishonest
-dishonestli
-dishonesti
-dishonor
-dishonor
-dishonor
-dishonour
-dishonour
-dishonour
-dishonour
-disinherit
-disinherit
-disjoin
-disjoin
-disjoin
-disjoint
-disjunct
-dislik
-dislik
-disliken
-dislik
-dislimn
-disloc
-dislodg
-disloy
-disloyalti
-dismal
-dismantl
-dismantl
-dismask
-dismai
-dismai
-dismemb
-dismemb
-dism
-dismiss
-dismiss
-dismiss
-dismiss
-dismount
-dismount
-disnatur
-disobedi
-disobedi
-disobei
-disobei
-disorb
-disord
-disord
-disorderli
-disord
-disparag
-disparag
-disparag
-dispark
-dispatch
-dispens
-dispens
-dispens
-disper
-dispers
-dispers
-dispersedli
-dispers
-dispit
-displac
-displac
-displac
-displant
-displant
-displai
-displai
-displea
-displeas
-displeas
-displeas
-displeasur
-displeasur
-dispong
-disport
-disport
-dispo
-dispos
-dispos
-dispos
-dispos
-disposit
-disposit
-dispossess
-dispossess
-disprai
-disprais
-disprais
-dispraisingli
-disproperti
-disproport
-disproport
-disprov
-disprov
-disprov
-dispurs
-disput
-disput
-disput
-disput
-disput
-disput
-disput
-disquant
-disquiet
-disquietli
-disrelish
-disrob
-disseat
-dissembl
-dissembl
-dissembl
-dissembl
-dissembl
-dissembl
-dissens
-dissens
-dissenti
-dissev
-dissip
-dissolut
-dissolut
-dissolut
-dissolut
-dissolv
-dissolv
-dissolv
-dissolv
-dissuad
-dissuad
-distaff
-distaff
-distain
-distain
-distanc
-distant
-distast
-distast
-distast
-distemp
-distemp
-distemperatur
-distemperatur
-distemp
-distemp
-distil
-distil
-distil
-distil
-distil
-distil
-distinct
-distinct
-distinctli
-distingu
-distinguish
-distinguish
-distinguish
-distract
-distract
-distractedli
-distract
-distract
-distract
-distrain
-distraught
-distress
-distress
-distress
-distress
-distribut
-distribut
-distribut
-distrust
-distrust
-disturb
-disturb
-disturb
-disturb
-disunit
-disvalu
-disvouch
-dit
-ditch
-ditcher
-ditch
-dite
-ditti
-ditti
-diurnal
-div
-dive
-diver
-diver
-divers
-divers
-divert
-divert
-divert
-dive
-divest
-divid
-divid
-divid
-divid
-divid
-divideth
-divin
-divin
-divin
-divin
-divin
-divin
-divin
-divinest
-divin
-divin
-divis
-divis
-divorc
-divorc
-divorc
-divorc
-divorc
-divulg
-divulg
-divulg
-divulg
-dizi
-dizzi
-do
-doat
-dobbin
-dock
-dock
-doct
-doctor
-doctor
-doctrin
-document
-dodg
-doe
-doer
-doer
-doe
-doest
-doff
-dog
-dogberri
-dogfish
-dogg
-dog
-dog
-doigt
-do
-do
-doit
-doit
-dolabella
-dole
-dole
-doll
-dollar
-dollar
-dolor
-dolor
-dolour
-dolour
-dolphin
-dolt
-dolt
-domest
-domest
-domin
-domin
-domin
-domin
-domin
-domin
-domin
-dominion
-dominion
-domitiu
-dommelton
-don
-donalbain
-donat
-donc
-doncast
-done
-dong
-donn
-donn
-donner
-donnerai
-doom
-doomsdai
-door
-doorkeep
-door
-dorca
-doreu
-doricl
-dormous
-dorothi
-dorset
-dorsetshir
-dost
-dotag
-dotant
-dotard
-dotard
-dote
-dote
-doter
-dote
-doteth
-doth
-dote
-doubl
-doubl
-doubl
-doubler
-doublet
-doublet
-doubl
-doubli
-doubt
-doubt
-doubt
-doubtfulli
-doubt
-doubtless
-doubt
-doug
-dough
-doughti
-doughi
-dougla
-dout
-dout
-dout
-dove
-dovehous
-dover
-dove
-dow
-dowag
-dowdi
-dower
-dowerless
-dower
-dowla
-dowl
-down
-downfal
-downright
-down
-downstair
-downtrod
-downward
-downward
-downi
-dowri
-dowri
-dowsabel
-doxi
-doze
-dozen
-dozen
-dozi
-drab
-drab
-drab
-drachma
-drachma
-draff
-drag
-dragg
-drag
-drag
-dragon
-dragonish
-dragon
-drain
-drain
-drain
-drake
-dram
-dramati
-drank
-draught
-draught
-drave
-draw
-drawbridg
-drawer
-drawer
-draweth
-draw
-drawl
-drawn
-draw
-drayman
-draymen
-dread
-dread
-dread
-dreadfulli
-dread
-dread
-dream
-dreamer
-dreamer
-dream
-dream
-dreamt
-drearn
-dreari
-dreg
-dreg
-drench
-drench
-dress
-dress
-dresser
-dress
-dress
-drest
-drew
-dribbl
-dri
-drier
-dri
-drift
-drili
-drink
-drinketh
-drink
-drink
-drink
-driv
-drive
-drivel
-driven
-drive
-driveth
-drive
-drizzl
-drizzl
-drizzl
-droit
-drolleri
-dromio
-dromio
-drone
-drone
-droop
-droopeth
-droop
-droop
-drop
-dropheir
-droplet
-dropp
-dropper
-droppeth
-drop
-drop
-drop
-dropsi
-dropsi
-dropsi
-dropt
-dross
-drossi
-drought
-drove
-droven
-drovier
-drown
-drown
-drown
-drown
-drow
-drows
-drowsili
-drowsi
-drowsi
-drudg
-drudgeri
-drudg
-drug
-drugg
-drug
-drum
-drumbl
-drummer
-drum
-drum
-drunk
-drunkard
-drunkard
-drunken
-drunkenli
-drunken
-dry
-dryness
-dst
-du
-dub
-dubb
-ducat
-ducat
-ducdam
-duchess
-duchi
-duchi
-duck
-duck
-duck
-dudgeon
-due
-duellist
-duello
-duer
-due
-duff
-dug
-dug
-duke
-dukedom
-dukedom
-duke
-dulcet
-dulch
-dull
-dullard
-duller
-dullest
-dull
-dull
-dull
-dulli
-dul
-duli
-dumain
-dumb
-dumb
-dumbl
-dumb
-dump
-dump
-dun
-duncan
-dung
-dungeon
-dungeon
-dunghil
-dunghil
-dungi
-dunnest
-dunsinan
-dunsmor
-dunstabl
-dupp
-duranc
-dure
-durst
-duski
-dust
-dust
-dusti
-dutch
-dutchman
-duteou
-duti
-duti
-duti
-dwarf
-dwarfish
-dwell
-dweller
-dwell
-dwell
-dwelt
-dwindl
-dy
-dye
-dy
-dyer
-dy
-e
-each
-eager
-eagerli
-eager
-eagl
-eagl
-ean
-eanl
-ear
-ear
-earl
-earldom
-earlier
-earliest
-earli
-earl
-earli
-earn
-earn
-earnest
-earnestli
-earnest
-earn
-ear
-earth
-earthen
-earthlier
-earthli
-earthquak
-earthquak
-earthi
-ea
-eas
-eas
-eas
-eas
-easier
-easiest
-easiliest
-easili
-easi
-eas
-east
-eastcheap
-easter
-eastern
-eastward
-easi
-eat
-eaten
-eater
-eater
-eat
-eat
-eaux
-eav
-ebb
-eb
-ebb
-ebon
-eboni
-ebrew
-ecc
-echapp
-echo
-echo
-eclip
-eclips
-eclips
-ecoli
-ecoutez
-ecstaci
-ecstasi
-ecstasi
-ecu
-eden
-edg
-edgar
-edg
-edg
-edgeless
-edg
-edict
-edict
-edific
-edific
-edifi
-edifi
-edit
-edm
-edmund
-edmund
-edmundsburi
-educ
-educ
-educ
-edward
-eel
-eel
-effect
-effect
-effectless
-effect
-effectu
-effectu
-effemin
-effigi
-effu
-effus
-effus
-eftest
-egal
-egal
-eget
-egeu
-egg
-egg
-eggshel
-eglamour
-eglantin
-egma
-ego
-egregi
-egregi
-egress
-egypt
-egyptian
-egyptian
-eie
-eight
-eighteen
-eighth
-eightpenni
-eighti
-eisel
-either
-eject
-ek
-el
-elb
-elbow
-elbow
-eld
-elder
-elder
-eldest
-eleanor
-elect
-elect
-elect
-eleg
-elegi
-element
-element
-eleph
-eleph
-elev
-eleven
-eleventh
-elf
-elflock
-eliad
-elinor
-elizabeth
-ell
-ell
-ellen
-elm
-eloqu
-eloqu
-els
-elsewher
-elsinor
-eltham
-elv
-elvish
-eli
-elysium
-em
-embal
-embalm
-embalm
-embark
-embark
-embarqu
-embassad
-embassag
-embassi
-embassi
-embattail
-embattl
-embattl
-embai
-embellish
-ember
-emblaz
-emblem
-emblem
-embodi
-embold
-embolden
-emboss
-emboss
-embound
-embowel
-embowel
-embrac
-embrac
-embrac
-embrac
-embrac
-embrac
-embrac
-embrasur
-embroid
-embroideri
-emhrac
-emilia
-emin
-emin
-emin
-emmanuel
-emniti
-empal
-emper
-emperess
-emperi
-emperor
-emperi
-emphasi
-empir
-empir
-empiricut
-empleach
-emploi
-emploi
-employ
-employ
-employ
-empoison
-empress
-empti
-emptier
-empti
-empti
-empti
-empti
-emul
-emul
-emul
-emul
-emul
-en
-enact
-enact
-enact
-enactur
-enamel
-enamel
-enamour
-enamour
-enanmour
-encamp
-encamp
-encav
-enceladu
-enchaf
-enchaf
-enchant
-enchant
-enchant
-enchantingli
-enchant
-enchantress
-enchant
-encha
-encircl
-encircl
-enclo
-enclos
-enclos
-enclos
-encloseth
-enclos
-encloud
-encompass
-encompass
-encompasseth
-encompass
-encor
-encorpor
-encount
-encount
-encount
-encount
-encourag
-encourag
-encourag
-encrimson
-encroach
-encumb
-end
-endamag
-endamag
-endang
-endart
-endear
-endear
-endeavour
-endeavour
-end
-ender
-end
-end
-endit
-endless
-endow
-endow
-endow
-endow
-end
-endu
-endu
-endur
-endur
-endur
-endur
-endur
-endur
-endymion
-enea
-enemi
-enemi
-enerni
-enew
-enfeebl
-enfeebl
-enfeoff
-enfett
-enfold
-enforc
-enforc
-enforc
-enforcedli
-enforc
-enforc
-enforcest
-enfranch
-enfranchi
-enfranchis
-enfranchis
-enfranchis
-enfre
-enfreedom
-engag
-engag
-engag
-engag
-engag
-engaol
-engend
-engend
-engend
-engild
-engin
-engin
-engin
-engin
-engirt
-england
-english
-englishman
-englishmen
-englut
-englut
-engraf
-engraft
-engraft
-engrav
-engrav
-engross
-engross
-engrossest
-engross
-engross
-enguard
-enigma
-enigmat
-enjoin
-enjoin
-enjoi
-enjoi
-enjoy
-enjoi
-enjoi
-enkindl
-enkindl
-enlard
-enlarg
-enlarg
-enlarg
-enlarg
-enlargeth
-enlighten
-enlink
-enmesh
-enmiti
-enmiti
-ennobl
-ennobl
-enobarb
-enobarbu
-enon
-enorm
-enorm
-enough
-enow
-enpatron
-enpierc
-enquir
-enquir
-enquir
-enrag
-enrag
-enrag
-enrag
-enrank
-enrapt
-enrich
-enrich
-enrich
-enridg
-enr
-enrob
-enrob
-enrol
-enrol
-enroot
-enround
-enschedul
-ensconc
-ensconc
-enseam
-ensear
-enseign
-enseignez
-ensembl
-enshelt
-enshield
-enshrin
-ensign
-ensign
-enski
-ensman
-ensnar
-ensnar
-ensnareth
-ensteep
-ensu
-ensu
-ensu
-ensu
-ensu
-enswath
-ent
-entail
-entam
-entangl
-entangl
-entendr
-enter
-enter
-enter
-enterpris
-enterpris
-enter
-entertain
-entertain
-entertain
-entertain
-entertain
-entertain
-enthral
-enthral
-enthron
-enthron
-entic
-entic
-entic
-entir
-entir
-entitl
-entitl
-entitl
-entomb
-entomb
-entrail
-entranc
-entranc
-entrap
-entrapp
-entr
-entreat
-entreat
-entreati
-entreat
-entreat
-entreat
-entreati
-entrench
-entri
-entwist
-envelop
-envenom
-envenom
-envenom
-envi
-envi
-enviou
-envious
-environ
-environ
-envoi
-envi
-envi
-enwheel
-enwomb
-enwrap
-ephesian
-ephesian
-ephesu
-epicur
-epicurean
-epicur
-epicur
-epicuru
-epidamnum
-epidauru
-epigram
-epilepsi
-epilept
-epilogu
-epilogu
-epistl
-epistrophu
-epitaph
-epitaph
-epithet
-epitheton
-epithet
-epitom
-equal
-equal
-equal
-equal
-equal
-equal
-equal
-equinocti
-equinox
-equipag
-equiti
-equivoc
-equivoc
-equivoc
-equivoc
-equivoc
-er
-erbear
-erbear
-erbear
-erbeat
-erblow
-erboard
-erborn
-ercam
-ercast
-ercharg
-ercharg
-ercharg
-ercl
-ercom
-ercov
-ercrow
-erdo
-er
-erebu
-erect
-erect
-erect
-erect
-erect
-erewhil
-erflourish
-erflow
-erflow
-erflow
-erfraught
-erga
-ergal
-erglanc
-ergo
-ergon
-ergrow
-ergrown
-ergrowth
-erhang
-erhang
-erhasti
-erhear
-erheard
-eringo
-erjoi
-erleap
-erleap
-erleaven
-erlook
-erlook
-ermast
-ermengar
-ermount
-ern
-ernight
-ero
-erpaid
-erpart
-erpast
-erpai
-erpeer
-erperch
-erpictur
-erpingham
-erpost
-erpow
-erpress
-erpress
-err
-errand
-errand
-errant
-errat
-erraught
-erreach
-er
-errest
-er
-erron
-error
-error
-err
-errul
-errun
-erset
-ershad
-ershad
-ershin
-ershot
-ersiz
-erskip
-erslip
-erspread
-erst
-erstar
-erstep
-erstunk
-erswai
-erswai
-erswel
-erta
-ertak
-erteem
-erthrow
-erthrown
-erthrow
-ertook
-ertop
-ertop
-ertrip
-erturn
-erudit
-erupt
-erupt
-ervalu
-erwalk
-erwatch
-erween
-erween
-erweigh
-erweigh
-erwhelm
-erwhelm
-erworn
-es
-escalu
-escap
-escap
-escap
-escap
-eschew
-escot
-esil
-especi
-especi
-esper
-espial
-espi
-espi
-espou
-espous
-espi
-esquir
-esquir
-essai
-essai
-essenc
-essenti
-essenti
-ess
-essex
-est
-establish
-establish
-estat
-estat
-esteem
-esteem
-esteemeth
-esteem
-esteem
-estim
-estim
-estim
-estim
-estim
-estrang
-estridg
-estridg
-et
-etc
-etcetera
-et
-etern
-etern
-etern
-etern
-eterniz
-et
-ethiop
-ethiop
-ethiop
-ethiopian
-etna
-eton
-etr
-eunuch
-eunuch
-euphrat
-euphroniu
-euriphil
-europa
-europ
-ev
-evad
-evad
-evan
-evas
-evas
-ev
-even
-even
-evenli
-event
-event
-event
-ever
-everlast
-everlastingli
-evermor
-everi
-everyon
-everyth
-everywher
-evid
-evid
-evid
-evil
-evilli
-evil
-evit
-ew
-ewer
-ewer
-ew
-exact
-exact
-exactest
-exact
-exact
-exact
-exactli
-exact
-exalt
-exalt
-examin
-examin
-examin
-examin
-examin
-examin
-exampl
-exampl
-exampl
-exampl
-exasper
-exasper
-exce
-exceed
-exceedeth
-exceed
-exceedingli
-exce
-excel
-excel
-excel
-excel
-excel
-excel
-excel
-excel
-excel
-except
-except
-except
-except
-except
-exceptless
-excess
-excess
-exchang
-exchang
-exchang
-exchequ
-exchequ
-excit
-excit
-excit
-excit
-exclaim
-exclaim
-exclam
-exclam
-exclud
-excommun
-excommun
-excrement
-excrement
-excurs
-excurs
-excu
-excus
-excus
-excus
-excus
-excusez
-excus
-execr
-execr
-execut
-execut
-execut
-execut
-execution
-execution
-executor
-executor
-exempt
-exempt
-exequi
-exercis
-exercis
-exet
-exeunt
-exhal
-exhal
-exhal
-exhal
-exhal
-exhaust
-exhibit
-exhibit
-exhibit
-exhort
-exhort
-exig
-exil
-exil
-exil
-exion
-exist
-exist
-exit
-exit
-exorcis
-exorc
-exorcist
-expect
-expect
-expect
-expect
-expect
-expect
-expect
-expect
-expect
-expedi
-expedi
-expedi
-expedit
-expediti
-expel
-expel
-expel
-expel
-expend
-expens
-expens
-experienc
-experi
-experi
-experi
-experiment
-experi
-expert
-expert
-expiat
-expiat
-expir
-expir
-expir
-expir
-expir
-expir
-explic
-exploit
-exploit
-expo
-expos
-expos
-exposit
-expositor
-expostul
-expostul
-expostur
-exposur
-expound
-expound
-express
-express
-expresseth
-express
-express
-expressli
-expressur
-expul
-expuls
-exquisit
-exsuffl
-extant
-extempor
-extempor
-extempor
-extend
-extend
-extend
-extent
-extenu
-extenu
-extenu
-extenu
-exterior
-exteriorli
-exterior
-extermin
-extern
-extern
-extinct
-extinct
-extinctur
-extinguish
-extirp
-extirp
-extirp
-extol
-extol
-extol
-exton
-extort
-extort
-extort
-extort
-extra
-extract
-extract
-extract
-extraordinarili
-extraordinari
-extraught
-extravag
-extravag
-extrem
-extrem
-extrem
-extremest
-extrem
-extrem
-exuent
-exult
-exult
-ey
-eya
-eyas
-ey
-eyebal
-eyebal
-eyebrow
-eyebrow
-ei
-eyeless
-eyelid
-eyelid
-ey
-eyesight
-eyestr
-ei
-eyn
-eyri
-fa
-fabian
-fabl
-fabl
-fabric
-fabul
-fac
-face
-face
-facer
-face
-faciant
-facil
-facil
-facineri
-face
-facit
-fact
-faction
-factionari
-faction
-factiou
-factor
-factor
-faculti
-faculti
-fade
-fade
-fadeth
-fadg
-fade
-fade
-fadom
-fadom
-fagot
-fagot
-fail
-fail
-fail
-fain
-faint
-faint
-fainter
-faint
-faintli
-faint
-faint
-fair
-fairer
-fairest
-fairi
-fair
-fair
-fairli
-fair
-fair
-fairwel
-fairi
-fai
-fait
-fait
-faith
-faith
-faithful
-faithfulli
-faithless
-faith
-faitor
-fal
-falchion
-falcon
-falconbridg
-falcon
-falcon
-fall
-fallaci
-fallen
-falleth
-falliabl
-fallibl
-fall
-fallow
-fallow
-fall
-falli
-falor
-fals
-falsehood
-fals
-fals
-falser
-falsifi
-fals
-falstaff
-falstaff
-falter
-fam
-fame
-fame
-familiar
-familiar
-familiarli
-familiar
-famili
-famin
-famish
-famish
-famou
-famous
-famous
-fan
-fanat
-fanci
-fanci
-fane
-fane
-fang
-fangl
-fangless
-fang
-fann
-fan
-fan
-fantasi
-fantasi
-fantast
-fantast
-fantast
-fantastico
-fantasi
-fap
-far
-farborough
-farc
-fardel
-fardel
-fare
-fare
-farewel
-farewel
-farin
-fare
-farm
-farmer
-farmhous
-farm
-farr
-farrow
-farther
-farthest
-farth
-farthingal
-farthingal
-farth
-fartuou
-fa
-fashion
-fashion
-fashion
-fashion
-fast
-fast
-fasten
-fasten
-faster
-fastest
-fast
-fastli
-fastolf
-fast
-fat
-fatal
-fatal
-fate
-fate
-fate
-father
-father
-fatherless
-fatherli
-father
-fathom
-fathomless
-fathom
-fatig
-fat
-fat
-fat
-fatter
-fattest
-fat
-fatuu
-fauconbridg
-faulconbridg
-fault
-faulti
-faultless
-fault
-faulti
-fauss
-faust
-faustus
-faut
-favor
-favor
-favor
-favor
-favour
-favour
-favour
-favouredli
-favour
-favour
-favour
-favourit
-favourit
-favour
-favout
-fawn
-fawneth
-fawn
-fawn
-fai
-fe
-fealti
-fear
-fear
-fearest
-fear
-fearful
-fearfulli
-fear
-fear
-fearless
-fear
-feast
-feast
-feast
-feast
-feat
-feat
-feater
-feather
-feather
-feather
-featli
-feat
-featur
-featur
-featur
-featureless
-featur
-februari
-feck
-fed
-fedari
-federari
-fee
-feebl
-feebl
-feebl
-feebl
-feebli
-feed
-feeder
-feeder
-feedeth
-feed
-feed
-feel
-feeler
-feel
-feelingli
-feel
-fee
-feet
-fehement
-feign
-feign
-feign
-feil
-feith
-felicit
-felic
-fell
-fellest
-felli
-fellow
-fellowli
-fellow
-fellowship
-fellowship
-fell
-felon
-feloni
-feloni
-felt
-femal
-femal
-feminin
-fen
-fenc
-fenc
-fencer
-fenc
-fend
-fennel
-fenni
-fen
-fenton
-fer
-ferdinand
-fere
-fernse
-ferrara
-ferrer
-ferret
-ferri
-ferryman
-fertil
-fertil
-fervenc
-fervour
-feri
-fest
-fest
-fester
-festin
-festin
-festiv
-festiv
-fet
-fetch
-fetch
-fetch
-fetlock
-fetlock
-fett
-fetter
-fetter
-fetter
-fettl
-feu
-feud
-fever
-fever
-fever
-few
-fewer
-fewest
-few
-fickl
-fickl
-fico
-fiction
-fiddl
-fiddler
-fiddlestick
-fidel
-fidelicet
-fidel
-fidiu
-fie
-field
-field
-field
-fiend
-fiend
-fierc
-fierc
-fierc
-fieri
-fife
-fife
-fifteen
-fifteen
-fifteenth
-fifth
-fifti
-fiftyfold
-fig
-fight
-fighter
-fightest
-fighteth
-fight
-fight
-figo
-fig
-figur
-figur
-figur
-figur
-figur
-fike
-fil
-filbert
-filch
-filch
-filch
-file
-file
-file
-filial
-filiu
-fill
-fill
-fillet
-fill
-fillip
-fill
-filli
-film
-fil
-filth
-filth
-filthi
-fin
-final
-finch
-find
-finder
-findeth
-find
-find
-find
-fine
-fineless
-fine
-finem
-fine
-finer
-fine
-finest
-fing
-finger
-finger
-finger
-fingr
-fingr
-finic
-finish
-finish
-finish
-finless
-finn
-fin
-finsburi
-fir
-firago
-fire
-firebrand
-firebrand
-fire
-fire
-firework
-firework
-fire
-firk
-firm
-firmament
-firmli
-firm
-first
-firstl
-fish
-fisher
-fishermen
-fisher
-fish
-fishifi
-fishmong
-fishpond
-fisnomi
-fist
-fist
-fist
-fistula
-fit
-fitchew
-fit
-fitli
-fitment
-fit
-fit
-fit
-fitter
-fittest
-fitteth
-fit
-fitzwat
-five
-fivep
-five
-fix
-fix
-fix
-fixeth
-fix
-fixtur
-fl
-flag
-flag
-flagon
-flagon
-flag
-flail
-flake
-flaki
-flam
-flame
-flamen
-flamen
-flame
-flame
-flaminiu
-flander
-flannel
-flap
-flare
-flash
-flash
-flash
-flask
-flat
-flatli
-flat
-flat
-flatt
-flatter
-flatter
-flatter
-flatter
-flatterest
-flatteri
-flatter
-flatter
-flatteri
-flaunt
-flavio
-flaviu
-flaw
-flaw
-flax
-flaxen
-flai
-flai
-flea
-fleanc
-flea
-fleck
-fled
-fledg
-flee
-fleec
-fleec
-fleec
-fleer
-fleer
-fleer
-fleet
-fleeter
-fleet
-fleme
-flemish
-flesh
-flesh
-fleshli
-fleshment
-fleshmong
-flew
-flexibl
-flexur
-flibbertigibbet
-flicker
-flidg
-flier
-fli
-flieth
-flight
-flight
-flighti
-flinch
-fling
-flint
-flint
-flinti
-flirt
-float
-float
-float
-flock
-flock
-flood
-floodgat
-flood
-floor
-flora
-florenc
-florentin
-florentin
-florentiu
-florizel
-flote
-floulish
-flour
-flourish
-flourish
-flourisheth
-flourish
-flout
-flout
-flout
-flout
-flow
-flow
-flower
-floweret
-flower
-flow
-flown
-flow
-fluellen
-fluent
-flung
-flush
-flush
-fluster
-flute
-flute
-flutter
-flux
-fluxiv
-fly
-fly
-fo
-foal
-foal
-foam
-foam
-foam
-foam
-foami
-fob
-foc
-fodder
-foe
-foeman
-foemen
-foe
-fog
-foggi
-fog
-foh
-foi
-foil
-foil
-foil
-foin
-foin
-foin
-foi
-foison
-foison
-foist
-foix
-fold
-fold
-fold
-folio
-folk
-folk
-folli
-follow
-follow
-follow
-follow
-followest
-follow
-follow
-folli
-fond
-fonder
-fondli
-fond
-font
-fontibel
-food
-fool
-fooleri
-fooleri
-foolhardi
-fool
-foolish
-foolishli
-foolish
-fool
-foot
-footbal
-footboi
-footboi
-foot
-footfal
-foot
-footman
-footmen
-footpath
-footstep
-footstool
-fopp
-fop
-fopperi
-foppish
-fop
-for
-forag
-forag
-forbad
-forbear
-forbear
-forbear
-forbid
-forbidden
-forbiddenli
-forbid
-forbod
-forborn
-forc
-forc
-forc
-forc
-forceless
-forc
-forcibl
-forcibl
-forc
-ford
-fordid
-fordo
-fordo
-fordon
-fore
-forecast
-forefath
-forefath
-forefing
-forego
-foregon
-forehand
-forehead
-forehead
-forehors
-foreign
-foreign
-foreign
-foreknow
-foreknowledg
-foremost
-forenam
-forenoon
-forerun
-forerunn
-forerun
-forerun
-foresaid
-foresaw
-foresai
-forese
-forese
-forese
-foreshow
-foreskirt
-foresp
-forest
-forestal
-forestal
-forest
-forest
-forest
-foretel
-foretel
-foretel
-forethink
-forethought
-foretold
-forev
-foreward
-forewarn
-forewarn
-forewarn
-forfeit
-forfeit
-forfeit
-forfeit
-forfeit
-forfeitur
-forfeitur
-forfend
-forfend
-forg
-forgav
-forg
-forg
-forgeri
-forgeri
-forg
-forget
-forget
-forget
-forget
-forget
-forget
-forgiv
-forgiven
-forgiv
-forgo
-forgo
-forgon
-forgot
-forgotten
-fork
-fork
-fork
-forlorn
-form
-formal
-formal
-form
-former
-formerli
-formless
-form
-fornic
-fornic
-fornicatress
-forr
-forrest
-forsak
-forsaken
-forsaketh
-forslow
-forsook
-forsooth
-forspent
-forspok
-forswear
-forswear
-forswor
-forsworn
-fort
-fort
-forth
-forthcom
-forthlight
-forthright
-forthwith
-fortif
-fortif
-fortifi
-fortifi
-fortifi
-fortinbra
-fortitud
-fortnight
-fortress
-fortress
-fort
-fortun
-fortuna
-fortun
-fortun
-fortun
-fortun
-fortun
-fortward
-forti
-forum
-forward
-forward
-forward
-forward
-forweari
-fosset
-fost
-foster
-foster
-fought
-foughten
-foul
-fouler
-foulest
-foulli
-foul
-found
-foundat
-foundat
-found
-founder
-fount
-fountain
-fountain
-fount
-four
-fourscor
-fourteen
-fourth
-foutra
-fowl
-fowler
-fowl
-fowl
-fox
-fox
-foxship
-fract
-fraction
-fraction
-fragil
-fragment
-fragment
-fragrant
-frail
-frailer
-frailti
-frailti
-fram
-frame
-frame
-frame
-frampold
-fran
-francai
-franc
-franc
-franchis
-franchis
-franchis
-franchis
-francia
-franci
-francisca
-franciscan
-francisco
-frank
-franker
-frankfort
-franklin
-franklin
-frankli
-frank
-frantic
-franticli
-frateretto
-fratrum
-fraud
-fraud
-fraught
-fraughtag
-fraught
-frai
-frai
-freckl
-freckl
-freckl
-frederick
-free
-freed
-freedom
-freedom
-freeheart
-freelier
-freeli
-freeman
-freemen
-freeness
-freer
-free
-freeston
-freetown
-freez
-freez
-freez
-freez
-french
-frenchman
-frenchmen
-frenchwoman
-frenzi
-frequent
-frequent
-fresh
-fresher
-fresh
-freshest
-freshli
-fresh
-fret
-fret
-fret
-fret
-fretten
-fret
-friar
-friar
-fridai
-fridai
-friend
-friend
-friend
-friendless
-friendli
-friendli
-friend
-friendship
-friendship
-friez
-fright
-fright
-frighten
-fright
-fright
-fright
-fring
-fring
-fripperi
-frisk
-fritter
-frivol
-fro
-frock
-frog
-frogmor
-froissart
-frolic
-from
-front
-front
-frontier
-frontier
-front
-frontlet
-front
-frost
-frost
-frosti
-froth
-froward
-frown
-frown
-frowningli
-frown
-froze
-frozen
-fructifi
-frugal
-fruit
-fruiter
-fruit
-fruitfulli
-fruit
-fruition
-fruitless
-fruit
-frush
-frustrat
-frutifi
-fry
-fubb
-fuel
-fugit
-fulfil
-fulfil
-fulfil
-fulfil
-full
-fullam
-fuller
-fuller
-fullest
-full
-fulli
-ful
-fulsom
-fulvia
-fum
-fumbl
-fumbl
-fumblest
-fumbl
-fume
-fume
-fume
-fumit
-fumitori
-fun
-function
-function
-fundament
-funer
-funer
-fur
-furbish
-furi
-furiou
-furlong
-furnac
-furnac
-furnish
-furnish
-furnish
-furnitur
-furniv
-furor
-furr
-furrow
-furrow
-furrow
-furth
-further
-further
-further
-furthermor
-furthest
-furi
-furz
-furz
-fust
-fustian
-fustilarian
-fusti
-fut
-futur
-futur
-g
-gabbl
-gaberdin
-gabriel
-gad
-gad
-gad
-gadshil
-gag
-gage
-gage
-gagg
-gage
-gagn
-gain
-gain
-gainer
-gaingiv
-gain
-gainsaid
-gainsai
-gainsai
-gainsai
-gainst
-gait
-gait
-galath
-gale
-galen
-gale
-gall
-gallant
-gallantli
-gallantri
-gallant
-gall
-galleri
-gallei
-gallei
-gallia
-gallian
-galliard
-galliass
-gallimaufri
-gall
-gallon
-gallop
-gallop
-gallop
-gallow
-gallowai
-gallowglass
-gallow
-gallows
-gall
-gallu
-gam
-gambol
-gambold
-gambol
-gamboi
-game
-gamer
-game
-gamesom
-gamest
-game
-gammon
-gamut
-gan
-gangren
-ganymed
-gaol
-gaoler
-gaoler
-gaol
-gap
-gape
-gape
-gape
-gar
-garb
-garbag
-garboil
-garcon
-gard
-gard
-garden
-garden
-garden
-garden
-gardez
-gardin
-gardon
-gargantua
-gargrav
-garish
-garland
-garland
-garlic
-garment
-garment
-garmet
-garner
-garner
-garnish
-garnish
-garret
-garrison
-garrison
-gart
-garter
-garterd
-garter
-garter
-gasconi
-gash
-gash
-gaskin
-gasp
-gasp
-gast
-gast
-gat
-gate
-gate
-gate
-gath
-gather
-gather
-gather
-gather
-gatori
-gatori
-gaud
-gaudeo
-gaudi
-gaug
-gaul
-gaultre
-gaunt
-gauntlet
-gauntlet
-gav
-gave
-gavest
-gawd
-gawd
-gawsei
-gai
-gay
-gaz
-gaze
-gaze
-gazer
-gazer
-gaze
-gazeth
-gaze
-gear
-geck
-gees
-geffrei
-geld
-geld
-geld
-gelida
-gelidu
-gelt
-gem
-gemini
-gem
-gen
-gender
-gender
-gener
-gener
-gener
-gener
-gener
-gener
-generos
-gener
-genit
-genitivo
-geniu
-gennet
-genoa
-genoux
-gen
-gent
-gentilhomm
-gentil
-gentl
-gentlefolk
-gentleman
-gentlemanlik
-gentlemen
-gentl
-gentler
-gentl
-gentlest
-gentlewoman
-gentlewomen
-gentli
-gentri
-georg
-gerard
-germain
-germain
-german
-german
-german
-germani
-gertrud
-gest
-gest
-gestur
-gestur
-get
-getrud
-get
-getter
-get
-ghastli
-ghost
-ghost
-ghostli
-ghost
-gi
-giant
-giantess
-giantlik
-giant
-gib
-gibber
-gibbet
-gibbet
-gibe
-giber
-gibe
-gibe
-gibingli
-giddili
-giddi
-giddi
-gift
-gift
-gig
-giglet
-giglot
-gilbert
-gild
-gild
-gild
-gilliam
-gillian
-gill
-gillyvor
-gilt
-gimmal
-gimmer
-gin
-ging
-ginger
-gingerbread
-gingerli
-ginn
-gin
-gioucestershir
-gipe
-gipsi
-gipsi
-gird
-gird
-girdl
-girdl
-girdl
-girdl
-girl
-girl
-girt
-girth
-gi
-giv
-give
-given
-giver
-giver
-give
-givest
-giveth
-give
-give
-glad
-glad
-glad
-gladli
-glad
-glami
-glanc
-glanc
-glanc
-glanc
-glanc
-glander
-glansdal
-glare
-glare
-glass
-glass
-glassi
-glaz
-glaze
-gleam
-glean
-glean
-glean
-gleeful
-gleek
-gleek
-gleek
-glend
-glendow
-glib
-glide
-glide
-glide
-glideth
-glide
-glimmer
-glimmer
-glimmer
-glimps
-glimps
-glist
-glisten
-glister
-glister
-glister
-glitt
-glitter
-globe
-globe
-gloom
-gloomi
-glori
-glorifi
-glorifi
-gloriou
-glorious
-glori
-glose
-gloss
-gloss
-glou
-gloucest
-gloucest
-gloucestershir
-glove
-glover
-glove
-glow
-glow
-glow
-glowworm
-gloz
-gloze
-gloze
-glu
-glue
-glu
-glue
-glut
-glutt
-glut
-glutton
-glutton
-gluttoni
-gnarl
-gnarl
-gnat
-gnat
-gnaw
-gnaw
-gnawn
-gnaw
-go
-goad
-goad
-goad
-goal
-goat
-goatish
-goat
-gobbet
-gobbo
-goblet
-goblet
-goblin
-goblin
-god
-god
-godden
-goddess
-goddess
-goddild
-godfath
-godfath
-godhead
-godlik
-godli
-godli
-godmoth
-god
-godson
-goer
-goer
-goe
-goest
-goeth
-goff
-gog
-go
-gold
-golden
-goldenli
-goldsmith
-goldsmith
-golgotha
-golias
-goliath
-gon
-gondola
-gondoli
-gone
-goneril
-gong
-gonzago
-gonzalo
-good
-goodfellow
-goodlier
-goodliest
-goodli
-goodman
-good
-goodnight
-goodrig
-good
-goodwif
-goodwil
-goodwin
-goodwin
-goodyear
-goodyear
-goos
-gooseberri
-goosequil
-goot
-gor
-gorbelli
-gorboduc
-gordian
-gore
-gore
-gorg
-gorg
-gorgeou
-gorget
-gorg
-gorgon
-gormand
-gormand
-gori
-gosl
-gospel
-gospel
-goss
-gossam
-gossip
-gossip
-gossiplik
-gossip
-got
-goth
-goth
-gotten
-gourd
-gout
-gout
-gouti
-govern
-govern
-govern
-gover
-govern
-governor
-governor
-govern
-gower
-gown
-gown
-grac
-grace
-grace
-grace
-gracefulli
-graceless
-grace
-grace
-graciou
-gracious
-gradat
-graff
-graf
-graft
-graft
-grafter
-grain
-grain
-grain
-gramerci
-gramerci
-grammar
-grand
-grandam
-grandam
-grandchild
-grand
-grandeur
-grandfath
-grandjuror
-grandmoth
-grandpr
-grandsir
-grandsir
-grandsir
-grang
-grant
-grant
-grant
-grant
-grape
-grape
-grappl
-grappl
-grappl
-grasp
-grasp
-grasp
-grass
-grasshopp
-grassi
-grate
-grate
-grate
-grate
-gratiano
-gratifi
-gratii
-gratil
-grate
-grati
-gratitud
-gratul
-grav
-grave
-gravedigg
-gravel
-graveless
-gravel
-grave
-graven
-grave
-graver
-grave
-gravest
-graveston
-graviti
-graviti
-gravi
-grai
-graymalkin
-graz
-graze
-graze
-graze
-greas
-greas
-greasili
-greasi
-great
-greater
-greatest
-greatli
-great
-grecian
-grecian
-gree
-greec
-greed
-greedili
-greedi
-greedi
-gree
-greek
-greekish
-greek
-green
-greener
-greenli
-green
-greensleev
-greenwich
-greenwood
-greet
-greet
-greet
-greet
-greet
-greg
-gregori
-gremio
-grew
-grei
-greybeard
-greybeard
-greyhound
-greyhound
-grief
-grief
-griev
-grievanc
-grievanc
-griev
-griev
-griev
-grievest
-griev
-grievingli
-grievou
-grievous
-griffin
-griffith
-grim
-grime
-grimli
-grin
-grind
-grind
-grindston
-grin
-grip
-gripe
-gripe
-gripe
-grise
-grisli
-grissel
-grize
-grizzl
-grizzl
-groan
-groan
-groan
-groat
-groat
-groin
-groom
-groom
-grop
-grope
-gro
-gross
-grosser
-grossli
-gross
-ground
-ground
-groundl
-ground
-grove
-grovel
-grovel
-grove
-grow
-groweth
-grow
-grown
-grow
-growth
-grub
-grubb
-grub
-grudg
-grudg
-grudg
-grudg
-gruel
-grumbl
-grumblest
-grumbl
-grumbl
-grumio
-grund
-grunt
-gualtier
-guard
-guardag
-guardant
-guard
-guardian
-guardian
-guard
-guardsman
-gud
-gudgeon
-guerdon
-guerra
-guess
-guess
-guessingli
-guest
-guest
-guiana
-guichard
-guid
-guid
-guider
-guideriu
-guid
-guid
-guidon
-guienn
-guil
-guildenstern
-guilder
-guildford
-guildhal
-guil
-guil
-guil
-guilford
-guilt
-guiltian
-guiltier
-guiltili
-guilti
-guiltless
-guilt
-guilti
-guinea
-guinev
-guis
-gul
-gule
-gulf
-gulf
-gull
-gull
-gum
-gumm
-gum
-gun
-gunner
-gunpowd
-gun
-gurnet
-gurnei
-gust
-gust
-gusti
-gut
-gutter
-gui
-guyn
-guysor
-gypsi
-gyve
-gyve
-gyve
-h
-ha
-haberdash
-habili
-habili
-habit
-habit
-habit
-habit
-habitud
-hack
-hacket
-hacknei
-hack
-had
-hadst
-haec
-haer
-hag
-hagar
-haggard
-haggard
-haggish
-haggl
-hag
-hail
-hail
-hailston
-hailston
-hair
-hairless
-hair
-hairi
-hal
-halberd
-halberd
-halcyon
-hale
-hale
-hale
-half
-halfcan
-halfpenc
-halfpenni
-halfpennyworth
-halfwai
-halidom
-hall
-halloa
-hallo
-hallond
-halloo
-halloo
-hallow
-hallow
-hallowma
-hallown
-hal
-halt
-halter
-halter
-halt
-halt
-halv
-ham
-hame
-hamlet
-hammer
-hammer
-hammer
-hammer
-hamper
-hampton
-ham
-hamstr
-hand
-hand
-hand
-handicraft
-handicraftsmen
-hand
-handiwork
-handkerch
-handkerch
-handkerchief
-handl
-handl
-handl
-handless
-handlest
-handl
-handmaid
-handmaid
-hand
-handsaw
-handsom
-handsom
-handsom
-handwrit
-handi
-hang
-hang
-hanger
-hangeth
-hang
-hang
-hangman
-hangmen
-hang
-hannib
-hap
-hapless
-hapli
-happ
-happen
-happen
-happier
-happi
-happiest
-happili
-happi
-happi
-hap
-harbing
-harbing
-harbor
-harbour
-harbourag
-harbour
-harbour
-harcourt
-hard
-harder
-hardest
-hardiest
-hardiment
-hardi
-hardli
-hard
-hardock
-hardi
-hare
-harelip
-hare
-harfleur
-hark
-harlot
-harlotri
-harlot
-harm
-harm
-harm
-harm
-harmless
-harmoni
-harmoni
-harm
-har
-harp
-harper
-harpier
-harp
-harpi
-harri
-harrow
-harrow
-harri
-harsh
-harshli
-harsh
-hart
-hart
-harum
-harvest
-ha
-hast
-hast
-hast
-hasten
-hast
-hastili
-hast
-hast
-hasti
-hat
-hatch
-hatch
-hatchet
-hatch
-hatchment
-hate
-hate
-hate
-hater
-hater
-hate
-hateth
-hatfield
-hath
-hate
-hatr
-hat
-haud
-hauf
-haught
-haughti
-haughti
-haunch
-haunch
-haunt
-haunt
-haunt
-haunt
-hautboi
-hautboi
-have
-haven
-haven
-haver
-have
-have
-havior
-haviour
-havoc
-hawk
-hawk
-hawk
-hawthorn
-hawthorn
-hai
-hazard
-hazard
-hazard
-hazel
-hazelnut
-he
-head
-headborough
-head
-headier
-head
-headland
-headless
-headlong
-head
-headsman
-headstrong
-headi
-heal
-heal
-heal
-heal
-health
-health
-health
-healthsom
-healthi
-heap
-heap
-heap
-hear
-heard
-hearer
-hearer
-hearest
-heareth
-hear
-hear
-heark
-hearken
-hearken
-hear
-hearsai
-hears
-hears
-hearst
-heart
-heartach
-heartbreak
-heartbreak
-heart
-hearten
-hearth
-hearth
-heartili
-hearti
-heartless
-heartl
-heartli
-heart
-heartsick
-heartstr
-hearti
-heat
-heat
-heath
-heathen
-heathenish
-heat
-heat
-heauti
-heav
-heav
-heav
-heaven
-heavenli
-heaven
-heav
-heavier
-heaviest
-heavili
-heavi
-heav
-heav
-heavi
-hebona
-hebrew
-hecat
-hectic
-hector
-hector
-hecuba
-hedg
-hedg
-hedgehog
-hedgehog
-hedg
-heed
-heed
-heed
-heedful
-heedfulli
-heedless
-heel
-heel
-heft
-heft
-heifer
-heifer
-heigh
-height
-heighten
-heinou
-heinous
-heir
-heiress
-heirless
-heir
-held
-helen
-helena
-helenu
-helia
-helicon
-hell
-hellespont
-hellfir
-hellish
-helm
-helm
-helmet
-helmet
-helm
-help
-helper
-helper
-help
-help
-helpless
-help
-helter
-hem
-heme
-hemlock
-hemm
-hemp
-hempen
-hem
-hen
-henc
-henceforth
-henceforward
-henchman
-henri
-henricu
-henri
-hen
-hent
-henton
-her
-herald
-heraldri
-herald
-herb
-herbert
-herblet
-herb
-herculean
-hercul
-herd
-herd
-herdsman
-herdsmen
-here
-hereabout
-hereabout
-hereaft
-herebi
-hereditari
-hereford
-herefordshir
-herein
-hereof
-heresi
-heresi
-heret
-heret
-hereto
-hereupon
-heritag
-heriti
-herm
-hermia
-hermion
-hermit
-hermitag
-hermit
-hern
-hero
-herod
-herod
-hero
-heroic
-heroic
-her
-her
-her
-herself
-hesperid
-hesperu
-hest
-hest
-heur
-heureux
-hew
-hewgh
-hew
-hewn
-hew
-hei
-heydai
-hibocr
-hic
-hiccup
-hick
-hid
-hidden
-hide
-hideou
-hideous
-hideous
-hide
-hidest
-hide
-hie
-hi
-hiem
-hi
-hig
-high
-higher
-highest
-highli
-highmost
-high
-hight
-highwai
-highwai
-hild
-hild
-hill
-hillo
-hilloa
-hill
-hilt
-hilt
-hili
-him
-himself
-hinc
-hincklei
-hind
-hinder
-hinder
-hinder
-hindmost
-hind
-hing
-hing
-hing
-hint
-hip
-hipp
-hipparchu
-hippolyta
-hip
-hir
-hire
-hire
-hiren
-hirtiu
-hi
-hisperia
-hiss
-hiss
-hiss
-hist
-histor
-histori
-hit
-hither
-hitherto
-hitherward
-hitherward
-hit
-hit
-hive
-hive
-hizz
-ho
-hoa
-hoar
-hoard
-hoard
-hoard
-hoar
-hoars
-hoari
-hob
-hobbidid
-hobbi
-hobbyhors
-hobgoblin
-hobnail
-hoc
-hod
-hodg
-hog
-hog
-hogshead
-hogshead
-hoi
-hois
-hoist
-hoist
-hoist
-holborn
-hold
-holden
-holder
-holdeth
-holdfast
-hold
-hold
-hole
-hole
-holidam
-holidam
-holidai
-holidai
-holier
-holiest
-holili
-holi
-holla
-holland
-holland
-holland
-holloa
-holloa
-hollow
-hollowli
-hollow
-holli
-holmedon
-holofern
-holp
-holi
-homag
-homag
-home
-home
-home
-homespun
-homeward
-homeward
-homicid
-homicid
-homili
-hominem
-homm
-homo
-honest
-honest
-honestest
-honestli
-honesti
-honei
-honeycomb
-honei
-honeyless
-honeysuckl
-honeysuckl
-honi
-honneur
-honor
-honor
-honor
-honorato
-honorificabilitudinitatibu
-honor
-honour
-honour
-honour
-honour
-honourest
-honour
-honour
-honour
-hoo
-hood
-hood
-hoodman
-hood
-hoodwink
-hoof
-hoof
-hook
-hook
-hook
-hoop
-hoop
-hoot
-hoot
-hoot
-hoot
-hop
-hope
-hope
-hopeless
-hope
-hopest
-hope
-hopkin
-hopped
-hor
-horac
-horatio
-horizon
-horn
-hornbook
-horn
-horner
-horn
-hornpip
-horn
-horolog
-horribl
-horribl
-horrid
-horrid
-horridli
-horror
-horror
-hor
-hors
-horseback
-hors
-horsehair
-horseman
-horsemanship
-horsemen
-hors
-horsewai
-hors
-hortensio
-hortensiu
-horum
-hose
-hospit
-hospit
-hospit
-host
-hostag
-hostag
-hostess
-hostil
-hostil
-hostiliu
-host
-hot
-hotli
-hotspur
-hotter
-hottest
-hound
-hound
-hour
-hourli
-hour
-hou
-hous
-household
-household
-household
-household
-housekeep
-housekeep
-housekeep
-houseless
-hous
-housewif
-housewiferi
-housew
-hovel
-hover
-hover
-hover
-hover
-how
-howbeit
-how
-howeer
-howev
-howl
-howl
-howlet
-howl
-howl
-howso
-howsoev
-howsom
-hox
-hoi
-hoydai
-hubert
-huddl
-huddl
-hue
-hu
-hue
-hug
-huge
-huge
-huge
-hugg
-hugger
-hugh
-hug
-huju
-hulk
-hulk
-hull
-hull
-hullo
-hum
-human
-human
-human
-human
-humbl
-humbl
-humbl
-humbler
-humbl
-humblest
-humbl
-humbl
-hume
-humh
-humid
-humil
-hum
-humor
-humor
-humor
-humour
-humourist
-humour
-humphrei
-humphri
-hum
-hundr
-hundr
-hundredth
-hung
-hungarian
-hungari
-hunger
-hungerford
-hungerli
-hungri
-hunt
-hunt
-hunter
-hunter
-hunteth
-hunt
-huntington
-huntress
-hunt
-huntsman
-huntsmen
-hurdl
-hurl
-hurl
-hurl
-hurli
-hurlyburli
-hurricano
-hurricano
-hurri
-hurri
-hurri
-hurt
-hurt
-hurtl
-hurtless
-hurtl
-hurt
-husband
-husband
-husbandless
-husbandri
-husband
-hush
-hush
-husht
-husk
-huswif
-huswif
-hutch
-hybla
-hydra
-hyen
-hymen
-hymenaeu
-hymn
-hymn
-hyperbol
-hyperbol
-hyperion
-hypocrisi
-hypocrit
-hypocrit
-hyrcan
-hyrcania
-hyrcanian
-hyssop
-hysterica
-i
-iachimo
-iaculi
-iago
-iament
-ibat
-icaru
-ic
-iceland
-ici
-icicl
-icicl
-ici
-idea
-idea
-idem
-iden
-id
-idiot
-idiot
-idl
-idl
-idl
-idli
-idol
-idolatr
-idolatri
-ield
-if
-if
-igni
-ignobl
-ignobl
-ignomini
-ignomini
-ignomi
-ignor
-ignor
-ii
-iii
-iiii
-il
-ilbow
-ild
-ilion
-ilium
-ill
-illegitim
-illiter
-ill
-illo
-ill
-illum
-illumin
-illumin
-illumineth
-illus
-illus
-illustr
-illustr
-illustri
-illyria
-illyrian
-il
-im
-imag
-imageri
-imag
-imagin
-imaginari
-imagin
-imagin
-imagin
-imagin
-imagin
-imbar
-imbecil
-imbru
-imitari
-imit
-imit
-imit
-imit
-immacul
-imman
-immask
-immateri
-immediaci
-immedi
-immedi
-immin
-immin
-immoder
-immoder
-immodest
-immoment
-immort
-immortaliz
-immort
-immur
-immur
-immur
-imogen
-imp
-impaint
-impair
-impair
-impal
-impal
-impanel
-impart
-impart
-imparti
-impart
-impart
-impast
-impati
-impati
-impati
-impawn
-impeach
-impeach
-impeach
-impeach
-imped
-impedi
-impedi
-impenetr
-imper
-imperceiver
-imperfect
-imperfect
-imperfect
-imperfectli
-imperi
-imperi
-imperi
-impertin
-impertin
-impetico
-impetuos
-impetu
-impieti
-impieti
-impiou
-implac
-implement
-impli
-implor
-implor
-implor
-implor
-implor
-impon
-import
-import
-import
-import
-importantli
-import
-importeth
-import
-importless
-import
-importun
-importunaci
-importun
-importun
-importun
-importun
-impo
-impos
-impos
-imposit
-imposit
-imposs
-imposs
-imposs
-imposthum
-impostor
-impostor
-impot
-impot
-impound
-impregn
-impres
-impress
-impress
-impressest
-impress
-impressur
-imprimendum
-imprimi
-imprint
-imprint
-imprison
-imprison
-imprison
-imprison
-improb
-improp
-improv
-improvid
-impud
-impud
-impud
-impud
-impudiqu
-impugn
-impugn
-impur
-imput
-imput
-in
-inaccess
-inaid
-inaud
-inauspici
-incag
-incant
-incap
-incardin
-incarnadin
-incarn
-incarn
-incen
-incens
-incens
-incens
-incens
-incens
-incertain
-incertainti
-incertainti
-incess
-incessantli
-incest
-incestu
-inch
-incharit
-inch
-incid
-incid
-incis
-incit
-incit
-incivil
-incivil
-inclin
-inclin
-inclin
-inclin
-inclin
-inclin
-inclin
-inclip
-includ
-includ
-includ
-inclus
-incompar
-incomprehens
-inconsider
-inconst
-inconst
-incontin
-incontin
-incontin
-inconveni
-inconveni
-inconveni
-inconi
-incorpor
-incorp
-incorrect
-increa
-increas
-increas
-increaseth
-increas
-incred
-incredul
-incur
-incur
-incurr
-incur
-incurs
-ind
-ind
-indebt
-inde
-indent
-indent
-indentur
-indentur
-index
-index
-india
-indian
-indict
-indict
-indict
-indi
-indiffer
-indiffer
-indiffer
-indig
-indigest
-indigest
-indign
-indign
-indign
-indign
-indign
-indign
-indirect
-indirect
-indirect
-indirectli
-indiscreet
-indiscret
-indispo
-indisposit
-indissolubl
-indistinct
-indistinguish
-indistinguish
-indit
-individ
-indrench
-indu
-indubit
-induc
-induc
-induc
-induc
-induct
-induct
-indu
-indu
-indu
-indulg
-indulg
-indulg
-indur
-industri
-industri
-industri
-inequ
-inestim
-inevit
-inexecr
-inexor
-inexplic
-infal
-infal
-infamon
-infam
-infami
-infanc
-infant
-infant
-infect
-infect
-infect
-infect
-infect
-infecti
-infecti
-infect
-infer
-infer
-inferior
-inferior
-infern
-inferr
-inferreth
-infer
-infest
-infidel
-infidel
-infinit
-infinit
-infinit
-infirm
-infirm
-infirm
-infix
-infix
-inflam
-inflam
-inflam
-inflamm
-inflict
-inflict
-influenc
-influenc
-infold
-inform
-inform
-inform
-inform
-inform
-inform
-inform
-infortun
-infr
-infring
-infring
-infu
-infus
-infus
-infus
-infus
-ingen
-ingeni
-ingeni
-inglori
-ingot
-ingraf
-ingraft
-ingrat
-ingrat
-ingrat
-ingratitud
-ingratitud
-ingredi
-ingredi
-ingross
-inhabit
-inhabit
-inhabit
-inhabit
-inhabit
-inhears
-inhears
-inher
-inherit
-inherit
-inherit
-inherit
-inheritor
-inheritor
-inheritrix
-inherit
-inhibit
-inhibit
-inhoop
-inhuman
-iniqu
-iniqu
-initi
-injoint
-injunct
-injunct
-injur
-injur
-injur
-injuri
-injuri
-injuri
-injustic
-ink
-inkhorn
-inkl
-inkl
-inkl
-inki
-inlaid
-inland
-inlai
-inli
-inmost
-inn
-inner
-innkeep
-innoc
-innoc
-innoc
-innoc
-innov
-innov
-inn
-innumer
-inocul
-inordin
-inprimi
-inquir
-inquir
-inquiri
-inquisit
-inquisit
-inroad
-insan
-insani
-insati
-insconc
-inscrib
-inscript
-inscript
-inscrol
-inscrut
-insculp
-insculptur
-insens
-insepar
-insepar
-insert
-insert
-inset
-inshel
-inshipp
-insid
-insinew
-insinu
-insinuateth
-insinu
-insinu
-insist
-insist
-insistur
-insoci
-insol
-insol
-insomuch
-inspir
-inspir
-inspir
-inspir
-inspir
-instal
-instal
-instal
-instanc
-instanc
-instant
-instantli
-instat
-instead
-insteep
-instig
-instig
-instig
-instig
-instig
-instinct
-instinct
-institut
-institut
-instruct
-instruct
-instruct
-instruct
-instruct
-instrument
-instrument
-instrument
-insubstanti
-insuffici
-insuffici
-insult
-insult
-insult
-insult
-insult
-insupport
-insuppress
-insurrect
-insurrect
-int
-integ
-integrita
-integr
-intellect
-intellect
-intellectu
-intellig
-intelligenc
-intelligenc
-intellig
-intelligi
-intelligo
-intemper
-intemper
-intend
-intend
-intendeth
-intend
-intend
-intend
-inten
-intent
-intent
-intent
-intent
-inter
-intercept
-intercept
-intercept
-intercept
-intercept
-intercess
-intercessor
-interchain
-interchang
-interchang
-interchang
-interchang
-interchang
-interdict
-interest
-interim
-interim
-interior
-interject
-interjoin
-interlud
-intermingl
-intermiss
-intermiss
-intermit
-intermix
-intermix
-interpos
-interpos
-interpos
-interpret
-interpret
-interpret
-interpret
-interpret
-interpret
-interr
-inter
-interrogatori
-interrupt
-interrupt
-interrupt
-interruptest
-interrupt
-interrupt
-intertissu
-intervallum
-interview
-intest
-intestin
-intil
-intim
-intim
-intitl
-intitul
-into
-intoler
-intox
-intreasur
-intreat
-intrench
-intrench
-intric
-intrins
-intrins
-intrud
-intrud
-intrud
-intrus
-inund
-inur
-inurn
-invad
-invad
-invas
-invas
-invect
-invect
-inveigl
-invent
-invent
-invent
-invent
-inventor
-inventori
-inventori
-inventor
-inventori
-inver
-invert
-invest
-invest
-invest
-invest
-inveter
-invinc
-inviol
-invis
-invis
-invit
-invit
-invit
-invit
-invit
-inviti
-invoc
-invoc
-invok
-invok
-invulner
-inward
-inwardli
-inward
-inward
-ionia
-ionian
-ips
-ipswich
-ira
-ira
-ira
-ir
-ir
-ireland
-iri
-irish
-irishman
-irishmen
-irk
-irksom
-iron
-iron
-irreconcil
-irrecover
-irregular
-irregul
-irreligi
-irremov
-irrepar
-irresolut
-irrevoc
-is
-isabel
-isabella
-isbel
-isbel
-iscariot
-is
-ish
-isidor
-isi
-island
-island
-island
-island
-isl
-isl
-israel
-issu
-issu
-issu
-issueless
-issu
-issu
-ist
-ista
-it
-italian
-itali
-itch
-itch
-itch
-item
-item
-iter
-ithaca
-it
-itself
-itshal
-iv
-ivori
-ivi
-iwi
-ix
-j
-jacet
-jack
-jackanap
-jack
-jacksauc
-jackslav
-jacob
-jade
-jade
-jade
-jail
-jake
-jamani
-jame
-jami
-jane
-jangl
-jangl
-januari
-janu
-japhet
-jaquenetta
-jaqu
-jar
-jar
-jar
-jarteer
-jason
-jaunc
-jaunc
-jaundic
-jaundi
-jaw
-jawbon
-jaw
-jai
-jai
-jc
-je
-jealou
-jealousi
-jealousi
-jeer
-jeer
-jelli
-jenni
-jeopardi
-jephtha
-jephthah
-jerkin
-jerkin
-jerk
-jeronimi
-jerusalem
-jeshu
-jess
-jessica
-jest
-jest
-jester
-jester
-jest
-jest
-jesu
-jesu
-jet
-jet
-jew
-jewel
-jewel
-jewel
-jewess
-jewish
-jewri
-jew
-jezebel
-jig
-jig
-jill
-jill
-jingl
-joan
-job
-jockei
-jocund
-jog
-jog
-john
-john
-join
-joinder
-join
-joiner
-joineth
-join
-joint
-joint
-joint
-jointli
-jointress
-joint
-jointur
-jolliti
-jolli
-jolt
-jolthead
-jordan
-joseph
-joshua
-jot
-jour
-jourdain
-journal
-journei
-journei
-journeyman
-journeymen
-journei
-jove
-jovem
-jovial
-jowl
-jowl
-joi
-joi
-joy
-joyfulli
-joyless
-joyou
-joi
-juan
-jud
-juda
-judas
-jude
-judg
-judg
-judg
-judgement
-judg
-judgest
-judg
-judgment
-judgment
-judici
-jug
-juggl
-juggl
-juggler
-juggler
-juggl
-jug
-juic
-juic
-jul
-jule
-julia
-juliet
-julietta
-julio
-juliu
-juli
-jump
-jumpeth
-jump
-jump
-june
-june
-junior
-juniu
-junket
-juno
-jupit
-jure
-jurement
-jurisdict
-juror
-juror
-juri
-jurymen
-just
-justeiu
-justest
-justic
-justic
-justic
-justic
-justif
-justifi
-justifi
-justl
-justl
-justl
-justl
-justli
-just
-just
-jut
-jutti
-juven
-kam
-kate
-kate
-kate
-katharin
-katherina
-katherin
-kecksi
-keech
-keel
-keel
-keen
-keen
-keep
-keepdown
-keeper
-keeper
-keepest
-keep
-keep
-keiser
-ken
-kendal
-kennel
-kent
-kentish
-kentishman
-kentishmen
-kept
-kerchief
-kere
-kern
-kernal
-kernel
-kernel
-kern
-kersei
-kettl
-kettledrum
-kettledrum
-kei
-kei
-kibe
-kibe
-kick
-kick
-kickshaw
-kickshaws
-kicki
-kid
-kidnei
-kike
-kildar
-kill
-kill
-killer
-killeth
-kill
-killingworth
-kill
-kiln
-kimbolton
-kin
-kind
-kinder
-kindest
-kindl
-kindl
-kindless
-kindlier
-kindl
-kindli
-kind
-kind
-kindr
-kindr
-kind
-kine
-king
-kingdom
-kingdom
-kingli
-king
-kinr
-kin
-kinsman
-kinsmen
-kinswoman
-kirtl
-kirtl
-kiss
-kiss
-kiss
-kiss
-kitchen
-kitchen
-kite
-kite
-kitten
-kj
-kl
-klll
-knack
-knack
-knapp
-knav
-knave
-knaveri
-knaveri
-knave
-knavish
-knead
-knead
-knead
-knee
-kneel
-kneel
-kneel
-knee
-knell
-knew
-knewest
-knife
-knight
-knight
-knighthood
-knighthood
-knightli
-knight
-knit
-knit
-knitter
-knitteth
-knive
-knob
-knock
-knock
-knock
-knog
-knoll
-knot
-knot
-knot
-knotti
-know
-knower
-knowest
-know
-knowingli
-know
-knowledg
-known
-know
-l
-la
-laban
-label
-label
-labienu
-labio
-labor
-labor
-labor
-labour
-labour
-labour
-labour
-labour
-labour
-laboursom
-labra
-labyrinth
-lac
-lace
-lace
-lacedaemon
-lace
-laci
-lack
-lackbeard
-lack
-lackei
-lackei
-lackei
-lack
-lack
-lad
-ladder
-ladder
-lade
-laden
-ladi
-lade
-lad
-ladi
-ladybird
-ladyship
-ladyship
-laer
-laert
-lafeu
-lag
-lag
-laid
-lain
-laissez
-lake
-lake
-lakin
-lam
-lamb
-lambert
-lambkin
-lambkin
-lamb
-lame
-lame
-lame
-lament
-lament
-lament
-lament
-lament
-lament
-lament
-lament
-lament
-lame
-lame
-lamma
-lammastid
-lamound
-lamp
-lampass
-lamp
-lanc
-lancast
-lanc
-lanc
-lanceth
-lanch
-land
-land
-land
-landless
-landlord
-landmen
-land
-lane
-lane
-langag
-langlei
-langton
-languag
-languageless
-languag
-langu
-languish
-languish
-languish
-languish
-languish
-languish
-languor
-lank
-lantern
-lantern
-lanthorn
-lap
-lapi
-lapland
-lapp
-lap
-laps
-laps
-laps
-lapw
-laquai
-lard
-larder
-lard
-lard
-larg
-larg
-larg
-larger
-largess
-largest
-lark
-lark
-larron
-lartiu
-larum
-larum
-la
-lascivi
-lash
-lass
-lass
-last
-last
-last
-lastli
-last
-latch
-latch
-late
-late
-late
-later
-latest
-lath
-latin
-latten
-latter
-lattic
-laud
-laudabl
-laudi
-laugh
-laughabl
-laugh
-laugher
-laughest
-laugh
-laugh
-laughter
-launc
-launcelot
-launc
-launch
-laund
-laundress
-laundri
-laur
-laura
-laurel
-laurel
-laurenc
-lau
-lavach
-lave
-lave
-lavend
-lavina
-lavinia
-lavish
-lavishli
-lavolt
-lavolta
-law
-law
-lawfulli
-lawless
-lawlessli
-lawn
-lawn
-lawrenc
-law
-lawyer
-lawyer
-lai
-layer
-layest
-lai
-lai
-lazar
-lazar
-lazaru
-lazi
-lc
-ld
-ldst
-le
-lead
-leaden
-leader
-leader
-leadest
-lead
-lead
-leaf
-leagu
-leagu
-leagu
-leaguer
-leagu
-leah
-leak
-leaki
-lean
-leander
-leaner
-lean
-lean
-lean
-leap
-leap
-leap
-leap
-leapt
-lear
-learn
-learn
-learnedli
-learn
-learn
-learn
-learnt
-lea
-leas
-leas
-leash
-leas
-least
-leather
-leathern
-leav
-leav
-leaven
-leaven
-leaver
-leav
-leav
-leavi
-lecher
-lecher
-lecher
-lecheri
-lecon
-lectur
-lectur
-led
-leda
-leech
-leech
-leek
-leek
-leer
-leer
-lee
-lees
-leet
-leet
-left
-leg
-legaci
-legaci
-legat
-legatin
-lege
-leger
-lege
-legg
-legion
-legion
-legitim
-legitim
-leg
-leicest
-leicestershir
-leiger
-leiger
-leisur
-leisur
-leisur
-leman
-lemon
-lena
-lend
-lender
-lend
-lend
-lend
-length
-lengthen
-lengthen
-length
-leniti
-lennox
-lent
-lenten
-lentu
-leo
-leon
-leonardo
-leonati
-leonato
-leonatu
-leont
-leopard
-leopard
-leper
-leper
-lepidu
-leprosi
-lequel
-ler
-le
-less
-lessen
-lessen
-lesser
-lesson
-lesson
-lesson
-lest
-lestrak
-let
-lethargi
-lethargi
-lethargi
-leth
-let
-lett
-letter
-letter
-let
-lettuc
-leur
-leve
-level
-level
-level
-level
-leven
-lever
-leviathan
-leviathan
-levi
-levi
-leviti
-levi
-levi
-lewd
-lewdli
-lewd
-lewdster
-lewi
-liabl
-liar
-liar
-libbard
-libel
-libel
-liber
-liber
-libert
-liberti
-libertin
-libertin
-liberti
-librari
-libya
-licenc
-licen
-licens
-licenti
-licha
-licio
-lick
-lick
-licker
-lictor
-lid
-lid
-lie
-li
-lief
-liefest
-lieg
-liegeman
-liegemen
-lien
-li
-liest
-lieth
-lieu
-lieuten
-lieutenantri
-lieuten
-liev
-life
-lifeblood
-lifeless
-lifel
-lift
-lift
-lifter
-lifteth
-lift
-lift
-lig
-ligariu
-liggen
-light
-light
-lighten
-lighten
-lighter
-lightest
-lightli
-light
-lightn
-lightn
-light
-lik
-like
-like
-likeliest
-likelihood
-likelihood
-like
-like
-liker
-like
-likest
-likewis
-like
-like
-lili
-lili
-lim
-limand
-limb
-limbeck
-limbeck
-limber
-limbo
-limb
-lime
-lime
-limehous
-limekiln
-limit
-limit
-limit
-limit
-limn
-limp
-limp
-limp
-lin
-lincoln
-lincolnshir
-line
-lineal
-lineal
-lineament
-lineament
-line
-linen
-linen
-line
-ling
-lingar
-linger
-linger
-linger
-linguist
-line
-link
-link
-linsei
-linstock
-linta
-lion
-lionel
-lioness
-lion
-lip
-lipp
-lip
-lipsburi
-liquid
-liquor
-liquorish
-liquor
-lirra
-lisbon
-lisp
-lisp
-list
-listen
-listen
-list
-literatur
-lither
-litter
-littl
-littlest
-liv
-live
-live
-liveli
-livelihood
-livelong
-live
-liver
-liveri
-liver
-liveri
-live
-livest
-liveth
-livia
-live
-live
-lizard
-lizard
-ll
-lll
-llou
-lnd
-lo
-loa
-loach
-load
-loaden
-load
-load
-loaf
-loam
-loan
-loath
-loath
-loath
-loather
-loath
-loath
-loathli
-loath
-loathsom
-loathsom
-loathsomest
-loav
-lob
-lobbi
-lobbi
-local
-lochab
-lock
-lock
-lock
-lockram
-lock
-locust
-lode
-lodg
-lodg
-lodg
-lodger
-lodg
-lodg
-lodg
-lodovico
-lodowick
-lofti
-log
-logger
-loggerhead
-loggerhead
-logget
-logic
-log
-loin
-loiter
-loiter
-loiter
-loiter
-loll
-loll
-lombardi
-london
-london
-lone
-loneli
-lone
-long
-longavil
-longboat
-long
-longer
-longest
-longeth
-long
-long
-longli
-long
-longtail
-loo
-loof
-look
-look
-looker
-looker
-lookest
-look
-look
-loon
-loop
-loo
-loos
-loos
-loos
-loosen
-loos
-lop
-lopp
-loquitur
-lord
-lord
-lord
-lord
-lordli
-lordli
-lord
-lordship
-lordship
-lorenzo
-lorn
-lorrain
-lorship
-lo
-lose
-loser
-loser
-lose
-losest
-loseth
-lose
-loss
-loss
-lost
-lot
-lot
-lott
-lotteri
-loud
-louder
-loudli
-lour
-loureth
-lour
-lous
-lous
-lousi
-lout
-lout
-lout
-louvr
-lov
-love
-love
-lovedst
-lovel
-loveli
-loveli
-lovel
-love
-lover
-lover
-lover
-love
-lovest
-loveth
-love
-lovingli
-low
-low
-lower
-lowest
-low
-lowli
-lowli
-lown
-low
-loyal
-loyal
-loyalti
-loyalti
-lozel
-lt
-lubber
-lubberli
-luc
-luccico
-luce
-lucentio
-luce
-lucetta
-luciana
-lucianu
-lucif
-lucifi
-luciliu
-lucina
-lucio
-luciu
-luck
-luckier
-luckiest
-luckili
-luckless
-lucki
-lucr
-lucrec
-lucretia
-luculliu
-lucullu
-luci
-lud
-ludlow
-lug
-lugg
-luggag
-luke
-lukewarm
-lull
-lulla
-lullabi
-lull
-lumbert
-lump
-lumpish
-luna
-lunaci
-lunaci
-lunat
-lunat
-lune
-lung
-luperc
-lurch
-lure
-lurk
-lurketh
-lurk
-lurk
-lusciou
-lush
-lust
-lust
-luster
-lust
-lustier
-lustiest
-lustig
-lustihood
-lustili
-lustr
-lustrou
-lust
-lusti
-lute
-lute
-lutestr
-lutheran
-luxuri
-luxuri
-luxuri
-ly
-lycaonia
-lycurgus
-lydia
-lye
-lyen
-ly
-lym
-lymog
-lynn
-lysand
-m
-ma
-maan
-mab
-macbeth
-maccabaeu
-macdonwald
-macduff
-mace
-macedon
-mace
-machiavel
-machin
-machin
-machin
-mack
-macmorri
-macul
-macul
-mad
-madam
-madam
-madam
-madcap
-mad
-mad
-made
-madeira
-madli
-madman
-madmen
-mad
-madonna
-madrig
-mad
-maecena
-maggot
-maggot
-magic
-magic
-magician
-magistr
-magistr
-magnanim
-magnanim
-magni
-magnifi
-magnific
-magnific
-magnifico
-magnifico
-magnu
-mahomet
-mahu
-maid
-maiden
-maidenhead
-maidenhead
-maidenhood
-maidenhood
-maidenliest
-maidenli
-maiden
-maidhood
-maid
-mail
-mail
-mail
-maim
-maim
-maim
-main
-maincours
-main
-mainli
-mainmast
-main
-maintain
-maintain
-maintain
-mainten
-mai
-maison
-majesta
-majeste
-majest
-majest
-majest
-majesti
-majesti
-major
-major
-mak
-make
-makeless
-maker
-maker
-make
-makest
-maketh
-make
-make
-mal
-mala
-maladi
-maladi
-malapert
-malcolm
-malcont
-malcont
-male
-maledict
-malefact
-malefactor
-malefactor
-male
-malevol
-malevol
-malhecho
-malic
-malici
-malici
-malign
-malign
-malign
-malignantli
-malkin
-mall
-mallard
-mallet
-mallow
-malmsei
-malt
-maltworm
-malvolio
-mamilliu
-mammer
-mammet
-mammet
-mammock
-man
-manacl
-manacl
-manag
-manag
-manag
-manag
-manakin
-manchu
-mandat
-mandragora
-mandrak
-mandrak
-mane
-manent
-mane
-manet
-manfulli
-mangl
-mangl
-mangl
-mangl
-mangi
-manhood
-manhood
-manifest
-manifest
-manifest
-manifold
-manifoldli
-manka
-mankind
-manlik
-manli
-mann
-manna
-manner
-mannerli
-manner
-manningtre
-mannish
-manor
-manor
-man
-mansion
-mansionri
-mansion
-manslaught
-mantl
-mantl
-mantl
-mantua
-mantuan
-manual
-manur
-manur
-manu
-mani
-map
-mapp
-map
-mar
-marbl
-marbl
-marcad
-marcellu
-march
-march
-marcheth
-march
-marchio
-marchpan
-marcian
-marciu
-marcu
-mardian
-mare
-mare
-marg
-margarelon
-margaret
-marg
-margent
-margeri
-maria
-marian
-mariana
-mari
-marigold
-marin
-marin
-maritim
-marjoram
-mark
-mark
-market
-market
-marketplac
-market
-mark
-markman
-mark
-marl
-marl
-marmoset
-marquess
-marqui
-marr
-marriag
-marriag
-marri
-marri
-mar
-marrow
-marrowless
-marrow
-marri
-marri
-mar
-marseil
-marsh
-marshal
-marshalsea
-marshalship
-mart
-mart
-martem
-martext
-martial
-martin
-martino
-martiu
-martlema
-martlet
-mart
-martyr
-martyr
-marullu
-marv
-marvel
-marvel
-marvel
-marvel
-marvel
-mari
-ma
-masculin
-masham
-mask
-mask
-masker
-masker
-mask
-mask
-mason
-masonri
-mason
-masqu
-masquer
-masqu
-masqu
-mass
-massacr
-massacr
-mass
-massi
-mast
-mastcr
-master
-masterdom
-masterest
-masterless
-masterli
-masterpiec
-master
-mastership
-mastic
-mastiff
-mastiff
-mast
-match
-match
-matcheth
-match
-matchless
-mate
-mate
-mater
-materi
-mate
-mathemat
-matin
-matron
-matron
-matter
-matter
-matthew
-mattock
-mattress
-matur
-matur
-maud
-maudlin
-maugr
-maul
-maund
-mauri
-mauritania
-mauvai
-maw
-maw
-maxim
-mai
-maydai
-mayest
-mayor
-maypol
-mayst
-maz
-maze
-maze
-maze
-mazzard
-me
-meacock
-mead
-meadow
-meadow
-mead
-meagr
-meal
-meal
-meali
-mean
-meander
-meaner
-meanest
-meaneth
-mean
-mean
-meanli
-mean
-meant
-meantim
-meanwhil
-measl
-measur
-measur
-measur
-measur
-measureless
-measur
-measur
-meat
-meat
-mechan
-mechan
-mechan
-mechan
-mechant
-med
-medal
-meddl
-meddler
-meddl
-mede
-medea
-media
-mediat
-mediat
-medic
-medicin
-medicin
-medicin
-medit
-medit
-medit
-medit
-medit
-mediterranean
-mediterraneum
-medlar
-medlar
-meed
-meed
-meek
-meekli
-meek
-meet
-meeter
-meetest
-meet
-meet
-meetli
-meet
-meet
-meg
-mehercl
-meilleur
-meini
-meisen
-melancholi
-melancholi
-melford
-mell
-melliflu
-mellow
-mellow
-melodi
-melodi
-melt
-melt
-melteth
-melt
-melt
-melun
-member
-member
-memento
-memor
-memorandum
-memori
-memori
-memori
-memoriz
-memor
-memori
-memphi
-men
-menac
-menac
-menac
-menaphon
-mena
-mend
-mend
-mender
-mend
-mend
-menecr
-menelau
-meneniu
-mental
-menteith
-mention
-menti
-menton
-mephostophilu
-mer
-mercatant
-mercatio
-mercenari
-mercenari
-mercer
-merchandis
-merchand
-merchant
-merchant
-merci
-merci
-mercifulli
-merciless
-mercuri
-mercuri
-mercuri
-mercutio
-merci
-mere
-mere
-mere
-merest
-meridian
-merit
-merit
-meritori
-merit
-merlin
-mermaid
-mermaid
-merop
-merrier
-merriest
-merrili
-merriman
-merriment
-merriment
-merri
-merri
-mervail
-me
-mesh
-mesh
-mesopotamia
-mess
-messag
-messag
-messala
-messalin
-messeng
-messeng
-mess
-messina
-met
-metal
-metal
-metamorphi
-metamorphos
-metaphor
-metaphys
-metaphys
-mete
-metellu
-meteor
-meteor
-meteyard
-metheglin
-metheglin
-methink
-methink
-method
-method
-methought
-methought
-metr
-metr
-metropoli
-mett
-mettl
-mettl
-meu
-mew
-mew
-mewl
-mexico
-mi
-mice
-michael
-michaelma
-micher
-mich
-mickl
-microcosm
-mid
-mida
-middest
-middl
-middleham
-midnight
-midriff
-midst
-midsumm
-midwai
-midwif
-midwiv
-mienn
-might
-might
-mightier
-mightiest
-mightili
-mighti
-mightst
-mighti
-milan
-milch
-mild
-milder
-mildest
-mildew
-mildew
-mildli
-mild
-mile
-mile
-milford
-militarist
-militari
-milk
-milk
-milkmaid
-milk
-milksop
-milki
-mill
-mill
-miller
-millin
-million
-million
-million
-mill
-millston
-milo
-mimic
-minc
-minc
-minc
-minc
-mind
-mind
-mind
-mindless
-mind
-mine
-miner
-miner
-minerva
-mine
-mingl
-mingl
-mingl
-minikin
-minim
-minim
-minimo
-minimu
-mine
-minion
-minion
-minist
-minist
-minist
-ministr
-minnow
-minnow
-minola
-minor
-mino
-minotaur
-minstrel
-minstrel
-minstrelsi
-mint
-mint
-minut
-minut
-minut
-minx
-mio
-mir
-mirabl
-miracl
-miracl
-miracul
-miranda
-mire
-mirror
-mirror
-mirth
-mirth
-miri
-mi
-misadventur
-misadventur
-misanthropo
-misappli
-misbecam
-misbecom
-misbecom
-misbegot
-misbegotten
-misbeliev
-misbeliev
-misbhav
-miscal
-miscal
-miscarri
-miscarri
-miscarri
-miscarri
-mischanc
-mischanc
-mischief
-mischief
-mischiev
-misconceiv
-misconst
-misconst
-misconstruct
-misconstru
-misconstru
-miscreant
-miscreat
-misde
-misde
-misdemean
-misdemeanour
-misdoubt
-misdoubteth
-misdoubt
-misenum
-miser
-miser
-miser
-misericord
-miseri
-miser
-miseri
-misfortun
-misfortun
-misgiv
-misgiv
-misgiv
-misgovern
-misgovern
-misgraf
-misguid
-mishap
-mishap
-misheard
-misinterpret
-mislead
-mislead
-mislead
-mislead
-misl
-mislik
-misord
-misplac
-misplac
-misplac
-mispri
-mispris
-mispris
-mispriz
-misproud
-misquot
-misreport
-miss
-miss
-miss
-misshap
-misshapen
-missheath
-miss
-missingli
-mission
-missiv
-missiv
-misspok
-mist
-mista
-mistak
-mistak
-mistaken
-mistak
-mistaketh
-mistak
-mistak
-mistemp
-mistemp
-misterm
-mist
-misthink
-misthought
-mistleto
-mistook
-mistread
-mistress
-mistress
-mistresss
-mistriship
-mistrust
-mistrust
-mistrust
-mistrust
-mist
-misti
-misu
-misus
-misus
-misus
-mite
-mithrid
-mitig
-mitig
-mix
-mix
-mixtur
-mixtur
-mm
-mnd
-moan
-moan
-moat
-moat
-mobl
-mock
-mockabl
-mocker
-mockeri
-mocker
-mockeri
-mock
-mock
-mockvat
-mockwat
-model
-modena
-moder
-moder
-moder
-modern
-modest
-modesti
-modestli
-modesti
-modicum
-modo
-modul
-moe
-moi
-moieti
-moist
-moisten
-moistur
-moldwarp
-mole
-molehil
-mole
-molest
-molest
-mollif
-molli
-molten
-molto
-mome
-moment
-momentari
-mome
-mon
-monachum
-monarch
-monarchi
-monarch
-monarcho
-monarch
-monarchi
-monast
-monasteri
-monast
-mondai
-mond
-monei
-monei
-mong
-monger
-monger
-mong
-mongrel
-mongrel
-mongst
-monk
-monkei
-monkei
-monk
-monmouth
-monopoli
-mon
-monsieur
-monsieur
-monster
-monster
-monstrou
-monstrous
-monstrous
-monstruos
-montacut
-montag
-montagu
-montagu
-montano
-montant
-montez
-montferrat
-montgomeri
-month
-monthli
-month
-montjoi
-monument
-monument
-monument
-mood
-mood
-moodi
-moon
-moonbeam
-moonish
-moonlight
-moon
-moonshin
-moonshin
-moor
-moorfield
-moor
-moorship
-mop
-mope
-mope
-mop
-mopsa
-moral
-moral
-moral
-moral
-mordak
-more
-moreov
-more
-morgan
-mori
-morisco
-morn
-morn
-morn
-morocco
-morri
-morrow
-morrow
-morsel
-morsel
-mort
-mortal
-mortal
-mortal
-mortal
-mortar
-mortgag
-mortifi
-mortifi
-mortim
-mortim
-morti
-mortis
-morton
-mose
-moss
-mossgrown
-most
-mote
-moth
-mother
-mother
-moth
-motion
-motionless
-motion
-motiv
-motiv
-motlei
-mot
-mought
-mould
-mould
-mouldeth
-mould
-mouldi
-moult
-moulten
-mounch
-mounseur
-mounsieur
-mount
-mountain
-mountain
-mountain
-mountain
-mountain
-mountant
-mountanto
-mountebank
-mountebank
-mount
-mounteth
-mount
-mount
-mourn
-mourn
-mourner
-mourner
-mourn
-mournfulli
-mourn
-mourningli
-mourn
-mourn
-mou
-mous
-mousetrap
-mous
-mouth
-mouth
-mouth
-mov
-movabl
-move
-moveabl
-moveabl
-move
-mover
-mover
-move
-moveth
-move
-movingli
-movousu
-mow
-mowbrai
-mower
-mow
-mow
-moi
-moi
-moys
-mr
-much
-muck
-mud
-mud
-muddi
-muddi
-muffin
-muffl
-muffl
-muffl
-muffler
-muffl
-mugger
-mug
-mulberri
-mulberri
-mule
-mule
-mulet
-mulier
-mulier
-muliteu
-mull
-mulmutiu
-multipli
-multipli
-multipli
-multipot
-multitud
-multitud
-multitudin
-mum
-mumbl
-mumbl
-mummer
-mummi
-mun
-munch
-muniment
-munit
-murd
-murder
-murder
-murder
-murder
-murder
-murder
-murder
-mure
-murk
-murkiest
-murki
-murmur
-murmur
-murmur
-murrain
-murrai
-murrion
-murther
-murther
-murther
-murther
-murther
-murther
-mu
-muscadel
-muscovit
-muscovit
-muscovi
-muse
-muse
-mush
-mushroom
-music
-music
-musician
-musician
-music
-muse
-muse
-musk
-musket
-musket
-musko
-muss
-mussel
-mussel
-must
-mustachio
-mustard
-mustardse
-muster
-muster
-muster
-musti
-mutabl
-mutabl
-mutat
-mutat
-mute
-mute
-mutest
-mutin
-mutin
-mutin
-mutin
-mutini
-mutin
-mutini
-mutiu
-mutter
-mutter
-mutton
-mutton
-mutual
-mutual
-mutual
-muzzl
-muzzl
-muzzl
-mv
-mww
-my
-mynheer
-myrmidon
-myrmidon
-myrtl
-myself
-myst
-mysteri
-mysteri
-n
-nag
-nage
-nag
-naiad
-nail
-nail
-nak
-nake
-naked
-nal
-nam
-name
-name
-nameless
-name
-name
-namest
-name
-nan
-nanc
-nap
-nape
-nape
-napkin
-napkin
-napl
-napless
-nap
-nap
-narbon
-narcissu
-narin
-narrow
-narrowli
-naso
-nasti
-nathaniel
-natif
-nation
-nation
-nativ
-nativ
-natur
-natur
-natur
-natur
-natur
-natur
-natur
-natu
-naught
-naughtili
-naughti
-navarr
-nave
-navel
-navig
-navi
-nai
-nayward
-nayword
-nazarit
-ne
-neaf
-neamnoin
-neanmoin
-neapolitan
-neapolitan
-near
-nearer
-nearest
-nearli
-near
-neat
-neatli
-neb
-nebour
-nebuchadnezzar
-nec
-necessari
-necessarili
-necessari
-necess
-necess
-necess
-neck
-necklac
-neck
-nectar
-ned
-nedar
-need
-need
-needer
-need
-needful
-need
-needl
-needl
-needless
-needli
-need
-needi
-neer
-neez
-nefa
-negat
-neg
-neg
-neglect
-neglect
-neglect
-neglectingli
-neglect
-neglig
-neglig
-negoti
-negoti
-negro
-neigh
-neighbor
-neighbour
-neighbourhood
-neighbour
-neighbourli
-neighbour
-neigh
-neigh
-neither
-nell
-nemean
-nemesi
-neoptolemu
-nephew
-nephew
-neptun
-ner
-nereid
-nerissa
-nero
-nero
-ner
-nerv
-nerv
-nervii
-nervi
-nessu
-nest
-nestor
-nest
-net
-nether
-netherland
-net
-nettl
-nettl
-nettl
-neuter
-neutral
-nev
-never
-nevil
-nevil
-new
-newborn
-newer
-newest
-newgat
-newli
-new
-new
-newsmong
-newt
-newt
-next
-nibbl
-nicanor
-nice
-nice
-nice
-nicer
-niceti
-nichola
-nick
-nicknam
-nick
-niec
-niec
-niggard
-niggard
-niggardli
-nigh
-night
-nightcap
-nightcap
-night
-nightgown
-nightingal
-nightingal
-nightli
-nightmar
-night
-nightwork
-nihil
-nile
-nill
-nilu
-nimbl
-nimbl
-nimbler
-nimbl
-nine
-nineteen
-ning
-ningli
-ninni
-ninth
-ninu
-niob
-niob
-nip
-nipp
-nip
-nippl
-nip
-nit
-nly
-nnight
-nnight
-no
-noah
-nob
-nobil
-nobi
-nobl
-nobleman
-noblemen
-nobl
-nobler
-nobl
-nobless
-noblest
-nobli
-nobodi
-noce
-nod
-nod
-nod
-noddl
-noddl
-noddi
-nod
-noe
-noint
-noi
-nois
-noiseless
-noisemak
-nois
-noisom
-nole
-nomin
-nomin
-nomin
-nominativo
-non
-nonag
-nonc
-none
-nonino
-nonni
-nonpareil
-nonsuit
-noni
-nook
-nook
-noon
-noondai
-noontid
-nor
-norberi
-norfolk
-norman
-normandi
-norman
-north
-northampton
-northamptonshir
-northerli
-northern
-northgat
-northumberland
-northumberland
-northward
-norwai
-norwai
-norwegian
-norweyan
-no
-nose
-nosegai
-noseless
-nose
-noster
-nostra
-nostril
-nostril
-not
-notabl
-notabl
-notari
-notch
-note
-notebook
-note
-notedli
-note
-notest
-noteworthi
-noth
-noth
-notic
-notifi
-note
-notion
-notori
-notori
-notr
-notwithstand
-nought
-noun
-noun
-nourish
-nourish
-nourish
-nourish
-nourisheth
-nourish
-nourish
-nou
-novel
-novelti
-novelti
-noverb
-novi
-novic
-novic
-novum
-now
-nowher
-noyanc
-ns
-nt
-nubibu
-numa
-numb
-number
-number
-number
-numberless
-number
-numb
-nun
-nuncio
-nuncl
-nunneri
-nun
-nuntiu
-nuptial
-nur
-nurs
-nurs
-nurser
-nurseri
-nurs
-nurseth
-nursh
-nurs
-nurtur
-nurtur
-nut
-nuthook
-nutmeg
-nutmeg
-nutriment
-nut
-nutshel
-ny
-nym
-nymph
-nymph
-o
-oak
-oaken
-oak
-oar
-oar
-oatcak
-oaten
-oath
-oathabl
-oath
-oat
-ob
-obduraci
-obdur
-obedi
-obedi
-obeis
-oberon
-obei
-obei
-obei
-obei
-obidicut
-object
-object
-object
-object
-oblat
-oblat
-oblig
-oblig
-oblig
-obliqu
-oblivion
-oblivi
-obloqui
-obscen
-obscen
-obscur
-obscur
-obscur
-obscur
-obscur
-obscur
-obscur
-obsequi
-obsequi
-obsequi
-observ
-observ
-observ
-observ
-observ
-observ
-observ
-observ
-observ
-observ
-observ
-observ
-observingli
-obsqu
-obstacl
-obstacl
-obstinaci
-obstin
-obstin
-obstruct
-obstruct
-obstruct
-obtain
-obtain
-obtain
-occas
-occas
-occid
-occident
-occult
-occupat
-occup
-occup
-occupi
-occupi
-occupi
-occurr
-occurr
-occurr
-ocean
-ocean
-octavia
-octaviu
-ocular
-od
-odd
-oddest
-oddli
-odd
-od
-od
-odiou
-odorifer
-odor
-odour
-odour
-od
-oeillad
-oe
-oeuvr
-of
-ofephesu
-off
-offal
-offenc
-offenc
-offenc
-offend
-offend
-offendendo
-offend
-offend
-offendeth
-offend
-offendress
-offend
-offens
-offenseless
-offens
-offens
-offer
-offer
-offer
-offer
-offer
-offert
-offic
-offic
-offic
-offic
-offic
-offic
-offici
-offici
-offspr
-oft
-often
-often
-oftentim
-oh
-oil
-oil
-oili
-old
-oldcastl
-olden
-older
-oldest
-old
-oliv
-oliv
-oliv
-oliv
-olivia
-olympian
-olympu
-oman
-oman
-omen
-omin
-omiss
-omit
-omitt
-omit
-omit
-omn
-omn
-omnipot
-on
-onc
-on
-on
-oney
-ongl
-onion
-onion
-onli
-onset
-onward
-onward
-oo
-ooz
-ooz
-oozi
-op
-opal
-op
-open
-open
-open
-openli
-open
-open
-oper
-oper
-oper
-oper
-oper
-op
-oph
-ophelia
-opinion
-opinion
-opportun
-opportun
-opportun
-oppo
-oppos
-oppos
-opposeless
-oppos
-oppos
-oppos
-oppos
-opposit
-opposit
-opposit
-opposit
-oppress
-oppress
-oppress
-oppresseth
-oppress
-oppress
-oppressor
-opprest
-opprobri
-oppugn
-opul
-opul
-or
-oracl
-oracl
-orang
-orat
-orat
-orat
-oratori
-orb
-orb
-orb
-orchard
-orchard
-ord
-ordain
-ordain
-ordain
-order
-order
-order
-orderless
-orderli
-order
-ordin
-ordin
-ordinari
-ordinari
-ordnanc
-ord
-ordur
-or
-organ
-organ
-orgil
-orient
-orifex
-origin
-origin
-orison
-ork
-orlando
-orld
-orlean
-ornament
-ornament
-orod
-orphan
-orphan
-orpheu
-orsino
-ort
-orthographi
-ort
-oscorbidulcho
-osier
-osier
-osprei
-osr
-osric
-ossa
-ost
-ostent
-ostentar
-ostent
-ostent
-ostler
-ostler
-ostrich
-osw
-oswald
-othello
-other
-otherg
-other
-otherwher
-otherwhil
-otherwis
-otter
-ottoman
-ottomit
-oubli
-ouch
-ought
-oui
-ounc
-ounc
-ouph
-our
-our
-ourself
-ourselv
-ousel
-out
-outbid
-outbrav
-outbrav
-outbreak
-outcast
-outcri
-outcri
-outdar
-outdar
-outdar
-outdon
-outfac
-outfac
-outfac
-outfac
-outfli
-outfrown
-outgo
-outgo
-outgrown
-outjest
-outlaw
-outlawri
-outlaw
-outliv
-outliv
-outliv
-outliv
-outlook
-outlustr
-outpriz
-outrag
-outrag
-outrag
-outran
-outright
-outroar
-outrun
-outrun
-outrun
-outscold
-outscorn
-outsel
-outsel
-outsid
-outsid
-outspeak
-outsport
-outstar
-outstai
-outstood
-outstretch
-outstretch
-outstrik
-outstrip
-outstrip
-outswear
-outvenom
-outward
-outwardli
-outward
-outwear
-outweigh
-outwent
-outworn
-outworth
-oven
-over
-overaw
-overbear
-overblown
-overboard
-overbold
-overborn
-overbulk
-overbui
-overcam
-overcast
-overcharg
-overcharg
-overcom
-overcom
-overdon
-overearnest
-overfar
-overflow
-overflown
-overgl
-overgo
-overgon
-overgorg
-overgrown
-overhead
-overhear
-overheard
-overhold
-overjoi
-overkind
-overland
-overleath
-overl
-overlook
-overlook
-overlook
-overmast
-overmount
-overmuch
-overpass
-overp
-overp
-overplu
-overrul
-overrun
-overscutch
-overset
-overshad
-overshin
-overshin
-overshot
-oversight
-overspread
-overstain
-overswear
-overt
-overta
-overtak
-overtaketh
-overthrow
-overthrown
-overthrow
-overtook
-overtopp
-overtur
-overturn
-overwatch
-overween
-overween
-overweigh
-overwhelm
-overwhelm
-overworn
-ovid
-ovidiu
-ow
-ow
-ow
-owedst
-owen
-ow
-owest
-oweth
-ow
-owl
-owl
-own
-owner
-owner
-own
-own
-owi
-ox
-oxen
-oxford
-oxfordshir
-oxlip
-oy
-oyster
-p
-pabbl
-pabylon
-pac
-pace
-pace
-pace
-pacifi
-pacifi
-pace
-pack
-packet
-packet
-packhors
-pack
-pack
-pack
-packthread
-pacoru
-paction
-pad
-paddl
-paddl
-paddock
-padua
-pagan
-pagan
-page
-pageant
-pageant
-page
-pah
-paid
-pail
-pail
-pail
-pain
-pain
-pain
-painfulli
-pain
-paint
-paint
-painter
-paint
-paint
-paint
-pair
-pair
-pair
-pajock
-pal
-palabra
-palac
-palac
-palamed
-palat
-palat
-palatin
-palat
-pale
-pale
-pale
-paler
-pale
-palestin
-palfrei
-palfrei
-palisado
-pall
-pallabri
-palla
-pallet
-palm
-palmer
-palmer
-palm
-palmi
-palpabl
-palsi
-palsi
-palsi
-palt
-palter
-paltri
-pali
-pamp
-pamper
-pamphlet
-pan
-pancack
-pancak
-pancak
-pandar
-pandar
-pandaru
-pander
-panderli
-pander
-pandulph
-panel
-pang
-pang
-pang
-pannier
-pannonian
-pansa
-pansi
-pant
-pantaloon
-pant
-pantheon
-panther
-panthino
-pant
-pantingli
-pantler
-pantri
-pant
-pap
-papal
-paper
-paper
-paphlagonia
-papho
-papist
-pap
-par
-parabl
-paracelsu
-paradis
-paradox
-paradox
-paragon
-paragon
-parallel
-parallel
-paramour
-paramour
-parapet
-paraquito
-parasit
-parasit
-parca
-parcel
-parcel
-parcel
-parch
-parch
-parch
-parchment
-pard
-pardon
-pardona
-pardon
-pardon
-pardon
-pardonn
-pardonn
-pardonnez
-pardon
-pare
-pare
-parel
-parent
-parentag
-parent
-parfect
-pare
-pare
-pari
-parish
-parishion
-parisian
-paritor
-park
-park
-parl
-parler
-parl
-parlei
-parlez
-parliament
-parlor
-parlour
-parlou
-parmac
-parol
-parricid
-parricid
-parrot
-parrot
-parslei
-parson
-part
-partak
-partaken
-partak
-partak
-part
-parthia
-parthian
-parthian
-parti
-partial
-partial
-partial
-particip
-particip
-particl
-particular
-particular
-particular
-particularli
-particular
-parti
-part
-partisan
-partisan
-partit
-partizan
-partlet
-partli
-partner
-partner
-partridg
-part
-parti
-pa
-pash
-pash
-pash
-pass
-passabl
-passado
-passag
-passag
-passant
-pass
-passeng
-passeng
-pass
-passeth
-pass
-passio
-passion
-passion
-passion
-passion
-passiv
-passport
-passi
-past
-past
-pastern
-pasti
-pastim
-pastim
-pastor
-pastor
-pastor
-pastri
-pastur
-pastur
-pasti
-pat
-patai
-patch
-patcheri
-patch
-pate
-pate
-patent
-patent
-patern
-pate
-path
-pathet
-path
-pathwai
-pathwai
-patienc
-patient
-patient
-patient
-patin
-patrician
-patrician
-patrick
-patrimoni
-patroclu
-patron
-patronag
-patro
-patron
-patrum
-patter
-pattern
-pattern
-pattl
-pauca
-pauca
-paul
-paulina
-paunch
-paunch
-paus
-pauser
-paus
-pausingli
-pauvr
-pav
-pave
-pavement
-pavilion
-pavilion
-pavin
-paw
-pawn
-pawn
-paw
-pax
-pai
-payest
-pai
-payment
-payment
-pai
-paysan
-paysan
-pe
-peac
-peaceabl
-peaceabl
-peac
-peacemak
-peac
-peach
-peach
-peacock
-peacock
-peak
-peak
-peal
-peal
-pear
-peard
-pearl
-pearl
-pear
-pea
-peasant
-peasantri
-peasant
-peascod
-peas
-peaseblossom
-peat
-peaten
-peat
-pebbl
-pebbl
-pebbl
-peck
-peck
-peculiar
-pecu
-pedant
-pedant
-pedascul
-pede
-pedest
-pedigre
-pedlar
-pedlar
-pedro
-ped
-peel
-peep
-peep
-peep
-peep
-peer
-peereth
-peer
-peerless
-peer
-peesel
-peevish
-peevishli
-peflur
-peg
-pegasu
-peg
-peis
-peis
-peiz
-pelf
-pelican
-pelion
-pell
-pella
-pellet
-peloponnesu
-pelt
-pelt
-pembrok
-pen
-penalti
-penalti
-penanc
-penc
-pencil
-pencil
-pencil
-pendant
-pendent
-pendragon
-pendul
-penelop
-penetr
-penetr
-penetr
-penit
-penit
-penitenti
-penit
-penit
-penker
-penknif
-penn
-pen
-pen
-pennon
-penni
-pennyworth
-pennyworth
-pen
-pens
-pension
-pension
-pensiv
-pensiv
-pensiv
-pent
-pentecost
-penthesilea
-penthous
-penuri
-penuri
-peopl
-peopl
-peopl
-peopl
-pepin
-pepper
-peppercorn
-pepper
-per
-peradventur
-peradventur
-perceiv
-perceiv
-perceiv
-perceiv
-perceiveth
-perch
-perchanc
-perci
-percuss
-perci
-perdi
-perdita
-perdit
-perdonato
-perdu
-perdur
-perdur
-perdi
-pere
-peregrin
-peremptorili
-peremptori
-perfect
-perfect
-perfect
-perfectest
-perfect
-perfect
-perfectli
-perfect
-perfidi
-perfidi
-perforc
-perform
-perform
-perform
-perform
-perform
-perform
-perform
-perform
-perfum
-perfum
-perfum
-perfum
-perfum
-perg
-perhap
-periapt
-perigort
-perigouna
-peril
-peril
-peril
-period
-period
-perish
-perish
-perishest
-perisheth
-perish
-periwig
-perjur
-perjur
-perjur
-perjuri
-perjuri
-perk
-perk
-permafoi
-perman
-permiss
-permiss
-permit
-permit
-pernici
-pernici
-peror
-perpend
-perpendicular
-perpendicularli
-perpetu
-perpetu
-perpetu
-perplex
-perplex
-perplex
-per
-persecut
-persecut
-persecutor
-perseu
-persev
-persever
-persev
-persia
-persian
-persist
-persist
-persist
-persist
-persist
-person
-persona
-personag
-personag
-person
-person
-person
-person
-person
-person
-person
-perspect
-perspect
-perspect
-perspicu
-persuad
-persuad
-persuad
-persuad
-persuas
-persuas
-pert
-pertain
-pertain
-pertain
-pertaunt
-pertin
-pertli
-perturb
-perturb
-perturb
-perturb
-peru
-perus
-perus
-perus
-perus
-pervers
-pervers
-pervers
-pervert
-pervert
-peseech
-pest
-pester
-pestifer
-pestil
-pestil
-pet
-petar
-peter
-petit
-petit
-petitionari
-petition
-petition
-petit
-peto
-petrarch
-petruchio
-petter
-petticoat
-petticoat
-petti
-pettish
-pettito
-petti
-peu
-pew
-pewter
-pewter
-phaethon
-phaeton
-phantasim
-phantasim
-phantasma
-pharamond
-pharaoh
-pharsalia
-pheasant
-pheazar
-phebe
-phebe
-pheebu
-pheez
-phibbu
-philadelpho
-philario
-philarmonu
-philemon
-philip
-philippan
-philipp
-philippi
-phillida
-philo
-philomel
-philomela
-philosoph
-philosoph
-philosoph
-philosophi
-philostr
-philotu
-phlegmat
-phoeb
-phoebu
-phoenicia
-phoenician
-phoenix
-phorbu
-photinu
-phrase
-phraseless
-phrase
-phrygia
-phrygian
-phrynia
-physic
-physic
-physician
-physician
-physic
-pia
-pibbl
-pibl
-picardi
-pick
-pickax
-pickax
-pickbon
-pick
-picker
-pick
-pickl
-picklock
-pickpurs
-pick
-pickt
-pickthank
-pictur
-pictur
-pictur
-pictur
-pid
-pie
-piec
-piec
-piec
-piec
-pi
-pied
-pier
-pierc
-pierc
-pierc
-pierc
-pierceth
-pierc
-pierci
-pier
-pi
-pieti
-pig
-pigeon
-pigeon
-pight
-pigmi
-pigrogromitu
-pike
-pike
-pil
-pilat
-pilat
-pilcher
-pile
-pile
-pilf
-pilfer
-pilgrim
-pilgrimag
-pilgrim
-pill
-pillag
-pillag
-pillar
-pillar
-pillicock
-pillori
-pillow
-pillow
-pill
-pilot
-pilot
-pimpernel
-pin
-pinch
-pinch
-pinch
-pinch
-pindaru
-pine
-pine
-pine
-pinfold
-pine
-pinion
-pink
-pinn
-pinnac
-pin
-pins
-pint
-pintpot
-pion
-pioneer
-pioner
-pioner
-piou
-pip
-pipe
-piper
-piper
-pipe
-pipe
-pippin
-pippin
-pirat
-pirat
-pisa
-pisanio
-pish
-pismir
-piss
-piss
-pistol
-pistol
-pit
-pitch
-pitch
-pitcher
-pitcher
-pitchi
-piteou
-piteous
-pitfal
-pith
-pithless
-pithi
-piti
-piti
-piti
-piti
-pitifulli
-pitiless
-pit
-pittanc
-pitti
-pittikin
-piti
-piti
-piu
-plac
-place
-place
-placentio
-place
-placeth
-placid
-place
-plack
-placket
-placket
-plagu
-plagu
-plagu
-plagu
-plagu
-plagui
-plain
-plainer
-plainest
-plain
-plain
-plainli
-plain
-plain
-plainsong
-plaint
-plaintiff
-plaintiff
-plaint
-planch
-planet
-planetari
-planet
-plank
-plant
-plantag
-plantagenet
-plantagenet
-plantain
-plantat
-plant
-planteth
-plant
-plash
-plashi
-plast
-plaster
-plaster
-plat
-plate
-plate
-plate
-platform
-platform
-plat
-plat
-plausibl
-plausiv
-plautu
-plai
-plai
-player
-player
-playeth
-playfellow
-playfellow
-playhous
-plai
-plai
-plea
-pleach
-pleach
-plead
-plead
-pleader
-pleader
-plead
-plead
-plea
-pleasanc
-pleasant
-pleasantli
-pleas
-pleas
-pleaser
-pleaser
-pleas
-pleasest
-pleaseth
-pleas
-pleasur
-pleasur
-plebeian
-plebeii
-pleb
-pledg
-pledg
-plein
-plenitud
-plenteou
-plenteous
-plenti
-plenti
-plentifulli
-plenti
-pless
-pless
-pless
-pliant
-pli
-pli
-plight
-plight
-plighter
-plod
-plod
-plodder
-plod
-plod
-plood
-ploodi
-plot
-plot
-plot
-plotter
-plough
-plough
-ploughman
-ploughmen
-plow
-plow
-pluck
-pluck
-plucker
-pluck
-pluck
-plue
-plum
-plume
-plume
-plume
-plummet
-plump
-plumpi
-plum
-plung
-plung
-plung
-plural
-plurisi
-plu
-pluto
-plutu
-ply
-po
-pocket
-pocket
-pocket
-pocki
-podi
-poem
-poesi
-poet
-poetic
-poetri
-poet
-poictier
-poinard
-poin
-point
-pointblank
-point
-point
-point
-poi
-pois
-pois
-poison
-poison
-poison
-poison
-poison
-poison
-poke
-poke
-pol
-polack
-polack
-poland
-pold
-pole
-poleax
-polecat
-polecat
-polemon
-pole
-poli
-polici
-polici
-polish
-polish
-polit
-politician
-politician
-politicli
-polixen
-poll
-pollut
-pollut
-poloniu
-poltroon
-polus
-polydamu
-polydor
-polyxena
-pomand
-pomegran
-pomewat
-pomfret
-pomgarnet
-pommel
-pomp
-pompeiu
-pompei
-pompion
-pompou
-pomp
-pond
-ponder
-ponder
-pond
-poniard
-poniard
-pont
-pontic
-pontif
-ponton
-pooh
-pool
-pool
-poop
-poor
-poorer
-poorest
-poorli
-pop
-pope
-popedom
-popiliu
-popingai
-popish
-popp
-poppi
-pop
-popular
-popular
-popul
-porch
-porch
-pore
-pore
-pork
-porn
-porpentin
-porridg
-porring
-port
-portabl
-portag
-portal
-portanc
-portculli
-portend
-portend
-portent
-portent
-portent
-porter
-porter
-portia
-portion
-portli
-portotartarossa
-portrait
-portraitur
-port
-portug
-pose
-posi
-posi
-posit
-posit
-posit
-poss
-possess
-possess
-possess
-possesseth
-possess
-possess
-possess
-possessor
-posset
-posset
-possibl
-possibl
-possibl
-possibl
-possit
-post
-post
-post
-posterior
-posterior
-poster
-postern
-postern
-poster
-posthors
-posthors
-posthumu
-post
-postmast
-post
-postscript
-postur
-postur
-posi
-pot
-potabl
-potat
-potato
-potato
-potch
-potenc
-potent
-potent
-potenti
-potent
-potent
-pothecari
-pother
-potion
-potion
-potpan
-pot
-potter
-pot
-pottl
-pouch
-poulter
-poultic
-poultnei
-pouncet
-pound
-pound
-pour
-pourest
-pour
-pourquoi
-pour
-pout
-poverti
-pow
-powd
-powder
-power
-power
-powerfulli
-powerless
-power
-pox
-poi
-poysam
-prabbl
-practic
-practic
-practic
-practic
-practic
-practic
-practi
-practis
-practis
-practis
-practis
-practis
-practis
-praeclarissimu
-praemunir
-praetor
-praetor
-prag
-pragu
-prain
-prain
-prai
-prais
-prais
-prais
-praisest
-praiseworthi
-prais
-pranc
-prank
-prank
-prat
-prate
-prate
-prater
-prate
-prattl
-prattler
-prattl
-prave
-prawl
-prawn
-prai
-prayer
-prayer
-prai
-prai
-pre
-preach
-preach
-preacher
-preach
-preach
-preachment
-pread
-preambul
-preced
-preced
-preced
-precept
-precepti
-precept
-precinct
-preciou
-precious
-precipic
-precipit
-precipit
-precis
-precis
-precis
-precisian
-precor
-precurs
-precursor
-predeceas
-predecessor
-predecessor
-predestin
-predica
-predict
-predict
-predict
-predomin
-predomin
-predomin
-preech
-preemin
-prefac
-prefer
-prefer
-prefer
-preferr
-preferreth
-prefer
-prefer
-prefigur
-prefix
-prefix
-preform
-pregnanc
-pregnant
-pregnantli
-prejud
-prejudic
-prejudici
-prelat
-premedit
-premedit
-premis
-premis
-prenez
-prenomin
-prentic
-prentic
-preordin
-prepar
-prepar
-prepar
-prepar
-prepar
-preparedli
-prepar
-prepar
-prepost
-preposter
-preposter
-prerogatif
-prerog
-prerogativ
-presag
-presag
-presag
-presageth
-presag
-prescienc
-prescrib
-prescript
-prescript
-prescript
-prescript
-presenc
-presenc
-present
-present
-present
-present
-present
-presenteth
-present
-present
-present
-present
-preserv
-preserv
-preserv
-preserv
-preserv
-preserv
-preserv
-preserv
-presid
-press
-press
-presser
-press
-press
-pressur
-pressur
-prest
-prester
-presum
-presum
-presum
-presumpt
-presumptu
-presuppo
-pret
-pretenc
-pretenc
-pretend
-pretend
-pretend
-pretens
-pretext
-pretia
-prettier
-prettiest
-prettili
-pretti
-pretti
-prevail
-prevail
-prevaileth
-prevail
-prevail
-prevail
-prevent
-prevent
-prevent
-prevent
-prevent
-prei
-prey
-prei
-priam
-priami
-priamu
-pribbl
-price
-prick
-prick
-pricket
-prick
-prick
-pricksong
-pride
-pride
-pridg
-prie
-pri
-prief
-pri
-priest
-priesthood
-priest
-prig
-primal
-prime
-primer
-primero
-primest
-primit
-primo
-primogen
-primros
-primros
-primi
-princ
-princ
-princ
-princess
-princip
-princip
-princip
-principl
-principl
-princox
-pring
-print
-print
-print
-printless
-print
-prioress
-priori
-prioriti
-priori
-priscian
-prison
-prison
-prison
-prison
-prisonni
-prison
-pristin
-prith
-prithe
-privaci
-privat
-privat
-privat
-privilag
-privileg
-privileg
-privileg
-privileg
-privilegio
-privili
-priviti
-privi
-priz
-prize
-prize
-prizer
-prize
-prizest
-prize
-pro
-probabl
-probal
-probat
-proce
-proceed
-proceed
-proceed
-proceed
-proce
-process
-process
-proclaim
-proclaim
-proclaimeth
-proclaim
-proclam
-proclam
-proconsul
-procrastin
-procreant
-procreant
-procreat
-procru
-proculeiu
-procur
-procur
-procur
-procur
-procur
-procur
-prodig
-prodig
-prodig
-prodig
-prodigi
-prodigi
-prodigi
-prodigi
-proditor
-produc
-produc
-produc
-produc
-produc
-profac
-profan
-profan
-profan
-profan
-profan
-profan
-profan
-profan
-profess
-profess
-profess
-profess
-profess
-professor
-proffer
-proffer
-proffer
-proffer
-profici
-profit
-profit
-profit
-profit
-profit
-profitless
-profit
-profound
-profoundest
-profoundli
-progenitor
-progeni
-progn
-prognost
-prognost
-progress
-progress
-prohibit
-prohibit
-project
-project
-project
-prolixi
-prolix
-prologu
-prologu
-prolong
-prolong
-promethean
-prometheu
-promi
-promis
-promis
-promis
-promiseth
-promis
-promontori
-promot
-promot
-prompt
-prompt
-promptement
-prompter
-prompt
-prompt
-promptur
-promulg
-prone
-prononc
-prononcez
-pronoun
-pronounc
-pronounc
-pronounc
-pronounc
-pronoun
-proof
-proof
-prop
-propag
-propag
-propend
-propens
-proper
-proper
-properli
-properti
-properti
-properti
-propheci
-propheci
-prophesi
-prophesi
-prophesi
-prophesi
-prophet
-prophetess
-prophet
-prophet
-prophet
-propinqu
-propont
-proport
-proportion
-proport
-propo
-propos
-propos
-propos
-propos
-propos
-proposit
-proposit
-propound
-propp
-propr
-proprieti
-prop
-propugn
-prorogu
-prorogu
-proscript
-proscript
-prose
-prosecut
-prosecut
-proselyt
-proserpina
-prosp
-prospect
-prosper
-prosper
-prospero
-prosper
-prosper
-prosper
-prostitut
-prostrat
-protect
-protect
-protect
-protector
-protector
-protectorship
-protectress
-protect
-protest
-protest
-protest
-protest
-protest
-protest
-protest
-proteu
-protheu
-protract
-protract
-proud
-prouder
-proudest
-proudlier
-proudli
-proud
-prov
-provand
-prove
-prove
-provend
-proverb
-proverb
-prove
-proveth
-provid
-provid
-provid
-provid
-provid
-provid
-provid
-provinc
-provinc
-provinci
-prove
-provis
-proviso
-provoc
-provok
-provok
-provok
-provok
-provok
-provoketh
-provok
-provost
-prowess
-prudenc
-prudent
-prun
-prune
-prune
-prune
-pry
-pry
-psalm
-psalmist
-psalm
-psalteri
-ptolemi
-ptolemi
-public
-publican
-public
-publicli
-publicola
-publish
-publish
-publish
-publish
-publiu
-pucel
-puck
-pudder
-pud
-pud
-puddl
-puddl
-pudenc
-pueritia
-puff
-puf
-puff
-pug
-pui
-puissanc
-puissant
-puke
-puke
-pulcher
-pule
-pull
-puller
-pullet
-pull
-pull
-pulpit
-pulpit
-pulpit
-puls
-pulsidg
-pump
-pumpion
-pump
-pun
-punch
-punish
-punish
-punish
-punish
-punish
-punk
-punto
-puni
-pupil
-pupil
-puppet
-puppet
-puppi
-puppi
-pur
-purblind
-purcha
-purchas
-purchas
-purchas
-purchaseth
-purchas
-pure
-pure
-purer
-purest
-purg
-purgat
-purg
-purgatori
-purg
-purg
-purger
-purg
-purifi
-purifi
-puritan
-puriti
-purlieu
-purpl
-purpl
-purpl
-purport
-purpo
-purpos
-purpos
-purpos
-purpos
-purposeth
-purpos
-purr
-pur
-purs
-pursent
-purs
-pursu
-pursu
-pursu
-pursuer
-pursu
-pursuest
-pursueth
-pursu
-pursuit
-pursuiv
-pursuiv
-pursi
-puru
-purveyor
-push
-push
-pusillanim
-put
-putrefi
-putrifi
-put
-putter
-put
-puttock
-puzzel
-puzzl
-puzzl
-puzzl
-py
-pygmalion
-pygmi
-pygmi
-pyramid
-pyramid
-pyramid
-pyrami
-pyramis
-pyramu
-pyrenean
-pyrrhu
-pythagora
-qu
-quadrangl
-quae
-quaff
-quaf
-quagmir
-quail
-quail
-quail
-quaint
-quaintli
-quak
-quak
-quak
-qualif
-qualifi
-qualifi
-qualifi
-qualifi
-qualit
-qualiti
-qualiti
-qualm
-qualmish
-quam
-quand
-quando
-quantiti
-quantiti
-quar
-quarrel
-quarrel
-quarrel
-quarrel
-quarrel
-quarrel
-quarrelsom
-quarri
-quarri
-quart
-quarter
-quarter
-quarter
-quarter
-quart
-quasi
-quat
-quatch
-quai
-que
-quean
-quea
-queasi
-queasi
-queen
-queen
-quell
-queller
-quench
-quench
-quench
-quenchless
-quern
-quest
-questant
-question
-question
-question
-question
-questionless
-question
-questrist
-quest
-queubu
-qui
-quick
-quicken
-quicken
-quicker
-quicklier
-quickli
-quick
-quicksand
-quicksand
-quicksilverr
-quid
-quidditi
-quiddit
-quier
-quiet
-quieter
-quietli
-quiet
-quietu
-quill
-quillet
-quill
-quilt
-quinapalu
-quinc
-quinc
-quintain
-quintess
-quintu
-quip
-quip
-quir
-quir
-quirk
-quirk
-qui
-quit
-quit
-quit
-quittanc
-quit
-quit
-quiver
-quiver
-quiver
-quo
-quod
-quoif
-quoint
-quoit
-quoit
-quondam
-quoniam
-quot
-quot
-quot
-quoth
-quotidian
-r
-rabbit
-rabbl
-rabblement
-race
-rack
-racker
-racket
-racket
-rack
-rack
-radianc
-radiant
-radish
-rafe
-raft
-rag
-rage
-rage
-rageth
-ragg
-rag
-ragged
-rage
-ragozin
-rag
-rah
-rail
-rail
-railer
-railest
-raileth
-rail
-rail
-raiment
-rain
-rainbow
-raineth
-rain
-rainold
-rain
-raini
-rai
-rais
-rais
-rais
-rais
-raisin
-rak
-rake
-raker
-rake
-ral
-rald
-ralph
-ram
-rambur
-ramm
-rampallian
-rampant
-ramp
-rampir
-ramp
-ram
-ramsei
-ramston
-ran
-ranc
-rancor
-rancor
-rancour
-random
-rang
-rang
-rang
-ranger
-rang
-rang
-rank
-ranker
-rankest
-rank
-rankl
-rankli
-rank
-rank
-ransack
-ransack
-ransom
-ransom
-ransom
-ransomless
-ransom
-rant
-rant
-rap
-rape
-rape
-rapier
-rapier
-rapin
-rap
-rapt
-raptur
-raptur
-rar
-rare
-rare
-rare
-rarer
-rarest
-rariti
-rariti
-rascal
-rascalliest
-rascal
-rascal
-rase
-rash
-rasher
-rashli
-rash
-rat
-ratcatch
-ratcliff
-rate
-rate
-rate
-rate
-rather
-ratherest
-ratifi
-ratifi
-ratifi
-rate
-ration
-ratolorum
-rat
-ratsban
-rattl
-rattl
-rattl
-ratur
-raught
-rav
-rave
-ravel
-raven
-raven
-raven
-raven
-ravenspurgh
-rave
-ravin
-rave
-ravish
-ravish
-ravish
-ravish
-ravish
-raw
-rawer
-rawli
-raw
-rai
-rai
-rai
-raz
-raze
-raze
-raze
-razeth
-raze
-razor
-razor
-razor
-razur
-re
-reach
-reach
-reacheth
-reach
-read
-reader
-readiest
-readili
-readi
-read
-readin
-read
-readi
-real
-realli
-realm
-realm
-reap
-reaper
-reap
-reap
-rear
-rear
-rearward
-reason
-reason
-reason
-reason
-reason
-reasonless
-reason
-reav
-rebat
-rebato
-rebeck
-rebel
-rebel
-rebel
-rebellion
-rebelli
-rebel
-rebound
-rebuk
-rebuk
-rebuk
-rebuk
-rebuk
-rebu
-recal
-recant
-recant
-recant
-recant
-receipt
-receipt
-receiv
-receiv
-receiv
-receiv
-receiv
-receivest
-receiveth
-receiv
-receptacl
-rechat
-reciproc
-reciproc
-recit
-recit
-reciterai
-reck
-reck
-reckless
-reckon
-reckon
-reckon
-reckon
-reck
-reclaim
-reclaim
-reclus
-recogniz
-recogniz
-recoil
-recoil
-recollect
-recomfort
-recomfortur
-recommend
-recommend
-recommend
-recompen
-recompens
-reconcil
-reconcil
-reconcil
-reconcil
-reconcil
-reconcil
-reconcili
-record
-record
-record
-record
-record
-record
-recount
-recount
-recount
-recount
-recount
-recours
-recov
-recov
-recover
-recov
-recoveri
-recov
-recoveri
-recreant
-recreant
-recreat
-recreat
-rectifi
-rector
-rectorship
-recur
-recur
-red
-redbreast
-redder
-reddest
-rede
-redeem
-redeem
-redeem
-redeem
-redeem
-redeliv
-redempt
-redim
-red
-redoubl
-redoubt
-redound
-redress
-redress
-redress
-reduc
-reechi
-reed
-reed
-reek
-reek
-reek
-reeki
-reel
-reeleth
-reel
-reel
-refel
-refer
-refer
-referr
-refer
-refigur
-refin
-refin
-reflect
-reflect
-reflect
-reflex
-reform
-reform
-reform
-refractori
-refrain
-refresh
-refresh
-reft
-reft
-refug
-refu
-refus
-refus
-refus
-refusest
-refus
-reg
-regal
-regalia
-regan
-regard
-regard
-regard
-regardfulli
-regard
-regard
-regener
-regent
-regentship
-regia
-regiment
-regiment
-regina
-region
-region
-regist
-regist
-regist
-regreet
-regreet
-regress
-reguerdon
-regular
-rehear
-rehears
-rehears
-reign
-reign
-reignier
-reign
-reign
-rein
-reinforc
-reinforc
-reinforc
-rein
-reiter
-reject
-reject
-rejoic
-rejoic
-rejoic
-rejoiceth
-rejoic
-rejoicingli
-rejoindur
-rejourn
-rel
-relaps
-relat
-relat
-relat
-relat
-rel
-relea
-releas
-releas
-releas
-relent
-relent
-relent
-relianc
-relic
-relief
-reliev
-reliev
-reliev
-reliev
-reliev
-religion
-religion
-religi
-religi
-relinquish
-reliqu
-reliquit
-relish
-relum
-reli
-reli
-remain
-remaind
-remaind
-remain
-remaineth
-remain
-remain
-remark
-remark
-remedi
-remedi
-remedi
-remedi
-rememb
-rememb
-rememb
-rememb
-remembr
-remembranc
-remembr
-remercimen
-remiss
-remiss
-remiss
-remit
-remnant
-remnant
-remonstr
-remors
-remors
-remorseless
-remot
-remot
-remov
-remov
-remov
-removed
-remov
-remov
-remov
-remuner
-remuner
-renc
-rend
-render
-render
-render
-rendezv
-renegado
-reneg
-reneg
-renew
-renew
-renewest
-renounc
-renounc
-renounc
-renowm
-renown
-renown
-rent
-rent
-repaid
-repair
-repair
-repair
-repair
-repass
-repast
-repastur
-repai
-repai
-repai
-repeal
-repeal
-repeal
-repeat
-repeat
-repeat
-repeat
-repel
-repent
-repent
-repent
-repent
-repent
-repent
-repetit
-repetit
-repin
-repin
-repin
-replant
-replenish
-replenish
-replet
-replic
-repli
-repli
-repliest
-repli
-repli
-report
-report
-report
-reportest
-report
-reportingli
-report
-repos
-repos
-reposeth
-repos
-repossess
-reprehend
-reprehend
-reprehend
-repres
-repres
-repriev
-repriev
-repris
-reproach
-reproach
-reproach
-reproachfulli
-reprob
-reprob
-reproof
-reprov
-reprov
-reprov
-reprov
-reprov
-repugn
-repugn
-repugn
-repuls
-repuls
-repurcha
-repur
-reput
-reput
-reput
-reputeless
-reput
-reput
-request
-request
-request
-request
-requiem
-requir
-requir
-requir
-requir
-requireth
-requir
-requisit
-requisit
-requit
-requit
-requit
-requit
-requit
-rer
-rere
-rer
-rescu
-rescu
-rescu
-rescu
-rescu
-resembl
-resembl
-resembl
-resembl
-resembleth
-resembl
-reserv
-reserv
-reserv
-reserv
-reserv
-resid
-resid
-resid
-resid
-resid
-residu
-resign
-resign
-resist
-resist
-resist
-resist
-resist
-resolut
-resolut
-resolut
-resolut
-resolv
-resolv
-resolv
-resolvedli
-resolv
-resolveth
-resort
-resort
-resound
-resound
-respeak
-respect
-respect
-respect
-respect
-respect
-respect
-respic
-respit
-respit
-respons
-respos
-ress
-rest
-rest
-resteth
-rest
-rest
-restitut
-restless
-restor
-restor
-restor
-restor
-restor
-restor
-restor
-restrain
-restrain
-restrain
-restrain
-restraint
-rest
-resti
-resum
-resum
-resum
-resurrect
-retail
-retail
-retain
-retain
-retain
-retel
-retent
-retent
-retinu
-retir
-retir
-retir
-retir
-retir
-retir
-retold
-retort
-retort
-retourn
-retract
-retreat
-retrograd
-ret
-return
-return
-returnest
-returneth
-return
-return
-revania
-reveal
-reveal
-revel
-revel
-revel
-revel
-revel
-revel
-revelri
-revel
-reveng
-reveng
-reveng
-reveng
-reveng
-reveng
-reveng
-reveng
-reveng
-revengingli
-revenu
-revenu
-reverb
-reverber
-reverb
-reverenc
-rever
-reverend
-rever
-rever
-rever
-revers
-revers
-revert
-review
-reviewest
-revil
-revil
-revisit
-reviv
-reviv
-reviv
-reviv
-revok
-revok
-revok
-revolt
-revolt
-revolt
-revolt
-revolut
-revolut
-revolv
-revolv
-reward
-reward
-reward
-reward
-reward
-reword
-reword
-rex
-rei
-reynaldo
-rford
-rful
-rfull
-rhapsodi
-rheim
-rhenish
-rhesu
-rhetor
-rheum
-rheumat
-rheum
-rheumi
-rhinocero
-rhode
-rhodop
-rhubarb
-rhym
-rhyme
-rhymer
-rhyme
-rhyme
-rialto
-rib
-ribald
-riband
-riband
-ribaudr
-ribb
-rib
-ribbon
-ribbon
-rib
-rice
-rich
-richard
-richer
-rich
-richest
-richli
-richmond
-richmond
-rid
-riddanc
-ridden
-riddl
-riddl
-riddl
-ride
-rider
-rider
-ride
-ridest
-rideth
-ridg
-ridg
-ridicul
-ride
-rid
-rien
-ri
-rifl
-rift
-rift
-rig
-rigg
-riggish
-right
-righteou
-righteous
-right
-rightfulli
-rightli
-right
-rigol
-rigor
-rigor
-rigour
-ril
-rim
-rin
-rinaldo
-rind
-ring
-ring
-ringlead
-ringlet
-ring
-ringwood
-riot
-rioter
-riot
-riotou
-riot
-rip
-ripe
-ripe
-ripen
-ripen
-ripe
-ripen
-ripen
-riper
-ripest
-ripe
-ripp
-rip
-rise
-risen
-rise
-riseth
-rish
-rise
-rite
-rite
-rivag
-rival
-rival
-rival
-rival
-rive
-rive
-rivel
-river
-river
-rivet
-rivet
-rivet
-rivo
-rj
-rless
-road
-road
-roam
-roam
-roan
-roar
-roar
-roarer
-roar
-roar
-roast
-roast
-rob
-roba
-roba
-robb
-rob
-robber
-robber
-robberi
-rob
-robe
-robe
-robert
-robe
-robin
-rob
-robusti
-rochest
-rochford
-rock
-rock
-rocki
-rod
-rode
-roderigo
-rod
-roe
-roe
-roger
-rogero
-rogu
-rogueri
-rogu
-roguish
-roi
-roist
-roll
-roll
-roll
-roll
-rom
-romag
-roman
-romano
-romano
-roman
-rome
-romeo
-romish
-rondur
-ronyon
-rood
-roof
-roof
-rook
-rook
-rooki
-room
-room
-root
-root
-rootedli
-rooteth
-root
-root
-rope
-roperi
-rope
-rope
-ro
-rosalind
-rosalinda
-rosalind
-rosalin
-rosciu
-rose
-rose
-rosemari
-rosencrantz
-rose
-ross
-rosi
-rot
-rote
-rote
-rother
-rotherham
-rot
-rot
-rotten
-rotten
-rot
-rotund
-rouen
-rough
-rougher
-roughest
-roughli
-rough
-round
-round
-roundel
-rounder
-roundest
-round
-roundli
-round
-roundur
-rou
-rous
-rous
-rousillon
-rousli
-roussi
-rout
-rout
-rout
-rove
-rover
-row
-rowel
-rowland
-rowland
-roi
-royal
-royal
-royal
-royalti
-royalti
-roynish
-rs
-rt
-rub
-rubb
-rub
-rubbish
-rubi
-rubiou
-rub
-rubi
-rud
-rudand
-rudder
-ruddi
-ruddock
-ruddi
-rude
-rude
-rude
-ruder
-rudesbi
-rudest
-rudiment
-rue
-ru
-ruff
-ruffian
-ruffian
-ruffl
-ruffl
-ruff
-rug
-rugbi
-rugemount
-rug
-ruin
-ruinat
-ruin
-ruin
-ruinou
-ruin
-rul
-rule
-rule
-ruler
-ruler
-rule
-rule
-rumbl
-ruminai
-ruminat
-rumin
-rumin
-rumin
-rumin
-rumor
-rumour
-rumour
-rumour
-rump
-run
-runag
-runag
-runawai
-runawai
-rung
-runn
-runner
-runner
-run
-run
-ruptur
-ruptur
-rural
-rush
-rush
-rush
-rushl
-rushi
-russet
-russia
-russian
-russian
-rust
-rust
-rustic
-rustic
-rustic
-rustl
-rustl
-rust
-rusti
-rut
-ruth
-ruth
-ruthless
-rutland
-ruttish
-ry
-rye
-ryth
-s
-sa
-saba
-sabbath
-sabl
-sabl
-sack
-sackbut
-sackcloth
-sack
-sackerson
-sack
-sacrament
-sacr
-sacrif
-sacrific
-sacrific
-sacrific
-sacrifici
-sacrif
-sacrilegi
-sacr
-sad
-sadder
-saddest
-saddl
-saddler
-saddl
-sadli
-sad
-saf
-safe
-safeguard
-safe
-safer
-safest
-safeti
-safeti
-saffron
-sag
-sage
-sagittari
-said
-saidst
-sail
-sail
-sailmak
-sailor
-sailor
-sail
-sain
-saint
-saint
-saintlik
-saint
-saith
-sake
-sake
-sala
-salad
-salamand
-salari
-sale
-salerio
-salicam
-saliqu
-salisburi
-sall
-sallet
-sallet
-salli
-sallow
-salli
-salmon
-salmon
-salt
-salter
-saltier
-salt
-saltpetr
-salut
-salut
-salut
-salut
-salut
-saluteth
-salv
-salvat
-salv
-salv
-same
-samingo
-samp
-sampir
-sampl
-sampler
-sampson
-samson
-samson
-sancta
-sanctifi
-sanctifi
-sanctifi
-sanctimoni
-sanctimoni
-sanctimoni
-sanctiti
-sanctiti
-sanctuar
-sanctuari
-sand
-sandal
-sandbag
-sand
-sand
-sandi
-sandi
-sang
-sanguin
-sangui
-saniti
-san
-santrail
-sap
-sapient
-sapit
-sapless
-sapl
-sapphir
-sapphir
-saracen
-sarcenet
-sard
-sardian
-sardinia
-sardi
-sarum
-sat
-satan
-satchel
-sate
-sate
-satiat
-satieti
-satin
-satir
-satir
-sati
-satisfact
-satisfi
-satisfi
-satisfi
-satisfi
-saturdai
-saturdai
-saturn
-saturnin
-saturninu
-satyr
-satyr
-sauc
-sauc
-sauc
-saucer
-sauc
-saucili
-sauci
-sauci
-sauf
-saunder
-sav
-savag
-savag
-savag
-savageri
-savag
-save
-save
-save
-save
-saviour
-savori
-savour
-savour
-savour
-savouri
-savoi
-saw
-saw
-sawest
-sawn
-sawpit
-saw
-sawyer
-saxon
-saxoni
-saxton
-sai
-sayest
-sai
-sai
-sai
-sayst
-sblood
-sc
-scab
-scabbard
-scab
-scaffold
-scaffoldag
-scal
-scald
-scald
-scald
-scale
-scale
-scale
-scale
-scall
-scalp
-scalp
-scali
-scambl
-scambl
-scamel
-scan
-scandal
-scandaliz
-scandal
-scandi
-scann
-scant
-scant
-scanter
-scant
-scantl
-scant
-scap
-scape
-scape
-scape
-scapeth
-scar
-scarc
-scarc
-scarciti
-scare
-scarecrow
-scarecrow
-scarf
-scarf
-scarf
-scare
-scarlet
-scarr
-scarr
-scar
-scaru
-scath
-scath
-scath
-scatt
-scatter
-scatter
-scatter
-scatter
-scelera
-scelerisqu
-scene
-scene
-scent
-scent
-scept
-scepter
-sceptr
-sceptr
-sceptr
-schedul
-schedul
-scholar
-scholarli
-scholar
-school
-schoolboi
-schoolboi
-schoolfellow
-school
-schoolmast
-schoolmast
-school
-sciatica
-sciatica
-scienc
-scienc
-scimitar
-scion
-scion
-scissor
-scoff
-scoffer
-scof
-scoff
-scoggin
-scold
-scold
-scold
-sconc
-scone
-scope
-scope
-scorch
-scorch
-score
-score
-score
-score
-scorn
-scorn
-scorn
-scornfulli
-scorn
-scorn
-scorpion
-scorpion
-scot
-scotch
-scotch
-scotland
-scot
-scottish
-scoundrel
-scour
-scour
-scourg
-scourg
-scour
-scout
-scout
-scowl
-scrap
-scrape
-scrape
-scrap
-scratch
-scratch
-scratch
-scream
-scream
-screech
-screech
-screen
-screen
-screw
-screw
-scribbl
-scribbl
-scribe
-scribe
-scrimer
-scrip
-scrippag
-scriptur
-scriptur
-scriven
-scroll
-scroll
-scroop
-scrowl
-scroyl
-scrub
-scrupl
-scrupl
-scrupul
-scuffl
-scuffl
-scullion
-scull
-scum
-scurril
-scurril
-scurril
-scurvi
-scuse
-scut
-scutcheon
-scutcheon
-scylla
-scyth
-scyth
-scythia
-scythian
-sdeath
-se
-sea
-seacoal
-seafar
-seal
-seal
-seal
-seal
-seam
-seamen
-seami
-seaport
-sear
-searc
-search
-searcher
-search
-searcheth
-search
-sear
-sea
-seasick
-seasid
-season
-season
-season
-seat
-seat
-seat
-sebastian
-second
-secondarili
-secondari
-second
-second
-secreci
-secret
-secretari
-secretari
-secretli
-secret
-sect
-sectari
-sect
-secundo
-secur
-secur
-secur
-secur
-sedg
-sedg
-sedg
-sedgi
-sedit
-sediti
-seduc
-seduc
-seduc
-seduc
-seduc
-see
-seed
-seed
-seed
-seed
-seedsman
-seein
-see
-seek
-seek
-seek
-seel
-seel
-seeli
-seem
-seem
-seemer
-seemest
-seemeth
-seem
-seemingli
-seemli
-seem
-seen
-seer
-see
-sees
-seest
-seeth
-seeth
-seeth
-seet
-segreg
-seigneur
-seigneur
-seiz
-seiz
-seiz
-seiz
-seizeth
-seiz
-seizur
-seld
-seldom
-select
-seleucu
-self
-selfsam
-sell
-seller
-sell
-sell
-selv
-semblabl
-semblabl
-semblanc
-semblanc
-sembl
-semi
-semicircl
-semirami
-semper
-semproniu
-senat
-senat
-senat
-send
-sender
-sendeth
-send
-send
-seneca
-senior
-seniori
-seni
-sennet
-senoi
-sens
-senseless
-sens
-sensibl
-sensibl
-sensual
-sensual
-sent
-sentenc
-sentenc
-sentenc
-sententi
-sentinel
-sentinel
-separ
-separ
-separ
-separ
-separ
-septentrion
-sepulchr
-sepulchr
-sepulchr
-sequel
-sequenc
-sequent
-sequest
-sequest
-sequestr
-sere
-sereni
-serg
-sergeant
-seriou
-serious
-sermon
-sermon
-serpent
-serpentin
-serpent
-serpigo
-serv
-servant
-servant
-servant
-serv
-serv
-server
-serv
-serveth
-servic
-servic
-servic
-servil
-servil
-serviliu
-serv
-servingman
-servingmen
-serviteur
-servitor
-servitor
-servitud
-sessa
-session
-session
-sesto
-set
-setebo
-set
-setter
-set
-settl
-settl
-settlest
-settl
-sev
-seven
-sevenfold
-sevennight
-seventeen
-seventh
-seventi
-sever
-sever
-sever
-sever
-sever
-sever
-sever
-severest
-sever
-sever
-severn
-sever
-sew
-seward
-sewer
-sew
-sex
-sex
-sexton
-sextu
-seymour
-seyton
-sfoot
-sh
-shackl
-shackl
-shade
-shade
-shadow
-shadow
-shadow
-shadow
-shadowi
-shadi
-shafalu
-shaft
-shaft
-shag
-shak
-shake
-shake
-shaken
-shake
-shake
-shale
-shall
-shalleng
-shallow
-shallowest
-shallowli
-shallow
-shalt
-sham
-shambl
-shame
-shame
-shame
-shamefulli
-shameless
-shame
-shamest
-shame
-shank
-shank
-shap
-shape
-shape
-shapeless
-shapen
-shape
-shape
-shar
-shard
-shard
-shard
-share
-share
-sharer
-share
-share
-shark
-sharp
-sharpen
-sharpen
-sharpen
-sharper
-sharpest
-sharpli
-sharp
-sharp
-shatter
-shav
-shave
-shaven
-shaw
-she
-sheaf
-sheal
-shear
-shearer
-shear
-shearman
-shear
-sheath
-sheath
-sheath
-sheath
-sheath
-sheav
-sheav
-shed
-shed
-shed
-sheen
-sheep
-sheepcot
-sheepcot
-sheep
-sheepskin
-sheer
-sheet
-sheet
-sheet
-sheffield
-shelf
-shell
-shell
-shelt
-shelter
-shelter
-shelv
-shelv
-shelvi
-shent
-shepherd
-shepherd
-shepherdess
-shepherdess
-shepherd
-sher
-sheriff
-sherri
-she
-sheweth
-shield
-shield
-shield
-shift
-shift
-shift
-shift
-shill
-shill
-shin
-shine
-shine
-shineth
-shine
-shin
-shini
-ship
-shipboard
-shipman
-shipmast
-shipmen
-shipp
-ship
-ship
-ship
-shipt
-shipwreck
-shipwreck
-shipwright
-shipwright
-shire
-shirlei
-shirt
-shirt
-shive
-shiver
-shiver
-shiver
-shoal
-shoal
-shock
-shock
-shod
-shoe
-shoe
-shoemak
-shoe
-shog
-shone
-shook
-shoon
-shoot
-shooter
-shooti
-shoot
-shoot
-shop
-shop
-shore
-shore
-shorn
-short
-shortcak
-shorten
-shorten
-shorten
-shorter
-shortli
-short
-shot
-shotten
-shough
-should
-shoulder
-shoulder
-shoulder
-shouldst
-shout
-shout
-shout
-shout
-shov
-shove
-shovel
-shovel
-show
-show
-shower
-shower
-showest
-show
-shown
-show
-shred
-shrew
-shrewd
-shrewdli
-shrewd
-shrewish
-shrewishli
-shrewish
-shrew
-shrewsburi
-shriek
-shriek
-shriek
-shriev
-shrift
-shrill
-shriller
-shrill
-shrilli
-shrimp
-shrine
-shrink
-shrink
-shrink
-shriv
-shrive
-shriver
-shrive
-shrive
-shroud
-shroud
-shroud
-shroud
-shrove
-shrow
-shrow
-shrub
-shrub
-shrug
-shrug
-shrunk
-shudd
-shudder
-shuffl
-shuffl
-shuffl
-shuffl
-shun
-shunless
-shunn
-shun
-shun
-shun
-shut
-shut
-shuttl
-shy
-shylock
-si
-sibyl
-sibylla
-sibyl
-sicil
-sicilia
-sicilian
-siciliu
-sicil
-sicili
-siciniu
-sick
-sicken
-sicken
-sicker
-sickl
-sicklemen
-sickli
-sickli
-sickli
-sick
-sicl
-sicyon
-side
-side
-side
-sieg
-sieg
-sienna
-si
-siev
-sift
-sift
-sigeia
-sigh
-sigh
-sigh
-sigh
-sight
-sight
-sightless
-sightli
-sight
-sign
-signal
-signet
-signieur
-signific
-signific
-signifi
-signifi
-signifi
-signifi
-signior
-signiori
-signior
-signiori
-signor
-signori
-sign
-signum
-silenc
-silenc
-silenc
-silenc
-silent
-silent
-siliu
-silk
-silken
-silkman
-silk
-silliest
-silli
-sill
-silli
-silva
-silver
-silver
-silverli
-silvia
-silviu
-sima
-simil
-simil
-simoi
-simon
-simoni
-simp
-simpcox
-simpl
-simpl
-simpler
-simpl
-simplic
-simpli
-simular
-simul
-sin
-sinc
-sincer
-sincer
-sincer
-sinel
-sinew
-sinew
-sinew
-sinewi
-sin
-sinfulli
-sing
-sing
-sing
-singer
-sing
-singeth
-sing
-singl
-singl
-singl
-singli
-sing
-singular
-singularit
-singular
-singular
-singul
-sinist
-sink
-sink
-sink
-sinn
-sinner
-sinner
-sin
-sinon
-sin
-sip
-sip
-sir
-sire
-siren
-sirrah
-sir
-sist
-sister
-sisterhood
-sisterli
-sister
-sit
-sith
-sithenc
-sit
-sit
-situat
-situat
-situat
-siward
-six
-sixpenc
-sixpenc
-sixpenni
-sixteen
-sixth
-sixti
-siz
-size
-size
-sizzl
-skain
-skambl
-skein
-skelter
-ski
-skil
-skilfulli
-skill
-skilless
-skillet
-skill
-skill
-skim
-skimbl
-skin
-skinker
-skinni
-skin
-skip
-skipp
-skipper
-skip
-skirmish
-skirmish
-skirr
-skirt
-skirt
-skittish
-skulk
-skull
-skull
-sky
-skyei
-skyish
-slab
-slack
-slackli
-slack
-slain
-slake
-sland
-slander
-slander
-slander
-slander
-slander
-slander
-slander
-slash
-slaught
-slaughter
-slaughter
-slaughter
-slaughterman
-slaughtermen
-slaughter
-slaughter
-slave
-slaver
-slaveri
-slave
-slavish
-slai
-slayeth
-slai
-slai
-sleav
-sled
-sleek
-sleekli
-sleep
-sleeper
-sleeper
-sleepest
-sleep
-sleep
-sleepi
-sleev
-sleev
-sleid
-sleid
-sleight
-sleight
-slender
-slender
-slenderli
-slept
-slew
-slewest
-slice
-slid
-slide
-slide
-slide
-slight
-slight
-slightest
-slightli
-slight
-slight
-slili
-slime
-slimi
-sling
-slink
-slip
-slipp
-slipper
-slipper
-slipperi
-slip
-slish
-slit
-sliver
-slobb
-slomber
-slop
-slope
-slop
-sloth
-sloth
-slough
-slovenli
-slovenri
-slow
-slower
-slowli
-slow
-slubber
-slug
-sluggard
-sluggardiz
-sluggish
-sluic
-slumb
-slumber
-slumber
-slumberi
-slunk
-slut
-slut
-slutteri
-sluttish
-sluttish
-sly
-sly
-smack
-smack
-smack
-small
-smaller
-smallest
-small
-smalu
-smart
-smart
-smartli
-smatch
-smatter
-smear
-smell
-smell
-smell
-smelt
-smil
-smile
-smile
-smile
-smilest
-smilet
-smile
-smilingli
-smirch
-smirch
-smit
-smite
-smite
-smith
-smithfield
-smock
-smock
-smok
-smoke
-smoke
-smoke
-smoke
-smoki
-smooth
-smooth
-smooth
-smoothli
-smooth
-smooth
-smote
-smoth
-smother
-smother
-smother
-smug
-smulkin
-smutch
-snaffl
-snail
-snail
-snake
-snake
-snaki
-snap
-snapp
-snapper
-snar
-snare
-snare
-snarl
-snarleth
-snarl
-snatch
-snatcher
-snatch
-snatch
-sneak
-sneak
-sneap
-sneap
-sneck
-snip
-snipe
-snipt
-snore
-snore
-snore
-snort
-snout
-snow
-snowbal
-snow
-snowi
-snuff
-snuff
-snug
-so
-soak
-soak
-soak
-soar
-soar
-soar
-sob
-sob
-sober
-soberli
-sobrieti
-sob
-sociabl
-societi
-societi
-sock
-socrat
-sod
-sodden
-soe
-soever
-soft
-soften
-soften
-softer
-softest
-softli
-soft
-soil
-soil
-soilur
-soit
-sojourn
-sol
-sola
-solac
-solanio
-sold
-soldat
-solder
-soldest
-soldier
-soldier
-soldiership
-sole
-sole
-solem
-solemn
-solem
-solemn
-solemn
-solemniz
-solemn
-solemn
-solemnli
-sole
-solicit
-solicit
-solicit
-solicit
-solicit
-solicitor
-solicit
-solid
-solidar
-solid
-solinu
-solitari
-solomon
-solon
-solum
-solu
-solyman
-some
-somebodi
-someon
-somerset
-somervil
-someth
-sometim
-sometim
-somev
-somewhat
-somewher
-somewhith
-somm
-son
-sonanc
-song
-song
-sonnet
-sonnet
-sonnet
-son
-sont
-sonti
-soon
-sooner
-soonest
-sooth
-sooth
-soother
-sooth
-soothsai
-soothsay
-sooti
-sop
-sophist
-sophist
-sophi
-sop
-sorcer
-sorcer
-sorceress
-sorceri
-sorceri
-sore
-sorel
-sore
-sorer
-sore
-sorrier
-sorriest
-sorrow
-sorrow
-sorrowest
-sorrow
-sorrow
-sorrow
-sorri
-sort
-sortanc
-sort
-sort
-sort
-sossiu
-sot
-soto
-sot
-sottish
-soud
-sought
-soul
-sould
-soulless
-soul
-sound
-sound
-sounder
-soundest
-sound
-soundless
-soundli
-sound
-soundpost
-sound
-sour
-sourc
-sourc
-sourest
-sourli
-sour
-sou
-sous
-south
-southam
-southampton
-southerli
-southern
-southward
-southwark
-southwel
-souviendrai
-sov
-sovereign
-sovereignest
-sovereignli
-sovereignti
-sovereignvour
-sow
-sow
-sowl
-sowter
-space
-space
-spaciou
-spade
-spade
-spain
-spak
-spake
-spakest
-span
-spangl
-spangl
-spaniard
-spaniel
-spaniel
-spanish
-spann
-span
-spar
-spare
-spare
-spare
-sparingli
-spark
-sparkl
-sparkl
-sparkl
-spark
-sparrow
-sparrow
-sparta
-spartan
-spavin
-spavin
-spawn
-speak
-speaker
-speaker
-speakest
-speaketh
-speak
-speak
-spear
-speargrass
-spear
-special
-special
-special
-specialti
-specialti
-specifi
-specious
-spectacl
-spectacl
-spectacl
-spectat
-spectatorship
-specul
-specul
-specul
-sped
-speech
-speech
-speechless
-speed
-speed
-speedier
-speediest
-speedili
-speedi
-speed
-speed
-speedi
-speen
-spell
-spell
-spell
-spelt
-spencer
-spend
-spendest
-spend
-spend
-spendthrift
-spent
-sperato
-sperm
-spero
-sperr
-spher
-sphere
-sphere
-sphere
-spheric
-spheri
-sphinx
-spice
-spice
-spiceri
-spice
-spider
-spider
-spi
-spi
-spieth
-spightfulli
-spigot
-spill
-spill
-spill
-spilt
-spilth
-spin
-spinii
-spinner
-spinster
-spinster
-spire
-spirit
-spirit
-spiritless
-spirit
-spiritu
-spiritualti
-spirt
-spit
-spital
-spite
-spite
-spite
-spite
-spit
-spit
-spit
-splai
-spleen
-spleen
-spleen
-spleeni
-splendour
-splenit
-splinter
-splinter
-split
-split
-split
-split
-spoil
-spoil
-spok
-spoke
-spoken
-spoke
-spokesman
-spong
-spongi
-spoon
-spoon
-sport
-sport
-sport
-sportiv
-sport
-spot
-spotless
-spot
-spot
-spousal
-spous
-spout
-spout
-spout
-sprag
-sprang
-sprat
-sprawl
-sprai
-sprai
-spread
-spread
-spread
-spright
-spright
-sprightli
-sprig
-spring
-spring
-spring
-springeth
-springhalt
-spring
-spring
-springtim
-sprinkl
-sprinkl
-sprite
-sprite
-sprite
-sprite
-sprite
-sprout
-spruce
-sprung
-spun
-spur
-spurio
-spurn
-spurn
-spurr
-spurrer
-spur
-spur
-spy
-spy
-squabbl
-squadron
-squadron
-squand
-squar
-squar
-squarer
-squar
-squash
-squeak
-squeak
-squeal
-squeal
-squeez
-squeez
-squel
-squier
-squint
-squini
-squir
-squir
-squirrel
-st
-stab
-stabb
-stab
-stab
-stabl
-stabl
-stabl
-stablish
-stablish
-stab
-stack
-staff
-stafford
-stafford
-staffordshir
-stag
-stage
-stage
-stagger
-stagger
-stagger
-stag
-staid
-staider
-stain
-stain
-stain
-staineth
-stain
-stainless
-stain
-stair
-stair
-stake
-stake
-stale
-stale
-stalk
-stalk
-stalk
-stall
-stall
-stall
-stamford
-stammer
-stamp
-stamp
-stamp
-stanch
-stanchless
-stand
-standard
-standard
-stander
-stander
-standest
-standeth
-stand
-stand
-staniel
-stanlei
-stanz
-stanzo
-stanzo
-stapl
-stapl
-star
-stare
-stare
-stare
-stare
-stare
-stark
-starkli
-starlight
-starl
-starr
-starri
-star
-start
-start
-start
-startingli
-startl
-startl
-start
-starv
-starv
-starv
-starvelackei
-starvel
-starveth
-starv
-state
-stateli
-state
-state
-statesman
-statesmen
-statiliu
-station
-statist
-statist
-statu
-statu
-statur
-statur
-statut
-statut
-stave
-stave
-stai
-stai
-stayest
-stai
-stai
-stead
-stead
-steadfast
-steadier
-stead
-steal
-stealer
-stealer
-steal
-steal
-stealth
-stealthi
-steed
-steed
-steel
-steel
-steeli
-steep
-steep
-steepl
-steepl
-steep
-steepi
-steer
-steerag
-steer
-steer
-stell
-stem
-stem
-stench
-step
-stepdam
-stephano
-stephen
-stepmoth
-stepp
-step
-step
-steril
-steril
-sterl
-stern
-sternag
-sterner
-sternest
-stern
-steterat
-stew
-steward
-steward
-stewardship
-stew
-stew
-stick
-stick
-stickler
-stick
-stiff
-stiffen
-stiffli
-stifl
-stifl
-stifl
-stigmat
-stigmat
-stile
-still
-stiller
-stillest
-still
-stilli
-sting
-sting
-stingless
-sting
-stink
-stink
-stinkingli
-stink
-stint
-stint
-stint
-stir
-stirr
-stir
-stirrer
-stirrer
-stirreth
-stir
-stirrup
-stirrup
-stir
-stitcheri
-stitch
-stithi
-stithi
-stoccado
-stoccata
-stock
-stockfish
-stock
-stock
-stockish
-stock
-stog
-stog
-stoic
-stokesli
-stol
-stole
-stolen
-stolest
-stomach
-stomach
-stomach
-stomach
-ston
-stone
-stonecutt
-stone
-stonish
-stoni
-stood
-stool
-stool
-stoop
-stoop
-stoop
-stop
-stope
-stopp
-stop
-stop
-stop
-stor
-store
-storehous
-storehous
-store
-stori
-storm
-storm
-storm
-storm
-stormi
-stori
-stoup
-stoup
-stout
-stouter
-stoutli
-stout
-stover
-stow
-stowag
-stow
-strachi
-straggler
-straggl
-straight
-straightest
-straightwai
-strain
-strain
-strain
-strain
-strait
-strait
-straiter
-straitli
-strait
-strait
-strand
-strang
-strang
-strang
-stranger
-stranger
-strangest
-strangl
-strangl
-strangler
-strangl
-strangl
-strappado
-strap
-stratagem
-stratagem
-stratford
-strato
-straw
-strawberri
-strawberri
-straw
-strawi
-strai
-strai
-strai
-streak
-streak
-stream
-streamer
-stream
-stream
-strech
-street
-street
-strength
-strengthen
-strengthen
-strengthless
-strength
-stretch
-stretch
-stretch
-stretch
-strew
-strew
-strew
-strewment
-stricken
-strict
-stricter
-strictest
-strictli
-strictur
-stride
-stride
-stride
-strife
-strife
-strik
-strike
-striker
-strike
-strikest
-strike
-string
-stringless
-string
-strip
-stripe
-stripl
-stripl
-stripp
-strip
-striv
-strive
-strive
-strive
-strok
-stroke
-stroke
-strond
-strond
-strong
-stronger
-strongest
-strongli
-strook
-strosser
-strove
-strown
-stroi
-struck
-strucken
-struggl
-struggl
-struggl
-strumpet
-strumpet
-strumpet
-strung
-strut
-strut
-strut
-strut
-stubbl
-stubborn
-stubbornest
-stubbornli
-stubborn
-stuck
-stud
-student
-student
-studi
-studi
-studiou
-studious
-stud
-studi
-studi
-stuff
-stuf
-stuff
-stumbl
-stumbl
-stumblest
-stumbl
-stump
-stump
-stung
-stupefi
-stupid
-stupifi
-stuprum
-sturdi
-sty
-styga
-stygian
-styl
-style
-styx
-su
-sub
-subcontract
-subdu
-subdu
-subdu
-subduement
-subdu
-subdu
-subject
-subject
-subject
-subject
-submerg
-submiss
-submiss
-submit
-submit
-submit
-suborn
-suborn
-suborn
-subscrib
-subscrib
-subscrib
-subscrib
-subscript
-subsequ
-subsidi
-subsidi
-subsist
-subsist
-substanc
-substanc
-substanti
-substitut
-substitut
-substitut
-substitut
-subtil
-subtilli
-subtl
-subtleti
-subtleti
-subtli
-subtractor
-suburb
-subvers
-subvert
-succed
-succe
-succeed
-succeed
-succeed
-succe
-success
-successantli
-success
-success
-successfulli
-success
-success
-success
-successor
-successor
-succour
-succour
-such
-suck
-sucker
-sucker
-suck
-suckl
-suck
-sudden
-suddenli
-sue
-su
-suerli
-sue
-sueth
-suff
-suffer
-suffer
-suffer
-suffer
-suffer
-suffer
-suffic
-suffic
-suffic
-suffic
-sufficeth
-suffici
-suffici
-suffici
-suffic
-sufficit
-suffig
-suffoc
-suffoc
-suffoc
-suffolk
-suffrag
-suffrag
-sug
-sugar
-sugarsop
-suggest
-suggest
-suggest
-suggest
-suggest
-suggest
-sui
-suit
-suitabl
-suit
-suit
-suitor
-suitor
-suit
-suivez
-sullen
-sullen
-sulli
-sulli
-sulli
-sulph
-sulpher
-sulphur
-sulphur
-sultan
-sultri
-sum
-sumless
-summ
-summa
-summari
-summer
-summer
-summit
-summon
-summon
-summon
-sumpter
-sumptuou
-sumptuous
-sum
-sun
-sunbeam
-sunburn
-sunburnt
-sund
-sundai
-sundai
-sunder
-sunder
-sundri
-sung
-sunk
-sunken
-sunni
-sunris
-sun
-sunset
-sunshin
-sup
-super
-superfici
-superfici
-superflu
-superflu
-superflu
-superflux
-superior
-supern
-supernatur
-superprais
-superscript
-superscript
-superservic
-superstit
-superstiti
-superstiti
-supersubtl
-supervis
-supervisor
-supp
-supper
-supper
-suppertim
-sup
-supplant
-suppl
-suppler
-supplianc
-suppliant
-suppliant
-supplic
-supplic
-supplic
-suppli
-suppli
-suppli
-suppliest
-suppli
-supplyant
-suppli
-supplyment
-support
-support
-support
-support
-support
-support
-support
-supportor
-suppo
-suppos
-suppos
-suppos
-suppos
-supposest
-suppos
-supposit
-suppress
-suppress
-suppresseth
-supremaci
-suprem
-sup
-sur
-suranc
-surceas
-surd
-sure
-surecard
-sure
-surer
-surest
-sureti
-sureti
-surfeit
-surfeit
-surfeit
-surfeit
-surfeit
-surg
-surgeon
-surgeon
-surger
-surgeri
-surg
-surli
-surmi
-surmis
-surmis
-surmis
-surmount
-surmount
-surmount
-surnam
-surnam
-surnam
-surpasseth
-surpass
-surplic
-surplu
-surpri
-surpris
-surpris
-surrend
-surrei
-surrei
-survei
-surveyest
-survei
-surveyor
-surveyor
-survei
-surviv
-surviv
-survivor
-susan
-suspect
-suspect
-suspect
-suspect
-suspend
-suspens
-suspicion
-suspicion
-suspici
-suspir
-suspir
-sust
-sustain
-sustain
-sutler
-sutton
-suum
-swabber
-swaddl
-swag
-swagg
-swagger
-swagger
-swagger
-swagger
-swain
-swain
-swallow
-swallow
-swallow
-swallow
-swam
-swan
-swan
-sward
-sware
-swarm
-swarm
-swart
-swarth
-swarth
-swarthi
-swasher
-swash
-swath
-swath
-swathl
-swai
-swai
-swai
-swear
-swearer
-swearer
-swearest
-swear
-swear
-swear
-sweat
-sweaten
-sweat
-sweat
-sweati
-sweep
-sweeper
-sweep
-sweet
-sweeten
-sweeten
-sweeter
-sweetest
-sweetheart
-sweet
-sweetli
-sweetmeat
-sweet
-sweet
-swell
-swell
-swell
-swell
-swelter
-sweno
-swept
-swerv
-swerver
-swerv
-swift
-swifter
-swiftest
-swiftli
-swift
-swill
-swill
-swim
-swimmer
-swimmer
-swim
-swim
-swine
-swineherd
-swing
-swing
-swinish
-swinstead
-switch
-swit
-switzer
-swol
-swoll
-swoln
-swoon
-swoon
-swoon
-swoon
-swoop
-swoopstak
-swor
-sword
-sworder
-sword
-swore
-sworn
-swound
-swound
-swum
-swung
-sy
-sycamor
-sycorax
-sylla
-syllabl
-syllabl
-syllog
-symbol
-sympathis
-sympathiz
-sympath
-sympath
-sympathi
-synagogu
-synod
-synod
-syracus
-syracusian
-syracusian
-syria
-syrup
-t
-ta
-taber
-tabl
-tabl
-tabl
-tablet
-tabor
-tabor
-tabor
-tabourin
-taciturn
-tack
-tackl
-tackl
-tackl
-tackl
-tackl
-taddl
-tadpol
-taffeta
-taffeti
-tag
-tagrag
-tah
-tail
-tailor
-tailor
-tail
-taint
-taint
-taint
-taint
-taintur
-tak
-take
-taken
-taker
-take
-takest
-taketh
-take
-tal
-talbot
-talbotit
-talbot
-tale
-talent
-talent
-taleport
-tale
-talk
-talk
-talker
-talker
-talkest
-talk
-talk
-tall
-taller
-tallest
-talli
-tallow
-talli
-talon
-tam
-tambourin
-tame
-tame
-tame
-tame
-tamer
-tame
-tame
-tamora
-tamworth
-tan
-tang
-tangl
-tangl
-tank
-tanl
-tann
-tan
-tanner
-tanquam
-tanta
-tantaen
-tap
-tape
-taper
-taper
-tapestri
-tapestri
-taphous
-tapp
-tapster
-tapster
-tar
-tardi
-tardili
-tardi
-tardi
-tarentum
-targ
-targ
-target
-target
-tarpeian
-tarquin
-tarquin
-tarr
-tarr
-tarrianc
-tarri
-tarri
-tarri
-tarri
-tart
-tartar
-tartar
-tartli
-tart
-task
-tasker
-task
-task
-tassel
-tast
-tast
-tast
-tast
-tatt
-tatter
-tatter
-tatter
-tattl
-tattl
-tattl
-taught
-taunt
-taunt
-taunt
-tauntingli
-taunt
-tauru
-tavern
-tavern
-tavi
-tawdri
-tawni
-tax
-taxat
-taxat
-tax
-tax
-tc
-te
-teach
-teacher
-teacher
-teach
-teachest
-teacheth
-teach
-team
-tear
-tear
-tear
-tear
-tearsheet
-teat
-tediou
-tedious
-tedious
-teem
-teem
-teem
-teen
-teeth
-teipsum
-telamon
-telamoniu
-tell
-teller
-tell
-tell
-tellu
-temp
-temper
-temper
-temper
-temper
-temper
-temper
-tempest
-tempest
-tempestu
-templ
-templ
-tempor
-temporari
-temporiz
-tempor
-tempor
-temp
-tempt
-temptat
-temptat
-tempt
-tempter
-tempter
-tempteth
-tempt
-tempt
-ten
-tenabl
-tenant
-tenantiu
-tenantless
-tenant
-tench
-tend
-tendanc
-tend
-tender
-tender
-tenderli
-tender
-tender
-tend
-tend
-tenedo
-tenement
-tenement
-tenfold
-tenni
-tenour
-tenour
-ten
-tent
-tent
-tenth
-tenth
-tent
-tenur
-tenur
-tercel
-tereu
-term
-termag
-term
-termin
-termless
-term
-terra
-terrac
-terram
-terra
-terr
-terren
-terrestri
-terribl
-terribl
-territori
-territori
-terror
-terror
-tertian
-tertio
-test
-testament
-test
-tester
-testern
-testifi
-testimoni
-testimoni
-testimoni
-testi
-testril
-testi
-tetchi
-tether
-tetter
-tevil
-tewksburi
-text
-tgv
-th
-thae
-thame
-than
-thane
-thane
-thank
-thank
-thank
-thankfulli
-thank
-thank
-thank
-thankless
-thank
-thanksgiv
-thaso
-that
-thatch
-thaw
-thaw
-thaw
-the
-theatr
-theban
-thebe
-thee
-theft
-theft
-thein
-their
-their
-theis
-them
-theme
-theme
-themselv
-then
-thenc
-thenceforth
-theoric
-there
-thereabout
-thereabout
-thereaft
-thereat
-therebi
-therefor
-therein
-thereof
-thereon
-thereto
-thereunto
-thereupon
-therewith
-therewith
-thersit
-these
-theseu
-thessalian
-thessali
-theti
-thew
-thei
-thick
-thicken
-thicken
-thicker
-thickest
-thicket
-thickskin
-thief
-thieveri
-thiev
-thievish
-thigh
-thigh
-thimbl
-thimbl
-thin
-thine
-thing
-thing
-think
-thinkest
-think
-think
-think
-thinkst
-thinli
-third
-thirdli
-third
-thirst
-thirst
-thirst
-thirsti
-thirteen
-thirti
-thirtieth
-thirti
-thi
-thisbi
-thisn
-thistl
-thistl
-thither
-thitherward
-thoa
-thoma
-thorn
-thorn
-thorni
-thorough
-thoroughli
-those
-thou
-though
-thought
-thought
-thought
-thousand
-thousand
-thracian
-thraldom
-thrall
-thrall
-thrall
-thrash
-thrason
-thread
-threadbar
-threaden
-thread
-threat
-threaten
-threaten
-threaten
-threatest
-threat
-three
-threefold
-threepenc
-threepil
-three
-threescor
-thresher
-threshold
-threw
-thrice
-thrift
-thriftless
-thrift
-thrifti
-thrill
-thrill
-thrill
-thrive
-thrive
-thriver
-thrive
-thrive
-throat
-throat
-throb
-throb
-throca
-throe
-throe
-thromuldo
-thron
-throne
-throne
-throne
-throng
-throng
-throng
-throstl
-throttl
-through
-throughfar
-throughfar
-throughli
-throughout
-throw
-thrower
-throwest
-throw
-thrown
-throw
-thrum
-thrumm
-thrush
-thrust
-thrusteth
-thrust
-thrust
-thumb
-thumb
-thump
-thund
-thunder
-thunderbolt
-thunderbolt
-thunder
-thunder
-thunderston
-thunderstrok
-thurio
-thursdai
-thu
-thwack
-thwart
-thwart
-thwart
-thwart
-thy
-thyme
-thymu
-thyreu
-thyself
-ti
-tib
-tiber
-tiberio
-tibei
-tice
-tick
-tickl
-tickl
-tickl
-tickl
-tickl
-ticklish
-tiddl
-tide
-tide
-tide
-tidi
-tie
-ti
-ti
-tiff
-tiger
-tiger
-tight
-tightli
-tike
-til
-tile
-till
-tillag
-tilli
-tilt
-tilter
-tilth
-tilt
-tilt
-tiltyard
-tim
-timandra
-timber
-time
-timeless
-timeli
-time
-time
-timon
-timor
-timor
-timor
-tinct
-tinctur
-tinctur
-tinder
-tingl
-tinker
-tinker
-tinsel
-tini
-tip
-tipp
-tippl
-tip
-tipsi
-tipto
-tir
-tire
-tire
-tire
-tirest
-tire
-tirra
-tirrit
-ti
-tish
-tisick
-tissu
-titan
-titania
-tith
-tith
-tith
-titiniu
-titl
-titl
-titleless
-titl
-tittl
-tittl
-titular
-titu
-tn
-to
-toad
-toad
-toadstool
-toast
-toast
-toast
-toast
-toaz
-tobi
-tock
-tod
-todai
-todpol
-tod
-toe
-toe
-tofor
-toge
-toge
-togeth
-toil
-toil
-toil
-toil
-token
-token
-told
-toledo
-toler
-toll
-toll
-tom
-tomb
-tomb
-tomb
-tombless
-tomboi
-tomb
-tomorrow
-tomyri
-ton
-tong
-tongu
-tongu
-tongu
-tongueless
-tongu
-tonight
-too
-took
-tool
-tool
-tooth
-toothach
-toothpick
-toothpick
-top
-topa
-top
-topgal
-topless
-topmast
-topp
-top
-toppl
-toppl
-top
-topsail
-topsi
-torch
-torchbear
-torchbear
-torcher
-torch
-torchlight
-tore
-torment
-tormenta
-torment
-torment
-torment
-tormentor
-torment
-torn
-torrent
-tortiv
-tortois
-tortur
-tortur
-tortur
-tortur
-tortur
-tortur
-torturest
-tortur
-toryn
-toss
-toss
-tosseth
-toss
-tot
-total
-total
-tott
-totter
-totter
-tou
-touch
-touch
-touch
-toucheth
-touch
-touchston
-tough
-tougher
-tough
-tourain
-tournament
-tour
-tou
-tout
-touz
-tow
-toward
-towardli
-toward
-tower
-tower
-tower
-town
-town
-township
-townsman
-townsmen
-towton
-toi
-toi
-trace
-trace
-track
-tract
-tractabl
-trade
-trade
-trader
-trade
-tradesman
-tradesmen
-trade
-tradit
-tradit
-traduc
-traduc
-traduc
-traffic
-traffick
-traffic
-tragedian
-tragedian
-tragedi
-tragedi
-tragic
-tragic
-trail
-train
-train
-train
-train
-trait
-traitor
-traitorli
-traitor
-traitor
-traitor
-traitress
-traject
-trammel
-trampl
-trampl
-trampl
-tranc
-tranc
-tranio
-tranquil
-tranquil
-transcend
-transcend
-transfer
-transfigur
-transfix
-transform
-transform
-transform
-transform
-transgress
-transgress
-transgress
-transgress
-translat
-translat
-translat
-translat
-transmigr
-transmut
-transpar
-transport
-transport
-transport
-transport
-transport
-transpos
-transshap
-trap
-trapp
-trap
-trap
-trash
-travail
-travail
-travel
-travel
-travel
-travel
-travel
-travel
-travel
-travellest
-travel
-travel
-traver
-travers
-trai
-treacher
-treacher
-treacher
-treacheri
-tread
-tread
-tread
-treason
-treason
-treason
-treason
-treasur
-treasur
-treasur
-treasuri
-treasuri
-treat
-treati
-treatis
-treat
-treati
-trebl
-trebl
-trebl
-treboniu
-tree
-tree
-trembl
-trembl
-trembl
-tremblest
-trembl
-tremblingli
-tremor
-trempl
-trench
-trenchant
-trench
-trencher
-trencher
-trencherman
-trencher
-trench
-trench
-trent
-tre
-trespass
-trespass
-tressel
-tress
-trei
-trial
-trial
-trib
-tribe
-tribe
-tribul
-tribun
-tribun
-tribun
-tributari
-tributari
-tribut
-tribut
-trice
-trick
-trick
-trickl
-trick
-tricksi
-trident
-tri
-trier
-trifl
-trifl
-trifler
-trifl
-trifl
-trigon
-trill
-trim
-trimli
-trimm
-trim
-trim
-trim
-trinculo
-trinculo
-trinket
-trip
-tripartit
-tripe
-tripl
-triplex
-tripoli
-tripoli
-tripp
-trip
-trippingli
-trip
-trist
-triton
-triumph
-triumphant
-triumphantli
-triumpher
-triumpher
-triumph
-triumph
-triumvir
-triumvir
-triumvir
-triumviri
-trivial
-troat
-trod
-trodden
-troiant
-troien
-troilu
-troilus
-trojan
-trojan
-troll
-tromperi
-trompet
-troop
-troop
-troop
-trop
-trophi
-trophi
-tropic
-trot
-troth
-troth
-troth
-trot
-trot
-troubl
-troubl
-troubler
-troubl
-troublesom
-troublest
-troublou
-trough
-trout
-trout
-trovato
-trow
-trowel
-trowest
-troi
-troyan
-troyan
-truant
-truce
-truckl
-trudg
-true
-trueborn
-truepenni
-truer
-truest
-truie
-trull
-trull
-truli
-trump
-trumperi
-trumpet
-trumpet
-trumpet
-trumpet
-truncheon
-truncheon
-trundl
-trunk
-trunk
-trust
-trust
-truster
-truster
-trust
-trust
-trusti
-truth
-truth
-try
-ts
-tu
-tuae
-tub
-tubal
-tub
-tuck
-tucket
-tuesdai
-tuft
-tuft
-tug
-tugg
-tug
-tuition
-tullu
-tulli
-tumbl
-tumbl
-tumbler
-tumbl
-tumult
-tumultu
-tun
-tune
-tuneabl
-tune
-tuner
-tune
-tuni
-tun
-tup
-turban
-turban
-turbul
-turbul
-turd
-turf
-turfi
-turk
-turkei
-turkei
-turkish
-turk
-turlygod
-turmoil
-turmoil
-turn
-turnbul
-turncoat
-turncoat
-turn
-turneth
-turn
-turnip
-turn
-turph
-turpitud
-turquois
-turret
-turret
-turtl
-turtl
-turvi
-tuscan
-tush
-tut
-tutor
-tutor
-tutor
-tutto
-twain
-twang
-twangl
-twa
-twai
-tweak
-tween
-twelfth
-twelv
-twelvemonth
-twentieth
-twenti
-twere
-twice
-twig
-twiggen
-twig
-twilight
-twill
-twill
-twin
-twine
-twink
-twinkl
-twinkl
-twinkl
-twinn
-twin
-twire
-twist
-twist
-twit
-twit
-twit
-twixt
-two
-twofold
-twopenc
-twopenc
-two
-twould
-tyb
-tybalt
-tybalt
-tyburn
-ty
-tyke
-tymbria
-type
-type
-typhon
-tyrann
-tyrann
-tyrann
-tyrann
-tyranni
-tyrant
-tyrant
-tyrian
-tyrrel
-u
-ubiqu
-udder
-udg
-ud
-uglier
-ugliest
-ugli
-ulcer
-ulcer
-ulyss
-um
-umber
-umbra
-umbrag
-umfrevil
-umpir
-umpir
-un
-unabl
-unaccommod
-unaccompani
-unaccustom
-unach
-unacquaint
-unact
-unadvi
-unadvis
-unadvisedli
-unagre
-unanel
-unansw
-unappea
-unapprov
-unapt
-unapt
-unarm
-unarm
-unarm
-unassail
-unassail
-unattaint
-unattempt
-unattend
-unauspici
-unauthor
-unavoid
-unawar
-unback
-unbak
-unband
-unbar
-unbarb
-unbash
-unbat
-unbatt
-unbecom
-unbefit
-unbegot
-unbegotten
-unbeliev
-unbend
-unbent
-unbewail
-unbid
-unbidden
-unbind
-unbind
-unbit
-unbless
-unblest
-unbloodi
-unblown
-unbodi
-unbolt
-unbolt
-unbonnet
-unbookish
-unborn
-unbosom
-unbound
-unbound
-unbow
-unbow
-unbrac
-unbrac
-unbraid
-unbreath
-unbr
-unbreech
-unbridl
-unbrok
-unbrui
-unbruis
-unbuckl
-unbuckl
-unbuckl
-unbuild
-unburden
-unburden
-unburi
-unburnt
-unburthen
-unbutton
-unbutton
-uncap
-uncap
-uncas
-uncas
-uncaught
-uncertain
-uncertainti
-unchain
-unchang
-uncharg
-uncharg
-uncharit
-unchari
-unchast
-uncheck
-unchild
-uncivil
-unclaim
-unclasp
-uncl
-unclean
-uncleanli
-uncleanli
-unclean
-uncl
-unclew
-unclog
-uncoin
-uncolt
-uncomeli
-uncomfort
-uncompassion
-uncomprehens
-unconfin
-unconfirm
-unconfirm
-unconqu
-unconqu
-unconsid
-unconst
-unconstrain
-unconstrain
-uncontemn
-uncontrol
-uncorrect
-uncount
-uncoupl
-uncourt
-uncouth
-uncov
-uncov
-uncrop
-uncross
-uncrown
-unction
-unctuou
-uncuckold
-uncur
-uncurb
-uncurb
-uncurl
-uncurr
-uncurs
-undaunt
-undeaf
-undeck
-undeed
-under
-underbear
-underborn
-undercrest
-underfoot
-undergo
-undergo
-undergo
-undergon
-underground
-underhand
-underl
-undermin
-undermin
-underneath
-underpr
-underprop
-understand
-understandeth
-understand
-understand
-understand
-understood
-underta
-undertak
-undertak
-undertak
-undertak
-undertak
-undertak
-undertook
-undervalu
-undervalu
-underw
-underwrit
-underwrit
-undescri
-undeserv
-undeserv
-undeserv
-undeserv
-undetermin
-undid
-undint
-undiscern
-undiscov
-undishonour
-undispo
-undistinguish
-undistinguish
-undivid
-undivid
-undivulg
-undo
-undo
-undo
-undon
-undoubt
-undoubtedli
-undream
-undress
-undress
-undrown
-undut
-unduti
-un
-unear
-unearn
-unearthli
-uneasin
-uneasi
-uneath
-uneduc
-uneffectu
-unelect
-unequ
-uneven
-unexamin
-unexecut
-unexpect
-unexperienc
-unexperi
-unexpress
-unfair
-unfaith
-unfal
-unfam
-unfashion
-unfasten
-unfath
-unfath
-unf
-unfe
-unfeel
-unfeign
-unfeignedli
-unfellow
-unfelt
-unfenc
-unfili
-unfil
-unfinish
-unfirm
-unfit
-unfit
-unfix
-unfledg
-unfold
-unfold
-unfoldeth
-unfold
-unfold
-unfool
-unforc
-unforc
-unforfeit
-unfortifi
-unfortun
-unfought
-unfrequ
-unfriend
-unfurnish
-ungain
-ungal
-ungart
-ungart
-ungenitur
-ungentl
-ungentl
-ungent
-ungird
-ungodli
-ungor
-ungot
-ungotten
-ungovern
-ungraci
-ungrat
-ungrav
-ungrown
-unguard
-unguem
-unguid
-unhack
-unhair
-unhallow
-unhallow
-unhand
-unhandl
-unhandsom
-unhang
-unhappi
-unhappili
-unhappi
-unhappi
-unharden
-unharm
-unhatch
-unheard
-unheart
-unheed
-unheedfulli
-unheedi
-unhelp
-unhidden
-unholi
-unhop
-unhopefullest
-unhors
-unhospit
-unhou
-unhous
-unhurt
-unicorn
-unicorn
-unimprov
-uninhabit
-uninhabit
-unintellig
-union
-union
-unit
-unit
-uniti
-univers
-univers
-univers
-univers
-unjoint
-unjust
-unjustic
-unjustli
-unkennel
-unkept
-unkind
-unkindest
-unkindli
-unkind
-unk
-unkinglik
-unkiss
-unknit
-unknow
-unknown
-unlac
-unlaid
-unlaw
-unlawfulli
-unlearn
-unlearn
-unless
-unlesson
-unlett
-unlett
-unlick
-unlik
-unlik
-unlimit
-unlin
-unlink
-unload
-unload
-unload
-unload
-unlock
-unlock
-unlook
-unlook
-unloo
-unloos
-unlov
-unlov
-unluckili
-unlucki
-unmad
-unmak
-unmanli
-unmann
-unmann
-unmannerd
-unmannerli
-unmarri
-unmask
-unmask
-unmask
-unmask
-unmast
-unmatch
-unmatch
-unmatch
-unmeasur
-unmeet
-unmellow
-unmerci
-unmerit
-unmerit
-unmind
-unmindful
-unmingl
-unmitig
-unmitig
-unmix
-unmoan
-unmov
-unmov
-unmov
-unmuffl
-unmuffl
-unmus
-unmuzzl
-unmuzzl
-unnatur
-unnatur
-unnatur
-unnecessarili
-unnecessari
-unneighbourli
-unnerv
-unnobl
-unnot
-unnumb
-unnumb
-unow
-unpack
-unpaid
-unparagon
-unparallel
-unparti
-unpath
-unpav
-unpai
-unpeac
-unpeg
-unpeopl
-unpeopl
-unperfect
-unperfect
-unpick
-unpin
-unpink
-unpiti
-unpitifulli
-unplagu
-unplaus
-unplea
-unpleas
-unpleas
-unpolici
-unpolish
-unpolish
-unpollut
-unpossess
-unpossess
-unposs
-unpracti
-unpregn
-unpremedit
-unprepar
-unprepar
-unpress
-unprevail
-unprev
-unpriz
-unpriz
-unprofit
-unprofit
-unprop
-unproperli
-unproport
-unprovid
-unprovid
-unprovid
-unprovok
-unprun
-unprun
-unpublish
-unpurg
-unpurpo
-unqual
-unqueen
-unquest
-unquestion
-unquiet
-unquietli
-unquiet
-unrais
-unrak
-unread
-unreadi
-unreal
-unreason
-unreason
-unreclaim
-unreconcil
-unreconcili
-unrecount
-unrecur
-unregard
-unregist
-unrel
-unremov
-unremov
-unrepriev
-unresolv
-unrespect
-unrespect
-unrest
-unrestor
-unrestrain
-unreveng
-unreverend
-unrever
-unrev
-unreward
-unright
-unright
-unrip
-unripp
-unrival
-unrol
-unroof
-unroost
-unroot
-unrough
-unruli
-unsaf
-unsalut
-unsanctifi
-unsatisfi
-unsavouri
-unsai
-unscal
-unscann
-unscarr
-unschool
-unscorch
-unscour
-unscratch
-unseal
-unseam
-unsearch
-unseason
-unseason
-unseason
-unseason
-unsecond
-unsecret
-unseduc
-unse
-unseem
-unseemli
-unseen
-unseminar
-unsepar
-unservic
-unset
-unsettl
-unsettl
-unsev
-unsex
-unshak
-unshak
-unshaken
-unshap
-unshap
-unsheath
-unsheath
-unshorn
-unshout
-unshown
-unshrink
-unshrubb
-unshunn
-unshunn
-unsift
-unsightli
-unsinew
-unsist
-unskil
-unskilfulli
-unskil
-unslip
-unsmirch
-unsoil
-unsolicit
-unsort
-unsought
-unsound
-unsound
-unspeak
-unspeak
-unspeak
-unspher
-unspok
-unspoken
-unspot
-unsquar
-unstabl
-unstaid
-unstain
-unstain
-unstanch
-unstat
-unsteadfast
-unstoop
-unstring
-unstuff
-unsubstanti
-unsuit
-unsuit
-unsulli
-unsunn
-unsur
-unsur
-unsuspect
-unswai
-unsway
-unswai
-unswear
-unswept
-unsworn
-untaint
-untalk
-untangl
-untangl
-untast
-untaught
-untemp
-untend
-untent
-untent
-unthank
-unthank
-unthink
-unthought
-unthread
-unthrift
-unthrift
-unthrifti
-unti
-unti
-until
-untimb
-untim
-untir
-untir
-untir
-untitl
-unto
-untold
-untouch
-untoward
-untowardli
-untrad
-untrain
-untrain
-untread
-untreasur
-untri
-untrim
-untrod
-untrodden
-untroubl
-untru
-untruss
-untruth
-untruth
-untuck
-untun
-untun
-untun
-untutor
-untutor
-untwin
-unurg
-unu
-unus
-unusu
-unvalu
-unvanquish
-unvarnish
-unveil
-unveil
-unvener
-unvex
-unviol
-unvirtu
-unvisit
-unvulner
-unwar
-unwarili
-unwash
-unwatch
-unweari
-unw
-unwedg
-unweed
-unweigh
-unweigh
-unwelcom
-unwept
-unwhipp
-unwholesom
-unwieldi
-unwil
-unwillingli
-unwilling
-unwind
-unwip
-unwis
-unwis
-unwish
-unwish
-unwit
-unwittingli
-unwont
-unwoo
-unworthi
-unworthiest
-unworthili
-unworthi
-unworthi
-unwrung
-unyok
-unyok
-up
-upbraid
-upbraid
-upbraid
-upbraid
-uphoard
-uphold
-upholdeth
-uphold
-uphold
-uplift
-uplift
-upmost
-upon
-upper
-uprear
-uprear
-upright
-upright
-upright
-upris
-upris
-uproar
-uproar
-uprou
-upshoot
-upshot
-upsid
-upspr
-upstair
-upstart
-upturn
-upward
-upward
-urchin
-urchinfield
-urchin
-urg
-urg
-urg
-urgent
-urg
-urgest
-urg
-urin
-urin
-urin
-urn
-urn
-ur
-ursa
-urslei
-ursula
-urswick
-us
-usag
-usanc
-usanc
-us
-us
-us
-useless
-user
-us
-usest
-useth
-usher
-usher
-usher
-usher
-us
-usual
-usual
-usur
-usur
-usuri
-usur
-usurp
-usurp
-usurp
-usurp
-usurp
-usurp
-usurpingli
-usurp
-usuri
-ut
-utensil
-utensil
-util
-utmost
-utt
-utter
-utter
-utter
-uttereth
-utter
-utterli
-uttermost
-utter
-uy
-v
-va
-vacanc
-vacant
-vacat
-vade
-vagabond
-vagabond
-vagram
-vagrom
-vail
-vail
-vail
-vaillant
-vain
-vainer
-vainglori
-vainli
-vain
-vai
-valanc
-valanc
-vale
-valenc
-valentin
-valentinu
-valentio
-valeria
-valeriu
-vale
-valiant
-valiantli
-valiant
-valid
-vallant
-vallei
-vallei
-valli
-valor
-valor
-valor
-valour
-valu
-valuat
-valu
-valu
-valueless
-valu
-valu
-vane
-vanish
-vanish
-vanish
-vanishest
-vanish
-vaniti
-vaniti
-vanquish
-vanquish
-vanquish
-vanquishest
-vanquisheth
-vant
-vantag
-vantag
-vantbrac
-vapian
-vapor
-vapor
-vapour
-vapour
-vara
-variabl
-varianc
-variat
-variat
-vari
-variest
-varieti
-varld
-varlet
-varletri
-varlet
-varletto
-varnish
-varriu
-varro
-vari
-vari
-vassal
-vassalag
-vassal
-vast
-vastid
-vasti
-vat
-vater
-vaudemont
-vaughan
-vault
-vaultag
-vault
-vault
-vault
-vaulti
-vaumond
-vaunt
-vaunt
-vaunter
-vaunt
-vauntingli
-vaunt
-vauvado
-vaux
-vaward
-ve
-veal
-vede
-vehem
-vehem
-vehement
-vehor
-veil
-veil
-veil
-vein
-vein
-vell
-velur
-velutu
-velvet
-vendibl
-vener
-vener
-venetia
-venetian
-venetian
-venei
-veng
-vengeanc
-vengeanc
-veng
-veni
-venial
-venic
-venison
-venit
-venom
-venom
-venom
-vent
-ventag
-vent
-ventidiu
-ventricl
-vent
-ventur
-ventur
-ventur
-ventur
-ventur
-ventur
-venu
-venu
-venuto
-ver
-verb
-verba
-verbal
-verbatim
-verbos
-verdict
-verdun
-verdur
-vere
-verefor
-verg
-verg
-verger
-verg
-verier
-veriest
-verifi
-verifi
-verili
-verit
-verit
-veriti
-veriti
-vermilion
-vermin
-vernon
-verona
-veronesa
-versal
-vers
-vers
-vers
-vert
-veri
-vesper
-vessel
-vessel
-vestal
-vestment
-vestur
-vetch
-vetch
-veux
-vex
-vexat
-vexat
-vex
-vex
-vexest
-vexeth
-vex
-vi
-via
-vial
-vial
-viand
-viand
-vic
-vicar
-vice
-viceger
-vicentio
-viceroi
-viceroi
-vice
-vici
-viciou
-vicious
-vict
-victim
-victor
-victoress
-victori
-victori
-victor
-victori
-victual
-victual
-victual
-videlicet
-video
-vide
-videsn
-vidi
-vie
-vi
-vienna
-view
-viewest
-vieweth
-view
-viewless
-view
-vigil
-vigil
-vigil
-vigit
-vigour
-vii
-viii
-vile
-vile
-vile
-viler
-vilest
-vill
-villag
-villag
-villageri
-villag
-villain
-villaini
-villain
-villain
-villain
-villaini
-villani
-villan
-villani
-villiago
-villian
-villianda
-villian
-vinaigr
-vincentio
-vincer
-vindic
-vine
-vinegar
-vine
-vineyard
-vineyard
-vint
-vintner
-viol
-viola
-violat
-violat
-violat
-violat
-violat
-violenc
-violent
-violenta
-violenteth
-violent
-violet
-violet
-viper
-viper
-viper
-vir
-virgilia
-virgin
-virgin
-virginal
-virgin
-virginiu
-virgin
-virgo
-virtu
-virtu
-virtuou
-virtuous
-visag
-visag
-visag
-visard
-viscount
-visibl
-visibl
-vision
-vision
-visit
-visit
-visit
-visit
-visit
-visit
-visitor
-visitor
-visit
-visor
-vita
-vita
-vital
-vitement
-vitruvio
-vitx
-viva
-vivant
-vive
-vixen
-viz
-vizament
-vizard
-vizard
-vizard
-vizor
-vlout
-vocat
-vocativo
-vocatur
-voce
-voic
-voic
-voic
-void
-void
-void
-voke
-volabl
-volant
-volivorco
-vollei
-volquessen
-volsc
-volsc
-volscian
-volscian
-volt
-voltemand
-volubl
-volubl
-volum
-volum
-volumnia
-volumniu
-voluntari
-voluntari
-voluptu
-voluptu
-vomiss
-vomit
-vomit
-vor
-vore
-vortnight
-vot
-votari
-votarist
-votarist
-votari
-votr
-vouch
-voucher
-voucher
-vouch
-vouch
-vouchsaf
-vouchsaf
-vouchsaf
-vouchsaf
-vouchsaf
-voudrai
-vour
-vou
-voutsaf
-vow
-vow
-vowel
-vowel
-vow
-vow
-vox
-voyag
-voyag
-vraiment
-vulcan
-vulgar
-vulgarli
-vulgar
-vulgo
-vulner
-vultur
-vultur
-vurther
-w
-wad
-waddl
-wade
-wade
-wafer
-waft
-waftag
-waft
-waft
-wag
-wage
-wager
-wager
-wage
-wag
-waggish
-waggl
-waggon
-waggon
-wagon
-wagon
-wag
-wagtail
-wail
-wail
-wail
-wail
-wain
-wainrop
-wainscot
-waist
-wait
-wait
-waiter
-waiteth
-wait
-wait
-wak
-wake
-wake
-wakefield
-waken
-waken
-wake
-wakest
-wake
-wale
-walk
-walk
-walk
-walk
-wall
-wall
-wallet
-wallet
-wallon
-walloon
-wallow
-wall
-walnut
-walter
-wan
-wand
-wander
-wander
-wander
-wander
-wander
-wand
-wane
-wane
-wane
-wane
-wann
-want
-want
-wanteth
-want
-wanton
-wantonli
-wanton
-wanton
-want
-wappen
-war
-warbl
-warbl
-ward
-ward
-warden
-warder
-warder
-wardrob
-wardrop
-ward
-ware
-ware
-warili
-warkworth
-warlik
-warm
-warm
-warmer
-warm
-warm
-warmth
-warn
-warn
-warn
-warn
-warn
-warp
-warp
-warr
-warrant
-warrant
-warranteth
-warrantis
-warrant
-warrant
-warranti
-warren
-warren
-war
-warrior
-warrior
-war
-wart
-warwick
-warwickshir
-wari
-wa
-wash
-wash
-washer
-wash
-washford
-wash
-wasp
-waspish
-wasp
-wassail
-wassail
-wast
-wast
-wast
-wast
-waster
-wast
-wast
-wat
-watch
-watch
-watcher
-watch
-watch
-watch
-watch
-watchman
-watchmen
-watchword
-water
-waterdrop
-water
-waterfli
-waterford
-water
-waterish
-waterpot
-waterrug
-water
-waterton
-wateri
-wav
-wave
-wave
-waver
-waver
-waver
-wave
-wave
-waw
-wawl
-wax
-wax
-waxen
-wax
-wax
-wai
-waylaid
-waylai
-wai
-wayward
-wayward
-wayward
-we
-weak
-weaken
-weaken
-weaker
-weakest
-weakl
-weakli
-weak
-weal
-wealsmen
-wealth
-wealthiest
-wealthili
-wealthi
-wealtlli
-wean
-weapon
-weapon
-wear
-wearer
-wearer
-weari
-weari
-weariest
-wearili
-weari
-wear
-wearisom
-wear
-weari
-weasel
-weather
-weathercock
-weather
-weav
-weav
-weaver
-weaver
-weav
-weav
-web
-wed
-wed
-wed
-wedg
-wedg
-wedg
-wedlock
-wednesdai
-weed
-weed
-weeder
-weed
-weed
-weedi
-week
-week
-weekli
-week
-ween
-ween
-weep
-weeper
-weep
-weepingli
-weep
-weep
-weet
-weigh
-weigh
-weigh
-weigh
-weight
-weightier
-weightless
-weight
-weighti
-weird
-welcom
-welcom
-welcom
-welcom
-welcomest
-welfar
-welkin
-well
-well
-welsh
-welshman
-welshmen
-welshwomen
-wench
-wench
-wench
-wend
-went
-wept
-weradai
-were
-wert
-west
-western
-westminst
-westmoreland
-westward
-wet
-wether
-wet
-wezand
-whale
-whale
-wharf
-wharf
-what
-whate
-whatev
-whatso
-whatsoev
-whatsom
-whe
-wheat
-wheaten
-wheel
-wheel
-wheel
-wheer
-wheeson
-wheez
-whelk
-whelk
-whelm
-whelp
-whelp
-whelp
-when
-whena
-whenc
-whencesoev
-whene
-whenev
-whensoev
-where
-whereabout
-wherea
-whereat
-wherebi
-wherefor
-wherein
-whereinto
-whereof
-whereon
-whereout
-whereso
-whereso
-wheresoev
-wheresom
-whereto
-whereuntil
-whereunto
-whereupon
-wherev
-wherewith
-wherewith
-whet
-whether
-whetston
-whet
-whew
-whei
-which
-whiff
-whiffler
-while
-while
-whilst
-whin
-whine
-whine
-whinid
-whine
-whip
-whipp
-whipper
-whip
-whip
-whipster
-whipstock
-whipt
-whirl
-whirl
-whirligig
-whirl
-whirlpool
-whirl
-whirlwind
-whirlwind
-whisp
-whisper
-whisper
-whisper
-whisper
-whist
-whistl
-whistl
-whistl
-whit
-white
-whitehal
-white
-white
-whiter
-white
-whitest
-whither
-white
-whitmor
-whitster
-whitsun
-whittl
-whizz
-who
-whoa
-whoe
-whoever
-whole
-wholesom
-wholesom
-wholli
-whom
-whoobub
-whoop
-whoop
-whor
-whore
-whoremast
-whoremasterli
-whoremong
-whore
-whoreson
-whoreson
-whore
-whorish
-whose
-whoso
-whoso
-whosoev
-why
-wi
-wick
-wick
-wickedn
-wicked
-wicket
-wicki
-wid
-wide
-widen
-wider
-widow
-widow
-widow
-widowhood
-widow
-wield
-wife
-wight
-wight
-wild
-wildcat
-wilder
-wilder
-wildest
-wildfir
-wildli
-wild
-wild
-wile
-wil
-wilful
-wilfulli
-wilfuln
-wil
-will
-will
-willer
-willeth
-william
-william
-will
-willingli
-willing
-willoughbi
-willow
-will
-wilt
-wiltshir
-wimpl
-win
-winc
-winch
-winchest
-wincot
-wind
-wind
-windgal
-wind
-windlass
-windmil
-window
-window
-windpip
-wind
-windsor
-windi
-wine
-wing
-wing
-wingfield
-wingham
-wing
-wink
-wink
-wink
-winner
-winner
-win
-winnow
-winnow
-winnow
-win
-winter
-winterli
-winter
-wip
-wipe
-wipe
-wipe
-wipe
-wire
-wire
-wiri
-wisdom
-wisdom
-wise
-wiseli
-wise
-wiser
-wisest
-wish
-wish
-wisher
-wisher
-wish
-wishest
-wisheth
-wish
-wish
-wishtli
-wisp
-wist
-wit
-witb
-witch
-witchcraft
-witch
-witch
-with
-withal
-withdraw
-withdraw
-withdrawn
-withdrew
-wither
-wither
-wither
-wither
-withheld
-withhold
-withhold
-within
-withold
-without
-withstand
-withstand
-withstood
-witless
-wit
-wit
-witnesseth
-wit
-wit
-wit
-wittenberg
-wittiest
-wittili
-wit
-wittingli
-wittol
-wittolli
-witti
-wiv
-wive
-wive
-wive
-wive
-wizard
-wizard
-wo
-woe
-woeful
-woeful
-woefullest
-woe
-woful
-wolf
-wolfish
-wolsei
-wolv
-wolvish
-woman
-womanhood
-womanish
-womankind
-womanli
-womb
-womb
-wombi
-women
-won
-woncot
-wond
-wonder
-wonder
-wonder
-wonderfulli
-wonder
-wonder
-wondrou
-wondrous
-wont
-wont
-woo
-wood
-woodbin
-woodcock
-woodcock
-wooden
-woodland
-woodman
-woodmong
-wood
-woodstock
-woodvil
-woo
-wooer
-wooer
-wooe
-woof
-woo
-wooingli
-wool
-woollen
-woolli
-woolsack
-woolsei
-woolward
-woo
-wor
-worcest
-word
-word
-wore
-worin
-work
-worker
-work
-work
-workman
-workmanli
-workmanship
-workmen
-work
-worki
-world
-worldl
-worldli
-world
-worm
-worm
-wormwood
-wormi
-worn
-worri
-worri
-worri
-worri
-wors
-worser
-worship
-worship
-worshipfulli
-worshipp
-worshipp
-worshipp
-worshippest
-worship
-worst
-worst
-wort
-worth
-worthi
-worthier
-worthi
-worthiest
-worthili
-worthi
-worthless
-worth
-worthi
-wort
-wot
-wot
-wot
-wouid
-would
-wouldest
-wouldst
-wound
-wound
-wound
-wound
-woundless
-wound
-woun
-woven
-wow
-wrack
-wrack
-wrangl
-wrangler
-wrangler
-wrangl
-wrap
-wrapp
-wrap
-wrapt
-wrath
-wrath
-wrathfulli
-wrath
-wreak
-wreak
-wreak
-wreath
-wreath
-wreathen
-wreath
-wreck
-wreck
-wreck
-wren
-wrench
-wrench
-wren
-wrest
-wrest
-wrest
-wrestl
-wrestl
-wrestler
-wrestl
-wretch
-wretchcd
-wretch
-wretched
-wretch
-wring
-wringer
-wring
-wring
-wrinkl
-wrinkl
-wrinkl
-wrist
-wrist
-writ
-write
-writer
-writer
-write
-writhl
-write
-write
-writ
-written
-wrong
-wrong
-wronger
-wrong
-wrongfulli
-wrong
-wrongli
-wrong
-wronk
-wrote
-wroth
-wrought
-wrung
-wry
-wry
-wt
-wul
-wye
-x
-xanthipp
-xi
-xii
-xiii
-xiv
-xv
-y
-yard
-yard
-yare
-yare
-yarn
-yaughan
-yaw
-yawn
-yawn
-yclepe
-yclipe
-ye
-yea
-yead
-year
-yearli
-yearn
-yearn
-year
-yea
-yeast
-yedward
-yell
-yellow
-yellow
-yellow
-yellow
-yellow
-yell
-yelp
-yeoman
-yeomen
-yerk
-ye
-yesterdai
-yesterdai
-yesternight
-yesti
-yet
-yew
-yicld
-yield
-yield
-yielder
-yielder
-yield
-yield
-yok
-yoke
-yoke
-yokefellow
-yoke
-yoketh
-yon
-yond
-yonder
-yongrei
-yore
-yorick
-york
-yorkist
-york
-yorkshir
-you
-young
-younger
-youngest
-youngl
-youngl
-youngli
-younker
-your
-your
-yourself
-yourselv
-youth
-youth
-youth
-youtli
-zani
-zani
-zeal
-zealou
-zeal
-zed
-zenelophon
-zenith
-zephyr
-zir
-zo
-zodiac
-zodiac
-zone
-zound
-zwagger
diff --git a/extra/porter-stemmer/test/voc.txt b/extra/porter-stemmer/test/voc.txt
deleted file mode 100644 (file)
index 604ef40..0000000
+++ /dev/null
@@ -1,23531 +0,0 @@
-a
-aaron
-abaissiez
-abandon
-abandoned
-abase
-abash
-abate
-abated
-abatement
-abatements
-abates
-abbess
-abbey
-abbeys
-abbominable
-abbot
-abbots
-abbreviated
-abed
-abel
-aberga
-abergavenny
-abet
-abetting
-abhominable
-abhor
-abhorr
-abhorred
-abhorring
-abhors
-abhorson
-abide
-abides
-abilities
-ability
-abject
-abjectly
-abjects
-abjur
-abjure
-able
-abler
-aboard
-abode
-aboded
-abodements
-aboding
-abominable
-abominably
-abominations
-abortive
-abortives
-abound
-abounding
-about
-above
-abr
-abraham
-abram
-abreast
-abridg
-abridge
-abridged
-abridgment
-abroach
-abroad
-abrogate
-abrook
-abrupt
-abruption
-abruptly
-absence
-absent
-absey
-absolute
-absolutely
-absolv
-absolver
-abstains
-abstemious
-abstinence
-abstract
-absurd
-absyrtus
-abundance
-abundant
-abundantly
-abus
-abuse
-abused
-abuser
-abuses
-abusing
-abutting
-aby
-abysm
-ac
-academe
-academes
-accent
-accents
-accept
-acceptable
-acceptance
-accepted
-accepts
-access
-accessary
-accessible
-accidence
-accident
-accidental
-accidentally
-accidents
-accite
-accited
-accites
-acclamations
-accommodate
-accommodated
-accommodation
-accommodations
-accommodo
-accompanied
-accompany
-accompanying
-accomplices
-accomplish
-accomplished
-accomplishing
-accomplishment
-accompt
-accord
-accordant
-accorded
-accordeth
-according
-accordingly
-accords
-accost
-accosted
-account
-accountant
-accounted
-accounts
-accoutred
-accoutrement
-accoutrements
-accrue
-accumulate
-accumulated
-accumulation
-accurs
-accursed
-accurst
-accus
-accusation
-accusations
-accusative
-accusativo
-accuse
-accused
-accuser
-accusers
-accuses
-accuseth
-accusing
-accustom
-accustomed
-ace
-acerb
-ache
-acheron
-aches
-achiev
-achieve
-achieved
-achievement
-achievements
-achiever
-achieves
-achieving
-achilles
-aching
-achitophel
-acknowledg
-acknowledge
-acknowledged
-acknowledgment
-acknown
-acold
-aconitum
-acordo
-acorn
-acquaint
-acquaintance
-acquainted
-acquaints
-acquir
-acquire
-acquisition
-acquit
-acquittance
-acquittances
-acquitted
-acre
-acres
-across
-act
-actaeon
-acted
-acting
-action
-actions
-actium
-active
-actively
-activity
-actor
-actors
-acts
-actual
-acture
-acute
-acutely
-ad
-adage
-adallas
-adam
-adamant
-add
-added
-adder
-adders
-addeth
-addict
-addicted
-addiction
-adding
-addition
-additions
-addle
-address
-addressing
-addrest
-adds
-adhere
-adheres
-adieu
-adieus
-adjacent
-adjoin
-adjoining
-adjourn
-adjudg
-adjudged
-adjunct
-administer
-administration
-admir
-admirable
-admiral
-admiration
-admire
-admired
-admirer
-admiring
-admiringly
-admission
-admit
-admits
-admittance
-admitted
-admitting
-admonish
-admonishing
-admonishment
-admonishments
-admonition
-ado
-adonis
-adopt
-adopted
-adoptedly
-adoption
-adoptious
-adopts
-ador
-adoration
-adorations
-adore
-adorer
-adores
-adorest
-adoreth
-adoring
-adorn
-adorned
-adornings
-adornment
-adorns
-adown
-adramadio
-adrian
-adriana
-adriano
-adriatic
-adsum
-adulation
-adulterate
-adulterates
-adulterers
-adulteress
-adulteries
-adulterous
-adultery
-adultress
-advanc
-advance
-advanced
-advancement
-advancements
-advances
-advancing
-advantage
-advantageable
-advantaged
-advantageous
-advantages
-advantaging
-advent
-adventur
-adventure
-adventures
-adventuring
-adventurous
-adventurously
-adversaries
-adversary
-adverse
-adversely
-adversities
-adversity
-advertis
-advertise
-advertised
-advertisement
-advertising
-advice
-advis
-advise
-advised
-advisedly
-advises
-advisings
-advocate
-advocation
-aeacida
-aeacides
-aedile
-aediles
-aegeon
-aegion
-aegles
-aemelia
-aemilia
-aemilius
-aeneas
-aeolus
-aer
-aerial
-aery
-aesculapius
-aeson
-aesop
-aetna
-afar
-afear
-afeard
-affability
-affable
-affair
-affaire
-affairs
-affect
-affectation
-affectations
-affected
-affectedly
-affecteth
-affecting
-affection
-affectionate
-affectionately
-affections
-affects
-affeer
-affianc
-affiance
-affianced
-affied
-affin
-affined
-affinity
-affirm
-affirmation
-affirmatives
-afflict
-afflicted
-affliction
-afflictions
-afflicts
-afford
-affordeth
-affords
-affray
-affright
-affrighted
-affrights
-affront
-affronted
-affy
-afield
-afire
-afloat
-afoot
-afore
-aforehand
-aforesaid
-afraid
-afresh
-afric
-africa
-african
-afront
-after
-afternoon
-afterward
-afterwards
-ag
-again
-against
-agamemmon
-agamemnon
-agate
-agaz
-age
-aged
-agenor
-agent
-agents
-ages
-aggravate
-aggrief
-agile
-agincourt
-agitation
-aglet
-agnize
-ago
-agone
-agony
-agree
-agreed
-agreeing
-agreement
-agrees
-agrippa
-aground
-ague
-aguecheek
-agued
-agueface
-agues
-ah
-aha
-ahungry
-ai
-aialvolio
-aiaria
-aid
-aidance
-aidant
-aided
-aiding
-aidless
-aids
-ail
-aim
-aimed
-aimest
-aiming
-aims
-ainsi
-aio
-air
-aired
-airless
-airs
-airy
-ajax
-akilling
-al
-alabaster
-alack
-alacrity
-alarbus
-alarm
-alarms
-alarum
-alarums
-alas
-alb
-alban
-albans
-albany
-albeit
-albion
-alchemist
-alchemy
-alcibiades
-alcides
-alder
-alderman
-aldermen
-ale
-alecto
-alehouse
-alehouses
-alencon
-alengon
-aleppo
-ales
-alewife
-alexander
-alexanders
-alexandria
-alexandrian
-alexas
-alias
-alice
-alien
-aliena
-alight
-alighted
-alights
-aliis
-alike
-alisander
-alive
-all
-alla
-allay
-allayed
-allaying
-allayment
-allayments
-allays
-allegation
-allegations
-allege
-alleged
-allegiance
-allegiant
-alley
-alleys
-allhallowmas
-alliance
-allicholy
-allied
-allies
-alligant
-alligator
-allons
-allot
-allots
-allotted
-allottery
-allow
-allowance
-allowed
-allowing
-allows
-allur
-allure
-allurement
-alluring
-allusion
-ally
-allycholly
-almain
-almanac
-almanack
-almanacs
-almighty
-almond
-almost
-alms
-almsman
-aloes
-aloft
-alone
-along
-alonso
-aloof
-aloud
-alphabet
-alphabetical
-alphonso
-alps
-already
-also
-alt
-altar
-altars
-alter
-alteration
-altered
-alters
-althaea
-although
-altitude
-altogether
-alton
-alway
-always
-am
-amaimon
-amain
-amaking
-amamon
-amaz
-amaze
-amazed
-amazedly
-amazedness
-amazement
-amazes
-amazeth
-amazing
-amazon
-amazonian
-amazons
-ambassador
-ambassadors
-amber
-ambiguides
-ambiguities
-ambiguous
-ambition
-ambitions
-ambitious
-ambitiously
-amble
-ambled
-ambles
-ambling
-ambo
-ambuscadoes
-ambush
-amen
-amend
-amended
-amendment
-amends
-amerce
-america
-ames
-amiable
-amid
-amidst
-amiens
-amis
-amiss
-amities
-amity
-amnipotent
-among
-amongst
-amorous
-amorously
-amort
-amount
-amounts
-amour
-amphimacus
-ample
-ampler
-amplest
-amplified
-amplify
-amply
-ampthill
-amurath
-amyntas
-an
-anatomiz
-anatomize
-anatomy
-ancestor
-ancestors
-ancestry
-anchises
-anchor
-anchorage
-anchored
-anchoring
-anchors
-anchovies
-ancient
-ancientry
-ancients
-ancus
-and
-andirons
-andpholus
-andren
-andrew
-andromache
-andronici
-andronicus
-anew
-ang
-angel
-angelica
-angelical
-angelo
-angels
-anger
-angerly
-angers
-anges
-angiers
-angl
-anglais
-angle
-angler
-angleterre
-angliae
-angling
-anglish
-angrily
-angry
-anguish
-angus
-animal
-animals
-animis
-anjou
-ankle
-anna
-annals
-anne
-annex
-annexed
-annexions
-annexment
-annothanize
-announces
-annoy
-annoyance
-annoying
-annual
-anoint
-anointed
-anon
-another
-anselmo
-answer
-answerable
-answered
-answerest
-answering
-answers
-ant
-ante
-antenor
-antenorides
-anteroom
-anthem
-anthems
-anthony
-anthropophagi
-anthropophaginian
-antiates
-antic
-anticipate
-anticipates
-anticipatest
-anticipating
-anticipation
-antick
-anticly
-antics
-antidote
-antidotes
-antigonus
-antiopa
-antipathy
-antipholus
-antipholuses
-antipodes
-antiquary
-antique
-antiquity
-antium
-antoniad
-antonio
-antonius
-antony
-antres
-anvil
-any
-anybody
-anyone
-anything
-anywhere
-ap
-apace
-apart
-apartment
-apartments
-ape
-apemantus
-apennines
-apes
-apiece
-apish
-apollinem
-apollo
-apollodorus
-apology
-apoplex
-apoplexy
-apostle
-apostles
-apostrophas
-apoth
-apothecary
-appal
-appall
-appalled
-appals
-apparel
-apparell
-apparelled
-apparent
-apparently
-apparition
-apparitions
-appeach
-appeal
-appeals
-appear
-appearance
-appeared
-appeareth
-appearing
-appears
-appeas
-appease
-appeased
-appelant
-appele
-appelee
-appeles
-appelez
-appellant
-appellants
-appelons
-appendix
-apperil
-appertain
-appertaining
-appertainings
-appertains
-appertinent
-appertinents
-appetite
-appetites
-applaud
-applauded
-applauding
-applause
-applauses
-apple
-apples
-appletart
-appliance
-appliances
-applications
-applied
-applies
-apply
-applying
-appoint
-appointed
-appointment
-appointments
-appoints
-apprehend
-apprehended
-apprehends
-apprehension
-apprehensions
-apprehensive
-apprendre
-apprenne
-apprenticehood
-appris
-approach
-approachers
-approaches
-approacheth
-approaching
-approbation
-approof
-appropriation
-approv
-approve
-approved
-approvers
-approves
-appurtenance
-appurtenances
-apricocks
-april
-apron
-aprons
-apt
-apter
-aptest
-aptly
-aptness
-aqua
-aquilon
-aquitaine
-arabia
-arabian
-araise
-arbitrate
-arbitrating
-arbitrator
-arbitrement
-arbors
-arbour
-arc
-arch
-archbishop
-archbishopric
-archdeacon
-arched
-archelaus
-archer
-archers
-archery
-archibald
-archidamus
-architect
-arcu
-arde
-arden
-ardent
-ardour
-are
-argal
-argier
-argo
-argosies
-argosy
-argu
-argue
-argued
-argues
-arguing
-argument
-arguments
-argus
-ariachne
-ariadne
-ariel
-aries
-aright
-arinado
-arinies
-arion
-arise
-arises
-ariseth
-arising
-aristode
-aristotle
-arithmetic
-arithmetician
-ark
-arm
-arma
-armado
-armadoes
-armagnac
-arme
-armed
-armenia
-armies
-armigero
-arming
-armipotent
-armor
-armour
-armourer
-armourers
-armours
-armoury
-arms
-army
-arn
-aroint
-arose
-arouse
-aroused
-arragon
-arraign
-arraigned
-arraigning
-arraignment
-arrant
-arras
-array
-arrearages
-arrest
-arrested
-arrests
-arriv
-arrival
-arrivance
-arrive
-arrived
-arrives
-arriving
-arrogance
-arrogancy
-arrogant
-arrow
-arrows
-art
-artemidorus
-arteries
-arthur
-article
-articles
-articulate
-artificer
-artificial
-artillery
-artire
-artist
-artists
-artless
-artois
-arts
-artus
-arviragus
-as
-asaph
-ascanius
-ascend
-ascended
-ascendeth
-ascends
-ascension
-ascent
-ascribe
-ascribes
-ash
-asham
-ashamed
-asher
-ashes
-ashford
-ashore
-ashouting
-ashy
-asia
-aside
-ask
-askance
-asked
-asker
-asketh
-asking
-asks
-aslant
-asleep
-asmath
-asp
-aspect
-aspects
-aspen
-aspersion
-aspic
-aspicious
-aspics
-aspir
-aspiration
-aspire
-aspiring
-asquint
-ass
-assail
-assailable
-assailant
-assailants
-assailed
-assaileth
-assailing
-assails
-assassination
-assault
-assaulted
-assaults
-assay
-assaying
-assays
-assemblance
-assemble
-assembled
-assemblies
-assembly
-assent
-asses
-assez
-assign
-assigned
-assigns
-assinico
-assist
-assistance
-assistances
-assistant
-assistants
-assisted
-assisting
-associate
-associated
-associates
-assuage
-assubjugate
-assum
-assume
-assumes
-assumption
-assur
-assurance
-assure
-assured
-assuredly
-assures
-assyrian
-astonish
-astonished
-astraea
-astray
-astrea
-astronomer
-astronomers
-astronomical
-astronomy
-asunder
-at
-atalanta
-ate
-ates
-athenian
-athenians
-athens
-athol
-athversary
-athwart
-atlas
-atomies
-atomy
-atone
-atonement
-atonements
-atropos
-attach
-attached
-attachment
-attain
-attainder
-attains
-attaint
-attainted
-attainture
-attempt
-attemptable
-attempted
-attempting
-attempts
-attend
-attendance
-attendant
-attendants
-attended
-attendents
-attendeth
-attending
-attends
-attent
-attention
-attentive
-attentivenes
-attest
-attested
-attir
-attire
-attired
-attires
-attorney
-attorneyed
-attorneys
-attorneyship
-attract
-attraction
-attractive
-attracts
-attribute
-attributed
-attributes
-attribution
-attributive
-atwain
-au
-aubrey
-auburn
-aucun
-audacious
-audaciously
-audacity
-audible
-audience
-audis
-audit
-auditor
-auditors
-auditory
-audre
-audrey
-aufidius
-aufidiuses
-auger
-aught
-augment
-augmentation
-augmented
-augmenting
-augurer
-augurers
-augures
-auguring
-augurs
-augury
-august
-augustus
-auld
-aumerle
-aunchient
-aunt
-aunts
-auricular
-aurora
-auspicious
-aussi
-austere
-austerely
-austereness
-austerity
-austria
-aut
-authentic
-author
-authorities
-authority
-authorized
-authorizing
-authors
-autolycus
-autre
-autumn
-auvergne
-avail
-avails
-avarice
-avaricious
-avaunt
-ave
-aveng
-avenge
-avenged
-averring
-avert
-aves
-avez
-avis
-avoid
-avoided
-avoiding
-avoids
-avoirdupois
-avouch
-avouched
-avouches
-avouchment
-avow
-aw
-await
-awaits
-awak
-awake
-awaked
-awaken
-awakened
-awakens
-awakes
-awaking
-award
-awards
-awasy
-away
-awe
-aweary
-aweless
-awful
-awhile
-awkward
-awl
-awooing
-awork
-awry
-axe
-axle
-axletree
-ay
-aye
-ayez
-ayli
-azur
-azure
-b
-ba
-baa
-babbl
-babble
-babbling
-babe
-babes
-babies
-baboon
-baboons
-baby
-babylon
-bacare
-bacchanals
-bacchus
-bach
-bachelor
-bachelors
-back
-backbite
-backbitten
-backing
-backs
-backward
-backwardly
-backwards
-bacon
-bacons
-bad
-bade
-badge
-badged
-badges
-badly
-badness
-baes
-baffl
-baffle
-baffled
-bag
-baggage
-bagot
-bagpipe
-bags
-bail
-bailiff
-baillez
-baily
-baisant
-baisees
-baiser
-bait
-baited
-baiting
-baitings
-baits
-bajazet
-bak
-bake
-baked
-baker
-bakers
-bakes
-baking
-bal
-balanc
-balance
-balcony
-bald
-baldrick
-bale
-baleful
-balk
-ball
-ballad
-ballads
-ballast
-ballasting
-ballet
-ballow
-balls
-balm
-balms
-balmy
-balsam
-balsamum
-balth
-balthasar
-balthazar
-bames
-ban
-banbury
-band
-bandied
-banding
-bandit
-banditti
-banditto
-bands
-bandy
-bandying
-bane
-banes
-bang
-bangor
-banish
-banished
-banishers
-banishment
-banister
-bank
-bankrout
-bankrupt
-bankrupts
-banks
-banner
-bannerets
-banners
-banning
-banns
-banquet
-banqueted
-banqueting
-banquets
-banquo
-bans
-baptism
-baptista
-baptiz
-bar
-barbarian
-barbarians
-barbarism
-barbarous
-barbary
-barbason
-barbed
-barber
-barbermonger
-bard
-bardolph
-bards
-bare
-bared
-barefac
-barefaced
-barefoot
-bareheaded
-barely
-bareness
-barful
-bargain
-bargains
-barge
-bargulus
-baring
-bark
-barking
-barkloughly
-barks
-barky
-barley
-barm
-barn
-barnacles
-barnardine
-barne
-barnes
-barnet
-barns
-baron
-barons
-barony
-barr
-barrabas
-barrel
-barrels
-barren
-barrenly
-barrenness
-barricado
-barricadoes
-barrow
-bars
-barson
-barter
-bartholomew
-bas
-basan
-base
-baseless
-basely
-baseness
-baser
-bases
-basest
-bashful
-bashfulness
-basilisco
-basilisk
-basilisks
-basimecu
-basin
-basingstoke
-basins
-basis
-bask
-basket
-baskets
-bass
-bassanio
-basset
-bassianus
-basta
-bastard
-bastardizing
-bastardly
-bastards
-bastardy
-basted
-bastes
-bastinado
-basting
-bat
-batailles
-batch
-bate
-bated
-bates
-bath
-bathe
-bathed
-bathing
-baths
-bating
-batler
-bats
-batt
-battalia
-battalions
-batten
-batter
-battering
-batters
-battery
-battle
-battled
-battlefield
-battlements
-battles
-batty
-bauble
-baubles
-baubling
-baulk
-bavin
-bawcock
-bawd
-bawdry
-bawds
-bawdy
-bawl
-bawling
-bay
-baying
-baynard
-bayonne
-bays
-be
-beach
-beached
-beachy
-beacon
-bead
-beaded
-beadle
-beadles
-beads
-beadsmen
-beagle
-beagles
-beak
-beaks
-beam
-beamed
-beams
-bean
-beans
-bear
-beard
-bearded
-beardless
-beards
-bearer
-bearers
-bearest
-beareth
-bearing
-bears
-beast
-beastliest
-beastliness
-beastly
-beasts
-beat
-beated
-beaten
-beating
-beatrice
-beats
-beau
-beaufort
-beaumond
-beaumont
-beauteous
-beautied
-beauties
-beautified
-beautiful
-beautify
-beauty
-beaver
-beavers
-became
-because
-bechanc
-bechance
-bechanced
-beck
-beckon
-beckons
-becks
-becom
-become
-becomed
-becomes
-becoming
-becomings
-bed
-bedabbled
-bedash
-bedaub
-bedazzled
-bedchamber
-bedclothes
-bedded
-bedeck
-bedecking
-bedew
-bedfellow
-bedfellows
-bedford
-bedlam
-bedrench
-bedrid
-beds
-bedtime
-bedward
-bee
-beef
-beefs
-beehives
-been
-beer
-bees
-beest
-beetle
-beetles
-beeves
-befall
-befallen
-befalls
-befell
-befits
-befitted
-befitting
-befor
-before
-beforehand
-befortune
-befriend
-befriended
-befriends
-beg
-began
-beget
-begets
-begetting
-begg
-beggar
-beggared
-beggarly
-beggarman
-beggars
-beggary
-begging
-begin
-beginners
-beginning
-beginnings
-begins
-begnawn
-begone
-begot
-begotten
-begrimed
-begs
-beguil
-beguile
-beguiled
-beguiles
-beguiling
-begun
-behalf
-behalfs
-behav
-behaved
-behavedst
-behavior
-behaviors
-behaviour
-behaviours
-behead
-beheaded
-beheld
-behest
-behests
-behind
-behold
-beholder
-beholders
-beholdest
-beholding
-beholds
-behoof
-behooffull
-behooves
-behove
-behoves
-behowls
-being
-bel
-belarius
-belch
-belching
-beldam
-beldame
-beldams
-belee
-belgia
-belie
-belied
-belief
-beliest
-believ
-believe
-believed
-believes
-believest
-believing
-belike
-bell
-bellario
-belle
-bellied
-bellies
-bellman
-bellona
-bellow
-bellowed
-bellowing
-bellows
-bells
-belly
-bellyful
-belman
-belmont
-belock
-belong
-belonging
-belongings
-belongs
-belov
-beloved
-beloving
-below
-belt
-belzebub
-bemadding
-bemet
-bemete
-bemoan
-bemoaned
-bemock
-bemoil
-bemonster
-ben
-bench
-bencher
-benches
-bend
-bended
-bending
-bends
-bene
-beneath
-benedicite
-benedick
-benediction
-benedictus
-benefactors
-benefice
-beneficial
-benefit
-benefited
-benefits
-benetted
-benevolence
-benevolences
-benied
-benison
-bennet
-bent
-bentii
-bentivolii
-bents
-benumbed
-benvolio
-bepaint
-bepray
-bequeath
-bequeathed
-bequeathing
-bequest
-ber
-berard
-berattle
-beray
-bere
-bereave
-bereaved
-bereaves
-bereft
-bergamo
-bergomask
-berhym
-berhyme
-berkeley
-bermoothes
-bernardo
-berod
-berowne
-berri
-berries
-berrord
-berry
-bertram
-berwick
-bescreen
-beseech
-beseeched
-beseechers
-beseeching
-beseek
-beseem
-beseemeth
-beseeming
-beseems
-beset
-beshrew
-beside
-besides
-besieg
-besiege
-besieged
-beslubber
-besmear
-besmeared
-besmirch
-besom
-besort
-besotted
-bespake
-bespeak
-bespice
-bespoke
-bespotted
-bess
-bessy
-best
-bestained
-bested
-bestial
-bestir
-bestirr
-bestow
-bestowed
-bestowing
-bestows
-bestraught
-bestrew
-bestrid
-bestride
-bestrides
-bet
-betake
-beteem
-bethink
-bethought
-bethrothed
-bethump
-betid
-betide
-betideth
-betime
-betimes
-betoken
-betook
-betossed
-betray
-betrayed
-betraying
-betrays
-betrims
-betroth
-betrothed
-betroths
-bett
-betted
-better
-bettered
-bettering
-betters
-betting
-bettre
-between
-betwixt
-bevel
-beverage
-bevis
-bevy
-bewail
-bewailed
-bewailing
-bewails
-beware
-bewasted
-beweep
-bewept
-bewet
-bewhored
-bewitch
-bewitched
-bewitchment
-bewray
-beyond
-bezonian
-bezonians
-bianca
-bianco
-bias
-bibble
-bickerings
-bid
-bidden
-bidding
-biddings
-biddy
-bide
-bides
-biding
-bids
-bien
-bier
-bifold
-big
-bigamy
-biggen
-bigger
-bigness
-bigot
-bilberry
-bilbo
-bilboes
-bilbow
-bill
-billeted
-billets
-billiards
-billing
-billow
-billows
-bills
-bin
-bind
-bindeth
-binding
-binds
-biondello
-birch
-bird
-birding
-birdlime
-birds
-birnam
-birth
-birthday
-birthdom
-birthplace
-birthright
-birthrights
-births
-bis
-biscuit
-bishop
-bishops
-bisson
-bit
-bitch
-bite
-biter
-bites
-biting
-bits
-bitt
-bitten
-bitter
-bitterest
-bitterly
-bitterness
-blab
-blabb
-blabbing
-blabs
-black
-blackamoor
-blackamoors
-blackberries
-blackberry
-blacker
-blackest
-blackfriars
-blackheath
-blackmere
-blackness
-blacks
-bladder
-bladders
-blade
-bladed
-blades
-blains
-blam
-blame
-blamed
-blameful
-blameless
-blames
-blanc
-blanca
-blanch
-blank
-blanket
-blanks
-blaspheme
-blaspheming
-blasphemous
-blasphemy
-blast
-blasted
-blasting
-blastments
-blasts
-blaz
-blaze
-blazes
-blazing
-blazon
-blazoned
-blazoning
-bleach
-bleaching
-bleak
-blear
-bleared
-bleat
-bleated
-bleats
-bled
-bleed
-bleedest
-bleedeth
-bleeding
-bleeds
-blemish
-blemishes
-blench
-blenches
-blend
-blended
-blent
-bless
-blessed
-blessedly
-blessedness
-blesses
-blesseth
-blessing
-blessings
-blest
-blew
-blind
-blinded
-blindfold
-blinding
-blindly
-blindness
-blinds
-blink
-blinking
-bliss
-blist
-blister
-blisters
-blithe
-blithild
-bloat
-block
-blockish
-blocks
-blois
-blood
-blooded
-bloodhound
-bloodied
-bloodier
-bloodiest
-bloodily
-bloodless
-bloods
-bloodshed
-bloodshedding
-bloodstained
-bloody
-bloom
-blooms
-blossom
-blossoming
-blossoms
-blot
-blots
-blotted
-blotting
-blount
-blow
-blowed
-blowers
-blowest
-blowing
-blown
-blows
-blowse
-blubb
-blubber
-blubbering
-blue
-bluecaps
-bluest
-blunt
-blunted
-blunter
-bluntest
-blunting
-bluntly
-bluntness
-blunts
-blur
-blurr
-blurs
-blush
-blushes
-blushest
-blushing
-blust
-bluster
-blusterer
-blusters
-bo
-boar
-board
-boarded
-boarding
-boards
-boarish
-boars
-boast
-boasted
-boastful
-boasting
-boasts
-boat
-boats
-boatswain
-bob
-bobb
-boblibindo
-bobtail
-bocchus
-bode
-boded
-bodements
-bodes
-bodg
-bodied
-bodies
-bodiless
-bodily
-boding
-bodkin
-body
-bodykins
-bog
-boggle
-boggler
-bogs
-bohemia
-bohemian
-bohun
-boil
-boiling
-boils
-boist
-boisterous
-boisterously
-boitier
-bold
-bolden
-bolder
-boldest
-boldly
-boldness
-bolds
-bolingbroke
-bolster
-bolt
-bolted
-bolter
-bolters
-bolting
-bolts
-bombard
-bombards
-bombast
-bon
-bona
-bond
-bondage
-bonded
-bondmaid
-bondman
-bondmen
-bonds
-bondslave
-bone
-boneless
-bones
-bonfire
-bonfires
-bonjour
-bonne
-bonnet
-bonneted
-bonny
-bonos
-bonto
-bonville
-bood
-book
-bookish
-books
-boon
-boor
-boorish
-boors
-boot
-booted
-booties
-bootless
-boots
-booty
-bor
-bora
-borachio
-bordeaux
-border
-bordered
-borderers
-borders
-bore
-boreas
-bores
-boring
-born
-borne
-borough
-boroughs
-borrow
-borrowed
-borrower
-borrowing
-borrows
-bosko
-boskos
-bosky
-bosom
-bosoms
-boson
-boss
-bosworth
-botch
-botcher
-botches
-botchy
-both
-bots
-bottle
-bottled
-bottles
-bottom
-bottomless
-bottoms
-bouciqualt
-bouge
-bough
-boughs
-bought
-bounce
-bouncing
-bound
-bounded
-bounden
-boundeth
-bounding
-boundless
-bounds
-bounteous
-bounteously
-bounties
-bountiful
-bountifully
-bounty
-bourbier
-bourbon
-bourchier
-bourdeaux
-bourn
-bout
-bouts
-bove
-bow
-bowcase
-bowed
-bowels
-bower
-bowing
-bowl
-bowler
-bowling
-bowls
-bows
-bowsprit
-bowstring
-box
-boxes
-boy
-boyet
-boyish
-boys
-brabant
-brabantio
-brabble
-brabbler
-brac
-brace
-bracelet
-bracelets
-brach
-bracy
-brag
-bragg
-braggardism
-braggards
-braggart
-braggarts
-bragged
-bragging
-bragless
-brags
-braid
-braided
-brain
-brained
-brainford
-brainish
-brainless
-brains
-brainsick
-brainsickly
-brake
-brakenbury
-brakes
-brambles
-bran
-branch
-branches
-branchless
-brand
-branded
-brandish
-brandon
-brands
-bras
-brass
-brassy
-brat
-brats
-brav
-brave
-braved
-bravely
-braver
-bravery
-braves
-bravest
-braving
-brawl
-brawler
-brawling
-brawls
-brawn
-brawns
-bray
-braying
-braz
-brazen
-brazier
-breach
-breaches
-bread
-breadth
-break
-breaker
-breakfast
-breaking
-breaks
-breast
-breasted
-breasting
-breastplate
-breasts
-breath
-breathe
-breathed
-breather
-breathers
-breathes
-breathest
-breathing
-breathless
-breaths
-brecknock
-bred
-breech
-breeches
-breeching
-breed
-breeder
-breeders
-breeding
-breeds
-breese
-breeze
-breff
-bretagne
-brethen
-bretheren
-brethren
-brevis
-brevity
-brew
-brewage
-brewer
-brewers
-brewing
-brews
-briareus
-briars
-brib
-bribe
-briber
-bribes
-brick
-bricklayer
-bricks
-bridal
-bride
-bridegroom
-bridegrooms
-brides
-bridge
-bridgenorth
-bridges
-bridget
-bridle
-bridled
-brief
-briefer
-briefest
-briefly
-briefness
-brier
-briers
-brigandine
-bright
-brighten
-brightest
-brightly
-brightness
-brim
-brimful
-brims
-brimstone
-brinded
-brine
-bring
-bringer
-bringeth
-bringing
-bringings
-brings
-brinish
-brink
-brisk
-brisky
-bristle
-bristled
-bristly
-bristol
-bristow
-britain
-britaine
-britaines
-british
-briton
-britons
-brittany
-brittle
-broach
-broached
-broad
-broader
-broadsides
-brocas
-brock
-brogues
-broil
-broiling
-broils
-broke
-broken
-brokenly
-broker
-brokers
-brokes
-broking
-brooch
-brooches
-brood
-brooded
-brooding
-brook
-brooks
-broom
-broomstaff
-broth
-brothel
-brother
-brotherhood
-brotherhoods
-brotherly
-brothers
-broths
-brought
-brow
-brown
-browner
-brownist
-browny
-brows
-browse
-browsing
-bruis
-bruise
-bruised
-bruises
-bruising
-bruit
-bruited
-brundusium
-brunt
-brush
-brushes
-brute
-brutish
-brutus
-bubble
-bubbles
-bubbling
-bubukles
-buck
-bucket
-buckets
-bucking
-buckingham
-buckle
-buckled
-buckler
-bucklers
-bucklersbury
-buckles
-buckram
-bucks
-bud
-budded
-budding
-budge
-budger
-budget
-buds
-buff
-buffet
-buffeting
-buffets
-bug
-bugbear
-bugle
-bugs
-build
-builded
-buildeth
-building
-buildings
-builds
-built
-bulk
-bulks
-bull
-bullcalf
-bullen
-bullens
-bullet
-bullets
-bullocks
-bulls
-bully
-bulmer
-bulwark
-bulwarks
-bum
-bumbast
-bump
-bumper
-bums
-bunch
-bunches
-bundle
-bung
-bunghole
-bungle
-bunting
-buoy
-bur
-burbolt
-burd
-burden
-burdened
-burdening
-burdenous
-burdens
-burgh
-burgher
-burghers
-burglary
-burgomasters
-burgonet
-burgundy
-burial
-buried
-burier
-buriest
-burly
-burn
-burned
-burnet
-burneth
-burning
-burnish
-burns
-burnt
-burr
-burrows
-burs
-burst
-bursting
-bursts
-burthen
-burthens
-burton
-bury
-burying
-bush
-bushels
-bushes
-bushy
-busied
-busily
-busines
-business
-businesses
-buskin
-busky
-buss
-busses
-bussing
-bustle
-bustling
-busy
-but
-butcheed
-butcher
-butchered
-butcheries
-butcherly
-butchers
-butchery
-butler
-butt
-butter
-buttered
-butterflies
-butterfly
-butterwoman
-buttery
-buttock
-buttocks
-button
-buttonhole
-buttons
-buttress
-buttry
-butts
-buxom
-buy
-buyer
-buying
-buys
-buzz
-buzzard
-buzzards
-buzzers
-buzzing
-by
-bye
-byzantium
-c
-ca
-cabbage
-cabileros
-cabin
-cabins
-cable
-cables
-cackling
-cacodemon
-caddis
-caddisses
-cade
-cadence
-cadent
-cades
-cadmus
-caduceus
-cadwal
-cadwallader
-caelius
-caelo
-caesar
-caesarion
-caesars
-cage
-caged
-cagion
-cain
-caithness
-caitiff
-caitiffs
-caius
-cak
-cake
-cakes
-calaber
-calais
-calamities
-calamity
-calchas
-calculate
-calen
-calendar
-calendars
-calf
-caliban
-calibans
-calipolis
-cality
-caliver
-call
-callat
-called
-callet
-calling
-calls
-calm
-calmest
-calmly
-calmness
-calms
-calpurnia
-calumniate
-calumniating
-calumnious
-calumny
-calve
-calved
-calves
-calveskins
-calydon
-cam
-cambio
-cambria
-cambric
-cambrics
-cambridge
-cambyses
-came
-camel
-camelot
-camels
-camest
-camillo
-camlet
-camomile
-camp
-campeius
-camping
-camps
-can
-canakin
-canaries
-canary
-cancel
-cancell
-cancelled
-cancelling
-cancels
-cancer
-candidatus
-candied
-candle
-candles
-candlesticks
-candy
-canidius
-cank
-canker
-cankerblossom
-cankers
-cannibally
-cannibals
-cannon
-cannoneer
-cannons
-cannot
-canon
-canoniz
-canonize
-canonized
-canons
-canopied
-canopies
-canopy
-canst
-canstick
-canterbury
-cantle
-cantons
-canus
-canvas
-canvass
-canzonet
-cap
-capability
-capable
-capacities
-capacity
-caparison
-capdv
-cape
-capel
-capels
-caper
-capers
-capet
-caphis
-capilet
-capitaine
-capital
-capite
-capitol
-capitulate
-capocchia
-capon
-capons
-capp
-cappadocia
-capriccio
-capricious
-caps
-capt
-captain
-captains
-captainship
-captious
-captivate
-captivated
-captivates
-captive
-captives
-captivity
-captum
-capucius
-capulet
-capulets
-car
-carack
-caracks
-carat
-caraways
-carbonado
-carbuncle
-carbuncled
-carbuncles
-carcanet
-carcase
-carcases
-carcass
-carcasses
-card
-cardecue
-carded
-carders
-cardinal
-cardinally
-cardinals
-cardmaker
-cards
-carduus
-care
-cared
-career
-careers
-careful
-carefully
-careless
-carelessly
-carelessness
-cares
-caret
-cargo
-carl
-carlisle
-carlot
-carman
-carmen
-carnal
-carnally
-carnarvonshire
-carnation
-carnations
-carol
-carous
-carouse
-caroused
-carouses
-carousing
-carp
-carpenter
-carper
-carpet
-carpets
-carping
-carriage
-carriages
-carried
-carrier
-carriers
-carries
-carrion
-carrions
-carry
-carrying
-cars
-cart
-carters
-carthage
-carts
-carv
-carve
-carved
-carver
-carves
-carving
-cas
-casa
-casaer
-casca
-case
-casement
-casements
-cases
-cash
-cashier
-casing
-cask
-casket
-casketed
-caskets
-casque
-casques
-cassado
-cassandra
-cassibelan
-cassio
-cassius
-cassocks
-cast
-castalion
-castaway
-castaways
-casted
-caster
-castigate
-castigation
-castile
-castiliano
-casting
-castle
-castles
-casts
-casual
-casually
-casualties
-casualty
-cat
-cataian
-catalogue
-cataplasm
-cataracts
-catarrhs
-catastrophe
-catch
-catcher
-catches
-catching
-cate
-catechising
-catechism
-catechize
-cater
-caterpillars
-caters
-caterwauling
-cates
-catesby
-cathedral
-catlike
-catling
-catlings
-cato
-cats
-cattle
-caucasus
-caudle
-cauf
-caught
-cauldron
-caus
-cause
-caused
-causeless
-causer
-causes
-causest
-causeth
-cautel
-cautelous
-cautels
-cauterizing
-caution
-cautions
-cavaleiro
-cavalery
-cavaliers
-cave
-cavern
-caverns
-caves
-caveto
-caviary
-cavil
-cavilling
-cawdor
-cawdron
-cawing
-ce
-ceas
-cease
-ceases
-ceaseth
-cedar
-cedars
-cedius
-celebrate
-celebrated
-celebrates
-celebration
-celerity
-celestial
-celia
-cell
-cellar
-cellarage
-celsa
-cement
-censer
-censor
-censorinus
-censur
-censure
-censured
-censurers
-censures
-censuring
-centaur
-centaurs
-centre
-cents
-centuries
-centurion
-centurions
-century
-cerberus
-cerecloth
-cerements
-ceremonial
-ceremonies
-ceremonious
-ceremoniously
-ceremony
-ceres
-cerns
-certain
-certainer
-certainly
-certainties
-certainty
-certes
-certificate
-certified
-certifies
-certify
-ces
-cesario
-cess
-cesse
-cestern
-cetera
-cette
-chaces
-chaf
-chafe
-chafed
-chafes
-chaff
-chaffless
-chafing
-chain
-chains
-chair
-chairs
-chalic
-chalice
-chalices
-chalk
-chalks
-chalky
-challeng
-challenge
-challenged
-challenger
-challengers
-challenges
-cham
-chamber
-chamberers
-chamberlain
-chamberlains
-chambermaid
-chambermaids
-chambers
-chameleon
-champ
-champagne
-champain
-champains
-champion
-champions
-chanc
-chance
-chanced
-chancellor
-chances
-chandler
-chang
-change
-changeable
-changed
-changeful
-changeling
-changelings
-changer
-changes
-changest
-changing
-channel
-channels
-chanson
-chant
-chanticleer
-chanting
-chantries
-chantry
-chants
-chaos
-chap
-chape
-chapel
-chapeless
-chapels
-chaplain
-chaplains
-chapless
-chaplet
-chapmen
-chaps
-chapter
-character
-charactered
-characterless
-characters
-charactery
-characts
-charbon
-chare
-chares
-charg
-charge
-charged
-chargeful
-charges
-chargeth
-charging
-chariest
-chariness
-charing
-chariot
-chariots
-charitable
-charitably
-charities
-charity
-charlemain
-charles
-charm
-charmed
-charmer
-charmeth
-charmian
-charming
-charmingly
-charms
-charneco
-charnel
-charolois
-charon
-charter
-charters
-chartreux
-chary
-charybdis
-chas
-chase
-chased
-chaser
-chaseth
-chasing
-chaste
-chastely
-chastis
-chastise
-chastised
-chastisement
-chastity
-chat
-chatham
-chatillon
-chats
-chatt
-chattels
-chatter
-chattering
-chattles
-chaud
-chaunted
-chaw
-chawdron
-che
-cheap
-cheapen
-cheaper
-cheapest
-cheaply
-cheapside
-cheat
-cheated
-cheater
-cheaters
-cheating
-cheats
-check
-checked
-checker
-checking
-checks
-cheek
-cheeks
-cheer
-cheered
-cheerer
-cheerful
-cheerfully
-cheering
-cheerless
-cheerly
-cheers
-cheese
-chequer
-cher
-cherish
-cherished
-cherisher
-cherishes
-cherishing
-cherries
-cherry
-cherrypit
-chertsey
-cherub
-cherubims
-cherubin
-cherubins
-cheshu
-chess
-chest
-chester
-chestnut
-chestnuts
-chests
-chetas
-chev
-cheval
-chevalier
-chevaliers
-cheveril
-chew
-chewed
-chewet
-chewing
-chez
-chi
-chick
-chicken
-chickens
-chicurmurco
-chid
-chidden
-chide
-chiders
-chides
-chiding
-chief
-chiefest
-chiefly
-chien
-child
-childed
-childeric
-childhood
-childhoods
-childing
-childish
-childishness
-childlike
-childness
-children
-chill
-chilling
-chime
-chimes
-chimney
-chimneypiece
-chimneys
-chimurcho
-chin
-china
-chine
-chines
-chink
-chinks
-chins
-chipp
-chipper
-chips
-chiron
-chirping
-chirrah
-chirurgeonly
-chisel
-chitopher
-chivalrous
-chivalry
-choice
-choicely
-choicest
-choir
-choirs
-chok
-choke
-choked
-chokes
-choking
-choler
-choleric
-cholers
-chollors
-choose
-chooser
-chooses
-chooseth
-choosing
-chop
-chopine
-choplogic
-chopp
-chopped
-chopping
-choppy
-chops
-chopt
-chor
-choristers
-chorus
-chose
-chosen
-chough
-choughs
-chrish
-christ
-christen
-christendom
-christendoms
-christening
-christenings
-christian
-christianlike
-christians
-christmas
-christom
-christopher
-christophero
-chronicle
-chronicled
-chronicler
-chroniclers
-chronicles
-chrysolite
-chuck
-chucks
-chud
-chuffs
-church
-churches
-churchman
-churchmen
-churchyard
-churchyards
-churl
-churlish
-churlishly
-churls
-churn
-chus
-cicatrice
-cicatrices
-cicely
-cicero
-ciceter
-ciel
-ciitzens
-cilicia
-cimber
-cimmerian
-cinable
-cincture
-cinders
-cine
-cinna
-cinque
-cipher
-ciphers
-circa
-circe
-circle
-circled
-circlets
-circling
-circuit
-circum
-circumcised
-circumference
-circummur
-circumscrib
-circumscribed
-circumscription
-circumspect
-circumstance
-circumstanced
-circumstances
-circumstantial
-circumvent
-circumvention
-cistern
-citadel
-cital
-cite
-cited
-cites
-cities
-citing
-citizen
-citizens
-cittern
-city
-civet
-civil
-civility
-civilly
-clack
-clad
-claim
-claiming
-claims
-clamb
-clamber
-clammer
-clamor
-clamorous
-clamors
-clamour
-clamours
-clang
-clangor
-clap
-clapp
-clapped
-clapper
-clapping
-claps
-clare
-clarence
-claret
-claribel
-clasp
-clasps
-clatter
-claud
-claudio
-claudius
-clause
-claw
-clawed
-clawing
-claws
-clay
-clays
-clean
-cleanliest
-cleanly
-cleans
-cleanse
-cleansing
-clear
-clearer
-clearest
-clearly
-clearness
-clears
-cleave
-cleaving
-clef
-cleft
-cleitus
-clemency
-clement
-cleomenes
-cleopatpa
-cleopatra
-clepeth
-clept
-clerestories
-clergy
-clergyman
-clergymen
-clerk
-clerkly
-clerks
-clew
-client
-clients
-cliff
-clifford
-cliffords
-cliffs
-clifton
-climate
-climature
-climb
-climbed
-climber
-climbeth
-climbing
-climbs
-clime
-cling
-clink
-clinking
-clinquant
-clip
-clipp
-clipper
-clippeth
-clipping
-clipt
-clitus
-clo
-cloak
-cloakbag
-cloaks
-clock
-clocks
-clod
-cloddy
-clodpole
-clog
-clogging
-clogs
-cloister
-cloistress
-cloquence
-clos
-close
-closed
-closely
-closeness
-closer
-closes
-closest
-closet
-closing
-closure
-cloten
-clotens
-cloth
-clothair
-clotharius
-clothe
-clothes
-clothier
-clothiers
-clothing
-cloths
-clotpoles
-clotpoll
-cloud
-clouded
-cloudiness
-clouds
-cloudy
-clout
-clouted
-clouts
-cloven
-clover
-cloves
-clovest
-clowder
-clown
-clownish
-clowns
-cloy
-cloyed
-cloying
-cloyless
-cloyment
-cloys
-club
-clubs
-cluck
-clung
-clust
-clusters
-clutch
-clyster
-cneius
-cnemies
-co
-coach
-coaches
-coachmakers
-coact
-coactive
-coagulate
-coal
-coals
-coarse
-coarsely
-coast
-coasting
-coasts
-coat
-coated
-coats
-cobble
-cobbled
-cobbler
-cobham
-cobloaf
-cobweb
-cobwebs
-cock
-cockatrice
-cockatrices
-cockle
-cockled
-cockney
-cockpit
-cocks
-cocksure
-coctus
-cocytus
-cod
-codding
-codling
-codpiece
-codpieces
-cods
-coelestibus
-coesar
-coeur
-coffer
-coffers
-coffin
-coffins
-cog
-cogging
-cogitation
-cogitations
-cognition
-cognizance
-cogscomb
-cohabitants
-coher
-cohere
-coherence
-coherent
-cohorts
-coif
-coign
-coil
-coin
-coinage
-coiner
-coining
-coins
-col
-colbrand
-colchos
-cold
-colder
-coldest
-coldly
-coldness
-coldspur
-colebrook
-colic
-collar
-collars
-collateral
-colleagued
-collect
-collected
-collection
-college
-colleges
-collied
-collier
-colliers
-collop
-collusion
-colme
-colmekill
-coloquintida
-color
-colors
-colossus
-colour
-colourable
-coloured
-colouring
-colours
-colt
-colted
-colts
-columbine
-columbines
-colville
-com
-comagene
-comart
-comb
-combat
-combatant
-combatants
-combated
-combating
-combin
-combinate
-combination
-combine
-combined
-combless
-combustion
-come
-comedian
-comedians
-comedy
-comeliness
-comely
-comer
-comers
-comes
-comest
-comet
-cometh
-comets
-comfect
-comfit
-comfits
-comfort
-comfortable
-comforted
-comforter
-comforting
-comfortless
-comforts
-comic
-comical
-coming
-comings
-cominius
-comma
-command
-commande
-commanded
-commander
-commanders
-commanding
-commandment
-commandments
-commands
-comme
-commenc
-commence
-commenced
-commencement
-commences
-commencing
-commend
-commendable
-commendation
-commendations
-commended
-commending
-commends
-comment
-commentaries
-commenting
-comments
-commerce
-commingled
-commiseration
-commission
-commissioners
-commissions
-commit
-commits
-committ
-committed
-committing
-commix
-commixed
-commixtion
-commixture
-commodious
-commodities
-commodity
-common
-commonalty
-commoner
-commoners
-commonly
-commons
-commonweal
-commonwealth
-commotion
-commotions
-commune
-communicat
-communicate
-communication
-communities
-community
-comonty
-compact
-companies
-companion
-companions
-companionship
-company
-compar
-comparative
-compare
-compared
-comparing
-comparison
-comparisons
-compartner
-compass
-compasses
-compassing
-compassion
-compassionate
-compeers
-compel
-compell
-compelled
-compelling
-compels
-compensation
-competence
-competency
-competent
-competitor
-competitors
-compil
-compile
-compiled
-complain
-complainer
-complainest
-complaining
-complainings
-complains
-complaint
-complaints
-complement
-complements
-complete
-complexion
-complexioned
-complexions
-complices
-complies
-compliment
-complimental
-compliments
-complot
-complots
-complotted
-comply
-compos
-compose
-composed
-composition
-compost
-composture
-composure
-compound
-compounded
-compounds
-comprehend
-comprehended
-comprehends
-compremises
-compris
-comprising
-compromis
-compromise
-compt
-comptible
-comptrollers
-compulsatory
-compulsion
-compulsive
-compunctious
-computation
-comrade
-comrades
-comutual
-con
-concave
-concavities
-conceal
-concealed
-concealing
-concealment
-concealments
-conceals
-conceit
-conceited
-conceitless
-conceits
-conceiv
-conceive
-conceived
-conceives
-conceiving
-conception
-conceptions
-conceptious
-concern
-concernancy
-concerneth
-concerning
-concernings
-concerns
-conclave
-conclud
-conclude
-concluded
-concludes
-concluding
-conclusion
-conclusions
-concolinel
-concord
-concubine
-concupiscible
-concupy
-concur
-concurring
-concurs
-condemn
-condemnation
-condemned
-condemning
-condemns
-condescend
-condign
-condition
-conditionally
-conditions
-condole
-condolement
-condoling
-conduce
-conduct
-conducted
-conducting
-conductor
-conduit
-conduits
-conected
-coney
-confection
-confectionary
-confections
-confederacy
-confederate
-confederates
-confer
-conference
-conferr
-conferring
-confess
-confessed
-confesses
-confesseth
-confessing
-confession
-confessions
-confessor
-confidence
-confident
-confidently
-confin
-confine
-confined
-confineless
-confiners
-confines
-confining
-confirm
-confirmation
-confirmations
-confirmed
-confirmer
-confirmers
-confirming
-confirmities
-confirms
-confiscate
-confiscated
-confiscation
-confixed
-conflict
-conflicting
-conflicts
-confluence
-conflux
-conform
-conformable
-confound
-confounded
-confounding
-confounds
-confront
-confronted
-confus
-confused
-confusedly
-confusion
-confusions
-confutation
-confutes
-congeal
-congealed
-congealment
-congee
-conger
-congest
-congied
-congratulate
-congreeing
-congreeted
-congregate
-congregated
-congregation
-congregations
-congruent
-congruing
-conies
-conjectural
-conjecture
-conjectures
-conjoin
-conjoined
-conjoins
-conjointly
-conjunct
-conjunction
-conjunctive
-conjur
-conjuration
-conjurations
-conjure
-conjured
-conjurer
-conjurers
-conjures
-conjuring
-conjuro
-conn
-connected
-connive
-conqu
-conquer
-conquered
-conquering
-conqueror
-conquerors
-conquers
-conquest
-conquests
-conquring
-conrade
-cons
-consanguineous
-consanguinity
-conscienc
-conscience
-consciences
-conscionable
-consecrate
-consecrated
-consecrations
-consent
-consented
-consenting
-consents
-consequence
-consequences
-consequently
-conserve
-conserved
-conserves
-consider
-considerance
-considerate
-consideration
-considerations
-considered
-considering
-considerings
-considers
-consign
-consigning
-consist
-consisteth
-consisting
-consistory
-consists
-consolate
-consolation
-consonancy
-consonant
-consort
-consorted
-consortest
-conspectuities
-conspir
-conspiracy
-conspirant
-conspirator
-conspirators
-conspire
-conspired
-conspirers
-conspires
-conspiring
-constable
-constables
-constance
-constancies
-constancy
-constant
-constantine
-constantinople
-constantly
-constellation
-constitution
-constrain
-constrained
-constraineth
-constrains
-constraint
-constring
-construction
-construe
-consul
-consuls
-consulship
-consulships
-consult
-consulting
-consults
-consum
-consume
-consumed
-consumes
-consuming
-consummate
-consummation
-consumption
-consumptions
-contagion
-contagious
-contain
-containing
-contains
-contaminate
-contaminated
-contemn
-contemned
-contemning
-contemns
-contemplate
-contemplation
-contemplative
-contempt
-contemptible
-contempts
-contemptuous
-contemptuously
-contend
-contended
-contending
-contendon
-content
-contenta
-contented
-contenteth
-contention
-contentious
-contentless
-contento
-contents
-contest
-contestation
-continence
-continency
-continent
-continents
-continu
-continual
-continually
-continuance
-continuantly
-continuate
-continue
-continued
-continuer
-continues
-continuing
-contract
-contracted
-contracting
-contraction
-contradict
-contradicted
-contradiction
-contradicts
-contraries
-contrarieties
-contrariety
-contrarious
-contrariously
-contrary
-contre
-contribution
-contributors
-contrite
-contriv
-contrive
-contrived
-contriver
-contrives
-contriving
-control
-controll
-controller
-controlling
-controlment
-controls
-controversy
-contumelious
-contumeliously
-contumely
-contusions
-convenience
-conveniences
-conveniency
-convenient
-conveniently
-convented
-conventicles
-convents
-convers
-conversant
-conversation
-conversations
-converse
-conversed
-converses
-conversing
-conversion
-convert
-converted
-convertest
-converting
-convertite
-convertites
-converts
-convey
-conveyance
-conveyances
-conveyers
-conveying
-convict
-convicted
-convince
-convinced
-convinces
-convive
-convocation
-convoy
-convulsions
-cony
-cook
-cookery
-cooks
-cool
-cooled
-cooling
-cools
-coop
-coops
-cop
-copatain
-cope
-cophetua
-copied
-copies
-copious
-copper
-copperspur
-coppice
-copulation
-copulatives
-copy
-cor
-coragio
-coral
-coram
-corambus
-coranto
-corantos
-corbo
-cord
-corded
-cordelia
-cordial
-cordis
-cords
-core
-corin
-corinth
-corinthian
-coriolanus
-corioli
-cork
-corky
-cormorant
-corn
-cornelia
-cornelius
-corner
-corners
-cornerstone
-cornets
-cornish
-corns
-cornuto
-cornwall
-corollary
-coronal
-coronation
-coronet
-coronets
-corporal
-corporals
-corporate
-corpse
-corpulent
-correct
-corrected
-correcting
-correction
-correctioner
-corrects
-correspondence
-correspondent
-corresponding
-corresponsive
-corrigible
-corrival
-corrivals
-corroborate
-corrosive
-corrupt
-corrupted
-corrupter
-corrupters
-corruptible
-corruptibly
-corrupting
-corruption
-corruptly
-corrupts
-corse
-corses
-corslet
-cosmo
-cost
-costard
-costermongers
-costlier
-costly
-costs
-cot
-cote
-coted
-cotsall
-cotsole
-cotswold
-cottage
-cottages
-cotus
-couch
-couched
-couching
-couchings
-coude
-cough
-coughing
-could
-couldst
-coulter
-council
-councillor
-councils
-counsel
-counsell
-counsellor
-counsellors
-counselor
-counselors
-counsels
-count
-counted
-countenanc
-countenance
-countenances
-counter
-counterchange
-countercheck
-counterfeit
-counterfeited
-counterfeiting
-counterfeitly
-counterfeits
-countermand
-countermands
-countermines
-counterpart
-counterpoints
-counterpois
-counterpoise
-counters
-countervail
-countess
-countesses
-counties
-counting
-countless
-countries
-countrv
-country
-countryman
-countrymen
-counts
-county
-couper
-couple
-coupled
-couplement
-couples
-couplet
-couplets
-cour
-courage
-courageous
-courageously
-courages
-courier
-couriers
-couronne
-cours
-course
-coursed
-courser
-coursers
-courses
-coursing
-court
-courted
-courteous
-courteously
-courtesan
-courtesies
-courtesy
-courtezan
-courtezans
-courtier
-courtiers
-courtlike
-courtly
-courtney
-courts
-courtship
-cousin
-cousins
-couterfeit
-coutume
-covenant
-covenants
-covent
-coventry
-cover
-covered
-covering
-coverlet
-covers
-covert
-covertly
-coverture
-covet
-coveted
-coveting
-covetings
-covetous
-covetously
-covetousness
-covets
-cow
-coward
-cowarded
-cowardice
-cowardly
-cowards
-cowardship
-cowish
-cowl
-cowslip
-cowslips
-cox
-coxcomb
-coxcombs
-coy
-coystrill
-coz
-cozen
-cozenage
-cozened
-cozener
-cozeners
-cozening
-coziers
-crab
-crabbed
-crabs
-crack
-cracked
-cracker
-crackers
-cracking
-cracks
-cradle
-cradled
-cradles
-craft
-crafted
-craftied
-craftier
-craftily
-crafts
-craftsmen
-crafty
-cram
-cramm
-cramp
-cramps
-crams
-cranking
-cranks
-cranmer
-crannied
-crannies
-cranny
-crants
-crare
-crash
-crassus
-crav
-crave
-craved
-craven
-cravens
-craves
-craveth
-craving
-crawl
-crawling
-crawls
-craz
-crazed
-crazy
-creaking
-cream
-create
-created
-creates
-creating
-creation
-creator
-creature
-creatures
-credence
-credent
-credible
-credit
-creditor
-creditors
-credo
-credulity
-credulous
-creed
-creek
-creeks
-creep
-creeping
-creeps
-crept
-crescent
-crescive
-cressets
-cressid
-cressida
-cressids
-cressy
-crest
-crested
-crestfall
-crestless
-crests
-cretan
-crete
-crevice
-crew
-crews
-crib
-cribb
-cribs
-cricket
-crickets
-cried
-criedst
-crier
-cries
-criest
-crieth
-crime
-crimeful
-crimeless
-crimes
-criminal
-crimson
-cringe
-cripple
-crisp
-crisped
-crispian
-crispianus
-crispin
-critic
-critical
-critics
-croak
-croaking
-croaks
-crocodile
-cromer
-cromwell
-crone
-crook
-crookback
-crooked
-crooking
-crop
-cropp
-crosby
-cross
-crossed
-crosses
-crossest
-crossing
-crossings
-crossly
-crossness
-crost
-crotchets
-crouch
-crouching
-crow
-crowd
-crowded
-crowding
-crowds
-crowflowers
-crowing
-crowkeeper
-crown
-crowned
-crowner
-crownet
-crownets
-crowning
-crowns
-crows
-crudy
-cruel
-cruell
-crueller
-cruelly
-cruels
-cruelty
-crum
-crumble
-crumbs
-crupper
-crusadoes
-crush
-crushed
-crushest
-crushing
-crust
-crusts
-crusty
-crutch
-crutches
-cry
-crying
-crystal
-crystalline
-crystals
-cub
-cubbert
-cubiculo
-cubit
-cubs
-cuckold
-cuckoldly
-cuckolds
-cuckoo
-cucullus
-cudgel
-cudgeled
-cudgell
-cudgelling
-cudgels
-cue
-cues
-cuff
-cuffs
-cuique
-cull
-culling
-cullion
-cullionly
-cullions
-culpable
-culverin
-cum
-cumber
-cumberland
-cunning
-cunningly
-cunnings
-cuore
-cup
-cupbearer
-cupboarding
-cupid
-cupids
-cuppele
-cups
-cur
-curan
-curate
-curb
-curbed
-curbing
-curbs
-curd
-curdied
-curds
-cure
-cured
-cureless
-curer
-cures
-curfew
-curing
-curio
-curiosity
-curious
-curiously
-curl
-curled
-curling
-curls
-currance
-currants
-current
-currents
-currish
-curry
-curs
-curse
-cursed
-curses
-cursies
-cursing
-cursorary
-curst
-curster
-curstest
-curstness
-cursy
-curtail
-curtain
-curtains
-curtal
-curtis
-curtle
-curtsied
-curtsies
-curtsy
-curvet
-curvets
-cushes
-cushion
-cushions
-custalorum
-custard
-custody
-custom
-customary
-customed
-customer
-customers
-customs
-custure
-cut
-cutler
-cutpurse
-cutpurses
-cuts
-cutter
-cutting
-cuttle
-cxsar
-cyclops
-cydnus
-cygnet
-cygnets
-cym
-cymbals
-cymbeline
-cyme
-cynic
-cynthia
-cypress
-cypriot
-cyprus
-cyrus
-cytherea
-d
-dabbled
-dace
-dad
-daedalus
-daemon
-daff
-daffed
-daffest
-daffodils
-dagger
-daggers
-dagonet
-daily
-daintier
-dainties
-daintiest
-daintily
-daintiness
-daintry
-dainty
-daisied
-daisies
-daisy
-dale
-dalliance
-dallied
-dallies
-dally
-dallying
-dalmatians
-dam
-damage
-damascus
-damask
-damasked
-dame
-dames
-damm
-damn
-damnable
-damnably
-damnation
-damned
-damns
-damoiselle
-damon
-damosella
-damp
-dams
-damsel
-damsons
-dan
-danc
-dance
-dancer
-dances
-dancing
-dandle
-dandy
-dane
-dang
-danger
-dangerous
-dangerously
-dangers
-dangling
-daniel
-danish
-dank
-dankish
-danskers
-daphne
-dappled
-dapples
-dar
-dardan
-dardanian
-dardanius
-dare
-dared
-dareful
-dares
-darest
-daring
-darius
-dark
-darken
-darkening
-darkens
-darker
-darkest
-darkling
-darkly
-darkness
-darling
-darlings
-darnel
-darraign
-dart
-darted
-darter
-dartford
-darting
-darts
-dash
-dashes
-dashing
-dastard
-dastards
-dat
-datchet
-date
-dated
-dateless
-dates
-daub
-daughter
-daughters
-daunt
-daunted
-dauntless
-dauphin
-daventry
-davy
-daw
-dawn
-dawning
-daws
-day
-daylight
-days
-dazzle
-dazzled
-dazzling
-de
-dead
-deadly
-deaf
-deafing
-deafness
-deafs
-deal
-dealer
-dealers
-dealest
-dealing
-dealings
-deals
-dealt
-dean
-deanery
-dear
-dearer
-dearest
-dearly
-dearness
-dears
-dearth
-dearths
-death
-deathbed
-deathful
-deaths
-deathsman
-deathsmen
-debarred
-debase
-debate
-debated
-debatement
-debateth
-debating
-debauch
-debile
-debility
-debitor
-debonair
-deborah
-debosh
-debt
-debted
-debtor
-debtors
-debts
-debuty
-decay
-decayed
-decayer
-decaying
-decays
-deceas
-decease
-deceased
-deceit
-deceitful
-deceits
-deceiv
-deceivable
-deceive
-deceived
-deceiver
-deceivers
-deceives
-deceivest
-deceiveth
-deceiving
-december
-decent
-deceptious
-decerns
-decide
-decides
-decimation
-decipher
-deciphers
-decision
-decius
-deck
-decking
-decks
-deckt
-declare
-declares
-declension
-declensions
-declin
-decline
-declined
-declines
-declining
-decoct
-decorum
-decreas
-decrease
-decreasing
-decree
-decreed
-decrees
-decrepit
-dedicate
-dedicated
-dedicates
-dedication
-deed
-deedless
-deeds
-deem
-deemed
-deep
-deeper
-deepest
-deeply
-deeps
-deepvow
-deer
-deesse
-defac
-deface
-defaced
-defacer
-defacers
-defacing
-defam
-default
-defeat
-defeated
-defeats
-defeatures
-defect
-defective
-defects
-defence
-defences
-defend
-defendant
-defended
-defender
-defenders
-defending
-defends
-defense
-defensible
-defensive
-defer
-deferr
-defiance
-deficient
-defied
-defies
-defil
-defile
-defiler
-defiles
-defiling
-define
-definement
-definite
-definitive
-definitively
-deflow
-deflower
-deflowered
-deform
-deformed
-deformities
-deformity
-deftly
-defunct
-defunction
-defuse
-defy
-defying
-degenerate
-degraded
-degree
-degrees
-deified
-deifying
-deign
-deigned
-deiphobus
-deities
-deity
-deja
-deject
-dejected
-delabreth
-delay
-delayed
-delaying
-delays
-delectable
-deliberate
-delicate
-delicates
-delicious
-deliciousness
-delight
-delighted
-delightful
-delights
-delinquents
-deliv
-deliver
-deliverance
-delivered
-delivering
-delivers
-delivery
-delphos
-deluded
-deluding
-deluge
-delve
-delver
-delves
-demand
-demanded
-demanding
-demands
-demean
-demeanor
-demeanour
-demerits
-demesnes
-demetrius
-demi
-demigod
-demise
-demoiselles
-demon
-demonstrable
-demonstrate
-demonstrated
-demonstrating
-demonstration
-demonstrative
-demure
-demurely
-demuring
-den
-denay
-deni
-denial
-denials
-denied
-denier
-denies
-deniest
-denis
-denmark
-dennis
-denny
-denote
-denoted
-denotement
-denounc
-denounce
-denouncing
-dens
-denunciation
-deny
-denying
-deo
-depart
-departed
-departest
-departing
-departure
-depeche
-depend
-dependant
-dependants
-depended
-dependence
-dependences
-dependency
-dependent
-dependents
-depender
-depending
-depends
-deplore
-deploring
-depopulate
-depos
-depose
-deposed
-deposing
-depositaries
-deprav
-depravation
-deprave
-depraved
-depraves
-depress
-depriv
-deprive
-depth
-depths
-deputation
-depute
-deputed
-deputies
-deputing
-deputy
-deracinate
-derby
-dercetas
-dere
-derides
-derision
-deriv
-derivation
-derivative
-derive
-derived
-derives
-derogate
-derogately
-derogation
-des
-desartless
-descant
-descend
-descended
-descending
-descends
-descension
-descent
-descents
-describe
-described
-describes
-descried
-description
-descriptions
-descry
-desdemon
-desdemona
-desert
-deserts
-deserv
-deserve
-deserved
-deservedly
-deserver
-deservers
-deserves
-deservest
-deserving
-deservings
-design
-designment
-designments
-designs
-desir
-desire
-desired
-desirers
-desires
-desirest
-desiring
-desirous
-desist
-desk
-desolate
-desolation
-desp
-despair
-despairing
-despairs
-despatch
-desperate
-desperately
-desperation
-despis
-despise
-despised
-despiser
-despiseth
-despising
-despite
-despiteful
-despoiled
-dest
-destin
-destined
-destinies
-destiny
-destitute
-destroy
-destroyed
-destroyer
-destroyers
-destroying
-destroys
-destruction
-destructions
-det
-detain
-detains
-detect
-detected
-detecting
-detection
-detector
-detects
-detention
-determin
-determinate
-determination
-determinations
-determine
-determined
-determines
-detest
-detestable
-detested
-detesting
-detests
-detract
-detraction
-detractions
-deucalion
-deuce
-deum
-deux
-devant
-devesting
-device
-devices
-devil
-devilish
-devils
-devis
-devise
-devised
-devises
-devising
-devoid
-devonshire
-devote
-devoted
-devotion
-devour
-devoured
-devourers
-devouring
-devours
-devout
-devoutly
-dew
-dewberries
-dewdrops
-dewlap
-dewlapp
-dews
-dewy
-dexter
-dexteriously
-dexterity
-di
-diable
-diablo
-diadem
-dial
-dialect
-dialogue
-dialogued
-dials
-diameter
-diamond
-diamonds
-dian
-diana
-diaper
-dibble
-dic
-dice
-dicers
-dich
-dick
-dickens
-dickon
-dicky
-dictator
-diction
-dictynna
-did
-diddle
-didest
-dido
-didst
-die
-died
-diedst
-dies
-diest
-diet
-dieted
-dieter
-dieu
-diff
-differ
-difference
-differences
-differency
-different
-differing
-differs
-difficile
-difficult
-difficulties
-difficulty
-diffidence
-diffidences
-diffus
-diffused
-diffusest
-dig
-digest
-digested
-digestion
-digestions
-digg
-digging
-dighton
-dignified
-dignifies
-dignify
-dignities
-dignity
-digress
-digressing
-digression
-digs
-digt
-dilate
-dilated
-dilations
-dilatory
-dild
-dildos
-dilemma
-dilemmas
-diligence
-diligent
-diluculo
-dim
-dimension
-dimensions
-diminish
-diminishing
-diminution
-diminutive
-diminutives
-dimm
-dimmed
-dimming
-dimpled
-dimples
-dims
-din
-dine
-dined
-diner
-dines
-ding
-dining
-dinner
-dinners
-dinnertime
-dint
-diomed
-diomede
-diomedes
-dion
-dip
-dipp
-dipping
-dips
-dir
-dire
-direct
-directed
-directing
-direction
-directions
-directitude
-directive
-directly
-directs
-direful
-direness
-direst
-dirge
-dirges
-dirt
-dirty
-dis
-disability
-disable
-disabled
-disabling
-disadvantage
-disagree
-disallow
-disanimates
-disannul
-disannuls
-disappointed
-disarm
-disarmed
-disarmeth
-disarms
-disaster
-disasters
-disastrous
-disbench
-disbranch
-disburdened
-disburs
-disburse
-disbursed
-discandy
-discandying
-discard
-discarded
-discase
-discased
-discern
-discerner
-discerning
-discernings
-discerns
-discharg
-discharge
-discharged
-discharging
-discipled
-disciples
-disciplin
-discipline
-disciplined
-disciplines
-disclaim
-disclaiming
-disclaims
-disclos
-disclose
-disclosed
-discloses
-discolour
-discoloured
-discolours
-discomfit
-discomfited
-discomfiture
-discomfort
-discomfortable
-discommend
-disconsolate
-discontent
-discontented
-discontentedly
-discontenting
-discontents
-discontinue
-discontinued
-discord
-discordant
-discords
-discourse
-discoursed
-discourser
-discourses
-discoursive
-discourtesy
-discov
-discover
-discovered
-discoverers
-discoveries
-discovering
-discovers
-discovery
-discredit
-discredited
-discredits
-discreet
-discreetly
-discretion
-discretions
-discuss
-disdain
-disdained
-disdaineth
-disdainful
-disdainfully
-disdaining
-disdains
-disdnguish
-diseas
-disease
-diseased
-diseases
-disedg
-disembark
-disfigure
-disfigured
-disfurnish
-disgorge
-disgrac
-disgrace
-disgraced
-disgraceful
-disgraces
-disgracing
-disgracious
-disguis
-disguise
-disguised
-disguiser
-disguises
-disguising
-dish
-dishabited
-dishclout
-dishearten
-disheartens
-dishes
-dishonest
-dishonestly
-dishonesty
-dishonor
-dishonorable
-dishonors
-dishonour
-dishonourable
-dishonoured
-dishonours
-disinherit
-disinherited
-disjoin
-disjoining
-disjoins
-disjoint
-disjunction
-dislik
-dislike
-disliken
-dislikes
-dislimns
-dislocate
-dislodg
-disloyal
-disloyalty
-dismal
-dismantle
-dismantled
-dismask
-dismay
-dismayed
-dismemb
-dismember
-dismes
-dismiss
-dismissed
-dismissing
-dismission
-dismount
-dismounted
-disnatur
-disobedience
-disobedient
-disobey
-disobeys
-disorb
-disorder
-disordered
-disorderly
-disorders
-disparage
-disparagement
-disparagements
-dispark
-dispatch
-dispensation
-dispense
-dispenses
-dispers
-disperse
-dispersed
-dispersedly
-dispersing
-dispiteous
-displac
-displace
-displaced
-displant
-displanting
-display
-displayed
-displeas
-displease
-displeased
-displeasing
-displeasure
-displeasures
-disponge
-disport
-disports
-dispos
-dispose
-disposed
-disposer
-disposing
-disposition
-dispositions
-dispossess
-dispossessing
-disprais
-dispraise
-dispraising
-dispraisingly
-dispropertied
-disproportion
-disproportioned
-disprov
-disprove
-disproved
-dispursed
-disputable
-disputation
-disputations
-dispute
-disputed
-disputes
-disputing
-disquantity
-disquiet
-disquietly
-disrelish
-disrobe
-disseat
-dissemble
-dissembled
-dissembler
-dissemblers
-dissembling
-dissembly
-dissension
-dissensions
-dissentious
-dissever
-dissipation
-dissolute
-dissolutely
-dissolution
-dissolutions
-dissolv
-dissolve
-dissolved
-dissolves
-dissuade
-dissuaded
-distaff
-distaffs
-distain
-distains
-distance
-distant
-distaste
-distasted
-distasteful
-distemp
-distemper
-distemperature
-distemperatures
-distempered
-distempering
-distil
-distill
-distillation
-distilled
-distills
-distilment
-distinct
-distinction
-distinctly
-distingue
-distinguish
-distinguishes
-distinguishment
-distract
-distracted
-distractedly
-distraction
-distractions
-distracts
-distrain
-distraught
-distress
-distressed
-distresses
-distressful
-distribute
-distributed
-distribution
-distrust
-distrustful
-disturb
-disturbed
-disturbers
-disturbing
-disunite
-disvalued
-disvouch
-dit
-ditch
-ditchers
-ditches
-dites
-ditties
-ditty
-diurnal
-div
-dive
-diver
-divers
-diversely
-diversity
-divert
-diverted
-diverts
-dives
-divest
-dividable
-dividant
-divide
-divided
-divides
-divideth
-divin
-divination
-divine
-divinely
-divineness
-diviner
-divines
-divinest
-divining
-divinity
-division
-divisions
-divorc
-divorce
-divorced
-divorcement
-divorcing
-divulg
-divulge
-divulged
-divulging
-dizy
-dizzy
-do
-doating
-dobbin
-dock
-docks
-doct
-doctor
-doctors
-doctrine
-document
-dodge
-doe
-doer
-doers
-does
-doest
-doff
-dog
-dogberry
-dogfish
-dogg
-dogged
-dogs
-doigts
-doing
-doings
-doit
-doits
-dolabella
-dole
-doleful
-doll
-dollar
-dollars
-dolor
-dolorous
-dolour
-dolours
-dolphin
-dolt
-dolts
-domestic
-domestics
-dominance
-dominations
-dominator
-domine
-domineer
-domineering
-dominical
-dominion
-dominions
-domitius
-dommelton
-don
-donalbain
-donation
-donc
-doncaster
-done
-dong
-donn
-donne
-donner
-donnerai
-doom
-doomsday
-door
-doorkeeper
-doors
-dorcas
-doreus
-doricles
-dormouse
-dorothy
-dorset
-dorsetshire
-dost
-dotage
-dotant
-dotard
-dotards
-dote
-doted
-doters
-dotes
-doteth
-doth
-doting
-double
-doubled
-doubleness
-doubler
-doublet
-doublets
-doubling
-doubly
-doubt
-doubted
-doubtful
-doubtfully
-doubting
-doubtless
-doubts
-doug
-dough
-doughty
-doughy
-douglas
-dout
-doute
-douts
-dove
-dovehouse
-dover
-doves
-dow
-dowager
-dowdy
-dower
-dowerless
-dowers
-dowlas
-dowle
-down
-downfall
-downright
-downs
-downstairs
-downtrod
-downward
-downwards
-downy
-dowries
-dowry
-dowsabel
-doxy
-dozed
-dozen
-dozens
-dozy
-drab
-drabbing
-drabs
-drachma
-drachmas
-draff
-drag
-dragg
-dragged
-dragging
-dragon
-dragonish
-dragons
-drain
-drained
-drains
-drake
-dram
-dramatis
-drank
-draught
-draughts
-drave
-draw
-drawbridge
-drawer
-drawers
-draweth
-drawing
-drawling
-drawn
-draws
-drayman
-draymen
-dread
-dreaded
-dreadful
-dreadfully
-dreading
-dreads
-dream
-dreamer
-dreamers
-dreaming
-dreams
-dreamt
-drearning
-dreary
-dreg
-dregs
-drench
-drenched
-dress
-dressed
-dresser
-dressing
-dressings
-drest
-drew
-dribbling
-dried
-drier
-dries
-drift
-drily
-drink
-drinketh
-drinking
-drinkings
-drinks
-driv
-drive
-drivelling
-driven
-drives
-driveth
-driving
-drizzle
-drizzled
-drizzles
-droit
-drollery
-dromio
-dromios
-drone
-drones
-droop
-droopeth
-drooping
-droops
-drop
-dropheir
-droplets
-dropp
-dropper
-droppeth
-dropping
-droppings
-drops
-dropsied
-dropsies
-dropsy
-dropt
-dross
-drossy
-drought
-drove
-droven
-drovier
-drown
-drowned
-drowning
-drowns
-drows
-drowse
-drowsily
-drowsiness
-drowsy
-drudge
-drudgery
-drudges
-drug
-drugg
-drugs
-drum
-drumble
-drummer
-drumming
-drums
-drunk
-drunkard
-drunkards
-drunken
-drunkenly
-drunkenness
-dry
-dryness
-dst
-du
-dub
-dubb
-ducat
-ducats
-ducdame
-duchess
-duchies
-duchy
-duck
-ducking
-ducks
-dudgeon
-due
-duellist
-duello
-duer
-dues
-duff
-dug
-dugs
-duke
-dukedom
-dukedoms
-dukes
-dulcet
-dulche
-dull
-dullard
-duller
-dullest
-dulling
-dullness
-dulls
-dully
-dulness
-duly
-dumain
-dumb
-dumbe
-dumbly
-dumbness
-dump
-dumps
-dun
-duncan
-dung
-dungeon
-dungeons
-dunghill
-dunghills
-dungy
-dunnest
-dunsinane
-dunsmore
-dunstable
-dupp
-durance
-during
-durst
-dusky
-dust
-dusted
-dusty
-dutch
-dutchman
-duteous
-duties
-dutiful
-duty
-dwarf
-dwarfish
-dwell
-dwellers
-dwelling
-dwells
-dwelt
-dwindle
-dy
-dye
-dyed
-dyer
-dying
-e
-each
-eager
-eagerly
-eagerness
-eagle
-eagles
-eaning
-eanlings
-ear
-earing
-earl
-earldom
-earlier
-earliest
-earliness
-earls
-early
-earn
-earned
-earnest
-earnestly
-earnestness
-earns
-ears
-earth
-earthen
-earthlier
-earthly
-earthquake
-earthquakes
-earthy
-eas
-ease
-eased
-easeful
-eases
-easier
-easiest
-easiliest
-easily
-easiness
-easing
-east
-eastcheap
-easter
-eastern
-eastward
-easy
-eat
-eaten
-eater
-eaters
-eating
-eats
-eaux
-eaves
-ebb
-ebbing
-ebbs
-ebon
-ebony
-ebrew
-ecce
-echapper
-echo
-echoes
-eclips
-eclipse
-eclipses
-ecolier
-ecoutez
-ecstacy
-ecstasies
-ecstasy
-ecus
-eden
-edg
-edgar
-edge
-edged
-edgeless
-edges
-edict
-edicts
-edifice
-edifices
-edified
-edifies
-edition
-edm
-edmund
-edmunds
-edmundsbury
-educate
-educated
-education
-edward
-eel
-eels
-effect
-effected
-effectless
-effects
-effectual
-effectually
-effeminate
-effigies
-effus
-effuse
-effusion
-eftest
-egal
-egally
-eget
-egeus
-egg
-eggs
-eggshell
-eglamour
-eglantine
-egma
-ego
-egregious
-egregiously
-egress
-egypt
-egyptian
-egyptians
-eie
-eight
-eighteen
-eighth
-eightpenny
-eighty
-eisel
-either
-eject
-eke
-el
-elbe
-elbow
-elbows
-eld
-elder
-elders
-eldest
-eleanor
-elect
-elected
-election
-elegancy
-elegies
-element
-elements
-elephant
-elephants
-elevated
-eleven
-eleventh
-elf
-elflocks
-eliads
-elinor
-elizabeth
-ell
-elle
-ellen
-elm
-eloquence
-eloquent
-else
-elsewhere
-elsinore
-eltham
-elves
-elvish
-ely
-elysium
-em
-emballing
-embalm
-embalms
-embark
-embarked
-embarquements
-embassade
-embassage
-embassies
-embassy
-embattailed
-embattl
-embattle
-embay
-embellished
-embers
-emblaze
-emblem
-emblems
-embodied
-embold
-emboldens
-emboss
-embossed
-embounded
-embowel
-embowell
-embrac
-embrace
-embraced
-embracement
-embracements
-embraces
-embracing
-embrasures
-embroider
-embroidery
-emhracing
-emilia
-eminence
-eminent
-eminently
-emmanuel
-emnity
-empale
-emperal
-emperess
-emperial
-emperor
-empery
-emphasis
-empire
-empirics
-empiricutic
-empleached
-employ
-employed
-employer
-employment
-employments
-empoison
-empress
-emptied
-emptier
-empties
-emptiness
-empty
-emptying
-emulate
-emulation
-emulations
-emulator
-emulous
-en
-enact
-enacted
-enacts
-enactures
-enamell
-enamelled
-enamour
-enamoured
-enanmour
-encamp
-encamped
-encave
-enceladus
-enchaf
-enchafed
-enchant
-enchanted
-enchanting
-enchantingly
-enchantment
-enchantress
-enchants
-enchas
-encircle
-encircled
-enclos
-enclose
-enclosed
-encloses
-encloseth
-enclosing
-enclouded
-encompass
-encompassed
-encompasseth
-encompassment
-encore
-encorporal
-encount
-encounter
-encountered
-encounters
-encourage
-encouraged
-encouragement
-encrimsoned
-encroaching
-encumb
-end
-endamage
-endamagement
-endanger
-endart
-endear
-endeared
-endeavour
-endeavours
-ended
-ender
-ending
-endings
-endite
-endless
-endow
-endowed
-endowments
-endows
-ends
-endu
-endue
-endur
-endurance
-endure
-endured
-endures
-enduring
-endymion
-eneas
-enemies
-enemy
-enernies
-enew
-enfeebled
-enfeebles
-enfeoff
-enfetter
-enfoldings
-enforc
-enforce
-enforced
-enforcedly
-enforcement
-enforces
-enforcest
-enfranched
-enfranchis
-enfranchise
-enfranchised
-enfranchisement
-enfreed
-enfreedoming
-engag
-engage
-engaged
-engagements
-engaging
-engaol
-engend
-engender
-engenders
-engilds
-engine
-engineer
-enginer
-engines
-engirt
-england
-english
-englishman
-englishmen
-engluts
-englutted
-engraffed
-engraft
-engrafted
-engrav
-engrave
-engross
-engrossed
-engrossest
-engrossing
-engrossments
-enguard
-enigma
-enigmatical
-enjoin
-enjoined
-enjoy
-enjoyed
-enjoyer
-enjoying
-enjoys
-enkindle
-enkindled
-enlard
-enlarg
-enlarge
-enlarged
-enlargement
-enlargeth
-enlighten
-enlink
-enmesh
-enmities
-enmity
-ennoble
-ennobled
-enobarb
-enobarbus
-enon
-enormity
-enormous
-enough
-enow
-enpatron
-enpierced
-enquir
-enquire
-enquired
-enrag
-enrage
-enraged
-enrages
-enrank
-enrapt
-enrich
-enriched
-enriches
-enridged
-enrings
-enrob
-enrobe
-enroll
-enrolled
-enrooted
-enrounded
-enschedul
-ensconce
-ensconcing
-enseamed
-ensear
-enseigne
-enseignez
-ensemble
-enshelter
-enshielded
-enshrines
-ensign
-ensigns
-enskied
-ensman
-ensnare
-ensnared
-ensnareth
-ensteep
-ensu
-ensue
-ensued
-ensues
-ensuing
-enswathed
-ent
-entail
-entame
-entangled
-entangles
-entendre
-enter
-entered
-entering
-enterprise
-enterprises
-enters
-entertain
-entertained
-entertainer
-entertaining
-entertainment
-entertainments
-enthrall
-enthralled
-enthron
-enthroned
-entice
-enticements
-enticing
-entire
-entirely
-entitle
-entitled
-entitling
-entomb
-entombed
-entrails
-entrance
-entrances
-entrap
-entrapp
-entre
-entreat
-entreated
-entreaties
-entreating
-entreatments
-entreats
-entreaty
-entrench
-entry
-entwist
-envelop
-envenom
-envenomed
-envenoms
-envied
-envies
-envious
-enviously
-environ
-environed
-envoy
-envy
-envying
-enwheel
-enwombed
-enwraps
-ephesian
-ephesians
-ephesus
-epicure
-epicurean
-epicures
-epicurism
-epicurus
-epidamnum
-epidaurus
-epigram
-epilepsy
-epileptic
-epilogue
-epilogues
-epistles
-epistrophus
-epitaph
-epitaphs
-epithet
-epitheton
-epithets
-epitome
-equal
-equalities
-equality
-equall
-equally
-equalness
-equals
-equinoctial
-equinox
-equipage
-equity
-equivocal
-equivocate
-equivocates
-equivocation
-equivocator
-er
-erbear
-erbearing
-erbears
-erbeat
-erblows
-erboard
-erborne
-ercame
-ercast
-ercharg
-ercharged
-ercharging
-ercles
-ercome
-ercover
-ercrows
-erdoing
-ere
-erebus
-erect
-erected
-erecting
-erection
-erects
-erewhile
-erflourish
-erflow
-erflowing
-erflows
-erfraught
-erga
-ergalled
-erglanced
-ergo
-ergone
-ergrow
-ergrown
-ergrowth
-erhang
-erhanging
-erhasty
-erhear
-erheard
-eringoes
-erjoy
-erleap
-erleaps
-erleavens
-erlook
-erlooking
-ermaster
-ermengare
-ermount
-ern
-ernight
-eros
-erpaid
-erparted
-erpast
-erpays
-erpeer
-erperch
-erpicturing
-erpingham
-erposting
-erpow
-erpress
-erpressed
-err
-errand
-errands
-errant
-errate
-erraught
-erreaches
-erred
-errest
-erring
-erroneous
-error
-errors
-errs
-errule
-errun
-erset
-ershade
-ershades
-ershine
-ershot
-ersized
-erskip
-erslips
-erspreads
-erst
-erstare
-erstep
-erstunk
-ersway
-ersways
-erswell
-erta
-ertake
-erteemed
-erthrow
-erthrown
-erthrows
-ertook
-ertop
-ertopping
-ertrip
-erturn
-erudition
-eruption
-eruptions
-ervalues
-erwalk
-erwatch
-erween
-erweens
-erweigh
-erweighs
-erwhelm
-erwhelmed
-erworn
-es
-escalus
-escap
-escape
-escaped
-escapes
-eschew
-escoted
-esill
-especial
-especially
-esperance
-espials
-espied
-espies
-espous
-espouse
-espy
-esquire
-esquires
-essay
-essays
-essence
-essential
-essentially
-esses
-essex
-est
-establish
-established
-estate
-estates
-esteem
-esteemed
-esteemeth
-esteeming
-esteems
-estimable
-estimate
-estimation
-estimations
-estime
-estranged
-estridge
-estridges
-et
-etc
-etceteras
-ete
-eternal
-eternally
-eterne
-eternity
-eterniz
-etes
-ethiop
-ethiope
-ethiopes
-ethiopian
-etna
-eton
-etre
-eunuch
-eunuchs
-euphrates
-euphronius
-euriphile
-europa
-europe
-ev
-evade
-evades
-evans
-evasion
-evasions
-eve
-even
-evening
-evenly
-event
-eventful
-events
-ever
-everlasting
-everlastingly
-evermore
-every
-everyone
-everything
-everywhere
-evidence
-evidences
-evident
-evil
-evilly
-evils
-evitate
-ewe
-ewer
-ewers
-ewes
-exact
-exacted
-exactest
-exacting
-exaction
-exactions
-exactly
-exacts
-exalt
-exalted
-examin
-examination
-examinations
-examine
-examined
-examines
-exampl
-example
-exampled
-examples
-exasperate
-exasperates
-exceed
-exceeded
-exceedeth
-exceeding
-exceedingly
-exceeds
-excel
-excelled
-excellence
-excellencies
-excellency
-excellent
-excellently
-excelling
-excels
-except
-excepted
-excepting
-exception
-exceptions
-exceptless
-excess
-excessive
-exchang
-exchange
-exchanged
-exchequer
-exchequers
-excite
-excited
-excitements
-excites
-exclaim
-exclaims
-exclamation
-exclamations
-excludes
-excommunicate
-excommunication
-excrement
-excrements
-excursion
-excursions
-excus
-excusable
-excuse
-excused
-excuses
-excusez
-excusing
-execrable
-execrations
-execute
-executed
-executing
-execution
-executioner
-executioners
-executor
-executors
-exempt
-exempted
-exequies
-exercise
-exercises
-exeter
-exeunt
-exhal
-exhalation
-exhalations
-exhale
-exhales
-exhaust
-exhibit
-exhibiters
-exhibition
-exhort
-exhortation
-exigent
-exil
-exile
-exiled
-exion
-exist
-exists
-exit
-exits
-exorciser
-exorcisms
-exorcist
-expect
-expectance
-expectancy
-expectation
-expectations
-expected
-expecters
-expecting
-expects
-expedience
-expedient
-expediently
-expedition
-expeditious
-expel
-expell
-expelling
-expels
-expend
-expense
-expenses
-experienc
-experience
-experiences
-experiment
-experimental
-experiments
-expert
-expertness
-expiate
-expiation
-expir
-expiration
-expire
-expired
-expires
-expiring
-explication
-exploit
-exploits
-expos
-expose
-exposing
-exposition
-expositor
-expostulate
-expostulation
-exposture
-exposure
-expound
-expounded
-express
-expressed
-expresseth
-expressing
-expressive
-expressly
-expressure
-expuls
-expulsion
-exquisite
-exsufflicate
-extant
-extemporal
-extemporally
-extempore
-extend
-extended
-extends
-extent
-extenuate
-extenuated
-extenuates
-extenuation
-exterior
-exteriorly
-exteriors
-extermin
-extern
-external
-extinct
-extincted
-extincture
-extinguish
-extirp
-extirpate
-extirped
-extol
-extoll
-extolment
-exton
-extort
-extorted
-extortion
-extortions
-extra
-extract
-extracted
-extracting
-extraordinarily
-extraordinary
-extraught
-extravagancy
-extravagant
-extreme
-extremely
-extremes
-extremest
-extremities
-extremity
-exuent
-exult
-exultation
-ey
-eyas
-eyases
-eye
-eyeball
-eyeballs
-eyebrow
-eyebrows
-eyed
-eyeless
-eyelid
-eyelids
-eyes
-eyesight
-eyestrings
-eying
-eyne
-eyrie
-fa
-fabian
-fable
-fables
-fabric
-fabulous
-fac
-face
-faced
-facere
-faces
-faciant
-facile
-facility
-facinerious
-facing
-facit
-fact
-faction
-factionary
-factions
-factious
-factor
-factors
-faculties
-faculty
-fade
-faded
-fadeth
-fadge
-fading
-fadings
-fadom
-fadoms
-fagot
-fagots
-fail
-failing
-fails
-fain
-faint
-fainted
-fainter
-fainting
-faintly
-faintness
-faints
-fair
-fairer
-fairest
-fairies
-fairing
-fairings
-fairly
-fairness
-fairs
-fairwell
-fairy
-fais
-fait
-faites
-faith
-faithful
-faithfull
-faithfully
-faithless
-faiths
-faitors
-fal
-falchion
-falcon
-falconbridge
-falconer
-falconers
-fall
-fallacy
-fallen
-falleth
-falliable
-fallible
-falling
-fallow
-fallows
-falls
-fally
-falorous
-false
-falsehood
-falsely
-falseness
-falser
-falsify
-falsing
-falstaff
-falstaffs
-falter
-fam
-fame
-famed
-familiar
-familiarity
-familiarly
-familiars
-family
-famine
-famish
-famished
-famous
-famoused
-famously
-fan
-fanatical
-fancies
-fancy
-fane
-fanes
-fang
-fangled
-fangless
-fangs
-fann
-fanning
-fans
-fantasied
-fantasies
-fantastic
-fantastical
-fantastically
-fantasticoes
-fantasy
-fap
-far
-farborough
-farced
-fardel
-fardels
-fare
-fares
-farewell
-farewells
-fariner
-faring
-farm
-farmer
-farmhouse
-farms
-farre
-farrow
-farther
-farthest
-farthing
-farthingale
-farthingales
-farthings
-fartuous
-fas
-fashion
-fashionable
-fashioning
-fashions
-fast
-fasted
-fasten
-fastened
-faster
-fastest
-fasting
-fastly
-fastolfe
-fasts
-fat
-fatal
-fatally
-fate
-fated
-fates
-father
-fathered
-fatherless
-fatherly
-fathers
-fathom
-fathomless
-fathoms
-fatigate
-fatness
-fats
-fatted
-fatter
-fattest
-fatting
-fatuus
-fauconbridge
-faulconbridge
-fault
-faultiness
-faultless
-faults
-faulty
-fausse
-fauste
-faustuses
-faut
-favor
-favorable
-favorably
-favors
-favour
-favourable
-favoured
-favouredly
-favourer
-favourers
-favouring
-favourite
-favourites
-favours
-favout
-fawn
-fawneth
-fawning
-fawns
-fay
-fe
-fealty
-fear
-feared
-fearest
-fearful
-fearfull
-fearfully
-fearfulness
-fearing
-fearless
-fears
-feast
-feasted
-feasting
-feasts
-feat
-feated
-feater
-feather
-feathered
-feathers
-featly
-feats
-featur
-feature
-featured
-featureless
-features
-february
-fecks
-fed
-fedary
-federary
-fee
-feeble
-feebled
-feebleness
-feebling
-feebly
-feed
-feeder
-feeders
-feedeth
-feeding
-feeds
-feel
-feeler
-feeling
-feelingly
-feels
-fees
-feet
-fehemently
-feign
-feigned
-feigning
-feil
-feith
-felicitate
-felicity
-fell
-fellest
-fellies
-fellow
-fellowly
-fellows
-fellowship
-fellowships
-fells
-felon
-felonious
-felony
-felt
-female
-females
-feminine
-fen
-fenc
-fence
-fencer
-fencing
-fends
-fennel
-fenny
-fens
-fenton
-fer
-ferdinand
-fere
-fernseed
-ferrara
-ferrers
-ferret
-ferry
-ferryman
-fertile
-fertility
-fervency
-fervour
-fery
-fest
-feste
-fester
-festinate
-festinately
-festival
-festivals
-fet
-fetch
-fetches
-fetching
-fetlock
-fetlocks
-fett
-fetter
-fettering
-fetters
-fettle
-feu
-feud
-fever
-feverous
-fevers
-few
-fewer
-fewest
-fewness
-fickle
-fickleness
-fico
-fiction
-fiddle
-fiddler
-fiddlestick
-fidele
-fidelicet
-fidelity
-fidius
-fie
-field
-fielded
-fields
-fiend
-fiends
-fierce
-fiercely
-fierceness
-fiery
-fife
-fifes
-fifteen
-fifteens
-fifteenth
-fifth
-fifty
-fiftyfold
-fig
-fight
-fighter
-fightest
-fighteth
-fighting
-fights
-figo
-figs
-figur
-figure
-figured
-figures
-figuring
-fike
-fil
-filberts
-filch
-filches
-filching
-file
-filed
-files
-filial
-filius
-fill
-filled
-fillet
-filling
-fillip
-fills
-filly
-film
-fils
-filth
-filths
-filthy
-fin
-finally
-finch
-find
-finder
-findeth
-finding
-findings
-finds
-fine
-fineless
-finely
-finem
-fineness
-finer
-fines
-finest
-fing
-finger
-fingering
-fingers
-fingre
-fingres
-finical
-finish
-finished
-finisher
-finless
-finn
-fins
-finsbury
-fir
-firago
-fire
-firebrand
-firebrands
-fired
-fires
-firework
-fireworks
-firing
-firk
-firm
-firmament
-firmly
-firmness
-first
-firstlings
-fish
-fisher
-fishermen
-fishers
-fishes
-fishified
-fishmonger
-fishpond
-fisnomy
-fist
-fisting
-fists
-fistula
-fit
-fitchew
-fitful
-fitly
-fitment
-fitness
-fits
-fitted
-fitter
-fittest
-fitteth
-fitting
-fitzwater
-five
-fivepence
-fives
-fix
-fixed
-fixes
-fixeth
-fixing
-fixture
-fl
-flag
-flagging
-flagon
-flagons
-flags
-flail
-flakes
-flaky
-flam
-flame
-flamen
-flamens
-flames
-flaming
-flaminius
-flanders
-flannel
-flap
-flaring
-flash
-flashes
-flashing
-flask
-flat
-flatly
-flatness
-flats
-flatt
-flatter
-flattered
-flatterer
-flatterers
-flatterest
-flatteries
-flattering
-flatters
-flattery
-flaunts
-flavio
-flavius
-flaw
-flaws
-flax
-flaxen
-flay
-flaying
-flea
-fleance
-fleas
-flecked
-fled
-fledge
-flee
-fleec
-fleece
-fleeces
-fleer
-fleering
-fleers
-fleet
-fleeter
-fleeting
-fleming
-flemish
-flesh
-fleshes
-fleshly
-fleshment
-fleshmonger
-flew
-flexible
-flexure
-flibbertigibbet
-flickering
-flidge
-fliers
-flies
-flieth
-flight
-flights
-flighty
-flinch
-fling
-flint
-flints
-flinty
-flirt
-float
-floated
-floating
-flock
-flocks
-flood
-floodgates
-floods
-floor
-flora
-florence
-florentine
-florentines
-florentius
-florizel
-flote
-floulish
-flour
-flourish
-flourishes
-flourisheth
-flourishing
-flout
-flouted
-flouting
-flouts
-flow
-flowed
-flower
-flowerets
-flowers
-flowing
-flown
-flows
-fluellen
-fluent
-flung
-flush
-flushing
-fluster
-flute
-flutes
-flutter
-flux
-fluxive
-fly
-flying
-fo
-foal
-foals
-foam
-foamed
-foaming
-foams
-foamy
-fob
-focative
-fodder
-foe
-foeman
-foemen
-foes
-fog
-foggy
-fogs
-foh
-foi
-foil
-foiled
-foils
-foin
-foining
-foins
-fois
-foison
-foisons
-foist
-foix
-fold
-folded
-folds
-folio
-folk
-folks
-follies
-follow
-followed
-follower
-followers
-followest
-following
-follows
-folly
-fond
-fonder
-fondly
-fondness
-font
-fontibell
-food
-fool
-fooleries
-foolery
-foolhardy
-fooling
-foolish
-foolishly
-foolishness
-fools
-foot
-football
-footboy
-footboys
-footed
-footfall
-footing
-footman
-footmen
-footpath
-footsteps
-footstool
-fopp
-fopped
-foppery
-foppish
-fops
-for
-forage
-foragers
-forbade
-forbear
-forbearance
-forbears
-forbid
-forbidden
-forbiddenly
-forbids
-forbod
-forborne
-forc
-force
-forced
-forceful
-forceless
-forces
-forcible
-forcibly
-forcing
-ford
-fordid
-fordo
-fordoes
-fordone
-fore
-forecast
-forefather
-forefathers
-forefinger
-forego
-foregone
-forehand
-forehead
-foreheads
-forehorse
-foreign
-foreigner
-foreigners
-foreknowing
-foreknowledge
-foremost
-forenamed
-forenoon
-forerun
-forerunner
-forerunning
-foreruns
-foresaid
-foresaw
-foresay
-foresee
-foreseeing
-foresees
-foreshow
-foreskirt
-forespent
-forest
-forestall
-forestalled
-forester
-foresters
-forests
-foretell
-foretelling
-foretells
-forethink
-forethought
-foretold
-forever
-foreward
-forewarn
-forewarned
-forewarning
-forfeit
-forfeited
-forfeiters
-forfeiting
-forfeits
-forfeiture
-forfeitures
-forfend
-forfended
-forg
-forgave
-forge
-forged
-forgeries
-forgery
-forges
-forget
-forgetful
-forgetfulness
-forgetive
-forgets
-forgetting
-forgive
-forgiven
-forgiveness
-forgo
-forgoing
-forgone
-forgot
-forgotten
-fork
-forked
-forks
-forlorn
-form
-formal
-formally
-formed
-former
-formerly
-formless
-forms
-fornication
-fornications
-fornicatress
-forres
-forrest
-forsake
-forsaken
-forsaketh
-forslow
-forsook
-forsooth
-forspent
-forspoke
-forswear
-forswearing
-forswore
-forsworn
-fort
-forted
-forth
-forthcoming
-forthlight
-forthright
-forthwith
-fortification
-fortifications
-fortified
-fortifies
-fortify
-fortinbras
-fortitude
-fortnight
-fortress
-fortresses
-forts
-fortun
-fortuna
-fortunate
-fortunately
-fortune
-fortuned
-fortunes
-fortward
-forty
-forum
-forward
-forwarding
-forwardness
-forwards
-forwearied
-fosset
-fost
-foster
-fostered
-fought
-foughten
-foul
-fouler
-foulest
-foully
-foulness
-found
-foundation
-foundations
-founded
-founder
-fount
-fountain
-fountains
-founts
-four
-fourscore
-fourteen
-fourth
-foutra
-fowl
-fowler
-fowling
-fowls
-fox
-foxes
-foxship
-fracted
-fraction
-fractions
-fragile
-fragment
-fragments
-fragrant
-frail
-frailer
-frailties
-frailty
-fram
-frame
-framed
-frames
-frampold
-fran
-francais
-france
-frances
-franchise
-franchised
-franchisement
-franchises
-franciae
-francis
-francisca
-franciscan
-francisco
-frank
-franker
-frankfort
-franklin
-franklins
-frankly
-frankness
-frantic
-franticly
-frateretto
-fratrum
-fraud
-fraudful
-fraught
-fraughtage
-fraughting
-fray
-frays
-freckl
-freckled
-freckles
-frederick
-free
-freed
-freedom
-freedoms
-freehearted
-freelier
-freely
-freeman
-freemen
-freeness
-freer
-frees
-freestone
-freetown
-freeze
-freezes
-freezing
-freezings
-french
-frenchman
-frenchmen
-frenchwoman
-frenzy
-frequent
-frequents
-fresh
-fresher
-freshes
-freshest
-freshly
-freshness
-fret
-fretful
-frets
-fretted
-fretten
-fretting
-friar
-friars
-friday
-fridays
-friend
-friended
-friending
-friendless
-friendliness
-friendly
-friends
-friendship
-friendships
-frieze
-fright
-frighted
-frightened
-frightful
-frighting
-frights
-fringe
-fringed
-frippery
-frisk
-fritters
-frivolous
-fro
-frock
-frog
-frogmore
-froissart
-frolic
-from
-front
-fronted
-frontier
-frontiers
-fronting
-frontlet
-fronts
-frost
-frosts
-frosty
-froth
-froward
-frown
-frowning
-frowningly
-frowns
-froze
-frozen
-fructify
-frugal
-fruit
-fruiterer
-fruitful
-fruitfully
-fruitfulness
-fruition
-fruitless
-fruits
-frush
-frustrate
-frutify
-fry
-fubb
-fuel
-fugitive
-fulfil
-fulfill
-fulfilling
-fulfils
-full
-fullam
-fuller
-fullers
-fullest
-fullness
-fully
-fulness
-fulsome
-fulvia
-fum
-fumble
-fumbles
-fumblest
-fumbling
-fume
-fumes
-fuming
-fumiter
-fumitory
-fun
-function
-functions
-fundamental
-funeral
-funerals
-fur
-furbish
-furies
-furious
-furlongs
-furnace
-furnaces
-furnish
-furnished
-furnishings
-furniture
-furnival
-furor
-furr
-furrow
-furrowed
-furrows
-furth
-further
-furtherance
-furtherer
-furthermore
-furthest
-fury
-furze
-furzes
-fust
-fustian
-fustilarian
-fusty
-fut
-future
-futurity
-g
-gabble
-gaberdine
-gabriel
-gad
-gadding
-gads
-gadshill
-gag
-gage
-gaged
-gagg
-gaging
-gagne
-gain
-gained
-gainer
-gaingiving
-gains
-gainsaid
-gainsay
-gainsaying
-gainsays
-gainst
-gait
-gaited
-galathe
-gale
-galen
-gales
-gall
-gallant
-gallantly
-gallantry
-gallants
-galled
-gallery
-galley
-galleys
-gallia
-gallian
-galliard
-galliasses
-gallimaufry
-galling
-gallons
-gallop
-galloping
-gallops
-gallow
-galloway
-gallowglasses
-gallows
-gallowses
-galls
-gallus
-gam
-gambol
-gambold
-gambols
-gamboys
-game
-gamers
-games
-gamesome
-gamester
-gaming
-gammon
-gamut
-gan
-gangren
-ganymede
-gaol
-gaoler
-gaolers
-gaols
-gap
-gape
-gapes
-gaping
-gar
-garb
-garbage
-garboils
-garcon
-gard
-garde
-garden
-gardener
-gardeners
-gardens
-gardez
-gardiner
-gardon
-gargantua
-gargrave
-garish
-garland
-garlands
-garlic
-garment
-garments
-garmet
-garner
-garners
-garnish
-garnished
-garret
-garrison
-garrisons
-gart
-garter
-garterd
-gartering
-garters
-gascony
-gash
-gashes
-gaskins
-gasp
-gasping
-gasted
-gastness
-gat
-gate
-gated
-gates
-gath
-gather
-gathered
-gathering
-gathers
-gatories
-gatory
-gaud
-gaudeo
-gaudy
-gauge
-gaul
-gaultree
-gaunt
-gauntlet
-gauntlets
-gav
-gave
-gavest
-gawded
-gawds
-gawsey
-gay
-gayness
-gaz
-gaze
-gazed
-gazer
-gazers
-gazes
-gazeth
-gazing
-gear
-geck
-geese
-geffrey
-geld
-gelded
-gelding
-gelida
-gelidus
-gelt
-gem
-geminy
-gems
-gen
-gender
-genders
-general
-generally
-generals
-generation
-generations
-generative
-generosity
-generous
-genitive
-genitivo
-genius
-gennets
-genoa
-genoux
-gens
-gent
-gentilhomme
-gentility
-gentle
-gentlefolks
-gentleman
-gentlemanlike
-gentlemen
-gentleness
-gentler
-gentles
-gentlest
-gentlewoman
-gentlewomen
-gently
-gentry
-george
-gerard
-germaines
-germains
-german
-germane
-germans
-germany
-gertrude
-gest
-gests
-gesture
-gestures
-get
-getrude
-gets
-getter
-getting
-ghastly
-ghost
-ghosted
-ghostly
-ghosts
-gi
-giant
-giantess
-giantlike
-giants
-gib
-gibber
-gibbet
-gibbets
-gibe
-giber
-gibes
-gibing
-gibingly
-giddily
-giddiness
-giddy
-gift
-gifts
-gig
-giglets
-giglot
-gilbert
-gild
-gilded
-gilding
-gilliams
-gillian
-gills
-gillyvors
-gilt
-gimmal
-gimmers
-gin
-ging
-ginger
-gingerbread
-gingerly
-ginn
-gins
-gioucestershire
-gipes
-gipsies
-gipsy
-gird
-girded
-girdle
-girdled
-girdles
-girdling
-girl
-girls
-girt
-girth
-gis
-giv
-give
-given
-giver
-givers
-gives
-givest
-giveth
-giving
-givings
-glad
-gladded
-gladding
-gladly
-gladness
-glamis
-glanc
-glance
-glanced
-glances
-glancing
-glanders
-glansdale
-glare
-glares
-glass
-glasses
-glassy
-glaz
-glazed
-gleams
-glean
-gleaned
-gleaning
-gleeful
-gleek
-gleeking
-gleeks
-glend
-glendower
-glib
-glide
-glided
-glides
-glideth
-gliding
-glimmer
-glimmering
-glimmers
-glimpse
-glimpses
-glist
-glistening
-glister
-glistering
-glisters
-glitt
-glittering
-globe
-globes
-glooming
-gloomy
-glories
-glorified
-glorify
-glorious
-gloriously
-glory
-glose
-gloss
-glosses
-glou
-glouceste
-gloucester
-gloucestershire
-glove
-glover
-gloves
-glow
-glowed
-glowing
-glowworm
-gloz
-gloze
-glozes
-glu
-glue
-glued
-glues
-glut
-glutt
-glutted
-glutton
-gluttoning
-gluttony
-gnarled
-gnarling
-gnat
-gnats
-gnaw
-gnawing
-gnawn
-gnaws
-go
-goad
-goaded
-goads
-goal
-goat
-goatish
-goats
-gobbets
-gobbo
-goblet
-goblets
-goblin
-goblins
-god
-godded
-godden
-goddess
-goddesses
-goddild
-godfather
-godfathers
-godhead
-godlike
-godliness
-godly
-godmother
-gods
-godson
-goer
-goers
-goes
-goest
-goeth
-goffe
-gogs
-going
-gold
-golden
-goldenly
-goldsmith
-goldsmiths
-golgotha
-goliases
-goliath
-gon
-gondola
-gondolier
-gone
-goneril
-gong
-gonzago
-gonzalo
-good
-goodfellow
-goodlier
-goodliest
-goodly
-goodman
-goodness
-goodnight
-goodrig
-goods
-goodwife
-goodwill
-goodwin
-goodwins
-goodyear
-goodyears
-goose
-gooseberry
-goosequills
-goot
-gor
-gorbellied
-gorboduc
-gordian
-gore
-gored
-gorg
-gorge
-gorgeous
-gorget
-gorging
-gorgon
-gormandize
-gormandizing
-gory
-gosling
-gospel
-gospels
-goss
-gossamer
-gossip
-gossiping
-gossiplike
-gossips
-got
-goth
-goths
-gotten
-gourd
-gout
-gouts
-gouty
-govern
-governance
-governed
-governess
-government
-governor
-governors
-governs
-gower
-gown
-gowns
-grac
-grace
-graced
-graceful
-gracefully
-graceless
-graces
-gracing
-gracious
-graciously
-gradation
-graff
-graffing
-graft
-grafted
-grafters
-grain
-grained
-grains
-gramercies
-gramercy
-grammar
-grand
-grandam
-grandame
-grandchild
-grande
-grandeur
-grandfather
-grandjurors
-grandmother
-grandpre
-grandsir
-grandsire
-grandsires
-grange
-grant
-granted
-granting
-grants
-grape
-grapes
-grapple
-grapples
-grappling
-grasp
-grasped
-grasps
-grass
-grasshoppers
-grassy
-grate
-grated
-grateful
-grates
-gratiano
-gratify
-gratii
-gratillity
-grating
-gratis
-gratitude
-gratulate
-grav
-grave
-gravediggers
-gravel
-graveless
-gravell
-gravely
-graven
-graveness
-graver
-graves
-gravest
-gravestone
-gravities
-gravity
-gravy
-gray
-graymalkin
-graz
-graze
-grazed
-grazing
-grease
-greases
-greasily
-greasy
-great
-greater
-greatest
-greatly
-greatness
-grecian
-grecians
-gree
-greece
-greed
-greedily
-greediness
-greedy
-greeing
-greek
-greekish
-greeks
-green
-greener
-greenly
-greens
-greensleeves
-greenwich
-greenwood
-greet
-greeted
-greeting
-greetings
-greets
-greg
-gregory
-gremio
-grew
-grey
-greybeard
-greybeards
-greyhound
-greyhounds
-grief
-griefs
-griev
-grievance
-grievances
-grieve
-grieved
-grieves
-grievest
-grieving
-grievingly
-grievous
-grievously
-griffin
-griffith
-grim
-grime
-grimly
-grin
-grind
-grinding
-grindstone
-grinning
-grip
-gripe
-gripes
-griping
-grise
-grisly
-grissel
-grize
-grizzle
-grizzled
-groan
-groaning
-groans
-groat
-groats
-groin
-groom
-grooms
-grop
-groping
-gros
-gross
-grosser
-grossly
-grossness
-ground
-grounded
-groundlings
-grounds
-grove
-grovel
-grovelling
-groves
-grow
-groweth
-growing
-grown
-grows
-growth
-grub
-grubb
-grubs
-grudge
-grudged
-grudges
-grudging
-gruel
-grumble
-grumblest
-grumbling
-grumblings
-grumio
-grund
-grunt
-gualtier
-guard
-guardage
-guardant
-guarded
-guardian
-guardians
-guards
-guardsman
-gud
-gudgeon
-guerdon
-guerra
-guess
-guesses
-guessingly
-guest
-guests
-guiana
-guichard
-guide
-guided
-guider
-guiderius
-guides
-guiding
-guidon
-guienne
-guil
-guildenstern
-guilders
-guildford
-guildhall
-guile
-guiled
-guileful
-guilfords
-guilt
-guiltian
-guiltier
-guiltily
-guiltiness
-guiltless
-guilts
-guilty
-guinea
-guinever
-guise
-gul
-gules
-gulf
-gulfs
-gull
-gulls
-gum
-gumm
-gums
-gun
-gunner
-gunpowder
-guns
-gurnet
-gurney
-gust
-gusts
-gusty
-guts
-gutter
-guy
-guynes
-guysors
-gypsy
-gyve
-gyved
-gyves
-h
-ha
-haberdasher
-habiliment
-habiliments
-habit
-habitation
-habited
-habits
-habitude
-hack
-hacket
-hackney
-hacks
-had
-hadst
-haec
-haeres
-hag
-hagar
-haggard
-haggards
-haggish
-haggled
-hags
-hail
-hailed
-hailstone
-hailstones
-hair
-hairless
-hairs
-hairy
-hal
-halberd
-halberds
-halcyon
-hale
-haled
-hales
-half
-halfcan
-halfpence
-halfpenny
-halfpennyworth
-halfway
-halidom
-hall
-halloa
-halloing
-hallond
-halloo
-hallooing
-hallow
-hallowed
-hallowmas
-hallown
-hals
-halt
-halter
-halters
-halting
-halts
-halves
-ham
-hames
-hamlet
-hammer
-hammered
-hammering
-hammers
-hamper
-hampton
-hams
-hamstring
-hand
-handed
-handful
-handicraft
-handicraftsmen
-handing
-handiwork
-handkercher
-handkerchers
-handkerchief
-handle
-handled
-handles
-handless
-handlest
-handling
-handmaid
-handmaids
-hands
-handsaw
-handsome
-handsomely
-handsomeness
-handwriting
-handy
-hang
-hanged
-hangers
-hangeth
-hanging
-hangings
-hangman
-hangmen
-hangs
-hannibal
-hap
-hapless
-haply
-happ
-happen
-happened
-happier
-happies
-happiest
-happily
-happiness
-happy
-haps
-harbinger
-harbingers
-harbor
-harbour
-harbourage
-harbouring
-harbours
-harcourt
-hard
-harder
-hardest
-hardiest
-hardiment
-hardiness
-hardly
-hardness
-hardocks
-hardy
-hare
-harelip
-hares
-harfleur
-hark
-harlot
-harlotry
-harlots
-harm
-harmed
-harmful
-harming
-harmless
-harmonious
-harmony
-harms
-harness
-harp
-harper
-harpier
-harping
-harpy
-harried
-harrow
-harrows
-harry
-harsh
-harshly
-harshness
-hart
-harts
-harum
-harvest
-has
-hast
-haste
-hasted
-hasten
-hastes
-hastily
-hasting
-hastings
-hasty
-hat
-hatch
-hatches
-hatchet
-hatching
-hatchment
-hate
-hated
-hateful
-hater
-haters
-hates
-hateth
-hatfield
-hath
-hating
-hatred
-hats
-haud
-hauf
-haught
-haughtiness
-haughty
-haunch
-haunches
-haunt
-haunted
-haunting
-haunts
-hautboy
-hautboys
-have
-haven
-havens
-haver
-having
-havings
-havior
-haviour
-havoc
-hawk
-hawking
-hawks
-hawthorn
-hawthorns
-hay
-hazard
-hazarded
-hazards
-hazel
-hazelnut
-he
-head
-headborough
-headed
-headier
-heading
-headland
-headless
-headlong
-heads
-headsman
-headstrong
-heady
-heal
-healed
-healing
-heals
-health
-healthful
-healths
-healthsome
-healthy
-heap
-heaping
-heaps
-hear
-heard
-hearer
-hearers
-hearest
-heareth
-hearing
-hearings
-heark
-hearken
-hearkens
-hears
-hearsay
-hearse
-hearsed
-hearst
-heart
-heartache
-heartbreak
-heartbreaking
-hearted
-hearten
-hearth
-hearths
-heartily
-heartiness
-heartless
-heartlings
-heartly
-hearts
-heartsick
-heartstrings
-hearty
-heat
-heated
-heath
-heathen
-heathenish
-heating
-heats
-heauties
-heav
-heave
-heaved
-heaven
-heavenly
-heavens
-heaves
-heavier
-heaviest
-heavily
-heaviness
-heaving
-heavings
-heavy
-hebona
-hebrew
-hecate
-hectic
-hector
-hectors
-hecuba
-hedg
-hedge
-hedgehog
-hedgehogs
-hedges
-heed
-heeded
-heedful
-heedfull
-heedfully
-heedless
-heel
-heels
-hefted
-hefts
-heifer
-heifers
-heigh
-height
-heighten
-heinous
-heinously
-heir
-heiress
-heirless
-heirs
-held
-helen
-helena
-helenus
-helias
-helicons
-hell
-hellespont
-hellfire
-hellish
-helm
-helmed
-helmet
-helmets
-helms
-help
-helper
-helpers
-helpful
-helping
-helpless
-helps
-helter
-hem
-heme
-hemlock
-hemm
-hemp
-hempen
-hems
-hen
-hence
-henceforth
-henceforward
-henchman
-henri
-henricus
-henry
-hens
-hent
-henton
-her
-herald
-heraldry
-heralds
-herb
-herbert
-herblets
-herbs
-herculean
-hercules
-herd
-herds
-herdsman
-herdsmen
-here
-hereabout
-hereabouts
-hereafter
-hereby
-hereditary
-hereford
-herefordshire
-herein
-hereof
-heresies
-heresy
-heretic
-heretics
-hereto
-hereupon
-heritage
-heritier
-hermes
-hermia
-hermione
-hermit
-hermitage
-hermits
-herne
-hero
-herod
-herods
-heroes
-heroic
-heroical
-herring
-herrings
-hers
-herself
-hesperides
-hesperus
-hest
-hests
-heure
-heureux
-hew
-hewgh
-hewing
-hewn
-hews
-hey
-heyday
-hibocrates
-hic
-hiccups
-hick
-hid
-hidden
-hide
-hideous
-hideously
-hideousness
-hides
-hidest
-hiding
-hie
-hied
-hiems
-hies
-hig
-high
-higher
-highest
-highly
-highmost
-highness
-hight
-highway
-highways
-hilding
-hildings
-hill
-hillo
-hilloa
-hills
-hilt
-hilts
-hily
-him
-himself
-hinc
-hinckley
-hind
-hinder
-hindered
-hinders
-hindmost
-hinds
-hing
-hinge
-hinges
-hint
-hip
-hipp
-hipparchus
-hippolyta
-hips
-hir
-hire
-hired
-hiren
-hirtius
-his
-hisperia
-hiss
-hisses
-hissing
-hist
-historical
-history
-hit
-hither
-hitherto
-hitherward
-hitherwards
-hits
-hitting
-hive
-hives
-hizzing
-ho
-hoa
-hoar
-hoard
-hoarded
-hoarding
-hoars
-hoarse
-hoary
-hob
-hobbididence
-hobby
-hobbyhorse
-hobgoblin
-hobnails
-hoc
-hod
-hodge
-hog
-hogs
-hogshead
-hogsheads
-hois
-hoise
-hoist
-hoisted
-hoists
-holborn
-hold
-holden
-holder
-holdeth
-holdfast
-holding
-holds
-hole
-holes
-holidam
-holidame
-holiday
-holidays
-holier
-holiest
-holily
-holiness
-holla
-holland
-hollander
-hollanders
-holloa
-holloaing
-hollow
-hollowly
-hollowness
-holly
-holmedon
-holofernes
-holp
-holy
-homage
-homager
-home
-homely
-homes
-homespuns
-homeward
-homewards
-homicide
-homicides
-homily
-hominem
-hommes
-homo
-honest
-honester
-honestest
-honestly
-honesty
-honey
-honeycomb
-honeying
-honeyless
-honeysuckle
-honeysuckles
-honi
-honneur
-honor
-honorable
-honorably
-honorato
-honorificabilitudinitatibus
-honors
-honour
-honourable
-honourably
-honoured
-honourest
-honourible
-honouring
-honours
-hoo
-hood
-hooded
-hoodman
-hoods
-hoodwink
-hoof
-hoofs
-hook
-hooking
-hooks
-hoop
-hoops
-hoot
-hooted
-hooting
-hoots
-hop
-hope
-hopeful
-hopeless
-hopes
-hopest
-hoping
-hopkins
-hoppedance
-hor
-horace
-horatio
-horizon
-horn
-hornbook
-horned
-horner
-horning
-hornpipes
-horns
-horologe
-horrible
-horribly
-horrid
-horrider
-horridly
-horror
-horrors
-hors
-horse
-horseback
-horsed
-horsehairs
-horseman
-horsemanship
-horsemen
-horses
-horseway
-horsing
-hortensio
-hortensius
-horum
-hose
-hospitable
-hospital
-hospitality
-host
-hostage
-hostages
-hostess
-hostile
-hostility
-hostilius
-hosts
-hot
-hotly
-hotspur
-hotter
-hottest
-hound
-hounds
-hour
-hourly
-hours
-hous
-house
-household
-householder
-householders
-households
-housekeeper
-housekeepers
-housekeeping
-houseless
-houses
-housewife
-housewifery
-housewives
-hovel
-hover
-hovered
-hovering
-hovers
-how
-howbeit
-howe
-howeer
-however
-howl
-howled
-howlet
-howling
-howls
-howsoe
-howsoever
-howsome
-hoxes
-hoy
-hoyday
-hubert
-huddled
-huddling
-hue
-hued
-hues
-hug
-huge
-hugely
-hugeness
-hugg
-hugger
-hugh
-hugs
-hujus
-hulk
-hulks
-hull
-hulling
-hullo
-hum
-human
-humane
-humanely
-humanity
-humble
-humbled
-humbleness
-humbler
-humbles
-humblest
-humbling
-humbly
-hume
-humh
-humidity
-humility
-humming
-humor
-humorous
-humors
-humour
-humourists
-humours
-humphrey
-humphry
-hums
-hundred
-hundreds
-hundredth
-hung
-hungarian
-hungary
-hunger
-hungerford
-hungerly
-hungry
-hunt
-hunted
-hunter
-hunters
-hunteth
-hunting
-huntington
-huntress
-hunts
-huntsman
-huntsmen
-hurdle
-hurl
-hurling
-hurls
-hurly
-hurlyburly
-hurricano
-hurricanoes
-hurried
-hurries
-hurry
-hurt
-hurting
-hurtled
-hurtless
-hurtling
-hurts
-husband
-husbanded
-husbandless
-husbandry
-husbands
-hush
-hushes
-husht
-husks
-huswife
-huswifes
-hutch
-hybla
-hydra
-hyen
-hymen
-hymenaeus
-hymn
-hymns
-hyperboles
-hyperbolical
-hyperion
-hypocrisy
-hypocrite
-hypocrites
-hyrcan
-hyrcania
-hyrcanian
-hyssop
-hysterica
-i
-iachimo
-iaculis
-iago
-iament
-ibat
-icarus
-ice
-iceland
-ici
-icicle
-icicles
-icy
-idea
-ideas
-idem
-iden
-ides
-idiot
-idiots
-idle
-idleness
-idles
-idly
-idol
-idolatrous
-idolatry
-ield
-if
-ifs
-ignis
-ignoble
-ignobly
-ignominious
-ignominy
-ignomy
-ignorance
-ignorant
-ii
-iii
-iiii
-il
-ilbow
-ild
-ilion
-ilium
-ill
-illegitimate
-illiterate
-illness
-illo
-ills
-illume
-illumin
-illuminate
-illumineth
-illusion
-illusions
-illustrate
-illustrated
-illustrious
-illyria
-illyrian
-ils
-im
-image
-imagery
-images
-imagin
-imaginary
-imagination
-imaginations
-imagine
-imagining
-imaginings
-imbar
-imbecility
-imbrue
-imitari
-imitate
-imitated
-imitation
-imitations
-immaculate
-immanity
-immask
-immaterial
-immediacy
-immediate
-immediately
-imminence
-imminent
-immoderate
-immoderately
-immodest
-immoment
-immortal
-immortaliz
-immortally
-immur
-immured
-immures
-imogen
-imp
-impaint
-impair
-impairing
-impale
-impaled
-impanelled
-impart
-imparted
-impartial
-impartment
-imparts
-impasted
-impatience
-impatient
-impatiently
-impawn
-impeach
-impeached
-impeachment
-impeachments
-impedes
-impediment
-impediments
-impenetrable
-imperator
-imperceiverant
-imperfect
-imperfection
-imperfections
-imperfectly
-imperial
-imperious
-imperiously
-impertinency
-impertinent
-impeticos
-impetuosity
-impetuous
-impieties
-impiety
-impious
-implacable
-implements
-implies
-implor
-implorators
-implore
-implored
-imploring
-impon
-import
-importance
-importancy
-important
-importantly
-imported
-importeth
-importing
-importless
-imports
-importun
-importunacy
-importunate
-importune
-importunes
-importunity
-impos
-impose
-imposed
-imposition
-impositions
-impossibilities
-impossibility
-impossible
-imposthume
-impostor
-impostors
-impotence
-impotent
-impounded
-impregnable
-imprese
-impress
-impressed
-impressest
-impression
-impressure
-imprimendum
-imprimis
-imprint
-imprinted
-imprison
-imprisoned
-imprisoning
-imprisonment
-improbable
-improper
-improve
-improvident
-impudence
-impudency
-impudent
-impudently
-impudique
-impugn
-impugns
-impure
-imputation
-impute
-in
-inaccessible
-inaidable
-inaudible
-inauspicious
-incaged
-incantations
-incapable
-incardinate
-incarnadine
-incarnate
-incarnation
-incens
-incense
-incensed
-incensement
-incenses
-incensing
-incertain
-incertainties
-incertainty
-incessant
-incessantly
-incest
-incestuous
-inch
-incharitable
-inches
-incidency
-incident
-incision
-incite
-incites
-incivil
-incivility
-inclin
-inclinable
-inclination
-incline
-inclined
-inclines
-inclining
-inclips
-include
-included
-includes
-inclusive
-incomparable
-incomprehensible
-inconsiderate
-inconstancy
-inconstant
-incontinency
-incontinent
-incontinently
-inconvenience
-inconveniences
-inconvenient
-incony
-incorporate
-incorps
-incorrect
-increas
-increase
-increases
-increaseth
-increasing
-incredible
-incredulous
-incur
-incurable
-incurr
-incurred
-incursions
-ind
-inde
-indebted
-indeed
-indent
-indented
-indenture
-indentures
-index
-indexes
-india
-indian
-indict
-indicted
-indictment
-indies
-indifferency
-indifferent
-indifferently
-indigent
-indigest
-indigested
-indign
-indignation
-indignations
-indigne
-indignities
-indignity
-indirect
-indirection
-indirections
-indirectly
-indiscreet
-indiscretion
-indispos
-indisposition
-indissoluble
-indistinct
-indistinguish
-indistinguishable
-indited
-individable
-indrench
-indu
-indubitate
-induc
-induce
-induced
-inducement
-induction
-inductions
-indue
-indued
-indues
-indulgence
-indulgences
-indulgent
-indurance
-industrious
-industriously
-industry
-inequality
-inestimable
-inevitable
-inexecrable
-inexorable
-inexplicable
-infallible
-infallibly
-infamonize
-infamous
-infamy
-infancy
-infant
-infants
-infect
-infected
-infecting
-infection
-infections
-infectious
-infectiously
-infects
-infer
-inference
-inferior
-inferiors
-infernal
-inferr
-inferreth
-inferring
-infest
-infidel
-infidels
-infinite
-infinitely
-infinitive
-infirm
-infirmities
-infirmity
-infixed
-infixing
-inflam
-inflame
-inflaming
-inflammation
-inflict
-infliction
-influence
-influences
-infold
-inform
-informal
-information
-informations
-informed
-informer
-informs
-infortunate
-infring
-infringe
-infringed
-infus
-infuse
-infused
-infusing
-infusion
-ingener
-ingenious
-ingeniously
-inglorious
-ingots
-ingraffed
-ingraft
-ingrate
-ingrated
-ingrateful
-ingratitude
-ingratitudes
-ingredient
-ingredients
-ingross
-inhabit
-inhabitable
-inhabitants
-inhabited
-inhabits
-inhearse
-inhearsed
-inherent
-inherit
-inheritance
-inherited
-inheriting
-inheritor
-inheritors
-inheritrix
-inherits
-inhibited
-inhibition
-inhoop
-inhuman
-iniquities
-iniquity
-initiate
-injointed
-injunction
-injunctions
-injur
-injure
-injurer
-injuries
-injurious
-injury
-injustice
-ink
-inkhorn
-inkle
-inkles
-inkling
-inky
-inlaid
-inland
-inlay
-inly
-inmost
-inn
-inner
-innkeeper
-innocence
-innocency
-innocent
-innocents
-innovation
-innovator
-inns
-innumerable
-inoculate
-inordinate
-inprimis
-inquir
-inquire
-inquiry
-inquisition
-inquisitive
-inroads
-insane
-insanie
-insatiate
-insconce
-inscrib
-inscription
-inscriptions
-inscroll
-inscrutable
-insculp
-insculpture
-insensible
-inseparable
-inseparate
-insert
-inserted
-inset
-inshell
-inshipp
-inside
-insinewed
-insinuate
-insinuateth
-insinuating
-insinuation
-insisted
-insisting
-insisture
-insociable
-insolence
-insolent
-insomuch
-inspir
-inspiration
-inspirations
-inspire
-inspired
-install
-installed
-instalment
-instance
-instances
-instant
-instantly
-instate
-instead
-insteeped
-instigate
-instigated
-instigation
-instigations
-instigator
-instinct
-instinctively
-institute
-institutions
-instruct
-instructed
-instruction
-instructions
-instructs
-instrument
-instrumental
-instruments
-insubstantial
-insufficience
-insufficiency
-insult
-insulted
-insulting
-insultment
-insults
-insupportable
-insuppressive
-insurrection
-insurrections
-int
-integer
-integritas
-integrity
-intellect
-intellects
-intellectual
-intelligence
-intelligencer
-intelligencing
-intelligent
-intelligis
-intelligo
-intemperance
-intemperate
-intend
-intended
-intendeth
-intending
-intendment
-intends
-intenible
-intent
-intention
-intentively
-intents
-inter
-intercept
-intercepted
-intercepter
-interception
-intercepts
-intercession
-intercessors
-interchained
-interchang
-interchange
-interchangeably
-interchangement
-interchanging
-interdiction
-interest
-interim
-interims
-interior
-interjections
-interjoin
-interlude
-intermingle
-intermission
-intermissive
-intermit
-intermix
-intermixed
-interpose
-interposer
-interposes
-interpret
-interpretation
-interpreted
-interpreter
-interpreters
-interprets
-interr
-interred
-interrogatories
-interrupt
-interrupted
-interrupter
-interruptest
-interruption
-interrupts
-intertissued
-intervallums
-interview
-intestate
-intestine
-intil
-intimate
-intimation
-intitled
-intituled
-into
-intolerable
-intoxicates
-intreasured
-intreat
-intrench
-intrenchant
-intricate
-intrinse
-intrinsicate
-intrude
-intruder
-intruding
-intrusion
-inundation
-inure
-inurn
-invade
-invades
-invasion
-invasive
-invectively
-invectives
-inveigled
-invent
-invented
-invention
-inventions
-inventor
-inventorially
-inventoried
-inventors
-inventory
-inverness
-invert
-invest
-invested
-investing
-investments
-inveterate
-invincible
-inviolable
-invised
-invisible
-invitation
-invite
-invited
-invites
-inviting
-invitis
-invocate
-invocation
-invoke
-invoked
-invulnerable
-inward
-inwardly
-inwardness
-inwards
-ionia
-ionian
-ipse
-ipswich
-ira
-irae
-iras
-ire
-ireful
-ireland
-iris
-irish
-irishman
-irishmen
-irks
-irksome
-iron
-irons
-irreconcil
-irrecoverable
-irregular
-irregulous
-irreligious
-irremovable
-irreparable
-irresolute
-irrevocable
-is
-isabel
-isabella
-isbel
-isbels
-iscariot
-ise
-ish
-isidore
-isis
-island
-islander
-islanders
-islands
-isle
-isles
-israel
-issu
-issue
-issued
-issueless
-issues
-issuing
-ist
-ista
-it
-italian
-italy
-itch
-itches
-itching
-item
-items
-iteration
-ithaca
-its
-itself
-itshall
-iv
-ivory
-ivy
-iwis
-ix
-j
-jacet
-jack
-jackanapes
-jacks
-jacksauce
-jackslave
-jacob
-jade
-jaded
-jades
-jail
-jakes
-jamany
-james
-jamy
-jane
-jangled
-jangling
-january
-janus
-japhet
-jaquenetta
-jaques
-jar
-jarring
-jars
-jarteer
-jasons
-jaunce
-jauncing
-jaundice
-jaundies
-jaw
-jawbone
-jaws
-jay
-jays
-jc
-je
-jealous
-jealousies
-jealousy
-jeer
-jeering
-jelly
-jenny
-jeopardy
-jephtha
-jephthah
-jerkin
-jerkins
-jerks
-jeronimy
-jerusalem
-jeshu
-jesses
-jessica
-jest
-jested
-jester
-jesters
-jesting
-jests
-jesu
-jesus
-jet
-jets
-jew
-jewel
-jeweller
-jewels
-jewess
-jewish
-jewry
-jews
-jezebel
-jig
-jigging
-jill
-jills
-jingling
-joan
-job
-jockey
-jocund
-jog
-jogging
-john
-johns
-join
-joinder
-joined
-joiner
-joineth
-joins
-joint
-jointed
-jointing
-jointly
-jointress
-joints
-jointure
-jollity
-jolly
-jolt
-joltheads
-jordan
-joseph
-joshua
-jot
-jour
-jourdain
-journal
-journey
-journeying
-journeyman
-journeymen
-journeys
-jove
-jovem
-jovial
-jowl
-jowls
-joy
-joyed
-joyful
-joyfully
-joyless
-joyous
-joys
-juan
-jud
-judas
-judases
-jude
-judg
-judge
-judged
-judgement
-judges
-judgest
-judging
-judgment
-judgments
-judicious
-jug
-juggle
-juggled
-juggler
-jugglers
-juggling
-jugs
-juice
-juiced
-jul
-jule
-julia
-juliet
-julietta
-julio
-julius
-july
-jump
-jumpeth
-jumping
-jumps
-june
-junes
-junior
-junius
-junkets
-juno
-jupiter
-jure
-jurement
-jurisdiction
-juror
-jurors
-jury
-jurymen
-just
-justeius
-justest
-justice
-justicer
-justicers
-justices
-justification
-justified
-justify
-justle
-justled
-justles
-justling
-justly
-justness
-justs
-jutting
-jutty
-juvenal
-kam
-kate
-kated
-kates
-katharine
-katherina
-katherine
-kecksies
-keech
-keel
-keels
-keen
-keenness
-keep
-keepdown
-keeper
-keepers
-keepest
-keeping
-keeps
-keiser
-ken
-kendal
-kennel
-kent
-kentish
-kentishman
-kentishmen
-kept
-kerchief
-kerely
-kern
-kernal
-kernel
-kernels
-kerns
-kersey
-kettle
-kettledrum
-kettledrums
-key
-keys
-kibe
-kibes
-kick
-kicked
-kickshaws
-kickshawses
-kicky
-kid
-kidney
-kikely
-kildare
-kill
-killed
-killer
-killeth
-killing
-killingworth
-kills
-kiln
-kimbolton
-kin
-kind
-kinder
-kindest
-kindle
-kindled
-kindless
-kindlier
-kindling
-kindly
-kindness
-kindnesses
-kindred
-kindreds
-kinds
-kine
-king
-kingdom
-kingdoms
-kingly
-kings
-kinred
-kins
-kinsman
-kinsmen
-kinswoman
-kirtle
-kirtles
-kiss
-kissed
-kisses
-kissing
-kitchen
-kitchens
-kite
-kites
-kitten
-kj
-kl
-klll
-knack
-knacks
-knapp
-knav
-knave
-knaveries
-knavery
-knaves
-knavish
-knead
-kneaded
-kneading
-knee
-kneel
-kneeling
-kneels
-knees
-knell
-knew
-knewest
-knife
-knight
-knighted
-knighthood
-knighthoods
-knightly
-knights
-knit
-knits
-knitters
-knitteth
-knives
-knobs
-knock
-knocking
-knocks
-knog
-knoll
-knot
-knots
-knotted
-knotty
-know
-knower
-knowest
-knowing
-knowingly
-knowings
-knowledge
-known
-knows
-l
-la
-laban
-label
-labell
-labienus
-labio
-labor
-laboring
-labors
-labour
-laboured
-labourer
-labourers
-labouring
-labours
-laboursome
-labras
-labyrinth
-lac
-lace
-laced
-lacedaemon
-laces
-lacies
-lack
-lackbeard
-lacked
-lackey
-lackeying
-lackeys
-lacking
-lacks
-lad
-ladder
-ladders
-lade
-laden
-ladies
-lading
-lads
-lady
-ladybird
-ladyship
-ladyships
-laer
-laertes
-lafeu
-lag
-lagging
-laid
-lain
-laissez
-lake
-lakes
-lakin
-lam
-lamb
-lambert
-lambkin
-lambkins
-lambs
-lame
-lamely
-lameness
-lament
-lamentable
-lamentably
-lamentation
-lamentations
-lamented
-lamenting
-lamentings
-laments
-lames
-laming
-lammas
-lammastide
-lamound
-lamp
-lampass
-lamps
-lanc
-lancaster
-lance
-lances
-lanceth
-lanch
-land
-landed
-landing
-landless
-landlord
-landmen
-lands
-lane
-lanes
-langage
-langley
-langton
-language
-languageless
-languages
-langues
-languish
-languished
-languishes
-languishing
-languishings
-languishment
-languor
-lank
-lantern
-lanterns
-lanthorn
-lap
-lapis
-lapland
-lapp
-laps
-lapse
-lapsed
-lapsing
-lapwing
-laquais
-larded
-larder
-larding
-lards
-large
-largely
-largeness
-larger
-largess
-largest
-lark
-larks
-larron
-lartius
-larum
-larums
-las
-lascivious
-lash
-lass
-lasses
-last
-lasted
-lasting
-lastly
-lasts
-latch
-latches
-late
-lated
-lately
-later
-latest
-lath
-latin
-latten
-latter
-lattice
-laud
-laudable
-laudis
-laugh
-laughable
-laughed
-laugher
-laughest
-laughing
-laughs
-laughter
-launce
-launcelot
-launces
-launch
-laund
-laundress
-laundry
-laur
-laura
-laurel
-laurels
-laurence
-laus
-lavache
-lave
-lavee
-lavender
-lavina
-lavinia
-lavish
-lavishly
-lavolt
-lavoltas
-law
-lawful
-lawfully
-lawless
-lawlessly
-lawn
-lawns
-lawrence
-laws
-lawyer
-lawyers
-lay
-layer
-layest
-laying
-lays
-lazar
-lazars
-lazarus
-lazy
-lc
-ld
-ldst
-le
-lead
-leaden
-leader
-leaders
-leadest
-leading
-leads
-leaf
-leagu
-league
-leagued
-leaguer
-leagues
-leah
-leak
-leaky
-lean
-leander
-leaner
-leaning
-leanness
-leans
-leap
-leaped
-leaping
-leaps
-leapt
-lear
-learn
-learned
-learnedly
-learning
-learnings
-learns
-learnt
-leas
-lease
-leases
-leash
-leasing
-least
-leather
-leathern
-leav
-leave
-leaven
-leavening
-leaver
-leaves
-leaving
-leavy
-lecher
-lecherous
-lechers
-lechery
-lecon
-lecture
-lectures
-led
-leda
-leech
-leeches
-leek
-leeks
-leer
-leers
-lees
-leese
-leet
-leets
-left
-leg
-legacies
-legacy
-legate
-legatine
-lege
-legerity
-leges
-legg
-legion
-legions
-legitimate
-legitimation
-legs
-leicester
-leicestershire
-leiger
-leigers
-leisure
-leisurely
-leisures
-leman
-lemon
-lena
-lend
-lender
-lending
-lendings
-lends
-length
-lengthen
-lengthens
-lengths
-lenity
-lennox
-lent
-lenten
-lentus
-leo
-leon
-leonardo
-leonati
-leonato
-leonatus
-leontes
-leopard
-leopards
-leper
-leperous
-lepidus
-leprosy
-lequel
-lers
-les
-less
-lessen
-lessens
-lesser
-lesson
-lessoned
-lessons
-lest
-lestrake
-let
-lethargied
-lethargies
-lethargy
-lethe
-lets
-lett
-letter
-letters
-letting
-lettuce
-leur
-leve
-level
-levell
-levelled
-levels
-leven
-levers
-leviathan
-leviathans
-levied
-levies
-levity
-levy
-levying
-lewd
-lewdly
-lewdness
-lewdsters
-lewis
-liable
-liar
-liars
-libbard
-libelling
-libels
-liberal
-liberality
-liberte
-liberties
-libertine
-libertines
-liberty
-library
-libya
-licence
-licens
-license
-licentious
-lichas
-licio
-lick
-licked
-licker
-lictors
-lid
-lids
-lie
-lied
-lief
-liefest
-liege
-liegeman
-liegemen
-lien
-lies
-liest
-lieth
-lieu
-lieutenant
-lieutenantry
-lieutenants
-lieve
-life
-lifeblood
-lifeless
-lifelings
-lift
-lifted
-lifter
-lifteth
-lifting
-lifts
-lig
-ligarius
-liggens
-light
-lighted
-lighten
-lightens
-lighter
-lightest
-lightly
-lightness
-lightning
-lightnings
-lights
-lik
-like
-liked
-likeliest
-likelihood
-likelihoods
-likely
-likeness
-liker
-likes
-likest
-likewise
-liking
-likings
-lilies
-lily
-lim
-limander
-limb
-limbeck
-limbecks
-limber
-limbo
-limbs
-lime
-limed
-limehouse
-limekilns
-limit
-limitation
-limited
-limits
-limn
-limp
-limping
-limps
-lin
-lincoln
-lincolnshire
-line
-lineal
-lineally
-lineament
-lineaments
-lined
-linen
-linens
-lines
-ling
-lingare
-linger
-lingered
-lingers
-linguist
-lining
-link
-links
-linsey
-linstock
-linta
-lion
-lionel
-lioness
-lions
-lip
-lipp
-lips
-lipsbury
-liquid
-liquor
-liquorish
-liquors
-lirra
-lisbon
-lisp
-lisping
-list
-listen
-listening
-lists
-literatured
-lither
-litter
-little
-littlest
-liv
-live
-lived
-livelier
-livelihood
-livelong
-lively
-liver
-liveries
-livers
-livery
-lives
-livest
-liveth
-livia
-living
-livings
-lizard
-lizards
-ll
-lll
-llous
-lnd
-lo
-loa
-loach
-load
-loaden
-loading
-loads
-loaf
-loam
-loan
-loath
-loathe
-loathed
-loather
-loathes
-loathing
-loathly
-loathness
-loathsome
-loathsomeness
-loathsomest
-loaves
-lob
-lobbies
-lobby
-local
-lochaber
-lock
-locked
-locking
-lockram
-locks
-locusts
-lode
-lodg
-lodge
-lodged
-lodgers
-lodges
-lodging
-lodgings
-lodovico
-lodowick
-lofty
-log
-logger
-loggerhead
-loggerheads
-loggets
-logic
-logs
-loins
-loiter
-loiterer
-loiterers
-loitering
-lolling
-lolls
-lombardy
-london
-londoners
-lone
-loneliness
-lonely
-long
-longaville
-longboat
-longed
-longer
-longest
-longeth
-longing
-longings
-longly
-longs
-longtail
-loo
-loof
-look
-looked
-looker
-lookers
-lookest
-looking
-looks
-loon
-loop
-loos
-loose
-loosed
-loosely
-loosen
-loosing
-lop
-lopp
-loquitur
-lord
-lorded
-lording
-lordings
-lordliness
-lordly
-lords
-lordship
-lordships
-lorenzo
-lorn
-lorraine
-lorship
-los
-lose
-loser
-losers
-loses
-losest
-loseth
-losing
-loss
-losses
-lost
-lot
-lots
-lott
-lottery
-loud
-louder
-loudly
-lour
-loureth
-louring
-louse
-louses
-lousy
-lout
-louted
-louts
-louvre
-lov
-love
-loved
-lovedst
-lovel
-lovelier
-loveliness
-lovell
-lovely
-lover
-lovered
-lovers
-loves
-lovest
-loveth
-loving
-lovingly
-low
-lowe
-lower
-lowest
-lowing
-lowliness
-lowly
-lown
-lowness
-loyal
-loyally
-loyalties
-loyalty
-lozel
-lt
-lubber
-lubberly
-luc
-luccicos
-luce
-lucentio
-luces
-lucetta
-luciana
-lucianus
-lucifer
-lucifier
-lucilius
-lucina
-lucio
-lucius
-luck
-luckier
-luckiest
-luckily
-luckless
-lucky
-lucre
-lucrece
-lucretia
-lucullius
-lucullus
-lucy
-lud
-ludlow
-lug
-lugg
-luggage
-luke
-lukewarm
-lull
-lulla
-lullaby
-lulls
-lumbert
-lump
-lumpish
-luna
-lunacies
-lunacy
-lunatic
-lunatics
-lunes
-lungs
-lupercal
-lurch
-lure
-lurk
-lurketh
-lurking
-lurks
-luscious
-lush
-lust
-lusted
-luster
-lustful
-lustier
-lustiest
-lustig
-lustihood
-lustily
-lustre
-lustrous
-lusts
-lusty
-lute
-lutes
-lutestring
-lutheran
-luxurious
-luxuriously
-luxury
-ly
-lycaonia
-lycurguses
-lydia
-lye
-lyen
-lying
-lym
-lymoges
-lynn
-lysander
-m
-ma
-maan
-mab
-macbeth
-maccabaeus
-macdonwald
-macduff
-mace
-macedon
-maces
-machiavel
-machination
-machinations
-machine
-mack
-macmorris
-maculate
-maculation
-mad
-madam
-madame
-madams
-madcap
-madded
-madding
-made
-madeira
-madly
-madman
-madmen
-madness
-madonna
-madrigals
-mads
-maecenas
-maggot
-maggots
-magic
-magical
-magician
-magistrate
-magistrates
-magnanimity
-magnanimous
-magni
-magnifi
-magnificence
-magnificent
-magnifico
-magnificoes
-magnus
-mahomet
-mahu
-maid
-maiden
-maidenhead
-maidenheads
-maidenhood
-maidenhoods
-maidenliest
-maidenly
-maidens
-maidhood
-maids
-mail
-mailed
-mails
-maim
-maimed
-maims
-main
-maincourse
-maine
-mainly
-mainmast
-mains
-maintain
-maintained
-maintains
-maintenance
-mais
-maison
-majestas
-majestee
-majestic
-majestical
-majestically
-majesties
-majesty
-major
-majority
-mak
-make
-makeless
-maker
-makers
-makes
-makest
-maketh
-making
-makings
-mal
-mala
-maladies
-malady
-malapert
-malcolm
-malcontent
-malcontents
-male
-maledictions
-malefactions
-malefactor
-malefactors
-males
-malevolence
-malevolent
-malhecho
-malice
-malicious
-maliciously
-malign
-malignancy
-malignant
-malignantly
-malkin
-mall
-mallard
-mallet
-mallows
-malmsey
-malt
-maltworms
-malvolio
-mamillius
-mammering
-mammet
-mammets
-mammock
-man
-manacle
-manacles
-manage
-managed
-manager
-managing
-manakin
-manchus
-mandate
-mandragora
-mandrake
-mandrakes
-mane
-manent
-manes
-manet
-manfully
-mangle
-mangled
-mangles
-mangling
-mangy
-manhood
-manhoods
-manifest
-manifested
-manifests
-manifold
-manifoldly
-manka
-mankind
-manlike
-manly
-mann
-manna
-manner
-mannerly
-manners
-manningtree
-mannish
-manor
-manors
-mans
-mansion
-mansionry
-mansions
-manslaughter
-mantle
-mantled
-mantles
-mantua
-mantuan
-manual
-manure
-manured
-manus
-many
-map
-mapp
-maps
-mar
-marble
-marbled
-marcade
-marcellus
-march
-marches
-marcheth
-marching
-marchioness
-marchpane
-marcians
-marcius
-marcus
-mardian
-mare
-mares
-marg
-margarelon
-margaret
-marge
-margent
-margery
-maria
-marian
-mariana
-maries
-marigold
-mariner
-mariners
-maritime
-marjoram
-mark
-marked
-market
-marketable
-marketplace
-markets
-marking
-markman
-marks
-marl
-marle
-marmoset
-marquess
-marquis
-marr
-marriage
-marriages
-married
-marries
-marring
-marrow
-marrowless
-marrows
-marry
-marrying
-mars
-marseilles
-marsh
-marshal
-marshalsea
-marshalship
-mart
-marted
-martem
-martext
-martial
-martin
-martino
-martius
-martlemas
-martlet
-marts
-martyr
-martyrs
-marullus
-marv
-marvel
-marvell
-marvellous
-marvellously
-marvels
-mary
-mas
-masculine
-masham
-mask
-masked
-masker
-maskers
-masking
-masks
-mason
-masonry
-masons
-masque
-masquers
-masques
-masquing
-mass
-massacre
-massacres
-masses
-massy
-mast
-mastcr
-master
-masterdom
-masterest
-masterless
-masterly
-masterpiece
-masters
-mastership
-mastic
-mastiff
-mastiffs
-masts
-match
-matches
-matcheth
-matching
-matchless
-mate
-mated
-mater
-material
-mates
-mathematics
-matin
-matron
-matrons
-matter
-matters
-matthew
-mattock
-mattress
-mature
-maturity
-maud
-maudlin
-maugre
-maul
-maund
-mauri
-mauritania
-mauvais
-maw
-maws
-maxim
-may
-mayday
-mayest
-mayor
-maypole
-mayst
-maz
-maze
-mazed
-mazes
-mazzard
-me
-meacock
-mead
-meadow
-meadows
-meads
-meagre
-meal
-meals
-mealy
-mean
-meanders
-meaner
-meanest
-meaneth
-meaning
-meanings
-meanly
-means
-meant
-meantime
-meanwhile
-measles
-measur
-measurable
-measure
-measured
-measureless
-measures
-measuring
-meat
-meats
-mechanic
-mechanical
-mechanicals
-mechanics
-mechante
-med
-medal
-meddle
-meddler
-meddling
-mede
-medea
-media
-mediation
-mediators
-medice
-medicinal
-medicine
-medicines
-meditate
-meditates
-meditating
-meditation
-meditations
-mediterranean
-mediterraneum
-medlar
-medlars
-meed
-meeds
-meek
-meekly
-meekness
-meet
-meeter
-meetest
-meeting
-meetings
-meetly
-meetness
-meets
-meg
-mehercle
-meilleur
-meiny
-meisen
-melancholies
-melancholy
-melford
-mell
-mellifluous
-mellow
-mellowing
-melodious
-melody
-melt
-melted
-melteth
-melting
-melts
-melun
-member
-members
-memento
-memorable
-memorandums
-memorial
-memorials
-memories
-memoriz
-memorize
-memory
-memphis
-men
-menac
-menace
-menaces
-menaphon
-menas
-mend
-mended
-mender
-mending
-mends
-menecrates
-menelaus
-menenius
-mental
-menteith
-mention
-mentis
-menton
-mephostophilus
-mer
-mercatante
-mercatio
-mercenaries
-mercenary
-mercer
-merchandise
-merchandized
-merchant
-merchants
-mercies
-merciful
-mercifully
-merciless
-mercurial
-mercuries
-mercury
-mercutio
-mercy
-mere
-mered
-merely
-merest
-meridian
-merit
-merited
-meritorious
-merits
-merlin
-mermaid
-mermaids
-merops
-merrier
-merriest
-merrily
-merriman
-merriment
-merriments
-merriness
-merry
-mervailous
-mes
-mesh
-meshes
-mesopotamia
-mess
-message
-messages
-messala
-messaline
-messenger
-messengers
-messes
-messina
-met
-metal
-metals
-metamorphis
-metamorphoses
-metaphor
-metaphysical
-metaphysics
-mete
-metellus
-meteor
-meteors
-meteyard
-metheglin
-metheglins
-methink
-methinks
-method
-methods
-methought
-methoughts
-metre
-metres
-metropolis
-mette
-mettle
-mettled
-meus
-mew
-mewed
-mewling
-mexico
-mi
-mice
-michael
-michaelmas
-micher
-miching
-mickle
-microcosm
-mid
-midas
-middest
-middle
-middleham
-midnight
-midriff
-midst
-midsummer
-midway
-midwife
-midwives
-mienne
-might
-mightful
-mightier
-mightiest
-mightily
-mightiness
-mightst
-mighty
-milan
-milch
-mild
-milder
-mildest
-mildew
-mildews
-mildly
-mildness
-mile
-miles
-milford
-militarist
-military
-milk
-milking
-milkmaid
-milks
-milksops
-milky
-mill
-mille
-miller
-milliner
-million
-millioned
-millions
-mills
-millstones
-milo
-mimic
-minc
-mince
-minces
-mincing
-mind
-minded
-minding
-mindless
-minds
-mine
-mineral
-minerals
-minerva
-mines
-mingle
-mingled
-mingling
-minikin
-minim
-minime
-minimo
-minimus
-mining
-minion
-minions
-minist
-minister
-ministers
-ministration
-minnow
-minnows
-minola
-minority
-minos
-minotaurs
-minstrel
-minstrels
-minstrelsy
-mint
-mints
-minute
-minutely
-minutes
-minx
-mio
-mir
-mirable
-miracle
-miracles
-miraculous
-miranda
-mire
-mirror
-mirrors
-mirth
-mirthful
-miry
-mis
-misadventur
-misadventure
-misanthropos
-misapplied
-misbecame
-misbecom
-misbecome
-misbegot
-misbegotten
-misbeliever
-misbelieving
-misbhav
-miscall
-miscalled
-miscarried
-miscarries
-miscarry
-miscarrying
-mischance
-mischances
-mischief
-mischiefs
-mischievous
-misconceived
-misconst
-misconster
-misconstruction
-misconstrued
-misconstrues
-miscreant
-miscreate
-misdeed
-misdeeds
-misdemean
-misdemeanours
-misdoubt
-misdoubteth
-misdoubts
-misenum
-miser
-miserable
-miserably
-misericorde
-miseries
-misers
-misery
-misfortune
-misfortunes
-misgive
-misgives
-misgiving
-misgoverned
-misgovernment
-misgraffed
-misguide
-mishap
-mishaps
-misheard
-misinterpret
-mislead
-misleader
-misleaders
-misleading
-misled
-mislike
-misord
-misplac
-misplaced
-misplaces
-mispris
-misprised
-misprision
-misprizing
-misproud
-misquote
-misreport
-miss
-missed
-misses
-misshap
-misshapen
-missheathed
-missing
-missingly
-missions
-missive
-missives
-misspoke
-mist
-mista
-mistak
-mistake
-mistaken
-mistakes
-mistaketh
-mistaking
-mistakings
-mistemp
-mistempered
-misterm
-mistful
-misthink
-misthought
-mistletoe
-mistook
-mistreadings
-mistress
-mistresses
-mistresss
-mistriship
-mistrust
-mistrusted
-mistrustful
-mistrusting
-mists
-misty
-misus
-misuse
-misused
-misuses
-mites
-mithridates
-mitigate
-mitigation
-mix
-mixed
-mixture
-mixtures
-mm
-mnd
-moan
-moans
-moat
-moated
-mobled
-mock
-mockable
-mocker
-mockeries
-mockers
-mockery
-mocking
-mocks
-mockvater
-mockwater
-model
-modena
-moderate
-moderately
-moderation
-modern
-modest
-modesties
-modestly
-modesty
-modicums
-modo
-module
-moe
-moi
-moiety
-moist
-moisten
-moisture
-moldwarp
-mole
-molehill
-moles
-molest
-molestation
-mollification
-mollis
-molten
-molto
-mome
-moment
-momentary
-moming
-mon
-monachum
-monarch
-monarchies
-monarchize
-monarcho
-monarchs
-monarchy
-monast
-monastery
-monastic
-monday
-monde
-money
-moneys
-mong
-monger
-mongers
-monging
-mongrel
-mongrels
-mongst
-monk
-monkey
-monkeys
-monks
-monmouth
-monopoly
-mons
-monsieur
-monsieurs
-monster
-monsters
-monstrous
-monstrously
-monstrousness
-monstruosity
-montacute
-montage
-montague
-montagues
-montano
-montant
-montez
-montferrat
-montgomery
-month
-monthly
-months
-montjoy
-monument
-monumental
-monuments
-mood
-moods
-moody
-moon
-moonbeams
-moonish
-moonlight
-moons
-moonshine
-moonshines
-moor
-moorfields
-moors
-moorship
-mop
-mope
-moping
-mopping
-mopsa
-moral
-moraler
-morality
-moralize
-mordake
-more
-moreover
-mores
-morgan
-mori
-morisco
-morn
-morning
-mornings
-morocco
-morris
-morrow
-morrows
-morsel
-morsels
-mort
-mortal
-mortality
-mortally
-mortals
-mortar
-mortgaged
-mortified
-mortifying
-mortimer
-mortimers
-mortis
-mortise
-morton
-mose
-moss
-mossgrown
-most
-mote
-moth
-mother
-mothers
-moths
-motion
-motionless
-motions
-motive
-motives
-motley
-mots
-mought
-mould
-moulded
-mouldeth
-moulds
-mouldy
-moult
-moulten
-mounch
-mounseur
-mounsieur
-mount
-mountain
-mountaineer
-mountaineers
-mountainous
-mountains
-mountant
-mountanto
-mountebank
-mountebanks
-mounted
-mounteth
-mounting
-mounts
-mourn
-mourned
-mourner
-mourners
-mournful
-mournfully
-mourning
-mourningly
-mournings
-mourns
-mous
-mouse
-mousetrap
-mousing
-mouth
-mouthed
-mouths
-mov
-movables
-move
-moveable
-moveables
-moved
-mover
-movers
-moves
-moveth
-moving
-movingly
-movousus
-mow
-mowbray
-mower
-mowing
-mows
-moy
-moys
-moyses
-mrs
-much
-muck
-mud
-mudded
-muddied
-muddy
-muffins
-muffl
-muffle
-muffled
-muffler
-muffling
-mugger
-mugs
-mulberries
-mulberry
-mule
-mules
-muleteers
-mulier
-mulieres
-muliteus
-mull
-mulmutius
-multiplied
-multiply
-multiplying
-multipotent
-multitude
-multitudes
-multitudinous
-mum
-mumble
-mumbling
-mummers
-mummy
-mun
-munch
-muniments
-munition
-murd
-murder
-murdered
-murderer
-murderers
-murdering
-murderous
-murders
-mure
-murk
-murkiest
-murky
-murmur
-murmurers
-murmuring
-murrain
-murray
-murrion
-murther
-murtherer
-murtherers
-murthering
-murtherous
-murthers
-mus
-muscadel
-muscovites
-muscovits
-muscovy
-muse
-muses
-mush
-mushrooms
-music
-musical
-musician
-musicians
-musics
-musing
-musings
-musk
-musket
-muskets
-muskos
-muss
-mussel
-mussels
-must
-mustachio
-mustard
-mustardseed
-muster
-mustering
-musters
-musty
-mutability
-mutable
-mutation
-mutations
-mute
-mutes
-mutest
-mutine
-mutineer
-mutineers
-mutines
-mutinies
-mutinous
-mutiny
-mutius
-mutter
-muttered
-mutton
-muttons
-mutual
-mutualities
-mutually
-muzzl
-muzzle
-muzzled
-mv
-mww
-my
-mynheers
-myrmidon
-myrmidons
-myrtle
-myself
-myst
-mysteries
-mystery
-n
-nag
-nage
-nags
-naiads
-nail
-nails
-nak
-naked
-nakedness
-nal
-nam
-name
-named
-nameless
-namely
-names
-namest
-naming
-nan
-nance
-nap
-nape
-napes
-napkin
-napkins
-naples
-napless
-napping
-naps
-narbon
-narcissus
-narines
-narrow
-narrowly
-naso
-nasty
-nathaniel
-natifs
-nation
-nations
-native
-nativity
-natur
-natural
-naturalize
-naturally
-nature
-natured
-natures
-natus
-naught
-naughtily
-naughty
-navarre
-nave
-navel
-navigation
-navy
-nay
-nayward
-nayword
-nazarite
-ne
-neaf
-neamnoins
-neanmoins
-neapolitan
-neapolitans
-near
-nearer
-nearest
-nearly
-nearness
-neat
-neatly
-neb
-nebour
-nebuchadnezzar
-nec
-necessaries
-necessarily
-necessary
-necessitied
-necessities
-necessity
-neck
-necklace
-necks
-nectar
-ned
-nedar
-need
-needed
-needer
-needful
-needfull
-needing
-needle
-needles
-needless
-needly
-needs
-needy
-neer
-neeze
-nefas
-negation
-negative
-negatives
-neglect
-neglected
-neglecting
-neglectingly
-neglection
-negligence
-negligent
-negotiate
-negotiations
-negro
-neigh
-neighbors
-neighbour
-neighbourhood
-neighbouring
-neighbourly
-neighbours
-neighing
-neighs
-neither
-nell
-nemean
-nemesis
-neoptolemus
-nephew
-nephews
-neptune
-ner
-nereides
-nerissa
-nero
-neroes
-ners
-nerve
-nerves
-nervii
-nervy
-nessus
-nest
-nestor
-nests
-net
-nether
-netherlands
-nets
-nettle
-nettled
-nettles
-neuter
-neutral
-nev
-never
-nevil
-nevils
-new
-newborn
-newer
-newest
-newgate
-newly
-newness
-news
-newsmongers
-newt
-newts
-next
-nibbling
-nicanor
-nice
-nicely
-niceness
-nicer
-nicety
-nicholas
-nick
-nickname
-nicks
-niece
-nieces
-niggard
-niggarding
-niggardly
-nigh
-night
-nightcap
-nightcaps
-nighted
-nightgown
-nightingale
-nightingales
-nightly
-nightmare
-nights
-nightwork
-nihil
-nile
-nill
-nilus
-nimble
-nimbleness
-nimbler
-nimbly
-nine
-nineteen
-ning
-ningly
-ninny
-ninth
-ninus
-niobe
-niobes
-nip
-nipp
-nipping
-nipple
-nips
-nit
-nly
-nnight
-nnights
-no
-noah
-nob
-nobility
-nobis
-noble
-nobleman
-noblemen
-nobleness
-nobler
-nobles
-noblesse
-noblest
-nobly
-nobody
-noces
-nod
-nodded
-nodding
-noddle
-noddles
-noddy
-nods
-noes
-nointed
-nois
-noise
-noiseless
-noisemaker
-noises
-noisome
-nole
-nominate
-nominated
-nomination
-nominativo
-non
-nonage
-nonce
-none
-nonino
-nonny
-nonpareil
-nonsuits
-nony
-nook
-nooks
-noon
-noonday
-noontide
-nor
-norbery
-norfolk
-norman
-normandy
-normans
-north
-northampton
-northamptonshire
-northerly
-northern
-northgate
-northumberland
-northumberlands
-northward
-norway
-norways
-norwegian
-norweyan
-nos
-nose
-nosegays
-noseless
-noses
-noster
-nostra
-nostril
-nostrils
-not
-notable
-notably
-notary
-notch
-note
-notebook
-noted
-notedly
-notes
-notest
-noteworthy
-nothing
-nothings
-notice
-notify
-noting
-notion
-notorious
-notoriously
-notre
-notwithstanding
-nought
-noun
-nouns
-nourish
-nourished
-nourisher
-nourishes
-nourisheth
-nourishing
-nourishment
-nous
-novel
-novelties
-novelty
-noverbs
-novi
-novice
-novices
-novum
-now
-nowhere
-noyance
-ns
-nt
-nubibus
-numa
-numb
-number
-numbered
-numbering
-numberless
-numbers
-numbness
-nun
-nuncio
-nuncle
-nunnery
-nuns
-nuntius
-nuptial
-nurs
-nurse
-nursed
-nurser
-nursery
-nurses
-nurseth
-nursh
-nursing
-nurtur
-nurture
-nut
-nuthook
-nutmeg
-nutmegs
-nutriment
-nuts
-nutshell
-ny
-nym
-nymph
-nymphs
-o
-oak
-oaken
-oaks
-oared
-oars
-oatcake
-oaten
-oath
-oathable
-oaths
-oats
-ob
-obduracy
-obdurate
-obedience
-obedient
-obeisance
-oberon
-obey
-obeyed
-obeying
-obeys
-obidicut
-object
-objected
-objections
-objects
-oblation
-oblations
-obligation
-obligations
-obliged
-oblique
-oblivion
-oblivious
-obloquy
-obscene
-obscenely
-obscur
-obscure
-obscured
-obscurely
-obscures
-obscuring
-obscurity
-obsequies
-obsequious
-obsequiously
-observ
-observance
-observances
-observancy
-observant
-observants
-observation
-observe
-observed
-observer
-observers
-observing
-observingly
-obsque
-obstacle
-obstacles
-obstinacy
-obstinate
-obstinately
-obstruct
-obstruction
-obstructions
-obtain
-obtained
-obtaining
-occasion
-occasions
-occident
-occidental
-occulted
-occupat
-occupation
-occupations
-occupied
-occupies
-occupy
-occurrence
-occurrences
-occurrents
-ocean
-oceans
-octavia
-octavius
-ocular
-od
-odd
-oddest
-oddly
-odds
-ode
-odes
-odious
-odoriferous
-odorous
-odour
-odours
-ods
-oeillades
-oes
-oeuvres
-of
-ofephesus
-off
-offal
-offence
-offenceful
-offences
-offend
-offended
-offendendo
-offender
-offenders
-offendeth
-offending
-offendress
-offends
-offense
-offenseless
-offenses
-offensive
-offer
-offered
-offering
-offerings
-offers
-offert
-offic
-office
-officed
-officer
-officers
-offices
-official
-officious
-offspring
-oft
-often
-oftener
-oftentimes
-oh
-oil
-oils
-oily
-old
-oldcastle
-olden
-older
-oldest
-oldness
-olive
-oliver
-olivers
-olives
-olivia
-olympian
-olympus
-oman
-omans
-omen
-ominous
-omission
-omit
-omittance
-omitted
-omitting
-omne
-omnes
-omnipotent
-on
-once
-one
-ones
-oneyers
-ongles
-onion
-onions
-only
-onset
-onward
-onwards
-oo
-ooze
-oozes
-oozy
-op
-opal
-ope
-open
-opener
-opening
-openly
-openness
-opens
-operant
-operate
-operation
-operations
-operative
-opes
-oph
-ophelia
-opinion
-opinions
-opportune
-opportunities
-opportunity
-oppos
-oppose
-opposed
-opposeless
-opposer
-opposers
-opposes
-opposing
-opposite
-opposites
-opposition
-oppositions
-oppress
-oppressed
-oppresses
-oppresseth
-oppressing
-oppression
-oppressor
-opprest
-opprobriously
-oppugnancy
-opulency
-opulent
-or
-oracle
-oracles
-orange
-oration
-orator
-orators
-oratory
-orb
-orbed
-orbs
-orchard
-orchards
-ord
-ordain
-ordained
-ordaining
-order
-ordered
-ordering
-orderless
-orderly
-orders
-ordinance
-ordinant
-ordinaries
-ordinary
-ordnance
-ords
-ordure
-ore
-organ
-organs
-orgillous
-orient
-orifex
-origin
-original
-orisons
-ork
-orlando
-orld
-orleans
-ornament
-ornaments
-orodes
-orphan
-orphans
-orpheus
-orsino
-ort
-orthography
-orts
-oscorbidulchos
-osier
-osiers
-osprey
-osr
-osric
-ossa
-ost
-ostent
-ostentare
-ostentation
-ostents
-ostler
-ostlers
-ostrich
-osw
-oswald
-othello
-other
-othergates
-others
-otherwhere
-otherwhiles
-otherwise
-otter
-ottoman
-ottomites
-oublie
-ouches
-ought
-oui
-ounce
-ounces
-ouphes
-our
-ours
-ourself
-ourselves
-ousel
-out
-outbids
-outbrave
-outbraves
-outbreak
-outcast
-outcries
-outcry
-outdar
-outdare
-outdares
-outdone
-outfac
-outface
-outfaced
-outfacing
-outfly
-outfrown
-outgo
-outgoes
-outgrown
-outjest
-outlaw
-outlawry
-outlaws
-outliv
-outlive
-outlives
-outliving
-outlook
-outlustres
-outpriz
-outrage
-outrageous
-outrages
-outran
-outright
-outroar
-outrun
-outrunning
-outruns
-outscold
-outscorn
-outsell
-outsells
-outside
-outsides
-outspeaks
-outsport
-outstare
-outstay
-outstood
-outstretch
-outstretched
-outstrike
-outstrip
-outstripped
-outswear
-outvenoms
-outward
-outwardly
-outwards
-outwear
-outweighs
-outwent
-outworn
-outworths
-oven
-over
-overawe
-overbear
-overblown
-overboard
-overbold
-overborne
-overbulk
-overbuys
-overcame
-overcast
-overcharg
-overcharged
-overcome
-overcomes
-overdone
-overearnest
-overfar
-overflow
-overflown
-overglance
-overgo
-overgone
-overgorg
-overgrown
-overhead
-overhear
-overheard
-overhold
-overjoyed
-overkind
-overland
-overleather
-overlive
-overlook
-overlooking
-overlooks
-overmaster
-overmounting
-overmuch
-overpass
-overpeer
-overpeering
-overplus
-overrul
-overrun
-overscutch
-overset
-overshades
-overshine
-overshines
-overshot
-oversights
-overspread
-overstain
-overswear
-overt
-overta
-overtake
-overtaketh
-overthrow
-overthrown
-overthrows
-overtook
-overtopp
-overture
-overturn
-overwatch
-overween
-overweening
-overweigh
-overwhelm
-overwhelming
-overworn
-ovid
-ovidius
-ow
-owe
-owed
-owedst
-owen
-owes
-owest
-oweth
-owing
-owl
-owls
-own
-owner
-owners
-owning
-owns
-owy
-ox
-oxen
-oxford
-oxfordshire
-oxlips
-oyes
-oyster
-p
-pabble
-pabylon
-pac
-pace
-paced
-paces
-pacified
-pacify
-pacing
-pack
-packet
-packets
-packhorses
-packing
-packings
-packs
-packthread
-pacorus
-paction
-pad
-paddle
-paddling
-paddock
-padua
-pagan
-pagans
-page
-pageant
-pageants
-pages
-pah
-paid
-pail
-pailfuls
-pails
-pain
-pained
-painful
-painfully
-pains
-paint
-painted
-painter
-painting
-paintings
-paints
-pair
-paired
-pairs
-pajock
-pal
-palabras
-palace
-palaces
-palamedes
-palate
-palates
-palatine
-palating
-pale
-paled
-paleness
-paler
-pales
-palestine
-palfrey
-palfreys
-palisadoes
-pall
-pallabris
-pallas
-pallets
-palm
-palmer
-palmers
-palms
-palmy
-palpable
-palsied
-palsies
-palsy
-palt
-palter
-paltry
-paly
-pamp
-pamper
-pamphlets
-pan
-pancackes
-pancake
-pancakes
-pandar
-pandars
-pandarus
-pander
-panderly
-panders
-pandulph
-panel
-pang
-panging
-pangs
-pannier
-pannonians
-pansa
-pansies
-pant
-pantaloon
-panted
-pantheon
-panther
-panthino
-panting
-pantingly
-pantler
-pantry
-pants
-pap
-papal
-paper
-papers
-paphlagonia
-paphos
-papist
-paps
-par
-parable
-paracelsus
-paradise
-paradox
-paradoxes
-paragon
-paragons
-parallel
-parallels
-paramour
-paramours
-parapets
-paraquito
-parasite
-parasites
-parca
-parcel
-parcell
-parcels
-parch
-parched
-parching
-parchment
-pard
-pardon
-pardona
-pardoned
-pardoner
-pardoning
-pardonne
-pardonner
-pardonnez
-pardons
-pare
-pared
-parel
-parent
-parentage
-parents
-parfect
-paring
-parings
-paris
-parish
-parishioners
-parisians
-paritors
-park
-parks
-parle
-parler
-parles
-parley
-parlez
-parliament
-parlors
-parlour
-parlous
-parmacity
-parolles
-parricide
-parricides
-parrot
-parrots
-parsley
-parson
-part
-partake
-partaken
-partaker
-partakers
-parted
-parthia
-parthian
-parthians
-parti
-partial
-partialize
-partially
-participate
-participation
-particle
-particular
-particularities
-particularize
-particularly
-particulars
-parties
-parting
-partisan
-partisans
-partition
-partizan
-partlet
-partly
-partner
-partners
-partridge
-parts
-party
-pas
-pash
-pashed
-pashful
-pass
-passable
-passado
-passage
-passages
-passant
-passed
-passenger
-passengers
-passes
-passeth
-passing
-passio
-passion
-passionate
-passioning
-passions
-passive
-passport
-passy
-past
-paste
-pasterns
-pasties
-pastime
-pastimes
-pastoral
-pastorals
-pastors
-pastry
-pasture
-pastures
-pasty
-pat
-patay
-patch
-patchery
-patches
-pate
-pated
-patent
-patents
-paternal
-pates
-path
-pathetical
-paths
-pathway
-pathways
-patience
-patient
-patiently
-patients
-patines
-patrician
-patricians
-patrick
-patrimony
-patroclus
-patron
-patronage
-patroness
-patrons
-patrum
-patter
-pattern
-patterns
-pattle
-pauca
-paucas
-paul
-paulina
-paunch
-paunches
-pause
-pauser
-pauses
-pausingly
-pauvres
-pav
-paved
-pavement
-pavilion
-pavilions
-pavin
-paw
-pawn
-pawns
-paws
-pax
-pay
-payest
-paying
-payment
-payments
-pays
-paysan
-paysans
-pe
-peace
-peaceable
-peaceably
-peaceful
-peacemakers
-peaces
-peach
-peaches
-peacock
-peacocks
-peak
-peaking
-peal
-peals
-pear
-peard
-pearl
-pearls
-pears
-peas
-peasant
-peasantry
-peasants
-peascod
-pease
-peaseblossom
-peat
-peaten
-peating
-pebble
-pebbled
-pebbles
-peck
-pecks
-peculiar
-pecus
-pedant
-pedantical
-pedascule
-pede
-pedestal
-pedigree
-pedlar
-pedlars
-pedro
-peds
-peel
-peep
-peeped
-peeping
-peeps
-peer
-peereth
-peering
-peerless
-peers
-peesel
-peevish
-peevishly
-peflur
-peg
-pegasus
-pegs
-peise
-peised
-peize
-pelf
-pelican
-pelion
-pell
-pella
-pelleted
-peloponnesus
-pelt
-pelting
-pembroke
-pen
-penalties
-penalty
-penance
-pence
-pencil
-pencill
-pencils
-pendant
-pendent
-pendragon
-pendulous
-penelope
-penetrable
-penetrate
-penetrative
-penitence
-penitent
-penitential
-penitently
-penitents
-penker
-penknife
-penn
-penned
-penning
-pennons
-penny
-pennyworth
-pennyworths
-pens
-pense
-pension
-pensioners
-pensive
-pensived
-pensively
-pent
-pentecost
-penthesilea
-penthouse
-penurious
-penury
-peopl
-people
-peopled
-peoples
-pepin
-pepper
-peppercorn
-peppered
-per
-peradventure
-peradventures
-perceiv
-perceive
-perceived
-perceives
-perceiveth
-perch
-perchance
-percies
-percussion
-percy
-perdie
-perdita
-perdition
-perdonato
-perdu
-perdurable
-perdurably
-perdy
-pere
-peregrinate
-peremptorily
-peremptory
-perfect
-perfected
-perfecter
-perfectest
-perfection
-perfections
-perfectly
-perfectness
-perfidious
-perfidiously
-perforce
-perform
-performance
-performances
-performed
-performer
-performers
-performing
-performs
-perfum
-perfume
-perfumed
-perfumer
-perfumes
-perge
-perhaps
-periapts
-perigort
-perigouna
-peril
-perilous
-perils
-period
-periods
-perish
-perished
-perishest
-perisheth
-perishing
-periwig
-perjur
-perjure
-perjured
-perjuries
-perjury
-perk
-perkes
-permafoy
-permanent
-permission
-permissive
-permit
-permitted
-pernicious
-perniciously
-peroration
-perpend
-perpendicular
-perpendicularly
-perpetual
-perpetually
-perpetuity
-perplex
-perplexed
-perplexity
-pers
-persecuted
-persecutions
-persecutor
-perseus
-persever
-perseverance
-persevers
-persia
-persian
-persist
-persisted
-persistency
-persistive
-persists
-person
-personae
-personage
-personages
-personal
-personally
-personate
-personated
-personates
-personating
-persons
-perspective
-perspectively
-perspectives
-perspicuous
-persuade
-persuaded
-persuades
-persuading
-persuasion
-persuasions
-pert
-pertain
-pertaining
-pertains
-pertaunt
-pertinent
-pertly
-perturb
-perturbation
-perturbations
-perturbed
-perus
-perusal
-peruse
-perused
-perusing
-perverse
-perversely
-perverseness
-pervert
-perverted
-peseech
-pest
-pester
-pestiferous
-pestilence
-pestilent
-pet
-petar
-peter
-petit
-petition
-petitionary
-petitioner
-petitioners
-petitions
-peto
-petrarch
-petruchio
-petter
-petticoat
-petticoats
-pettiness
-pettish
-pettitoes
-petty
-peu
-pew
-pewter
-pewterer
-phaethon
-phaeton
-phantasime
-phantasimes
-phantasma
-pharamond
-pharaoh
-pharsalia
-pheasant
-pheazar
-phebe
-phebes
-pheebus
-pheeze
-phibbus
-philadelphos
-philario
-philarmonus
-philemon
-philip
-philippan
-philippe
-philippi
-phillida
-philo
-philomel
-philomela
-philosopher
-philosophers
-philosophical
-philosophy
-philostrate
-philotus
-phlegmatic
-phoebe
-phoebus
-phoenicia
-phoenicians
-phoenix
-phorbus
-photinus
-phrase
-phraseless
-phrases
-phrygia
-phrygian
-phrynia
-physic
-physical
-physician
-physicians
-physics
-pia
-pibble
-pible
-picardy
-pick
-pickaxe
-pickaxes
-pickbone
-picked
-pickers
-picking
-pickle
-picklock
-pickpurse
-picks
-pickt
-pickthanks
-pictur
-picture
-pictured
-pictures
-pid
-pie
-piec
-piece
-pieces
-piecing
-pied
-piedness
-pier
-pierc
-pierce
-pierced
-pierces
-pierceth
-piercing
-piercy
-piers
-pies
-piety
-pig
-pigeon
-pigeons
-pight
-pigmy
-pigrogromitus
-pike
-pikes
-pil
-pilate
-pilates
-pilchers
-pile
-piles
-pilf
-pilfering
-pilgrim
-pilgrimage
-pilgrims
-pill
-pillage
-pillagers
-pillar
-pillars
-pillicock
-pillory
-pillow
-pillows
-pills
-pilot
-pilots
-pimpernell
-pin
-pinch
-pinched
-pinches
-pinching
-pindarus
-pine
-pined
-pines
-pinfold
-pining
-pinion
-pink
-pinn
-pinnace
-pins
-pinse
-pint
-pintpot
-pioned
-pioneers
-pioner
-pioners
-pious
-pip
-pipe
-piper
-pipers
-pipes
-piping
-pippin
-pippins
-pirate
-pirates
-pisa
-pisanio
-pish
-pismires
-piss
-pissing
-pistol
-pistols
-pit
-pitch
-pitched
-pitcher
-pitchers
-pitchy
-piteous
-piteously
-pitfall
-pith
-pithless
-pithy
-pitie
-pitied
-pities
-pitiful
-pitifully
-pitiless
-pits
-pittance
-pittie
-pittikins
-pity
-pitying
-pius
-plac
-place
-placed
-placentio
-places
-placeth
-placid
-placing
-plack
-placket
-plackets
-plagu
-plague
-plagued
-plagues
-plaguing
-plaguy
-plain
-plainer
-plainest
-plaining
-plainings
-plainly
-plainness
-plains
-plainsong
-plaintful
-plaintiff
-plaintiffs
-plaints
-planched
-planet
-planetary
-planets
-planks
-plant
-plantage
-plantagenet
-plantagenets
-plantain
-plantation
-planted
-planteth
-plants
-plash
-plashy
-plast
-plaster
-plasterer
-plat
-plate
-plated
-plates
-platform
-platforms
-plats
-platted
-plausible
-plausive
-plautus
-play
-played
-player
-players
-playeth
-playfellow
-playfellows
-playhouse
-playing
-plays
-plea
-pleach
-pleached
-plead
-pleaded
-pleader
-pleaders
-pleading
-pleads
-pleas
-pleasance
-pleasant
-pleasantly
-please
-pleased
-pleaser
-pleasers
-pleases
-pleasest
-pleaseth
-pleasing
-pleasure
-pleasures
-plebeians
-plebeii
-plebs
-pledge
-pledges
-pleines
-plenitude
-plenteous
-plenteously
-plenties
-plentiful
-plentifully
-plenty
-pless
-plessed
-plessing
-pliant
-plied
-plies
-plight
-plighted
-plighter
-plod
-plodded
-plodders
-plodding
-plods
-plood
-ploody
-plot
-plots
-plotted
-plotter
-plough
-ploughed
-ploughman
-ploughmen
-plow
-plows
-pluck
-plucked
-plucker
-plucking
-plucks
-plue
-plum
-plume
-plumed
-plumes
-plummet
-plump
-plumpy
-plums
-plung
-plunge
-plunged
-plural
-plurisy
-plus
-pluto
-plutus
-ply
-po
-pocket
-pocketing
-pockets
-pocky
-pody
-poem
-poesy
-poet
-poetical
-poetry
-poets
-poictiers
-poinards
-poins
-point
-pointblank
-pointed
-pointing
-points
-pois
-poise
-poising
-poison
-poisoned
-poisoner
-poisoning
-poisonous
-poisons
-poke
-poking
-pol
-polack
-polacks
-poland
-pold
-pole
-poleaxe
-polecat
-polecats
-polemon
-poles
-poli
-policies
-policy
-polish
-polished
-politic
-politician
-politicians
-politicly
-polixenes
-poll
-polluted
-pollution
-polonius
-poltroons
-polusion
-polydamus
-polydore
-polyxena
-pomander
-pomegranate
-pomewater
-pomfret
-pomgarnet
-pommel
-pomp
-pompeius
-pompey
-pompion
-pompous
-pomps
-pond
-ponder
-ponderous
-ponds
-poniard
-poniards
-pont
-pontic
-pontifical
-ponton
-pooh
-pool
-poole
-poop
-poor
-poorer
-poorest
-poorly
-pop
-pope
-popedom
-popilius
-popingay
-popish
-popp
-poppy
-pops
-popular
-popularity
-populous
-porch
-porches
-pore
-poring
-pork
-porn
-porpentine
-porridge
-porringer
-port
-portable
-portage
-portal
-portance
-portcullis
-portend
-portends
-portent
-portentous
-portents
-porter
-porters
-portia
-portion
-portly
-portotartarossa
-portrait
-portraiture
-ports
-portugal
-pose
-posied
-posies
-position
-positive
-positively
-posse
-possess
-possessed
-possesses
-possesseth
-possessing
-possession
-possessions
-possessor
-posset
-possets
-possibilities
-possibility
-possible
-possibly
-possitable
-post
-poste
-posted
-posterior
-posteriors
-posterity
-postern
-posterns
-posters
-posthorse
-posthorses
-posthumus
-posting
-postmaster
-posts
-postscript
-posture
-postures
-posy
-pot
-potable
-potations
-potato
-potatoes
-potch
-potency
-potent
-potentates
-potential
-potently
-potents
-pothecary
-pother
-potion
-potions
-potpan
-pots
-potter
-potting
-pottle
-pouch
-poulter
-poultice
-poultney
-pouncet
-pound
-pounds
-pour
-pourest
-pouring
-pourquoi
-pours
-pout
-poverty
-pow
-powd
-powder
-power
-powerful
-powerfully
-powerless
-powers
-pox
-poys
-poysam
-prabbles
-practic
-practice
-practiced
-practicer
-practices
-practicing
-practis
-practisants
-practise
-practiser
-practisers
-practises
-practising
-praeclarissimus
-praemunire
-praetor
-praetors
-pragging
-prague
-prain
-prains
-prais
-praise
-praised
-praises
-praisest
-praiseworthy
-praising
-prancing
-prank
-pranks
-prat
-prate
-prated
-prater
-prating
-prattle
-prattler
-prattling
-prave
-prawls
-prawns
-pray
-prayer
-prayers
-praying
-prays
-pre
-preach
-preached
-preachers
-preaches
-preaching
-preachment
-pread
-preambulate
-precedence
-precedent
-preceding
-precept
-preceptial
-precepts
-precinct
-precious
-preciously
-precipice
-precipitating
-precipitation
-precise
-precisely
-preciseness
-precisian
-precor
-precurse
-precursors
-predeceased
-predecessor
-predecessors
-predestinate
-predicament
-predict
-prediction
-predictions
-predominance
-predominant
-predominate
-preeches
-preeminence
-preface
-prefer
-preferment
-preferments
-preferr
-preferreth
-preferring
-prefers
-prefiguring
-prefix
-prefixed
-preformed
-pregnancy
-pregnant
-pregnantly
-prejudicates
-prejudice
-prejudicial
-prelate
-premeditated
-premeditation
-premised
-premises
-prenez
-prenominate
-prentice
-prentices
-preordinance
-prepar
-preparation
-preparations
-prepare
-prepared
-preparedly
-prepares
-preparing
-prepost
-preposterous
-preposterously
-prerogatifes
-prerogative
-prerogatived
-presage
-presagers
-presages
-presageth
-presaging
-prescience
-prescribe
-prescript
-prescription
-prescriptions
-prescripts
-presence
-presences
-present
-presentation
-presented
-presenter
-presenters
-presenteth
-presenting
-presently
-presentment
-presents
-preserv
-preservation
-preservative
-preserve
-preserved
-preserver
-preservers
-preserving
-president
-press
-pressed
-presser
-presses
-pressing
-pressure
-pressures
-prest
-prester
-presume
-presumes
-presuming
-presumption
-presumptuous
-presuppos
-pret
-pretence
-pretences
-pretend
-pretended
-pretending
-pretense
-pretext
-pretia
-prettier
-prettiest
-prettily
-prettiness
-pretty
-prevail
-prevailed
-prevaileth
-prevailing
-prevailment
-prevails
-prevent
-prevented
-prevention
-preventions
-prevents
-prey
-preyful
-preys
-priam
-priami
-priamus
-pribbles
-price
-prick
-pricked
-pricket
-pricking
-pricks
-pricksong
-pride
-prides
-pridge
-prie
-pried
-prief
-pries
-priest
-priesthood
-priests
-prig
-primal
-prime
-primer
-primero
-primest
-primitive
-primo
-primogenity
-primrose
-primroses
-primy
-prince
-princely
-princes
-princess
-principal
-principalities
-principality
-principle
-principles
-princox
-prings
-print
-printed
-printing
-printless
-prints
-prioress
-priories
-priority
-priory
-priscian
-prison
-prisoner
-prisoners
-prisonment
-prisonnier
-prisons
-pristine
-prithe
-prithee
-privacy
-private
-privately
-privates
-privilage
-privileg
-privilege
-privileged
-privileges
-privilegio
-privily
-privity
-privy
-priz
-prize
-prized
-prizer
-prizes
-prizest
-prizing
-pro
-probable
-probal
-probation
-proceed
-proceeded
-proceeders
-proceeding
-proceedings
-proceeds
-process
-procession
-proclaim
-proclaimed
-proclaimeth
-proclaims
-proclamation
-proclamations
-proconsul
-procrastinate
-procreant
-procreants
-procreation
-procrus
-proculeius
-procur
-procurator
-procure
-procured
-procures
-procuring
-prodigal
-prodigality
-prodigally
-prodigals
-prodigies
-prodigious
-prodigiously
-prodigy
-proditor
-produc
-produce
-produced
-produces
-producing
-proface
-profan
-profanation
-profane
-profaned
-profanely
-profaneness
-profaners
-profaning
-profess
-professed
-professes
-profession
-professions
-professors
-proffer
-proffered
-profferer
-proffers
-proficient
-profit
-profitable
-profitably
-profited
-profiting
-profitless
-profits
-profound
-profoundest
-profoundly
-progenitors
-progeny
-progne
-prognosticate
-prognostication
-progress
-progression
-prohibit
-prohibition
-project
-projection
-projects
-prolixious
-prolixity
-prologue
-prologues
-prolong
-prolongs
-promethean
-prometheus
-promis
-promise
-promised
-promises
-promiseth
-promising
-promontory
-promotion
-promotions
-prompt
-prompted
-promptement
-prompter
-prompting
-prompts
-prompture
-promulgate
-prone
-prononcer
-prononcez
-pronoun
-pronounc
-pronounce
-pronounced
-pronouncing
-pronouns
-proof
-proofs
-prop
-propagate
-propagation
-propend
-propension
-proper
-properer
-properly
-propertied
-properties
-property
-prophecies
-prophecy
-prophesied
-prophesier
-prophesy
-prophesying
-prophet
-prophetess
-prophetic
-prophetically
-prophets
-propinquity
-propontic
-proportion
-proportionable
-proportions
-propos
-propose
-proposed
-proposer
-proposes
-proposing
-proposition
-propositions
-propounded
-propp
-propre
-propriety
-props
-propugnation
-prorogue
-prorogued
-proscription
-proscriptions
-prose
-prosecute
-prosecution
-proselytes
-proserpina
-prosp
-prospect
-prosper
-prosperity
-prospero
-prosperous
-prosperously
-prospers
-prostitute
-prostrate
-protect
-protected
-protection
-protector
-protectors
-protectorship
-protectress
-protects
-protest
-protestation
-protestations
-protested
-protester
-protesting
-protests
-proteus
-protheus
-protract
-protractive
-proud
-prouder
-proudest
-proudlier
-proudly
-prouds
-prov
-provand
-prove
-proved
-provender
-proverb
-proverbs
-proves
-proveth
-provide
-provided
-providence
-provident
-providently
-provider
-provides
-province
-provinces
-provincial
-proving
-provision
-proviso
-provocation
-provok
-provoke
-provoked
-provoker
-provokes
-provoketh
-provoking
-provost
-prowess
-prudence
-prudent
-prun
-prune
-prunes
-pruning
-pry
-prying
-psalm
-psalmist
-psalms
-psalteries
-ptolemies
-ptolemy
-public
-publican
-publication
-publicly
-publicola
-publish
-published
-publisher
-publishing
-publius
-pucelle
-puck
-pudder
-pudding
-puddings
-puddle
-puddled
-pudency
-pueritia
-puff
-puffing
-puffs
-pugging
-puis
-puissance
-puissant
-puke
-puking
-pulcher
-puling
-pull
-puller
-pullet
-pulling
-pulls
-pulpit
-pulpiter
-pulpits
-pulse
-pulsidge
-pump
-pumpion
-pumps
-pun
-punched
-punish
-punished
-punishes
-punishment
-punishments
-punk
-punto
-puny
-pupil
-pupils
-puppet
-puppets
-puppies
-puppy
-pur
-purblind
-purchas
-purchase
-purchased
-purchases
-purchaseth
-purchasing
-pure
-purely
-purer
-purest
-purg
-purgation
-purgative
-purgatory
-purge
-purged
-purgers
-purging
-purifies
-purifying
-puritan
-purity
-purlieus
-purple
-purpled
-purples
-purport
-purpos
-purpose
-purposed
-purposely
-purposes
-purposeth
-purposing
-purr
-purs
-purse
-pursents
-purses
-pursu
-pursue
-pursued
-pursuers
-pursues
-pursuest
-pursueth
-pursuing
-pursuit
-pursuivant
-pursuivants
-pursy
-purus
-purveyor
-push
-pushes
-pusillanimity
-put
-putrefy
-putrified
-puts
-putter
-putting
-puttock
-puzzel
-puzzle
-puzzled
-puzzles
-py
-pygmalion
-pygmies
-pygmy
-pyramid
-pyramides
-pyramids
-pyramis
-pyramises
-pyramus
-pyrenean
-pyrrhus
-pythagoras
-qu
-quadrangle
-quae
-quaff
-quaffing
-quagmire
-quail
-quailing
-quails
-quaint
-quaintly
-quak
-quake
-quakes
-qualification
-qualified
-qualifies
-qualify
-qualifying
-qualite
-qualities
-quality
-qualm
-qualmish
-quam
-quand
-quando
-quantities
-quantity
-quare
-quarrel
-quarrell
-quarreller
-quarrelling
-quarrelous
-quarrels
-quarrelsome
-quarries
-quarry
-quart
-quarter
-quartered
-quartering
-quarters
-quarts
-quasi
-quat
-quatch
-quay
-que
-quean
-queas
-queasiness
-queasy
-queen
-queens
-quell
-queller
-quench
-quenched
-quenching
-quenchless
-quern
-quest
-questant
-question
-questionable
-questioned
-questioning
-questionless
-questions
-questrists
-quests
-queubus
-qui
-quick
-quicken
-quickens
-quicker
-quicklier
-quickly
-quickness
-quicksand
-quicksands
-quicksilverr
-quid
-quiddities
-quiddits
-quier
-quiet
-quieter
-quietly
-quietness
-quietus
-quill
-quillets
-quills
-quilt
-quinapalus
-quince
-quinces
-quintain
-quintessence
-quintus
-quip
-quips
-quire
-quiring
-quirk
-quirks
-quis
-quit
-quite
-quits
-quittance
-quitted
-quitting
-quiver
-quivering
-quivers
-quo
-quod
-quoifs
-quoint
-quoit
-quoits
-quondam
-quoniam
-quote
-quoted
-quotes
-quoth
-quotidian
-r
-rabbit
-rabble
-rabblement
-race
-rack
-rackers
-racket
-rackets
-racking
-racks
-radiance
-radiant
-radish
-rafe
-raft
-rag
-rage
-rages
-rageth
-ragg
-ragged
-raggedness
-raging
-ragozine
-rags
-rah
-rail
-railed
-railer
-railest
-raileth
-railing
-rails
-raiment
-rain
-rainbow
-raineth
-raining
-rainold
-rains
-rainy
-rais
-raise
-raised
-raises
-raising
-raisins
-rak
-rake
-rakers
-rakes
-ral
-rald
-ralph
-ram
-rambures
-ramm
-rampallian
-rampant
-ramping
-rampir
-ramps
-rams
-ramsey
-ramston
-ran
-rance
-rancorous
-rancors
-rancour
-random
-rang
-range
-ranged
-rangers
-ranges
-ranging
-rank
-ranker
-rankest
-ranking
-rankle
-rankly
-rankness
-ranks
-ransack
-ransacking
-ransom
-ransomed
-ransoming
-ransomless
-ransoms
-rant
-ranting
-rap
-rape
-rapes
-rapier
-rapiers
-rapine
-raps
-rapt
-rapture
-raptures
-rar
-rare
-rarely
-rareness
-rarer
-rarest
-rarities
-rarity
-rascal
-rascalliest
-rascally
-rascals
-rased
-rash
-rasher
-rashly
-rashness
-rat
-ratcatcher
-ratcliff
-rate
-rated
-rately
-rates
-rather
-ratherest
-ratified
-ratifiers
-ratify
-rating
-rational
-ratolorum
-rats
-ratsbane
-rattle
-rattles
-rattling
-rature
-raught
-rav
-rave
-ravel
-raven
-ravening
-ravenous
-ravens
-ravenspurgh
-raves
-ravin
-raving
-ravish
-ravished
-ravisher
-ravishing
-ravishments
-raw
-rawer
-rawly
-rawness
-ray
-rayed
-rays
-raz
-raze
-razed
-razes
-razeth
-razing
-razor
-razorable
-razors
-razure
-re
-reach
-reaches
-reacheth
-reaching
-read
-reader
-readiest
-readily
-readiness
-reading
-readins
-reads
-ready
-real
-really
-realm
-realms
-reap
-reapers
-reaping
-reaps
-rear
-rears
-rearward
-reason
-reasonable
-reasonably
-reasoned
-reasoning
-reasonless
-reasons
-reave
-rebate
-rebato
-rebeck
-rebel
-rebell
-rebelling
-rebellion
-rebellious
-rebels
-rebound
-rebuk
-rebuke
-rebukeable
-rebuked
-rebukes
-rebus
-recall
-recant
-recantation
-recanter
-recanting
-receipt
-receipts
-receiv
-receive
-received
-receiver
-receives
-receivest
-receiveth
-receiving
-receptacle
-rechate
-reciprocal
-reciprocally
-recite
-recited
-reciterai
-reck
-recking
-reckless
-reckon
-reckoned
-reckoning
-reckonings
-recks
-reclaim
-reclaims
-reclusive
-recognizance
-recognizances
-recoil
-recoiling
-recollected
-recomforted
-recomforture
-recommend
-recommended
-recommends
-recompens
-recompense
-reconcil
-reconcile
-reconciled
-reconcilement
-reconciler
-reconciles
-reconciliation
-record
-recordation
-recorded
-recorder
-recorders
-records
-recount
-recounted
-recounting
-recountments
-recounts
-recourse
-recov
-recover
-recoverable
-recovered
-recoveries
-recovers
-recovery
-recreant
-recreants
-recreate
-recreation
-rectify
-rector
-rectorship
-recure
-recured
-red
-redbreast
-redder
-reddest
-rede
-redeem
-redeemed
-redeemer
-redeeming
-redeems
-redeliver
-redemption
-redime
-redness
-redoubled
-redoubted
-redound
-redress
-redressed
-redresses
-reduce
-reechy
-reed
-reeds
-reek
-reeking
-reeks
-reeky
-reel
-reeleth
-reeling
-reels
-refell
-refer
-reference
-referr
-referred
-refigured
-refin
-refined
-reflect
-reflecting
-reflection
-reflex
-reform
-reformation
-reformed
-refractory
-refrain
-refresh
-refreshing
-reft
-refts
-refuge
-refus
-refusal
-refuse
-refused
-refusest
-refusing
-reg
-regal
-regalia
-regan
-regard
-regardance
-regarded
-regardfully
-regarding
-regards
-regenerate
-regent
-regentship
-regia
-regiment
-regiments
-regina
-region
-regions
-regist
-register
-registers
-regreet
-regreets
-regress
-reguerdon
-regular
-rehears
-rehearsal
-rehearse
-reign
-reigned
-reignier
-reigning
-reigns
-rein
-reinforc
-reinforce
-reinforcement
-reins
-reiterate
-reject
-rejected
-rejoic
-rejoice
-rejoices
-rejoiceth
-rejoicing
-rejoicingly
-rejoindure
-rejourn
-rel
-relapse
-relate
-relates
-relation
-relations
-relative
-releas
-release
-released
-releasing
-relent
-relenting
-relents
-reliances
-relics
-relief
-reliev
-relieve
-relieved
-relieves
-relieving
-religion
-religions
-religious
-religiously
-relinquish
-reliques
-reliquit
-relish
-relume
-rely
-relying
-remain
-remainder
-remainders
-remained
-remaineth
-remaining
-remains
-remark
-remarkable
-remediate
-remedied
-remedies
-remedy
-rememb
-remember
-remembered
-remembers
-remembrance
-remembrancer
-remembrances
-remercimens
-remiss
-remission
-remissness
-remit
-remnant
-remnants
-remonstrance
-remorse
-remorseful
-remorseless
-remote
-remotion
-remov
-remove
-removed
-removedness
-remover
-removes
-removing
-remunerate
-remuneration
-rence
-rend
-render
-rendered
-renders
-rendezvous
-renegado
-renege
-reneges
-renew
-renewed
-renewest
-renounce
-renouncement
-renouncing
-renowmed
-renown
-renowned
-rent
-rents
-repaid
-repair
-repaired
-repairing
-repairs
-repass
-repast
-repasture
-repay
-repaying
-repays
-repeal
-repealing
-repeals
-repeat
-repeated
-repeating
-repeats
-repel
-repent
-repentance
-repentant
-repented
-repenting
-repents
-repetition
-repetitions
-repin
-repine
-repining
-replant
-replenish
-replenished
-replete
-replication
-replied
-replies
-repliest
-reply
-replying
-report
-reported
-reporter
-reportest
-reporting
-reportingly
-reports
-reposal
-repose
-reposeth
-reposing
-repossess
-reprehend
-reprehended
-reprehending
-represent
-representing
-reprieve
-reprieves
-reprisal
-reproach
-reproaches
-reproachful
-reproachfully
-reprobate
-reprobation
-reproof
-reprov
-reprove
-reproveable
-reproves
-reproving
-repugn
-repugnancy
-repugnant
-repulse
-repulsed
-repurchas
-repured
-reputation
-repute
-reputed
-reputeless
-reputes
-reputing
-request
-requested
-requesting
-requests
-requiem
-requir
-require
-required
-requires
-requireth
-requiring
-requisite
-requisites
-requit
-requital
-requite
-requited
-requites
-rer
-rere
-rers
-rescu
-rescue
-rescued
-rescues
-rescuing
-resemblance
-resemble
-resembled
-resembles
-resembleth
-resembling
-reserv
-reservation
-reserve
-reserved
-reserves
-reside
-residence
-resident
-resides
-residing
-residue
-resign
-resignation
-resist
-resistance
-resisted
-resisting
-resists
-resolute
-resolutely
-resolutes
-resolution
-resolv
-resolve
-resolved
-resolvedly
-resolves
-resolveth
-resort
-resorted
-resounding
-resounds
-respeaking
-respect
-respected
-respecting
-respective
-respectively
-respects
-respice
-respite
-respites
-responsive
-respose
-ress
-rest
-rested
-resteth
-restful
-resting
-restitution
-restless
-restor
-restoration
-restorative
-restore
-restored
-restores
-restoring
-restrain
-restrained
-restraining
-restrains
-restraint
-rests
-resty
-resum
-resume
-resumes
-resurrections
-retail
-retails
-retain
-retainers
-retaining
-retell
-retention
-retentive
-retinue
-retir
-retire
-retired
-retirement
-retires
-retiring
-retold
-retort
-retorts
-retourne
-retract
-retreat
-retrograde
-rets
-return
-returned
-returnest
-returneth
-returning
-returns
-revania
-reveal
-reveals
-revel
-reveler
-revell
-reveller
-revellers
-revelling
-revelry
-revels
-reveng
-revenge
-revenged
-revengeful
-revengement
-revenger
-revengers
-revenges
-revenging
-revengingly
-revenue
-revenues
-reverb
-reverberate
-reverbs
-reverenc
-reverence
-reverend
-reverent
-reverently
-revers
-reverse
-reversion
-reverted
-review
-reviewest
-revil
-revile
-revisits
-reviv
-revive
-revives
-reviving
-revok
-revoke
-revokement
-revolt
-revolted
-revolting
-revolts
-revolution
-revolutions
-revolve
-revolving
-reward
-rewarded
-rewarder
-rewarding
-rewards
-reword
-reworded
-rex
-rey
-reynaldo
-rford
-rful
-rfull
-rhapsody
-rheims
-rhenish
-rhesus
-rhetoric
-rheum
-rheumatic
-rheums
-rheumy
-rhinoceros
-rhodes
-rhodope
-rhubarb
-rhym
-rhyme
-rhymers
-rhymes
-rhyming
-rialto
-rib
-ribald
-riband
-ribands
-ribaudred
-ribb
-ribbed
-ribbon
-ribbons
-ribs
-rice
-rich
-richard
-richer
-riches
-richest
-richly
-richmond
-richmonds
-rid
-riddance
-ridden
-riddle
-riddles
-riddling
-ride
-rider
-riders
-rides
-ridest
-rideth
-ridge
-ridges
-ridiculous
-riding
-rids
-rien
-ries
-rifle
-rift
-rifted
-rig
-rigg
-riggish
-right
-righteous
-righteously
-rightful
-rightfully
-rightly
-rights
-rigol
-rigorous
-rigorously
-rigour
-ril
-rim
-rin
-rinaldo
-rind
-ring
-ringing
-ringleader
-ringlets
-rings
-ringwood
-riot
-rioter
-rioting
-riotous
-riots
-rip
-ripe
-ripely
-ripen
-ripened
-ripeness
-ripening
-ripens
-riper
-ripest
-riping
-ripp
-ripping
-rise
-risen
-rises
-riseth
-rish
-rising
-rite
-rites
-rivage
-rival
-rivality
-rivall
-rivals
-rive
-rived
-rivelled
-river
-rivers
-rivet
-riveted
-rivets
-rivo
-rj
-rless
-road
-roads
-roam
-roaming
-roan
-roar
-roared
-roarers
-roaring
-roars
-roast
-roasted
-rob
-roba
-robas
-robb
-robbed
-robber
-robbers
-robbery
-robbing
-robe
-robed
-robert
-robes
-robin
-robs
-robustious
-rochester
-rochford
-rock
-rocks
-rocky
-rod
-rode
-roderigo
-rods
-roe
-roes
-roger
-rogero
-rogue
-roguery
-rogues
-roguish
-roi
-roisting
-roll
-rolled
-rolling
-rolls
-rom
-romage
-roman
-romano
-romanos
-romans
-rome
-romeo
-romish
-rondure
-ronyon
-rood
-roof
-roofs
-rook
-rooks
-rooky
-room
-rooms
-root
-rooted
-rootedly
-rooteth
-rooting
-roots
-rope
-ropery
-ropes
-roping
-ros
-rosalind
-rosalinda
-rosalinde
-rosaline
-roscius
-rose
-rosed
-rosemary
-rosencrantz
-roses
-ross
-rosy
-rot
-rote
-roted
-rother
-rotherham
-rots
-rotted
-rotten
-rottenness
-rotting
-rotundity
-rouen
-rough
-rougher
-roughest
-roughly
-roughness
-round
-rounded
-roundel
-rounder
-roundest
-rounding
-roundly
-rounds
-roundure
-rous
-rouse
-roused
-rousillon
-rously
-roussi
-rout
-routed
-routs
-rove
-rover
-row
-rowel
-rowland
-rowlands
-roy
-royal
-royalize
-royally
-royalties
-royalty
-roynish
-rs
-rt
-rub
-rubb
-rubbing
-rubbish
-rubies
-rubious
-rubs
-ruby
-rud
-rudand
-rudder
-ruddiness
-ruddock
-ruddy
-rude
-rudely
-rudeness
-ruder
-rudesby
-rudest
-rudiments
-rue
-rued
-ruff
-ruffian
-ruffians
-ruffle
-ruffling
-ruffs
-rug
-rugby
-rugemount
-rugged
-ruin
-ruinate
-ruined
-ruining
-ruinous
-ruins
-rul
-rule
-ruled
-ruler
-rulers
-rules
-ruling
-rumble
-ruminaies
-ruminat
-ruminate
-ruminated
-ruminates
-rumination
-rumor
-rumour
-rumourer
-rumours
-rump
-run
-runagate
-runagates
-runaway
-runaways
-rung
-runn
-runner
-runners
-running
-runs
-rupture
-ruptures
-rural
-rush
-rushes
-rushing
-rushling
-rushy
-russet
-russia
-russian
-russians
-rust
-rusted
-rustic
-rustically
-rustics
-rustle
-rustling
-rusts
-rusty
-rut
-ruth
-ruthful
-ruthless
-rutland
-ruttish
-ry
-rye
-rything
-s
-sa
-saba
-sabbath
-sable
-sables
-sack
-sackbuts
-sackcloth
-sacked
-sackerson
-sacks
-sacrament
-sacred
-sacrific
-sacrifice
-sacrificers
-sacrifices
-sacrificial
-sacrificing
-sacrilegious
-sacring
-sad
-sadder
-saddest
-saddle
-saddler
-saddles
-sadly
-sadness
-saf
-safe
-safeguard
-safely
-safer
-safest
-safeties
-safety
-saffron
-sag
-sage
-sagittary
-said
-saidst
-sail
-sailing
-sailmaker
-sailor
-sailors
-sails
-sain
-saint
-sainted
-saintlike
-saints
-saith
-sake
-sakes
-sala
-salad
-salamander
-salary
-sale
-salerio
-salicam
-salique
-salisbury
-sall
-sallet
-sallets
-sallies
-sallow
-sally
-salmon
-salmons
-salt
-salter
-saltiers
-saltness
-saltpetre
-salutation
-salutations
-salute
-saluted
-salutes
-saluteth
-salv
-salvation
-salve
-salving
-same
-samingo
-samp
-sampire
-sample
-sampler
-sampson
-samson
-samsons
-sancta
-sanctified
-sanctifies
-sanctify
-sanctimonies
-sanctimonious
-sanctimony
-sanctities
-sanctity
-sanctuarize
-sanctuary
-sand
-sandal
-sandbag
-sanded
-sands
-sandy
-sandys
-sang
-sanguine
-sanguis
-sanity
-sans
-santrailles
-sap
-sapient
-sapit
-sapless
-sapling
-sapphire
-sapphires
-saracens
-sarcenet
-sard
-sardians
-sardinia
-sardis
-sarum
-sat
-satan
-satchel
-sate
-sated
-satiate
-satiety
-satin
-satire
-satirical
-satis
-satisfaction
-satisfied
-satisfies
-satisfy
-satisfying
-saturday
-saturdays
-saturn
-saturnine
-saturninus
-satyr
-satyrs
-sauc
-sauce
-sauced
-saucers
-sauces
-saucily
-sauciness
-saucy
-sauf
-saunder
-sav
-savage
-savagely
-savageness
-savagery
-savages
-save
-saved
-saves
-saving
-saviour
-savory
-savour
-savouring
-savours
-savoury
-savoy
-saw
-sawed
-sawest
-sawn
-sawpit
-saws
-sawyer
-saxons
-saxony
-saxton
-say
-sayest
-saying
-sayings
-says
-sayst
-sblood
-sc
-scab
-scabbard
-scabs
-scaffold
-scaffoldage
-scal
-scald
-scalded
-scalding
-scale
-scaled
-scales
-scaling
-scall
-scalp
-scalps
-scaly
-scamble
-scambling
-scamels
-scan
-scandal
-scandaliz
-scandalous
-scandy
-scann
-scant
-scanted
-scanter
-scanting
-scantling
-scants
-scap
-scape
-scaped
-scapes
-scapeth
-scar
-scarce
-scarcely
-scarcity
-scare
-scarecrow
-scarecrows
-scarf
-scarfed
-scarfs
-scaring
-scarlet
-scarr
-scarre
-scars
-scarus
-scath
-scathe
-scathful
-scatt
-scatter
-scattered
-scattering
-scatters
-scelera
-scelerisque
-scene
-scenes
-scent
-scented
-scept
-scepter
-sceptre
-sceptred
-sceptres
-schedule
-schedules
-scholar
-scholarly
-scholars
-school
-schoolboy
-schoolboys
-schoolfellows
-schooling
-schoolmaster
-schoolmasters
-schools
-sciatica
-sciaticas
-science
-sciences
-scimitar
-scion
-scions
-scissors
-scoff
-scoffer
-scoffing
-scoffs
-scoggin
-scold
-scolding
-scolds
-sconce
-scone
-scope
-scopes
-scorch
-scorched
-score
-scored
-scores
-scoring
-scorn
-scorned
-scornful
-scornfully
-scorning
-scorns
-scorpion
-scorpions
-scot
-scotch
-scotches
-scotland
-scots
-scottish
-scoundrels
-scour
-scoured
-scourg
-scourge
-scouring
-scout
-scouts
-scowl
-scrap
-scrape
-scraping
-scraps
-scratch
-scratches
-scratching
-scream
-screams
-screech
-screeching
-screen
-screens
-screw
-screws
-scribbl
-scribbled
-scribe
-scribes
-scrimers
-scrip
-scrippage
-scripture
-scriptures
-scrivener
-scroll
-scrolls
-scroop
-scrowl
-scroyles
-scrubbed
-scruple
-scruples
-scrupulous
-scuffles
-scuffling
-scullion
-sculls
-scum
-scurril
-scurrility
-scurrilous
-scurvy
-scuse
-scut
-scutcheon
-scutcheons
-scylla
-scythe
-scythed
-scythia
-scythian
-sdeath
-se
-sea
-seacoal
-seafaring
-seal
-sealed
-sealing
-seals
-seam
-seamen
-seamy
-seaport
-sear
-searce
-search
-searchers
-searches
-searcheth
-searching
-seared
-seas
-seasick
-seaside
-season
-seasoned
-seasons
-seat
-seated
-seats
-sebastian
-second
-secondarily
-secondary
-seconded
-seconds
-secrecy
-secret
-secretaries
-secretary
-secretly
-secrets
-sect
-sectary
-sects
-secundo
-secure
-securely
-securing
-security
-sedg
-sedge
-sedges
-sedgy
-sedition
-seditious
-seduc
-seduce
-seduced
-seducer
-seducing
-see
-seed
-seeded
-seedness
-seeds
-seedsman
-seein
-seeing
-seek
-seeking
-seeks
-seel
-seeling
-seely
-seem
-seemed
-seemers
-seemest
-seemeth
-seeming
-seemingly
-seemly
-seems
-seen
-seer
-sees
-seese
-seest
-seethe
-seethes
-seething
-seeting
-segregation
-seigneur
-seigneurs
-seiz
-seize
-seized
-seizes
-seizeth
-seizing
-seizure
-seld
-seldom
-select
-seleucus
-self
-selfsame
-sell
-seller
-selling
-sells
-selves
-semblable
-semblably
-semblance
-semblances
-semblative
-semi
-semicircle
-semiramis
-semper
-sempronius
-senate
-senator
-senators
-send
-sender
-sendeth
-sending
-sends
-seneca
-senior
-seniory
-senis
-sennet
-senoys
-sense
-senseless
-senses
-sensible
-sensibly
-sensual
-sensuality
-sent
-sentenc
-sentence
-sentences
-sententious
-sentinel
-sentinels
-separable
-separate
-separated
-separates
-separation
-septentrion
-sepulchre
-sepulchres
-sepulchring
-sequel
-sequence
-sequent
-sequest
-sequester
-sequestration
-sere
-serenis
-serge
-sergeant
-serious
-seriously
-sermon
-sermons
-serpent
-serpentine
-serpents
-serpigo
-serv
-servant
-servanted
-servants
-serve
-served
-server
-serves
-serveth
-service
-serviceable
-services
-servile
-servility
-servilius
-serving
-servingman
-servingmen
-serviteur
-servitor
-servitors
-servitude
-sessa
-session
-sessions
-sestos
-set
-setebos
-sets
-setter
-setting
-settle
-settled
-settlest
-settling
-sev
-seven
-sevenfold
-sevennight
-seventeen
-seventh
-seventy
-sever
-several
-severally
-severals
-severe
-severed
-severely
-severest
-severing
-severity
-severn
-severs
-sew
-seward
-sewer
-sewing
-sex
-sexes
-sexton
-sextus
-seymour
-seyton
-sfoot
-sh
-shackle
-shackles
-shade
-shades
-shadow
-shadowed
-shadowing
-shadows
-shadowy
-shady
-shafalus
-shaft
-shafts
-shag
-shak
-shake
-shaked
-shaken
-shakes
-shaking
-shales
-shall
-shallenge
-shallow
-shallowest
-shallowly
-shallows
-shalt
-sham
-shambles
-shame
-shamed
-shameful
-shamefully
-shameless
-shames
-shamest
-shaming
-shank
-shanks
-shap
-shape
-shaped
-shapeless
-shapen
-shapes
-shaping
-shar
-shard
-sharded
-shards
-share
-shared
-sharers
-shares
-sharing
-shark
-sharp
-sharpen
-sharpened
-sharpens
-sharper
-sharpest
-sharply
-sharpness
-sharps
-shatter
-shav
-shave
-shaven
-shaw
-she
-sheaf
-sheal
-shear
-shearers
-shearing
-shearman
-shears
-sheath
-sheathe
-sheathed
-sheathes
-sheathing
-sheaved
-sheaves
-shed
-shedding
-sheds
-sheen
-sheep
-sheepcote
-sheepcotes
-sheeps
-sheepskins
-sheer
-sheet
-sheeted
-sheets
-sheffield
-shelf
-shell
-shells
-shelt
-shelter
-shelters
-shelves
-shelving
-shelvy
-shent
-shepherd
-shepherdes
-shepherdess
-shepherdesses
-shepherds
-sher
-sheriff
-sherris
-shes
-sheweth
-shield
-shielded
-shields
-shift
-shifted
-shifting
-shifts
-shilling
-shillings
-shin
-shine
-shines
-shineth
-shining
-shins
-shiny
-ship
-shipboard
-shipman
-shipmaster
-shipmen
-shipp
-shipped
-shipping
-ships
-shipt
-shipwreck
-shipwrecking
-shipwright
-shipwrights
-shire
-shirley
-shirt
-shirts
-shive
-shiver
-shivering
-shivers
-shoal
-shoals
-shock
-shocks
-shod
-shoe
-shoeing
-shoemaker
-shoes
-shog
-shone
-shook
-shoon
-shoot
-shooter
-shootie
-shooting
-shoots
-shop
-shops
-shore
-shores
-shorn
-short
-shortcake
-shorten
-shortened
-shortens
-shorter
-shortly
-shortness
-shot
-shotten
-shoughs
-should
-shoulder
-shouldering
-shoulders
-shouldst
-shout
-shouted
-shouting
-shouts
-shov
-shove
-shovel
-shovels
-show
-showed
-shower
-showers
-showest
-showing
-shown
-shows
-shreds
-shrew
-shrewd
-shrewdly
-shrewdness
-shrewish
-shrewishly
-shrewishness
-shrews
-shrewsbury
-shriek
-shrieking
-shrieks
-shrieve
-shrift
-shrill
-shriller
-shrills
-shrilly
-shrimp
-shrine
-shrink
-shrinking
-shrinks
-shriv
-shrive
-shriver
-shrives
-shriving
-shroud
-shrouded
-shrouding
-shrouds
-shrove
-shrow
-shrows
-shrub
-shrubs
-shrug
-shrugs
-shrunk
-shudd
-shudders
-shuffl
-shuffle
-shuffled
-shuffling
-shun
-shunless
-shunn
-shunned
-shunning
-shuns
-shut
-shuts
-shuttle
-shy
-shylock
-si
-sibyl
-sibylla
-sibyls
-sicil
-sicilia
-sicilian
-sicilius
-sicils
-sicily
-sicinius
-sick
-sicken
-sickens
-sicker
-sickle
-sicklemen
-sicklied
-sickliness
-sickly
-sickness
-sicles
-sicyon
-side
-sided
-sides
-siege
-sieges
-sienna
-sies
-sieve
-sift
-sifted
-sigeia
-sigh
-sighed
-sighing
-sighs
-sight
-sighted
-sightless
-sightly
-sights
-sign
-signal
-signet
-signieur
-significant
-significants
-signified
-signifies
-signify
-signifying
-signior
-signiories
-signiors
-signiory
-signor
-signories
-signs
-signum
-silenc
-silence
-silenced
-silencing
-silent
-silently
-silius
-silk
-silken
-silkman
-silks
-silliest
-silliness
-silling
-silly
-silva
-silver
-silvered
-silverly
-silvia
-silvius
-sima
-simile
-similes
-simois
-simon
-simony
-simp
-simpcox
-simple
-simpleness
-simpler
-simples
-simplicity
-simply
-simular
-simulation
-sin
-since
-sincere
-sincerely
-sincerity
-sinel
-sinew
-sinewed
-sinews
-sinewy
-sinful
-sinfully
-sing
-singe
-singeing
-singer
-singes
-singeth
-singing
-single
-singled
-singleness
-singly
-sings
-singular
-singulariter
-singularities
-singularity
-singuled
-sinister
-sink
-sinking
-sinks
-sinn
-sinner
-sinners
-sinning
-sinon
-sins
-sip
-sipping
-sir
-sire
-siren
-sirrah
-sirs
-sist
-sister
-sisterhood
-sisterly
-sisters
-sit
-sith
-sithence
-sits
-sitting
-situate
-situation
-situations
-siward
-six
-sixpence
-sixpences
-sixpenny
-sixteen
-sixth
-sixty
-siz
-size
-sizes
-sizzle
-skains
-skamble
-skein
-skelter
-skies
-skilful
-skilfully
-skill
-skilless
-skillet
-skillful
-skills
-skim
-skimble
-skin
-skinker
-skinny
-skins
-skip
-skipp
-skipper
-skipping
-skirmish
-skirmishes
-skirr
-skirted
-skirts
-skittish
-skulking
-skull
-skulls
-sky
-skyey
-skyish
-slab
-slack
-slackly
-slackness
-slain
-slake
-sland
-slander
-slandered
-slanderer
-slanderers
-slandering
-slanderous
-slanders
-slash
-slaught
-slaughter
-slaughtered
-slaughterer
-slaughterman
-slaughtermen
-slaughterous
-slaughters
-slave
-slaver
-slavery
-slaves
-slavish
-slay
-slayeth
-slaying
-slays
-sleave
-sledded
-sleek
-sleekly
-sleep
-sleeper
-sleepers
-sleepest
-sleeping
-sleeps
-sleepy
-sleeve
-sleeves
-sleid
-sleided
-sleight
-sleights
-slender
-slenderer
-slenderly
-slept
-slew
-slewest
-slice
-slid
-slide
-slides
-sliding
-slight
-slighted
-slightest
-slightly
-slightness
-slights
-slily
-slime
-slimy
-slings
-slink
-slip
-slipp
-slipper
-slippers
-slippery
-slips
-slish
-slit
-sliver
-slobb
-slomber
-slop
-slope
-slops
-sloth
-slothful
-slough
-slovenly
-slovenry
-slow
-slower
-slowly
-slowness
-slubber
-slug
-sluggard
-sluggardiz
-sluggish
-sluic
-slumb
-slumber
-slumbers
-slumbery
-slunk
-slut
-sluts
-sluttery
-sluttish
-sluttishness
-sly
-slys
-smack
-smacking
-smacks
-small
-smaller
-smallest
-smallness
-smalus
-smart
-smarting
-smartly
-smatch
-smatter
-smear
-smell
-smelling
-smells
-smelt
-smil
-smile
-smiled
-smiles
-smilest
-smilets
-smiling
-smilingly
-smirch
-smirched
-smit
-smite
-smites
-smith
-smithfield
-smock
-smocks
-smok
-smoke
-smoked
-smokes
-smoking
-smoky
-smooth
-smoothed
-smoothing
-smoothly
-smoothness
-smooths
-smote
-smoth
-smother
-smothered
-smothering
-smug
-smulkin
-smutch
-snaffle
-snail
-snails
-snake
-snakes
-snaky
-snap
-snapp
-snapper
-snar
-snare
-snares
-snarl
-snarleth
-snarling
-snatch
-snatchers
-snatches
-snatching
-sneak
-sneaking
-sneap
-sneaping
-sneck
-snip
-snipe
-snipt
-snore
-snores
-snoring
-snorting
-snout
-snow
-snowballs
-snowed
-snowy
-snuff
-snuffs
-snug
-so
-soak
-soaking
-soaks
-soar
-soaring
-soars
-sob
-sobbing
-sober
-soberly
-sobriety
-sobs
-sociable
-societies
-society
-socks
-socrates
-sod
-sodden
-soe
-soever
-soft
-soften
-softens
-softer
-softest
-softly
-softness
-soil
-soiled
-soilure
-soit
-sojourn
-sol
-sola
-solace
-solanio
-sold
-soldat
-solder
-soldest
-soldier
-soldiers
-soldiership
-sole
-solely
-solem
-solemn
-solemness
-solemnities
-solemnity
-solemniz
-solemnize
-solemnized
-solemnly
-soles
-solicit
-solicitation
-solicited
-soliciting
-solicitings
-solicitor
-solicits
-solid
-solidares
-solidity
-solinus
-solitary
-solomon
-solon
-solum
-solus
-solyman
-some
-somebody
-someone
-somerset
-somerville
-something
-sometime
-sometimes
-somever
-somewhat
-somewhere
-somewhither
-somme
-son
-sonance
-song
-songs
-sonnet
-sonneting
-sonnets
-sons
-sont
-sonties
-soon
-sooner
-soonest
-sooth
-soothe
-soothers
-soothing
-soothsay
-soothsayer
-sooty
-sop
-sophister
-sophisticated
-sophy
-sops
-sorcerer
-sorcerers
-sorceress
-sorceries
-sorcery
-sore
-sorel
-sorely
-sorer
-sores
-sorrier
-sorriest
-sorrow
-sorrowed
-sorrowest
-sorrowful
-sorrowing
-sorrows
-sorry
-sort
-sortance
-sorted
-sorting
-sorts
-sossius
-sot
-soto
-sots
-sottish
-soud
-sought
-soul
-sould
-soulless
-souls
-sound
-sounded
-sounder
-soundest
-sounding
-soundless
-soundly
-soundness
-soundpost
-sounds
-sour
-source
-sources
-sourest
-sourly
-sours
-sous
-souse
-south
-southam
-southampton
-southerly
-southern
-southward
-southwark
-southwell
-souviendrai
-sov
-sovereign
-sovereignest
-sovereignly
-sovereignty
-sovereignvours
-sow
-sowing
-sowl
-sowter
-space
-spaces
-spacious
-spade
-spades
-spain
-spak
-spake
-spakest
-span
-spangle
-spangled
-spaniard
-spaniel
-spaniels
-spanish
-spann
-spans
-spar
-spare
-spares
-sparing
-sparingly
-spark
-sparkle
-sparkles
-sparkling
-sparks
-sparrow
-sparrows
-sparta
-spartan
-spavin
-spavins
-spawn
-speak
-speaker
-speakers
-speakest
-speaketh
-speaking
-speaks
-spear
-speargrass
-spears
-special
-specialities
-specially
-specialties
-specialty
-specify
-speciously
-spectacle
-spectacled
-spectacles
-spectators
-spectatorship
-speculation
-speculations
-speculative
-sped
-speech
-speeches
-speechless
-speed
-speeded
-speedier
-speediest
-speedily
-speediness
-speeding
-speeds
-speedy
-speens
-spell
-spelling
-spells
-spelt
-spencer
-spend
-spendest
-spending
-spends
-spendthrift
-spent
-sperato
-sperm
-spero
-sperr
-spher
-sphere
-sphered
-spheres
-spherical
-sphery
-sphinx
-spice
-spiced
-spicery
-spices
-spider
-spiders
-spied
-spies
-spieth
-spightfully
-spigot
-spill
-spilling
-spills
-spilt
-spilth
-spin
-spinii
-spinners
-spinster
-spinsters
-spire
-spirit
-spirited
-spiritless
-spirits
-spiritual
-spiritualty
-spirt
-spit
-spital
-spite
-spited
-spiteful
-spites
-spits
-spitted
-spitting
-splay
-spleen
-spleenful
-spleens
-spleeny
-splendour
-splenitive
-splinter
-splinters
-split
-splits
-splitted
-splitting
-spoil
-spoils
-spok
-spoke
-spoken
-spokes
-spokesman
-sponge
-spongy
-spoon
-spoons
-sport
-sportful
-sporting
-sportive
-sports
-spot
-spotless
-spots
-spotted
-spousal
-spouse
-spout
-spouting
-spouts
-sprag
-sprang
-sprat
-sprawl
-spray
-sprays
-spread
-spreading
-spreads
-sprighted
-sprightful
-sprightly
-sprigs
-spring
-springe
-springes
-springeth
-springhalt
-springing
-springs
-springtime
-sprinkle
-sprinkles
-sprite
-sprited
-spritely
-sprites
-spriting
-sprout
-spruce
-sprung
-spun
-spur
-spurio
-spurn
-spurns
-spurr
-spurrer
-spurring
-spurs
-spy
-spying
-squabble
-squadron
-squadrons
-squand
-squar
-square
-squarer
-squares
-squash
-squeak
-squeaking
-squeal
-squealing
-squeezes
-squeezing
-squele
-squier
-squints
-squiny
-squire
-squires
-squirrel
-st
-stab
-stabb
-stabbed
-stabbing
-stable
-stableness
-stables
-stablish
-stablishment
-stabs
-stacks
-staff
-stafford
-staffords
-staffordshire
-stag
-stage
-stages
-stagger
-staggering
-staggers
-stags
-staid
-staider
-stain
-stained
-staines
-staineth
-staining
-stainless
-stains
-stair
-stairs
-stake
-stakes
-stale
-staled
-stalk
-stalking
-stalks
-stall
-stalling
-stalls
-stamford
-stammer
-stamp
-stamped
-stamps
-stanch
-stanchless
-stand
-standard
-standards
-stander
-standers
-standest
-standeth
-standing
-stands
-staniel
-stanley
-stanze
-stanzo
-stanzos
-staple
-staples
-star
-stare
-stared
-stares
-staring
-starings
-stark
-starkly
-starlight
-starling
-starr
-starry
-stars
-start
-started
-starting
-startingly
-startle
-startles
-starts
-starv
-starve
-starved
-starvelackey
-starveling
-starveth
-starving
-state
-statelier
-stately
-states
-statesman
-statesmen
-statilius
-station
-statist
-statists
-statue
-statues
-stature
-statures
-statute
-statutes
-stave
-staves
-stay
-stayed
-stayest
-staying
-stays
-stead
-steaded
-steadfast
-steadier
-steads
-steal
-stealer
-stealers
-stealing
-steals
-stealth
-stealthy
-steed
-steeds
-steel
-steeled
-steely
-steep
-steeped
-steeple
-steeples
-steeps
-steepy
-steer
-steerage
-steering
-steers
-stelled
-stem
-stemming
-stench
-step
-stepdame
-stephano
-stephen
-stepmothers
-stepp
-stepping
-steps
-sterile
-sterility
-sterling
-stern
-sternage
-sterner
-sternest
-sternness
-steterat
-stew
-steward
-stewards
-stewardship
-stewed
-stews
-stick
-sticking
-stickler
-sticks
-stiff
-stiffen
-stiffly
-stifle
-stifled
-stifles
-stigmatic
-stigmatical
-stile
-still
-stiller
-stillest
-stillness
-stilly
-sting
-stinging
-stingless
-stings
-stink
-stinking
-stinkingly
-stinks
-stint
-stinted
-stints
-stir
-stirr
-stirred
-stirrer
-stirrers
-stirreth
-stirring
-stirrup
-stirrups
-stirs
-stitchery
-stitches
-stithied
-stithy
-stoccadoes
-stoccata
-stock
-stockfish
-stocking
-stockings
-stockish
-stocks
-stog
-stogs
-stoics
-stokesly
-stol
-stole
-stolen
-stolest
-stomach
-stomachers
-stomaching
-stomachs
-ston
-stone
-stonecutter
-stones
-stonish
-stony
-stood
-stool
-stools
-stoop
-stooping
-stoops
-stop
-stope
-stopp
-stopped
-stopping
-stops
-stor
-store
-storehouse
-storehouses
-stores
-stories
-storm
-stormed
-storming
-storms
-stormy
-story
-stoup
-stoups
-stout
-stouter
-stoutly
-stoutness
-stover
-stow
-stowage
-stowed
-strachy
-stragglers
-straggling
-straight
-straightest
-straightway
-strain
-strained
-straining
-strains
-strait
-straited
-straiter
-straitly
-straitness
-straits
-strand
-strange
-strangely
-strangeness
-stranger
-strangers
-strangest
-strangle
-strangled
-strangler
-strangles
-strangling
-strappado
-straps
-stratagem
-stratagems
-stratford
-strato
-straw
-strawberries
-strawberry
-straws
-strawy
-stray
-straying
-strays
-streak
-streaks
-stream
-streamers
-streaming
-streams
-streching
-street
-streets
-strength
-strengthen
-strengthened
-strengthless
-strengths
-stretch
-stretched
-stretches
-stretching
-strew
-strewing
-strewings
-strewments
-stricken
-strict
-stricter
-strictest
-strictly
-stricture
-stride
-strides
-striding
-strife
-strifes
-strik
-strike
-strikers
-strikes
-strikest
-striking
-string
-stringless
-strings
-strip
-stripes
-stripling
-striplings
-stripp
-stripping
-striv
-strive
-strives
-striving
-strok
-stroke
-strokes
-strond
-stronds
-strong
-stronger
-strongest
-strongly
-strooke
-strossers
-strove
-strown
-stroy
-struck
-strucken
-struggle
-struggles
-struggling
-strumpet
-strumpeted
-strumpets
-strung
-strut
-struts
-strutted
-strutting
-stubble
-stubborn
-stubbornest
-stubbornly
-stubbornness
-stuck
-studded
-student
-students
-studied
-studies
-studious
-studiously
-studs
-study
-studying
-stuff
-stuffing
-stuffs
-stumble
-stumbled
-stumblest
-stumbling
-stump
-stumps
-stung
-stupefy
-stupid
-stupified
-stuprum
-sturdy
-sty
-styga
-stygian
-styl
-style
-styx
-su
-sub
-subcontracted
-subdu
-subdue
-subdued
-subduements
-subdues
-subduing
-subject
-subjected
-subjection
-subjects
-submerg
-submission
-submissive
-submit
-submits
-submitting
-suborn
-subornation
-suborned
-subscrib
-subscribe
-subscribed
-subscribes
-subscription
-subsequent
-subsidies
-subsidy
-subsist
-subsisting
-substance
-substances
-substantial
-substitute
-substituted
-substitutes
-substitution
-subtile
-subtilly
-subtle
-subtleties
-subtlety
-subtly
-subtractors
-suburbs
-subversion
-subverts
-succedant
-succeed
-succeeded
-succeeders
-succeeding
-succeeds
-success
-successantly
-successes
-successful
-successfully
-succession
-successive
-successively
-successor
-successors
-succour
-succours
-such
-suck
-sucker
-suckers
-sucking
-suckle
-sucks
-sudden
-suddenly
-sue
-sued
-suerly
-sues
-sueth
-suff
-suffer
-sufferance
-sufferances
-suffered
-suffering
-suffers
-suffic
-suffice
-sufficed
-suffices
-sufficeth
-sufficiency
-sufficient
-sufficiently
-sufficing
-sufficit
-suffigance
-suffocate
-suffocating
-suffocation
-suffolk
-suffrage
-suffrages
-sug
-sugar
-sugarsop
-suggest
-suggested
-suggesting
-suggestion
-suggestions
-suggests
-suis
-suit
-suitable
-suited
-suiting
-suitor
-suitors
-suits
-suivez
-sullen
-sullens
-sullied
-sullies
-sully
-sulph
-sulpherous
-sulphur
-sulphurous
-sultan
-sultry
-sum
-sumless
-summ
-summa
-summary
-summer
-summers
-summit
-summon
-summoners
-summons
-sumpter
-sumptuous
-sumptuously
-sums
-sun
-sunbeams
-sunburning
-sunburnt
-sund
-sunday
-sundays
-sunder
-sunders
-sundry
-sung
-sunk
-sunken
-sunny
-sunrising
-suns
-sunset
-sunshine
-sup
-super
-superficial
-superficially
-superfluity
-superfluous
-superfluously
-superflux
-superior
-supernal
-supernatural
-superpraise
-superscript
-superscription
-superserviceable
-superstition
-superstitious
-superstitiously
-supersubtle
-supervise
-supervisor
-supp
-supper
-suppers
-suppertime
-supping
-supplant
-supple
-suppler
-suppliance
-suppliant
-suppliants
-supplicant
-supplication
-supplications
-supplie
-supplied
-supplies
-suppliest
-supply
-supplyant
-supplying
-supplyment
-support
-supportable
-supportance
-supported
-supporter
-supporters
-supporting
-supportor
-suppos
-supposal
-suppose
-supposed
-supposes
-supposest
-supposing
-supposition
-suppress
-suppressed
-suppresseth
-supremacy
-supreme
-sups
-sur
-surance
-surcease
-surd
-sure
-surecard
-surely
-surer
-surest
-sureties
-surety
-surfeit
-surfeited
-surfeiter
-surfeiting
-surfeits
-surge
-surgeon
-surgeons
-surgere
-surgery
-surges
-surly
-surmis
-surmise
-surmised
-surmises
-surmount
-surmounted
-surmounts
-surnam
-surname
-surnamed
-surpasseth
-surpassing
-surplice
-surplus
-surpris
-surprise
-surprised
-surrender
-surrey
-surreys
-survey
-surveyest
-surveying
-surveyor
-surveyors
-surveys
-survive
-survives
-survivor
-susan
-suspect
-suspected
-suspecting
-suspects
-suspend
-suspense
-suspicion
-suspicions
-suspicious
-suspiration
-suspire
-sust
-sustain
-sustaining
-sutler
-sutton
-suum
-swabber
-swaddling
-swag
-swagg
-swagger
-swaggerer
-swaggerers
-swaggering
-swain
-swains
-swallow
-swallowed
-swallowing
-swallows
-swam
-swan
-swans
-sward
-sware
-swarm
-swarming
-swart
-swarth
-swarths
-swarthy
-swashers
-swashing
-swath
-swathing
-swathling
-sway
-swaying
-sways
-swear
-swearer
-swearers
-swearest
-swearing
-swearings
-swears
-sweat
-sweaten
-sweating
-sweats
-sweaty
-sweep
-sweepers
-sweeps
-sweet
-sweeten
-sweetens
-sweeter
-sweetest
-sweetheart
-sweeting
-sweetly
-sweetmeats
-sweetness
-sweets
-swell
-swelling
-swellings
-swells
-swelter
-sweno
-swept
-swerve
-swerver
-swerving
-swift
-swifter
-swiftest
-swiftly
-swiftness
-swill
-swills
-swim
-swimmer
-swimmers
-swimming
-swims
-swine
-swineherds
-swing
-swinge
-swinish
-swinstead
-switches
-swits
-switzers
-swol
-swoll
-swoln
-swoon
-swooned
-swooning
-swoons
-swoop
-swoopstake
-swor
-sword
-sworder
-swords
-swore
-sworn
-swounded
-swounds
-swum
-swung
-sy
-sycamore
-sycorax
-sylla
-syllable
-syllables
-syllogism
-symbols
-sympathise
-sympathiz
-sympathize
-sympathized
-sympathy
-synagogue
-synod
-synods
-syracuse
-syracusian
-syracusians
-syria
-syrups
-t
-ta
-taber
-table
-tabled
-tables
-tablet
-tabor
-taborer
-tabors
-tabourines
-taciturnity
-tack
-tackle
-tackled
-tackles
-tackling
-tacklings
-taddle
-tadpole
-taffeta
-taffety
-tag
-tagrag
-tah
-tail
-tailor
-tailors
-tails
-taint
-tainted
-tainting
-taints
-tainture
-tak
-take
-taken
-taker
-takes
-takest
-taketh
-taking
-tal
-talbot
-talbotites
-talbots
-tale
-talent
-talents
-taleporter
-tales
-talk
-talked
-talker
-talkers
-talkest
-talking
-talks
-tall
-taller
-tallest
-tallies
-tallow
-tally
-talons
-tam
-tambourines
-tame
-tamed
-tamely
-tameness
-tamer
-tames
-taming
-tamora
-tamworth
-tan
-tang
-tangle
-tangled
-tank
-tanlings
-tann
-tanned
-tanner
-tanquam
-tanta
-tantaene
-tap
-tape
-taper
-tapers
-tapestries
-tapestry
-taphouse
-tapp
-tapster
-tapsters
-tar
-tardied
-tardily
-tardiness
-tardy
-tarentum
-targe
-targes
-target
-targets
-tarpeian
-tarquin
-tarquins
-tarr
-tarre
-tarriance
-tarried
-tarries
-tarry
-tarrying
-tart
-tartar
-tartars
-tartly
-tartness
-task
-tasker
-tasking
-tasks
-tassel
-taste
-tasted
-tastes
-tasting
-tatt
-tatter
-tattered
-tatters
-tattle
-tattling
-tattlings
-taught
-taunt
-taunted
-taunting
-tauntingly
-taunts
-taurus
-tavern
-taverns
-tavy
-tawdry
-tawny
-tax
-taxation
-taxations
-taxes
-taxing
-tc
-te
-teach
-teacher
-teachers
-teaches
-teachest
-teacheth
-teaching
-team
-tear
-tearful
-tearing
-tears
-tearsheet
-teat
-tedious
-tediously
-tediousness
-teem
-teeming
-teems
-teen
-teeth
-teipsum
-telamon
-telamonius
-tell
-teller
-telling
-tells
-tellus
-temp
-temper
-temperality
-temperance
-temperate
-temperately
-tempers
-tempest
-tempests
-tempestuous
-temple
-temples
-temporal
-temporary
-temporiz
-temporize
-temporizer
-temps
-tempt
-temptation
-temptations
-tempted
-tempter
-tempters
-tempteth
-tempting
-tempts
-ten
-tenable
-tenant
-tenantius
-tenantless
-tenants
-tench
-tend
-tendance
-tended
-tender
-tendered
-tenderly
-tenderness
-tenders
-tending
-tends
-tenedos
-tenement
-tenements
-tenfold
-tennis
-tenour
-tenours
-tens
-tent
-tented
-tenth
-tenths
-tents
-tenure
-tenures
-tercel
-tereus
-term
-termagant
-termed
-terminations
-termless
-terms
-terra
-terrace
-terram
-terras
-terre
-terrene
-terrestrial
-terrible
-terribly
-territories
-territory
-terror
-terrors
-tertian
-tertio
-test
-testament
-tested
-tester
-testern
-testify
-testimonied
-testimonies
-testimony
-testiness
-testril
-testy
-tetchy
-tether
-tetter
-tevil
-tewksbury
-text
-tgv
-th
-thaes
-thames
-than
-thane
-thanes
-thank
-thanked
-thankful
-thankfully
-thankfulness
-thanking
-thankings
-thankless
-thanks
-thanksgiving
-thasos
-that
-thatch
-thaw
-thawing
-thaws
-the
-theatre
-theban
-thebes
-thee
-theft
-thefts
-thein
-their
-theirs
-theise
-them
-theme
-themes
-themselves
-then
-thence
-thenceforth
-theoric
-there
-thereabout
-thereabouts
-thereafter
-thereat
-thereby
-therefore
-therein
-thereof
-thereon
-thereto
-thereunto
-thereupon
-therewith
-therewithal
-thersites
-these
-theseus
-thessalian
-thessaly
-thetis
-thews
-they
-thick
-thicken
-thickens
-thicker
-thickest
-thicket
-thickskin
-thief
-thievery
-thieves
-thievish
-thigh
-thighs
-thimble
-thimbles
-thin
-thine
-thing
-things
-think
-thinkest
-thinking
-thinkings
-thinks
-thinkst
-thinly
-third
-thirdly
-thirds
-thirst
-thirsting
-thirsts
-thirsty
-thirteen
-thirties
-thirtieth
-thirty
-this
-thisby
-thisne
-thistle
-thistles
-thither
-thitherward
-thoas
-thomas
-thorn
-thorns
-thorny
-thorough
-thoroughly
-those
-thou
-though
-thought
-thoughtful
-thoughts
-thousand
-thousands
-thracian
-thraldom
-thrall
-thralled
-thralls
-thrash
-thrasonical
-thread
-threadbare
-threaden
-threading
-threat
-threaten
-threatening
-threatens
-threatest
-threats
-three
-threefold
-threepence
-threepile
-threes
-threescore
-thresher
-threshold
-threw
-thrice
-thrift
-thriftless
-thrifts
-thrifty
-thrill
-thrilling
-thrills
-thrive
-thrived
-thrivers
-thrives
-thriving
-throat
-throats
-throbbing
-throbs
-throca
-throe
-throes
-thromuldo
-thron
-throne
-throned
-thrones
-throng
-thronging
-throngs
-throstle
-throttle
-through
-throughfare
-throughfares
-throughly
-throughout
-throw
-thrower
-throwest
-throwing
-thrown
-throws
-thrum
-thrumm
-thrush
-thrust
-thrusteth
-thrusting
-thrusts
-thumb
-thumbs
-thump
-thund
-thunder
-thunderbolt
-thunderbolts
-thunderer
-thunders
-thunderstone
-thunderstroke
-thurio
-thursday
-thus
-thwack
-thwart
-thwarted
-thwarting
-thwartings
-thy
-thyme
-thymus
-thyreus
-thyself
-ti
-tib
-tiber
-tiberio
-tibey
-ticed
-tick
-tickl
-tickle
-tickled
-tickles
-tickling
-ticklish
-tiddle
-tide
-tides
-tidings
-tidy
-tie
-tied
-ties
-tiff
-tiger
-tigers
-tight
-tightly
-tike
-til
-tile
-till
-tillage
-tilly
-tilt
-tilter
-tilth
-tilting
-tilts
-tiltyard
-tim
-timandra
-timber
-time
-timeless
-timelier
-timely
-times
-timon
-timor
-timorous
-timorously
-tinct
-tincture
-tinctures
-tinder
-tingling
-tinker
-tinkers
-tinsel
-tiny
-tip
-tipp
-tippling
-tips
-tipsy
-tiptoe
-tir
-tire
-tired
-tires
-tirest
-tiring
-tirra
-tirrits
-tis
-tish
-tisick
-tissue
-titan
-titania
-tithe
-tithed
-tithing
-titinius
-title
-titled
-titleless
-titles
-tittle
-tittles
-titular
-titus
-tn
-to
-toad
-toads
-toadstool
-toast
-toasted
-toasting
-toasts
-toaze
-toby
-tock
-tod
-today
-todpole
-tods
-toe
-toes
-tofore
-toge
-toged
-together
-toil
-toiled
-toiling
-toils
-token
-tokens
-told
-toledo
-tolerable
-toll
-tolling
-tom
-tomb
-tombe
-tombed
-tombless
-tomboys
-tombs
-tomorrow
-tomyris
-ton
-tongs
-tongu
-tongue
-tongued
-tongueless
-tongues
-tonight
-too
-took
-tool
-tools
-tooth
-toothache
-toothpick
-toothpicker
-top
-topas
-topful
-topgallant
-topless
-topmast
-topp
-topping
-topple
-topples
-tops
-topsail
-topsy
-torch
-torchbearer
-torchbearers
-torcher
-torches
-torchlight
-tore
-torment
-tormenta
-tormente
-tormented
-tormenting
-tormentors
-torments
-torn
-torrent
-tortive
-tortoise
-tortur
-torture
-tortured
-torturer
-torturers
-tortures
-torturest
-torturing
-toryne
-toss
-tossed
-tosseth
-tossing
-tot
-total
-totally
-tott
-tottered
-totters
-tou
-touch
-touched
-touches
-toucheth
-touching
-touchstone
-tough
-tougher
-toughness
-touraine
-tournaments
-tours
-tous
-tout
-touze
-tow
-toward
-towardly
-towards
-tower
-towering
-towers
-town
-towns
-township
-townsman
-townsmen
-towton
-toy
-toys
-trace
-traces
-track
-tract
-tractable
-trade
-traded
-traders
-trades
-tradesman
-tradesmen
-trading
-tradition
-traditional
-traduc
-traduced
-traducement
-traffic
-traffickers
-traffics
-tragedian
-tragedians
-tragedies
-tragedy
-tragic
-tragical
-trail
-train
-trained
-training
-trains
-trait
-traitor
-traitorly
-traitorous
-traitorously
-traitors
-traitress
-traject
-trammel
-trample
-trampled
-trampling
-tranc
-trance
-tranio
-tranquil
-tranquillity
-transcendence
-transcends
-transferred
-transfigur
-transfix
-transform
-transformation
-transformations
-transformed
-transgress
-transgresses
-transgressing
-transgression
-translate
-translated
-translates
-translation
-transmigrates
-transmutation
-transparent
-transport
-transportance
-transported
-transporting
-transports
-transpose
-transshape
-trap
-trapp
-trappings
-traps
-trash
-travail
-travails
-travel
-traveler
-traveling
-travell
-travelled
-traveller
-travellers
-travellest
-travelling
-travels
-travers
-traverse
-tray
-treacherous
-treacherously
-treachers
-treachery
-tread
-treading
-treads
-treason
-treasonable
-treasonous
-treasons
-treasure
-treasurer
-treasures
-treasuries
-treasury
-treat
-treaties
-treatise
-treats
-treaty
-treble
-trebled
-trebles
-trebonius
-tree
-trees
-tremble
-trembled
-trembles
-tremblest
-trembling
-tremblingly
-tremor
-trempling
-trench
-trenchant
-trenched
-trencher
-trenchering
-trencherman
-trenchers
-trenches
-trenching
-trent
-tres
-trespass
-trespasses
-tressel
-tresses
-treys
-trial
-trials
-trib
-tribe
-tribes
-tribulation
-tribunal
-tribune
-tribunes
-tributaries
-tributary
-tribute
-tributes
-trice
-trick
-tricking
-trickling
-tricks
-tricksy
-trident
-tried
-trier
-trifle
-trifled
-trifler
-trifles
-trifling
-trigon
-trill
-trim
-trimly
-trimm
-trimmed
-trimming
-trims
-trinculo
-trinculos
-trinkets
-trip
-tripartite
-tripe
-triple
-triplex
-tripoli
-tripolis
-tripp
-tripping
-trippingly
-trips
-tristful
-triton
-triumph
-triumphant
-triumphantly
-triumpher
-triumphers
-triumphing
-triumphs
-triumvir
-triumvirate
-triumvirs
-triumviry
-trivial
-troat
-trod
-trodden
-troiant
-troien
-troilus
-troiluses
-trojan
-trojans
-troll
-tromperies
-trompet
-troop
-trooping
-troops
-trop
-trophies
-trophy
-tropically
-trot
-troth
-trothed
-troths
-trots
-trotting
-trouble
-troubled
-troubler
-troubles
-troublesome
-troublest
-troublous
-trough
-trout
-trouts
-trovato
-trow
-trowel
-trowest
-troy
-troyan
-troyans
-truant
-truce
-truckle
-trudge
-true
-trueborn
-truepenny
-truer
-truest
-truie
-trull
-trulls
-truly
-trump
-trumpery
-trumpet
-trumpeter
-trumpeters
-trumpets
-truncheon
-truncheoners
-trundle
-trunk
-trunks
-trust
-trusted
-truster
-trusters
-trusting
-trusts
-trusty
-truth
-truths
-try
-ts
-tu
-tuae
-tub
-tubal
-tubs
-tuck
-tucket
-tuesday
-tuft
-tufts
-tug
-tugg
-tugging
-tuition
-tullus
-tully
-tumble
-tumbled
-tumbler
-tumbling
-tumult
-tumultuous
-tun
-tune
-tuneable
-tuned
-tuners
-tunes
-tunis
-tuns
-tupping
-turban
-turbans
-turbulence
-turbulent
-turd
-turf
-turfy
-turk
-turkey
-turkeys
-turkish
-turks
-turlygod
-turmoil
-turmoiled
-turn
-turnbull
-turncoat
-turncoats
-turned
-turneth
-turning
-turnips
-turns
-turph
-turpitude
-turquoise
-turret
-turrets
-turtle
-turtles
-turvy
-tuscan
-tush
-tut
-tutor
-tutored
-tutors
-tutto
-twain
-twang
-twangling
-twas
-tway
-tweaks
-tween
-twelfth
-twelve
-twelvemonth
-twentieth
-twenty
-twere
-twice
-twig
-twiggen
-twigs
-twilight
-twill
-twilled
-twin
-twine
-twink
-twinkle
-twinkled
-twinkling
-twinn
-twins
-twire
-twist
-twisted
-twit
-twits
-twitting
-twixt
-two
-twofold
-twopence
-twopences
-twos
-twould
-tyb
-tybalt
-tybalts
-tyburn
-tying
-tyke
-tymbria
-type
-types
-typhon
-tyrannical
-tyrannically
-tyrannize
-tyrannous
-tyranny
-tyrant
-tyrants
-tyrian
-tyrrel
-u
-ubique
-udders
-udge
-uds
-uglier
-ugliest
-ugly
-ulcer
-ulcerous
-ulysses
-um
-umber
-umbra
-umbrage
-umfrevile
-umpire
-umpires
-un
-unable
-unaccommodated
-unaccompanied
-unaccustom
-unaching
-unacquainted
-unactive
-unadvis
-unadvised
-unadvisedly
-unagreeable
-unanel
-unanswer
-unappeas
-unapproved
-unapt
-unaptness
-unarm
-unarmed
-unarms
-unassail
-unassailable
-unattainted
-unattempted
-unattended
-unauspicious
-unauthorized
-unavoided
-unawares
-unback
-unbak
-unbanded
-unbar
-unbarb
-unbashful
-unbated
-unbatter
-unbecoming
-unbefitting
-unbegot
-unbegotten
-unbelieved
-unbend
-unbent
-unbewail
-unbid
-unbidden
-unbind
-unbinds
-unbitted
-unbless
-unblest
-unbloodied
-unblown
-unbodied
-unbolt
-unbolted
-unbonneted
-unbookish
-unborn
-unbosom
-unbound
-unbounded
-unbow
-unbowed
-unbrac
-unbraced
-unbraided
-unbreathed
-unbred
-unbreech
-unbridled
-unbroke
-unbruis
-unbruised
-unbuckle
-unbuckles
-unbuckling
-unbuild
-unburden
-unburdens
-unburied
-unburnt
-unburthen
-unbutton
-unbuttoning
-uncapable
-uncape
-uncase
-uncasing
-uncaught
-uncertain
-uncertainty
-unchain
-unchanging
-uncharge
-uncharged
-uncharitably
-unchary
-unchaste
-uncheck
-unchilded
-uncivil
-unclaim
-unclasp
-uncle
-unclean
-uncleanliness
-uncleanly
-uncleanness
-uncles
-unclew
-unclog
-uncoined
-uncolted
-uncomeliness
-uncomfortable
-uncompassionate
-uncomprehensive
-unconfinable
-unconfirm
-unconfirmed
-unconquer
-unconquered
-unconsidered
-unconstant
-unconstrain
-unconstrained
-uncontemn
-uncontroll
-uncorrected
-uncounted
-uncouple
-uncourteous
-uncouth
-uncover
-uncovered
-uncropped
-uncross
-uncrown
-unction
-unctuous
-uncuckolded
-uncurable
-uncurbable
-uncurbed
-uncurls
-uncurrent
-uncurse
-undaunted
-undeaf
-undeck
-undeeded
-under
-underbearing
-underborne
-undercrest
-underfoot
-undergo
-undergoes
-undergoing
-undergone
-underground
-underhand
-underlings
-undermine
-underminers
-underneath
-underprizing
-underprop
-understand
-understandeth
-understanding
-understandings
-understands
-understood
-underta
-undertake
-undertakeing
-undertaker
-undertakes
-undertaking
-undertakings
-undertook
-undervalu
-undervalued
-underwent
-underwrit
-underwrite
-undescried
-undeserved
-undeserver
-undeservers
-undeserving
-undetermin
-undid
-undinted
-undiscernible
-undiscover
-undishonoured
-undispos
-undistinguishable
-undistinguished
-undividable
-undivided
-undivulged
-undo
-undoes
-undoing
-undone
-undoubted
-undoubtedly
-undream
-undress
-undressed
-undrown
-unduteous
-undutiful
-une
-uneared
-unearned
-unearthly
-uneasines
-uneasy
-uneath
-uneducated
-uneffectual
-unelected
-unequal
-uneven
-unexamin
-unexecuted
-unexpected
-unexperienc
-unexperient
-unexpressive
-unfair
-unfaithful
-unfallible
-unfam
-unfashionable
-unfasten
-unfather
-unfathered
-unfed
-unfeed
-unfeeling
-unfeigned
-unfeignedly
-unfellowed
-unfelt
-unfenced
-unfilial
-unfill
-unfinish
-unfirm
-unfit
-unfitness
-unfix
-unfledg
-unfold
-unfolded
-unfoldeth
-unfolding
-unfolds
-unfool
-unforc
-unforced
-unforfeited
-unfortified
-unfortunate
-unfought
-unfrequented
-unfriended
-unfurnish
-ungain
-ungalled
-ungart
-ungarter
-ungenitur
-ungentle
-ungentleness
-ungently
-ungird
-ungodly
-ungor
-ungot
-ungotten
-ungovern
-ungracious
-ungrateful
-ungravely
-ungrown
-unguarded
-unguem
-unguided
-unhack
-unhair
-unhallow
-unhallowed
-unhand
-unhandled
-unhandsome
-unhang
-unhappied
-unhappily
-unhappiness
-unhappy
-unhardened
-unharm
-unhatch
-unheard
-unhearts
-unheedful
-unheedfully
-unheedy
-unhelpful
-unhidden
-unholy
-unhop
-unhopefullest
-unhorse
-unhospitable
-unhous
-unhoused
-unhurtful
-unicorn
-unicorns
-unimproved
-uninhabitable
-uninhabited
-unintelligent
-union
-unions
-unite
-united
-unity
-universal
-universe
-universities
-university
-unjointed
-unjust
-unjustice
-unjustly
-unkennel
-unkept
-unkind
-unkindest
-unkindly
-unkindness
-unking
-unkinglike
-unkiss
-unknit
-unknowing
-unknown
-unlace
-unlaid
-unlawful
-unlawfully
-unlearn
-unlearned
-unless
-unlesson
-unletter
-unlettered
-unlick
-unlike
-unlikely
-unlimited
-unlineal
-unlink
-unload
-unloaded
-unloading
-unloads
-unlock
-unlocks
-unlook
-unlooked
-unloos
-unloose
-unlov
-unloving
-unluckily
-unlucky
-unmade
-unmake
-unmanly
-unmann
-unmanner
-unmannerd
-unmannerly
-unmarried
-unmask
-unmasked
-unmasking
-unmasks
-unmast
-unmatch
-unmatchable
-unmatched
-unmeasurable
-unmeet
-unmellowed
-unmerciful
-unmeritable
-unmeriting
-unminded
-unmindfull
-unmingled
-unmitigable
-unmitigated
-unmix
-unmoan
-unmov
-unmoved
-unmoving
-unmuffles
-unmuffling
-unmusical
-unmuzzle
-unmuzzled
-unnatural
-unnaturally
-unnaturalness
-unnecessarily
-unnecessary
-unneighbourly
-unnerved
-unnoble
-unnoted
-unnumb
-unnumber
-unowed
-unpack
-unpaid
-unparagon
-unparallel
-unpartial
-unpath
-unpaved
-unpay
-unpeaceable
-unpeg
-unpeople
-unpeopled
-unperfect
-unperfectness
-unpick
-unpin
-unpink
-unpitied
-unpitifully
-unplagu
-unplausive
-unpleas
-unpleasant
-unpleasing
-unpolicied
-unpolish
-unpolished
-unpolluted
-unpossess
-unpossessing
-unpossible
-unpractis
-unpregnant
-unpremeditated
-unprepar
-unprepared
-unpress
-unprevailing
-unprevented
-unpriz
-unprizable
-unprofitable
-unprofited
-unproper
-unproperly
-unproportion
-unprovide
-unprovided
-unprovident
-unprovokes
-unprun
-unpruned
-unpublish
-unpurged
-unpurpos
-unqualitied
-unqueen
-unquestion
-unquestionable
-unquiet
-unquietly
-unquietness
-unraised
-unrak
-unread
-unready
-unreal
-unreasonable
-unreasonably
-unreclaimed
-unreconciled
-unreconciliable
-unrecounted
-unrecuring
-unregarded
-unregist
-unrelenting
-unremovable
-unremovably
-unreprievable
-unresolv
-unrespected
-unrespective
-unrest
-unrestor
-unrestrained
-unreveng
-unreverend
-unreverent
-unrevers
-unrewarded
-unrighteous
-unrightful
-unripe
-unripp
-unrivall
-unroll
-unroof
-unroosted
-unroot
-unrough
-unruly
-unsafe
-unsaluted
-unsanctified
-unsatisfied
-unsavoury
-unsay
-unscalable
-unscann
-unscarr
-unschool
-unscorch
-unscour
-unscratch
-unseal
-unseam
-unsearch
-unseason
-unseasonable
-unseasonably
-unseasoned
-unseconded
-unsecret
-unseduc
-unseeing
-unseeming
-unseemly
-unseen
-unseminar
-unseparable
-unserviceable
-unset
-unsettle
-unsettled
-unsever
-unsex
-unshak
-unshaked
-unshaken
-unshaped
-unshapes
-unsheath
-unsheathe
-unshorn
-unshout
-unshown
-unshrinking
-unshrubb
-unshunn
-unshunnable
-unsifted
-unsightly
-unsinew
-unsisting
-unskilful
-unskilfully
-unskillful
-unslipping
-unsmirched
-unsoil
-unsolicited
-unsorted
-unsought
-unsound
-unsounded
-unspeak
-unspeakable
-unspeaking
-unsphere
-unspoke
-unspoken
-unspotted
-unsquar
-unstable
-unstaid
-unstain
-unstained
-unstanched
-unstate
-unsteadfast
-unstooping
-unstringed
-unstuff
-unsubstantial
-unsuitable
-unsuiting
-unsullied
-unsunn
-unsur
-unsure
-unsuspected
-unsway
-unswayable
-unswayed
-unswear
-unswept
-unsworn
-untainted
-untalk
-untangle
-untangled
-untasted
-untaught
-untempering
-untender
-untent
-untented
-unthankful
-unthankfulness
-unthink
-unthought
-unthread
-unthrift
-unthrifts
-unthrifty
-untie
-untied
-until
-untimber
-untimely
-untir
-untirable
-untired
-untitled
-unto
-untold
-untouch
-untoward
-untowardly
-untraded
-untrain
-untrained
-untread
-untreasur
-untried
-untrimmed
-untrod
-untrodden
-untroubled
-untrue
-untrussing
-untruth
-untruths
-untucked
-untun
-untune
-untuneable
-untutor
-untutored
-untwine
-unurg
-unus
-unused
-unusual
-unvalued
-unvanquish
-unvarnish
-unveil
-unveiling
-unvenerable
-unvex
-unviolated
-unvirtuous
-unvisited
-unvulnerable
-unwares
-unwarily
-unwash
-unwatch
-unwearied
-unwed
-unwedgeable
-unweeded
-unweighed
-unweighing
-unwelcome
-unwept
-unwhipp
-unwholesome
-unwieldy
-unwilling
-unwillingly
-unwillingness
-unwind
-unwiped
-unwise
-unwisely
-unwish
-unwished
-unwitted
-unwittingly
-unwonted
-unwooed
-unworthier
-unworthiest
-unworthily
-unworthiness
-unworthy
-unwrung
-unyok
-unyoke
-up
-upbraid
-upbraided
-upbraidings
-upbraids
-uphoarded
-uphold
-upholdeth
-upholding
-upholds
-uplift
-uplifted
-upmost
-upon
-upper
-uprear
-upreared
-upright
-uprighteously
-uprightness
-uprise
-uprising
-uproar
-uproars
-uprous
-upshoot
-upshot
-upside
-upspring
-upstairs
-upstart
-upturned
-upward
-upwards
-urchin
-urchinfield
-urchins
-urg
-urge
-urged
-urgent
-urges
-urgest
-urging
-urinal
-urinals
-urine
-urn
-urns
-urs
-ursa
-ursley
-ursula
-urswick
-us
-usage
-usance
-usances
-use
-used
-useful
-useless
-user
-uses
-usest
-useth
-usher
-ushered
-ushering
-ushers
-using
-usual
-usually
-usurer
-usurers
-usuries
-usuring
-usurp
-usurpation
-usurped
-usurper
-usurpers
-usurping
-usurpingly
-usurps
-usury
-ut
-utensil
-utensils
-utility
-utmost
-utt
-utter
-utterance
-uttered
-uttereth
-uttering
-utterly
-uttermost
-utters
-uy
-v
-va
-vacancy
-vacant
-vacation
-vade
-vagabond
-vagabonds
-vagram
-vagrom
-vail
-vailed
-vailing
-vaillant
-vain
-vainer
-vainglory
-vainly
-vainness
-vais
-valanc
-valance
-vale
-valence
-valentine
-valentinus
-valentio
-valeria
-valerius
-vales
-valiant
-valiantly
-valiantness
-validity
-vallant
-valley
-valleys
-vally
-valor
-valorous
-valorously
-valour
-valu
-valuation
-value
-valued
-valueless
-values
-valuing
-vane
-vanish
-vanished
-vanishes
-vanishest
-vanishing
-vanities
-vanity
-vanquish
-vanquished
-vanquisher
-vanquishest
-vanquisheth
-vant
-vantage
-vantages
-vantbrace
-vapians
-vapor
-vaporous
-vapour
-vapours
-vara
-variable
-variance
-variation
-variations
-varied
-variest
-variety
-varld
-varlet
-varletry
-varlets
-varletto
-varnish
-varrius
-varro
-vary
-varying
-vassal
-vassalage
-vassals
-vast
-vastidity
-vasty
-vat
-vater
-vaudemont
-vaughan
-vault
-vaultages
-vaulted
-vaulting
-vaults
-vaulty
-vaumond
-vaunt
-vaunted
-vaunter
-vaunting
-vauntingly
-vaunts
-vauvado
-vaux
-vaward
-ve
-veal
-vede
-vehemence
-vehemency
-vehement
-vehor
-veil
-veiled
-veiling
-vein
-veins
-vell
-velure
-velutus
-velvet
-vendible
-venerable
-venereal
-venetia
-venetian
-venetians
-veneys
-venge
-vengeance
-vengeances
-vengeful
-veni
-venial
-venice
-venison
-venit
-venom
-venomous
-venomously
-vent
-ventages
-vented
-ventidius
-ventricle
-vents
-ventur
-venture
-ventured
-ventures
-venturing
-venturous
-venue
-venus
-venuto
-ver
-verb
-verba
-verbal
-verbatim
-verbosity
-verdict
-verdun
-verdure
-vere
-verefore
-verg
-verge
-vergers
-verges
-verier
-veriest
-verified
-verify
-verily
-veritable
-verite
-verities
-verity
-vermilion
-vermin
-vernon
-verona
-veronesa
-versal
-verse
-verses
-versing
-vert
-very
-vesper
-vessel
-vessels
-vestal
-vestments
-vesture
-vetch
-vetches
-veux
-vex
-vexation
-vexations
-vexed
-vexes
-vexest
-vexeth
-vexing
-vi
-via
-vial
-vials
-viand
-viands
-vic
-vicar
-vice
-vicegerent
-vicentio
-viceroy
-viceroys
-vices
-vici
-vicious
-viciousness
-vict
-victims
-victor
-victoress
-victories
-victorious
-victors
-victory
-victual
-victuall
-victuals
-videlicet
-video
-vides
-videsne
-vidi
-vie
-vied
-vienna
-view
-viewest
-vieweth
-viewing
-viewless
-views
-vigil
-vigilance
-vigilant
-vigitant
-vigour
-vii
-viii
-vile
-vilely
-vileness
-viler
-vilest
-vill
-village
-villager
-villagery
-villages
-villain
-villainies
-villainous
-villainously
-villains
-villainy
-villanies
-villanous
-villany
-villiago
-villian
-villianda
-villians
-vinaigre
-vincentio
-vincere
-vindicative
-vine
-vinegar
-vines
-vineyard
-vineyards
-vint
-vintner
-viol
-viola
-violate
-violated
-violates
-violation
-violator
-violence
-violent
-violenta
-violenteth
-violently
-violet
-violets
-viper
-viperous
-vipers
-vir
-virgilia
-virgin
-virginal
-virginalling
-virginity
-virginius
-virgins
-virgo
-virtue
-virtues
-virtuous
-virtuously
-visag
-visage
-visages
-visard
-viscount
-visible
-visibly
-vision
-visions
-visit
-visitation
-visitations
-visited
-visiting
-visitings
-visitor
-visitors
-visits
-visor
-vita
-vitae
-vital
-vitement
-vitruvio
-vitx
-viva
-vivant
-vive
-vixen
-viz
-vizaments
-vizard
-vizarded
-vizards
-vizor
-vlouting
-vocation
-vocativo
-vocatur
-voce
-voic
-voice
-voices
-void
-voided
-voiding
-voke
-volable
-volant
-volivorco
-volley
-volquessen
-volsce
-volsces
-volscian
-volscians
-volt
-voltemand
-volubility
-voluble
-volume
-volumes
-volumnia
-volumnius
-voluntaries
-voluntary
-voluptuously
-voluptuousness
-vomissement
-vomit
-vomits
-vor
-vore
-vortnight
-vot
-votaries
-votarist
-votarists
-votary
-votre
-vouch
-voucher
-vouchers
-vouches
-vouching
-vouchsaf
-vouchsafe
-vouchsafed
-vouchsafes
-vouchsafing
-voudrais
-vour
-vous
-voutsafe
-vow
-vowed
-vowel
-vowels
-vowing
-vows
-vox
-voyage
-voyages
-vraiment
-vulcan
-vulgar
-vulgarly
-vulgars
-vulgo
-vulnerable
-vulture
-vultures
-vurther
-w
-wad
-waddled
-wade
-waded
-wafer
-waft
-waftage
-wafting
-wafts
-wag
-wage
-wager
-wagers
-wages
-wagging
-waggish
-waggling
-waggon
-waggoner
-wagon
-wagoner
-wags
-wagtail
-wail
-wailful
-wailing
-wails
-wain
-wainropes
-wainscot
-waist
-wait
-waited
-waiter
-waiteth
-waiting
-waits
-wak
-wake
-waked
-wakefield
-waken
-wakened
-wakes
-wakest
-waking
-wales
-walk
-walked
-walking
-walks
-wall
-walled
-wallet
-wallets
-wallon
-walloon
-wallow
-walls
-walnut
-walter
-wan
-wand
-wander
-wanderer
-wanderers
-wandering
-wanders
-wands
-wane
-waned
-wanes
-waning
-wann
-want
-wanted
-wanteth
-wanting
-wanton
-wantonly
-wantonness
-wantons
-wants
-wappen
-war
-warble
-warbling
-ward
-warded
-warden
-warder
-warders
-wardrobe
-wardrop
-wards
-ware
-wares
-warily
-warkworth
-warlike
-warm
-warmed
-warmer
-warming
-warms
-warmth
-warn
-warned
-warning
-warnings
-warns
-warp
-warped
-warr
-warrant
-warranted
-warranteth
-warrantise
-warrantize
-warrants
-warranty
-warren
-warrener
-warring
-warrior
-warriors
-wars
-wart
-warwick
-warwickshire
-wary
-was
-wash
-washed
-washer
-washes
-washford
-washing
-wasp
-waspish
-wasps
-wassail
-wassails
-wast
-waste
-wasted
-wasteful
-wasters
-wastes
-wasting
-wat
-watch
-watched
-watchers
-watches
-watchful
-watching
-watchings
-watchman
-watchmen
-watchword
-water
-waterdrops
-watered
-waterfly
-waterford
-watering
-waterish
-waterpots
-waterrugs
-waters
-waterton
-watery
-wav
-wave
-waved
-waver
-waverer
-wavering
-waves
-waving
-waw
-wawl
-wax
-waxed
-waxen
-waxes
-waxing
-way
-waylaid
-waylay
-ways
-wayward
-waywarder
-waywardness
-we
-weak
-weaken
-weakens
-weaker
-weakest
-weakling
-weakly
-weakness
-weal
-wealsmen
-wealth
-wealthiest
-wealthily
-wealthy
-wealtlly
-wean
-weapon
-weapons
-wear
-wearer
-wearers
-wearied
-wearies
-weariest
-wearily
-weariness
-wearing
-wearisome
-wears
-weary
-weasel
-weather
-weathercock
-weathers
-weav
-weave
-weaver
-weavers
-weaves
-weaving
-web
-wed
-wedded
-wedding
-wedg
-wedged
-wedges
-wedlock
-wednesday
-weed
-weeded
-weeder
-weeding
-weeds
-weedy
-week
-weeke
-weekly
-weeks
-ween
-weening
-weep
-weeper
-weeping
-weepingly
-weepings
-weeps
-weet
-weigh
-weighed
-weighing
-weighs
-weight
-weightier
-weightless
-weights
-weighty
-weird
-welcom
-welcome
-welcomer
-welcomes
-welcomest
-welfare
-welkin
-well
-wells
-welsh
-welshman
-welshmen
-welshwomen
-wench
-wenches
-wenching
-wend
-went
-wept
-weraday
-were
-wert
-west
-western
-westminster
-westmoreland
-westward
-wet
-wether
-wetting
-wezand
-whale
-whales
-wharf
-wharfs
-what
-whate
-whatever
-whatsoe
-whatsoever
-whatsome
-whe
-wheat
-wheaten
-wheel
-wheeling
-wheels
-wheer
-wheeson
-wheezing
-whelk
-whelks
-whelm
-whelp
-whelped
-whelps
-when
-whenas
-whence
-whencesoever
-whene
-whenever
-whensoever
-where
-whereabout
-whereas
-whereat
-whereby
-wherefore
-wherein
-whereinto
-whereof
-whereon
-whereout
-whereso
-wheresoe
-wheresoever
-wheresome
-whereto
-whereuntil
-whereunto
-whereupon
-wherever
-wherewith
-wherewithal
-whet
-whether
-whetstone
-whetted
-whew
-whey
-which
-whiff
-whiffler
-while
-whiles
-whilst
-whin
-whine
-whined
-whinid
-whining
-whip
-whipp
-whippers
-whipping
-whips
-whipster
-whipstock
-whipt
-whirl
-whirled
-whirligig
-whirling
-whirlpool
-whirls
-whirlwind
-whirlwinds
-whisp
-whisper
-whispering
-whisperings
-whispers
-whist
-whistle
-whistles
-whistling
-whit
-white
-whitehall
-whitely
-whiteness
-whiter
-whites
-whitest
-whither
-whiting
-whitmore
-whitsters
-whitsun
-whittle
-whizzing
-who
-whoa
-whoe
-whoever
-whole
-wholesom
-wholesome
-wholly
-whom
-whoobub
-whoop
-whooping
-whor
-whore
-whoremaster
-whoremasterly
-whoremonger
-whores
-whoreson
-whoresons
-whoring
-whorish
-whose
-whoso
-whosoe
-whosoever
-why
-wi
-wick
-wicked
-wickednes
-wickedness
-wicket
-wicky
-wid
-wide
-widens
-wider
-widow
-widowed
-widower
-widowhood
-widows
-wield
-wife
-wight
-wights
-wild
-wildcats
-wilder
-wilderness
-wildest
-wildfire
-wildly
-wildness
-wilds
-wiles
-wilful
-wilfull
-wilfully
-wilfulnes
-wilfulness
-will
-willed
-willers
-willeth
-william
-williams
-willing
-willingly
-willingness
-willoughby
-willow
-wills
-wilt
-wiltshire
-wimpled
-win
-wince
-winch
-winchester
-wincot
-wind
-winded
-windgalls
-winding
-windlasses
-windmill
-window
-windows
-windpipe
-winds
-windsor
-windy
-wine
-wing
-winged
-wingfield
-wingham
-wings
-wink
-winking
-winks
-winner
-winners
-winning
-winnow
-winnowed
-winnows
-wins
-winter
-winterly
-winters
-wip
-wipe
-wiped
-wipes
-wiping
-wire
-wires
-wiry
-wisdom
-wisdoms
-wise
-wiselier
-wisely
-wiser
-wisest
-wish
-wished
-wisher
-wishers
-wishes
-wishest
-wisheth
-wishful
-wishing
-wishtly
-wisp
-wist
-wit
-witb
-witch
-witchcraft
-witches
-witching
-with
-withal
-withdraw
-withdrawing
-withdrawn
-withdrew
-wither
-withered
-withering
-withers
-withheld
-withhold
-withholds
-within
-withold
-without
-withstand
-withstanding
-withstood
-witless
-witness
-witnesses
-witnesseth
-witnessing
-wits
-witted
-wittenberg
-wittiest
-wittily
-witting
-wittingly
-wittol
-wittolly
-witty
-wiv
-wive
-wived
-wives
-wiving
-wizard
-wizards
-wo
-woe
-woeful
-woefull
-woefullest
-woes
-woful
-wolf
-wolfish
-wolsey
-wolves
-wolvish
-woman
-womanhood
-womanish
-womankind
-womanly
-womb
-wombs
-womby
-women
-won
-woncot
-wond
-wonder
-wondered
-wonderful
-wonderfully
-wondering
-wonders
-wondrous
-wondrously
-wont
-wonted
-woo
-wood
-woodbine
-woodcock
-woodcocks
-wooden
-woodland
-woodman
-woodmonger
-woods
-woodstock
-woodville
-wooed
-wooer
-wooers
-wooes
-woof
-wooing
-wooingly
-wool
-woollen
-woolly
-woolsack
-woolsey
-woolward
-woos
-wor
-worcester
-word
-words
-wore
-worins
-work
-workers
-working
-workings
-workman
-workmanly
-workmanship
-workmen
-works
-worky
-world
-worldlings
-worldly
-worlds
-worm
-worms
-wormwood
-wormy
-worn
-worried
-worries
-worry
-worrying
-worse
-worser
-worship
-worshipful
-worshipfully
-worshipp
-worshipper
-worshippers
-worshippest
-worships
-worst
-worsted
-wort
-worth
-worthied
-worthier
-worthies
-worthiest
-worthily
-worthiness
-worthless
-worths
-worthy
-worts
-wot
-wots
-wotting
-wouid
-would
-wouldest
-wouldst
-wound
-wounded
-wounding
-woundings
-woundless
-wounds
-wouns
-woven
-wow
-wrack
-wrackful
-wrangle
-wrangler
-wranglers
-wrangling
-wrap
-wrapp
-wraps
-wrapt
-wrath
-wrathful
-wrathfully
-wraths
-wreak
-wreakful
-wreaks
-wreath
-wreathed
-wreathen
-wreaths
-wreck
-wrecked
-wrecks
-wren
-wrench
-wrenching
-wrens
-wrest
-wrested
-wresting
-wrestle
-wrestled
-wrestler
-wrestling
-wretch
-wretchcd
-wretched
-wretchedness
-wretches
-wring
-wringer
-wringing
-wrings
-wrinkle
-wrinkled
-wrinkles
-wrist
-wrists
-writ
-write
-writer
-writers
-writes
-writhled
-writing
-writings
-writs
-written
-wrong
-wronged
-wronger
-wrongful
-wrongfully
-wronging
-wrongly
-wrongs
-wronk
-wrote
-wroth
-wrought
-wrung
-wry
-wrying
-wt
-wul
-wye
-x
-xanthippe
-xi
-xii
-xiii
-xiv
-xv
-y
-yard
-yards
-yare
-yarely
-yarn
-yaughan
-yaw
-yawn
-yawning
-ycleped
-ycliped
-ye
-yea
-yead
-year
-yearly
-yearn
-yearns
-years
-yeas
-yeast
-yedward
-yell
-yellow
-yellowed
-yellowing
-yellowness
-yellows
-yells
-yelping
-yeoman
-yeomen
-yerk
-yes
-yesterday
-yesterdays
-yesternight
-yesty
-yet
-yew
-yicld
-yield
-yielded
-yielder
-yielders
-yielding
-yields
-yok
-yoke
-yoked
-yokefellow
-yokes
-yoketh
-yon
-yond
-yonder
-yongrey
-yore
-yorick
-york
-yorkists
-yorks
-yorkshire
-you
-young
-younger
-youngest
-youngling
-younglings
-youngly
-younker
-your
-yours
-yourself
-yourselves
-youth
-youthful
-youths
-youtli
-zanies
-zany
-zeal
-zealous
-zeals
-zed
-zenelophon
-zenith
-zephyrs
-zir
-zo
-zodiac
-zodiacs
-zone
-zounds
-zwagger
diff --git a/extra/printf/authors.txt b/extra/printf/authors.txt
deleted file mode 100644 (file)
index e091bb8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-John Benediktsson
diff --git a/extra/printf/printf-docs.factor b/extra/printf/printf-docs.factor
deleted file mode 100644 (file)
index 3ca9c07..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-
-USING: help.syntax help.markup kernel prettyprint sequences strings ;
-
-IN: printf
-
-HELP: printf
-{ $values { "format-string" string } }
-{ $description "Writes the arguments (specified on the stack) formatted according to the format string." } 
-{ $examples 
-    { $example
-        "USING: printf ;"
-        "123 \"%05d\" printf"
-        "00123" }
-    { $example
-        "USING: printf ;"
-        "HEX: ff \"%04X\" printf"
-        "00FF" }
-    { $example
-        "USING: printf ;"
-        "1.23456789 \"%.3f\" printf"
-        "1.235" }
-    { $example 
-        "USING: printf ;"
-        "1234567890 \"%.5e\" printf"
-        "1.23457e+09" }
-    { $example
-        "USING: printf ;"
-        "12 \"%'#4d\" printf"
-        "##12" }
-    { $example
-        "USING: printf ;"
-        "1234 \"%+d\" printf"
-        "+1234" }
-} ;
-
-HELP: sprintf
-{ $values { "format-string" string } { "result" string } }
-{ $description "Returns the arguments (specified on the stack) formatted according to the format string as a result string." } 
-{ $see-also printf } ;
-
-ARTICLE: "printf" "Formatted printing"
-"The " { $vocab-link "printf" } " vocabulary is used for formatted printing.\n"
-{ $subsection printf }
-{ $subsection sprintf }
-"\n"
-"Several format specifications exist for handling arguments of different types, and specifying attributes for the result string, including such things as maximum width, padding, and decimals.\n"
-{ $table
-    { "%%"    "Single %" "" }
-    { "%P.Ds" "String format" "string" }
-    { "%P.DS" "String format uppercase" "string" }
-    { "%c"    "Character format" "char" } 
-    { "%C"    "Character format uppercase" "char" } 
-    { "%+Pd"   "Integer format"  "fixnum" }
-    { "%+P.De" "Scientific notation" "fixnum, float" }
-    { "%+P.DE" "Scientific notation" "fixnum, float" }
-    { "%+P.Df" "Fixed format" "fixnum, float" }
-    { "%+Px"   "Hexadecimal" "hex" }
-    { "%+PX"   "Hexadecimal uppercase" "hex" }
-}
-"\n"
-"A plus sign ('+') is used to optionally specify that the number should be formatted with a '+' preceeding it if positive.\n"
-"\n"
-"Padding ('P') is used to optionally specify the minimum width of the result string, the padding character, and the alignment.  By default, the padding character defaults to a space and the alignment defaults to right-aligned. For example:\n"
-{ $list
-    "\"%5s\" formats a string padding with spaces up to 5 characters wide."
-    "\"%08d\" formats an integer padding with zeros up to 3 characters wide."
-    "\"%'#5f\" formats a float padding with '#' up to 3 characters wide."
-    "\"%-10d\" formats an integer to 10 characters wide and left-aligns." 
-}
-"\n"
-"Digits ('D') is used to optionally specify the maximum digits in the result string. For example:\n"
-{ $list 
-    "\"%.3s\" formats a string to truncate at 3 characters (from the left)."
-    "\"%.10f\" formats a float to pad-right with zeros up to 10 digits beyond the decimal point."
-    "\"%.5E\" formats a float into scientific notation with zeros up to 5 digits beyond the decimal point, but before the exponent."
-} ;
-
-ABOUT: "printf"
-
-
diff --git a/extra/printf/printf-tests.factor b/extra/printf/printf-tests.factor
deleted file mode 100644 (file)
index 2123784..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-! Copyright (C) 2008 John Benediktsson
-! See http://factorcode.org/license.txt for BSD license
-
-USING: kernel printf tools.test ;
-
-[ "%s" printf ] must-infer 
-
-[ "%s" sprintf ] must-infer
-
-[ t ] [ "" "" sprintf = ] unit-test
-
-[ t ] [ "asdf" "asdf" sprintf = ] unit-test
-
-[ t ] [ "10" 10 "%d" sprintf = ] unit-test
-
-[ t ] [ "+10" 10 "%+d" sprintf = ] unit-test
-
-[ t ] [ "-10" -10 "%d" sprintf = ] unit-test
-
-[ t ] [ "  -10" -10 "%5d" sprintf = ] unit-test
-
-[ t ] [ "-0010" -10 "%05d" sprintf = ] unit-test
-
-[ t ] [ "+0010" 10 "%+05d" sprintf = ] unit-test
-
-[ t ] [ "123.456000" 123.456 "%f" sprintf = ] unit-test
-
-[ t ] [ "2.44" 2.436 "%.2f" sprintf = ] unit-test
-
-[ t ] [ "123.10" 123.1 "%01.2f" sprintf = ] unit-test
-
-[ t ] [ "1.2346" 1.23456789 "%.4f" sprintf = ] unit-test
-
-[ t ] [ "  1.23" 1.23456789 "%6.2f" sprintf = ] unit-test
-
-[ t ] [ "1.234000e+08" 123400000 "%e" sprintf = ] unit-test
-
-[ t ] [ "-1.234000e+08" -123400000 "%e" sprintf = ] unit-test
-
-[ t ] [ "1.234567e+08" 123456700 "%e" sprintf = ] unit-test
-
-[ t ] [ "3.625e+08" 362525200 "%.3e" sprintf = ] unit-test
-
-[ t ] [ "2.500000e-03" 0.0025 "%e" sprintf = ] unit-test
-
-[ t ] [ "2.500000E-03" 0.0025 "%E" sprintf = ] unit-test
-
-[ t ] [ "   1.0E+01" 10 "%10.1E" sprintf = ] unit-test
-
-[ t ] [ "  -1.0E+01" -10 "%10.1E" sprintf = ] unit-test
-
-[ t ] [ "  -1.0E+01" -10 "%+10.1E" sprintf = ] unit-test
-
-[ t ] [ "  +1.0E+01" 10 "%+10.1E" sprintf = ] unit-test
-
-[ t ] [ "-001.0E+01" -10 "%+010.1E" sprintf = ] unit-test
-
-[ t ] [ "+001.0E+01" 10 "%+010.1E" sprintf = ] unit-test
-
-[ t ] [ "ff" HEX: ff "%x" sprintf = ] unit-test
-
-[ t ] [ "FF" HEX: ff "%X" sprintf = ] unit-test
-
-[ t ] [ "0f" HEX: f "%02x" sprintf = ] unit-test
-
-[ t ] [ "0F" HEX: f "%02X" sprintf = ] unit-test
-
-[ t ] [ "2008-09-10" 
-        2008 9 10 "%04d-%02d-%02d" sprintf = ] unit-test
-
-[ t ] [ "Hello, World!" 
-        "Hello, World!" "%s" sprintf = ] unit-test
-
-[ t ] [ "printf test" 
-        "printf test" sprintf = ] unit-test
-
-[ t ] [ "char a = 'a'"
-        CHAR: a "char %c = 'a'" sprintf = ] unit-test
-
-[ t ] [ "00" HEX: 0 "%02x" sprintf = ] unit-test
-
-[ t ] [ "ff" HEX: ff "%02x" sprintf = ] unit-test
-
-[ t ] [ "0 message(s)"
-        0 "message" "%d %s(s)" sprintf = ] unit-test
-
-[ t ] [ "0 message(s) with %"
-        0 "message" "%d %s(s) with %%" sprintf = ] unit-test
-
-[ t ] [ "justif: \"left      \""
-        "left" "justif: \"%-10s\"" sprintf = ] unit-test
-
-[ t ] [ "justif: \"     right\""
-        "right" "justif: \"%10s\"" sprintf = ] unit-test
-
-[ t ] [ " 3: 0003 zero padded" 
-        3 " 3: %04d zero padded" sprintf = ] unit-test
-
-[ t ] [ " 3: 3    left justif" 
-        3 " 3: %-4d left justif" sprintf = ] unit-test
-
-[ t ] [ " 3:    3 right justif" 
-        3 " 3: %4d right justif" sprintf = ] unit-test
-
-[ t ] [ " -3: -003 zero padded"
-        -3 " -3: %04d zero padded" sprintf = ] unit-test
-
-[ t ] [ " -3: -3   left justif"
-        -3 " -3: %-4d left justif" sprintf = ] unit-test
-
-[ t ] [ " -3:   -3 right justif"
-        -3 " -3: %4d right justif" sprintf = ] unit-test
-
-[ t ] [ "There are 10 monkeys in the kitchen" 
-        10 "kitchen" "There are %d monkeys in the %s" sprintf = ] unit-test
-
-[ f ] [ "%d" 10 "%d" sprintf = ] unit-test
-
-[ t ] [ "[monkey]" "monkey" "[%s]" sprintf = ] unit-test
-
-[ t ] [ "[    monkey]" "monkey" "[%10s]" sprintf = ] unit-test
-
-[ t ] [ "[monkey    ]" "monkey" "[%-10s]" sprintf = ] unit-test
-
-[ t ] [ "[0000monkey]" "monkey" "[%010s]" sprintf = ] unit-test
-
-[ t ] [ "[####monkey]" "monkey" "[%'#10s]" sprintf = ] unit-test
-
-[ t ] [ "[many monke]" "many monkeys" "[%10.10s]" sprintf = ] unit-test
-
-
-
diff --git a/extra/printf/printf.factor b/extra/printf/printf.factor
deleted file mode 100644 (file)
index ac02efb..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-! Copyright (C) 2008 John Benediktsson
-! See http://factorcode.org/license.txt for BSD license
-
-USING: io io.encodings.ascii io.files io.streams.string combinators
-kernel sequences splitting strings math math.functions math.parser 
-macros fry peg.ebnf ascii unicode.case arrays quotations vectors ;
-
-IN: printf
-
-<PRIVATE
-
-: compose-all ( seq -- quot )
-    [ ] [ compose ] reduce ;
-
-: fix-sign ( string -- string )
-    dup CHAR: 0 swap index 0 = 
-      [ dup 0 swap [ [ CHAR: 0 = not ] keep digit? and ] find-from
-         [ dup 1- rot dup [ nth ] dip swap
-            {
-               { CHAR: - [ [ 1- ] dip remove-nth "-" prepend ] }
-               { CHAR: + [ [ 1- ] dip remove-nth "+" prepend ] }
-               [ drop swap drop ] 
-            } case 
-         ] [ drop ] if
-      ] when ;
-
-: >digits ( string -- digits ) 
-    [ 0 ] [ string>number ] if-empty ;
-
-: pad-digits ( string digits -- string' )
-    [ "." split1 ] dip [ CHAR: 0 pad-right ] [ head-slice ] bi "." glue ;
-
-: max-digits ( n digits -- n' )
-    10 swap ^ [ * round ] keep / ;
-
-: max-width ( string length -- string' ) 
-    short head ;
-
-: >exp ( x -- exp base )
-    [ 
-        abs 0 swap
-        [ dup [ 10.0 >= ] [ 1.0 < ] bi or ]
-        [ dup 10.0 >=
-          [ 10.0 / [ 1+ ] dip ]
-          [ 10.0 * [ 1- ] dip ] if
-        ] [ ] while 
-     ] keep 0 < [ neg ] when ;
-
-: exp>string ( exp base digits -- string )
-    [ max-digits ] keep -rot
-    [
-        [ 0 < "-" "+" ? ]
-        [ abs number>string 2 CHAR: 0 pad-left ] bi 
-        "e" -rot 3append
-    ]
-    [ number>string ] bi*
-    rot pad-digits prepend ;
-
-EBNF: parse-format-string
-
-zero      = "0"                  => [[ CHAR: 0 ]]
-char      = "'" (.)              => [[ second ]]
-
-pad-char  = (zero|char)?         => [[ CHAR: \s or ]]
-pad-align = ("-")?               => [[ \ pad-right \ pad-left ? ]] 
-pad-width = ([0-9])*             => [[ >digits ]]
-pad       = pad-align pad-char pad-width => [[ reverse >quotation dup first 0 = [ drop [ ] ] when ]]
-
-sign      = ("+")?               => [[ [ dup CHAR: - swap index [ "+" prepend ] unless ] [ ] ? ]]
-
-width_    = "." ([0-9])*         => [[ second >digits '[ _ max-width ] ]]
-width     = (width_)?            => [[ [ ] or ]] 
-
-digits_   = "." ([0-9])*         => [[ second >digits ]]
-digits    = (digits_)?           => [[ 6 or ]]
-
-fmt-%     = "%"                  => [[ [ "%" ] ]] 
-fmt-c     = "c"                  => [[ [ 1string ] ]]
-fmt-C     = "C"                  => [[ [ 1string >upper ] ]]
-fmt-s     = "s"                  => [[ [ ] ]]
-fmt-S     = "S"                  => [[ [ >upper ] ]]
-fmt-d     = "d"                  => [[ [ >fixnum number>string ] ]]
-fmt-e     = digits "e"           => [[ first '[ >exp _ exp>string ] ]]
-fmt-E     = digits "E"           => [[ first '[ >exp _ exp>string >upper ] ]]
-fmt-f     = digits "f"           => [[ first dup '[ >float _ max-digits number>string _ pad-digits ] ]] 
-fmt-x     = "x"                  => [[ [ >hex ] ]]
-fmt-X     = "X"                  => [[ [ >hex >upper ] ]]
-unknown   = (.)*                 => [[ "Unknown directive" throw ]]
-
-strings_  = fmt-c|fmt-C|fmt-s|fmt-S
-strings   = pad width strings_   => [[ reverse compose-all ]]
-
-numbers_  = fmt-d|fmt-e|fmt-E|fmt-f|fmt-x|fmt-X
-numbers   = sign pad numbers_    => [[ unclip-last prefix compose-all [ fix-sign ] append ]]
-
-formats   = "%" (strings|numbers|fmt-%|unknown) => [[ second '[ _ dip ] ]]
-
-plain-text = (!("%").)+          => [[ >string '[ _ swap ] ]]
-
-text      = (formats|plain-text)* => [[ reverse [ [ [ push ] keep ] append ] map ]]
-
-;EBNF
-
-PRIVATE>
-
-MACRO: printf ( format-string -- )
-    parse-format-string [ length ] keep compose-all '[ _ <vector> @ reverse [ write ] each ] ;
-
-: sprintf ( format-string -- result )
-    [ printf ] with-string-writer ; inline
-
-
diff --git a/extra/printf/summary.txt b/extra/printf/summary.txt
deleted file mode 100644 (file)
index da1aa31..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Format data according to a specified format string, and writes (or returns) the result string.  
diff --git a/extra/processing/gadget/gadget.factor b/extra/processing/gadget/gadget.factor
deleted file mode 100644 (file)
index 0b3bb6d..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-
-USING: kernel namespaces combinators
-       ui.gestures accessors ui.gadgets.frame-buffer ;
-
-IN: processing.gadget
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-TUPLE: processing-gadget < frame-buffer button-down button-up key-down key-up ;
-
-: <processing-gadget> ( -- gadget ) processing-gadget new-frame-buffer ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYMBOL: mouse-pressed-value
-SYMBOL: key-pressed-value
-
-SYMBOL: button-value
-SYMBOL: key-value
-
-: key-pressed?   ( -- ? ) key-pressed-value   get ;
-: mouse-pressed? ( -- ? ) mouse-pressed-value get ;
-
-: key    ( -- key ) key-value    get ;
-: button ( -- val ) button-value get ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-M: processing-gadget handle-gesture ( gesture gadget -- ? )
-   swap
-   {
-     {
-       [ dup key-down? ]
-       [
-         sym>> key-value set
-         key-pressed-value on
-         key-down>> dup [ call ] [ drop ] if
-         t
-       ]
-     }
-     {
-       [ dup key-up?   ]
-       [
-         key-pressed-value off
-         drop
-         key-up>> dup [ call ] [ drop ] if
-         t
-       ] }
-     {
-       [ dup button-down? ]
-       [
-         #>> button-value set
-         mouse-pressed-value on
-         button-down>> dup [ call ] [ drop ] if
-         t
-       ]
-     }
-     {
-       [ dup button-up? ]
-       [
-         mouse-pressed-value off
-         drop
-         button-up>> dup [ call ] [ drop ] if
-         t
-       ]
-     }
-     { [ t ] [ 2drop t ] }
-   }
-   cond ;
diff --git a/extra/processing/processing.factor b/extra/processing/processing.factor
deleted file mode 100644 (file)
index f351c98..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-
-USING: kernel namespaces threads combinators sequences arrays
-       math math.functions math.ranges random
-       opengl.gl opengl.glu vars multi-methods generalizations shuffle
-       ui
-       ui.gestures
-       ui.gadgets
-       combinators
-       combinators.lib
-       combinators.cleave
-       rewrite-closures bake bake.fry accessors newfx
-       processing.gadget math.geometry.rect
-       processing.shapes
-       colors ;
-       
-IN: processing
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: 2random ( a b -- num ) 2dup swap - 100 / <range> random ;
-
-: 1random ( b -- num ) 0 swap 2random ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: chance ( fraction -- ? ) 0 1 2random > ;
-
-: percent-chance ( percent -- ? ) 100 / chance ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-! : at-fraction ( seq fraction -- val ) over length 1- * nth-at ;
-
-: at-fraction ( seq fraction -- val ) over length 1- * at ;
-
-: at-fraction-of ( fraction seq -- val ) swap at-fraction ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-GENERIC: canonical-color-value ( obj -- color )
-
-METHOD: canonical-color-value { number } dup dup 1 rgba boa ;
-
-METHOD: canonical-color-value { array }
-   dup length
-   {
-     { 2 [ first2 >r dup dup r> rgba boa ] }
-     { 3 [ first3 1             rgba boa ] }
-     { 4 [ first4               rgba boa ] }
-   }
-   case ;
-
-! METHOD: canonical-color-value { rgba }
-!   { [ red>> ] [ green>> ] [ blue>> ] [ alpha>> ] } cleave 4array ;
-
-METHOD: canonical-color-value { color } ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: fill   ( value -- ) canonical-color-value >fill-color   ;
-: stroke ( value -- ) canonical-color-value >stroke-color ;
-
-! : no-fill   ( -- ) 0 fill-color>   set-fourth ;
-! : no-stroke ( -- ) 0 stroke-color> set-fourth ;
-
-: no-fill   ( -- ) fill-color>   0 >>alpha drop ;
-: no-stroke ( -- ) stroke-color> 0 >>alpha drop ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: stroke-weight ( w -- ) glLineWidth ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-! : quad-vertices ( x1 y1 x2 y2 x3 y3 x4 y4 -- )
-!   GL_POLYGON glBegin
-!     glVertex2d
-!     glVertex2d
-!     glVertex2d
-!     glVertex2d
-!   glEnd ;
-
-! : quad ( x1 y1 x2 y2 x3 y3 x4 y4 -- )
-
-!   8 ndup
-
-!   GL_FRONT_AND_BACK GL_FILL glPolygonMode
-!   fill-color> set-color
-
-!   quad-vertices
-  
-!   GL_FRONT_AND_BACK GL_LINE glPolygonMode
-!   stroke-color> set-color
-
-!   quad-vertices ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-! : ellipse-disk ( x y width height -- )
-!   glPushMatrix
-!     >r >r
-!     0 glTranslated
-!     r> r> 1 glScaled
-!     gluNewQuadric
-!       dup 0 0.5 20 1 gluDisk
-!     gluDeleteQuadric
-!   glPopMatrix ;
-
-! : ellipse-center ( x y width height -- )
-
-!   4dup
-
-!   GL_FRONT_AND_BACK GL_FILL glPolygonMode
-!   stroke-color> set-color
-
-!   ellipse-disk
-
-!   GL_FRONT_AND_BACK GL_FILL glPolygonMode
-!   fill-color> set-color
-
-!   [ 2 - ] bi@ ! [ stroke-width 1+ - ] bi@
-
-!   ellipse-disk ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-! SYMBOL: CENTER
-! SYMBOL: RADIUS
-! SYMBOL: CORNER
-! SYMBOL: CORNERS
-
-! SYMBOL: ellipse-mode-value
-
-! : ellipse-mode ( val -- ) ellipse-mode-value set ;
-
-! : ellipse-radius ( x y hori vert -- ) [ 2 * ] bi@ ellipse-center ;
-
-! : ellipse-corner ( x y width height -- )
-!   [ drop nip     2 / + ] 4keep
-!   [ nip rot drop 2 / + ] 4keep
-!   [ >r >r 2drop r> r>  ] 4keep
-!   4drop
-!   ellipse-center ;
-
-! : ellipse-corners ( x1 y1 x2 y2 -- )
-!   [ drop nip     + 2 /    ] 4keep
-!   [ nip rot drop + 2 /    ] 4keep
-!   [ drop nip     - abs 1+ ] 4keep
-!   [ nip rot drop - abs 1+ ] 4keep
-!   4drop
-!   ellipse-center ;
-
-! : ellipse ( a b c d -- )
-!   ellipse-mode-value get
-!     {
-!       { CENTER  [ ellipse-center ] }
-!       { RADIUS  [ ellipse-radius ] }
-!       { CORNER  [ ellipse-corner ] }
-!       { CORNERS [ ellipse-corners ] }
-!     }
-!   case ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-GENERIC: background ( value -- )
-
-METHOD: background { number }
-   dup dup 1 glClearColor
-   GL_COLOR_BUFFER_BIT glClear ;
-
-METHOD: background { array }
-   dup length
-   {
-     { 2 [ first2 >r dup dup r> glClearColor GL_COLOR_BUFFER_BIT glClear ] }
-     { 3 [ first3 1             glClearColor GL_COLOR_BUFFER_BIT glClear ] }
-     { 4 [ first4               glClearColor GL_COLOR_BUFFER_BIT glClear ] }
-   }
-   case ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: translate ( x y -- ) 0 glTranslated ;
-
-: rotate ( angle -- ) 0 0 1 glRotated ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: mouse ( -- point ) hand-loc get ;
-
-: mouse-x ( -- x ) mouse first  ;
-: mouse-y ( -- y ) mouse second ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-VAR: frame-rate-value
-
-: frame-rate ( fps -- ) 1000 swap / >frame-rate-value ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-! VAR: slate
-
-VAR: loop-flag
-
-: defaults ( -- )
-  0.8    background
-  ! CENTER ellipse-mode
-  60 frame-rate ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYMBOL: size-val
-
-: size ( seq -- ) size-val set ;
-
-: size* ( width height -- ) 2array size-val set ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYMBOL: setup-action
-SYMBOL: draw-action
-
-! : setup ( quot -- ) closed-quot setup-action set ;
-! : draw  ( quot -- ) closed-quot draw-action  set ;
-
-: setup ( quot -- ) setup-action set ;
-: draw  ( quot -- ) draw-action  set ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYMBOL: key-down-action
-SYMBOL: key-up-action
-
-: key-down ( quot -- ) closed-quot key-down-action set ;
-: key-up   ( quot -- ) closed-quot key-up-action   set ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYMBOL: button-down-action
-SYMBOL: button-up-action
-
-: button-down ( quot -- ) closed-quot button-down-action set ;
-: button-up   ( quot -- ) closed-quot button-up-action   set ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: start-processing-thread ( -- )
-  loop-flag get not
-    [
-      loop-flag on
-      [
-        [ loop-flag get ]
-        processing-gadget get frame-rate-value> '[ , relayout-1 , sleep ]
-        [ ]
-        while
-      ]
-      in-thread
-    ]
-  when ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: get-size ( -- size ) processing-gadget get rect-dim ;
-
-: width  ( -- width  ) get-size first ;
-: height ( -- height ) get-size second ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYMBOL: setup-called
-
-: setup-called? ( -- ? ) setup-called get ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: run ( -- )
-
-  loop-flag off
-
-  500 sleep
-
-  <processing-gadget>
-    size-val get >>pdim
-    dup "Processing" open-window
-
-    500 sleep
-
-    defaults
-
-    setup-called off
-
-    [
-      setup-called? not
-        [
-          setup-action get call
-          setup-called on
-        ]
-        [
-          draw-action get call
-        ]
-      if
-    ]
-      closed-quot >>action
-    
-    key-down-action get >>key-down
-    key-up-action   get >>key-up
-
-    button-down-action get >>button-down
-    button-up-action   get >>button-up
-    
-  processing-gadget set
-
-  start-processing-thread ;
\ No newline at end of file
index f2b659fe94d32f9e21cc7a35526c519f03f9347e..f40108e4d7105ff2b98453d4a07c2ba7da61f978 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (c) 2007 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: lists math math.primes ;
+USING: lists math math.primes.lists ;
 IN: project-euler.007
 
 ! http://projecteuler.net/index.php?section=problems&id=7
index c8bbe3d72e91083d3f75789475b6bee37f15f451..593f9cc0e898fc6dd19e09c907a8708bd49253ab 100644 (file)
@@ -19,10 +19,7 @@ IN: project-euler.010
 : euler010 ( -- answer )
     2000000 primes-upto sum ;
 
-! [ euler010 ] time
-! 266425 ms run / 10001 ms GC time
-
-! TODO: this takes well over one minute now that they changed the problem to
-! two million instead of one. the primes vocab could use some improvements
+! [ euler010 ] 100 ave-time
+! 15 ms ave run time - 0.41 SD (100 trials)
 
 MAIN: euler010
index c382d992f660db94992bd95c19cb2fecf23d7721..6245a794af257dfd4f3b46b3970b8076b192521e 100644 (file)
@@ -1,7 +1,8 @@
 ! Copyright (c) 2008 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: combinators.short-circuit kernel math
-    project-euler.common sequences sorting ;
+    project-euler.common sequences sorting
+    grouping ;
 IN: project-euler.052
 
 ! http://projecteuler.net/index.php?section=problems&id=52
diff --git a/extra/project-euler/057/057-tests.factor b/extra/project-euler/057/057-tests.factor
new file mode 100644 (file)
index 0000000..e10274c
--- /dev/null
@@ -0,0 +1,3 @@
+USING: project-euler.057 tools.test ;
+
+{ 153 } [ euler057 ] unit-test
diff --git a/extra/project-euler/057/057.factor b/extra/project-euler/057/057.factor
new file mode 100644 (file)
index 0000000..53240b0
--- /dev/null
@@ -0,0 +1,43 @@
+! Copyright (c) 2008 Samuel Tardieu
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel math math.functions math.parser sequences ;
+IN: project-euler.057
+
+! http://projecteuler.net/index.php?section=problems&id=57
+
+! DESCRIPTION
+! -----------
+
+! It is possible to show that the square root of two can be expressed
+! as an infinite continued fraction.
+
+! âˆš 2 = 1 + 1/(2 + 1/(2 + 1/(2 + ... ))) = 1.414213...
+
+! By expanding this for the first four iterations, we get:
+
+! 1 + 1/2 = 3/2 = 1.5
+! 1 + 1/(2 + 1/2) = 7/5 = 1.4
+! 1 + 1/(2 + 1/(2 + 1/2)) = 17/12 = 1.41666...
+! 1 + 1/(2 + 1/(2 + 1/(2 + 1/2))) = 41/29 = 1.41379...
+
+! The next three expansions are 99/70, 239/169, and 577/408, but the
+! eighth expansion, 1393/985, is the first example where the number of
+! digits in the numerator exceeds the number of digits in the
+! denominator.
+
+! In the first one-thousand expansions, how many fractions contain a
+! numerator with more digits than denominator?
+
+! SOLUTION
+! --------
+
+: longer-numerator? ( seq -- ? )
+    >fraction [ number>string length ] bi@ > ; inline
+
+: euler057 ( -- answer )
+    0 1000 [ drop 2 + recip dup 1+ longer-numerator? ] count nip ;
+
+! [ euler057 ] time
+! 3.375118 seconds
+
+MAIN: euler057
index 7bdf17ef684260c36cc65e0d64f5feac11811aff..e00e86865d9a1a99d2b4a863a3615b7d9d6b57b3 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (c) 2007 Samuel Tardieu.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays kernel lists lists.lazy math.algebra math math.functions
-    math.order math.primes math.ranges project-euler.common sequences ;
+    math.order math.primes.lists math.ranges project-euler.common sequences ;
 IN: project-euler.134
 
 ! http://projecteuler.net/index.php?section=problems&id=134
index 82d6a31c6691c744a3ccaa83f6c844d5cd088f13..297fb69de377aa61b9c7b306cad24778802567a6 100644 (file)
@@ -33,8 +33,8 @@ TUPLE: end { ways integer } ;
 
 C: <block> block
 C: <end> end
-: <failure> 0 <end> ; inline
-: <success> 1 <end> ; inline
+: <failure> ( -- end ) 0 <end> ; inline
+: <success> ( -- end ) 1 <end> ; inline
 
 : failure? ( t -- ? ) ways>> 0 = ; inline
 
index 35d9c65b538c1cc65de645555fbce855630f95e7..1a57a91e5eca093e617558b16ede89e1e6b2a95d 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays kernel make math math.functions math.matrices math.miller-rabin
     math.order math.parser math.primes.factors math.ranges math.ratios
-    sequences sequences.lib sorting strings unicode.case ;
+    sequences sorting strings unicode.case ;
 IN: project-euler.common
 
 ! A collection of words used by more than one Project Euler solution
@@ -42,7 +42,7 @@ IN: project-euler.common
     [ over rest rot first2 max rot + ] map nip ;
 
 : (sum-divisors) ( n -- sum )
-    dup sqrt >fixnum [1,b] [
+    dup sqrt >integer [1,b] [
         [ 2dup mod 0 = [ 2dup / + , ] [ drop ] if ] each
         dup perfect-square? [ sqrt >fixnum neg , ] [ drop ] if
     ] { } make sum ;
@@ -56,7 +56,7 @@ PRIVATE>
     >lower [ CHAR: a - 1+ ] sigma ;
 
 : cartesian-product ( seq1 seq2 -- seq1xseq2 )
-    swap [ swap [ 2array ] map-with ] map-with concat ;
+    swap [ swap [ 2array ] with map ] with map concat ;
 
 : log10 ( m -- n )
     log 10 log / ;
index 027e8fe50f20cf050f66a27f49162cee15c44508..318cf8a2bb33123cecc562a08fee322bdf69f916 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (c) 2007, 2008 Aaron Schaefer, Samuel Tardieu.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: definitions io io.files kernel math math.parser
+USING: definitions io io.files io.pathnames kernel math math.parser
     prettyprint project-euler.ave-time sequences vocabs vocabs.loader
     project-euler.001 project-euler.002 project-euler.003 project-euler.004
     project-euler.005 project-euler.006 project-euler.007 project-euler.008
@@ -15,13 +15,13 @@ USING: definitions io io.files kernel math math.parser
     project-euler.041 project-euler.042 project-euler.043 project-euler.044
     project-euler.045 project-euler.046 project-euler.047 project-euler.048
     project-euler.052 project-euler.053 project-euler.055 project-euler.056
-    project-euler.059 project-euler.067 project-euler.071 project-euler.073
-    project-euler.075 project-euler.076 project-euler.079 project-euler.092
-    project-euler.097 project-euler.099 project-euler.100 project-euler.116
-    project-euler.117 project-euler.134 project-euler.148 project-euler.150
-    project-euler.151 project-euler.164 project-euler.169 project-euler.173
-    project-euler.175 project-euler.186 project-euler.190 project-euler.203
-    project-euler.215 ;
+    project-euler.057 project-euler.059 project-euler.067 project-euler.071
+    project-euler.073 project-euler.075 project-euler.076 project-euler.079
+    project-euler.092 project-euler.097 project-euler.099 project-euler.100
+    project-euler.116 project-euler.117 project-euler.134 project-euler.148
+    project-euler.150 project-euler.151 project-euler.164 project-euler.169
+    project-euler.173 project-euler.175 project-euler.186 project-euler.190
+    project-euler.203 project-euler.215 ;
 IN: project-euler
 
 <PRIVATE
index ce3bc311be3d0e06cbc449cfa77bd6f437fe42c8..47c85a6c012dab9edf5df323dd25a7fcdb5a2fa3 100644 (file)
@@ -1,6 +1,6 @@
 
 USING: kernel namespaces arrays quotations sequences assocs combinators
-       mirrors math math.vectors random macros bake bake.fry ;
+       mirrors math math.vectors random macros fry ;
 
 IN: random-weighted
 
@@ -17,4 +17,4 @@ dup [ second ] map swap [ first ] map random-weighted swap nth ;
 
 MACRO: call-random-weighted ( exp -- )
   [ keys ] [ values <enum> >alist ] bi
-  '[ , random-weighted , case ] ;
+  '[ _ random-weighted _ case ] ;
index 8e9f0e25522e75de0015666e018c22ea04793ed5..dc764fd040b6894a3121b1b425479345dc9f36e7 100755 (executable)
@@ -1,6 +1,5 @@
 USING: kernel math sequences namespaces
-math.miller-rabin combinators.lib
-math.functions accessors random ;
+math.miller-rabin math.functions accessors random ;
 IN: random.blum-blum-shub
 
 ! Blum Blum Shub, n = pq, x_i+1 = x_i ^ 2 mod n
@@ -9,8 +8,12 @@ TUPLE: blum-blum-shub x n ;
 
 <PRIVATE
 
+: generate-bbs-prime ( numbits -- p )
+    dup random-prime dup 4 mod 3 =
+    [ nip ] [ drop generate-bbs-prime ] if ;
+
 : generate-bbs-primes ( numbits -- p q )
-    [ [ random-prime ] curry [ 4 mod 3 = ] generate ] dup bi ;
+    [ generate-bbs-prime ] [ generate-bbs-prime ] bi ;
 
 : next-bbs-bit ( bbs -- bit )
     dup [ x>> 2 ] [ n>> ] bi ^mod [ >>x drop ] [ 1 bitand ] bi ;
diff --git a/extra/raptor/authors.txt b/extra/raptor/authors.txt
deleted file mode 100755 (executable)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/extra/raptor/config.factor b/extra/raptor/config.factor
deleted file mode 100644 (file)
index 29e26d4..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-
-USING: namespaces threads
-       unix.process unix.linux.if unix.linux.ifreq unix.linux.route
-       raptor.cron ;
-
-IN: raptor
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-! Networking
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: configure-lo ( -- )
-  "lo" "127.0.0.1"      set-if-addr
-  "lo" { IFF_UP } flags set-if-flags ;
-
-: configure-eth1 ( -- )
-  "eth1" "192.168.1.10"                 set-if-addr
-  "eth1" { IFF_UP IFF_MULTICAST } flags set-if-flags ;
-
-: configure-route ( -- )
-  "0.0.0.0" "192.168.1.1" "0.0.0.0" { RTF_UP RTF_GATEWAY } flags route ;
-
-[
-  configure-lo
-  configure-eth1
-  configure-route
-] networking-hook set-global
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-! Filesystems
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-"/dev/hda1"     root-device     set-global
-
-{ "/dev/hda5" } swap-devices   set-global
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-! boot-hook
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-[
-                                    start-wait-loop
-
-  ! rcS.d
-
-  "mountvirtfs"                     start-service
-
-  ! "hostname.sh"                          start-service
-  "narodnik"                        set-hostname
-
-  "keymap.sh"                      start-service
-  "linux-restricted-modules-common" start-service
-  "udev"                            start-service
-  "mountdevsubfs"                  start-service
-  "module-init-tools"              start-service
-  "procps.sh"                      start-service
-
-  !  "checkroot.sh"                start-service
-
-                                   activate-swap
-                                   mount-root
-
-  "mtab"                           start-service
-  "checkfs.sh"                             start-service
-  "mountall.sh"                            start-service
-
-                                   start-networking
-!   "loopback" start-service
-!   "networking" start-service
-
-  "hwclock.sh"                     start-service
-  "displayconfig-hwprobe.py"       start-service
-  "screen"                         start-service
-  "x11-common"                     start-service
-  "bootmisc.sh"                            start-service
-  "urandom"                        start-service
-
-  ! rc2.d
-
-  "vbesave"                        start-service
-  "acpid"                          start-service
-  "powernowd.early"                start-service
-  "sysklogd"                       start-service
-  "klogd"                          start-service
-  "dbus"                           start-service
-  "apmd"                           start-service
-  "hotkey-setup"                   start-service
-  "laptop-mode"                            start-service
-  "makedev"                        start-service
-  "nvidia-kernel"                  start-service
-  "postfix"                        start-service
-  "powernowd"                      start-service
-  "ntp-server"                     start-service
-  "binfmt-support"                 start-service
-  "acpi-support"                   start-service
-  "rc.local"                       start-service
-  "rmnologin"                      start-service
-
-                                   schedule-cron-jobs
-
-  [ [ "/dev/tty2" tty-listener ] forever ] in-thread
-  [ [ "/dev/tty3" tty-listener ] forever ] in-thread
-  [ [ "/dev/tty4" tty-listener ] forever ] in-thread
-  [ [ "/dev/tty5" getty        ] forever ] in-thread
-  [ [ "/dev/tty6" getty        ] forever ] in-thread
-
-] boot-hook set-global
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-! reboot-hook
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-[
-  "acpi-support"                   stop-service
-  "apmd"                           stop-service
-  "dbus"                           stop-service
-  "hotkey-setup"                   stop-service
-  "laptop-mode"                    stop-service
-  "makedev"                        stop-service
-  "nvidia-kernel"                  stop-service
-  "powernowd"                      stop-service
-  "acpid"                          stop-service
-  "hwclock.sh"                             stop-service
-  "alsa-utils"                             stop-service
-  "klogd"                          stop-service
-  "binfmt-support"                 stop-service
-  "sysklogd"                        stop-service
-  "linux-restricted-modules-common" stop-service
-  "sendsigs"                       stop-service
-  "urandom"                        stop-service
-  "umountnfs.sh"                   stop-service
-  "networking"                             stop-service
-  "umountfs"                       stop-service
-  "umountroot"                             stop-service
-  "reboot"                         stop-service
-] reboot-hook set-global
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-! shutdown-hook
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-[
-  "acpi-support"                   stop-service
-  "apmd"                           stop-service
-  "dbus"                           stop-service
-  "hotkey-setup"                   stop-service
-  "laptop-mode"                    stop-service
-  "makedev"                        stop-service
-  "nvidia-kernel"                  stop-service
-  "postfix"                        stop-service
-  "powernowd"                      stop-service
-  "acpid"                          stop-service
-  "hwclock.sh"                             stop-service
-  "alsa-utils"                             stop-service
-  "klogd"                          stop-service
-  "binfmt-support"                 stop-service
-  "sysklogd"                       stop-service
-  "linux-restricted-modules-common" stop-service
-  "sendsigs"                       stop-service
-  "urandom"                        stop-service
-  "umountnfs.sh"                   stop-service
-  "umountfs"                       stop-service
-  "umountroot"                             stop-service
-  "halt"                           stop-service
-] shutdown-hook set-global
\ No newline at end of file
diff --git a/extra/raptor/cron/authors.txt b/extra/raptor/cron/authors.txt
deleted file mode 100755 (executable)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/extra/raptor/cron/cron.factor b/extra/raptor/cron/cron.factor
deleted file mode 100755 (executable)
index d818fb4..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-
-USING: kernel namespaces threads sequences calendar
-       combinators.lib debugger ;
-
-IN: raptor.cron
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-TUPLE: when minute hour day-of-month month day-of-week ;
-
-C: <when> when
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: slot-match? ( now-slot when-slot -- ? ) dup f = [ 2drop t ] [ member? ] if ;
-
-: minute-match? ( now when -- ? )
-  [ timestamp-minute ] [ when-minute ] bi* slot-match? ;
-
-: hour-match? ( now when -- ? )
-  [ timestamp-hour ] [ when-hour ] bi* slot-match? ;
-
-: day-of-month-match? ( now when -- ? )
-  [ timestamp-day ] [ when-day-of-month ] bi* slot-match? ;
-
-: month-match? ( now when -- ? )
-  [ timestamp-month ] [ when-month ] bi* slot-match? ;
-
-: day-of-week-match? ( now when -- ? )
-  [ day-of-week ] [ when-day-of-week ] bi* slot-match? ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: when=now? ( when -- ? )
-  now swap
-  { [ minute-match? ]
-    [ hour-match? ]
-    [ day-of-month-match? ]
-    [ month-match? ]
-    [ day-of-week-match? ] }
-  <--&& ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: recurring-job ( when quot -- )
-  [ swap when=now? [ try ] [ drop ] if 60000 sleep ] [ recurring-job ] 2bi ;
-
-: schedule ( when quot -- ) [ recurring-job ] 2curry in-thread ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYMBOL: cron-jobs-hourly
-SYMBOL: cron-jobs-daily
-SYMBOL: cron-jobs-weekly
-SYMBOL: cron-jobs-monthly
-
-: schedule-cron-jobs ( -- )
-  { 17 } f f f f         <when> [ cron-jobs-hourly  get call ] schedule
-  { 25 } { 6 } f f f     <when> [ cron-jobs-daily   get call ] schedule
-  { 47 } { 6 } f f { 7 } <when> [ cron-jobs-weekly  get call ] schedule
-  { 52 } { 6 } { 1 } f f <when> [ cron-jobs-monthly get call ] schedule ;
-
diff --git a/extra/raptor/cron/tags.txt b/extra/raptor/cron/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
diff --git a/extra/raptor/cronjobs.factor b/extra/raptor/cronjobs.factor
deleted file mode 100644 (file)
index 436fb85..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-
-USING: kernel namespaces threads arrays sequences
-       raptor raptor.cron ;
-
-IN: raptor
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-[
-    "/etc/cron.daily/apt"             fork-exec-arg
-    "/etc/cron.daily/aptitude"       fork-exec-arg
-    "/etc/cron.daily/bsdmainutils"    fork-exec-arg
-    "/etc/cron.daily/find.notslocate" fork-exec-arg
-    "/etc/cron.daily/logrotate"              fork-exec-arg
-    "/etc/cron.daily/man-db"         fork-exec-arg
-    "/etc/cron.daily/ntp-server"      fork-exec-arg
-    "/etc/cron.daily/slocate"        fork-exec-arg
-    "/etc/cron.daily/standard"       fork-exec-arg
-    "/etc/cron.daily/sysklogd"       fork-exec-arg
-    "/etc/cron.daily/tetex-bin"              fork-exec-arg
-] cron-jobs-daily set-global
-    
-[
-  "/etc/cron.weekly/cvs"                fork-exec-arg
-  "/etc/cron.weekly/man-db"            fork-exec-arg
-  "/etc/cron.weekly/ntp-server"                fork-exec-arg
-  "/etc/cron.weekly/popularity-contest" fork-exec-arg
-  "/etc/cron.weekly/sysklogd"          fork-exec-arg
-] cron-jobs-weekly set-global
-
-[
-  "/etc/cron.monthly/scrollkeeper" fork-exec-arg
-  "/etc/cron.monthly/standard"     fork-exec-arg
-] cron-jobs-monthly set-global
\ No newline at end of file
diff --git a/extra/raptor/raptor.factor b/extra/raptor/raptor.factor
deleted file mode 100755 (executable)
index c0605fe..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-
-USING: kernel parser namespaces threads arrays sequences unix unix.process
-       bake ;
-
-IN: raptor
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYMBOL: boot-hook
-SYMBOL: reboot-hook
-SYMBOL: shutdown-hook
-SYMBOL: networking-hook
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: reload-raptor-config ( -- )
-  "/etc/raptor/config.factor" run-file
-  "/etc/raptor/cronjobs.factor" run-file ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: fork-exec-wait ( pathname args -- )
-  fork dup 0 = [ drop exec drop ] [ 2nip wait-for-pid drop ] if ;
-
-: fork-exec-args-wait ( args -- ) [ first ] [ ] bi fork-exec-wait ;
-
-: fork-exec-arg ( arg -- ) 1array [ fork-exec-args-wait ] curry in-thread ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: forever ( quot -- ) [ call ] [ forever ] bi ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: start-service ( name -- ) "/etc/init.d/" " start" surround system drop ;
-: stop-service  ( name -- ) "/etc/init.d/" " stop"  surround system drop ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: getty ( tty -- ) `{ "/sbin/getty" "38400" , } fork-exec-args-wait ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-USING: io io.files io.streams.lines io.streams.plain io.streams.duplex
-       listener io.encodings.utf8 ;
-
-: tty-listener ( tty -- )
-  dup utf8 <file-reader> [
-    swap utf8 <file-writer> [
-      <duplex-stream> [
-        listener
-      ] with-stream
-    ] with-disposal
-  ] with-disposal ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-USING: unix.linux.swap unix.linux.fs ;
-
-SYMBOL: root-device
-SYMBOL: swap-devices
-
-: activate-swap ( -- ) swap-devices get [ 0 swapon drop ] each ;
-
-: mount-root ( -- ) root-device get "/" "ext3" MS_REMOUNT f mount drop ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: start-networking ( -- ) networking-hook  get call ;
-
-: set-hostname ( name -- ) `{ "/bin/hostname" , } fork-exec-args-wait ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: boot     ( -- ) boot-hook     get call ;
-: reboot   ( -- ) reboot-hook   get call ;
-: shutdown ( -- ) shutdown-hook get call ;
-
-MAIN: boot
-
diff --git a/extra/raptor/readme b/extra/raptor/readme
deleted file mode 100644 (file)
index dfb6890..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-
-Raptor Linux
-
-*** Introduction ***
-
-Raptor Linux is a mod of Ubuntu 6.06 (Dapper Drake)
-
-This is unlikely to work on another version of Ubuntu, much less
-another Linux distribution.
-
-*** Features ***
-
-  * /sbin/init is replaced with Factor
-  * Virtual terminals managed by Factor
-  * Listeners run on virtual terminals
-  * Native support for static ip networking
-  * Crontab replacement
-
-*** Install ***
-
-  # mkdir -v /etc/raptor
-
-  # cp -v /scratch/factor/extra/raptor/{config,cronjobs}.factor /etc/raptor
-
-  ( scratchpad ) USE: raptor
-  ( scratchpad ) reload-raptor-config
-  ( scratchpad ) save
-
-  # mv -v /sbin/{init,init.orig}
-
-  # cp -v /scratch/factor/factor /sbin/init
-
-  # cp -v /scratch/factor/factor.image /sbin/init.image
-
-*** Filesystems ***
-
-  # emacs /etc/raptor/config.factor
-
-Edit the root-device and swap-devices variables.
-
-*** Static IP networking ***
-
-If you use a static IP in your network then Factor can take care of
-networking.
-
-  # emacs /etc/raptor/config.factor
-
-  (change the settings accordingly)
-
-The udev system has a hook to bring up ethernet interfaces when they
-are detected. Let's remove this hook since we'll be bringing up the
-interface. Actually, we'll move it, not delete it.
-
-  # mv -v /etc/udev/rules.d/85-ifupdown.rules /root
-
-*** DHCP networking ***
-
-If you're using dhcp then we'll fall back on what Ubuntu offers. In
-your config.factor change the line :
-
-     start-networking
-
-to
-
-       "loopback"   start-service
-       "networking" start-service
-
-Add these to your reboot-hook and shutdown-hook :
-
-       "loopback"   stop-service
-       "networking" stop-service
-
-*** Editing the hooks ***
-
-The items in boot-hook correspond to the things in '/etc/rcS.d' and
-'/etc/rc2.d'. Feel free to add and remove items from that hook. For
-example, I removed the printer services. I also removed other things
-that I didn't feel were necessary on my system.
-
-Look for the line with the call to 'set-hostname' and edit it appropriately.
-
-*** Grub ***
-
-Edit your '/boot/grub/menu.lst'. Basically, copy and paste your
-current good entry. My default entry is this:
-
-title           Ubuntu, kernel 2.6.15-28-686
-root            (hd0,0)
-kernel          /boot/vmlinuz-2.6.15-28-686 root=/dev/hda1 ro quiet splash
-initrd          /boot/initrd.img-2.6.15-28-686
-savedefault
-boot
-
-I pasted a copy above it and edited it to look like this:
-
-title           Raptor, kernel 2.6.15-28-686
-root            (hd0,0)
-kernel          /boot/vmlinuz-2.6.15-28-686 root=/dev/hda1 ro quiet -run=ubuntu.dapper.boot
-initrd          /boot/initrd.img-2.6.15-28-686
-savedefault
-boot
-
-* Note that I removed the 'splash' kernel option
-
-* Note the '-run=ubuntu.dapper.boot' option. Unfortunately, this isn't
-  working yet...
-
-*** Boot ***
-
-Reboot or turn on your computer. Eventually, hopefully, you'll be at a
-Factor prompt. Boot your system:
-
-  ( scratchpad ) boot
-
-You'll probably be prompted to select a vocab. Select 'raptor'.
-
-*** Now what ***
-
-The virtual consoles are allocated like so:
-
-  1 - Main listener console
-  2 - listener
-  3 - listener
-  4 - listener
-  5 - getty
-  6 - getty
-
-So you're next step might be to alt-f5, login, and run startx.
-
-*** Join the fun ***
-
-Take a loot at what happens during run levels S and 2. Implement a
-Factor version of something. Let me know about it.
-
diff --git a/extra/raptor/tags.txt b/extra/raptor/tags.txt
deleted file mode 100644 (file)
index 6bf6830..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unportable
index 6a547ead24a3a1c9569c663794c45c65f7dc5ee6..1ce7f9c726cf4b5d426d0a5868ca6302bef444d2 100755 (executable)
@@ -3,7 +3,7 @@
 USING: accessors assocs math kernel shuffle generalizations\r
 words quotations arrays combinators sequences math.vectors\r
 io.styles prettyprint vocabs sorting io generic\r
-math.statistics math.order combinators.lib locals.types\r
+math.statistics math.order locals.types\r
 locals.definitions ;\r
 IN: reports.noise\r
 \r
@@ -21,19 +21,14 @@ IN: reports.noise
         { 2over 4 }\r
         { 2slip 2 }\r
         { 2swap 3 }\r
-        { 2with 2 }\r
-        { 2with* 3 }\r
         { 3curry 2 }\r
         { 3drop 1 }\r
         { 3dup 2 }\r
         { 3keep 3 }\r
         { 3nip 4 }\r
         { 3slip 3 }\r
-        { 3with 3 }\r
-        { 3with* 4 }\r
         { 4drop 2 }\r
         { 4dup 3 }\r
-        { 4slip 4 }\r
         { compose 1/2 }\r
         { curry 1/3 }\r
         { dip 1 }\r
@@ -74,9 +69,6 @@ IN: reports.noise
         { tuck 2 }\r
         { tuckd 4 }\r
         { with 1/2 }\r
-        { with* 2 }\r
-        { r> 1 }\r
-        { >r 1 }\r
 \r
         { bi 1/2 }\r
         { tri 1 }\r
@@ -113,18 +105,18 @@ M: array noise [ noise ] map vsum ;
     #! For very short words, noise doesn't count so much\r
     #! (so dup foo swap bar isn't penalized as badly).\r
     noise first2 {\r
-        { [ over 4 <= ] [ >r drop 0 r> ] }\r
-        { [ over 15 >= ] [ >r 2 * r> ] }\r
+        { [ over 4 <= ] [ [ drop 0 ] dip ] }\r
+        { [ over 15 >= ] [ [ 2 * ] dip ] }\r
         [ ]\r
     } cond\r
     {\r
         ! short words are easier to read\r
-        { [ dup 10 <= ] [ >r 2 / r> ] }\r
-        { [ dup 5 <= ] [ >r 3 / r> ] }\r
+        { [ dup 10 <= ] [ [ 2 / ] dip ] }\r
+        { [ dup 5 <= ] [ [ 3 / ] dip ] }\r
         ! long words are penalized even more\r
-        { [ dup 25 >= ] [ >r 2 * r> 20 max ] }\r
-        { [ dup 20 >= ] [ >r 5/3 * r> ] }\r
-        { [ dup 15 >= ] [ >r 3/2 * r> ] }\r
+        { [ dup 25 >= ] [ [ 2 * ] dip 20 max ] }\r
+        { [ dup 20 >= ] [ [ 5/3 * ] dip ] }\r
+        { [ dup 15 >= ] [ [ 3/2 * ] dip ] }\r
         [ ]\r
     } cond noise-factor ;\r
 \r
index 6d11c9d41c7ee4df3dbb18b60cf891b21df37c99..41e3d36c61e8e904011848c0e4ab68dadc64ac78 100644 (file)
@@ -1,6 +1,5 @@
 
-USING: kernel parser math quotations namespaces sequences macros
-bake bake.fry ;
+USING: kernel parser math quotations namespaces sequences macros fry ;
 
 IN: rewrite-closures
 
@@ -12,12 +11,12 @@ MACRO: set-parameters ( seq -- quot ) [set-parameters] ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: parametric-quot ( parameters quot -- quot ) '[ , set-parameters , call ] ;
+: parametric-quot ( parameters quot -- quot ) '[ _ set-parameters _ call ] ;
 
-: scoped-quot ( quot -- quot ) '[ , with-scope ] ;
+: scoped-quot ( quot -- quot ) '[ _ with-scope ] ;
 
 : closed-quot ( quot -- quot )
-  namestack swap '[ namestack [ , set-namestack @ ] dip set-namestack ] ;
+  namestack swap '[ namestack [ _ set-namestack @ ] dip set-namestack ] ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
diff --git a/extra/roman/authors.txt b/extra/roman/authors.txt
deleted file mode 100644 (file)
index 7c1b2f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/extra/roman/roman-docs.factor b/extra/roman/roman-docs.factor
deleted file mode 100644 (file)
index 4a8197f..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: help.markup help.syntax kernel math ;
-IN: roman
-
-HELP: >roman
-{ $values { "n" "an integer" } { "str" "a string" } }
-{ $description "Converts a number to its lower-case Roman Numeral equivalent." }
-{ $notes "The range for this word is 1-3999, inclusive." }
-{ $examples 
-    { $example "USING: io roman ;"
-               "56 >roman print"
-               "lvi"
-    }
-} ;
-
-HELP: >ROMAN
-{ $values { "n" "an integer" } { "str" "a string" } }
-{ $description "Converts a number to its upper-case Roman numeral equivalent." }
-{ $notes "The range for this word is 1-3999, inclusive." }
-{ $examples 
-    { $example "USING: io roman ;"
-               "56 >ROMAN print"
-               "LVI"
-    }
-} ;
-
-HELP: roman>
-{ $values { "str" "a string" } { "n" "an integer" } }
-{ $description "Converts a Roman numeral to an integer." }
-{ $notes "The range for this word is i-mmmcmxcix, inclusive." }
-{ $examples 
-    { $example "USING: prettyprint roman ;"
-               "\"lvi\" roman> ."
-               "56"
-    }
-} ;
-
-{ >roman >ROMAN roman> } related-words
-
-HELP: roman+
-{ $values { "str1" "a string" } { "str2" "a string" } { "str3" "a string" } }
-{ $description "Adds two Roman numerals." }
-{ $examples 
-    { $example "USING: io roman ;"
-               "\"v\" \"v\" roman+ print"
-               "x"
-    }
-} ;
-
-HELP: roman-
-{ $values { "str1" "a string" } { "str2" "a string" } { "str3" "a string" } }
-{ $description "Subtracts two Roman numerals." }
-{ $examples 
-    { $example "USING: io roman ;"
-               "\"x\" \"v\" roman- print"
-               "v"
-    }
-} ;
-
-{ roman+ roman- } related-words
-
-HELP: roman*
-{ $values { "str1" "a string" } { "str2" "a string" } { "str3" "a string" } }
-{ $description "Multiplies two Roman numerals." }
-{ $examples 
-    { $example "USING: io roman ;"
-        "\"ii\" \"iii\" roman* print"
-        "vi"
-    }
-} ;
-
-HELP: roman/i
-{ $values { "str1" "a string" } { "str2" "a string" } { "str3" "a string" } }
-{ $description "Computes the integer division of two Roman numerals." }
-{ $examples 
-    { $example "USING: io roman ;"
-        "\"v\" \"iv\" roman/i print"
-        "i"
-    }
-} ;
-
-HELP: roman/mod
-{ $values { "str1" "a string" } { "str2" "a string" } { "str3" "a string" } { "str4" "a string" } }
-{ $description "Computes the quotient and remainder of two Roman numerals." }
-{ $examples 
-    { $example "USING: kernel io roman ;"
-        "\"v\" \"iv\" roman/mod [ print ] bi@"
-        "i\ni"
-    }
-} ;
-
-{ roman* roman/i roman/mod } related-words
-
-HELP: ROMAN:
-{ $description "A parsing word that reads the next token and converts it to an integer." }
-{ $examples 
-    { $example "USING: prettyprint roman ;"
-               "ROMAN: v ."
-               "5"
-    }
-} ;
-
-ARTICLE: "roman" "Roman numerals"
-"The " { $vocab-link "roman" } " vocabulary can convert numbers to and from the Roman numeral system and can perform arithmetic given Roman numerals as input." $nl
-"A parsing word for literal Roman numerals:"
-{ $subsection POSTPONE: ROMAN: }
-"Converting to Roman numerals:"
-{ $subsection >roman }
-{ $subsection >ROMAN }
-"Converting Roman numerals to integers:"
-{ $subsection roman> }
-"Roman numeral arithmetic:"
-{ $subsection roman+ }
-{ $subsection roman- }
-{ $subsection roman* }
-{ $subsection roman/i }
-{ $subsection roman/mod } ;
-
-ABOUT: "roman"
diff --git a/extra/roman/roman-tests.factor b/extra/roman/roman-tests.factor
deleted file mode 100644 (file)
index 82084e0..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-USING: arrays kernel math roman roman.private sequences tools.test ;
-
-[ "i" ] [ 1 >roman ] unit-test
-[ "ii" ] [ 2 >roman ] unit-test
-[ "iii" ] [ 3 >roman ] unit-test
-[ "iv" ] [ 4 >roman ] unit-test
-[ "v" ] [ 5 >roman ] unit-test
-[ "vi" ] [ 6 >roman ] unit-test
-[ "vii" ] [ 7 >roman ] unit-test
-[ "viii" ] [ 8 >roman ] unit-test
-[ "ix" ] [ 9 >roman ] unit-test
-[ "x" ] [ 10 >roman ] unit-test
-[ "mdclxvi" ] [ 1666 >roman ] unit-test
-[ "mmmcdxliv" ] [ 3444 >roman ] unit-test
-[ "mmmcmxcix" ] [ 3999 >roman ] unit-test
-[ "MMMCMXCIX" ] [ 3999 >ROMAN ] unit-test
-[ 3999 ] [ 3999 >ROMAN roman> ] unit-test
-[ 1 ] [ 1 >roman roman> ] unit-test
-[ 2 ] [ 2 >roman roman> ] unit-test
-[ 3 ] [ 3 >roman roman> ] unit-test
-[ 4 ] [ 4 >roman roman> ] unit-test
-[ 5 ] [ 5 >roman roman> ] unit-test
-[ 6 ] [ 6 >roman roman> ] unit-test
-[ 7 ] [ 7 >roman roman> ] unit-test
-[ 8 ] [ 8 >roman roman> ] unit-test
-[ 9 ] [ 9 >roman roman> ] unit-test
-[ 10 ] [ 10 >roman roman> ] unit-test
-[ 1666 ] [ 1666 >roman roman> ] unit-test
-[ 3444 ] [ 3444 >roman roman> ] unit-test
-[ 3999 ] [ 3999 >roman roman> ] unit-test
-[ 0 >roman ] must-fail
-[ 4000 >roman ] must-fail
-[ "vi" ] [ "iii" "iii"  roman+ ] unit-test
-[ "viii" ] [ "x" "ii"  roman- ] unit-test
-[ "ix" ] [ "iii" "iii"  roman* ] unit-test
-[ "i" ] [ "iii" "ii" roman/i ] unit-test
-[ "i" "ii" ] [ "v" "iii"  roman/mod ] unit-test
-[ "iii" "iii"  roman- ] must-fail
-
-[ 30 ] [ ROMAN: xxx ] unit-test
diff --git a/extra/roman/roman.factor b/extra/roman/roman.factor
deleted file mode 100644 (file)
index 5ffdf67..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-! Copyright (C) 2007 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: arrays assocs kernel math math.order math.vectors
-namespaces make quotations sequences sequences.lib
-sequences.private strings unicode.case lexer parser ;
-IN: roman
-
-<PRIVATE
-
-: roman-digits ( -- seq )
-    { "m" "cm" "d" "cd" "c" "xc" "l" "xl" "x" "ix" "v" "iv" "i" } ;
-
-: roman-values ( -- seq )
-    { 1000 900 500 400 100 90 50 40 10 9 5 4 1 } ;
-
-ERROR: roman-range-error n ;
-
-: roman-range-check ( n -- )
-    dup 1 3999 between? [ drop ] [ roman-range-error ] if ;
-
-: roman<= ( ch1 ch2 -- ? )
-    [ 1string roman-digits index ] bi@ >= ;
-
-: roman>n ( ch -- n )
-    1string roman-digits index roman-values nth ;
-
-: (>roman) ( n -- )
-    roman-values roman-digits [
-        >r /mod swap r> <repetition> concat %
-    ] 2each drop ;
-
-: (roman>) ( seq -- n )
-    dup [ roman>n ] map swap all-eq? [
-        sum
-    ] [
-        first2 swap -
-    ] if ;
-
-PRIVATE>
-
-: >roman ( n -- str )
-    dup roman-range-check [
-        (>roman)
-    ] "" make ;
-
-: >ROMAN ( n -- str ) >roman >upper ;
-
-: roman> ( str -- n )
-    >lower [ roman<= ] monotonic-split [
-        (roman>)
-    ] map sum ;
-
-<PRIVATE
-
-: 2roman> ( str1 str2 -- m n )
-    [ roman> ] bi@ ;
-
-: binary-roman-op ( str1 str2 quot -- str3 )
-    >r 2roman> r> call >roman ; inline
-
-PRIVATE>
-
-: roman+ ( str1 str2 -- str3 )
-    [ + ] binary-roman-op ;
-
-: roman- ( str1 str2 -- str3 )
-    [ - ] binary-roman-op ;
-
-: roman* ( str1 str2 -- str3 )
-    [ * ] binary-roman-op ;
-
-: roman/i ( str1 str2 -- str3 )
-    [ /i ] binary-roman-op ;
-
-: roman/mod ( str1 str2 -- str3 str4 )
-    [ /mod ] binary-roman-op >r >roman r> ;
-
-: ROMAN: scan roman> parsed ; parsing
diff --git a/extra/roman/summary.txt b/extra/roman/summary.txt
deleted file mode 100644 (file)
index f6d018c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Roman numerals library
diff --git a/extra/roman/tags.txt b/extra/roman/tags.txt
deleted file mode 100644 (file)
index 8b13789..0000000
+++ /dev/null
@@ -1 +0,0 @@
-
index 643f8852d936ef03333452371a5c561222eec92c..26f73d49386d28b406086e1dc7d0be90da9b8e1a 100644 (file)
@@ -7,6 +7,4 @@ VAR: self
 
 : with-self ( quot obj -- ) [ >self call ] with-scope ;
 
-: save-self ( quot -- ) self> >r self> clone >self call r> >self ;
-
-! : save-self ( quot -- ) [ self> clone >self call ] with-scope ;
\ No newline at end of file
+: save-self ( quot -- ) self> [ self> clone >self call ] dip >self ;
diff --git a/extra/sequences/complex-components/authors.txt b/extra/sequences/complex-components/authors.txt
deleted file mode 100644 (file)
index f13c9c1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Joe Groff
diff --git a/extra/sequences/complex-components/complex-components-docs.factor b/extra/sequences/complex-components/complex-components-docs.factor
deleted file mode 100644 (file)
index 386735a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-USING: help.markup help.syntax math multiline
-sequences sequences.complex-components ;
-IN: sequences.complex-components
-
-ARTICLE: "sequences.complex-components" "Complex component virtual sequences"
-"The " { $link complex-components } " class wraps a sequence of " { $link complex } " number values, presenting a sequence of " { $link real } " values made by interleaving the real and imaginary parts of the complex values in the original sequence."
-{ $subsection complex-components }
-{ $subsection <complex-components> } ;
-
-ABOUT: "sequences.complex-components"
-
-HELP: complex-components
-{ $class-description "Sequence wrapper class that transforms a sequence of " { $link complex } " number values into a sequence of " { $link real } " values, interleaving the real and imaginary parts of the complex values in the original sequence." }
-{ $examples { $example <"
-USING: prettyprint sequences arrays sequences.complex-components ;
-{ C{ 1.0 -1.0 } -2.0 C{ 3.0 1.0 } } <complex-components> >array .
-"> "{ 1.0 -1.0 -2.0 0 3.0 1.0 }" } } ;
-
-HELP: <complex-components>
-{ $values { "sequence" sequence } { "complex-components" complex-components } }
-{ $description "Wraps " { $snippet "sequence" } " in a " { $link complex-components } " wrapper." }
-{ $examples
-{ $example <"
-USING: prettyprint sequences arrays
-sequences.complex-components ;
-{ C{ 1.0 -1.0 } -2.0 C{ 3.0 1.0 } } <complex-components> third .
-"> "-2.0" }
-{ $example <"
-USING: prettyprint sequences arrays
-sequences.complex-components ;
-{ C{ 1.0 -1.0 } -2.0 C{ 3.0 1.0 } } <complex-components> fourth .
-"> "0" }
-} ;
-
-{ complex-components <complex-components> } related-words
diff --git a/extra/sequences/complex-components/complex-components-tests.factor b/extra/sequences/complex-components/complex-components-tests.factor
deleted file mode 100644 (file)
index f0c8e92..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-USING: sequences.complex-components
-kernel sequences tools.test arrays accessors ;
-IN: sequences.complex-components.tests
-
-: test-array ( -- x )
-    { C{ 1.0 2.0 } 3.0 C{ 5.0 6.0 } } <complex-components> ;
-
-[ 6 ] [ test-array length ] unit-test
-
-[ 1.0 ] [ test-array first  ] unit-test
-[ 2.0 ] [ test-array second ] unit-test
-[ 3.0 ] [ test-array third  ] unit-test
-[ 0   ] [ test-array fourth ] unit-test
-
-[ { 1.0 2.0 3.0 0 5.0 6.0 } ] [ test-array >array ] unit-test
-
diff --git a/extra/sequences/complex-components/complex-components.factor b/extra/sequences/complex-components/complex-components.factor
deleted file mode 100644 (file)
index ae80897..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-USING: accessors kernel math math.functions combinators
-sequences sequences.private ;
-IN: sequences.complex-components
-
-TUPLE: complex-components seq ;
-INSTANCE: complex-components sequence
-
-: <complex-components> ( sequence -- complex-components )
-    complex-components boa ; inline
-
-<PRIVATE
-
-: complex-components@ ( n seq -- remainder n' seq' )
-    [ [ 1 bitand ] [ -1 shift ] bi ] [ seq>> ] bi* ; inline
-: complex-component ( remainder complex -- component )
-    swap {
-        { 0 [ real-part ] }
-        { 1 [ imaginary-part ] }
-    } case ;
-
-PRIVATE>
-
-M: complex-components length
-    seq>> length 1 shift ;
-M: complex-components nth-unsafe
-    complex-components@ nth-unsafe complex-component ;
-M: complex-components set-nth-unsafe
-    immutable ;
diff --git a/extra/sequences/complex-components/summary.txt b/extra/sequences/complex-components/summary.txt
deleted file mode 100644 (file)
index af00158..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Virtual sequence wrapper to convert complex values into real value pairs
diff --git a/extra/sequences/complex-components/tags.txt b/extra/sequences/complex-components/tags.txt
deleted file mode 100644 (file)
index 64cdcd9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-sequences
-math
diff --git a/extra/sequences/complex/authors.txt b/extra/sequences/complex/authors.txt
deleted file mode 100644 (file)
index f13c9c1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Joe Groff
diff --git a/extra/sequences/complex/complex-docs.factor b/extra/sequences/complex/complex-docs.factor
deleted file mode 100644 (file)
index 65dd520..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-USING: help.markup help.syntax math multiline
-sequences sequences.complex ;
-IN: sequences.complex
-
-ARTICLE: "sequences.complex" "Complex virtual sequences"
-"The " { $link complex-sequence } " class wraps a sequence of " { $link real } " number values, presenting a sequence of " { $link complex } " values made by treating the underlying sequence as pairs of alternating real and imaginary values."
-{ $subsection complex-sequence }
-{ $subsection <complex-sequence> } ;
-
-ABOUT: "sequences.complex"
-
-HELP: complex-sequence
-{ $class-description "Sequence wrapper class that transforms a sequence of " { $link real } " number values into a sequence of " { $link complex } " values, treating the underlying sequence as pairs of alternating real and imaginary values."  }
-{ $examples { $example <"
-USING: prettyprint
-specialized-arrays.double sequences.complex
-sequences arrays ;
-double-array{ 1.0 -1.0 -2.0 2.0 3.0 0.0 } <complex-sequence> >array .
-"> "{ C{ 1.0 -1.0 } C{ -2.0 2.0 } C{ 3.0 0.0 } }" } } ;
-
-HELP: <complex-sequence>
-{ $values { "sequence" sequence } { "complex-sequence" complex-sequence } }
-{ $description "Wraps " { $snippet "sequence" } " in a " { $link complex-sequence } "." }
-{ $examples { $example <"
-USING: prettyprint
-specialized-arrays.double sequences.complex
-sequences arrays ;
-double-array{ 1.0 -1.0 -2.0 2.0 3.0 0.0 } <complex-sequence> second .
-"> "C{ -2.0 2.0 }" } } ;
-
-{ complex-sequence <complex-sequence> } related-words
diff --git a/extra/sequences/complex/complex-tests.factor b/extra/sequences/complex/complex-tests.factor
deleted file mode 100644 (file)
index 5861bc8..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-USING: specialized-arrays.float sequences.complex
-kernel sequences tools.test arrays accessors ;
-IN: sequences.complex.tests
-
-: test-array ( -- x )
-    float-array{ 1.0 2.0 3.0 4.0 } clone <complex-sequence> ;
-: odd-length-test-array ( -- x )
-    float-array{ 1.0 2.0 3.0 4.0 5.0 } clone <complex-sequence> ;
-
-[ 2 ] [ test-array length ] unit-test
-[ 2 ] [ odd-length-test-array length ] unit-test
-
-[ C{ 1.0 2.0 } ] [ test-array first ] unit-test
-[ C{ 3.0 4.0 } ] [ test-array second ] unit-test
-
-[ { C{ 1.0 2.0 } C{ 3.0 4.0 } } ]
-[ test-array >array ] unit-test
-
-[ float-array{ 1.0 2.0 5.0 6.0 } ]
-[ test-array [ C{ 5.0 6.0 } 1 rot set-nth ] [ seq>> ] bi ]
-unit-test
-
-[ float-array{ 7.0 0.0 3.0 4.0 } ]
-[ test-array [ 7.0 0 rot set-nth ] [ seq>> ] bi ]
-unit-test
-
diff --git a/extra/sequences/complex/complex.factor b/extra/sequences/complex/complex.factor
deleted file mode 100644 (file)
index 93f9727..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-USING: accessors kernel math math.functions
-sequences sequences.private ;
-IN: sequences.complex
-
-TUPLE: complex-sequence seq ;
-INSTANCE: complex-sequence sequence
-
-: <complex-sequence> ( sequence -- complex-sequence )
-    complex-sequence boa ; inline
-
-<PRIVATE
-
-: complex@ ( n seq -- n' seq' )
-    [ 1 shift ] [ seq>> ] bi* ; inline
-
-PRIVATE>
-
-M: complex-sequence length
-    seq>> length -1 shift ;
-M: complex-sequence nth-unsafe
-    complex@ [ nth-unsafe ] [ [ 1+ ] dip nth-unsafe ] 2bi rect> ;
-M: complex-sequence set-nth-unsafe
-    complex@
-    [ [ real-part      ] [    ] [ ] tri* set-nth-unsafe ]
-    [ [ imaginary-part ] [ 1+ ] [ ] tri* set-nth-unsafe ] 3bi ;
diff --git a/extra/sequences/complex/summary.txt b/extra/sequences/complex/summary.txt
deleted file mode 100644 (file)
index d94c4ba..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Virtual sequence wrapper to convert real pairs into complex values
diff --git a/extra/sequences/complex/tags.txt b/extra/sequences/complex/tags.txt
deleted file mode 100644 (file)
index 64cdcd9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-sequences
-math
diff --git a/extra/sequences/lib/authors.txt b/extra/sequences/lib/authors.txt
deleted file mode 100644 (file)
index 07c1c4a..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Eduardo Cavazos
-Doug Coleman
diff --git a/extra/sequences/lib/lib-docs.factor b/extra/sequences/lib/lib-docs.factor
deleted file mode 100755 (executable)
index e279230..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-USING: help.syntax help.markup kernel prettyprint sequences\r
-quotations math ;\r
-IN: sequences.lib\r
-\r
-HELP: map-withn\r
-{ $values { "seq" sequence } { "quot" quotation } { "n" number } { "newseq" sequence } }\r
-{ $description "A generalisation of " { $link map } ". The first " { $snippet "n" } " items after the quotation will be "\r
-"passed to the quotation given to map-withn for each element in the sequence."\r
-} \r
-{ $examples\r
-  { $example "USING: math sequences.lib prettyprint ;" "1 2 3 4 { 6 7 8 9 10 } [ + + + + ] 4 map-withn .s" "{ 16 17 18 19 20 }" }\r
-}\r
-{ $see-also each-withn } ;\r
-\r
-HELP: each-withn\r
-{ $values { "seq" sequence } { "quot" quotation } { "n" number } }\r
-{ $description "A generalisation of " { $link each } ". The first " { $snippet "n" } " items after the quotation will be "\r
-"passed to the quotation given to each-withn for each element in the sequence."\r
-} \r
-{ $see-also map-withn } ;\r
-\r
-HELP: randomize\r
-{ $values { "seq" sequence } { "seq'" sequence } }\r
-{ $description "Shuffle the elements in the sequence randomly, returning the new sequence." } ;\r
-\r
-HELP: enumerate\r
-{ $values { "seq" sequence } { "seq'" sequence } }\r
-{ $description "Returns a new sequence where each element is an array of { index, value }" } ;\r
-\r
diff --git a/extra/sequences/lib/lib-tests.factor b/extra/sequences/lib/lib-tests.factor
deleted file mode 100755 (executable)
index 509d9b1..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-USING: arrays kernel sequences sequences.lib math math.functions math.ranges
-    tools.test strings ;
-IN: sequences.lib.tests
-
-[ 1 2 { 3 4 } [ + + drop ] 2 each-withn  ] must-infer
-{ 13 } [ 1 2 { 3 4 } [ + + ] 2 each-withn + ] unit-test
-
-[ 1 2 { 3 4 } [ + + ] 2 map-withn ] must-infer
-{ { 6 7 } } [ 1 2 { 3 4 } [ + + ] 2 map-withn ] unit-test
-{ { 16 17 18 19 20 } } [ 1 2 3 4 { 6 7 8 9 10 } [ + + + + ] 4 map-withn ] unit-test
-[ { 910 911 912 } ] [ 10 900 3 [ + + ] map-with2 ] unit-test
-
-[ 10 ] [ { 1 2 3 4 } [ + ] reduce* ] unit-test
-[ 24 ] [ { 1 2 3 4 } [ * ] reduce* ] unit-test
-
-[ -4 ] [ 1 -4 [ abs ] higher ] unit-test
-[ 1 ] [ 1 -4 [ abs ] lower ] unit-test
-
-[ { 1 2 3 4 } ] [ { { 1 2 3 4 } { 1 2 3 } } longest ] unit-test
-[ { 1 2 3 4 } ] [ { { 1 2 3 } { 1 2 3 4 } } longest ] unit-test
-
-[ { 1 2 3 } ] [ { { 1 2 3 4 } { 1 2 3 } } shortest ] unit-test
-[ { 1 2 3 } ] [ { { 1 2 3 } { 1 2 3 4 } } shortest ] unit-test
-
-[ 3 ] [ 1 3 bigger ] unit-test
-[ 1 ] [ 1 3 smaller ] unit-test
-
-[ "abd" ] [ "abc" "abd" bigger ] unit-test
-[ "abc" ] [ "abc" "abd" smaller ] unit-test
-
-[ "abe" ] [ { "abc" "abd" "abe" } biggest ] unit-test
-[ "abc" ] [ { "abc" "abd" "abe" } smallest ] unit-test
-
-[ 1 3 ] [ { 1 2 3 } minmax ] unit-test
-[ -11 -9 ] [ { -11 -10 -9 } minmax ] unit-test
-[ -1/0. 1/0. ] [ { -1/0. 1/0. -11 -10 -9 } minmax ] unit-test
-
-[ { { 1 } { -1 5 } { 2 4 } } ]
-[ { 1 -1 5 2 4 } [ < ] monotonic-split [ >array ] map ] unit-test
-[ { { 1 1 1 1 } { 2 2 } { 3 } { 4 } { 5 } { 6 6 6 } } ]
-[ { 1 1 1 1 2 2 3 4 5 6 6 6 } [ = ] monotonic-split [ >array ] map ] unit-test
-
-[ { 1 9 25 } ] [ { 1 3 5 6 } [ sq ] [ even? ] map-until ] unit-test
-[ { 2 4 } ] [ { 2 4 1 3 } [ even? ] take-while ] unit-test
-
-[ { { 0 0 } { 1 0 } { 0 1 } { 1 1 } } ] [ 2 2 exact-strings ] unit-test
-[ t ] [ "ab" 4 strings [ >string ] map "abab" swap member? ] unit-test
-[ { { } { 1 } { 2 } { 1 2 } } ] [ { 1 2 } power-set ] unit-test
-
-[ 1 2 { 3 4 } [ + + ] 2 map-withn ] must-infer
-{ { 6 7 } } [ 1 2 { 3 4 } [ + + ] 2 map-withn ] unit-test
-{ { 16 17 18 19 20 } } [ 1 2 3 4 { 6 7 8 9 10 } [ + + + + ] 4 map-withn ] unit-test
-[ 1 2 { 3 4 } [ + + drop ] 2 each-withn  ] must-infer
-{ 13 } [ 1 2 { 3 4 } [ + + ] 2 each-withn + ] unit-test
-[ { 910 911 912 } ] [ 10 900 3 [ + + ] map-with2 ] unit-test
-
-[ { { 0 1 } { 1 2 } { 2 3 } } ] [ { 1 2 3 } enumerate ] unit-test
-
diff --git a/extra/sequences/lib/lib.factor b/extra/sequences/lib/lib.factor
deleted file mode 100755 (executable)
index 72944c0..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-! Copyright (C) 2007 Slava Pestov, Chris Double, Doug Coleman,
-!                    Eduardo Cavazos, Daniel Ehrenberg.
-! See http://factorcode.org/license.txt for BSD license.
-USING: combinators.lib kernel sequences math namespaces make
-assocs random sequences.private shuffle math.functions arrays
-math.parser math.private sorting strings ascii macros assocs.lib
-quotations hashtables math.order locals generalizations
-math.ranges random fry ;
-IN: sequences.lib
-
-: each-withn ( seq quot n -- ) nwith each ; inline
-
-: each-with ( seq quot -- ) with each ; inline
-
-: each-with2 ( obj obj list quot -- ) 2 each-withn ; inline
-
-: map-withn ( seq quot n -- newseq ) nwith map ; inline
-
-: map-with ( seq quot -- ) with map ; inline
-
-: map-with2 ( obj obj list quot -- newseq ) 2 map-withn ; inline
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: each-percent ( seq quot -- )
-  [
-    dup length
-    dup [ / ] curry
-    [ 1+ ] prepose
-  ] dip compose
-  2each ;                       inline
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: reduce* ( seq quot -- result ) [ ] swap map-reduce ; inline
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: higher ( a b quot -- c ) [ compare +gt+ eq? ] curry most ; inline
-
-: lower  ( a b quot -- c ) [ compare +lt+ eq? ] curry most ; inline
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: longer  ( a b -- c ) [ length ] higher ;
-
-: shorter ( a b -- c ) [ length ] lower ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: longest ( seq -- item ) [ longer ] reduce* ;
-
-: shortest ( seq -- item ) [ shorter ] reduce* ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: bigger ( a b -- c ) [ ] higher ;
-
-: smaller ( a b -- c ) [ ] lower ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: biggest ( seq -- item ) [ bigger ] reduce* ;
-
-: smallest ( seq -- item ) [ smaller ] reduce* ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: minmax ( seq -- min max )
-    #! find the min and max of a seq in one pass
-    1/0. -1/0. rot [ tuck max [ min ] dip ] each ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: ,, ( obj -- ) building get peek push ;
-: v, ( -- ) V{ } clone , ;
-: ,v ( -- ) building get dup peek empty? [ dup pop* ] when drop ;
-
-: (monotonic-split) ( seq quot -- newseq )
-    [
-        [ dup unclip suffix ] dip
-        v, [ pick ,, call [ v, ] unless ] curry 2each ,v
-    ] { } make ;
-
-: monotonic-split ( seq quot -- newseq )
-    over empty? [ 2drop { } ] [ (monotonic-split) ] if ;
-
-ERROR: element-not-found ;
-: split-around ( seq quot -- before elem after )
-    dupd find over [ element-not-found ] unless
-    [ cut rest ] dip swap ; inline
-
-: map-until ( seq quot pred -- newseq )
-    '[ [ @ dup @ [ drop t ] [ , f ] if ] find 2drop ] { } make ;
-
-: take-while ( seq quot -- newseq )
-    [ not ] compose
-    [ find drop [ head-slice ] when* ] curry
-    [ dup ] prepose keep like ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-<PRIVATE
-: translate-string ( n alphabet out-len -- seq )
-    [ drop /mod ] with map nip  ;
-
-: map-alphabet ( alphabet seq[seq] -- seq[seq] )
-    [ [ swap nth ] with map ] with map ;
-
-: exact-number-strings ( n out-len -- seqs )
-    [ ^ ] 2keep [ translate-string ] 2curry map ;
-
-: number-strings ( n max-length -- seqs )
-    1+ [ exact-number-strings ] with map concat ;
-PRIVATE>
-
-: exact-strings ( alphabet length -- seqs )
-    [ dup length ] dip exact-number-strings map-alphabet ;
-
-: strings ( alphabet length -- seqs )
-    [ dup length ] dip number-strings map-alphabet ;
-
-: switches ( seq1 seq -- subseq )
-    ! seq1 is a sequence of ones and zeroes
-    [ [ length ] keep [ nth 1 = ] curry filter ] dip
-    [ nth ] curry { } map-as ;
-
-: power-set ( seq -- subsets )
-    2 over length exact-number-strings swap [ switches ] curry map ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-<PRIVATE
-: (attempt-each-integer) ( i n quot -- result )
-    [
-        iterate-step roll
-        [ 3nip ] [ iterate-next (attempt-each-integer) ] if*
-    ] [ 3drop f ] if-iterate? ; inline recursive
-PRIVATE>
-
-: attempt-each ( seq quot -- result )
-    (each) iterate-prep (attempt-each-integer) ; inline
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: randomize ( seq -- seq' )
-    dup length 1 (a,b] [ dup random pick exchange ] each ;
-
-: enumerate ( seq -- seq' ) <enum> >alist ;
diff --git a/extra/sequences/lib/summary.txt b/extra/sequences/lib/summary.txt
deleted file mode 100644 (file)
index e389b41..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Non-core sequence words
diff --git a/extra/sequences/lib/tags.txt b/extra/sequences/lib/tags.txt
deleted file mode 100644 (file)
index 42d711b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-collections
index 829555cfb12be571a25011d19eca63996c24b311..d64da6efe6ce6f5b1fd25ac982aff5e07dd4b2b3 100644 (file)
@@ -16,7 +16,7 @@ C: <merged> merged
     dupd <2merged> swap like ;
 
 : 3merge ( seq1 seq2 seq3 -- seq )
-    pick >r <3merged> r> like ;
+    pick [ <3merged> ] dip like ;
 
 M: merged length seqs>> [ length ] map sum ;
 
diff --git a/extra/sequences/n-based/authors.txt b/extra/sequences/n-based/authors.txt
new file mode 100644 (file)
index 0000000..f13c9c1
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
diff --git a/extra/sequences/n-based/n-based-docs.factor b/extra/sequences/n-based/n-based-docs.factor
new file mode 100644 (file)
index 0000000..6c56300
--- /dev/null
@@ -0,0 +1,66 @@
+! (c)2008 Joe Groff, see BSD license etc.
+USING: help.markup help.syntax kernel math multiline sequences ;
+IN: sequences.n-based
+
+HELP: <n-based-assoc>
+{ $values { "seq" sequence } { "base" integer } { "n-based-assoc" n-based-assoc } }
+{ $description "Wraps " { $snippet "seq" } " in an " { $link n-based-assoc } " wrapper." }
+{ $examples
+{ $example <"
+USING: assocs prettyprint kernel sequences.n-based ;
+IN: scratchpad
+
+: months
+    {
+        "January"
+        "February"
+        "March"
+        "April"
+        "May"
+        "June"
+        "July"
+        "August"
+        "September"
+        "October"
+        "November"
+        "December"
+    } 1 <n-based-assoc> ;
+
+10 months at .
+"> "\"October\"" } } ;
+
+HELP: n-based-assoc
+{ $class-description "An adaptor class that allows a sequence to be treated as an assoc with non-zero-based keys." }
+{ $examples
+{ $example <"
+USING: assocs prettyprint kernel sequences.n-based ;
+IN: scratchpad
+
+: months
+    {
+        "January"
+        "February"
+        "March"
+        "April"
+        "May"
+        "June"
+        "July"
+        "August"
+        "September"
+        "October"
+        "November"
+        "December"
+    } 1 <n-based-assoc> ;
+
+10 months at .
+"> "\"October\"" } } ;
+
+{ n-based-assoc <n-based-assoc> } related-words
+
+ARTICLE: "sequences.n-based" "N-based sequences"
+"The " { $vocab-link "sequences.n-based" } " vocabulary provides a sequence adaptor that allows a sequence to be treated as an assoc with non-zero-based keys."
+{ $subsection n-based-assoc }
+{ $subsection <n-based-assoc> }
+;
+
+ABOUT: "sequences.n-based"
diff --git a/extra/sequences/n-based/n-based-tests.factor b/extra/sequences/n-based/n-based-tests.factor
new file mode 100644 (file)
index 0000000..7ee5bd6
--- /dev/null
@@ -0,0 +1,64 @@
+! (c)2008 Joe Groff, see BSD license etc.
+USING: kernel accessors assocs
+sequences sequences.n-based tools.test ;
+IN: sequences.n-based.tests
+
+: months
+    V{
+        "January"
+        "February"
+        "March"
+        "April"
+        "May"
+        "June"
+        "July"
+        "August"
+        "September"
+        "October"
+        "November"
+        "December"
+    } clone 1 <n-based-assoc> ; inline
+
+[ "December" t ]
+[ 12 months at* ] unit-test 
+[ f f ]
+[ 13 months at* ] unit-test 
+[ f f ]
+[ 0 months at* ] unit-test 
+
+[ 12 ] [ months assoc-size ] unit-test
+
+[ {
+    {  1 "January" }
+    {  2 "February" }
+    {  3 "March" }
+    {  4 "April" }
+    {  5 "May" }
+    {  6 "June" }
+    {  7 "July" }
+    {  8 "August" }
+    {  9 "September" }
+    { 10 "October" }
+    { 11 "November" }
+    { 12 "December" }
+} ] [ months >alist ] unit-test
+
+[ V{
+    "January"
+    "February"
+    "March"
+    "April"
+    "May"
+    "June"
+    "July"
+    "August"
+    "September"
+    "October"
+    "November"
+    "December"
+    "Smarch"
+} ] [ "Smarch" 13 months [ set-at ] keep seq>> ] unit-test
+
+[ V{ } ] [ months [ clear-assoc ] keep seq>> ] unit-test
+
+
diff --git a/extra/sequences/n-based/n-based.factor b/extra/sequences/n-based/n-based.factor
new file mode 100644 (file)
index 0000000..78fe851
--- /dev/null
@@ -0,0 +1,31 @@
+! (c)2008 Joe Groff, see BSD license etc.
+USING: accessors assocs kernel math math.ranges sequences
+sequences.private ;
+IN: sequences.n-based
+
+TUPLE: n-based-assoc seq base ;
+C: <n-based-assoc> n-based-assoc
+
+<PRIVATE
+
+: n-based@ ( key assoc -- n seq )
+    [ base>> - ] [ nip seq>> ] 2bi ;
+: n-based-keys ( assoc -- range )
+    [ base>> ] [ assoc-size ] bi 1 <range> ;
+
+PRIVATE>
+
+INSTANCE: n-based-assoc assoc 
+M: n-based-assoc at* ( key assoc -- value ? )
+    n-based@ 2dup bounds-check?
+    [ nth-unsafe t ] [ 2drop f f ] if ;
+M: n-based-assoc assoc-size ( assoc -- size )
+    seq>> length ;
+M: n-based-assoc >alist ( assoc -- alist )
+    [ n-based-keys ] [ seq>> ] bi zip ;
+M: n-based-assoc set-at ( value key assoc -- )
+    n-based@ set-nth ;
+M: n-based-assoc delete-at ( key assoc -- )
+    [ f ] 2dip n-based@ set-nth ;
+M: n-based-assoc clear-assoc ( assoc -- )
+    seq>> delete-all ;
diff --git a/extra/sequences/n-based/summary.txt b/extra/sequences/n-based/summary.txt
new file mode 100644 (file)
index 0000000..a8097a3
--- /dev/null
@@ -0,0 +1 @@
+Sequence adaptor to treat a sequence as an n-based assoc
diff --git a/extra/sequences/n-based/tags.txt b/extra/sequences/n-based/tags.txt
new file mode 100644 (file)
index 0000000..1ee19c1
--- /dev/null
@@ -0,0 +1,2 @@
+sequences
+assocs
index df304e0f0427a45bd74494629a5edda23e7290fb..96900fb6e41265b29a7fd22838bd56da2a819ed0 100644 (file)
@@ -20,4 +20,5 @@ M: serial dispose ( serial -- ) stream>> dispose ;
 
 {
     { [ os unix? ] [ "serial.unix" ] } 
+    { [ os windows? ] [ "serial.windows" ] }
 } cond require
diff --git a/extra/serial/windows/authors.txt b/extra/serial/windows/authors.txt
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/extra/serial/windows/tags.txt b/extra/serial/windows/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/extra/serial/windows/windows-tests.factor b/extra/serial/windows/windows-tests.factor
new file mode 100755 (executable)
index 0000000..bd67f77
--- /dev/null
@@ -0,0 +1,4 @@
+! Copyright (C) 2009 Your name.
+! See http://factorcode.org/license.txt for BSD license.
+USING: tools.test serial.windows ;
+IN: serial.windows.tests
diff --git a/extra/serial/windows/windows.factor b/extra/serial/windows/windows.factor
new file mode 100755 (executable)
index 0000000..a80366c
--- /dev/null
@@ -0,0 +1,22 @@
+! Copyright (C) 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: io.files.windows io.streams.duplex kernel math
+math.bitwise windows.kernel32 accessors alien.c-types
+windows io.files.windows fry locals continuations ;
+IN: serial.windows
+
+: <serial-stream> ( path encoding -- duplex )
+    [ open-r/w dup ] dip <encoder-duplex> ;
+
+: get-comm-state ( duplex -- dcb )
+    in>> handle>>
+    "DCB" <c-object> tuck
+    GetCommState win32-error=0/f ;
+
+: set-comm-state ( duplex dcb -- )
+    [ in>> handle>> ] dip
+    SetCommState win32-error=0/f ;
+
+:: with-comm-state ( duplex quot: ( dcb -- ) -- )
+    duplex get-comm-state :> dcb
+    dcb clone quot curry [ dcb set-comm-state ] recover ; inline
index ae9b94ba0efaec56ec02b95f0370943cb1990dc8..d6c98ea203ab4b23e451bd6a43f6dc295b8f2c65 100644 (file)
@@ -1,10 +1,8 @@
-
 USING: kernel parser words continuations namespaces debugger
-       sequences combinators splitting prettyprint
-       system io io.files io.launcher io.encodings.utf8 io.pipes sequences.deep
-       accessors multi-methods newfx shell.parser
-       combinators.short-circuit eval environment ;
-
+sequences combinators splitting prettyprint system io io.files
+io.pathnames io.launcher io.directories io.encodings.utf8 io.pipes
+sequences.deep accessors multi-methods newfx shell.parser
+combinators.short-circuit eval environment ;
 IN: shell
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
diff --git a/extra/slides/lib.factor b/extra/slides/lib.factor
deleted file mode 100755 (executable)
index f9708b3..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-USING: arrays assocs kernel vectors sequences namespaces
-       random math.parser math fry ;
-
-IN: assocs.lib
-
-: set-assoc-stack ( value key seq -- )
-    dupd [ key? ] with find-last nip set-at ;
-
-: at-default ( key assoc -- value/key )
-    dupd at [ nip ] when* ;
-
-: replace-at ( assoc value key -- assoc )
-    >r >r dup r> 1vector r> rot set-at ;
-
-: peek-at* ( assoc key -- obj ? )
-    swap at* dup [ >r peek r> ] when ;
-
-: peek-at ( assoc key -- obj )
-    peek-at* drop ;
-
-: >multi-assoc ( assoc -- new-assoc )
-    [ 1vector ] assoc-map ;
-
-: multi-assoc-each ( assoc quot -- )
-    [ with each ] curry assoc-each ; inline
-
-: insert ( value variable -- ) namespace push-at ;
-
-: generate-key ( assoc -- str )
-    >r 32 random-bits >hex r>
-    2dup key? [ nip generate-key ] [ drop ] if ;
-
-: set-at-unique ( value assoc -- key )
-    dup generate-key [ swap set-at ] keep ;
-
-: histogram ( assoc quot -- assoc' )
-    H{ } clone [
-        swap [ change-at ] 2curry assoc-each
-    ] keep ; inline
-
-: inc-at ( key assoc -- )
-    [ 0 or 1 + ] change-at ;
-
-: ?at ( obj assoc -- value/obj ? )
-    dupd at* [ [ nip ] [ drop ] if ] keep ;
-
-: if-at ( obj assoc quot1 quot2 -- )
-    [ ?at ] 2dip if ; inline
-
-: when-at ( obj assoc quot -- ) [ ] if-at ; inline
-
-: unless-at ( obj assoc quot -- ) [ ] swap if-at ; inline
index dc8bdd4576ce004a25881aadf93994ea4d16a802..0ce946dc49e409e84c96cb2a8b3b71aa1238f0aa 100755 (executable)
@@ -88,7 +88,7 @@ TUPLE: slides < book ;
 : prev-page ( book -- ) -1 change-page ;
 
 : (strip-tease) ( data n -- data )
-    >r first3 r> head 3array ;
+    [ first3 ] dip head 3array ;
 
 : strip-tease ( data -- seq )
     dup third length 1- [
diff --git a/extra/soundex/author.txt b/extra/soundex/author.txt
deleted file mode 100644 (file)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/extra/soundex/soundex-tests.factor b/extra/soundex/soundex-tests.factor
deleted file mode 100644 (file)
index f4bd18e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-IN: soundex.tests
-USING: soundex tools.test ;
-
-[ "S162" ] [ "supercalifrag" soundex ] unit-test
-[ "M000" ] [ "M" soundex ] unit-test
diff --git a/extra/soundex/soundex.factor b/extra/soundex/soundex.factor
deleted file mode 100644 (file)
index 416ec4a..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: sequences grouping assocs kernel ascii unicode.case tr ;
-IN: soundex
-
-TR: soundex-tr
-    ch>upper
-    "AEHIOUWYBFPVCGJKQSXZDTLMNR"
-    "00000000111122222222334556" ;
-
-: remove-duplicates ( seq -- seq' )
-    #! Remove _consecutive_ duplicates (unlike prune which removes
-    #! all duplicates).
-    [ 2 <clumps> [ = not ] assoc-filter values ] [ first ] bi prefix ;
-
-: first>upper ( seq -- seq' ) 1 head >upper ;
-: trim-first ( seq -- seq' ) dup first [ = ] curry trim-left ;
-: remove-zeroes ( seq -- seq' ) CHAR: 0 swap remove ;
-: remove-non-alpha ( seq -- seq' ) [ alpha? ] filter ;
-: pad-4 ( first seq -- seq' ) "000" 3append 4 head ;
-
-: soundex ( string -- soundex )
-    remove-non-alpha [ f ] [
-        [ first>upper ]
-        [
-            soundex-tr
-            [ "" ] [ trim-first ] if-empty
-            [ "" ] [ remove-duplicates ] if-empty
-            remove-zeroes
-        ] bi
-        pad-4
-    ] if-empty ;
diff --git a/extra/soundex/summary.txt b/extra/soundex/summary.txt
deleted file mode 100644 (file)
index 95a271d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Soundex is a phonetic algorithm for indexing names by sound
index 543c26ae1442c17ffeca3bc05d17a7d723f8d597..f08e08c78763e67039a5c458a2ceefd64064f00a 100755 (executable)
@@ -154,8 +154,7 @@ M: spheres-gadget distance-step ( gadget -- dz )
 
 : (make-reflection-framebuffer) ( depthbuffer -- framebuffer )
     gen-framebuffer dup [
-        swap >r
-        GL_FRAMEBUFFER_EXT GL_DEPTH_ATTACHMENT_EXT GL_RENDERBUFFER_EXT r>
+        swap [ GL_FRAMEBUFFER_EXT GL_DEPTH_ATTACHMENT_EXT GL_RENDERBUFFER_EXT ] dip
         glFramebufferRenderbufferEXT
     ] with-framebuffer ;
 
@@ -244,10 +243,10 @@ M: spheres-gadget pref-dim* ( gadget -- dim )
     [ drop dup [ -+ ] bi@ ] 2keep ;
 
 : (reflection-face) ( gadget face -- )
-    swap reflection-texture>> >r >r
-    GL_FRAMEBUFFER_EXT
-    GL_COLOR_ATTACHMENT0_EXT
-    r> r> 0 glFramebufferTexture2DEXT
+    swap reflection-texture>> [
+        GL_FRAMEBUFFER_EXT
+        GL_COLOR_ATTACHMENT0_EXT
+    ] 2dip 0 glFramebufferTexture2DEXT
     check-framebuffer ;
 
 : (draw-reflection-texture) ( gadget -- )
index 37e12a6993eb67a8d96d3368c8ef2d2a6fcefb1c..18c37209274eb401792926b5fe5f7ea394390d51 100755 (executable)
@@ -21,14 +21,14 @@ M: missing-state error.
     ! quot is ( state string -- output-string )
     [ missing-state ] <array> dup
     [
-        [ >r dup [ data>> ] [ place>> ] bi r> ] %
+        [ [ dup [ data>> ] [ place>> ] bi ] dip ] %
         [ swapd bounds-check dispatch ] curry ,
         [ each pick (>>place) swap (>>date) ] %
     ] [ ] make [ over make ] curry ;
 
 : define-machine ( word state-class -- )
     execute make-machine
-    >r over r> define
+    [ over ] dip define
     "state-table" set-word-prop ;
 
 : MACHINE:
diff --git a/extra/strings/lib/lib-tests.factor b/extra/strings/lib/lib-tests.factor
deleted file mode 100644 (file)
index 6e0ce05..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-USING: kernel sequences strings.lib tools.test ;
-IN: temporary
-
-[ "abcdefghijklmnopqrstuvwxyz" ] [ lower-alpha-chars "" like ] unit-test
-[ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ] [ upper-alpha-chars "" like ] unit-test
-[ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" ] [ alpha-chars "" like ] unit-test
-[ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ] [ alphanumeric-chars "" like ] unit-test
-[ t ] [ 100 [ random-alphanumeric-char ] replicate alphanumeric-chars [ member? ] curry all? ] unit-test
diff --git a/extra/strings/lib/lib.factor b/extra/strings/lib/lib.factor
deleted file mode 100644 (file)
index 6ecca05..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-USING: math math.ranges arrays sequences kernel random splitting
-strings unicode.case ;
-IN: strings.lib
-
-: >Upper ( str -- str )
-    dup empty? [ unclip ch>upper prefix ] unless ;
-
-: >Upper-dashes ( str -- str )
-    "-" split [ >Upper ] map "-" join ;
-
-: lower-alpha-chars ( -- seq )
-    CHAR: a CHAR: z [a,b] ;
-
-: upper-alpha-chars ( -- seq )
-    CHAR: A CHAR: Z [a,b] ;
-
-: numeric-chars ( -- seq )
-    CHAR: 0 CHAR: 9 [a,b] ;
-
-: alpha-chars ( -- seq )
-    lower-alpha-chars upper-alpha-chars append ;
-
-: alphanumeric-chars ( -- seq )
-    alpha-chars numeric-chars append ;
-
-: random-alpha-char ( -- ch )
-    alpha-chars random ;
-
-: random-alphanumeric-char ( -- ch )
-    alphanumeric-chars random ;
-
-: random-alphanumeric-string ( length -- str )
-    [ random-alphanumeric-char ] "" replicate-as ;
index 93b1804e36dc8856e032ef93231ad632103208ee..c02242e1705731bb91c48a5554998329a2afb299 100644 (file)
@@ -6,7 +6,7 @@ IN: sudoku
 SYMBOL: solutions
 SYMBOL: board
 
-: pair+ ( a b c d -- a+b c+d ) swapd + >r + r> ;
+: pair+ ( a b c d -- a+b c+d ) swapd [ + ] 2bi@ ;
 
 : row ( n -- row ) board get nth ;
 : board> ( m n -- x ) row nth ;
@@ -19,13 +19,13 @@ SYMBOL: board
 
 : box-contains? ( n x y -- ? )
     [ 3 /i 3 * ] bi@
-    9 [ >r 3dup r> cell-contains? ] contains?
-    >r 3drop r> ;
+    9 [ [ 3dup ] dip cell-contains? ] contains?
+    [ 3drop ] dip ;
 
 DEFER: search
 
 : assume ( n x y -- )
-    [ >board ] 2keep [ >r 1+ r> search ] 2keep f>board ;
+    [ >board ] 2keep [ [ 1+ ] dip search ] 2keep f>board ;
 
 : attempt ( n x y -- )
     {
@@ -59,9 +59,9 @@ DEFER: search
 
 : search ( x y -- )
     {
-        { [ over 9 = ] [ >r drop 0 r> 1+ search ] }
+        { [ over 9 = ] [ [ drop 0 ] dip 1+ search ] }
         { [ over 0 = over 9 = and ] [ 2drop solution. ] }
-        { [ 2dup board> ] [ >r 1+ r> search ] }
+        { [ 2dup board> ] [ [ 1+ ] dip search ] }
         [ solve ]
     } cond ;
 
index d7f53fb9fb83d0e7554e26efe9998e877a26bc75..d9c39ca6cf751325890dd6466674fec5ba1702f6 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: unix alien alien.c-types kernel math sequences strings
-io.unix.backend splitting ;
+io.backend.unix splitting ;
 IN: system-info.linux
 
 : (uname) ( buf -- int )
index a06c01b950425c7555c411bfa8d728935f49bba9..b51fd52995ae448b066274b5b3565273e424571a 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.c-types alien.strings alien.syntax
 byte-arrays kernel namespaces sequences unix
-system-info.backend system io.unix.backend io.encodings.utf8 ;
+system-info.backend system io.encodings.utf8 ;
 IN: system-info.macosx
 
 ! See /usr/include/sys/sysctl.h for constants
index e3c14854d3b29aa861679fd1533858766645ab0d..bccaeb0103eb1fcbcff99327ab2b143bfc876489 100755 (executable)
@@ -1,7 +1,8 @@
-USING: combinators io io.files io.streams.string kernel math
-math.parser continuations namespaces pack prettyprint sequences
-strings system tools.hexdump io.encodings.binary summary accessors
-io.backend symbols byte-arrays ;
+USING: combinators io io.files io.files.links io.directories
+io.pathnames io.streams.string kernel math math.parser
+continuations namespaces pack prettyprint sequences strings
+system tools.hexdump io.encodings.binary summary accessors
+io.backend byte-arrays ;
 IN: tar
 
 : zero-checksum 256 ; inline
@@ -15,6 +16,9 @@ SYMBOLS: base-dir filename ;
 
 : tar-trim ( seq -- newseq ) [ "\0 " member? ] trim ;
 
+: read-c-string* ( n -- str/f )
+    read [ zero? ] trim-right [ f ] when-empty ;
+
 : read-tar-header ( -- obj )
     \ tar-header new
     100 read-c-string* >>name
index b71b831ca6068ba922cf25670c883f2020cf422e..4b6d516369f82fd325803d161e32d65716092a2d 100644 (file)
@@ -56,4 +56,4 @@ M: federal withholding* ( salary w4 tax-table entity -- x )
     ] if ;
 
 : net ( salary w4 collector -- x )
-    >r dupd r> total-withholding - ;
+    [ dupd ] dip total-withholding - ;
index c1e85b75b4e1ee1f963d02608135bb8b86cc49db..251f60e6d7ddedab514ee9815b1da9cc37f6cecd 100644 (file)
@@ -1,17 +1,17 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors assocs.lib math math.order money ;
+USING: accessors math math.order money kernel assocs ;
 IN: taxes.usa.fica
 
 : fica-tax-rate ( -- x ) DECIMAL: .062 ; inline
 
-ERROR: fica-base-unknown year ;
+ERROR: fica-base-unknown ;
 
 : fica-base-rate ( year -- x )
     H{
         { 2008 102000 }
         { 2007  97500 }
-    } [ fica-base-unknown ] unless-at ;
+    } at [ fica-base-unknown ] unless* ;
 
 : fica-tax ( salary w4 -- x )
     year>> fica-base-rate min fica-tax-rate * ;
index 30622c9e383e852d8f674dadc0bdb7c111e262c0..ef5ffcc3447c48822931394ac41006132d363b52 100644 (file)
@@ -88,7 +88,7 @@ TUPLE: tetris
 : tetris-move ( tetris move -- ? )
     #! moves the piece if possible, returns whether the piece was moved
     2dup can-move? [
-        >r current-piece r> move-piece drop t
+        [ current-piece ] dip move-piece drop t
     ] [
         2drop f
     ] if ;
index a9b00ffb7cd19343da7adf0659e28052e37c8a1b..e7c01742d5cf31ec29d9ff252346e7f097aed359 100644 (file)
@@ -20,7 +20,7 @@ IN: tetris.gl
 
 ! TODO: move implementation specific stuff into tetris-board
 : (draw-row) ( x y row -- )
-    >r over r> nth dup
+    [ over ] dip nth dup
     [ gl-color 2array draw-block ] [ 3drop ] if ;
 
 : draw-row ( y row -- )
index b200c4d7354a2184509c01984ffac95c9f41eac4..5c819f6e697ea74d78b2f63b31cfaf2db29f9d6f 100644 (file)
@@ -25,6 +25,7 @@ M: tetris-gadget draw-gadget* ( gadget -- )
     [ <new-tetris> ] change-tetris ;
 
 tetris-gadget H{
+    { T{ button-down f f 1 }     [ request-focus ] }
     { T{ key-down f f "UP" }     [ tetris>> rotate-right ] }
     { T{ key-down f f "d" }      [ tetris>> rotate-left ] }
     { T{ key-down f f "f" }      [ tetris>> rotate-right ] }
diff --git a/extra/time/authors.txt b/extra/time/authors.txt
deleted file mode 100644 (file)
index e091bb8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-John Benediktsson
diff --git a/extra/time/time-docs.factor b/extra/time/time-docs.factor
deleted file mode 100644 (file)
index 8fbc59e..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-
-USING: help.syntax help.markup kernel prettyprint sequences strings ;
-
-IN: time
-
-HELP: strftime
-{ $values { "format-string" string } }
-{ $description "Writes the timestamp (specified on the stack) formatted according to the format string." } 
-;
-
-ARTICLE: "strftime" "Formatted timestamps"
-"The " { $vocab-link "time" } " vocabulary is used for formatted timestamps.\n"
-{ $subsection strftime }
-"\n"
-"Several format specifications exist for handling arguments of different types, and specifying attributes for the result string, including such things as maximum width, padding, and decimals.\n"
-{ $table
-    { "%a"     "Abbreviated weekday name." }
-    { "%A"     "Full weekday name." }
-    { "%b"     "Abbreviated month name." }
-    { "%B"     "Full month name." }
-    { "%c"     "Date and time representation." }
-    { "%d"     "Day of the month as a decimal number [01,31]." }
-    { "%H"     "Hour (24-hour clock) as a decimal number [00,23]." }
-    { "%I"     "Hour (12-hour clock) as a decimal number [01,12]." }
-    { "%j"     "Day of the year as a decimal number [001,366]." }
-    { "%m"     "Month as a decimal number [01,12]." }
-    { "%M"     "Minute as a decimal number [00,59]." }
-    { "%p"     "Either AM or PM." }
-    { "%S"     "Second as a decimal number [00,59]." }
-    { "%U"     "Week number of the year (Sunday as the first day of the week) as a decimal number [00,53]." }
-    { "%w"     "Weekday as a decimal number [0(Sunday),6]." }
-    { "%W"     "Week number of the year (Monday as the first day of the week) as a decimal number [00,53]." }
-    { "%x"     "Date representation." }
-    { "%X"     "Time representation." }
-    { "%y"     "Year without century as a decimal number [00,99]." }
-    { "%Y"     "Year with century as a decimal number." }
-    { "%Z"     "Time zone name (no characters if no time zone exists)." }
-    { "%%"     "A literal '%' character." }
-} ;
-
-ABOUT: "strftime"
-
-
diff --git a/extra/time/time-tests.factor b/extra/time/time-tests.factor
deleted file mode 100644 (file)
index 0b0602b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-! Copyright (C) 2008 John Benediktsson
-! See http://factorcode.org/license.txt for BSD license
-
-USING: kernel time tools.test calendar ;
-
-IN: time.tests
-
-[ "%H:%M:%S" strftime ] must-infer 
-
-: testtime ( -- timestamp )
-    2008 10 9 12 3 15 instant <timestamp> ;
-
-[ t ] [ "12:03:15" testtime "%H:%M:%S" strftime = ] unit-test
-[ t ] [ "12:03:15" testtime "%X" strftime = ] unit-test
-
-[ t ] [ "10/09/2008" testtime "%m/%d/%Y" strftime = ] unit-test
-[ t ] [ "10/09/2008" testtime "%x" strftime = ] unit-test
-
-[ t ] [ "Thu" testtime "%a" strftime = ] unit-test
-[ t ] [ "Thursday" testtime "%A" strftime = ] unit-test
-
-[ t ] [ "Oct" testtime "%b" strftime = ] unit-test
-[ t ] [ "October" testtime "%B" strftime = ] unit-test
-
diff --git a/extra/time/time.factor b/extra/time/time.factor
deleted file mode 100644 (file)
index be19fb0..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-! Copyright (C) 2008 John Benediktsson
-! See http://factorcode.org/license.txt for BSD license
-
-USING: accessors arrays calendar io kernel fry macros math
-math.functions math.parser peg.ebnf sequences strings vectors ;
-
-IN: time
-
-: >timestring ( timestamp -- string ) 
-    [ hour>> ] keep [ minute>> ] keep second>> 3array
-    [ number>string 2 CHAR: 0 pad-left ] map ":" join ; inline
-
-: >datestring ( timestamp -- string )
-    [ month>> ] keep [ day>> ] keep year>> 3array
-    [ number>string 2 CHAR: 0 pad-left ] map "/" join ; inline
-
-: (week-of-year) ( timestamp day -- n )
-    [ dup clone 1 >>month 1 >>day day-of-week dup ] dip > [ 7 swap - ] when
-    [ day-of-year ] dip 2dup < [ 0 2nip ] [ - 7 / 1+ >fixnum ] if ;
-
-: week-of-year-sunday ( timestamp -- n ) 0 (week-of-year) ; inline
-
-: week-of-year-monday ( timestamp -- n ) 1 (week-of-year) ; inline
-
-
-<PRIVATE
-
-EBNF: parse-format-string
-
-fmt-%     = "%"                  => [[ [ "%" ] ]]
-fmt-a     = "a"                  => [[ [ dup day-of-week day-abbreviation3 ] ]]
-fmt-A     = "A"                  => [[ [ dup day-of-week day-name ] ]] 
-fmt-b     = "b"                  => [[ [ dup month>> month-abbreviation ] ]]
-fmt-B     = "B"                  => [[ [ dup month>> month-name ] ]] 
-fmt-c     = "c"                  => [[ [ "Not yet implemented" throw ] ]]
-fmt-d     = "d"                  => [[ [ dup day>> number>string 2 CHAR: 0 pad-left ] ]] 
-fmt-H     = "H"                  => [[ [ dup hour>> number>string 2 CHAR: 0 pad-left ] ]]
-fmt-I     = "I"                  => [[ [ dup hour>> 12 > [ 12 - ] when number>string 2 CHAR: 0 pad-left ] ]] 
-fmt-j     = "j"                  => [[ [ dup day-of-year number>string ] ]] 
-fmt-m     = "m"                  => [[ [ dup month>> number>string 2 CHAR: 0 pad-left ] ]] 
-fmt-M     = "M"                  => [[ [ dup minute>> number>string 2 CHAR: 0 pad-left ] ]] 
-fmt-p     = "p"                  => [[ [ dup hour>> 12 < [ "AM" ] [ "PM" ] ? ] ]] 
-fmt-S     = "S"                  => [[ [ dup second>> round number>string 2 CHAR: 0 pad-left ] ]] 
-fmt-U     = "U"                  => [[ [ dup week-of-year-sunday ] ]] 
-fmt-w     = "w"                  => [[ [ dup day-of-week number>string ] ]] 
-fmt-W     = "W"                  => [[ [ dup week-of-year-monday ] ]] 
-fmt-x     = "x"                  => [[ [ dup >datestring ] ]] 
-fmt-X     = "X"                  => [[ [ dup >timestring ] ]] 
-fmt-y     = "y"                  => [[ [ dup year>> 100 mod number>string ] ]] 
-fmt-Y     = "Y"                  => [[ [ dup year>> number>string ] ]] 
-fmt-Z     = "Z"                  => [[ [ "Not yet implemented" throw ] ]] 
-unknown   = (.)*                 => [[ "Unknown directive" throw ]]
-
-formats_  = fmt-%|fmt-a|fmt-A|fmt-b|fmt-B|fmt-c|fmt-d|fmt-H|fmt-I|
-            fmt-j|fmt-m|fmt-M|fmt-p|fmt-S|fmt-U|fmt-w|fmt-W|fmt-x|
-            fmt-X|fmt-y|fmt-Y|fmt-Z|unknown
-
-formats   = "%" (formats_)       => [[ second '[ _ dip ] ]]
-
-plain-text = (!("%").)+          => [[ >string '[ _ swap ] ]]
-
-text      = (formats|plain-text)* => [[ reverse [ [ [ push ] keep ] append ] map ]]
-
-;EBNF
-
-PRIVATE>
-
-MACRO: strftime ( format-string -- )
-    parse-format-string [ length ] keep [ ] join 
-    '[ _ <vector> @ reverse concat nip ] ;
-
-
index cea5ece9f71b905dfa0e2eed45883da3f615a1f3..15b8a6828bd5b4b496886ab7cc9000d8d84aa636 100644 (file)
@@ -1,5 +1,5 @@
 
-USING: kernel accessors locals namespaces sequences sequences.lib threads
+USING: kernel accessors locals namespaces sequences threads
        math math.order math.vectors
        calendar
        colors opengl ui ui.gadgets ui.gestures ui.render
@@ -65,6 +65,16 @@ M: <trails-gadget> pref-dim* ( <trails-gadget> -- dim ) drop { 500 500 } ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
+: each-percent ( seq quot -- )
+  [
+    dup length
+    dup [ / ] curry
+    [ 1+ ] prepose
+  ] dip compose
+  2each ;                       inline
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
 M:: <trails-gadget> draw-gadget* ( GADGET -- )
   origin get
   [
diff --git a/extra/ui/gadgets/frame-buffer/frame-buffer.factor b/extra/ui/gadgets/frame-buffer/frame-buffer.factor
deleted file mode 100644 (file)
index 2d58037..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-
-USING: kernel alien.c-types combinators sequences splitting grouping
-       opengl.gl ui.gadgets ui.render
-       math math.vectors accessors math.geometry.rect ;
-
-IN: ui.gadgets.frame-buffer
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-TUPLE: frame-buffer < gadget action pdim last-dim graft ungraft pixels ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: init-frame-buffer-pixels ( frame-buffer -- frame-buffer )
-  dup
-    rect-dim product "uint[4]" <c-array>
-  >>pixels ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: new-frame-buffer ( class -- gadget )
-  new-gadget
-    [ ]         >>action
-    { 100 100 } >>pdim
-    [ ]         >>graft
-    [ ]         >>ungraft ;
-
-: <frame-buffer> ( -- frame-buffer ) frame-buffer new-frame-buffer ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: draw-pixels ( fb -- fb )
-  dup >r
-  dup >r
-  rect-dim first2 GL_RGBA GL_UNSIGNED_INT r> pixels>> glDrawPixels
-  r> ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: read-pixels ( fb -- fb )
-  dup >r
-  dup >r
-      >r
-  0 0 r> rect-dim first2 GL_RGBA GL_UNSIGNED_INT r> pixels>> glReadPixels
-  r> ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-M: frame-buffer pref-dim* pdim>> ;
-M: frame-buffer graft*    graft>>   call ;
-M: frame-buffer ungraft*  ungraft>> call ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: copy-row ( old new -- )
-  2dup min-length swap >r head-slice 0 r> copy ;
-
-! : copy-pixels ( old-pixels old-width new-pixels new-width -- )
-!   [ group ] 2bi@
-!   [ copy-row ] 2each ;
-
-! : copy-pixels ( old-pixels old-width new-pixels new-width -- )
-!   [ 16 * group ] 2bi@
-!   [ copy-row ] 2each ;
-
-: copy-pixels ( old-pixels old-width new-pixels new-width -- )
-  [ 16 * <sliced-groups> ] 2bi@
-  [ copy-row ] 2each ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-M: frame-buffer layout* ( fb -- )
-   {
-     {
-       [ dup last-dim>> f = ]
-       [
-         init-frame-buffer-pixels
-         dup
-           rect-dim >>last-dim
-         drop
-       ]
-     }
-     {
-       [ dup [ rect-dim ] [ last-dim>> ] bi = not ]
-       [
-         dup [ pixels>> ] [ last-dim>> first ] bi
-
-         rot init-frame-buffer-pixels
-         dup rect-dim >>last-dim
-
-         [ pixels>> ] [ rect-dim first ] bi
-
-         copy-pixels
-       ]
-     }
-     { [ t ] [ drop ] }
-   }
-   cond ;
-   
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-M: frame-buffer draw-gadget* ( fb -- )
-
-   dup rect-dim { 0 1 } v* first2 glRasterPos2i
-
-   draw-pixels
-
-   dup action>> call
-
-   glFlush
-
-   read-pixels
-
-   drop ;
-
diff --git a/extra/ui/gadgets/slate/authors.txt b/extra/ui/gadgets/slate/authors.txt
deleted file mode 100755 (executable)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/extra/ui/gadgets/slate/slate.factor b/extra/ui/gadgets/slate/slate.factor
deleted file mode 100644 (file)
index 0505586..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-
-USING: kernel namespaces opengl ui.render ui.gadgets accessors ;
-
-IN: ui.gadgets.slate
-
-TUPLE: slate < gadget action pdim graft ungraft ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: init-slate ( slate -- slate )
-  init-gadget
-  [ ]         >>action
-  { 200 200 } >>pdim
-  [ ]         >>graft
-  [ ]         >>ungraft ;
-
-: <slate> ( action -- slate )
-  slate new
-    init-slate
-    swap >>action ;
-
-M: slate pref-dim* ( slate -- dim ) pdim>> ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-USING: combinators arrays sequences math math.geometry
-       opengl.gl ui.gadgets.worlds ;
-
-: screen-y* ( gadget -- loc )
-  {
-    [ find-world height ]
-    [ screen-loc second ]
-    [ height ]
-  }
-  cleave
-  + - ;
-
-: screen-loc* ( gadget -- loc )
-  {
-    [ screen-loc first ]
-    [ screen-y* ]
-  }
-  cleave
-  2array ;
-
-: setup-viewport ( gadget -- gadget )
-  dup
-  {
-    [ screen-loc* ]
-    [ dim>>       ]
-  }
-  cleave
-  gl-viewport ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: default-coordinate-system ( gadget -- gadget )
-  dup
-  {
-    [ drop 0 ]
-    [ width 1 - ]
-    [ height 1 - ]
-    [ drop 0 ]
-  }
-  cleave
-  -1 1
-  glOrtho ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-M: slate graft*   ( slate -- ) graft>>   call ;
-M: slate ungraft* ( slate -- ) ungraft>> call ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-GENERIC: establish-coordinate-system ( gadget -- gadget )
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-M: slate establish-coordinate-system ( slate -- slate )
-   default-coordinate-system ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-GENERIC: draw-slate ( slate -- slate )
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-M: slate draw-slate ( slate -- slate ) dup action>> call ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-M: slate draw-gadget* ( slate -- )
-
-   GL_PROJECTION glMatrixMode glPushMatrix glLoadIdentity
-
-   establish-coordinate-system
-
-   GL_MODELVIEW glMatrixMode glPushMatrix glLoadIdentity 
-
-   setup-viewport
-
-   draw-slate
-
-   GL_PROJECTION glMatrixMode glPopMatrix glLoadIdentity
-   GL_MODELVIEW  glMatrixMode glPopMatrix glLoadIdentity
-
-   dup
-   find-world
-   ! The world coordinate system is a little wacky:
-   dup { [ drop 0 ] [ width ] [ height ] [ drop 0 ] } cleave -1 1 glOrtho
-   setup-viewport
-   drop
-   drop ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
index 02005fcd1f6c4143f2dc928a0c817204d48383ac..b8e3f45a16eca370ff3ed7c63f1689c5dcd0252f 100755 (executable)
@@ -81,7 +81,7 @@ M: dimensions-not-equal summary drop "Dimensions do not match" ;
 
 : d= ( d d -- ? ) comparison-op number= ;
 
-: d~ ( d d delta -- ? ) >r comparison-op r> ~ ;
+: d~ ( d d delta -- ? ) [ comparison-op ] dip ~ ;
 
 : d-min ( d d -- d ) [ d< ] most ;
 
index 0c7b442ffade93987ed3d68976b58bebbb2cf51d..77280031890b996f7afc9c4060904570d5591b18 100644 (file)
@@ -1,6 +1,5 @@
-
-USING: namespaces debugger io.files bootstrap.image update.util ;
-
+USING: namespaces debugger io.files io.directories
+bootstrap.image update.util ;
 IN: update.backup
 
 : backup-boot-image ( -- )
index 9546379223d5e0f07269d38f2262875d4155c77f..77cd184cdb992d9d69f1d54c8865184d72b0e992 100644 (file)
@@ -1,7 +1,5 @@
-
-USING: kernel namespaces system io.files bootstrap.image http.client
-       update update.backup update.util ;
-
+USING: kernel namespaces system io.files io.pathnames io.directories
+bootstrap.image http.client update update.backup update.util ;
 IN: update.latest
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -9,7 +7,7 @@ IN: update.latest
 : git-pull-master ( -- )
   image parent-directory
     [
-      { "git" "pull" "http://factorcode.org/git/factor.git" "master" }
+      { "git" "pull" "git://factorcode.org/git/factor.git" "master" }
       run-command
     ]
   with-directory ;
index c6a5671345c95b8d0c3d63e9438cc955d6afff4f..ba09cc3f3d48c4d215e993ab53fc6f246ad56ce8 100644 (file)
@@ -1,10 +1,5 @@
-
-USING: kernel system sequences io.files io.launcher bootstrap.image
-       http.client
-       update.util ;
-
-       ! builder.util builder.release.branch ;
-
+USING: kernel system sequences io.files io.directories
+io.pathnames io.launcher bootstrap.image http.client update.util ;
 IN: update
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
diff --git a/extra/usa-cities/usa-cities-tests.factor b/extra/usa-cities/usa-cities-tests.factor
new file mode 100644 (file)
index 0000000..2dbeafc
--- /dev/null
@@ -0,0 +1,6 @@
+! Copyright (C) 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors kernel tools.test usa-cities ;
+IN: usa-cities.tests
+
+[ t ] [ 55406 find-zip-code name>> "Minneapolis" = ] unit-test
index c5e059c51958a13100b5e8deec95d12996c2328b..25ec30ac78673bac67927e9c6d34f2cfa84f970e 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: io.files io.encodings.ascii sequences generalizations
-math.parser combinators kernel memoize csv symbols summary
-words accessors math.order binary-search ;
+math.parser combinators kernel memoize csv summary
+words accessors math.order binary-search combinators.smart ;
 IN: usa-cities
 
 SINGLETONS: AK AL AR AS AZ CA CO CT DC DE FL GA HI IA ID IL IN
@@ -30,15 +30,17 @@ first-zip name state latitude longitude gmt-offset dst-offset ;
 MEMO: cities ( -- seq )
     "resource:extra/usa-cities/zipcode.csv" ascii <file-reader>
     csv rest-slice [
-        7 firstn {
-            [ string>number ]
-            [ ]
-            [ string>state ]
-            [ string>number ]
-            [ string>number ]
-            [ string>number ]
-            [ string>number ]
-        } spread city boa
+        [
+            {
+                [ string>number ]
+                [ ]
+                [ string>state ]
+                [ string>number ]
+                [ string>number ]
+                [ string>number ]
+                [ string>number ]
+            } spread
+        ] input<sequence city boa
     ] map ;
 
 MEMO: cities-named ( name -- cities )
index 7316cd6a6db468474311a854bcf82a73817bdeac..c12367ba5ea35a82952aea6e68f9e3173d5c25b7 100644 (file)
@@ -2,7 +2,8 @@
 
 ! Thanks to Mackenzie Straight for the idea
 
-USING: accessors kernel parser lexer words namespaces sequences quotations ;
+USING: accessors kernel parser lexer words words.symbol
+namespaces sequences quotations ;
 
 IN: vars
 
index 131b569a92ea1cc83055684c6766db8d14f320c8..35d8bb52ff63fd3c625ea55b53d12c751305e374 100644 (file)
@@ -80,19 +80,19 @@ IN: vpri-talk
     { $slide "Object system"
         "New operation, existing types:"
         { $code
-            "GENERIC: perimiter ( shape -- n )"
+            "GENERIC: perimeter ( shape -- n )"
             ""
-            "M: rectangle perimiter"
+            "M: rectangle perimeter"
             "    [ width>> ] [ height>> ] bi + 2 * ;"
             ""
-            "M: circle perimiter"
+            "M: circle perimeter"
             "    radius>> 2 * pi * ;"
         }
     }
     { $slide "Object system"
         "We can compute perimiters now."
-        { $code "100 20 <rectangle> perimiter ." }
-        { $code "3 <circle> perimiter ." }
+        { $code "100 20 <rectangle> perimeter ." }
+        { $code "3 <circle> perimeter ." }
     }
     { $slide "Object system"
         "New type, extending existing operations:"
@@ -110,7 +110,7 @@ IN: vpri-talk
         { $code
             ": hypotenuse ( x y -- z ) [ sq ] bi@ + sqrt ;"
             ""
-            "M: triangle perimiter"
+            "M: triangle perimeter"
             "    [ base>> ] [ height>> ] bi"
             "    [ + ] [ hypotenuse ] 2bi + ;"
         }
@@ -151,10 +151,10 @@ IN: vpri-talk
         "Libraries can define new parsing words"
     }
     { $slide "Example: float arrays"
-        { $vocab-link "float-arrays" }
+        { $vocab-link "specialized-arrays.float" }
         "Avoids boxing and unboxing overhead"
         "Implemented with library code"
-        { $code "F{ 3.14 7.6 10.3 }" }
+        { $code "float-array{ 3.14 7.6 10.3 }" }
     }
     { $slide "Example: memoization"
         { "Memoization with " { $link POSTPONE: MEMO: } }
index d19946d39bb13e4d4915f8447fa00ed5a6ec1a54..a8c8383e628c3f633e46f1ab7e75f2fb8db4176e 100644 (file)
@@ -1,6 +1,6 @@
-! Copyright (C) 2008 Slava Pestov.
+! Copyright (C) 2008, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: furnace.actions furnace.redirection
+USING: furnace furnace.actions furnace.redirection
 http.server.dispatchers html.forms validators urls accessors
 math ;
 IN: webapps.calculator
index ed8e60d89a87ad80fc17682b44663349a62174f3..4dcf5d563afdc99155a8d5bbce9f4d8ed8a7ebbf 100644 (file)
@@ -2,6 +2,7 @@
 
 <t:chloe xmlns:t="http://factorcode.org/chloe/1.0">
 
+<html>
        <head> <title>Calculator</title> </head>
 
        <body>
@@ -24,5 +25,6 @@
 
                </t:form>
        </body>
+</html>
 
 </t:chloe>
index 75e7cf3c4ba1c6514c7bd51576dd55c53e6c3dbe..88154438f12718da3d3ec0194282e02886d428f3 100644 (file)
@@ -2,12 +2,13 @@
 
 <t:chloe xmlns:t="http://factorcode.org/chloe/1.0">
 
-
+<html>
        <body>
                <h1><t:label t:name="counter" /></h1>
 
                <t:button t:action="$counter-app/inc">++</t:button>
                <t:button t:action="$counter-app/dec">--</t:button>
        </body>
+</html>
 
 </t:chloe>
index 96401b6afd65e73a0f9d3db54fbc6d68ef60e2bb..1c17e3214f17536f3345fa906943d8c7ab1324e0 100644 (file)
@@ -2,7 +2,8 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel accessors http.server.dispatchers
 http.server.static furnace.actions furnace.redirection urls
-validators locals io.files html.forms html.components help.html ;
+validators locals io.files io.directories html.forms
+html.components help.html ;
 IN: webapps.help
 
 TUPLE: help-webapp < dispatcher ;
diff --git a/extra/webapps/imagebin/authors.txt b/extra/webapps/imagebin/authors.txt
new file mode 100644 (file)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/extra/webapps/imagebin/imagebin.factor b/extra/webapps/imagebin/imagebin.factor
new file mode 100755 (executable)
index 0000000..f347377
--- /dev/null
@@ -0,0 +1,39 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors kernel furnace.actions html.forms
+http.server.dispatchers db db.tuples db.types urls
+furnace.redirection multiline http namespaces ;
+IN: webapps.imagebin
+
+TUPLE: imagebin < dispatcher ;
+
+TUPLE: image id path ;
+
+image "IMAGE" {
+    { "id" "ID" INTEGER +db-assigned-id+ }
+    { "path" "PATH" { VARCHAR 256 } +not-null+ }
+} define-persistent
+
+: <uploaded-image-action> ( -- action )
+    <page-action>
+        { imagebin "uploaded-image" } >>template ;
+
+SYMBOL: my-post-data
+: <upload-image-action> ( -- action )
+    <page-action>
+        { imagebin "upload-image" } >>template
+        [
+            
+            ! request get post-data>> my-post-data set-global
+            ! image new
+            !    "file" value
+                ! insert-tuple
+            "uploaded-image" <redirect>
+        ] >>submit ;
+
+: <imagebin> ( -- responder )
+    imagebin new-dispatcher
+        <upload-image-action> "" add-responder
+        <upload-image-action> "upload-image" add-responder
+        <uploaded-image-action> "uploaded-image" add-responder ;
+
diff --git a/extra/webapps/imagebin/upload-image.xml b/extra/webapps/imagebin/upload-image.xml
new file mode 100644 (file)
index 0000000..ed6704f
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version='1.0' ?>
+<html>
+<head><title>Upload</title></head>
+<body>
+<form action="upload-image" method="post" enctype="multipart/form-data" name="upload">
+
+               <table>
+               <tr><th class="field-label">Image: </th><td><input type="file" name="file1" /></td></tr>
+               <tr><th class="field-label">Image: </th><td><input type="file" name="file2" /></td></tr>
+               <tr><th class="field-label">Image: </th><td><input type="file" name="file3" /></td></tr>
+               <tr><th class="field-label">Text: </th><td><input type="text" name="text1" /></td></tr>
+               </table>
+
+               <p> <button type="submit">Submit</button> </p>
+</form>
+</body>
+</html>
diff --git a/extra/webapps/imagebin/uploaded-image.xml b/extra/webapps/imagebin/uploaded-image.xml
new file mode 100644 (file)
index 0000000..903be5c
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version='1.0' ?>
+<html>
+<head><title>Uploaded</title></head>
+<body>
+hi from uploaded-image
+</body>
+</html>
index c19355071959cf90e593a79cf4589279f3dc4e32..bd9843bdc94aa766f191f92a045ccb59f2abd0b6 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: calendar kernel http.server.dispatchers prettyprint
-sequences printf furnace.actions html.forms accessors
+sequences formatting furnace.actions html.forms accessors
 furnace.redirection ;
 IN: webapps.irc-log
 
index 01e068d35151c9e74c5b3015eab518ec630c992f..38a30979993818d006bc92b0c61509a19eb818f0 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2007, 2008 Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
 USING: namespaces assocs sorting sequences kernel accessors
-hashtables sequences.lib db.types db.tuples db combinators
+hashtables db.types db.tuples db combinators
 calendar calendar.format math.parser math.order syndication urls
 xml.writer xmode.catalog validators
 html.forms
index 6c097d7faaeec2314d08b090cc65131d41c280f3..52d64f0f9e1cc9268e5680da163e6fe19f791eb4 100755 (executable)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel accessors sequences sorting math math.order
 calendar alarms logging concurrency.combinators namespaces
-sequences.lib db.types db.tuples db fry locals hashtables
+db.types db.tuples db fry locals hashtables
 syndication urls xml.writer validators
 html.forms
 html.components
index f2c0600ed5a31bf53e03ed44d85067963c39942f..07fbbe059601e05cfabaa93b75c21781f6ff7262 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors kernel hashtables calendar random assocs
 namespaces make splitting sequences sorting math.order present
-io.files io.encodings.ascii
+io.files io.directories io.encodings.ascii
 syndication farkup
 html.components html.forms
 http.server
index 8c0b1beb8323303e4eb387f4608a7d17d628e804..322212c4fc7170edf9036ae8860f75d6d82d5dfa 100644 (file)
@@ -1,14 +1,15 @@
 USING: tools.deploy.config ;
 H{
+    { deploy-io 1 }
+    { deploy-threads? f }
+    { deploy-word-defs? f }
     { deploy-ui? f }
     { deploy-compiler? t }
+    { deploy-word-props? f }
+    { "stop-after-last-window?" t }
+    { deploy-unicode? f }
     { deploy-c-types? f }
+    { deploy-math? f }
     { deploy-reflection 1 }
     { deploy-name "WebKit demo" }
-    { deploy-io 1 }
-    { deploy-math? f }
-    { deploy-word-props? f }
-    { "stop-after-last-window?" t }
-    { deploy-word-defs? f }
-    { deploy-threads? f }
 }
index d7fdfa2460f60027c5e2b9b859f70adfb2f2453d..302967969f150328dd95ec98537a0a71c9d98acf 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (c) 2008 Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors kernel sequences assocs io.files io.sockets
-io.sockets.secure io.servers.connection
+USING: accessors kernel sequences assocs io.files io.pathnames
+io.sockets io.sockets.secure io.servers.connection
 namespaces db db.tuples db.sqlite smtp urls
 logging.insomniac
 html.templates.chloe
index 803f0c2a66de1d53146d76cd35f7ffa65e00ef92..7abdc149dd8ed71bf5077c4927739e7f457cb830 100644 (file)
@@ -30,7 +30,7 @@ SYMBOL: *calling*
   *calling* get-global at ; inline
     
 : timed-call ( quot word -- )
-  [ calling ] [ >r benchmark r> register-time ] [ finished ] tri ; inline
+  [ calling ] [ [ benchmark ] dip register-time ] [ finished ] tri ; inline
 
 : time-unless-recursing ( quot word -- )
   dup called-recursively? not
@@ -71,9 +71,10 @@ SYMBOL: *calling*
 
 : wordtimer-call ( quot -- )
   reset-word-timer 
-  benchmark >r
-  correct-for-timing-overhead
-  "total time:" write r> pprint nl
+  benchmark [
+      correct-for-timing-overhead
+      "total time:" write
+  ] dip pprint nl
   print-word-timings nl ;
 
 : profile-vocab ( vocab quot -- )
@@ -81,9 +82,10 @@ SYMBOL: *calling*
   over [ reset-vocab ] [ add-timers ] bi
   reset-word-timer
   "executing quotation..." print flush
-  benchmark >r
-  "resetting annotations..." print flush
-  reset-vocab
-  correct-for-timing-overhead
-  "total time:" write r> pprint
+  benchmark [
+      "resetting annotations..." print flush
+      reset-vocab
+      correct-for-timing-overhead
+      "total time:" write
+  ] dip pprint
   print-word-timings ;
index 768c13c54997f830fe99ae76d648b438adc7c872..8f4f53585aa3b6fbde6e36b231930115b8b0a344 100644 (file)
@@ -1,4 +1,4 @@
-Copyright (C) 2003, 2008 Slava Pestov and friends.
+Copyright (C) 2003, 2009 Slava Pestov and friends.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
diff --git a/misc/factor.vim b/misc/factor.vim
deleted file mode 100644 (file)
index 90a3d46..0000000
+++ /dev/null
@@ -1,265 +0,0 @@
-" Vim syntax file
-" Language:    factor
-" Maintainer:  Alex Chapman <chapman.alex@gmail.com>
-" Last Change: 2008 Apr 28
-
-" For version 5.x: Clear all syntax items
-" For version 6.x: Quit when a syntax file was already loaded
-if version < 600
-  syntax clear
-elseif exists("b:current_syntax")
-  finish
-endif
-
-" factor is case sensitive.
-syn case match
-
-" make all of these characters part of a word (useful for skipping over words with w, e, and b)
-if version >= 600
-    setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255
-else
-    set iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255
-endif
-
-syn cluster factorCluster contains=factorComment,factorKeyword,factorRepeat,factorConditional,factorBoolean,factorCompileDirective,factorString,factorSbuf,@factorNumber,@factorNumErr,factorDelimiter,factorChar,factorCharErr,factorBackslash,@factorWordOps,factorAlien,factorTuple
-
-syn match factorTodo /\(TODO\|FIXME\|XXX\):\=/ contained
-syn match factorComment /\<#! .*/ contains=factorTodo
-syn match factorComment /\<! .*/ contains=factorTodo
-
-syn cluster factorDefnContents contains=@factorCluster,factorStackEffect,factorArray0,factorQuotation0
-
-syn region factorDefn matchgroup=factorDefnDelims start=/\<\(MACRO\|MEMO\|:\)\?:\s\+\S\+\>/ end=/\<;\>/ contains=@factorDefnContents
-syn region factorMethod matchgroup=factorMethodDelims start=/\<M:\s\+\S\+\s\+\S\+\>/ end=/\<;\>/ contains=@factorDefnContents
-syn region factorGeneric matchgroup=factorGenericDelims start=/\<GENERIC:\s\+\S\+\>/ end=/$/ contains=factorStackEffect
-syn region factorGenericN matchgroup=factorGenericNDelims start=/\<GENERIC#\s\+\S\+\s\+\d\+\>/ end=/$/ contains=factorStackEffect
-
-syn region factorPrivateDefn matchgroup=factorPrivateDefnDelims start=/\<\(MACRO\|MEMO\|:\)\?:\s\+\S\+\>/ end=/\<;\>/ contains=@factorDefnContents contained
-syn region factorPrivateMethod matchgroup=factorPrivateMethodDelims start=/\<M:\s\+\S\+\s\+\S\+\>/ end=/\<;\>/ contains=@factorDefnContents contained
-syn region factorPGeneric matchgroup=factorPGenericDelims start=/\<GENERIC:\s\+\S\+\>/ end=/$/ contains=factorStackEffect contained
-syn region factorPGenericN matchgroup=factorPGenericNDelims start=/\<GENERIC#\s\+\S\+\s\+\d\+\>/ end=/$/ contains=factorStackEffect
-
-syn region None matchgroup=factorPrivate start=/\<<PRIVATE\>/ end=/\<PRIVATE>\>/ contains=@factorDefnContents,factorPrivateDefn,factorPrivateMethod,factorPGeneric,factorPGenericN
-
-
-syn keyword factorBoolean boolean f general-t t
-syn keyword factorCompileDirective inline foldable parsing
-
-
-
-" kernel vocab keywords
-syn keyword factorKeyword or construct-delegate set-slots tuck 2bi 2tri while wrapper nip bi* wrapper? hashcode callstack>array both? die set-delegate dupd callstack callstack? 3dup tri@ pick curry build prepose 3bi >boolean ?if clone eq? tri* ? = swapd call-clear 2over 2keep 3keep construct clear 2dup when not tuple? 3compose dup 2bi* call object bi@ wrapped unless* if* >r curry-quot drop when* retainstack -rot 2bi@ delegate boa with 3slip slip compose-first compose-second 3drop either? bi curry? datastack curry-obj over 3curry roll throw swap and 2nip set-retainstack (clone) hashcode* get-slots compose spin if 3tri unless compose? tuple keep 2curry equal? set-datastack 2slip tri 2drop most <wrapper> identity-tuple? null r> new set-callstack dip xor rot -roll identity-tuple 
-syn keyword factorKeyword assoc? assoc-clone-like delete-any assoc= delete-at* new-assoc subassoc? assoc-size map>assoc search-alist assoc-like key? assoc-intersect update assoc-union at* assoc-empty? at+ set-enum-seq set-at assoc-all? assoc-hashcode change-at assoc-each assoc-diff zip values value-at rename-at (assoc-stack) enum? at cache assoc>map assoc-contains? <enum> assoc assoc-map assoc-pusher (assoc>map) enum assoc-push-if remove-all >alist (substitute) substitute-here clear-assoc assoc-stack substitute assoc-filter delete-at assoc-find enum-seq keys 
-syn keyword factorKeyword case dispatch-case-quot with-datastack <buckets> no-cond no-case? 3cleave>quot (distribute-buckets) contiguous-range? 2cleave cond>quot no-cond? cleave>quot no-case recursive-hashcode case>quot 3cleave alist>quot dispatch-case hash-case-table hash-case-quot case-find cond cleave distribute-buckets 2cleave>quot linear-case-quot spread spread>quot hash-dispatch-quot 
-syn keyword factorKeyword byte-array>bignum sgn >bignum number= each-integer next-power-of-2 ?1+ imaginary-part mod recip float>bits rational >float number? 2^ bignum? integer fixnum? neg fixnum sq bignum (all-integers?) times denominator find-last-integer (each-integer) bit? * + power-of-2? - / >= bitand find-integer complex < real > log2 integer? number bits>double double>bits bitor 2/ zero? rem all-integers? (find-integer) real-part align bits>float float? shift float 1+ 1- fp-nan? ratio? bitxor even? ratio <= /mod >integer odd? rational? bitnot real? >fixnum complex? (next-power-of-2) /i numerator /f 
-syn keyword factorKeyword slice-to append left-trim find-last-from clone-like 3sequence map-as last-index-from reversed index-from pad-left cut* nth sequence slice? <slice> tail-slice empty? tail* find-from member? virtual-sequence? unclip set-length drop-prefix bounds-error? set-slice-seq map start open-slice midpoint@ set-immutable-seq move-forward rest-slice prepend fourth delete set-slice-to new-sequence follow all-eq? monotonic? set-reversed-seq like delete-nth first4 repetition-len (open-slice) reverse slice padding virtual@ repetition? index 4sequence max-length set-second first2 first3 (3append) supremum unclip-slice move-backward tail 3append sequence-hashcode-step right-trim reversed-seq pad-right suffix concat set-slice-from flip filter sum immutable? 2sequence delete-all start* immutable-sequence? (append) check-slice sequence? head set-slice-error-reason reduce set-bounds-error-index reverse-here sequence= halves collapse-slice interleave 2map binary-reduce virtual-seq slice-error? product bounds-check? bounds-check immutable find remove ((append)) set-fourth peek contains? reversed? shorter? push-new find-last head-slice pop* immutable-seq tail-slice* accumulate each pusher all-equal? new-resizable cut-slice head-slice* 2reverse-each pop memq? set-nth ?nth <flat-slice> second change-each join set-repetition-len <reversed> all? virtual-sequence set-repetition-elt subseq? immutable-sequence slice-error-reason new-like length last-index push-if 2all? lengthen joined-length copy set-bounds-error-seq cache-nth move third first slice-from repetition-elt tail? set-first prefix bounds-error bounds-error-seq bounds-error-index <repetition> unfold exchange slice-seq cut 2reduce change-nth min-length set-third (delete) push-all head? delete-slice rest sum-lengths 2each head* infimum sequence-hashcode slice-error subseq replace-slice repetition push trim mismatch 
-syn keyword factorKeyword global +@ set-namestack with-variable on set bind dec namestack get get-global change init-namespaces with-scope off set-global namespace % make , inc counter building make-assoc 
-syn keyword factorKeyword <array> 3array >array 4array pair? array pair 2array 1array resize-array array? 
-syn keyword factorKeyword readln stream-read-until stream-read-partial stderr with-stream read with-stream* print contents make-span-stream write1 stream-write1 stream-format make-block-stream stream-copy with-cell stream-write format with-row stream-print stream-read with-nesting (stream-copy) bl write-object nl stream-nl write stdio flush read-until tabular-output make-cell-stream write-cell stream-flush read1 lines stream-read1 stream-write-table with-style stream-readln 
-syn keyword factorKeyword resize-string >string <string> 1string string string? 
-syn keyword factorKeyword vector? <vector> ?push vector >vector 1vector 
-syn keyword factorKeyword rethrow-restarts restarts recover set-restart-name set-continuation-name condition-continuation <restart> ifcc continuation-name condition-error set-restart-continuation ignore-errors continuation-retain continue <continuation> restart-continuation with-disposal set-continuation-catch set-condition-error restart-obj error thread-error-hook set-continuation-retain continuation rethrow callcc1 callcc0 condition continuation? continuation-call continuation-data set-condition-restarts set-catchstack >continuation< error-continuation cleanup restart? compute-restarts condition? error-thread set-continuation-call set-condition-continuation <condition> set-restart-obj dispose set-continuation-data throw-restarts catchstack continue-with attempt-all restart restart-name continuation-catch condition-restarts 
-
-
-syn cluster factorReal   contains=factorInt,factorFloat,factorRatio,factorBinary,factorHex,factorOctal
-syn cluster factorNumber contains=@factorReal,factorComplex
-syn cluster factorNumErr contains=factorBinErr,factorHexErr,factorOctErr
-syn match   factorInt          /\<-\=\d\+\>/
-syn match   factorFloat                /\<-\=\d*\.\d\+\>/
-syn match   factorRatio                /\<-\=\d*\.*\d\+\/-\=\d*\.*\d\+\>/
-syn region  factorComplex      start=/\<C{\>/ end=/\<}\>/ contains=@factorReal
-syn match   factorBinErr        /\<BIN:\s\+[01]*[^\s01]\S*\>/
-syn match   factorBinary        /\<BIN:\s\+[01]\+\>/
-syn match   factorHexErr        /\<HEX:\s\+\x*[^\x\s]\S*\>/
-syn match   factorHex           /\<HEX:\s\+\x\+\>/
-syn match   factorOctErr        /\<OCT:\s\+\o*[^\o\s]\S*\>/
-syn match   factorOctal         /\<OCT:\s\+\o\+\>/
-
-syn match factorIn /\<IN:\s\+\S\+\>/
-syn match factorUse /\<USE:\s\+\S\+\>/
-
-syn match factorCharErr /\<CHAR:\s\+\S\+/
-syn match factorChar /\<CHAR:\s\+\\\=\S\>/
-
-syn match factorBackslash /\<\\\>\s\+\S\+\>/
-
-syn region factorUsing start=/\<USING:\>/ end=/;/
-syn region factorRequires start=/\<REQUIRES:\>/ end=/;/
-
-syn cluster factorWordOps contains=factorSymbol,factorPostpone,factorDefer,factorForget,factorMixin,factorInstance,factorHook,factorMain,factorConstructor
-syn match factorSymbol /\<SYMBOL:\s\+\S\+\>/
-syn match factorPostpone /\<POSTPONE:\s\+\S\+\>/
-syn match factorDefer /\<DEFER:\s\+\S\+\>/
-syn match factorForget /\<FORGET:\s\+\S\+\>/
-syn match factorMixin /\<MIXIN:\s\+\S\+\>/
-syn match factorInstance /\<INSTANCE:\s\+\S\+\s\+\S\+\>/
-syn match factorHook /\<HOOK:\s\+\S\+\s\+\S\+\>/
-syn match factorMain /\<MAIN:\s\+\S\+\>/
-syn match factorConstructor /\<C:\s\+\S\+\s\+\S\+\>/
-
-syn match factorAlien /\<ALIEN:\s\+\d\+\>/
-
-syn region factorTuple start=/\<TUPLE:\>/ end=/\<;\>/
-
-"TODO:
-"misc:
-" HELP:
-" ARTICLE:
-"literals:
-" PRIMITIVE:
-
-"C interface:
-" FIELD:
-" BEGIN-STRUCT:
-" C-ENUM:
-" FUNCTION:
-" END-STRUCT
-" DLL"
-" TYPEDEF:
-" LIBRARY:
-" C-UNION:
-
-syn region factorString start=/"/ skip=/\\"/ end=/"/ oneline
-syn region factorSbuf start=/SBUF" / skip=/\\"/ end=/"/ oneline
-
-syn region factorMultiString matchgroup=factorMultiStringDelims start=/\<STRING:\s\+\S\+\>/ end=/^;$/ contains=factorMultiStringContents
-syn match factorMultiStringContents /.*/ contained
-
-"syn match factorStackEffectErr /\<)\>/
-"syn region factorStackEffectErr start=/\<(\>/ end=/\<)\>/
-syn region factorStackEffect start=/\<(\>/ end=/\<)\>/ contained
-
-"adapted from lisp.vim
-if exists("g:factor_norainbow") 
-    syn region factorQuotation0 matchgroup=factorDelimiter start=/\<\'\?\[\>/ matchgroup=factorDelimiter end=/\<\]\>/ contains=ALL
-else
-    syn region factorQuotation0           matchgroup=hlLevel0 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation1,factorArray1
-    syn region factorQuotation1 contained matchgroup=hlLevel1 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation2,factorArray2
-    syn region factorQuotation2 contained matchgroup=hlLevel2 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation3,factorArray3
-    syn region factorQuotation3 contained matchgroup=hlLevel3 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation4,factorArray4
-    syn region factorQuotation4 contained matchgroup=hlLevel4 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation5,factorArray5
-    syn region factorQuotation5 contained matchgroup=hlLevel5 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation6,factorArray6
-    syn region factorQuotation6 contained matchgroup=hlLevel6 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation7,factorArray7
-    syn region factorQuotation7 contained matchgroup=hlLevel7 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation8,factorArray8
-    syn region factorQuotation8 contained matchgroup=hlLevel8 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation9,factorArray9
-    syn region factorQuotation9 contained matchgroup=hlLevel9 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation0,factorArray0
-endif
-
-if exists("g:factor_norainbow") 
-    syn region factorArray    matchgroup=factorDelimiter start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/  matchgroup=factorDelimiter end=/\<}\>/ contains=ALL
-else
-    syn region factorArray0           matchgroup=hlLevel0 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray1,factorQuotation1
-    syn region factorArray1 contained matchgroup=hlLevel1 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray2,factorQuotation2
-    syn region factorArray2 contained matchgroup=hlLevel2 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray3,factorQuotation3
-    syn region factorArray3 contained matchgroup=hlLevel3 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray4,factorQuotation4
-    syn region factorArray4 contained matchgroup=hlLevel4 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray5,factorQuotation5
-    syn region factorArray5 contained matchgroup=hlLevel5 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray6,factorQuotation6
-    syn region factorArray6 contained matchgroup=hlLevel6 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray7,factorQuotation7
-    syn region factorArray7 contained matchgroup=hlLevel7 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray8,factorQuotation8
-    syn region factorArray8 contained matchgroup=hlLevel8 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray9,factorQuotation9
-    syn region factorArray9 contained matchgroup=hlLevel9 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray0,factorQuotation0
-endif
-
-syn match factorBracketErr /\<\]\>/
-syn match factorBracketErr /\<}\>/
-
-syn sync lines=100
-
-if version >= 508 || !exists("did_factor_syn_inits")
-    if version <= 508
-       let did_factor_syn_inits = 1
-       command -nargs=+ HiLink hi link <args>
-    else
-       command -nargs=+ HiLink hi def link <args>
-    endif
-
-    HiLink factorComment       Comment
-    HiLink factorStackEffect   Typedef
-    HiLink factorTodo          Todo
-    HiLink factorInclude       Include
-    HiLink factorRepeat                Repeat
-    HiLink factorConditional   Conditional
-    HiLink factorKeyword       Keyword
-    HiLink factorOperator      Operator
-    HiLink factorBoolean       Boolean
-    HiLink factorDefnDelims    Typedef
-    HiLink factorMethodDelims  Typedef
-    HiLink factorGenericDelims        Typedef
-    HiLink factorGenericNDelims        Typedef
-    HiLink factorConstructor   Typedef
-    HiLink factorPrivate       Special
-    HiLink factorPrivateDefnDelims     Special
-    HiLink factorPrivateMethodDelims   Special
-    HiLink factorPGenericDelims        Special
-    HiLink factorPGenericNDelims        Special
-    HiLink factorString                String
-    HiLink factorSbuf          String
-    HiLink factorMultiStringContents           String
-    HiLink factorMultiStringDelims Typedef
-    HiLink factorBracketErr     Error
-    HiLink factorComplex       Number
-    HiLink factorRatio          Number
-    HiLink factorBinary         Number
-    HiLink factorBinErr         Error
-    HiLink factorHex            Number
-    HiLink factorHexErr         Error
-    HiLink factorOctal          Number
-    HiLink factorOctErr         Error
-    HiLink factorFloat         Float
-    HiLink factorInt           Number
-    HiLink factorUsing          Include
-    HiLink factorUse            Include
-    HiLink factorRequires       Include
-    HiLink factorIn             Define
-    HiLink factorChar           Character
-    HiLink factorCharErr        Error
-    HiLink factorDelimiter      Delimiter
-    HiLink factorBackslash      Special
-    HiLink factorCompileDirective Typedef
-    HiLink factorSymbol         Define
-    HiLink factorMixin         Typedef
-    HiLink factorInstance         Typedef
-    HiLink factorHook         Typedef
-    HiLink factorMain         Define
-    HiLink factorPostpone       Define
-    HiLink factorDefer          Define
-    HiLink factorForget         Define
-    HiLink factorAlien          Define
-    HiLink factorTuple          Typedef
-
-    if &bg == "dark"
-       hi   hlLevel0 ctermfg=red         guifg=red1
-       hi   hlLevel1 ctermfg=yellow      guifg=orange1
-       hi   hlLevel2 ctermfg=green       guifg=yellow1
-       hi   hlLevel3 ctermfg=cyan        guifg=greenyellow
-       hi   hlLevel4 ctermfg=magenta     guifg=green1
-       hi   hlLevel5 ctermfg=red         guifg=springgreen1
-       hi   hlLevel6 ctermfg=yellow      guifg=cyan1
-       hi   hlLevel7 ctermfg=green       guifg=slateblue1
-       hi   hlLevel8 ctermfg=cyan        guifg=magenta1
-       hi   hlLevel9 ctermfg=magenta     guifg=purple1
-    else
-       hi   hlLevel0 ctermfg=red         guifg=red3
-       hi   hlLevel1 ctermfg=darkyellow  guifg=orangered3
-       hi   hlLevel2 ctermfg=darkgreen   guifg=orange2
-       hi   hlLevel3 ctermfg=blue        guifg=yellow3
-       hi   hlLevel4 ctermfg=darkmagenta guifg=olivedrab4
-       hi   hlLevel5 ctermfg=red         guifg=green4
-       hi   hlLevel6 ctermfg=darkyellow  guifg=paleturquoise3
-       hi   hlLevel7 ctermfg=darkgreen   guifg=deepskyblue4
-       hi   hlLevel8 ctermfg=blue        guifg=darkslateblue
-       hi   hlLevel9 ctermfg=darkmagenta guifg=darkviolet
-    endif
-
-    delcommand HiLink
-endif
-
-let b:current_syntax = "factor"
-
-set sw=4
-set ts=4
-set expandtab
-set autoindent " annoying?
-
-" vim: syntax=vim
-
index 4dfb16da511679004088dbf36d11e03df06eeecd..cf96e29f5251e798eb05ce0b8b3fcd05cb9db1d9 100644 (file)
@@ -5,78 +5,182 @@ FUEL provides a complete environment for your Factor coding pleasure
 inside Emacs, including source code edition and interaction with a
 Factor listener instance running within Emacs.
 
-FUEL was started by Jose A Ortega as an extension to Ed Cavazos'
-original factor.el code.
+FUEL was started by Jose A Ortega as an extension to Eduardo Cavazos'
+original factor.el code. Eduardo is also responsible of naming the
+beast.
 
-Installation
-------------
+* Installation
 
-FUEL comes bundled with Factor's distribution. The folder misc/fuel
-contains Elisp code, and there's a fuel vocabulary in extras/fuel.
+  FUEL comes bundled with Factor's distribution. The folder misc/fuel
+  contains Elisp code, and there's a fuel vocabulary in extras/fuel.
 
-To install FUEL, either add this line to your Emacs initialisation:
+  To install FUEL, either add this line to your Emacs initialisation:
 
   (load-file "<path/to/factor/installation>/misc/fuel/fu.el")
 
-or
+  If all you want is a major mode for editing Factor code with pretty
+  font colors and indentation, without running the factor listener
+  inside Emacs, you can use instead:
 
-  (add-to-list load-path "<path/to/factor/installation>/fuel")
-  (require 'fuel)
-
-If all you want is a major mode for editing Factor code with pretty
-font colors and indentation, without running the factor listener
-inside Emacs, you can use instead:
-
-  (add-to-list load-path "<path/to/factor/installation>/fuel")
+  (add-to-list 'load-path "<path/to/factor/installation>/fuel")
   (setq factor-mode-use-fuel nil)
   (require 'factor-mode)
 
-Basic usage
------------
-
-If you're using the default factor binary and images locations inside
-the Factor's source tree, that should be enough to start using FUEL.
-Editing any file with the extension .factor will put you in
-factor-mode; try C-hm for a summary of available commands.
-
-To start the listener, try M-x run-factor.
-
-Many aspects of the environment can be customized:
-M-x customize-group fuel will show you how many.
-
-Quick key reference
--------------------
-
-(Chords ending in a single letter <x> accept also C-<x> (e.g. C-cC-z is
-the same as C-cz)).
-
-* In factor source files:
-
- - C-cz : switch to listener
- - C-co : cycle between code, tests and docs factor files
-
- - M-. : edit word at point in Emacs (also in listener)
-
- - C-cr, C-cC-er : eval region
- - C-M-r, C-cC-ee : eval region, extending it to definition boundaries
- - C-M-x, C-cC-ex : eval definition around point
- - C-ck, C-cC-ek : compile file
-
- - C-cC-da : toggle autodoc mode
- - C-cC-dd : help for word at point
- - C-cC-ds : short help word at point
-
-* In the debugger (it pops up upon eval/compilation errors):
-
- - g : go to error
- - <digit> : invoke nth restart
- - w/e/l : invoke :warnings, :errors, :linkage
- - q : bury buffer
-
-* In the Help browser:
-
- - RET : help for word at point
- - f/b : next/previous page
- - SPC/S-SPC : scroll up/down
- - q: bury buffer
-
+* Basic usage
+*** Running the listener
+
+    If you're using the default factor binary and images locations inside
+    the Factor's source tree, that should be enough to start using FUEL.
+    Editing any file with the extension .factor will put you in
+    factor-mode; try C-hm for a summary of available commands.
+
+    To start the listener, try M-x run-factor.
+
+    By default, FUEL will try to use the binary and image files in the
+    factor installation directory. You can customize them with:
+
+    (setq fuel-listener-factor-binary <full path to factor>)
+    (setq fuel-listener-factor-image <full path to factor image>)
+
+    Many aspects of the environment can be customized:
+    M-x customize-group fuel will show you how many.
+
+*** Faster listener startup
+
+    On startup, run-factor loads the fuel vocabulary, which can take a
+    while. If you want to speedup the load process, type 'save' in the
+    listener prompt just after invoking run-factor. This will save a
+    factor image (overwriting the current one) with all the needed
+    vocabs.
+
+*** Connecting to a running Factor
+
+    'run-factor' starts a new factor listener process managed by Emacs.
+    If you prefer to start Factor externally, you can also connect
+    remotely from Emacs. Here's how to proceed:
+
+    - In the factor listener, run FUEL: "fuel" run
+      This will start a server listener in port 9000.
+    - Switch to Emacs and issue the command 'M-x connect-to-factor'.
+
+  That's it; you should be up and running. See the help for
+  'connect-to-factor' for how to use a different port.
+
+*** Vocabulary creation
+
+    FUEL offers a basic interface to Factor's scaffolding utilities.
+    To create a new vocabulary directory and associated files:
+
+       M-x fuel-scaffold-vocab
+
+    and when in a vocab file, to create a docs file with boilerplate
+    for each word:
+
+       M-x fuel-scaffold-help
+
+* Quick key reference
+
+  Triple chords ending in a single letter <x> accept also C-<x> (e.g.
+  C-cC-eC-r is the same as C-cC-er).
+
+*** In factor source files:
+
+    Commands in parenthesis can be invoked interactively with
+    M-x <command>, not necessarily in a factor buffer.
+
+    |-----------------+------------------------------------------------------------|
+    | C-cz            | switch to listener (run-factor)                            |
+    | C-co            | cycle between code, tests and docs files                   |
+    | C-cr            | switch to listener and refresh all loaded vocabs           |
+    | C-cs            | switch to other factor buffer (fuel-switch-to-buffer)      |
+    | C-x4s           | switch to other factor buffer in other window              |
+    | C-x5s           | switch to other factor buffer in other frame               |
+    |-----------------+------------------------------------------------------------|
+    | M-.             | edit word at point in Emacs (fuel-edit-word)               |
+    | M-,             | go back to where M-. was last invoked                      |
+    | M-TAB           | complete word at point                                     |
+    | C-cC-eu         | update USING: line (fuel-update-usings)                    |
+    | C-cC-ev         | edit vocabulary (fuel-edit-vocabulary)                     |
+    | C-cC-ew         | edit word (fuel-edit-word-at-point)                        |
+    | C-cC-ed         | edit word's doc (C-u M-x fuel-edit-word-doc-at-point)      |
+    |-----------------+------------------------------------------------------------|
+    | C-cC-er         | eval region                                                |
+    | C-M-r, C-cC-ee  | eval region, extending it to definition boundaries         |
+    | C-M-x, C-cC-ex  | eval definition around point                               |
+    | C-ck, C-cC-ek   | run file (fuel-run-file)                                   |
+    |-----------------+------------------------------------------------------------|
+    | C-cC-da         | toggle autodoc mode (fuel-autodoc-mode)                    |
+    | C-cC-dd         | help for word at point (fuel-help)                         |
+    | C-cC-ds         | short help word at point (fuel-help-short)                 |
+    | C-cC-de         | show stack effect of current sexp (with prefix, region)    |
+    | C-cC-dp         | find words containing given substring (fuel-apropos)       |
+    | C-cC-dv         | show words in current file (with prefix, ask for vocab)    |
+    |-----------------+------------------------------------------------------------|
+    | C-cM-<, C-cC-d< | show callers of word or vocabulary at point                |
+    |                 | (fuel-show-callers, fuel-vocab-usage)                      |
+    | C-cM->, C-cC-d> | show callees of word or vocabulary at point                |
+    |                 | (fuel-show-callees, fuel-vocab-uses)                       |
+    |-----------------+------------------------------------------------------------|
+    | C-cC-xs         | extract innermost sexp (up to point) as a separate word    |
+    |                 | (fuel-refactor-extract-sexp)                               |
+    | C-cC-xr         | extract region as a separate word                          |
+    |                 | (fuel-refactor-extract-region)                             |
+    | C-cC-xv         | extract region as a separate vocabulary                    |
+    |                 | (fuel-refactor-extract-vocab)                              |
+    | C-cC-xi         | replace word by its definition (fuel-refactor-inline-word) |
+    | C-cC-xw         | rename all uses of a word (fuel-refactor-rename-word)      |
+    |-----------------+------------------------------------------------------------|
+
+*** In the listener:
+
+    |------+----------------------------------------------------------|
+    | TAB  | complete word at point                                   |
+    | M-.  | edit word at point in Emacs                              |
+    | C-cr | refresh all loaded vocabs                                |
+    | C-ca | toggle autodoc mode                                      |
+    | C-cp | find words containing given substring (M-x fuel-apropos) |
+    | C-cs | toggle stack mode                                        |
+    | C-cv | edit vocabulary                                          |
+    | C-ch | help for word at point                                   |
+    | C-ck | run file                                                 |
+    |------+----------------------------------------------------------|
+
+*** In the debugger (it pops up upon eval/compilation errors):
+
+    |---------+-------------------------------------|
+    | g       | go to error                         |
+    | <digit> | invoke nth restart                  |
+    | w/e/l   | invoke :warnings, :errors, :linkage |
+    | q       | bury buffer                         |
+    |---------+-------------------------------------|
+
+*** In the help browser:
+
+    |-----------+----------------------------------------------------------|
+    | h         | help for word at point                                   |
+    | v         | help for a vocabulary                                    |
+    | a         | find words containing given substring (M-x fuel-apropos) |
+    | e         | edit current article                                     |
+    | ba        | bookmark current page                                    |
+    | bb        | display bookmarks                                        |
+    | bd        | delete bookmark at point                                 |
+    | n/p       | next/previous page                                       |
+    | l         | previous page                                            |
+    | SPC/S-SPC | scroll up/down                                           |
+    | TAB/S-TAB | next/previous link                                       |
+    | k         | kill current page and go to previous or next             |
+    | r         | refresh page                                             |
+    | c         | clean browsing history                                   |
+    | M-.       | edit word at point in Emacs                              |
+    | C-cz      | switch to listener                                       |
+    | q         | bury buffer                                              |
+    |-----------+----------------------------------------------------------|
+
+*** In crossref buffers
+
+    |-----------------+-----------------------------|
+    | TAB/BACKTAB     | navigate links              |
+    | RET/mouse click | follow link                 |
+    | h               | show help for word at point |
+    | q               | bury buffer                 |
+    |-----------------+-----------------------------|
index b3952074f5376fe7b7efed2428a3e63336f185ae..ba9be2edd3e727e8e0c3b876f420188fc973c49a 100644 (file)
@@ -1,6 +1,6 @@
 ;;; factor-mode.el -- mode for editing Factor source
 
-;; Copyright (C) 2008 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2008, 2009 Jose Antonio Ortega Ruiz
 ;; See http://factorcode.org/license.txt for BSD license.
 
 ;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
 ;;; Customization:
 
 (defgroup factor-mode nil
-  "Major mode for Factor source code"
-  :group 'fuel)
+  "Major mode for Factor source code."
+  :group 'fuel
+  :group 'languages)
+
+(defcustom factor-mode-cycle-always-ask-p t
+  "Whether to always ask for file creation when cycling to a
+source/docs/tests file.
+
+When set to false, you'll be asked only once."
+  :type 'boolean
+  :group 'factor-mode)
 
 (defcustom factor-mode-use-fuel t
   "Whether to use the full FUEL facilities in factor mode.
@@ -59,23 +68,6 @@ code in the buffer."
   :type 'hook
   :group 'factor-mode)
 
-\f
-;;; Faces:
-
-(fuel-font-lock--define-faces
- factor-font-lock font-lock factor-mode
- ((comment comment "comments")
-  (constructor type  "constructors (<foo>)")
-  (declaration keyword "declaration words")
-  (parsing-word keyword  "parsing words")
-  (setter-word function-name "setter words (>>foo)")
-  (stack-effect comment "stack effect specifications")
-  (string string "strings")
-  (symbol variable-name "name of symbol being defined")
-  (type-name type "type names")
-  (vocabulary-name constant "vocabulary names")
-  (word function-name "word, generic or method being defined")))
-
 \f
 ;;; Syntax table:
 
@@ -84,8 +76,7 @@ code in the buffer."
   (set (make-local-variable 'beginning-of-defun-function)
        'fuel-syntax--beginning-of-defun)
   (set (make-local-variable 'end-of-defun-function) 'fuel-syntax--end-of-defun)
-  (set (make-local-variable 'open-paren-in-column-0-is-defun-start) nil)
-  (fuel-syntax--enable-usings))
+  (set (make-local-variable 'open-paren-in-column-0-is-defun-start) nil))
 
 \f
 ;;; Indentation:
@@ -112,13 +103,19 @@ code in the buffer."
   (save-excursion
     (beginning-of-line)
     (when (> (fuel-syntax--brackets-depth) 0)
-      (let ((op (fuel-syntax--brackets-start))
-            (cl (fuel-syntax--brackets-end))
-            (ln (line-number-at-pos)))
-        (when (> ln (line-number-at-pos op))
-          (if (and (> cl 0) (= ln (line-number-at-pos cl)))
-              (fuel-syntax--indentation-at op)
-            (fuel-syntax--increased-indentation (fuel-syntax--indentation-at op))))))))
+      (let* ((bs (fuel-syntax--brackets-start))
+             (be (fuel-syntax--brackets-end))
+             (ln (line-number-at-pos)))
+        (when (> ln (line-number-at-pos bs))
+          (cond ((and (> be 0)
+                      (= (- be (point)) (current-indentation))
+                      (= ln (line-number-at-pos be)))
+                 (fuel-syntax--indentation-at bs))
+                ((or (fuel-syntax--is-last-char bs)
+                     (not (eq ?\ (char-after (1+ bs)))))
+                 (fuel-syntax--increased-indentation
+                  (fuel-syntax--indentation-at bs)))
+                (t (+ 2 (fuel-syntax--line-offset bs)))))))))
 
 (defun factor-mode--indent-definition ()
   (save-excursion
@@ -147,8 +144,7 @@ code in the buffer."
     (cond ((or (fuel-syntax--at-end-of-def)
                (fuel-syntax--at-setter-line))
            (fuel-syntax--decreased-indentation))
-          ((and (fuel-syntax--at-begin-of-def)
-                (not (fuel-syntax--at-using)))
+          ((fuel-syntax--at-begin-of-indent-def)
            (fuel-syntax--increased-indentation))
           (t (current-indentation)))))
 
@@ -185,46 +181,73 @@ code in the buffer."
 (defconst factor-mode--cycle-endings
   '(".factor" "-tests.factor" "-docs.factor"))
 
-(defconst factor-mode--regex-cycle-endings
-  (format "\\(.*?\\)\\(%s\\)$"
-          (regexp-opt factor-mode--cycle-endings)))
+(make-local-variable
+ (defvar factor-mode--cycling-no-ask nil))
 
-(defconst factor-mode--cycle-endings-ring
+(defvar factor-mode--cycle-ring
   (let ((ring (make-ring (length factor-mode--cycle-endings))))
     (dolist (e factor-mode--cycle-endings ring)
-      (ring-insert ring e))))
+      (ring-insert ring e))
+    ring))
+
+(defconst factor-mode--cycle-basename-regex
+  (format "\\(.+?\\)\\(%s\\)$" (regexp-opt factor-mode--cycle-endings)))
+
+(defun factor-mode--cycle-split (basename)
+  (when (string-match factor-mode--cycle-basename-regex basename)
+    (cons (match-string 1 basename) (match-string 2 basename))))
 
 (defun factor-mode--cycle-next (file)
-  (let* ((match (string-match factor-mode--regex-cycle-endings file))
-         (base (and match (match-string-no-properties 1 file)))
-         (ending (and match (match-string-no-properties 2 file)))
-         (idx (and ending (ring-member factor-mode--cycle-endings-ring ending)))
-         (gfl (lambda (i) (concat base (ring-ref factor-mode--cycle-endings-ring i)))))
-    (if (not idx) file
-      (let ((l (length factor-mode--cycle-endings)) (i 1) next)
-        (while (and (not next) (< i l))
-          (when (file-exists-p (funcall gfl (+ idx i)))
-            (setq next (+ idx i)))
-          (setq i (1+ i)))
-        (funcall gfl (or next idx))))))
+  (let* ((dir (file-name-directory file))
+         (basename (file-name-nondirectory file))
+         (p/s (factor-mode--cycle-split basename))
+         (prefix (car p/s))
+         (ring factor-mode--cycle-ring)
+         (idx (or (ring-member ring (cdr p/s)) 0))
+         (len (ring-size ring))
+         (i 1)
+         (result nil))
+    (while (and (< i len) (not result))
+      (let* ((suffix (ring-ref ring (+ i idx)))
+             (path (expand-file-name (concat prefix suffix) dir)))
+        (when (or (file-exists-p path)
+                  (and (not (member suffix factor-mode--cycling-no-ask))
+                       (y-or-n-p (format "Create %s? " path))))
+          (setq result path))
+        (when (and (not factor-mode-cycle-always-ask-p)
+                   (not (member suffix factor-mode--cycling-no-ask)))
+          (setq factor-mode--cycling-no-ask
+                (cons name factor-mode--cycling-no-ask))))
+      (setq i (1+ i)))
+    result))
+
+(defsubst factor-mode--cycling-setup ()
+  (setq factor-mode--cycling-no-ask nil))
 
 (defun factor-mode-visit-other-file (&optional file)
   "Cycle between code, tests and docs factor files."
   (interactive)
-  (find-file (factor-mode--cycle-next (or file (buffer-file-name)))))
+  (let ((file (factor-mode--cycle-next (or file (buffer-file-name)))))
+    (unless file (error "No other file found"))
+    (find-file file)
+    (unless (file-exists-p file)
+      (set-buffer-modified-p t)
+      (save-buffer))))
 
 \f
 ;;; Keymap:
 
-(defun factor-mode-insert-and-indent (n)
-  (interactive "p")
-  (self-insert-command n)
-  (indent-for-tab-command))
+(defun factor-mode--insert-and-indent (n)
+  (interactive "*p")
+  (let ((start (point)))
+    (self-insert-command n)
+    (save-excursion (font-lock-fontify-region start (point))))
+  (indent-according-to-mode))
 
 (defvar factor-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map [?\]] 'factor-mode-insert-and-indent)
-    (define-key map [?}] 'factor-mode-insert-and-indent)
+    (define-key map [?\]] 'factor-mode--insert-and-indent)
+    (define-key map [?}] 'factor-mode--insert-and-indent)
     (define-key map "\C-m" 'newline-and-indent)
     (define-key map "\C-co" 'factor-mode-visit-other-file)
     (define-key map "\C-c\C-o" 'factor-mode-visit-other-file)
@@ -248,6 +271,7 @@ code in the buffer."
   (factor-mode--keymap-setup)
   (factor-mode--indentation-setup)
   (factor-mode--syntax-setup)
+  (factor-mode--cycling-setup)
   (when factor-mode-use-fuel (require 'fuel-mode) (fuel-mode))
   (run-hooks 'factor-mode-hook))
 
index 508d7ef3a47bb4c5054d43c8b63b46f1b2a0f834..e9217fbd036b47e420ba6ef6c7977249a84295eb 100644 (file)
@@ -1,6 +1,6 @@
 ;;; fu.el --- Startup file for FUEL
 
-;; Copyright (C) 2008  Jose Antonio Ortega Ruiz
+;; Copyright (C) 2008, 2009  Jose Antonio Ortega Ruiz
 ;; See http://factorcode.org/license.txt for BSD license.
 
 ;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
@@ -8,7 +8,11 @@
 
 ;;; Code:
 
-(add-to-list 'load-path (file-name-directory load-file-name))
+(setq fuel-factor-fuel-dir (file-name-directory load-file-name))
+
+(setq fuel-factor-root-dir (expand-file-name "../../" fuel-factor-fuel-dir))
+
+(add-to-list 'load-path fuel-factor-fuel-dir)
 
 (add-to-list 'auto-mode-alist '("\\.factor\\'" . factor-mode))
 (autoload 'factor-mode "factor-mode.el"
 (autoload 'run-factor "fuel-listener.el"
   "Start a Factor listener, or switch to a running one." t)
 
+(autoload 'switch-to-factor "fuel-listener.el"
+  "Start a Factor listener, or switch to a running one." t)
+
+(autoload 'connect-to-factor "fuel-listener.el"
+  "Connect to an external Factor listener." t)
+
 (autoload 'fuel-autodoc-mode "fuel-help.el"
   "Minor mode showing in the minibuffer a synopsis of Factor word at point."
   t)
 
+(autoload 'fuel-scaffold-vocab "fuel-scaffold.el"
+  "Create a new Factor vocabulary." t)
+
+(autoload 'fuel-scaffold-help "fuel-scaffold.el"
+  "Create a Factor vocabulary help file." t)
 
 \f
 ;;; fu.el ends here
diff --git a/misc/fuel/fuel-autodoc.el b/misc/fuel/fuel-autodoc.el
new file mode 100644 (file)
index 0000000..7691970
--- /dev/null
@@ -0,0 +1,92 @@
+;;; fuel-autodoc.el -- doc snippets in the echo area
+
+;; Copyright (C) 2008, 2009 Jose Antonio Ortega Ruiz
+;; See http://factorcode.org/license.txt for BSD license.
+
+;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
+;; Keywords: languages, fuel, factor
+;; Start date: Sat Dec 20, 2008 00:50
+
+;;; Comentary:
+
+;; Utilities for displaying information automatically in the echo
+;; area.
+
+;;; Code:
+
+(require 'fuel-eval)
+(require 'fuel-font-lock)
+(require 'fuel-syntax)
+(require 'fuel-base)
+
+\f
+;;; Customization:
+
+(defgroup fuel-autodoc nil
+  "Options controlling FUEL's autodoc system."
+  :group 'fuel)
+
+(defcustom fuel-autodoc-minibuffer-font-lock t
+  "Whether to use font lock for info messages in the minibuffer."
+  :group 'fuel-autodoc
+  :type 'boolean)
+
+
+\f
+;;; Eldoc function:
+
+(defvar fuel-autodoc--timeout 200)
+
+(defun fuel-autodoc--word-synopsis (&optional word)
+  (let ((word (or word (fuel-syntax-symbol-at-point)))
+        (fuel-log--inhibit-p t))
+    (when word
+      (let* ((cmd (if (fuel-syntax--in-using)
+                      `(:fuel* (,word fuel-vocab-summary) :in t)
+                    `(:fuel* (((:quote ,word) synopsis :get)) :in)))
+             (ret (fuel-eval--send/wait cmd fuel-autodoc--timeout))
+             (res (fuel-eval--retort-result ret)))
+        (when (and ret (not (fuel-eval--retort-error ret)) (stringp res))
+          (if fuel-autodoc-minibuffer-font-lock
+              (fuel-font-lock--factor-str res)
+            res))))))
+
+(make-variable-buffer-local
+ (defvar fuel-autodoc--fallback-function nil))
+
+(defun fuel-autodoc--eldoc-function ()
+  (or (and fuel-autodoc--fallback-function
+           (funcall fuel-autodoc--fallback-function))
+      (condition-case e
+          (fuel-autodoc--word-synopsis)
+        (error (format "Autodoc not available (%s)"
+                       (error-message-string e))))))
+
+\f
+;;; Autodoc mode:
+
+(make-variable-buffer-local
+ (defvar fuel-autodoc-mode-string " A"
+   "Modeline indicator for fuel-autodoc-mode"))
+
+(define-minor-mode fuel-autodoc-mode
+  "Toggle Fuel's Autodoc mode.
+With no argument, this command toggles the mode.
+Non-null prefix argument turns on the mode.
+Null prefix argument turns off the mode.
+
+When Autodoc mode is enabled, a synopsis of the word at point is
+displayed in the minibuffer."
+  :init-value nil
+  :lighter fuel-autodoc-mode-string
+  :group 'fuel-autodoc
+
+  (set (make-local-variable 'eldoc-documentation-function)
+       (when fuel-autodoc-mode 'fuel-autodoc--eldoc-function))
+  (set (make-local-variable 'eldoc-minor-mode-string) nil)
+  (eldoc-mode fuel-autodoc-mode)
+  (message "Fuel Autodoc %s" (if fuel-autodoc-mode "enabled" "disabled")))
+
+\f
+(provide 'fuel-autodoc)
+;;; fuel-autodoc.el ends here
index 9ea17903804baec494ac151cebba68c3c6fed0be..5e8364e3a7e561cb3b35a370e705bfbead07eaf5 100644 (file)
@@ -1,6 +1,6 @@
 ;;; fuel-base.el --- Basic FUEL support code
 
-;; Copyright (C) 2008  Jose Antonio Ortega Ruiz
+;; Copyright (C) 2008 Jose Antonio Ortega Ruiz
 ;; See http://factorcode.org/license.txt for BSD license.
 
 ;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
@@ -25,8 +25,8 @@
 
 ;;;###autoload
 (defgroup fuel nil
-  "Factor's Ultimate Emacs Library"
-  :group 'language)
+  "Factor's Ultimate Emacs Library."
+  :group 'languages)
 
 \f
 ;;; Emacs compatibility:
            (when (equal item (ring-ref ring ind))
              (throw 'found ind)))))))
 
+(when (not (fboundp 'completion-table-dynamic))
+  (defun completion-table-dynamic (fun)
+    (lexical-let ((fun fun))
+      (lambda (string pred action)
+        (with-current-buffer (let ((win (minibuffer-selected-window)))
+                               (if (window-live-p win) (window-buffer win)
+                                 (current-buffer)))
+          (complete-with-action action (funcall fun string) string pred))))))
+
+(when (not (fboundp 'looking-at-p))
+  (defsubst looking-at-p (regexp)
+    (let ((inhibit-changing-match-data t))
+      (looking-at regexp))))
+
 \f
 ;;; Utilities
 
                                 " ")
                      len))
 
+(defsubst fuel--region-to-string (begin &optional end)
+  (let ((end (or end (point))))
+    (if (< begin end)
+        (mapconcat 'identity
+                   (split-string (buffer-substring-no-properties begin end)
+                                 nil
+                                 t)
+                   " ")
+      "")))
+
 (defsubst empty-string-p (str) (equal str ""))
 
+(defun fuel--string-prefix-p (prefix str)
+  (and (>= (length str) (length prefix))
+       (string= (substring-no-properties str 0 (length prefix))
+                (substring-no-properties prefix))))
+
+(defun fuel--respecting-message (format &rest format-args)
+  "Display TEXT as a message, without hiding any minibuffer contents."
+  (let ((text (format " [%s]" (apply #'format format format-args))))
+    (if (minibuffer-window-active-p (minibuffer-window))
+        (minibuffer-message text)
+      (message "%s" text))))
+
 (provide 'fuel-base)
 ;;; fuel-base.el ends here
diff --git a/misc/fuel/fuel-completion.el b/misc/fuel/fuel-completion.el
new file mode 100644 (file)
index 0000000..e6ec8b2
--- /dev/null
@@ -0,0 +1,203 @@
+;;; fuel-completion.el -- completion utilities
+
+;; Copyright (C) 2008, 2009 Jose Antonio Ortega Ruiz
+;; See http://factorcode.org/license.txt for BSD license.
+
+;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
+;; Keywords: languages, fuel, factor
+;; Start date: Sun Dec 14, 2008 21:17
+
+;;; Comentary:
+
+;; Code completion utilities.
+
+;;; Code:
+
+(require 'fuel-base)
+(require 'fuel-syntax)
+(require 'fuel-eval)
+(require 'fuel-log)
+
+\f
+;;; Vocabs dictionary:
+
+(defvar fuel-completion--vocabs nil)
+
+(defun fuel-completion--vocabs (&optional reload)
+  (when (or reload (not fuel-completion--vocabs))
+    (fuel--respecting-message "Retrieving vocabs list")
+    (let ((fuel-log--inhibit-p t))
+      (setq fuel-completion--vocabs
+            (fuel-eval--retort-result
+             (fuel-eval--send/wait '(:fuel* (fuel-get-vocabs) "fuel" (:array)))))))
+  fuel-completion--vocabs)
+
+(defun fuel-completion--read-vocab (&optional reload init-input history)
+  (let ((vocabs (fuel-completion--vocabs reload)))
+    (completing-read "Vocab name: " vocabs nil nil init-input history)))
+
+(defsubst fuel-completion--vocab-list (prefix)
+  (fuel-eval--retort-result
+   (fuel-eval--send/wait `(:fuel* (,prefix fuel-get-vocabs/prefix) t t))))
+
+(defun fuel-completion--words (prefix vocabs)
+  (let ((vs (if vocabs (cons :array vocabs) 'f))
+        (us (or vocabs 't)))
+    (fuel-eval--retort-result
+     (fuel-eval--send/wait `(:fuel* (,prefix ,vs fuel-get-words) t ,us)))))
+
+\f
+;;; Completions window handling, heavily inspired in slime's:
+
+(defvar fuel-completion--comp-buffer "*Completions*")
+
+(make-variable-buffer-local
+ (defvar fuel-completion--window-cfg nil
+   "Window configuration before we show the *Completions* buffer.
+This is buffer local in the buffer where the completion is
+performed."))
+
+(make-variable-buffer-local
+ (defvar fuel-completion--completions-window nil
+   "The window displaying *Completions* after saving window configuration.
+If this window is no longer active or displaying the completions
+buffer then we can ignore `fuel-completion--window-cfg'."))
+
+(defun fuel-completion--save-window-cfg ()
+  "Maybe save the current window configuration.
+Return true if the configuration was saved."
+  (unless (or fuel-completion--window-cfg
+              (get-buffer-window fuel-completion--comp-buffer))
+    (setq fuel-completion--window-cfg
+          (current-window-configuration))
+    t))
+
+(defun fuel-completion--delay-restoration ()
+  (add-hook 'pre-command-hook
+            'fuel-completion--maybe-restore-window-cfg
+            nil t))
+
+(defun fuel-completion--forget-window-cfg ()
+  (setq fuel-completion--window-cfg nil)
+  (setq fuel-completion--completions-window nil))
+
+(defun fuel-completion--restore-window-cfg ()
+  "Restore the window config if available."
+  (remove-hook 'pre-command-hook
+               'fuel-completion--maybe-restore-window-cfg)
+  (when (and fuel-completion--window-cfg
+             (fuel-completion--window-active-p))
+    (save-excursion
+      (set-window-configuration fuel-completion--window-cfg))
+    (setq fuel-completion--window-cfg nil)
+    (when (buffer-live-p fuel-completion--comp-buffer)
+      (kill-buffer fuel-completion--comp-buffer))))
+
+(defun fuel-completion--maybe-restore-window-cfg ()
+  "Restore the window configuration, if the following command
+terminates a current completion."
+  (remove-hook 'pre-command-hook
+               'fuel-completion--maybe-restore-window-cfg)
+  (condition-case err
+      (cond ((find last-command-char "()\"'`,# \r\n:")
+             (fuel-completion--restore-window-cfg))
+            ((not (fuel-completion--window-active-p))
+             (fuel-completion--forget-window-cfg))
+            (t (fuel-completion--delay-restoration)))
+    (error
+     ;; Because this is called on the pre-command-hook, we mustn't let
+     ;; errors propagate.
+     (message "Error in fuel-completion--restore-window-cfg: %S" err))))
+
+(defun fuel-completion--window-active-p ()
+  "Is the completion window currently active?"
+  (and (window-live-p fuel-completion--completions-window)
+       (equal (buffer-name (window-buffer fuel-completion--completions-window))
+              fuel-completion--comp-buffer)))
+
+(defun fuel-completion--display-comp-list (completions base)
+  (let ((savedp (fuel-completion--save-window-cfg)))
+    (with-output-to-temp-buffer fuel-completion--comp-buffer
+      (display-completion-list completions base)
+      (let ((offset (- (point) 1 (length base))))
+        (with-current-buffer standard-output
+          (setq completion-base-size offset)
+          (set-syntax-table fuel-syntax--syntax-table))))
+    (when savedp
+      (setq fuel-completion--completions-window
+            (get-buffer-window fuel-completion--comp-buffer)))))
+
+(defun fuel-completion--display-or-scroll (completions base)
+  (cond ((and (eq last-command this-command) (fuel-completion--window-active-p))
+         (fuel-completion--scroll-completions))
+        (t (fuel-completion--display-comp-list completions base)))
+  (fuel-completion--delay-restoration))
+
+(defun fuel-completion--scroll-completions ()
+  (let ((window fuel-completion--completions-window))
+    (with-current-buffer (window-buffer window)
+      (if (pos-visible-in-window-p (point-max) window)
+          (set-window-start window (point-min))
+        (save-selected-window
+          (select-window window)
+          (scroll-up))))))
+
+\f
+;;; Completion functionality:
+
+(defun fuel-completion--word-list (prefix)
+  (let* ((fuel-log--inhibit-p t)
+         (cv (fuel-syntax--current-vocab))
+         (vs (and cv `("syntax" ,cv ,@(fuel-syntax--usings)))))
+    (fuel-completion--words prefix vs)))
+
+(defsubst fuel-completion--all-words-list (prefix)
+  (fuel-completion--words prefix nil))
+
+(defvar fuel-completion--word-list-func
+  (completion-table-dynamic 'fuel-completion--word-list))
+
+(defvar fuel-completion--all-words-list-func
+  (completion-table-dynamic 'fuel-completion--all-words-list))
+
+(defun fuel-completion--complete (prefix vocabs)
+  (let* ((words (if vocabs
+                    (fuel-completion--vocabs)
+                    (fuel-completion--word-list prefix)))
+         (completions (all-completions prefix words))
+         (partial (try-completion prefix words))
+         (partial (if (eq partial t) prefix partial)))
+    (cons completions partial)))
+
+(defun fuel-completion--read-word (prompt &optional default history all)
+  (completing-read prompt
+                   (if all fuel-completion--all-words-list-func
+                     fuel-completion--word-list-func)
+                   nil nil nil
+                   history
+                   (or default (fuel-syntax-symbol-at-point))))
+
+(defun fuel-completion--complete-symbol ()
+  "Complete the symbol at point.
+Perform completion similar to Emacs' complete-symbol."
+  (interactive)
+  (let* ((end (point))
+         (beg (fuel-syntax--beginning-of-symbol-pos))
+         (prefix (buffer-substring-no-properties beg end))
+         (result (fuel-completion--complete prefix (fuel-syntax--in-using)))
+         (completions (car result))
+         (partial (cdr result)))
+    (cond ((null completions)
+           (fuel--respecting-message "Can't find completion for %S" prefix)
+           (fuel-completion--restore-window-cfg))
+          (t (insert-and-inherit (substring partial (length prefix)))
+             (cond ((= (length completions) 1)
+                    (fuel--respecting-message "Sole completion")
+                    (fuel-completion--restore-window-cfg))
+                   (t (fuel--respecting-message "Complete but not unique")
+                      (fuel-completion--display-or-scroll completions
+                                                          partial)))))))
+
+\f
+(provide 'fuel-completion)
+;;; fuel-completion.el ends here
index 191424589c93bf87110484803d425106c8b1766c..14c4d0b36f8e1219858333eb01c098494ee9a137 100644 (file)
@@ -1,6 +1,6 @@
 ;;; fuel-connection.el -- asynchronous comms with the fuel listener
 
-;; Copyright (C) 2008 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2008, 2009 Jose Antonio Ortega Ruiz
 ;; See http://factorcode.org/license.txt for BSD license.
 
 ;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
 
 ;;; Code:
 
+(require 'fuel-log)
+(require 'fuel-base)
+
+(require 'comint)
+(require 'advice)
+
 \f
 ;;; Default connection:
 
 (defun fuel-con--get-connection (buffer/proc)
   (if (processp buffer/proc)
       (fuel-con--get-connection (process-buffer buffer/proc))
-    (with-current-buffer buffer/proc
-      (or fuel-con--connection
-          (setq fuel-con--connection
-                (fuel-con--setup-connection buffer/proc))))))
+    (with-current-buffer buffer/proc fuel-con--connection)))
 
 \f
 ;;; Request and connection datatypes:
 
 (defsubst fuel-con--make-connection (buffer)
   (list :fuel-connection
-        (list :requests)
-        (list :current)
+        (cons :requests (list))
+        (cons :current nil)
         (cons :completed (make-hash-table :weakness 'value))
-        (cons :buffer buffer)))
+        (cons :buffer buffer)
+        (cons :timer nil)))
 
 (defsubst fuel-con--connection-p (c)
   (and (listp c) (eq (car c) :fuel-connection)))
   (let ((reqs (assoc :requests c))
         (current (assoc :current c)))
     (setcdr current (prog1 (cadr reqs) (setcdr reqs (cddr reqs))))
-    (if (and current (fuel-con--request-deactivated-p current))
+    (if (and (cdr current)
+             (fuel-con--request-deactivated-p (cdr current)))
         (fuel-con--connection-pop-request c)
-      current)))
+      (cdr current))))
+
+(defun fuel-con--connection-start-timer (c)
+  (let ((cell (assoc :timer c)))
+    (when (cdr cell) (cancel-timer (cdr cell)))
+    (setcdr cell (run-at-time t 0.5 'fuel-con--process-next c))))
+
+(defun fuel-con--connection-cancel-timer (c)
+  (let ((cell (assoc :timer c)))
+    (when (cdr cell) (cancel-timer (cdr cell)))))
 
 \f
 ;;; Connection setup:
 
+(defun fuel-con--cleanup-connection (c)
+  (fuel-con--connection-cancel-timer c))
+
 (defun fuel-con--setup-connection (buffer)
   (set-buffer buffer)
+  (fuel-con--cleanup-connection fuel-con--connection)
+  (setq fuel-con--connection nil)
   (let ((conn (fuel-con--make-connection buffer)))
     (fuel-con--setup-comint)
-    (setq fuel-con--connection conn)))
+    (fuel-con--establish-connection conn buffer)))
+
+(defconst fuel-con--prompt-regex "( .+ ) ")
+(defconst fuel-con--eot-marker "<~FUEL~>")
+(defconst fuel-con--init-stanza "USE: fuel fuel-retort")
+
+(defconst fuel-con--comint-finished-regex-connected
+  (format "^%s$" fuel-con--eot-marker))
+
+(defvar fuel-con--comint-finished-regex fuel-con--prompt-regex)
 
 (defun fuel-con--setup-comint ()
+  (set (make-local-variable 'comint-redirect-insert-matching-regexp) t)
   (add-hook 'comint-redirect-filter-functions
-            'fuel-con--comint-redirect-filter t t))
+            'fuel-con--comint-preoutput-filter nil t)
+  (add-hook 'comint-redirect-hook
+            'fuel-con--comint-redirect-hook nil t))
+
+(defadvice comint-redirect-setup (after fuel-con--advice activate)
+  (setq comint-redirect-finished-regexp fuel-con--comint-finished-regex))
+
+(defun fuel-con--comint-preoutput-filter (str)
+  (when (string-match fuel-con--comint-finished-regex str)
+    (setq comint-redirect-finished-regexp fuel-con--prompt-regex))
+  str)
+
+(defun fuel-con--establish-connection (conn buffer)
+  (with-current-buffer (fuel-con--comint-buffer) (erase-buffer))
+  (with-current-buffer buffer
+    (setq fuel-con--connection conn)
+    (setq fuel-con--comint-finished-regex fuel-con--prompt-regex)
+    (fuel-con--send-string/wait buffer
+                                fuel-con--init-stanza
+                                'fuel-con--establish-connection-cont
+                                60000)
+    conn))
+
+(defun fuel-con--establish-connection-cont (ignore)
+  (let ((str (with-current-buffer (fuel-con--comint-buffer) (buffer-string))))
+    (if (string-match fuel-con--eot-marker str)
+        (progn
+          (setq fuel-con--comint-finished-regex
+                fuel-con--comint-finished-regex-connected)
+          (fuel-con--connection-start-timer conn)
+          (message "FUEL listener up and running!"))
+      (fuel-con--connection-clean-current-request fuel-con--connection)
+      (setq fuel-con--connection nil)
+      (message "An error occurred initialising FUEL's Factor library!")
+      (pop-to-buffer (fuel-con--comint-buffer)))))
 
 \f
 ;;; Requests handling:
 
+(defsubst fuel-con--comint-buffer ()
+  (get-buffer-create " *fuel connection retort*"))
+
+(defun fuel-con--comint-buffer-form ()
+  (with-current-buffer (fuel-con--comint-buffer)
+    (goto-char (point-min))
+    (condition-case nil
+        (let ((form (read (current-buffer))))
+          (if (listp form) form
+            (list 'fuel-con-error (buffer-string))))
+      (error (list 'fuel-con-error (buffer-string))))))
+
 (defun fuel-con--process-next (con)
   (when (not (fuel-con--connection-current-request con))
     (let* ((buffer (fuel-con--connection-buffer con))
            (req (fuel-con--connection-pop-request con))
-           (str (and req (fuel-con--request-string req))))
-      (when (and buffer req str)
-        (set-buffer buffer)
-        (comint-redirect-send-command str
-                                      (get-buffer-create "*factor messages*")
-                                      nil
-                                      t)))))
-
-(defun fuel-con--comint-redirect-filter (str)
+           (str (and req (fuel-con--request-string req)))
+           (cbuf (with-current-buffer (fuel-con--comint-buffer)
+                   (erase-buffer)
+                   (current-buffer))))
+      (if (not (buffer-live-p buffer))
+          (fuel-con--connection-cancel-timer con)
+        (when (and buffer req str)
+          (set-buffer buffer)
+          (fuel-log--info "<%s>: %s" (fuel-con--request-id req) str)
+          (comint-redirect-send-command (format "%s" str) cbuf nil t))))))
+
+(defun fuel-con--process-completed-request (req)
+  (let ((cont (fuel-con--request-continuation req))
+        (id (fuel-con--request-id req))
+        (rstr (fuel-con--request-string req))
+        (buffer (fuel-con--request-buffer req)))
+    (if (not cont)
+        (fuel-log--warn "<%s> Droping result for request %S (%s)"
+                            id rstr req)
+      (condition-case cerr
+          (with-current-buffer (or buffer (current-buffer))
+            (funcall cont (fuel-con--comint-buffer-form))
+            (fuel-log--info "<%s>: processed" id))
+        (error (fuel-log--error
+                "<%s>: continuation failed %S \n\t%s" id rstr cerr))))))
+
+(defun fuel-con--comint-redirect-hook ()
   (if (not fuel-con--connection)
-      (format "\nERROR: No connection in buffer (%s)\n" str)
+      (fuel-log--error "No connection in buffer")
     (let ((req (fuel-con--connection-current-request fuel-con--connection)))
-      (if (not req) (format "\nERROR: No current request (%s)\n" str)
-        (let ((cont (fuel-con--request-continuation req))
-              (id (fuel-con--request-id req))
-              (rstr (fuel-con--request-string req))
-              (buffer (fuel-con--request-buffer req)))
-          (prog1
-              (if (not cont)
-                  (format "\nWARNING: Droping result for request %s:%S (%s)\n"
-                          id rstr str)
-                (condition-case cerr
-                    (with-current-buffer (or buffer (current-buffer))
-                      (funcall cont str)
-                      (format "\nINFO: %s:%S processed\nINFO: %s\n" id rstr str))
-                  (error (format "\nERROR: continuation failed %s:%S \nERROR: %s\n"
-                                 id rstr cerr))))
-            (fuel-con--connection-clean-current-request fuel-con--connection)))))))
+      (if (not req) (fuel-log--error "No current request")
+        (fuel-con--process-completed-request req)
+        (fuel-con--connection-clean-current-request fuel-con--connection)))))
 
 \f
 ;;; Message sending interface:
 
+(defconst fuel-con--error-message "FUEL connection not active")
+
 (defun fuel-con--send-string (buffer/proc str cont &optional sender-buffer)
   (save-current-buffer
     (let ((con (fuel-con--get-connection buffer/proc)))
-      (unless con
-        (error "FUEL: couldn't find connection"))
+      (unless con (error fuel-con--error-message))
       (let ((req (fuel-con--make-request str cont sender-buffer)))
         (fuel-con--connection-queue-request con req)
         (fuel-con--process-next con)
 
 (defun fuel-con--send-string/wait (buffer/proc str cont &optional timeout sbuf)
   (save-current-buffer
-    (let* ((con (fuel-con--get-connection buffer/proc))
-         (req (fuel-con--send-string buffer/proc str cont sbuf))
-         (id (and req (fuel-con--request-id req)))
-         (time (or timeout fuel-connection-timeout))
-         (step 2))
-      (when id
-        (while (and (> time 0)
-                    (not (fuel-con--connection-completed-p con id)))
-          (sleep-for 0 step)
-          (setq time (- time step)))
-        (or (> time 0)
-            (fuel-con--request-deactivate req)
-            nil)))))
+    (let ((con (fuel-con--get-connection buffer/proc)))
+      (unless con (error fuel-con--error-message))
+      (let* ((req (fuel-con--send-string buffer/proc str cont sbuf))
+             (id (and req (fuel-con--request-id req)))
+             (time (or timeout fuel-connection-timeout))
+             (step 100)
+             (waitsecs (/ step 1000.0)))
+        (when id
+          (condition-case nil
+              (while (and (> time 0)
+                          (not (fuel-con--connection-completed-p con id)))
+                (accept-process-output nil waitsecs)
+                (setq time (- time step)))
+            (error (setq time 0)))
+          (or (> time 0)
+              (fuel-con--request-deactivate req)
+              nil))))))
 
 \f
 (provide 'fuel-connection)
diff --git a/misc/fuel/fuel-debug-uses.el b/misc/fuel/fuel-debug-uses.el
new file mode 100644 (file)
index 0000000..4842f96
--- /dev/null
@@ -0,0 +1,208 @@
+;;; fuel-debug-uses.el -- retrieving USING: stanzas
+
+;; Copyright (C) 2008, 2009 Jose Antonio Ortega Ruiz
+;; See http://factorcode.org/license.txt for BSD license.
+
+;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
+;; Keywords: languages, fuel, factor
+;; Start date: Tue Dec 23, 2008 04:23
+
+;;; Comentary:
+
+;; Support for getting and updating factor source vocabulary lists.
+
+;;; Code:
+
+(require 'fuel-debug)
+(require 'fuel-eval)
+(require 'fuel-popup)
+(require 'fuel-font-lock)
+(require 'fuel-base)
+
+
+\f
+;;; Customization:
+
+(fuel-font-lock--defface fuel-font-lock-debug-uses-header
+  'bold fuel-debug "headers in Uses buffers")
+
+(fuel-font-lock--defface fuel-font-lock-debug-uses-prompt
+  'italic fuel-debug "prompts in Uses buffers")
+
+\f
+;;; Utility functions:
+
+(defsubst fuel-debug--chomp (s)
+  (replace-regexp-in-string "[\n\r\f]" "" s))
+
+(defun fuel-debug--file-lines (file)
+  (when (file-readable-p file)
+    (with-current-buffer (find-file-noselect file)
+      (save-excursion
+        (goto-char (point-min))
+        (let ((lines) (in-usings))
+          (while (not (eobp))
+            (when (looking-at "^USING: ") (setq in-usings t))
+            (let ((line (fuel-debug--chomp
+                         (substring-no-properties (thing-at-point 'line)))))
+              (when in-usings (setq line (concat "! " line)))
+              (push line lines))
+            (when (and in-usings (looking-at "\\(^\\|.* \\);\\( \\|\n\\)"))
+              (setq in-usings nil))
+            (forward-line))
+          (reverse lines))))))
+
+(defun fuel-debug--uses-filter (restarts)
+  (let ((result) (i 1) (rn 0))
+    (dolist (r restarts (reverse result))
+      (setq rn (1+ rn))
+      (when (string-match "Use the .+ vocabulary\\|Defer" r)
+        (push (list i rn r) result)
+        (setq i (1+ i))))))
+
+\f
+;;; Retrieving USINGs:
+
+(fuel-popup--define fuel-debug--uses-buffer
+  "*fuel uses*" 'fuel-debug-uses-mode)
+
+(make-variable-buffer-local
+ (defvar fuel-debug--uses-file nil))
+
+(make-variable-buffer-local
+ (defvar fuel-debug--uses-restarts nil))
+
+(defsubst fuel-debug--uses-insert-title ()
+  (insert "Inferring USING: stanza for " fuel-debug--uses-file ".\n\n"))
+
+(defun fuel-debug--uses-prepare (file)
+  (fuel--with-popup (fuel-debug--uses-buffer)
+    (setq fuel-debug--uses-file file
+          fuel-debug--uses nil
+          fuel-debug--uses-restarts nil)
+    (erase-buffer)
+    (fuel-debug--uses-insert-title)))
+
+(defun fuel-debug--uses-clean ()
+  (setq fuel-debug--uses-file nil
+        fuel-debug--uses nil
+        fuel-debug--uses-restarts nil))
+
+(defun fuel-debug--uses-for-file (file)
+  (let* ((lines (fuel-debug--file-lines file))
+         (cmd `(:fuel ((V{ ,@lines } fuel-get-uses)) t t)))
+    (fuel-debug--uses-prepare file)
+    (fuel--with-popup (fuel-debug--uses-buffer)
+      (insert "Asking Factor. Please, wait ...\n")
+      (fuel-eval--send cmd 'fuel-debug--uses-cont))
+    (fuel-popup--display (fuel-debug--uses-buffer))))
+
+(defun fuel-debug--uses-cont (retort)
+  (let ((uses (fuel-debug--uses retort))
+        (err (fuel-eval--retort-error retort)))
+    (if uses (fuel-debug--uses-display uses)
+      (fuel-debug--uses-display-err retort))))
+
+(defun fuel-debug--uses-display (uses)
+  (let* ((inhibit-read-only t)
+         (old (with-current-buffer (find-file-noselect fuel-debug--uses-file)
+                (sort (fuel-syntax--find-usings t) 'string<)))
+         (new (sort uses 'string<)))
+    (erase-buffer)
+    (fuel-debug--uses-insert-title)
+    (if (equalp old new)
+        (progn
+          (insert "Current USING: is already fine!. Type 'q' to bury buffer.\n")
+          (fuel-debug--uses-clean))
+      (fuel-debug--highlight-names old new 'fuel-font-lock-debug-unneeded-vocab)
+      (fuel-debug--highlight-names new old 'fuel-font-lock-debug-missing-vocab)
+      (fuel-debug--insert-vlist "Current vocabulary list:" old)
+      (newline)
+      (fuel-debug--insert-vlist "Correct vocabulary list:" new)
+      (setq fuel-debug--uses new)
+      (insert "\nType 'y' to update your USING: to the new one.\n"))))
+
+(defun fuel-debug--uses-display-err (retort)
+  (let* ((inhibit-read-only t)
+         (err (fuel-eval--retort-error retort))
+         (restarts (fuel-debug--uses-filter (fuel-eval--error-restarts err)))
+         (unique (= 1 (length restarts))))
+    (erase-buffer)
+    (fuel-debug--uses-insert-title)
+    (insert (fuel-eval--retort-output retort))
+    (newline)
+    (if (not restarts)
+        (insert "\nSorry, couldn't infer the vocabulary list.\n")
+      (setq fuel-debug--uses-restarts restarts)
+      (if unique (fuel-debug--uses-restart 1)
+        (insert "\nPlease, type the number of the desired vocabulary:\n\n")
+        (dolist (r restarts)
+          (insert (format " :%s %s\n" (first r) (third r))))))))
+
+(defun fuel-debug--uses-update-usings ()
+  (interactive)
+  (let ((inhibit-read-only t)
+        (file fuel-debug--uses-file)
+        (uses fuel-debug--uses))
+    (when (and uses file)
+      (insert "\nDone!")
+      (fuel-debug--uses-clean)
+      (fuel-popup--quit)
+      (fuel-debug--replace-usings file uses)
+      (message "USING: updated!"))))
+
+(defun fuel-debug--uses-restart (n)
+  (when (and (> n 0) (<= n (length fuel-debug--uses-restarts)))
+    (let* ((inhibit-read-only t)
+           (restart (format ":%s" (cadr (nth (1- n) fuel-debug--uses-restarts))))
+           (cmd `(:fuel ([ (:factor ,restart) ] fuel-with-autouse) t t)))
+      (setq fuel-debug--uses-restarts nil)
+      (insert "\nAsking Factor. Please, wait ...\n")
+      (fuel-eval--send cmd 'fuel-debug--uses-cont))))
+
+\f
+;;; Fuel uses mode:
+
+(defvar fuel-debug-uses-mode-map
+  (let ((map (make-keymap)))
+    (suppress-keymap map)
+    (dotimes (n 9)
+      (define-key map (vector (+ ?1 n))
+        `(lambda () (interactive) (fuel-debug--uses-restart ,(1+ n)))))
+    (define-key map "y" 'fuel-debug--uses-update-usings)
+    (define-key map "\C-c\C-c" 'fuel-debug--uses-update-usings)
+    map))
+
+(defconst fuel-debug--uses-header-regex
+  (format "^%s.*$" (regexp-opt '("Inferring USING: stanza for "
+                                 "Current USING: is already fine!"
+                                 "Current vocabulary list:"
+                                 "Correct vocabulary list:"
+                                 "Sorry, couldn't infer the vocabulary list."
+                                 "Done!"))))
+
+(defconst fuel-debug--uses-prompt-regex
+  (format "^%s" (regexp-opt '("Asking Factor. Please, wait ..."
+                              "Please, type the number of the desired vocabulary:"
+                              "Type 'y' to update your USING: to the new one."))))
+
+(defconst fuel-debug--uses-font-lock-keywords
+  `((,fuel-debug--uses-header-regex . 'fuel-font-lock-debug-uses-header)
+    (,fuel-debug--uses-prompt-regex . 'fuel-font-lock-debug-uses-prompt)
+    (,fuel-debug--restart-regex (1 'fuel-font-lock-debug-restart-number)
+                                (2 'fuel-font-lock-debug-restart-name))))
+
+(defun fuel-debug-uses-mode ()
+  "A major mode for displaying Factor's USING: inference results."
+  (interactive)
+  (kill-all-local-variables)
+  (buffer-disable-undo)
+  (setq major-mode 'fuel-debug-uses-mode)
+  (setq mode-name "Fuel Uses:")
+  (set (make-local-variable 'font-lock-defaults)
+       '(fuel-debug--uses-font-lock-keywords t nil nil nil))
+  (use-local-map fuel-debug-uses-mode-map))
+
+\f
+(provide 'fuel-debug-uses)
+;;; fuel-debug-uses.el ends here
index ad9f47ceb1a62fba34bdab6d907fdf0ea06c215f..611884e087e47da800bf030f9d77f65af97c6925 100644 (file)
@@ -1,6 +1,6 @@
 ;;; fuel-debug.el -- debugging factor code
 
-;; Copyright (C) 2008 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2008, 2009 Jose Antonio Ortega Ruiz
 ;; See http://factorcode.org/license.txt for BSD license.
 
 ;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
 
 ;;; Code:
 
-(require 'fuel-base)
 (require 'fuel-eval)
+(require 'fuel-popup)
 (require 'fuel-font-lock)
+(require 'fuel-base)
 
 \f
 ;;; Customization:
 
 (defgroup fuel-debug nil
-  "Major mode for interaction with the Factor debugger"
+  "Major mode for interaction with the Factor debugger."
   :group 'fuel)
 
 (defcustom fuel-debug-mode-hook nil
-  "Hook run after `fuel-debug-mode' activates"
+  "Hook run after `fuel-debug-mode' activates."
   :group 'fuel-debug
   :type 'hook)
 
+(defcustom fuel-debug-confirm-restarts-p t
+  "Whether to ask for confimation before executing a restart in
+the debugger."
+  :group 'fuel-debug
+  :type 'boolean)
+
 (defcustom fuel-debug-show-short-help t
-  "Whether to show short help on available keys in debugger"
+  "Whether to show short help on available keys in debugger."
   :group 'fuel-debug
   :type 'boolean)
 
 (fuel-font-lock--define-faces
- fuel-debug-font-lock font-lock fuel-debug
+ fuel-font-lock-debug font-lock fuel-debug
  ((error warning "highlighting errors")
   (line variable-name "line numbers in errors/warnings")
   (column variable-name "column numbers in errors/warnings")
   (info comment "information headers")
   (restart-number warning "restart numbers")
-  (restart-name function-name "restart names")))
+  (restart-name function-name "restart names")
+  (missing-vocab warning"missing vocabulary names")
+  (unneeded-vocab warning "unneeded vocabulary names")))
 
 \f
 ;;; Font lock and other pattern matching:
 (defconst fuel-debug--restart-regex "^:\\([0-9]+\\) \\(.+\\)")
 
 (defconst fuel-debug--font-lock-keywords
-  `((,fuel-debug--error-file-regex . 'fuel-debug-font-lock-error)
-    (,fuel-debug--error-line-regex 1 'fuel-debug-font-lock-line)
-    (,fuel-debug--error-cont-regex 1 'fuel-debug-font-lock-column)
-    (,fuel-debug--restart-regex (1 'fuel-debug-font-lock-restart-number)
-                                (2 'fuel-debug-font-lock-restart-name))
-    (,fuel-debug--compiler-info-regex 1 'fuel-debug-font-lock-restart-number)
-    ("^\\(Restarts?\\|Loading\\) .+$" . 'fuel-debug-font-lock-info)
-    ("^Error: " . 'fuel-debug-font-lock-error)))
+  `((,fuel-debug--error-file-regex . 'fuel-font-lock-debug-error)
+    (,fuel-debug--error-line-regex 1 'fuel-font-lock-debug-line)
+    (,fuel-debug--error-cont-regex 1 'fuel-font-lock-debug-column)
+    (,fuel-debug--restart-regex (1 'fuel-font-lock-debug-restart-number)
+                                (2 'fuel-font-lock-debug-restart-name))
+    (,fuel-debug--compiler-info-regex 1 'fuel-font-lock-debug-restart-number)
+    ("^\\(Restarts?\\|Loading\\) .+$" . 'fuel-font-lock-debug-info)
+    ("^Error: " . 'fuel-font-lock-debug-error)))
 
 (defun fuel-debug--font-lock-setup ()
   (set (make-local-variable 'font-lock-defaults)
@@ -82,7 +91,8 @@
 \f
 ;;; Debug buffer:
 
-(defvar fuel-debug--buffer nil)
+(fuel-popup--define fuel-debug--buffer
+  "*fuel debug*" 'fuel-debug-mode)
 
 (make-variable-buffer-local
  (defvar fuel-debug--last-ret nil))
 (make-variable-buffer-local
  (defvar fuel-debug--file nil))
 
-(defun fuel-debug--buffer ()
-  (or (and (buffer-live-p fuel-debug--buffer) fuel-debug--buffer)
-      (with-current-buffer
-          (setq fuel-debug--buffer (get-buffer-create "*fuel dbg*"))
-        (fuel-debug-mode)
-        (current-buffer))))
+(make-variable-buffer-local
+ (defvar fuel-debug--uses nil))
 
-(defun fuel-debug--display-retort (ret &optional success-msg no-pop file)
+(defun fuel-debug--prepare-compilation (file msg)
+  (let ((inhibit-read-only t))
+    (with-current-buffer (fuel-debug--buffer)
+      (erase-buffer)
+      (insert msg)
+      (setq fuel-debug--file file))))
+
+(defun fuel-debug--display-retort (ret &optional success-msg no-pop)
   (let ((err (fuel-eval--retort-error ret))
         (inhibit-read-only t))
     (with-current-buffer (fuel-debug--buffer)
       (when err
         (fuel-debug--display-restarts err)
         (delete-blank-lines)
-        (newline)
-        (let ((hstr (fuel-debug--help-string err file)))
-          (if fuel-debug-show-short-help
-              (insert "-----------\n" hstr "\n")
-            (message "%s" hstr))))
+        (newline))
+      (fuel-debug--display-uses ret)
+      (let ((hstr (fuel-debug--help-string err fuel-debug--file)))
+        (if fuel-debug-show-short-help
+            (insert "-----------\n" hstr "\n")
+          (message "%s" hstr)))
       (setq fuel-debug--last-ret ret)
-      (setq fuel-debug--file file)
       (goto-char (point-max))
-      (when (and err (not no-pop)) (pop-to-buffer fuel-debug--buffer))
+      (font-lock-fontify-buffer)
+      (when (and err (not no-pop)) (fuel-popup--display))
       (not err))))
 
+(defun fuel-debug--uses (ret)
+  (let ((uses (fuel-eval--retort-result ret)))
+    (and (eq :uses (car uses))
+         (cdr uses))))
+
+(defun fuel-debug--insert-vlist (title vlist)
+  (goto-char (point-max))
+  (insert title "\n\n  ")
+  (let ((i 0) (step 5))
+    (dolist (v vlist)
+      (setq i (1+ i))
+      (insert v)
+      (insert (if (zerop (mod i step)) "\n  " " ")))
+    (unless (zerop (mod i step)) (newline))
+    (newline)))
+
+(defun fuel-debug--highlight-names (names ref face)
+  (dolist (n names)
+    (when (not (member n ref))
+      (put-text-property 0 (length n) 'font-lock-face face n))))
+
+(defun fuel-debug--insert-uses (uses)
+  (let* ((file (or file fuel-debug--file))
+         (old (with-current-buffer (find-file-noselect file)
+                (sort (fuel-syntax--find-usings t) 'string<)))
+         (new (sort uses 'string<)))
+    (when (not (equalp old new))
+      (fuel-debug--highlight-names old new 'fuel-font-lock-debug-unneeded-vocab)
+      (newline)
+      (fuel-debug--insert-vlist "Correct vocabulary list:" new)
+      new)))
+
+(defun fuel-debug--display-uses (ret)
+  (when (setq fuel-debug--uses (fuel-debug--uses ret))
+    (newline)
+    (fuel-debug--highlight-names fuel-debug--uses
+                                 nil 'fuel-font-lock-debug-missing-vocab)
+    (fuel-debug--insert-vlist "Missing vocabularies:" fuel-debug--uses)
+    (newline)))
+
 (defun fuel-debug--display-output (ret)
   (let* ((last (fuel-eval--retort-output fuel-debug--last-ret))
          (current (fuel-eval--retort-output ret))
          (trail (and last (substring-no-properties last (/ llen 2))))
          (err (fuel-eval--retort-error ret))
          (p (point)))
-    (save-excursion (insert current))
+    (when current (save-excursion (insert current)))
     (when (and (> clen llen) (> llen 0) (search-forward trail nil t))
       (delete-region p (point)))
     (goto-char (point-max))
       (newline))))
 
 (defun fuel-debug--help-string (err &optional file)
-  (format "Press %s%s%sq bury buffer"
+  (format "Press %s%s%s%sq bury buffer"
           (if (or file (fuel-eval--error-file err)) "g go to file, " "")
           (let ((rsn (length (fuel-eval--error-restarts err))))
             (cond ((zerop rsn) "")
               (save-excursion
                 (goto-char (point-min))
                 (when (search-forward (car ci) nil t)
-                  (setq str (format "%c %s, %s" (cdr ci) (car ci) str))))))))
+                  (setq str (format "%c %s, %s" (cdr ci) (car ci) str))))))
+          (if fuel-debug--uses "u to update USING:, " "")))
 
 (defun fuel-debug--buffer-file ()
   (with-current-buffer (fuel-debug--buffer)
 
 (defun fuel-debug-goto-error ()
   (interactive)
-  (let* ((err (or (fuel-debug--buffer-error)
-                  (error "No errors reported")))
+  (let* ((err (fuel-debug--buffer-error))
          (file (or (fuel-debug--buffer-file)
-                   (error "No file associated with error")))
-         (l/c (fuel-eval--error-line/column err))
+                   (error "No file associated with compilation")))
+         (l/c (and err (fuel-eval--error-line/column err)))
          (line (or (car l/c) 1))
          (col (or (cdr l/c) 0)))
     (find-file-other-window file)
-    (goto-line line)
-    (forward-char col)))
+    (when line
+      (goto-line line)
+      (when col (forward-char col)))))
 
 (defun fuel-debug--read-restart-no ()
   (let ((rs (fuel-debug--buffer-restarts)))
              (buffer (if file (find-file-noselect file) (current-buffer))))
         (with-current-buffer buffer
           (fuel-debug--display-retort
-           (fuel-eval--send/wait (fuel-eval--cmd/string (format ":%s" n)))
+           (fuel-eval--send/wait `(:fuel ((:factor ,(format ":%s" n)))))
            (format "Restart %s (%s) successful" n (nth (1- n) rs))))))))
 
 (defun fuel-debug-show--compiler-info (info)
       (error "%s information not available" info))
     (message "Retrieving %s info ..." info)
     (unless (fuel-debug--display-retort
-             (fuel-eval--send/wait (fuel-eval--cmd/string info))
-             "" (fuel-debug--buffer-file))
+             (fuel-eval--send/wait `(:fuel ((:factor ,info)))) "")
       (error "Sorry, no %s info available" info))))
 
+(defun fuel-debug--replace-usings (file uses)
+  (pop-to-buffer (find-file-noselect file))
+  (goto-char (point-min))
+  (if (re-search-forward "^USING: " nil t)
+      (let ((begin (point))
+            (end (or (and (re-search-forward ";\\( \\|$\\)") (point))
+                     (point))))
+        (kill-region begin end))
+    (re-search-forward "^IN: " nil t)
+    (beginning-of-line)
+    (open-line 2)
+    (insert "USING: "))
+  (let ((start (point)))
+    (insert (mapconcat 'substring-no-properties uses " ") " ;")
+    (fill-region start (point) nil)))
+
+(defun fuel-debug-update-usings ()
+  (interactive)
+  (when (and fuel-debug--file fuel-debug--uses)
+    (let* ((file fuel-debug--file)
+           (old (with-current-buffer (find-file-noselect file)
+                  (fuel-syntax--find-usings t)))
+           (uses (sort (append fuel-debug--uses old) 'string<)))
+      (fuel-popup--quit)
+      (fuel-debug--replace-usings file uses))))
+
 \f
 ;;; Fuel Debug mode:
 
     (define-key map "\C-c\C-c" 'fuel-debug-goto-error)
     (define-key map "n" 'next-line)
     (define-key map "p" 'previous-line)
-    (define-key map "q" 'bury-buffer)
+    (define-key map "u" 'fuel-debug-update-usings)
     (dotimes (n 9)
       (define-key map (vector (+ ?1 n))
-        `(lambda () (interactive) (fuel-debug-exec-restart ,(1+ n) t))))
+        `(lambda () (interactive)
+           (fuel-debug-exec-restart ,(1+ n) fuel-debug-confirm-restarts-p))))
     (dolist (ci fuel-debug--compiler-info-alist)
       (define-key map (vector (cdr ci))
         `(lambda () (interactive) (fuel-debug-show--compiler-info ,(car ci)))))
@@ -253,15 +334,16 @@ invoking restarts as needed.
 \\{fuel-debug-mode-map}"
   (interactive)
   (kill-all-local-variables)
-  (setq major-mode 'factor-mode)
+  (buffer-disable-undo)
+  (setq major-mode 'fuel-debug-mode)
   (setq mode-name "Fuel Debug")
   (use-local-map fuel-debug-mode-map)
   (fuel-debug--font-lock-setup)
   (setq fuel-debug--file nil)
   (setq fuel-debug--last-ret nil)
-  (toggle-read-only 1)
   (run-hooks 'fuel-debug-mode-hook))
 
+
 \f
 (provide 'fuel-debug)
 ;;; fuel-debug.el ends here
diff --git a/misc/fuel/fuel-edit.el b/misc/fuel/fuel-edit.el
new file mode 100644 (file)
index 0000000..e5f0ffd
--- /dev/null
@@ -0,0 +1,170 @@
+;;; fuel-edit.el -- utilities for file editing
+
+;; Copyright (C) 2009 Jose Antonio Ortega Ruiz
+;; See http://factorcode.org/license.txt for BSD license.
+
+;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
+;; Keywords: languages, fuel, factor
+;; Start date: Mon Jan 05, 2009 21:16
+
+;;; Comentary:
+
+;; Locating and opening factor source and documentation files.
+
+;;; Code:
+
+(require 'fuel-completion)
+(require 'fuel-eval)
+(require 'fuel-base)
+
+(require 'etags)
+
+\f
+;;; Customization
+
+(defmacro fuel-edit--define-custom-visit (var group doc)
+  `(defcustom ,var nil
+     ,doc
+     :group ',group
+     :type '(choice (const :tag "Other window" window)
+                    (const :tag "Other frame" frame)
+                    (const :tag "Current window" nil))))
+
+(fuel-edit--define-custom-visit
+ fuel-edit-word-method fuel
+ "How the new buffer is opened when invoking \\[fuel-edit-word-at-point]")
+
+\f
+;;; Auxiliar functions:
+
+(defun fuel-edit--visit-file (file method)
+  (cond ((eq method 'window) (find-file-other-window file))
+        ((eq method 'frame) (find-file-other-frame file))
+        (t (find-file file))))
+
+(defun fuel-edit--looking-at-vocab ()
+  (save-excursion
+    (fuel-syntax--beginning-of-defun)
+    (looking-at "USING:\\|USE:\\|IN:")))
+
+(defun fuel-edit--try-edit (ret)
+  (let* ((err (fuel-eval--retort-error ret))
+         (loc (fuel-eval--retort-result ret)))
+    (when (or err (not loc) (not (listp loc)) (not (stringp (car loc))))
+      (error "Couldn't find edit location"))
+    (unless (file-readable-p (car loc))
+      (error "Couldn't open '%s' for read" (car loc)))
+    (fuel-edit--visit-file (car loc) fuel-edit-word-method)
+    (goto-line (if (numberp (cadr loc)) (cadr loc) 1))))
+
+(defun fuel-edit--read-vocabulary-name (refresh)
+  (let* ((vocabs (fuel-completion--vocabs refresh))
+         (prompt "Vocabulary name: "))
+    (if vocabs
+        (completing-read prompt vocabs nil nil nil fuel-edit--vocab-history)
+      (read-string prompt nil fuel-edit--vocab-history))))
+
+(defun fuel-edit--edit-article (name)
+  (let ((cmd `(:fuel* (,name fuel-get-article-location) "fuel" t)))
+    (fuel-edit--try-edit (fuel-eval--send/wait cmd))))
+
+\f
+;;; Editing commands:
+
+(defvar fuel-edit--word-history nil)
+(defvar fuel-edit--vocab-history nil)
+(defvar fuel-edit--previous-location nil)
+
+(defun fuel-edit-vocabulary (&optional refresh vocab)
+  "Visits vocabulary file in Emacs.
+When called interactively, asks for vocabulary with completion.
+With prefix argument, refreshes cached vocabulary list."
+  (interactive "P")
+  (let* ((vocab (or vocab (fuel-edit--read-vocabulary-name refresh)))
+         (cmd `(:fuel* (,vocab fuel-get-vocab-location) "fuel" t)))
+    (fuel-edit--try-edit (fuel-eval--send/wait cmd))))
+
+(defun fuel-edit-word (&optional arg)
+  "Asks for a word to edit, with completion.
+With prefix, only words visible in the current vocabulary are
+offered."
+  (interactive "P")
+  (let* ((word (fuel-completion--read-word "Edit word: "
+                                           nil
+                                           fuel-edit--word-history
+                                           arg))
+         (cmd `(:fuel* ((:quote ,word) fuel-get-word-location))))
+    (fuel-edit--try-edit (fuel-eval--send/wait cmd))))
+
+(defun fuel-edit-word-at-point (&optional arg)
+  "Opens a new window visiting the definition of the word at point.
+With prefix, asks for the word to edit."
+  (interactive "P")
+  (let* ((word (or (and (not arg) (fuel-syntax-symbol-at-point))
+                   (fuel-completion--read-word "Edit word: ")))
+         (cmd `(:fuel* ((:quote ,word) fuel-get-word-location)))
+         (marker (and (not arg) (point-marker))))
+    (if (and (not arg) (fuel-edit--looking-at-vocab))
+        (fuel-edit-vocabulary nil word)
+      (fuel-edit--try-edit (fuel-eval--send/wait cmd)))
+    (when marker (ring-insert find-tag-marker-ring marker))))
+
+(defun fuel-edit-word-doc-at-point (&optional arg word)
+  "Opens a new window visiting the documentation file for the word at point.
+With prefix, asks for the word to edit."
+  (interactive "P")
+  (let* ((word (or word
+                   (and (not arg) (fuel-syntax-symbol-at-point))
+                   (fuel-completion--read-word "Edit word: ")))
+         (cmd `(:fuel* ((:quote ,word) fuel-get-doc-location)))
+         (marker (and (not arg) (point-marker))))
+    (condition-case nil
+        (fuel-edit--try-edit (fuel-eval--send/wait cmd))
+      (error
+       (message "Documentation for '%s' not found" word)
+       (when (and (eq major-mode 'factor-mode)
+                  (y-or-n-p (concat "No documentation found. "
+                                    "Do you want to open the vocab's "
+                                    "doc file? ")))
+         (when marker (ring-insert find-tag-marker-ring marker))
+         (find-file-other-window
+          (format "%s-docs.factor"
+                  (file-name-sans-extension (buffer-file-name)))))))))
+
+(defun fuel-edit-pop-edit-word-stack ()
+  "Pop back to where \\[fuel-edit-word-at-point] or \\[fuel-edit-word-doc-at-point]
+was last invoked."
+  (interactive)
+  (condition-case nil
+      (pop-tag-mark)
+    (error "No previous location for find word or vocab invokation")))
+
+(defvar fuel-edit--buffer-history nil)
+
+(defun fuel-switch-to-buffer (&optional method)
+  "Switch to any of the existing Factor buffers, with completion."
+  (interactive)
+  (let ((buffer (completing-read "Factor buffer: "
+                                 (remove (buffer-name)
+                                         (mapcar 'buffer-name (buffer-list)))
+                                 '(lambda (s) (string-match "\\.factor$" s))
+                                 t
+                                 nil
+                                 fuel-edit--buffer-history)))
+    (cond ((eq method 'window) (switch-to-buffer-other-window buffer))
+          ((eq method 'frame) (switch-to-buffer-other-frame buffer))
+          (t (switch-to-buffer buffer)))))
+
+(defun fuel-switch-to-buffer-other-window ()
+  "Switch to any of the existing Factor buffers, in other window."
+  (interactive)
+  (fuel-switch-to-buffer 'window))
+
+(defun fuel-switch-to-buffer-other-frame ()
+  "Switch to any of the existing Factor buffers, in other frame."
+  (interactive)
+  (fuel-switch-to-buffer 'frame))
+
+\f
+(provide 'fuel-edit)
+;;; fuel-edit.el ends here
index 02bcb54d66f09c169fd4b1b6b8474a783a37ac75..9e8210a3e3e89983672704752e8fc1952f4d83c4 100644 (file)
@@ -1,6 +1,6 @@
 ;;; fuel-eval.el --- evaluating Factor expressions
 
-;; Copyright (C) 2008  Jose Antonio Ortega Ruiz
+;; Copyright (C) 2008, 2009  Jose Antonio Ortega Ruiz
 ;; See http://factorcode.org/license.txt for BSD license.
 
 ;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
 
 ;;; Code:
 
-(require 'fuel-base)
 (require 'fuel-syntax)
 (require 'fuel-connection)
+(require 'fuel-log)
+(require 'fuel-base)
+
+(eval-when-compile (require 'cl))
+
+\f
+;;; Simple sexp-based representation of factor code
+
+(defun factor (sexp)
+  (cond ((null sexp) "f")
+        ((eq sexp t) "t")
+        ((or (stringp sexp) (numberp sexp)) (format "%S" sexp))
+        ((vectorp sexp) (factor (cons :quotation (append sexp nil))))
+        ((listp sexp)
+         (case (car sexp)
+           (:array (factor--seq 'V{ '} (cdr sexp)))
+           (:seq (factor--seq '{ '} (cdr sexp)))
+           (:tuple (factor--seq 'T{ '} (cdr sexp)))
+           (:quote (format "\\ %s" (factor `(:factor ,(cadr sexp)))))
+           (:quotation (factor--seq '\[ '\] (cdr sexp)))
+           (:using (factor `(USING: ,@(cdr sexp) :end)))
+           (:factor (format "%s" (mapconcat 'identity (cdr sexp) " ")))
+           (:fuel (factor--fuel-factor (cons :rs (cdr sexp))))
+           (:fuel* (factor--fuel-factor (cons :nrs (cdr sexp))))
+           (t (mapconcat 'factor sexp " "))))
+        ((keywordp sexp)
+         (factor (case sexp
+                   (:rs 'fuel-eval-restartable)
+                   (:nrs 'fuel-eval-non-restartable)
+                   (:in (or (fuel-syntax--current-vocab) "fuel"))
+                   (:usings `(:array ,@(fuel-syntax--usings)))
+                   (:get 'fuel-eval-set-result)
+                   (:end '\;)
+                   (t `(:factor ,(symbol-name sexp))))))
+        ((symbolp sexp) (symbol-name sexp))))
+
+(defsubst factor--seq (begin end forms)
+  (format "%s %s %s" begin (if forms (factor forms) "") end))
+
+(defsubst factor--fuel-factor (sexp)
+  (factor `(,(factor--fuel-restart (nth 0 sexp))
+            ,(factor--fuel-lines (nth 1 sexp))
+            ,(factor--fuel-in (nth 2 sexp))
+            ,(factor--fuel-usings (nth 3 sexp))
+            fuel-eval-in-context)))
+
+(defsubst factor--fuel-restart (rs)
+  (unless (member rs '(:rs :nrs))
+    (error "Invalid restart spec (%s)" rs))
+  rs)
+
+(defsubst factor--fuel-lines (lst)
+  (cons :array (mapcar 'factor lst)))
+
+(defsubst factor--fuel-in (in)
+  (cond ((or (eq in :in) (null in)) :in)
+        ((eq in 'f) 'f)
+        ((eq in 't) "fuel")
+        ((stringp in) in)
+        (t (error "Invalid 'in' (%s)" in))))
+
+(defsubst factor--fuel-usings (usings)
+  (cond ((null usings) :usings)
+        ((eq usings t) nil)
+        ((listp usings) `(:array ,@usings))
+        (t (error "Invalid 'usings' (%s)" usings))))
+
+\f
+;;; Code sending:
+
+(defvar fuel-eval--default-proc-function nil)
+(defsubst fuel-eval--default-proc ()
+  (and fuel-eval--default-proc-function
+       (funcall fuel-eval--default-proc-function)))
+
+(defvar fuel-eval--proc nil)
+
+(defvar fuel-eval--sync-retort nil)
+
+(defun fuel-eval--send/wait (code &optional timeout buffer)
+  (setq fuel-eval--sync-retort nil)
+  (fuel-con--send-string/wait (or fuel-eval--proc (fuel-eval--default-proc))
+                              (if (stringp code) code (factor code))
+                              '(lambda (s)
+                                 (setq fuel-eval--sync-retort
+                                       (fuel-eval--parse-retort s)))
+                              timeout
+                              buffer)
+  fuel-eval--sync-retort)
+
+(defun fuel-eval--send (code cont &optional buffer)
+  (fuel-con--send-string (or fuel-eval--proc (fuel-eval--default-proc))
+                         (if (stringp code) code (factor code))
+                         `(lambda (s) (,cont (fuel-eval--parse-retort s)))
+                         buffer))
 
 \f
 ;;; Retort and retort-error datatypes:
 (defsubst fuel-eval--retort-result (ret) (nth 1 ret))
 (defsubst fuel-eval--retort-output (ret) (nth 2 ret))
 
-(defsubst fuel-eval--retort-p (ret) (listp ret))
+(defsubst fuel-eval--retort-p (ret)
+  (and (listp ret) (= 3 (length ret))))
 
 (defsubst fuel-eval--make-parse-error-retort (str)
   (fuel-eval--retort-make (cons 'fuel-parse-retort-error str) nil))
 
-(defun fuel-eval--parse-retort (str)
-  (save-current-buffer
-    (condition-case nil
-        (let ((ret (car (read-from-string str))))
-          (if (fuel-eval--retort-p ret) ret (error)))
-      (error (fuel-eval--make-parse-error-retort str)))))
+(defun fuel-eval--parse-retort (ret)
+  (fuel-log--info "RETORT: %S" ret)
+  (if (fuel-eval--retort-p ret) ret
+    (fuel-eval--make-parse-error-retort ret)))
 
 (defsubst fuel-eval--error-name (err) (car err))
 
-(defsubst fuel-eval--error-restarts (err)
-  (cdr (assoc :restarts (fuel-eval--error-name-p err 'condition))))
-
 (defun fuel-eval--error-name-p (err name)
   (unless (null err)
     (or (and (eq (fuel-eval--error-name err) name) err)
         (assoc name err))))
 
+(defsubst fuel-eval--error-restarts (err)
+  (cdr (assoc :restarts (or (fuel-eval--error-name-p err 'condition)
+                            (fuel-eval--error-name-p err 'lexer-error)))))
+
 (defsubst fuel-eval--error-file (err)
   (nth 1 (fuel-eval--error-name-p err 'source-file-error)))
 
 (defsubst fuel-eval--error-line-text (err)
   (nth 3 (fuel-eval--error-lexer-p err)))
 
-\f
-;;; String sending::
-
-(defvar fuel-eval-log-max-length 16000)
-
-(defvar fuel-eval--default-proc-function nil)
-(defsubst fuel-eval--default-proc ()
-  (and fuel-eval--default-proc-function
-       (funcall fuel-eval--default-proc-function)))
-
-(defvar fuel-eval--proc nil)
-
-(defvar fuel-eval--log t)
-
-(defvar fuel-eval--sync-retort nil)
-
-(defun fuel-eval--send/wait (str &optional timeout buffer)
-  (setq fuel-eval--sync-retort nil)
-  (fuel-con--send-string/wait (or fuel-eval--proc (fuel-eval--default-proc))
-                              str
-                              '(lambda (s)
-                                 (setq fuel-eval--sync-retort
-                                       (fuel-eval--parse-retort s)))
-                              timeout
-                              buffer)
-  fuel-eval--sync-retort)
-
-(defun fuel-eval--send (str cont &optional buffer)
-  (fuel-con--send-string (or fuel-eval--proc (fuel-eval--default-proc))
-                         str
-                         `(lambda (s) (,cont (fuel-eval--parse-retort s)))
-                         buffer))
-
-\f
-;;; Evaluation protocol
-
-(defsubst fuel-eval--factor-array (strs)
-  (format "V{ %S }" (mapconcat 'identity strs " ")))
-
-(defun fuel-eval--cmd/lines (strs &optional no-rs in usings)
-  (unless (and in usings) (fuel-syntax--usings-update))
-  (let* ((in (cond ((not in) (or fuel-syntax--current-vocab "f"))
-                   ((eq in t) "fuel-scratchpad")
-                   (in in)))
-         (usings (cond ((not usings) fuel-syntax--usings)
-                       ((eq usings t) nil)
-                       (usings usings))))
-    (format "fuel-eval-%srestartable %s %S %s fuel-eval-in-context"
-            (if no-rs "non-" "")
-            (fuel-eval--factor-array strs)
-            in
-            (fuel-eval--factor-array usings))))
-
-(defsubst fuel-eval--cmd/string (str &optional no-rs in usings)
-  (fuel-eval--cmd/lines (list str) no-rs in usings))
-
-(defun fuel-eval--cmd/region (begin end &optional no-rs in usings)
-  (let ((lines (split-string (buffer-substring-no-properties begin end)
-                             "[\f\n\r\v]+" t)))
-    (when (> (length lines) 0)
-      (fuel-eval--cmd/lines lines no-rs in usings))))
-
-
 \f
 (provide 'fuel-eval)
 ;;; fuel-eval.el ends here
index ba2a499b4bee3e9c772925d9a6d6004b06e184f2..86ae94fe8af52894e01f8b36165cde1f321f93bc 100644 (file)
@@ -1,6 +1,6 @@
 ;;; fuel-font-lock.el -- font lock for factor code
 
-;; Copyright (C) 2008 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2008, 2009 Jose Antonio Ortega Ruiz
 ;; See http://factorcode.org/license.txt for BSD license.
 
 ;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
 
 ;;; Code:
 
-(require 'fuel-base)
 (require 'fuel-syntax)
+(require 'fuel-base)
 
 (require 'font-lock)
 
 \f
 ;;; Faces:
 
+(defgroup fuel-faces nil
+  "Faces used by FUEL."
+  :group 'fuel
+  :group 'faces)
+
+(defmacro fuel-font-lock--defface (face def group doc)
+  `(defface ,face (face-default-spec ,def)
+     ,(format "Face for %s." doc)
+     :group ',group
+     :group 'fuel-faces
+     :group 'faces))
+
+(put 'fuel-font-lock--defface 'lisp-indent-function 1)
+
 (defmacro fuel-font-lock--make-face (prefix def-prefix group face def doc)
   (let ((face (intern (format "%s-%s" prefix face)))
         (def (intern (format "%s-%s-face" def-prefix def))))
-    `(defface ,face (face-default-spec ,def)
-       ,(format "Face for %s." doc)
-       :group ',group
-       :group 'faces)))
+    `(fuel-font-lock--defface ,face ,def ,group ,doc)))
 
 (defmacro fuel-font-lock--define-faces (prefix def-prefix group faces)
   (let ((setup (make-symbol (format "%s--faces-setup" prefix))))
                      ',faces)))
      (,setup))))
 
+(fuel-font-lock--define-faces
+ factor-font-lock font-lock factor-mode
+ ((comment comment "comments")
+  (constructor type  "constructors (<foo>)")
+  (constant constant  "constants and literal values")
+  (number constant  "integers and floats")
+  (ratio constant  "ratios")
+  (declaration keyword "declaration words")
+  (parsing-word keyword  "parsing words")
+  (setter-word function-name "setter words (>>foo)")
+  (getter-word function-name "getter words (foo>>)")
+  (stack-effect comment "stack effect specifications")
+  (string string "strings")
+  (symbol variable-name "name of symbol being defined")
+  (type-name type "type names")
+  (vocabulary-name constant "vocabulary names")
+  (word function-name "word, generic or method being defined")
+  (invalid-syntax warning "syntactically invalid constructs")))
+
 \f
 ;;; Font lock:
 
-(defconst fuel-font-lock--parsing-lock-keywords
-  (cons '("\\(P\\|SBUF\\)\"" 1 'factor-font-lock-parsing-word)
-        (mapcar (lambda (w) `(,(format "\\(^\\| \\)\\(%s\\)\\($\\| \\)" w)
-                         2 'factor-font-lock-parsing-word))
-                fuel-syntax--parsing-words)))
+(defun fuel-font-lock--syntactic-face (state)
+  (if (nth 3 state) 'factor-font-lock-string
+    (let ((c (char-after (nth 8 state))))
+      (cond ((or (char-equal c ?\ ) (char-equal c ?\n))
+             (save-excursion
+               (goto-char (nth 8 state))
+               (beginning-of-line)
+               (cond ((looking-at "USING: ")
+                      'factor-font-lock-vocabulary-name)
+                     ((looking-at "\\(TUPLE\\|SYMBOLS\\|VARS\\): ")
+                      'factor-font-lock-symbol)
+                     ((looking-at "C-ENUM:\\( \\|\n\\)")
+                      'factor-font-lock-constant)
+                     (t 'default))))
+            ((or (char-equal c ?U) (char-equal c ?C))
+             'factor-font-lock-parsing-word)
+            ((char-equal c ?\() 'factor-font-lock-stack-effect)
+            ((char-equal c ?\") 'factor-font-lock-string)
+            (t 'factor-font-lock-comment)))))
 
 (defconst fuel-font-lock--font-lock-keywords
-  `(,@fuel-font-lock--parsing-lock-keywords
-    (,fuel-syntax--stack-effect-regex . 'factor-font-lock-stack-effect)
-    (,fuel-syntax--parsing-words-ext-regex . 'factor-font-lock-parsing-word)
-    (,fuel-syntax--declaration-words-regex 1 'factor-font-lock-declaration)
+  `((,fuel-syntax--stack-effect-regex . 'factor-font-lock-stack-effect)
+    (,fuel-syntax--brace-words-regex 1 'factor-font-lock-parsing-word)
+    (,fuel-syntax--alien-function-regex (1 'factor-font-lock-type-name)
+                                        (2 'factor-font-lock-word))
+    (,fuel-syntax--vocab-ref-regexp  2 'factor-font-lock-vocabulary-name)
+    (,fuel-syntax--constructor-decl-regex (1 'factor-font-lock-word)
+                                          (2 'factor-font-lock-type-name)
+                                          (3 'factor-font-lock-invalid-syntax nil t))
+    (,fuel-syntax--typedef-regex (1 'factor-font-lock-type-name)
+                                 (2 'factor-font-lock-type-name)
+                                 (3 'factor-font-lock-invalid-syntax nil t))
+    (,fuel-syntax--rename-regex (1 'factor-font-lock-word)
+                                (2 'factor-font-lock-vocabulary-name)
+                                (3 'factor-font-lock-word)
+                                (4 'factor-font-lock-invalid-syntax nil t))
+    (,fuel-syntax--declaration-words-regex . 'factor-font-lock-declaration)
     (,fuel-syntax--word-definition-regex 2 'factor-font-lock-word)
+    (,fuel-syntax--alias-definition-regex (1 'factor-font-lock-word)
+                                          (2 'factor-font-lock-word))
+    (,fuel-syntax--int-constant-def-regex 2 'factor-font-lock-constant)
+    (,fuel-syntax--integer-regex . 'factor-font-lock-number)
+    (,fuel-syntax--float-regex . 'factor-font-lock-number)
+    (,fuel-syntax--ratio-regex . 'factor-font-lock-ratio)
     (,fuel-syntax--type-definition-regex 2 'factor-font-lock-type-name)
     (,fuel-syntax--method-definition-regex (1 'factor-font-lock-type-name)
                                            (2 'factor-font-lock-word))
-    (,fuel-syntax--parent-type-regex 1 'factor-font-lock-type-name)
+    (,fuel-syntax--tuple-decl-regex 2 'factor-font-lock-type-name)
     (,fuel-syntax--constructor-regex . 'factor-font-lock-constructor)
     (,fuel-syntax--setter-regex . 'factor-font-lock-setter-word)
+    (,fuel-syntax--getter-regex . 'factor-font-lock-getter-word)
     (,fuel-syntax--symbol-definition-regex 2 'factor-font-lock-symbol)
-    (,fuel-syntax--use-line-regex 1 'factor-font-lock-vocabulary-name))
-  "Font lock keywords definition for Factor mode.")
+    (,fuel-syntax--bad-string-regex . 'factor-font-lock-invalid-syntax)
+    ("\\_<\\(P\\|SBUF\\|DLL\\)\"" 1 'factor-font-lock-parsing-word)
+    (,fuel-syntax--parsing-words-regex . 'factor-font-lock-parsing-word)))
 
 (defun fuel-font-lock--font-lock-setup (&optional keywords no-syntax)
   (set (make-local-variable 'comment-start) "! ")
   (set (make-local-variable 'parse-sexp-lookup-properties) t)
-  (set (make-local-variable 'font-lock-comment-face) 'factor-font-lock-comment)
-  (set (make-local-variable 'font-lock-string-face) 'factor-font-lock-string)
   (set (make-local-variable 'font-lock-defaults)
        `(,(or keywords 'fuel-font-lock--font-lock-keywords)
          nil nil nil nil
          ,@(if no-syntax nil
              (list (cons 'font-lock-syntactic-keywords
-                         fuel-syntax--syntactic-keywords))))))
+                         fuel-syntax--syntactic-keywords)
+                   (cons 'font-lock-syntactic-face-function
+                         'fuel-font-lock--syntactic-face))))))
 
 \f
+;;; Fontify strings as Factor code:
+
+(defun fuel-font-lock--font-lock-buffer ()
+  (let ((name " *fuel font lock*"))
+    (or (get-buffer name)
+        (let ((buffer (get-buffer-create name)))
+          (set-buffer buffer)
+          (set-syntax-table fuel-syntax--syntax-table)
+          (fuel-font-lock--font-lock-setup)
+          buffer))))
+
+(defun fuel-font-lock--factor-str (str)
+  (save-current-buffer
+    (set-buffer (fuel-font-lock--font-lock-buffer))
+    (erase-buffer)
+    (insert str)
+    (let ((font-lock-verbose nil)) (font-lock-fontify-buffer))
+    (buffer-string)))
+
+
 (provide 'fuel-font-lock)
 ;;; fuel-font-lock.el ends here
index 227778934a889800cdda1befb6d6a763bd993b7c..a82de388da955748f960d6e6c8d7ea21e68a068c 100644 (file)
@@ -1,6 +1,6 @@
 ;;; fuel-help.el -- accessing Factor's help system
 
-;; Copyright (C) 2008 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2008, 2009 Jose Antonio Ortega Ruiz
 ;; See http://factorcode.org/license.txt for BSD license.
 
 ;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
 
 ;;; Code:
 
-(require 'fuel-base)
-(require 'fuel-font-lock)
+(require 'fuel-edit)
 (require 'fuel-eval)
+(require 'fuel-markup)
+(require 'fuel-autodoc)
+(require 'fuel-completion)
+(require 'fuel-syntax)
+(require 'fuel-font-lock)
+(require 'fuel-popup)
+(require 'fuel-base)
+
+(require 'button)
 
 \f
 ;;; Customization:
 
 (defgroup fuel-help nil
-  "Options controlling FUEL's help system"
+  "Options controlling FUEL's help system."
   :group 'fuel)
 
-(defcustom fuel-help-minibuffer-font-lock t
-  "Whether to use font lock for info messages in the minibuffer."
-  :group 'fuel-help
-  :type 'boolean)
-
 (defcustom fuel-help-always-ask t
   "When enabled, always ask for confirmation in help prompts."
   :type 'boolean
   :group 'fuel-help)
 
-(defcustom fuel-help-use-minibuffer t
-  "When enabled, use the minibuffer for short help messages."
-  :type 'boolean
-  :group 'fuel-help)
-
-(defcustom fuel-help-mode-hook nil
-  "Hook run by `factor-help-mode'."
-  :type 'hook
-  :group 'fuel-help)
-
 (defcustom fuel-help-history-cache-size 50
   "Maximum number of pages to keep in the help browser cache."
   :type 'integer
   :group 'fuel-help)
 
-(defface fuel-help-font-lock-headlines '((t (:bold t :weight bold)))
-  "Face for headlines in help buffers."
-  :group 'fuel-help
-  :group 'faces)
-
-\f
-;;; Autodoc mode:
-
-(defvar fuel-help--font-lock-buffer
-  (let ((buffer (get-buffer-create " *fuel help minibuffer messages*")))
-    (set-buffer buffer)
-    (fuel-font-lock--font-lock-setup)
-    buffer))
-
-(defun fuel-help--font-lock-str (str)
-  (set-buffer fuel-help--font-lock-buffer)
-  (erase-buffer)
-  (insert str)
-  (let ((font-lock-verbose nil)) (font-lock-fontify-buffer))
-  (buffer-string))
-
-(defun fuel-help--word-synopsis (&optional word)
-  (let ((word (or word (fuel-syntax-symbol-at-point)))
-        (fuel-eval--log t))
-    (when word
-      (let* ((str (format "\\ %s synopsis fuel-eval-set-result" word))
-             (cmd (fuel-eval--cmd/string str t t))
-             (ret (fuel-eval--send/wait cmd 20)))
-        (when (and ret (not (fuel-eval--retort-error ret)))
-          (if fuel-help-minibuffer-font-lock
-              (fuel-help--font-lock-str (fuel-eval--retort-result ret))
-            (fuel-eval--retort-result ret)))))))
-
-(make-variable-buffer-local
- (defvar fuel-autodoc-mode-string " A"
-   "Modeline indicator for fuel-autodoc-mode"))
-
-(define-minor-mode fuel-autodoc-mode
-  "Toggle Fuel's Autodoc mode.
-With no argument, this command toggles the mode.
-Non-null prefix argument turns on the mode.
-Null prefix argument turns off the mode.
-
-When Autodoc mode is enabled, a synopsis of the word at point is
-displayed in the minibuffer."
-  :init-value nil
-  :lighter fuel-autodoc-mode-string
-  :group 'fuel
-
-  (set (make-local-variable 'eldoc-documentation-function)
-       (when fuel-autodoc-mode 'fuel-help--word-synopsis))
-  (set (make-local-variable 'eldoc-minor-mode-string) nil)
-  (eldoc-mode fuel-autodoc-mode)
-  (message "Fuel Autodoc %s" (if fuel-autodoc-mode "enabled" "disabled")))
+(defcustom fuel-help-bookmarks nil
+  "Bookmars. Maintain this list using the help browser."
+  :type 'list
+  :group 'fuel-help)
 
 \f
 ;;; Help browser history:
 
-(defvar fuel-help--history
-  (list nil
-        (make-ring fuel-help-history-cache-size)
-        (make-ring fuel-help-history-cache-size)))
+(defun fuel-help--make-history ()
+  (list nil                                        ; current
+        (make-ring fuel-help-history-cache-size)   ; previous
+        (make-ring fuel-help-history-cache-size))) ; next
 
-(defvar fuel-help--history-idx 0)
+(defsubst fuel-help--history-current ()
+  (car fuel-help--history))
 
-(defun fuel-help--history-push (term)
-  (when (car fuel-help--history)
-    (ring-insert (nth 1 fuel-help--history) (car fuel-help--history)))
-  (setcar fuel-help--history term))
+(defun fuel-help--history-push (link)
+  (unless (equal link (car fuel-help--history))
+    (let ((next (fuel-help--history-next)))
+      (unless (equal link next)
+        (when next (fuel-help--history-previous))
+        (ring-insert (nth 1 fuel-help--history) (car fuel-help--history))
+        (setcar fuel-help--history link))))
+  link)
 
-(defun fuel-help--history-next ()
+(defun fuel-help--history-next (&optional forget-current)
   (when (not (ring-empty-p (nth 2 fuel-help--history)))
-    (when (car fuel-help--history)
+    (when (and (car fuel-help--history) (not forget-current))
       (ring-insert (nth 1 fuel-help--history) (car fuel-help--history)))
     (setcar fuel-help--history (ring-remove (nth 2 fuel-help--history) 0))))
 
-(defun fuel-help--history-previous ()
+(defun fuel-help--history-previous (&optional forget-current)
   (when (not (ring-empty-p (nth 1 fuel-help--history)))
-    (when (car fuel-help--history)
+    (when (and (car fuel-help--history) (not forget-current))
       (ring-insert (nth 2 fuel-help--history) (car fuel-help--history)))
     (setcar fuel-help--history (ring-remove (nth 1 fuel-help--history) 0))))
 
+(defvar fuel-help--history (fuel-help--make-history))
+
+\f
+;;; Page cache:
+
+(defun fuel-help--history-current-content ()
+  (fuel-help--cache-get (car fuel-help--history)))
+
+(defvar fuel-help--cache (make-hash-table :weakness 'key :test 'equal))
+
+(defsubst fuel-help--cache-get (name)
+  (gethash name fuel-help--cache))
+
+(defsubst fuel-help--cache-insert (name str)
+  (puthash name str fuel-help--cache))
+
+(defsubst fuel-help--cache-clear ()
+  (clrhash fuel-help--cache))
+
 \f
 ;;; Fuel help buffer and internals:
 
-(defun fuel-help--help-buffer ()
-  (with-current-buffer (get-buffer-create "*fuel-help*")
-    (fuel-help-mode)
-    (current-buffer)))
+(fuel-popup--define fuel-help--buffer
+  "*fuel help*" 'fuel-help-mode)
+
 
 (defvar fuel-help--prompt-history nil)
 
-(defun fuel-help--show-help (&optional see word)
-  (let* ((def (or word (fuel-syntax-symbol-at-point)))
+(make-local-variable
+ (defvar fuel-help--buffer-link nil))
+
+(defun fuel-help--read-word (see)
+  (let* ((def (fuel-syntax-symbol-at-point))
          (prompt (format "See%s help on%s: " (if see " short" "")
                          (if def (format " (%s)" def) "")))
-         (ask (or (not (memq major-mode '(factor-mode fuel-help-mode)))
-                  (not def)
-                  fuel-help-always-ask))
-         (def (if ask (read-string prompt nil 'fuel-help--prompt-history def)
-                def))
-         (cmd (format "\\ %s %s" def (if see "see" "help"))))
-    (message "Looking up '%s' ..." def)
-    (fuel-eval--send (fuel-eval--cmd/string cmd t t)
-                     `(lambda (r) (fuel-help--show-help-cont ,def r)))))
-
-(defun fuel-help--show-help-cont (def ret)
-  (let ((out (fuel-eval--retort-output ret)))
-    (if (or (fuel-eval--retort-error ret) (empty-string-p out))
-        (message "No help for '%s'" def)
-      (fuel-help--insert-contents def out))))
-
-(defun fuel-help--insert-contents (def str &optional nopush)
-  (let ((hb (fuel-help--help-buffer))
+         (ask (or (not def) fuel-help-always-ask)))
+    (if ask
+        (fuel-completion--read-word prompt
+                                        def
+                                        'fuel-help--prompt-history
+                                        t)
+      def)))
+
+(defun fuel-help--word-help (&optional see word)
+  (let ((def (or word (fuel-help--read-word see))))
+    (when def
+      (let ((cmd `(:fuel* (,def ,(if see 'fuel-word-see 'fuel-word-help))
+                          "fuel" t)))
+        (message "Looking up '%s' ..." def)
+        (let* ((ret (fuel-eval--send/wait cmd))
+               (res (fuel-eval--retort-result ret)))
+          (if (not res)
+              (message "No help for '%s'" def)
+            (fuel-help--insert-contents (list def def 'word) res)))))))
+
+(defun fuel-help--get-article (name label)
+  (message "Retrieving article ...")
+  (let* ((name (if (listp name) (cons :seq name) name))
+         (cmd `(:fuel* ((,name fuel-get-article)) "fuel" t))
+         (ret (fuel-eval--send/wait cmd))
+         (res (fuel-eval--retort-result ret)))
+    (if (not res)
+        (message "Article '%s' not found" label)
+      (fuel-help--insert-contents (list name label 'article) res)
+      (message ""))))
+
+(defun fuel-help--get-vocab (name)
+  (message "Retrieving help vocabulary for vocabulary '%s' ..." name)
+  (let* ((cmd `(:fuel* ((,name fuel-vocab-help)) "fuel" (,name)))
+         (ret (fuel-eval--send/wait cmd))
+         (res (fuel-eval--retort-result ret)))
+    (if (not res)
+        (message "No help available for vocabulary '%s'" name)
+      (fuel-help--insert-contents (list name name 'vocab) res)
+      (message ""))))
+
+(defun fuel-help--get-vocab/author (author)
+  (message "Retrieving vocabularies by %s ..." author)
+  (let* ((cmd `(:fuel* ((,author fuel-get-vocabs/author)) "fuel" t))
+         (ret (fuel-eval--send/wait cmd))
+         (res (fuel-eval--retort-result ret)))
+    (if (not res)
+        (message "No vocabularies by %s" author)
+      (fuel-help--insert-contents (list author author 'author) res)
+      (message ""))))
+
+(defun fuel-help--get-vocab/tag (tag)
+  (message "Retrieving vocabularies tagged '%s' ..." tag)
+  (let* ((cmd `(:fuel* ((,tag fuel-get-vocabs/tag)) "fuel" t))
+         (ret (fuel-eval--send/wait cmd))
+         (res (fuel-eval--retort-result ret)))
+    (if (not res)
+        (message "No vocabularies tagged '%s'" tag)
+      (fuel-help--insert-contents (list tag tag 'tag) res)
+      (message ""))))
+
+(defun fuel-help--follow-link (link label type &optional no-cache)
+  (let* ((llink (list link label type))
+         (cached (and (not no-cache) (fuel-help--cache-get llink))))
+    (if (not cached)
+        (let ((fuel-help-always-ask nil))
+          (cond ((eq type 'word) (fuel-help--word-help nil link))
+                ((eq type 'article) (fuel-help--get-article link label))
+                ((eq type 'vocab) (fuel-help--get-vocab link))
+                ((eq type 'author) (fuel-help--get-vocab/author label))
+                ((eq type 'tag) (fuel-help--get-vocab/tag label))
+                ((eq type 'bookmarks) (fuel-help-display-bookmarks))
+                (t (error "Links of type %s not yet implemented" type))))
+      (fuel-help--insert-contents llink cached))))
+
+(defun fuel-help--insert-contents (key content)
+  (let ((hb (fuel-help--buffer))
         (inhibit-read-only t)
         (font-lock-verbose nil))
     (set-buffer hb)
     (erase-buffer)
-    (insert str)
-    (goto-char (point-min))
-    (when (re-search-forward (format "^%s" def) nil t)
-      (beginning-of-line)
-      (kill-region (point-min) (point))
-      (next-line)
-      (open-line 1))
+    (if (stringp content)
+        (insert content)
+      (fuel-markup--print content)
+      (fuel-markup--insert-newline)
+      (delete-blank-lines)
+      (fuel-help--cache-insert key (buffer-string)))
+    (fuel-help--history-push key)
+    (setq fuel-help--buffer-link key)
     (set-buffer-modified-p nil)
-    (unless nopush (fuel-help--history-push (cons def str)))
-    (pop-to-buffer hb)
+    (fuel-popup--display)
     (goto-char (point-min))
-    (message "%s" def)))
+    (message "")))
+
+\f
+;;; Bookmarks:
+
+(defun fuel-help-bookmark-page ()
+  "Add current help page to bookmarks."
+  (interactive)
+  (let ((link fuel-help--buffer-link))
+    (unless link (error "No link associated to this page"))
+    (add-to-list 'fuel-help-bookmarks link)
+    (customize-save-variable 'fuel-help-bookmarks fuel-help-bookmarks)
+    (message "Bookmark '%s' saved" (cadr link))))
+
+(defun fuel-help-delete-bookmark ()
+  "Delete link at point from bookmarks."
+  (interactive)
+  (let ((link (fuel-markup--link-at-point)))
+    (unless link (error "No link at point"))
+    (unless (member link fuel-help-bookmarks)
+      (error "'%s' is not bookmarked" (cadr link)))
+    (customize-save-variable 'fuel-help-bookmarks
+                             (remove link fuel-help-bookmarks))
+    (message "Bookmark '%s' delete" (cadr link))
+    (fuel-help-display-bookmarks)))
+
+(defun fuel-help-display-bookmarks ()
+  "Display bookmarked pages."
+  (interactive)
+  (let ((links (mapcar (lambda (l) (cons '$subsection l)) fuel-help-bookmarks)))
+    (unless links (error "No links to display"))
+    (fuel-help--insert-contents '("bookmarks" "Bookmars" bookmarks)
+                                `(article "Bookmarks" ,links))))
 
 \f
 ;;; Interactive help commands:
 
-(defun fuel-help-short (&optional arg)
-  "See a help summary of symbol at point.
-By default, the information is shown in the minibuffer. When
-called with a prefix argument, the information is displayed in a
-separate help buffer."
-  (interactive "P")
-  (if (if fuel-help-use-minibuffer (not arg) arg)
-      (fuel-help--word-synopsis)
-    (fuel-help--show-help t)))
+(defun fuel-help-short ()
+  "See help summary of symbol at point."
+  (interactive)
+  (fuel-help--word-help t))
 
 (defun fuel-help ()
   "Show extended help about the symbol at point, using a help
 buffer."
   (interactive)
-  (fuel-help--show-help))
+  (fuel-help--word-help))
+
+(defun fuel-help-vocab (vocab)
+  "Ask for a vocabulary name and show its help page."
+  (interactive (list (fuel-edit--read-vocabulary-name nil)))
+  (fuel-help--get-vocab vocab))
+
+(defun fuel-help-next (&optional forget-current)
+  "Go to next page in help browser.
+With prefix, the current page is deleted from history."
+  (interactive "P")
+  (let ((item (fuel-help--history-next forget-current)))
+    (unless item (error "No next page"))
+    (apply 'fuel-help--follow-link item)))
+
+(defun fuel-help-previous (&optional forget-current)
+  "Go to previous page in help browser.
+With prefix, the current page is deleted from history."
+  (interactive "P")
+  (let ((item (fuel-help--history-previous forget-current)))
+    (unless item (error "No previous page"))
+    (apply 'fuel-help--follow-link item)))
+
+(defun fuel-help-kill-page ()
+  "Kill current page if a previous or next one exists."
+  (interactive)
+  (condition-case nil
+      (fuel-help-previous t)
+    (error (fuel-help-next t))))
 
-(defun fuel-help-next ()
-  "Go to next page in help browser."
+(defun fuel-help-refresh ()
+  "Refresh the contents of current page."
   (interactive)
-  (let ((item (fuel-help--history-next))
-        (fuel-help-always-ask nil))
-    (unless item
-      (error "No next page"))
-    (fuel-help--insert-contents (car item) (cdr item) t)))
-
-(defun fuel-help-previous ()
-  "Go to next page in help browser."
+  (when fuel-help--buffer-link
+    (apply 'fuel-help--follow-link (append fuel-help--buffer-link '(t)))))
+
+(defun fuel-help-clean-history ()
+  "Clean up the help browser cache of visited pages."
+  (interactive)
+  (when (y-or-n-p "Clean browsing history? ")
+    (fuel-help--cache-clear)
+    (setq fuel-help--history (fuel-help--make-history))
+    (fuel-help-refresh))
+  (message ""))
+
+(defun fuel-help-edit ()
+  "Edit the current article or word help."
   (interactive)
-  (let ((item (fuel-help--history-previous))
-        (fuel-help-always-ask nil))
-    (unless item
-      (error "No previous page"))
-    (fuel-help--insert-contents (car item) (cdr item) t)))
+  (let ((link (car fuel-help--buffer-link))
+        (type (nth 2 fuel-help--buffer-link)))
+    (cond ((eq type 'word) (fuel-edit-word-doc-at-point nil link))
+          ((member type '(article vocab)) (fuel-edit--edit-article link))
+          (t (error "No document associated with this page")))))
 
 \f
-;;;; Factor help mode:
+;;;; Help mode map:
 
 (defvar fuel-help-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map "\C-m" 'fuel-help)
-    (define-key map "q" 'bury-buffer)
-    (define-key map "b" 'fuel-help-previous)
-    (define-key map "f" 'fuel-help-next)
+    (suppress-keymap map)
+    (set-keymap-parent map button-buffer-map)
+    (define-key map "a" 'fuel-apropos)
+    (define-key map "ba" 'fuel-help-bookmark-page)
+    (define-key map "bb" 'fuel-help-display-bookmarks)
+    (define-key map "bd" 'fuel-help-delete-bookmark)
+    (define-key map "c" 'fuel-help-clean-history)
+    (define-key map "e" 'fuel-help-edit)
+    (define-key map "h" 'fuel-help)
+    (define-key map "k" 'fuel-help-kill-page)
+    (define-key map "n" 'fuel-help-next)
+    (define-key map "l" 'fuel-help-previous)
+    (define-key map "p" 'fuel-help-previous)
+    (define-key map "r" 'fuel-help-refresh)
+    (define-key map "v" 'fuel-help-vocab)
     (define-key map (kbd "SPC")  'scroll-up)
     (define-key map (kbd "S-SPC") 'scroll-down)
+    (define-key map "\M-." 'fuel-edit-word-at-point)
+    (define-key map "\C-cz" 'run-factor)
+    (define-key map "\C-c\C-z" 'run-factor)
     map))
 
-(defconst fuel-help--headlines
-  (regexp-opt '("Class description"
-                "Definition"
-                "Errors"
-                "Examples"
-                "Generic word contract"
-                "Inputs and outputs"
-                "Methods"
-                "Notes"
-                "Parent topics:"
-                "See also"
-                "Syntax"
-                "Variable description"
-                "Variable value"
-                "Vocabulary"
-                "Warning"
-                "Word description")
-              t))
-
-(defconst fuel-help--headlines-regexp (format "^%s" fuel-help--headlines))
-
-(defconst fuel-help--font-lock-keywords
-  `(,@fuel-font-lock--font-lock-keywords
-    (,fuel-help--headlines-regexp . 'fuel-help-font-lock-headlines)))
+\f
+;;; IN: support
+
+(defun fuel-help--find-in ()
+  (save-excursion
+    (or (fuel-syntax--find-in)
+        (and (goto-char (point-min))
+             (re-search-forward "Vocabulary: \\(.+\\)$" nil t)
+             (match-string-no-properties 1)))))
+
+\f
+;;; Help mode definition:
 
 (defun fuel-help-mode ()
   "Major mode for browsing Factor documentation.
 \\{fuel-help-mode-map}"
   (interactive)
   (kill-all-local-variables)
+  (buffer-disable-undo)
   (use-local-map fuel-help-mode-map)
-  (setq mode-name "Factor Help")
+  (set-syntax-table fuel-syntax--syntax-table)
+  (setq mode-name "FUEL Help")
   (setq major-mode 'fuel-help-mode)
-
-  (fuel-font-lock--font-lock-setup fuel-help--font-lock-keywords t)
-
-  (setq fuel-autodoc-mode-string "")
-  (fuel-autodoc-mode)
-
-  (run-mode-hooks 'fuel-help-mode-hook)
-  (toggle-read-only 1))
+  (setq fuel-syntax--current-vocab-function 'fuel-help--find-in)
+  (setq fuel-markup--follow-link-function 'fuel-help--follow-link)
+  (setq buffer-read-only t))
 
 \f
 (provide 'fuel-help)
index c72f66b21c17d9c2888cae7533d7c46e826d98c6..d0898de04f78b7d986fd7a4fe7d439a90f6701bd 100644 (file)
@@ -1,6 +1,6 @@
 ;;; fuel-listener.el --- starting the fuel listener
 
-;; Copyright (C) 2008  Jose Antonio Ortega Ruiz
+;; Copyright (C) 2008, 2009  Jose Antonio Ortega Ruiz
 ;; See http://factorcode.org/license.txt for BSD license.
 
 ;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
 
 ;;; Code:
 
+(require 'fuel-stack)
+(require 'fuel-completion)
+(require 'fuel-xref)
 (require 'fuel-eval)
+(require 'fuel-connection)
+(require 'fuel-syntax)
 (require 'fuel-base)
+
 (require 'comint)
 
 \f
 ;;; Customization:
 
 (defgroup fuel-listener nil
-  "Interacting with a Factor listener inside Emacs"
+  "Interacting with a Factor listener inside Emacs."
   :group 'fuel)
 
-(defcustom fuel-listener-factor-binary "~/factor/factor"
+(defcustom fuel-listener-factor-binary
+  (expand-file-name (cond ((eq system-type 'windows-nt)
+                           "factor.exe")
+                          ((eq system-type 'darwin)
+                           "Factor.app/Contents/MacOS/factor")
+                          (t "factor"))
+                    fuel-factor-root-dir)
   "Full path to the factor executable to use when starting a listener."
   :type '(file :must-match t)
   :group 'fuel-listener)
 
-(defcustom fuel-listener-factor-image "~/factor/factor.image"
+(defcustom fuel-listener-factor-image
+  (expand-file-name "factor.image" fuel-factor-root-dir)
   "Full path to the factor image to use when starting a listener."
   :type '(file :must-match t)
   :group 'fuel-listener)
@@ -49,29 +62,45 @@ buffer."
 \f
 ;;; Fuel listener buffer/process:
 
-(defvar fuel-listener-buffer nil
+(defvar fuel-listener--buffer nil
   "The buffer in which the Factor listener is running.")
 
+(defun fuel-listener--buffer ()
+  (if (buffer-live-p fuel-listener--buffer)
+      fuel-listener--buffer
+    (with-current-buffer (get-buffer-create "*fuel listener*")
+      (fuel-listener-mode)
+      (setq fuel-listener--buffer (current-buffer)))))
+
 (defun fuel-listener--start-process ()
   (let ((factor (expand-file-name fuel-listener-factor-binary))
-        (image (expand-file-name fuel-listener-factor-image)))
+        (image (expand-file-name fuel-listener-factor-image))
+        (comint-redirect-perform-sanity-check nil))
     (unless (file-executable-p factor)
       (error "Could not run factor: %s is not executable" factor))
     (unless (file-readable-p image)
       (error "Could not run factor: image file %s not readable" image))
-    (setq fuel-listener-buffer (get-buffer-create "*fuel listener*"))
-    (with-current-buffer fuel-listener-buffer
-      (fuel-listener-mode)
-      (message "Starting FUEL listener ...")
-      (comint-exec fuel-listener-buffer "factor"
-                   factor nil `("-run=fuel" ,(format "-i=%s" image)))
-      (fuel-listener--wait-for-prompt 20)
-      (fuel-eval--send/wait "USE: fuel")
-      (message "FUEL listener up and running!"))))
+    (message "Starting FUEL listener (this may take a while) ...")
+    (pop-to-buffer (fuel-listener--buffer))
+    (make-comint-in-buffer "fuel listener" (current-buffer) factor nil
+                           "-run=listener" (format "-i=%s" image))
+    (fuel-listener--wait-for-prompt 10000)
+    (fuel-con--setup-connection (current-buffer))))
+
+(defun fuel-listener--connect-process (port)
+  (message "Connecting to remote listener ...")
+  (pop-to-buffer (fuel-listener--buffer))
+  (let ((process (get-buffer-process (current-buffer))))
+    (when (or (not process)
+              (y-or-n-p "Kill current listener? "))
+      (make-comint-in-buffer "fuel listener" (current-buffer)
+                             (cons "localhost" port))
+      (fuel-listener--wait-for-prompt 10000)
+      (fuel-con--setup-connection (current-buffer)))))
 
 (defun fuel-listener--process (&optional start)
-  (or (and (buffer-live-p fuel-listener-buffer)
-           (get-buffer-process fuel-listener-buffer))
+  (or (and (buffer-live-p (fuel-listener--buffer))
+           (get-buffer-process (fuel-listener--buffer)))
       (if (not start)
           (error "No running factor listener (try M-x run-factor)")
         (fuel-listener--start-process)
@@ -79,25 +108,19 @@ buffer."
 
 (setq fuel-eval--default-proc-function 'fuel-listener--process)
 
-\f
-;;; Prompt chasing
-
-(defun fuel-listener--wait-for-prompt (&optional timeout)
-  (let ((proc (get-buffer-process fuel-listener-buffer)))
-    (with-current-buffer fuel-listener-buffer
-      (goto-char (or comint-last-input-end (point-min)))
-      (let ((seen (re-search-forward comint-prompt-regexp nil t)))
-        (while (and (not seen)
-                    (accept-process-output proc (or timeout 10) nil t))
-          (sleep-for 0 1)
-          (goto-char comint-last-input-end)
-          (setq seen (re-search-forward comint-prompt-regexp nil t)))
-        (pop-to-buffer fuel-listener-buffer)
-        (goto-char (point-max))
-        (unless seen (error "No prompt found!"))))))
+(defun fuel-listener--wait-for-prompt (timeout)
+  (let ((p (point)) (seen))
+    (while (and (not seen) (> timeout 0))
+      (sleep-for 0.1)
+      (setq timeout (- timeout 100))
+      (goto-char p)
+      (setq seen (re-search-forward comint-prompt-regexp nil t)))
+    (goto-char (point-max))
+    (unless seen (error "No prompt found!"))))
+
 
 \f
-;;; Interface: starting fuel listener
+;;; Interface: starting and interacting with fuel listener:
 
 (defalias 'switch-to-factor 'run-factor)
 (defalias 'switch-to-fuel-listener 'run-factor)
@@ -111,24 +134,85 @@ buffer."
         (pop-to-buffer buf)
       (switch-to-buffer buf))))
 
+(defun connect-to-factor (&optional arg)
+  "Connects to a remote listener running in the same host.
+Without prefix argument, the default port, 9000, is used.
+Otherwise, you'll be prompted for it. To make this work, in the
+remote listener you need to issue the words
+'fuel-start-remote-listener*' or 'port
+fuel-start-remote-listener', from the fuel vocabulary."
+  (interactive "P")
+  (let ((port (if (not arg) 9000 (read-number "Port: "))))
+    (fuel-listener--connect-process port)))
+
+(defun fuel-listener-nuke ()
+  "Try this command if the listener becomes unresponsive."
+  (interactive)
+  (goto-char (point-max))
+  (comint-kill-region comint-last-input-start (point))
+  (comint-redirect-cleanup)
+  (fuel-con--setup-connection fuel-listener--buffer))
+
+(defun fuel-refresh-all ()
+  "Switch to the listener buffer and invokes Factor's refresh-all.
+With prefix, you're teletransported to the listener's buffer."
+  (interactive)
+  (let ((buf (process-buffer (fuel-listener--process))))
+    (pop-to-buffer buf)
+    (comint-send-string nil "\"Refreshing loaded vocabs...\" write nl flush")
+    (comint-send-string nil " refresh-all \"Done!\" write nl flush\n")))
+
+\f
+;;; Completion support
+
+(defsubst fuel-listener--current-vocab () nil)
+(defsubst fuel-listener--usings () nil)
+
+(defun fuel-listener--setup-completion ()
+  (setq fuel-syntax--current-vocab-function 'fuel-listener--current-vocab)
+  (setq fuel-syntax--usings-function 'fuel-listener--usings))
+
+\f
+;;; Stack mode support
+
+(defun fuel-listener--stack-region ()
+  (fuel--region-to-string (if (zerop (fuel-syntax--brackets-depth))
+                              (comint-line-beginning-position)
+                            (1+ (fuel-syntax--brackets-start)))))
+
+(defun fuel-listener--setup-stack-mode ()
+  (setq fuel-stack--region-function 'fuel-listener--stack-region))
+
 \f
 ;;; Fuel listener mode:
 
-(defconst fuel-listener--prompt-regex "( [^)]* ) ")
+(defun fuel-listener--bol ()
+  (interactive)
+  (when (= (point) (comint-bol)) (beginning-of-line)))
 
+;;;###autoload
 (define-derived-mode fuel-listener-mode comint-mode "Fuel Listener"
   "Major mode for interacting with an inferior Factor listener process.
 \\{fuel-listener-mode-map}"
-  (set (make-local-variable 'comint-prompt-regexp)
-       fuel-listener--prompt-regex)
+  (set (make-local-variable 'comint-prompt-regexp) fuel-con--prompt-regex)
+  (set (make-local-variable 'comint-use-prompt-regexp) t)
   (set (make-local-variable 'comint-prompt-read-only) t)
-  (setq fuel-listener--compilation-begin nil))
+  (fuel-listener--setup-completion)
+  (fuel-listener--setup-stack-mode))
 
 (define-key fuel-listener-mode-map "\C-cz" 'run-factor)
 (define-key fuel-listener-mode-map "\C-c\C-z" 'run-factor)
+(define-key fuel-listener-mode-map "\C-a" 'fuel-listener--bol)
+(define-key fuel-listener-mode-map "\C-ca" 'fuel-autodoc-mode)
 (define-key fuel-listener-mode-map "\C-ch" 'fuel-help)
+(define-key fuel-listener-mode-map "\C-cr" 'fuel-refresh-all)
+(define-key fuel-listener-mode-map "\C-cs" 'fuel-stack-mode)
+(define-key fuel-listener-mode-map "\C-cp" 'fuel-apropos)
 (define-key fuel-listener-mode-map "\M-." 'fuel-edit-word-at-point)
+(define-key fuel-listener-mode-map "\C-cv" 'fuel-edit-vocabulary)
+(define-key fuel-listener-mode-map "\C-c\C-v" 'fuel-edit-vocabulary)
 (define-key fuel-listener-mode-map "\C-ck" 'fuel-run-file)
+(define-key fuel-listener-mode-map (kbd "TAB") 'fuel-completion--complete-symbol)
 
 \f
 (provide 'fuel-listener)
diff --git a/misc/fuel/fuel-log.el b/misc/fuel/fuel-log.el
new file mode 100644 (file)
index 0000000..fee762d
--- /dev/null
@@ -0,0 +1,77 @@
+;;; fuel-log.el -- logging utilities
+
+;; Copyright (C) 2008 Jose Antonio Ortega Ruiz
+;; See http://factorcode.org/license.txt for BSD license.
+
+;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
+;; Keywords: languages, fuel, factor
+;; Start date: Sun Dec 14, 2008 01:00
+
+;;; Comentary:
+
+;; Some utilities for maintaining a simple log buffer, mainly for
+;; debugging purposes.
+
+;;; Code:
+
+(require 'fuel-base)
+
+\f
+;;; Customization:
+
+(defvar fuel-log--buffer-name "*fuel messages*"
+  "Name of the log buffer")
+
+(defvar fuel-log--max-buffer-size 32000
+  "Maximum size of the Factor messages log")
+
+(defvar fuel-log--max-message-size 512
+  "Maximum size of individual log messages")
+
+(defvar fuel-log--verbose-p t
+  "Log level for Factor messages")
+
+(defvar fuel-log--inhibit-p nil
+  "Set this to t to inhibit all log messages")
+
+(define-derived-mode factor-messages-mode fundamental-mode "FUEL Messages"
+  "Simple mode to log interactions with the factor listener"
+  (kill-all-local-variables)
+  (buffer-disable-undo)
+  (set (make-local-variable 'comint-redirect-subvert-readonly) t)
+  (add-hook 'after-change-functions
+            '(lambda (b e len)
+               (let ((inhibit-read-only t))
+                 (when (> b fuel-log--max-buffer-size)
+                   (delete-region (point-min) b))))
+            nil t)
+  (setq buffer-read-only t))
+
+(defun fuel-log--buffer ()
+  (or (get-buffer fuel-log--buffer-name)
+      (save-current-buffer
+        (set-buffer (get-buffer-create fuel-log--buffer-name))
+        (factor-messages-mode)
+        (current-buffer))))
+
+(defun fuel-log--msg (type &rest args)
+  (unless fuel-log--inhibit-p
+    (with-current-buffer (fuel-log--buffer)
+      (let ((inhibit-read-only t))
+        (insert
+         (fuel--shorten-str (format "\n%s: %s\n" type (apply 'format args))
+                            fuel-log--max-message-size))))))
+
+(defsubst fuel-log--warn (&rest args)
+  (apply 'fuel-log--msg 'WARNING args))
+
+(defsubst fuel-log--error (&rest args)
+  (apply 'fuel-log--msg 'ERROR args))
+
+(defsubst fuel-log--info (&rest args)
+  (when fuel-log--verbose-p
+    (apply 'fuel-log--msg 'INFO args) ""))
+
+\f
+(provide 'fuel-log)
+;;; fuel-log.el ends here
diff --git a/misc/fuel/fuel-markup.el b/misc/fuel/fuel-markup.el
new file mode 100644 (file)
index 0000000..7a8fa0c
--- /dev/null
@@ -0,0 +1,602 @@
+;;; fuel-markup.el -- printing factor help markup
+
+;; Copyright (C) 2009 Jose Antonio Ortega Ruiz
+;; See http://factorcode.org/license.txt for BSD license.
+
+;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
+;; Keywords: languages, fuel, factor
+;; Start date: Thu Jan 01, 2009 21:43
+
+;;; Comentary:
+
+;; Utilities for printing Factor's help markup.
+
+;;; Code:
+
+(require 'fuel-eval)
+(require 'fuel-font-lock)
+(require 'fuel-base)
+(require 'fuel-table)
+
+(require 'button)
+
+\f
+;;; Customization:
+
+(fuel-font-lock--defface fuel-font-lock-markup-title
+  'bold fuel-help "article titles in help buffers")
+
+(fuel-font-lock--defface fuel-font-lock-markup-heading
+  'bold fuel-help "headlines in help buffers")
+
+(fuel-font-lock--defface fuel-font-lock-markup-link
+  'link fuel-help "links to topics in help buffers")
+
+(fuel-font-lock--defface fuel-font-lock-markup-emphasis
+  'italic fuel-help "emphasized words in help buffers")
+
+(fuel-font-lock--defface fuel-font-lock-markup-strong
+  'link fuel-help "bold words in help buffers")
+
+\f
+;;; Links:
+
+(make-variable-buffer-local
+ (defvar fuel-markup--follow-link-function 'fuel-markup--echo-link))
+
+(define-button-type 'fuel-markup--button
+  'action 'fuel-markup--follow-link
+  'face 'fuel-font-lock-markup-link
+  'follow-link t)
+
+(defun fuel-markup--follow-link (button)
+  (when fuel-markup--follow-link-function
+    (funcall fuel-markup--follow-link-function
+             (button-get button 'markup-link)
+             (button-get button 'markup-label)
+             (button-get button 'markup-link-type))))
+
+(defun fuel-markup--echo-link (link label type)
+  (message "Link %s pointing to %s named %s" label type link))
+
+(defun fuel-markup--insert-button (label link type)
+  (let ((label (format "%s" label))
+        (link (if (listp link) link (format "%s" link))))
+    (insert-text-button label
+                        :type 'fuel-markup--button
+                        'markup-link link
+                        'markup-label label
+                        'markup-link-type type
+                        'help-echo (format "%s (%s)" label type))))
+
+(defun fuel-markup--article-title (name)
+  (let ((name (if (listp name) (cons :seq name) name)))
+    (fuel-eval--retort-result
+     (fuel-eval--send/wait `(:fuel* ((,name fuel-get-article-title)) "fuel")))))
+
+(defun fuel-markup--link-at-point ()
+  (let ((button (condition-case nil (forward-button 0) (error nil))))
+    (when button
+      (list (button-get button 'markup-link)
+            (button-get button 'markup-label)
+            (button-get button 'markup-link-type)))))
+
+\f
+;;; Markup printers:
+
+(defconst fuel-markup--printers
+  '(($all-tags . fuel-markup--all-tags)
+    ($all-authors . fuel-markup--all-authors)
+    ($author . fuel-markup--author)
+    ($authors . fuel-markup--authors)
+    ($class-description . fuel-markup--class-description)
+    ($code . fuel-markup--code)
+    ($command . fuel-markup--command)
+    ($command-map . fuel-markup--null)
+    ($contract . fuel-markup--contract)
+    ($curious . fuel-markup--curious)
+    ($definition . fuel-markup--definition)
+    ($describe-vocab . fuel-markup--describe-vocab)
+    ($description . fuel-markup--description)
+    ($doc-path . fuel-markup--doc-path)
+    ($emphasis . fuel-markup--emphasis)
+    ($error-description . fuel-markup--error-description)
+    ($errors . fuel-markup--errors)
+    ($example . fuel-markup--example)
+    ($examples . fuel-markup--examples)
+    ($heading . fuel-markup--heading)
+    ($index . fuel-markup--index)
+    ($instance . fuel-markup--instance)
+    ($io-error . fuel-markup--io-error)
+    ($link . fuel-markup--link)
+    ($links . fuel-markup--links)
+    ($list . fuel-markup--list)
+    ($low-level-note . fuel-markup--low-level-note)
+    ($markup-example . fuel-markup--markup-example)
+    ($maybe . fuel-markup--maybe)
+    ($methods . fuel-markup--methods)
+    ($nl . fuel-markup--newline)
+    ($notes . fuel-markup--notes)
+    ($operation . fuel-markup--link)
+    ($parsing-note . fuel-markup--parsing-note)
+    ($predicate . fuel-markup--predicate)
+    ($prettyprinting-note . fuel-markup--prettyprinting-note)
+    ($quotation . fuel-markup--quotation)
+    ($references . fuel-markup--references)
+    ($related . fuel-markup--related)
+    ($see . fuel-markup--see)
+    ($see-also . fuel-markup--see-also)
+    ($shuffle . fuel-markup--shuffle)
+    ($side-effects . fuel-markup--side-effects)
+    ($slot . fuel-markup--snippet)
+    ($snippet . fuel-markup--snippet)
+    ($strong . fuel-markup--strong)
+    ($subheading . fuel-markup--subheading)
+    ($subsection . fuel-markup--subsection)
+    ($synopsis . fuel-markup--synopsis)
+    ($syntax . fuel-markup--syntax)
+    ($table . fuel-markup--table)
+    ($tag . fuel-markup--tag)
+    ($tags . fuel-markup--tags)
+    ($unchecked-example . fuel-markup--example)
+    ($value . fuel-markup--value)
+    ($values . fuel-markup--values)
+    ($values-x/y . fuel-markup--values-x/y)
+    ($var-description . fuel-markup--var-description)
+    ($vocab-link . fuel-markup--vocab-link)
+    ($vocab-links . fuel-markup--vocab-links)
+    ($vocab-subsection . fuel-markup--vocab-subsection)
+    ($vocabulary . fuel-markup--vocabulary)
+    ($warning . fuel-markup--warning)
+    (article . fuel-markup--article)
+    (describe-words . fuel-markup--describe-words)
+    (vocab-list . fuel-markup--vocab-list)))
+
+(make-variable-buffer-local
+ (defvar fuel-markup--maybe-nl nil))
+
+(defun fuel-markup--print (e)
+  (cond ((null e) (insert "f"))
+        ((stringp e) (fuel-markup--insert-string e))
+        ((and (listp e) (symbolp (car e))
+              (assoc (car e) fuel-markup--printers))
+         (funcall (cdr (assoc (car e) fuel-markup--printers)) e))
+        ((and (symbolp e)
+              (assoc e fuel-markup--printers))
+         (funcall (cdr (assoc e fuel-markup--printers)) e))
+        ((listp e) (mapc 'fuel-markup--print e))
+        ((symbolp e) (fuel-markup--print (list '$link e)))
+        (t (insert (format "\n%S\n" e)))))
+
+(defun fuel-markup--print-str (e)
+  (with-temp-buffer
+    (fuel-markup--print e)
+    (buffer-string)))
+
+(defun fuel-markup--maybe-nl ()
+  (setq fuel-markup--maybe-nl (point)))
+
+(defun fuel-markup--insert-newline (&optional justification nosqueeze)
+  (fill-region (save-excursion (beginning-of-line) (point))
+               (point)
+               (or justification 'left)
+               nosqueeze)
+  (newline))
+
+(defsubst fuel-markup--insert-nl-if-nb (&optional no-fill)
+  (unless (eq (save-excursion (beginning-of-line) (point)) (point))
+    (if no-fill (newline) (fuel-markup--insert-newline))))
+
+(defsubst fuel-markup--put-face (txt face)
+  (put-text-property 0 (length txt) 'font-lock-face face txt)
+  txt)
+
+(defun fuel-markup--insert-heading (txt &optional no-nl)
+  (fuel-markup--insert-nl-if-nb)
+  (delete-blank-lines)
+  (unless (bobp) (newline))
+  (fuel-markup--put-face txt 'fuel-font-lock-markup-heading)
+  (fuel-markup--insert-string txt)
+  (unless no-nl (newline)))
+
+(defun fuel-markup--insert-string (str)
+  (when fuel-markup--maybe-nl
+    (newline 2)
+    (setq fuel-markup--maybe-nl nil))
+  (insert str))
+
+(defun fuel-markup--article (e)
+  (setq fuel-markup--maybe-nl nil)
+  (insert (fuel-markup--put-face (cadr e) 'fuel-font-lock-markup-title))
+  (newline 2)
+  (fuel-markup--print (car (cddr e))))
+
+(defun fuel-markup--heading (e)
+  (fuel-markup--insert-heading (cadr e)))
+
+(defun fuel-markup--subheading (e)
+  (fuel-markup--insert-heading (cadr e)))
+
+(defun fuel-markup--subsection (e)
+  (fuel-markup--insert-nl-if-nb)
+  (insert "  - ")
+  (fuel-markup--link (cons '$link (cdr e)))
+  (fuel-markup--maybe-nl))
+
+(defun fuel-markup--vocab-subsection (e)
+  (fuel-markup--insert-nl-if-nb)
+  (insert "  - ")
+  (fuel-markup--vocab-link (cons '$vocab-link (cdr e)))
+  (fuel-markup--maybe-nl))
+
+(defun fuel-markup--newline (e)
+  (fuel-markup--insert-newline)
+  (newline))
+
+(defun fuel-markup--doc-path (e)
+  (fuel-markup--insert-heading "Related topics")
+  (insert "  ")
+  (dolist (art (cdr e))
+    (fuel-markup--insert-button (car art) (cadr art) 'article)
+    (insert ", "))
+  (delete-backward-char 2)
+  (fuel-markup--insert-newline 'left))
+
+(defun fuel-markup--emphasis (e)
+  (when (stringp (cadr e))
+    (fuel-markup--put-face (cadr e) 'fuel-font-lock-markup-emphasis)
+    (insert (cadr e))))
+
+(defun fuel-markup--strong (e)
+  (when (stringp (cadr e))
+    (fuel-markup--put-face (cadr e) 'fuel-font-lock-markup-strong)
+    (insert (cadr e))))
+
+(defun fuel-markup--snippet (e)
+  (insert (mapconcat '(lambda (s)
+                        (if (stringp s)
+                            (fuel-font-lock--factor-str s)
+                          (fuel-markup--print-str s)))
+                     (cdr e)
+                     " ")))
+
+(defun fuel-markup--code (e)
+  (fuel-markup--insert-nl-if-nb)
+  (newline)
+  (dolist (snip (cdr e))
+    (if (stringp snip)
+        (insert (fuel-font-lock--factor-str snip))
+      (fuel-markup--print snip))
+    (newline))
+  (newline))
+
+(defun fuel-markup--command (e)
+  (fuel-markup--snippet (list '$snippet (nth 3 e))))
+
+(defun fuel-markup--syntax (e)
+  (fuel-markup--insert-heading "Syntax")
+  (fuel-markup--print (cons '$code (cdr e)))
+  (newline))
+
+(defun fuel-markup--example (e)
+  (fuel-markup--insert-newline)
+  (dolist (s (cdr e))
+    (fuel-markup--snippet (list '$snippet s))
+    (newline)))
+
+(defun fuel-markup--markup-example (e)
+  (fuel-markup--insert-newline)
+  (fuel-markup--snippet (cons '$snippet (cdr e))))
+
+(defun fuel-markup--link (e)
+  (let* ((link (or (nth 1 e) 'f))
+         (type (or (nth 3 e) (if (symbolp link) 'word 'article)))
+         (label (or (nth 2 e)
+                    (and (eq type 'article)
+                         (fuel-markup--article-title link))
+                    link)))
+    (fuel-markup--insert-button label link type)))
+
+(defun fuel-markup--links (e)
+  (dolist (link (cdr e))
+    (fuel-markup--link (list '$link link))
+    (insert ", "))
+  (delete-backward-char 2))
+
+(defun fuel-markup--index-quotation (q)
+  (cond ((null q) null)
+        ((listp q) (vconcat (mapcar 'fuel-markup--index-quotation q)))
+        (t q)))
+
+(defun fuel-markup--index (e)
+  (let* ((q (fuel-markup--index-quotation (cadr e)))
+         (cmd `(:fuel* ((,q fuel-index)) "fuel"
+                       ("builtins" "help" "help.topics" "classes"
+                        "classes.builtin" "classes.tuple"
+                        "classes.singleton" "classes.union"
+                        "classes.intersection" "classes.predicate")))
+         (subs (fuel-eval--retort-result (fuel-eval--send/wait cmd 200))))
+    (when subs
+      (let ((start (point))
+            (sort-fold-case nil))
+        (fuel-markup--print subs)
+        (sort-lines nil start (point))))))
+
+(defun fuel-markup--vocab-link (e)
+  (fuel-markup--insert-button (cadr e) (cadr e) 'vocab))
+
+(defun fuel-markup--vocab-links (e)
+  (dolist (link (cdr e))
+    (insert " ")
+    (fuel-markup--vocab-link (list '$vocab-link link))
+    (insert " ")))
+
+(defun fuel-markup--vocab-list (e)
+  (let ((rows (mapcar '(lambda (elem)
+                         (list (car elem)
+                               (list '$vocab-link (cadr elem))
+                               (caddr elem)))
+                      (cdr e))))
+    (fuel-markup--table (cons '$table rows))))
+
+(defun fuel-markup--describe-vocab (e)
+  (fuel-markup--insert-nl-if-nb)
+  (let* ((cmd `(:fuel* ((,(cadr e) fuel-vocab-help)) "fuel" t))
+         (res (fuel-eval--retort-result (fuel-eval--send/wait cmd))))
+    (when res (fuel-markup--print res))))
+
+(defun fuel-markup--vocabulary (e)
+  (fuel-markup--insert-heading "Vocabulary: " t)
+  (fuel-markup--vocab-link (cons '$vocab-link (cdr e)))
+  (newline))
+
+(defun fuel-markup--parse-classes ()
+  (let ((elems))
+    (while (looking-at ".+ classes$")
+      (let ((heading `($heading ,(match-string-no-properties 0)))
+            (rows))
+        (forward-line)
+        (when (looking-at "Class *.+$")
+          (push (split-string (match-string-no-properties 0) nil t) rows)
+          (forward-line))
+        (while (not (looking-at "$"))
+          (let* ((objs (split-string (thing-at-point 'line) nil t))
+                 (class (list '$link (car objs) (car objs) 'word))
+                 (super (and (cadr objs)
+                             (list (list '$link (cadr objs) (cadr objs) 'word))))
+                 (slots (when (cddr objs)
+                          (list (mapcar '(lambda (s) (list s " ")) (cddr objs))))))
+            (push `(,class ,@super ,@slots) rows))
+          (forward-line))
+        (push `(,heading ($table ,@(reverse rows))) elems))
+      (forward-line))
+    (reverse elems)))
+
+(defun fuel-markup--parse-words ()
+  (let ((elems))
+    (while (looking-at ".+ words\\|Primitives$")
+      (let ((heading `($heading ,(match-string-no-properties 0)))
+            (rows))
+        (forward-line)
+        (when (looking-at "Word *\\(Stack effect\\|Syntax\\)$")
+          (push (list "Word" (match-string-no-properties 1)) rows)
+          (forward-line))
+        (while (looking-at "\\(.+?\\)\\( +\\(.+\\)\\)?$")
+          (let ((word `($link ,(match-string-no-properties 1)
+                              ,(match-string-no-properties 1)
+                              word))
+                (se (and (match-string-no-properties 3)
+                         `(($snippet ,(match-string-no-properties 3))))))
+            (push `(,word ,@se) rows))
+          (forward-line))
+        (push `(,heading ($table ,@(reverse rows))) elems))
+      (forward-line))
+    (reverse elems)))
+
+(defun fuel-markup--parse-words-desc (desc)
+  (with-temp-buffer
+    (insert desc)
+    (goto-char (point-min))
+    (when (re-search-forward "^Words$" nil t)
+      (forward-line 2)
+      (let ((elems '(($heading "Words"))))
+        (push (fuel-markup--parse-classes) elems)
+        (push (fuel-markup--parse-words) elems)
+        (reverse elems)))))
+
+(defun fuel-markup--describe-words (e)
+  (when (cadr e)
+    (fuel-markup--print (fuel-markup--parse-words-desc (cadr e)))))
+
+(defun fuel-markup--tag (e)
+  (fuel-markup--link (list '$link (cadr e) (cadr e) 'tag)))
+
+(defun fuel-markup--tags (e)
+  (when (cdr e)
+    (fuel-markup--insert-heading "Tags: " t)
+    (dolist (tag (cdr e))
+      (fuel-markup--tag (list '$tag tag))
+      (insert ", "))
+    (delete-backward-char 2)
+    (fuel-markup--insert-newline)))
+
+(defun fuel-markup--all-tags (e)
+  (let* ((cmd `(:fuel* (all-tags :get) "fuel" t))
+         (tags (fuel-eval--retort-result (fuel-eval--send/wait cmd))))
+    (fuel-markup--list
+     (cons '$list (mapcar (lambda (tag) (list '$link tag tag 'tag)) tags)))))
+
+(defun fuel-markup--author (e)
+  (fuel-markup--link (list '$link (cadr e) (cadr e) 'author)))
+
+(defun fuel-markup--authors (e)
+  (when (cdr e)
+    (fuel-markup--insert-heading "Authors: " t)
+    (dolist (a (cdr e))
+      (fuel-markup--author (list '$author a))
+      (insert ", "))
+    (delete-backward-char 2)
+    (fuel-markup--insert-newline)))
+
+(defun fuel-markup--all-authors (e)
+  (let* ((cmd `(:fuel* (all-authors :get) "fuel" t))
+         (authors (fuel-eval--retort-result (fuel-eval--send/wait cmd))))
+    (fuel-markup--list
+     (cons '$list (mapcar (lambda (a) (list '$link a a 'author)) authors)))))
+
+(defun fuel-markup--list (e)
+  (fuel-markup--insert-nl-if-nb)
+  (dolist (elt (cdr e))
+    (insert " - ")
+    (fuel-markup--print elt)
+    (fuel-markup--insert-newline)))
+
+(defun fuel-markup--table (e)
+  (fuel-markup--insert-newline)
+  (delete-blank-lines)
+  (newline)
+  (fuel-table--insert
+   (mapcar '(lambda (row) (mapcar 'fuel-markup--print-str row)) (cdr e)))
+  (newline))
+
+(defun fuel-markup--instance (e)
+  (insert " an instance of ")
+  (fuel-markup--print (cadr e)))
+
+(defun fuel-markup--maybe (e)
+  (fuel-markup--instance (cons '$instance (cdr e)))
+  (insert " or f "))
+
+(defun fuel-markup--values (e)
+  (fuel-markup--insert-heading "Inputs and outputs")
+  (dolist (val (cdr e))
+    (insert " " (car val) " - ")
+    (fuel-markup--print (cdr val))
+    (newline)))
+
+(defun fuel-markup--predicate (e)
+  (fuel-markup--values '($values ("object" object) ("?" "a boolean")))
+  (let ((word (make-symbol (substring (format "%s" (cadr e)) 0 -1))))
+  (fuel-markup--description
+   `($description "Tests if the object is an instance of the "
+                  ($link ,word) " class."))))
+
+(defun fuel-markup--side-effects (e)
+  (fuel-markup--insert-heading "Side effects")
+  (insert "Modifies ")
+  (fuel-markup--print (cdr e))
+  (fuel-markup--insert-newline))
+
+(defun fuel-markup--definition (e)
+  (fuel-markup--insert-heading "Definition")
+  (fuel-markup--code (cons '$code (cdr e))))
+
+(defun fuel-markup--methods (e)
+  (fuel-markup--insert-heading "Methods")
+  (fuel-markup--code (cons '$code (cdr e))))
+
+(defun fuel-markup--value (e)
+  (fuel-markup--insert-heading "Variable value")
+  (insert "Current value in global namespace: ")
+  (fuel-markup--snippet (cons '$snippet (cdr e)))
+  (newline))
+
+(defun fuel-markup--values-x/y (e)
+  (fuel-markup--values '($values ("x" "number") ("y" "number"))))
+
+(defun fuel-markup--curious (e)
+  (fuel-markup--insert-heading "For the curious...")
+  (fuel-markup--print (cdr e)))
+
+(defun fuel-markup--references (e)
+  (fuel-markup--insert-heading "References")
+  (dolist (ref (cdr e))
+    (if (listp ref)
+        (fuel-markup--print ref)
+      (fuel-markup--subsection (list '$subsection ref)))))
+
+(defun fuel-markup--see-also (e)
+  (fuel-markup--insert-heading "See also")
+  (fuel-markup--links (cons '$links (cdr e))))
+
+(defun fuel-markup--related (e)
+  (fuel-markup--insert-heading "See also")
+  (fuel-markup--links (cons '$links (cadr e))))
+
+(defun fuel-markup--shuffle (e)
+  (insert "\nShuffle word. Re-arranges the stack "
+          "according to the stack effect pattern.")
+  (fuel-markup--insert-newline))
+
+(defun fuel-markup--low-level-note (e)
+  (fuel-markup--print '($notes "Calling this word directly is not necessary "
+                               "in most cases. "
+                               "Higher-level words call it automatically.")))
+
+(defun fuel-markup--parsing-note (e)
+  (fuel-markup--insert-nl-if-nb)
+  (insert "This word should only be called from parsing words.")
+  (fuel-markup--insert-newline))
+
+(defun fuel-markup--io-error (e)
+  (fuel-markup--errors '($errors "Throws an error if the I/O operation fails.")))
+
+(defun fuel-markup--prettyprinting-note (e)
+  (fuel-markup--print '($notes ("This word should only be called within the "
+                                ($link with-pprint) " combinator."))))
+
+(defun fuel-markup--elem-with-heading (elem heading)
+  (fuel-markup--insert-heading heading)
+  (fuel-markup--print (cdr elem))
+  (fuel-markup--insert-newline))
+
+(defun fuel-markup--quotation (e)
+  (insert "a ")
+  (fuel-markup--link (list '$link 'quotation 'quotation 'word))
+  (insert " with stack effect ")
+  (fuel-markup--snippet (list '$snippet (nth 1 e))))
+
+(defun fuel-markup--warning (e)
+  (fuel-markup--elem-with-heading e "Warning"))
+
+(defun fuel-markup--description (e)
+  (fuel-markup--elem-with-heading e "Word description"))
+
+(defun fuel-markup--class-description (e)
+  (fuel-markup--elem-with-heading e "Class description"))
+
+(defun fuel-markup--error-description (e)
+  (fuel-markup--elem-with-heading e "Error description"))
+
+(defun fuel-markup--var-description (e)
+  (fuel-markup--elem-with-heading e "Variable description"))
+
+(defun fuel-markup--contract (e)
+  (fuel-markup--elem-with-heading e "Generic word contract"))
+
+(defun fuel-markup--errors (e)
+  (fuel-markup--elem-with-heading e "Errors"))
+
+(defun fuel-markup--examples (e)
+  (fuel-markup--elem-with-heading e "Examples"))
+
+(defun fuel-markup--notes (e)
+  (fuel-markup--elem-with-heading e "Notes"))
+
+(defun fuel-markup--see (e)
+  (let* ((word (nth 1 e))
+         (cmd (and word `(:fuel* (,(format "%s" word) fuel-word-see) "fuel" t)))
+         (res (and cmd
+                   (fuel-eval--retort-result (fuel-eval--send/wait cmd 100)))))
+    (if res
+        (fuel-markup--code (list '$code res))
+      (fuel-markup--snippet (list '$snippet word)))))
+
+(defun fuel-markup--null (e))
+
+(defun fuel-markup--synopsis (e)
+  (insert (format " %S " e)))
+
+\f
+(provide 'fuel-markup)
+;;; fuel-markup.el ends here
index feaea1548e2f44463694c6d3fb321c52bde13944..88ad73864a31df751bb1bcfea97bafe5acee9216 100644 (file)
@@ -1,6 +1,6 @@
 ;;; fuel-mode.el -- Minor mode enabling FUEL niceties
 
-;; Copyright (C) 2008 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2008, 2009 Jose Antonio Ortega Ruiz
 ;; See http://factorcode.org/license.txt for BSD license.
 
 ;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
 
 ;;; Code:
 
-(require 'factor-mode)
-(require 'fuel-base)
-(require 'fuel-syntax)
-(require 'fuel-font-lock)
+(require 'fuel-listener)
+(require 'fuel-completion)
 (require 'fuel-debug)
-(require 'fuel-help)
+(require 'fuel-debug-uses)
 (require 'fuel-eval)
-(require 'fuel-listener)
+(require 'fuel-help)
+(require 'fuel-xref)
+(require 'fuel-refactor)
+(require 'fuel-stack)
+(require 'fuel-autodoc)
+(require 'fuel-font-lock)
+(require 'fuel-edit)
+(require 'fuel-syntax)
+(require 'fuel-base)
 
 \f
 ;;; Customization:
   :group 'fuel)
 
 (defcustom fuel-mode-autodoc-p t
-  "Whether `fuel-autodoc-mode' gets enable by default in fuel buffers."
+  "Whether `fuel-autodoc-mode' gets enabled by default in factor buffers."
   :group 'fuel-mode
+  :group 'fuel-autodoc
+  :type 'boolean)
+
+(defcustom fuel-mode-stack-p nil
+  "Whether `fuel-stack-mode' gets enabled by default in factor buffers."
+  :group 'fuel-mode
+  :group 'fuel-stack
   :type 'boolean)
 
 \f
 ;;; User commands
 
-(defun fuel-run-file (&optional arg)
-  "Sends the current file to Factor for compilation.
-With prefix argument, ask for the file to run."
-  (interactive "P")
+(defun fuel-mode--read-file (arg)
   (let* ((file (or (and arg (read-file-name "File: " nil (buffer-file-name) t))
                    (buffer-file-name)))
          (file (expand-file-name file))
          (buffer (find-file-noselect file)))
+    (when (and  buffer
+                (buffer-modified-p buffer)
+                (y-or-n-p "Save file? "))
+      (save-buffer buffer))
+    (cons file buffer)))
+
+(defun fuel-run-file (&optional arg)
+  "Sends the current file to Factor for compilation.
+With prefix argument, ask for the file to run."
+  (interactive "P")
+  (let* ((f/b (fuel-mode--read-file arg))
+         (file (car f/b))
+         (buffer (cdr f/b)))
     (when buffer
       (with-current-buffer buffer
-        (message "Compiling %s ..." file)
-        (fuel-eval--send (fuel-eval--cmd/string (format "%S fuel-run-file" file))
-                         `(lambda (r) (fuel--run-file-cont r ,file)))))))
+        (let ((msg (format "Compiling %s ..." file)))
+          (fuel-debug--prepare-compilation file msg)
+          (message msg)
+          (fuel-eval--send `(:fuel (,file fuel-run-file))
+                           `(lambda (r) (fuel--run-file-cont r ,file))))))))
 
 (defun fuel--run-file-cont (ret file)
-  (if (fuel-debug--display-retort ret
-                                  (format "%s successfully compiled" file)
-                                  nil
-                                  file)
+  (if (fuel-debug--display-retort ret (format "%s successfully compiled" file))
       (message "Compiling %s ... OK!" file)
     (message "")))
 
 (defun fuel-eval-region (begin end &optional arg)
   "Sends region to Fuel's listener for evaluation.
-Unless called with a prefix, switchs to the compilation results
+Unless called with a prefix, switches to the compilation results
 buffer in case of errors."
   (interactive "r\nP")
-  (fuel-debug--display-retort
-   (fuel-eval--send/wait (fuel-eval--cmd/region begin end) 10000)
-   (format "%s%s"
-           (if fuel-syntax--current-vocab
-               (format "IN: %s " fuel-syntax--current-vocab)
-             "")
-           (fuel--shorten-region begin end 70))
-   arg
-   (buffer-file-name)))
+  (let* ((rstr (buffer-substring begin end))
+         (lines (split-string (substring-no-properties rstr)
+                              "[\f\n\r\v]+"
+                              t))
+         (cmd `(:fuel (,(mapcar (lambda (l) `(:factor ,l)) lines))))
+         (cv (fuel-syntax--current-vocab)))
+    (fuel-debug--prepare-compilation (buffer-file-name)
+                                     (format "Evaluating:\n\n%s" rstr))
+    (fuel-debug--display-retort
+     (fuel-eval--send/wait cmd 10000)
+     (format "%s%s"
+             (if cv (format "IN: %s " cv) "")
+             (fuel--shorten-region begin end 70))
+     arg)))
 
 (defun fuel-eval-extended-region (begin end &optional arg)
-  "Sends region extended outwards to nearest definitions,
+  "Sends region, extended outwards to nearest definition,
 to Fuel's listener for evaluation.
-Unless called with a prefix, switchs to the compilation results
+Unless called with a prefix, switches to the compilation results
 buffer in case of errors."
   (interactive "r\nP")
   (fuel-eval-region (save-excursion (goto-char begin) (mark-defun) (point))
@@ -87,7 +114,7 @@ buffer in case of errors."
 
 (defun fuel-eval-definition (&optional arg)
   "Sends definition around point to Fuel's listener for evaluation.
-Unless called with a prefix, switchs to the compilation results
+Unless called with a prefix, switches to the compilation results
 buffer in case of errors."
   (interactive "P")
   (save-excursion
@@ -97,29 +124,13 @@ buffer in case of errors."
       (unless (< begin end) (error "No evaluable definition around point"))
       (fuel-eval-region begin end arg))))
 
-(defun fuel-edit-word-at-point (&optional arg)
-  "Opens a new window visiting the definition of the word at point.
-With prefix, asks for the word to edit."
+(defun fuel-update-usings (&optional arg)
+  "Asks factor for the vocabularies needed by this file,
+optionally updating the its USING: line.
+With prefix argument, ask for the file name."
   (interactive "P")
-  (let* ((word (fuel-syntax-symbol-at-point))
-         (ask (or arg (not word)))
-         (word (if ask
-                   (read-string nil
-                                (format "Edit word%s: "
-                                        (if word (format " (%s)" word) ""))
-                                word)
-                 word)))
-    (let* ((str (fuel-eval--cmd/string
-                 (format "\\ %s fuel-get-edit-location" word)))
-           (ret (fuel-eval--send/wait str))
-           (err (fuel-eval--retort-error ret))
-           (loc (fuel-eval--retort-result ret)))
-      (when (or err (not loc) (not (listp loc)) (not (stringp (car loc))))
-        (error "Couldn't find edit location for '%s'" word))
-      (unless (file-readable-p (car loc))
-        (error "Couldn't open '%s' for read" (car loc)))
-      (find-file-other-window (car loc))
-      (goto-line (if (numberp (cadr loc)) (cadr loc) 1)))))
+  (let ((file (car (fuel-mode--read-file arg))))
+    (when file (fuel-debug--uses-for-file file))))
 
 \f
 ;;; Minor mode definition:
@@ -146,7 +157,10 @@ interacting with a factor listener is at your disposal.
   :keymap fuel-mode-map
 
   (setq fuel-autodoc-mode-string "/A")
-  (when fuel-mode-autodoc-p (fuel-autodoc-mode fuel-mode)))
+  (when fuel-mode-autodoc-p (fuel-autodoc-mode fuel-mode))
+
+  (setq fuel-stack-mode-string "/S")
+  (when fuel-mode-stack-p (fuel-stack-mode fuel-mode)))
 
 \f
 ;;; Keys:
@@ -159,24 +173,44 @@ interacting with a factor listener is at your disposal.
   (define-key fuel-mode-map (vector '(control ?c) `(control ,p) k) c)
   (define-key fuel-mode-map (vector '(control ?c) `(control ,p) `(control ,k)) c))
 
-(fuel-mode--key-1 ?z 'run-factor)
-
 (fuel-mode--key-1 ?k 'fuel-run-file)
-(fuel-mode--key ?e ?k 'fuel-run-file)
+(fuel-mode--key-1 ?l 'fuel-run-file)
+(fuel-mode--key-1 ?r 'fuel-refresh-all)
+(fuel-mode--key-1 ?z 'run-factor)
+(fuel-mode--key-1 ?s 'fuel-switch-to-buffer)
+(define-key fuel-mode-map "\C-x4s" 'fuel-switch-to-buffer-other-window)
+(define-key fuel-mode-map "\C-x5s" 'fuel-switch-to-buffer-other-frame)
 
 (define-key fuel-mode-map "\C-\M-x" 'fuel-eval-definition)
-(fuel-mode--key ?e ?x 'fuel-eval-definition)
-
-(fuel-mode--key-1 ?r 'fuel-eval-region)
-(fuel-mode--key ?e ?r 'fuel-eval-region)
-
 (define-key fuel-mode-map "\C-\M-r" 'fuel-eval-extended-region)
+(define-key fuel-mode-map "\M-." 'fuel-edit-word-at-point)
+(define-key fuel-mode-map "\M-," 'fuel-edit-pop-edit-word-stack)
+(define-key fuel-mode-map "\C-c\M-<" 'fuel-show-callers)
+(define-key fuel-mode-map "\C-c\M->" 'fuel-show-callees)
+(define-key fuel-mode-map (kbd "M-TAB") 'fuel-completion--complete-symbol)
+
+(fuel-mode--key ?e ?d 'fuel-edit-word-doc-at-point)
 (fuel-mode--key ?e ?e 'fuel-eval-extended-region)
+(fuel-mode--key ?e ?l 'fuel-run-file)
+(fuel-mode--key ?e ?r 'fuel-eval-region)
+(fuel-mode--key ?e ?u 'fuel-update-usings)
+(fuel-mode--key ?e ?v 'fuel-edit-vocabulary)
+(fuel-mode--key ?e ?w 'fuel-edit-word)
+(fuel-mode--key ?e ?x 'fuel-eval-definition)
 
-(define-key fuel-mode-map "\M-." 'fuel-edit-word-at-point)
+(fuel-mode--key ?x ?i 'fuel-refactor-inline-word)
+(fuel-mode--key ?x ?r 'fuel-refactor-extract-region)
+(fuel-mode--key ?x ?s 'fuel-refactor-extract-sexp)
+(fuel-mode--key ?x ?v 'fuel-refactor-extract-vocab)
+(fuel-mode--key ?x ?w 'fuel-refactor-rename-word)
 
+(fuel-mode--key ?d ?> 'fuel-show-callees)
+(fuel-mode--key ?d ?< 'fuel-show-callers)
+(fuel-mode--key ?d ?v 'fuel-show-file-words)
 (fuel-mode--key ?d ?a 'fuel-autodoc-mode)
+(fuel-mode--key ?d ?p 'fuel-apropos)
 (fuel-mode--key ?d ?d 'fuel-help)
+(fuel-mode--key ?d ?e 'fuel-stack-effect-sexp)
 (fuel-mode--key ?d ?s 'fuel-help-short)
 
 \f
diff --git a/misc/fuel/fuel-popup.el b/misc/fuel/fuel-popup.el
new file mode 100644 (file)
index 0000000..b8a967d
--- /dev/null
@@ -0,0 +1,69 @@
+;;; fuel-popup.el -- popup windows
+
+;; Copyright (C) 2008 Jose Antonio Ortega Ruiz
+;; See http://factorcode.org/license.txt for BSD license.
+
+;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
+;; Keywords: languages, fuel, factor
+;; Start date: Sun Dec 21, 2008 14:37
+
+;;; Comentary:
+
+;; A minor mode to pop up windows and restore configurations
+;; afterwards.
+
+;;; Code:
+
+(make-variable-buffer-local
+ (defvar fuel-popup--created-window nil))
+
+(make-variable-buffer-local
+ (defvar fuel-popup--selected-window nil))
+
+(defun fuel-popup--display (&optional buffer)
+  (when buffer (set-buffer buffer))
+  (let ((selected-window (selected-window))
+        (buffer (current-buffer)))
+    (unless (eq selected-window (get-buffer-window buffer))
+      (let ((windows))
+        (walk-windows (lambda (w) (push w windows)) nil t)
+        (prog1 (pop-to-buffer buffer)
+          (set (make-local-variable 'fuel-popup--created-window)
+               (unless (memq (selected-window) windows) (selected-window)))
+          (set (make-local-variable 'fuel-popup--selected-window)
+               selected-window))))))
+
+(defun fuel-popup--quit ()
+  (interactive)
+  (let ((selected fuel-popup--selected-window)
+        (created fuel-popup--created-window))
+    (bury-buffer)
+    (when (eq created (selected-window)) (delete-window created))
+    (when (window-live-p selected) (select-window selected))))
+
+(define-minor-mode fuel-popup-mode
+  "Mode for displaying read only stuff"
+  nil nil
+  '(("q" . fuel-popup--quit))
+  (setq buffer-read-only t))
+
+(defmacro fuel-popup--define (fun name mode)
+  `(defun ,fun ()
+     (or (get-buffer ,name)
+         (with-current-buffer (get-buffer-create ,name)
+           (funcall ,mode)
+           (fuel-popup-mode)
+           (current-buffer)))))
+
+(put 'fuel-popup--define 'lisp-indent-function 1)
+
+(defmacro fuel--with-popup (buffer &rest body)
+  `(with-current-buffer ,buffer
+     (let ((inhibit-read-only t))
+       ,@body)))
+
+(put 'fuel--with-popup 'lisp-indent-function 1)
+
+\f
+(provide 'fuel-popup)
+;;; fuel-popup.el ends here
diff --git a/misc/fuel/fuel-refactor.el b/misc/fuel/fuel-refactor.el
new file mode 100644 (file)
index 0000000..061adbb
--- /dev/null
@@ -0,0 +1,237 @@
+;;; fuel-refactor.el -- code refactoring support
+
+;; Copyright (C) 2009 Jose Antonio Ortega Ruiz
+;; See http://factorcode.org/license.txt for BSD license.
+
+;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
+;; Keywords: languages, fuel, factor
+;; Start date: Thu Jan 08, 2009 00:57
+
+;;; Comentary:
+
+;; Utilities performing refactoring on factor code.
+
+;;; Code:
+
+(require 'fuel-scaffold)
+(require 'fuel-stack)
+(require 'fuel-syntax)
+(require 'fuel-base)
+
+(require 'etags)
+
+\f
+;;; Word definitions in buffer
+
+(defconst fuel-refactor--next-defun-regex
+  (format "^\\(:\\|MEMO:\\|MACRO:\\):? +\\(\\w+\\)\\(%s\\)\\([^;]+?\\) ;\\_>"
+          fuel-syntax--stack-effect-regex))
+
+(defun fuel-refactor--previous-defun ()
+  (let ((pos) (result))
+    (while (and (not result)
+                (setq pos (fuel-syntax--beginning-of-defun)))
+      (setq result (looking-at fuel-refactor--next-defun-regex)))
+    (when (and result pos)
+      (let ((name (match-string-no-properties 2))
+            (body (match-string-no-properties 4))
+            (end (match-end 0)))
+        (list (split-string body nil t) name pos end)))))
+
+(defun fuel-refactor--find (code to)
+  (let ((candidate) (result))
+    (while (and (not result)
+                (setq candidate (fuel-refactor--previous-defun))
+                (> (point) to))
+      (when (equal (car candidate) code)
+        (setq result (cdr candidate))))
+    result))
+
+(defun fuel-refactor--reuse-p (word)
+  (save-excursion
+    (mark-defun)
+    (move-overlay fuel-stack--overlay (1+ (point)) (mark))
+    (unwind-protect
+        (and (y-or-n-p (format "Use existing word '%s'? " word)) word)
+      (delete-overlay fuel-stack--overlay))))
+
+(defun fuel-refactor--code-rx (code)
+  (let ((words (split-string code nil t)))
+    (mapconcat 'regexp-quote words "[ \n\f\r]+")))
+
+\f
+;;; Extract word:
+
+(defun fuel-refactor--reuse-existing (code)
+  (save-excursion
+    (mark-defun)
+    (let ((code (split-string (substring-no-properties code) nil t))
+          (down (mark))
+          (found)
+          (result))
+      (while (and (not result)
+                  (setq found (fuel-refactor--find code (point-min))))
+        (when found (setq result (fuel-refactor--reuse-p (car found)))))
+      (goto-char (point-max))
+      (while (and (not result)
+                  (setq found (fuel-refactor--find code down)))
+        (when found (setq result (fuel-refactor--reuse-p (car found)))))
+      (and result found))))
+
+(defun fuel-refactor--insert-word (word stack-effect code)
+  (let ((beg (save-excursion (fuel-syntax--beginning-of-defun) (point)))
+        (end (save-excursion
+               (re-search-backward fuel-syntax--end-of-def-regex nil t)
+               (forward-line 1)
+               (skip-syntax-forward "-"))))
+    (let ((start (goto-char (max beg end))))
+      (open-line 1)
+      (insert ": " word " " stack-effect "\n" code " ;\n")
+      (indent-region start (point))
+      (move-overlay fuel-stack--overlay start (point)))))
+
+(defun fuel-refactor--extract-other (start end code)
+  (unwind-protect
+      (when (y-or-n-p "Apply refactoring to rest of buffer? ")
+        (save-excursion
+          (let ((rx (fuel-refactor--code-rx code))
+                (end (point)))
+            (query-replace-regexp rx word t (point-min) start)
+            (query-replace-regexp rx word t end (point-max)))))
+    (delete-overlay fuel-stack--overlay)))
+
+(defun fuel-refactor--extract (begin end)
+  (unless (< begin end) (error "No proper region to extract"))
+  (let* ((code (buffer-substring begin end))
+         (existing (fuel-refactor--reuse-existing code))
+         (code-str (or existing (fuel--region-to-string begin end)))
+         (word (or (car existing) (read-string "New word name: ")))
+         (stack-effect (or existing
+                           (fuel-stack--infer-effect code-str)
+                           (read-string "Stack effect: "))))
+    (goto-char begin)
+    (delete-region begin end)
+    (insert word)
+    (indent-region begin (point))
+    (save-excursion
+      (let ((start (or (cadr existing) (point))))
+        (unless existing
+          (fuel-refactor--insert-word word stack-effect code))
+        (fuel-refactor--extract-other start
+                                      (or (car (cddr existing)) (point))
+                                      code)))))
+
+(defun fuel-refactor-extract-region (begin end)
+  "Extracts current region as a separate word."
+  (interactive "r")
+  (let ((begin (save-excursion
+                 (goto-char begin)
+                 (when (zerop (skip-syntax-backward "w"))
+                   (skip-syntax-forward "-"))
+                 (point)))
+        (end (save-excursion
+               (goto-char end)
+               (skip-syntax-forward "w")
+               (point))))
+    (fuel-refactor--extract begin end)))
+
+(defun fuel-refactor-extract-sexp ()
+  "Extracts current innermost sexp (up to point) as a separate
+word."
+  (interactive)
+  (fuel-refactor-extract-region (1+ (fuel-syntax--beginning-of-sexp-pos))
+                                (if (looking-at-p ";") (point)
+                                  (fuel-syntax--end-of-symbol-pos))))
+
+\f
+;;; Inline word:
+
+(defun fuel-refactor--word-def (word)
+  (let ((def (fuel-eval--retort-result
+              (fuel-eval--send/wait `(:fuel* (,word fuel-word-def) "fuel")))))
+    (when def
+      (substring (substring def 2) 0 -2))))
+
+(defun fuel-refactor-inline-word ()
+  "Inserts definition of word at point."
+  (interactive)
+  (let ((word (fuel-syntax-symbol-at-point)))
+    (unless word (error "No word at point"))
+    (let ((code (fuel-refactor--word-def word)))
+      (unless code (error "Word's definition not found"))
+      (fuel-syntax--beginning-of-symbol)
+      (kill-word 1)
+      (let ((start (point)))
+        (insert code)
+        (save-excursion (font-lock-fontify-region start (point)))
+        (indent-region start (point))))))
+
+\f
+;;; Rename word:
+
+(defsubst fuel-refactor--rename-word (from to file)
+  (let ((files (fuel-xref--word-callers-files from)))
+    (tags-query-replace from to t `(cons ,file ',files))
+    files))
+
+(defun fuel-refactor--def-word ()
+  (save-excursion
+    (fuel-syntax--beginning-of-defun)
+    (or (and (looking-at fuel-syntax--method-definition-regex)
+             (match-string-no-properties 2))
+        (and (looking-at fuel-syntax--word-definition-regex)
+             (match-string-no-properties 2)))))
+
+(defun fuel-refactor-rename-word (&optional arg)
+  "Rename globally the word whose definition point is at.
+With prefix argument, use word at point instead."
+  (interactive "P")
+  (let* ((from (if arg (fuel-syntax-symbol-at-point) (fuel-refactor--def-word)))
+         (from (read-string "Rename word: " from))
+         (to (read-string (format "Rename '%s' to: " from)))
+         (buffer (current-buffer)))
+    (fuel-refactor--rename-word from to (buffer-file-name))))
+
+\f
+;;; Extract vocab:
+
+(defun fuel-refactor--insert-using (vocab)
+  (save-excursion
+    (goto-char (point-min))
+    (let ((usings (sort (cons vocab (fuel-syntax--usings)) 'string<)))
+      (fuel-debug--replace-usings (buffer-file-name) usings))))
+
+(defun fuel-refactor--vocab-root (vocab)
+  (let ((cmd `(:fuel* (,vocab fuel-scaffold-get-root) "fuel")))
+    (fuel-eval--retort-result (fuel-eval--send/wait cmd))))
+
+(defun fuel-refactor--extract-vocab (begin end)
+  (when (< begin end)
+    (let* ((str (buffer-substring begin end))
+           (buffer (current-buffer))
+           (vocab (fuel-syntax--current-vocab))
+           (vocab-hint (and vocab (format "%s." vocab)))
+           (root-hint (fuel-refactor--vocab-root vocab))
+           (vocab (fuel-scaffold-vocab t vocab-hint root-hint)))
+      (with-current-buffer buffer
+        (delete-region begin end)
+        (fuel-refactor--insert-using vocab))
+      (newline)
+      (insert str)
+      (newline)
+      (save-buffer)
+      (fuel-update-usings))))
+
+(defun fuel-refactor-extract-vocab (begin end)
+  "Creates a new vocab with the words in current region.
+The region is extended to the closest definition boundaries."
+  (interactive "r")
+  (fuel-refactor--extract-vocab (save-excursion (goto-char begin)
+                                                (mark-defun)
+                                                (point))
+                                (save-excursion (goto-char end)
+                                                (mark-defun)
+                                                (mark))))
+\f
+(provide 'fuel-refactor)
+;;; fuel-refactor.el ends here
diff --git a/misc/fuel/fuel-scaffold.el b/misc/fuel/fuel-scaffold.el
new file mode 100644 (file)
index 0000000..05d8255
--- /dev/null
@@ -0,0 +1,85 @@
+;;; fuel-scaffold.el -- interaction with tools.scaffold
+
+;; Copyright (C) 2009 Jose Antonio Ortega Ruiz
+;; See http://factorcode.org/license.txt for BSD license.
+
+;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
+;; Keywords: languages, fuel, factor
+;; Start date: Sun Jan 11, 2009 18:40
+
+;;; Comentary:
+
+;; Utilities for creating new vocabulary files and other boilerplate.
+;; Mainly, an interface to Factor's tools.scaffold.
+
+;;; Code:
+
+(require 'fuel-eval)
+(require 'fuel-edit)
+(require 'fuel-syntax)
+(require 'fuel-base)
+
+\f
+;;; Customisation:
+
+(defgroup fuel-scaffold nil
+  "Options for FUEL's scaffolding."
+  :group 'fuel)
+
+(defcustom fuel-scaffold-developer-name user-full-name
+  "The name to be inserted as yours in scaffold templates."
+  :type 'string
+  :group 'fuel-scaffold)
+
+\f
+;;; Auxiliary functions:
+
+(defun fuel-scaffold--vocab-roots ()
+  (let ((cmd '(:fuel* (vocab-roots get :get) "fuel")))
+    (fuel-eval--retort-result (fuel-eval--send/wait cmd))))
+
+\f
+;;; User interface:
+
+(defun fuel-scaffold-vocab (&optional other-window name-hint root-hint)
+  "Creates a directory in the given root for a new vocabulary and
+adds source, tests and authors.txt files.
+
+You can configure `fuel-scaffold-developer-name' (set by default to
+`user-full-name') for the name to be inserted in the generated files."
+  (interactive)
+  (let* ((name (read-string "Vocab name: " name-hint))
+         (root (completing-read "Vocab root: "
+                                (fuel-scaffold--vocab-roots)
+                                nil t (or root-hint "resource:")))
+         (cmd `(:fuel* ((,root ,name ,fuel-scaffold-developer-name)
+                        (fuel-scaffold-vocab)) "fuel"))
+         (ret (fuel-eval--send/wait cmd))
+         (file (fuel-eval--retort-result ret)))
+    (unless file
+      (error "Error creating vocab (%s)" (car (fuel-eval--retort-error ret))))
+    (if other-window (find-file-other-window file) (find-file file))
+    (goto-char (point-max))
+    name))
+
+(defun fuel-scaffold-help (&optional arg)
+  "Creates, if it does not already exist, a help file with
+scaffolded help for each word in the current vocabulary.
+
+With prefix argument, ask for the vocabulary name.
+You can configure `fuel-scaffold-developer-name' (set by default to
+`user-full-name') for the name to be inserted in the generated file."
+  (interactive "P")
+  (let* ((vocab (or (and (not arg) (fuel-syntax--current-vocab))
+                   (fuel-edit--read-vocabulary-name nil)))
+         (cmd `(:fuel* (,vocab ,fuel-scaffold-developer-name fuel-scaffold-help)
+                       "fuel"))
+         (ret (fuel-eval--send/wait cmd))
+         (file (fuel-eval--retort-result ret)))
+        (unless file
+          (error "Error creating help file" (car (fuel-eval--retort-error ret))))
+        (find-file file)))
+
+\f
+(provide 'fuel-scaffold)
+;;; fuel-scaffold.el ends here
diff --git a/misc/fuel/fuel-stack.el b/misc/fuel/fuel-stack.el
new file mode 100644 (file)
index 0000000..7329848
--- /dev/null
@@ -0,0 +1,138 @@
+;;; fuel-stack.el -- stack inference help
+
+;; Copyright (C) 2008 Jose Antonio Ortega Ruiz
+;; See http://factorcode.org/license.txt for BSD license.
+
+;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
+;; Keywords: languages, fuel, factor
+;; Start date: Sat Dec 20, 2008 01:08
+
+;;; Comentary:
+
+;; Utilities and a minor mode to show inferred stack effects in the
+;; echo area.
+
+;;; Code:
+
+(require 'fuel-autodoc)
+(require 'fuel-syntax)
+(require 'fuel-eval)
+(require 'fuel-font-lock)
+(require 'fuel-base)
+
+\f
+;;; Customization
+
+(defgroup fuel-stack nil
+  "Customization for FUEL's stack inference engine."
+  :group 'fuel)
+
+(fuel-font-lock--defface fuel-font-lock-stack-region
+  'highlight fuel-stack "highlighting the stack effect region")
+
+(defcustom fuel-stack-highlight-period 2.0
+  "Time, in seconds, the region is highlighted when showing its
+stack effect.
+
+Set it to 0 to disable highlighting."
+  :group 'fuel-stack
+  :type 'float)
+
+(defcustom fuel-stack-mode-show-sexp-p t
+  "Whether to show in the echo area the sexp together with its stack effect."
+  :group 'fuel-stack
+  :type 'boolean)
+
+\f
+;;; Querying for stack effects
+
+(defun fuel-stack--infer-effect (str)
+  (let ((cmd `(:fuel*
+               ((:using stack-checker effects)
+                ([ (:factor ,str) ] infer effect>string :get)))))
+    (fuel-eval--retort-result (fuel-eval--send/wait cmd 500))))
+
+(defsubst fuel-stack--infer-effect/prop (str)
+  (let ((e (fuel-stack--infer-effect str)))
+    (when e
+      (put-text-property 0 (length e) 'face 'factor-font-lock-stack-effect e))
+    e))
+
+(defvar fuel-stack--overlay
+  (let ((overlay (make-overlay 0 0)))
+    (overlay-put overlay 'face 'fuel-font-lock-stack-region)
+    (delete-overlay overlay)
+    overlay))
+
+(defun fuel-stack-effect-region (begin end)
+  "Displays the inferred stack effect of the code in current region."
+  (interactive "r")
+  (when (> fuel-stack-highlight-period 0)
+    (move-overlay fuel-stack--overlay begin end))
+  (condition-case nil
+      (let* ((str (fuel--region-to-string begin end))
+             (effect (fuel-stack--infer-effect/prop str)))
+        (if effect (message "%s" effect)
+          (message "Couldn't infer effect for '%s'"
+                   (fuel--shorten-region begin end 60)))
+        (sit-for fuel-stack-highlight-period))
+    (error))
+  (delete-overlay fuel-stack--overlay))
+
+(defun fuel-stack-effect-sexp (&optional arg)
+  "Displays the inferred stack effect for the current sexp.
+With prefix argument, use current region instead"
+  (interactive "P")
+  (if arg
+      (call-interactively 'fuel-stack-effect-region)
+    (fuel-stack-effect-region (1+ (fuel-syntax--beginning-of-sexp-pos))
+                              (if (looking-at-p ";") (point)
+                                (fuel-syntax--end-of-symbol-pos)))))
+
+\f
+;;; Stack mode:
+
+(make-variable-buffer-local
+ (defvar fuel-stack-mode-string " S"
+   "Modeline indicator for fuel-stack-mode"))
+
+(make-variable-buffer-local
+ (defvar fuel-stack--region-function
+   '(lambda ()
+      (fuel--region-to-string (1+ (fuel-syntax--beginning-of-sexp-pos))))))
+
+(defun fuel-stack--eldoc ()
+  (when (looking-at-p " \\|$")
+    (let* ((r (funcall fuel-stack--region-function))
+           (e (and r
+                   (not (string-match "^ *$" r))
+                   (fuel-stack--infer-effect/prop r))))
+      (when e
+        (if fuel-stack-mode-show-sexp-p
+            (concat (fuel--shorten-str r 30) " -> " e)
+          e)))))
+
+(define-minor-mode fuel-stack-mode
+  "Toggle Fuel's Stack mode.
+With no argument, this command toggles the mode.
+Non-null prefix argument turns on the mode.
+Null prefix argument turns off the mode.
+
+When Stack mode is enabled, inferred stack effects for current
+sexp are automatically displayed in the echo area."
+  :init-value nil
+  :lighter fuel-stack-mode-string
+  :group 'fuel-stack
+
+  (setq fuel-autodoc--fallback-function
+        (when fuel-stack-mode 'fuel-stack--eldoc))
+  (set (make-local-variable 'eldoc-minor-mode-string) nil)
+  (unless fuel-autodoc-mode
+    (set (make-local-variable 'eldoc-documentation-function)
+         (when fuel-stack-mode 'fuel-stack--eldoc))
+    (eldoc-mode fuel-stack-mode)
+    (message "Fuel Stack Autodoc %s" (if fuel-stack-mode "enabled" "disabled"))))
+
+\f
+(provide 'fuel-stack)
+;;; fuel-stack.el ends here
index a0485f9183ecdf85893597a593777100dbe30a7b..ad5a025a88525e9c80382ac6aea611b335b7c325 100644 (file)
@@ -1,6 +1,6 @@
 ;;; fuel-syntax.el --- auxiliar definitions for factor code navigation.
 
-;; Copyright (C) 2008  Jose Antonio Ortega Ruiz
+;; Copyright (C) 2008, 2009  Jose Antonio Ortega Ruiz
 ;; See http://factorcode.org/license.txt for BSD license.
 
 ;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
 
 (defun fuel-syntax--beginning-of-symbol ()
   "Move point to the beginning of the current symbol."
-  (while (eq (char-before) ?:) (backward-char))
-  (skip-syntax-backward "w_"))
+  (skip-syntax-backward "w_()"))
+
+(defsubst fuel-syntax--beginning-of-symbol-pos ()
+  (save-excursion (fuel-syntax--beginning-of-symbol) (point)))
 
 (defun fuel-syntax--end-of-symbol ()
   "Move point to the end of the current symbol."
-  (skip-syntax-forward "w_")
-  (while (looking-at ":") (forward-char)))
+  (skip-syntax-forward "w_()"))
+
+(defsubst fuel-syntax--end-of-symbol-pos ()
+  (save-excursion (fuel-syntax--end-of-symbol) (point)))
 
 (put 'factor-symbol 'end-op 'fuel-syntax--end-of-symbol)
 (put 'factor-symbol 'beginning-op 'fuel-syntax--beginning-of-symbol)
   (let ((s (substring-no-properties (thing-at-point 'factor-symbol))))
     (and (> (length s) 0) s)))
 
+
 \f
 ;;; Regexps galore:
 
 (defconst fuel-syntax--parsing-words
-  '("{" "}" "^:" "^::" ";" "<<" "<PRIVATE" ">>"
-    "BIN:" "BV{" "B{" "C:" "C-STRUCT:" "C-UNION:" "CHAR:" "CS{" "C{"
-    "DEFER:" "ERROR:" "EXCLUDE:" "FORGET:"
-    "GENERIC#" "GENERIC:" "HEX:" "HOOK:" "H{"
-    "IN:" "INSTANCE:" "INTERSECTION:"
-    "M:" "MACRO:" "MACRO::" "MAIN:" "MATH:" "METHOD:" "MIXIN:"
-    "OCT:" "POSTPONE:" "PREDICATE:" "PRIMITIVE:" "PRIVATE>" "PROVIDE:"
-    "REQUIRE:"  "REQUIRES:" "SINGLETON:" "SLOT:" "SYMBOL:" "SYMBOLS:"
-    "TUPLE:" "T{" "t\\??" "TYPEDEF:"
-    "UNION:" "USE:" "USING:" "V{" "VARS:" "W{"))
-
-(defconst fuel-syntax--parsing-words-ext-regex
-  (regexp-opt '("B" "call-next-method" "delimiter" "f" "initial:" "read-only")
-              'words))
+  '(":" "::" ";" "&:" "<<" "<PRIVATE" ">>"
+    "ABOUT:" "ALIAS:" "ALIEN:" "ARTICLE:"
+    "B" "BIN:"
+    "C:" "C-ENUM:" "C-STRUCT:" "C-UNION:" "CHAR:" "CONSTANT:" "call-next-method"
+    "DEFER:"
+    "ERROR:" "EXCLUDE:"
+    "f" "FORGET:" "FROM:" "FUNCTION:"
+    "GENERIC#" "GENERIC:"
+    "HELP:" "HEX:" "HOOK:"
+    "IN:" "initial:" "INSTANCE:" "INTERSECTION:"
+    "LIBRARY:"
+    "M:" "MACRO:" "MACRO::" "MAIN:" "MATH:" "MEMO:" "MEMO:" "METHOD:" "MIXIN:"
+    "OCT:"
+    "POSTPONE:" "PREDICATE:" "PRIMITIVE:" "PRIVATE>" "PROVIDE:"
+    "QUALIFIED-WITH:" "QUALIFIED:"
+    "read-only" "RENAME:" "REQUIRE:"  "REQUIRES:"
+    "SINGLETON:" "SINGLETONS:" "SLOT:" "SYMBOL:" "SYMBOLS:"
+    "TUPLE:" "t" "t?" "TYPEDEF:"
+    "UNION:" "USE:" "USING:"
+    "VARS:"))
+
+(defconst fuel-syntax--parsing-words-regex
+  (regexp-opt fuel-syntax--parsing-words 'words))
+
+(defconst fuel-syntax--bracers
+  '("B" "BV" "C" "CS" "H" "T" "V" "W"))
+
+(defconst fuel-syntax--brace-words-regex
+  (format "%s{" (regexp-opt fuel-syntax--bracers t)))
 
 (defconst fuel-syntax--declaration-words
-  '("flushable" "foldable" "inline" "parsing" "recursive"))
+  '("flushable" "foldable" "inline" "parsing" "recursive" "delimiter"))
 
 (defconst fuel-syntax--declaration-words-regex
   (regexp-opt fuel-syntax--declaration-words 'words))
 
 (defsubst fuel-syntax--second-word-regex (prefixes)
-  (format "^%s +\\([^ \r\n]+\\)" (regexp-opt prefixes t)))
+  (format "%s +\\([^ \r\n]+\\)" (regexp-opt prefixes t)))
 
 (defconst fuel-syntax--method-definition-regex
   "^M: +\\([^ ]+\\) +\\([^ ]+\\)")
 
+(defconst fuel-syntax--integer-regex
+  "\\_<-?[0-9]+\\_>")
+
+(defconst fuel-syntax--raw-float-regex
+  "[0-9]*\\.[0-9]*\\([eE][+-]?[0-9]+\\)?")
+
+(defconst fuel-syntax--float-regex
+  (format "\\_<-?%s\\_>" fuel-syntax--raw-float-regex))
+
+(defconst fuel-syntax--number-regex
+  (format "\\([0-9]+\\|%s\\)" fuel-syntax--raw-float-regex))
+
+(defconst fuel-syntax--ratio-regex
+  (format "\\_<[+-]?%s/-?%s\\_>"
+          fuel-syntax--number-regex
+          fuel-syntax--number-regex))
+
+(defconst fuel-syntax--bad-string-regex
+  "\\_<\"[^>]\\([^\"\n]\\|\\\\\"\\)*\n")
+
 (defconst fuel-syntax--word-definition-regex
-  (fuel-syntax--second-word-regex '(":" "::" "GENERIC:")))
+  (fuel-syntax--second-word-regex
+   '(":" "::" "GENERIC:" "DEFER:" "HOOK:" "MAIN:" "MATH:" "POSTPONE:"
+     "SYMBOL:" "RENAME:")))
+
+(defconst fuel-syntax--alias-definition-regex
+  "^ALIAS: +\\(\\_<.+?\\_>\\) +\\(\\_<.+?\\_>\\)")
+
+(defconst fuel-syntax--vocab-ref-regexp
+  (fuel-syntax--second-word-regex
+   '("IN:" "USE:" "FROM:" "EXCLUDE:" "QUALIFIED:" "QUALIFIED-WITH:")))
+
+(defconst fuel-syntax--int-constant-def-regex
+  (fuel-syntax--second-word-regex '("ALIEN:" "CHAR:" "BIN:" "HEX:" "OCT:")))
 
 (defconst fuel-syntax--type-definition-regex
-  (fuel-syntax--second-word-regex '("TUPLE:" "SINGLETON:")))
+  (fuel-syntax--second-word-regex
+   '("C-STRUCT:" "C-UNION:" "MIXIN:" "TUPLE:" "SINGLETON:" "UNION:")))
 
-(defconst fuel-syntax--parent-type-regex "^TUPLE: +[^ ]+ +< +\\([^ ]+\\)")
+(defconst fuel-syntax--tuple-decl-regex
+  "^TUPLE: +\\([^ \n]+\\) +< +\\([^ \n]+\\)\\_>")
 
 (defconst fuel-syntax--constructor-regex "<[^ >]+>")
 
-(defconst fuel-syntax--setter-regex "\\W>>[^ ]+\\b")
+(defconst fuel-syntax--getter-regex "\\(^\\|\\_<\\)[^ ]+?>>\\_>")
+(defconst fuel-syntax--setter-regex "\\_<>>.+?\\_>")
 
 (defconst fuel-syntax--symbol-definition-regex
-  (fuel-syntax--second-word-regex '("SYMBOL:" "VAR:")))
+  (fuel-syntax--second-word-regex '("&:" "SYMBOL:" "VAR:")))
 
-(defconst fuel-syntax--stack-effect-regex " ( .* )")
+(defconst fuel-syntax--stack-effect-regex
+  "\\( ( .* )\\)\\|\\( (( .* ))\\)")
 
 (defconst fuel-syntax--using-lines-regex "^USING: +\\([^;]+\\);")
 
 
 (defconst fuel-syntax--sub-vocab-regex "^<\\([^ \n]+\\) *$")
 
-(defconst fuel-syntax--definition-starters-regex
-  (regexp-opt '("VARS" "TUPLE" "MACRO" "MACRO:" "M" ":" "")))
+(defconst fuel-syntax--alien-function-regex
+  "\\_<FUNCTION: \\(\\w+\\) \\(\\w+\\)")
+
+(defconst fuel-syntax--indent-def-starts '("" ":"
+                                           "C-ENUM" "C-STRUCT" "C-UNION"
+                                           "FROM" "FUNCTION:"
+                                           "INTERSECTION:"
+                                           "M" "MACRO" "MACRO:"
+                                           "MEMO" "MEMO:" "METHOD"
+                                           "PREDICATE" "PRIMITIVE"
+                                           "UNION"))
+
+(defconst fuel-syntax--no-indent-def-starts '("SINGLETONS"
+                                              "SYMBOLS"
+                                              "TUPLE"
+                                              "VARS"))
+
+(defconst fuel-syntax--indent-def-start-regex
+  (format "^\\(%s:\\)\\( \\|\n\\)" (regexp-opt fuel-syntax--indent-def-starts)))
+
+(defconst fuel-syntax--no-indent-def-start-regex
+  (format "^\\(%s:\\) " (regexp-opt fuel-syntax--no-indent-def-starts)))
 
 (defconst fuel-syntax--definition-start-regex
-  (format "^\\(%s:\\) " fuel-syntax--definition-starters-regex))
+  (format "^\\(%s:\\) " (regexp-opt (append fuel-syntax--no-indent-def-starts
+                                            fuel-syntax--indent-def-starts))))
 
 (defconst fuel-syntax--definition-end-regex
-  (format "\\(\\(^\\| +\\);\\( +%s\\)*\\($\\| +\\)\\)"
+  (format "\\(\\(^\\| +\\);\\( *%s\\)*\\($\\| +\\)\\)"
           fuel-syntax--declaration-words-regex))
 
 (defconst fuel-syntax--single-liner-regex
-  (format "^%s" (regexp-opt '("DEFER:" "GENERIC:" "IN:"
-                              "PRIVATE>" "<PRIVATE"
-                              "SINGLETON:" "SYMBOL:" "USE:" "VAR:"))))
+  (regexp-opt '("ABOUT:"
+                "ARTICLE:"
+                "ALIAS:"
+                "CONSTANT:" "C:"
+                "DEFER:"
+                "FORGET:"
+                "GENERIC:" "GENERIC#"
+                "HELP:" "HEX:" "HOOK:"
+                "IN:" "INSTANCE:"
+                "LIBRARY:"
+                "MAIN:" "MATH:" "MIXIN:"
+                "OCT:"
+                "POSTPONE:" "PRIVATE>" "<PRIVATE"
+                "QUALIFIED-WITH:" "QUALIFIED:"
+                "RENAME:"
+                "SINGLETON:" "SLOT:" "SYMBOL:"
+                "TYPEDEF:"
+                "USE:"
+                "VAR:")))
 
 (defconst fuel-syntax--begin-of-def-regex
-  (format "^USING: \\|\\(%s\\)\\|\\(%s .*\\)"
+  (format "^USING: \\|\\(%s\\)\\|\\(^%s .*\\)"
           fuel-syntax--definition-start-regex
           fuel-syntax--single-liner-regex))
 
   (format "^.*%s" fuel-syntax--definition-end-regex))
 
 (defconst fuel-syntax--end-of-def-regex
-  (format "\\(%s\\)\\|\\(%s .*\\)"
+  (format "\\(%s\\)\\|\\(^%s .*\\)"
           fuel-syntax--end-of-def-line-regex
           fuel-syntax--single-liner-regex))
-\f
-;;; Factor syntax table
 
-(defvar fuel-syntax--syntax-table
-  (let ((i 0)
-        (table (make-syntax-table)))
-    ;; Default is atom-constituent
-    (while (< i 256)
-      (modify-syntax-entry i "_   " table)
-      (setq i (1+ i)))
-
-    ;; Word components.
-    (setq i ?0)
-    (while (<= i ?9)
-      (modify-syntax-entry i "w   " table)
-      (setq i (1+ i)))
-    (setq i ?A)
-    (while (<= i ?Z)
-      (modify-syntax-entry i "w   " table)
-      (setq i (1+ i)))
-    (setq i ?a)
-    (while (<= i ?z)
-      (modify-syntax-entry i "w   " table)
-      (setq i (1+ i)))
-
-    ;; Whitespace
-    (modify-syntax-entry ?\t " " table)
-    (modify-syntax-entry ?\f " " table)
-    (modify-syntax-entry ?\r " " table)
-    (modify-syntax-entry ?  " " table)
+(defconst fuel-syntax--defun-signature-regex
+  (format "\\(%s\\|%s\\)"
+          (format ":[^ ]* [^ ]+\\(%s\\)*" fuel-syntax--stack-effect-regex)
+          "M[^:]*: [^ ]+ [^ ]+"))
 
-    ;; (end of) Comments
-    (modify-syntax-entry ?\n ">" table)
+(defconst fuel-syntax--constructor-decl-regex
+  "\\_<C: +\\(\\w+\\) +\\(\\w+\\)\\( .*\\)?$")
 
-    ;; Parenthesis
-    (modify-syntax-entry ?\[ "(]  " table)
-    (modify-syntax-entry ?\] ")[  " table)
-    (modify-syntax-entry ?{ "(}  " table)
-    (modify-syntax-entry ?} "){  " table)
+(defconst fuel-syntax--typedef-regex
+  "\\_<TYPEDEF: +\\(\\w+\\) +\\(\\w+\\)\\( .*\\)?$")
 
-    (modify-syntax-entry ?\( "()" table)
-    (modify-syntax-entry ?\) ")(" table)
+(defconst fuel-syntax--rename-regex
+  "\\_<RENAME: +\\(\\w+\\) +\\(\\w+\\) +=> +\\(\\w+\\)\\( .*\\)?$")
 
-    ;; Strings
-    (modify-syntax-entry ?\" "\"" table)
-    (modify-syntax-entry ?\\ "/" table)
-    table)
-  "Syntax table used while in Factor mode.")
+\f
+;;; Factor syntax table
+
+(setq fuel-syntax--syntax-table
+  (let ((table (make-syntax-table)))
+    ;; Default is word constituent
+    (dotimes (i 256)
+      (modify-syntax-entry i "w" table))
+    ;; Whitespace (TAB is not whitespace)
+    (modify-syntax-entry ?\f " " table)
+    (modify-syntax-entry ?\r " " table)
+    (modify-syntax-entry ?\  " " table)
+    (modify-syntax-entry ?\n " " table)
+    table))
 
 (defconst fuel-syntax--syntactic-keywords
-  `(("\\(#!\\)" (1 "<"))
-    (" \\(!\\)" (1 "<"))
-    ("^\\(!\\)" (1 "<"))
-    ("\\(!(\\) .* \\()\\)" (1 "<") (2 ">"))
-    ("\\([[({]\\)\\([^ \"\n]\\)" (1 "_") (2 "_"))
-    ("\\([^ \"\n]\\)\\([])}]\\)" (1 "_") (2 "_"))))
+  `(;; CHARs:
+    ("\\(CHAR:\\|POSTPONE:\\|\\\\\\) \\(.\\)\\( \\|$\\)" (2 "w"))
+    ;; Comments:
+    ("\\_<\\(#?!\\) .*\\(\n\\|$\\)" (1 "<") (2 ">"))
+    ("\\_<\\(#?!\\)\\(\n\\|$\\)" (1 "<") (2 ">"))
+    (" \\((\\)( \\([^\n]*\\) )\\()\\)\\( \\|\n\\)" (1 "<b") (2 "w") (3 ">b"))
+    (" \\((\\) \\([^\n]*\\) \\()\\)\\( \\|\n\\)" (1 "<b") (2 "w") (3 ">b"))
+    ;; Strings
+    ("\\( \\|^\\)\\(DLL\\|P\\|SBUF\\)\\(\"\\)\\([^\n\r\f\\\"]\\|\\\\.\\)*?\\(\"\\)"
+     (3 "\"") (5 "\""))
+    ("\\(\"\\)\\([^\n\r\f\\\"]\\|\\\\.\\)*?\\(\"\\)" (1 "\"") (3 "\""))
+    ("\\_<<\\(\"\\)\\_>" (1 "<b"))
+    ("\\_<\\(\"\\)>\\_>" (1 ">b"))
+    ;; Multiline constructs
+    ("\\_<\\(U\\)SING: \\(;\\)" (1 "<b") (2 ">b"))
+    ("\\_<USING:\\( \\)" (1 "<b"))
+    ("\\_<\\(C\\)-ENUM: \\(;\\)" (1 "<b") (2 ">b"))
+    ("\\_<C-ENUM:\\( \\|\n\\)" (1 "<b"))
+    ("\\_<TUPLE: +\\w+? +< +\\w+? *\\( \\|\n\\)\\([^;]\\|$\\)" (1 "<b"))
+    ("\\_<\\(TUPLE\\|SYMBOLS\\|VARS\\): +\\w+? *\\( \\|\n\\)\\([^;<\n]\\|\\_>\\)"
+     (2 "<b"))
+    ("\\(\n\\| \\);\\_>" (1 ">b"))
+    ;; Let and lambda:
+    ("\\_<\\(!(\\) .* \\()\\)" (1 "<") (2 ">"))
+    ("\\(\\[\\)\\(let\\|wlet\\|let\\*\\)\\( \\|$\\)" (1 "(]"))
+    ("\\(\\[\\)\\(|\\) +[^|]* \\(|\\)" (1 "(]") (2 "(|") (3 ")|"))
+    (" \\(|\\) " (1 "(|"))
+    (" \\(|\\)$" (1 ")"))
+    ;; Opening brace words:
+    ("\\_<\\w*\\({\\)\\_>" (1 "(}"))
+    ("\\_<\\(}\\)\\_>" (1 "){"))
+    ;; Parenthesis:
+    ("\\_<\\((\\)\\_>" (1 "()"))
+    ("\\_<\\()\\)\\_>" (1 ")("))
+    ;; Quotations:
+    ("\\_<'\\(\\[\\)\\_>" (1 "(]"))      ; fried
+    ("\\_<\\(\\[\\)\\_>" (1 "(]"))
+    ("\\_<\\(\\]\\)\\_>" (1 ")["))))
 
 \f
 ;;; Source code analysis:
 (defsubst fuel-syntax--at-begin-of-def ()
   (looking-at fuel-syntax--begin-of-def-regex))
 
+(defsubst fuel-syntax--at-begin-of-indent-def ()
+  (looking-at fuel-syntax--indent-def-start-regex))
+
 (defsubst fuel-syntax--at-end-of-def ()
   (looking-at fuel-syntax--end-of-def-regex))
 
 (defsubst fuel-syntax--looking-at-emptiness ()
-  (looking-at "^[ \t]*$"))
+  (looking-at "^[ ]*$\\|$"))
+
+(defsubst fuel-syntax--is-last-char (pos)
+  (save-excursion
+    (goto-char (1+ pos))
+    (fuel-syntax--looking-at-emptiness)))
+
+(defsubst fuel-syntax--line-offset (pos)
+  (- pos (save-excursion
+           (goto-char pos)
+           (beginning-of-line)
+           (point))))
+
+(defun fuel-syntax--previous-non-blank ()
+  (forward-line -1)
+  (while (and (not (bobp)) (fuel-syntax--looking-at-emptiness))
+    (forward-line -1)))
+
+(defun fuel-syntax--beginning-of-block-pos ()
+  (save-excursion
+    (if (> (fuel-syntax--brackets-depth) 0)
+        (fuel-syntax--brackets-start)
+      (fuel-syntax--beginning-of-defun)
+      (point))))
 
 (defun fuel-syntax--at-setter-line ()
   (save-excursion
     (beginning-of-line)
-    (if (not (fuel-syntax--looking-at-emptiness))
-        (re-search-forward fuel-syntax--setter-regex (line-end-position) t)
-      (forward-line -1)
-      (or (fuel-syntax--at-constructor-line)
-          (fuel-syntax--at-setter-line)))))
+    (when (re-search-forward fuel-syntax--setter-regex
+                             (line-end-position)
+                             t)
+      (let* ((to (match-beginning 0))
+             (from (fuel-syntax--beginning-of-block-pos)))
+        (goto-char from)
+        (let ((depth (fuel-syntax--brackets-depth)))
+          (and (or (re-search-forward fuel-syntax--constructor-regex to t)
+                   (re-search-forward fuel-syntax--setter-regex to t))
+               (= depth (fuel-syntax--brackets-depth))))))))
 
 (defun fuel-syntax--at-constructor-line ()
   (save-excursion
 (defsubst fuel-syntax--at-using ()
   (looking-at fuel-syntax--using-lines-regex))
 
+(defun fuel-syntax--in-using ()
+  (let ((p (point)))
+    (save-excursion
+      (and (re-search-backward "^USING: " nil t)
+           (re-search-forward " ;" nil t)
+           (< p (match-end 0))))))
+
 (defsubst fuel-syntax--beginning-of-defun (&optional times)
   (re-search-backward fuel-syntax--begin-of-def-regex nil t times))
 
 (defsubst fuel-syntax--end-of-defun ()
   (re-search-forward fuel-syntax--end-of-def-regex nil t))
 
+(defsubst fuel-syntax--end-of-defun-pos ()
+  (save-excursion
+    (re-search-forward fuel-syntax--end-of-def-regex nil t)
+    (point)))
+
+(defun fuel-syntax--beginning-of-body ()
+  (let ((p (point)))
+    (and (fuel-syntax--beginning-of-defun)
+         (re-search-forward fuel-syntax--defun-signature-regex p t)
+         (not (re-search-forward fuel-syntax--end-of-def-regex p t)))))
+
+(defun fuel-syntax--beginning-of-sexp ()
+  (if (> (fuel-syntax--brackets-depth) 0)
+      (goto-char (fuel-syntax--brackets-start))
+    (fuel-syntax--beginning-of-body)))
+
+(defsubst fuel-syntax--beginning-of-sexp-pos ()
+  (save-excursion (fuel-syntax--beginning-of-sexp) (point)))
+
 \f
 ;;; USING/IN:
 
 (make-variable-buffer-local
- (defvar fuel-syntax--current-vocab nil))
+ (defvar fuel-syntax--current-vocab-function 'fuel-syntax--find-in))
 
-(make-variable-buffer-local
- (defvar fuel-syntax--usings nil))
-
-(defun fuel-syntax--current-vocab ()
-  (let ((ip
-         (save-excursion
-           (when (re-search-backward fuel-syntax--current-vocab-regex nil t)
-             (setq fuel-syntax--current-vocab (match-string-no-properties 1))
-             (point)))))
-    (when ip
-      (let ((pp (save-excursion
-                  (when (re-search-backward fuel-syntax--sub-vocab-regex ip t)
-                    (point)))))
-        (when (and pp (> pp ip))
-          (let ((sub (match-string-no-properties 1)))
-            (unless (save-excursion (search-backward (format "%s>" sub) pp t))
-              (setq fuel-syntax--current-vocab
-                    (format "%s.%s" fuel-syntax--current-vocab (downcase sub)))))))))
-  fuel-syntax--current-vocab)
-
-(defun fuel-syntax--usings-update ()
-  (save-excursion
-    (setq fuel-syntax--usings (list (fuel-syntax--current-vocab)))
-    (while (re-search-backward fuel-syntax--using-lines-regex nil t)
-      (dolist (u (split-string (match-string-no-properties 1) nil t))
-        (push u fuel-syntax--usings)))
-    fuel-syntax--usings))
+(defsubst fuel-syntax--current-vocab ()
+  (funcall fuel-syntax--current-vocab-function))
 
-(defsubst fuel-syntax--usings-update-hook ()
-  (fuel-syntax--usings-update)
-  nil)
+(defun fuel-syntax--find-in ()
+  (save-excursion
+    (when (re-search-backward fuel-syntax--current-vocab-regex nil t)
+      (match-string-no-properties 1))))
 
-(defun fuel-syntax--enable-usings ()
-  (add-hook 'before-save-hook 'fuel-syntax--usings-update-hook nil t)
-  (fuel-syntax--usings-update))
+(make-variable-buffer-local
+ (defvar fuel-syntax--usings-function 'fuel-syntax--find-usings))
 
 (defsubst fuel-syntax--usings ()
-  (or fuel-syntax--usings (fuel-syntax--usings-update)))
+  (funcall fuel-syntax--usings-function))
+
+(defun fuel-syntax--file-has-private ()
+  (save-excursion
+    (goto-char (point-min))
+    (and (re-search-forward "\\_<<PRIVATE\\_>" nil t)
+         (re-search-forward "\\_<PRIVATE>\\_>" nil t))))
+
+(defun fuel-syntax--find-usings (&optional no-private)
+  (save-excursion
+    (let ((usings))
+      (goto-char (point-max))
+      (while (re-search-backward fuel-syntax--using-lines-regex nil t)
+        (dolist (u (split-string (match-string-no-properties 1) nil t))
+          (push u usings)))
+      (when (and (not no-private) (fuel-syntax--file-has-private))
+        (goto-char (point-max))
+        (push (concat (fuel-syntax--find-in) ".private") usings))
+      usings)))
 
 \f
 (provide 'fuel-syntax)
diff --git a/misc/fuel/fuel-table.el b/misc/fuel/fuel-table.el
new file mode 100644 (file)
index 0000000..a00b21b
--- /dev/null
@@ -0,0 +1,93 @@
+;;; fuel-table.el -- table creation
+
+;; Copyright (C) 2009 Jose Antonio Ortega Ruiz
+;; See http://factorcode.org/license.txt for BSD license.
+
+;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
+;; Keywords: languages, fuel, factor
+;; Start date: Tue Jan 06, 2009 13:44
+
+;;; Comentary:
+
+;; Utilities to insert ascii tables.
+
+;;; Code:
+
+(defun fuel-table--col-widths (rows)
+  (let* ((col-no (length (car rows)))
+         (available (- (window-width) 2 (* 2 col-no)))
+         (widths)
+         (c 0))
+    (while (< c col-no)
+      (let ((width 0)
+            (av-width (- available (* 5 (- col-no c)))))
+        (dolist (row rows)
+          (setq width
+                (min av-width
+                     (max width (length (nth c row))))))
+        (push width widths)
+        (setq available (- available width)))
+      (setq c (1+ c)))
+    (reverse widths)))
+
+(defun fuel-table--pad-str (str width)
+  (let ((len (length str)))
+    (cond ((= len width) str)
+          ((> len width) (concat (substring str 0 (- width 3)) "..."))
+          (t (concat str (make-string (- width (length str)) ?\ ))))))
+
+(defun fuel-table--str-lines (str width)
+  (if (<= (length str) width)
+      (list (fuel-table--pad-str str width))
+    (with-temp-buffer
+      (let ((fill-column width))
+        (insert str)
+        (fill-region (point-min) (point-max))
+        (mapcar '(lambda (s) (fuel-table--pad-str s width))
+                (split-string (buffer-string) "\n"))))))
+
+(defun fuel-table--pad-row (row)
+  (let* ((max-ln (apply 'max (mapcar 'length row)))
+         (result))
+    (dolist (lines row)
+      (let ((ln (length lines)))
+        (if (= ln max-ln) (push lines result)
+          (let ((lines (reverse lines))
+                (l 0)
+                (blank (make-string (length (car lines)) ?\ )))
+            (while (< l ln)
+              (push blank lines)
+              (setq l (1+ l)))
+            (push (reverse lines) result)))))
+    (reverse result)))
+
+(defun fuel-table--format-rows (rows widths)
+  (let ((col-no (length (car rows)))
+        (frows))
+    (dolist (row rows)
+      (let ((c 0) (frow))
+        (while (< c col-no)
+          (push (fuel-table--str-lines (nth c row) (nth c widths)) frow)
+          (setq c (1+ c)))
+        (push (fuel-table--pad-row (reverse frow)) frows)))
+    (reverse frows)))
+
+(defun fuel-table--insert (rows)
+  (let* ((widths (fuel-table--col-widths rows))
+         (rows (fuel-table--format-rows rows widths))
+         (ls (concat "+" (mapconcat (lambda (n) (make-string n ?-)) widths "-+") "-+")))
+    (insert ls "\n")
+    (dolist (r rows)
+      (let ((ln (length (car r)))
+            (l 0))
+        (while (< l ln)
+          (insert (concat "|" (mapconcat 'identity
+                                         (mapcar `(lambda (x) (nth ,l x)) r)
+                                         " |")
+                          " |\n"))
+          (setq l (1+ l))))
+      (insert ls "\n"))))
+
+\f
+(provide 'fuel-table)
+;;; fuel-table.el ends here
diff --git a/misc/fuel/fuel-xref.el b/misc/fuel/fuel-xref.el
new file mode 100644 (file)
index 0000000..4d444eb
--- /dev/null
@@ -0,0 +1,283 @@
+;;; fuel-xref.el -- showing cross-reference info
+
+;; Copyright (C) 2008, 2009 Jose Antonio Ortega Ruiz
+;; See http://factorcode.org/license.txt for BSD license.
+
+;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
+;; Keywords: languages, fuel, factor
+;; Start date: Sat Dec 20, 2008 22:00
+
+;;; Comentary:
+
+;; A mode and utilities for showing cross-reference information.
+
+;;; Code:
+
+(require 'fuel-edit)
+(require 'fuel-completion)
+(require 'fuel-help)
+(require 'fuel-eval)
+(require 'fuel-syntax)
+(require 'fuel-popup)
+(require 'fuel-font-lock)
+(require 'fuel-base)
+
+(require 'button)
+
+\f
+;;; Customization:
+
+(defgroup fuel-xref nil
+  "FUEL's cross-referencing engine."
+  :group 'fuel)
+
+(defcustom fuel-xref-follow-link-to-word-p t
+  "Whether, when following a link to a caller, we position the
+cursor at the first ocurrence of the used word."
+  :group 'fuel-xref
+  :type 'boolean)
+
+(fuel-edit--define-custom-visit
+ fuel-xref-follow-link-method
+ fuel-xref
+ "How new buffers are opened when following a crossref link.")
+
+(fuel-font-lock--defface fuel-font-lock-xref-link
+  'link fuel-xref "highlighting links in cross-reference buffers")
+
+(fuel-font-lock--defface fuel-font-lock-xref-vocab
+  'italic fuel-xref "vocabulary names in cross-reference buffers")
+
+\f
+;;; Buttons:
+
+(define-button-type 'fuel-xref--button-type
+  'action 'fuel-xref--follow-link
+  'follow-link t
+  'face 'fuel-font-lock-xref-link)
+
+(defun fuel-xref--follow-link (button)
+  (let ((file (button-get button 'file))
+        (line (button-get button 'line)))
+    (when (not file)
+      (error "No file for this ref"))
+    (when (not (file-readable-p file))
+      (error "File '%s' is not readable" file))
+    (let ((word fuel-xref--word))
+      (fuel-edit--visit-file file fuel-xref-follow-link-method)
+      (when (numberp line) (goto-line line))
+      (when (and word fuel-xref-follow-link-to-word-p)
+        (and (re-search-forward (format "\\_<%s\\_>" word)
+                                (fuel-syntax--end-of-defun-pos)
+                                t)
+             (goto-char (match-beginning 0)))))))
+
+\f
+;;; The xref buffer:
+
+(fuel-popup--define fuel-xref--buffer
+  "*fuel xref*" 'fuel-xref-mode)
+
+(make-local-variable (defvar fuel-xref--word nil))
+
+(defvar fuel-xref--help-string
+  "(Press RET or click to follow crossrefs, or h for help on word at point)")
+
+(defun fuel-xref--title (word cc count thing)
+  (put-text-property 0 (length word) 'font-lock-face 'bold word)
+  (cond ((zerop count) (format "No known %s %s %s" thing cc word))
+        ((= 1 count) (format "1 %s %s %s:" thing cc word))
+        (t (format "%s %ss %s %s:" count thing cc word))))
+
+(defun fuel-xref--insert-ref (ref &optional no-vocab)
+  (when (and (stringp (first ref))
+             (stringp (third ref))
+             (numberp (fourth ref)))
+    (insert "  ")
+    (insert-text-button (first ref)
+                        :type 'fuel-xref--button-type
+                        'help-echo (format "File: %s (%s)"
+                                           (third ref)
+                                           (fourth ref))
+                        'file (third ref)
+                        'line (fourth ref))
+    (when (and (not no-vocab) (stringp (second ref)))
+      (insert (format " (in %s)" (second ref))))
+    (newline)
+    t))
+
+(defun fuel-xref--fill-buffer (word cc refs &optional no-vocab app thing)
+  (let ((inhibit-read-only t)
+        (count 0))
+    (with-current-buffer (fuel-xref--buffer)
+      (let ((start (if app (goto-char (point-max))
+                     (erase-buffer)
+                     (point-min))))
+        (dolist (ref refs)
+          (when (fuel-xref--insert-ref ref no-vocab) (setq count (1+ count))))
+        (newline)
+        (goto-char start)
+        (save-excursion
+          (insert (fuel-xref--title word cc count (or thing "word")) "\n\n"))
+        count))))
+
+(defun fuel-xref--fill-and-display (word cc refs &optional no-vocab thing)
+  (let ((count (fuel-xref--fill-buffer word cc refs no-vocab nil (or thing "word"))))
+    (if (zerop count)
+        (error (fuel-xref--title word cc 0 (or thing "word")))
+      (message "")
+      (fuel-popup--display (fuel-xref--buffer)))))
+
+(defun fuel-xref--callers (word)
+  (let ((cmd `(:fuel* (((:quote ,word) fuel-callers-xref)))))
+    (fuel-eval--retort-result (fuel-eval--send/wait cmd))))
+
+(defun fuel-xref--show-callers (word)
+  (let ((refs (fuel-xref--callers word)))
+    (with-current-buffer (fuel-xref--buffer) (setq fuel-xref--word word))
+    (fuel-xref--fill-and-display word "using" refs)))
+
+(defun fuel-xref--word-callers-files (word)
+  (mapcar 'third (fuel-xref--callers word)))
+
+(defun fuel-xref--show-callees (word)
+  (let* ((cmd `(:fuel* (((:quote ,word) fuel-callees-xref))))
+         (res (fuel-eval--retort-result (fuel-eval--send/wait cmd))))
+    (with-current-buffer (fuel-xref--buffer) (setq fuel-xref--word nil))
+    (fuel-xref--fill-and-display word "used by" res)))
+
+(defun fuel-xref--apropos (str)
+  (let* ((cmd `(:fuel* ((,str fuel-apropos-xref))))
+         (res (fuel-eval--retort-result (fuel-eval--send/wait cmd))))
+    (with-current-buffer (fuel-xref--buffer) (setq fuel-xref--word nil))
+    (fuel-xref--fill-and-display str "containing" res)))
+
+(defun fuel-xref--show-vocab (vocab &optional app)
+  (let* ((cmd `(:fuel* ((,vocab fuel-vocab-xref)) ,vocab))
+         (res (fuel-eval--retort-result (fuel-eval--send/wait cmd))))
+    (with-current-buffer (fuel-xref--buffer) (setq fuel-xref--word nil))
+    (fuel-xref--fill-buffer vocab "in vocabulary" res t app)))
+
+(defun fuel-xref--show-vocab-words (vocab &optional private)
+  (fuel-xref--show-vocab vocab)
+  (when private
+    (fuel-xref--show-vocab (format "%s.private" (substring-no-properties vocab))
+                           t))
+  (fuel-popup--display (fuel-xref--buffer))
+  (goto-char (point-min)))
+
+(defun fuel-xref--show-vocab-usage (vocab)
+  (let* ((cmd `(:fuel* ((,vocab fuel-vocab-usage-xref))))
+         (res (fuel-eval--retort-result (fuel-eval--send/wait cmd))))
+    (with-current-buffer (fuel-xref--buffer) (setq fuel-xref--word nil))
+    (fuel-xref--fill-and-display vocab "using" res t "vocab")))
+
+(defun fuel-xref--show-vocab-uses (vocab)
+  (let* ((cmd `(:fuel* ((,vocab fuel-vocab-uses-xref))))
+         (res (fuel-eval--retort-result (fuel-eval--send/wait cmd))))
+    (with-current-buffer (fuel-xref--buffer) (setq fuel-xref--word nil))
+    (fuel-xref--fill-and-display vocab "used by" res t "vocab")))
+
+\f
+;;; User commands:
+
+(defvar fuel-xref--word-history nil)
+
+(defun fuel-show-callers (&optional arg)
+  "Show a list of callers of word or vocabulary at point.
+With prefix argument, ask for word."
+  (interactive "P")
+  (let ((word (if arg (fuel-completion--read-word "Find callers for: "
+                                                  (fuel-syntax-symbol-at-point)
+                                                  fuel-xref--word-history)
+                (fuel-syntax-symbol-at-point))))
+    (when word
+      (message "Looking up %s's users ..." word)
+      (if (and (not arg)
+               (fuel-edit--looking-at-vocab))
+          (fuel-xref--show-vocab-usage word)
+        (fuel-xref--show-callers word)))))
+
+(defun fuel-show-callees (&optional arg)
+  "Show a list of callers of word or vocabulary at point.
+With prefix argument, ask for word."
+  (interactive "P")
+  (let ((word (if arg (fuel-completion--read-word "Find callees for: "
+                                                  (fuel-syntax-symbol-at-point)
+                                                  fuel-xref--word-history)
+                (fuel-syntax-symbol-at-point))))
+    (when word
+      (message "Looking up %s's callees ..." word)
+      (if (and (not arg)
+               (fuel-edit--looking-at-vocab))
+          (fuel-xref--show-vocab-uses word)
+        (fuel-xref--show-callees word)))))
+
+(defvar fuel-xref--vocab-history nil)
+
+(defun fuel-vocab-uses (&optional arg)
+  "Show a list of vocabularies used by a given one.
+With prefix argument, force reload of vocabulary list."
+  (interactive "P")
+  (let ((vocab (fuel-completion--read-vocab arg
+                                            (fuel-syntax-symbol-at-point)
+                                            fuel-xref--vocab-history)))
+    (fuel-xref--show-vocab-uses vocab)))
+
+(defun fuel-vocab-usage (&optional arg)
+  "Show a list of vocabularies that use a given one.
+With prefix argument, force reload of vocabulary list."
+  (interactive "P")
+  (let ((vocab (fuel-completion--read-vocab arg
+                                            (fuel-syntax-symbol-at-point)
+                                            fuel-xref--vocab-history)))
+    (fuel-xref--show-vocab-usage vocab)))
+
+(defun fuel-apropos (str)
+  "Show a list of words containing the given substring."
+  (interactive "MFind words containing: ")
+  (message "Looking up %s's references ..." str)
+  (fuel-xref--apropos str))
+
+(defun fuel-show-file-words (&optional arg)
+  "Show a list of words in current file.
+With prefix argument, ask for the vocab."
+  (interactive "P")
+  (let ((vocab (or (and (not arg) (fuel-syntax--current-vocab))
+                   (fuel-edit--read-vocabulary-name))))
+    (when vocab
+      (fuel-xref--show-vocab-words vocab
+                                   (fuel-syntax--file-has-private)))))
+
+
+\f
+;;; Xref mode:
+
+(defun fuel-xref-show-help ()
+  (interactive)
+  (let ((fuel-help-always-ask nil))
+    (fuel-help)))
+
+(defvar fuel-xref-mode-map
+  (let ((map (make-sparse-keymap)))
+    (suppress-keymap map)
+    (set-keymap-parent map button-buffer-map)
+    (define-key map "h" 'fuel-xref-show-help)
+    map))
+
+(defun fuel-xref-mode ()
+  "Mode for displaying FUEL cross-reference information.
+\\{fuel-xref-mode-map}"
+  (interactive)
+  (kill-all-local-variables)
+  (buffer-disable-undo)
+  (use-local-map fuel-xref-mode-map)
+  (set-syntax-table fuel-syntax--syntax-table)
+  (setq mode-name "FUEL Xref")
+  (setq major-mode 'fuel-xref-mode)
+  (font-lock-add-keywords nil '(("(in \\(.+\\))" 1 'fuel-font-lock-xref-vocab)))
+  (setq buffer-read-only t))
+
+\f
+(provide 'fuel-xref)
+;;; fuel-xref.el ends here
diff --git a/misc/vim/README b/misc/vim/README
new file mode 100644 (file)
index 0000000..bede151
--- /dev/null
@@ -0,0 +1,29 @@
+Vim support for Factor
+----------------------
+
+This directory contains various support files that make editing Factor code
+more pleasant in Vim. The file-layout exactly matches the Vim runtime
+structure, so you can install them by copying the contents of this directory
+into ~/.vim/ or the equivalent path on other platforms (Open Vim and type
+":help 'runtimepath'" for details).
+
+The current set of files is as follows:
+
+    ftdetect/factor.vim
+       Teach Vim when to load Factor support files.
+    ftplugin/factor_settings.vim
+       Teach Vim to follow the Factor Coding Style guidelines.
+    syntax/factor.vim
+        Syntax highlighting for Factor code.
+
+Note: The syntax-highlighting file is automatically generated to include the
+names of all the vocabularies Factor knows about. To regenerate it manually,
+run the following code in the listener:
+
+    USE: editors.vim.generate-syntax
+
+    generate-vim-syntax
+
+...or run it from the command-line:
+
+    factor -run=editors.vim.generate-syntax
diff --git a/misc/vim/ftdetect/factor.vim b/misc/vim/ftdetect/factor.vim
new file mode 100644 (file)
index 0000000..eb9c0de
--- /dev/null
@@ -0,0 +1 @@
+autocmd BufRead,BufNewFile *.factor,{,.}factor*-rc set filetype=factor
diff --git a/misc/vim/ftplugin/factor_settings.vim b/misc/vim/ftplugin/factor_settings.vim
new file mode 100644 (file)
index 0000000..ced9e85
--- /dev/null
@@ -0,0 +1,17 @@
+" Code formatting settings loosely adapted from:
+" http://concatenative.org/wiki/view/Factor/Coding%20Style
+
+" Tabs are not allowed in Factor source files; use four spaces instead.
+setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4
+
+" Try to limit lines to 64 characters, except for documentation, which can be
+" any length.
+if expand("%:t") !~ "-docs\.factor$"
+    setlocal textwidth=64
+
+    " Mark anything in column 64 or beyond as a syntax error.
+    match Error /\%>63v.\+/
+endif
+
+" Teach Vim what comments look like.
+setlocal comments+=b:!,b:#!
diff --git a/misc/vim/syntax/factor.vim b/misc/vim/syntax/factor.vim
new file mode 100644 (file)
index 0000000..90a3d46
--- /dev/null
@@ -0,0 +1,265 @@
+" Vim syntax file
+" Language:    factor
+" Maintainer:  Alex Chapman <chapman.alex@gmail.com>
+" Last Change: 2008 Apr 28
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+  syntax clear
+elseif exists("b:current_syntax")
+  finish
+endif
+
+" factor is case sensitive.
+syn case match
+
+" make all of these characters part of a word (useful for skipping over words with w, e, and b)
+if version >= 600
+    setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255
+else
+    set iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255
+endif
+
+syn cluster factorCluster contains=factorComment,factorKeyword,factorRepeat,factorConditional,factorBoolean,factorCompileDirective,factorString,factorSbuf,@factorNumber,@factorNumErr,factorDelimiter,factorChar,factorCharErr,factorBackslash,@factorWordOps,factorAlien,factorTuple
+
+syn match factorTodo /\(TODO\|FIXME\|XXX\):\=/ contained
+syn match factorComment /\<#! .*/ contains=factorTodo
+syn match factorComment /\<! .*/ contains=factorTodo
+
+syn cluster factorDefnContents contains=@factorCluster,factorStackEffect,factorArray0,factorQuotation0
+
+syn region factorDefn matchgroup=factorDefnDelims start=/\<\(MACRO\|MEMO\|:\)\?:\s\+\S\+\>/ end=/\<;\>/ contains=@factorDefnContents
+syn region factorMethod matchgroup=factorMethodDelims start=/\<M:\s\+\S\+\s\+\S\+\>/ end=/\<;\>/ contains=@factorDefnContents
+syn region factorGeneric matchgroup=factorGenericDelims start=/\<GENERIC:\s\+\S\+\>/ end=/$/ contains=factorStackEffect
+syn region factorGenericN matchgroup=factorGenericNDelims start=/\<GENERIC#\s\+\S\+\s\+\d\+\>/ end=/$/ contains=factorStackEffect
+
+syn region factorPrivateDefn matchgroup=factorPrivateDefnDelims start=/\<\(MACRO\|MEMO\|:\)\?:\s\+\S\+\>/ end=/\<;\>/ contains=@factorDefnContents contained
+syn region factorPrivateMethod matchgroup=factorPrivateMethodDelims start=/\<M:\s\+\S\+\s\+\S\+\>/ end=/\<;\>/ contains=@factorDefnContents contained
+syn region factorPGeneric matchgroup=factorPGenericDelims start=/\<GENERIC:\s\+\S\+\>/ end=/$/ contains=factorStackEffect contained
+syn region factorPGenericN matchgroup=factorPGenericNDelims start=/\<GENERIC#\s\+\S\+\s\+\d\+\>/ end=/$/ contains=factorStackEffect
+
+syn region None matchgroup=factorPrivate start=/\<<PRIVATE\>/ end=/\<PRIVATE>\>/ contains=@factorDefnContents,factorPrivateDefn,factorPrivateMethod,factorPGeneric,factorPGenericN
+
+
+syn keyword factorBoolean boolean f general-t t
+syn keyword factorCompileDirective inline foldable parsing
+
+
+
+" kernel vocab keywords
+syn keyword factorKeyword or construct-delegate set-slots tuck 2bi 2tri while wrapper nip bi* wrapper? hashcode callstack>array both? die set-delegate dupd callstack callstack? 3dup tri@ pick curry build prepose 3bi >boolean ?if clone eq? tri* ? = swapd call-clear 2over 2keep 3keep construct clear 2dup when not tuple? 3compose dup 2bi* call object bi@ wrapped unless* if* >r curry-quot drop when* retainstack -rot 2bi@ delegate boa with 3slip slip compose-first compose-second 3drop either? bi curry? datastack curry-obj over 3curry roll throw swap and 2nip set-retainstack (clone) hashcode* get-slots compose spin if 3tri unless compose? tuple keep 2curry equal? set-datastack 2slip tri 2drop most <wrapper> identity-tuple? null r> new set-callstack dip xor rot -roll identity-tuple 
+syn keyword factorKeyword assoc? assoc-clone-like delete-any assoc= delete-at* new-assoc subassoc? assoc-size map>assoc search-alist assoc-like key? assoc-intersect update assoc-union at* assoc-empty? at+ set-enum-seq set-at assoc-all? assoc-hashcode change-at assoc-each assoc-diff zip values value-at rename-at (assoc-stack) enum? at cache assoc>map assoc-contains? <enum> assoc assoc-map assoc-pusher (assoc>map) enum assoc-push-if remove-all >alist (substitute) substitute-here clear-assoc assoc-stack substitute assoc-filter delete-at assoc-find enum-seq keys 
+syn keyword factorKeyword case dispatch-case-quot with-datastack <buckets> no-cond no-case? 3cleave>quot (distribute-buckets) contiguous-range? 2cleave cond>quot no-cond? cleave>quot no-case recursive-hashcode case>quot 3cleave alist>quot dispatch-case hash-case-table hash-case-quot case-find cond cleave distribute-buckets 2cleave>quot linear-case-quot spread spread>quot hash-dispatch-quot 
+syn keyword factorKeyword byte-array>bignum sgn >bignum number= each-integer next-power-of-2 ?1+ imaginary-part mod recip float>bits rational >float number? 2^ bignum? integer fixnum? neg fixnum sq bignum (all-integers?) times denominator find-last-integer (each-integer) bit? * + power-of-2? - / >= bitand find-integer complex < real > log2 integer? number bits>double double>bits bitor 2/ zero? rem all-integers? (find-integer) real-part align bits>float float? shift float 1+ 1- fp-nan? ratio? bitxor even? ratio <= /mod >integer odd? rational? bitnot real? >fixnum complex? (next-power-of-2) /i numerator /f 
+syn keyword factorKeyword slice-to append left-trim find-last-from clone-like 3sequence map-as last-index-from reversed index-from pad-left cut* nth sequence slice? <slice> tail-slice empty? tail* find-from member? virtual-sequence? unclip set-length drop-prefix bounds-error? set-slice-seq map start open-slice midpoint@ set-immutable-seq move-forward rest-slice prepend fourth delete set-slice-to new-sequence follow all-eq? monotonic? set-reversed-seq like delete-nth first4 repetition-len (open-slice) reverse slice padding virtual@ repetition? index 4sequence max-length set-second first2 first3 (3append) supremum unclip-slice move-backward tail 3append sequence-hashcode-step right-trim reversed-seq pad-right suffix concat set-slice-from flip filter sum immutable? 2sequence delete-all start* immutable-sequence? (append) check-slice sequence? head set-slice-error-reason reduce set-bounds-error-index reverse-here sequence= halves collapse-slice interleave 2map binary-reduce virtual-seq slice-error? product bounds-check? bounds-check immutable find remove ((append)) set-fourth peek contains? reversed? shorter? push-new find-last head-slice pop* immutable-seq tail-slice* accumulate each pusher all-equal? new-resizable cut-slice head-slice* 2reverse-each pop memq? set-nth ?nth <flat-slice> second change-each join set-repetition-len <reversed> all? virtual-sequence set-repetition-elt subseq? immutable-sequence slice-error-reason new-like length last-index push-if 2all? lengthen joined-length copy set-bounds-error-seq cache-nth move third first slice-from repetition-elt tail? set-first prefix bounds-error bounds-error-seq bounds-error-index <repetition> unfold exchange slice-seq cut 2reduce change-nth min-length set-third (delete) push-all head? delete-slice rest sum-lengths 2each head* infimum sequence-hashcode slice-error subseq replace-slice repetition push trim mismatch 
+syn keyword factorKeyword global +@ set-namestack with-variable on set bind dec namestack get get-global change init-namespaces with-scope off set-global namespace % make , inc counter building make-assoc 
+syn keyword factorKeyword <array> 3array >array 4array pair? array pair 2array 1array resize-array array? 
+syn keyword factorKeyword readln stream-read-until stream-read-partial stderr with-stream read with-stream* print contents make-span-stream write1 stream-write1 stream-format make-block-stream stream-copy with-cell stream-write format with-row stream-print stream-read with-nesting (stream-copy) bl write-object nl stream-nl write stdio flush read-until tabular-output make-cell-stream write-cell stream-flush read1 lines stream-read1 stream-write-table with-style stream-readln 
+syn keyword factorKeyword resize-string >string <string> 1string string string? 
+syn keyword factorKeyword vector? <vector> ?push vector >vector 1vector 
+syn keyword factorKeyword rethrow-restarts restarts recover set-restart-name set-continuation-name condition-continuation <restart> ifcc continuation-name condition-error set-restart-continuation ignore-errors continuation-retain continue <continuation> restart-continuation with-disposal set-continuation-catch set-condition-error restart-obj error thread-error-hook set-continuation-retain continuation rethrow callcc1 callcc0 condition continuation? continuation-call continuation-data set-condition-restarts set-catchstack >continuation< error-continuation cleanup restart? compute-restarts condition? error-thread set-continuation-call set-condition-continuation <condition> set-restart-obj dispose set-continuation-data throw-restarts catchstack continue-with attempt-all restart restart-name continuation-catch condition-restarts 
+
+
+syn cluster factorReal   contains=factorInt,factorFloat,factorRatio,factorBinary,factorHex,factorOctal
+syn cluster factorNumber contains=@factorReal,factorComplex
+syn cluster factorNumErr contains=factorBinErr,factorHexErr,factorOctErr
+syn match   factorInt          /\<-\=\d\+\>/
+syn match   factorFloat                /\<-\=\d*\.\d\+\>/
+syn match   factorRatio                /\<-\=\d*\.*\d\+\/-\=\d*\.*\d\+\>/
+syn region  factorComplex      start=/\<C{\>/ end=/\<}\>/ contains=@factorReal
+syn match   factorBinErr        /\<BIN:\s\+[01]*[^\s01]\S*\>/
+syn match   factorBinary        /\<BIN:\s\+[01]\+\>/
+syn match   factorHexErr        /\<HEX:\s\+\x*[^\x\s]\S*\>/
+syn match   factorHex           /\<HEX:\s\+\x\+\>/
+syn match   factorOctErr        /\<OCT:\s\+\o*[^\o\s]\S*\>/
+syn match   factorOctal         /\<OCT:\s\+\o\+\>/
+
+syn match factorIn /\<IN:\s\+\S\+\>/
+syn match factorUse /\<USE:\s\+\S\+\>/
+
+syn match factorCharErr /\<CHAR:\s\+\S\+/
+syn match factorChar /\<CHAR:\s\+\\\=\S\>/
+
+syn match factorBackslash /\<\\\>\s\+\S\+\>/
+
+syn region factorUsing start=/\<USING:\>/ end=/;/
+syn region factorRequires start=/\<REQUIRES:\>/ end=/;/
+
+syn cluster factorWordOps contains=factorSymbol,factorPostpone,factorDefer,factorForget,factorMixin,factorInstance,factorHook,factorMain,factorConstructor
+syn match factorSymbol /\<SYMBOL:\s\+\S\+\>/
+syn match factorPostpone /\<POSTPONE:\s\+\S\+\>/
+syn match factorDefer /\<DEFER:\s\+\S\+\>/
+syn match factorForget /\<FORGET:\s\+\S\+\>/
+syn match factorMixin /\<MIXIN:\s\+\S\+\>/
+syn match factorInstance /\<INSTANCE:\s\+\S\+\s\+\S\+\>/
+syn match factorHook /\<HOOK:\s\+\S\+\s\+\S\+\>/
+syn match factorMain /\<MAIN:\s\+\S\+\>/
+syn match factorConstructor /\<C:\s\+\S\+\s\+\S\+\>/
+
+syn match factorAlien /\<ALIEN:\s\+\d\+\>/
+
+syn region factorTuple start=/\<TUPLE:\>/ end=/\<;\>/
+
+"TODO:
+"misc:
+" HELP:
+" ARTICLE:
+"literals:
+" PRIMITIVE:
+
+"C interface:
+" FIELD:
+" BEGIN-STRUCT:
+" C-ENUM:
+" FUNCTION:
+" END-STRUCT
+" DLL"
+" TYPEDEF:
+" LIBRARY:
+" C-UNION:
+
+syn region factorString start=/"/ skip=/\\"/ end=/"/ oneline
+syn region factorSbuf start=/SBUF" / skip=/\\"/ end=/"/ oneline
+
+syn region factorMultiString matchgroup=factorMultiStringDelims start=/\<STRING:\s\+\S\+\>/ end=/^;$/ contains=factorMultiStringContents
+syn match factorMultiStringContents /.*/ contained
+
+"syn match factorStackEffectErr /\<)\>/
+"syn region factorStackEffectErr start=/\<(\>/ end=/\<)\>/
+syn region factorStackEffect start=/\<(\>/ end=/\<)\>/ contained
+
+"adapted from lisp.vim
+if exists("g:factor_norainbow") 
+    syn region factorQuotation0 matchgroup=factorDelimiter start=/\<\'\?\[\>/ matchgroup=factorDelimiter end=/\<\]\>/ contains=ALL
+else
+    syn region factorQuotation0           matchgroup=hlLevel0 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation1,factorArray1
+    syn region factorQuotation1 contained matchgroup=hlLevel1 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation2,factorArray2
+    syn region factorQuotation2 contained matchgroup=hlLevel2 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation3,factorArray3
+    syn region factorQuotation3 contained matchgroup=hlLevel3 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation4,factorArray4
+    syn region factorQuotation4 contained matchgroup=hlLevel4 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation5,factorArray5
+    syn region factorQuotation5 contained matchgroup=hlLevel5 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation6,factorArray6
+    syn region factorQuotation6 contained matchgroup=hlLevel6 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation7,factorArray7
+    syn region factorQuotation7 contained matchgroup=hlLevel7 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation8,factorArray8
+    syn region factorQuotation8 contained matchgroup=hlLevel8 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation9,factorArray9
+    syn region factorQuotation9 contained matchgroup=hlLevel9 start=/\<\'\?\[\>/ end=/\<\]\>/ contains=@factorCluster,factorQuotation0,factorArray0
+endif
+
+if exists("g:factor_norainbow") 
+    syn region factorArray    matchgroup=factorDelimiter start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/  matchgroup=factorDelimiter end=/\<}\>/ contains=ALL
+else
+    syn region factorArray0           matchgroup=hlLevel0 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray1,factorQuotation1
+    syn region factorArray1 contained matchgroup=hlLevel1 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray2,factorQuotation2
+    syn region factorArray2 contained matchgroup=hlLevel2 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray3,factorQuotation3
+    syn region factorArray3 contained matchgroup=hlLevel3 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray4,factorQuotation4
+    syn region factorArray4 contained matchgroup=hlLevel4 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray5,factorQuotation5
+    syn region factorArray5 contained matchgroup=hlLevel5 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray6,factorQuotation6
+    syn region factorArray6 contained matchgroup=hlLevel6 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray7,factorQuotation7
+    syn region factorArray7 contained matchgroup=hlLevel7 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray8,factorQuotation8
+    syn region factorArray8 contained matchgroup=hlLevel8 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray9,factorQuotation9
+    syn region factorArray9 contained matchgroup=hlLevel9 start=/\<\(V\|H\|T\|W\|F\|B\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray0,factorQuotation0
+endif
+
+syn match factorBracketErr /\<\]\>/
+syn match factorBracketErr /\<}\>/
+
+syn sync lines=100
+
+if version >= 508 || !exists("did_factor_syn_inits")
+    if version <= 508
+       let did_factor_syn_inits = 1
+       command -nargs=+ HiLink hi link <args>
+    else
+       command -nargs=+ HiLink hi def link <args>
+    endif
+
+    HiLink factorComment       Comment
+    HiLink factorStackEffect   Typedef
+    HiLink factorTodo          Todo
+    HiLink factorInclude       Include
+    HiLink factorRepeat                Repeat
+    HiLink factorConditional   Conditional
+    HiLink factorKeyword       Keyword
+    HiLink factorOperator      Operator
+    HiLink factorBoolean       Boolean
+    HiLink factorDefnDelims    Typedef
+    HiLink factorMethodDelims  Typedef
+    HiLink factorGenericDelims        Typedef
+    HiLink factorGenericNDelims        Typedef
+    HiLink factorConstructor   Typedef
+    HiLink factorPrivate       Special
+    HiLink factorPrivateDefnDelims     Special
+    HiLink factorPrivateMethodDelims   Special
+    HiLink factorPGenericDelims        Special
+    HiLink factorPGenericNDelims        Special
+    HiLink factorString                String
+    HiLink factorSbuf          String
+    HiLink factorMultiStringContents           String
+    HiLink factorMultiStringDelims Typedef
+    HiLink factorBracketErr     Error
+    HiLink factorComplex       Number
+    HiLink factorRatio          Number
+    HiLink factorBinary         Number
+    HiLink factorBinErr         Error
+    HiLink factorHex            Number
+    HiLink factorHexErr         Error
+    HiLink factorOctal          Number
+    HiLink factorOctErr         Error
+    HiLink factorFloat         Float
+    HiLink factorInt           Number
+    HiLink factorUsing          Include
+    HiLink factorUse            Include
+    HiLink factorRequires       Include
+    HiLink factorIn             Define
+    HiLink factorChar           Character
+    HiLink factorCharErr        Error
+    HiLink factorDelimiter      Delimiter
+    HiLink factorBackslash      Special
+    HiLink factorCompileDirective Typedef
+    HiLink factorSymbol         Define
+    HiLink factorMixin         Typedef
+    HiLink factorInstance         Typedef
+    HiLink factorHook         Typedef
+    HiLink factorMain         Define
+    HiLink factorPostpone       Define
+    HiLink factorDefer          Define
+    HiLink factorForget         Define
+    HiLink factorAlien          Define
+    HiLink factorTuple          Typedef
+
+    if &bg == "dark"
+       hi   hlLevel0 ctermfg=red         guifg=red1
+       hi   hlLevel1 ctermfg=yellow      guifg=orange1
+       hi   hlLevel2 ctermfg=green       guifg=yellow1
+       hi   hlLevel3 ctermfg=cyan        guifg=greenyellow
+       hi   hlLevel4 ctermfg=magenta     guifg=green1
+       hi   hlLevel5 ctermfg=red         guifg=springgreen1
+       hi   hlLevel6 ctermfg=yellow      guifg=cyan1
+       hi   hlLevel7 ctermfg=green       guifg=slateblue1
+       hi   hlLevel8 ctermfg=cyan        guifg=magenta1
+       hi   hlLevel9 ctermfg=magenta     guifg=purple1
+    else
+       hi   hlLevel0 ctermfg=red         guifg=red3
+       hi   hlLevel1 ctermfg=darkyellow  guifg=orangered3
+       hi   hlLevel2 ctermfg=darkgreen   guifg=orange2
+       hi   hlLevel3 ctermfg=blue        guifg=yellow3
+       hi   hlLevel4 ctermfg=darkmagenta guifg=olivedrab4
+       hi   hlLevel5 ctermfg=red         guifg=green4
+       hi   hlLevel6 ctermfg=darkyellow  guifg=paleturquoise3
+       hi   hlLevel7 ctermfg=darkgreen   guifg=deepskyblue4
+       hi   hlLevel8 ctermfg=blue        guifg=darkslateblue
+       hi   hlLevel9 ctermfg=darkmagenta guifg=darkviolet
+    endif
+
+    delcommand HiLink
+endif
+
+let b:current_syntax = "factor"
+
+set sw=4
+set ts=4
+set expandtab
+set autoindent " annoying?
+
+" vim: syntax=vim
+
index 894948e44f9476dd3ce1177c688c34783223997c..90d4304eee1545837e91fcd008afb6a244be0548 100644 (file)
@@ -47,13 +47,13 @@ TUPLE: packet link id kind a1 a2 ;
 : HOLDBIT 4 ; inline
 
 : S_RUN 0 ;  inline
-: S_RUNPKT { PKTBIT } flags ; inline
-: S_WAIT { WAITBIT } flags ; inline
-: S_WAITPKT { WAITBIT PKTBIT } flags ; inline
-: S_HOLD { HOLDBIT } flags ; inline
-: S_HOLDPKT { HOLDBIT PKTBIT } flags ; inline
-: S_HOLDWAIT { HOLDBIT WAITBIT } flags ; inline
-: S_HOLDWAITPKT { HOLDBIT WAITBIT PKTBIT } flags ; inline
+: S_RUNPKT ( -- n ) { PKTBIT } flags ; inline
+: S_WAIT ( -- n ) { WAITBIT } flags ; inline
+: S_WAITPKT ( -- n ) { WAITBIT PKTBIT } flags ; inline
+: S_HOLD ( -- n ) { HOLDBIT } flags ; inline
+: S_HOLDPKT ( -- n ) { HOLDBIT PKTBIT } flags ; inline
+: S_HOLDWAIT ( -- n ) { HOLDBIT WAITBIT } flags ; inline
+: S_HOLDWAITPKT ( -- n ) { HOLDBIT WAITBIT PKTBIT } flags ; inline
 
 : task-tab-size 10 ; inline
 
diff --git a/unmaintained/4DNav/4DNav-docs.factor b/unmaintained/4DNav/4DNav-docs.factor
new file mode 100755 (executable)
index 0000000..d4bf1db
--- /dev/null
@@ -0,0 +1,400 @@
+! Copyright (C) 2008 Jean-François Bigot.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax kernel quotations strings ;
+IN: 4DNav
+
+HELP: (mvt-4D)
+{ $values
+     { "quot" quotation }
+}
+{ $description "" } ;
+
+HELP: 4D-Rxw
+{ $values
+     { "angle" null }
+     { "Rz" null }
+}
+{ $description "" } ;
+
+HELP: 4D-Rxy
+{ $values
+     { "angle" null }
+     { "Rx" null }
+}
+{ $description "" } ;
+
+HELP: 4D-Rxz
+{ $values
+     { "angle" null }
+     { "Ry" null }
+}
+{ $description "" } ;
+
+HELP: 4D-Ryw
+{ $values
+     { "angle" null }
+     { "Ry" null }
+}
+{ $description "" } ;
+
+HELP: 4D-Ryz
+{ $values
+     { "angle" null }
+     { "Rx" null }
+}
+{ $description "" } ;
+
+HELP: 4D-Rzw
+{ $values
+     { "angle" null }
+     { "Rz" null }
+}
+{ $description "" } ;
+
+HELP: 4DNav
+{ $description "" } ;
+
+HELP: >observer3d
+{ $values
+     { "value" null }
+}
+{ $description "" } ;
+
+HELP: >present-space
+{ $values
+     { "value" null }
+}
+{ $description "" } ;
+
+
+HELP: >view1
+{ $values
+     { "value" null }
+}
+{ $description "" } ;
+
+HELP: >view2
+{ $values
+     { "value" null }
+}
+{ $description "" } ;
+
+HELP: >view3
+{ $values
+     { "value" null }
+}
+{ $description "" } ;
+
+HELP: >view4
+{ $values
+     { "value" null }
+}
+{ $description "" } ;
+
+HELP: add-keyboard-delegate
+{ $values
+     { "obj" object }
+     { "obj" object }
+}
+{ $description "" } ;
+
+HELP: button*
+{ $values
+     { "string" string } { "quot" quotation }
+     { "button" null }
+}
+{ $description "" } ;
+
+HELP: camera-action
+{ $values
+     { "quot" quotation }
+     { "quot" quotation }
+}
+{ $description "" } ;
+
+HELP: camera-button
+{ $values
+     { "string" string } { "quot" quotation }
+     { "button" null }
+}
+{ $description "" } ;
+
+HELP: controller-window*
+{ $values
+     { "gadget" "a gadget" } 
+}
+{ $description "" } ;
+
+
+HELP: init-models
+{ $description "" } ;
+
+HELP: init-variables
+{ $description "" } ;
+
+HELP: menu-3D
+{ $values
+     { "gadget" null }
+}
+{ $description "The menu dedicated to 3D movements of the camera" } ;
+
+HELP: menu-4D
+{ $values
+    
+     { "gadget" null }
+}
+{ $description "The menu dedicated to 4D movements of space" } ;
+
+HELP: menu-bar
+{ $values
+    
+     { "gadget" null }
+}
+{ $description "return gadget containing menu buttons" } ;
+
+HELP: model-projection
+{ $values
+     { "x" null }
+     { "space" null }
+}
+{ $description "Project space following coordinate x" } ;
+
+HELP: mvt-3D-1
+{ $values
+    
+     { "quot" quotation }
+}
+{ $description "return a quotation to orientate space to see it from first point of view" } ;
+
+HELP: mvt-3D-2
+{ $values
+    
+     { "quot" quotation }
+}
+{ $description "return a quotation to orientate space to see it from second point of view" } ;
+
+HELP: mvt-3D-3
+{ $values
+    
+     { "quot" quotation }
+}
+{ $description "return a quotation to orientate space to see it from third point of view" } ;
+
+HELP: mvt-3D-4
+{ $values
+    
+     { "quot" quotation }
+}
+{ $description "return a quotation to orientate space to see it from first point of view" } ;
+
+HELP: observer3d
+{ $description "" } ;
+
+HELP: observer3d>
+{ $values
+    
+     { "value" null }
+}
+{ $description "" } ;
+
+HELP: present-space
+{ $description "" } ;
+
+HELP: present-space>
+{ $values
+    
+     { "value" null }
+}
+{ $description "" } ;
+
+HELP: load-model-file
+{ $description "load space from file" } ;
+
+HELP: rotation-4D
+{ $values
+     { "m" "a rotation matrix" }
+}
+{ $description "Apply a 4D rotation matrix" } ;
+
+HELP: translation-4D
+{ $values
+     { "v" null }
+}
+{ $description "" } ;
+
+HELP: update-model-projections
+{ $description "" } ;
+
+HELP: update-observer-projections
+{ $description "" } ;
+
+HELP: view1
+{ $description "" } ;
+
+HELP: view1>
+{ $values
+    
+     { "value" null }
+}
+{ $description "" } ;
+
+HELP: view2
+{ $description "" } ;
+
+HELP: view2>
+{ $values
+    
+     { "value" null }
+}
+{ $description "" } ;
+
+HELP: view3
+{ $description "" } ;
+
+HELP: view3>
+{ $values
+    
+     { "value" null }
+}
+{ $description "" } ;
+
+HELP: view4
+{ $description "" } ;
+
+HELP: view4>
+{ $values
+    
+     { "value" null }
+}
+{ $description "" } ;
+
+HELP: viewer-windows*
+{ $description "" } ;
+
+HELP: win3D
+{ $values
+     { "text" null } { "gadget" null }
+}
+{ $description "" } ;
+
+HELP: windows
+{ $description "" } ;
+
+ARTICLE: "Space file" "Create a new space file"
+"\nTo build a new space, create an XML file using " { $vocab-link "adsoda" } " model description. \nAn example is:"
+$nl
+
+"\n<model>"
+"\n<space>"
+"\n <dimension>4</dimension>"
+"\n <solid>"
+"\n     <name>4cube1</name>"
+"\n     <dimension>4</dimension>"
+"\n     <face>1,0,0,0,100</face>"
+"\n     <face>-1,0,0,0,-150</face>"
+"\n     <face>0,1,0,0,100</face>"
+"\n     <face>0,-1,0,0,-150</face>"
+"\n     <face>0,0,1,0,100</face>"
+"\n     <face>0,0,-1,0,-150</face>"
+"\n     <face>0,0,0,1,100</face>"
+"\n     <face>0,0,0,-1,-150</face>"
+"\n     <color>1,0,0</color>"
+"\n </solid>"
+"\n <solid>"
+"\n     <name>4triancube</name>"
+"\n     <dimension>4</dimension>"
+"\n     <face>1,0,0,0,160</face>"
+"\n     <face>-0.4999999999999998,-0.8660254037844387,0,0,-130</face>"
+"\n     <face>-0.5000000000000004,0.8660254037844384,0,0,-130</face>"
+"\n     <face>0,0,1,0,140</face>"
+"\n     <face>0,0,-1,0,-180</face>"
+"\n     <face>0,0,0,1,110</face>"
+"\n     <face>0,0,0,-1,-180</face>"
+"\n     <color>0,1,0</color>"
+"\n </solid>"
+"\n <solid>"
+"\n     <name>triangone</name>"
+"\n     <dimension>4</dimension>"
+"\n     <face>1,0,0,0,60</face>"
+"\n     <face>0.5,0.8660254037844386,0,0,60</face>"
+"\n     <face>-0.5,0.8660254037844387,0,0,-20</face>"
+"\n     <face>-1.0,0,0,0,-100</face>"
+"\n     <face>-0.5,-0.8660254037844384,0,0,-100</face>"
+"\n     <face>0.5,-0.8660254037844387,0,0,-20</face>"
+"\n     <face>0,0,1,0,120</face>"
+"\n     <face>0,0,-0.4999999999999998,-0.8660254037844387,-120</face>"
+"\n     <face>0,0,-0.5000000000000004,0.8660254037844384,-120</face>"
+"\n     <color>0,1,1</color>"
+"\n </solid>"
+"\n <light>"
+"\n     <direction>1,1,1,1</direction>"
+"\n     <color>0.2,0.2,0.6</color>"
+"\n </light>"
+"\n <color>0.8,0.9,0.9</color>"
+"\n</space>"
+"\n</model>"
+
+
+;
+
+ARTICLE: "TODO" "Todo"
+{ $list 
+    "A file chooser"
+    "A vocab to initialize parameters"
+    "an editor mode" 
+        { $list "add a face to a solid"
+                "add a solid to the space"
+                "move a face"
+                "move a solid"
+                "select a solid in a list"
+                "select a face"
+                "display selected face"
+                "edit a solid color"
+                "add a light"
+                "edit a light color"
+                "move a light"
+                }
+    "add a tool wich give an hyperplane normal vector with enought points. Will use adsoda.intersect-hyperplanes with { { 0 } { 0 } { 1 } } "
+    "decorrelate 3D camera and activate them with select buttons"
+
+
+
+} ;
+
+
+ARTICLE: "4DNav" "4DNav"
+{ $vocab-link "4DNav" }
+$nl
+{ $heading "4D Navigator" }
+"4DNav is a simple tool to visualize 4 dimensionnal objects."
+"\n"
+"It uses " { $vocab-link "adsoda" } " library to display a 4D space and navigate thru it."
+
+"It will display:"
+{ $list
+    { "a menu window" }
+    {  "4 visualization windows" }
+}
+"Each window represents the projection of the 4D space on a particular 3D space."
+$nl
+
+{ $heading "Initialization" }
+"put the space file " { $strong "space-exemple.xml" } "  in temp directory"
+" and then type:" { $code "\"4DNav\" run" } 
+{ $heading "Navigation" }
+"4D submenu move the space in translations and rotation."
+"\n3D submenu move the camera in 3D space. Cameras in every 3D spaces are manipulated as a single one"
+$nl
+
+
+
+
+{ $heading "Links" }
+{ $subsection "Space file" }
+
+{ $subsection "TODO" }
+
+
+;
+
+ABOUT: "4DNav"
diff --git a/unmaintained/4DNav/4DNav.factor b/unmaintained/4DNav/4DNav.factor
new file mode 100755 (executable)
index 0000000..3a0543d
--- /dev/null
@@ -0,0 +1,524 @@
+! Copyright (C) 2008 Jeff Bigot\r
+! See http://factorcode.org/license.txt for BSD license.\r
+USING: kernel \r
+namespaces\r
+accessors\r
+make\r
+math\r
+math.functions\r
+math.trig\r
+math.parser\r
+hashtables\r
+sequences\r
+combinators\r
+continuations\r
+colors\r
+prettyprint\r
+vars\r
+quotations\r
+io\r
+io.directories\r
+io.pathnames\r
+help.markup\r
+io.files\r
+ui.gadgets.panes\r
+ ui\r
+       ui.gadgets\r
+       ui.traverse\r
+       ui.gadgets.borders\r
+       ui.gadgets.handler\r
+       ui.gadgets.slate\r
+       ui.gadgets.theme\r
+       ui.gadgets.frames\r
+       ui.gadgets.tracks\r
+       ui.gadgets.labels\r
+       ui.gadgets.labelled       \r
+       ui.gadgets.lists\r
+       ui.gadgets.buttons\r
+       ui.gadgets.packs\r
+       ui.gadgets.grids\r
+       ui.gestures\r
+       ui.tools.workspace\r
+       ui.gadgets.scrollers\r
+splitting\r
+vectors\r
+math.vectors\r
+rewrite-closures\r
+self\r
+values\r
+4DNav.turtle\r
+4DNav.window3D\r
+4DNav.deep\r
+4DNav.space-file-decoder\r
+models\r
+fry\r
+adsoda\r
+adsoda.tools\r
+;\r
+\r
+IN: 4DNav\r
+VALUE: selected-file\r
+VALUE: translation-step\r
+VALUE: rotation-step\r
+\r
+3 to: translation-step \r
+5 to: rotation-step\r
+\r
+VAR: selected-file-model\r
+VAR: observer3d \r
+VAR: view1 \r
+VAR: view2\r
+VAR: view3\r
+VAR: view4\r
+VAR: present-space\r
+\r
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+\r
+! replacement of namespaces.lib\r
+    \r
+: make* ( seq -- seq ) [ dup quotation? [ call ] [ ] if ] map ;\r
+\r
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+! waiting for deep-cleave-quots\r
+\r
+: 4D-Rxy ( angle -- Rx ) deg>rad\r
+[ 1.0 , 0.0 , 0.0       , 0.0 ,\r
+  0.0 , 1.0 , 0.0       , 0.0 ,\r
+  0.0 , 0.0 , dup cos  , dup sin neg  ,\r
+  0.0 , 0.0 , dup sin  , dup cos  ,  ] 4 make-matrix nip ;\r
+\r
+: 4D-Rxz ( angle -- Ry ) deg>rad\r
+[ 1.0 , 0.0       , 0.0 , 0.0 ,\r
+  0.0 , dup cos  , 0.0 , dup sin neg  ,\r
+  0.0 , 0.0       , 1.0 , 0.0 ,\r
+  0.0 , dup sin  , 0.0 , dup cos  ,  ] 4 make-matrix nip ;\r
+\r
+: 4D-Rxw ( angle -- Rz ) deg>rad\r
+[ 1.0 , 0.0       , 0.0           , 0.0 ,\r
+  0.0 , dup cos  , dup sin neg  , 0.0 ,\r
+  0.0 , dup sin  , dup cos     , 0.0 ,\r
+  0.0 , 0.0       , 0.0           , 1.0 , ] 4 make-matrix nip ;\r
+\r
+: 4D-Ryz ( angle -- Rx ) deg>rad\r
+[ dup cos  , 0.0 , 0.0 , dup sin neg  ,\r
+  0.0       , 1.0 , 0.0 , 0.0 ,\r
+  0.0       , 0.0 , 1.0 , 0.0 ,\r
+  dup sin  , 0.0 , 0.0 , dup cos  ,   ] 4 make-matrix nip ;\r
+\r
+: 4D-Ryw ( angle -- Ry ) deg>rad\r
+[ dup cos  , 0.0 , dup sin neg  , 0.0 ,\r
+  0.0       , 1.0 , 0.0           , 0.0 ,\r
+  dup sin  , 0.0 , dup cos     , 0.0 ,\r
+  0.0       , 0.0 , 0.0           , 1.0 ,  ] 4 make-matrix nip ;\r
+\r
+: 4D-Rzw ( angle -- Rz ) deg>rad\r
+[ dup cos  , dup sin neg  , 0.0 , 0.0 ,\r
+  dup sin  , dup cos     , 0.0 , 0.0 ,\r
+  0.0       , 0.0           , 1.0 , 0.0 ,\r
+  0.0       , 0.0           , 0.0 , 1.0 ,  ] 4 make-matrix nip ;\r
+\r
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+! UI\r
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+\r
+: button* ( string quot -- button ) closed-quot <repeat-button>  ;\r
+\r
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+! \r
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+\r
+: model-projection-chooser ( -- gadget )\r
+   observer3d> projection-mode>>\r
+   { { 1 "perspective" } { 0 "orthogonal" }  } <toggle-buttons> ;\r
+\r
+: collision-detection-chooser ( -- gadget )\r
+   observer3d> collision-mode>>\r
+   { { t "on" } { f "off" }  } <toggle-buttons>\r
+;\r
+\r
+: model-projection ( x -- space ) present-space>  swap space-project ;\r
+\r
+: update-observer-projections (  -- )\r
+    view1> relayout-1 \r
+    view2> relayout-1 \r
+    view3> relayout-1 \r
+    view4> relayout-1 ;\r
+\r
+: update-model-projections (  -- )\r
+    0 model-projection <model> view1> (>>model)\r
+    1 model-projection <model> view2> (>>model)\r
+    2 model-projection <model> view3> (>>model)\r
+    3 model-projection <model> view4> (>>model) ;\r
+\r
+: camera-action ( quot -- quot ) \r
+    [ drop [ ] observer3d>  with-self update-observer-projections ] \r
+    make* closed-quot ;\r
+\r
+: win3D ( text gadget -- ) "navigateur 4D : " rot append open-window ;\r
+\r
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+! 4D object manipulation\r
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+\r
+: (mvt-4D) ( quot -- )   \r
+    present-space>  \r
+        swap call space-ensure-solids \r
+    >present-space \r
+    update-model-projections \r
+    update-observer-projections ;\r
+\r
+: rotation-4D ( m -- ) \r
+    '[ _ [ [ middle-of-space dup vneg ] keep swap space-translate ] dip\r
+         space-transform \r
+         swap space-translate\r
+    ] (mvt-4D) ;\r
+\r
+: translation-4D ( v -- ) '[ _ space-translate ] (mvt-4D) ;\r
+\r
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+! menu\r
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+\r
+: menu-rotations-4D ( -- gadget )\r
+    <frame>\r
+         <pile> 1 >>fill\r
+          "XY +" [ drop rotation-step 4D-Rxy rotation-4D ] button* add-gadget\r
+          "XY -" [ drop rotation-step neg 4D-Rxy rotation-4D ] button* add-gadget \r
+       @top-left grid-add    \r
+        <pile> 1 >>fill\r
+          "XZ +" [ drop rotation-step 4D-Rxz rotation-4D ] button* add-gadget\r
+          "XZ -" [ drop rotation-step neg 4D-Rxz rotation-4D ] button* add-gadget \r
+       @top grid-add    \r
+        <pile> 1 >>fill\r
+          "YZ +" [ drop rotation-step 4D-Ryz rotation-4D ] button* add-gadget\r
+          "YZ -" [ drop rotation-step neg 4D-Ryz rotation-4D ] button* add-gadget \r
+        @center grid-add\r
+         <pile> 1 >>fill\r
+          "XW +" [ drop rotation-step 4D-Rxw rotation-4D ] button* add-gadget\r
+          "XW -" [ drop rotation-step neg 4D-Rxw rotation-4D ] button* add-gadget \r
+        @top-right grid-add   \r
+         <pile> 1 >>fill\r
+          "YW +" [ drop rotation-step 4D-Ryw rotation-4D ] button* add-gadget\r
+          "YW -" [ drop rotation-step neg 4D-Ryw rotation-4D ] button* add-gadget \r
+       @right grid-add    \r
+         <pile> 1 >>fill\r
+          "ZW +" [ drop rotation-step 4D-Rzw rotation-4D ] button* add-gadget\r
+          "ZW -" [ drop rotation-step neg 4D-Rzw rotation-4D ] button* add-gadget \r
+       @bottom-right grid-add    \r
+;\r
+\r
+: menu-translations-4D ( -- gadget )\r
+    <frame> \r
+        <pile> 1 >>fill\r
+            <shelf> 1 >>fill  \r
+                "X+" [ drop {  1 0 0 0 } translation-step v*n translation-4D ] \r
+                    button* add-gadget\r
+                "X-" [ drop { -1 0 0 0 } translation-step v*n translation-4D ] \r
+                    button* add-gadget \r
+            add-gadget\r
+            "YZW" <label> add-gadget\r
+         @bottom-right grid-add\r
+         <pile> 1 >>fill\r
+            "XZW" <label> add-gadget\r
+            <shelf> 1 >>fill\r
+                "Y+" [ drop  { 0  1 0 0 } translation-step v*n translation-4D ] \r
+                    button* add-gadget\r
+                "Y-" [ drop  { 0 -1 0 0 } translation-step v*n translation-4D ] \r
+                    button* add-gadget \r
+                add-gadget\r
+         @top-right grid-add\r
+         <pile> 1 >>fill\r
+            "XYW" <label> add-gadget\r
+            <shelf> 1 >>fill\r
+                "Z+" [ drop { 0 0  1 0 } translation-step v*n translation-4D ] \r
+                    button* add-gadget\r
+                "Z-" [ drop { 0 0 -1 0 } translation-step v*n translation-4D ] \r
+                    button* add-gadget \r
+                add-gadget                 \r
+        @top-left grid-add     \r
+        <pile> 1 >>fill\r
+            <shelf> 1 >>fill\r
+                "W+" [ drop { 0 0 0 1  } translation-step v*n translation-4D ] \r
+                    button* add-gadget\r
+                "W-" [ drop { 0 0 0 -1 } translation-step v*n translation-4D ] \r
+                    button* add-gadget \r
+                add-gadget\r
+            "XYZ" <label> add-gadget\r
+        @bottom-left grid-add \r
+        "X" <label> @center grid-add\r
+;\r
+\r
+: menu-4D ( -- gadget )  \r
+    <shelf> \r
+        "rotations" <label>     add-gadget\r
+        menu-rotations-4D       add-gadget\r
+        "translations" <label>  add-gadget\r
+        menu-translations-4D    add-gadget\r
+        0.5 >>align\r
+        { 0 10 } >>gap\r
+;\r
+\r
+\r
+! ------------------------------------------------------\r
+\r
+: redraw-model ( space -- )\r
+    >present-space \r
+    update-model-projections \r
+    update-observer-projections ;\r
+\r
+: load-model-file ( -- )\r
+  selected-file dup selected-file-model> set-model read-model-file \r
+  redraw-model ;\r
+\r
+: mvt-3D-X ( turn pitch -- quot )\r
+    '[ turtle-pos> norm neg reset-turtle \r
+        _ turn-left \r
+        _ pitch-up \r
+        step-turtle ] ;\r
+\r
+: mvt-3D-1 ( -- quot )      90  0 mvt-3D-X ; inline\r
+: mvt-3D-2 ( -- quot )      0  90 mvt-3D-X ; inline\r
+: mvt-3D-3 ( -- quot )      0   0 mvt-3D-X ; inline\r
+: mvt-3D-4 ( -- quot )      45 45 mvt-3D-X ; inline\r
+\r
+: camera-button ( string quot -- button ) \r
+    [ <label>  ] dip camera-action <repeat-button> ;\r
+\r
+! ----------------------------------------------------------\r
+! file chooser\r
+! ----------------------------------------------------------\r
+: <run-file-button> ( file-name -- button )\r
+  dup '[ drop  _  \ selected-file set-value load-model-file \r
+   ] \r
+ closed-quot  <roll-button> { 0 0 } >>align ;\r
+\r
+: <list-runner> ( -- gadget )\r
+    "resource:extra/4DNav" \r
+  <pile> 1 >>fill \r
+    over dup directory-files  \r
+    [ ".xml" tail? ] filter \r
+    [ append-path ] with map\r
+    [ <run-file-button> add-gadget ] each\r
+    swap <labelled-gadget> ;\r
+\r
+! -----------------------------------------------------\r
+\r
+: menu-rotations-3D ( -- gadget )\r
+    <frame>\r
+        "Turn\n left"  [ rotation-step  turn-left  ] camera-button      \r
+            @left grid-add     \r
+        "Turn\n right" [ rotation-step turn-right ] camera-button      \r
+            @right grid-add     \r
+        "Pitch down"   [ rotation-step  pitch-down ] camera-button      \r
+            @bottom grid-add     \r
+        "Pitch up"     [ rotation-step  pitch-up   ] camera-button      \r
+            @top grid-add     \r
+        <shelf>  1 >>fill\r
+            "Roll left\n (ctl)"  [ rotation-step  roll-left  ] camera-button\r
+                add-gadget  \r
+            "Roll right\n(ctl)"  [ rotation-step  roll-right ] camera-button \r
+                add-gadget  \r
+        @center grid-add \r
+;\r
+\r
+: menu-translations-3D ( -- gadget )\r
+    <frame>\r
+        "left\n(alt)"          [ translation-step  strafe-left  ] camera-button\r
+            @left grid-add  \r
+        "right\n(alt)"         [ translation-step  strafe-right ] camera-button\r
+            @right grid-add     \r
+        "Strafe up \n (alt)"   [ translation-step strafe-up    ] camera-button\r
+            @top grid-add\r
+        "Strafe down \n (alt)" [ translation-step strafe-down  ] camera-button\r
+            @bottom grid-add    \r
+        <pile>  1 >>fill\r
+            "Forward (ctl)"  [  translation-step step-turtle ] camera-button\r
+                add-gadget\r
+            "Backward (ctl)" [ translation-step neg step-turtle ] camera-button\r
+                add-gadget\r
+        @center grid-add\r
+;\r
+\r
+: menu-quick-views ( -- gadget )\r
+    <shelf>\r
+        "View 1 (1)" mvt-3D-1 camera-button   add-gadget\r
+        "View 2 (2)" mvt-3D-2 camera-button   add-gadget\r
+        "View 3 (3)" mvt-3D-3 camera-button   add-gadget \r
+        "View 4 (4)" mvt-3D-4 camera-button   add-gadget \r
+;\r
+\r
+: menu-3D ( -- gadget ) \r
+    <pile>\r
+        <shelf>   \r
+            menu-rotations-3D    add-gadget\r
+            menu-translations-3D add-gadget\r
+            0.5 >>align\r
+            { 0 10 } >>gap\r
+        add-gadget\r
+        menu-quick-views add-gadget ; \r
+\r
+: add-keyboard-delegate ( obj -- obj )\r
+ <handler>\r
+{\r
+        { T{ key-down f f "LEFT" }  \r
+            [ [ rotation-step turn-left ] camera-action ] }\r
+        { T{ key-down f f "RIGHT" } \r
+            [ [ rotation-step turn-right ] camera-action ] }\r
+        { T{ key-down f f "UP" }    \r
+            [ [ rotation-step pitch-down ] camera-action ] }\r
+        { T{ key-down f f "DOWN" }  \r
+            [ [ rotation-step pitch-up ] camera-action ] }\r
+\r
+        { T{ key-down f { C+ } "UP" } \r
+            [ [ translation-step step-turtle ] camera-action ] }\r
+        { T{ key-down f { C+ } "DOWN" } \r
+            [ [ translation-step neg step-turtle ] camera-action ] }\r
+        { T{ key-down f { C+ } "LEFT" } \r
+            [ [ rotation-step roll-left ] camera-action ] }\r
+        { T{ key-down f { C+ } "RIGHT" } \r
+            [ [ rotation-step roll-right ] camera-action ] }\r
+\r
+        { T{ key-down f { A+ } "LEFT" }  \r
+            [ [ translation-step strafe-left ] camera-action ] }\r
+        { T{ key-down f { A+ } "RIGHT" } \r
+            [ [ translation-step strafe-right ] camera-action ] }\r
+        { T{ key-down f { A+ } "UP" }    \r
+            [ [ translation-step strafe-up ] camera-action ] }\r
+        { T{ key-down f { A+ } "DOWN" }  \r
+            [ [ translation-step strafe-down ] camera-action ] }\r
+\r
+\r
+        { T{ key-down f f "1" } [ mvt-3D-1 camera-action ] }\r
+        { T{ key-down f f "2" } [ mvt-3D-2 camera-action ] }\r
+        { T{ key-down f f "3" } [ mvt-3D-3  camera-action ] }\r
+        { T{ key-down f f "4" } [ mvt-3D-4  camera-action ] }\r
+\r
+    } [ make* ] map >hashtable >>table\r
+    ;    \r
+\r
+! --------------------------------------------\r
+! print elements \r
+! --------------------------------------------\r
+! print-content\r
+\r
+GENERIC: adsoda-display-model ( x -- ) \r
+\r
+M: light adsoda-display-model \r
+"\n light : " .\r
+     { \r
+        [ direction>> "direction : " pprint . ] \r
+        [ color>> "color : " pprint . ]\r
+    }   cleave\r
+    ;\r
+\r
+M: face adsoda-display-model \r
+     {\r
+        [ halfspace>> "halfspace : " pprint . ] \r
+        [ touching-corners>> "touching corners : " pprint . ]\r
+    }   cleave\r
+    ;\r
+M: solid adsoda-display-model \r
+     {\r
+        [ name>> "solid called : " pprint . ] \r
+        [ color>> "color : " pprint . ]\r
+        [ dimension>> "dimension : " pprint . ]\r
+        [ faces>> "composed of faces : " pprint [ adsoda-display-model ] each ]\r
+    }   cleave\r
+    ;\r
+M: space adsoda-display-model \r
+     {\r
+        [ dimension>> "dimension : " pprint . ] \r
+        [ ambient-color>> "ambient-color : " pprint . ]\r
+        [ solids>> "composed of solids : " pprint [ adsoda-display-model ] each ]\r
+        [ lights>> "composed of lights : " pprint [ adsoda-display-model ] each ] \r
+    }   cleave\r
+    ;\r
+\r
+! ----------------------------------------------\r
+: menu-bar ( -- gadget )\r
+       <shelf>\r
+             "reinit" [ drop load-model-file ] button* add-gadget\r
+             selected-file-model> <label-control> add-gadget\r
+    ;\r
+\r
+\r
+: controller-window* ( -- gadget )\r
+    { 0 1 } <track>\r
+        menu-bar f track-add\r
+        <list-runner>  \r
+            <limited-scroller>  \r
+            { 200 400 } >>max-dim\r
+        f track-add\r
+        <shelf>\r
+            "Projection mode : " <label> add-gadget\r
+            model-projection-chooser add-gadget\r
+        f track-add\r
+        <shelf>\r
+            "Collision detection (slow and buggy ) : " <label> add-gadget\r
+            collision-detection-chooser add-gadget\r
+        f track-add\r
+        <pile>\r
+            0.5 >>align    \r
+            menu-4D add-gadget \r
+            light-purple solid-interior\r
+            "4D movements" <labelled-gadget>\r
+        f track-add\r
+        <pile>\r
+            0.5 >>align\r
+            { 2 2 } >>gap\r
+            menu-3D add-gadget\r
+            light-purple solid-interior \r
+            "Camera 3D" <labelled-gadget>\r
+        f track-add      \r
+        gray solid-interior\r
+ ;\r
\r
+: viewer-windows* ( --  )\r
+    "YZW" view1> win3D \r
+    "XZW" view2> win3D \r
+    "XYW" view3> win3D \r
+    "XYZ" view4> win3D   \r
+;\r
+\r
+: navigator-window* ( -- )\r
+    controller-window*\r
+    viewer-windows*   \r
+    add-keyboard-delegate\r
+    "navigateur 4D" open-window\r
+;\r
+\r
+: windows ( -- ) [ [ navigator-window* ] with-scope ] with-ui ;\r
+\r
+\r
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+\r
+: init-variables ( -- )\r
+    "choose a file" <model> >selected-file-model  \r
+    <observer> >observer3d\r
+    [ observer3d> >self\r
+      reset-turtle \r
+      45 turn-left \r
+      45 pitch-up \r
+      -300 step-turtle \r
+    ] with-scope\r
+    \r
+;\r
+\r
+\r
+: init-models ( -- )\r
+    0 model-projection observer3d> <window3D> >view1\r
+    1 model-projection observer3d> <window3D> >view2\r
+    2 model-projection observer3d> <window3D> >view3\r
+    3 model-projection observer3d> <window3D> >view4\r
+;\r
+\r
+: 4DNav ( -- ) \r
+    init-variables\r
+    selected-file read-model-file >present-space\r
+    init-models\r
+    windows\r
+;\r
+\r
+MAIN: 4DNav\r
+\r
+\r
diff --git a/unmaintained/4DNav/authors.txt b/unmaintained/4DNav/authors.txt
new file mode 100755 (executable)
index 0000000..a6a9693
--- /dev/null
@@ -0,0 +1 @@
+Jeff Bigot
\ No newline at end of file
diff --git a/unmaintained/4DNav/camera/authors.txt b/unmaintained/4DNav/camera/authors.txt
new file mode 100755 (executable)
index 0000000..bbc876e
--- /dev/null
@@ -0,0 +1 @@
+Adam Wendt
diff --git a/unmaintained/4DNav/camera/camera-docs.factor b/unmaintained/4DNav/camera/camera-docs.factor
new file mode 100755 (executable)
index 0000000..422148a
--- /dev/null
@@ -0,0 +1,88 @@
+! Copyright (C) 2008 Jean-François Bigot.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax kernel ;
+IN: 4DNav.camera
+
+HELP: camera-eye
+{ $values
+    
+     { "point" null }
+}
+{ $description "return the position of the camera" } ;
+
+HELP: camera-focus
+{ $values
+    
+     { "point" null }
+}
+{ $description "return the point the camera looks at" } ;
+
+HELP: camera-up
+{ $values
+    
+     { "dirvec" null }
+}
+{ $description "In order to precise the roling position of camera give an upward vector" } ;
+
+HELP: do-look-at
+{ $values
+     { "camera" null }
+}
+{ $description "Word to use in replacement of gl-look-at when using a camera" } ;
+
+ARTICLE: "4DNav.camera" "4DNav.camera"
+{ $vocab-link "4DNav.camera" }
+"\n"
+"A camera is defined by:"
+{ $list
+{ "a position (" { $link camera-eye } ")" }
+{ "a focus direction (" { $link camera-focus } ")\n" }
+{ "an attitude information (" { $link camera-up } ")\n" }
+}
+"\nUse " { $link do-look-at } " in opengl statement in placement of gl-look-at"
+"\n\n"
+"A camera is a " { $vocab-link "4DNav.turtle" } " object. Its a special vocab to handle mouvements of a 3D object:"
+{ $list
+{ "To define a camera"
+{
+    $unchecked-example
+    
+"VAR: my-camera"
+": init-my-camera ( -- )"
+"    <turtle> >my-camera"
+"    [ my-camera> >self"
+"      reset-turtle "
+"    ] with-scope ;"
+} }
+{ "To move it"
+{
+    $unchecked-example
+
+"    [ my-camera> >self"
+"      45 pitch-up "
+"      5 step-turtle" 
+"    ] with-scope "
+} }
+{ "or"
+{
+    $unchecked-example
+
+"    [ my-camera> >self"
+"      5 strafe-left"
+"    ] with-scope "
+}
+}
+{
+"to use it in an opengl statement"
+{
+    $unchecked-example
+  "my-camera> do-look-at"
+
+}
+}
+}
+
+
+;
+
+ABOUT: "4DNav.camera"
diff --git a/unmaintained/4DNav/camera/camera.factor b/unmaintained/4DNav/camera/camera.factor
new file mode 100755 (executable)
index 0000000..93e8271
--- /dev/null
@@ -0,0 +1,15 @@
+USING: kernel namespaces math.vectors opengl 4DNav.turtle self ;
+
+IN: 4DNav.camera
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: camera-eye ( -- point ) turtle-pos> ;
+
+: camera-focus ( -- point ) [ 1 step-turtle turtle-pos> ] save-self ;
+
+: camera-up ( -- dirvec )
+[ 90 pitch-up turtle-pos> 1 step-turtle turtle-pos> swap v- ] save-self ;
+
+: do-look-at ( camera -- )
+[ >self camera-eye camera-focus camera-up gl-look-at ] with-scope ;
diff --git a/unmaintained/4DNav/deep/deep-docs.factor b/unmaintained/4DNav/deep/deep-docs.factor
new file mode 100755 (executable)
index 0000000..0332f77
--- /dev/null
@@ -0,0 +1,31 @@
+! Copyright (C) 2008 Jean-François Bigot.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax kernel quotations sequences ;
+IN: 4DNav.deep
+
+! HELP: deep-cleave-quots
+! { $values
+!     { "seq" sequence }
+!     { "quot" quotation }
+! }
+! { $description "A word to build a soquence from a sequence of quotation" }
+! 
+! { $examples
+! "It is useful to build matrix"
+! { $example "USING: math math.trig ; "
+!     " 30 deg>rad "
+!    "  {  { [ cos ] [ sin neg ]   0 } "
+!    "     { [ sin ] [ cos ]       0 } "
+!    "     {   0       0           1 } "
+!    "  } deep-cleave-quots " 
+!     " "
+! 
+! 
+! } }
+! ;
+
+ARTICLE: "4DNav.deep" "4DNav.deep"
+{ $vocab-link "4DNav.deep" }
+;
+
+ABOUT: "4DNav.deep"
diff --git a/unmaintained/4DNav/deep/deep.factor b/unmaintained/4DNav/deep/deep.factor
new file mode 100755 (executable)
index 0000000..65e1518
--- /dev/null
@@ -0,0 +1,11 @@
+USING: macros quotations math math.functions math.trig sequences.deep kernel make fry combinators grouping ;\r
+IN: 4DNav.deep\r
+\r
+! USING: bake ;\r
+! MACRO: deep-cleave-quots ( seq -- quot )\r
+!    [ [ quotation? ] deep-filter ]\r
+!    [ [ dup quotation? [ drop , ] when ] deep-map ]\r
+!    bi '[ _ cleave _ bake ] ;\r
+\r
+: make-matrix ( quot width -- matrix ) [ { } make ] dip group ; inline\r
+\r
diff --git a/unmaintained/4DNav/deploy.factor b/unmaintained/4DNav/deploy.factor
new file mode 100755 (executable)
index 0000000..e39f91a
--- /dev/null
@@ -0,0 +1,15 @@
+USING: tools.deploy.config ;
+H{
+    { deploy-c-types? t }
+    { deploy-word-props? t }
+    { deploy-name "4DNav" }
+    { deploy-ui? t }
+    { deploy-math? t }
+    { deploy-threads? t }
+    { deploy-reflection 3 }
+    { deploy-compiler? t }
+    { deploy-unicode? t }
+    { deploy-io 3 }
+    { "stop-after-last-window?" t }
+    { deploy-word-defs? t }
+}
diff --git a/unmaintained/4DNav/file-chooser/authors.txt b/unmaintained/4DNav/file-chooser/authors.txt
new file mode 100755 (executable)
index 0000000..a6a9693
--- /dev/null
@@ -0,0 +1 @@
+Jeff Bigot
\ No newline at end of file
diff --git a/unmaintained/4DNav/file-chooser/file-chooser.factor b/unmaintained/4DNav/file-chooser/file-chooser.factor
new file mode 100755 (executable)
index 0000000..2056b72
--- /dev/null
@@ -0,0 +1,144 @@
+! Copyright (C) 2008 Jeff Bigot\r
+! See http://factorcode.org/license.txt for BSD license.\r
+USING:\r
+kernel\r
+io.files\r
+io.backend\r
+io.directories\r
+io.files.info\r
+io.pathnames\r
+sequences\r
+models\r
+strings\r
+ui\r
+ui.operations\r
+ui.commands\r
+ui.gestures\r
+ui.gadgets\r
+ui.gadgets.buttons\r
+ui.gadgets.lists\r
+ui.gadgets.labels\r
+ui.gadgets.tracks\r
+ui.gadgets.packs\r
+ui.gadgets.panes\r
+ui.gadgets.scrollers\r
+prettyprint\r
+combinators\r
+rewrite-closures\r
+accessors\r
+values\r
+tools.walker\r
+fry\r
+;\r
+IN: 4DNav.file-chooser\r
+\r
+TUPLE: file-chooser < track \r
+    path\r
+    extension \r
+    selected-file\r
+    presenter\r
+    hook  \r
+    list\r
+    ;\r
+\r
+: find-file-list ( gadget -- list )\r
+    [ file-chooser? ] find-parent list>> ;\r
+\r
+file-chooser H{\r
+    { T{ key-down f f "UP" } [ find-file-list select-previous ] }\r
+    { T{ key-down f f "DOWN" } [ find-file-list select-next ] }\r
+    { T{ key-down f f "PAGE_UP" } [ find-file-list list-page-up ] }\r
+    { T{ key-down f f "PAGE_DOWN" } [ find-file-list list-page-down ] }\r
+    { T{ key-down f f "RET" } [ find-file-list invoke-value-action ] }\r
+    { T{ button-down } request-focus }\r
+    { T{ button-down f 1 } [ find-file-list invoke-value-action ]  }\r
+} set-gestures\r
+\r
+: list-of-files ( file-chooser -- seq )\r
+     [ path>> value>> directory-entries ] [ extension>> ] bi\r
+     '[ [ name>> _ [ tail? ] with contains? ] [ directory? ] bi or ]  filter\r
+;\r
+\r
+: update-filelist-model ( file-chooser -- file-chooser )\r
+    [ list-of-files ] [ model>> ] bi set-model ;\r
+\r
+: init-filelist-model ( file-chooser -- file-chooser )\r
+    dup list-of-files <model> >>model ; \r
+\r
+: (fc-go) ( file-chooser quot -- )\r
+    [ [ file-chooser? ] find-parent dup path>> ] dip\r
+    call\r
+    normalize-path swap set-model\r
+    update-filelist-model\r
+    drop ;\r
+\r
+: fc-go-parent ( file-chooser -- )\r
+    [ dup value>> parent-directory ] (fc-go) ;\r
+\r
+: fc-go-home ( file-chooser -- )\r
+    [ home ] (fc-go) ;\r
+\r
+: fc-change-directory ( file-chooser file -- file-chooser )\r
+    dupd [ path>> value>> normalize-path ] [ name>> ] bi* \r
+    append-path over path>> set-model    \r
+    update-filelist-model\r
+;\r
+\r
+: fc-load-file ( file-chooser file -- )\r
+  dupd [ selected-file>> ] [ name>> ] bi* swap set-model \r
+  [ path>> value>> ] \r
+  [ selected-file>> value>> append ] \r
+  [ hook>> ] tri\r
+  call\r
+; inline\r
+\r
+! : fc-ok-action ( file-chooser -- quot )\r
+!  dup selected-file>> value>>  "" =\r
+!    [ drop [ drop ] ] [    \r
+!            [ path>> value>> ] \r
+!            [ selected-file>> value>> append ] \r
+!            [ hook>> prefix ] tri\r
+!        [ drop ] prepend\r
+!    ]  if ; \r
+\r
+: line-selected-action ( file-chooser -- )\r
+     dup list>> list-value\r
+     dup directory? \r
+     [ fc-change-directory ] [ fc-load-file ] if ;\r
+\r
+: present-dir-element ( element -- string )\r
+    [ name>> ] [ directory? ] bi   [ "-> " prepend ] when ;\r
+\r
+: <file-list> ( file-chooser -- list )\r
+  dup [ nip line-selected-action ] curry \r
+  [ present-dir-element ] rot model>> <list> ;\r
+\r
+: <file-chooser> ( hook path extension -- gadget )\r
+    { 0 1 } file-chooser new-track\r
+    swap >>extension\r
+    swap <model> >>path\r
+    "" <model> >>selected-file\r
+    swap >>hook\r
+    init-filelist-model\r
+    dup <file-list> >>list\r
+    "choose a file in directory " <label> f track-add\r
+    dup path>> <label-control> f track-add\r
+    dup extension>> ", " join "limited to : " prepend <label> f track-add\r
+    <shelf> \r
+        "selected file : " <label> add-gadget\r
+        over selected-file>> <label-control> add-gadget\r
+    f track-add\r
+    <shelf> \r
+        over [  swap fc-go-parent ] curry  "go up" swap <bevel-button> add-gadget\r
+        over [  swap fc-go-home ] curry  "go home" swap <bevel-button> add-gadget\r
+    !    over [ swap fc-ok-action ] curry "OK" swap <bevel-button> add-gadget\r
+    !    [ drop ]  "Cancel" swap <bevel-button> add-gadget\r
+    f track-add\r
+    dup list>> <scroller> 1 track-add\r
+;\r
+\r
+M: file-chooser pref-dim* drop { 400 200 } ;\r
+\r
+: file-chooser-window ( -- )\r
+[ . ] home { "xml" "txt" }   <file-chooser> "Choose a file" open-window ;\r
+\r
diff --git a/unmaintained/4DNav/hypercube.xml b/unmaintained/4DNav/hypercube.xml
new file mode 100755 (executable)
index 0000000..0d46e3b
--- /dev/null
@@ -0,0 +1,37 @@
+<model>\r
+<space>\r
+       <name>hypercube</name>\r
+       <dimension>4</dimension>\r
+       <solid>\r
+               <name>4cube1</name>\r
+               <dimension>4</dimension>\r
+               <face>1,0,0,0,100</face>\r
+               <face>-1,0,0,0,-150</face>\r
+               <face>0,1,0,0,100</face>\r
+               <face>0,-1,0,0,-150</face>\r
+               <face>0,0,1,0,100</face>\r
+               <face>0,0,-1,0,-150</face>\r
+               <face>0,0,0,1,100</face>\r
+               <face>0,0,0,-1,-150</face>\r
+               <color>1,0,0</color>\r
+       </solid>\r
+       <solid>\r
+               <name>4cube1</name>\r
+               <dimension>4</dimension>\r
+               <face>1,0,0,0,100</face>\r
+               <face>-1,0,0,0,-150</face>\r
+               <face>0,1,0,0,100</face>\r
+               <face>0,-1,0,0,-150</face>\r
+               <face>0,0,1,0,100</face>\r
+               <face>0,0,-1,0,-150</face>\r
+               <face>0,0,0,1,100</face>\r
+               <face>0,0,0,-1,-150</face>\r
+               <color>1,0,0</color>\r
+       </solid>\r
+       <light>\r
+               <direction>1,1,1,1</direction>\r
+               <color>0.2,0.2,0.6</color>\r
+       </light>\r
+       <color>0.8,0.9,0.9</color>\r
+</space>\r
+</model>\r
diff --git a/unmaintained/4DNav/light_test.xml b/unmaintained/4DNav/light_test.xml
new file mode 100755 (executable)
index 0000000..b7d750d
--- /dev/null
@@ -0,0 +1,62 @@
+<model>\r
+<space>\r
+       <name>multi solids</name>\r
+       <dimension>4</dimension>\r
+       <solid>\r
+               <name>4cube1</name>\r
+               <dimension>4</dimension>\r
+               <face>1,0,0,0,100</face>\r
+               <face>-1,0,0,0,-150</face>\r
+               <face>0,1,0,0,100</face>\r
+               <face>0,-1,0,0,-150</face>\r
+               <face>0,0,1,0,100</face>\r
+               <face>0,0,-1,0,-150</face>\r
+               <face>0,0,0,1,100</face>\r
+               <face>0,0,0,-1,-150</face>\r
+               <color>1,1,1</color>\r
+       </solid>\r
+       <solid>\r
+               <name>4triancube</name>\r
+               <dimension>4</dimension>\r
+               <face>1,0,0,0,160</face>\r
+               <face>-0.4999999999999998,-0.8660254037844387,0,0,-130</face>\r
+               <face>-0.5000000000000004,0.8660254037844384,0,0,-130</face>\r
+               <face>0,0,1,0,140</face>\r
+               <face>0,0,-1,0,-180</face>\r
+               <face>0,0,0,1,110</face>\r
+               <face>0,0,0,-1,-180</face>\r
+               <color>1,1,1</color>\r
+       </solid>\r
+       <solid>\r
+               <name>triangone</name>\r
+               <dimension>4</dimension>\r
+               <face>1,0,0,0,60</face>\r
+               <face>0.5,0.8660254037844386,0,0,60</face>\r
+               <face>-0.5,0.8660254037844387,0,0,-20</face>\r
+               <face>-1.0,0,0,0,-100</face>\r
+               <face>-0.5,-0.8660254037844384,0,0,-100</face>\r
+               <face>0.5,-0.8660254037844387,0,0,-20</face>\r
+               <face>0,0,1,0,120</face>\r
+               <face>0,0,-0.4999999999999998,-0.8660254037844387,-120</face>\r
+               <face>0,0,-0.5000000000000004,0.8660254037844384,-120</face>\r
+               <color>1,1,1</color>\r
+       </solid>\r
+       <light>\r
+               <direction>1,0,0,0</direction>\r
+               <color>0,0,0,0.6</color>\r
+       </light>\r
+       <light>\r
+               <direction>0,1,0,0</direction>\r
+               <color>0,0.6,0,0</color>\r
+       </light>\r
+       <light>\r
+               <direction>0,0,1,0</direction>\r
+               <color>0,0,0.6,0</color>\r
+       </light>\r
+       <light>\r
+               <direction>0,0,0,1</direction>\r
+               <color>0.6,0.6,0.6</color>\r
+       </light>\r
+       <color>0.99,0.99,0.99</color>\r
+</space>\r
+</model>\r
diff --git a/unmaintained/4DNav/multi solids.xml b/unmaintained/4DNav/multi solids.xml
new file mode 100755 (executable)
index 0000000..b401e98
--- /dev/null
@@ -0,0 +1,50 @@
+<model>\r
+<space>\r
+       <name>multi solids</name>\r
+       <dimension>4</dimension>\r
+       <solid>\r
+               <name>4cube1</name>\r
+               <dimension>4</dimension>\r
+               <face>1,0,0,0,100</face>\r
+               <face>-1,0,0,0,-150</face>\r
+               <face>0,1,0,0,100</face>\r
+               <face>0,-1,0,0,-150</face>\r
+               <face>0,0,1,0,100</face>\r
+               <face>0,0,-1,0,-150</face>\r
+               <face>0,0,0,1,100</face>\r
+               <face>0,0,0,-1,-150</face>\r
+               <color>1,0,0</color>\r
+       </solid>\r
+       <solid>\r
+               <name>4triancube</name>\r
+               <dimension>4</dimension>\r
+               <face>1,0,0,0,160</face>\r
+               <face>-0.4999999999999998,-0.8660254037844387,0,0,-130</face>\r
+               <face>-0.5000000000000004,0.8660254037844384,0,0,-130</face>\r
+               <face>0,0,1,0,140</face>\r
+               <face>0,0,-1,0,-180</face>\r
+               <face>0,0,0,1,110</face>\r
+               <face>0,0,0,-1,-180</face>\r
+               <color>0,1,0</color>\r
+       </solid>\r
+       <solid>\r
+               <name>triangone</name>\r
+               <dimension>4</dimension>\r
+               <face>1,0,0,0,60</face>\r
+               <face>0.5,0.8660254037844386,0,0,60</face>\r
+               <face>-0.5,0.8660254037844387,0,0,-20</face>\r
+               <face>-1.0,0,0,0,-100</face>\r
+               <face>-0.5,-0.8660254037844384,0,0,-100</face>\r
+               <face>0.5,-0.8660254037844387,0,0,-20</face>\r
+               <face>0,0,1,0,120</face>\r
+               <face>0,0,-0.4999999999999998,-0.8660254037844387,-120</face>\r
+               <face>0,0,-0.5000000000000004,0.8660254037844384,-120</face>\r
+               <color>0,1,1</color>\r
+       </solid>\r
+       <light>\r
+               <direction>1,1,1,1</direction>\r
+               <color>0.2,0.2,0.6</color>\r
+       </light>\r
+       <color>0.8,0.9,0.9</color>\r
+</space>\r
+</model>\r
diff --git a/unmaintained/4DNav/prismetriagone.xml b/unmaintained/4DNav/prismetriagone.xml
new file mode 100755 (executable)
index 0000000..cbdc071
--- /dev/null
@@ -0,0 +1,25 @@
+<model>\r
+<space>\r
+       <name>Prismetragone</name>              \r
+       <dimension>4</dimension>\r
+       <solid>\r
+               <name>triangone</name>\r
+               <dimension>4</dimension>\r
+               <face>1,0,0,0,60</face>\r
+               <face>0.5,0.8660254037844386,0,0,60</face>\r
+               <face>-0.5,0.8660254037844387,0,0,-20</face>\r
+               <face>-1.0,0,0,0,-100</face>\r
+               <face>-0.5,-0.8660254037844384,0,0,-100</face>\r
+               <face>0.5,-0.8660254037844387,0,0,-20</face>\r
+               <face>0,0,1,0,120</face>\r
+               <face>0,0,-0.4999999999999998,-0.8660254037844387,-120</face>\r
+               <face>0,0,-0.5000000000000004,0.8660254037844384,-120</face>\r
+               <color>0,1,1</color>\r
+       </solid>\r
+       <light>\r
+               <direction>1,1,1,1</direction>\r
+               <color>0.2,0.2,0.6</color>\r
+       </light>\r
+       <color>0.8,0.9,0.9</color>\r
+</space>\r
+</model>\r
diff --git a/unmaintained/4DNav/space-file-decoder/authors.txt b/unmaintained/4DNav/space-file-decoder/authors.txt
new file mode 100755 (executable)
index 0000000..a6a9693
--- /dev/null
@@ -0,0 +1 @@
+Jeff Bigot
\ No newline at end of file
diff --git a/unmaintained/4DNav/space-file-decoder/space-file-decoder-docs.factor b/unmaintained/4DNav/space-file-decoder/space-file-decoder-docs.factor
new file mode 100755 (executable)
index 0000000..ce66375
--- /dev/null
@@ -0,0 +1,31 @@
+! Copyright (C) 2008 Jean-François Bigot.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax kernel ;
+IN: 4DNav.space-file-decoder
+
+HELP: adsoda-read-model
+{ $values
+     { "tag" null }
+}
+{ $description "" } ;
+
+HELP: decode-number-array
+{ $values
+     { "x" null }
+     { "y" null }
+}
+{ $description "" } ;
+
+HELP: read-model-file
+{ $values
+    
+     { "path" "path to the file to read" }
+     { "x" null }
+}
+{ $description "" } ;
+
+ARTICLE: "4DNav.space-file-decoder" "4DNav.space-file-decoder"
+{ $vocab-link "4DNav.space-file-decoder" }
+;
+
+ABOUT: "4DNav.space-file-decoder"
diff --git a/unmaintained/4DNav/space-file-decoder/space-file-decoder.factor b/unmaintained/4DNav/space-file-decoder/space-file-decoder.factor
new file mode 100755 (executable)
index 0000000..8ef5c9e
--- /dev/null
@@ -0,0 +1,55 @@
+! Copyright (C) 2008 Jeff Bigot\r
+! See http://factorcode.org/license.txt for BSD license.\r
+USING: adsoda xml xml.utilities xml.dispatch accessors combinators\r
+sequences math.parser kernel splitting values continuations ;\r
+IN: 4DNav.space-file-decoder\r
+\r
+: decode-number-array ( x -- y )  "," split [ string>number ] map ;\r
+\r
+PROCESS: adsoda-read-model ( tag -- )\r
+\r
+TAG: dimension adsoda-read-model children>> first string>number ;\r
+TAG: direction adsoda-read-model children>> first decode-number-array ;\r
+TAG: color     adsoda-read-model children>> first decode-number-array ;\r
+TAG: name      adsoda-read-model children>> first ;\r
+TAG: face      adsoda-read-model children>> first decode-number-array ;\r
+\r
+TAG: solid adsoda-read-model \r
+    <solid> swap  \r
+    { \r
+        [ "dimension" tag-named adsoda-read-model >>dimension ] \r
+        [ "name"      tag-named adsoda-read-model >>name ] \r
+        [ "color"     tag-named adsoda-read-model >>color ] \r
+        [ "face"      tags-named [ adsoda-read-model cut-solid ] each ] \r
+    } cleave\r
+    ensure-adjacencies\r
+;\r
+\r
+TAG: light adsoda-read-model \r
+   <light> swap  \r
+    { \r
+        [ "direction" tag-named adsoda-read-model >>direction ] \r
+        [ "color"     tag-named adsoda-read-model >>color ] \r
+    } cleave\r
+;\r
+\r
+TAG: space adsoda-read-model \r
+    <space> swap  \r
+    { \r
+        [ "dimension" tag-named adsoda-read-model >>dimension ] \r
+        [ "name"      tag-named adsoda-read-model >>name ] \r
+        [ "color"     tag-named adsoda-read-model >>ambient-color ] \r
+        [ "solid"     tags-named [ adsoda-read-model suffix-solids ] each ] \r
+        [ "light"     tags-named [ adsoda-read-model suffix-lights ] each ]         \r
+    } cleave\r
+;\r
+\r
+: read-model-file ( path -- x )\r
+  dup\r
+  [\r
+    [ file>xml "space" tags-named first adsoda-read-model ] \r
+    [ drop <space> ] recover \r
+  ] [  drop <space> ] if \r
+\r
+;\r
+\r
diff --git a/unmaintained/4DNav/summary.txt b/unmaintained/4DNav/summary.txt
new file mode 100755 (executable)
index 0000000..5b5a452
--- /dev/null
@@ -0,0 +1 @@
+4DNav : simmple tool to navigate thru a 4D space view as projections on 4 3D spaces.
\ No newline at end of file
diff --git a/unmaintained/4DNav/tags.txt b/unmaintained/4DNav/tags.txt
new file mode 100755 (executable)
index 0000000..0c63a72
--- /dev/null
@@ -0,0 +1 @@
+4D viewer
\ No newline at end of file
diff --git a/unmaintained/4DNav/triancube.xml b/unmaintained/4DNav/triancube.xml
new file mode 100755 (executable)
index 0000000..8551bed
--- /dev/null
@@ -0,0 +1,23 @@
+<model>\r
+<space>\r
+       <name>triancube</name>          \r
+       <dimension>4</dimension>\r
+       <solid>\r
+               <name>triancube</name>\r
+               <dimension>4</dimension>\r
+               <face>1,0,0,0,160</face>\r
+               <face>-0.4999999999999998,-0.8660254037844387,0,0,-130</face>\r
+               <face>-0.5000000000000004,0.8660254037844384,0,0,-130</face>\r
+               <face>0,0,1,0,140</face>\r
+               <face>0,0,-1,0,-180</face>\r
+               <face>0,0,0,1,110</face>\r
+               <face>0,0,0,-1,-180</face>\r
+               <color>0,1,0</color>\r
+       </solid>\r
+       <light>\r
+               <direction>1,1,1,1</direction>\r
+               <color>0.2,0.2,0.6</color>\r
+       </light>\r
+       <color>0.8,0.9,0.9</color>\r
+</space>\r
+</model>\r
diff --git a/unmaintained/4DNav/turtle/authors.txt b/unmaintained/4DNav/turtle/authors.txt
new file mode 100755 (executable)
index 0000000..6cfd5da
--- /dev/null
@@ -0,0 +1 @@
+Eduardo Cavazos
diff --git a/unmaintained/4DNav/turtle/turtle-docs.factor b/unmaintained/4DNav/turtle/turtle-docs.factor
new file mode 100755 (executable)
index 0000000..e6f5797
--- /dev/null
@@ -0,0 +1,229 @@
+! Copyright (C) 2008 Jean-François Bigot.
+! See http://factorcode.org/license.txt for BSD license.
+USING: arrays help.markup help.syntax kernel sequences ;
+IN: 4DNav.turtle
+
+HELP: <turtle>
+{ $values
+    
+     { "turtle" null }
+}
+{ $description "" } ;
+
+HELP: >turtle-ori
+{ $values
+     { "val" null }
+}
+{ $description "" } ;
+
+HELP: >turtle-pos
+{ $values
+     { "val" null }
+}
+{ $description "" } ;
+
+HELP: Rx
+{ $values
+     { "angle" null }
+     { "Rz" null }
+}
+{ $description "" } ;
+
+HELP: Ry
+{ $values
+     { "angle" null }
+     { "Ry" null }
+}
+{ $description "" } ;
+
+HELP: Rz
+{ $values
+     { "angle" null }
+     { "Rx" null }
+}
+{ $description "" } ;
+
+HELP: V
+{ $values
+    
+     { "V" null }
+}
+{ $description "" } ;
+
+HELP: X
+{ $values
+    
+     { "3array" null }
+}
+{ $description "" } ;
+
+HELP: Y
+{ $values
+    
+     { "3array" null }
+}
+{ $description "" } ;
+
+HELP: Z
+{ $values
+    
+     { "3array" null }
+}
+{ $description "" } ;
+
+HELP: apply-rotation
+{ $values
+     { "rotation" null }
+}
+{ $description "" } ;
+
+HELP: distance
+{ $values
+     { "turtle" null } { "turtle" null }
+     { "n" null }
+}
+{ $description "" } ;
+
+HELP: move-by
+{ $values
+     { "point" null }
+}
+{ $description "" } ;
+
+HELP: pitch-down
+{ $values
+     { "angle" null }
+}
+{ $description "" } ;
+
+HELP: pitch-up
+{ $values
+     { "angle" null }
+}
+{ $description "" } ;
+
+HELP: reset-turtle
+{ $description "" } ;
+
+HELP: roll-left
+{ $values
+     { "angle" null }
+}
+{ $description "" } ;
+
+HELP: roll-right
+{ $values
+     { "angle" null }
+}
+{ $description "" } ;
+
+HELP: roll-until-horizontal
+{ $description "" } ;
+
+HELP: rotate-x
+{ $values
+     { "angle" null }
+}
+{ $description "" } ;
+
+HELP: rotate-y
+{ $values
+     { "angle" null }
+}
+{ $description "" } ;
+
+HELP: rotate-z
+{ $values
+     { "angle" null }
+}
+{ $description "" } ;
+
+HELP: set-X
+{ $values
+     { "seq" sequence }
+}
+{ $description "" } ;
+
+HELP: set-Y
+{ $values
+     { "seq" sequence }
+}
+{ $description "" } ;
+
+HELP: set-Z
+{ $values
+     { "seq" sequence }
+}
+{ $description "" } ;
+
+HELP: step-turtle
+{ $values
+     { "length" null }
+}
+{ $description "" } ;
+
+HELP: step-vector
+{ $values
+     { "length" null }
+     { "array" array }
+}
+{ $description "" } ;
+
+HELP: strafe-down
+{ $values
+     { "length" null }
+}
+{ $description "" } ;
+
+HELP: strafe-left
+{ $values
+     { "length" null }
+}
+{ $description "" } ;
+
+HELP: strafe-right
+{ $values
+     { "length" null }
+}
+{ $description "" } ;
+
+HELP: strafe-up
+{ $values
+     { "length" null }
+}
+{ $description "" } ;
+
+HELP: turn-left
+{ $values
+     { "angle" null }
+}
+{ $description "" } ;
+
+HELP: turn-right
+{ $values
+     { "angle" null }
+}
+{ $description "" } ;
+
+HELP: turtle
+{ $description "" } ;
+
+HELP: turtle-ori>
+{ $values
+    
+     { "val" null }
+}
+{ $description "" } ;
+
+HELP: turtle-pos>
+{ $values
+    
+     { "val" null }
+}
+{ $description "" } ;
+
+ARTICLE: "4DNav.turtle" "4DNav.turtle"
+{ $vocab-link "4DNav.turtle" }
+;
+
+ABOUT: "4DNav.turtle"
diff --git a/unmaintained/4DNav/turtle/turtle.factor b/unmaintained/4DNav/turtle/turtle.factor
new file mode 100755 (executable)
index 0000000..72a2e58
--- /dev/null
@@ -0,0 +1,152 @@
+USING: kernel math arrays math.vectors math.matrices
+namespaces make
+math.constants math.functions
+math.vectors
+splitting grouping self math.trig
+  sequences accessors 4DNav.deep models ;
+IN: 4DNav.turtle
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+TUPLE: turtle pos ori ;
+
+: <turtle> ( -- turtle )
+    turtle new
+    { 0 0 0 } clone >>pos
+    3 identity-matrix >>ori
+;
+
+
+TUPLE: observer < turtle projection-mode collision-mode ;
+
+: <observer> ( -- object ) 
+     observer new
+    0 <model> >>projection-mode 
+    f <model> >>collision-mode
+    ;
+
+
+: turtle-pos> ( -- val ) self> pos>> ;
+: >turtle-pos ( val -- ) self> (>>pos) ;
+
+: turtle-ori> ( -- val ) self> ori>> ;
+: >turtle-ori ( val -- ) self> (>>ori) ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+! These rotation matrices are from
+! `Computer Graphics: Principles and Practice'
+
+
+! waiting for deep-cleave-quots  
+
+! : Rz ( angle -- Rx ) deg>rad
+!    {   { [ cos ] [ sin neg ]   0 }
+!        { [ sin ] [ cos ]      0  }
+!        {   0       0           1 } 
+!    } deep-cleave-quots  ;
+
+! : Ry ( angle -- Ry ) deg>rad
+!    {   { [ cos ]      0 [ sin ] }
+!        {   0          1 0       }
+!        { [  sin neg ] 0 [ cos ] }
+!    } deep-cleave-quots  ;
+  
+! : Rx ( angle -- Rz ) deg>rad
+!   {   { 1     0        0        }
+!        { 0   [ cos ] [ sin neg ] }
+!        { 0   [ sin ] [ cos ]     }
+!    } deep-cleave-quots ;
+
+: Rz ( angle -- Rx ) deg>rad
+[ dup cos ,     dup sin neg ,   0 ,
+  dup sin ,     dup cos ,       0 ,
+  0 ,           0 ,             1 , ] 3 make-matrix nip ;
+
+: Ry ( angle -- Ry ) deg>rad
+[ dup cos ,     0 ,             dup sin ,
+  0 ,           1 ,             0 ,
+  dup sin neg , 0 ,             dup cos , ] 3 make-matrix nip ;
+
+: Rx ( angle -- Rz ) deg>rad
+[ 1 ,           0 ,             0 ,
+  0 ,           dup cos ,       dup sin neg ,
+  0 ,           dup sin ,       dup cos , ] 3 make-matrix nip ;
+
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: apply-rotation ( rotation -- ) turtle-ori> swap m. >turtle-ori ;
+
+: rotate-x ( angle -- ) Rx apply-rotation ;
+: rotate-y ( angle -- ) Ry apply-rotation ;
+: rotate-z ( angle -- ) Rz apply-rotation ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: pitch-up   ( angle -- ) neg rotate-x ;
+: pitch-down ( angle -- )     rotate-x ;
+
+: turn-left ( angle -- )      rotate-y ;
+: turn-right ( angle -- ) neg rotate-y ;
+
+: roll-left  ( angle -- ) neg rotate-z ;
+: roll-right ( angle -- )     rotate-z ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! roll-until-horizontal
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: V ( -- V ) { 0 1 0 } ;
+
+: X ( -- 3array ) turtle-ori> [ first  ] map ;
+: Y ( -- 3array ) turtle-ori> [ second ] map ;
+: Z ( -- 3array ) turtle-ori> [ third  ] map ;
+
+: set-X ( seq -- ) turtle-ori> [ set-first ] 2each ;
+: set-Y ( seq -- ) turtle-ori> [ set-second ] 2each ;
+: set-Z ( seq -- ) turtle-ori> [ set-third ] 2each ;
+
+: roll-until-horizontal ( -- )
+    V Z cross normalize set-X
+    Z X cross normalize set-Y ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: distance ( turtle turtle -- n ) pos>> swap pos>> v- [ sq ] map sum sqrt ;
+
+: move-by ( point -- ) turtle-pos> v+ >turtle-pos ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: reset-turtle ( -- ) 
+    { 0 0 0 } clone >turtle-pos 3 identity-matrix >turtle-ori ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: step-vector ( length -- array ) { 0 0 1 } n*v ;
+
+: step-turtle ( length -- ) 
+    step-vector turtle-ori> swap m.v turtle-pos> v+ >turtle-pos ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: strafe-up ( length -- )
+    90 pitch-up
+    step-turtle
+    90 pitch-down ;
+
+: strafe-down ( length -- )
+    90 pitch-down
+    step-turtle
+    90 pitch-up ;
+
+: strafe-left ( length -- )
+    90 turn-left
+    step-turtle
+    90 turn-right ;
+
+: strafe-right ( length -- )
+    90 turn-right
+    step-turtle
+    90 turn-left ;
diff --git a/unmaintained/4DNav/window3D/authors.txt b/unmaintained/4DNav/window3D/authors.txt
new file mode 100755 (executable)
index 0000000..a6a9693
--- /dev/null
@@ -0,0 +1 @@
+Jeff Bigot
\ No newline at end of file
diff --git a/unmaintained/4DNav/window3D/window3D-docs.factor b/unmaintained/4DNav/window3D/window3D-docs.factor
new file mode 100755 (executable)
index 0000000..d57df6a
--- /dev/null
@@ -0,0 +1,20 @@
+! Copyright (C) 2008 Jean-François Bigot.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax kernel ;
+IN: 4DNav.window3D
+
+HELP: <window3D>
+{ $values
+     { "model" null } { "observer" null }
+     { "gadget" null }
+}
+{ $description "" } ;
+
+HELP: window3D
+{ $description "" } ;
+
+ARTICLE: "4DNav.window3D" "4DNav.window3D"
+{ $vocab-link "4DNav.window3D" }
+;
+
+ABOUT: "4DNav.window3D"
diff --git a/unmaintained/4DNav/window3D/window3D.factor b/unmaintained/4DNav/window3D/window3D.factor
new file mode 100755 (executable)
index 0000000..6db5d7c
--- /dev/null
@@ -0,0 +1,82 @@
+! Copyright (C) 2008 Jeff Bigot\r
+! See http://factorcode.org/license.txt for BSD license.\r
+USING: kernel \r
+ui.gadgets\r
+ui.render\r
+opengl\r
+opengl.gl\r
+opengl.glu\r
+4DNav.camera\r
+4DNav.turtle\r
+math\r
+values\r
+alien.c-types\r
+accessors\r
+namespaces\r
+adsoda \r
+models\r
+accessors\r
+prettyprint\r
+;\r
+\r
+IN: 4DNav.window3D\r
+\r
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+! drawing functions \r
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+\r
+TUPLE: window3D  < gadget observer ; \r
+\r
+: <window3D>  ( model observer -- gadget )\r
+    window3D  new-gadget \r
+    swap 2dup \r
+    projection-mode>> add-connection\r
+    2dup \r
+    collision-mode>> add-connection\r
+    >>observer \r
+    swap <model> >>model \r
+    t >>root?\r
+;\r
+\r
+M: window3D pref-dim* ( gadget -- dim )  drop { 300 300 } ;\r
+\r
+M: window3D draw-gadget* ( gadget -- )\r
+\r
+    GL_PROJECTION glMatrixMode\r
+        glLoadIdentity\r
+        0.6 0.6 0.6 .9 glClearColor\r
+        dup observer>> projection-mode>> value>> 1 =    \r
+        [ 60.0 1.0 0.1 3000.0 gluPerspective ]\r
+        [ -400.0 400.0 -400.0 400.0 0.0 4000.0 glOrtho ] if\r
+        dup observer>> collision-mode>> value>> \r
+        \ remove-hidden-solids?   \r
+        set-value\r
+        dup  observer>> do-look-at\r
+        GL_MODELVIEW glMatrixMode\r
+            glLoadIdentity  \r
+            0.9 0.9 0.9 1.0 glClearColor\r
+            1.0 glClearDepth\r
+            GL_LINE_SMOOTH glEnable\r
+            GL_BLEND glEnable\r
+            GL_DEPTH_TEST glEnable       \r
+            GL_LEQUAL glDepthFunc\r
+            GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA glBlendFunc\r
+            GL_LINE_SMOOTH_HINT GL_NICEST glHint\r
+            1.25 glLineWidth\r
+            GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT bitor glClear\r
+            glLoadIdentity\r
+            GL_LIGHTING glEnable\r
+            GL_LIGHT0 glEnable\r
+            GL_COLOR_MATERIAL glEnable\r
+            GL_FRONT GL_AMBIENT_AND_DIFFUSE glColorMaterial\r
+            ! *************************\r
+            \r
+            model>> value>> \r
+            [ space->GL ] when*\r
+\r
+            ! *************************\r
+;\r
+\r
+M: window3D graft* drop ;\r
+\r
+M: window3D model-changed nip relayout ; \r
diff --git a/unmaintained/adsoda/adsoda-docs.factor b/unmaintained/adsoda/adsoda-docs.factor
new file mode 100755 (executable)
index 0000000..d90beb7
--- /dev/null
@@ -0,0 +1,300 @@
+! Copyright (C) 2008 Jeff Bigot\r
+! See http://factorcode.org/license.txt for BSD license.\r
+USING: help.markup help.syntax ;\r
+\r
+IN: adsoda\r
+\r
+\r
+\r
+! --------------------------------------------------------------\r
+! faces\r
+! --------------------------------------------------------------\r
+ARTICLE: "face-page" "face in ADSODA"\r
+"explanation of faces"\r
+$nl\r
+"link to functions"\r
+"what is an halfspace"\r
+"halfspace touching-corners adjacent-faces"\r
+"touching-corners list of pointers to the corners which touch this face\n"\r
+\r
+"adjacent-faces list of pointers to the faces which touch this face\n"\r
+{ $subsection face }\r
+{ $subsection <face> }\r
+"test relative position"\r
+{ $subsection point-inside-or-on-face? } \r
+{ $subsection point-inside-face? }\r
+"handling face"\r
+{ $subsection flip-face }\r
+{ $subsection face-translate  }\r
+{ $subsection  face-transform }\r
+\r
+;\r
+\r
+HELP: face\r
+{ $class-description "a face is defined by"\r
+{ $list "halfspace equation" }\r
+{ $list "list of touching corners" }\r
+{ $list "list of adjacent faces" }\r
+$nl\r
+"Touching corners and adjacent faces are defined by algorithm thanks to other faces of the solid"\r
+}\r
+\r
+\r
+;\r
+HELP: <face> \r
+{ $values { "v" "an halfspace equation" } { "tuple" "a face" }  }   ;\r
+HELP: flip-face \r
+{ $values { "face" "a face" } { "face" "flipped face" } }\r
+{ $description "change the orientation of a face" }\r
+;\r
+\r
+HELP: face-translate \r
+{ $values { "face" "a face" } { "v" "a vector" } }\r
+{ $description \r
+"translate a face following a vector"\r
+$nl\r
+"a translation of an halfspace doesn't change the normal vector. this word just compute the new constant term" }\r
+\r
\r
+ ;\r
+HELP: face-transform \r
+{ $values { "face" "a face" } { "m" "a transformation matrix" } }\r
+{ $description  "compute the transformation of a face using a transformation matrix" }\r
\r
+ ;\r
+! --------------------------------\r
+! solid\r
+! --------------------------------------------------------------\r
+ARTICLE: "solid-page" "solid in ADSODA"\r
+"explanation of solids"\r
+$nl\r
+"link to functions"\r
+{ $subsection solid }\r
+{ $subsection <solid> }\r
+"test relative position"\r
+{ $subsection point-inside-solid? }\r
+{ $subsection point-inside-or-on-solid? }\r
+"playing with faces and solids"\r
+{ $subsection add-face }\r
+{ $subsection cut-solid }\r
+{ $subsection slice-solid }\r
+"solid handling"\r
+{ $subsection solid-project }\r
+{ $subsection solid-translate }\r
+{ $subsection solid-transform }\r
+{ $subsection subtract }\r
+\r
+{ $subsection get-silhouette  }\r
+\r
+{ $subsection  solid= }\r
+\r
+\r
+;\r
+\r
+HELP: solid \r
+{ $class-description "dimension" $nl "silhouettes" $nl "faces" $nl "corners" $nl "adjacencies-valid" $nl "color" $nl "name" \r
+}\r
+;\r
+\r
+HELP: add-face \r
+{ $values { "solid" "a solid" } { "face" "a face" } }\r
+{ $description "reshape a solid with a face. The face truncate the solid." } ;\r
+\r
+HELP: cut-solid\r
+{ $values { "solid" "a solid" } { "halfspace" "an halfspace" } }\r
+{ $description "like add-face but just with halfspace equation" } ;\r
+\r
+HELP: slice-solid\r
+{ $values { "solid" "a solid" } { "face" "a face" } { "solid1" "the outer part of the former solid" } { "solid2" "the inner part of the former solid" } }\r
+{ $description "cut a solid into two parts. The face acts like a knife"\r
+}  ;\r
+\r
+\r
+HELP: solid-project\r
+{ $values { "lights" "lights" } { "ambient" "ambient" } { "solid" "solid" } { "solids" "projection of solid" } }\r
+{ $description "Project the solid using pv vector" \r
+$nl\r
+"TODO: explain how to use lights"\r
+} ;\r
+\r
+HELP: solid-translate \r
+{ $values { "solid" "a solid" } { "v" "translating vector" } }\r
+{ $description "Translate a solid using a vector" \r
+$nl\r
+"v and solid must have the same dimension "\r
+} ;\r
+\r
+HELP: solid-transform \r
+{ $values { "solid" "a solid" } { "m" "transformation matrix" } }\r
+{ $description "Transform a solid using a matrix"\r
+$nl\r
+"v and solid must have the same dimension "\r
+} ;\r
+\r
+HELP: subtract \r
+{ $values { "solid1" "initial shape" } { "solid2" "shape to remove" } { "solids" "resulting shape" } }\r
+{ $description  " " } ;\r
+\r
+\r
+! --------------------------------------------------------------\r
+! space \r
+! --------------------------------------------------------------\r
+ARTICLE: "space-page" "space in ADSODA"\r
+"A space is a collection of solids and lights."\r
+$nl\r
+"link to functions"\r
+$nl\r
+"Defining words"\r
+{ $subsection space }\r
+{ $subsection <space> } \r
+{ $subsection suffix-solids  }\r
+{ $subsection suffix-lights }\r
+{ $subsection clear-space-solids  }\r
+{ $subsection describe-space }\r
+\r
+\r
+"Handling space"\r
+{ $subsection space-ensure-solids }\r
+{ $subsection eliminate-empty-solids  }\r
+{ $subsection space-transform }\r
+{ $subsection space-translate }\r
+{ $subsection remove-hidden-solids }\r
+{ $subsection space-project }\r
+\r
+\r
+;\r
+\r
+HELP: space \r
+{ $class-description \r
+"dimension" $nl " solids" $nl " ambient-color" $nl "lights" \r
+}\r
+;\r
+\r
+HELP: suffix-solids \r
+"( space solid -- space )"\r
+{ $values { "space" "a space" } { "solid" "a solid to add" } }\r
+{ $description "Add solid to space definition" } ;\r
+\r
+HELP: suffix-lights \r
+"( space light -- space ) "\r
+{ $values { "space" "a space" } { "light" "a light to add" } }\r
+{ $description "Add a light to space definition" } ;\r
+\r
+HELP: clear-space-solids \r
+"( space -- space )"   \r
+{ $values { "space" "a space" } }\r
+{ $description "remove all solids in space" } ;\r
+\r
+HELP: space-ensure-solids \r
+{ $values { "space" "a space" } }\r
+{ $description "rebuild corners of all solids in space" } ;\r
+\r
+\r
+\r
+HELP: space-transform \r
+" ( space m -- space )" \r
+{ $values { "space" "a space" } { "m" "a matrix" } }\r
+{ $description "Transform a space using a matrix" } ;\r
+\r
+HELP: space-translate \r
+{ $values { "space" "a space" } { "v" "a vector" } }\r
+{ $description "Translate a space following a vector" } ;\r
+\r
+HELP: describe-space " ( space -- )"\r
+{ $values { "space" "a space" } }\r
+{ $description "return a description of space" } ;\r
+\r
+HELP: space-project \r
+{ $values { "space" "a space" } { "i" "an integer" } }\r
+{ $description "Project a space along ith coordinate" } ;\r
+\r
+! --------------------------------------------------------------\r
+! 3D rendering\r
+! --------------------------------------------------------------\r
+ARTICLE: "3D-rendering-page" "3D rendering in ADSODA"\r
+"explanation of 3D rendering"\r
+$nl\r
+"link to functions"\r
+{ $subsection face->GL }\r
+{ $subsection solid->GL }\r
+{ $subsection space->GL }\r
+\r
+;\r
+\r
+HELP: face->GL \r
+{ $values { "face" "a face" } { "color" "3 3 values array" } }\r
+{ $description "" } ;\r
+\r
+HELP: solid->GL \r
+{ $values { "solid" "a solid" } }\r
+{ $description "" } ;\r
+\r
+HELP: space->GL \r
+{ $values { "space" "a space" } }\r
+{ $description "" } ;\r
+\r
+! --------------------------------------------------------------\r
+! light\r
+! --------------------------------------------------------------\r
+\r
+ARTICLE: "light-page" "light in ADSODA"\r
+"explanation of light"\r
+$nl\r
+"link to functions"\r
+;\r
+\r
+ARTICLE: { "adsoda" "light" } "ADSODA : lights"\r
+"! HELP: light position color" \r
+"! <light> ( -- tuple ) light new ;"\r
+\r
+"! light est un vecteur avec 3 variables pour les couleurs\n"\r
+\r
+" void Light::Apply(Vector& normal, double &cRed, double &cGreen, double &cBlue)\n"\r
+" { \n"\r
+"   // Dot the light direction with the normalized normal of Face."\r
+"   register double intensity = -(normal * (*this));"\r
+\r
+"   // Face is a backface, from light's perspective"\r
+"   if (intensity < 0)"\r
+"     return;"\r
+"   "\r
+"   // Add the intensity componentwise"\r
+"   cRed += red * intensity;"\r
+"   cGreen += green * intensity;"\r
+"   cBlue += blue * intensity;"\r
+\r
+"   // Clip to unit range"\r
+"  if (cRed > 1.0) cRed = 1.0;"\r
+"   if (cGreen > 1.0) cGreen = 1.0;"\r
+"   if (cBlue > 1.0) cBlue = 1.0;"\r
+\r
+\r
+;\r
+\r
+\r
+\r
+ARTICLE: { "adsoda" "halfspace" } "ADSODA : halfspace"\r
+"! demi espace défini par un vecteur normal et une constante"\r
+" defined by the concatenation of the normal vector and a constant"  \r
+ ;\r
+\r
+\r
+\r
+ARTICLE:  "adsoda-main-page"  "ADSODA : Arbitrary-Dimensional Solid Object Display Algorithm"\r
+"multidimensional handler :" \r
+$nl\r
+"design a solid using face delimitations. Only works on convex shapes"\r
+$nl\r
+{ $emphasis "written in C++ by Greg Ferrar" }\r
+$nl\r
+"full explanation on adsoda page at " { $url "http://www.flowerfire.com/ADSODA/" }\r
+$nl\r
+"Useful words are describe on the following pages: "\r
+{ $subsection "face-page" }\r
+{ $subsection "solid-page" }\r
+{ $subsection "space-page" }\r
+{ $subsection "light-page" }\r
+{ $subsection "3D-rendering-page" }\r
+ ;\r
+\r
+ABOUT: "adsoda-main-page"\r
diff --git a/unmaintained/adsoda/adsoda-tests.factor b/unmaintained/adsoda/adsoda-tests.factor
new file mode 100755 (executable)
index 0000000..f8881df
--- /dev/null
@@ -0,0 +1,310 @@
+USING: adsoda\r
+kernel\r
+math\r
+accessors\r
+sequences\r
+    adsoda.solution2\r
+    fry\r
+    tools.test \r
+    arrays ;\r
+\r
+IN: adsoda.tests\r
+\r
+\r
+\r
+: s1 ( -- solid )\r
+    <solid> \r
+    2 >>dimension\r
+    "s1" >>name\r
+    { 1 1 1 } >>color\r
+    { 1 -1 -5 } cut-solid \r
+    { -1 -1 -21 } cut-solid \r
+    { -1 0 -12 } cut-solid \r
+    { 1 2 16 } cut-solid\r
+;\r
+: solid1 ( -- solid )\r
+    <solid> \r
+    2 >>dimension\r
+    "solid1" >>name\r
+    { 1 -1 -5 } cut-solid \r
+    { -1 -1 -21 } cut-solid \r
+    { -1 0 -12 } cut-solid \r
+    { 1 2 16 } cut-solid\r
+    ensure-adjacencies\r
+    \r
+;\r
+: solid2 ( -- solid )\r
+    <solid> \r
+    2 >>dimension\r
+    "solid2" >>name\r
+    { -1 1 -10 } cut-solid \r
+    { -1 -1 -28 } cut-solid \r
+    { 1 0 13 } cut-solid \r
+ !   { 1 2 16 } cut-solid\r
+    ensure-adjacencies\r
+    \r
+;\r
+\r
+: solid3 ( -- solid )\r
+      <solid> \r
+    2 >>dimension\r
+    "solid3" >>name\r
+    { 1 1 1 } >>color\r
+    { 1 0 16 } cut-solid \r
+    { -1 0 -36 } cut-solid \r
+    { 0 1 1 } cut-solid \r
+    { 0 -1  -17 } cut-solid \r
+ !   { 1 2 16 } cut-solid\r
+    ensure-adjacencies\r
+    \r
+\r
+;\r
+\r
+: solid4 ( -- solid )\r
+      <solid> \r
+    2 >>dimension\r
+    "solid4" >>name\r
+    { 1 1 1 } >>color\r
+    { 1 0 21 } cut-solid \r
+    { -1 0 -36 } cut-solid \r
+    { 0 1 1 } cut-solid \r
+    { 0 -1  -17 } cut-solid \r
+    ensure-adjacencies\r
+    \r
+;\r
+\r
+: solid5 ( -- solid )\r
+      <solid> \r
+    2 >>dimension\r
+    "solid5" >>name\r
+    { 1 1 1 } >>color\r
+    { 1 0 6 } cut-solid \r
+    { -1 0 -17 } cut-solid \r
+    { 0 1 17 } cut-solid \r
+    { 0 -1  -19 } cut-solid \r
+    ensure-adjacencies\r
+    \r
+;\r
+\r
+: solid7 ( -- solid )\r
+      <solid> \r
+    2 >>dimension\r
+    "solid7" >>name\r
+    { 1 1 1 } >>color\r
+    { 1 0 38 } cut-solid \r
+    { 1 -5 -66 } cut-solid \r
+    { -2 1 -75 } cut-solid\r
+    ensure-adjacencies\r
+    \r
+;\r
+\r
+: solid6s ( -- seq )\r
+  solid3 clone solid2 clone subtract\r
+;\r
+\r
+: space1 ( -- space )\r
+    <space>\r
+        2 >>dimension\r
+     !    solid3 suffix-solids\r
+        solid1 suffix-solids\r
+        solid2 suffix-solids\r
+    !   solid6s [ suffix-solids ] each \r
+        solid4 suffix-solids\r
+     !   solid5 suffix-solids\r
+        solid7 suffix-solids\r
+        { 1 1 1 } >>ambient-color\r
+            <light>\r
+        { -100 -100 } >>position\r
+        { 0.2 0.7 0.1 } >>color\r
+        suffix-lights\r
+;\r
+\r
+: space2 ( -- space )\r
+    <space>\r
+        4 >>dimension\r
+       ! 4cube suffix-solids\r
+        { 1 1 1 } >>ambient-color\r
+            <light>\r
+        { -100 -100 } >>position\r
+        { 0.2 0.7 0.1 } >>color\r
+        suffix-lights\r
+\r
+       ;\r
+\r
+\r
+\r
+! {\r
+!        { 1 0 0 0 }\r
+!        { 0 1 0 0 }\r
+!        { 0 0 0.984807753012208 -0.1736481776669303 }\r
+!        { 0 0 0.1736481776669303 0.984807753012208 }\r
+!    }\r
+\r
+! ------------------------------------------------------------\r
+! constant+\r
+[ { 1 2 5 } ] [ { 1 2 3 } 2 constant+ ] unit-test\r
+\r
+! ------------------------------------------------------------\r
+! translate\r
+[ { 1 -1 0 } ] [ { 1 -1 -5 } { 3 -2 } translate ] unit-test\r
+\r
+! ------------------------------------------------------------\r
+! transform\r
+[ { -1 -1 -5 21.0 } ] [ { -1 -1 -5 21 }\r
+  { { 1 0 0 }\r
+    { 0 1 0 }\r
+    { 0 0 1 }\r
+    } transform  \r
+] unit-test\r
+\r
+! ------------------------------------------------------------\r
+! compare-nleft-to-identity-matrix\r
+[ t ] [ \r
+    { \r
+        { 1 0 0 1232 } \r
+        { 0 1 0 0 321 } \r
+        { 0 0 1 0 } } \r
+        3 compare-nleft-to-identity-matrix \r
+]  unit-test\r
+\r
+[ f ] [ \r
+    { { 1 0 0 } { 0 1 0 } { 0 0 0 } } \r
+    3 compare-nleft-to-identity-matrix \r
+] unit-test\r
+\r
+[ f ] [ \r
+    { { 2 0 0 } { 0 1 0 } { 0 0 1 } } \r
+    3 compare-nleft-to-identity-matrix \r
+] unit-test\r
+! ------------------------------------------------------------\r
+[ t ] [ \r
+  { { 1 0 0 }\r
+    { 0 1 0 }\r
+    { 0 0 1 } } 3 valid-solution? \r
+] unit-test\r
+\r
+[ f ] [ \r
+  { { 1 0 0 1 }\r
+    { 0 0 0 1 }\r
+    { 0 0 1 0 } } 3 valid-solution? \r
+] unit-test\r
+\r
+[ f ] [ \r
+  { { 1 0 0 1 }\r
+    { 0 0 0 1 } } 3 valid-solution? \r
+] unit-test\r
+\r
+[ f ] [ \r
+  { { 1 0 0 1 }\r
+    { 0 0 0 1 }\r
+    { 0 0 1 0 } } 2 valid-solution? \r
+] unit-test\r
+\r
+! ------------------------------------------------------------\r
+[ 3 ] [ { 1 2 3 } last ] unit-test \r
+\r
+[ { 1 2 5 } ] [ { 1 2 3 } dup [ 2 + ] change-last ] unit-test \r
+\r
+! ------------------------------------------------------------\r
+! position-point \r
+[ 0 ] [ \r
+    { 1 -1 -5 } { 2 7 } position-point \r
+] unit-test\r
+\r
+! ------------------------------------------------------------\r
+\r
+! transform\r
+! TODO construire un exemple\r
+\r
+\r
+! ------------------------------------------------------------\r
+! slice-solid \r
+\r
+! ------------------------------------------------------------\r
+! solve-equation \r
+! deux cas de tests, avec solution et sans solution\r
+\r
+[ { 2 7 } ] \r
+[ { { 1 -1 -5 } { 1 2 16 } } intersect-hyperplanes ] \r
+unit-test\r
+\r
+[ f ] \r
+[ { { 1 -1 -5 } { 1 2 16 } { -1 -1 -21 } } intersect-hyperplanes  ]\r
+unit-test\r
+\r
+[ f ] \r
+[ { { 1 0 -5 } { 1 0 16 }  } intersect-hyperplanes  ]\r
+unit-test\r
+\r
+! ------------------------------------------------------------\r
+! point-inside-halfspace\r
+[ t ] [ { 1 -1 -5 } { 0 0 }  point-inside-halfspace? ] \r
+unit-test\r
+[ f ] [ { 1 -1 -5 } { 8 13 }  point-inside-halfspace? ] \r
+unit-test\r
+[ t ] [ { 1 -1 -5 } { 8 13 }  point-inside-or-on-halfspace? ] \r
+unit-test\r
+\r
+\r
+! ------------------------------\r
+! order solid\r
+\r
+[  1 ] [ 0 >pv solid1 solid2 order-solid ] unit-test\r
+[ -1 ] [ 0 >pv solid2 solid1 order-solid ] unit-test\r
+[  f ] [ 1 >pv solid1 solid2 order-solid ] unit-test\r
+[  f ] [ 1 >pv solid2 solid1 order-solid ] unit-test\r
+\r
+\r
+! clip-solid\r
+[ { { 13 15 } { 15 13 } { 13 13 } } ]\r
+    [ 0 >pv solid2 solid1 clip-solid first corners>> ] unit-test\r
+\r
+solid1 corners>> '[ _ ]\r
+    [ 0 >pv solid1 solid1 clip-solid first corners>> ] unit-test\r
+\r
+solid1 corners>> '[ _ ]\r
+    [ 0 >pv solid1 solid2 clip-solid first corners>> ] unit-test\r
+\r
+solid1 corners>> '[ _ ]\r
+    [ 1 >pv solid1 solid2 clip-solid first corners>> ] unit-test\r
+solid2 corners>> '[ _ ]\r
+    [ 1 >pv solid2 solid1 clip-solid first corners>> ] unit-test\r
+\r
+!\r
+[\r
+    {\r
+        { { 13 15 } { 15 13 } { 13 13 } }\r
+        { { 16 17 } { 16 13 } { 36 17 } { 36 13 } }\r
+        { { 16 1 } { 16 2 } { 36 1 } { 36 2 } }\r
+    }\r
+] [     0 >pv solid2 solid3  2array \r
+        solid1 (solids-silhouette-subtract) \r
+        [ corners>> ] map\r
+  ] unit-test\r
+\r
+\r
+[\r
+{\r
+    { { 8 13 } { 2 7 } { 12 9 } { 12 2 } }\r
+    { { 13 15 } { 15 13 } { 13 13 } }\r
+    { { 16 17 } { 16 15 } { 36 17 } { 36 15 } }\r
+    { { 16 1 } { 16 2 } { 36 1 } { 36 2 } }\r
+}\r
+] [ \r
+    0 >pv  <space> solid1 suffix-solids \r
+        solid2 suffix-solids \r
+        solid3 suffix-solids\r
+     remove-hidden-solids\r
+    solids>> [ corners>> ] map\r
+] unit-test\r
+\r
+! { }\r
+! { }\r
+! <light> { 0.2 0.3 0.4 } >>color { 1 -1 1 } >>direction     suffix\r
+! <light> { 0.4 0.3 0.1 } >>color { -1 -1 -1 } >>direction   suffix\r
+! suffix \r
+! { 0.1 0.1 0.1 } suffix ! ambient color\r
+! { 0.23 0.32 0.17 } suffix ! solid color\r
+! solid3 faces>> first \r
+\r
+! enlight-projection\r
diff --git a/unmaintained/adsoda/adsoda.factor b/unmaintained/adsoda/adsoda.factor
new file mode 100755 (executable)
index 0000000..e586087
--- /dev/null
@@ -0,0 +1,543 @@
+! Copyright (C) 2008 Jeff Bigot\r
+! See http://factorcode.org/license.txt for BSD license.\r
+USING: accessors\r
+arrays \r
+assocs\r
+combinators\r
+kernel \r
+fry\r
+math \r
+math.constants\r
+math.functions\r
+math.libm\r
+math.order\r
+math.vectors \r
+math.matrices \r
+math.parser\r
+namespaces\r
+prettyprint\r
+sequences\r
+sequences.deep\r
+sets\r
+slots\r
+sorting\r
+tools.time\r
+vars\r
+continuations\r
+words\r
+opengl\r
+opengl.gl\r
+colors\r
+adsoda.solution2\r
+adsoda.combinators\r
+opengl.demo-support\r
+values\r
+tools.walker\r
+;\r
+\r
+IN: adsoda\r
+\r
+DEFER: combinations\r
+VAR: pv\r
+\r
+\r
+! ---------------------------------------------------------------------\r
+! global values\r
+VALUE: remove-hidden-solids?\r
+VALUE: VERY-SMALL-NUM\r
+VALUE: ZERO-VALUE\r
+VALUE: MAX-FACE-PER-CORNER\r
+\r
+t to: remove-hidden-solids?\r
+0.0000001 to: VERY-SMALL-NUM\r
+0.0000001 to: ZERO-VALUE\r
+4 to: MAX-FACE-PER-CORNER\r
+! ---------------------------------------------------------------------\r
+! sequence complement\r
+\r
+: with-pv ( i quot -- ) [ swap >pv call ] with-scope  ; inline\r
+\r
+: dimension ( array -- x )      length 1- ; inline \r
+: last ( seq -- x )             [ dimension ] [ nth ] bi ; inline\r
+: change-last ( seq quot --  )  [ [ dimension ] keep ] dip change-nth  ; \r
+\r
+! --------------------------------------------------------------\r
+! light\r
+! --------------------------------------------------------------\r
+\r
+TUPLE: light name { direction array } color ;\r
+: <light> ( -- tuple ) light new ;\r
+\r
+! -----------------------------------------------------------------------\r
+! halfspace manipulation\r
+! -----------------------------------------------------------------------\r
+\r
+: constant+ ( v x -- w )  '[ [ _ + ] change-last ] keep ;\r
+: translate ( u v -- w )   dupd     v* sum     constant+ ; \r
+\r
+: transform ( u matrix -- w )\r
+    [ swap m.v ] 2keep ! compute new normal vector    \r
+    [\r
+        [ [ abs ZERO-VALUE > ] find ] keep ! find a point on the frontier\r
+        ! be sure it's not null vector\r
+        last ! get constant\r
+        swap /f neg swap ! intercept value\r
+    ] dip  \r
+    flip \r
+    nth\r
+    [ * ] with map ! apply intercep value\r
+    over v*\r
+    sum  neg\r
+    suffix ! add value as constant at the end of equation\r
+;\r
+\r
+: position-point ( halfspace v -- x ) \r
+    -1 suffix v* sum  ; inline\r
+: point-inside-halfspace? ( halfspace v -- ? )       \r
+    position-point VERY-SMALL-NUM  > ; \r
+: point-inside-or-on-halfspace? ( halfspace v -- ? ) \r
+    position-point VERY-SMALL-NUM neg > ;\r
+: project-vector (  seq -- seq )     pv> [ head ] [ 1+  tail ] 2bi append ; \r
+: get-intersection ( matrice -- seq )     [ 1 tail* ] map     flip first ;\r
+\r
+: islenght=? ( seq n -- seq n ? ) 2dup [ length ] [ = ] bi*  ;\r
+\r
+: compare-nleft-to-identity-matrix ( seq n -- ? ) \r
+    [ [ head ] curry map ] keep  identity-matrix m- \r
+    flatten\r
+    [ abs ZERO-VALUE < ] all?\r
+;\r
+\r
+: valid-solution? ( matrice n -- ? )\r
+    islenght=?\r
+    [ compare-nleft-to-identity-matrix ]  \r
+    [ 2drop f ] if ; inline\r
+\r
+: intersect-hyperplanes ( matrice -- seq )\r
+    [ solution dup ] [ first dimension ] bi\r
+    valid-solution?     [ get-intersection ] [ drop f ] if ;\r
+\r
+! --------------------------------------------------------------\r
+! faces\r
+! --------------------------------------------------------------\r
+\r
+TUPLE: face { halfspace array } touching-corners adjacent-faces ;\r
+: <face> ( v -- tuple )       face new swap >>halfspace ;\r
+: flip-face ( face -- face ) [ vneg ] change-halfspace ;\r
+: erase-face-touching-corners ( face -- face ) f >>touching-corners ;\r
+: erase-face-adjacent-faces ( face -- face )   f >>adjacent-faces ;\r
+: faces-intersection ( faces -- v )  \r
+    [ halfspace>> ] map intersect-hyperplanes ;\r
+: face-translate ( face v -- face ) \r
+    [ translate ] curry change-halfspace ; inline\r
+: face-transform ( face m -- face )\r
+    [ transform ] curry change-halfspace ; inline\r
+: face-orientation ( face -- x )  pv> swap halfspace>> nth sgn ;\r
+: backface? ( face -- face ? )      dup face-orientation 0 <= ;\r
+: pv-factor ( face -- f face )     \r
+    halfspace>> [ pv> swap nth [ * ] curry ] keep ; inline\r
+: suffix-touching-corner ( face corner -- face ) \r
+    [ suffix ] curry   change-touching-corners ; inline\r
+: real-face? ( face -- ? )\r
+    [ touching-corners>> length ] [ halfspace>> dimension ] bi >= ;\r
+\r
+: (add-to-adjacent-faces) ( face face -- face )\r
+    over adjacent-faces>> 2dup member?\r
+    [ 2drop ] [ swap suffix >>adjacent-faces ] if ;\r
+\r
+: add-to-adjacent-faces ( face face -- face )\r
+    2dup =   [ drop ] [ (add-to-adjacent-faces) ] if ;\r
+\r
+: update-adjacent-faces ( faces corner -- )\r
+   '[ [ _ suffix-touching-corner drop ] each ] keep \r
+    2 among [ \r
+        [ first ] keep second  \r
+        [ add-to-adjacent-faces drop ] 2keep \r
+        swap add-to-adjacent-faces drop  \r
+    ] each ; inline\r
+\r
+: face-project-dim ( face -- x )  halfspace>> length 2 -  ;\r
+\r
+: apply-light ( color light normal -- u )\r
+    over direction>>  v. \r
+    neg dup 0 > \r
+    [ \r
+        [ color>> swap ] dip \r
+        [ * ] curry map v+ \r
+        [ 1 min ] map \r
+    ] \r
+    [ 2drop ] \r
+    if\r
+;\r
+\r
+: enlight-projection ( array face -- color )\r
+    ! array = lights + ambient color\r
+    [ [ third ] [ second ] [ first ] tri ]\r
+    [ halfspace>> project-vector normalize ] bi*\r
+    [ apply-light ] curry each\r
+    v*\r
+;\r
+\r
+: (intersection-into-face) ( face-init face-adja quot -- face )\r
+    [\r
+    [  [ pv-factor ] bi@ \r
+        roll \r
+        [ map ] 2bi@\r
+        v-\r
+    ] 2keep\r
+    [ touching-corners>> ] bi@\r
+    [ swap  [ = ] curry find  nip f = ] curry find nip\r
+    ] dip  over\r
+     [\r
+        call\r
+        dupd\r
+        point-inside-halfspace? [ vneg ] unless \r
+        <face> \r
+     ] [ 3drop f ] if \r
+    ; inline\r
+\r
+: intersection-into-face ( face-init face-adja -- face )\r
+    [ [ project-vector ] bi@ ]     (intersection-into-face) ;\r
+\r
+: intersection-into-silhouette-face ( face-init face-adja -- face )\r
+    [ ] (intersection-into-face) ;\r
+\r
+: intersections-into-faces ( face -- faces )\r
+    clone dup  adjacent-faces>> [ intersection-into-face ] with map \r
+    [ ] filter ;\r
+\r
+: (face-silhouette) ( face -- faces )\r
+    clone dup adjacent-faces>>\r
+    [   backface?\r
+        [ intersection-into-silhouette-face ] [ 2drop f ]  if  \r
+    ] with map \r
+    [ ] filter\r
+; inline\r
+\r
+: face-silhouette ( face -- faces )     \r
+    backface? [ drop f ] [ (face-silhouette) ] if ;\r
+\r
+! --------------------------------\r
+! solid\r
+! --------------------------------------------------------------\r
+TUPLE: solid dimension silhouettes faces corners adjacencies-valid color name ;\r
+\r
+: <solid> ( -- tuple ) solid new ;\r
+\r
+: suffix-silhouettes ( solid silhouette -- solid )  \r
+    [ suffix ] curry change-silhouettes ;\r
+\r
+: suffix-face ( solid face -- solid )     [ suffix ] curry change-faces ;\r
+\r
+: suffix-corner ( solid corner -- solid ) [ suffix ] curry change-corners ; \r
+\r
+: erase-solid-corners ( solid -- solid )  f >>corners ;\r
+\r
+: erase-silhouettes ( solid -- solid ) dup dimension>> f <array> >>silhouettes ;\r
+\r
+: filter-real-faces ( solid -- solid ) [ [ real-face? ] filter ] change-faces ;\r
+\r
+: initiate-solid-from-face ( face -- solid ) \r
+    face-project-dim  <solid> swap >>dimension ;\r
+\r
+: erase-old-adjacencies ( solid -- solid )\r
+    erase-solid-corners\r
+    [ dup [ erase-face-touching-corners erase-face-adjacent-faces drop ] each ]\r
+    change-faces ;\r
+\r
+: point-inside-or-on-face? ( face v -- ? ) \r
+    [ halfspace>> ] dip point-inside-or-on-halfspace?  ;\r
+\r
+: point-inside-face? ( face v -- ? ) \r
+    [ halfspace>> ] dip  point-inside-halfspace? ;\r
+\r
+: point-inside-solid? ( solid point -- ? )\r
+    [ faces>> ] dip [ point-inside-face? ] curry  all?   ; inline\r
+\r
+: point-inside-or-on-solid? ( solid point -- ? )\r
+    [ faces>> ] dip [ point-inside-or-on-face? ] curry  all?   ; inline\r
+\r
+: unvalid-adjacencies ( solid -- solid )  \r
+    erase-old-adjacencies f >>adjacencies-valid erase-silhouettes ;\r
+\r
+: add-face ( solid face -- solid ) \r
+    suffix-face unvalid-adjacencies ; \r
+\r
+: cut-solid ( solid halfspace -- solid )    <face> add-face ; \r
+\r
+: slice-solid ( solid face  -- solid1 solid2 )\r
+    [ [ clone ] bi@ flip-face add-face \r
+    [ "/outer/" append ] change-name  ] 2keep\r
+    add-face [ "/inner/" append ] change-name ;\r
+\r
+! -------------\r
+\r
+\r
+: add-silhouette ( solid  -- solid )\r
+   dup \r
+   ! find-adjacencies \r
+   faces>> { } \r
+   [ face-silhouette append ] reduce\r
+   [ ] filter \r
+   <solid> \r
+        swap >>faces\r
+        over dimension>> >>dimension \r
+        over name>> " silhouette " append \r
+                 pv> number>string append \r
+        >>name\r
+     !   ensure-adjacencies\r
+   suffix-silhouettes ; inline\r
+\r
+: find-silhouettes ( solid -- solid )\r
+    { } >>silhouettes \r
+    dup dimension>> [ [ add-silhouette ] with-pv ] each ;\r
+\r
+: ensure-silhouettes ( solid  -- solid )\r
+    dup  silhouettes>>  [ f = ] all?\r
+    [ find-silhouettes  ]  when ; \r
+\r
+! ------------\r
+\r
+: corner-added? ( solid corner -- ? ) \r
+    ! add corner to solid if it is inside solid\r
+    [ ] \r
+    [ point-inside-or-on-solid? ] \r
+    [ swap corners>> member? not ] \r
+    2tri and\r
+    [ suffix-corner drop t ] [ 2drop f ] if ;\r
+\r
+: process-corner ( solid faces corner -- )\r
+    swapd \r
+    [ corner-added? ] keep swap ! test if corner is inside solid\r
+    [ update-adjacent-faces ] \r
+    [ 2drop ]\r
+    if ;\r
+\r
+: compute-intersection ( solid faces -- )\r
+    dup faces-intersection\r
+    dup f = [ 3drop ] [ process-corner ]  if ;\r
+\r
+: test-faces-combinaisons ( solid n -- )\r
+    [ dup faces>> ] dip among   \r
+    [ compute-intersection ] with each ;\r
+\r
+: compute-adjacencies ( solid -- solid )\r
+    dup dimension>> [ >= ] curry \r
+    [ keep swap ] curry MAX-FACE-PER-CORNER swap\r
+    [ [ test-faces-combinaisons ] 2keep 1- ] [ ] while drop ;\r
+\r
+: find-adjacencies ( solid -- solid ) \r
+    erase-old-adjacencies   \r
+    compute-adjacencies\r
+    filter-real-faces \r
+    t >>adjacencies-valid ;\r
+\r
+: ensure-adjacencies ( solid -- solid ) \r
+    dup adjacencies-valid>> \r
+    [ find-adjacencies ] unless \r
+    ensure-silhouettes\r
+    ;\r
+\r
+: (non-empty-solid?) ( solid -- ? ) [ dimension>> ] [ corners>> length ] bi < ;\r
+: non-empty-solid? ( solid -- ? )   ensure-adjacencies (non-empty-solid?) ;\r
+\r
+: compare-corners-roughly ( corner corner -- ? )\r
+    2drop t ;\r
+! : remove-inner-faces ( -- ) ;\r
+: face-project ( array face -- seq )\r
+    backface? \r
+  [ 2drop f ]\r
+    [   [ enlight-projection ] \r
+        [ initiate-solid-from-face ]\r
+        [ intersections-into-faces ]  tri\r
+        >>faces\r
+        swap >>color        \r
+    ]    if ;\r
+\r
+: solid-project ( lights ambient solid -- solids )\r
+  ensure-adjacencies\r
+    [ color>> ] [ faces>> ] bi [ 3array  ] dip\r
+    [ face-project ] with map \r
+    [ ] filter \r
+    [ ensure-adjacencies ] map\r
+;\r
+\r
+: (solid-move) ( solid v move -- solid ) \r
+   curry [ map ] curry \r
+   [ dup faces>> ] dip call drop  \r
+   unvalid-adjacencies ; inline\r
+\r
+: solid-translate ( solid v -- solid ) [ face-translate ] (solid-move) ; \r
+: solid-transform ( solid m -- solid ) [ face-transform ] (solid-move) ; \r
+\r
+: find-corner-in-silhouette ( s1 s2 -- elt bool )\r
+    pv> swap silhouettes>> nth     \r
+    swap corners>>\r
+    [ point-inside-solid? ] with find swap ;\r
+\r
+: valid-face-for-order ( solid point -- face )\r
+    [ point-inside-face? not ] \r
+    [ drop face-orientation  0 = not ] 2bi and ;\r
+\r
+: check-orientation ( s1 s2 pt -- int )\r
+    [ nip faces>> ] dip\r
+    [ valid-face-for-order ] curry find swap\r
+    [ face-orientation ] [ drop f ] if ;\r
+\r
+: (order-solid) ( s1 s2 -- int )\r
+    2dup find-corner-in-silhouette\r
+    [ check-orientation ] [ 3drop f ] if ;\r
+\r
+: order-solid ( solid solid  -- i ) \r
+    2dup (order-solid)\r
+    [ 2nip ]\r
+    [   swap (order-solid)\r
+        [ neg ] [ f ] if*\r
+    ] if* ;\r
+\r
+: subtract ( solid1 solid2 -- solids )\r
+    faces>> swap clone ensure-adjacencies ensure-silhouettes  \r
+    [ swap slice-solid drop ]  curry map\r
+    [ non-empty-solid? ] filter\r
+    [ ensure-adjacencies ] map\r
+; inline\r
+\r
+! --------------------------------------------------------------\r
+! space \r
+! --------------------------------------------------------------\r
+TUPLE: space name dimension solids ambient-color lights ;\r
+: <space> ( -- space )      space new ;\r
+: suffix-solids ( space solid -- space ) [ suffix ] curry change-solids ; inline\r
+: suffix-lights ( space light -- space ) [ suffix ] curry change-lights ; inline\r
+: clear-space-solids ( space -- space )     f >>solids ;\r
+\r
+: space-ensure-solids ( space -- space ) \r
+    [ [ ensure-adjacencies ] map ] change-solids ;\r
+: eliminate-empty-solids ( space -- space ) \r
+    [ [ non-empty-solid? ] filter ] change-solids ;\r
+\r
+: projected-space ( space solids -- space ) \r
+   swap dimension>> 1-  <space>    swap >>dimension    swap  >>solids ;\r
+\r
+: get-silhouette ( solid -- silhouette )    silhouettes>> pv> swap nth ;\r
+: solid= ( solid solid -- ? )               [ corners>> ]  bi@ = ;\r
+\r
+: space-apply ( space m quot -- space ) \r
+        curry [ map ] curry [ dup solids>> ] dip\r
+        [ call ] [ drop ] recover drop ;\r
+: space-transform ( space m -- space ) [ solid-transform ] space-apply ;\r
+: space-translate ( space v -- space ) [ solid-translate ] space-apply ; \r
+\r
+: describe-space ( space -- ) \r
+    solids>>  [  [ corners>>  [ pprint ] each ] [ name>> . ] bi ] each ;\r
+\r
+: clip-solid ( solid solid -- solids )\r
+    [ ]\r
+    [ solid= not ]\r
+    [ order-solid -1 = ] 2tri \r
+    and\r
+    [ get-silhouette subtract ] \r
+    [  drop 1array ] \r
+    if \r
+    \r
+    ;\r
+\r
+: (solids-silhouette-subtract) ( solids solid -- solids ) \r
+     [  clip-solid append ] curry { } -rot each ; inline\r
+\r
+: solids-silhouette-subtract ( solids i solid -- solids )\r
+! solids is an array of 1 solid arrays\r
+      [ (solids-silhouette-subtract) ] curry map-but \r
+; inline \r
+\r
+: remove-hidden-solids ( space -- space ) \r
+! We must include each solid in a sequence because during substration \r
+! a solid can be divided in more than on solid\r
+    [ \r
+        [ [ 1array ] map ] \r
+        [ length ] \r
+        [ ] \r
+        tri     \r
+        [ solids-silhouette-subtract ] 2each\r
+        { } [ append ] reduce \r
+    ] change-solids\r
+    eliminate-empty-solids ! TODO include into change-solids\r
+;\r
+\r
+: space-project ( space i -- space )\r
+  [\r
+  [ clone  \r
+    remove-hidden-solids? [ remove-hidden-solids ] when\r
+    dup \r
+        [ solids>> ] \r
+        [ lights>> ] \r
+        [ ambient-color>> ]  tri \r
+        [ rot solid-project ] 2curry \r
+        map \r
+        [ append ] { } -rot each \r
+        ! TODO project lights\r
+        projected-space \r
+      ! remove-inner-faces \r
+      ! \r
+      eliminate-empty-solids\r
+    ] with-pv \r
+    ] [ 3drop <space> ] recover\r
+    ; inline\r
+\r
+: middle-of-space ( space -- point )\r
+    solids>> [ corners>> ] map concat\r
+    [ [ ] [ v+ ] map-reduce ] [ length ] bi v/n\r
+;\r
+\r
+! --------------------------------------------------------------\r
+! 3D rendering\r
+! --------------------------------------------------------------\r
+\r
+: face-reference ( face -- halfspace point vect )\r
+       [ halfspace>> ] \r
+       [ touching-corners>> first ] \r
+       [ touching-corners>> second ] tri \r
+       over v-\r
+;\r
+\r
+: theta ( v halfspace point vect -- v x )\r
+   [ [ over ] dip v- ] dip    \r
+   [ cross dup norm >float ]\r
+   [ v. >float ]  \r
+   2bi \r
+   fatan2\r
+   -rot v. \r
+   0 < [ neg ] when\r
+;\r
+\r
+: ordered-face-points ( face -- corners )  \r
+    [ touching-corners>> 1 head ] \r
+    [ touching-corners>> 1 tail ] \r
+    [ face-reference [ theta ] 3curry ]         tri\r
+    { } map>assoc    sort-values keys \r
+    append\r
+    ; inline\r
+\r
+: point->GL  ( point -- )   gl-vertex ;\r
+: points->GL ( array -- )   do-cycle [ point->GL ] each ;\r
+\r
+: face->GL ( face color -- )\r
+   [ ordered-face-points ] dip\r
+   [ first3 1.0 glColor4d GL_POLYGON [ [ point->GL  ] each ] do-state ] curry\r
+   [  0 0 0 1 glColor4d GL_LINE_LOOP [ [ point->GL  ] each ] do-state ]\r
+   bi\r
+   ; inline\r
+\r
+: solid->GL ( solid -- )    \r
+    [ faces>> ]    \r
+    [ color>> ] bi\r
+    [ face->GL ] curry each ; inline\r
+\r
+: space->GL ( space -- )\r
+    solids>>\r
+    [ solid->GL ] each ;\r
+\r
+\r
+\r
+\r
+\r
diff --git a/unmaintained/adsoda/adsoda.tests b/unmaintained/adsoda/adsoda.tests
new file mode 100755 (executable)
index 0000000..f0b0c54
--- /dev/null
@@ -0,0 +1,147 @@
+! : init-4D-demo ( -- space )\r
+! OK\r
+! espace de dimension 4 et de couleur 0,3 0.3 0.3\r
+<space> \r
+    4 >>dimension\r
+    { 0.3 0.3 0.3 } >>ambient-color\r
+    { 100 150 100  150 100 150 100 150 } "4cube1" 4cube suffix-solids\r
+   { 160 180  160 180 160 180 160 180 } "4cube2" 4cube suffix-solids\r
+    <light>\r
+        { -100 -100 -100 -100 } >>position\r
+        { 0.2 0.7 0.1 } >>color\r
+        suffix-lights\r
+! ;\r
+! : init-3D-demo ( -- space )\r
+! OK\r
+! espace de dimension 4 et de couleur 0,3 0.3 0.3\r
+<space> \r
+    3 >>dimension\r
+    { 0.3 0.3 0.3 } >>ambient-color\r
+    { 100 150 100  150 100 150 } "3cube1" 3cube suffix-solids\r
+  !  { -150 -10  -150 -10 -150 -10 -150 -10 } "4cube2" 4cube suffix-solids\r
+    <light>\r
+        { -100 -100 -100 -100 } >>position\r
+        { 0.2 0.7 0.1 } >>color\r
+        suffix-lights\r
+! ;\r
+\r
+\r
+: s1 ( -- solid )\r
+    <solid> \r
+    2 >>dimension\r
+    "s1" >>name\r
+    { 1 1 1 } >>color\r
+    { 1 -1 -5 } cut-solid \r
+    { -1 -1 -21 } cut-solid \r
+    { -1 0 -12 } cut-solid \r
+    { 1 2 16 } cut-solid\r
+;\r
+: solid1 ( -- solid )\r
+    <solid> \r
+    2 >>dimension\r
+    "solid1" >>name\r
+    { 1 -1 -5 } cut-solid \r
+    { -1 -1 -21 } cut-solid \r
+    { -1 0 -12 } cut-solid \r
+    { 1 2 16 } cut-solid\r
+    ensure-adjacencies\r
+    \r
+;\r
+: solid2 ( -- solid )\r
+    <solid> \r
+    2 >>dimension\r
+    "solid2" >>name\r
+    { -1 1 -10 } cut-solid \r
+    { -1 -1 -28 } cut-solid \r
+    { 1 0 13 } cut-solid \r
+ !   { 1 2 16 } cut-solid\r
+    ensure-adjacencies\r
+    \r
+;\r
+\r
+: solid3 ( -- solid )\r
+      <solid> \r
+    2 >>dimension\r
+    "solid3" >>name\r
+    { 1 1 1 } >>color\r
+    { 1 0 16 } cut-solid \r
+    { -1 0 -36 } cut-solid \r
+    { 0 1 1 } cut-solid \r
+    { 0 -1  -17 } cut-solid \r
+ !   { 1 2 16 } cut-solid\r
+    ensure-adjacencies\r
+    \r
+\r
+;\r
+\r
+: solid4 ( -- solid )\r
+      <solid> \r
+    2 >>dimension\r
+    "solid4" >>name\r
+    { 1 1 1 } >>color\r
+    { 1 0 21 } cut-solid \r
+    { -1 0 -36 } cut-solid \r
+    { 0 1 1 } cut-solid \r
+    { 0 -1  -17 } cut-solid \r
+    ensure-adjacencies\r
+    \r
+;\r
+\r
+: solid5 ( -- solid )\r
+      <solid> \r
+    2 >>dimension\r
+    "solid5" >>name\r
+    { 1 1 1 } >>color\r
+    { 1 0 6 } cut-solid \r
+    { -1 0 -17 } cut-solid \r
+    { 0 1 17 } cut-solid \r
+    { 0 -1  -19 } cut-solid \r
+    ensure-adjacencies\r
+    \r
+;\r
+\r
+: solid7 ( -- solid )\r
+      <solid> \r
+    2 >>dimension\r
+    "solid7" >>name\r
+    { 1 1 1 } >>color\r
+    { 1 0 38 } cut-solid \r
+    { 1 -5 -66 } cut-solid \r
+    { -2 1 -75 } cut-solid\r
+    ensure-adjacencies\r
+    \r
+;\r
+\r
+: solid6s ( -- seq )\r
+  solid3 clone solid2 clone subtract\r
+;\r
+\r
+: space1 ( -- space )\r
+    <space>\r
+        2 >>dimension\r
+     !    solid3 suffix-solids\r
+        solid1 suffix-solids\r
+        solid2 suffix-solids\r
+    !   solid6s [ suffix-solids ] each \r
+        solid4 suffix-solids\r
+     !   solid5 suffix-solids\r
+        solid7 suffix-solids\r
+        { 1 1 1 } >>ambient-color\r
+            <light>\r
+        { -100 -100 } >>position\r
+        { 0.2 0.7 0.1 } >>color\r
+        suffix-lights\r
+;\r
+\r
+: space2 ( -- space )\r
+    <space>\r
+        4 >>dimension\r
+       ! 4cube suffix-solids\r
+        { 1 1 1 } >>ambient-color\r
+            <light>\r
+        { -100 -100 } >>position\r
+        { 0.2 0.7 0.1 } >>color\r
+        suffix-lights\r
+\r
+       ;\r
+\r
diff --git a/unmaintained/adsoda/authors.txt b/unmaintained/adsoda/authors.txt
new file mode 100755 (executable)
index 0000000..856f3b0
--- /dev/null
@@ -0,0 +1,2 @@
+Jeff Bigot\r
+Greg Ferrar
\ No newline at end of file
diff --git a/unmaintained/adsoda/combinators/authors.txt b/unmaintained/adsoda/combinators/authors.txt
new file mode 100755 (executable)
index 0000000..e7f4cde
--- /dev/null
@@ -0,0 +1 @@
+JF Bigot, after Greg Ferrar
\ No newline at end of file
diff --git a/unmaintained/adsoda/combinators/combinators-docs.factor b/unmaintained/adsoda/combinators/combinators-docs.factor
new file mode 100755 (executable)
index 0000000..e6bb52a
--- /dev/null
@@ -0,0 +1,39 @@
+! Copyright (C) 2008 Your name.
+! See http://factorcode.org/license.txt for BSD license.
+USING: arrays help.markup help.syntax kernel sequences ;
+IN: adsoda.combinators
+
+HELP: among
+{ $values
+     { "array" array } { "n" null }
+     { "array" array }
+}
+{ $description "returns an array containings every possibilities of n choices among a given sequence" } ;
+
+HELP: columnize
+{ $values
+     { "array" array }
+     { "array" array }
+}
+{ $description "flip a sequence into a sequence of 1 element sequences" } ;
+
+HELP: concat-nth
+{ $values
+     { "seq1" sequence } { "seq2" sequence }
+     { "seq" sequence }
+}
+{ $description "merges 2 sequences of sequences appending corresponding elements" } ;
+
+HELP: do-cycle
+{ $values
+     { "array" array }
+     { "array" array }
+}
+{ $description "Copy the first element at the end of the sequence in order to close the cycle." } ;
+
+
+ARTICLE: "adsoda.combinators" "adsoda.combinators"
+{ $vocab-link "adsoda.combinators" }
+;
+
+ABOUT: "adsoda.combinators"
diff --git a/unmaintained/adsoda/combinators/combinators-tests.factor b/unmaintained/adsoda/combinators/combinators-tests.factor
new file mode 100755 (executable)
index 0000000..6796929
--- /dev/null
@@ -0,0 +1,11 @@
+USING: adsoda.combinators\r
+sequences\r
+    tools.test \r
+ ;\r
+\r
+IN: adsoda.combinators.tests\r
+\r
+\r
+[ { "atoto" "b" "ctoto" } ] [ { "a" "b" "c" } 1 [ "toto" append ] map-but ] \r
+    unit-test\r
+\r
diff --git a/unmaintained/adsoda/combinators/combinators.factor b/unmaintained/adsoda/combinators/combinators.factor
new file mode 100755 (executable)
index 0000000..5838c30
--- /dev/null
@@ -0,0 +1,44 @@
+! Copyright (C) 2008 Jeff Bigot\r
+! See http://factorcode.org/license.txt for BSD license.\r
+USING: kernel arrays sequences fry math combinators ;\r
+\r
+IN: adsoda.combinators\r
+\r
+! : (combinations) ( seq -- seq ) [ 1 tail ] dip combinations ; \r
+\r
+! : prefix-each [ prefix ] curry map ; inline\r
+\r
+! : combinations ( seq n -- seqs )\r
+!    {\r
+!        { [ dup 0 = ] [ 2drop { { } } ] }\r
+!        { [ over empty? ] [ 2drop { } ] }\r
+!        { [ t ] [ \r
+!            [ [ 1- (combinations) ] [ drop first ] 2bi prefix-each ]\r
+!            [ (combinations) ] 2bi append\r
+!        ] }\r
+!    } cond ;\r
+\r
+: columnize ( array -- array ) [ 1array ] map ; inline\r
+\r
+: among ( array n -- array )\r
+    2dup swap length \r
+    {\r
+        { [ over 1 = ] [ 3drop columnize ] }\r
+        { [ over 0 = ] [ 2drop 2drop { } ] }\r
+        { [ 2dup < ] [ 2drop [ 1 cut ] dip  \r
+                         [ 1- among [ append ] with map  ] \r
+                         [ among append ] 2bi\r
+                       ] }\r
+        { [ 2dup = ] [ 3drop 1array ] }\r
+        { [ 2dup > ] [ 2drop 2drop {  } ] } \r
+    } cond\r
+;\r
+\r
+: concat-nth ( seq1 seq2 -- seq )  [ nth append ] curry map-index ;\r
+\r
+: do-cycle   ( array -- array )   dup first suffix ;\r
+\r
+: map-but ( seq i quot -- seq )\r
+    ! quot : ( seq x -- seq )\r
+    '[ _ = [ @ ] unless ] map-index ; inline\r
+\r
diff --git a/unmaintained/adsoda/solution2/solution2.factor b/unmaintained/adsoda/solution2/solution2.factor
new file mode 100755 (executable)
index 0000000..3e06481
--- /dev/null
@@ -0,0 +1,126 @@
+USING: kernel\r
+sequences\r
+namespaces\r
+\r
+math\r
+math.vectors\r
+math.matrices\r
+;\r
+IN: adsoda.solution2\r
+\r
+! -------------------\r
+! correctif solution\r
+! ---------------\r
+SYMBOL: matrix\r
+: MIN-VAL-adsoda ( -- x ) 0.00000001\r
+! 0.000000000001 \r
+;\r
+\r
+: zero? ( x -- ? ) \r
+    abs MIN-VAL-adsoda <\r
+;\r
+\r
+! [ number>string string>number ] map \r
+\r
+: with-matrix ( matrix quot -- )\r
+    [ swap matrix set call matrix get ] with-scope ; inline\r
+\r
+: nth-row ( row# -- seq ) matrix get nth ;\r
+\r
+: change-row ( row# quot -- seq ) ! row# quot -- | quot: seq -- seq )\r
+    matrix get swap change-nth ; inline\r
+\r
+: exchange-rows ( row# row# -- ) matrix get exchange ;\r
+\r
+: rows ( -- n ) matrix get length ;\r
+\r
+: cols ( -- n ) 0 nth-row length ;\r
+\r
+: skip ( i seq quot -- n )\r
+    over [ find-from drop ] dip length or ; inline\r
+\r
+: first-col ( row# -- n )\r
+    #! First non-zero column\r
+    0 swap nth-row [ zero? not ] skip ;\r
+\r
+: clear-scale ( col# pivot-row i-row -- n )\r
+    [ over ] dip nth dup zero? [\r
+        3drop 0\r
+    ] [\r
+        [ nth dup zero? ] dip swap [\r
+            2drop 0\r
+        ] [\r
+            swap / neg\r
+        ] if\r
+    ] if ;\r
+\r
+: (clear-col) ( col# pivot-row i -- )\r
+    [ [ clear-scale ] 2keep [ n*v ] dip v+ ] change-row ;\r
+\r
+: rows-from ( row# -- slice )\r
+    rows dup <slice> ;\r
+\r
+: clear-col ( col# row# rows -- )\r
+    [ nth-row ] dip [ [ 2dup ] dip (clear-col) ] each 2drop ;\r
+\r
+: do-row ( exchange-with row# -- )\r
+    [ exchange-rows ] keep\r
+    [ first-col ] keep\r
+    dup 1+ rows-from clear-col ;\r
+\r
+: find-row ( row# quot -- i elt )\r
+    [ rows-from ] dip find ; inline\r
+\r
+: pivot-row ( col# row# -- n )\r
+    [ dupd nth-row nth zero? not ] find-row 2nip ;\r
+\r
+: (echelon) ( col# row# -- )\r
+    over cols < over rows < and [\r
+        2dup pivot-row [ over do-row 1+ ] when*\r
+        [ 1+ ] dip (echelon)\r
+    ] [\r
+        2drop\r
+    ] if ;\r
+\r
+: echelon ( matrix -- matrix' )\r
+    [ 0 0 (echelon) ] with-matrix ;\r
+\r
+: nonzero-rows ( matrix -- matrix' )\r
+    [ [ zero? ] all? not ] filter ;\r
+\r
+: null/rank ( matrix -- null rank )\r
+    echelon dup length swap nonzero-rows length [ - ] keep ;\r
+\r
+: leading ( seq -- n elt ) [ zero? not ] find ;\r
+\r
+: reduced ( matrix' -- matrix'' )\r
+    [\r
+        rows <reversed> [\r
+            dup nth-row leading drop\r
+            dup [ swap dup clear-col ] [ 2drop ] if\r
+        ] each\r
+    ] with-matrix ;\r
+\r
+: basis-vector ( row col# -- )\r
+    [ clone ] dip\r
+    [ swap nth neg recip ] 2keep\r
+    [ 0 spin set-nth ] 2keep\r
+    [ n*v ] dip\r
+    matrix get set-nth ;\r
+\r
+: nullspace ( matrix -- seq )\r
+    echelon reduced dup empty? [\r
+        dup first length identity-matrix [\r
+            [\r
+                dup leading drop\r
+                dup [ basis-vector ] [ 2drop ] if\r
+            ] each\r
+        ] with-matrix flip nonzero-rows\r
+    ] unless ;\r
+\r
+: 1-pivots ( matrix -- matrix )\r
+    [ dup leading nip [ recip v*n ] when* ] map ;\r
+\r
+: solution ( matrix -- matrix )\r
+    echelon nonzero-rows reduced 1-pivots ;\r
+\r
diff --git a/unmaintained/adsoda/solution2/summary.txt b/unmaintained/adsoda/solution2/summary.txt
new file mode 100755 (executable)
index 0000000..a25a451
--- /dev/null
@@ -0,0 +1 @@
+A modification of solution to approximate solutions
\ No newline at end of file
diff --git a/unmaintained/adsoda/summary.txt b/unmaintained/adsoda/summary.txt
new file mode 100755 (executable)
index 0000000..ee666bc
--- /dev/null
@@ -0,0 +1 @@
+ADSODA : Arbitrary-Dimensional Solid Object Display Algorithm
\ No newline at end of file
diff --git a/unmaintained/adsoda/tags.txt b/unmaintained/adsoda/tags.txt
new file mode 100755 (executable)
index 0000000..6e25b2f
--- /dev/null
@@ -0,0 +1 @@
+adsoda 4D viewer
\ No newline at end of file
diff --git a/unmaintained/adsoda/tools/authors.txt b/unmaintained/adsoda/tools/authors.txt
new file mode 100755 (executable)
index 0000000..a6a9693
--- /dev/null
@@ -0,0 +1 @@
+Jeff Bigot
\ No newline at end of file
diff --git a/unmaintained/adsoda/tools/tools-docs.factor b/unmaintained/adsoda/tools/tools-docs.factor
new file mode 100755 (executable)
index 0000000..6fb617a
--- /dev/null
@@ -0,0 +1,76 @@
+! Copyright (C) 2008 Jeff Bigot.
+! See http://factorcode.org/license.txt for BSD license.
+USING: arrays help.markup help.syntax kernel sequences ;
+IN: adsoda.tools
+
+HELP: 3cube
+{ $values 
+    { "array" "array" } { "name" "name" } 
+    { "solid" "solid" } 
+}
+{ $description "array : xmin xmax ymin ymax zmin zmax" 
+"\n returns a 3D solid with given limits"
+} ;
+
+HELP: 4cube
+{ $values 
+    { "array" "array" } { "name" "name" } 
+    { "solid" "solid" } 
+}
+{ $description "array : xmin xmax ymin ymax zmin zmax wmin wmax"  
+"\n returns a 4D solid with given limits"
+} ;
+
+
+HELP: coord-max
+{ $values
+     { "x" null } { "array" array }
+     { "array" array }
+}
+{ $description "" } ;
+
+HELP: coord-min
+{ $values
+     { "x" null } { "array" array }
+     { "array" array }
+}
+{ $description "" } ;
+
+HELP: equation-system-for-normal
+{ $values
+     { "points" "a list of n points" }
+     { "matrix" "matrix" }
+}
+{ $description "From a list of points, return the matrix" 
+"to solve in order to find the vector normal to the plan defined by the points" } 
+;
+
+HELP: normal-vector
+{ $values
+     { "points" "a list of n points" }
+     { "v" "a vector" }
+}
+{ $description "From a list of points, returns the vector normal to the plan defined by the points" 
+"\nWith n points, creates n-1 vectors and then find a vector orthogonal to every others"
+"\n returns { f } if a normal vector can not be found" } 
+;
+
+HELP: points-to-hyperplane
+{ $values
+     { "points" "a list of n points" }
+     { "hyperplane" "an hyperplane equation" }
+}
+{ $description "From a list of points, returns the equation of the hyperplan"
+"\n Finds a normal vector and then translate it so that it includes one of the points"
+
+} 
+;
+
+ARTICLE: "adsoda.tools" "adsoda.tools"
+{ $vocab-link "adsoda.tools" }
+"\nTools to help in building an " { $vocab-link "adsoda" } "-space"
+;
+
+ABOUT: "adsoda.tools"
+
+
diff --git a/unmaintained/adsoda/tools/tools-tests.factor b/unmaintained/adsoda/tools/tools-tests.factor
new file mode 100755 (executable)
index 0000000..bb54194
--- /dev/null
@@ -0,0 +1,14 @@
+! Copyright (C) 2008 Jeff Bigot\r
+! See http://factorcode.org/license.txt for BSD license.\r
+USING: \r
+adsoda.tools\r
+tools.test\r
+;\r
+\r
+IN: adsoda.tools.tests\r
+\r
+\r
+ [ { 1 0 } ] [ { { 0 0 } { 0 1 } }  normal-vector    ] unit-test\r
+ [ f ] [ { { 0 0 } { 0 0 } }  normal-vector    ] unit-test\r
+\r
+ [  { 1/2 1/2 1+1/2 }  ] [ { { 1 2 } { 2 1 } }  points-to-hyperplane ] unit-test\r
diff --git a/unmaintained/adsoda/tools/tools.factor b/unmaintained/adsoda/tools/tools.factor
new file mode 100755 (executable)
index 0000000..efa3a55
--- /dev/null
@@ -0,0 +1,145 @@
+! Copyright (C) 2008 Jeff Bigot\r
+! See http://factorcode.org/license.txt for BSD license.\r
+USING: \r
+kernel\r
+sequences\r
+math\r
+accessors\r
+adsoda\r
+math.vectors \r
+math.matrices\r
+bunny.model\r
+io.encodings.ascii\r
+io.files\r
+sequences.deep\r
+combinators\r
+adsoda.combinators\r
+fry\r
+io.files.temp\r
+grouping\r
+;\r
+\r
+IN: adsoda.tools\r
+\r
+\r
+\r
+\r
+\r
+! ---------------------------------\r
+: coord-min ( x array -- array )  swap suffix  ;\r
+: coord-max ( x array -- array )  swap neg suffix ;\r
+\r
+: 4cube ( array name -- solid )\r
+! array : xmin xmax ymin ymax zmin zmax wmin wmax\r
+    <solid> \r
+    4 >>dimension\r
+    swap >>name\r
+    swap\r
+    { \r
+       [ { 1 0 0 0 } coord-min ] [ { -1 0 0 0 } coord-max ] \r
+       [ { 0 1 0 0 } coord-min ] [ { 0 -1 0 0 } coord-max ]\r
+       [ { 0 0 1 0 } coord-min ] [ { 0 0 -1 0 } coord-max ] \r
+       [ { 0 0 0 1 } coord-min ] [ { 0 0 0 -1 } coord-max ]\r
+    }\r
+    [ curry call ] 2map \r
+    [ cut-solid ] each \r
+    ensure-adjacencies\r
+    \r
+; inline\r
+\r
+: 3cube ( array name -- solid )\r
+! array : xmin xmax ymin ymax zmin zmax wmin wmax\r
+    <solid> \r
+    3 >>dimension\r
+    swap >>name\r
+    swap\r
+    { \r
+       [ { 1 0 0 } coord-min ] [ { -1 0 0 } coord-max ] \r
+       [ { 0 1 0 } coord-min ] [ { 0 -1 0 } coord-max ]\r
+       [ { 0 0 1 } coord-min ] [ { 0 0 -1 } coord-max ] \r
+    }\r
+    [ curry call ] 2map \r
+    [ cut-solid ] each \r
+    ensure-adjacencies\r
+    \r
+; inline\r
+\r
+\r
+: equation-system-for-normal ( points -- matrix )\r
+    unclip [ v- 0 suffix ] curry map\r
+    dup first [ drop 1 ] map     suffix\r
+;\r
+\r
+: normal-vector ( points -- v ) \r
+    equation-system-for-normal\r
+    intersect-hyperplanes ;\r
+\r
+: points-to-hyperplane ( points -- hyperplane )\r
+    [ normal-vector 0 suffix ] [ first ] bi\r
+    translate ;\r
+\r
+: refs-to-points ( points faces -- faces )\r
+   [ swap [ nth 10 v*n { 100 100 100 } v+ ] curry map    ] with map\r
+;\r
+! V{ { 0.1 0.2 } { 1.1 1.3 } } V{ { 1 0 } { 0 1 } }\r
+! V{ { { 1.1 1.3 } { 0.1 0.2 } } { { 0.1 0.2 } { 1.1 1.3 } } }\r
+\r
+: ply-model-path ( -- path )\r
+\r
+! "bun_zipper.ply" \r
+"screw2.ply"\r
+temp-file \r
+;\r
+\r
+: read-bunny-model ( -- v )\r
+ply-model-path ascii [  parse-model ] with-file-reader\r
+\r
+refs-to-points\r
+;\r
+\r
+: 3points-to-normal ( seq -- v )\r
+    unclip [ v- ] curry map first2 cross normalize\r
+;\r
+: 2-faces-to-prism ( seq seq -- seq )\r
+  2dup\r
+    [ do-cycle 2 clump ] bi@ concat-nth  !  3 faces rectangulaires\r
+    swap prefix\r
+    swap prefix\r
+;    \r
+\r
+: Xpoints-to-prisme ( seq height -- cube )\r
+    ! from 3 points gives a list of faces representing a cube of height "height"\r
+    ! and of based on the three points\r
+    ! a face is a group of 3 or mode points.   \r
+    [ dup dup  3points-to-normal ] dip \r
+    v*n [ v+ ] curry map ! 2 eme face triangulaire \r
+    2-faces-to-prism  \r
+\r
+! [ dup number? [ 1 + ] when ] deep-map\r
+! dup keep \r
+;\r
+\r
+\r
+: Xpoints-to-plane4D ( seq x y -- 4Dplane )\r
+    ! from 3 points gives a list of faces representing a cube in 4th dim\r
+    ! from x to y (height = y-x)\r
+    ! and of based on the X points\r
+    ! a face is a group of 3 or mode points.   \r
+    '[ [ [ _ suffix ] map ] [ [ _ suffix ] map ] bi ] call\r
+    2-faces-to-prism\r
+;\r
+\r
+: 3pointsfaces-to-3Dsolidfaces ( seq -- seq )\r
+    [ 1 Xpoints-to-prisme [ 100 110 Xpoints-to-plane4D ] map concat ] map \r
+\r
+;\r
+\r
+: test-figure ( -- solid )\r
+    <solid> \r
+    2 >>dimension\r
+    { 1 -1 -5 } cut-solid \r
+    { -1 -1 -21 } cut-solid \r
+    { -1 0 -12 } cut-solid \r
+    { 1 2 16 } cut-solid\r
+;\r
+\r
diff --git a/unmaintained/assocs-lib/authors.txt b/unmaintained/assocs-lib/authors.txt
new file mode 100644 (file)
index 0000000..6cfd5da
--- /dev/null
@@ -0,0 +1 @@
+Eduardo Cavazos
diff --git a/unmaintained/assocs-lib/lib-tests.factor b/unmaintained/assocs-lib/lib-tests.factor
new file mode 100644 (file)
index 0000000..c7e1aa4
--- /dev/null
@@ -0,0 +1,17 @@
+USING: kernel tools.test sequences vectors assocs.lib ;
+IN: assocs.lib.tests
+
+{ 1 1 } [ [ ?push ] histogram ] must-infer-as
+
+! substitute
+[ { 2 } ] [ { 1 } H{ { 1 2 } } [ ?at drop ] curry map ] unit-test
+[ { 3 } ] [ { 3 } H{ { 1 2 } } [ ?at drop ] curry map ] unit-test
+
+[ 2 ] [ 1 H{ { 1 2 } } [ ] [ ] if-at ] unit-test
+[ 3 ] [ 3 H{ { 1 2 } } [ ] [ ] if-at ] unit-test
+
+[ "hi" ] [ 1 H{ { 1 2 } } [ drop "hi" ] when-at ] unit-test
+[ 3 ] [ 3 H{ { 1 2 } } [ drop "hi" ] when-at ] unit-test
+[ 2 ] [ 1 H{ { 1 2 } } [ drop "hi" ] unless-at ] unit-test
+[ "hi" ] [ 3 H{ { 1 2 } } [ drop "hi" ] unless-at ] unit-test
+
diff --git a/unmaintained/assocs-lib/lib.factor b/unmaintained/assocs-lib/lib.factor
new file mode 100755 (executable)
index 0000000..f1b018f
--- /dev/null
@@ -0,0 +1,49 @@
+USING: arrays assocs kernel vectors sequences namespaces
+       random math.parser math fry ;
+
+IN: assocs.lib
+
+: set-assoc-stack ( value key seq -- )
+    dupd [ key? ] with find-last nip set-at ;
+
+: at-default ( key assoc -- value/key )
+    dupd at [ nip ] when* ;
+
+: replace-at ( assoc value key -- assoc )
+    [ dupd 1vector ] dip rot set-at ;
+
+: peek-at* ( assoc key -- obj ? )
+    swap at* dup [ [ peek ] dip ] when ;
+
+: peek-at ( assoc key -- obj )
+    peek-at* drop ;
+
+: >multi-assoc ( assoc -- new-assoc )
+    [ 1vector ] assoc-map ;
+
+: multi-assoc-each ( assoc quot -- )
+    [ with each ] curry assoc-each ; inline
+
+: insert ( value variable -- ) namespace push-at ;
+
+: generate-key ( assoc -- str )
+    [ 32 random-bits >hex ] dip
+    2dup key? [ nip generate-key ] [ drop ] if ;
+
+: set-at-unique ( value assoc -- key )
+    dup generate-key [ swap set-at ] keep ;
+
+: histogram ( assoc quot -- assoc' )
+    H{ } clone [
+        swap [ change-at ] 2curry assoc-each
+    ] keep ; inline
+
+: ?at ( obj assoc -- value/obj ? )
+    dupd at* [ [ nip ] [ drop ] if ] keep ;
+
+: if-at ( obj assoc quot1 quot2 -- )
+    [ ?at ] 2dip if ; inline
+
+: when-at ( obj assoc quot -- ) [ ] if-at ; inline
+
+: unless-at ( obj assoc quot -- ) [ ] swap if-at ; inline
diff --git a/unmaintained/assocs-lib/summary.txt b/unmaintained/assocs-lib/summary.txt
new file mode 100644 (file)
index 0000000..24c2825
--- /dev/null
@@ -0,0 +1 @@
+Non-core assoc words
diff --git a/unmaintained/assocs-lib/tags.txt b/unmaintained/assocs-lib/tags.txt
new file mode 100644 (file)
index 0000000..42d711b
--- /dev/null
@@ -0,0 +1 @@
+collections
diff --git a/unmaintained/bake/authors.txt b/unmaintained/bake/authors.txt
new file mode 100644 (file)
index 0000000..6cfd5da
--- /dev/null
@@ -0,0 +1 @@
+Eduardo Cavazos
diff --git a/unmaintained/bake/bake-tests.factor b/unmaintained/bake/bake-tests.factor
new file mode 100644 (file)
index 0000000..64329de
--- /dev/null
@@ -0,0 +1,28 @@
+
+USING: kernel tools.test bake ;
+
+IN: bake.tests
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: unit-test* ( input output -- ) swap unit-test ;
+
+: must-be-t ( in -- ) [ t ] swap unit-test ;
+: must-be-f ( in -- ) [ f ] swap unit-test ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+[ 10 20 30 `{ , , , } ] [ { 10 20 30 } ] unit-test*
+
+[ 10 20 30 `{ , { , } , } ] [ { 10 { 20 } 30 } ] unit-test*
+
+[ 10 { 20 21 22 } 30 `{ , , , } ] [ { 10 { 20 21 22 } 30 } ] unit-test*
+
+[ 10 { 20 21 22 } 30 `{ , @ , } ] [ { 10 20 21 22 30 } ] unit-test*
+
+[ { 1 2 3 } `{ @ } ] [ { 1 2 3 } ] unit-test*
+
+[ { 1 2 3 } { 4 5 6 } { 7 8 9 } `{ @ @ @ } ]
+[ { 1 2 3 4 5 6 7 8 9 } ]
+unit-test*
+
diff --git a/unmaintained/bake/bake.factor b/unmaintained/bake/bake.factor
new file mode 100644 (file)
index 0000000..25cc0bb
--- /dev/null
@@ -0,0 +1,97 @@
+
+USING: kernel parser namespaces sequences quotations arrays vectors splitting
+       strings words math generalizations
+       macros combinators.conditional newfx ;
+
+IN: bake
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYMBOL: ,
+SYMBOL: @
+
+: comma? ( obj -- ? ) , = ;
+: atsym? ( obj -- ? ) @ = ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+DEFER: [bake]
+
+: broil-element ( obj -- quot )
+    {
+      { [ comma?    ] [ drop [ >r ]          ] }
+      { [ f =       ] [ [ >r ] prefix-on     ] }
+      { [ integer?  ] [ [ >r ] prefix-on     ] }
+      { [ string?   ] [ [ >r ] prefix-on     ] }
+      { [ sequence? ] [ [bake] [ >r ] append ] }
+      { [ word?     ] [ literalize [ >r ] prefix-on ] }
+      { [ drop t    ] [ [ >r ] prefix-on     ] }
+    }
+  1cond ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: constructor ( seq -- quot )
+    {
+      { [ array? ]     [ length [ narray ] prefix-on ] }
+!      { [ quotation? ] [ length [ ncurry ] prefix-on [ ] prefix ] }
+      { [ quotation? ] [ length [ narray >quotation ] prefix-on ] }
+      { [ vector? ]    [ length [ narray >vector    ] prefix-on ] }
+    }
+  1cond ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: [broil] ( seq -- quot )
+    [ reverse [ broil-element ] map concat ]
+    [ length  [ drop [ r> ]   ] map concat ]
+    [ constructor ]
+  tri append append
+  >quotation ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYMBOL: saved-sequence
+
+: [connector] ( -- quot )
+  saved-sequence get quotation? [ [ compose ] ] [ [ append ] ] if ;
+
+: [starter] ( -- quot )
+  saved-sequence get
+    {
+      { [ quotation? ] [ drop [  [ ] ] ] }
+      { [ array?     ] [ drop [  { } ] ] }
+      { [ vector?    ] [ drop [ V{ } ] ] }
+    }
+  1cond ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: [simmer] ( seq -- quot )
+
+  dup saved-sequence set
+
+  { @ } split reverse
+    [ [ [bake] [connector] append [ >r ] append ] map concat ]
+    [ length [ drop [ r> ] [connector] append   ] map concat ]
+  bi
+
+  >r 1 invert-index pluck r> ! remove the last append/compose
+
+  [starter] prepend
+
+  append ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: [bake] ( seq -- quot ) [ @ member? ] [ [simmer] ] [ [broil] ] 1if ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+MACRO: bake ( seq -- quot ) [bake] ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:  `{ \ } [ >array     ] parse-literal \ bake parsed ; parsing
+: `V{ \ } [ >vector    ] parse-literal \ bake parsed ; parsing
+:  `[ \ ] [ >quotation ] parse-literal \ bake parsed ; parsing
\ No newline at end of file
diff --git a/unmaintained/bake/fry/fry-tests.factor b/unmaintained/bake/fry/fry-tests.factor
new file mode 100755 (executable)
index 0000000..74408dc
--- /dev/null
@@ -0,0 +1,89 @@
+
+USING: tools.test math prettyprint kernel io arrays vectors sequences
+       generalizations bake bake.fry ;
+
+IN: bake.fry.tests
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: unit-test* ( input output -- ) swap unit-test ;
+
+: must-be-t ( in -- ) [ t ] swap unit-test ;
+: must-be-f ( in -- ) [ f ] swap unit-test ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+[ [ 3 + ] ] [ 3 '[ , + ] ] unit-test
+
+[ [ 1 3 + ] ] [ 1 3 '[ , , + ] ] unit-test
+
+[ [ 1 + ] ] [ 1 [ + ] '[ , @ ] ] unit-test
+
+[ [ 1 + . ] ] [ 1 [ + ] '[ , @ . ] ] unit-test
+
+[ [ + - ] ] [ [ + ] [ - ] '[ @ @ ] ] unit-test
+
+[ [ "a" write "b" print ] ]
+[ "a" "b" '[ , write , print ] ] unit-test
+
+[ [ 1 2 + 3 4 - ] ]
+[ [ + ] [ - ] '[ 1 2 @ 3 4 @ ] ] unit-test
+
+[ 1/2 ] [
+    1 '[ , _ / ] 2 swap call
+] unit-test
+
+[ { { 1 "a" "A" } { 1 "b" "B" } { 1 "c" "C" } } ] [
+    1 '[ , _ _ 3array ]
+    { "a" "b" "c" } { "A" "B" "C" } rot 2map
+] unit-test
+
+[ { { 1 "a" } { 1 "b" } { 1 "c" } } ] [
+    '[ 1 _ 2array ]
+    { "a" "b" "c" } swap map
+] unit-test
+
+[ 1 2 ] [
+    1 2 '[ _ , ] call
+] unit-test
+
+[ { { 1 "a" 2 } { 1 "b" 2 } { 1 "c" 2 } } ] [
+    1 2 '[ , _ , 3array ]
+    { "a" "b" "c" } swap map
+] unit-test
+
+: funny-dip '[ @ _ ] call ; inline
+
+[ "hi" 3 ] [ "h" "i" 3 [ append ] funny-dip ] unit-test
+
+[ { 1 2 3 } ] [
+    3 1 '[ , [ , + ] map ] call
+] unit-test
+
+[ { 1 { 2 { 3 } } } ] [
+    1 2 3 '[ , [ , [ , 1array ] call 2array ] call 2array ] call
+] unit-test
+
+{ 1 1 } [ '[ [ [ , ] ] ] ] must-infer-as
+
+[ { { { 3 } } } ] [
+    3 '[ [ [ , 1array ] call 1array ] call 1array ] call
+] unit-test
+
+[ { { { 3 } } } ] [
+    3 '[ [ [ , 1array ] call 1array ] call 1array ] call
+] unit-test
+
+! [ 10 20 30 40 '[ , V{ , { , } } , ] ] [ [ 10 V{ 20 { 30 } } 40 ] ] unit-test*
+
+[ 10 20 30 40 '[ , V{ , { , } } , ] ]
+[ [ 10 20 30 >r r> 1 narray >r >r r> r> 2 narray >vector 40 ] ]
+unit-test*
+
+[ { 1 2 3 } { 4 5 6 } { 7 8 9 } '[ , { V{ @ } { , } } ] call ]
+[
+  { 1 2 3 }
+  { V{ 4 5 6 } { { 7 8 9 } } }
+]
+unit-test*
+
diff --git a/unmaintained/bake/fry/fry.factor b/unmaintained/bake/fry/fry.factor
new file mode 100644 (file)
index 0000000..d82500e
--- /dev/null
@@ -0,0 +1,80 @@
+
+USING: kernel combinators arrays vectors quotations sequences splitting
+       parser macros sequences.deep
+       combinators.short-circuit combinators.conditional bake newfx ;
+
+IN: bake.fry
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYMBOL: _
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+DEFER: (shallow-fry)
+DEFER: shallow-fry
+
+: ((shallow-fry)) ( accum quot adder -- result )
+  >r shallow-fry r>
+  append swap dup empty?
+    [ drop ]
+    [ [ prepose ] curry append ]
+  if ; inline
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: (shallow-fry) ( accum quot -- result )
+  dup empty?
+    [ drop 1quotation ]
+    [
+      unclip
+        {
+          { \ , [ [ curry   ] ((shallow-fry)) ] }
+          { \ @ [ [ compose ] ((shallow-fry)) ] }
+          [ swap >r suffix r> (shallow-fry) ]
+        }
+      case
+    ]
+  if ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: shallow-fry ( quot -- quot' ) [ ] swap (shallow-fry) ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: deep-fry ( quot -- quot )
+  { _ } split1-last dup
+    [
+      shallow-fry [ >r ] rot
+      deep-fry    [ [ dip ] curry r> compose ] 4array concat
+    ]
+    [ drop shallow-fry ]
+  if ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: bakeable? ( obj -- ? ) { [ array? ] [ vector? ] } 1|| ;
+
+: fry-specifier? ( obj -- ? ) { , @ } member-of? ;
+
+: count-inputs ( quot -- n ) flatten [ fry-specifier? ] count ;
+
+: commas ( n -- seq ) , <repetition> ;
+
+: [fry] ( quot -- quot' )
+    [
+        {
+          { [ callable? ] [ [ count-inputs commas ] [ [fry]  ] bi append ] }
+          { [ bakeable? ] [ [ count-inputs commas ] [ [bake] ] bi append ] }
+          { [ drop t    ] [ 1quotation                                   ] }
+        }
+      1cond
+    ]
+  map concat deep-fry ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+MACRO: fry ( seq -- quot ) [fry] ;
+
+: '[ \ ] [ >quotation ] parse-literal \ fry parsed ; parsing
diff --git a/unmaintained/bake/summary.txt b/unmaintained/bake/summary.txt
new file mode 100644 (file)
index 0000000..cfc944a
--- /dev/null
@@ -0,0 +1 @@
+Bake is similar to make but with additional features
diff --git a/unmaintained/bitfields/authors.txt b/unmaintained/bitfields/authors.txt
new file mode 100644 (file)
index 0000000..f990dd0
--- /dev/null
@@ -0,0 +1 @@
+Daniel Ehrenberg
diff --git a/unmaintained/bitfields/bitfields-docs.factor b/unmaintained/bitfields/bitfields-docs.factor
new file mode 100644 (file)
index 0000000..ae67023
--- /dev/null
@@ -0,0 +1,17 @@
+USING: help.markup help.syntax ;
+IN: bitfields
+
+HELP: BITFIELD:
+{ $syntax "BITFIELD: name slot:size... ;" }
+{ $values { "name" "name of bitfield" }  { "slot" "names of slots" } { "size" "sizes of slots" } }
+{ $description "Creates a new bitfield specification, with the constructor <name> and slot accessors of the form name-slot. Slots' values can be changed by words of the form with-name-slot, with the stack effect " { $code "( newvalue bitfield -- newbitfield )" } ". The slots have the amount of space specified, in bits, after the colon. The constructor and setters do not check to make sure there is no overflow, and any inappropriately high value (except in the first field) will corrupt the bitfield. To check overflow, use " { $link POSTPONE: SAFE-BITFIELD: } " instead. Padding can be included by writing the binary number to be used as a pad in the middle of the bitfield specification. The first slot written will have the most significant digits. Note that bitfields do not form a class; they are merely integers. For efficiency across platforms, it is often the best to keep the total size at or below 29, allowing fixnums to be used on all platforms." }
+{ $see-also define-bitfield } ;
+
+HELP: define-bitfield
+{ $values { "classname" "a string" } { "slots" "slot specifications" } }
+{ $description "Defines a bitfield constructor and slot accessors and setters. The workings of these are described in more detail at " { $link POSTPONE: BITFIELD: } ". The slot specifications should be an assoc. Any key which looks like a binary number will be treated as padding." } ;
+
+HELP: SAFE-BITFIELD:
+{ $syntax "SAFE-BITFIELD: name slot:size... ;" }
+{ $values { "name" "name of bitfield" } { "slot" "name of slots" } { "size" "size in bits of slots" } }
+{ $description "Defines a bitfield in the same way as " { $link POSTPONE: BITFIELD: } " but the constructor and slot setters check for overflow." } ;
diff --git a/unmaintained/bitfields/bitfields-tests.factor b/unmaintained/bitfields/bitfields-tests.factor
new file mode 100755 (executable)
index 0000000..bbd4aa3
--- /dev/null
@@ -0,0 +1,22 @@
+USING: tools.test bitfields kernel ;
+IN: bitfields.tests
+
+SAFE-BITFIELD: foo bar:5 baz:10 111 bing:2 ;
+
+[ 21 ] [ 21 852 3 <foo> foo-bar ] unit-test
+[ 852 ] [ 21 852 3 <foo> foo-baz ] unit-test
+[ 3 ] [ 21 852 3 <foo> foo-bing ] unit-test
+
+[ 23 ] [ 21 852 3 <foo> 23 swap with-foo-bar foo-bar ] unit-test
+[ 855 ] [ 21 852 3 <foo> 855 swap with-foo-baz foo-baz ] unit-test
+[ 1 ] [ 21 852 3 <foo> 1 swap with-foo-bing foo-bing ] unit-test
+
+[ 100 0 0 <foo> ] must-fail
+[ 0 5000 0 <foo> ] must-fail
+[ 0 0 10 <foo> ] must-fail
+
+[ 100 0 with-foo-bar ] must-fail
+[ 5000 0 with-foo-baz ] must-fail
+[ 10 0 with-foo-bing ] must-fail
+
+[ BIN: 00101100000000111111 ] [ BIN: 101 BIN: 1000000001 BIN: 11 <foo> ] unit-test
diff --git a/unmaintained/bitfields/bitfields.factor b/unmaintained/bitfields/bitfields.factor
new file mode 100755 (executable)
index 0000000..90e588b
--- /dev/null
@@ -0,0 +1,111 @@
+USING: parser lexer kernel math sequences namespaces make assocs
+summary words splitting math.parser arrays sequences.next
+mirrors generalizations compiler.units ;
+IN: bitfields
+
+! Example:
+! BITFIELD: blah short:16 char:8 nothing:5 ;
+! defines <blah> blah-short blah-char blah-nothing.
+
+! An efficient bitfield has a sum of 29 bits or less
+! so it can fit in a fixnum.
+! No class is defined and there is no overflow checking.
+! The first field is the most significant.
+
+: >ranges ( slots/sizes -- slots/ranges )
+    ! range is { start length }
+    reverse 0 swap [
+        swap >r tuck >r [ + ] keep r> 2array r> swap
+    ] assoc-map nip reverse ;
+
+SYMBOL: safe-bitfields? ! default f; set at parsetime
+
+TUPLE: check< number bound ;
+M: check< summary drop "Number exceeds upper bound" ;
+
+: check< ( num cmp -- num )
+    2dup < [ drop ] [ \ check< boa throw ] if ;
+
+: ?check ( length -- )
+    safe-bitfields? get [ 2^ , \ check< , ] [ drop ] if ;
+
+: put-together ( lengths -- )
+    ! messy because of bounds checking
+    dup length 1- [ \ >r , ] times [ 0 swap ] % [
+        ?check [ \ bitor , , [ shift r> ] % ] when*
+    ] each-next \ bitor , ;
+
+: padding-name? ( string -- ? )
+    [ "10" member? ] all? ;
+
+: pad ( i name -- )
+    bin> , , \ -nrot , ;
+
+: add-padding ( names -- ) 
+    <enum>
+    [ dup padding-name? [ pad ] [ 2drop ] if ] assoc-each ;
+
+: [constructor] ( names lengths -- quot )
+    [ swap add-padding put-together ] [ ] make ;
+
+: define-constructor ( classname slots -- )
+    [ keys ] keep values [constructor]
+    >r in get constructor-word dup save-location r>
+    define ;
+
+: range>accessor ( range -- quot )
+    [
+        dup first neg , \ shift ,
+        second 2^ 1- , \ bitand ,
+    ] [ ] make ;
+
+: [accessors] ( lengths -- accessors )
+    [ range>accessor ] map ;
+
+: clear-range ( range -- num )
+    first2 dupd + [ 2^ 1- ] bi@ bitnot bitor ;
+
+: range>setter ( range -- quot )
+    [
+        \ >r , dup second ?check \ r> ,
+        dup clear-range ,
+        [ bitand >r ] %
+        first , [ shift r> bitor ] %
+    ] [ ] make ;
+
+: [setters] ( lengths -- setters )
+    [ range>setter ] map ;
+
+: parse-slots ( slotspecs -- slots )
+    [ ":" split1 string>number [ dup length ] unless* ] { } map>assoc ;
+
+: define-slots ( prefix names quots -- )
+    >r [ "-" glue create-in ] with map r>
+    [ define ] 2each ;
+
+: define-accessors ( classname slots -- )
+    dup values [accessors]
+    >r keys r> define-slots ;
+
+: define-setters ( classname slots -- )
+    >r "with-" prepend r>
+    dup values [setters]
+    >r keys r> define-slots ;
+
+: filter-pad ( slots -- slots )
+    [ drop padding-name? not ] assoc-filter ;
+
+: define-bitfield ( classname slots -- ) 
+    [
+        [ define-constructor ] 2keep
+        >ranges filter-pad [ define-setters ] 2keep define-accessors
+    ] with-compilation-unit ;
+
+: parse-bitfield ( -- )
+    scan ";" parse-tokens parse-slots define-bitfield ;
+
+: BITFIELD:
+    parse-bitfield ; parsing
+
+: SAFE-BITFIELD:
+    [ safe-bitfields? on parse-bitfield ] with-scope ; parsing
diff --git a/unmaintained/bitfields/summary.txt b/unmaintained/bitfields/summary.txt
new file mode 100644 (file)
index 0000000..fa2f7ff
--- /dev/null
@@ -0,0 +1 @@
+Simple system for specifying packed bitfields
diff --git a/unmaintained/bitfields/tags.txt b/unmaintained/bitfields/tags.txt
new file mode 100644 (file)
index 0000000..f427429
--- /dev/null
@@ -0,0 +1 @@
+extensions
diff --git a/unmaintained/combinators-lib/authors.txt b/unmaintained/combinators-lib/authors.txt
new file mode 100755 (executable)
index 0000000..6cfd5da
--- /dev/null
@@ -0,0 +1 @@
+Eduardo Cavazos
diff --git a/unmaintained/combinators-lib/lib-docs.factor b/unmaintained/combinators-lib/lib-docs.factor
new file mode 100755 (executable)
index 0000000..cde3b4d
--- /dev/null
@@ -0,0 +1,22 @@
+USING: help.syntax help.markup kernel prettyprint sequences
+quotations math ;
+IN: combinators.lib
+
+HELP: generate
+{ $values { "generator" quotation } { "predicate" quotation } { "obj" object } }
+{ $description "Loop until the generator quotation generates an object that satisfies predicate quotation." }
+{ $unchecked-example
+    "! Generate a random 20-bit prime number congruent to 3 (mod 4)"
+    "USING: combinators.lib math math.miller-rabin prettyprint ;"
+    "[ 20 random-prime ] [ 4 mod 3 = ] generate ."
+    "526367"
+} ;
+
+HELP: %chance
+{ $values { "quot" quotation } { "n" integer } }
+{ $description "Calls the quotation " { $snippet "n" } " percent of the time." }
+{ $unchecked-example
+    "USING: io ;"
+    "[ \"hello, world!  maybe.\" print ] 50 %chance"
+    ""
+} ;
diff --git a/unmaintained/combinators-lib/lib-tests.factor b/unmaintained/combinators-lib/lib-tests.factor
new file mode 100755 (executable)
index 0000000..9489798
--- /dev/null
@@ -0,0 +1,24 @@
+USING: combinators.lib kernel math random sequences tools.test continuations
+    arrays vectors ;
+IN: combinators.lib.tests
+
+[ 6 -1 ] [ 5 0 1 [ + ] [ - ] bi, bi* ] unit-test
+[ 6 -1 1 ] [ 5 0 1 1 [ + ] [ - ] [ * ] tri, tri* ] unit-test
+
+[ 5 4 ] [ 5 0 1 [ + ] [ - ] bi*, bi ] unit-test
+[ 5 4 5 ] [ 5 0 1 1 [ + ] [ - ] [ * ] tri*, tri ] unit-test
+
+[ 5 6 ] [ 5 0 1 [ + ] bi@, bi ] unit-test
+[ 5 6 7 ] [ 5 0 1 2 [ + ] tri@, tri ] unit-test
+
+[ 5 ] [ [ 10 random ] [ 5 = ] generate ] unit-test
+[ t ] [ [ 10 random ] [ even? ] generate even? ] unit-test
+
+[ { "foo" "xbarx" } ]
+[
+    { "oof" "bar" } { [ reverse ] [ "x" dup surround ] } parallel-call
+] unit-test
+
+{ 1 1 } [
+    [ even? ] [ drop 1 ] [ drop 2 ] ifte
+] must-infer-as
diff --git a/unmaintained/combinators-lib/lib.factor b/unmaintained/combinators-lib/lib.factor
new file mode 100755 (executable)
index 0000000..5e78d18
--- /dev/null
@@ -0,0 +1,141 @@
+! Copyright (C) 2007, 2008 Slava Pestov, Chris Double,
+!                          Doug Coleman, Eduardo Cavazos,
+!                          Daniel Ehrenberg.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel combinators fry namespaces make quotations hashtables
+sequences assocs arrays stack-checker effects math math.ranges
+generalizations macros continuations random locals accessors ;
+
+IN: combinators.lib
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! Currying cleave combinators
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: bi, ( obj quot quot -- quot' quot' )
+    [ [ curry ] curry ] bi@ bi ; inline
+: tri, ( obj quot quot quot -- quot' quot' quot' )
+    [ [ curry ] curry ] tri@ tri ; inline
+
+: bi*, ( obj obj quot quot -- quot' quot' )
+    [ [ curry ] curry ] bi@ bi* ; inline
+: tri*, ( obj obj obj quot quot quot -- quot' quot' quot' )
+    [ [ curry ] curry ] tri@ tri* ; inline
+
+: bi@, ( obj obj quot -- quot' quot' )
+    [ curry ] curry bi@ ; inline
+: tri@, ( obj obj obj quot -- quot' quot' quot' )
+    [ curry ] curry tri@ ; inline
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! Generalized versions of core combinators
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: quad ( x p q r s -- ) [ keep ] 3dip [ keep ] 2dip [ keep ] dip call ; inline
+
+: 4slip ( quot a b c d -- a b c d ) 4 nslip ; inline
+
+: 4keep ( w x y z quot -- w x y z ) 4 nkeep ; inline 
+
+: 2with ( param1 param2 obj quot -- obj curry )
+    with with ; inline
+
+: 3with ( param1 param2 param3 obj quot -- obj curry )
+    with with with ; inline
+
+: with* ( obj assoc quot -- assoc curry )
+    swapd [ [ -rot ] dip call ] 2curry ; inline
+
+: 2with* ( obj1 obj2 assoc quot -- assoc curry )
+    with* with* ; inline
+
+: 3with* ( obj1 obj2 obj3 assoc quot -- assoc curry )
+    with* with* with* ; inline
+
+: assoc-each-with ( obj assoc quot -- )
+    with* assoc-each ; inline
+
+: assoc-map-with ( obj assoc quot -- assoc )
+    with* assoc-map ; inline
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! ifte
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+MACRO: preserving ( predicate -- quot )
+    dup infer in>>
+    dup 1+
+    '[ _ _ nkeep _ nrot ] ;
+
+MACRO: ifte ( quot quot quot -- )
+    '[ _ preserving _ _ if ] ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! switch
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+MACRO: switch ( quot -- )
+    [ [ [ preserving ] curry ] dip ] assoc-map
+    [ cond ] curry ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+! Conceptual implementation:
+
+! : pcall ( seq quots -- seq ) [ call ] 2map ;
+
+MACRO: parallel-call ( quots -- )
+    [ '[ [ unclip @ ] dip [ push ] keep ] ] map concat
+    '[ V{ } clone @ nip >array ] ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! map-call and friends
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: (make-call-with) ( quots -- quot ) 
+    [ [ keep ] curry ] map concat [ drop ] append ;
+
+MACRO: map-call-with ( quots -- )
+    [ (make-call-with) ] keep length [ narray ] curry compose ;
+
+: (make-call-with2) ( quots -- quot )
+    [ [ 2dup >r >r ] prepend [ r> r> ] append ] map concat
+    [ 2drop ] append ;
+
+MACRO: map-call-with2 ( quots -- )
+    [
+        [ [ 2dup >r >r ] prepend [ r> r> ] append ] map concat
+        [ 2drop ] append    
+    ] keep length [ narray ] curry append ;
+
+MACRO: map-exec-with ( words -- )
+    [ 1quotation ] map [ map-call-with ] curry ;
+
+MACRO: construct-slots ( assoc tuple-class -- tuple ) 
+    [ new ] curry swap [
+        [ dip ] curry swap 1quotation [ keep ] curry compose
+    ] { } assoc>map concat compose ;
+
+: 2quot-with ( obj seq quot1 quot2 -- seq quot1 quot2 )
+    >r pick >r with r> r> swapd with ;
+
+MACRO: multikeep ( word out-indexes -- ... )
+    [
+        dup >r [ \ npick \ >r 3array % ] each
+        %
+        r> [ drop \ r> , ] each
+    ] [ ] make ;
+
+: do-while ( pred body tail -- )
+    [ tuck 2slip ] dip while ; inline
+
+: generate ( generator predicate -- obj )
+    '[ dup @ dup [ nip ] unless not ]
+    swap [ ] do-while ;
+
+MACRO: predicates ( seq -- quot/f )
+    dup [ 1quotation [ drop ] prepend ] map
+    [ [ [ dup ] prepend ] map ] dip zip [ drop f ] suffix
+    [ cond ] curry ;
+
+: %chance ( quot n -- ) 100 random > swap when ; inline
diff --git a/unmaintained/fs/authors.txt b/unmaintained/fs/authors.txt
new file mode 100755 (executable)
index 0000000..6cfd5da
--- /dev/null
@@ -0,0 +1 @@
+Eduardo Cavazos
diff --git a/unmaintained/fs/fs.factor b/unmaintained/fs/fs.factor
new file mode 100644 (file)
index 0000000..6cb9f68
--- /dev/null
@@ -0,0 +1,23 @@
+USING: alien.syntax ;
+IN: unix.linux.fs
+
+: MS_RDONLY             1    ; ! Mount read-only.
+: MS_NOSUID             2    ; ! Ignore suid and sgid bits.
+: MS_NODEV              4    ; ! Disallow access to device special files.
+: MS_NOEXEC             8    ; ! Disallow program execution.
+: MS_SYNCHRONOUS        16   ; ! Writes are synced at once.
+: MS_REMOUNT            32   ; ! Alter flags of a mounted FS.
+: MS_MANDLOCK           64   ; ! Allow mandatory locks on an FS.
+: S_WRITE               128  ; ! Write on file/directory/symlink.
+: S_APPEND              256  ; ! Append-only file.
+: S_IMMUTABLE           512  ; ! Immutable file.
+: MS_NOATIME            1024 ; ! Do not update access times.
+: MS_NODIRATIME         2048 ; ! Do not update directory access times.
+: MS_BIND               4096 ; ! Bind directory at different place.
+
+FUNCTION: int mount
+( char* special_file, char* dir, char* fstype, ulong options, void* data ) ;
+
+! FUNCTION: int umount2 ( char* file, int flags ) ;
+
+FUNCTION: int umount ( char* file ) ;
diff --git a/unmaintained/fs/tags.txt b/unmaintained/fs/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/unmaintained/golden-section/authors.txt b/unmaintained/golden-section/authors.txt
deleted file mode 100644 (file)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/unmaintained/golden-section/deploy.factor b/unmaintained/golden-section/deploy.factor
deleted file mode 100755 (executable)
index 0aa3185..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-USING: tools.deploy.config ;
-V{
-    { deploy-ui? t }
-    { deploy-io 1 }
-    { deploy-reflection 1 }
-    { deploy-compiler? t }
-    { deploy-math? t }
-    { deploy-word-props? f }
-    { deploy-c-types? f }
-    { "stop-after-last-window?" t }
-    { deploy-name "Golden Section" }
-}
diff --git a/unmaintained/golden-section/golden-section.factor b/unmaintained/golden-section/golden-section.factor
deleted file mode 100644 (file)
index 8d1e6b4..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-
-USING: kernel namespaces math math.constants math.functions math.order
-       arrays sequences
-       opengl opengl.gl opengl.glu ui ui.render ui.gadgets ui.gadgets.theme
-       ui.gadgets.cartesian colors accessors combinators.cleave
-       processing.shapes ;
-
-IN: golden-section
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-! omega(i) = 2*pi*i*(phi-1)
-
-! x(i) = 0.5*i*cos(omega(i))
-! y(i) = 0.5*i*sin(omega(i))
-
-! radius(i) = 10*sin((pi*i)/720)
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: omega ( i -- omega ) phi 1- * 2 * pi * ;
-
-: x ( i -- x ) [ omega cos ] [ 0.5 * ] bi * ;
-: y ( i -- y ) [ omega sin ] [ 0.5 * ] bi * ;
-
-: center ( i -- point ) { x y } 1arr ;
-
-: radius ( i -- radius ) pi * 720 / sin 10 * ;
-
-: color ( i -- i ) dup 360.0 / dup 0.25 1 rgba boa >fill-color ;
-
-: line-width ( i -- i ) dup radius 0.5 * 1 max glLineWidth ;
-
-: draw ( i -- ) [ center ] [ radius 1.5 * 2 * ] bi circle ;
-
-: dot ( i -- ) color line-width draw ;
-
-: golden-section ( -- ) 720 [ dot ] each ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: <golden-section> ( -- gadget )
-  <cartesian>
-    {  600 600 }       >>pdim
-    { -400 400 }       x-range
-    { -400 400 }       y-range
-    [ golden-section ] >>action ;
-
-: golden-section-window ( -- )
-  [ <golden-section> "Golden Section" open-window ] with-ui ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-MAIN: golden-section-window
diff --git a/unmaintained/golden-section/summary.txt b/unmaintained/golden-section/summary.txt
deleted file mode 100644 (file)
index 5f44091..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Golden section demo
diff --git a/unmaintained/golden-section/tags.txt b/unmaintained/golden-section/tags.txt
deleted file mode 100644 (file)
index cb5fc20..0000000
+++ /dev/null
@@ -1 +0,0 @@
-demos
diff --git a/unmaintained/if/authors.txt b/unmaintained/if/authors.txt
new file mode 100755 (executable)
index 0000000..6cfd5da
--- /dev/null
@@ -0,0 +1 @@
+Eduardo Cavazos
diff --git a/unmaintained/if/if.factor b/unmaintained/if/if.factor
new file mode 100644 (file)
index 0000000..0a90883
--- /dev/null
@@ -0,0 +1,98 @@
+
+USING: alien.syntax ;
+
+IN: unix.linux.if
+
+: IFNAMSIZ    16 ;
+: IF_NAMESIZE 16 ;
+: IFHWADDRLEN 6 ;
+
+! Standard interface flags (netdevice->flags)
+
+: IFF_UP          HEX: 1 ;             ! interface is up
+: IFF_BROADCAST   HEX: 2 ;             ! broadcast address valid
+: IFF_DEBUG      HEX: 4 ;              ! turn on debugging
+: IFF_LOOPBACK           HEX: 8 ;              ! is a loopback net
+: IFF_POINTOPOINT HEX: 10 ;            ! interface is has p-p link
+: IFF_NOTRAILERS  HEX: 20 ;            ! avoid use of trailers
+: IFF_RUNNING    HEX: 40 ;             ! interface running and carrier ok
+: IFF_NOARP      HEX: 80 ;             ! no ARP protocol
+: IFF_PROMISC    HEX: 100 ;            ! receive all packets
+: IFF_ALLMULTI           HEX: 200 ;            ! receive all multicast packets
+
+: IFF_MASTER     HEX: 400 ;            ! master of a load balancer
+: IFF_SLAVE      HEX: 800 ;            ! slave of a load balancer
+
+: IFF_MULTICAST   HEX: 1000 ;          ! Supports multicast
+
+! #define IFF_VOLATILE
+! (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_MASTER|IFF_SLAVE|IFF_RUNNING)
+
+: IFF_PORTSEL     HEX: 2000 ;           ! can set media type
+: IFF_AUTOMEDIA   HEX: 4000 ;          ! auto media select active
+: IFF_DYNAMIC    HEX: 8000 ;           ! dialup device with changing addresses
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+C-STRUCT: struct-ifmap
+  { "ulong" "mem-start" }
+  { "ulong" "mem-end" }
+  { "ushort" "base-addr" }
+  { "uchar" "irq" }
+  { "uchar" "dma" }
+  { "uchar" "port" } ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+! Hmm... the generic sockaddr type isn't defined anywhere.
+! Put it here for now.
+
+TYPEDEF: ushort sa_family_t
+
+C-STRUCT: struct-sockaddr
+  { "sa_family_t" "sa_family" }
+  { { "char" 14 } "sa_data" } ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+! C-UNION: union-ifr-ifrn { "char" IFNAMSIZ } ;
+
+C-UNION: union-ifr-ifrn { "char" 16 } ;
+
+C-UNION: union-ifr-ifru
+ "struct-sockaddr"
+!   "sockaddr"
+  "short"
+  "int"
+  "struct-ifmap"
+!   { "char" IFNAMSIZ }
+  { "char" 16 }
+  "caddr_t" ;
+
+C-STRUCT: struct-ifreq
+  { "union-ifr-ifrn" "ifr-ifrn" }
+  { "union-ifr-ifru" "ifr-ifru" } ;
+
+: ifr-name      ( struct-ifreq -- value ) struct-ifreq-ifr-ifrn ;
+
+: ifr-hwaddr   ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
+: ifr-addr     ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
+: ifr-dstaddr  ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
+: ifr-broadaddr ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
+: ifr-netmask  ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
+: ifr-flags    ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+C-UNION: union-ifc-ifcu "caddr_t" "struct-ifreq*" ;
+
+C-STRUCT: struct-ifconf
+  { "int" "ifc-len" }
+  { "union-ifc-ifcu" "ifc-ifcu" } ;
+
+: ifc-len ( struct-ifconf -- value ) struct-ifconf-ifc-len ;
+
+: ifc-buf ( struct-ifconf -- value ) struct-ifconf-ifc-ifcu ;
+: ifc-req ( struct-ifconf -- value ) struct-ifconf-ifc-ifcu ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
\ No newline at end of file
diff --git a/unmaintained/if/tags.txt b/unmaintained/if/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/unmaintained/ifreq/authors.txt b/unmaintained/ifreq/authors.txt
new file mode 100755 (executable)
index 0000000..6cfd5da
--- /dev/null
@@ -0,0 +1 @@
+Eduardo Cavazos
diff --git a/unmaintained/ifreq/ifreq.factor b/unmaintained/ifreq/ifreq.factor
new file mode 100644 (file)
index 0000000..5dc1c0f
--- /dev/null
@@ -0,0 +1,60 @@
+
+USING: kernel alien alien.c-types
+       io.sockets
+       unix
+       unix.linux.sockios
+       unix.linux.if ;
+
+IN: unix.linux.ifreq
+
+: set-if-addr ( name addr -- )
+  "struct-ifreq" <c-object>
+  rot  ascii string>alien       over set-struct-ifreq-ifr-ifrn
+  swap 0 <inet4> make-sockaddr  over set-struct-ifreq-ifr-ifru
+
+  AF_INET SOCK_DGRAM 0 socket SIOCSIFADDR rot ioctl drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: set-if-flags ( name flags -- )
+  "struct-ifreq" <c-object>
+  rot  ascii string>alien over set-struct-ifreq-ifr-ifrn
+  swap <short>          over set-struct-ifreq-ifr-ifru
+
+  AF_INET SOCK_DGRAM 0 socket SIOCSIFFLAGS rot ioctl drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: set-if-dst-addr ( name addr -- )
+  "struct-ifreq" <c-object>
+  rot  ascii string>alien       over set-struct-ifreq-ifr-ifrn
+  swap 0 <inet4> make-sockaddr  over set-struct-ifreq-ifr-ifru
+
+  AF_INET SOCK_DGRAM 0 socket SIOCSIFDSTADDR rot ioctl drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: set-if-brd-addr ( name addr -- )
+  "struct-ifreq" <c-object>
+  rot  ascii string>alien       over set-struct-ifreq-ifr-ifrn
+  swap 0 <inet4> make-sockaddr  over set-struct-ifreq-ifr-ifru
+
+  AF_INET SOCK_DGRAM 0 socket SIOCSIFBRDADDR rot ioctl drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: set-if-netmask ( name addr -- )
+  "struct-ifreq" <c-object>
+  rot  ascii string>alien       over set-struct-ifreq-ifr-ifrn
+  swap 0 <inet4> make-sockaddr  over set-struct-ifreq-ifr-ifru
+
+  AF_INET SOCK_DGRAM 0 socket SIOCSIFNETMASK rot ioctl drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: set-if-metric ( name metric -- )
+  "struct-ifreq" <c-object>
+  rot ascii string>alien over set-struct-ifreq-ifr-ifrn
+  swap <int>           over set-struct-ifreq-ifr-ifru
+
+  AF_INET SOCK_DGRAM 0 socket SIOCSIFMETRIC rot ioctl drop ;
\ No newline at end of file
diff --git a/unmaintained/ifreq/tags.txt b/unmaintained/ifreq/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/unmaintained/lsys/authors.txt b/unmaintained/lsys/authors.txt
deleted file mode 100644 (file)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/unmaintained/lsys/strings/authors.txt b/unmaintained/lsys/strings/authors.txt
deleted file mode 100755 (executable)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/unmaintained/lsys/strings/interpret/authors.txt b/unmaintained/lsys/strings/interpret/authors.txt
deleted file mode 100755 (executable)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/unmaintained/lsys/strings/interpret/interpret.factor b/unmaintained/lsys/strings/interpret/interpret.factor
deleted file mode 100644 (file)
index 8d27b29..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-
-USING: kernel sequences quotations assocs math math.parser
-       combinators.lib vars lsys.strings combinators.short-circuit ;
-
-IN: lsys.strings.interpret
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-VAR: command-table
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: exec-command ( string -- ) command-table> at >quotation call ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: command ( string -- command ) 1 head ;
-
-: parameter ( string -- parameter )
-  [ drop 2 ] [ length 1- ] [ ] tri subseq string>number ;
-
-: exec-command* ( string -- )
-  [ parameter ] [ command ] bi
-  command-table> at dup
-  [ 1 tail* call ] [ 2drop ] if ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: (interpret) ( slice -- )
-  { { [ empty? ]     [ drop ] }
-    { [ has-param? ] [ next+rest* [ exec-command* ] [ (interpret) ] bi* ] }
-    { [ t ]          [ next+rest  [ exec-command  ] [ (interpret) ] bi* ] } }
-  switch ;
-
-: interpret ( string -- ) <flat-slice> (interpret) ;
diff --git a/unmaintained/lsys/strings/rewrite/authors.txt b/unmaintained/lsys/strings/rewrite/authors.txt
deleted file mode 100755 (executable)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/unmaintained/lsys/strings/rewrite/rewrite.factor b/unmaintained/lsys/strings/rewrite/rewrite.factor
deleted file mode 100644 (file)
index 622a86c..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-
-USING: kernel sbufs strings sequences assocs math
-       combinators.lib vars lsys.strings combinators.short-circuit ;
-
-IN: lsys.strings.rewrite
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-VAR: rules
-
-: lookup ( str -- str ) [ 1 head rules> at ] [ ] bi or ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-VAR: accum
-
-: push-next ( next -- ) lookup accum> push-all ;
-
-: (rewrite) ( slice -- )
-  { { [ empty? ]     [ drop ] }
-    { [ has-param? ] [ next+rest* [ push-next ] [ (rewrite) ] bi* ] }
-    { [ t ]          [ next+rest  [ push-next ] [ (rewrite) ] bi* ] } }
-  switch ;
-
-: rewrite ( string -- string )
-  dup length 10 * <sbuf> >accum
-  <flat-slice> (rewrite)
-  accum> >string ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-VAR: result
-
-: iterate ( -- ) result> rewrite >result ;
-
-: iterations ( n -- ) [ iterate ] times ;
diff --git a/unmaintained/lsys/strings/strings.factor b/unmaintained/lsys/strings/strings.factor
deleted file mode 100644 (file)
index 603c6cc..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-
-USING: kernel sequences math combinators.lib combinators.short-circuit ;
-
-IN: lsys.strings
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: has-param? ( slice -- ? ) { [ length 1 > ] [ second CHAR: ( = ] } 1&& ;
-
-: next+rest ( slice -- next rest ) [ 1 head ] [ 1 tail-slice ] bi ;
-
-: index-rest ( slice -- i ) CHAR: ) swap index 1+ ;
-
-: next+rest* ( slice -- next rest ) dup index-rest [ head ] [ tail-slice ] 2bi ;
diff --git a/unmaintained/lsys/summary.txt b/unmaintained/lsys/summary.txt
deleted file mode 100644 (file)
index 2615e85..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Lindenmayer system explorer
diff --git a/unmaintained/lsys/tags.txt b/unmaintained/lsys/tags.txt
deleted file mode 100644 (file)
index bf31fdb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-applications
diff --git a/unmaintained/lsys/tortoise/authors.txt b/unmaintained/lsys/tortoise/authors.txt
deleted file mode 100755 (executable)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/unmaintained/lsys/tortoise/graphics/authors.txt b/unmaintained/lsys/tortoise/graphics/authors.txt
deleted file mode 100755 (executable)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/unmaintained/lsys/tortoise/graphics/graphics.factor b/unmaintained/lsys/tortoise/graphics/graphics.factor
deleted file mode 100644 (file)
index ab679c8..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-
-USING: kernel math vectors sequences opengl.gl math.vectors math.order
-       math.matrices vars opengl self pos ori turtle lsys.tortoise
-
-       lsys.strings.interpret combinators.short-circuit ;
-
-       ! lsys.strings
-
-IN: lsys.tortoise.graphics
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-! (v0 - v1) x (v1 - v2)
-
-: polygon-normal ( {_v0_v1_v2_} -- normal ) first3 dupd v- -rot v- swap cross ;
-
-: (polygon) ( vertices -- )
-GL_POLYGON glBegin
-dup polygon-normal gl-normal [ gl-vertex ] each
-glEnd ;
-
-: polygon ( vertices -- ) dup length 3 >= [ (polygon) ] [ drop ] if ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-VAR: vertices
-
-! : init-vertices ( -- ) 0 <vector> >vertices ;
-
-: start-polygon ( -- ) vertices> delete-all ;
-
-: finish-polygon ( -- ) vertices> polygon ;
-
-: polygon-vertex ( -- ) pos> vertices> push ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: record-vertex ( -- ) pos> gl-vertex ;
-
-: draw-forward ( length -- )
-GL_LINES glBegin record-vertex step-turtle record-vertex glEnd ;
-
-: move-forward ( length -- ) step-turtle polygon-vertex ;
-
-: sneak-forward ( length -- ) step-turtle ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: scale-len ( m -- ) len> * >len ;
-
-: scale-angle ( m -- ) angle> * >angle ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: set-thickness ( i -- ) dup >thickness glLineWidth ;
-
-: scale-thickness ( m -- ) thickness> * 0.5 max set-thickness ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-VAR: color-table
-
-: init-color-table ( -- )
-{ { 0    0    0 }    ! black
-  { 0.5  0.5  0.5 }  ! grey
-  { 1    0    0 }    ! red
-  { 1    1    0 }    ! yellow
-  { 0    1    0 }    ! green
-  { 0.25 0.88 0.82 } ! turquoise
-  { 0    0    1 }    ! blue
-  { 0.63 0.13 0.94 } ! purple
-  { 0.00 0.50 0.00 } ! dark green
-  { 0.00 0.82 0.82 } ! dark turquoise
-  { 0.00 0.00 0.50 } ! dark blue
-  { 0.58 0.00 0.82 } ! dark purple
-  { 0.50 0.00 0.00 } ! dark red
-  { 0.25 0.25 0.25 } ! dark grey
-  { 0.75 0.75 0.75 } ! medium grey
-  { 1    1    1 }    ! white
-} [ 1 suffix ] map >color-table ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: material-color ( color -- )
-GL_FRONT_AND_BACK GL_AMBIENT_AND_DIFFUSE rot gl-material ;
-
-: set-color ( i -- )
-dup >color color-table> nth dup gl-color material-color ;
-
-: inc-color ( -- ) color> 1+ set-color ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-VAR: tortoise-stack
-
-! : init-tortoise-stack ( -- ) V{ } clone >tortoise-stack ;
-
-! : save-tortoise ( -- ) self> tortoise-stack> push ;
-
-! : save-tortoise ( -- ) self> tortoise-stack> push   self> clone >self ;
-
-: save-tortoise ( -- ) self> clone tortoise-stack> push ;
-
-: restore-tortoise ( -- )
-tortoise-stack> pop >self
-color> set-color
-thickness> set-thickness ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-VAR: default-values
-VAR: model-values
-
-: lparser-dialect ( -- )
-
-[ 1 >len   45 >angle   1 >thickness   2 >color ] >default-values
-
-H{ { "+" [ angle>     turn-left ] }
-   { "-" [ angle>     turn-right ] }
-   { "&" [ angle>     pitch-down ] }
-   { "^" [ angle>     pitch-up ] }
-   { "<" [ angle>     roll-left ] }
-   { ">" [ angle>     roll-right ] }
-
-   { "|" [ 180.0         rotate-y ] }
-   { "%" [ 180.0         rotate-z ] }
-   { "$" [ roll-until-horizontal ]  }
-
-   { "F" [ len>     draw-forward ] }
-   { "Z" [ len> 2 / draw-forward ] }
-   { "f" [ len>     move-forward ] }
-   { "z" [ len> 2 / move-forward ] }
-   { "g" [ len>     sneak-forward ] }
-   { "." [ polygon-vertex ] }
-
-   { "[" [ save-tortoise ] }
-   { "]" [ restore-tortoise ] }
-   { "{" [ start-polygon ] }
-   { "}" [ finish-polygon ] }
-
-   { "/" [ 1.1 scale-len ] } ! double quote command in lparser
-   { "'" [ 0.9 scale-len ] }
-   { ";" [ 1.1 scale-angle ] }
-   { ":" [ 0.9 scale-angle ] }
-   { "?" [ 1.4 scale-thickness ] }
-   { "!" [ 0.7 scale-thickness ] }
-
-   { "c" [ color> 1 + color-table> length mod set-color ] }
-
-} >command-table ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
diff --git a/unmaintained/lsys/tortoise/tortoise.factor b/unmaintained/lsys/tortoise/tortoise.factor
deleted file mode 100644 (file)
index 8c4ac60..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-
-USING: kernel generic math arrays
-       math.matrices generic.lib pos ori self turtle ;
-
-IN: lsys.tortoise
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-TUPLE: tortoise angle len thickness color ;
-
-: <tortoise> ( -- tortoise )
-    <turtle> tortoise construct-delegate ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: angle> ( -- val ) self> tortoise-angle ;
-
-: >angle ( val -- ) self> set-tortoise-angle ;
-
-: len> ( -- val ) self> tortoise-len ;
-
-: >len ( val -- ) self> set-tortoise-len ;
-
-: thickness> ( -- val ) self> tortoise-thickness ;
-
-: >thickness ( val -- ) self> set-tortoise-thickness ;
-
-: color> ( -- val ) self> tortoise-color ;
-
-: >color ( val -- ) self> set-tortoise-color ;
-
diff --git a/unmaintained/lsys/ui/authors.txt b/unmaintained/lsys/ui/authors.txt
deleted file mode 100755 (executable)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/unmaintained/lsys/ui/deploy.factor b/unmaintained/lsys/ui/deploy.factor
deleted file mode 100755 (executable)
index 4db8cf9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-USING: tools.deploy.config ;
-V{
-    { deploy-ui? t }
-    { deploy-io 1 }
-    { deploy-reflection 2 }
-    { deploy-compiler? t }
-    { deploy-math? t }
-    { deploy-word-props? t }
-    { deploy-word-defs? t }
-    { deploy-c-types? f }
-    { "stop-after-last-window?" t }
-    { deploy-name "Lindenmayer System Explorer" }
-}
diff --git a/unmaintained/lsys/ui/tags.txt b/unmaintained/lsys/ui/tags.txt
deleted file mode 100644 (file)
index cb5fc20..0000000
+++ /dev/null
@@ -1 +0,0 @@
-demos
diff --git a/unmaintained/lsys/ui/ui.factor b/unmaintained/lsys/ui/ui.factor
deleted file mode 100644 (file)
index 832f7b9..0000000
+++ /dev/null
@@ -1,507 +0,0 @@
-
-USING: kernel namespaces threads math math.order math.vectors
-       quotations sequences
-       opengl
-       opengl.gl
-       colors
-       ui
-       ui.gestures
-       ui.gadgets
-       ui.gadgets.packs
-       ui.gadgets.labels
-       ui.gadgets.buttons
-       ui.gadgets.lib
-       ui.gadgets.slate
-       ui.gadgets.theme
-       vars rewrite-closures
-       self pos ori turtle opengl.camera
-       lsys.tortoise lsys.tortoise.graphics
-       lsys.strings.rewrite lsys.strings.interpret
-       combinators.short-circuit accessors ;
-
-       ! lsys.strings
-       ! lsys.strings.rewrite
-       ! lsys.strings.interpret
-
-IN: lsys.ui
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-VAR: slate
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-VAR: camera
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-VAR: model
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: display ( -- )
-
-black set-clear-color GL_COLOR_BUFFER_BIT glClear
-
-GL_FLAT glShadeModel
-
-GL_PROJECTION glMatrixMode
-glLoadIdentity
--1 1 -1 1 1.5 200 glFrustum
-
-GL_MODELVIEW glMatrixMode
-
-glLoadIdentity
-
-camera> do-look-at
-
-GL_FRONT_AND_BACK GL_LINE glPolygonMode
-
-white color>raw glColor4d
-
-! white set-color
-
-GL_LINES glBegin { 0 0 0 } gl-vertex { 0 0 1 } gl-vertex glEnd
-
-color> set-color
-
-model> glCallList ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: result>model ( -- )
-slate> find-gl-context
-model> GL_COMPILE glNewList result> interpret glEndList ;
-
-: build-model ( -- )
-tortoise-stack> delete-all
-vertices> delete-all
-reset-turtle
-default-values> call
-model-values> call
-result>model
-[ display ] closed-quot slate> set-slate-action
-slate> relayout-1 ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-USING: hashtables namespaces.lib ui.gadgets.handler ;
-
-: camera-action ( quot -- quot )
-[ drop [ ] camera> with-self slate> relayout-1 ] make* closed-quot ;
-
-VAR: frame
-VAR: handler
-
-DEFER: model-chooser
-DEFER: scene-chooser
-DEFER: empty-model
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: lsys-controller ( -- )
-
-<pile>
-
-{
-
-[ "Load" <label> reverse-video-theme ]
-
-[ "Models" <label> [ drop model-chooser ] closed-quot <bevel-button> ]
-[ "Scenes" <label> [ drop scene-chooser ] closed-quot <bevel-button> ]
-
-[ "Model" <label> reverse-video-theme ]
-
-[ "Iterate" <label> [ drop iterate build-model ] closed-quot <bevel-button> ]
-[ "Build model" <label> [ drop build-model ] closed-quot <bevel-button> ]
-
-[ "Camera" <label> reverse-video-theme ]
-
-[ "Turn left" <label> [ 5 turn-left ] camera-action <bevel-button> ]
-[ "Turn right" <label> [ 5 turn-right ] camera-action <bevel-button> ]
-[ "Pitch down" <label> [ 5 pitch-down ] camera-action <bevel-button> ]
-[ "Pitch up" <label> [ 5 pitch-up ] camera-action <bevel-button> ]
-
-[ "Forward - a"  <label> [  1 step-turtle ] camera-action <bevel-button> ]
-[ "Backward - z" <label> [ -1 step-turtle ] camera-action <bevel-button> ]
-
-[ "Roll left - q" <label> [ 5 roll-left ] camera-action <bevel-button> ]
-[ "Roll right - w" <label> [ 5 roll-right ] camera-action <bevel-button> ]
-
-[ "Strafe left - (alt)" <label> [ 1 strafe-left ] camera-action <bevel-button> ]
-[ "Strafe right - (alt)" <label> [ 1 strafe-right ] camera-action <bevel-button> ]
-[ "Strafe down - (alt)" <label> [ 1 strafe-up ] camera-action <bevel-button> ]
-[ "Strafe up - (alt)" <label> [ 1 strafe-down ] camera-action <bevel-button> ]
-
-[ "View 1 - 1" <label>
-  [ pos> norm reset-turtle 90 turn-left step-turtle 180 turn-left ]
-  camera-action <bevel-button> ]
-
-[ "View 2 - 2" <label>
-  [ pos> norm reset-turtle 90 pitch-up step-turtle 180 pitch-down ]
-  camera-action <bevel-button> ]
-
-[ "View 3 - 3" <label>
-  [ pos> norm reset-turtle step-turtle 180 turn-left ]
-  camera-action <bevel-button> ]
-
-[ "View 4 - 4" <label>
-  [ pos> norm reset-turtle 45 turn-left 45 pitch-up step-turtle 180 turn-left ]
-  camera-action <bevel-button> ]
-
-}
-
-[ call add-gadget ] each
-1 >>fill
-"L-system control" open-window ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: lsys-viewer ( -- )
-
-[ ] <slate> >slate
-{ 400 400 } clone slate> set-slate-pdim
-
-slate> <handler>
-
-{
-
-{ T{ key-down f f "LEFT" }  [ [ 5 turn-left ] camera-action ] }
-{ T{ key-down f f "RIGHT" } [ [ 5 turn-right ] camera-action ] }
-{ T{ key-down f f "UP" }    [ [ 5 pitch-down ] camera-action ] }
-{ T{ key-down f f "DOWN" }  [ [ 5 pitch-up ] camera-action ] }
-
-{ T{ key-down f f "a" } [ [ 1 step-turtle ] camera-action ] }
-{ T{ key-down f f "z" } [ [ -1 step-turtle ] camera-action ] }
-
-{ T{ key-down f f "q" } [ [ 5 roll-left ] camera-action ] }
-{ T{ key-down f f "w" } [ [ 5 roll-right ] camera-action ] }
-
-{ T{ key-down f { A+ } "LEFT" }  [ [ 1 strafe-left ] camera-action ] }
-{ T{ key-down f { A+ } "RIGHT" } [ [ 1 strafe-right ] camera-action ] }
-{ T{ key-down f { A+ } "UP" }    [ [ 1 strafe-up ] camera-action ] }
-{ T{ key-down f { A+ } "DOWN" }  [ [ 1 strafe-down ] camera-action ] }
-
-{ T{ key-down f f "1" }
-  [ [ pos> norm reset-turtle 90 turn-left step-turtle 180 turn-left ]
-    camera-action ] }
-
-{ T{ key-down f f "2" }
-  [ [ pos> norm reset-turtle 90 pitch-up step-turtle 180 pitch-down ]
-    camera-action ] }
-
-{ T{ key-down f f "3" }
-[ [ pos> norm reset-turtle step-turtle 180 turn-left ]
-    camera-action ] }
-
-{ T{ key-down f f "4" }
-[ [ pos> norm reset-turtle 45 turn-left 45 pitch-up step-turtle 180 turn-left ]
-    camera-action ] }
-
-} [ make* ] map >hashtable >>table
-
-"L-system view" open-window
-
-500 sleep
-
-slate> find-gl-context
-1 glGenLists >model
-
-<turtle> >camera
-
-[ camera> >self
-  reset-turtle 45 turn-left 45 pitch-up 5 step-turtle 180 turn-left
-] with-scope
-
-init-color-table
-
-<tortoise> >self
-
-V{ } clone >tortoise-stack
-
-V{ } clone >vertices
-
-empty-model
-
-build-model
-
-;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-! Examples
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: koch ( -- ) lparser-dialect   [ 90 >angle ] >model-values
-
-H{ { "K" "[[a|b] '(0.41)f'(2.439) |<(60) [a|b]]" }
-   { "k" "[ c'(0.5) K]" }
-   { "a" "[d <(120) d <(120) d ]" }
-   { "b" "e" }
-   { "e" "[^ '(.2887)f'(3.4758) &(180)      +z{.-(120)f-(120)f}]" }
-   { "d" "[^ '(.2887)f'(3.4758) &(109.5111) +zk{.-(120)f-(120)f}]" }
-} >rules
-
-"K" >result ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: spiral-0 ( -- ) lparser-dialect   [ 10 >angle 5 >thickness ] >model-values
-
-"[P]|[P]" >result
-
-H{ { "P" "[A]>>>>>>>>>[cB]>>>>>>>>>[ccC]>>>>>>>>>[cccD]" }
-   { "A" "F+;'A" }
-   { "B" "F!+F+;'B" }
-   { "C" "F!^+F^+;'C" }
-   { "D" "F!>^+F>^+;'D" }
-} >rules ;
-
-: spiral-0-scene ( -- )
-spiral-0
-22 iterations
-build-model
-[ reset-turtle 90 turn-left 16 step-turtle 180 turn-left ]
-camera> with-self slate> relayout-1 ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: tree-5 ( -- ) lparser-dialect   [ 5 >angle   1 >thickness ] >model-values
-
-"c(4)FFS" >result
-
-H{ { "S" "FFR>(60)R>(60)R>(60)R>(60)R>(60)R>(30)S" }
-   { "R" "[Ba]" }
-   { "a" "$tF[Cx]Fb" }
-   { "b" "$tF[Dy]Fa" }
-   { "B" "&B" }
-   { "C" "+C" }
-   { "D" "-D" }
-
-   { "x" "a" }
-   { "y" "b" }
-
-   { "F" "'(1.25)F'(.8)" }
-} >rules ;
-
-: tree-5-scene ( -- )
-tree-5
-9 iterations
-build-model
-[ reset-turtle 90 pitch-down -70 step-turtle 50 strafe-up ] camera> with-self
-slate> relayout-1 ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: abop-1 ( -- ) lparser-dialect   [ 45 >angle   5 >thickness ] >model-values
-
-H{ { "A" "F[&'(.8)!BL]>(137)'!(.9)A" }
-   { "B" "F[-'(.8)!(.9)$CL]'!(.9)C" }
-   { "C" "F[+'(.8)!(.9)$BL]'!(.9)B" }
-
-   { "L" "~c(8){+(30)f-(120)f-(120)f}" }
-} >rules
-
-"c(12)FFAL" >result ;
-
-: abop-1-scene ( -- )
-abop-1
-8 iterations
-build-model
-[ reset-turtle
-  90 pitch-up 7 step-turtle 90 pitch-down 4 step-turtle 90 pitch-down ]
-camera> with-self slate> relayout-1 ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: abop-2 ( -- ) lparser-dialect   [ 30 >angle   5 >thickness ] >model-values
-
-H{ { "A" "F[&'(.7)!BL]>(137)[&'(.6)!BL]>(137)'(.9)!(.9)A" }
-   { "B" "F[-'(.7)!(.9)$CL]'(.9)!(.9)C" }
-   { "C" "F[+'(.7)!(.9)$BL]'(.9)!(.9)B" }
-
-   { "L" "~c(8){+(45)f(.1)-(45)f(.1)-(45)f(.1)+(45)|+(45)f(.1)-(45)f(.1)-(45)f(.1)}" }
-
-} >rules
-
-"c(12)FAL" >result ;
-
-: abop-2-scene ( -- )
-abop-2
-7 iterations
-build-model
-[ reset-turtle { 0 4 4 } >pos 90 pitch-down ]
-camera> with-self slate> relayout-1 ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: abop-3 ( -- ) lparser-dialect   [ 30 >angle   5 >thickness ] >model-values
-
-H{ { "A" "!(.9)t(.4)FB>(94)B>(132)B" }
-   { "B" "[&t(.4)F$A]" }
-   { "F" "'(1.25)F'(.8)" }
-} >rules
-
-"c(12)FA" >result ;
-
-: abop-3-scene ( -- )
-abop-3 11 iterations build-model
-[ reset-turtle { 0 47 29 } >pos 90 pitch-down ] camera> with-self
-slate> relayout-1 ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: abop-4 ( -- ) lparser-dialect   [ 18 >angle   5 >thickness ] >model-values
-
-H{ { "N" "FII[&(60)rY]>(90)[&(45)'(0.8)rA]>(90)[&(60)rY]>(90)[&(45)'(0.8)rD]!FIK" }
-   { "Y" "[c(4){++l.--l.--l.++|++l.--l.--l.}]" }
-   { "l" "g(.2)l" }
-   { "K" "[!c(2)FF>w>(72)w>(72)w>(72)w>(72)w]" }
-   { "w" "[c(2)^!F][c(5)&(72){-(54)f(3)+(54)f(3)|-(54)f(3)+(54)f(3)}]" }
-   { "f" "_" }
-
-   { "A" "B" }
-   { "B" "C" }
-   { "C" "D" }
-   { "D" "E" }
-   { "E" "G" }
-   { "G" "H" }
-   { "H" "N" }
-
-   { "I" "FoO" }
-   { "O" "FoP" }
-   { "P" "FoQ" }
-   { "Q" "FoR" }
-   { "R" "FoS" }
-   { "S" "FoT" }
-   { "T" "FoU" }
-   { "U" "FoV" }
-   { "V" "FoW" }
-   { "W" "FoX" }
-   { "X" "_" }
-
-   { "o" "$t(-0.03)" }
-   { "r" "~(30)" }
-} >rules
-
-"c(12)&(20)N" >result ;
-
-: abop-4-scene ( -- )
-abop-4 21 iterations build-model
-[ reset-turtle
-  { 53 25 36 } >pos
-  { { 0.57 -0.14 -0.80 } { -0.81 -0.18 -0.54 } { -0.07 0.97 -0.22 } }
-  >ori
-] camera> with-self slate> relayout-1 ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: abop-5 ( -- ) lparser-dialect   [ 5 >angle   5 >thickness ] >model-values
-
-H{ { "a" "F[+(45)l][-(45)l]^;ca" }
-
-   { "l" "j" }
-   { "j" "h" }
-   { "h" "s" }
-   { "s" "d" }
-   { "d" "x" }
-   { "x" "a" }
-
-   { "F" "'(1.17)F'(.855)" }
-} >rules
-
-"&(90)+(90)a" >result ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: abop-6 ( -- ) lparser-dialect   [ 5 >angle   5 >thickness ] >model-values
-
-"&(90)+(90)FFF[-(120)'(.6)x][-(60)'(.8)x][+(120)'(.6)x][+(60)'(.8)x]x" >result
-
-H{ { "a" "F[cdx][cex]F!(.9)a" }
-   { "x" "a" }
-
-   { "d" "+d" }
-   { "e" "-e" }
-
-   { "F" "'(1.25)F'(.8)" }
-} >rules ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: airhorse ( -- ) lparser-dialect [ 10 >angle 5 >thickness ] >model-values
-
-"C" >result
-
-H{ { "C" "LBW" }
-
-   { "B" "[[''aH]|[g]]" }
-   { "a" "Fs+;'a" }
-   { "g" "Ft+;'g" }
-   { "s" "[::cc!!!!&&[FFcccZ]^^^^FFcccZ]" }
-   { "t" "[c!!!!&[FF]^^FF]" }
-
-   { "L" "O" }
-   { "O" "P" }
-   { "P" "Q" }
-   { "Q" "R" }
-   { "R" "U" }
-   { "U" "X" }
-   { "X" "Y" }
-   { "Y" "V" }
-   { "V" "[cc!!!&(90)[Zp]|[Zp]]" }
-   { "p" "h>(120)h>(120)h" }
-   { "h" "[+(40)!F'''p]" }
-
-   { "H" "[cccci[>(50)dcFFF][<(50)ecFFF]]" }
-   { "d" "Z!&Z!&:'d" }
-   { "e" "Z!^Z!^:'e" }
-   { "i" "-:/i" }
-
-   { "W" "[%[!!cb][<<<!!cb][>>>!!cb]]" }
-   { "b" "Fl!+Fl+;'b" }
-   { "l" "[-cc{--z++z++z--|--z++z++z}]" }
-} >rules ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: empty-model ( -- )
-lparser-dialect
-[ ] >model-values
-" " >result
-H{ } >rules ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: model-chooser ( -- )
-<pile>
-{
-[ "abop-1" <label> [ drop abop-1 build-model ] closed-quot <bevel-button> ]
-[ "abop-2" <label> [ drop abop-2 build-model ] closed-quot <bevel-button> ]
-[ "abop-3" <label> [ drop abop-3 build-model ] closed-quot <bevel-button> ]
-[ "abop-4" <label> [ drop abop-4 build-model ] closed-quot <bevel-button> ]
-[ "abop-5" <label> [ drop abop-5 build-model ] closed-quot <bevel-button> ]
-[ "abop-6" <label> [ drop abop-6 build-model ] closed-quot <bevel-button> ]
-[ "tree-5" <label> [ drop tree-5 build-model ] closed-quot <bevel-button> ]
-[ "airhorse" <label> [ drop airhorse build-model ] closed-quot <bevel-button> ]
-[ "spiral-0" <label> [ drop spiral-0 build-model ] closed-quot <bevel-button> ]
-[ "koch" <label> [ drop koch build-model ] closed-quot <bevel-button> ]
-}
-[ call add-gadget ] each
-1 >>fill
-"L-system models" open-window ;
-
-: scene-chooser ( -- )
-<pile>
-{
-[ "abop-1" <label> [ drop abop-1-scene ] closed-quot <bevel-button> ]
-[ "abop-2" <label> [ drop abop-2-scene ] closed-quot <bevel-button> ]
-[ "tree-5" <label> [ drop tree-5-scene ] closed-quot <bevel-button> ]
-}
-[ call add-gadget ] each
-1 >>fill
-"L-system scenes" open-window ;
-
-: lsys-window* ( -- )
-[ lsys-controller lsys-viewer ] with-ui ;
-
-MAIN: lsys-window*
diff --git a/unmaintained/namespaces-lib/authors.txt b/unmaintained/namespaces-lib/authors.txt
new file mode 100644 (file)
index 0000000..6cfd5da
--- /dev/null
@@ -0,0 +1 @@
+Eduardo Cavazos
diff --git a/unmaintained/namespaces-lib/lib-tests.factor b/unmaintained/namespaces-lib/lib-tests.factor
new file mode 100755 (executable)
index 0000000..d3f5a12
--- /dev/null
@@ -0,0 +1 @@
+\r
diff --git a/unmaintained/namespaces-lib/lib.factor b/unmaintained/namespaces-lib/lib.factor
new file mode 100755 (executable)
index 0000000..dfa4df2
--- /dev/null
@@ -0,0 +1,23 @@
+USING: kernel namespaces namespaces.private quotations sequences
+       assocs.lib math.parser math generalizations locals mirrors
+       macros ;
+
+IN: namespaces.lib
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: save-namestack ( quot -- ) namestack slip set-namestack ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: make* ( seq -- seq ) [ dup quotation? [ call ] [ ] if ] map ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: set* ( val var -- ) namestack* set-assoc-stack ;
+
+: make-object ( quot class -- object )
+    new [ <mirror> swap bind ] keep ; inline
+
+: with-object ( object quot -- )
+    [ <mirror> ] dip bind ; inline
diff --git a/unmaintained/namespaces-lib/summary.txt b/unmaintained/namespaces-lib/summary.txt
new file mode 100644 (file)
index 0000000..ec8129b
--- /dev/null
@@ -0,0 +1 @@
+Non-core namespace words
diff --git a/unmaintained/namespaces-lib/tags.txt b/unmaintained/namespaces-lib/tags.txt
new file mode 100644 (file)
index 0000000..42d711b
--- /dev/null
@@ -0,0 +1 @@
+collections
diff --git a/unmaintained/nehe/2/2.factor b/unmaintained/nehe/2/2.factor
deleted file mode 100644 (file)
index 29d4ccf..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-USING: arrays kernel math opengl opengl.gl opengl.glu
-opengl.demo-support ui ui.gadgets ui.render ;
-IN: nehe.2
-
-TUPLE: nehe2-gadget < gadget ;
-
-: width 256 ;
-: height 256 ;
-
-: <nehe2-gadget> (  -- gadget )
-  nehe2-gadget new-gadget ;
-
-M: nehe2-gadget pref-dim* ( gadget -- dim )
-  drop width height 2array ;
-
-M: nehe2-gadget draw-gadget* ( gadget -- )
-  drop
-  GL_PROJECTION glMatrixMode
-  glLoadIdentity
-  45.0 width height / >float 0.1 100.0 gluPerspective
-  GL_MODELVIEW glMatrixMode
-  glLoadIdentity
-  GL_SMOOTH glShadeModel
-  0.0 0.0 0.0 0.0 glClearColor
-  1.0 glClearDepth
-  GL_DEPTH_TEST glEnable
-  GL_LEQUAL glDepthFunc
-  GL_PERSPECTIVE_CORRECTION_HINT GL_NICEST glHint
-  GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT bitor glClear
-  glLoadIdentity
-  -1.5 0.0 -6.0 glTranslatef
-  GL_TRIANGLES [
-    0.0 1.0 0.0 glVertex3f
-    -1.0 -1.0 0.0 glVertex3f
-    1.0 -1.0 0.0 glVertex3f
-  ] do-state
-  3.0 0.0 0.0 glTranslatef
-  GL_QUADS [
-    -1.0 1.0 0.0 glVertex3f
-    1.0 1.0 0.0 glVertex3f
-    1.0 -1.0 0.0 glVertex3f
-    -1.0 -1.0 0.0 glVertex3f
-  ] do-state ;
-
-: run2 ( -- )
-  <nehe2-gadget> "NeHe Tutorial 2" open-window ;
diff --git a/unmaintained/nehe/2/authors.txt b/unmaintained/nehe/2/authors.txt
deleted file mode 100755 (executable)
index 44b06f9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Chris Double
diff --git a/unmaintained/nehe/3/3.factor b/unmaintained/nehe/3/3.factor
deleted file mode 100644 (file)
index 75f2e57..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-USING: arrays kernel math opengl opengl.gl opengl.glu
-opengl.demo-support ui ui.gadgets ui.render ;
-IN: nehe.3
-
-TUPLE: nehe3-gadget < gadget ;
-
-: width 256 ;
-: height 256 ;
-
-: <nehe3-gadget> (  -- gadget )
-  nehe3-gadget new-gadget ;
-
-M: nehe3-gadget pref-dim* ( gadget -- dim )
-  drop width height 2array ;
-
-M: nehe3-gadget draw-gadget* ( gadget -- )
-  drop
-  GL_PROJECTION glMatrixMode
-  glLoadIdentity
-  45.0 width height / >float 0.1 100.0 gluPerspective
-  GL_MODELVIEW glMatrixMode
-  glLoadIdentity
-  GL_SMOOTH glShadeModel
-  0.0 0.0 0.0 0.0 glClearColor
-  1.0 glClearDepth
-  GL_DEPTH_TEST glEnable
-  GL_LEQUAL glDepthFunc
-  GL_PERSPECTIVE_CORRECTION_HINT GL_NICEST glHint
-  GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT bitor glClear
-  glLoadIdentity
-  -1.5 0.0 -6.0 glTranslatef
-  GL_TRIANGLES [
-    1.0 0.0 0.0 glColor3f
-    0.0 1.0 0.0 glVertex3f
-    0.0 1.0 0.0 glColor3f
-    -1.0 -1.0 0.0 glVertex3f
-    0.0 0.0 1.0 glColor3f
-    1.0 -1.0 0.0 glVertex3f
-  ] do-state
-  3.0 0.0 0.0 glTranslatef
-  0.5 0.5 1.0 glColor3f
-  GL_QUADS [
-    -1.0 1.0 0.0 glVertex3f
-    1.0 1.0 0.0 glVertex3f
-    1.0 -1.0 0.0 glVertex3f
-    -1.0 -1.0 0.0 glVertex3f
-  ] do-state ;
-
-: run3 ( -- )
-  <nehe3-gadget> "NeHe Tutorial 3" open-window ;
diff --git a/unmaintained/nehe/3/authors.txt b/unmaintained/nehe/3/authors.txt
deleted file mode 100755 (executable)
index 44b06f9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Chris Double
diff --git a/unmaintained/nehe/4/4.factor b/unmaintained/nehe/4/4.factor
deleted file mode 100644 (file)
index fda22d2..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-USING: arrays kernel math opengl opengl.gl opengl.glu
-opengl.demo-support ui ui.gadgets ui.render threads accessors
-calendar ;
-IN: nehe.4
-
-TUPLE: nehe4-gadget < gadget rtri rquad thread quit? ;
-
-: width 256 ;
-: height 256 ;
-: redraw-interval ( -- dt ) 10 milliseconds ;
-
-: <nehe4-gadget> (  -- gadget )
-  nehe4-gadget new-gadget
-    0.0 >>rtri
-    0.0 >>rquad ;
-
-M: nehe4-gadget pref-dim* ( gadget -- dim )
-  drop width height 2array ;
-
-M: nehe4-gadget draw-gadget* ( gadget -- )
-  GL_PROJECTION glMatrixMode
-  glLoadIdentity
-  45.0 width height / >float 0.1 100.0 gluPerspective
-  GL_MODELVIEW glMatrixMode
-  glLoadIdentity
-  GL_SMOOTH glShadeModel
-  0.0 0.0 0.0 0.0 glClearColor
-  1.0 glClearDepth
-  GL_DEPTH_TEST glEnable
-  GL_LEQUAL glDepthFunc
-  GL_PERSPECTIVE_CORRECTION_HINT GL_NICEST glHint
-  GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT bitor glClear
-  glLoadIdentity
-  -1.5 0.0 -6.0 glTranslatef
-  dup rtri>> 0.0 1.0 0.0 glRotatef
-
-  GL_TRIANGLES [
-    1.0 0.0 0.0 glColor3f
-    0.0 1.0 0.0 glVertex3f
-    0.0 1.0 0.0 glColor3f
-    -1.0 -1.0 0.0 glVertex3f
-    0.0 0.0 1.0 glColor3f
-    1.0 -1.0 0.0 glVertex3f
-  ] do-state
-
-  glLoadIdentity
-
-  1.5 0.0 -6.0 glTranslatef
-  dup rquad>> 1.0 0.0 0.0 glRotatef
-  0.5 0.5 1.0 glColor3f
-  GL_QUADS [
-    -1.0 1.0 0.0 glVertex3f
-    1.0 1.0 0.0 glVertex3f
-    1.0 -1.0 0.0 glVertex3f
-    -1.0 -1.0 0.0 glVertex3f
-  ] do-state
-  [ 0.2 + ] change-rtri
-  [ 0.15 - ] change-rquad drop ;
-
-: nehe4-update-thread ( gadget -- )
-  dup quit?>> [ drop ] [
-    redraw-interval sleep
-    dup relayout-1
-    nehe4-update-thread
-  ] if ;
-
-M: nehe4-gadget graft* ( gadget -- )
-  f >>quit?
-  [ nehe4-update-thread ] curry in-thread ;
-
-M: nehe4-gadget ungraft* ( gadget -- )
-  t >>quit? drop ;
-
-: run4 ( -- )
-  <nehe4-gadget> "NeHe Tutorial 4" open-window ;
diff --git a/unmaintained/nehe/4/authors.txt b/unmaintained/nehe/4/authors.txt
deleted file mode 100755 (executable)
index 44b06f9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Chris Double
diff --git a/unmaintained/nehe/5/5.factor b/unmaintained/nehe/5/5.factor
deleted file mode 100755 (executable)
index 30d0991..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-USING: arrays kernel math opengl opengl.gl opengl.glu\r
-opengl.demo-support ui ui.gadgets ui.render threads accessors\r
-calendar ;\r
-IN: nehe.5\r
-\r
-TUPLE: nehe5-gadget < gadget rtri rquad thread quit? ;\r
-: width 256 ;\r
-: height 256 ;\r
-: redraw-interval ( -- dt ) 10 milliseconds ;\r
-\r
-: <nehe5-gadget> (  -- gadget )\r
-  nehe5-gadget new-gadget\r
-    0.0 >>rtri\r
-    0.0 >>rquad ;\r
-\r
-M: nehe5-gadget pref-dim* ( gadget -- dim )\r
-  drop width height 2array ;\r
-\r
-M: nehe5-gadget draw-gadget* ( gadget -- )\r
-  GL_PROJECTION glMatrixMode\r
-  glLoadIdentity\r
-  45.0 width height / >float 0.1 100.0 gluPerspective\r
-  GL_MODELVIEW glMatrixMode\r
-  glLoadIdentity\r
-  GL_SMOOTH glShadeModel\r
-  0.0 0.0 0.0 0.0 glClearColor\r
-  1.0 glClearDepth\r
-  GL_DEPTH_TEST glEnable\r
-  GL_LEQUAL glDepthFunc\r
-  GL_PERSPECTIVE_CORRECTION_HINT GL_NICEST glHint\r
-  GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT bitor glClear\r
-  glLoadIdentity\r
-  -1.5 0.0 -6.0 glTranslatef\r
-  dup rtri>> 0.0 1.0 0.0 glRotatef\r
-\r
-  GL_TRIANGLES [\r
-    1.0 0.0 0.0 glColor3f\r
-    0.0 1.0 0.0 glVertex3f\r
-    0.0 1.0 0.0 glColor3f\r
-    -1.0 -1.0 1.0 glVertex3f\r
-    0.0 0.0 1.0 glColor3f\r
-    1.0 -1.0 1.0 glVertex3f\r
-\r
-    1.0 0.0 0.0 glColor3f\r
-    0.0 1.0 0.0 glVertex3f\r
-    0.0 0.0 1.0 glColor3f\r
-    1.0 -1.0 1.0 glVertex3f\r
-    0.0 1.0 0.0 glColor3f\r
-    1.0 -1.0 -1.0 glVertex3f\r
-\r
-    1.0 0.0 0.0 glColor3f\r
-    0.0 1.0 0.0 glVertex3f\r
-    0.0 1.0 0.0 glColor3f\r
-    1.0 -1.0 -1.0 glVertex3f\r
-    0.0 0.0 1.0 glColor3f\r
-    -1.0 -1.0 -1.0 glVertex3f\r
-\r
-    1.0 0.0 0.0 glColor3f\r
-    0.0 1.0 0.0 glVertex3f\r
-    0.0 0.0 1.0 glColor3f\r
-    -1.0 -1.0 -1.0 glVertex3f\r
-    0.0 1.0 0.0 glColor3f\r
-    -1.0 -1.0 1.0 glVertex3f\r
-  ] do-state\r
-\r
-  glLoadIdentity\r
-\r
-  1.5 0.0 -7.0 glTranslatef\r
-  dup rquad>> 1.0 0.0 0.0 glRotatef\r
-  GL_QUADS [\r
-    0.0 1.0 0.0 glColor3f\r
-    1.0 1.0 -1.0 glVertex3f\r
-    -1.0 1.0 -1.0 glVertex3f\r
-    -1.0 1.0 1.0 glVertex3f\r
-    1.0 1.0 1.0 glVertex3f\r
-\r
-    1.0 0.5 0.0 glColor3f\r
-    1.0 -1.0 1.0 glVertex3f\r
-    -1.0 -1.0 1.0 glVertex3f\r
-    -1.0 -1.0 -1.0 glVertex3f\r
-    1.0 -1.0 -1.0 glVertex3f\r
-\r
-    1.0 0.0 0.0 glColor3f\r
-    1.0 1.0 1.0 glVertex3f\r
-    -1.0 1.0 1.0 glVertex3f\r
-    -1.0 -1.0 1.0 glVertex3f\r
-    1.0 -1.0 1.0 glVertex3f\r
-\r
-    1.0 1.0 0.0 glColor3f\r
-    1.0 -1.0 -1.0 glVertex3f\r
-    -1.0 -1.0 -1.0 glVertex3f\r
-    -1.0 1.0 -1.0 glVertex3f\r
-    1.0 1.0 -1.0 glVertex3f\r
-\r
-    0.0 0.0 1.0 glColor3f\r
-    -1.0 1.0 1.0 glVertex3f\r
-    -1.0 1.0 -1.0 glVertex3f\r
-    -1.0 -1.0 -1.0 glVertex3f\r
-    -1.0 -1.0 1.0 glVertex3f\r
-\r
-    1.0 0.0 1.0 glColor3f\r
-    1.0 1.0 -1.0 glVertex3f\r
-    1.0 1.0 1.0 glVertex3f\r
-    1.0 -1.0 1.0 glVertex3f\r
-    1.0 -1.0 -1.0 glVertex3f\r
-  ] do-state \r
-  [ 0.2 + ] change-rtri\r
-  [ 0.15 - ] change-rquad drop ;\r
-\r
-: nehe5-update-thread ( gadget -- )  \r
-  dup quit?>> [\r
-    drop\r
-  ] [\r
-    redraw-interval sleep \r
-    dup relayout-1  \r
-    nehe5-update-thread \r
-  ] if ;\r
-\r
-M: nehe5-gadget graft* ( gadget -- )\r
-  f >>quit?\r
-  [ nehe5-update-thread ] curry in-thread ;\r
-\r
-M: nehe5-gadget ungraft* ( gadget -- )\r
-  t >>quit? drop ;\r
-\r
-\r
-: run5 ( -- )\r
-  <nehe5-gadget> "NeHe Tutorial 5" open-window ;\r
diff --git a/unmaintained/nehe/5/authors.txt b/unmaintained/nehe/5/authors.txt
deleted file mode 100755 (executable)
index 44b06f9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Chris Double
diff --git a/unmaintained/nehe/authors.txt b/unmaintained/nehe/authors.txt
deleted file mode 100644 (file)
index 44b06f9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Chris Double
diff --git a/unmaintained/nehe/deploy.factor b/unmaintained/nehe/deploy.factor
deleted file mode 100755 (executable)
index 6cf9543..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-USING: tools.deploy.config ;
-V{
-    { deploy-ui? t }
-    { deploy-io 1 }
-    { deploy-reflection 1 }
-    { deploy-compiler? t }
-    { deploy-math? t }
-    { deploy-word-props? f }
-    { deploy-c-types? f }
-    { "stop-after-last-window?" t }
-    { deploy-name "NeHe OpenGL demos" }
-}
diff --git a/unmaintained/nehe/nehe.factor b/unmaintained/nehe/nehe.factor
deleted file mode 100644 (file)
index a96c024..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-USING: ui.gadgets.buttons ui.gadgets.packs ui.gadgets ui
-nehe.2 nehe.3 nehe.4 nehe.5 kernel ;
-IN: nehe
-
-: nehe-window ( -- )
-    [
-        <filled-pile>
-            "Nehe 2" [ drop run2 ] <bevel-button> add-gadget
-            "Nehe 3" [ drop run3 ] <bevel-button> add-gadget
-            "Nehe 4" [ drop run4 ] <bevel-button> add-gadget
-            "Nehe 5" [ drop run5 ] <bevel-button> add-gadget
-        "Nehe examples" open-window
-    ] with-ui ;
-
-MAIN: nehe-window
diff --git a/unmaintained/nehe/summary.txt b/unmaintained/nehe/summary.txt
deleted file mode 100644 (file)
index 7811f84..0000000
+++ /dev/null
@@ -1 +0,0 @@
-NeHe OpenGL tutorials ported to Factor
diff --git a/unmaintained/nehe/tags.txt b/unmaintained/nehe/tags.txt
deleted file mode 100644 (file)
index cb5fc20..0000000
+++ /dev/null
@@ -1 +0,0 @@
-demos
diff --git a/unmaintained/obj/alist/alist.factor b/unmaintained/obj/alist/alist.factor
new file mode 100644 (file)
index 0000000..a4e8ebb
--- /dev/null
@@ -0,0 +1,11 @@
+
+USING: arrays sequences ;
+
+IN: obj.alist
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+PREDICATE: alist < sequence [ pair? ] all? ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
diff --git a/unmaintained/obj/examples/todo/todo.factor b/unmaintained/obj/examples/todo/todo.factor
new file mode 100644 (file)
index 0000000..3d54547
--- /dev/null
@@ -0,0 +1,83 @@
+
+USING: kernel sequences sets combinators.cleave
+       obj obj.view obj.util obj.print ;
+
+IN: obj.examples.todo
+
+SYM: person types adjoin
+SYM: todo   types adjoin
+
+SYM: owners properties adjoin
+SYM: eta    properties adjoin
+SYM: notes  properties adjoin
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: slava { type person } define-object
+SYM: doug  { type person } define-object
+SYM: ed    { type person } define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: compiler-bugs
+  {
+    type todo
+    owners { slava }
+    notes  {
+             "Investitage FEP on Terrorist"
+             "Problem with cutler in VirtualBox?"
+           }
+  }
+define-object
+
+SYM: remove-old-accessors-from-core
+  {
+    type todo
+    owners { slava }
+  }
+define-object
+
+SYM: move-db-and-web-framework-to-basis
+  {
+   type todo
+   owners { slava }
+  }
+define-object
+
+SYM: remove-old-accessors-from-basis
+  {
+    type todo
+    owners { doug ed }
+  }
+define-object
+
+SYM: blas-on-bsd
+  {
+    type todo
+    owners { slava doug }
+  }
+define-object
+
+SYM: multi-methods-backend
+  {
+    type todo
+    owners { slava }
+  }
+define-object
+
+SYM: update-core-for-multi-methods { type todo owners { slava } } define-object
+SYM: update-basis-for-multi-methods { type todo } define-object
+SYM: update-extra-for-multi-methods { type todo } define-object
+
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: todo-list ( -- )
+  objects [ type -> todo = ] filter
+    [ { [ self -> ] [ owners -> ] [ eta -> ] } 1arr ]
+  map
+  { "ITEM" "OWNERS" "ETA" } prefix
+  print-table ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
diff --git a/unmaintained/obj/misc/misc.factor b/unmaintained/obj/misc/misc.factor
new file mode 100644 (file)
index 0000000..06b3056
--- /dev/null
@@ -0,0 +1,8 @@
+
+USING: kernel namespaces sequences assocs sequences.deep obj ;
+
+IN: obj.misc
+
+: related ( obj -- seq )
+  objects dupd remove [ get values flatten member? ] with filter ;
+
diff --git a/unmaintained/obj/obj.factor b/unmaintained/obj/obj.factor
new file mode 100644 (file)
index 0000000..a4af627
--- /dev/null
@@ -0,0 +1,45 @@
+
+USING: kernel words namespaces arrays vectors hashtables
+       sequences assocs sets grouping
+       combinators.conditional
+       combinators.short-circuit
+       obj.util obj.alist ;
+
+IN: obj
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: properties ( -- properties ) V{ } ;
+
+SYM: self  properties adjoin
+SYM: type  properties adjoin
+SYM: title properties adjoin
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: types ( -- types ) V{ } ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: >obj ( val -- obj ) [ symbol? ] [ get ] [ ] 1if ;
+
+: -> ( obj pro -- val ) swap >obj at ;
+
+PREDICATE: obj < alist { [ self -> ] [ type -> ] } 1&& ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: objects ( -- objects ) V{ } ;
+
+: define-object ( symbol table -- )
+  2 group >vector
+  self rot 2array prefix
+  dup dup self -> set-global
+  self -> objects adjoin ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+PREDICATE: ptr < symbol get obj? ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
diff --git a/unmaintained/obj/papers/papers.factor b/unmaintained/obj/papers/papers.factor
new file mode 100644 (file)
index 0000000..46683ad
--- /dev/null
@@ -0,0 +1,178 @@
+
+USING: sets obj obj.util obj.view ;
+
+IN: obj.papers
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: title        properties adjoin
+SYM: abstract     properties adjoin
+SYM: authors      properties adjoin
+SYM: file         properties adjoin
+SYM: date         properties adjoin
+SYM: participants properties adjoin
+SYM: description  properties adjoin
+
+SYM: chapter      properties adjoin
+SYM: section      properties adjoin
+SYM: paragraph    properties adjoin
+SYM: content      properties adjoin
+
+SYM: subjects     properties adjoin
+SYM: source       properties adjoin
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: paper  types adjoin
+SYM: person types adjoin
+SYM: event  types adjoin
+
+SYM: excerpt types adjoin
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: bay-wei-chang       { type person } define-object
+SYM: chuck-moore         { type person } define-object
+SYM: craig-chambers      { type person } define-object
+SYM: david-ungar         { type person } define-object
+SYM: frank-g-halasz      { type person } define-object
+SYM: gerald-jay-sussman  { type person } define-object
+SYM: guy-lewis-steele-jr { type person } define-object
+SYM: randall-b-smith     { type person } define-object
+SYM: randall-h-trigg     { type person } define-object
+SYM: robert-adams        { type person } define-object
+SYM: russell-noftsker    { type person } define-object
+SYM: thomas-p-moran      { type person } define-object
+SYM: urs-holzle          { type person } define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: programming-as-an-experience
+  {
+    type     paper
+    title    "Programming as an Experience: The Inspiration for Self"
+    abstract "The Self system attempts to integrate intellectual and non-intellectual aspects of programming to create an overall experience. The language semantics, user interface, and implementation each help create this integrated experience. The language semantics embed the programmer in a uniform world of simple ob jects that can be modified without appealing to definitions of abstractions. In a similar way, the graphical interface puts the user into a uniform world of tangible objects that can be directly manipulated and changed without switching modes. The implementation strives to support the world-of-objects illusion by minimiz ing perceptible pauses and by providing true source-level semantics without sac rificing performance. As a side benefit, it encourages factoring. Although we see areas that fall short of the vision, on the whole, the language, interface, and im plementation conspire so that the Self programmer lives and acts in a consistent and malleable world of objects."
+    authors  { randall-b-smith david-ungar }
+    date     1995
+  }
+define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: self-the-power-of-simplicity
+  {
+    type paper
+    title "Self: The Power of Simplicity"
+    abstract "Self is an object-oriented language for exploratory programming based on a small number of simple and concrete ideas: prototypes, slots, and behavior. Prototypes combine inheritance and instantiation to provide a framework that is simpler and more flexible than most object-oriented languages. Slots unite variables and procedures into a single construct. This permits the inheritance hierarchy to take over the function of lexical scoping in conventional languages. Finally, because Self does not distinguish state from behavior, it narrows the gaps between ordinary objects, procedures, and closures. Self's simplicity and expressiveness offer new insights into object-oriented computation."
+    authors { randall-b-smith david-ungar }
+    date 1987
+  }
+define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: parents-are-shared-parts
+  {
+    type paper
+    title "Parents are Shared Parts: Inheritance and Encapsulation in Self"
+    abstract "The design of inheritance and encapsulation in Self, an object-oriented language based on prototypes, results from understanding that inheritance allows parents to be shared parts of their children. The programmer resolves ambiguities arising from multiple inheritance by prioritizing an object's parents. Unifying unordered and ordered multiple inheritance supports differential programming of abstractions and methods, combination of unrelated abstractions, unequal combination of abstractions, and mixins. In Self, a private slot may be accessed if the sending method is a shared part of the receiver, allowing privileged communication between related objects. Thus, classless Self enjoys the benefits of class-based encapsulation."
+    authors { craig-chambers david-ungar bay-wei-chang urs-holzle }
+    date 1991
+  }
+define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: organizing-programs-without-classes
+  {
+    type paper
+    title "Organizing Programs Without Classes"
+    abstract "All organizational functions carried out by classes can be accomplished in a simple and natural way by object inheritance in classless languages, with no need for special mechanisms. A single model--dividing types into prototypes and traits--supports sharing of behavior and extending or replacing representations. A natural extension, dynamic object inheritance, can model behavioral modes. Object inheritance can also be used to provide structured name spaces for well-known objects. Classless languages can even express 'class-based' encapsulation. These stylized uses of object inheritance become instantly recognizable idioms, and extend the repertory of organizing principles to cover a wider range of programs."
+    authors { david-ungar craig-chambers bay-wei-chang urs-holzle }
+    date 1991
+  }
+define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: scheme-an-interpreter-for-extended-lambda-calculus
+  {
+    type paper
+    title "Scheme: An Interpreter for Extended Lambda Calculus"
+    abstract "Inspired by ACTORS [Greif and Hewitt] [Smith and Hewitt], we have implemented an interpreter for a LISP-like language, SCHEME, based on the lambda calculus [Church], but extended for side effects, multiprocessing, and process synchronization. The purpose of this implementation is tutorial. We wish to: (1) alleviate the confusion caused by Micro-PLANNER, CONNIVER, etc. by clarifying the embedding of non-recursive control structures in a recursive host language like LISP. (2) explain how to use these control structures, independent of such issues as pattern matching and data base manipulation. (3) have a simple concrete experimental domain for certain issues of programming semantics and style."
+    authors { gerald-jay-sussman guy-lewis-steele-jr }
+    date 1975
+  }
+define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: symbolics-is-founded
+  {
+    type         event
+    participants { russell-noftsker robert-adams }
+    date         1980
+  }
+define-object
+
+SYM: symbolics-funding-from-gi
+  {
+    type        event
+    description "Symbolics receives $500,000 from General Instruments"
+    date        1982
+  }
+define-object
+
+SYM: symbolics-files-for-bankruptcy
+  {
+    type event
+    date "1993-01-28"
+  }
+define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: the-evolution-of-forth
+  {
+    type paper
+    title "The Evolution of Forth"
+    authors { chuck-moore "elizabeth-d-rather" "donald-r-colburn" }
+    abstract
+    "Forth is unique among programming languages in that its development and proliferation has been a grass-roots effort unsupported by any major corporate or academic sponsors. Originally conceived and developed by a single individual, its later development has progressed under two significant influences: professional programmers who developed tools to solve application problems and then commercialized them, and the interests of hobbyists concerned with free distribution of Forth. These influences have produced a language markedly different from traditional programming languages."
+    date 1993
+  }
+define-object
+
+SYM: first-complete-stand-alone-forth
+  {
+    type event
+    participants { chuck-moore }
+    date 1971
+  }
+define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: notecards-in-a-nutshell
+  {
+    type paper
+    authors { frank-g-halasz thomas-p-moran randall-h-trigg }
+    date 1987
+  }
+define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: the-evolution-of-forth-excerpt-2-1-1
+  {
+    type excerpt
+    source the-evolution-of-forth
+    chapter 2
+    section 1
+    paragraph 1
+    content
+    "Moore developed the first complete, stand-alone implementation of Forth in 1971 for the 11-meter radio telescope operated by the National Radio Astronomy Observatory (NRAO) at Kitt Peak, Arizona. This system ran on two early minicomputers (a 16 KB DDP-116 and a 32 KB H316) joined by a serial link. Both a multiprogrammed system and a multiprocessor system (in that both computers shared responsibility for controlling the telescope and its scientific instruments), it was responsible for pointing and tracking the telescope, collecting data and recording it on magnetic tape, and supporting an interactive graphics terminal on which an astronomer could analyze previously recorded data. The multiprogrammed nature of the system allowed all these functions to be performed concurrently, without timing conflicts or other interference."
+    subjects { chuck-moore first-complete-stand-alone-forth }
+  }
+define-object
+
diff --git a/unmaintained/obj/print/print.factor b/unmaintained/obj/print/print.factor
new file mode 100644 (file)
index 0000000..000e161
--- /dev/null
@@ -0,0 +1,37 @@
+
+USING: kernel arrays strings sequences assocs io io.styles prettyprint colors
+       combinators.conditional ;
+
+IN: obj.print
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: write-wrapped ( string -- ) H{ { wrap-margin 500 } } [ write ] with-nesting ;
+
+! : print-elt ( val -- )
+!   {
+!     { [ string? ] [ write-wrapped ] }
+!     { [ array?  ] [ [ . ] each    ] }
+!     { [ drop t  ] [ . ] }
+!   }
+!   1cond ;
+
+USING: accessors vocabs help.markup ;
+
+: print-elt ( val -- )
+  {
+    { [ vocab?  ] [ [ name>> ] [ ] bi write-object ] }
+    { [ string? ] [ write-wrapped ] }
+    { [ array?  ] [ [ . ] each    ] }
+    { [ drop t  ] [ . ] }
+  }
+  1cond ;
+
+: print-grid ( grid -- )
+  H{ { table-gap { 10 10 } } { table-border T{ rgba f 0 0 0 1 } } }
+  [ [ [ [ [ print-elt ] with-cell ] each ] with-row ] each ] tabular-output ;
+
+: print-table ( assoc -- ) >alist print-grid ;
+
+: print-seq ( seq -- ) [ 1array ] map print-grid ;
+
diff --git a/unmaintained/obj/util/util.factor b/unmaintained/obj/util/util.factor
new file mode 100644 (file)
index 0000000..086fcd1
--- /dev/null
@@ -0,0 +1,8 @@
+
+USING: kernel parser words ;
+
+IN: obj.util
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: SYM: CREATE-WORD dup define-symbol parsed ; parsing
\ No newline at end of file
diff --git a/unmaintained/obj/view/view.factor b/unmaintained/obj/view/view.factor
new file mode 100644 (file)
index 0000000..cf5ca33
--- /dev/null
@@ -0,0 +1,52 @@
+
+USING: kernel words namespaces arrays sequences prettyprint
+       help.topics help.markup bake combinators.cleave
+       obj obj.misc obj.print ;
+
+IN: obj.view
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: $tab ( seq -- ) first print-table ;
+: $obj ( seq -- ) first print-table ;
+: $seq ( seq -- ) first print-seq   ;
+: $ptr ( seq -- ) first get print-table ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+PREDICATE: obj-type < symbol types member? ;
+
+M: obj-type article-title ( type -- title ) unparse ;
+
+M: obj-type article-content ( type -- content )
+   objects [ type -> = ] with filter
+   { $seq , } bake ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+M: ptr article-title ( ptr -- title ) [ title -> ] [ unparse ] bi or ;
+
+M: ptr article-content ( ptr -- content )
+   {
+     [ get     { $obj , } bake ]
+     [ drop { $heading "Related\n" } ]
+     [ related { $seq , } bake ]
+   }
+   1arr ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+PREDICATE: obj-list < word \ objects = ;
+
+M: obj-list article-title ( objects -- title ) drop "Objects" ;
+
+! M: obj-list article-content ( objects -- title )
+!    execute
+!    [ [ type -> ] [ ] bi 2array ] map
+!    { $tab , } bake ;
+
+M: obj-list article-content ( objects -- title )
+   drop
+   objects
+   [ [ type -> ] [ ] bi 2array ] map
+   { $tab , } bake ;
\ No newline at end of file
diff --git a/unmaintained/oracle/authors.txt b/unmaintained/oracle/authors.txt
new file mode 100644 (file)
index 0000000..7c29e7c
--- /dev/null
@@ -0,0 +1 @@
+Elie Chaftari
diff --git a/unmaintained/oracle/liboci/authors.txt b/unmaintained/oracle/liboci/authors.txt
new file mode 100755 (executable)
index 0000000..7c29e7c
--- /dev/null
@@ -0,0 +1 @@
+Elie Chaftari
diff --git a/unmaintained/oracle/liboci/liboci.factor b/unmaintained/oracle/liboci/liboci.factor
new file mode 100644 (file)
index 0000000..aa04aef
--- /dev/null
@@ -0,0 +1,193 @@
+! Copyright (C) 2007 Elie CHAFTARI
+! See http://factorcode.org/license.txt for BSD license.
+!
+! Adapted from oci.h and ociap.h
+! Tested with Oracle version - 10.1.0.3 Instant Client
+!
+! DYLD_LIBRARY_PATH="/usr/local/oracle/instantclient10_1"
+! export DYLD_LIBRARY_PATH
+
+USING: alien alien.syntax combinators kernel system ;
+
+IN: oracle.liboci
+
+"oci" {
+    { [ os winnt? ] [ "oci.dll" "stdcall" ] }
+    { [ os macosx? ] [ "$DYLD_LIBRARY_PATH/libclntsh.dylib" "cdecl" ] }
+    { [ os unix? ] [ "$DYLD_LIBRARY_PATH/libclntsh.so.10.1" "cdecl" ] }
+} cond add-library
+
+! ===============================================
+! Attribute Types
+! ===============================================
+
+: OCI_ATTR_USERNAME 22  ; inline ! username attribute
+: OCI_ATTR_PASSWORD 23  ; inline ! password attribute
+
+! ===============================================
+! Various Modes
+! ===============================================
+
+: OCI_DEFAULT   HEX: 00 ; inline ! default value for parameters and attributes
+: OCI_THREADED  HEX: 01 ; inline ! appl. in threaded environment
+: OCI_OBJECT    HEX: 02 ; inline ! application in object environment
+
+! ===============================================
+! Execution Modes
+! ===============================================
+
+: OCI_DESCRIBE_ONLY   HEX: 10 ; inline ! only describe the statement
+
+! ===============================================
+! Credential Types
+! ===============================================
+
+: OCI_CRED_RDBMS      1 ; inline ! database username/password
+: OCI_CRED_EXT        2 ; inline ! externally provided credentials
+: OCI_CRED_PROXY      3 ; inline ! proxy authentication
+
+! ===============================================
+! Error Return Values
+! ===============================================
+
+: OCI_SUCCESS               0     ; inline ! maps to SQL_SUCCESS of SAG CLI
+: OCI_SUCCESS_WITH_INFO     1     ; inline ! maps to SQL_SUCCESS_WITH_INFO
+: OCI_RESERVED_FOR_INT_USE  200   ; inline ! reserved
+: OCI_NO_DATA               100   ; inline ! maps to SQL_NO_DATA
+: OCI_ERROR                 -1    ; inline ! maps to SQL_ERROR
+: OCI_INVALID_HANDLE        -2    ; inline ! maps to SQL_INVALID_HANDLE
+: OCI_NEED_DATA             99    ; inline ! maps to SQL_NEED_DATA
+: OCI_STILL_EXECUTING       -3123 ; inline ! OCI would block error
+
+! ===============================================
+! Parsing Syntax Types
+! ===============================================
+
+: OCI_V7_SYNTAX            2 ; inline ! V815 language - for backwards compatibility
+: OCI_V8_SYNTAX            3 ; inline ! V815 language - for backwards compatibility
+: OCI_NTV_SYNTAX           1 ; inline ! Use what so ever is the native lang of server
+
+! ===============================================
+! Scrollable Cursor Fetch Options
+! For non-scrollable cursor, the only valid
+! (and default) orientation is OCI_FETCH_NEXT
+! ===============================================
+
+: OCI_FETCH_CURRENT       HEX: 01 ; inline ! refetching current position
+: OCI_FETCH_NEXT          HEX: 02 ; inline ! next row
+: OCI_FETCH_FIRST         HEX: 04 ; inline ! first row of the result set
+: OCI_FETCH_LAST          HEX: 08 ; inline ! the last row of the result set
+: OCI_FETCH_PRIOR         HEX: 10 ; inline ! the previous row relative to current
+: OCI_FETCH_ABSOLUTE      HEX: 20 ; inline ! absolute offset from first
+: OCI_FETCH_RELATIVE      HEX: 40 ; inline ! offset relative to current
+: OCI_FETCH_RESERVED_1    HEX: 80 ; inline ! reserved
+
+! ===============================================
+! Handle Types
+! ===============================================
+
+: OCI_HTYPE_ENV            1  ; inline ! environment handle
+: OCI_HTYPE_ERROR          2  ; inline ! error handle
+: OCI_HTYPE_SVCCTX         3  ; inline ! service handle
+: OCI_HTYPE_STMT           4  ; inline ! statement handle
+: OCI_HTYPE_BIND           5  ; inline ! bind handle
+: OCI_HTYPE_DEFINE         6  ; inline ! define handle
+: OCI_HTYPE_DESCRIBE       7  ; inline ! describe handle
+: OCI_HTYPE_SERVER         8  ; inline ! server handle
+: OCI_HTYPE_SESSION        9  ; inline ! authentication handle
+
+! ===============================================
+! Attribute Types
+! ===============================================
+
+: OCI_ATTR_FNCODE                   1  ; inline ! the OCI function code
+: OCI_ATTR_OBJECT                   2  ; inline ! is the environment initialized in object mode
+: OCI_ATTR_NONBLOCKING_MODE         3  ; inline ! non blocking mode
+: OCI_ATTR_SQLCODE                  4  ; inline ! the SQL verb
+: OCI_ATTR_ENV                      5  ; inline ! the environment handle
+: OCI_ATTR_SERVER                   6  ; inline ! the server handle
+: OCI_ATTR_SESSION                  7  ; inline ! the user session handle
+: OCI_ATTR_TRANS                    8  ; inline ! the transaction handle
+: OCI_ATTR_ROW_COUNT                9  ; inline ! the rows processed so far
+: OCI_ATTR_SQLFNCODE                10 ; inline ! the SQL verb of the statement
+: OCI_ATTR_PREFETCH_ROWS            11 ; inline ! sets the number of rows to prefetch
+: OCI_ATTR_NESTED_PREFETCH_ROWS     12 ; inline ! the prefetch rows of nested table
+: OCI_ATTR_PREFETCH_MEMORY          13 ; inline ! memory limit for rows fetched
+: OCI_ATTR_NESTED_PREFETCH_MEMORY   14 ; inline ! memory limit for nested rows
+: OCI_ATTR_CHAR_COUNT               15 ; inline ! this specifies the bind and define size in characters
+
+! ===============================================
+! OCI integer types
+! ===============================================
+
+TYPEDEF: ushort ub2
+TYPEDEF: short sb2
+TYPEDEF: uint ub4
+TYPEDEF: int sb4
+
+! ===============================================
+! Input data types (ocidfn.h)
+! ===============================================
+
+: SQLT_CHR                  1    ; inline ! (ORANET TYPE) character string
+: SQLT_NUM                  2    ; inline ! (ORANET TYPE) oracle numeric
+: SQLT_INT                  3    ; inline ! (ORANET TYPE) integer
+: SQLT_FLT                  4    ; inline ! (ORANET TYPE) Floating point number
+: SQLT_STR                  5    ; inline ! zero terminated string
+: SQLT_ODT                  156  ; inline ! OCIDate type
+
+! ===============================================
+! Input datetimes and intervals (ocidfn.h)
+! ===============================================
+
+: SQLT_DATE                184   ; inline ! ANSI Date
+: SQLT_TIME                185   ; inline ! TIME
+: SQLT_TIME_TZ             186   ; inline ! TIME WITH TIME ZONE
+: SQLT_TIMESTAMP           187   ; inline ! TIMESTAMP
+: SQLT_TIMESTAMP_TZ        188   ; inline ! TIMESTAMP WITH TIME ZONE
+: SQLT_INTERVAL_YM         189   ; inline ! INTERVAL YEAR TO MONTH
+: SQLT_INTERVAL_DS         190   ; inline ! INTERVAL DAY TO SECOND
+: SQLT_TIMESTAMP_LTZ       232   ; inline ! TIMESTAMP WITH LOCAL TZ
+
+! ===============================================
+! Opaque pointer types
+! ===============================================
+
+TYPEDEF: void dvoid
+TYPEDEF: void oci_env
+TYPEDEF: void oci_server
+TYPEDEF: void oci_error
+TYPEDEF: void oci_svc_ctx
+TYPEDEF: void oci_session
+TYPEDEF: void oci_stmt
+
+LIBRARY: oci
+
+! ===============================================
+! ociap.h
+! ===============================================
+
+FUNCTION: int OCIInitialize ( ub4 mode, void* ctxp, void* malocfp, void* ralocfp, dvoid* mfreefp ) ;
+FUNCTION: int OCITerminate ( ub4 mode ) ;
+FUNCTION: int OCIEnvInit ( void* envhpp, ub4 mode, size_t xtramem_sz, dvoid* usrmempp ) ;
+FUNCTION: int OCIEnvCreate ( dvoid* envhpp, ub4 mode, void* ctxp, void* malocfp, void* ralocfp, void* mfreefp, size_t xtramemz, dvoid* usrmempp ) ;
+FUNCTION: int OCIHandleAlloc ( void* parenth, dvoid* hndlpp, ub4 type, size_t xtramem_sz, dvoid* usrmempp ) ;
+FUNCTION: int OCIServerAttach ( void* srvhp, void* errhp, char* dblink, sb4 dblink_len, ub4 mode ) ;
+FUNCTION: int OCIServerDetach ( void* srvhp, void* errhp, ub4 mode ) ;
+FUNCTION: int OCIHandleFree ( dvoid* p0, ub4 p1 ) ;
+FUNCTION: int OCILogon ( void* envhp, void* errhp, dvoid* svchpp, uchar* username, ub4 uname_len, uchar* passwd, ub4 password_len, uchar* dsn, ub4 dsn_len ) ;
+FUNCTION: int OCILogoff ( void* p0, void* p1 ) ;
+FUNCTION: void OCIErrorGet ( void* handlp, ub4 recordno, char* sqlstate, sb4* errcodep, uchar* bufp, ub4 bufsize, ub4 type ) ;
+FUNCTION: int OCIStmtPrepare ( void* stmtp, void* errhp, uchar* stmt, ub4 stmt_len, ub4 language, ub4 mode ) ;
+FUNCTION: int OCIStmtExecute ( void* svchp, void* stmtp1, void* errhp, ub4 iters, ub4 rowoff, void* snap_in, void* snap_out, ub4 mode ) ;
+FUNCTION: int OCIParamGet ( void* hndlp, ub4 htype, void* errhp, dvoid* parmdpp, ub4 pos ) ;
+FUNCTION: int OCIAttrGet ( void* trgthndlp, ub4 trghndltyp, void* attributep, ub4* sizep, ub4 attrtype, void* errhp ) ;
+FUNCTION: int OCIAttrSet ( dvoid* trgthndlp, ub4 trgthndltyp, dvoid* attributep, ub4 size, ub4 attrtype, oci_error* errhp ) ;
+FUNCTION: int OCIDefineByPos ( void* stmtp, dvoid* defnpp, void* errhp, ub4 position, void* valuep, sb4 value_sz, ub2 dty, sb2* indp, ub2* rlenp, ub2* rcodep, ub4 mode ) ;
+FUNCTION: int OCIStmtFetch ( void* stmthp, void* errhp, ub4 p2, ub2 p3, ub4 p4 ) ;
+FUNCTION: int OCITransStart ( void* svchp, void* errhp, ushort p2, ushort p3 ) ;
+FUNCTION: int OCITransCommit ( void* svchp, void* errhp, ushort p2 ) ;
+FUNCTION: int OCITransRollback ( void* svchp, void* errhp, ushort p2 ) ;
+FUNCTION: int OCISessionBegin ( oci_svc_ctx* svchp, oci_error* errhp,  oci_session* usrhp, ub4 credt, ub4 mode ) ;
+FUNCTION: int OCISessionEnd ( oci_svc_ctx* svchp, oci_error* errhp,  oci_session* usrhp, ub4 mode ) ;
+FUNCTION: int OCIServerVersion ( void* handlp, void* errhp, uchar* bufsz, int bufsz, short hndltype ) ;
diff --git a/unmaintained/oracle/oracle-tests.factor b/unmaintained/oracle/oracle-tests.factor
new file mode 100755 (executable)
index 0000000..2f957ac
--- /dev/null
@@ -0,0 +1,60 @@
+USING: oracle oracle.liboci prettyprint tools.test
+kernel ;
+
+[
+    "testuser" "testpassword" "//localhost/test1" log-on .
+
+    allocate-statement-handle
+
+    "CREATE TABLE TESTTABLE ( COL1 VARCHAR(40), COL2 NUMBER)" prepare-statement
+
+    [ t ] [ execute-statement ] unit-test
+
+    "INSERT INTO TESTTABLE (COL1, COL2) VALUES('hello', 50)" prepare-statement
+
+    [ t ] [ execute-statement ] unit-test
+
+    "INSERT INTO TESTTABLE (COL1, COL2) VALUES('hi', 60)" prepare-statement
+
+    [ t ] [ execute-statement ] unit-test
+
+    "INSERT INTO TESTTABLE (COL1, COL2) VALUES('bye', 70)" prepare-statement
+
+    [ t ] [ execute-statement ] unit-test
+
+    "COMMIT" prepare-statement
+
+    [ t ] [ execute-statement ] unit-test
+
+    "SELECT * FROM TESTTABLE" prepare-statement
+
+    1 SQLT_STR define-by-position run-query
+
+    [ V{ "hello" "hi" "bye" "50" "60" "70" } ] [
+    2 SQLT_STR define-by-position run-query gather-results
+    ] unit-test
+
+    clear-result
+
+    "UPDATE TESTTABLE SET COL2 = 10 WHERE COL1='hi'" prepare-statement
+
+    [ t ] [ execute-statement ] unit-test
+
+    "COMMIT" prepare-statement
+
+    [ t ] [ execute-statement ] unit-test
+
+    "SELECT * FROM TESTTABLE WHERE COL1 = 'hi'" prepare-statement
+
+    [ V{ "10" } ] [
+    2 SQLT_STR define-by-position run-query gather-results
+    ] unit-test
+
+    clear-result
+
+    "DROP TABLE TESTTABLE" prepare-statement
+
+    execute-statement
+
+    free-statement-handle log-off clean-up terminate
+] drop
diff --git a/unmaintained/oracle/oracle.factor b/unmaintained/oracle/oracle.factor
new file mode 100644 (file)
index 0000000..e61a47a
--- /dev/null
@@ -0,0 +1,257 @@
+! Copyright (C) 2007 Elie CHAFTARI
+! See http://factorcode.org/license.txt for BSD license.
+!
+! Adapted from oci.h and ociap.h
+! Tested with Oracle version - 10.1.0.3 Instant Client
+
+USING: alien alien.c-types alien.strings combinators kernel math
+namespaces oracle.liboci prettyprint sequences
+io.encodings.ascii accessors ;
+
+IN: oracle
+
+SYMBOL: env
+SYMBOL: err
+SYMBOL: srv
+SYMBOL: svc
+SYMBOL: ses
+SYMBOL: stm
+SYMBOL: buf
+SYMBOL: res
+
+SYMBOL: con
+
+TUPLE: connection username password db ;
+
+C: <connection> connection
+
+! =========================================================
+! Error-handling routines
+! =========================================================
+
+: get-oci-error ( object -- * )
+    1 f "uint*" <c-object> dup >r 512 "uchar" <c-array> dup >r
+    512 OCI_HTYPE_ERROR OCIErrorGet r> r> *uint drop
+    ascii alien>string throw ;
+
+: check-result ( result -- )
+    {
+        { OCI_SUCCESS [ ] }
+        { OCI_ERROR [ err get get-oci-error ] }
+        { OCI_INVALID_HANDLE [ "invalid handle" throw ] }
+        [ "operation failed" throw ]
+    } case ;
+
+: check-status ( status -- bool )
+    {
+        { OCI_SUCCESS [ t ] }
+        { OCI_ERROR [ err get get-oci-error ] }
+        { OCI_INVALID_HANDLE [ "invalid handle" throw ] }
+        { OCI_NO_DATA [ f ] }
+        [ "operation failed" throw ]
+    } case ;
+
+! =========================================================
+! Initialization and handle-allocation routines
+! =========================================================
+
+! Legacy initialization routine
+: oci-initialize ( -- )
+    OCI_DEFAULT f f f f OCIInitialize check-result ;
+
+! Legacy initialization routine
+: oci-env-init ( -- )
+    "void*" <c-object> dup OCI_DEFAULT 0 f OCIEnvInit
+    check-result *void* env set ;
+
+: create-environment ( -- )
+    "void*" <c-object> dup OCI_DEFAULT f f f f 0 f OCIEnvCreate 
+    check-result *void* env set ;
+
+: allocate-error-handle ( -- )
+    env get
+    "void*" <c-object> tuck OCI_HTYPE_ERROR 0 f OCIHandleAlloc 
+    check-result *void* err set ;
+
+: allocate-service-handle ( -- )
+    env get
+    "void*" <c-object> tuck OCI_HTYPE_SVCCTX 0 f OCIHandleAlloc 
+    check-result *void* svc set ;
+
+: allocate-session-handle ( -- )
+    env get
+    "void*" <c-object> tuck OCI_HTYPE_SESSION 0 f OCIHandleAlloc 
+    check-result *void* ses set ;
+
+: allocate-server-handle ( -- )
+    env get
+    "void*" <c-object> tuck OCI_HTYPE_SERVER 0 f OCIHandleAlloc 
+    check-result *void* srv set ;
+
+: init ( -- )
+    oci-initialize
+    oci-env-init
+    allocate-error-handle
+    allocate-service-handle
+    allocate-session-handle
+    allocate-server-handle ;
+
+! =========================================================
+! Single user session logon routine
+! =========================================================
+
+: oci-log-on ( -- )
+    env get err get svc get 
+    con get username>> dup length swap ascii malloc-string swap 
+    con get password>> dup length swap ascii malloc-string swap
+    con get db>> dup length swap ascii malloc-string swap
+    OCILogon check-result ;
+
+! =========================================================
+! Attach to server and attribute-setting routines
+! =========================================================
+
+: attach-to-server ( -- )
+    srv get err get con get db>> dup length OCI_DEFAULT
+    OCIServerAttach check-result ;
+
+: set-service-attribute ( -- )
+    svc get OCI_HTYPE_SVCCTX srv get 0 OCI_ATTR_SERVER err get OCIAttrSet check-result ;
+
+: set-username-attribute ( -- )
+    ses get OCI_HTYPE_SESSION con get username>> dup length swap ascii malloc-string swap 
+    OCI_ATTR_USERNAME err get OCIAttrSet check-result ;
+
+: set-password-attribute ( -- )
+    ses get OCI_HTYPE_SESSION con get password>> dup length swap ascii malloc-string swap 
+    OCI_ATTR_PASSWORD err get OCIAttrSet check-result ;
+
+: set-attributes ( -- )
+    set-service-attribute
+    set-username-attribute
+    set-password-attribute ;
+
+! =========================================================
+! Session startup routines
+! =========================================================
+
+: begin-session ( -- )
+    svc get err get ses get OCI_CRED_RDBMS OCI_DEFAULT OCISessionBegin check-result ;
+
+: set-authentication-handle ( -- )
+    svc get OCI_HTYPE_SVCCTX ses get 0 OCI_ATTR_SESSION err get OCIAttrSet check-result ;
+
+! =========================================================
+! Statement preparation and execution routines
+! =========================================================
+
+: allocate-statement-handle ( -- )
+    env get
+    "void*" <c-object> tuck OCI_HTYPE_STMT 0 f OCIHandleAlloc 
+    check-result *void* stm set ;
+
+: prepare-statement ( statement -- )
+    >r stm get err get r> dup length swap ascii malloc-string swap
+    OCI_NTV_SYNTAX OCI_DEFAULT OCIStmtPrepare check-result ;
+
+: calculate-size ( type -- size )
+    {
+        { SQLT_INT [ "int" heap-size ] }
+        { SQLT_FLT [ "float" heap-size ] }
+        { SQLT_CHR [ "char" heap-size ] }
+        { SQLT_NUM [ "int" heap-size 10 * ] }
+        { SQLT_STR [ 64 ] }
+        { SQLT_ODT [ 256 ] }
+    } case ;
+
+: define-by-position ( position type -- )
+    >r >r stm get f <void*> err get
+    r> r> dup calculate-size >r [ "char" malloc-array dup buf set ] keep 1+
+    r> f f f OCI_DEFAULT OCIDefineByPos check-result ;
+
+: execute-statement ( -- bool )
+    svc get stm get err get 1 0 f f OCI_DEFAULT OCIStmtExecute check-status ;
+
+: fetch-statement ( -- bool )
+    stm get err get 1 OCI_FETCH_NEXT OCI_DEFAULT OCIStmtFetch check-status ;
+
+: free-statement-handle ( -- )
+    stm get OCI_HTYPE_STMT OCIHandleFree check-result ;
+
+! =========================================================
+! Log off and detach from server routines
+! =========================================================
+
+: end-session ( -- )
+    svc get err get ses get OCI_DEFAULT OCISessionEnd check-result ;
+
+: detach-from-server ( -- )
+    srv get err get OCI_DEFAULT OCIServerDetach check-result ;
+
+: log-off ( -- )
+    end-session
+    detach-from-server ;
+
+! =========================================================
+! Clean-up and termination routines
+! =========================================================
+
+: free-service-handle ( -- )
+    svc get OCI_HTYPE_SVCCTX OCIHandleFree check-result ;
+
+: free-server-handle ( -- )
+    srv get OCI_HTYPE_SERVER OCIHandleFree check-result ;
+
+: free-error-handle ( -- )
+    err get OCI_HTYPE_ERROR OCIHandleFree check-result ;
+
+: free-environment-handle ( -- )
+    env get OCI_HTYPE_ENV OCIHandleFree check-result ;
+
+: clean-up ( -- )
+    free-service-handle
+    free-server-handle
+    free-error-handle
+    free-environment-handle ;
+
+: terminate ( -- )
+    OCI_DEFAULT OCITerminate check-result ;
+
+! =========================================================
+! Utility routines
+! =========================================================
+
+: server-version ( -- )
+    srv get err get 512 "uchar" malloc-array dup >r 512 OCI_HTYPE_SERVER
+    OCIServerVersion check-result r> ascii alien>string . ;
+
+! =========================================================
+! Public routines
+! =========================================================
+
+: log-on ( username password db -- )
+    <connection> con set 
+    init attach-to-server set-attributes
+    begin-session set-authentication-handle 
+    V{ } clone res set ;
+
+: fetch-each ( object -- object )
+    fetch-statement [
+        buf get ascii alien>string res get swap suffix res set
+        fetch-each
+    ] [ ] if ;
+
+: run-query ( object -- object )
+    execute-statement [
+        buf get ascii alien>string res get swap suffix res set
+        fetch-each
+    ] [ ] if ;
+
+: gather-results ( -- seq )
+    res get ;
+
+: show-result ( -- )
+    res get [ . ] each ;
+
+: clear-result ( -- )
+    V{ } clone res set ;
diff --git a/unmaintained/oracle/summary.txt b/unmaintained/oracle/summary.txt
new file mode 100644 (file)
index 0000000..0596680
--- /dev/null
@@ -0,0 +1 @@
+Oracle database bindings
diff --git a/unmaintained/oracle/tags.txt b/unmaintained/oracle/tags.txt
new file mode 100644 (file)
index 0000000..aa0d57e
--- /dev/null
@@ -0,0 +1 @@
+database
diff --git a/unmaintained/plot/plot.factor b/unmaintained/plot/plot.factor
deleted file mode 100644 (file)
index 52cd2fa..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-
-USING: kernel quotations arrays sequences math math.ranges fry
-       opengl opengl.gl ui.render ui.gadgets.cartesian processing.shapes
-       accessors ;
-
-IN: ui.gadgets.plot
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-TUPLE: plot < cartesian functions points ;
-
-: init-plot ( plot -- plot )
-  init-cartesian
-    { } >>functions
-    100 >>points ;
-
-: <plot> ( -- plot ) plot new init-plot ;
-
-: step-size ( plot -- step-size )
-  [ [ x-max>> ] [ x-min>> ] bi - ] [ points>> ] bi / ;
-
-: plot-range ( plot -- range )
-  [ x-min>> ] [ x-max>> ] [ step-size ] tri <range> ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-TUPLE: function function color ;
-
-GENERIC: plot-function ( plot object -- plot )
-
-M: callable plot-function ( plot quotation -- plot )
-  >r dup plot-range r> '[ dup @ 2array ] map line-strip ;
-
-M: function plot-function ( plot function -- plot )
-   dup color>> dup [ >stroke-color ] [ drop ] if
-   >r dup plot-range r> function>> '[ dup @ 2array ] map line-strip ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: plot-functions ( plot -- plot ) dup functions>> [ plot-function ] each ;
-
-: draw-axis ( plot -- plot )
-  dup
-    [ [ x-min>> ] [ drop 0  ] bi 2array ]
-    [ [ x-max>> ] [ drop 0  ] bi 2array ] bi line*
-  dup
-    [ [ drop 0  ] [ y-min>> ] bi 2array ]
-    [ [ drop 0  ] [ y-max>> ] bi 2array ] bi line* ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-USING: ui.gadgets.slate ;
-
-M: plot draw-slate ( plot -- plot )
-   2 glLineWidth
-   draw-axis
-   plot-functions
-   fill-mode
-   1 glLineWidth ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: add-function ( plot function -- plot )
-  over functions>> swap suffix >>functions ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: x-span ( plot -- span ) [ x-max>> ] [ x-min>> ] bi - ;
-: y-span ( plot -- span ) [ y-max>> ] [ y-min>> ] bi - ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-USING: ui.gestures ui.gadgets ;
-
-: left ( plot -- plot )
-  dup [ x-min>> ] [ x-span 1/10 * ] bi - >>x-min
-  dup [ x-max>> ] [ x-span 1/10 * ] bi - >>x-max
-  dup relayout-1 ;
-
-: right ( plot -- plot )
-  dup [ x-min>> ] [ x-span 1/10 * ] bi + >>x-min
-  dup [ x-max>> ] [ x-span 1/10 * ] bi + >>x-max
-  dup relayout-1 ;
-
-: down ( plot -- plot )
-  dup [ y-min>> ] [ y-span 1/10 * ] bi - >>y-min
-  dup [ y-max>> ] [ y-span 1/10 * ] bi - >>y-max
-  dup relayout-1 ;
-
-: up ( plot -- plot )
-  dup [ y-min>> ] [ y-span 1/10 * ] bi + >>y-min
-  dup [ y-max>> ] [ y-span 1/10 * ] bi + >>y-max
-  dup relayout-1 ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: zoom-in-horizontal ( plot -- plot )
-  dup [ x-min>> ] [ x-span 1/10 * ] bi + >>x-min
-  dup [ x-max>> ] [ x-span 1/10 * ] bi - >>x-max ;
-
-: zoom-in-vertical ( plot -- plot )
-  dup [ y-min>> ] [ y-span 1/10 * ] bi + >>y-min
-  dup [ y-max>> ] [ y-span 1/10 * ] bi - >>y-max ;
-
-: zoom-in ( plot -- plot )
-  zoom-in-horizontal
-  zoom-in-vertical
-  dup relayout-1 ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: zoom-out-horizontal ( plot -- plot )
-  dup [ x-min>> ] [ x-span 1/10 * ] bi - >>x-min
-  dup [ x-max>> ] [ x-span 1/10 * ] bi + >>x-max ;
-
-: zoom-out-vertical ( plot -- plot )
-  dup [ y-min>> ] [ y-span 1/10 * ] bi - >>y-min
-  dup [ y-max>> ] [ y-span 1/10 * ] bi + >>y-max ;
-
-: zoom-out ( plot -- plot )
-  zoom-out-horizontal
-  zoom-out-vertical
-  dup relayout-1 ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-plot
-  H{
-    { T{ mouse-enter } [ request-focus ] }
-    { T{ key-down f f "LEFT"  } [ left drop  ] }
-    { T{ key-down f f "RIGHT" } [ right drop ] }
-    { T{ key-down f f "DOWN"  } [ down drop  ] }
-    { T{ key-down f f "UP"    } [ up drop    ] }
-    { T{ key-down f f "a"     } [ zoom-in  drop ] }
-    { T{ key-down f f "z"     } [ zoom-out drop ] }
-  }
-set-gestures
\ No newline at end of file
diff --git a/unmaintained/raptor/authors.txt b/unmaintained/raptor/authors.txt
new file mode 100755 (executable)
index 0000000..6cfd5da
--- /dev/null
@@ -0,0 +1 @@
+Eduardo Cavazos
diff --git a/unmaintained/raptor/config.factor b/unmaintained/raptor/config.factor
new file mode 100644 (file)
index 0000000..29e26d4
--- /dev/null
@@ -0,0 +1,165 @@
+
+USING: namespaces threads
+       unix.process unix.linux.if unix.linux.ifreq unix.linux.route
+       raptor.cron ;
+
+IN: raptor
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! Networking
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: configure-lo ( -- )
+  "lo" "127.0.0.1"      set-if-addr
+  "lo" { IFF_UP } flags set-if-flags ;
+
+: configure-eth1 ( -- )
+  "eth1" "192.168.1.10"                 set-if-addr
+  "eth1" { IFF_UP IFF_MULTICAST } flags set-if-flags ;
+
+: configure-route ( -- )
+  "0.0.0.0" "192.168.1.1" "0.0.0.0" { RTF_UP RTF_GATEWAY } flags route ;
+
+[
+  configure-lo
+  configure-eth1
+  configure-route
+] networking-hook set-global
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! Filesystems
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+"/dev/hda1"     root-device     set-global
+
+{ "/dev/hda5" } swap-devices   set-global
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! boot-hook
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+[
+                                    start-wait-loop
+
+  ! rcS.d
+
+  "mountvirtfs"                     start-service
+
+  ! "hostname.sh"                          start-service
+  "narodnik"                        set-hostname
+
+  "keymap.sh"                      start-service
+  "linux-restricted-modules-common" start-service
+  "udev"                            start-service
+  "mountdevsubfs"                  start-service
+  "module-init-tools"              start-service
+  "procps.sh"                      start-service
+
+  !  "checkroot.sh"                start-service
+
+                                   activate-swap
+                                   mount-root
+
+  "mtab"                           start-service
+  "checkfs.sh"                             start-service
+  "mountall.sh"                            start-service
+
+                                   start-networking
+!   "loopback" start-service
+!   "networking" start-service
+
+  "hwclock.sh"                     start-service
+  "displayconfig-hwprobe.py"       start-service
+  "screen"                         start-service
+  "x11-common"                     start-service
+  "bootmisc.sh"                            start-service
+  "urandom"                        start-service
+
+  ! rc2.d
+
+  "vbesave"                        start-service
+  "acpid"                          start-service
+  "powernowd.early"                start-service
+  "sysklogd"                       start-service
+  "klogd"                          start-service
+  "dbus"                           start-service
+  "apmd"                           start-service
+  "hotkey-setup"                   start-service
+  "laptop-mode"                            start-service
+  "makedev"                        start-service
+  "nvidia-kernel"                  start-service
+  "postfix"                        start-service
+  "powernowd"                      start-service
+  "ntp-server"                     start-service
+  "binfmt-support"                 start-service
+  "acpi-support"                   start-service
+  "rc.local"                       start-service
+  "rmnologin"                      start-service
+
+                                   schedule-cron-jobs
+
+  [ [ "/dev/tty2" tty-listener ] forever ] in-thread
+  [ [ "/dev/tty3" tty-listener ] forever ] in-thread
+  [ [ "/dev/tty4" tty-listener ] forever ] in-thread
+  [ [ "/dev/tty5" getty        ] forever ] in-thread
+  [ [ "/dev/tty6" getty        ] forever ] in-thread
+
+] boot-hook set-global
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! reboot-hook
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+[
+  "acpi-support"                   stop-service
+  "apmd"                           stop-service
+  "dbus"                           stop-service
+  "hotkey-setup"                   stop-service
+  "laptop-mode"                    stop-service
+  "makedev"                        stop-service
+  "nvidia-kernel"                  stop-service
+  "powernowd"                      stop-service
+  "acpid"                          stop-service
+  "hwclock.sh"                             stop-service
+  "alsa-utils"                             stop-service
+  "klogd"                          stop-service
+  "binfmt-support"                 stop-service
+  "sysklogd"                        stop-service
+  "linux-restricted-modules-common" stop-service
+  "sendsigs"                       stop-service
+  "urandom"                        stop-service
+  "umountnfs.sh"                   stop-service
+  "networking"                             stop-service
+  "umountfs"                       stop-service
+  "umountroot"                             stop-service
+  "reboot"                         stop-service
+] reboot-hook set-global
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! shutdown-hook
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+[
+  "acpi-support"                   stop-service
+  "apmd"                           stop-service
+  "dbus"                           stop-service
+  "hotkey-setup"                   stop-service
+  "laptop-mode"                    stop-service
+  "makedev"                        stop-service
+  "nvidia-kernel"                  stop-service
+  "postfix"                        stop-service
+  "powernowd"                      stop-service
+  "acpid"                          stop-service
+  "hwclock.sh"                             stop-service
+  "alsa-utils"                             stop-service
+  "klogd"                          stop-service
+  "binfmt-support"                 stop-service
+  "sysklogd"                       stop-service
+  "linux-restricted-modules-common" stop-service
+  "sendsigs"                       stop-service
+  "urandom"                        stop-service
+  "umountnfs.sh"                   stop-service
+  "umountfs"                       stop-service
+  "umountroot"                             stop-service
+  "halt"                           stop-service
+] shutdown-hook set-global
\ No newline at end of file
diff --git a/unmaintained/raptor/cron/authors.txt b/unmaintained/raptor/cron/authors.txt
new file mode 100755 (executable)
index 0000000..6cfd5da
--- /dev/null
@@ -0,0 +1 @@
+Eduardo Cavazos
diff --git a/unmaintained/raptor/cron/cron.factor b/unmaintained/raptor/cron/cron.factor
new file mode 100755 (executable)
index 0000000..d818fb4
--- /dev/null
@@ -0,0 +1,62 @@
+
+USING: kernel namespaces threads sequences calendar
+       combinators.lib debugger ;
+
+IN: raptor.cron
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+TUPLE: when minute hour day-of-month month day-of-week ;
+
+C: <when> when
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: slot-match? ( now-slot when-slot -- ? ) dup f = [ 2drop t ] [ member? ] if ;
+
+: minute-match? ( now when -- ? )
+  [ timestamp-minute ] [ when-minute ] bi* slot-match? ;
+
+: hour-match? ( now when -- ? )
+  [ timestamp-hour ] [ when-hour ] bi* slot-match? ;
+
+: day-of-month-match? ( now when -- ? )
+  [ timestamp-day ] [ when-day-of-month ] bi* slot-match? ;
+
+: month-match? ( now when -- ? )
+  [ timestamp-month ] [ when-month ] bi* slot-match? ;
+
+: day-of-week-match? ( now when -- ? )
+  [ day-of-week ] [ when-day-of-week ] bi* slot-match? ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: when=now? ( when -- ? )
+  now swap
+  { [ minute-match? ]
+    [ hour-match? ]
+    [ day-of-month-match? ]
+    [ month-match? ]
+    [ day-of-week-match? ] }
+  <--&& ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: recurring-job ( when quot -- )
+  [ swap when=now? [ try ] [ drop ] if 60000 sleep ] [ recurring-job ] 2bi ;
+
+: schedule ( when quot -- ) [ recurring-job ] 2curry in-thread ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYMBOL: cron-jobs-hourly
+SYMBOL: cron-jobs-daily
+SYMBOL: cron-jobs-weekly
+SYMBOL: cron-jobs-monthly
+
+: schedule-cron-jobs ( -- )
+  { 17 } f f f f         <when> [ cron-jobs-hourly  get call ] schedule
+  { 25 } { 6 } f f f     <when> [ cron-jobs-daily   get call ] schedule
+  { 47 } { 6 } f f { 7 } <when> [ cron-jobs-weekly  get call ] schedule
+  { 52 } { 6 } { 1 } f f <when> [ cron-jobs-monthly get call ] schedule ;
+
diff --git a/unmaintained/raptor/cron/tags.txt b/unmaintained/raptor/cron/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/unmaintained/raptor/cronjobs.factor b/unmaintained/raptor/cronjobs.factor
new file mode 100644 (file)
index 0000000..436fb85
--- /dev/null
@@ -0,0 +1,34 @@
+
+USING: kernel namespaces threads arrays sequences
+       raptor raptor.cron ;
+
+IN: raptor
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+[
+    "/etc/cron.daily/apt"             fork-exec-arg
+    "/etc/cron.daily/aptitude"       fork-exec-arg
+    "/etc/cron.daily/bsdmainutils"    fork-exec-arg
+    "/etc/cron.daily/find.notslocate" fork-exec-arg
+    "/etc/cron.daily/logrotate"              fork-exec-arg
+    "/etc/cron.daily/man-db"         fork-exec-arg
+    "/etc/cron.daily/ntp-server"      fork-exec-arg
+    "/etc/cron.daily/slocate"        fork-exec-arg
+    "/etc/cron.daily/standard"       fork-exec-arg
+    "/etc/cron.daily/sysklogd"       fork-exec-arg
+    "/etc/cron.daily/tetex-bin"              fork-exec-arg
+] cron-jobs-daily set-global
+    
+[
+  "/etc/cron.weekly/cvs"                fork-exec-arg
+  "/etc/cron.weekly/man-db"            fork-exec-arg
+  "/etc/cron.weekly/ntp-server"                fork-exec-arg
+  "/etc/cron.weekly/popularity-contest" fork-exec-arg
+  "/etc/cron.weekly/sysklogd"          fork-exec-arg
+] cron-jobs-weekly set-global
+
+[
+  "/etc/cron.monthly/scrollkeeper" fork-exec-arg
+  "/etc/cron.monthly/standard"     fork-exec-arg
+] cron-jobs-monthly set-global
\ No newline at end of file
diff --git a/unmaintained/raptor/raptor.factor b/unmaintained/raptor/raptor.factor
new file mode 100755 (executable)
index 0000000..c0605fe
--- /dev/null
@@ -0,0 +1,80 @@
+
+USING: kernel parser namespaces threads arrays sequences unix unix.process
+       bake ;
+
+IN: raptor
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYMBOL: boot-hook
+SYMBOL: reboot-hook
+SYMBOL: shutdown-hook
+SYMBOL: networking-hook
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: reload-raptor-config ( -- )
+  "/etc/raptor/config.factor" run-file
+  "/etc/raptor/cronjobs.factor" run-file ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: fork-exec-wait ( pathname args -- )
+  fork dup 0 = [ drop exec drop ] [ 2nip wait-for-pid drop ] if ;
+
+: fork-exec-args-wait ( args -- ) [ first ] [ ] bi fork-exec-wait ;
+
+: fork-exec-arg ( arg -- ) 1array [ fork-exec-args-wait ] curry in-thread ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: forever ( quot -- ) [ call ] [ forever ] bi ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: start-service ( name -- ) "/etc/init.d/" " start" surround system drop ;
+: stop-service  ( name -- ) "/etc/init.d/" " stop"  surround system drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: getty ( tty -- ) `{ "/sbin/getty" "38400" , } fork-exec-args-wait ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+USING: io io.files io.streams.lines io.streams.plain io.streams.duplex
+       listener io.encodings.utf8 ;
+
+: tty-listener ( tty -- )
+  dup utf8 <file-reader> [
+    swap utf8 <file-writer> [
+      <duplex-stream> [
+        listener
+      ] with-stream
+    ] with-disposal
+  ] with-disposal ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+USING: unix.linux.swap unix.linux.fs ;
+
+SYMBOL: root-device
+SYMBOL: swap-devices
+
+: activate-swap ( -- ) swap-devices get [ 0 swapon drop ] each ;
+
+: mount-root ( -- ) root-device get "/" "ext3" MS_REMOUNT f mount drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: start-networking ( -- ) networking-hook  get call ;
+
+: set-hostname ( name -- ) `{ "/bin/hostname" , } fork-exec-args-wait ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: boot     ( -- ) boot-hook     get call ;
+: reboot   ( -- ) reboot-hook   get call ;
+: shutdown ( -- ) shutdown-hook get call ;
+
+MAIN: boot
+
diff --git a/unmaintained/raptor/readme b/unmaintained/raptor/readme
new file mode 100644 (file)
index 0000000..dfb6890
--- /dev/null
@@ -0,0 +1,134 @@
+
+Raptor Linux
+
+*** Introduction ***
+
+Raptor Linux is a mod of Ubuntu 6.06 (Dapper Drake)
+
+This is unlikely to work on another version of Ubuntu, much less
+another Linux distribution.
+
+*** Features ***
+
+  * /sbin/init is replaced with Factor
+  * Virtual terminals managed by Factor
+  * Listeners run on virtual terminals
+  * Native support for static ip networking
+  * Crontab replacement
+
+*** Install ***
+
+  # mkdir -v /etc/raptor
+
+  # cp -v /scratch/factor/extra/raptor/{config,cronjobs}.factor /etc/raptor
+
+  ( scratchpad ) USE: raptor
+  ( scratchpad ) reload-raptor-config
+  ( scratchpad ) save
+
+  # mv -v /sbin/{init,init.orig}
+
+  # cp -v /scratch/factor/factor /sbin/init
+
+  # cp -v /scratch/factor/factor.image /sbin/init.image
+
+*** Filesystems ***
+
+  # emacs /etc/raptor/config.factor
+
+Edit the root-device and swap-devices variables.
+
+*** Static IP networking ***
+
+If you use a static IP in your network then Factor can take care of
+networking.
+
+  # emacs /etc/raptor/config.factor
+
+  (change the settings accordingly)
+
+The udev system has a hook to bring up ethernet interfaces when they
+are detected. Let's remove this hook since we'll be bringing up the
+interface. Actually, we'll move it, not delete it.
+
+  # mv -v /etc/udev/rules.d/85-ifupdown.rules /root
+
+*** DHCP networking ***
+
+If you're using dhcp then we'll fall back on what Ubuntu offers. In
+your config.factor change the line :
+
+     start-networking
+
+to
+
+       "loopback"   start-service
+       "networking" start-service
+
+Add these to your reboot-hook and shutdown-hook :
+
+       "loopback"   stop-service
+       "networking" stop-service
+
+*** Editing the hooks ***
+
+The items in boot-hook correspond to the things in '/etc/rcS.d' and
+'/etc/rc2.d'. Feel free to add and remove items from that hook. For
+example, I removed the printer services. I also removed other things
+that I didn't feel were necessary on my system.
+
+Look for the line with the call to 'set-hostname' and edit it appropriately.
+
+*** Grub ***
+
+Edit your '/boot/grub/menu.lst'. Basically, copy and paste your
+current good entry. My default entry is this:
+
+title           Ubuntu, kernel 2.6.15-28-686
+root            (hd0,0)
+kernel          /boot/vmlinuz-2.6.15-28-686 root=/dev/hda1 ro quiet splash
+initrd          /boot/initrd.img-2.6.15-28-686
+savedefault
+boot
+
+I pasted a copy above it and edited it to look like this:
+
+title           Raptor, kernel 2.6.15-28-686
+root            (hd0,0)
+kernel          /boot/vmlinuz-2.6.15-28-686 root=/dev/hda1 ro quiet -run=ubuntu.dapper.boot
+initrd          /boot/initrd.img-2.6.15-28-686
+savedefault
+boot
+
+* Note that I removed the 'splash' kernel option
+
+* Note the '-run=ubuntu.dapper.boot' option. Unfortunately, this isn't
+  working yet...
+
+*** Boot ***
+
+Reboot or turn on your computer. Eventually, hopefully, you'll be at a
+Factor prompt. Boot your system:
+
+  ( scratchpad ) boot
+
+You'll probably be prompted to select a vocab. Select 'raptor'.
+
+*** Now what ***
+
+The virtual consoles are allocated like so:
+
+  1 - Main listener console
+  2 - listener
+  3 - listener
+  4 - listener
+  5 - getty
+  6 - getty
+
+So you're next step might be to alt-f5, login, and run startx.
+
+*** Join the fun ***
+
+Take a loot at what happens during run levels S and 2. Implement a
+Factor version of something. Let me know about it.
+
diff --git a/unmaintained/raptor/tags.txt b/unmaintained/raptor/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/unmaintained/route/authors.txt b/unmaintained/route/authors.txt
new file mode 100755 (executable)
index 0000000..6cfd5da
--- /dev/null
@@ -0,0 +1 @@
+Eduardo Cavazos
diff --git a/unmaintained/route/route.factor b/unmaintained/route/route.factor
new file mode 100644 (file)
index 0000000..4d9bbfa
--- /dev/null
@@ -0,0 +1,55 @@
+
+USING: alien.syntax ;
+
+IN: unix.linux.route
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+C-STRUCT: struct-rtentry
+  { "ulong"           "rt_pad1" }
+  { "struct-sockaddr" "rt_dst" }
+  { "struct-sockaddr" "rt_gateway" }
+  { "struct-sockaddr" "rt_genmask" }
+  { "ushort"          "rt_flags" }
+  { "short"           "rt_pad2" }
+  { "ulong"           "rt_pad3" }
+  { "uchar"          "rt_tos" }
+  { "uchar"          "rt_class" }
+  { "short"          "rt_pad4" }
+  { "short"          "rt_metric" }
+  { "char*"          "rt_dev" }
+  { "ulong"          "rt_mtu" }
+  { "ulong"          "rt_window" }
+  { "ushort"         "rt_irtt" } ;
+
+: RTF_UP        HEX: 0001 ;            ! Route usable.
+: RTF_GATEWAY   HEX: 0002 ;            ! Destination is a gateway.
+
+: RTF_HOST      HEX: 0004 ;            ! Host entry (net otherwise).
+: RTF_REINSTATE         HEX: 0008 ;            ! Reinstate route after timeout.
+: RTF_DYNAMIC   HEX: 0010 ;            ! Created dyn. (by redirect).
+: RTF_MODIFIED  HEX: 0020 ;            ! Modified dyn. (by redirect).
+: RTF_MTU       HEX: 0040 ;            ! Specific MTU for this route.
+: RTF_MSS       RTF_MTU ;              ! Compatibility.
+: RTF_WINDOW    HEX: 0080 ;            ! Per route window clamping.
+: RTF_IRTT      HEX: 0100 ;            ! Initial round trip time.
+: RTF_REJECT    HEX: 0200 ;            ! Reject route.
+: RTF_STATIC    HEX: 0400 ;            ! Manually injected route.
+: RTF_XRESOLVE  HEX: 0800 ;            ! External resolver.
+: RTF_NOFORWARD  HEX: 1000 ;           ! Forwarding inhibited.
+: RTF_THROW     HEX: 2000 ;            ! Go to next class.
+: RTF_NOPMTUDISC HEX: 4000 ;           ! Do not send packets with DF.
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+USING: kernel alien.c-types io.sockets
+       unix unix.linux.sockios ;
+
+: route ( dst gateway genmask flags -- )
+  >r >r >r >r
+  "struct-rtentry" <c-object>
+  r> 0 <inet4> make-sockaddr over set-struct-rtentry-rt_dst
+  r> 0 <inet4> make-sockaddr over set-struct-rtentry-rt_gateway
+  r> 0 <inet4> make-sockaddr over set-struct-rtentry-rt_genmask
+  r>                                over set-struct-rtentry-rt_flags
+  AF_INET SOCK_DGRAM 0 socket SIOCADDRT rot ioctl drop ;
diff --git a/unmaintained/route/tags.txt b/unmaintained/route/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/unmaintained/sequences-lib/authors.txt b/unmaintained/sequences-lib/authors.txt
new file mode 100644 (file)
index 0000000..07c1c4a
--- /dev/null
@@ -0,0 +1,2 @@
+Eduardo Cavazos
+Doug Coleman
diff --git a/unmaintained/sequences-lib/lib-docs.factor b/unmaintained/sequences-lib/lib-docs.factor
new file mode 100755 (executable)
index 0000000..e279230
--- /dev/null
@@ -0,0 +1,29 @@
+USING: help.syntax help.markup kernel prettyprint sequences\r
+quotations math ;\r
+IN: sequences.lib\r
+\r
+HELP: map-withn\r
+{ $values { "seq" sequence } { "quot" quotation } { "n" number } { "newseq" sequence } }\r
+{ $description "A generalisation of " { $link map } ". The first " { $snippet "n" } " items after the quotation will be "\r
+"passed to the quotation given to map-withn for each element in the sequence."\r
+} \r
+{ $examples\r
+  { $example "USING: math sequences.lib prettyprint ;" "1 2 3 4 { 6 7 8 9 10 } [ + + + + ] 4 map-withn .s" "{ 16 17 18 19 20 }" }\r
+}\r
+{ $see-also each-withn } ;\r
+\r
+HELP: each-withn\r
+{ $values { "seq" sequence } { "quot" quotation } { "n" number } }\r
+{ $description "A generalisation of " { $link each } ". The first " { $snippet "n" } " items after the quotation will be "\r
+"passed to the quotation given to each-withn for each element in the sequence."\r
+} \r
+{ $see-also map-withn } ;\r
+\r
+HELP: randomize\r
+{ $values { "seq" sequence } { "seq'" sequence } }\r
+{ $description "Shuffle the elements in the sequence randomly, returning the new sequence." } ;\r
+\r
+HELP: enumerate\r
+{ $values { "seq" sequence } { "seq'" sequence } }\r
+{ $description "Returns a new sequence where each element is an array of { index, value }" } ;\r
+\r
diff --git a/unmaintained/sequences-lib/lib-tests.factor b/unmaintained/sequences-lib/lib-tests.factor
new file mode 100755 (executable)
index 0000000..509d9b1
--- /dev/null
@@ -0,0 +1,58 @@
+USING: arrays kernel sequences sequences.lib math math.functions math.ranges
+    tools.test strings ;
+IN: sequences.lib.tests
+
+[ 1 2 { 3 4 } [ + + drop ] 2 each-withn  ] must-infer
+{ 13 } [ 1 2 { 3 4 } [ + + ] 2 each-withn + ] unit-test
+
+[ 1 2 { 3 4 } [ + + ] 2 map-withn ] must-infer
+{ { 6 7 } } [ 1 2 { 3 4 } [ + + ] 2 map-withn ] unit-test
+{ { 16 17 18 19 20 } } [ 1 2 3 4 { 6 7 8 9 10 } [ + + + + ] 4 map-withn ] unit-test
+[ { 910 911 912 } ] [ 10 900 3 [ + + ] map-with2 ] unit-test
+
+[ 10 ] [ { 1 2 3 4 } [ + ] reduce* ] unit-test
+[ 24 ] [ { 1 2 3 4 } [ * ] reduce* ] unit-test
+
+[ -4 ] [ 1 -4 [ abs ] higher ] unit-test
+[ 1 ] [ 1 -4 [ abs ] lower ] unit-test
+
+[ { 1 2 3 4 } ] [ { { 1 2 3 4 } { 1 2 3 } } longest ] unit-test
+[ { 1 2 3 4 } ] [ { { 1 2 3 } { 1 2 3 4 } } longest ] unit-test
+
+[ { 1 2 3 } ] [ { { 1 2 3 4 } { 1 2 3 } } shortest ] unit-test
+[ { 1 2 3 } ] [ { { 1 2 3 } { 1 2 3 4 } } shortest ] unit-test
+
+[ 3 ] [ 1 3 bigger ] unit-test
+[ 1 ] [ 1 3 smaller ] unit-test
+
+[ "abd" ] [ "abc" "abd" bigger ] unit-test
+[ "abc" ] [ "abc" "abd" smaller ] unit-test
+
+[ "abe" ] [ { "abc" "abd" "abe" } biggest ] unit-test
+[ "abc" ] [ { "abc" "abd" "abe" } smallest ] unit-test
+
+[ 1 3 ] [ { 1 2 3 } minmax ] unit-test
+[ -11 -9 ] [ { -11 -10 -9 } minmax ] unit-test
+[ -1/0. 1/0. ] [ { -1/0. 1/0. -11 -10 -9 } minmax ] unit-test
+
+[ { { 1 } { -1 5 } { 2 4 } } ]
+[ { 1 -1 5 2 4 } [ < ] monotonic-split [ >array ] map ] unit-test
+[ { { 1 1 1 1 } { 2 2 } { 3 } { 4 } { 5 } { 6 6 6 } } ]
+[ { 1 1 1 1 2 2 3 4 5 6 6 6 } [ = ] monotonic-split [ >array ] map ] unit-test
+
+[ { 1 9 25 } ] [ { 1 3 5 6 } [ sq ] [ even? ] map-until ] unit-test
+[ { 2 4 } ] [ { 2 4 1 3 } [ even? ] take-while ] unit-test
+
+[ { { 0 0 } { 1 0 } { 0 1 } { 1 1 } } ] [ 2 2 exact-strings ] unit-test
+[ t ] [ "ab" 4 strings [ >string ] map "abab" swap member? ] unit-test
+[ { { } { 1 } { 2 } { 1 2 } } ] [ { 1 2 } power-set ] unit-test
+
+[ 1 2 { 3 4 } [ + + ] 2 map-withn ] must-infer
+{ { 6 7 } } [ 1 2 { 3 4 } [ + + ] 2 map-withn ] unit-test
+{ { 16 17 18 19 20 } } [ 1 2 3 4 { 6 7 8 9 10 } [ + + + + ] 4 map-withn ] unit-test
+[ 1 2 { 3 4 } [ + + drop ] 2 each-withn  ] must-infer
+{ 13 } [ 1 2 { 3 4 } [ + + ] 2 each-withn + ] unit-test
+[ { 910 911 912 } ] [ 10 900 3 [ + + ] map-with2 ] unit-test
+
+[ { { 0 1 } { 1 2 } { 2 3 } } ] [ { 1 2 3 } enumerate ] unit-test
+
diff --git a/unmaintained/sequences-lib/lib.factor b/unmaintained/sequences-lib/lib.factor
new file mode 100755 (executable)
index 0000000..72944c0
--- /dev/null
@@ -0,0 +1,149 @@
+! Copyright (C) 2007 Slava Pestov, Chris Double, Doug Coleman,
+!                    Eduardo Cavazos, Daniel Ehrenberg.
+! See http://factorcode.org/license.txt for BSD license.
+USING: combinators.lib kernel sequences math namespaces make
+assocs random sequences.private shuffle math.functions arrays
+math.parser math.private sorting strings ascii macros assocs.lib
+quotations hashtables math.order locals generalizations
+math.ranges random fry ;
+IN: sequences.lib
+
+: each-withn ( seq quot n -- ) nwith each ; inline
+
+: each-with ( seq quot -- ) with each ; inline
+
+: each-with2 ( obj obj list quot -- ) 2 each-withn ; inline
+
+: map-withn ( seq quot n -- newseq ) nwith map ; inline
+
+: map-with ( seq quot -- ) with map ; inline
+
+: map-with2 ( obj obj list quot -- newseq ) 2 map-withn ; inline
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: each-percent ( seq quot -- )
+  [
+    dup length
+    dup [ / ] curry
+    [ 1+ ] prepose
+  ] dip compose
+  2each ;                       inline
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: reduce* ( seq quot -- result ) [ ] swap map-reduce ; inline
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: higher ( a b quot -- c ) [ compare +gt+ eq? ] curry most ; inline
+
+: lower  ( a b quot -- c ) [ compare +lt+ eq? ] curry most ; inline
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: longer  ( a b -- c ) [ length ] higher ;
+
+: shorter ( a b -- c ) [ length ] lower ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: longest ( seq -- item ) [ longer ] reduce* ;
+
+: shortest ( seq -- item ) [ shorter ] reduce* ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: bigger ( a b -- c ) [ ] higher ;
+
+: smaller ( a b -- c ) [ ] lower ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: biggest ( seq -- item ) [ bigger ] reduce* ;
+
+: smallest ( seq -- item ) [ smaller ] reduce* ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: minmax ( seq -- min max )
+    #! find the min and max of a seq in one pass
+    1/0. -1/0. rot [ tuck max [ min ] dip ] each ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: ,, ( obj -- ) building get peek push ;
+: v, ( -- ) V{ } clone , ;
+: ,v ( -- ) building get dup peek empty? [ dup pop* ] when drop ;
+
+: (monotonic-split) ( seq quot -- newseq )
+    [
+        [ dup unclip suffix ] dip
+        v, [ pick ,, call [ v, ] unless ] curry 2each ,v
+    ] { } make ;
+
+: monotonic-split ( seq quot -- newseq )
+    over empty? [ 2drop { } ] [ (monotonic-split) ] if ;
+
+ERROR: element-not-found ;
+: split-around ( seq quot -- before elem after )
+    dupd find over [ element-not-found ] unless
+    [ cut rest ] dip swap ; inline
+
+: map-until ( seq quot pred -- newseq )
+    '[ [ @ dup @ [ drop t ] [ , f ] if ] find 2drop ] { } make ;
+
+: take-while ( seq quot -- newseq )
+    [ not ] compose
+    [ find drop [ head-slice ] when* ] curry
+    [ dup ] prepose keep like ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+<PRIVATE
+: translate-string ( n alphabet out-len -- seq )
+    [ drop /mod ] with map nip  ;
+
+: map-alphabet ( alphabet seq[seq] -- seq[seq] )
+    [ [ swap nth ] with map ] with map ;
+
+: exact-number-strings ( n out-len -- seqs )
+    [ ^ ] 2keep [ translate-string ] 2curry map ;
+
+: number-strings ( n max-length -- seqs )
+    1+ [ exact-number-strings ] with map concat ;
+PRIVATE>
+
+: exact-strings ( alphabet length -- seqs )
+    [ dup length ] dip exact-number-strings map-alphabet ;
+
+: strings ( alphabet length -- seqs )
+    [ dup length ] dip number-strings map-alphabet ;
+
+: switches ( seq1 seq -- subseq )
+    ! seq1 is a sequence of ones and zeroes
+    [ [ length ] keep [ nth 1 = ] curry filter ] dip
+    [ nth ] curry { } map-as ;
+
+: power-set ( seq -- subsets )
+    2 over length exact-number-strings swap [ switches ] curry map ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+<PRIVATE
+: (attempt-each-integer) ( i n quot -- result )
+    [
+        iterate-step roll
+        [ 3nip ] [ iterate-next (attempt-each-integer) ] if*
+    ] [ 3drop f ] if-iterate? ; inline recursive
+PRIVATE>
+
+: attempt-each ( seq quot -- result )
+    (each) iterate-prep (attempt-each-integer) ; inline
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: randomize ( seq -- seq' )
+    dup length 1 (a,b] [ dup random pick exchange ] each ;
+
+: enumerate ( seq -- seq' ) <enum> >alist ;
diff --git a/unmaintained/sequences-lib/summary.txt b/unmaintained/sequences-lib/summary.txt
new file mode 100644 (file)
index 0000000..e389b41
--- /dev/null
@@ -0,0 +1 @@
+Non-core sequence words
diff --git a/unmaintained/sequences-lib/tags.txt b/unmaintained/sequences-lib/tags.txt
new file mode 100644 (file)
index 0000000..42d711b
--- /dev/null
@@ -0,0 +1 @@
+collections
index 8157ba7dcf76dfc9ccea2ddea7753cad44831e93..c5fae3c647191170b19db16dc220111aebac2ac7 100644 (file)
@@ -1,39 +1,61 @@
 
-USING: kernel namespaces sequences
-       io io.files io.launcher io.encodings.ascii
-       bake builder.util
-       accessors vars
-       math.parser ;
+USING: io io.encodings.ascii io.files io.files.temp io.launcher
+       locals math.parser sequences sequences.deep
+       help.syntax
+       easy-help ;
 
 IN: size-of
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-VAR: headers
+Word: size-of
 
-: include-headers ( -- seq )
-  headers> [ `{ "#include <" , ">" } to-string ] map ;
+Values:
 
-: size-of-c-program ( type -- lines )
-  `{
-    "#include <stdio.h>"
-    include-headers
-    { "main() { printf( \"%i\" , sizeof( " , " ) ) ; }" }
-  }
-  to-strings ;
+    HEADERS sequence : List of header files
+    TYPE    string : A C type
+    n       integer : Size in number of bytes ..
 
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+Description:
+
+    Use 'size-of' to find out the size in bytes of a C type. 
+
+    The 'headers' argument is a list of header files to use. You may 
+    pass 'f' to only use 'stdio.h'. ..
+
+Example:
+
+    ! Find the size of 'int'
+
+    f "int" size-of .    ..
+
+Example:
 
-: c-file ( -- path ) "size-of.c" temp-file ;
+    ! Find the size of the 'XAnyEvent' struct from Xlib.h
 
-: exe ( -- path ) "size-of" temp-file ;
+    { "X11/Xlib.h" } "XAnyEvent" size-of .    ..
+
+;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: size-of ( type -- n )
-  size-of-c-program c-file ascii set-file-lines
+:: size-of ( HEADERS TYPE -- n )
+
+  [let | C-FILE   [ "size-of.c" temp-file ]
+         EXE-FILE [ "size-of"   temp-file ]
+         INCLUDES [ HEADERS [| FILE | { "#include <" FILE ">" } concat ] map ] |
+
+    {
+      "#include <stdio.h>"
+      INCLUDES
+      "main() { printf( \"%i\" , sizeof( " TYPE " ) ) ; }"
+    }
+
+    flatten C-FILE  ascii  set-file-lines
 
-  { "gcc" c-file "-o" exe } to-strings
-  [ "Error compiling generated C program" print ] run-or-bail
+    { "gcc" C-FILE "-o" EXE-FILE } try-process
+
+    EXE-FILE ascii <process-reader> contents string>number ] ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-  exe ascii <process-reader> contents string>number ;
\ No newline at end of file
diff --git a/unmaintained/sockios/authors.txt b/unmaintained/sockios/authors.txt
new file mode 100755 (executable)
index 0000000..6cfd5da
--- /dev/null
@@ -0,0 +1 @@
+Eduardo Cavazos
diff --git a/unmaintained/sockios/sockios.factor b/unmaintained/sockios/sockios.factor
new file mode 100644 (file)
index 0000000..fd1bb10
--- /dev/null
@@ -0,0 +1,64 @@
+
+IN: unix.linux.sockios
+
+! Imported from linux-headers-2.6.15-28-686 on Ubuntu 6.06
+
+! Routing table calls
+: SIOCADDRT    HEX: 890B ;             ! add routing table entry
+: SIOCDELRT    HEX: 890C ;             ! delete routing table entry
+: SIOCRTMSG    HEX: 890D ;             ! call to routing system
+
+! Socket configuration controls
+
+: SIOCGIFNAME       HEX: 8910 ;                ! get iface name
+: SIOCSIFLINK       HEX: 8911 ;                ! set iface channel
+: SIOCGIFCONF       HEX: 8912 ;                ! get iface list
+: SIOCGIFFLAGS      HEX: 8913 ;                ! get flags
+: SIOCSIFFLAGS      HEX: 8914 ;                ! set flags
+: SIOCGIFADDR       HEX: 8915 ;                ! get PA address
+: SIOCSIFADDR       HEX: 8916 ;                ! set PA address
+: SIOCGIFDSTADDR     HEX: 8917 ;               ! get remote PA address
+: SIOCSIFDSTADDR     HEX: 8918 ;               ! set remote PA address
+: SIOCGIFBRDADDR     HEX: 8919 ;               ! get broadcast PA address
+: SIOCSIFBRDADDR     HEX: 891a ;               ! set broadcast PA address
+: SIOCGIFNETMASK     HEX: 891b ;               ! get network PA mask
+: SIOCSIFNETMASK     HEX: 891c ;               ! set network PA mask
+: SIOCGIFMETRIC             HEX: 891d ;                ! get metric
+: SIOCSIFMETRIC             HEX: 891e ;                ! set metric
+: SIOCGIFMEM        HEX: 891f ;                ! get memory address (BSD)
+: SIOCSIFMEM        HEX: 8920 ;                ! set memory address (BSD)
+: SIOCGIFMTU        HEX: 8921 ;                ! get MTU size
+: SIOCSIFMTU        HEX: 8922 ;                ! set MTU size
+: SIOCSIFNAME       HEX: 8923 ;                ! set interface name
+: SIOCSIFHWADDR             HEX: 8924 ;                ! set hardware address
+: SIOCGIFENCAP      HEX: 8925 ;                ! get/set encapsulations
+: SIOCSIFENCAP      HEX: 8926 ;
+: SIOCGIFHWADDR             HEX: 8927 ;                ! Get hardware address
+: SIOCGIFSLAVE      HEX: 8929 ;                ! Driver slaving support
+: SIOCSIFSLAVE      HEX: 8930 ;
+: SIOCADDMULTI      HEX: 8931 ;                ! Multicast address lists
+: SIOCDELMULTI      HEX: 8932 ;
+: SIOCGIFINDEX      HEX: 8933 ;                ! name -> if_index mapping
+: SIOGIFINDEX       SIOCGIFINDEX ;             ! misprint compatibility :-)
+: SIOCSIFPFLAGS             HEX: 8934 ;                ! set/get extended flags set
+: SIOCGIFPFLAGS             HEX: 8935 ;
+: SIOCDIFADDR       HEX: 8936 ;                ! delete PA address
+: SIOCSIFHWBROADCAST HEX: 8937 ;               ! set hardware broadcast addr
+: SIOCGIFCOUNT      HEX: 8938 ;                ! get number of devices
+
+: SIOCGIFBR         HEX: 8940 ;                ! Bridging support
+: SIOCSIFBR         HEX: 8941 ;                ! Set bridging options
+
+: SIOCGIFTXQLEN             HEX: 8942 ;                ! Get the tx queue length
+: SIOCSIFTXQLEN             HEX: 8943 ;                ! Set the tx queue length
+
+: SIOCGIFDIVERT             HEX: 8944 ;                ! Frame diversion support
+: SIOCSIFDIVERT             HEX: 8945 ;                ! Set frame diversion options
+
+: SIOCETHTOOL       HEX: 8946 ;                ! Ethtool interface
+
+: SIOCGMIIPHY       HEX: 8947 ;                ! Get address of MII PHY in use
+: SIOCGMIIREG       HEX: 8948 ;                ! Read MII PHY register.
+: SIOCSMIIREG       HEX: 8949 ;                ! Write MII PHY register.
+
+: SIOCWANDEV        HEX: 894A ;                ! get/set netdev parameters
diff --git a/unmaintained/sockios/tags.txt b/unmaintained/sockios/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/unmaintained/strings-lib/lib-tests.factor b/unmaintained/strings-lib/lib-tests.factor
new file mode 100644 (file)
index 0000000..6e0ce05
--- /dev/null
@@ -0,0 +1,8 @@
+USING: kernel sequences strings.lib tools.test ;
+IN: temporary
+
+[ "abcdefghijklmnopqrstuvwxyz" ] [ lower-alpha-chars "" like ] unit-test
+[ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ] [ upper-alpha-chars "" like ] unit-test
+[ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" ] [ alpha-chars "" like ] unit-test
+[ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ] [ alphanumeric-chars "" like ] unit-test
+[ t ] [ 100 [ random-alphanumeric-char ] replicate alphanumeric-chars [ member? ] curry all? ] unit-test
diff --git a/unmaintained/strings-lib/lib.factor b/unmaintained/strings-lib/lib.factor
new file mode 100644 (file)
index 0000000..6ecca05
--- /dev/null
@@ -0,0 +1,33 @@
+USING: math math.ranges arrays sequences kernel random splitting
+strings unicode.case ;
+IN: strings.lib
+
+: >Upper ( str -- str )
+    dup empty? [ unclip ch>upper prefix ] unless ;
+
+: >Upper-dashes ( str -- str )
+    "-" split [ >Upper ] map "-" join ;
+
+: lower-alpha-chars ( -- seq )
+    CHAR: a CHAR: z [a,b] ;
+
+: upper-alpha-chars ( -- seq )
+    CHAR: A CHAR: Z [a,b] ;
+
+: numeric-chars ( -- seq )
+    CHAR: 0 CHAR: 9 [a,b] ;
+
+: alpha-chars ( -- seq )
+    lower-alpha-chars upper-alpha-chars append ;
+
+: alphanumeric-chars ( -- seq )
+    alpha-chars numeric-chars append ;
+
+: random-alpha-char ( -- ch )
+    alpha-chars random ;
+
+: random-alphanumeric-char ( -- ch )
+    alphanumeric-chars random ;
+
+: random-alphanumeric-string ( length -- str )
+    [ random-alphanumeric-char ] "" replicate-as ;
diff --git a/unmaintained/swap/authors.txt b/unmaintained/swap/authors.txt
new file mode 100755 (executable)
index 0000000..6cfd5da
--- /dev/null
@@ -0,0 +1 @@
+Eduardo Cavazos
diff --git a/unmaintained/swap/swap.factor b/unmaintained/swap/swap.factor
new file mode 100644 (file)
index 0000000..b4edaaa
--- /dev/null
@@ -0,0 +1,12 @@
+
+USING: alien.syntax ;
+
+IN: unix.linux.swap
+
+: SWAP_FLAG_PREFER      HEX: 8000 ; ! Set if swap priority is specified.
+: SWAP_FLAG_PRIO_MASK   HEX: 7fff ;
+: SWAP_FLAG_PRIO_SHIFT  0 ;
+
+FUNCTION: int swapon ( char* path, int flags ) ;
+
+FUNCTION: int swapoff ( char* path ) ;
\ No newline at end of file
diff --git a/unmaintained/swap/tags.txt b/unmaintained/swap/tags.txt
new file mode 100644 (file)
index 0000000..6bf6830
--- /dev/null
@@ -0,0 +1 @@
+unportable
diff --git a/unmaintained/tiling/tiling.factor b/unmaintained/tiling/tiling.factor
deleted file mode 100644 (file)
index cf6ea7f..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-
-USING: kernel sequences math math.order
-       ui.gadgets ui.gadgets.tracks ui.gestures
-       bake.fry accessors ;
-
-IN: ui.gadgets.tiling
-
-TUPLE: tiling < track gadgets tiles first focused ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: init-tiling ( tiling -- tiling )
-  init-track
-  { 1 0 }    >>orientation
-  V{ } clone >>gadgets
-  2          >>tiles
-  0          >>first
-  0          >>focused ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: <tiling> ( -- gadget ) tiling new init-tiling ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: bounded-subseq ( seq a b -- seq )
-  [ 0 max ] dip
-  pick length [ min ] curry bi@
-  rot
-  subseq ;
-
-: tiling-gadgets-to-map ( tiling -- gadgets )
-  [ gadgets>> ]
-  [ first>> ]
-  [ [ first>> ] [ tiles>> ] bi + ]
-  tri
-  bounded-subseq ;
-
-: tiling-map-gadgets ( tiling -- tiling )
-  dup clear-track
-  dup tiling-gadgets-to-map [ 1 track-add ] each ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: tiling-add ( tiling gadget -- tiling )
-  over gadgets>> push
-  tiling-map-gadgets ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: first-gadget ( tiling -- index ) drop 0 ;
-
-: last-gadget ( tiling -- index ) gadgets>> length 1 - ;
-
-: first-viewable ( tiling -- index ) first>> ;
-
-: last-viewable ( tiling -- index ) [ first>> ] [ tiles>> ] bi + 1 - ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: make-focused-mapped ( tiling -- tiling )
-
-  dup [ focused>> ] [ first>> ] bi <
-    [ dup first>> 1 - >>first ]
-    [ ]
-  if
-
-  dup [ last-viewable ] [ focused>> ] bi <
-    [ dup first>> 1 + >>first ]
-    [ ]
-  if ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: check-focused-bounds ( tiling -- tiling )
-  dup focused>> 0 max over gadgets>> length 1 - min >>focused ;
-
-: focus-prev ( tiling -- tiling )
-  dup focused>> 1 - >>focused
-  check-focused-bounds
-  make-focused-mapped
-  tiling-map-gadgets
-  dup request-focus ;
-
-: focus-next ( tiling -- tiling )
-  dup focused>> 1 + >>focused
-  check-focused-bounds
-  make-focused-mapped
-  tiling-map-gadgets
-  dup request-focus ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: exchanged! ( seq a b -- )
-                   [ 0 max ] bi@
-  pick length 1 - '[ _ min ] bi@
-  rot exchange ;
-
-: move-prev ( tiling -- tiling )
-  dup [ gadgets>> ] [ focused>> 1 - ] [ focused>> ] tri exchanged!
-  focus-prev ;
-
-: move-next ( tiling -- tiling )
-  dup [ gadgets>> ] [ focused>> ] [ focused>> 1 + ] tri exchanged!
-  focus-next ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: add-tile ( tiling -- tiling )
-  dup tiles>> 1 + >>tiles
-  tiling-map-gadgets ;
-
-: del-tile ( tiling -- tiling )
-  dup tiles>> 1 - 1 max >>tiles
-  tiling-map-gadgets ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-M: tiling focusable-child* ( tiling -- child/t )
-   [ focused>> ] [ gadgets>> ] bi nth ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-TUPLE: tiling-shelf < tiling ;
-TUPLE: tiling-pile  < tiling ;
-
-: <tiling-shelf> ( -- gadget )
-  tiling-shelf new init-tiling { 1 0 } >>orientation ;
-
-: <tiling-pile> ( -- gadget )
-  tiling-pile new init-tiling { 0 1 } >>orientation ;
-
-tiling-shelf
- H{
-    { T{ key-down f { A+    } "LEFT"  } [ focus-prev  drop ] }
-    { T{ key-down f { A+    } "RIGHT" } [ focus-next drop ] }
-    { T{ key-down f { S+ A+ } "LEFT"  } [ move-prev   drop ] }
-    { T{ key-down f { S+ A+ } "RIGHT" } [ move-next  drop ] }
-    { T{ key-down f { C+    } "["     } [ del-tile  drop ] }
-    { T{ key-down f { C+    } "]"     } [ add-tile  drop ] }
-  }
-set-gestures
-
-tiling-pile
- H{
-    { T{ key-down f { A+    } "UP"  } [ focus-prev  drop ] }
-    { T{ key-down f { A+    } "DOWN" } [ focus-next drop ] }
-    { T{ key-down f { S+ A+ } "UP"  } [ move-prev   drop ] }
-    { T{ key-down f { S+ A+ } "DOWN" } [ move-next  drop ] }
-    { T{ key-down f { C+    } "["     } [ del-tile  drop ] }
-    { T{ key-down f { C+    } "]"     } [ add-tile  drop ] }
-  }
-set-gestures
diff --git a/unmaintained/turtle/authors.txt b/unmaintained/turtle/authors.txt
deleted file mode 100644 (file)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/unmaintained/turtle/turtle.factor b/unmaintained/turtle/turtle.factor
deleted file mode 100644 (file)
index 24f93b5..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-
-USING: kernel math arrays math.vectors math.matrices generic.lib pos ori ;
-
-IN: turtle
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-TUPLE: turtle ;
-
-: <turtle> ( -- turtle )
-turtle new
-{ 0 0 0 } clone <pos>
-3 identity-matrix <ori>
-rot
-3array chain ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: reset-turtle ( -- ) { 0 0 0 } >pos 3 identity-matrix >ori ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: step-vector ( length -- array ) { 0 0 1 } n*v ;
-
-: step-turtle ( length -- ) step-vector ori> swap m.v pos> v+ >pos ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: strafe-up ( length -- )
-90 pitch-up
-step-turtle
-90 pitch-down ;
-
-: strafe-down ( length -- )
-90 pitch-down
-step-turtle
-90 pitch-up ;
-
-: strafe-left ( length -- )
-90 turn-left
-step-turtle
-90 turn-right ;
-
-: strafe-right ( length -- )
-90 turn-right
-step-turtle
-90 turn-left ;
diff --git a/unmaintained/ui/gadgets/plot/plot.factor b/unmaintained/ui/gadgets/plot/plot.factor
new file mode 100644 (file)
index 0000000..f502b7e
--- /dev/null
@@ -0,0 +1,166 @@
+
+USING: kernel quotations arrays sequences math math.ranges fry
+       opengl opengl.gl ui.render ui.gadgets.cartesian processing.shapes
+       accessors
+       help.syntax
+       easy-help ;
+
+IN: ui.gadgets.plot
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ARTICLE: "ui.gadgets.plot" "Plot Gadget"
+
+Summary:
+
+    A simple gadget for ploting two dimentional functions.
+
+    Use the arrow keys to move around.
+
+    Use 'a' and 'z' keys to zoom in and out. ..
+
+Example:
+
+    <plot> [ sin ] add-function gadget.    ..
+
+Example:
+
+    <plot>
+      [ sin ] red  function boa add-function
+      [ cos ] blue function boa add-function
+    gadget.    ..
+
+;
+
+ABOUT: "ui.gadgets.plot"
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+TUPLE: plot < cartesian functions points ;
+
+: init-plot ( plot -- plot )
+  init-cartesian
+    { } >>functions
+    100 >>points ;
+
+: <plot> ( -- plot ) plot new init-plot ;
+
+: step-size ( plot -- step-size )
+  [ [ x-max>> ] [ x-min>> ] bi - ] [ points>> ] bi / ;
+
+: plot-range ( plot -- range )
+  [ x-min>> ] [ x-max>> ] [ step-size ] tri <range> ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+TUPLE: function function color ;
+
+GENERIC: plot-function ( plot object -- plot )
+
+M: callable plot-function ( plot quotation -- plot )
+  [ dup plot-range ] dip '[ dup @ 2array ] map line-strip ;
+
+M: function plot-function ( plot function -- plot )
+   dup color>> dup [ >stroke-color ] [ drop ] if
+   [ dup plot-range ] dip function>> '[ dup @ 2array ] map line-strip ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: plot-functions ( plot -- plot ) dup functions>> [ plot-function ] each ;
+
+: draw-axis ( plot -- plot )
+  dup
+    [ [ x-min>> ] [ drop 0  ] bi 2array ]
+    [ [ x-max>> ] [ drop 0  ] bi 2array ] bi line*
+  dup
+    [ [ drop 0  ] [ y-min>> ] bi 2array ]
+    [ [ drop 0  ] [ y-max>> ] bi 2array ] bi line* ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+USING: ui.gadgets.slate ;
+
+M: plot draw-slate ( plot -- plot )
+   2 glLineWidth
+   draw-axis
+   plot-functions
+   fill-mode
+   1 glLineWidth ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: add-function ( plot function -- plot )
+  over functions>> swap suffix >>functions ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: x-span ( plot -- span ) [ x-max>> ] [ x-min>> ] bi - ;
+: y-span ( plot -- span ) [ y-max>> ] [ y-min>> ] bi - ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+USING: ui.gestures ui.gadgets ;
+
+: left ( plot -- plot )
+  dup [ x-min>> ] [ x-span 1/10 * ] bi - >>x-min
+  dup [ x-max>> ] [ x-span 1/10 * ] bi - >>x-max
+  dup relayout-1 ;
+
+: right ( plot -- plot )
+  dup [ x-min>> ] [ x-span 1/10 * ] bi + >>x-min
+  dup [ x-max>> ] [ x-span 1/10 * ] bi + >>x-max
+  dup relayout-1 ;
+
+: down ( plot -- plot )
+  dup [ y-min>> ] [ y-span 1/10 * ] bi - >>y-min
+  dup [ y-max>> ] [ y-span 1/10 * ] bi - >>y-max
+  dup relayout-1 ;
+
+: up ( plot -- plot )
+  dup [ y-min>> ] [ y-span 1/10 * ] bi + >>y-min
+  dup [ y-max>> ] [ y-span 1/10 * ] bi + >>y-max
+  dup relayout-1 ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: zoom-in-horizontal ( plot -- plot )
+  dup [ x-min>> ] [ x-span 1/10 * ] bi + >>x-min
+  dup [ x-max>> ] [ x-span 1/10 * ] bi - >>x-max ;
+
+: zoom-in-vertical ( plot -- plot )
+  dup [ y-min>> ] [ y-span 1/10 * ] bi + >>y-min
+  dup [ y-max>> ] [ y-span 1/10 * ] bi - >>y-max ;
+
+: zoom-in ( plot -- plot )
+  zoom-in-horizontal
+  zoom-in-vertical
+  dup relayout-1 ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: zoom-out-horizontal ( plot -- plot )
+  dup [ x-min>> ] [ x-span 1/10 * ] bi - >>x-min
+  dup [ x-max>> ] [ x-span 1/10 * ] bi + >>x-max ;
+
+: zoom-out-vertical ( plot -- plot )
+  dup [ y-min>> ] [ y-span 1/10 * ] bi - >>y-min
+  dup [ y-max>> ] [ y-span 1/10 * ] bi + >>y-max ;
+
+: zoom-out ( plot -- plot )
+  zoom-out-horizontal
+  zoom-out-vertical
+  dup relayout-1 ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+plot
+  H{
+    { T{ mouse-enter } [ request-focus ] }
+    { T{ key-down f f "LEFT"  } [ left drop  ] }
+    { T{ key-down f f "RIGHT" } [ right drop ] }
+    { T{ key-down f f "DOWN"  } [ down drop  ] }
+    { T{ key-down f f "UP"    } [ up drop    ] }
+    { T{ key-down f f "a"     } [ zoom-in  drop ] }
+    { T{ key-down f f "z"     } [ zoom-out drop ] }
+  }
+set-gestures
\ No newline at end of file
diff --git a/unmaintained/ui/gadgets/slate/authors.txt b/unmaintained/ui/gadgets/slate/authors.txt
new file mode 100755 (executable)
index 0000000..6cfd5da
--- /dev/null
@@ -0,0 +1 @@
+Eduardo Cavazos
diff --git a/unmaintained/ui/gadgets/slate/slate.factor b/unmaintained/ui/gadgets/slate/slate.factor
new file mode 100644 (file)
index 0000000..af2dfcc
--- /dev/null
@@ -0,0 +1,143 @@
+
+USING: kernel namespaces opengl ui.render ui.gadgets accessors
+       help.syntax
+       easy-help ;
+
+IN: ui.gadgets.slate
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ARTICLE: "slate" "Slate Gadget"
+
+Summary:
+
+    A gadget with an 'action' slot which should be set to a callable.  ..
+
+Example:
+
+    ! Load the right vocabs for the examples
+
+    USING: processing.shapes ui.gadgets.slate ;    ..
+
+Example:
+
+    [ { { 10 10 } { 50 30 } { 10 50 } } polygon fill-mode ] <slate>
+    gadget.  ..
+
+;
+
+ABOUT: "slate"
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+TUPLE: slate < gadget action pdim graft ungraft ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: init-slate ( slate -- slate )
+  init-gadget
+  [ ]         >>action
+  { 200 200 } >>pdim
+  [ ]         >>graft
+  [ ]         >>ungraft ;
+
+: <slate> ( action -- slate )
+  slate new
+    init-slate
+    swap >>action ;
+
+M: slate pref-dim* ( slate -- dim ) pdim>> ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+USING: combinators arrays sequences math math.geometry
+       opengl.gl ui.gadgets.worlds ;
+
+: screen-y* ( gadget -- loc )
+  {
+    [ find-world height ]
+    [ screen-loc second ]
+    [ height ]
+  }
+  cleave
+  + - ;
+
+: screen-loc* ( gadget -- loc )
+  {
+    [ screen-loc first ]
+    [ screen-y* ]
+  }
+  cleave
+  2array ;
+
+: setup-viewport ( gadget -- gadget )
+  dup
+  {
+    [ screen-loc* ]
+    [ dim>>       ]
+  }
+  cleave
+  gl-viewport ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: default-coordinate-system ( gadget -- gadget )
+  dup
+  {
+    [ drop 0 ]
+    [ width 1 - ]
+    [ height 1 - ]
+    [ drop 0 ]
+  }
+  cleave
+  -1 1
+  glOrtho ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+M: slate graft*   ( slate -- ) graft>>   call ;
+M: slate ungraft* ( slate -- ) ungraft>> call ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+GENERIC: establish-coordinate-system ( gadget -- gadget )
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+M: slate establish-coordinate-system ( slate -- slate )
+   default-coordinate-system ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+GENERIC: draw-slate ( slate -- slate )
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+M: slate draw-slate ( slate -- slate ) dup action>> call ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+M: slate draw-gadget* ( slate -- )
+
+   GL_PROJECTION glMatrixMode glPushMatrix glLoadIdentity
+
+   establish-coordinate-system
+
+   GL_MODELVIEW glMatrixMode glPushMatrix glLoadIdentity 
+
+   setup-viewport
+
+   draw-slate
+
+   GL_PROJECTION glMatrixMode glPopMatrix glLoadIdentity
+   GL_MODELVIEW  glMatrixMode glPopMatrix glLoadIdentity
+
+   dup
+   find-world
+   ! The world coordinate system is a little wacky:
+   dup { [ drop 0 ] [ width ] [ height ] [ drop 0 ] } cleave -1 1 glOrtho
+   setup-viewport
+   drop
+   drop ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
diff --git a/unmaintained/ui/gadgets/tiling/tiling.factor b/unmaintained/ui/gadgets/tiling/tiling.factor
new file mode 100644 (file)
index 0000000..8a3c878
--- /dev/null
@@ -0,0 +1,185 @@
+
+USING: kernel sequences math math.order
+       ui.gadgets ui.gadgets.tracks ui.gestures accessors fry
+       help.syntax
+       easy-help ;
+
+IN: ui.gadgets.tiling
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ARTICLE: "ui.gadgets.tiling" "Tiling Layout Gadgets"
+
+Summary:
+
+    A gadget which tiles it's children.
+
+    A tiling gadget may contain any number of children, but only a
+    fixed number is displayed at one time. How many are displayed can
+    be controlled via Control-[ and Control-].
+
+    The focus may be switched with Alt-Left and Alt-Right.
+
+    The focused child may be moved via Shift-Alt-Left and
+    Shift-Alt-Right. ..
+
+Example:
+
+    <tiling-shelf>
+      "resource:" directory-files
+        [ [ drop ] <bevel-button> tiling-add ]
+      each
+    "Files" open-window ..
+
+;
+
+ABOUT: "ui.gadgets.tiling"
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+TUPLE: tiling < track gadgets tiles first focused ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: init-tiling ( tiling -- tiling )
+  init-track
+  { 1 0 }    >>orientation
+  V{ } clone >>gadgets
+  2          >>tiles
+  0          >>first
+  0          >>focused ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: <tiling> ( -- gadget ) tiling new init-tiling ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: bounded-subseq ( seq a b -- seq )
+  [ 0 max ] dip
+  pick length [ min ] curry bi@
+  rot
+  subseq ;
+
+: tiling-gadgets-to-map ( tiling -- gadgets )
+  [ gadgets>> ]
+  [ first>> ]
+  [ [ first>> ] [ tiles>> ] bi + ]
+  tri
+  bounded-subseq ;
+
+: tiling-map-gadgets ( tiling -- tiling )
+  dup clear-track
+  dup tiling-gadgets-to-map [ 1 track-add ] each ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: tiling-add ( tiling gadget -- tiling )
+  over gadgets>> push
+  tiling-map-gadgets ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: first-gadget ( tiling -- index ) drop 0 ;
+
+: last-gadget ( tiling -- index ) gadgets>> length 1 - ;
+
+: first-viewable ( tiling -- index ) first>> ;
+
+: last-viewable ( tiling -- index ) [ first>> ] [ tiles>> ] bi + 1 - ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: make-focused-mapped ( tiling -- tiling )
+
+  dup [ focused>> ] [ first>> ] bi <
+    [ dup first>> 1 - >>first ]
+    [ ]
+  if
+
+  dup [ last-viewable ] [ focused>> ] bi <
+    [ dup first>> 1 + >>first ]
+    [ ]
+  if ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: check-focused-bounds ( tiling -- tiling )
+  dup focused>> 0 max over gadgets>> length 1 - min >>focused ;
+
+: focus-prev ( tiling -- tiling )
+  dup focused>> 1 - >>focused
+  check-focused-bounds
+  make-focused-mapped
+  tiling-map-gadgets
+  dup request-focus ;
+
+: focus-next ( tiling -- tiling )
+  dup focused>> 1 + >>focused
+  check-focused-bounds
+  make-focused-mapped
+  tiling-map-gadgets
+  dup request-focus ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: exchanged! ( seq a b -- )
+                   [ 0 max ] bi@
+  pick length 1 - '[ _ min ] bi@
+  rot exchange ;
+
+: move-prev ( tiling -- tiling )
+  dup [ gadgets>> ] [ focused>> 1 - ] [ focused>> ] tri exchanged!
+  focus-prev ;
+
+: move-next ( tiling -- tiling )
+  dup [ gadgets>> ] [ focused>> ] [ focused>> 1 + ] tri exchanged!
+  focus-next ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: add-tile ( tiling -- tiling )
+  dup tiles>> 1 + >>tiles
+  tiling-map-gadgets ;
+
+: del-tile ( tiling -- tiling )
+  dup tiles>> 1 - 1 max >>tiles
+  tiling-map-gadgets ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+M: tiling focusable-child* ( tiling -- child/t )
+   [ focused>> ] [ gadgets>> ] bi nth ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+TUPLE: tiling-shelf < tiling ;
+TUPLE: tiling-pile  < tiling ;
+
+: <tiling-shelf> ( -- gadget )
+  tiling-shelf new init-tiling { 1 0 } >>orientation ;
+
+: <tiling-pile> ( -- gadget )
+  tiling-pile new init-tiling { 0 1 } >>orientation ;
+
+tiling-shelf
+ H{
+    { T{ key-down f { A+    } "LEFT"  } [ focus-prev  drop ] }
+    { T{ key-down f { A+    } "RIGHT" } [ focus-next drop ] }
+    { T{ key-down f { S+ A+ } "LEFT"  } [ move-prev   drop ] }
+    { T{ key-down f { S+ A+ } "RIGHT" } [ move-next  drop ] }
+    { T{ key-down f { C+    } "["     } [ del-tile  drop ] }
+    { T{ key-down f { C+    } "]"     } [ add-tile  drop ] }
+  }
+set-gestures
+
+tiling-pile
+ H{
+    { T{ key-down f { A+    } "UP"  } [ focus-prev  drop ] }
+    { T{ key-down f { A+    } "DOWN" } [ focus-next drop ] }
+    { T{ key-down f { S+ A+ } "UP"  } [ move-prev   drop ] }
+    { T{ key-down f { S+ A+ } "DOWN" } [ move-next  drop ] }
+    { T{ key-down f { C+    } "["     } [ del-tile  drop ] }
+    { T{ key-down f { C+    } "]"     } [ add-tile  drop ] }
+  }
+set-gestures
diff --git a/unmaintained/xml/syntax/syntax.factor b/unmaintained/xml/syntax/syntax.factor
deleted file mode 100644 (file)
index 91b31ec..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-! Copyright (C) 2008 Daniel Ehrenberg.
-! See http://factorcode.org/license.txt for BSD license.
-USING: lexer parser splitting kernel quotations namespaces make
-sequences assocs sequences.lib xml.generator xml.utilities
-xml.data ;
-IN: xml.syntax
-
-: parsed-name ( accum -- accum )
-    scan ":" split1 [ f <name> ] [ <simple-name> ] if* parsed ;
-
-: run-combinator ( accum quot1 quot2 -- accum )
-    >r [ ] like parsed r> [ parsed ] each ;
-
-: parse-tag-contents ( accum contained? -- accum )
-    [ \ contained*, parsed ] [
-        scan-word \ [ =
-        [ POSTPONE: [ \ tag*, parsed ]
-        [ "Expected [ missing" throw ] if
-    ] if ;
-
-DEFER: >>
-
-: attributes-parsed ( accum quot -- accum )
-    [ f parsed ] [
-        >r \ >r parsed r> parsed
-        [ H{ } make-assoc r> swap ] [ parsed ] each
-    ] if-empty ;
-
-: <<
-    parsed-name [
-        \ >> parse-until >quotation
-        attributes-parsed \ contained? get
-    ] with-scope parse-tag-contents ; parsing
-
-: ==
-    \ call parsed parsed-name \ set parsed ; parsing
-
-: //
-    \ contained? on ; parsing
-
-: parse-special ( accum end-token word -- accum )
-    >r parse-tokens " " join parsed r> parsed ;
-
-: <!-- "-->" \ comment, parse-special ; parsing
-
-: <!  ">" \ directive, parse-special ; parsing
-
-: <? "?>" \ instruction, parse-special ; parsing
-
-: >xml-document ( seq -- xml )
-    dup first prolog? [ unclip-slice ] [ standard-prolog ] if swap
-    [ tag? ] split-around <xml> ;
-
-DEFER: XML>
-
-: <XML
-    \ XML> [ >quotation ] parse-literal
-    { } parsed \ make parsed \ >xml-document parsed ; parsing
index 4c6279bf8f3b4156022311993b563030251319b5..de28ba64bad30c67020c3d6bbcd86992a5d62705 100644 (file)
@@ -4,5 +4,6 @@ DLL_SUFFIX=
 PLAF_DLL_OBJS += vm/os-windows-nt.o
 PLAF_EXE_OBJS += vm/resources.o
 PLAF_EXE_OBJS += vm/main-windows-nt.o
-#CFLAGS += -mwindows
+CFLAGS += -mwindows
+CFLAGS_CONSOLE += -mconsole
 include vm/Config.windows
index 603a7200ae2a8f8133c8de907a1bd420cdd0cf57..9a020a7bc184e60ea2b3f2cc50d1d2503b8d34e0 100644 (file)
@@ -1,4 +1,3 @@
 WINDRES=windres
 include vm/Config.windows.nt
 include vm/Config.x86.32
-#error "lolllll"
index 3ede5561712e43377d2bbc72fa4563657dbbdc31..f0c0a068cb91b7662e02043d8954482fb42c6068 100644 (file)
@@ -1,5 +1,3 @@
-#WIN64_PATH=/k/MinGW/win64/bin
-#WIN64_PATH=/cygdrive/k/MinGW/win64/bin/x86_64-pc-mingw32
 CC=$(WIN64_PATH)-gcc.exe
 WINDRES=$(WIN64_PATH)-windres.exe
 include vm/Config.windows.nt
index dfa7dd5f4a8f5c28e362b50ff4d041c99d8cb242..ae3f52411287ce2e088d7c75d6b25858d31c9bb0 100755 (executable)
@@ -90,9 +90,9 @@ void primitive_set_callstack(void)
        critical_error("Bug in set_callstack()",0);
 }
 
-F_COMPILED *frame_code(F_STACK_FRAME *frame)
+F_CODE_BLOCK *frame_code(F_STACK_FRAME *frame)
 {
-       return (F_COMPILED *)frame->xt - 1;
+       return (F_CODE_BLOCK *)frame->xt - 1;
 }
 
 CELL frame_type(F_STACK_FRAME *frame)
@@ -102,11 +102,14 @@ CELL frame_type(F_STACK_FRAME *frame)
 
 CELL frame_executing(F_STACK_FRAME *frame)
 {
-       F_COMPILED *compiled = frame_code(frame);
-       CELL code_start = (CELL)(compiled + 1);
-       CELL literal_start = code_start + compiled->code_length;
-
-       return get(literal_start);
+       F_CODE_BLOCK *compiled = frame_code(frame);
+       if(compiled->literals == F)
+               return F;
+       else
+       {
+               F_ARRAY *array = untag_object(compiled->literals);
+               return array_nth(array,0);
+       }
 }
 
 F_STACK_FRAME *frame_successor(F_STACK_FRAME *frame)
index da0748b07191d11bbf9e54d5b6d1cef579d730e3..68937980f6ed0667030c686a7c58b13ca4f4416a 100755 (executable)
@@ -8,7 +8,7 @@ F_STACK_FRAME *fix_callstack_top(F_STACK_FRAME *top, F_STACK_FRAME *bottom);
 void iterate_callstack(CELL top, CELL bottom, CALLSTACK_ITER iterator);
 void iterate_callstack_object(F_CALLSTACK *stack, CALLSTACK_ITER iterator);
 F_STACK_FRAME *frame_successor(F_STACK_FRAME *frame);
-F_COMPILED *frame_code(F_STACK_FRAME *frame);
+F_CODE_BLOCK *frame_code(F_STACK_FRAME *frame);
 CELL frame_executing(F_STACK_FRAME *frame);
 CELL frame_scan(F_STACK_FRAME *frame);
 CELL frame_type(F_STACK_FRAME *frame);
diff --git a/vm/code_block.c b/vm/code_block.c
new file mode 100644 (file)
index 0000000..a1369a3
--- /dev/null
@@ -0,0 +1,433 @@
+#include "master.h"
+
+void flush_icache_for(F_CODE_BLOCK *compiled)
+{
+       CELL start = (CELL)(compiled + 1);
+       flush_icache(start,compiled->code_length);
+}
+
+void iterate_relocations(F_CODE_BLOCK *compiled, RELOCATION_ITERATOR iter)
+{
+       if(compiled->relocation != F)
+       {
+               F_BYTE_ARRAY *relocation = untag_object(compiled->relocation);
+
+               F_REL *rel = (F_REL *)(relocation + 1);
+               F_REL *rel_end = (F_REL *)((char *)rel + byte_array_capacity(relocation));
+
+               while(rel < rel_end)
+               {
+                       iter(rel,compiled);
+                       rel++;
+               }
+       }
+}
+
+/* Store a 32-bit value into a PowerPC LIS/ORI sequence */
+INLINE void store_address_2_2(CELL cell, CELL value)
+{
+       put(cell - CELLS,((get(cell - CELLS) & ~0xffff) | ((value >> 16) & 0xffff)));
+       put(cell,((get(cell) & ~0xffff) | (value & 0xffff)));
+}
+
+/* Store a value into a bitfield of a PowerPC instruction */
+INLINE void store_address_masked(CELL cell, F_FIXNUM value, CELL mask, F_FIXNUM shift)
+{
+       /* This is unaccurate but good enough */
+       F_FIXNUM test = (F_FIXNUM)mask >> 1;
+       if(value <= -test || value >= test)
+               critical_error("Value does not fit inside relocation",0);
+
+       u32 original = *(u32*)cell;
+       original &= ~mask;
+       *(u32*)cell = (original | ((value >> shift) & mask));
+}
+
+/* Perform a fixup on a code block */
+void store_address_in_code_block(CELL class, CELL offset, F_FIXNUM absolute_value)
+{
+       F_FIXNUM relative_value = absolute_value - offset;
+
+       switch(class)
+       {
+       case RC_ABSOLUTE_CELL:
+               put(offset,absolute_value);
+               break;
+       case RC_ABSOLUTE:
+               *(u32*)offset = absolute_value;
+               break;
+       case RC_RELATIVE:
+               *(u32*)offset = relative_value - sizeof(u32);
+               break;
+       case RC_ABSOLUTE_PPC_2_2:
+               store_address_2_2(offset,absolute_value);
+               break;
+       case RC_RELATIVE_PPC_2:
+               store_address_masked(offset,relative_value,REL_RELATIVE_PPC_2_MASK,0);
+               break;
+       case RC_RELATIVE_PPC_3:
+               store_address_masked(offset,relative_value,REL_RELATIVE_PPC_3_MASK,0);
+               break;
+       case RC_RELATIVE_ARM_3:
+               store_address_masked(offset,relative_value - CELLS * 2,
+                       REL_RELATIVE_ARM_3_MASK,2);
+               break;
+       case RC_INDIRECT_ARM:
+               store_address_masked(offset,relative_value - CELLS,
+                       REL_INDIRECT_ARM_MASK,0);
+               break;
+       case RC_INDIRECT_ARM_PC:
+               store_address_masked(offset,relative_value - CELLS * 2,
+                       REL_INDIRECT_ARM_MASK,0);
+               break;
+       default:
+               critical_error("Bad rel class",class);
+               break;
+       }
+}
+
+void update_literal_references_step(F_REL *rel, F_CODE_BLOCK *compiled)
+{
+       if(REL_TYPE(rel) == RT_IMMEDIATE)
+       {
+               CELL offset = rel->offset + (CELL)(compiled + 1);
+               F_ARRAY *literals = untag_object(compiled->literals);
+               F_FIXNUM absolute_value = array_nth(literals,REL_ARGUMENT(rel));
+               store_address_in_code_block(REL_CLASS(rel),offset,absolute_value);
+       }
+}
+
+/* Update pointers to literals from compiled code. */
+void update_literal_references(F_CODE_BLOCK *compiled)
+{
+       iterate_relocations(compiled,update_literal_references_step);
+       flush_icache_for(compiled);
+}
+
+/* Copy all literals referenced from a code block to newspace. Only for
+aging and nursery collections */
+void copy_literal_references(F_CODE_BLOCK *compiled)
+{
+       if(collecting_gen >= compiled->last_scan)
+       {
+               if(collecting_accumulation_gen_p())
+                       compiled->last_scan = collecting_gen;
+               else
+                       compiled->last_scan = collecting_gen + 1;
+
+               /* initialize chase pointer */
+               CELL scan = newspace->here;
+
+               copy_handle(&compiled->literals);
+               copy_handle(&compiled->relocation);
+
+               /* do some tracing so that all reachable literals are now
+               at their final address */
+               copy_reachable_objects(scan,&newspace->here);
+
+               update_literal_references(compiled);
+       }
+}
+
+CELL object_xt(CELL obj)
+{
+       if(type_of(obj) == WORD_TYPE)
+               return (CELL)untag_word(obj)->xt;
+       else
+               return (CELL)untag_quotation(obj)->xt;
+}
+
+void update_word_references_step(F_REL *rel, F_CODE_BLOCK *compiled)
+{
+       if(REL_TYPE(rel) == RT_XT)
+       {
+               CELL offset = rel->offset + (CELL)(compiled + 1);
+               F_ARRAY *literals = untag_object(compiled->literals);
+               CELL xt = object_xt(array_nth(literals,REL_ARGUMENT(rel)));
+               store_address_in_code_block(REL_CLASS(rel),offset,xt);
+       }
+}
+
+/* Relocate new code blocks completely; updating references to literals,
+dlsyms, and words. For all other words in the code heap, we only need
+to update references to other words, without worrying about literals
+or dlsyms. */
+void update_word_references(F_CODE_BLOCK *compiled)
+{
+       if(compiled->needs_fixup)
+               relocate_code_block(compiled);
+       else
+       {
+               iterate_relocations(compiled,update_word_references_step);
+               flush_icache_for(compiled);
+       }
+}
+
+/* Update references to words. This is done after a new code block
+is added to the heap. */
+
+/* Mark all literals referenced from a word XT. Only for tenured
+collections */
+void mark_code_block(F_CODE_BLOCK *compiled)
+{
+       mark_block(compiled_to_block(compiled));
+
+       copy_handle(&compiled->literals);
+       copy_handle(&compiled->relocation);
+
+       flush_icache_for(compiled);
+}
+
+void mark_stack_frame_step(F_STACK_FRAME *frame)
+{
+       mark_code_block(frame_code(frame));
+}
+
+/* Mark code blocks executing in currently active stack frames. */
+void mark_active_blocks(F_CONTEXT *stacks)
+{
+       if(collecting_gen == TENURED)
+       {
+               CELL top = (CELL)stacks->callstack_top;
+               CELL bottom = (CELL)stacks->callstack_bottom;
+
+               iterate_callstack(top,bottom,mark_stack_frame_step);
+       }
+}
+
+void mark_object_code_block(CELL scan)
+{
+       F_WORD *word;
+       F_QUOTATION *quot;
+       F_CALLSTACK *stack;
+
+       switch(object_type(scan))
+       {
+       case WORD_TYPE:
+               word = (F_WORD *)scan;
+               mark_code_block(word->code);
+               if(word->profiling)
+                       mark_code_block(word->profiling);
+               break;
+       case QUOTATION_TYPE:
+               quot = (F_QUOTATION *)scan;
+               if(quot->compiledp != F)
+                       mark_code_block(quot->code);
+               break;
+       case CALLSTACK_TYPE:
+               stack = (F_CALLSTACK *)scan;
+               iterate_callstack_object(stack,mark_stack_frame_step);
+               break;
+       }
+}
+
+/* References to undefined symbols are patched up to call this function on
+image load */
+void undefined_symbol(void)
+{
+       general_error(ERROR_UNDEFINED_SYMBOL,F,F,NULL);
+}
+
+/* Look up an external library symbol referenced by a compiled code block */
+void *get_rel_symbol(F_REL *rel, F_ARRAY *literals)
+{
+       CELL arg = REL_ARGUMENT(rel);
+       CELL symbol = array_nth(literals,arg);
+       CELL library = array_nth(literals,arg + 1);
+
+       F_DLL *dll = (library == F ? NULL : untag_dll(library));
+
+       if(dll != NULL && !dll->dll)
+               return undefined_symbol;
+
+       if(type_of(symbol) == BYTE_ARRAY_TYPE)
+       {
+               F_SYMBOL *name = alien_offset(symbol);
+               void *sym = ffi_dlsym(dll,name);
+
+               if(sym)
+                       return sym;
+       }
+       else if(type_of(symbol) == ARRAY_TYPE)
+       {
+               CELL i;
+               F_ARRAY *names = untag_object(symbol);
+               for(i = 0; i < array_capacity(names); i++)
+               {
+                       F_SYMBOL *name = alien_offset(array_nth(names,i));
+                       void *sym = ffi_dlsym(dll,name);
+
+                       if(sym)
+                               return sym;
+               }
+       }
+
+       return undefined_symbol;
+}
+
+/* Compute an address to store at a relocation */
+void relocate_code_block_step(F_REL *rel, F_CODE_BLOCK *compiled)
+{
+       CELL offset = rel->offset + (CELL)(compiled + 1);
+       F_ARRAY *literals = untag_object(compiled->literals);
+       F_FIXNUM absolute_value;
+
+       switch(REL_TYPE(rel))
+       {
+       case RT_PRIMITIVE:
+               absolute_value = (CELL)primitives[REL_ARGUMENT(rel)];
+               break;
+       case RT_DLSYM:
+               absolute_value = (CELL)get_rel_symbol(rel,literals);
+               break;
+       case RT_IMMEDIATE:
+               absolute_value = array_nth(literals,REL_ARGUMENT(rel));
+               break;
+       case RT_XT:
+               absolute_value = object_xt(array_nth(literals,REL_ARGUMENT(rel)));
+               break;
+       case RT_HERE:
+               absolute_value = rel->offset + (CELL)(compiled + 1) + (short)REL_ARGUMENT(rel);
+               break;
+       case RT_LABEL:
+               absolute_value = (CELL)(compiled + 1) + REL_ARGUMENT(rel);
+               break;
+       case RT_STACK_CHAIN:
+               absolute_value = (CELL)&stack_chain;
+               break;
+       default:
+               critical_error("Bad rel type",rel->type);
+               return; /* Can't happen */
+       }
+
+       store_address_in_code_block(REL_CLASS(rel),offset,absolute_value);
+}
+
+/* Perform all fixups on a code block */
+void relocate_code_block(F_CODE_BLOCK *compiled)
+{
+       compiled->last_scan = NURSERY;
+       compiled->needs_fixup = false;
+       iterate_relocations(compiled,relocate_code_block_step);
+       flush_icache_for(compiled);
+}
+
+/* Fixup labels. This is done at compile time, not image load time */
+void fixup_labels(F_ARRAY *labels, CELL code_format, F_CODE_BLOCK *compiled)
+{
+       CELL i;
+       CELL size = array_capacity(labels);
+
+       for(i = 0; i < size; i += 3)
+       {
+               CELL class = to_fixnum(array_nth(labels,i));
+               CELL offset = to_fixnum(array_nth(labels,i + 1));
+               CELL target = to_fixnum(array_nth(labels,i + 2));
+
+               store_address_in_code_block(class,
+                       offset + (CELL)(compiled + 1),
+                       target + (CELL)(compiled + 1));
+       }
+}
+
+/* Write a sequence of integers to memory, with 'format' bytes per integer */
+void deposit_integers(CELL here, F_ARRAY *array, CELL format)
+{
+       CELL count = array_capacity(array);
+       CELL i;
+
+       for(i = 0; i < count; i++)
+       {
+               F_FIXNUM value = to_fixnum(array_nth(array,i));
+               if(format == 1)
+                       bput(here + i,value);
+               else if(format == sizeof(unsigned int))
+                       *(unsigned int *)(here + format * i) = value;
+               else if(format == sizeof(CELL))
+                       *(CELL *)(here + format * i) = value;
+               else
+                       critical_error("Bad format in deposit_integers()",format);
+       }
+}
+
+bool stack_traces_p(void)
+{
+       return to_boolean(userenv[STACK_TRACES_ENV]);
+}
+
+CELL compiled_code_format(void)
+{
+       return untag_fixnum_fast(userenv[JIT_CODE_FORMAT]);
+}
+
+/* Might GC */
+void *allot_code_block(CELL size)
+{
+       void *start = heap_allot(&code_heap,size);
+
+       /* If allocation failed, do a code GC */
+       if(start == NULL)
+       {
+               gc();
+               start = heap_allot(&code_heap,size);
+
+               /* Insufficient room even after code GC, give up */
+               if(start == NULL)
+               {
+                       CELL used, total_free, max_free;
+                       heap_usage(&code_heap,&used,&total_free,&max_free);
+
+                       print_string("Code heap stats:\n");
+                       print_string("Used: "); print_cell(used); nl();
+                       print_string("Total free space: "); print_cell(total_free); nl();
+                       print_string("Largest free block: "); print_cell(max_free); nl();
+                       fatal_error("Out of memory in add-compiled-block",0);
+               }
+       }
+
+       return start;
+}
+
+/* Might GC */
+F_CODE_BLOCK *add_compiled_block(
+       CELL type,
+       F_ARRAY *code,
+       F_ARRAY *labels,
+       CELL relocation,
+       CELL literals)
+{
+       CELL code_format = compiled_code_format();
+       CELL code_length = align8(array_capacity(code) * code_format);
+
+       REGISTER_ROOT(literals);
+       REGISTER_ROOT(relocation);
+       REGISTER_UNTAGGED(code);
+       REGISTER_UNTAGGED(labels);
+
+       F_CODE_BLOCK *compiled = allot_code_block(sizeof(F_CODE_BLOCK) + code_length);
+
+       UNREGISTER_UNTAGGED(labels);
+       UNREGISTER_UNTAGGED(code);
+       UNREGISTER_ROOT(relocation);
+       UNREGISTER_ROOT(literals);
+
+       /* compiled header */
+       compiled->type = type;
+       compiled->last_scan = NURSERY;
+       compiled->needs_fixup = true;
+       compiled->code_length = code_length;
+       compiled->literals = literals;
+       compiled->relocation = relocation;
+
+       /* code */
+       deposit_integers((CELL)(compiled + 1),code,code_format);
+
+       /* fixup labels */
+       if(labels) fixup_labels(labels,code_format,compiled);
+
+       /* next time we do a minor GC, we have to scan the code heap for
+       literals */
+       last_code_heap_scan = NURSERY;
+
+       return compiled;
+}
diff --git a/vm/code_block.h b/vm/code_block.h
new file mode 100644 (file)
index 0000000..5ebe04f
--- /dev/null
@@ -0,0 +1,91 @@
+typedef enum {
+       /* arg is a primitive number */
+       RT_PRIMITIVE,
+       /* arg is a literal table index, holding an array pair (symbol/dll) */
+       RT_DLSYM,
+       /* a pointer to a compiled word reference */
+       RT_DISPATCH,
+       /* a compiled word reference */
+       RT_XT,
+       /* current offset */
+       RT_HERE,
+       /* a local label */
+       RT_LABEL,
+       /* immediate literal */
+       RT_IMMEDIATE,
+       /* address of stack_chain var */
+       RT_STACK_CHAIN
+} F_RELTYPE;
+
+typedef enum {
+       /* absolute address in a 64-bit location */
+       RC_ABSOLUTE_CELL,
+       /* absolute address in a 32-bit location */
+       RC_ABSOLUTE,
+       /* relative address in a 32-bit location */
+       RC_RELATIVE,
+       /* relative address in a PowerPC LIS/ORI sequence */
+       RC_ABSOLUTE_PPC_2_2,
+       /* relative address in a PowerPC LWZ/STW/BC instruction */
+       RC_RELATIVE_PPC_2,
+       /* relative address in a PowerPC B/BL instruction */
+       RC_RELATIVE_PPC_3,
+       /* relative address in an ARM B/BL instruction */
+       RC_RELATIVE_ARM_3,
+       /* pointer to address in an ARM LDR/STR instruction */
+       RC_INDIRECT_ARM,
+       /* pointer to address in an ARM LDR/STR instruction offset by 8 bytes */
+       RC_INDIRECT_ARM_PC
+} F_RELCLASS;
+
+#define REL_RELATIVE_PPC_2_MASK 0xfffc
+#define REL_RELATIVE_PPC_3_MASK 0x3fffffc
+#define REL_INDIRECT_ARM_MASK 0xfff
+#define REL_RELATIVE_ARM_3_MASK 0xffffff
+
+/* the rel type is built like a cell to avoid endian-specific code in
+the compiler */
+#define REL_TYPE(r) ((r)->type & 0x000000ff)
+#define REL_CLASS(r) (((r)->type & 0x0000ff00) >> 8)
+#define REL_ARGUMENT(r) (((r)->type & 0xffff0000) >> 16)
+
+/* code relocation consists of a table of entries for each fixup */
+typedef struct {
+       unsigned int type;
+       unsigned int offset;
+} F_REL;
+
+void flush_icache_for(F_CODE_BLOCK *compiled);
+
+typedef void (*RELOCATION_ITERATOR)(F_REL *rel, F_CODE_BLOCK *compiled);
+
+void iterate_relocations(F_CODE_BLOCK *compiled, RELOCATION_ITERATOR iter);
+
+void store_address_in_code_block(CELL class, CELL offset, F_FIXNUM absolute_value);
+
+void relocate_code_block(F_CODE_BLOCK *compiled);
+
+void update_literal_references(F_CODE_BLOCK *compiled);
+
+void copy_literal_references(F_CODE_BLOCK *compiled);
+
+void update_word_references(F_CODE_BLOCK *compiled);
+
+void mark_code_block(F_CODE_BLOCK *compiled);
+
+void mark_active_blocks(F_CONTEXT *stacks);
+
+void mark_object_code_block(CELL scan);
+
+void relocate_code_block(F_CODE_BLOCK *relocating);
+
+CELL compiled_code_format(void);
+
+bool stack_traces_p(void);
+
+F_CODE_BLOCK *add_compiled_block(
+       CELL type,
+       F_ARRAY *code,
+       F_ARRAY *labels,
+       CELL relocation,
+       CELL literals);
index c15185944af5fed1522cb505dd1fc6fba19e89df..8c734c263c33bbf34a4afa087933cb9e0efd292b 100755 (executable)
@@ -11,18 +11,6 @@ void new_heap(F_HEAP *heap, CELL size)
        heap->free_list = NULL;
 }
 
-/* Allocate a code heap during startup */
-void init_code_heap(CELL size)
-{
-       new_heap(&code_heap,size);
-}
-
-bool in_code_heap_p(CELL ptr)
-{
-       return (ptr >= code_heap.segment->start
-               && ptr <= code_heap.segment->end);
-}
-
 /* If there is no previous block, next_free becomes the head of the free list,
 else its linked in */
 INLINE void update_free_list(F_HEAP *heap, F_BLOCK *prev, F_BLOCK *next_free)
@@ -92,7 +80,7 @@ void build_free_list(F_HEAP *heap, CELL size)
 }
 
 /* Allocate a block of memory from the mark and sweep GC heap */
-CELL heap_allot(F_HEAP *heap, CELL size)
+void *heap_allot(F_HEAP *heap, CELL size)
 {
        F_BLOCK *prev = NULL;
        F_BLOCK *scan = heap->free_list;
@@ -139,13 +127,29 @@ CELL heap_allot(F_HEAP *heap, CELL size)
                /* this is our new block */
                scan->status = B_ALLOCATED;
 
-               return (CELL)(scan + 1);
+               return scan + 1;
        }
 
-       return 0;
+       return NULL;
+}
+
+void mark_block(F_BLOCK *block)
+{
+       /* If already marked, do nothing */
+       switch(block->status)
+       {
+       case B_MARKED:
+               return;
+       case B_ALLOCATED:
+               block->status = B_MARKED;
+               break;
+       default:
+               critical_error("Marking the wrong block",(CELL)block);
+               break;
+       }
 }
 
-/* If in the middle of code GC, we have to grow the heap, GC restarts from
+/* If in the middle of code GC, we have to grow the heap, data GC restarts from
 scratch, so we have to unmark any marked blocks. */
 void unmark_marked(F_HEAP *heap)
 {
@@ -243,136 +247,6 @@ CELL heap_size(F_HEAP *heap)
                return heap->segment->size;
 }
 
-/* Apply a function to every code block */
-void iterate_code_heap(CODE_HEAP_ITERATOR iter)
-{
-       F_BLOCK *scan = first_block(&code_heap);
-
-       while(scan)
-       {
-               if(scan->status != B_FREE)
-                       iterate_code_heap_step(block_to_compiled(scan),iter);
-               scan = next_block(&code_heap,scan);
-       }
-}
-
-/* Copy all literals referenced from a code block to newspace */
-void collect_literals_step(F_COMPILED *compiled, CELL code_start, CELL literals_start)
-{
-       if(collecting_gen >= compiled->last_scan)
-       {
-               CELL scan;
-               CELL literal_end = literals_start + compiled->literals_length;
-
-               if(collecting_accumulation_gen_p())
-                       compiled->last_scan = collecting_gen;
-               else
-                       compiled->last_scan = collecting_gen + 1;
-
-               for(scan = literals_start; scan < literal_end; scan += CELLS)
-                       copy_handle((CELL*)scan);
-
-               if(compiled->relocation != F)
-               {
-                       copy_handle(&compiled->relocation);
-
-                       F_BYTE_ARRAY *relocation = untag_object(compiled->relocation);
-
-                       F_REL *rel = (F_REL *)(relocation + 1);
-                       F_REL *rel_end = (F_REL *)((char *)rel + byte_array_capacity(relocation));
-
-                       while(rel < rel_end)
-                       {
-                               if(REL_TYPE(rel) == RT_IMMEDIATE)
-                               {
-                                       CELL offset = rel->offset + code_start;
-                                       F_FIXNUM absolute_value = get(CREF(literals_start,REL_ARGUMENT(rel)));
-                                       apply_relocation(REL_CLASS(rel),offset,absolute_value);
-                               }
-
-                               rel++;
-                       }
-               }
-
-               flush_icache(code_start,literals_start - code_start);
-       }
-}
-
-/* Copy literals referenced from all code blocks to newspace */
-void collect_literals(void)
-{
-       iterate_code_heap(collect_literals_step);
-}
-
-/* Mark all XTs and literals referenced from a word XT */
-void recursive_mark(F_BLOCK *block)
-{
-       /* If already marked, do nothing */
-       switch(block->status)
-       {
-       case B_MARKED:
-               return;
-       case B_ALLOCATED:
-               block->status = B_MARKED;
-               break;
-       default:
-               critical_error("Marking the wrong block",(CELL)block);
-               break;
-       }
-
-       F_COMPILED *compiled = block_to_compiled(block);
-       iterate_code_heap_step(compiled,collect_literals_step);
-}
-
-/* Push the free space and total size of the code heap */
-void primitive_code_room(void)
-{
-       CELL used, total_free, max_free;
-       heap_usage(&code_heap,&used,&total_free,&max_free);
-       dpush(tag_fixnum((code_heap.segment->size) / 1024));
-       dpush(tag_fixnum(used / 1024));
-       dpush(tag_fixnum(total_free / 1024));
-       dpush(tag_fixnum(max_free / 1024));
-}
-
-/* Dump all code blocks for debugging */
-void dump_heap(F_HEAP *heap)
-{
-       CELL size = 0;
-
-       F_BLOCK *scan = first_block(heap);
-
-       while(scan)
-       {
-               char *status;
-               switch(scan->status)
-               {
-               case B_FREE:
-                       status = "free";
-                       break;
-               case B_ALLOCATED:
-                       size += object_size(block_to_compiled(scan)->relocation);
-                       status = "allocated";
-                       break;
-               case B_MARKED:
-                       size += object_size(block_to_compiled(scan)->relocation);
-                       status = "marked";
-                       break;
-               default:
-                       status = "invalid";
-                       break;
-               }
-
-               print_cell_hex((CELL)scan); print_string(" ");
-               print_cell_hex(scan->size); print_string(" ");
-               print_string(status); print_string("\n");
-
-               scan = next_block(heap,scan);
-       }
-       
-       print_cell(size); print_string(" bytes of relocation data\n");
-}
-
 /* Compute where each block is going to go, after compaction */
 CELL compute_heap_forwarding(F_HEAP *heap)
 {
@@ -395,80 +269,6 @@ CELL compute_heap_forwarding(F_HEAP *heap)
        return address - heap->segment->start;
 }
 
-F_COMPILED *forward_xt(F_COMPILED *compiled)
-{
-       return block_to_compiled(compiled_to_block(compiled)->forwarding);
-}
-
-void forward_frame_xt(F_STACK_FRAME *frame)
-{
-       CELL offset = (CELL)FRAME_RETURN_ADDRESS(frame) - (CELL)frame_code(frame);
-       F_COMPILED *forwarded = forward_xt(frame_code(frame));
-       frame->xt = (XT)(forwarded + 1);
-       FRAME_RETURN_ADDRESS(frame) = (XT)((CELL)forwarded + offset);
-}
-
-void forward_object_xts(void)
-{
-       begin_scan();
-
-       CELL obj;
-
-       while((obj = next_object()) != F)
-       {
-               if(type_of(obj) == WORD_TYPE)
-               {
-                       F_WORD *word = untag_object(obj);
-
-                       word->code = forward_xt(word->code);
-                       if(word->profiling)
-                               word->profiling = forward_xt(word->profiling);
-               }
-               else if(type_of(obj) == QUOTATION_TYPE)
-               {
-                       F_QUOTATION *quot = untag_object(obj);
-
-                       if(quot->compiledp != F)
-                               quot->code = forward_xt(quot->code);
-               }
-               else if(type_of(obj) == CALLSTACK_TYPE)
-               {
-                       F_CALLSTACK *stack = untag_object(obj);
-                       iterate_callstack_object(stack,forward_frame_xt);
-               }
-       }
-
-       /* End the heap scan */
-       gc_off = false;
-}
-
-/* Set the XT fields now that the heap has been compacted */
-void fixup_object_xts(void)
-{
-       begin_scan();
-
-       CELL obj;
-
-       while((obj = next_object()) != F)
-       {
-               if(type_of(obj) == WORD_TYPE)
-               {
-                       F_WORD *word = untag_object(obj);
-                       update_word_xt(word);
-               }
-               else if(type_of(obj) == QUOTATION_TYPE)
-               {
-                       F_QUOTATION *quot = untag_object(obj);
-
-                       if(quot->compiledp != F)
-                               set_quot_xt(quot,quot->code);
-               }
-       }
-
-       /* End the heap scan */
-       gc_off = false;
-}
-
 void compact_heap(F_HEAP *heap)
 {
        F_BLOCK *scan = first_block(heap);
@@ -482,29 +282,3 @@ void compact_heap(F_HEAP *heap)
                scan = next;
        }
 }
-
-/* Move all free space to the end of the code heap. This is not very efficient,
-since it makes several passes over the code and data heaps, but we only ever
-do this before saving a deployed image and exiting, so performaance is not
-critical here */
-void compact_code_heap(void)
-{
-       /* Free all unreachable code blocks */
-       gc();
-
-       /* Figure out where the code heap blocks are going to end up */
-       CELL size = compute_heap_forwarding(&code_heap);
-
-       /* Update word and quotation code pointers */
-       forward_object_xts();
-
-       /* Actually perform the compaction */
-       compact_heap(&code_heap);
-
-       /* Update word and quotation XTs */
-       fixup_object_xts();
-
-       /* Now update the free list; there will be a single free block at
-       the end */
-       build_free_list(&code_heap,size);
-}
index 72ad8d451c6ffea36a1ba9f8f7ab055a6c7a4d0c..4d4637d0e190fe11e7922e42066c12dbb1755db1 100644 (file)
@@ -26,11 +26,14 @@ typedef struct {
 
 void new_heap(F_HEAP *heap, CELL size);
 void build_free_list(F_HEAP *heap, CELL size);
-CELL heap_allot(F_HEAP *heap, CELL size);
+void *heap_allot(F_HEAP *heap, CELL size);
+void mark_block(F_BLOCK *block);
 void unmark_marked(F_HEAP *heap);
 void free_unmarked(F_HEAP *heap);
 void heap_usage(F_HEAP *heap, CELL *used, CELL *total_free, CELL *max_free);
 CELL heap_size(F_HEAP *heap);
+CELL compute_heap_forwarding(F_HEAP *heap);
+void compact_heap(F_HEAP *heap);
 
 INLINE F_BLOCK *next_block(F_HEAP *heap, F_BLOCK *block)
 {
@@ -41,29 +44,6 @@ INLINE F_BLOCK *next_block(F_HEAP *heap, F_BLOCK *block)
                return (F_BLOCK *)next;
 }
 
-/* compiled code */
-F_HEAP code_heap;
-
-typedef void (*CODE_HEAP_ITERATOR)(F_COMPILED *compiled, CELL code_start, CELL literals_start);
-
-INLINE void iterate_code_heap_step(F_COMPILED *compiled, CODE_HEAP_ITERATOR iter)
-{
-       CELL code_start = (CELL)(compiled + 1);
-       CELL literals_start = code_start + compiled->code_length;
-
-       iter(compiled,code_start,literals_start);
-}
-
-INLINE F_BLOCK *compiled_to_block(F_COMPILED *compiled)
-{
-       return (F_BLOCK *)compiled - 1;
-}
-
-INLINE F_COMPILED *block_to_compiled(F_BLOCK *block)
-{
-       return (F_COMPILED *)(block + 1);
-}
-
 INLINE F_BLOCK *first_block(F_HEAP *heap)
 {
        return (F_BLOCK *)heap->segment->start;
@@ -73,13 +53,3 @@ INLINE F_BLOCK *last_block(F_HEAP *heap)
 {
        return (F_BLOCK *)heap->segment->end;
 }
-
-void init_code_heap(CELL size);
-bool in_code_heap_p(CELL ptr);
-void iterate_code_heap(CODE_HEAP_ITERATOR iter);
-void collect_literals(void);
-void recursive_mark(F_BLOCK *block);
-void dump_heap(F_HEAP *heap);
-void compact_code_heap(void);
-
-void primitive_code_room(void);
index 9a1c45c7df9e90c287f96ea56ba70c9757331b92..325aed50378689bfcbef615118c9b6f57e1771a8 100755 (executable)
 #include "master.h"
 
-/* References to undefined symbols are patched up to call this function on
-image load */
-void undefined_symbol(void)
+/* Allocate a code heap during startup */
+void init_code_heap(CELL size)
 {
-       general_error(ERROR_UNDEFINED_SYMBOL,F,F,NULL);
+       new_heap(&code_heap,size);
 }
 
-INLINE CELL get_literal(CELL literals_start, CELL num)
+bool in_code_heap_p(CELL ptr)
 {
-       return get(CREF(literals_start,num));
+       return (ptr >= code_heap.segment->start
+               && ptr <= code_heap.segment->end);
 }
 
-/* Look up an external library symbol referenced by a compiled code block */
-void *get_rel_symbol(F_REL *rel, CELL literals_start)
+void set_word_code(F_WORD *word, F_CODE_BLOCK *compiled)
 {
-       CELL arg = REL_ARGUMENT(rel);
-       CELL symbol = get_literal(literals_start,arg);
-       CELL library = get_literal(literals_start,arg + 1);
-
-       F_DLL *dll = (library == F ? NULL : untag_dll(library));
-
-       if(dll != NULL && !dll->dll)
-               return undefined_symbol;
-
-       if(type_of(symbol) == BYTE_ARRAY_TYPE)
-       {
-               F_SYMBOL *name = alien_offset(symbol);
-               void *sym = ffi_dlsym(dll,name);
-
-               if(sym)
-                       return sym;
-       }
-       else if(type_of(symbol) == ARRAY_TYPE)
-       {
-               CELL i;
-               F_ARRAY *names = untag_object(symbol);
-               for(i = 0; i < array_capacity(names); i++)
-               {
-                       F_SYMBOL *name = alien_offset(array_nth(names,i));
-                       void *sym = ffi_dlsym(dll,name);
-
-                       if(sym)
-                               return sym;
-               }
-       }
-
-       return undefined_symbol;
-}
-
-/* Compute an address to store at a relocation */
-INLINE CELL compute_code_rel(F_REL *rel,
-       CELL code_start, CELL literals_start)
-{
-       CELL obj;
-
-       switch(REL_TYPE(rel))
-       {
-       case RT_PRIMITIVE:
-               return (CELL)primitives[REL_ARGUMENT(rel)];
-       case RT_DLSYM:
-               return (CELL)get_rel_symbol(rel,literals_start);
-       case RT_IMMEDIATE:
-               return get(CREF(literals_start,REL_ARGUMENT(rel)));
-       case RT_XT:
-               obj = get(CREF(literals_start,REL_ARGUMENT(rel)));
-               if(type_of(obj) == WORD_TYPE)
-                       return (CELL)untag_word(obj)->xt;
-               else
-                       return (CELL)untag_quotation(obj)->xt;
-       case RT_HERE:
-               return rel->offset + code_start + (short)REL_ARGUMENT(rel);
-       case RT_LABEL:
-               return code_start + REL_ARGUMENT(rel);
-       case RT_STACK_CHAIN:
-               return (CELL)&stack_chain;
-       default:
-               critical_error("Bad rel type",rel->type);
-               return -1; /* Can't happen */
-       }
-}
-
-/* Store a 32-bit value into a PowerPC LIS/ORI sequence */
-INLINE void reloc_set_2_2(CELL cell, CELL value)
-{
-       put(cell - CELLS,((get(cell - CELLS) & ~0xffff) | ((value >> 16) & 0xffff)));
-       put(cell,((get(cell) & ~0xffff) | (value & 0xffff)));
-}
-
-/* Store a value into a bitfield of a PowerPC instruction */
-INLINE void reloc_set_masked(CELL cell, F_FIXNUM value, CELL mask, F_FIXNUM shift)
-{
-       /* This is unaccurate but good enough */
-       F_FIXNUM test = (F_FIXNUM)mask >> 1;
-       if(value <= -test || value >= test)
-               critical_error("Value does not fit inside relocation",0);
-
-       u32 original = *(u32*)cell;
-       original &= ~mask;
-       *(u32*)cell = (original | ((value >> shift) & mask));
-}
-
-/* Perform a fixup on a code block */
-void apply_relocation(CELL class, CELL offset, F_FIXNUM absolute_value)
-{
-       F_FIXNUM relative_value = absolute_value - offset;
-
-       switch(class)
-       {
-       case RC_ABSOLUTE_CELL:
-               put(offset,absolute_value);
-               break;
-       case RC_ABSOLUTE:
-               *(u32*)offset = absolute_value;
-               break;
-       case RC_RELATIVE:
-               *(u32*)offset = relative_value - sizeof(u32);
-               break;
-       case RC_ABSOLUTE_PPC_2_2:
-               reloc_set_2_2(offset,absolute_value);
-               break;
-       case RC_RELATIVE_PPC_2:
-               reloc_set_masked(offset,relative_value,REL_RELATIVE_PPC_2_MASK,0);
-               break;
-       case RC_RELATIVE_PPC_3:
-               reloc_set_masked(offset,relative_value,REL_RELATIVE_PPC_3_MASK,0);
-               break;
-       case RC_RELATIVE_ARM_3:
-               reloc_set_masked(offset,relative_value - CELLS * 2,
-                       REL_RELATIVE_ARM_3_MASK,2);
-               break;
-       case RC_INDIRECT_ARM:
-               reloc_set_masked(offset,relative_value - CELLS,
-                       REL_INDIRECT_ARM_MASK,0);
-               break;
-       case RC_INDIRECT_ARM_PC:
-               reloc_set_masked(offset,relative_value - CELLS * 2,
-                       REL_INDIRECT_ARM_MASK,0);
-               break;
-       default:
-               critical_error("Bad rel class",class);
-               break;
-       }
-}
-
-/* Perform all fixups on a code block */
-void relocate_code_block(F_COMPILED *compiled, CELL code_start, CELL literals_start)
-{
-       compiled->last_scan = NURSERY;
-
-       if(compiled->relocation != F)
-       {
-               F_BYTE_ARRAY *relocation = untag_object(compiled->relocation);
-
-               F_REL *rel = (F_REL *)(relocation + 1);
-               F_REL *rel_end = (F_REL *)((char *)rel + byte_array_capacity(relocation));
-
-               while(rel < rel_end)
-               {
-                       CELL offset = rel->offset + code_start;
-
-                       F_FIXNUM absolute_value = compute_code_rel(
-                               rel,code_start,literals_start);
-
-                       apply_relocation(REL_CLASS(rel),offset,absolute_value);
-
-                       rel++;
-               }
-       }
-
-       flush_icache(code_start,literals_start - code_start);
-}
-
-/* Fixup labels. This is done at compile time, not image load time */
-void fixup_labels(F_ARRAY *labels, CELL code_format, CELL code_start)
-{
-       CELL i;
-       CELL size = array_capacity(labels);
-
-       for(i = 0; i < size; i += 3)
-       {
-               CELL class = to_fixnum(array_nth(labels,i));
-               CELL offset = to_fixnum(array_nth(labels,i + 1));
-               CELL target = to_fixnum(array_nth(labels,i + 2));
-
-               apply_relocation(class,
-                       offset + code_start,
-                       target + code_start);
-       }
-}
-
-/* Write a sequence of integers to memory, with 'format' bytes per integer */
-void deposit_integers(CELL here, F_ARRAY *array, CELL format)
-{
-       CELL count = array_capacity(array);
-       CELL i;
-
-       for(i = 0; i < count; i++)
-       {
-               F_FIXNUM value = to_fixnum(array_nth(array,i));
-               if(format == 1)
-                       bput(here + i,value);
-               else if(format == sizeof(unsigned int))
-                       *(unsigned int *)(here + format * i) = value;
-               else if(format == CELLS)
-                       put(CREF(here,i),value);
-               else
-                       critical_error("Bad format in deposit_integers()",format);
-       }
-}
+       if(compiled->type != WORD_TYPE)
+               critical_error("bad param to set_word_xt",(CELL)compiled);
 
-/* Write a sequence of tagged pointers to memory */
-void deposit_objects(CELL here, F_ARRAY *array)
-{
-       memcpy((void*)here,array + 1,array_capacity(array) * CELLS);
+       word->code = compiled;
+       word->optimizedp = T;
 }
 
-bool stack_traces_p(void)
+/* Allocates memory */
+void default_word_code(F_WORD *word, bool relocate)
 {
-       return to_boolean(userenv[STACK_TRACES_ENV]);
-}
+       REGISTER_UNTAGGED(word);
+       jit_compile(word->def,relocate);
+       UNREGISTER_UNTAGGED(word);
 
-CELL compiled_code_format(void)
-{
-       return untag_fixnum_fast(userenv[JIT_CODE_FORMAT]);
+       word->code = untag_quotation(word->def)->code;
+       word->optimizedp = F;
 }
 
-CELL allot_code_block(CELL size)
+/* Apply a function to every code block */
+void iterate_code_heap(CODE_HEAP_ITERATOR iter)
 {
-       CELL start = heap_allot(&code_heap,size);
+       F_BLOCK *scan = first_block(&code_heap);
 
-       /* If allocation failed, do a code GC */
-       if(start == 0)
+       while(scan)
        {
-               gc();
-               start = heap_allot(&code_heap,size);
-
-               /* Insufficient room even after code GC, give up */
-               if(start == 0)
-               {
-                       CELL used, total_free, max_free;
-                       heap_usage(&code_heap,&used,&total_free,&max_free);
-
-                       print_string("Code heap stats:\n");
-                       print_string("Used: "); print_cell(used); nl();
-                       print_string("Total free space: "); print_cell(total_free); nl();
-                       print_string("Largest free block: "); print_cell(max_free); nl();
-                       fatal_error("Out of memory in add-compiled-block",0);
-               }
+               if(scan->status != B_FREE)
+                       iter(block_to_compiled(scan));
+               scan = next_block(&code_heap,scan);
        }
-
-       return start;
 }
 
-/* Might GC */
-F_COMPILED *add_compiled_block(
-       CELL type,
-       F_ARRAY *code,
-       F_ARRAY *labels,
-       CELL relocation,
-       F_ARRAY *literals)
+/* Copy literals referenced from all code blocks to newspace. Only for
+aging and nursery collections */
+void copy_code_heap_roots(void)
 {
-       CELL code_format = compiled_code_format();
-
-       CELL code_length = align8(array_capacity(code) * code_format);
-       CELL literals_length = array_capacity(literals) * CELLS;
-
-       REGISTER_ROOT(relocation);
-       REGISTER_UNTAGGED(code);
-       REGISTER_UNTAGGED(labels);
-       REGISTER_UNTAGGED(literals);
-
-       CELL here = allot_code_block(sizeof(F_COMPILED) + code_length + literals_length);
-
-       UNREGISTER_UNTAGGED(literals);
-       UNREGISTER_UNTAGGED(labels);
-       UNREGISTER_UNTAGGED(code);
-       UNREGISTER_ROOT(relocation);
-
-       /* compiled header */
-       F_COMPILED *header = (void *)here;
-       header->type = type;
-       header->last_scan = NURSERY;
-       header->code_length = code_length;
-       header->literals_length = literals_length;
-       header->relocation = relocation;
-
-       here += sizeof(F_COMPILED);
-
-       CELL code_start = here;
-
-       /* code */
-       deposit_integers(here,code,code_format);
-       here += code_length;
-
-       /* literals */
-       deposit_objects(here,literals);
-       here += literals_length;
-
-       /* fixup labels */
-       if(labels)
-               fixup_labels(labels,code_format,code_start);
-
-       /* next time we do a minor GC, we have to scan the code heap for
-       literals */
-       last_code_heap_scan = NURSERY;
-
-       return header;
+       iterate_code_heap(copy_literal_references);
 }
 
-void set_word_code(F_WORD *word, F_COMPILED *compiled)
+/* Update literals referenced from all code blocks. Only for tenured
+collections, done at the end. */
+void update_code_heap_roots(void)
 {
-       if(compiled->type != WORD_TYPE)
-               critical_error("bad param to set_word_xt",(CELL)compiled);
-
-       word->code = compiled;
-       word->compiledp = T;
+       iterate_code_heap(update_literal_references);
 }
 
-/* Allocates memory */
-void default_word_code(F_WORD *word, bool relocate)
+/* Update pointers to words referenced from all code blocks. Only after
+defining a new word. */
+void update_code_heap_words(void)
 {
-       REGISTER_UNTAGGED(word);
-       jit_compile(word->def,relocate);
-       UNREGISTER_UNTAGGED(word);
-
-       word->code = untag_quotation(word->def)->code;
-       word->compiledp = F;
+       iterate_code_heap(update_word_references);
 }
 
 void primitive_modify_code_heap(void)
 {
-       bool rescan_code_heap = to_boolean(dpop());
        F_ARRAY *alist = untag_array(dpop());
 
        CELL count = untag_fixnum_fast(alist->capacity);
+       if(count == 0)
+               return;
+
        CELL i;
        for(i = 0; i < count; i++)
        {
@@ -364,12 +103,12 @@ void primitive_modify_code_heap(void)
                        REGISTER_UNTAGGED(alist);
                        REGISTER_UNTAGGED(word);
 
-                       F_COMPILED *compiled = add_compiled_block(
+                       F_CODE_BLOCK *compiled = add_compiled_block(
                                WORD_TYPE,
                                code,
                                labels,
                                relocation,
-                               literals);
+                               tag_object(literals));
 
                        UNREGISTER_UNTAGGED(word);
                        UNREGISTER_UNTAGGED(alist);
@@ -382,21 +121,116 @@ void primitive_modify_code_heap(void)
                UNREGISTER_UNTAGGED(alist);
        }
 
-       /* If there were any interned words in the set, we relocate all XT
-       references in the entire code heap. But if all the words are
-       uninterned, it is impossible that other words reference them, so we
-       only have to relocate the new words. This makes compile-call much
-       more efficient */
-       if(rescan_code_heap)
-               iterate_code_heap(relocate_code_block);
-       else
+       update_code_heap_words();
+}
+
+/* Push the free space and total size of the code heap */
+void primitive_code_room(void)
+{
+       CELL used, total_free, max_free;
+       heap_usage(&code_heap,&used,&total_free,&max_free);
+       dpush(tag_fixnum((code_heap.segment->size) / 1024));
+       dpush(tag_fixnum(used / 1024));
+       dpush(tag_fixnum(total_free / 1024));
+       dpush(tag_fixnum(max_free / 1024));
+}
+
+F_CODE_BLOCK *forward_xt(F_CODE_BLOCK *compiled)
+{
+       return block_to_compiled(compiled_to_block(compiled)->forwarding);
+}
+
+void forward_frame_xt(F_STACK_FRAME *frame)
+{
+       CELL offset = (CELL)FRAME_RETURN_ADDRESS(frame) - (CELL)frame_code(frame);
+       F_CODE_BLOCK *forwarded = forward_xt(frame_code(frame));
+       frame->xt = (XT)(forwarded + 1);
+       FRAME_RETURN_ADDRESS(frame) = (XT)((CELL)forwarded + offset);
+}
+
+void forward_object_xts(void)
+{
+       begin_scan();
+
+       CELL obj;
+
+       while((obj = next_object()) != F)
        {
-               for(i = 0; i < count; i++)
+               if(type_of(obj) == WORD_TYPE)
                {
-                       F_ARRAY *pair = untag_array(array_nth(alist,i));
-                       F_WORD *word = untag_word(array_nth(pair,0));
+                       F_WORD *word = untag_object(obj);
 
-                       iterate_code_heap_step(word->code,relocate_code_block);
+                       word->code = forward_xt(word->code);
+                       if(word->profiling)
+                               word->profiling = forward_xt(word->profiling);
+               }
+               else if(type_of(obj) == QUOTATION_TYPE)
+               {
+                       F_QUOTATION *quot = untag_object(obj);
+
+                       if(quot->compiledp != F)
+                               quot->code = forward_xt(quot->code);
+               }
+               else if(type_of(obj) == CALLSTACK_TYPE)
+               {
+                       F_CALLSTACK *stack = untag_object(obj);
+                       iterate_callstack_object(stack,forward_frame_xt);
                }
        }
+
+       /* End the heap scan */
+       gc_off = false;
+}
+
+/* Set the XT fields now that the heap has been compacted */
+void fixup_object_xts(void)
+{
+       begin_scan();
+
+       CELL obj;
+
+       while((obj = next_object()) != F)
+       {
+               if(type_of(obj) == WORD_TYPE)
+               {
+                       F_WORD *word = untag_object(obj);
+                       update_word_xt(word);
+               }
+               else if(type_of(obj) == QUOTATION_TYPE)
+               {
+                       F_QUOTATION *quot = untag_object(obj);
+
+                       if(quot->compiledp != F)
+                               set_quot_xt(quot,quot->code);
+               }
+       }
+
+       /* End the heap scan */
+       gc_off = false;
+}
+
+/* Move all free space to the end of the code heap. This is not very efficient,
+since it makes several passes over the code and data heaps, but we only ever
+do this before saving a deployed image and exiting, so performaance is not
+critical here */
+void compact_code_heap(void)
+{
+       /* Free all unreachable code blocks */
+       gc();
+
+       /* Figure out where the code heap blocks are going to end up */
+       CELL size = compute_heap_forwarding(&code_heap);
+
+       /* Update word and quotation code pointers */
+       forward_object_xts();
+
+       /* Actually perform the compaction */
+       compact_heap(&code_heap);
+
+       /* Update word and quotation XTs */
+       fixup_object_xts();
+
+       /* Now update the free list; there will be a single free block at
+       the end */
+       build_free_list(&code_heap,size);
 }
index d167ece7fae052699e33ee3d132f2fc382d9b338..17a32aedd3d8281f217d86cb4b96bf106204178a 100755 (executable)
@@ -1,78 +1,34 @@
-typedef enum {
-       /* arg is a primitive number */
-       RT_PRIMITIVE,
-       /* arg is a literal table index, holding an array pair (symbol/dll) */
-       RT_DLSYM,
-       /* a pointer to a compiled word reference */
-       RT_DISPATCH,
-       /* a compiled word reference */
-       RT_XT,
-       /* current offset */
-       RT_HERE,
-       /* a local label */
-       RT_LABEL,
-       /* immediate literal */
-       RT_IMMEDIATE,
-       /* address of stack_chain var */
-       RT_STACK_CHAIN
-} F_RELTYPE;
+/* compiled code */
+F_HEAP code_heap;
 
-typedef enum {
-       /* absolute address in a 64-bit location */
-       RC_ABSOLUTE_CELL,
-       /* absolute address in a 32-bit location */
-       RC_ABSOLUTE,
-       /* relative address in a 32-bit location */
-       RC_RELATIVE,
-       /* relative address in a PowerPC LIS/ORI sequence */
-       RC_ABSOLUTE_PPC_2_2,
-       /* relative address in a PowerPC LWZ/STW/BC instruction */
-       RC_RELATIVE_PPC_2,
-       /* relative address in a PowerPC B/BL instruction */
-       RC_RELATIVE_PPC_3,
-       /* relative address in an ARM B/BL instruction */
-       RC_RELATIVE_ARM_3,
-       /* pointer to address in an ARM LDR/STR instruction */
-       RC_INDIRECT_ARM,
-       /* pointer to address in an ARM LDR/STR instruction offset by 8 bytes */
-       RC_INDIRECT_ARM_PC
-} F_RELCLASS;
+INLINE F_BLOCK *compiled_to_block(F_CODE_BLOCK *compiled)
+{
+       return (F_BLOCK *)compiled - 1;
+}
 
-#define REL_RELATIVE_PPC_2_MASK 0xfffc
-#define REL_RELATIVE_PPC_3_MASK 0x3fffffc
-#define REL_INDIRECT_ARM_MASK 0xfff
-#define REL_RELATIVE_ARM_3_MASK 0xffffff
+INLINE F_CODE_BLOCK *block_to_compiled(F_BLOCK *block)
+{
+       return (F_CODE_BLOCK *)(block + 1);
+}
 
-/* the rel type is built like a cell to avoid endian-specific code in
-the compiler */
-#define REL_TYPE(r) ((r)->type & 0x000000ff)
-#define REL_CLASS(r) (((r)->type & 0x0000ff00) >> 8)
-#define REL_ARGUMENT(r) (((r)->type & 0xffff0000) >> 16)
+void init_code_heap(CELL size);
 
-/* code relocation consists of a table of entries for each fixup */
-typedef struct {
-       unsigned int type;
-       unsigned int offset;
-} F_REL;
+bool in_code_heap_p(CELL ptr);
 
-#define CREF(array,i) ((CELL)(array) + CELLS * (i))
-
-void apply_relocation(CELL class, CELL offset, F_FIXNUM absolute_value);
+void default_word_code(F_WORD *word, bool relocate);
 
-void relocate_code_block(F_COMPILED *relocating, CELL code_start, CELL literals_start);
+void set_word_code(F_WORD *word, F_CODE_BLOCK *compiled);
 
-void default_word_code(F_WORD *word, bool relocate);
+typedef void (*CODE_HEAP_ITERATOR)(F_CODE_BLOCK *compiled);
 
-void set_word_code(F_WORD *word, F_COMPILED *compiled);
+void iterate_code_heap(CODE_HEAP_ITERATOR iter);
 
-F_COMPILED *add_compiled_block(
-       CELL type,
-       F_ARRAY *code,
-       F_ARRAY *labels,
-       CELL relocation,
-       F_ARRAY *literals);
+void copy_code_heap_roots(void);
 
-CELL compiled_code_format(void);
-bool stack_traces_p(void);
+void update_code_heap_roots(void);
 
 void primitive_modify_code_heap(void);
+
+void primitive_code_room(void);
+
+void compact_code_heap(void);
index 4cf997a51534d2652259f970ae775173889c277d..30b61b5c0c527ec1dc82156ffa72cb701f9f4d28 100755 (executable)
@@ -5,44 +5,44 @@ in the public domain. */
 #define DS_REG r29
 
 DEF(void,primitive_fixnum_add,(void)):
-    lwz r3,0(DS_REG)
-    lwz r4,-4(DS_REG)
-    subi DS_REG,DS_REG,4
-    li r0,0
-    mtxer r0
-    addo. r5,r3,r4
-    bso add_overflow
-    stw r5,0(DS_REG)
-    blr
+       lwz r3,0(DS_REG)
+       lwz r4,-4(DS_REG)
+       subi DS_REG,DS_REG,4
+       li r0,0
+       mtxer r0
+       addo. r5,r3,r4
+       bso add_overflow
+       stw r5,0(DS_REG)
+       blr
 add_overflow:
        b MANGLE(overflow_fixnum_add)
 
 DEF(void,primitive_fixnum_subtract,(void)):
-    lwz r3,-4(DS_REG)
-    lwz r4,0(DS_REG)
-    subi DS_REG,DS_REG,4
-    li r0,0
-    mtxer r0
-    subfo. r5,r4,r3
+       lwz r3,-4(DS_REG)
+       lwz r4,0(DS_REG)
+       subi DS_REG,DS_REG,4
+       li r0,0
+       mtxer r0
+       subfo. r5,r4,r3
        bso sub_overflow
-    stw r5,0(DS_REG)
-    blr
+       stw r5,0(DS_REG)
+       blr
 sub_overflow:
-    b MANGLE(overflow_fixnum_subtract)
+       b MANGLE(overflow_fixnum_subtract)
 
 DEF(void,primitive_fixnum_multiply,(void)):
-    lwz r3,0(DS_REG)
-    lwz r4,-4(DS_REG)
-    subi DS_REG,DS_REG,4
-    srawi r3,r3,3
-    mullwo. r5,r3,r4
-    bso multiply_overflow
-    stw r5,0(DS_REG)
-    blr
+       lwz r3,0(DS_REG)
+       lwz r4,-4(DS_REG)
+       subi DS_REG,DS_REG,4
+       srawi r3,r3,3
+       mullwo. r5,r3,r4
+       bso multiply_overflow
+       stw r5,0(DS_REG)
+       blr
 multiply_overflow:
-    srawi r4,r4,3
-    b MANGLE(overflow_fixnum_multiply)
-    
+       srawi r4,r4,3
+       b MANGLE(overflow_fixnum_multiply)
+       
 /* Note that the XT is passed to the quotation in r11 */
 #define CALL_OR_JUMP_QUOT \
        lwz r11,9(r3)      /* load quotation-xt slot */ XX \
@@ -116,8 +116,9 @@ DEF(void,c_to_factor,(CELL quot)):
        SAVE_INT(r26,13)
        SAVE_INT(r27,14)
        SAVE_INT(r28,15)
+       SAVE_INT(r31,16)
 
-       SAVE_FP(f14,20)    /* save FPRs */
+       SAVE_FP(f14,20) /* save FPRs */
        SAVE_FP(f15,22)
        SAVE_FP(f16,24)
        SAVE_FP(f17,26)
@@ -141,7 +142,7 @@ DEF(void,c_to_factor,(CELL quot)):
        mr r3,r1           /* pass call stack pointer as an argument */
        bl MANGLE(save_callstack_bottom)
 
-       RESTORE_INT(r3,19)     /* restore quotation */
+       RESTORE_INT(r3,19)       /* restore quotation */
        CALL_QUOT
 
        RESTORE_FP(f31,54)
@@ -161,9 +162,10 @@ DEF(void,c_to_factor,(CELL quot)):
        RESTORE_FP(f17,26)
        RESTORE_FP(f16,24)
        RESTORE_FP(f15,22)
-       RESTORE_FP(f14,20)    /* save FPRs */
+       RESTORE_FP(f14,20)      /* save FPRs */
 
-       RESTORE_INT(r28,15)   /* restore GPRs */
+       RESTORE_INT(r31,16)   /* restore GPRs */
+       RESTORE_INT(r28,15)
        RESTORE_INT(r27,14)
        RESTORE_INT(r26,13)
        RESTORE_INT(r25,12)
index 2122f930f0569e4f4be826812d3f1dd498f09f84..a91eff67837db8848063c391e50616f0a5271ab7 100755 (executable)
@@ -1,302 +1,7 @@
 #include "master.h"
 
-CELL init_zone(F_ZONE *z, CELL size, CELL start)
-{
-       z->size = size;
-       z->start = z->here = start;
-       z->end = start + size;
-       return z->end;
-}
-
-void init_card_decks(void)
-{
-       CELL start = align(data_heap->segment->start,DECK_SIZE);
-       allot_markers_offset = (CELL)data_heap->allot_markers - (start >> CARD_BITS);
-       cards_offset = (CELL)data_heap->cards - (start >> CARD_BITS);
-       decks_offset = (CELL)data_heap->decks - (start >> DECK_BITS);
-}
-
-F_DATA_HEAP *alloc_data_heap(CELL gens,
-       CELL young_size,
-       CELL aging_size,
-       CELL tenured_size)
-{
-       young_size = align(young_size,DECK_SIZE);
-       aging_size = align(aging_size,DECK_SIZE);
-       tenured_size = align(tenured_size,DECK_SIZE);
-
-       F_DATA_HEAP *data_heap = safe_malloc(sizeof(F_DATA_HEAP));
-       data_heap->young_size = young_size;
-       data_heap->aging_size = aging_size;
-       data_heap->tenured_size = tenured_size;
-       data_heap->gen_count = gens;
-
-       CELL total_size;
-       if(data_heap->gen_count == 2)
-               total_size = young_size + 2 * tenured_size;
-       else if(data_heap->gen_count == 3)
-               total_size = young_size + 2 * aging_size + 2 * tenured_size;
-       else
-       {
-               fatal_error("Invalid number of generations",data_heap->gen_count);
-               return NULL; /* can't happen */
-       }
-
-       total_size += DECK_SIZE;
-
-       data_heap->segment = alloc_segment(total_size);
-
-       data_heap->generations = safe_malloc(sizeof(F_ZONE) * data_heap->gen_count);
-       data_heap->semispaces = safe_malloc(sizeof(F_ZONE) * data_heap->gen_count);
-
-       CELL cards_size = total_size >> CARD_BITS;
-       data_heap->allot_markers = safe_malloc(cards_size);
-       data_heap->allot_markers_end = data_heap->allot_markers + cards_size;
-
-       data_heap->cards = safe_malloc(cards_size);
-       data_heap->cards_end = data_heap->cards + cards_size;
-
-       CELL decks_size = total_size >> DECK_BITS;
-       data_heap->decks = safe_malloc(decks_size);
-       data_heap->decks_end = data_heap->decks + decks_size;
-
-       CELL alloter = align(data_heap->segment->start,DECK_SIZE);
-
-       alloter = init_zone(&data_heap->generations[TENURED],tenured_size,alloter);
-       alloter = init_zone(&data_heap->semispaces[TENURED],tenured_size,alloter);
-
-       if(data_heap->gen_count == 3)
-       {
-               alloter = init_zone(&data_heap->generations[AGING],aging_size,alloter);
-               alloter = init_zone(&data_heap->semispaces[AGING],aging_size,alloter);
-       }
-
-       if(data_heap->gen_count >= 2)
-       {
-               alloter = init_zone(&data_heap->generations[NURSERY],young_size,alloter);
-               alloter = init_zone(&data_heap->semispaces[NURSERY],0,alloter);
-       }
-
-       if(data_heap->segment->end - alloter > DECK_SIZE)
-               critical_error("Bug in alloc_data_heap",alloter);
-
-       return data_heap;
-}
-
-F_DATA_HEAP *grow_data_heap(F_DATA_HEAP *data_heap, CELL requested_bytes)
-{
-       CELL new_tenured_size = (data_heap->tenured_size * 2) + requested_bytes;
-
-       return alloc_data_heap(data_heap->gen_count,
-               data_heap->young_size,
-               data_heap->aging_size,
-               new_tenured_size);
-}
-
-void dealloc_data_heap(F_DATA_HEAP *data_heap)
-{
-       dealloc_segment(data_heap->segment);
-       free(data_heap->generations);
-       free(data_heap->semispaces);
-       free(data_heap->allot_markers);
-       free(data_heap->cards);
-       free(data_heap->decks);
-       free(data_heap);
-}
-
-void clear_cards(CELL from, CELL to)
-{
-       /* NOTE: reverse order due to heap layout. */
-       F_CARD *first_card = ADDR_TO_CARD(data_heap->generations[to].start);
-       F_CARD *last_card = ADDR_TO_CARD(data_heap->generations[from].end);
-       memset(first_card,0,last_card - first_card);
-}
-
-void clear_decks(CELL from, CELL to)
-{
-       /* NOTE: reverse order due to heap layout. */
-       F_DECK *first_deck = ADDR_TO_DECK(data_heap->generations[to].start);
-       F_DECK *last_deck = ADDR_TO_DECK(data_heap->generations[from].end);
-       memset(first_deck,0,last_deck - first_deck);
-}
-
-void clear_allot_markers(CELL from, CELL to)
-{
-       /* NOTE: reverse order due to heap layout. */
-       F_CARD *first_card = ADDR_TO_ALLOT_MARKER(data_heap->generations[to].start);
-       F_CARD *last_card = ADDR_TO_ALLOT_MARKER(data_heap->generations[from].end);
-       memset(first_card,INVALID_ALLOT_MARKER,last_card - first_card);
-}
-
-void set_data_heap(F_DATA_HEAP *data_heap_)
-{
-       data_heap = data_heap_;
-       nursery = data_heap->generations[NURSERY];
-       init_card_decks();
-       clear_cards(NURSERY,TENURED);
-       clear_decks(NURSERY,TENURED);
-       clear_allot_markers(NURSERY,TENURED);
-}
-
-void gc_reset(void)
-{
-       int i;
-       for(i = 0; i < MAX_GEN_COUNT; i++)
-               memset(&gc_stats[i],0,sizeof(F_GC_STATS));
-
-       cards_scanned = 0;
-       decks_scanned = 0;
-       code_heap_scans = 0;
-}
-
-void init_data_heap(CELL gens,
-       CELL young_size,
-       CELL aging_size,
-       CELL tenured_size,
-       bool secure_gc_)
-{
-       set_data_heap(alloc_data_heap(gens,young_size,aging_size,tenured_size));
-
-       gc_locals_region = alloc_segment(getpagesize());
-       gc_locals = gc_locals_region->start - CELLS;
-
-       extra_roots_region = alloc_segment(getpagesize());
-       extra_roots = extra_roots_region->start - CELLS;
-
-       secure_gc = secure_gc_;
-
-       gc_reset();
-}
-
-/* Size of the object pointed to by a tagged pointer */
-CELL object_size(CELL tagged)
-{
-       if(immediate_p(tagged))
-               return 0;
-       else
-               return untagged_object_size(UNTAG(tagged));
-}
-
-/* Size of the object pointed to by an untagged pointer */
-CELL untagged_object_size(CELL pointer)
-{
-       return align8(unaligned_object_size(pointer));
-}
-
-/* Size of the data area of an object pointed to by an untagged pointer */
-CELL unaligned_object_size(CELL pointer)
-{
-       F_TUPLE *tuple;
-       F_TUPLE_LAYOUT *layout;
-
-       switch(untag_header(get(pointer)))
-       {
-       case ARRAY_TYPE:
-       case BIGNUM_TYPE:
-               return array_size(array_capacity((F_ARRAY*)pointer));
-       case BYTE_ARRAY_TYPE:
-               return byte_array_size(
-                       byte_array_capacity((F_BYTE_ARRAY*)pointer));
-       case STRING_TYPE:
-               return string_size(string_capacity((F_STRING*)pointer));
-       case TUPLE_TYPE:
-               tuple = untag_object(pointer);
-               layout = untag_object(tuple->layout);
-               return tuple_size(layout);
-       case QUOTATION_TYPE:
-               return sizeof(F_QUOTATION);
-       case WORD_TYPE:
-               return sizeof(F_WORD);
-       case RATIO_TYPE:
-               return sizeof(F_RATIO);
-       case FLOAT_TYPE:
-               return sizeof(F_FLOAT);
-       case COMPLEX_TYPE:
-               return sizeof(F_COMPLEX);
-       case DLL_TYPE:
-               return sizeof(F_DLL);
-       case ALIEN_TYPE:
-               return sizeof(F_ALIEN);
-       case WRAPPER_TYPE:
-               return sizeof(F_WRAPPER);
-       case CALLSTACK_TYPE:
-               return callstack_size(
-                       untag_fixnum_fast(((F_CALLSTACK *)pointer)->length));
-       default:
-               critical_error("Invalid header",pointer);
-               return -1; /* can't happen */
-       }
-}
-
-void primitive_size(void)
-{
-       box_unsigned_cell(object_size(dpop()));
-}
-
-/* Push memory usage statistics in data heap */
-void primitive_data_room(void)
-{
-       F_ARRAY *a = allot_array(ARRAY_TYPE,data_heap->gen_count * 2,F);
-       int gen;
-
-       dpush(tag_fixnum((data_heap->cards_end - data_heap->cards) >> 10));
-       dpush(tag_fixnum((data_heap->decks_end - data_heap->decks) >> 10));
-
-       for(gen = 0; gen < data_heap->gen_count; gen++)
-       {
-               F_ZONE *z = (gen == NURSERY ? &nursery : &data_heap->generations[gen]);
-               set_array_nth(a,gen * 2,tag_fixnum((z->end - z->here) >> 10));
-               set_array_nth(a,gen * 2 + 1,tag_fixnum((z->size) >> 10));
-       }
-
-       dpush(tag_object(a));
-}
-
-/* Disables GC and activates next-object ( -- obj ) primitive */
-void begin_scan(void)
-{
-       heap_scan_ptr = data_heap->generations[TENURED].start;
-       gc_off = true;
-}
-
-void primitive_begin_scan(void)
-{
-       gc();
-       begin_scan();
-}
-
-CELL next_object(void)
-{
-       if(!gc_off)
-               general_error(ERROR_HEAP_SCAN,F,F,NULL);
-
-       CELL value = get(heap_scan_ptr);
-       CELL obj = heap_scan_ptr;
-       CELL type;
-
-       if(heap_scan_ptr >= data_heap->generations[TENURED].here)
-               return F;
-
-       type = untag_header(value);
-       heap_scan_ptr += untagged_object_size(heap_scan_ptr);
-
-       return RETAG(obj,type <= HEADER_TYPE ? type : OBJECT_TYPE);
-}
-
-/* Push object at heap scan cursor and advance; pushes f when done */
-void primitive_next_object(void)
-{
-       dpush(next_object());
-}
-
-/* Re-enables GC */
-void primitive_end_scan(void)
-{
-       gc_off = false;
-}
-
 /* Scan all the objects in the card */
-void collect_card(F_CARD *ptr, CELL gen, CELL here)
+void copy_card(F_CARD *ptr, CELL gen, CELL here)
 {
        CELL card_scan = (CELL)CARD_TO_ADDR(ptr) + CARD_OFFSET(ptr);
        CELL card_end = (CELL)CARD_TO_ADDR(ptr + 1);
@@ -304,12 +9,12 @@ void collect_card(F_CARD *ptr, CELL gen, CELL here)
        if(here < card_end)
                card_end = here;
 
-       collect_next_loop(card_scan,&card_end);
+       copy_reachable_objects(card_scan,&card_end);
 
        cards_scanned++;
 }
 
-void collect_card_deck(F_DECK *deck, CELL gen, F_CARD mask, F_CARD unmask)
+void copy_card_deck(F_DECK *deck, CELL gen, F_CARD mask, F_CARD unmask)
 {
        F_CARD *first_card = DECK_TO_CARD(deck);
        F_CARD *last_card = DECK_TO_CARD(deck + 1);
@@ -330,7 +35,7 @@ void collect_card_deck(F_DECK *deck, CELL gen, F_CARD mask, F_CARD unmask)
                        {
                                if(ptr[card] & mask)
                                {
-                                       collect_card(&ptr[card],gen,here);
+                                       copy_card(&ptr[card],gen,here);
                                        ptr[card] &= ~unmask;
                                }
                        }
@@ -341,7 +46,7 @@ void collect_card_deck(F_DECK *deck, CELL gen, F_CARD mask, F_CARD unmask)
 }
 
 /* Copy all newspace objects referenced from marked cards to the destination */
-void collect_gen_cards(CELL gen)
+void copy_gen_cards(CELL gen)
 {
        F_DECK *first_deck = ADDR_TO_DECK(data_heap->generations[gen].start);
        F_DECK *last_deck = ADDR_TO_DECK(data_heap->generations[gen].end);
@@ -365,7 +70,7 @@ void collect_gen_cards(CELL gen)
                        unmask = CARD_MARK_MASK;
                else
                {
-                       critical_error("bug in collect_gen_cards",gen);
+                       critical_error("bug in copy_gen_cards",gen);
                        return;
                }
        }
@@ -390,7 +95,7 @@ void collect_gen_cards(CELL gen)
        }
        else
        {
-               critical_error("bug in collect_gen_cards",gen);
+               critical_error("bug in copy_gen_cards",gen);
                return;
        }
 
@@ -400,7 +105,7 @@ void collect_gen_cards(CELL gen)
        {
                if(*ptr & mask)
                {
-                       collect_card_deck(ptr,gen,mask,unmask);
+                       copy_card_deck(ptr,gen,mask,unmask);
                        *ptr &= ~unmask;
                }
        }
@@ -408,15 +113,15 @@ void collect_gen_cards(CELL gen)
 
 /* Scan cards in all generations older than the one being collected, copying
 old->new references */
-void collect_cards(void)
+void copy_cards(void)
 {
        int i;
        for(i = collecting_gen + 1; i < data_heap->gen_count; i++)
-               collect_gen_cards(i);
+               copy_gen_cards(i);
 }
 
 /* Copy all tagged pointers in a range of memory */
-void collect_stack(F_SEGMENT *region, CELL top)
+void copy_stack_elements(F_SEGMENT *region, CELL top)
 {
        CELL ptr = region->start;
 
@@ -424,25 +129,7 @@ void collect_stack(F_SEGMENT *region, CELL top)
                copy_handle((CELL*)ptr);
 }
 
-void collect_stack_frame(F_STACK_FRAME *frame)
-{
-       recursive_mark(compiled_to_block(frame_code(frame)));
-}
-
-/* The base parameter allows us to adjust for a heap-allocated
-callstack snapshot */
-void collect_callstack(F_CONTEXT *stacks)
-{
-       if(collecting_gen == TENURED)
-       {
-               CELL top = (CELL)stacks->callstack_top;
-               CELL bottom = (CELL)stacks->callstack_bottom;
-
-               iterate_callstack(top,bottom,collect_stack_frame);
-       }
-}
-
-void collect_gc_locals(void)
+void copy_registered_locals(void)
 {
        CELL ptr = gc_locals_region->start;
 
@@ -452,28 +139,28 @@ void collect_gc_locals(void)
 
 /* Copy roots over at the start of GC, namely various constants, stacks,
 the user environment and extra roots registered with REGISTER_ROOT */
-void collect_roots(void)
+void copy_roots(void)
 {
        copy_handle(&T);
        copy_handle(&bignum_zero);
        copy_handle(&bignum_pos_one);
        copy_handle(&bignum_neg_one);
 
-       collect_gc_locals();
-       collect_stack(extra_roots_region,extra_roots);
+       copy_registered_locals();
+       copy_stack_elements(extra_roots_region,extra_roots);
 
        save_stacks();
        F_CONTEXT *stacks = stack_chain;
 
        while(stacks)
        {
-               collect_stack(stacks->datastack_region,stacks->datastack);
-               collect_stack(stacks->retainstack_region,stacks->retainstack);
+               copy_stack_elements(stacks->datastack_region,stacks->datastack);
+               copy_stack_elements(stacks->retainstack_region,stacks->retainstack);
 
                copy_handle(&stacks->catchstack_save);
                copy_handle(&stacks->current_callback_save);
 
-               collect_callstack(stacks);
+               mark_active_blocks(stacks);
 
                stacks = stacks->next;
        }
@@ -554,79 +241,7 @@ void copy_handle(CELL *handle)
                *handle = copy_object(pointer);
 }
 
-/* The number of cells from the start of the object which should be scanned by
-the GC. Some types have a binary payload at the end (string, word, DLL) which
-we ignore. */
-CELL binary_payload_start(CELL pointer)
-{
-       F_TUPLE *tuple;
-       F_TUPLE_LAYOUT *layout;
-
-       switch(untag_header(get(pointer)))
-       {
-       /* these objects do not refer to other objects at all */
-       case FLOAT_TYPE:
-       case BYTE_ARRAY_TYPE:
-       case BIGNUM_TYPE:
-       case CALLSTACK_TYPE:
-               return 0;
-       /* these objects have some binary data at the end */
-       case WORD_TYPE:
-               return sizeof(F_WORD) - CELLS * 3;
-       case ALIEN_TYPE:
-               return CELLS * 3;
-       case DLL_TYPE:
-               return CELLS * 2;
-       case QUOTATION_TYPE:
-               return sizeof(F_QUOTATION) - CELLS * 2;
-       case STRING_TYPE:
-               return sizeof(F_STRING);
-       /* everything else consists entirely of pointers */
-       case ARRAY_TYPE:
-               return array_size(array_capacity((F_ARRAY*)pointer));
-       case TUPLE_TYPE:
-               tuple = untag_object(pointer);
-               layout = untag_object(tuple->layout);
-               return tuple_size(layout);
-       case RATIO_TYPE:
-               return sizeof(F_RATIO);
-       case COMPLEX_TYPE:
-               return sizeof(F_COMPLEX);
-       case WRAPPER_TYPE:
-               return sizeof(F_WRAPPER);
-       default:
-               critical_error("Invalid header",pointer);
-               return -1; /* can't happen */
-       }
-}
-
-void do_code_slots(CELL scan)
-{
-       F_WORD *word;
-       F_QUOTATION *quot;
-       F_CALLSTACK *stack;
-
-       switch(object_type(scan))
-       {
-       case WORD_TYPE:
-               word = (F_WORD *)scan;
-               recursive_mark(compiled_to_block(word->code));
-               if(word->profiling)
-                       recursive_mark(compiled_to_block(word->profiling));
-               break;
-       case QUOTATION_TYPE:
-               quot = (F_QUOTATION *)scan;
-               if(quot->compiledp != F)
-                       recursive_mark(compiled_to_block(quot->code));
-               break;
-       case CALLSTACK_TYPE:
-               stack = (F_CALLSTACK *)scan;
-               iterate_callstack_object(stack,collect_stack_frame);
-               break;
-       }
-}
-
-CELL collect_next_nursery(CELL scan)
+CELL copy_next_from_nursery(CELL scan)
 {
        CELL *obj = (CELL *)scan;
        CELL *end = (CELL *)(scan + binary_payload_start(scan));
@@ -651,7 +266,7 @@ CELL collect_next_nursery(CELL scan)
        return scan + untagged_object_size(scan);
 }
 
-CELL collect_next_aging(CELL scan)
+CELL copy_next_from_aging(CELL scan)
 {
        CELL *obj = (CELL *)scan;
        CELL *end = (CELL *)(scan + binary_payload_start(scan));
@@ -680,8 +295,7 @@ CELL collect_next_aging(CELL scan)
        return scan + untagged_object_size(scan);
 }
 
-/* This function is performance-critical */
-CELL collect_next_tenured(CELL scan)
+CELL copy_next_from_tenured(CELL scan)
 {
        CELL *obj = (CELL *)scan;
        CELL *end = (CELL *)(scan + binary_payload_start(scan));
@@ -702,52 +316,30 @@ CELL collect_next_tenured(CELL scan)
                }
        }
 
-       do_code_slots(scan);
+       mark_object_code_block(scan);
 
        return scan + untagged_object_size(scan);
 }
 
-void collect_next_loop(CELL scan, CELL *end)
+void copy_reachable_objects(CELL scan, CELL *end)
 {
        if(HAVE_NURSERY_P && collecting_gen == NURSERY)
        {
                while(scan < *end)
-                       scan = collect_next_nursery(scan);
+                       scan = copy_next_from_nursery(scan);
        }
        else if(HAVE_AGING_P && collecting_gen == AGING)
        {
                while(scan < *end)
-                       scan = collect_next_aging(scan);
+                       scan = copy_next_from_aging(scan);
        }
        else if(collecting_gen == TENURED)
        {
                while(scan < *end)
-                       scan = collect_next_tenured(scan);
+                       scan = copy_next_from_tenured(scan);
        }
 }
 
-INLINE void reset_generation(CELL i)
-{
-       F_ZONE *z = (i == NURSERY ? &nursery : &data_heap->generations[i]);
-
-       z->here = z->start;
-       if(secure_gc)
-               memset((void*)z->start,69,z->size);
-}
-
-/* After garbage collection, any generations which are now empty need to have
-their allocation pointers and cards reset. */
-void reset_generations(CELL from, CELL to)
-{
-       CELL i;
-       for(i = from; i <= to; i++)
-               reset_generation(i);
-
-       clear_cards(from,to);
-       clear_decks(from,to);
-       clear_allot_markers(from,to);
-}
-
 /* Prepare to start copying reachable objects into an unused zone */
 void begin_gc(CELL requested_bytes)
 {
@@ -879,25 +471,22 @@ void garbage_collection(CELL gen,
        CELL scan = newspace->here;
 
        /* collect objects referenced from stacks and environment */
-       collect_roots();
+       copy_roots();
        /* collect objects referenced from older generations */
-       collect_cards();
+       copy_cards();
+       /* do some tracing */
+       copy_reachable_objects(scan,&newspace->here);
 
        /* don't scan code heap unless it has pointers to this
        generation or younger */
        if(collecting_gen >= last_code_heap_scan)
        {
-               if(collecting_gen != TENURED)
-               {
-               
-                       /* if we are doing code GC, then we will copy over
-                       literals from any code block which gets marked as live.
-                       if we are not doing code GC, just consider all literals
-                       as roots. */
-                       code_heap_scans++;
-
-                       collect_literals();
-               }
+               code_heap_scans++;
+
+               if(collecting_gen == TENURED)
+                       update_code_heap_roots();
+               else
+                       copy_code_heap_roots();
 
                if(collecting_accumulation_gen_p())
                        last_code_heap_scan = collecting_gen;
@@ -905,8 +494,6 @@ void garbage_collection(CELL gen,
                        last_code_heap_scan = collecting_gen + 1;
        }
 
-       collect_next_loop(scan,&newspace->here);
-
        CELL gc_elapsed = (current_micros() - start);
 
        end_gc(gc_elapsed);
@@ -958,9 +545,20 @@ void primitive_gc_stats(void)
        dpush(stats);
 }
 
-void primitive_gc_reset(void)
+void clear_gc_stats(void)
 {
-       gc_reset();
+       int i;
+       for(i = 0; i < MAX_GEN_COUNT; i++)
+               memset(&gc_stats[i],0,sizeof(F_GC_STATS));
+
+       cards_scanned = 0;
+       decks_scanned = 0;
+       code_heap_scans = 0;
+}
+
+void primitive_clear_gc_stats(void)
+{
+       clear_gc_stats();
 }
 
 void primitive_become(void)
@@ -986,24 +584,3 @@ void primitive_become(void)
 
        compile_all_words();
 }
-
-CELL find_all_words(void)
-{
-       GROWABLE_ARRAY(words);
-
-       begin_scan();
-
-       CELL obj;
-       while((obj = next_object()) != F)
-       {
-               if(type_of(obj) == WORD_TYPE)
-                       GROWABLE_ARRAY_ADD(words,obj);
-       }
-
-       /* End heap scan */
-       gc_off = false;
-
-       GROWABLE_ARRAY_TRIM(words);
-
-       return words;
-}
index 6d367a25fda9fc3cef1314194507fe68678abc4e..06beb7ea33e3c323629411c38a116c79e4b53007 100755 (executable)
-/* Set by the -S command line argument */
-bool secure_gc;
-
-/* set up guard pages to check for under/overflow.
-size must be a multiple of the page size */
-F_SEGMENT *alloc_segment(CELL size);
-void dealloc_segment(F_SEGMENT *block);
-
-CELL untagged_object_size(CELL pointer);
-CELL unaligned_object_size(CELL pointer);
-CELL object_size(CELL pointer);
-CELL binary_payload_start(CELL pointer);
-void begin_scan(void);
-CELL next_object(void);
-
-void primitive_data_room(void);
-void primitive_size(void);
-void primitive_begin_scan(void);
-void primitive_next_object(void);
-void primitive_end_scan(void);
-
 void gc(void);
 DLLEXPORT void minor_gc(void);
 
-/* generational copying GC divides memory into zones */
-typedef struct {
-       /* allocation pointer is 'here'; its offset is hardcoded in the
-       compiler backends, see core/compiler/.../allot.factor */
-       CELL start;
-       CELL here;
-       CELL size;
-       CELL end;
-} F_ZONE;
-
-typedef struct {
-       F_SEGMENT *segment;
-
-       CELL young_size;
-       CELL aging_size;
-       CELL tenured_size;
-
-       CELL gen_count;
-
-       F_ZONE *generations;
-       F_ZONE* semispaces;
-
-       CELL *allot_markers;
-       CELL *allot_markers_end;
-
-       CELL *cards;
-       CELL *cards_end;
-
-       CELL *decks;
-       CELL *decks_end;
-} F_DATA_HEAP;
-
-F_DATA_HEAP *data_heap;
-
-/* card marking write barrier. a card is a byte storing a mark flag,
-and the offset (in cells) of the first object in the card.
-
-the mark flag is set by the write barrier when an object in the
-card has a slot written to.
-
-the offset of the first object is set by the allocator. */
-
-/* if CARD_POINTS_TO_NURSERY is set, CARD_POINTS_TO_AGING must also be set. */
-#define CARD_POINTS_TO_NURSERY 0x80
-#define CARD_POINTS_TO_AGING 0x40
-#define CARD_MARK_MASK (CARD_POINTS_TO_NURSERY | CARD_POINTS_TO_AGING)
-typedef u8 F_CARD;
-
-#define CARD_BITS 8
-#define CARD_SIZE (1<<CARD_BITS)
-#define ADDR_CARD_MASK (CARD_SIZE-1)
-
-DLLEXPORT CELL cards_offset;
-
-#define ADDR_TO_CARD(a) (F_CARD*)(((CELL)(a) >> CARD_BITS) + cards_offset)
-#define CARD_TO_ADDR(c) (CELL*)(((CELL)(c) - cards_offset)<<CARD_BITS)
-
-typedef u8 F_DECK;
-
-#define DECK_BITS (CARD_BITS + 10)
-#define DECK_SIZE (1<<DECK_BITS)
-#define ADDR_DECK_MASK (DECK_SIZE-1)
-
-DLLEXPORT CELL decks_offset;
-
-#define ADDR_TO_DECK(a) (F_DECK*)(((CELL)(a) >> DECK_BITS) + decks_offset)
-#define DECK_TO_ADDR(c) (CELL*)(((CELL)(c) - decks_offset) << DECK_BITS)
-
-#define DECK_TO_CARD(d) (F_CARD*)((((CELL)(d) - decks_offset) << (DECK_BITS - CARD_BITS)) + cards_offset)
-
-#define ADDR_TO_ALLOT_MARKER(a) (F_CARD*)(((CELL)(a) >> CARD_BITS) + allot_markers_offset)
-#define CARD_OFFSET(c) (*((c) - (CELL)data_heap->cards + (CELL)data_heap->allot_markers))
-
-#define INVALID_ALLOT_MARKER 0xff
-
-DLLEXPORT CELL allot_markers_offset;
-
-void init_card_decks(void);
-
-/* the write barrier must be called any time we are potentially storing a
-pointer from an older generation to a younger one */
-INLINE void write_barrier(CELL address)
-{
-       *ADDR_TO_CARD(address) = CARD_MARK_MASK;
-       *ADDR_TO_DECK(address) = CARD_MARK_MASK;
-}
-
-#define SLOT(obj,slot) (UNTAG(obj) + (slot) * CELLS)
-
-INLINE void set_slot(CELL obj, CELL slot, CELL value)
-{
-       put(SLOT(obj,slot),value);
-       write_barrier(obj);
-}
-
-/* we need to remember the first object allocated in the card */
-INLINE void allot_barrier(CELL address)
-{
-       F_CARD *ptr = ADDR_TO_ALLOT_MARKER(address);
-       if(*ptr == INVALID_ALLOT_MARKER)
-               *ptr = (address & ADDR_CARD_MASK);
-}
-
-void clear_cards(CELL from, CELL to);
-void collect_cards(void);
-
-/* the 0th generation is where new objects are allocated. */
-#define NURSERY 0
-#define HAVE_NURSERY_P (data_heap->gen_count>1)
-/* where objects hang around */
-#define AGING (data_heap->gen_count-2)
-#define HAVE_AGING_P (data_heap->gen_count>2)
-/* the oldest generation */
-#define TENURED (data_heap->gen_count-1)
-
-#define MIN_GEN_COUNT 1
-#define MAX_GEN_COUNT 3
-
 /* used during garbage collection only */
-F_ZONE *newspace;
 
-/* new objects are allocated here */
-DLLEXPORT F_ZONE nursery;
-
-INLINE bool in_zone(F_ZONE *z, CELL pointer)
-{
-       return pointer >= z->start && pointer < z->end;
-}
+F_ZONE *newspace;
+bool performing_gc;
+CELL collecting_gen;
 
-CELL init_zone(F_ZONE *z, CELL size, CELL base);
+/* if true, we collecting AGING space for the second time, so if it is still
+full, we go on to collect TENURED */
+bool collecting_aging_again;
 
-void init_data_heap(CELL gens,
-       CELL young_size,
-       CELL aging_size,
-       CELL tenured_size,
-       bool secure_gc_);
+/* in case a generation fills up in the middle of a gc, we jump back
+up to try collecting the next generation. */
+jmp_buf gc_jmp;
 
 /* statistics */
 typedef struct {
@@ -173,24 +29,8 @@ u64 cards_scanned;
 u64 decks_scanned;
 CELL code_heap_scans;
 
-/* only meaningful during a GC */
-bool performing_gc;
-CELL collecting_gen;
-
-/* if true, we collecting AGING space for the second time, so if it is still
-full, we go on to collect TENURED */
-bool collecting_aging_again;
-
-INLINE bool collecting_accumulation_gen_p(void)
-{
-       return ((HAVE_AGING_P
-               && collecting_gen == AGING
-               && !collecting_aging_again)
-               || collecting_gen == TENURED);
-}
-
-/* What generation was being collected when collect_literals() was last
-called? Until the next call to primitive_add_compiled_block(), future
+/* What generation was being collected when copy_code_heap_roots() was last
+called? Until the next call to add_compiled_block(), future
 collections of younger generations don't have to touch the code
 heap. */
 CELL last_code_heap_scan;
@@ -199,22 +39,12 @@ CELL last_code_heap_scan;
 bool growing_data_heap;
 F_DATA_HEAP *old_data_heap;
 
-/* Every object has a regular representation in the runtime, which makes GC
-much simpler. Every slot of the object until binary_payload_start is a pointer
-to some other object. */
-INLINE void do_slots(CELL obj, void (* iter)(CELL *))
+INLINE bool collecting_accumulation_gen_p(void)
 {
-       CELL scan = obj;
-       CELL payload_start = binary_payload_start(obj);
-       CELL end = obj + payload_start;
-
-       scan += CELLS;
-
-       while(scan < end)
-       {
-               iter((CELL *)scan);
-               scan += CELLS;
-       }
+       return ((HAVE_AGING_P
+               && collecting_gen == AGING
+               && !collecting_aging_again)
+               || collecting_gen == TENURED);
 }
 
 /* test if the pointer is in generation being collected, or a younger one. */
@@ -237,98 +67,10 @@ INLINE bool should_copy(CELL untagged)
 
 void copy_handle(CELL *handle);
 
-/* in case a generation fills up in the middle of a gc, we jump back
-up to try collecting the next generation. */
-jmp_buf gc_jmp;
-
-/* A heap walk allows useful things to be done, like finding all
-references to an object for debugging purposes. */
-CELL heap_scan_ptr;
-
-/* GC is off during heap walking */
-bool gc_off;
-
 void garbage_collection(volatile CELL gen,
        bool growing_data_heap_,
        CELL requested_bytes);
 
-/* If a runtime function needs to call another function which potentially
-allocates memory, it must store any local variable references to Factor
-objects on the root stack */
-
-/* GC locals: stores addresses of pointers to objects. The GC updates these
-pointers, so you can do
-
-REGISTER_ROOT(some_local);
-
-... allocate memory ...
-
-foo(some_local);
-
-...
-
-UNREGISTER_ROOT(some_local); */
-F_SEGMENT *gc_locals_region;
-CELL gc_locals;
-
-DEFPUSHPOP(gc_local_,gc_locals)
-
-#define REGISTER_ROOT(obj) gc_local_push((CELL)&obj)
-#define UNREGISTER_ROOT(obj) \
-       { \
-               if(gc_local_pop() != (CELL)&obj) \
-                       critical_error("Mismatched REGISTER_ROOT/UNREGISTER_ROOT",0); \
-       }
-
-/* Extra roots: stores pointers to objects in the heap. Requires extra work
-(you have to unregister before accessing the object) but more flexible. */
-F_SEGMENT *extra_roots_region;
-CELL extra_roots;
-
-DEFPUSHPOP(root_,extra_roots)
-
-#define REGISTER_UNTAGGED(obj) root_push(obj ? tag_object(obj) : 0)
-#define UNREGISTER_UNTAGGED(obj) obj = untag_object(root_pop())
-
-INLINE bool in_data_heap_p(CELL ptr)
-{
-       return (ptr >= data_heap->segment->start
-               && ptr <= data_heap->segment->end);
-}
-
-/* We ignore strings which point outside the data heap, but we might be given
-a char* which points inside the data heap, in which case it is a root, for
-example if we call unbox_char_string() the result is placed in a byte array */
-INLINE bool root_push_alien(const void *ptr)
-{
-       if(in_data_heap_p((CELL)ptr))
-       {
-               F_BYTE_ARRAY *objptr = ((F_BYTE_ARRAY *)ptr) - 1;
-               if(objptr->header == tag_header(BYTE_ARRAY_TYPE))
-               {
-                       root_push(tag_object(objptr));
-                       return true;
-               }
-       }
-
-       return false;
-}
-
-#define REGISTER_C_STRING(obj) \
-       bool obj##_root = root_push_alien(obj)
-#define UNREGISTER_C_STRING(obj) \
-       if(obj##_root) obj = alien_offset(root_pop())
-
-#define REGISTER_BIGNUM(obj) if(obj) root_push(tag_bignum(obj))
-#define UNREGISTER_BIGNUM(obj) if(obj) obj = (untag_object(root_pop()))
-
-INLINE void *allot_zone(F_ZONE *z, CELL a)
-{
-       CELL h = z->here;
-       z->here = h + align8(a);
-       return (void*)h;
-}
-
 /* We leave this many bytes free at the top of the nursery so that inline
 allocation (which does not call GC because of possible roots in volatile
 registers) does not run out of memory */
@@ -338,7 +80,7 @@ registers) does not run out of memory */
  * It is up to the caller to fill in the object's fields in a meaningful
  * fashion!
  */
-INLINE voidallot_object(CELL type, CELL a)
+INLINE void *allot_object(CELL type, CELL a)
 {
        CELL *object;
 
@@ -387,11 +129,10 @@ INLINE void* allot_object(CELL type, CELL a)
        return object;
 }
 
-void collect_next_loop(CELL scan, CELL *end);
+void copy_reachable_objects(CELL scan, CELL *end);
 
 void primitive_gc(void);
 void primitive_gc_stats(void);
-void primitive_gc_reset(void);
+void clear_gc_stats(void);
+void primitive_clear_gc_stats(void);
 void primitive_become(void);
-
-CELL find_all_words(void);
diff --git a/vm/data_heap.c b/vm/data_heap.c
new file mode 100644 (file)
index 0000000..c5aa42a
--- /dev/null
@@ -0,0 +1,371 @@
+#include "master.h"
+
+CELL init_zone(F_ZONE *z, CELL size, CELL start)
+{
+       z->size = size;
+       z->start = z->here = start;
+       z->end = start + size;
+       return z->end;
+}
+
+void init_card_decks(void)
+{
+       CELL start = align(data_heap->segment->start,DECK_SIZE);
+       allot_markers_offset = (CELL)data_heap->allot_markers - (start >> CARD_BITS);
+       cards_offset = (CELL)data_heap->cards - (start >> CARD_BITS);
+       decks_offset = (CELL)data_heap->decks - (start >> DECK_BITS);
+}
+
+F_DATA_HEAP *alloc_data_heap(CELL gens,
+       CELL young_size,
+       CELL aging_size,
+       CELL tenured_size)
+{
+       young_size = align(young_size,DECK_SIZE);
+       aging_size = align(aging_size,DECK_SIZE);
+       tenured_size = align(tenured_size,DECK_SIZE);
+
+       F_DATA_HEAP *data_heap = safe_malloc(sizeof(F_DATA_HEAP));
+       data_heap->young_size = young_size;
+       data_heap->aging_size = aging_size;
+       data_heap->tenured_size = tenured_size;
+       data_heap->gen_count = gens;
+
+       CELL total_size;
+       if(data_heap->gen_count == 2)
+               total_size = young_size + 2 * tenured_size;
+       else if(data_heap->gen_count == 3)
+               total_size = young_size + 2 * aging_size + 2 * tenured_size;
+       else
+       {
+               fatal_error("Invalid number of generations",data_heap->gen_count);
+               return NULL; /* can't happen */
+       }
+
+       total_size += DECK_SIZE;
+
+       data_heap->segment = alloc_segment(total_size);
+
+       data_heap->generations = safe_malloc(sizeof(F_ZONE) * data_heap->gen_count);
+       data_heap->semispaces = safe_malloc(sizeof(F_ZONE) * data_heap->gen_count);
+
+       CELL cards_size = total_size >> CARD_BITS;
+       data_heap->allot_markers = safe_malloc(cards_size);
+       data_heap->allot_markers_end = data_heap->allot_markers + cards_size;
+
+       data_heap->cards = safe_malloc(cards_size);
+       data_heap->cards_end = data_heap->cards + cards_size;
+
+       CELL decks_size = total_size >> DECK_BITS;
+       data_heap->decks = safe_malloc(decks_size);
+       data_heap->decks_end = data_heap->decks + decks_size;
+
+       CELL alloter = align(data_heap->segment->start,DECK_SIZE);
+
+       alloter = init_zone(&data_heap->generations[TENURED],tenured_size,alloter);
+       alloter = init_zone(&data_heap->semispaces[TENURED],tenured_size,alloter);
+
+       if(data_heap->gen_count == 3)
+       {
+               alloter = init_zone(&data_heap->generations[AGING],aging_size,alloter);
+               alloter = init_zone(&data_heap->semispaces[AGING],aging_size,alloter);
+       }
+
+       if(data_heap->gen_count >= 2)
+       {
+               alloter = init_zone(&data_heap->generations[NURSERY],young_size,alloter);
+               alloter = init_zone(&data_heap->semispaces[NURSERY],0,alloter);
+       }
+
+       if(data_heap->segment->end - alloter > DECK_SIZE)
+               critical_error("Bug in alloc_data_heap",alloter);
+
+       return data_heap;
+}
+
+F_DATA_HEAP *grow_data_heap(F_DATA_HEAP *data_heap, CELL requested_bytes)
+{
+       CELL new_tenured_size = (data_heap->tenured_size * 2) + requested_bytes;
+
+       return alloc_data_heap(data_heap->gen_count,
+               data_heap->young_size,
+               data_heap->aging_size,
+               new_tenured_size);
+}
+
+void dealloc_data_heap(F_DATA_HEAP *data_heap)
+{
+       dealloc_segment(data_heap->segment);
+       free(data_heap->generations);
+       free(data_heap->semispaces);
+       free(data_heap->allot_markers);
+       free(data_heap->cards);
+       free(data_heap->decks);
+       free(data_heap);
+}
+
+void clear_cards(CELL from, CELL to)
+{
+       /* NOTE: reverse order due to heap layout. */
+       F_CARD *first_card = ADDR_TO_CARD(data_heap->generations[to].start);
+       F_CARD *last_card = ADDR_TO_CARD(data_heap->generations[from].end);
+       memset(first_card,0,last_card - first_card);
+}
+
+void clear_decks(CELL from, CELL to)
+{
+       /* NOTE: reverse order due to heap layout. */
+       F_DECK *first_deck = ADDR_TO_DECK(data_heap->generations[to].start);
+       F_DECK *last_deck = ADDR_TO_DECK(data_heap->generations[from].end);
+       memset(first_deck,0,last_deck - first_deck);
+}
+
+void clear_allot_markers(CELL from, CELL to)
+{
+       /* NOTE: reverse order due to heap layout. */
+       F_CARD *first_card = ADDR_TO_ALLOT_MARKER(data_heap->generations[to].start);
+       F_CARD *last_card = ADDR_TO_ALLOT_MARKER(data_heap->generations[from].end);
+       memset(first_card,INVALID_ALLOT_MARKER,last_card - first_card);
+}
+
+void reset_generation(CELL i)
+{
+       F_ZONE *z = (i == NURSERY ? &nursery : &data_heap->generations[i]);
+
+       z->here = z->start;
+       if(secure_gc)
+               memset((void*)z->start,69,z->size);
+}
+
+/* After garbage collection, any generations which are now empty need to have
+their allocation pointers and cards reset. */
+void reset_generations(CELL from, CELL to)
+{
+       CELL i;
+       for(i = from; i <= to; i++)
+               reset_generation(i);
+
+       clear_cards(from,to);
+       clear_decks(from,to);
+       clear_allot_markers(from,to);
+}
+
+void set_data_heap(F_DATA_HEAP *data_heap_)
+{
+       data_heap = data_heap_;
+       nursery = data_heap->generations[NURSERY];
+       init_card_decks();
+       clear_cards(NURSERY,TENURED);
+       clear_decks(NURSERY,TENURED);
+       clear_allot_markers(NURSERY,TENURED);
+}
+
+void init_data_heap(CELL gens,
+       CELL young_size,
+       CELL aging_size,
+       CELL tenured_size,
+       bool secure_gc_)
+{
+       set_data_heap(alloc_data_heap(gens,young_size,aging_size,tenured_size));
+
+       gc_locals_region = alloc_segment(getpagesize());
+       gc_locals = gc_locals_region->start - CELLS;
+
+       extra_roots_region = alloc_segment(getpagesize());
+       extra_roots = extra_roots_region->start - CELLS;
+
+       secure_gc = secure_gc_;
+}
+
+/* Size of the object pointed to by a tagged pointer */
+CELL object_size(CELL tagged)
+{
+       if(immediate_p(tagged))
+               return 0;
+       else
+               return untagged_object_size(UNTAG(tagged));
+}
+
+/* Size of the object pointed to by an untagged pointer */
+CELL untagged_object_size(CELL pointer)
+{
+       return align8(unaligned_object_size(pointer));
+}
+
+/* Size of the data area of an object pointed to by an untagged pointer */
+CELL unaligned_object_size(CELL pointer)
+{
+       F_TUPLE *tuple;
+       F_TUPLE_LAYOUT *layout;
+
+       switch(untag_header(get(pointer)))
+       {
+       case ARRAY_TYPE:
+       case BIGNUM_TYPE:
+               return array_size(array_capacity((F_ARRAY*)pointer));
+       case BYTE_ARRAY_TYPE:
+               return byte_array_size(
+                       byte_array_capacity((F_BYTE_ARRAY*)pointer));
+       case STRING_TYPE:
+               return string_size(string_capacity((F_STRING*)pointer));
+       case TUPLE_TYPE:
+               tuple = untag_object(pointer);
+               layout = untag_object(tuple->layout);
+               return tuple_size(layout);
+       case QUOTATION_TYPE:
+               return sizeof(F_QUOTATION);
+       case WORD_TYPE:
+               return sizeof(F_WORD);
+       case RATIO_TYPE:
+               return sizeof(F_RATIO);
+       case FLOAT_TYPE:
+               return sizeof(F_FLOAT);
+       case COMPLEX_TYPE:
+               return sizeof(F_COMPLEX);
+       case DLL_TYPE:
+               return sizeof(F_DLL);
+       case ALIEN_TYPE:
+               return sizeof(F_ALIEN);
+       case WRAPPER_TYPE:
+               return sizeof(F_WRAPPER);
+       case CALLSTACK_TYPE:
+               return callstack_size(
+                       untag_fixnum_fast(((F_CALLSTACK *)pointer)->length));
+       default:
+               critical_error("Invalid header",pointer);
+               return -1; /* can't happen */
+       }
+}
+
+void primitive_size(void)
+{
+       box_unsigned_cell(object_size(dpop()));
+}
+
+/* The number of cells from the start of the object which should be scanned by
+the GC. Some types have a binary payload at the end (string, word, DLL) which
+we ignore. */
+CELL binary_payload_start(CELL pointer)
+{
+       F_TUPLE *tuple;
+       F_TUPLE_LAYOUT *layout;
+
+       switch(untag_header(get(pointer)))
+       {
+       /* these objects do not refer to other objects at all */
+       case FLOAT_TYPE:
+       case BYTE_ARRAY_TYPE:
+       case BIGNUM_TYPE:
+       case CALLSTACK_TYPE:
+               return 0;
+       /* these objects have some binary data at the end */
+       case WORD_TYPE:
+               return sizeof(F_WORD) - CELLS * 3;
+       case ALIEN_TYPE:
+               return CELLS * 3;
+       case DLL_TYPE:
+               return CELLS * 2;
+       case QUOTATION_TYPE:
+               return sizeof(F_QUOTATION) - CELLS * 2;
+       case STRING_TYPE:
+               return sizeof(F_STRING);
+       /* everything else consists entirely of pointers */
+       case ARRAY_TYPE:
+               return array_size(array_capacity((F_ARRAY*)pointer));
+       case TUPLE_TYPE:
+               tuple = untag_object(pointer);
+               layout = untag_object(tuple->layout);
+               return tuple_size(layout);
+       case RATIO_TYPE:
+               return sizeof(F_RATIO);
+       case COMPLEX_TYPE:
+               return sizeof(F_COMPLEX);
+       case WRAPPER_TYPE:
+               return sizeof(F_WRAPPER);
+       default:
+               critical_error("Invalid header",pointer);
+               return -1; /* can't happen */
+       }
+}
+
+/* Push memory usage statistics in data heap */
+void primitive_data_room(void)
+{
+       F_ARRAY *a = allot_array(ARRAY_TYPE,data_heap->gen_count * 2,F);
+       int gen;
+
+       dpush(tag_fixnum((data_heap->cards_end - data_heap->cards) >> 10));
+       dpush(tag_fixnum((data_heap->decks_end - data_heap->decks) >> 10));
+
+       for(gen = 0; gen < data_heap->gen_count; gen++)
+       {
+               F_ZONE *z = (gen == NURSERY ? &nursery : &data_heap->generations[gen]);
+               set_array_nth(a,gen * 2,tag_fixnum((z->end - z->here) >> 10));
+               set_array_nth(a,gen * 2 + 1,tag_fixnum((z->size) >> 10));
+       }
+
+       dpush(tag_object(a));
+}
+
+/* Disables GC and activates next-object ( -- obj ) primitive */
+void begin_scan(void)
+{
+       heap_scan_ptr = data_heap->generations[TENURED].start;
+       gc_off = true;
+}
+
+void primitive_begin_scan(void)
+{
+       begin_scan();
+}
+
+CELL next_object(void)
+{
+       if(!gc_off)
+               general_error(ERROR_HEAP_SCAN,F,F,NULL);
+
+       CELL value = get(heap_scan_ptr);
+       CELL obj = heap_scan_ptr;
+       CELL type;
+
+       if(heap_scan_ptr >= data_heap->generations[TENURED].here)
+               return F;
+
+       type = untag_header(value);
+       heap_scan_ptr += untagged_object_size(heap_scan_ptr);
+
+       return RETAG(obj,type <= HEADER_TYPE ? type : OBJECT_TYPE);
+}
+
+/* Push object at heap scan cursor and advance; pushes f when done */
+void primitive_next_object(void)
+{
+       dpush(next_object());
+}
+
+/* Re-enables GC */
+void primitive_end_scan(void)
+{
+       gc_off = false;
+}
+
+CELL find_all_words(void)
+{
+       GROWABLE_ARRAY(words);
+
+       begin_scan();
+
+       CELL obj;
+       while((obj = next_object()) != F)
+       {
+               if(type_of(obj) == WORD_TYPE)
+                       GROWABLE_ARRAY_ADD(words,obj);
+       }
+
+       /* End heap scan */
+       gc_off = false;
+
+       GROWABLE_ARRAY_TRIM(words);
+
+       return words;
+}
diff --git a/vm/data_heap.h b/vm/data_heap.h
new file mode 100644 (file)
index 0000000..a7f44e7
--- /dev/null
@@ -0,0 +1,138 @@
+/* Set by the -securegc command line argument */
+bool secure_gc;
+
+/* generational copying GC divides memory into zones */
+typedef struct {
+       /* allocation pointer is 'here'; its offset is hardcoded in the
+       compiler backends*/
+       CELL start;
+       CELL here;
+       CELL size;
+       CELL end;
+} F_ZONE;
+
+typedef struct {
+       F_SEGMENT *segment;
+
+       CELL young_size;
+       CELL aging_size;
+       CELL tenured_size;
+
+       CELL gen_count;
+
+       F_ZONE *generations;
+       F_ZONE* semispaces;
+
+       CELL *allot_markers;
+       CELL *allot_markers_end;
+
+       CELL *cards;
+       CELL *cards_end;
+
+       CELL *decks;
+       CELL *decks_end;
+} F_DATA_HEAP;
+
+F_DATA_HEAP *data_heap;
+
+/* the 0th generation is where new objects are allocated. */
+#define NURSERY 0
+#define HAVE_NURSERY_P (data_heap->gen_count>1)
+/* where objects hang around */
+#define AGING (data_heap->gen_count-2)
+#define HAVE_AGING_P (data_heap->gen_count>2)
+/* the oldest generation */
+#define TENURED (data_heap->gen_count-1)
+
+#define MIN_GEN_COUNT 1
+#define MAX_GEN_COUNT 3
+
+/* new objects are allocated here */
+DLLEXPORT F_ZONE nursery;
+
+INLINE bool in_zone(F_ZONE *z, CELL pointer)
+{
+       return pointer >= z->start && pointer < z->end;
+}
+
+CELL init_zone(F_ZONE *z, CELL size, CELL base);
+
+void init_card_decks(void);
+
+F_DATA_HEAP *grow_data_heap(F_DATA_HEAP *data_heap, CELL requested_bytes);
+
+void dealloc_data_heap(F_DATA_HEAP *data_heap);
+
+void clear_cards(CELL from, CELL to);
+void clear_decks(CELL from, CELL to);
+void clear_allot_markers(CELL from, CELL to);
+void reset_generation(CELL i);
+void reset_generations(CELL from, CELL to);
+
+void set_data_heap(F_DATA_HEAP *data_heap_);
+
+void init_data_heap(CELL gens,
+       CELL young_size,
+       CELL aging_size,
+       CELL tenured_size,
+       bool secure_gc_);
+
+/* set up guard pages to check for under/overflow.
+size must be a multiple of the page size */
+F_SEGMENT *alloc_segment(CELL size);
+void dealloc_segment(F_SEGMENT *block);
+
+CELL untagged_object_size(CELL pointer);
+CELL unaligned_object_size(CELL pointer);
+CELL object_size(CELL pointer);
+CELL binary_payload_start(CELL pointer);
+
+void begin_scan(void);
+CELL next_object(void);
+
+void primitive_data_room(void);
+void primitive_size(void);
+
+void primitive_begin_scan(void);
+void primitive_next_object(void);
+void primitive_end_scan(void);
+
+/* A heap walk allows useful things to be done, like finding all
+references to an object for debugging purposes. */
+CELL heap_scan_ptr;
+
+/* GC is off during heap walking */
+bool gc_off;
+
+INLINE bool in_data_heap_p(CELL ptr)
+{
+       return (ptr >= data_heap->segment->start
+               && ptr <= data_heap->segment->end);
+}
+
+INLINE void *allot_zone(F_ZONE *z, CELL a)
+{
+       CELL h = z->here;
+       z->here = h + align8(a);
+       return (void*)h;
+}
+
+CELL find_all_words(void);
+
+/* Every object has a regular representation in the runtime, which makes GC
+much simpler. Every slot of the object until binary_payload_start is a pointer
+to some other object. */
+INLINE void do_slots(CELL obj, void (* iter)(CELL *))
+{
+       CELL scan = obj;
+       CELL payload_start = binary_payload_start(obj);
+       CELL end = obj + payload_start;
+
+       scan += CELLS;
+
+       while(scan < end)
+       {
+               iter((CELL *)scan);
+               scan += CELLS;
+       }
+}
index 909cc8f710e71cd3ed28eab6e5e57627a80180e5..6b72b97bec2bfcbb0d80853b886afd25cd19cde8 100755 (executable)
@@ -308,34 +308,42 @@ void find_data_references(CELL look_for_)
        gc_off = false;
 }
 
-CELL look_for;
-
-void find_code_references_step(F_COMPILED *compiled, CELL code_start, CELL literals_start)
+/* Dump all code blocks for debugging */
+void dump_code_heap(void)
 {
-       CELL scan;
-       CELL literal_end = literals_start + compiled->literals_length;
-
-       for(scan = literals_start; scan < literal_end; scan += CELLS)
-       {
-               CELL code_start = (CELL)(compiled + 1);
-               CELL literal_start = code_start + compiled->code_length;
+       CELL size = 0;
 
-               CELL obj = get(literal_start);
+       F_BLOCK *scan = first_block(&code_heap);
 
-               if(look_for == get(scan))
+       while(scan)
+       {
+               char *status;
+               switch(scan->status)
                {
-                       print_cell_hex_pad(obj);
-                       print_string(" ");
-                       print_nested_obj(obj,2);
-                       nl();
+               case B_FREE:
+                       status = "free";
+                       break;
+               case B_ALLOCATED:
+                       size += object_size(block_to_compiled(scan)->relocation);
+                       status = "allocated";
+                       break;
+               case B_MARKED:
+                       size += object_size(block_to_compiled(scan)->relocation);
+                       status = "marked";
+                       break;
+               default:
+                       status = "invalid";
+                       break;
                }
-       }
-}
 
-void find_code_references(CELL look_for_)
-{
-       look_for = look_for_;
-       iterate_code_heap(find_code_references_step);
+               print_cell_hex((CELL)scan); print_string(" ");
+               print_cell_hex(scan->size); print_string(" ");
+               print_string(status); print_string("\n");
+
+               scan = next_block(&code_heap,scan);
+       }
+       
+       print_cell(size); print_string(" bytes of relocation data\n");
 }
 
 void factorbug(void)
@@ -456,7 +464,7 @@ void factorbug(void)
                else if(strcmp(cmd,"x") == 0)
                        exit(1);
                else if(strcmp(cmd,"im") == 0)
-                       save_image(STR_FORMAT("fep.image"));
+                       save_image(STRING_LITERAL("fep.image"));
                else if(strcmp(cmd,"data") == 0)
                        dump_objects(-1);
                else if(strcmp(cmd,"refs") == 0)
@@ -464,8 +472,6 @@ void factorbug(void)
                        CELL addr = read_cell_hex();
                        print_string("Data heap references:\n");
                        find_data_references(addr);
-                       print_string("Code heap references:\n");
-                       find_code_references(addr);
                        nl();
                }
                else if(strcmp(cmd,"words") == 0)
@@ -478,7 +484,7 @@ void factorbug(void)
                        dpush(addr);
                }
                else if(strcmp(cmd,"code") == 0)
-                       dump_heap(&code_heap);
+                       dump_code_heap();
                else
                        print_string("unknown command\n");
        }
index 2f78a797d4ee032fab85733997208385f46f5cad..d9042c945563a854a3b149dc9df24ea554b72c25 100755 (executable)
@@ -2,7 +2,7 @@
 
 void default_parameters(F_PARAMETERS *p)
 {
-       p->image = NULL;
+       p->image_path = NULL;
 
        /* We make a wild guess here that if we're running on ARM, we don't
        have a lot of memory. */
@@ -38,6 +38,42 @@ void default_parameters(F_PARAMETERS *p)
        p->stack_traces = true;
 }
 
+INLINE bool factor_arg(const F_CHAR* str, const F_CHAR* arg, CELL* value)
+{
+       int val;
+       if(SSCANF(str,arg,&val) > 0)
+       {
+               *value = val;
+               return true;
+       }
+       else
+               return false;
+}
+
+void init_parameters_from_args(F_PARAMETERS *p, int argc, F_CHAR **argv)
+{
+       default_parameters(p);
+       p->executable_path = argv[0];
+
+       int i = 0;
+
+       for(i = 1; i < argc; i++)
+       {
+               if(factor_arg(argv[i],STRING_LITERAL("-datastack=%d"),&p->ds_size));
+               else if(factor_arg(argv[i],STRING_LITERAL("-retainstack=%d"),&p->rs_size));
+               else if(factor_arg(argv[i],STRING_LITERAL("-generations=%d"),&p->gen_count));
+               else if(factor_arg(argv[i],STRING_LITERAL("-young=%d"),&p->young_size));
+               else if(factor_arg(argv[i],STRING_LITERAL("-aging=%d"),&p->aging_size));
+               else if(factor_arg(argv[i],STRING_LITERAL("-tenured=%d"),&p->tenured_size));
+               else if(factor_arg(argv[i],STRING_LITERAL("-codeheap=%d"),&p->code_size));
+               else if(STRCMP(argv[i],STRING_LITERAL("-securegc")) == 0) p->secure_gc = true;
+               else if(STRCMP(argv[i],STRING_LITERAL("-fep")) == 0) p->fep = true;
+               else if(STRNCMP(argv[i],STRING_LITERAL("-i="),3) == 0) p->image_path = argv[i] + 3;
+               else if(STRCMP(argv[i],STRING_LITERAL("-console")) == 0) p->console = true;
+               else if(STRCMP(argv[i],STRING_LITERAL("-no-stack-traces")) == 0) p->stack_traces = false;
+       }
+}
+
 /* Do some initialization that we do once only */
 void do_stage1_init(void)
 {
@@ -51,7 +87,6 @@ void do_stage1_init(void)
        fflush(stdout);
 }
 
-/* Get things started */
 void init_factor(F_PARAMETERS *p)
 {
        /* Kilobytes */
@@ -70,8 +105,13 @@ void init_factor(F_PARAMETERS *p)
        /* OS-specific initialization */
        early_init();
 
-       if(p->image == NULL)
-               p->image = default_image_path();
+       const F_CHAR *executable_path = vm_executable_path();
+
+       if(executable_path)
+               p->executable_path = executable_path;
+
+       if(p->image_path == NULL)
+               p->image_path = default_image_path();
 
        srand(current_micros());
        init_ffi();
@@ -93,6 +133,10 @@ void init_factor(F_PARAMETERS *p)
        userenv[OS_ENV] = tag_object(from_char_string(FACTOR_OS_STRING));
        userenv[CELL_SIZE_ENV] = tag_fixnum(sizeof(CELL));
        userenv[STACK_TRACES_ENV] = tag_boolean(p->stack_traces);
+       userenv[EXECUTABLE_ENV] = (p->executable_path ?
+               tag_object(from_native_string(p->executable_path)) : F);
+       userenv[ARGS_ENV] = F;
+       userenv[EMBEDDED_ENV] = F;
 
        /* We can GC now */
        gc_off = false;
@@ -101,57 +145,11 @@ void init_factor(F_PARAMETERS *p)
                do_stage1_init();
 }
 
-INLINE bool factor_arg(const F_CHAR* str, const F_CHAR* arg, CELL* value)
-{
-       int val;
-       if(SSCANF(str,arg,&val) > 0)
-       {
-               *value = val;
-               return true;
-       }
-       else
-               return false;
-}
-
-void init_factor_from_args(F_CHAR *image, int argc, F_CHAR **argv, bool embedded)
+/* May allocate memory */
+void pass_args_to_factor(int argc, F_CHAR **argv)
 {
-       F_PARAMETERS p;
-       default_parameters(&p);
-
-       if(image) p.image = image;
-
-       CELL i;
-
-       posix_argc = argc;
-       posix_argv = safe_malloc(argc * sizeof(F_CHAR*));
-       posix_argv[0] = safe_strdup(argv[0]);
-
-       for(i = 1; i < argc; i++)
-       {
-               posix_argv[i] = safe_strdup(argv[i]);
-               if(factor_arg(argv[i],STR_FORMAT("-datastack=%d"),&p.ds_size));
-               else if(factor_arg(argv[i],STR_FORMAT("-retainstack=%d"),&p.rs_size));
-               else if(factor_arg(argv[i],STR_FORMAT("-generations=%d"),&p.gen_count));
-               else if(factor_arg(argv[i],STR_FORMAT("-young=%d"),&p.young_size));
-               else if(factor_arg(argv[i],STR_FORMAT("-aging=%d"),&p.aging_size));
-               else if(factor_arg(argv[i],STR_FORMAT("-tenured=%d"),&p.tenured_size));
-               else if(factor_arg(argv[i],STR_FORMAT("-codeheap=%d"),&p.code_size));
-               else if(STRCMP(argv[i],STR_FORMAT("-securegc")) == 0)
-                       p.secure_gc = true;
-               else if(STRCMP(argv[i],STR_FORMAT("-fep")) == 0)
-                       p.fep = true;
-               else if(STRNCMP(argv[i],STR_FORMAT("-i="),3) == 0)
-                       p.image = argv[i] + 3;
-               else if(STRCMP(argv[i],STR_FORMAT("-console")) == 0)
-                       p.console = true;
-               else if(STRCMP(argv[i],STR_FORMAT("-no-stack-traces")) == 0)
-                       p.stack_traces = false;
-       }
-
-       init_factor(&p);
-       nest_stacks();
-
        F_ARRAY *args = allot_array(ARRAY_TYPE,argc,F);
+       int i;
 
        for(i = 1; i < argc; i++)
        {
@@ -162,23 +160,31 @@ void init_factor_from_args(F_CHAR *image, int argc, F_CHAR **argv, bool embedded
        }
 
        userenv[ARGS_ENV] = tag_object(args);
+}
 
-       const F_CHAR *executable_path = vm_executable_path();
-       if(!executable_path)
-               executable_path = argv[0];
-
-       userenv[EXECUTABLE_ENV] = tag_object(from_native_string(executable_path));
-       userenv[EMBEDDED_ENV] = (embedded ? T : F);
-
-       if(p.fep)
-               factorbug();
+void start_factor(F_PARAMETERS *p)
+{
+       if(p->fep) factorbug();
 
+       nest_stacks();
        c_to_factor_toplevel(userenv[BOOT_ENV]);
        unnest_stacks();
+}
 
-       for(i = 0; i < argc; i++)
-               free(posix_argv[i]);
-       free(posix_argv);
+void start_embedded_factor(F_PARAMETERS *p)
+{
+       userenv[EMBEDDED_ENV] = T;
+       start_factor(p);
+}
+
+void start_standalone_factor(int argc, F_CHAR **argv)
+{
+       F_PARAMETERS p;
+       default_parameters(&p);
+       init_parameters_from_args(&p,argc,argv);
+       init_factor(&p);
+       pass_args_to_factor(argc,argv);
+       start_factor(&p);
 }
 
 char *factor_eval_string(char *string)
index a0632c3138e3140cf7e8c46faa2bb53c98561cc7..a3de31a5024b7b6f91f69e884d4f4fdc6f823ffc 100644 (file)
@@ -1,7 +1,10 @@
-int posix_argc;
-F_CHAR **posix_argv;
+DLLEXPORT void default_parameters(F_PARAMETERS *p);
+DLLEXPORT void init_parameters_from_args(F_PARAMETERS *p, int argc, F_CHAR **argv);
+DLLEXPORT void init_factor(F_PARAMETERS *p);
+DLLEXPORT void pass_args_to_factor(int argc, F_CHAR **argv);
+DLLEXPORT void start_embedded_factor(F_PARAMETERS *p);
+DLLEXPORT void start_standalone_factor(int argc, F_CHAR **argv);
 
-DLLEXPORT void init_factor_from_args(F_CHAR *image, int argc, F_CHAR **argv, bool embedded);
 DLLEXPORT char *factor_eval_string(char *string);
 DLLEXPORT void factor_eval_free(char *result);
 DLLEXPORT void factor_yield(void);
index 6fb5910392d2e5626b07215472f742e50dbff93e..5ce7147200645c57e5d3e38e0de5ccb5a2394226 100755 (executable)
@@ -26,6 +26,8 @@ INLINE void load_data_heap(FILE *file, F_HEADER *h, F_PARAMETERS *p)
                p->tenured_size,
                p->secure_gc);
 
+       clear_gc_stats();
+
        F_ZONE *tenured = &data_heap->generations[TENURED];
 
        F_FIXNUM bytes_read = fread((void*)tenured->start,1,h->data_size,file);
@@ -75,10 +77,10 @@ INLINE void load_code_heap(FILE *file, F_HEADER *h, F_PARAMETERS *p)
 /* This function also initializes the data and code heaps */
 void load_image(F_PARAMETERS *p)
 {
-       FILE *file = OPEN_READ(p->image);
+       FILE *file = OPEN_READ(p->image_path);
        if(file == NULL)
        {
-               print_string("Cannot open image file: "); print_native_string(p->image); nl();
+               print_string("Cannot open image file: "); print_native_string(p->image_path); nl();
                print_string(strerror(errno)); nl();
                exit(1);
        }
@@ -103,7 +105,7 @@ void load_image(F_PARAMETERS *p)
        relocate_code();
 
        /* Store image path name */
-       userenv[IMAGE_ENV] = tag_object(from_native_string(p->image));
+       userenv[IMAGE_ENV] = tag_object(from_native_string(p->image_path));
 }
 
 /* Save the current image to disk */
@@ -311,18 +313,13 @@ void relocate_data()
        }
 }
 
-void fixup_code_block(F_COMPILED *compiled, CELL code_start, CELL literals_start)
+void fixup_code_block(F_CODE_BLOCK *compiled)
 {
        /* relocate literal table data */
-       CELL scan;
-       CELL literal_end = literals_start + compiled->literals_length;
-
        data_fixup(&compiled->relocation);
+       data_fixup(&compiled->literals);
 
-       for(scan = literals_start; scan < literal_end; scan += CELLS)
-               data_fixup((CELL*)scan);
-
-       relocate_code_block(compiled,code_start,literals_start);
+       relocate_code_block(compiled);
 }
 
 void relocate_code()
index 6e1b03af0dcc0965dcd7d52b37c09bdbe1e791f0..e26a6bb5b4730bb86c21a2761c80ef0d43bbd5a4 100755 (executable)
@@ -26,7 +26,8 @@ typedef struct {
 } F_HEADER;
 
 typedef struct {
-       const F_CHAR* image;
+       const F_CHAR *image_path;
+       const F_CHAR *executable_path;
        CELL ds_size, rs_size;
        CELL gen_count, young_size, aging_size, tenured_size;
        CELL code_size;
index 74a4c0475e00d7e7d03a5448821eb31c89e95be8..94e2f623a3190443d0c770be06197d9791a17e90 100755 (executable)
@@ -106,10 +106,11 @@ typedef struct
 {
        char type; /* this is WORD_TYPE or QUOTATION_TYPE */
        char last_scan; /* the youngest generation in which this block's literals may live */
+       char needs_fixup; /* is this a new block that needs full fixup? */
        CELL code_length; /* # bytes */
-       CELL literals_length; /* # bytes */
+       CELL literals; /* # bytes */
        CELL relocation; /* tagged pointer to byte-array or f */
-} F_COMPILED;
+} F_CODE_BLOCK;
 
 /* Assembly code makes assumptions about the layout of this struct */
 typedef struct {
@@ -125,8 +126,9 @@ typedef struct {
        CELL def;
        /* TAGGED property assoc for library code */
        CELL props;
-       /* TAGGED t or f, depending on if the word is compiled or not */
-       CELL compiledp;
+       /* TAGGED t or f, t means its compiled with the optimizing compiler,
+       f means its compiled with the non-optimizing compiler */
+       CELL optimizedp;
        /* TAGGED call count for profiling */
        CELL counter;
        /* TAGGED machine code for sub-primitive */
@@ -134,9 +136,9 @@ typedef struct {
        /* UNTAGGED execution token: jump here to execute word */
        XT xt;
        /* UNTAGGED compiled code block */
-       F_COMPILED *code;
+       F_CODE_BLOCK *code;
        /* UNTAGGED profiler stub */
-       F_COMPILED *profiling;
+       F_CODE_BLOCK *profiling;
 } F_WORD;
 
 /* Assembly code makes assumptions about the layout of this struct */
@@ -173,7 +175,7 @@ typedef struct {
        /* UNTAGGED */
        XT xt;
        /* UNTAGGED compiled code block */
-       F_COMPILED *code;
+       F_CODE_BLOCK *code;
 } F_QUOTATION;
 
 /* Assembly code makes assumptions about the layout of this struct */
diff --git a/vm/local_roots.h b/vm/local_roots.h
new file mode 100644 (file)
index 0000000..e852f9e
--- /dev/null
@@ -0,0 +1,63 @@
+/* If a runtime function needs to call another function which potentially
+allocates memory, it must store any local variable references to Factor
+objects on the root stack */
+
+/* GC locals: stores addresses of pointers to objects. The GC updates these
+pointers, so you can do
+
+REGISTER_ROOT(some_local);
+
+... allocate memory ...
+
+foo(some_local);
+
+...
+
+UNREGISTER_ROOT(some_local); */
+F_SEGMENT *gc_locals_region;
+CELL gc_locals;
+
+DEFPUSHPOP(gc_local_,gc_locals)
+
+#define REGISTER_ROOT(obj) gc_local_push((CELL)&obj)
+#define UNREGISTER_ROOT(obj) \
+       { \
+               if(gc_local_pop() != (CELL)&obj) \
+                       critical_error("Mismatched REGISTER_ROOT/UNREGISTER_ROOT",0); \
+       }
+
+/* Extra roots: stores pointers to objects in the heap. Requires extra work
+(you have to unregister before accessing the object) but more flexible. */
+F_SEGMENT *extra_roots_region;
+CELL extra_roots;
+
+DEFPUSHPOP(root_,extra_roots)
+
+#define REGISTER_UNTAGGED(obj) root_push(obj ? tag_object(obj) : 0)
+#define UNREGISTER_UNTAGGED(obj) obj = untag_object(root_pop())
+
+/* We ignore strings which point outside the data heap, but we might be given
+a char* which points inside the data heap, in which case it is a root, for
+example if we call unbox_char_string() the result is placed in a byte array */
+INLINE bool root_push_alien(const void *ptr)
+{
+       if(in_data_heap_p((CELL)ptr))
+       {
+               F_BYTE_ARRAY *objptr = ((F_BYTE_ARRAY *)ptr) - 1;
+               if(objptr->header == tag_header(BYTE_ARRAY_TYPE))
+               {
+                       root_push(tag_object(objptr));
+                       return true;
+               }
+       }
+
+       return false;
+}
+
+#define REGISTER_C_STRING(obj) \
+       bool obj##_root = root_push_alien(obj)
+#define UNREGISTER_C_STRING(obj) \
+       if(obj##_root) obj = alien_offset(root_pop())
+
+#define REGISTER_BIGNUM(obj) if(obj) root_push(tag_bignum(obj))
+#define UNREGISTER_BIGNUM(obj) if(obj) obj = (untag_object(root_pop()))
index 5af454e51fb77a2ddfee609f8f0c0927b5bf8986..b177c58eb37e9b588f3383781638a4ae73b33df0 100644 (file)
@@ -2,6 +2,6 @@
 
 int main(int argc, char **argv)
 {
-       init_factor_from_args(NULL,argc,argv,false);
+       start_standalone_factor(argc,argv);
        return 0;
 }
index e67f08abb949647a8d97a20869fce4bd79d82fa3..fc04d455dbe2c4f51739dc022594f167ac0524fd 100644 (file)
@@ -1,5 +1,3 @@
-#include <windows.h>
-#include <stdio.h>
 #include "master.h"
 
 /* 
@@ -8,7 +6,9 @@
 
        This would not be necessary if Windows CE had CommandLineToArgvW.
 
-       Based on MinGW's public domain char** version.  */
+       Based on MinGW's public domain char** version.
+
+*/
 
 int __argc;
 wchar_t **__argv;
@@ -128,7 +128,7 @@ WinMain(
        int nCmdShow)
 {
        parse_args(&__argc, &__argv, lpCmdLine);
-       init_factor_from_args(NULL,__argc,(LPWSTR*)__argv,false);
+       start_standalone_factor(__argc,(LPWSTR*)__argv);
        // memory leak from malloc, wcsdup
        return 0;
 }
index ef66651846582b7bce8b61edc357dffd7fdb606d..6552e88bedf38407af9bc2d85075c79fc5bb2638 100755 (executable)
@@ -19,7 +19,7 @@ int WINAPI WinMain(
                return 1;
        }
 
-       init_factor_from_args(NULL,nArgs,szArglist,false);
+       start_standalone_factor(nArgs,szArglist);
 
        LocalFree(szArglist);
 
index 0f4daa705b41191f8e7b1d3305761d9907141d63..86b5223eaa51e6038efdc0a85828044af9033714 100644 (file)
@@ -25,6 +25,9 @@
 #include "errors.h"
 #include "bignumint.h"
 #include "bignum.h"
+#include "write_barrier.h"
+#include "data_heap.h"
+#include "local_roots.h"
 #include "data_gc.h"
 #include "debug.h"
 #include "types.h"
@@ -32,6 +35,7 @@
 #include "float_bits.h"
 #include "io.h"
 #include "code_gc.h"
+#include "code_block.h"
 #include "code_heap.h"
 #include "image.h"
 #include "callstack.h"
index 952d2683cfe43a4356ca8c3012c4d46d10b31e5b..97c29d8c6e890a75df2bb67937bfb7305a4becd9 100755 (executable)
@@ -216,18 +216,21 @@ void safe_write(int fd, void *data, size_t size)
                fatal_error("error writing fd",errno);
 }
 
-void safe_read(int fd, void *data, size_t size)
+bool safe_read(int fd, void *data, size_t size)
 {
        ssize_t bytes = read(fd,data,size);
        if(bytes < 0)
        {
                if(errno == EINTR)
-                       safe_read(fd,data,size);
+                       return safe_read(fd,data,size);
                else
+               {
                        fatal_error("error reading fd",errno);
+                       return false;
+               }
        }
-       else if(bytes != size)
-               fatal_error("unexpected eof on fd",bytes);
+       else
+               return (bytes == size);
 }
 
 void *stdin_loop(void *arg)
@@ -237,7 +240,9 @@ void *stdin_loop(void *arg)
 
        while(loop_running)
        {
-               safe_read(control_read,buf,1);
+               if(!safe_read(control_read,buf,1))
+                       break;
+
                if(buf[0] != 'X')
                        fatal_error("stdin_loop: bad data on control fd",buf[0]);
 
@@ -258,16 +263,15 @@ void *stdin_loop(void *arg)
                        {
                                safe_write(size_write,&bytes,sizeof(bytes));
 
-                               if(write(stdin_write,buf,bytes) != bytes)
+                               if(!check_write(stdin_write,buf,bytes))
                                        loop_running = false;
                                break;
                        }
                }
        }
 
-
        safe_close(stdin_write);
-       safe_close(control_write);
+       safe_close(control_read);
 
        return NULL;
 }
index b2a1735fd798ea6dd14592de8b2fa24f44bfdccd..d2f34b4bc4c26d50a1c419ce436619ac3c833d8e 100755 (executable)
@@ -16,7 +16,7 @@ typedef char F_SYMBOL;
 #define string_to_native_alien(string) string_to_char_alien(string,true)
 #define unbox_symbol_string unbox_char_string
 
-#define STR_FORMAT(string) string
+#define STRING_LITERAL(string) string
 
 #define SSCANF sscanf
 #define STRCMP strcmp
index f982abfb1b94c295c510a88f5b4b971dc0cb43c2..bcddd0b140cff83b128499f92c8ed31cbbaabb88 100755 (executable)
@@ -54,14 +54,4 @@ void c_to_factor_toplevel(CELL quot)
 
 void open_console(void)
 {
-       /*
-       // Do this: http://www.cygwin.com/ml/cygwin/2007-11/msg00432.html
-       if(console_open)
-               return;
-
-       if(AttachConsole(ATTACH_PARENT_PROCESS) || AllocConsole())
-       {
-               console_open = true;
-       }
-       */
 }
index 1b680befadb375f49d2b467e85baadd556578348..4e047b497c7c70adf7acb3bae9607b4c8da7ec8c 100755 (executable)
@@ -18,5 +18,4 @@ typedef char F_SYMBOL;
 
 void c_to_factor_toplevel(CELL quot);
 long exception_handler(PEXCEPTION_POINTERS pe);
-bool console_open;
 void open_console(void);
index ee2c7211119e59212abdd3104bcc12ce15a3a8ac..c4d29ea57fb411f2d5b2b056610f251229a4a6a7 100755 (executable)
@@ -59,12 +59,46 @@ void ffi_dlclose(F_DLL *dll)
        dll->dll = NULL;
 }
 
+bool windows_stat(F_CHAR *path)
+{
+       BY_HANDLE_FILE_INFORMATION bhfi;
+       HANDLE h = CreateFileW(path,
+                       GENERIC_READ,
+                       FILE_SHARE_READ,
+                       NULL,
+                       OPEN_EXISTING,
+                       FILE_FLAG_BACKUP_SEMANTICS,
+                       NULL);
+
+       if(h == INVALID_HANDLE_VALUE)
+       {
+               // FindFirstFile is the only call that can stat c:\pagefile.sys
+               WIN32_FIND_DATA st;
+               HANDLE h;
+
+               if(INVALID_HANDLE_VALUE == (h = FindFirstFile(path, &st)))
+                       return false;
+               FindClose(h);
+               return true;
+       }
+       bool ret;
+       ret = GetFileInformationByHandle(h, &bhfi);
+       CloseHandle(h);
+       return ret;
+}
+
+void windows_image_path(F_CHAR *full_path, F_CHAR *temp_path, unsigned int length)
+{
+       snwprintf(temp_path, length-1, L"%s.image", full_path); 
+       temp_path[sizeof(temp_path) - 1] = 0;
+}
+
 /* You must free() this yourself. */
 const F_CHAR *default_image_path(void)
 {
        F_CHAR full_path[MAX_UNICODE_PATH];
        F_CHAR *ptr;
-       F_CHAR path_temp[MAX_UNICODE_PATH];
+       F_CHAR temp_path[MAX_UNICODE_PATH];
 
        if(!GetModuleFileName(NULL, full_path, MAX_UNICODE_PATH))
                fatal_error("GetModuleFileName() failed", 0);
@@ -72,10 +106,21 @@ const F_CHAR *default_image_path(void)
        if((ptr = wcsrchr(full_path, '.')))
                *ptr = 0;
 
-       snwprintf(path_temp, sizeof(path_temp)-1, L"%s.image", full_path); 
-       path_temp[sizeof(path_temp) - 1] = 0;
+       snwprintf(temp_path, sizeof(temp_path)-1, L"%s.image", full_path); 
+       temp_path[sizeof(temp_path) - 1] = 0;
 
-       return safe_strdup(path_temp);
+       if(!windows_stat(temp_path)) {
+               unsigned int len = wcslen(full_path);
+               F_CHAR magic[] = L"-console";
+               unsigned int magic_len = wcslen(magic);
+
+               if(!wcsncmp(full_path + len - magic_len, magic, MIN(len, magic_len)))
+                       full_path[len - magic_len] = 0;
+               snwprintf(temp_path, sizeof(temp_path)-1, L"%s.image", full_path); 
+               temp_path[sizeof(temp_path) - 1] = 0;
+       }
+
+       return safe_strdup(temp_path);
 }
 
 /* You must free() this yourself. */
@@ -87,37 +132,12 @@ const F_CHAR *vm_executable_path(void)
        return safe_strdup(full_path);
 }
 
+
 void primitive_existsp(void)
 {
-       BY_HANDLE_FILE_INFORMATION bhfi;
 
        F_CHAR *path = unbox_u16_string();
-       HANDLE h = CreateFileW(path,
-                       GENERIC_READ,
-                       FILE_SHARE_READ,
-                       NULL,
-                       OPEN_EXISTING,
-                       FILE_FLAG_BACKUP_SEMANTICS,
-                       NULL);
-
-       if(h == INVALID_HANDLE_VALUE)
-       {
-               // FindFirstFile is the only call that can stat c:\pagefile.sys
-               WIN32_FIND_DATA st;
-               HANDLE h;
-
-               if(INVALID_HANDLE_VALUE == (h = FindFirstFile(path, &st)))
-                       dpush(F);
-               else
-               {
-                       FindClose(h);
-                       dpush(T);
-               }
-               return;
-       }
-
-       box_boolean(GetFileInformationByHandle(h, &bhfi));
-       CloseHandle(h);
+       box_boolean(windows_stat(path));
 }
 
 F_SEGMENT *alloc_segment(CELL size)
@@ -166,7 +186,7 @@ long getpagesize(void)
        return g_pagesize;
 }
 
-void sleep_micros(DWORD usec)
+void sleep_micros(u64 usec)
 {
-       Sleep(usec);
+       Sleep((DWORD)(usec / 1000));
 }
index af9b75bca5c931d1028c629ac666eb113c227b29..0704459dd0800996c2c1abff3a847d47a83737a8 100755 (executable)
@@ -11,7 +11,7 @@ typedef wchar_t F_CHAR;
 #define unbox_native_string unbox_u16_string
 #define string_to_native_alien(string) string_to_u16_alien(string,true)
 
-#define STR_FORMAT(string) L##string
+#define STRING_LITERAL(string) L##string
 
 #define MAX_UNICODE_PATH 32768
 #define DLLEXPORT __declspec(dllexport)
@@ -19,19 +19,20 @@ typedef wchar_t F_CHAR;
 #define STRCMP wcscmp
 #define STRNCMP wcsncmp
 #define STRDUP _wcsdup
-
-#define FIXNUM_FORMAT "%Id"
-#define CELL_FORMAT "%lu"
-#define CELL_HEX_FORMAT "%Ix"
+#define MIN(a,b) ((a)>(b)?(b):(a))
 
 #ifdef WIN64
+       #define CELL_FORMAT "%Iu"
+       #define CELL_HEX_FORMAT "%Ix"
        #define CELL_HEX_PAD_FORMAT "%016Ix"
+       #define FIXNUM_FORMAT "%Id"
 #else
+       #define CELL_FORMAT "%lu"
+       #define CELL_HEX_FORMAT "%lx"
        #define CELL_HEX_PAD_FORMAT "%08lx"
+       #define FIXNUM_FORMAT "%ld"
 #endif
 
-#define FIXNUM_FORMAT "%Id"
-
 #define OPEN_READ(path) _wfopen(path,L"rb")
 #define OPEN_WRITE(path) _wfopen(path,L"wb")
 
@@ -49,7 +50,7 @@ void ffi_dlopen(F_DLL *dll);
 void *ffi_dlsym(F_DLL *dll, F_SYMBOL *symbol);
 void ffi_dlclose(F_DLL *dll);
 
-void sleep_micros(DWORD msec);
+void sleep_micros(u64 msec);
 
 INLINE void init_signals(void) {}
 INLINE void early_init(void) {}
index dcf082d40d86304406c684cd4d75137c1ff1b88b..2bce9eedb7659d4e85fe829d784155d5600bc30d 100755 (executable)
@@ -141,7 +141,7 @@ void *primitives[] = {
        primitive_resize_byte_array,
        primitive_dll_validp,
        primitive_unimplemented,
-       primitive_gc_reset,
+       primitive_clear_gc_stats,
        primitive_jit_compile,
        primitive_load_locals,
 };
index e3db67964f664d1515e3b79e346d1ac23affdd1e..66cefcf891f7bcd0c244f5b85cd998f2c60e15ce 100755 (executable)
@@ -1,7 +1,7 @@
 #include "master.h"
 
 /* Allocates memory */
-F_COMPILED *compile_profiling_stub(F_WORD *word)
+F_CODE_BLOCK *compile_profiling_stub(F_WORD *word)
 {
        CELL literals = allot_array_1(tag_object(word));
        REGISTER_ROOT(literals);
@@ -26,7 +26,7 @@ F_COMPILED *compile_profiling_stub(F_WORD *word)
                untag_object(code),
                NULL, /* no labels */
                tag_object(relocation),
-               untag_object(literals));
+               literals);
 }
 
 /* Allocates memory */
@@ -37,7 +37,7 @@ void update_word_xt(F_WORD *word)
                if(!word->profiling)
                {
                        REGISTER_UNTAGGED(word);
-                       F_COMPILED *profiling = compile_profiling_stub(word);
+                       F_CODE_BLOCK *profiling = compile_profiling_stub(word);
                        UNREGISTER_UNTAGGED(word);
                        word->profiling = profiling;
                }
index 26a3a78d4b9dc0728513288b736bddffc3fb3977..4a44ec3f36f31f213c25d54c36c9d50b8ca57ecc 100755 (executable)
@@ -1,4 +1,4 @@
 bool profiling_p;
 void primitive_profiling(void);
-F_COMPILED *compile_profiling_stub(F_WORD *word);
+F_CODE_BLOCK *compile_profiling_stub(F_WORD *word);
 void update_word_xt(F_WORD *word);
index 86952a32e8eb74c7950ab720fa5b969c7fd76e52..ca1a8bb3b56eefc291a13253a6734247f291432c 100755 (executable)
@@ -155,7 +155,7 @@ bool jit_stack_frame_p(F_ARRAY *array)
        return false;
 }
 
-void set_quot_xt(F_QUOTATION *quot, F_COMPILED *code)
+void set_quot_xt(F_QUOTATION *quot, F_CODE_BLOCK *code)
 {
        if(code->type != QUOTATION_TYPE)
                critical_error("bad param to set_quot_xt",(CELL)code);
@@ -339,17 +339,17 @@ void jit_compile(CELL quot, bool relocate)
        GROWABLE_ARRAY_TRIM(literals);
        GROWABLE_BYTE_ARRAY_TRIM(relocation);
 
-       F_COMPILED *compiled = add_compiled_block(
+       F_CODE_BLOCK *compiled = add_compiled_block(
                QUOTATION_TYPE,
                untag_object(code),
                NULL,
                relocation,
-               untag_object(literals));
+               literals);
 
        set_quot_xt(untag_object(quot),compiled);
 
        if(relocate)
-               iterate_code_heap_step(compiled,relocate_code_block);
+               relocate_code_block(compiled);
 
        UNREGISTER_ROOT(literals);
        UNREGISTER_ROOT(relocation);
@@ -535,7 +535,7 @@ void compile_all_words(void)
        {
                F_WORD *word = untag_word(array_nth(untag_array(words),i));
                REGISTER_UNTAGGED(word);
-               if(word->compiledp == F)
+               if(word->optimizedp == F)
                        default_word_code(word,false);
                UNREGISTER_UNTAGGED(word);
                update_word_xt(word);
index 4c2c17bbb60f1ff3b90f303a7bde05c451bfd843..d571a90ed6c87f31e7aa912830df0f2fe87d94d8 100755 (executable)
@@ -1,4 +1,4 @@
-void set_quot_xt(F_QUOTATION *quot, F_COMPILED *code);
+void set_quot_xt(F_QUOTATION *quot, F_CODE_BLOCK *code);
 void jit_compile(CELL quot, bool relocate);
 F_FASTCALL CELL lazy_jit_compile_impl(CELL quot, F_STACK_FRAME *stack);
 F_FIXNUM quot_code_offset_to_scan(CELL quot, F_FIXNUM offset);
index c9e657f8ee3ba2693b9c8ac52c5ecbcad20dc80f..2f8cafb768045122920f797a9fe1655db8e73e99 100755 (executable)
@@ -48,7 +48,7 @@ F_WORD *allot_word(CELL vocab, CELL name)
        word->def = userenv[UNDEFINED_ENV];
        word->props = F;
        word->counter = tag_fixnum(0);
-       word->compiledp = F;
+       word->optimizedp = F;
        word->subprimitive = F;
        word->profiling = NULL;
        word->code = NULL;
@@ -62,7 +62,7 @@ F_WORD *allot_word(CELL vocab, CELL name)
        UNREGISTER_UNTAGGED(word);
 
        if(profiling_p)
-               iterate_code_heap_step(word->profiling,relocate_code_block);
+               relocate_code_block(word->profiling);
 
        return word;
 }
@@ -79,9 +79,9 @@ void primitive_word(void)
 void primitive_word_xt(void)
 {
        F_WORD *word = untag_word(dpop());
-       F_COMPILED *code = (profiling_p ? word->profiling : word->code);
-       dpush(allot_cell((CELL)code + sizeof(F_COMPILED)));
-       dpush(allot_cell((CELL)code + sizeof(F_COMPILED) + code->code_length));
+       F_CODE_BLOCK *code = (profiling_p ? word->profiling : word->code);
+       dpush(allot_cell((CELL)code + sizeof(F_CODE_BLOCK)));
+       dpush(allot_cell((CELL)code + sizeof(F_CODE_BLOCK) + code->code_length));
 }
 
 void primitive_wrapper(void)
diff --git a/vm/write_barrier.h b/vm/write_barrier.h
new file mode 100644 (file)
index 0000000..be75d18
--- /dev/null
@@ -0,0 +1,66 @@
+/* card marking write barrier. a card is a byte storing a mark flag,
+and the offset (in cells) of the first object in the card.
+
+the mark flag is set by the write barrier when an object in the
+card has a slot written to.
+
+the offset of the first object is set by the allocator. */
+
+/* if CARD_POINTS_TO_NURSERY is set, CARD_POINTS_TO_AGING must also be set. */
+#define CARD_POINTS_TO_NURSERY 0x80
+#define CARD_POINTS_TO_AGING 0x40
+#define CARD_MARK_MASK (CARD_POINTS_TO_NURSERY | CARD_POINTS_TO_AGING)
+typedef u8 F_CARD;
+
+#define CARD_BITS 8
+#define CARD_SIZE (1<<CARD_BITS)
+#define ADDR_CARD_MASK (CARD_SIZE-1)
+
+DLLEXPORT CELL cards_offset;
+
+#define ADDR_TO_CARD(a) (F_CARD*)(((CELL)(a) >> CARD_BITS) + cards_offset)
+#define CARD_TO_ADDR(c) (CELL*)(((CELL)(c) - cards_offset)<<CARD_BITS)
+
+typedef u8 F_DECK;
+
+#define DECK_BITS (CARD_BITS + 10)
+#define DECK_SIZE (1<<DECK_BITS)
+#define ADDR_DECK_MASK (DECK_SIZE-1)
+
+DLLEXPORT CELL decks_offset;
+
+#define ADDR_TO_DECK(a) (F_DECK*)(((CELL)(a) >> DECK_BITS) + decks_offset)
+#define DECK_TO_ADDR(c) (CELL*)(((CELL)(c) - decks_offset) << DECK_BITS)
+
+#define DECK_TO_CARD(d) (F_CARD*)((((CELL)(d) - decks_offset) << (DECK_BITS - CARD_BITS)) + cards_offset)
+
+#define ADDR_TO_ALLOT_MARKER(a) (F_CARD*)(((CELL)(a) >> CARD_BITS) + allot_markers_offset)
+#define CARD_OFFSET(c) (*((c) - (CELL)data_heap->cards + (CELL)data_heap->allot_markers))
+
+#define INVALID_ALLOT_MARKER 0xff
+
+DLLEXPORT CELL allot_markers_offset;
+
+/* the write barrier must be called any time we are potentially storing a
+pointer from an older generation to a younger one */
+INLINE void write_barrier(CELL address)
+{
+       *ADDR_TO_CARD(address) = CARD_MARK_MASK;
+       *ADDR_TO_DECK(address) = CARD_MARK_MASK;
+}
+
+#define SLOT(obj,slot) (UNTAG(obj) + (slot) * CELLS)
+
+INLINE void set_slot(CELL obj, CELL slot, CELL value)
+{
+       put(SLOT(obj,slot),value);
+       write_barrier(obj);
+}
+
+/* we need to remember the first object allocated in the card */
+INLINE void allot_barrier(CELL address)
+{
+       F_CARD *ptr = ADDR_TO_ALLOT_MARKER(address);
+       if(*ptr == INVALID_ALLOT_MARKER)
+               *ptr = (address & ADDR_CARD_MASK);
+}