diff --git a/README.txt b/README.txt index dd7c3e7ad3..754791aa1a 100755 --- a/README.txt +++ b/README.txt @@ -146,12 +146,13 @@ usage documentation, enter the following in the UI listener: The Factor source tree is organized as follows: build-support/ - scripts used for compiling Factor - core/ - Factor core library and compiler - extra/ - more libraries + vm/ - sources for the Factor VM, written in C + core/ - Factor core library + basis/ - Factor basis library, compiler, tools + extra/ - more libraries and applications fonts/ - TrueType fonts used by UI misc/ - editor modes, icons, etc unmaintained/ - unmaintained contributions, please help! - vm/ - sources for the Factor VM, written in C * Community diff --git a/extra/alarms/alarms-docs.factor b/basis/alarms/alarms-docs.factor similarity index 100% rename from extra/alarms/alarms-docs.factor rename to basis/alarms/alarms-docs.factor diff --git a/extra/alarms/alarms-tests.factor b/basis/alarms/alarms-tests.factor similarity index 100% rename from extra/alarms/alarms-tests.factor rename to basis/alarms/alarms-tests.factor diff --git a/extra/alarms/alarms.factor b/basis/alarms/alarms.factor similarity index 100% rename from extra/alarms/alarms.factor rename to basis/alarms/alarms.factor diff --git a/extra/alarms/authors.txt b/basis/alarms/authors.txt similarity index 100% rename from extra/alarms/authors.txt rename to basis/alarms/authors.txt diff --git a/extra/alias/alias.factor b/basis/alias/alias.factor similarity index 100% rename from extra/alias/alias.factor rename to basis/alias/alias.factor diff --git a/core/alien/arrays/arrays-docs.factor b/basis/alien/arrays/arrays-docs.factor similarity index 100% rename from core/alien/arrays/arrays-docs.factor rename to basis/alien/arrays/arrays-docs.factor diff --git a/core/alien/arrays/arrays.factor b/basis/alien/arrays/arrays.factor similarity index 100% rename from core/alien/arrays/arrays.factor rename to basis/alien/arrays/arrays.factor diff --git a/core/alien/arrays/authors.txt b/basis/alien/arrays/authors.txt similarity index 100% rename from core/alien/arrays/authors.txt rename to basis/alien/arrays/authors.txt diff --git a/core/alien/arrays/summary.txt b/basis/alien/arrays/summary.txt similarity index 100% rename from core/alien/arrays/summary.txt rename to basis/alien/arrays/summary.txt diff --git a/core/alien/c-types/authors.txt b/basis/alien/c-types/authors.txt similarity index 100% rename from core/alien/c-types/authors.txt rename to basis/alien/c-types/authors.txt diff --git a/core/alien/c-types/c-types-docs.factor b/basis/alien/c-types/c-types-docs.factor similarity index 100% rename from core/alien/c-types/c-types-docs.factor rename to basis/alien/c-types/c-types-docs.factor diff --git a/core/alien/c-types/c-types-tests.factor b/basis/alien/c-types/c-types-tests.factor similarity index 100% rename from core/alien/c-types/c-types-tests.factor rename to basis/alien/c-types/c-types-tests.factor diff --git a/core/alien/c-types/c-types.factor b/basis/alien/c-types/c-types.factor similarity index 100% rename from core/alien/c-types/c-types.factor rename to basis/alien/c-types/c-types.factor diff --git a/core/alien/c-types/summary.txt b/basis/alien/c-types/summary.txt similarity index 100% rename from core/alien/c-types/summary.txt rename to basis/alien/c-types/summary.txt diff --git a/core/alien/compiler/authors.txt b/basis/alien/compiler/authors.txt similarity index 100% rename from core/alien/compiler/authors.txt rename to basis/alien/compiler/authors.txt diff --git a/core/alien/compiler/compiler-tests.factor b/basis/alien/compiler/compiler-tests.factor similarity index 100% rename from core/alien/compiler/compiler-tests.factor rename to basis/alien/compiler/compiler-tests.factor diff --git a/core/alien/compiler/compiler.factor b/basis/alien/compiler/compiler.factor similarity index 100% rename from core/alien/compiler/compiler.factor rename to basis/alien/compiler/compiler.factor diff --git a/core/alien/compiler/summary.txt b/basis/alien/compiler/summary.txt similarity index 100% rename from core/alien/compiler/summary.txt rename to basis/alien/compiler/summary.txt diff --git a/core/alien/remote-control/authors.txt b/basis/alien/remote-control/authors.txt similarity index 100% rename from core/alien/remote-control/authors.txt rename to basis/alien/remote-control/authors.txt diff --git a/core/alien/remote-control/remote-control.factor b/basis/alien/remote-control/remote-control.factor similarity index 92% rename from core/alien/remote-control/remote-control.factor rename to basis/alien/remote-control/remote-control.factor index 344c8a2c5a..9cd9050ea8 100755 --- a/core/alien/remote-control/remote-control.factor +++ b/basis/alien/remote-control/remote-control.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors alien alien.c-types alien.strings parser -threads words kernel.private kernel io.encodings.utf8 ; +threads words kernel.private kernel io.encodings.utf8 eval ; IN: alien.remote-control : eval-callback ( -- callback ) diff --git a/core/alien/remote-control/summary.txt b/basis/alien/remote-control/summary.txt similarity index 100% rename from core/alien/remote-control/summary.txt rename to basis/alien/remote-control/summary.txt diff --git a/core/alien/strings/strings-docs.factor b/basis/alien/strings/strings-docs.factor similarity index 100% rename from core/alien/strings/strings-docs.factor rename to basis/alien/strings/strings-docs.factor diff --git a/core/alien/strings/strings-tests.factor b/basis/alien/strings/strings-tests.factor similarity index 100% rename from core/alien/strings/strings-tests.factor rename to basis/alien/strings/strings-tests.factor diff --git a/core/alien/strings/strings.factor b/basis/alien/strings/strings.factor similarity index 100% rename from core/alien/strings/strings.factor rename to basis/alien/strings/strings.factor diff --git a/core/alien/structs/authors.txt b/basis/alien/structs/authors.txt similarity index 100% rename from core/alien/structs/authors.txt rename to basis/alien/structs/authors.txt diff --git a/core/alien/structs/structs-docs.factor b/basis/alien/structs/structs-docs.factor similarity index 100% rename from core/alien/structs/structs-docs.factor rename to basis/alien/structs/structs-docs.factor diff --git a/core/alien/structs/structs-tests.factor b/basis/alien/structs/structs-tests.factor similarity index 100% rename from core/alien/structs/structs-tests.factor rename to basis/alien/structs/structs-tests.factor diff --git a/core/alien/structs/structs.factor b/basis/alien/structs/structs.factor similarity index 100% rename from core/alien/structs/structs.factor rename to basis/alien/structs/structs.factor diff --git a/core/alien/structs/summary.txt b/basis/alien/structs/summary.txt similarity index 100% rename from core/alien/structs/summary.txt rename to basis/alien/structs/summary.txt diff --git a/core/alien/syntax/authors.txt b/basis/alien/syntax/authors.txt similarity index 100% rename from core/alien/syntax/authors.txt rename to basis/alien/syntax/authors.txt diff --git a/core/alien/syntax/summary.txt b/basis/alien/syntax/summary.txt similarity index 100% rename from core/alien/syntax/summary.txt rename to basis/alien/syntax/summary.txt diff --git a/core/alien/syntax/syntax-docs.factor b/basis/alien/syntax/syntax-docs.factor similarity index 100% rename from core/alien/syntax/syntax-docs.factor rename to basis/alien/syntax/syntax-docs.factor diff --git a/core/alien/syntax/syntax.factor b/basis/alien/syntax/syntax.factor similarity index 100% rename from core/alien/syntax/syntax.factor rename to basis/alien/syntax/syntax.factor diff --git a/extra/ascii/ascii-docs.factor b/basis/ascii/ascii-docs.factor similarity index 100% rename from extra/ascii/ascii-docs.factor rename to basis/ascii/ascii-docs.factor diff --git a/extra/ascii/ascii-tests.factor b/basis/ascii/ascii-tests.factor similarity index 100% rename from extra/ascii/ascii-tests.factor rename to basis/ascii/ascii-tests.factor diff --git a/extra/ascii/ascii.factor b/basis/ascii/ascii.factor similarity index 100% rename from extra/ascii/ascii.factor rename to basis/ascii/ascii.factor diff --git a/core/bootstrap/compiler/authors.txt b/basis/ascii/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from core/bootstrap/compiler/authors.txt rename to basis/ascii/authors.txt diff --git a/extra/ascii/summary.txt b/basis/ascii/summary.txt similarity index 100% rename from extra/ascii/summary.txt rename to basis/ascii/summary.txt diff --git a/core/io/encodings/utf16/tags.txt b/basis/ascii/tags.txt old mode 100644 new mode 100755 similarity index 100% rename from core/io/encodings/utf16/tags.txt rename to basis/ascii/tags.txt diff --git a/extra/base64/authors.txt b/basis/base64/authors.txt similarity index 100% rename from extra/base64/authors.txt rename to basis/base64/authors.txt diff --git a/extra/base64/base64-docs.factor b/basis/base64/base64-docs.factor similarity index 100% rename from extra/base64/base64-docs.factor rename to basis/base64/base64-docs.factor diff --git a/extra/base64/base64-tests.factor b/basis/base64/base64-tests.factor similarity index 100% rename from extra/base64/base64-tests.factor rename to basis/base64/base64-tests.factor diff --git a/extra/base64/base64.factor b/basis/base64/base64.factor similarity index 100% rename from extra/base64/base64.factor rename to basis/base64/base64.factor diff --git a/extra/base64/summary.txt b/basis/base64/summary.txt similarity index 100% rename from extra/base64/summary.txt rename to basis/base64/summary.txt diff --git a/core/bootstrap/image/authors.txt b/basis/biassocs/authors.txt similarity index 100% rename from core/bootstrap/image/authors.txt rename to basis/biassocs/authors.txt diff --git a/extra/biassocs/biassocs-docs.factor b/basis/biassocs/biassocs-docs.factor similarity index 100% rename from extra/biassocs/biassocs-docs.factor rename to basis/biassocs/biassocs-docs.factor diff --git a/extra/biassocs/biassocs-tests.factor b/basis/biassocs/biassocs-tests.factor similarity index 100% rename from extra/biassocs/biassocs-tests.factor rename to basis/biassocs/biassocs-tests.factor diff --git a/extra/biassocs/biassocs.factor b/basis/biassocs/biassocs.factor similarity index 100% rename from extra/biassocs/biassocs.factor rename to basis/biassocs/biassocs.factor diff --git a/extra/biassocs/summary.txt b/basis/biassocs/summary.txt similarity index 100% rename from extra/biassocs/summary.txt rename to basis/biassocs/summary.txt diff --git a/core/dequeues/tags.txt b/basis/biassocs/tags.txt similarity index 100% rename from core/dequeues/tags.txt rename to basis/biassocs/tags.txt diff --git a/core/binary-search/binary-search-docs.factor b/basis/binary-search/binary-search-docs.factor similarity index 100% rename from core/binary-search/binary-search-docs.factor rename to basis/binary-search/binary-search-docs.factor diff --git a/core/binary-search/binary-search-tests.factor b/basis/binary-search/binary-search-tests.factor similarity index 100% rename from core/binary-search/binary-search-tests.factor rename to basis/binary-search/binary-search-tests.factor diff --git a/core/binary-search/binary-search.factor b/basis/binary-search/binary-search.factor similarity index 100% rename from core/binary-search/binary-search.factor rename to basis/binary-search/binary-search.factor diff --git a/core/command-line/authors.txt b/basis/bit-arrays/authors.txt similarity index 100% rename from core/command-line/authors.txt rename to basis/bit-arrays/authors.txt diff --git a/extra/bit-arrays/bit-arrays-docs.factor b/basis/bit-arrays/bit-arrays-docs.factor similarity index 100% rename from extra/bit-arrays/bit-arrays-docs.factor rename to basis/bit-arrays/bit-arrays-docs.factor diff --git a/extra/bit-arrays/bit-arrays-tests.factor b/basis/bit-arrays/bit-arrays-tests.factor similarity index 100% rename from extra/bit-arrays/bit-arrays-tests.factor rename to basis/bit-arrays/bit-arrays-tests.factor diff --git a/extra/bit-arrays/bit-arrays.factor b/basis/bit-arrays/bit-arrays.factor similarity index 100% rename from extra/bit-arrays/bit-arrays.factor rename to basis/bit-arrays/bit-arrays.factor diff --git a/extra/bit-arrays/summary.txt b/basis/bit-arrays/summary.txt similarity index 100% rename from extra/bit-arrays/summary.txt rename to basis/bit-arrays/summary.txt diff --git a/core/dlists/tags.txt b/basis/bit-arrays/tags.txt similarity index 100% rename from core/dlists/tags.txt rename to basis/bit-arrays/tags.txt diff --git a/extra/bit-vectors/bit-vectors-docs.factor b/basis/bit-vectors/bit-vectors-docs.factor similarity index 100% rename from extra/bit-vectors/bit-vectors-docs.factor rename to basis/bit-vectors/bit-vectors-docs.factor diff --git a/extra/bit-vectors/bit-vectors-tests.factor b/basis/bit-vectors/bit-vectors-tests.factor similarity index 100% rename from extra/bit-vectors/bit-vectors-tests.factor rename to basis/bit-vectors/bit-vectors-tests.factor diff --git a/extra/bit-vectors/bit-vectors.factor b/basis/bit-vectors/bit-vectors.factor similarity index 100% rename from extra/bit-vectors/bit-vectors.factor rename to basis/bit-vectors/bit-vectors.factor diff --git a/extra/bit-vectors/summary.txt b/basis/bit-vectors/summary.txt similarity index 100% rename from extra/bit-vectors/summary.txt rename to basis/bit-vectors/summary.txt diff --git a/core/heaps/tags.txt b/basis/bit-vectors/tags.txt similarity index 100% rename from core/heaps/tags.txt rename to basis/bit-vectors/tags.txt diff --git a/core/compiler/authors.txt b/basis/bootstrap/compiler/authors.txt similarity index 100% rename from core/compiler/authors.txt rename to basis/bootstrap/compiler/authors.txt diff --git a/core/bootstrap/compiler/compiler.factor b/basis/bootstrap/compiler/compiler.factor similarity index 100% rename from core/bootstrap/compiler/compiler.factor rename to basis/bootstrap/compiler/compiler.factor diff --git a/core/bootstrap/compiler/summary.txt b/basis/bootstrap/compiler/summary.txt similarity index 100% rename from core/bootstrap/compiler/summary.txt rename to basis/bootstrap/compiler/summary.txt diff --git a/extra/bootstrap/handbook/handbook.factor b/basis/bootstrap/handbook/handbook.factor similarity index 100% rename from extra/bootstrap/handbook/handbook.factor rename to basis/bootstrap/handbook/handbook.factor diff --git a/core/compiler/constants/authors.txt b/basis/bootstrap/help/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from core/compiler/constants/authors.txt rename to basis/bootstrap/help/authors.txt diff --git a/extra/bootstrap/help/help.factor b/basis/bootstrap/help/help.factor similarity index 100% rename from extra/bootstrap/help/help.factor rename to basis/bootstrap/help/help.factor diff --git a/extra/bootstrap/help/summary.txt b/basis/bootstrap/help/summary.txt similarity index 100% rename from extra/bootstrap/help/summary.txt rename to basis/bootstrap/help/summary.txt diff --git a/core/cpu/architecture/authors.txt b/basis/bootstrap/image/authors.txt similarity index 100% rename from core/cpu/architecture/authors.txt rename to basis/bootstrap/image/authors.txt diff --git a/core/cpu/arm/4/authors.txt b/basis/bootstrap/image/download/authors.txt similarity index 100% rename from core/cpu/arm/4/authors.txt rename to basis/bootstrap/image/download/authors.txt diff --git a/extra/bootstrap/image/download/download.factor b/basis/bootstrap/image/download/download.factor similarity index 100% rename from extra/bootstrap/image/download/download.factor rename to basis/bootstrap/image/download/download.factor diff --git a/extra/bootstrap/image/download/summary.txt b/basis/bootstrap/image/download/summary.txt similarity index 100% rename from extra/bootstrap/image/download/summary.txt rename to basis/bootstrap/image/download/summary.txt diff --git a/core/bootstrap/image/image-docs.factor b/basis/bootstrap/image/image-docs.factor similarity index 100% rename from core/bootstrap/image/image-docs.factor rename to basis/bootstrap/image/image-docs.factor diff --git a/core/bootstrap/image/image-tests.factor b/basis/bootstrap/image/image-tests.factor similarity index 100% rename from core/bootstrap/image/image-tests.factor rename to basis/bootstrap/image/image-tests.factor diff --git a/core/bootstrap/image/image.factor b/basis/bootstrap/image/image.factor similarity index 100% rename from core/bootstrap/image/image.factor rename to basis/bootstrap/image/image.factor diff --git a/core/bootstrap/image/summary.txt b/basis/bootstrap/image/summary.txt similarity index 100% rename from core/bootstrap/image/summary.txt rename to basis/bootstrap/image/summary.txt diff --git a/core/bootstrap/image/tags.txt b/basis/bootstrap/image/tags.txt similarity index 100% rename from core/bootstrap/image/tags.txt rename to basis/bootstrap/image/tags.txt diff --git a/core/cpu/arm/allot/authors.txt b/basis/bootstrap/image/upload/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from core/cpu/arm/allot/authors.txt rename to basis/bootstrap/image/upload/authors.txt diff --git a/extra/bootstrap/image/upload/summary.txt b/basis/bootstrap/image/upload/summary.txt similarity index 100% rename from extra/bootstrap/image/upload/summary.txt rename to basis/bootstrap/image/upload/summary.txt diff --git a/extra/bootstrap/image/upload/upload.factor b/basis/bootstrap/image/upload/upload.factor similarity index 100% rename from extra/bootstrap/image/upload/upload.factor rename to basis/bootstrap/image/upload/upload.factor diff --git a/core/cpu/arm/architecture/authors.txt b/basis/bootstrap/io/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from core/cpu/arm/architecture/authors.txt rename to basis/bootstrap/io/authors.txt diff --git a/extra/bootstrap/io/io.factor b/basis/bootstrap/io/io.factor similarity index 100% rename from extra/bootstrap/io/io.factor rename to basis/bootstrap/io/io.factor diff --git a/extra/bootstrap/io/summary.txt b/basis/bootstrap/io/summary.txt similarity index 100% rename from extra/bootstrap/io/summary.txt rename to basis/bootstrap/io/summary.txt diff --git a/extra/bootstrap/math/math.factor b/basis/bootstrap/math/math.factor similarity index 100% rename from extra/bootstrap/math/math.factor rename to basis/bootstrap/math/math.factor diff --git a/extra/bootstrap/math/summary.txt b/basis/bootstrap/math/summary.txt similarity index 100% rename from extra/bootstrap/math/summary.txt rename to basis/bootstrap/math/summary.txt diff --git a/extra/bootstrap/random/random.factor b/basis/bootstrap/random/random.factor similarity index 100% rename from extra/bootstrap/random/random.factor rename to basis/bootstrap/random/random.factor diff --git a/core/bootstrap/stage2.factor b/basis/bootstrap/stage2.factor similarity index 52% rename from core/bootstrap/stage2.factor rename to basis/bootstrap/stage2.factor index c6afdfe749..08da2ae14b 100755 --- a/core/bootstrap/stage2.factor +++ b/basis/bootstrap/stage2.factor @@ -44,57 +44,64 @@ SYMBOL: bootstrap-time "Now, you can run Factor:" print vm write " -i=" write "output-image" get print flush ; -! We time bootstrap -millis >r - -default-image-name "output-image" set-global - -"math compiler help io random tools ui ui.tools unicode handbook" "include" set-global -"" "exclude" set-global - -parse-command-line - -"-no-crossref" cli-args member? [ do-crossref ] unless - -"io.thread" require - -! Set dll paths -os wince? [ "windows.ce" require ] when -os winnt? [ "windows.nt" require ] when - -"deploy-vocab" get [ - "stage2: deployment mode" print -] [ - "listener" require - "none" require -] if - [ - load-components + ! We time bootstrap + millis >r - run-bootstrap-init -] with-compiler-errors -:errors + default-image-name "output-image" set-global -f error set-global -f error-continuation set-global + "threads math compiler help io random tools ui ui.tools unicode handbook" "include" set-global + "" "exclude" set-global + + parse-command-line + + "-no-crossref" cli-args member? [ do-crossref ] unless + + ! Set dll paths + os wince? [ "windows.ce" require ] when + os winnt? [ "windows.nt" require ] when + + "deploy-vocab" get [ + "stage2: deployment mode" print + ] [ + "listener" require + "none" require + ] if -"deploy-vocab" get [ - "tools.deploy.shaker" run -] [ [ - boot - do-init-hooks + load-components + + run-bootstrap-init + ] with-compiler-errors + :errors + + f error set-global + f error-continuation set-global + + "deploy-vocab" get [ + "tools.deploy.shaker" run + ] [ [ - parse-command-line - run-user-init - "run" get run - output-stream get [ stream-flush ] when* - ] [ print-error 1 exit ] recover - ] set-boot-quot + boot + do-init-hooks + [ + parse-command-line + run-user-init + "run" get run + output-stream get [ stream-flush ] when* + ] [ print-error 1 exit ] recover + ] set-boot-quot - millis r> - dup bootstrap-time set-global - print-report + millis r> - dup bootstrap-time set-global + print-report - "output-image" get save-image-and-exit -] if + "output-image" get save-image-and-exit + ] if +] [ + :c + dup print-error flush + "listener" vocab + [ restarts. vocab-main execute ] + [ die ] if* + 1 exit +] recover diff --git a/basis/bootstrap/threads/threads.factor b/basis/bootstrap/threads/threads.factor new file mode 100644 index 0000000000..6c30489bb4 --- /dev/null +++ b/basis/bootstrap/threads/threads.factor @@ -0,0 +1,7 @@ +! Copyright (C) 2008 Slava Pestov. +! See http://factorcode.org/license.txt for BSD license. +IN: bootstrap.threads + +USE: io.thread +USE: threads +USE: debugger.threads diff --git a/core/cpu/arm/assembler/authors.txt b/basis/bootstrap/tools/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from core/cpu/arm/assembler/authors.txt rename to basis/bootstrap/tools/authors.txt diff --git a/extra/bootstrap/tools/summary.txt b/basis/bootstrap/tools/summary.txt similarity index 100% rename from extra/bootstrap/tools/summary.txt rename to basis/bootstrap/tools/summary.txt diff --git a/extra/bootstrap/tools/tools.factor b/basis/bootstrap/tools/tools.factor similarity index 100% rename from extra/bootstrap/tools/tools.factor rename to basis/bootstrap/tools/tools.factor diff --git a/extra/bootstrap/unicode/unicode.factor b/basis/bootstrap/unicode/unicode.factor similarity index 100% rename from extra/bootstrap/unicode/unicode.factor rename to basis/bootstrap/unicode/unicode.factor diff --git a/core/boxes/boxes-docs.factor b/basis/boxes/boxes-docs.factor similarity index 100% rename from core/boxes/boxes-docs.factor rename to basis/boxes/boxes-docs.factor diff --git a/core/boxes/boxes-tests.factor b/basis/boxes/boxes-tests.factor similarity index 100% rename from core/boxes/boxes-tests.factor rename to basis/boxes/boxes-tests.factor diff --git a/core/boxes/boxes.factor b/basis/boxes/boxes.factor similarity index 100% rename from core/boxes/boxes.factor rename to basis/boxes/boxes.factor diff --git a/extra/calendar/authors.txt b/basis/calendar/authors.txt similarity index 100% rename from extra/calendar/authors.txt rename to basis/calendar/authors.txt diff --git a/extra/calendar/backend/authors.txt b/basis/calendar/backend/authors.txt similarity index 100% rename from extra/calendar/backend/authors.txt rename to basis/calendar/backend/authors.txt diff --git a/extra/calendar/backend/backend.factor b/basis/calendar/backend/backend.factor similarity index 100% rename from extra/calendar/backend/backend.factor rename to basis/calendar/backend/backend.factor diff --git a/extra/calendar/calendar-tests.factor b/basis/calendar/calendar-tests.factor similarity index 100% rename from extra/calendar/calendar-tests.factor rename to basis/calendar/calendar-tests.factor diff --git a/extra/calendar/calendar.factor b/basis/calendar/calendar.factor similarity index 100% rename from extra/calendar/calendar.factor rename to basis/calendar/calendar.factor diff --git a/extra/calendar/format/format-tests.factor b/basis/calendar/format/format-tests.factor similarity index 100% rename from extra/calendar/format/format-tests.factor rename to basis/calendar/format/format-tests.factor diff --git a/extra/calendar/format/format.factor b/basis/calendar/format/format.factor similarity index 100% rename from extra/calendar/format/format.factor rename to basis/calendar/format/format.factor diff --git a/extra/calendar/format/macros/macros-tests.factor b/basis/calendar/format/macros/macros-tests.factor similarity index 100% rename from extra/calendar/format/macros/macros-tests.factor rename to basis/calendar/format/macros/macros-tests.factor diff --git a/extra/calendar/format/macros/macros.factor b/basis/calendar/format/macros/macros.factor similarity index 100% rename from extra/calendar/format/macros/macros.factor rename to basis/calendar/format/macros/macros.factor diff --git a/extra/calendar/format/summary.txt b/basis/calendar/format/summary.txt similarity index 100% rename from extra/calendar/format/summary.txt rename to basis/calendar/format/summary.txt diff --git a/extra/calendar/model/model.factor b/basis/calendar/model/model.factor similarity index 100% rename from extra/calendar/model/model.factor rename to basis/calendar/model/model.factor diff --git a/extra/calendar/model/summary.txt b/basis/calendar/model/summary.txt similarity index 100% rename from extra/calendar/model/summary.txt rename to basis/calendar/model/summary.txt diff --git a/extra/calendar/summary.txt b/basis/calendar/summary.txt similarity index 100% rename from extra/calendar/summary.txt rename to basis/calendar/summary.txt diff --git a/extra/calendar/unix/authors.txt b/basis/calendar/unix/authors.txt similarity index 100% rename from extra/calendar/unix/authors.txt rename to basis/calendar/unix/authors.txt diff --git a/basis/calendar/unix/tags.txt b/basis/calendar/unix/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/calendar/unix/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/calendar/unix/unix.factor b/basis/calendar/unix/unix.factor similarity index 100% rename from extra/calendar/unix/unix.factor rename to basis/calendar/unix/unix.factor diff --git a/extra/calendar/windows/authors.txt b/basis/calendar/windows/authors.txt similarity index 100% rename from extra/calendar/windows/authors.txt rename to basis/calendar/windows/authors.txt diff --git a/basis/calendar/windows/tags.txt b/basis/calendar/windows/tags.txt new file mode 100644 index 0000000000..02ec70f741 --- /dev/null +++ b/basis/calendar/windows/tags.txt @@ -0,0 +1,2 @@ +unportable +windows diff --git a/extra/calendar/windows/windows.factor b/basis/calendar/windows/windows.factor similarity index 100% rename from extra/calendar/windows/windows.factor rename to basis/calendar/windows/windows.factor diff --git a/extra/channels/authors.txt b/basis/channels/authors.txt similarity index 100% rename from extra/channels/authors.txt rename to basis/channels/authors.txt diff --git a/extra/channels/channels-docs.factor b/basis/channels/channels-docs.factor similarity index 100% rename from extra/channels/channels-docs.factor rename to basis/channels/channels-docs.factor diff --git a/extra/channels/channels-tests.factor b/basis/channels/channels-tests.factor similarity index 100% rename from extra/channels/channels-tests.factor rename to basis/channels/channels-tests.factor diff --git a/extra/channels/channels.factor b/basis/channels/channels.factor similarity index 100% rename from extra/channels/channels.factor rename to basis/channels/channels.factor diff --git a/extra/channels/examples/authors.txt b/basis/channels/examples/authors.txt similarity index 100% rename from extra/channels/examples/authors.txt rename to basis/channels/examples/authors.txt diff --git a/extra/channels/examples/examples.factor b/basis/channels/examples/examples.factor similarity index 100% rename from extra/channels/examples/examples.factor rename to basis/channels/examples/examples.factor diff --git a/extra/channels/examples/summary.txt b/basis/channels/examples/summary.txt similarity index 100% rename from extra/channels/examples/summary.txt rename to basis/channels/examples/summary.txt diff --git a/extra/channels/examples/tags.txt b/basis/channels/examples/tags.txt similarity index 100% rename from extra/channels/examples/tags.txt rename to basis/channels/examples/tags.txt diff --git a/extra/channels/remote/authors.txt b/basis/channels/remote/authors.txt similarity index 100% rename from extra/channels/remote/authors.txt rename to basis/channels/remote/authors.txt diff --git a/extra/channels/remote/remote-docs.factor b/basis/channels/remote/remote-docs.factor similarity index 100% rename from extra/channels/remote/remote-docs.factor rename to basis/channels/remote/remote-docs.factor diff --git a/extra/channels/remote/remote-tests.factor b/basis/channels/remote/remote-tests.factor similarity index 100% rename from extra/channels/remote/remote-tests.factor rename to basis/channels/remote/remote-tests.factor diff --git a/extra/channels/remote/remote.factor b/basis/channels/remote/remote.factor similarity index 100% rename from extra/channels/remote/remote.factor rename to basis/channels/remote/remote.factor diff --git a/extra/channels/remote/summary.txt b/basis/channels/remote/summary.txt similarity index 100% rename from extra/channels/remote/summary.txt rename to basis/channels/remote/summary.txt diff --git a/extra/channels/remote/tags.txt b/basis/channels/remote/tags.txt similarity index 100% rename from extra/channels/remote/tags.txt rename to basis/channels/remote/tags.txt diff --git a/extra/channels/summary.txt b/basis/channels/summary.txt similarity index 100% rename from extra/channels/summary.txt rename to basis/channels/summary.txt diff --git a/extra/channels/tags.txt b/basis/channels/tags.txt similarity index 100% rename from extra/channels/tags.txt rename to basis/channels/tags.txt diff --git a/extra/checksums/adler-32/adler-32-docs.factor b/basis/checksums/adler-32/adler-32-docs.factor similarity index 100% rename from extra/checksums/adler-32/adler-32-docs.factor rename to basis/checksums/adler-32/adler-32-docs.factor diff --git a/extra/checksums/adler-32/adler-32-tests.factor b/basis/checksums/adler-32/adler-32-tests.factor similarity index 100% rename from extra/checksums/adler-32/adler-32-tests.factor rename to basis/checksums/adler-32/adler-32-tests.factor diff --git a/extra/checksums/adler-32/adler-32.factor b/basis/checksums/adler-32/adler-32.factor similarity index 100% rename from extra/checksums/adler-32/adler-32.factor rename to basis/checksums/adler-32/adler-32.factor diff --git a/extra/checksums/adler-32/authors.txt b/basis/checksums/adler-32/authors.txt similarity index 100% rename from extra/checksums/adler-32/authors.txt rename to basis/checksums/adler-32/authors.txt diff --git a/extra/checksums/md5/authors.txt b/basis/checksums/md5/authors.txt similarity index 100% rename from extra/checksums/md5/authors.txt rename to basis/checksums/md5/authors.txt diff --git a/extra/checksums/md5/md5-docs.factor b/basis/checksums/md5/md5-docs.factor similarity index 100% rename from extra/checksums/md5/md5-docs.factor rename to basis/checksums/md5/md5-docs.factor diff --git a/extra/checksums/md5/md5-tests.factor b/basis/checksums/md5/md5-tests.factor similarity index 100% rename from extra/checksums/md5/md5-tests.factor rename to basis/checksums/md5/md5-tests.factor diff --git a/extra/checksums/md5/md5.factor b/basis/checksums/md5/md5.factor similarity index 100% rename from extra/checksums/md5/md5.factor rename to basis/checksums/md5/md5.factor diff --git a/extra/checksums/null/null.factor b/basis/checksums/null/null.factor similarity index 100% rename from extra/checksums/null/null.factor rename to basis/checksums/null/null.factor diff --git a/extra/checksums/openssl/openssl-docs.factor b/basis/checksums/openssl/openssl-docs.factor similarity index 100% rename from extra/checksums/openssl/openssl-docs.factor rename to basis/checksums/openssl/openssl-docs.factor diff --git a/extra/checksums/openssl/openssl-tests.factor b/basis/checksums/openssl/openssl-tests.factor similarity index 100% rename from extra/checksums/openssl/openssl-tests.factor rename to basis/checksums/openssl/openssl-tests.factor diff --git a/extra/checksums/openssl/openssl.factor b/basis/checksums/openssl/openssl.factor similarity index 100% rename from extra/checksums/openssl/openssl.factor rename to basis/checksums/openssl/openssl.factor diff --git a/extra/checksums/sha1/authors.txt b/basis/checksums/sha1/authors.txt similarity index 100% rename from extra/checksums/sha1/authors.txt rename to basis/checksums/sha1/authors.txt diff --git a/extra/checksums/sha1/sha1-docs.factor b/basis/checksums/sha1/sha1-docs.factor similarity index 100% rename from extra/checksums/sha1/sha1-docs.factor rename to basis/checksums/sha1/sha1-docs.factor diff --git a/extra/checksums/sha1/sha1-tests.factor b/basis/checksums/sha1/sha1-tests.factor similarity index 100% rename from extra/checksums/sha1/sha1-tests.factor rename to basis/checksums/sha1/sha1-tests.factor diff --git a/extra/checksums/sha1/sha1.factor b/basis/checksums/sha1/sha1.factor similarity index 100% rename from extra/checksums/sha1/sha1.factor rename to basis/checksums/sha1/sha1.factor diff --git a/extra/checksums/sha2/authors.txt b/basis/checksums/sha2/authors.txt similarity index 100% rename from extra/checksums/sha2/authors.txt rename to basis/checksums/sha2/authors.txt diff --git a/extra/checksums/sha2/sha2-docs.factor b/basis/checksums/sha2/sha2-docs.factor similarity index 100% rename from extra/checksums/sha2/sha2-docs.factor rename to basis/checksums/sha2/sha2-docs.factor diff --git a/extra/checksums/sha2/sha2-tests.factor b/basis/checksums/sha2/sha2-tests.factor similarity index 100% rename from extra/checksums/sha2/sha2-tests.factor rename to basis/checksums/sha2/sha2-tests.factor diff --git a/extra/checksums/sha2/sha2.factor b/basis/checksums/sha2/sha2.factor similarity index 100% rename from extra/checksums/sha2/sha2.factor rename to basis/checksums/sha2/sha2.factor diff --git a/extra/circular/authors.txt b/basis/circular/authors.txt similarity index 100% rename from extra/circular/authors.txt rename to basis/circular/authors.txt diff --git a/extra/circular/circular-tests.factor b/basis/circular/circular-tests.factor similarity index 100% rename from extra/circular/circular-tests.factor rename to basis/circular/circular-tests.factor diff --git a/extra/circular/circular.factor b/basis/circular/circular.factor similarity index 100% rename from extra/circular/circular.factor rename to basis/circular/circular.factor diff --git a/extra/circular/summary.txt b/basis/circular/summary.txt similarity index 100% rename from extra/circular/summary.txt rename to basis/circular/summary.txt diff --git a/core/search-dequeues/tags.txt b/basis/circular/tags.txt similarity index 100% rename from core/search-dequeues/tags.txt rename to basis/circular/tags.txt diff --git a/extra/cocoa/application/application-docs.factor b/basis/cocoa/application/application-docs.factor similarity index 100% rename from extra/cocoa/application/application-docs.factor rename to basis/cocoa/application/application-docs.factor diff --git a/extra/cocoa/application/application.factor b/basis/cocoa/application/application.factor similarity index 100% rename from extra/cocoa/application/application.factor rename to basis/cocoa/application/application.factor diff --git a/core/cpu/arm/authors.txt b/basis/cocoa/application/authors.txt similarity index 100% rename from core/cpu/arm/authors.txt rename to basis/cocoa/application/authors.txt diff --git a/extra/cocoa/application/summary.txt b/basis/cocoa/application/summary.txt similarity index 100% rename from extra/cocoa/application/summary.txt rename to basis/cocoa/application/summary.txt diff --git a/basis/cocoa/application/tags.txt b/basis/cocoa/application/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cocoa/application/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/cpu/arm/intrinsics/authors.txt b/basis/cocoa/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from core/cpu/arm/intrinsics/authors.txt rename to basis/cocoa/authors.txt diff --git a/extra/cocoa/callbacks/authors.txt b/basis/cocoa/callbacks/authors.txt similarity index 100% rename from extra/cocoa/callbacks/authors.txt rename to basis/cocoa/callbacks/authors.txt diff --git a/extra/cocoa/callbacks/callbacks.factor b/basis/cocoa/callbacks/callbacks.factor similarity index 100% rename from extra/cocoa/callbacks/callbacks.factor rename to basis/cocoa/callbacks/callbacks.factor diff --git a/extra/cocoa/callbacks/summary.txt b/basis/cocoa/callbacks/summary.txt similarity index 100% rename from extra/cocoa/callbacks/summary.txt rename to basis/cocoa/callbacks/summary.txt diff --git a/basis/cocoa/callbacks/tags.txt b/basis/cocoa/callbacks/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cocoa/callbacks/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/cocoa/cocoa-docs.factor b/basis/cocoa/cocoa-docs.factor similarity index 100% rename from extra/cocoa/cocoa-docs.factor rename to basis/cocoa/cocoa-docs.factor diff --git a/extra/cocoa/cocoa-tests.factor b/basis/cocoa/cocoa-tests.factor similarity index 100% rename from extra/cocoa/cocoa-tests.factor rename to basis/cocoa/cocoa-tests.factor diff --git a/extra/cocoa/cocoa.factor b/basis/cocoa/cocoa.factor similarity index 97% rename from extra/cocoa/cocoa.factor rename to basis/cocoa/cocoa.factor index 907d75fd84..744d577c0d 100755 --- a/extra/cocoa/cocoa.factor +++ b/basis/cocoa/cocoa.factor @@ -61,6 +61,7 @@ SYMBOL: super-sent-messages "NSOpenGLView" "NSOpenPanel" "NSPasteboard" + "NSPropertyListSerialization" "NSResponder" "NSSavePanel" "NSScreen" diff --git a/core/cpu/ppc/allot/authors.txt b/basis/cocoa/dialogs/authors.txt similarity index 100% rename from core/cpu/ppc/allot/authors.txt rename to basis/cocoa/dialogs/authors.txt diff --git a/extra/cocoa/dialogs/dialogs-docs.factor b/basis/cocoa/dialogs/dialogs-docs.factor similarity index 100% rename from extra/cocoa/dialogs/dialogs-docs.factor rename to basis/cocoa/dialogs/dialogs-docs.factor diff --git a/extra/cocoa/dialogs/dialogs.factor b/basis/cocoa/dialogs/dialogs.factor similarity index 100% rename from extra/cocoa/dialogs/dialogs.factor rename to basis/cocoa/dialogs/dialogs.factor diff --git a/extra/cocoa/dialogs/summary.txt b/basis/cocoa/dialogs/summary.txt similarity index 100% rename from extra/cocoa/dialogs/summary.txt rename to basis/cocoa/dialogs/summary.txt diff --git a/basis/cocoa/dialogs/tags.txt b/basis/cocoa/dialogs/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cocoa/dialogs/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/cocoa/enumeration/enumeration.factor b/basis/cocoa/enumeration/enumeration.factor similarity index 100% rename from extra/cocoa/enumeration/enumeration.factor rename to basis/cocoa/enumeration/enumeration.factor diff --git a/basis/cocoa/enumeration/tags.txt b/basis/cocoa/enumeration/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cocoa/enumeration/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/cpu/ppc/architecture/authors.txt b/basis/cocoa/messages/authors.txt similarity index 100% rename from core/cpu/ppc/architecture/authors.txt rename to basis/cocoa/messages/authors.txt diff --git a/extra/cocoa/messages/messages-docs.factor b/basis/cocoa/messages/messages-docs.factor similarity index 100% rename from extra/cocoa/messages/messages-docs.factor rename to basis/cocoa/messages/messages-docs.factor diff --git a/extra/cocoa/messages/messages.factor b/basis/cocoa/messages/messages.factor similarity index 100% rename from extra/cocoa/messages/messages.factor rename to basis/cocoa/messages/messages.factor diff --git a/extra/cocoa/messages/summary.txt b/basis/cocoa/messages/summary.txt similarity index 100% rename from extra/cocoa/messages/summary.txt rename to basis/cocoa/messages/summary.txt diff --git a/basis/cocoa/messages/tags.txt b/basis/cocoa/messages/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cocoa/messages/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/cocoa/nibs/authors.txt b/basis/cocoa/nibs/authors.txt similarity index 100% rename from extra/cocoa/nibs/authors.txt rename to basis/cocoa/nibs/authors.txt diff --git a/extra/cocoa/nibs/nibs-docs.factor b/basis/cocoa/nibs/nibs-docs.factor similarity index 100% rename from extra/cocoa/nibs/nibs-docs.factor rename to basis/cocoa/nibs/nibs-docs.factor diff --git a/extra/cocoa/nibs/nibs.factor b/basis/cocoa/nibs/nibs.factor similarity index 100% rename from extra/cocoa/nibs/nibs.factor rename to basis/cocoa/nibs/nibs.factor diff --git a/extra/cocoa/nibs/summary.txt b/basis/cocoa/nibs/summary.txt similarity index 100% rename from extra/cocoa/nibs/summary.txt rename to basis/cocoa/nibs/summary.txt diff --git a/basis/cocoa/nibs/tags.txt b/basis/cocoa/nibs/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cocoa/nibs/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/cpu/ppc/assembler/authors.txt b/basis/cocoa/pasteboard/authors.txt similarity index 100% rename from core/cpu/ppc/assembler/authors.txt rename to basis/cocoa/pasteboard/authors.txt diff --git a/extra/cocoa/pasteboard/pasteboard-docs.factor b/basis/cocoa/pasteboard/pasteboard-docs.factor similarity index 100% rename from extra/cocoa/pasteboard/pasteboard-docs.factor rename to basis/cocoa/pasteboard/pasteboard-docs.factor diff --git a/extra/cocoa/pasteboard/pasteboard.factor b/basis/cocoa/pasteboard/pasteboard.factor similarity index 100% rename from extra/cocoa/pasteboard/pasteboard.factor rename to basis/cocoa/pasteboard/pasteboard.factor diff --git a/extra/cocoa/pasteboard/summary.txt b/basis/cocoa/pasteboard/summary.txt similarity index 100% rename from extra/cocoa/pasteboard/summary.txt rename to basis/cocoa/pasteboard/summary.txt diff --git a/basis/cocoa/pasteboard/tags.txt b/basis/cocoa/pasteboard/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cocoa/pasteboard/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/cpu/ppc/authors.txt b/basis/cocoa/plists/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from core/cpu/ppc/authors.txt rename to basis/cocoa/plists/authors.txt diff --git a/extra/cocoa/plists/plists.factor b/basis/cocoa/plists/plists.factor similarity index 76% rename from extra/cocoa/plists/plists.factor rename to basis/cocoa/plists/plists.factor index 139e0840e1..bb73b8fac3 100644 --- a/extra/cocoa/plists/plists.factor +++ b/basis/cocoa/plists/plists.factor @@ -3,7 +3,7 @@ USING: strings arrays hashtables assocs sequences cocoa.messages cocoa.classes cocoa.application cocoa kernel namespaces io.backend math cocoa.enumeration byte-arrays -combinators alien.c-types ; +combinators alien.c-types core-foundation ; IN: cocoa.plists GENERIC: >plist ( value -- plist ) @@ -24,8 +24,8 @@ M: sequence >plist [ >plist ] map ; : write-plist ( assoc path -- ) - >r >plist - r> normalize-path 0 -> writeToFile:atomically: + [ >plist ] [ normalize-path ] bi* 0 + -> writeToFile:atomically: [ "write-plist failed" throw ] unless ; DEFER: plist> @@ -57,3 +57,13 @@ DEFER: plist> { [ dup NSDictionary -> isKindOfClass: c-bool> ] [ (plist-NSDictionary>) ] } [ ] } cond ; + +: (read-plist) ( NSData -- id ) + NSPropertyListSerialization swap kCFPropertyListImmutable f f + [ -> propertyListFromData:mutabilityOption:format:errorDescription: ] keep + *void* [ -> release "read-plist failed" throw ] when* ; + +: read-plist ( path -- assoc ) + normalize-path + NSData swap -> dataWithContentsOfFile: + [ (read-plist) plist> ] [ "read-plist failed" throw ] if* ; diff --git a/basis/cocoa/plists/tags.txt b/basis/cocoa/plists/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cocoa/plists/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/cpu/ppc/intrinsics/authors.txt b/basis/cocoa/runtime/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from core/cpu/ppc/intrinsics/authors.txt rename to basis/cocoa/runtime/authors.txt diff --git a/extra/cocoa/runtime/runtime.factor b/basis/cocoa/runtime/runtime.factor similarity index 100% rename from extra/cocoa/runtime/runtime.factor rename to basis/cocoa/runtime/runtime.factor diff --git a/extra/cocoa/runtime/summary.txt b/basis/cocoa/runtime/summary.txt similarity index 100% rename from extra/cocoa/runtime/summary.txt rename to basis/cocoa/runtime/summary.txt diff --git a/basis/cocoa/runtime/tags.txt b/basis/cocoa/runtime/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cocoa/runtime/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/cpu/x86/32/authors.txt b/basis/cocoa/subclassing/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from core/cpu/x86/32/authors.txt rename to basis/cocoa/subclassing/authors.txt diff --git a/extra/cocoa/subclassing/subclassing-docs.factor b/basis/cocoa/subclassing/subclassing-docs.factor similarity index 100% rename from extra/cocoa/subclassing/subclassing-docs.factor rename to basis/cocoa/subclassing/subclassing-docs.factor diff --git a/extra/cocoa/subclassing/subclassing.factor b/basis/cocoa/subclassing/subclassing.factor similarity index 100% rename from extra/cocoa/subclassing/subclassing.factor rename to basis/cocoa/subclassing/subclassing.factor diff --git a/extra/cocoa/subclassing/summary.txt b/basis/cocoa/subclassing/summary.txt similarity index 100% rename from extra/cocoa/subclassing/summary.txt rename to basis/cocoa/subclassing/summary.txt diff --git a/basis/cocoa/subclassing/tags.txt b/basis/cocoa/subclassing/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cocoa/subclassing/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/cocoa/summary.txt b/basis/cocoa/summary.txt similarity index 100% rename from extra/cocoa/summary.txt rename to basis/cocoa/summary.txt diff --git a/basis/cocoa/tags.txt b/basis/cocoa/tags.txt new file mode 100644 index 0000000000..2320bdd648 --- /dev/null +++ b/basis/cocoa/tags.txt @@ -0,0 +1,2 @@ +unportable +bindings diff --git a/core/cpu/x86/64/authors.txt b/basis/cocoa/types/authors.txt similarity index 100% rename from core/cpu/x86/64/authors.txt rename to basis/cocoa/types/authors.txt diff --git a/extra/cocoa/types/summary.txt b/basis/cocoa/types/summary.txt similarity index 100% rename from extra/cocoa/types/summary.txt rename to basis/cocoa/types/summary.txt diff --git a/basis/cocoa/types/tags.txt b/basis/cocoa/types/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cocoa/types/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/cocoa/types/types-docs.factor b/basis/cocoa/types/types-docs.factor similarity index 100% rename from extra/cocoa/types/types-docs.factor rename to basis/cocoa/types/types-docs.factor diff --git a/extra/cocoa/types/types.factor b/basis/cocoa/types/types.factor similarity index 100% rename from extra/cocoa/types/types.factor rename to basis/cocoa/types/types.factor diff --git a/core/cpu/x86/allot/authors.txt b/basis/cocoa/views/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from core/cpu/x86/allot/authors.txt rename to basis/cocoa/views/authors.txt diff --git a/extra/cocoa/views/summary.txt b/basis/cocoa/views/summary.txt similarity index 100% rename from extra/cocoa/views/summary.txt rename to basis/cocoa/views/summary.txt diff --git a/basis/cocoa/views/tags.txt b/basis/cocoa/views/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cocoa/views/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/cocoa/views/views-docs.factor b/basis/cocoa/views/views-docs.factor similarity index 100% rename from extra/cocoa/views/views-docs.factor rename to basis/cocoa/views/views-docs.factor diff --git a/extra/cocoa/views/views.factor b/basis/cocoa/views/views.factor similarity index 100% rename from extra/cocoa/views/views.factor rename to basis/cocoa/views/views.factor diff --git a/core/cpu/x86/architecture/authors.txt b/basis/cocoa/windows/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from core/cpu/x86/architecture/authors.txt rename to basis/cocoa/windows/authors.txt diff --git a/extra/cocoa/windows/summary.txt b/basis/cocoa/windows/summary.txt similarity index 100% rename from extra/cocoa/windows/summary.txt rename to basis/cocoa/windows/summary.txt diff --git a/basis/cocoa/windows/tags.txt b/basis/cocoa/windows/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cocoa/windows/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/cocoa/windows/windows-docs.factor b/basis/cocoa/windows/windows-docs.factor similarity index 100% rename from extra/cocoa/windows/windows-docs.factor rename to basis/cocoa/windows/windows-docs.factor diff --git a/extra/cocoa/windows/windows.factor b/basis/cocoa/windows/windows.factor similarity index 100% rename from extra/cocoa/windows/windows.factor rename to basis/cocoa/windows/windows.factor diff --git a/extra/columns/authors.txt b/basis/columns/authors.txt similarity index 100% rename from extra/columns/authors.txt rename to basis/columns/authors.txt diff --git a/extra/columns/columns-docs.factor b/basis/columns/columns-docs.factor similarity index 100% rename from extra/columns/columns-docs.factor rename to basis/columns/columns-docs.factor diff --git a/extra/columns/columns-tests.factor b/basis/columns/columns-tests.factor similarity index 100% rename from extra/columns/columns-tests.factor rename to basis/columns/columns-tests.factor diff --git a/extra/columns/columns.factor b/basis/columns/columns.factor similarity index 100% rename from extra/columns/columns.factor rename to basis/columns/columns.factor diff --git a/extra/columns/summary.txt b/basis/columns/summary.txt similarity index 100% rename from extra/columns/summary.txt rename to basis/columns/summary.txt diff --git a/extra/biassocs/tags.txt b/basis/columns/tags.txt similarity index 100% rename from extra/biassocs/tags.txt rename to basis/columns/tags.txt diff --git a/extra/combinators/short-circuit/short-circuit-tests.factor b/basis/combinators/short-circuit/short-circuit-tests.factor similarity index 100% rename from extra/combinators/short-circuit/short-circuit-tests.factor rename to basis/combinators/short-circuit/short-circuit-tests.factor diff --git a/extra/combinators/short-circuit/short-circuit.factor b/basis/combinators/short-circuit/short-circuit.factor similarity index 100% rename from extra/combinators/short-circuit/short-circuit.factor rename to basis/combinators/short-circuit/short-circuit.factor diff --git a/extra/combinators/short-circuit/smart/smart-tests.factor b/basis/combinators/short-circuit/smart/smart-tests.factor similarity index 100% rename from extra/combinators/short-circuit/smart/smart-tests.factor rename to basis/combinators/short-circuit/smart/smart-tests.factor diff --git a/extra/combinators/short-circuit/smart/smart.factor b/basis/combinators/short-circuit/smart/smart.factor similarity index 100% rename from extra/combinators/short-circuit/smart/smart.factor rename to basis/combinators/short-circuit/smart/smart.factor diff --git a/core/cpu/x86/assembler/authors.txt b/basis/command-line/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from core/cpu/x86/assembler/authors.txt rename to basis/command-line/authors.txt diff --git a/core/command-line/command-line-docs.factor b/basis/command-line/command-line-docs.factor similarity index 100% rename from core/command-line/command-line-docs.factor rename to basis/command-line/command-line-docs.factor diff --git a/core/command-line/command-line-tests.factor b/basis/command-line/command-line-tests.factor similarity index 100% rename from core/command-line/command-line-tests.factor rename to basis/command-line/command-line-tests.factor diff --git a/core/command-line/command-line.factor b/basis/command-line/command-line.factor similarity index 95% rename from core/command-line/command-line.factor rename to basis/command-line/command-line.factor index fb4fd374a7..37dbf9b7a6 100644 --- a/core/command-line/command-line.factor +++ b/basis/command-line/command-line.factor @@ -1,8 +1,8 @@ -! Copyright (C) 2003, 2007 Slava Pestov. +! Copyright (C) 2003, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: init continuations debugger hashtables io kernel kernel.private namespaces parser sequences strings system -splitting io.files ; +splitting io.files eval ; IN: command-line : run-bootstrap-init ( -- ) diff --git a/core/command-line/summary.txt b/basis/command-line/summary.txt similarity index 100% rename from core/command-line/summary.txt rename to basis/command-line/summary.txt diff --git a/core/cpu/x86/authors.txt b/basis/compiler/authors.txt similarity index 100% rename from core/cpu/x86/authors.txt rename to basis/compiler/authors.txt diff --git a/core/compiler/compiler-docs.factor b/basis/compiler/compiler-docs.factor similarity index 100% rename from core/compiler/compiler-docs.factor rename to basis/compiler/compiler-docs.factor diff --git a/core/compiler/compiler.factor b/basis/compiler/compiler.factor similarity index 100% rename from core/compiler/compiler.factor rename to basis/compiler/compiler.factor diff --git a/core/cpu/x86/intrinsics/authors.txt b/basis/compiler/constants/authors.txt similarity index 100% rename from core/cpu/x86/intrinsics/authors.txt rename to basis/compiler/constants/authors.txt diff --git a/core/compiler/constants/constants.factor b/basis/compiler/constants/constants.factor similarity index 100% rename from core/compiler/constants/constants.factor rename to basis/compiler/constants/constants.factor diff --git a/core/compiler/constants/summary.txt b/basis/compiler/constants/summary.txt similarity index 100% rename from core/compiler/constants/summary.txt rename to basis/compiler/constants/summary.txt diff --git a/core/compiler/summary.txt b/basis/compiler/summary.txt similarity index 100% rename from core/compiler/summary.txt rename to basis/compiler/summary.txt diff --git a/core/compiler/tags.txt b/basis/compiler/tags.txt similarity index 100% rename from core/compiler/tags.txt rename to basis/compiler/tags.txt diff --git a/core/compiler/tests/curry.factor b/basis/compiler/tests/curry.factor similarity index 100% rename from core/compiler/tests/curry.factor rename to basis/compiler/tests/curry.factor diff --git a/core/compiler/tests/float.factor b/basis/compiler/tests/float.factor similarity index 100% rename from core/compiler/tests/float.factor rename to basis/compiler/tests/float.factor diff --git a/core/compiler/tests/insane.factor b/basis/compiler/tests/insane.factor similarity index 100% rename from core/compiler/tests/insane.factor rename to basis/compiler/tests/insane.factor diff --git a/core/compiler/tests/intrinsics.factor b/basis/compiler/tests/intrinsics.factor similarity index 100% rename from core/compiler/tests/intrinsics.factor rename to basis/compiler/tests/intrinsics.factor diff --git a/core/compiler/tests/redefine1.factor b/basis/compiler/tests/redefine1.factor similarity index 98% rename from core/compiler/tests/redefine1.factor rename to basis/compiler/tests/redefine1.factor index d448d031b9..6773eb6b6a 100644 --- a/core/compiler/tests/redefine1.factor +++ b/basis/compiler/tests/redefine1.factor @@ -1,7 +1,7 @@ IN: compiler.tests USING: accessors compiler compiler.units tools.test math parser kernel sequences sequences.private classes.mixin generic -definitions arrays words assocs ; +definitions arrays words assocs eval ; GENERIC: method-redefine-test ( a -- b ) diff --git a/core/compiler/tests/redefine2.factor b/basis/compiler/tests/redefine2.factor similarity index 95% rename from core/compiler/tests/redefine2.factor rename to basis/compiler/tests/redefine2.factor index 107381c4d3..c20a6d6233 100644 --- a/core/compiler/tests/redefine2.factor +++ b/basis/compiler/tests/redefine2.factor @@ -1,7 +1,7 @@ IN: compiler.tests USING: compiler compiler.units tools.test math parser kernel sequences sequences.private classes.mixin generic definitions -arrays words assocs ; +arrays words assocs eval ; DEFER: blah diff --git a/core/compiler/tests/redefine3.factor b/basis/compiler/tests/redefine3.factor similarity index 96% rename from core/compiler/tests/redefine3.factor rename to basis/compiler/tests/redefine3.factor index f7175aac55..941d086312 100644 --- a/core/compiler/tests/redefine3.factor +++ b/basis/compiler/tests/redefine3.factor @@ -1,7 +1,7 @@ IN: compiler.tests USING: accessors compiler compiler.units tools.test math parser kernel sequences sequences.private classes.mixin generic -definitions arrays words assocs ; +definitions arrays words assocs eval ; GENERIC: sheeple ( obj -- x ) diff --git a/core/compiler/tests/reload.factor b/basis/compiler/tests/reload.factor similarity index 100% rename from core/compiler/tests/reload.factor rename to basis/compiler/tests/reload.factor diff --git a/core/compiler/tests/simple.factor b/basis/compiler/tests/simple.factor similarity index 99% rename from core/compiler/tests/simple.factor rename to basis/compiler/tests/simple.factor index 272f92ec07..c18ab3e335 100755 --- a/core/compiler/tests/simple.factor +++ b/basis/compiler/tests/simple.factor @@ -1,6 +1,6 @@ USING: compiler.units tools.test kernel kernel.private sequences.private math.private math combinators strings -alien arrays memory vocabs parser ; +alien arrays memory vocabs parser eval ; IN: compiler.tests ! Test empty word diff --git a/core/compiler/tests/stack-trace.factor b/basis/compiler/tests/stack-trace.factor similarity index 100% rename from core/compiler/tests/stack-trace.factor rename to basis/compiler/tests/stack-trace.factor diff --git a/core/compiler/tests/templates-early.factor b/basis/compiler/tests/templates-early.factor similarity index 100% rename from core/compiler/tests/templates-early.factor rename to basis/compiler/tests/templates-early.factor diff --git a/core/compiler/tests/templates.factor b/basis/compiler/tests/templates.factor similarity index 100% rename from core/compiler/tests/templates.factor rename to basis/compiler/tests/templates.factor diff --git a/core/compiler/tests/tuples.factor b/basis/compiler/tests/tuples.factor similarity index 100% rename from core/compiler/tests/tuples.factor rename to basis/compiler/tests/tuples.factor diff --git a/extra/concurrency/combinators/combinators-docs.factor b/basis/concurrency/combinators/combinators-docs.factor similarity index 100% rename from extra/concurrency/combinators/combinators-docs.factor rename to basis/concurrency/combinators/combinators-docs.factor diff --git a/extra/concurrency/combinators/combinators-tests.factor b/basis/concurrency/combinators/combinators-tests.factor similarity index 100% rename from extra/concurrency/combinators/combinators-tests.factor rename to basis/concurrency/combinators/combinators-tests.factor diff --git a/extra/concurrency/combinators/combinators.factor b/basis/concurrency/combinators/combinators.factor similarity index 100% rename from extra/concurrency/combinators/combinators.factor rename to basis/concurrency/combinators/combinators.factor diff --git a/extra/concurrency/combinators/summary.txt b/basis/concurrency/combinators/summary.txt similarity index 100% rename from extra/concurrency/combinators/summary.txt rename to basis/concurrency/combinators/summary.txt diff --git a/extra/concurrency/conditions/conditions.factor b/basis/concurrency/conditions/conditions.factor similarity index 100% rename from extra/concurrency/conditions/conditions.factor rename to basis/concurrency/conditions/conditions.factor diff --git a/extra/concurrency/conditions/summary.txt b/basis/concurrency/conditions/summary.txt similarity index 100% rename from extra/concurrency/conditions/summary.txt rename to basis/concurrency/conditions/summary.txt diff --git a/extra/concurrency/count-downs/count-downs-docs.factor b/basis/concurrency/count-downs/count-downs-docs.factor similarity index 100% rename from extra/concurrency/count-downs/count-downs-docs.factor rename to basis/concurrency/count-downs/count-downs-docs.factor diff --git a/extra/concurrency/count-downs/count-downs-tests.factor b/basis/concurrency/count-downs/count-downs-tests.factor similarity index 100% rename from extra/concurrency/count-downs/count-downs-tests.factor rename to basis/concurrency/count-downs/count-downs-tests.factor diff --git a/extra/concurrency/count-downs/count-downs.factor b/basis/concurrency/count-downs/count-downs.factor similarity index 100% rename from extra/concurrency/count-downs/count-downs.factor rename to basis/concurrency/count-downs/count-downs.factor diff --git a/extra/concurrency/count-downs/summary.txt b/basis/concurrency/count-downs/summary.txt similarity index 100% rename from extra/concurrency/count-downs/summary.txt rename to basis/concurrency/count-downs/summary.txt diff --git a/extra/concurrency/distributed/authors.txt b/basis/concurrency/distributed/authors.txt similarity index 100% rename from extra/concurrency/distributed/authors.txt rename to basis/concurrency/distributed/authors.txt diff --git a/extra/concurrency/distributed/distributed-docs.factor b/basis/concurrency/distributed/distributed-docs.factor similarity index 100% rename from extra/concurrency/distributed/distributed-docs.factor rename to basis/concurrency/distributed/distributed-docs.factor diff --git a/extra/concurrency/distributed/distributed-tests.factor b/basis/concurrency/distributed/distributed-tests.factor similarity index 100% rename from extra/concurrency/distributed/distributed-tests.factor rename to basis/concurrency/distributed/distributed-tests.factor diff --git a/extra/concurrency/distributed/distributed.factor b/basis/concurrency/distributed/distributed.factor similarity index 100% rename from extra/concurrency/distributed/distributed.factor rename to basis/concurrency/distributed/distributed.factor diff --git a/extra/concurrency/distributed/summary.txt b/basis/concurrency/distributed/summary.txt similarity index 100% rename from extra/concurrency/distributed/summary.txt rename to basis/concurrency/distributed/summary.txt diff --git a/extra/concurrency/distributed/tags.txt b/basis/concurrency/distributed/tags.txt similarity index 100% rename from extra/concurrency/distributed/tags.txt rename to basis/concurrency/distributed/tags.txt diff --git a/core/cpu/x86/sse2/authors.txt b/basis/concurrency/exchangers/authors.txt similarity index 100% rename from core/cpu/x86/sse2/authors.txt rename to basis/concurrency/exchangers/authors.txt diff --git a/extra/concurrency/exchangers/exchangers-docs.factor b/basis/concurrency/exchangers/exchangers-docs.factor similarity index 100% rename from extra/concurrency/exchangers/exchangers-docs.factor rename to basis/concurrency/exchangers/exchangers-docs.factor diff --git a/extra/concurrency/exchangers/exchangers-tests.factor b/basis/concurrency/exchangers/exchangers-tests.factor similarity index 100% rename from extra/concurrency/exchangers/exchangers-tests.factor rename to basis/concurrency/exchangers/exchangers-tests.factor diff --git a/extra/concurrency/exchangers/exchangers.factor b/basis/concurrency/exchangers/exchangers.factor similarity index 100% rename from extra/concurrency/exchangers/exchangers.factor rename to basis/concurrency/exchangers/exchangers.factor diff --git a/extra/concurrency/exchangers/summary.txt b/basis/concurrency/exchangers/summary.txt similarity index 100% rename from extra/concurrency/exchangers/summary.txt rename to basis/concurrency/exchangers/summary.txt diff --git a/extra/concurrency/flags/flags-docs.factor b/basis/concurrency/flags/flags-docs.factor similarity index 100% rename from extra/concurrency/flags/flags-docs.factor rename to basis/concurrency/flags/flags-docs.factor diff --git a/extra/concurrency/flags/flags-tests.factor b/basis/concurrency/flags/flags-tests.factor similarity index 100% rename from extra/concurrency/flags/flags-tests.factor rename to basis/concurrency/flags/flags-tests.factor diff --git a/extra/concurrency/flags/flags.factor b/basis/concurrency/flags/flags.factor similarity index 100% rename from extra/concurrency/flags/flags.factor rename to basis/concurrency/flags/flags.factor diff --git a/extra/concurrency/futures/authors.txt b/basis/concurrency/futures/authors.txt similarity index 100% rename from extra/concurrency/futures/authors.txt rename to basis/concurrency/futures/authors.txt diff --git a/extra/concurrency/futures/futures-docs.factor b/basis/concurrency/futures/futures-docs.factor similarity index 100% rename from extra/concurrency/futures/futures-docs.factor rename to basis/concurrency/futures/futures-docs.factor diff --git a/extra/concurrency/futures/futures-tests.factor b/basis/concurrency/futures/futures-tests.factor similarity index 100% rename from extra/concurrency/futures/futures-tests.factor rename to basis/concurrency/futures/futures-tests.factor diff --git a/extra/concurrency/futures/futures.factor b/basis/concurrency/futures/futures.factor similarity index 100% rename from extra/concurrency/futures/futures.factor rename to basis/concurrency/futures/futures.factor diff --git a/extra/concurrency/futures/summary.txt b/basis/concurrency/futures/summary.txt similarity index 100% rename from extra/concurrency/futures/summary.txt rename to basis/concurrency/futures/summary.txt diff --git a/core/debugger/authors.txt b/basis/concurrency/locks/authors.txt similarity index 100% rename from core/debugger/authors.txt rename to basis/concurrency/locks/authors.txt diff --git a/extra/concurrency/locks/locks-docs.factor b/basis/concurrency/locks/locks-docs.factor similarity index 100% rename from extra/concurrency/locks/locks-docs.factor rename to basis/concurrency/locks/locks-docs.factor diff --git a/extra/concurrency/locks/locks-tests.factor b/basis/concurrency/locks/locks-tests.factor similarity index 100% rename from extra/concurrency/locks/locks-tests.factor rename to basis/concurrency/locks/locks-tests.factor diff --git a/extra/concurrency/locks/locks.factor b/basis/concurrency/locks/locks.factor similarity index 100% rename from extra/concurrency/locks/locks.factor rename to basis/concurrency/locks/locks.factor diff --git a/extra/concurrency/locks/summary.txt b/basis/concurrency/locks/summary.txt similarity index 100% rename from extra/concurrency/locks/summary.txt rename to basis/concurrency/locks/summary.txt diff --git a/extra/concurrency/mailboxes/mailboxes-docs.factor b/basis/concurrency/mailboxes/mailboxes-docs.factor similarity index 100% rename from extra/concurrency/mailboxes/mailboxes-docs.factor rename to basis/concurrency/mailboxes/mailboxes-docs.factor diff --git a/extra/concurrency/mailboxes/mailboxes-tests.factor b/basis/concurrency/mailboxes/mailboxes-tests.factor similarity index 100% rename from extra/concurrency/mailboxes/mailboxes-tests.factor rename to basis/concurrency/mailboxes/mailboxes-tests.factor diff --git a/extra/concurrency/mailboxes/mailboxes.factor b/basis/concurrency/mailboxes/mailboxes.factor similarity index 95% rename from extra/concurrency/mailboxes/mailboxes.factor rename to basis/concurrency/mailboxes/mailboxes.factor index b7d9e46aa8..11624ab473 100755 --- a/extra/concurrency/mailboxes/mailboxes.factor +++ b/basis/concurrency/mailboxes/mailboxes.factor @@ -4,7 +4,7 @@ IN: concurrency.mailboxes USING: dlists dequeues threads sequences continuations destructors namespaces random math quotations words kernel arrays assocs init system concurrency.conditions accessors -debugger ; +debugger debugger.threads ; TUPLE: mailbox threads data disposed ; diff --git a/extra/concurrency/messaging/authors.txt b/basis/concurrency/messaging/authors.txt similarity index 100% rename from extra/concurrency/messaging/authors.txt rename to basis/concurrency/messaging/authors.txt diff --git a/extra/concurrency/messaging/messaging-docs.factor b/basis/concurrency/messaging/messaging-docs.factor similarity index 96% rename from extra/concurrency/messaging/messaging-docs.factor rename to basis/concurrency/messaging/messaging-docs.factor index 1219982f51..6c9e530d9b 100755 --- a/extra/concurrency/messaging/messaging-docs.factor +++ b/basis/concurrency/messaging/messaging-docs.factor @@ -56,19 +56,19 @@ ARTICLE: { "concurrency" "synchronous-sends" } "Synchronous sends" "USING: concurrency.messaging kernel threads ;" ": pong-server ( -- )" " receive >r \"pong\" r> reply-synchronous ;" - "[ pong-server t ] spawn-server" + "[ pong-server t ] \"pong-server\" spawn-server" "\"ping\" swap send-synchronous ." "\"pong\"" } ; ARTICLE: { "concurrency" "exceptions" } "Linked exceptions" "A thread can handle exceptions using the standard Factor exception handling mechanism. If an exception is uncaught the thread will terminate. For example:" -{ $code "[ 1 0 / \"This will not print\" print ] spawn" } +{ $code "[ 1 0 / \"This will not print\" print ] \"division-by-zero\" spawn" } "Processes can be linked so that a parent thread can receive the exception that caused the child thread to terminate. In this way 'supervisor' threades can be created that are notified when child threades terminate and possibly restart them." { $subsection spawn-linked } "This will create a unidirectional link, such that if an uncaught exception causes the child to terminate, the parent thread can catch it:" { $code "[" -" [ 1 0 / \"This will not print\" print ] spawn-linked drop" +" [ 1 0 / \"This will not print\" print ] \"linked-division\" spawn-linked drop" " receive" "] [ \"Exception caught.\" print ] recover" } "Exceptions are only raised in the parent when the parent does a " { $link receive } " or " { $link receive-if } ". This is because the exception is sent from the child to the parent as a message." ; diff --git a/extra/concurrency/messaging/messaging-tests.factor b/basis/concurrency/messaging/messaging-tests.factor similarity index 100% rename from extra/concurrency/messaging/messaging-tests.factor rename to basis/concurrency/messaging/messaging-tests.factor diff --git a/extra/concurrency/messaging/messaging.factor b/basis/concurrency/messaging/messaging.factor similarity index 100% rename from extra/concurrency/messaging/messaging.factor rename to basis/concurrency/messaging/messaging.factor diff --git a/extra/concurrency/messaging/summary.txt b/basis/concurrency/messaging/summary.txt similarity index 100% rename from extra/concurrency/messaging/summary.txt rename to basis/concurrency/messaging/summary.txt diff --git a/extra/concurrency/promises/authors.txt b/basis/concurrency/promises/authors.txt similarity index 100% rename from extra/concurrency/promises/authors.txt rename to basis/concurrency/promises/authors.txt diff --git a/extra/concurrency/promises/promises-docs.factor b/basis/concurrency/promises/promises-docs.factor similarity index 100% rename from extra/concurrency/promises/promises-docs.factor rename to basis/concurrency/promises/promises-docs.factor diff --git a/extra/concurrency/promises/promises-tests.factor b/basis/concurrency/promises/promises-tests.factor similarity index 100% rename from extra/concurrency/promises/promises-tests.factor rename to basis/concurrency/promises/promises-tests.factor diff --git a/extra/concurrency/promises/promises.factor b/basis/concurrency/promises/promises.factor similarity index 100% rename from extra/concurrency/promises/promises.factor rename to basis/concurrency/promises/promises.factor diff --git a/extra/concurrency/promises/summary.txt b/basis/concurrency/promises/summary.txt similarity index 100% rename from extra/concurrency/promises/summary.txt rename to basis/concurrency/promises/summary.txt diff --git a/core/dequeues/authors.txt b/basis/concurrency/semaphores/authors.txt similarity index 100% rename from core/dequeues/authors.txt rename to basis/concurrency/semaphores/authors.txt diff --git a/extra/concurrency/semaphores/semaphores-docs.factor b/basis/concurrency/semaphores/semaphores-docs.factor similarity index 100% rename from extra/concurrency/semaphores/semaphores-docs.factor rename to basis/concurrency/semaphores/semaphores-docs.factor diff --git a/extra/concurrency/semaphores/semaphores.factor b/basis/concurrency/semaphores/semaphores.factor similarity index 100% rename from extra/concurrency/semaphores/semaphores.factor rename to basis/concurrency/semaphores/semaphores.factor diff --git a/extra/concurrency/semaphores/summary.txt b/basis/concurrency/semaphores/summary.txt similarity index 100% rename from extra/concurrency/semaphores/summary.txt rename to basis/concurrency/semaphores/summary.txt diff --git a/core/generator/authors.txt b/basis/core-foundation/authors.txt similarity index 100% rename from core/generator/authors.txt rename to basis/core-foundation/authors.txt diff --git a/extra/core-foundation/core-foundation-docs.factor b/basis/core-foundation/core-foundation-docs.factor similarity index 100% rename from extra/core-foundation/core-foundation-docs.factor rename to basis/core-foundation/core-foundation-docs.factor diff --git a/extra/core-foundation/core-foundation.factor b/basis/core-foundation/core-foundation.factor similarity index 95% rename from extra/core-foundation/core-foundation.factor rename to basis/core-foundation/core-foundation.factor index c511a24320..5c3ccf6c80 100644 --- a/extra/core-foundation/core-foundation.factor +++ b/basis/core-foundation/core-foundation.factor @@ -43,6 +43,11 @@ TYPEDEF: int CFNumberType : kCFNumberCGFloatType 16 ; inline : kCFNumberMaxType 16 ; inline +TYPEDEF: int CFPropertyListMutabilityOptions +: kCFPropertyListImmutable 0 ; inline +: kCFPropertyListMutableContainers 1 ; inline +: kCFPropertyListMutableContainersAndLeaves 2 ; inline + FUNCTION: CFArrayRef CFArrayCreateMutable ( CFAllocatorRef allocator, CFIndex capacity, void* callbacks ) ; FUNCTION: void* CFArrayGetValueAtIndex ( CFArrayRef array, CFIndex idx ) ; diff --git a/extra/core-foundation/fsevents/fsevents.factor b/basis/core-foundation/fsevents/fsevents.factor similarity index 100% rename from extra/core-foundation/fsevents/fsevents.factor rename to basis/core-foundation/fsevents/fsevents.factor diff --git a/basis/core-foundation/fsevents/tags.txt b/basis/core-foundation/fsevents/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/core-foundation/fsevents/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/core-foundation/run-loop/run-loop.factor b/basis/core-foundation/run-loop/run-loop.factor similarity index 100% rename from extra/core-foundation/run-loop/run-loop.factor rename to basis/core-foundation/run-loop/run-loop.factor diff --git a/basis/core-foundation/run-loop/tags.txt b/basis/core-foundation/run-loop/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/core-foundation/run-loop/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/core-foundation/summary.txt b/basis/core-foundation/summary.txt similarity index 100% rename from extra/core-foundation/summary.txt rename to basis/core-foundation/summary.txt diff --git a/basis/core-foundation/tags.txt b/basis/core-foundation/tags.txt new file mode 100644 index 0000000000..2320bdd648 --- /dev/null +++ b/basis/core-foundation/tags.txt @@ -0,0 +1,2 @@ +unportable +bindings diff --git a/core/cpu/architecture/architecture.factor b/basis/cpu/architecture/architecture.factor similarity index 100% rename from core/cpu/architecture/architecture.factor rename to basis/cpu/architecture/architecture.factor diff --git a/core/generator/fixup/authors.txt b/basis/cpu/architecture/authors.txt similarity index 100% rename from core/generator/fixup/authors.txt rename to basis/cpu/architecture/authors.txt diff --git a/core/cpu/architecture/summary.txt b/basis/cpu/architecture/summary.txt similarity index 100% rename from core/cpu/architecture/summary.txt rename to basis/cpu/architecture/summary.txt diff --git a/core/cpu/architecture/tags.txt b/basis/cpu/architecture/tags.txt similarity index 100% rename from core/cpu/architecture/tags.txt rename to basis/cpu/architecture/tags.txt diff --git a/core/cpu/ppc/allot/allot.factor b/basis/cpu/ppc/allot/allot.factor similarity index 100% rename from core/cpu/ppc/allot/allot.factor rename to basis/cpu/ppc/allot/allot.factor diff --git a/core/generator/registers/authors.txt b/basis/cpu/ppc/allot/authors.txt similarity index 100% rename from core/generator/registers/authors.txt rename to basis/cpu/ppc/allot/authors.txt diff --git a/core/cpu/ppc/allot/summary.txt b/basis/cpu/ppc/allot/summary.txt similarity index 100% rename from core/cpu/ppc/allot/summary.txt rename to basis/cpu/ppc/allot/summary.txt diff --git a/basis/cpu/ppc/allot/tags.txt b/basis/cpu/ppc/allot/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cpu/ppc/allot/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/cpu/ppc/architecture/architecture.factor b/basis/cpu/ppc/architecture/architecture.factor similarity index 100% rename from core/cpu/ppc/architecture/architecture.factor rename to basis/cpu/ppc/architecture/architecture.factor diff --git a/core/inference/authors.txt b/basis/cpu/ppc/architecture/authors.txt similarity index 100% rename from core/inference/authors.txt rename to basis/cpu/ppc/architecture/authors.txt diff --git a/core/cpu/ppc/architecture/summary.txt b/basis/cpu/ppc/architecture/summary.txt similarity index 100% rename from core/cpu/ppc/architecture/summary.txt rename to basis/cpu/ppc/architecture/summary.txt diff --git a/basis/cpu/ppc/architecture/tags.txt b/basis/cpu/ppc/architecture/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cpu/ppc/architecture/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/cpu/ppc/assembler/assembler-tests.factor b/basis/cpu/ppc/assembler/assembler-tests.factor similarity index 100% rename from core/cpu/ppc/assembler/assembler-tests.factor rename to basis/cpu/ppc/assembler/assembler-tests.factor diff --git a/core/cpu/ppc/assembler/assembler.factor b/basis/cpu/ppc/assembler/assembler.factor similarity index 100% rename from core/cpu/ppc/assembler/assembler.factor rename to basis/cpu/ppc/assembler/assembler.factor diff --git a/core/inference/backend/authors.txt b/basis/cpu/ppc/assembler/authors.txt similarity index 100% rename from core/inference/backend/authors.txt rename to basis/cpu/ppc/assembler/authors.txt diff --git a/core/cpu/ppc/assembler/backend/backend.factor b/basis/cpu/ppc/assembler/backend/backend.factor similarity index 100% rename from core/cpu/ppc/assembler/backend/backend.factor rename to basis/cpu/ppc/assembler/backend/backend.factor diff --git a/basis/cpu/ppc/assembler/backend/tags.txt b/basis/cpu/ppc/assembler/backend/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cpu/ppc/assembler/backend/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/cpu/ppc/assembler/summary.txt b/basis/cpu/ppc/assembler/summary.txt similarity index 100% rename from core/cpu/ppc/assembler/summary.txt rename to basis/cpu/ppc/assembler/summary.txt diff --git a/core/inference/class/authors.txt b/basis/cpu/ppc/authors.txt similarity index 100% rename from core/inference/class/authors.txt rename to basis/cpu/ppc/authors.txt diff --git a/core/cpu/ppc/bootstrap.factor b/basis/cpu/ppc/bootstrap.factor similarity index 92% rename from core/cpu/ppc/bootstrap.factor rename to basis/cpu/ppc/bootstrap.factor index 705ddac06d..49955d9f38 100755 --- a/core/cpu/ppc/bootstrap.factor +++ b/basis/cpu/ppc/bootstrap.factor @@ -14,13 +14,13 @@ big-endian on : ds-reg 14 ; : rs-reg 15 ; -: factor-area-size 4 bootstrap-cells ; +: factor-area-size ( -- n ) 4 bootstrap-cells ; -: stack-frame +: stack-frame ( -- n ) factor-area-size c-area-size + 4 bootstrap-cells align ; -: next-save stack-frame bootstrap-cell - ; -: xt-save stack-frame 2 bootstrap-cells - ; +: next-save ( -- n ) stack-frame bootstrap-cell - ; +: xt-save ( -- n ) stack-frame 2 bootstrap-cells - ; [ 0 6 LOAD32 diff --git a/core/inference/dataflow/authors.txt b/basis/cpu/ppc/intrinsics/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from core/inference/dataflow/authors.txt rename to basis/cpu/ppc/intrinsics/authors.txt diff --git a/core/cpu/ppc/intrinsics/intrinsics.factor b/basis/cpu/ppc/intrinsics/intrinsics.factor similarity index 100% rename from core/cpu/ppc/intrinsics/intrinsics.factor rename to basis/cpu/ppc/intrinsics/intrinsics.factor diff --git a/basis/cpu/ppc/intrinsics/tags.txt b/basis/cpu/ppc/intrinsics/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cpu/ppc/intrinsics/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/cpu/ppc/macosx/bootstrap.factor b/basis/cpu/ppc/linux/bootstrap.factor similarity index 52% rename from core/cpu/ppc/macosx/bootstrap.factor rename to basis/cpu/ppc/linux/bootstrap.factor index db5e3a343f..fd9bab4835 100755 --- a/core/cpu/ppc/macosx/bootstrap.factor +++ b/basis/cpu/ppc/linux/bootstrap.factor @@ -3,8 +3,8 @@ USING: parser layouts system kernel ; IN: bootstrap.ppc -: c-area-size 14 bootstrap-cells ; -: lr-save 2 bootstrap-cells ; +: c-area-size ( -- n ) 10 bootstrap-cells ; +: lr-save ( -- n ) bootstrap-cell ; -<< "resource:core/cpu/ppc/bootstrap.factor" parse-file parsed >> +<< "resource:basis/cpu/ppc/bootstrap.factor" parse-file parsed >> call diff --git a/core/cpu/ppc/linux/bootstrap.factor b/basis/cpu/ppc/macosx/bootstrap.factor similarity index 51% rename from core/cpu/ppc/linux/bootstrap.factor rename to basis/cpu/ppc/macosx/bootstrap.factor index 3900ca7f88..f2ddc42688 100755 --- a/core/cpu/ppc/linux/bootstrap.factor +++ b/basis/cpu/ppc/macosx/bootstrap.factor @@ -3,8 +3,8 @@ USING: parser layouts system kernel ; IN: bootstrap.ppc -: c-area-size 10 bootstrap-cells ; -: lr-save bootstrap-cell ; +: c-area-size ( -- n ) 14 bootstrap-cells ; +: lr-save ( -- n ) 2 bootstrap-cells ; -<< "resource:core/cpu/ppc/bootstrap.factor" parse-file parsed >> +<< "resource:basis/cpu/ppc/bootstrap.factor" parse-file parsed >> call diff --git a/core/cpu/ppc/ppc.factor b/basis/cpu/ppc/ppc.factor similarity index 100% rename from core/cpu/ppc/ppc.factor rename to basis/cpu/ppc/ppc.factor diff --git a/core/cpu/ppc/summary.txt b/basis/cpu/ppc/summary.txt similarity index 100% rename from core/cpu/ppc/summary.txt rename to basis/cpu/ppc/summary.txt diff --git a/basis/cpu/ppc/tags.txt b/basis/cpu/ppc/tags.txt new file mode 100644 index 0000000000..8e66660f70 --- /dev/null +++ b/basis/cpu/ppc/tags.txt @@ -0,0 +1,2 @@ +unportable +compiler diff --git a/core/cpu/summary.txt b/basis/cpu/summary.txt similarity index 100% rename from core/cpu/summary.txt rename to basis/cpu/summary.txt diff --git a/core/cpu/arm/tags.txt b/basis/cpu/tags.txt similarity index 100% rename from core/cpu/arm/tags.txt rename to basis/cpu/tags.txt diff --git a/core/cpu/x86/32/32.factor b/basis/cpu/x86/32/32.factor similarity index 100% rename from core/cpu/x86/32/32.factor rename to basis/cpu/x86/32/32.factor diff --git a/core/inference/errors/authors.txt b/basis/cpu/x86/32/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from core/inference/errors/authors.txt rename to basis/cpu/x86/32/authors.txt diff --git a/core/cpu/x86/32/bootstrap.factor b/basis/cpu/x86/32/bootstrap.factor similarity index 87% rename from core/cpu/x86/32/bootstrap.factor rename to basis/cpu/x86/32/bootstrap.factor index 386f1366fc..81779ac9f4 100755 --- a/core/cpu/x86/32/bootstrap.factor +++ b/basis/cpu/x86/32/bootstrap.factor @@ -15,5 +15,5 @@ IN: bootstrap.x86 : fixnum>slot@ ( -- ) arg0 1 SAR ; : rex-length ( -- n ) 0 ; -<< "resource:core/cpu/x86/bootstrap.factor" parse-file parsed >> +<< "resource:basis/cpu/x86/bootstrap.factor" parse-file parsed >> call diff --git a/basis/cpu/x86/32/tags.txt b/basis/cpu/x86/32/tags.txt new file mode 100644 index 0000000000..8e66660f70 --- /dev/null +++ b/basis/cpu/x86/32/tags.txt @@ -0,0 +1,2 @@ +unportable +compiler diff --git a/core/cpu/x86/64/64.factor b/basis/cpu/x86/64/64.factor similarity index 100% rename from core/cpu/x86/64/64.factor rename to basis/cpu/x86/64/64.factor diff --git a/core/inference/known-words/authors.txt b/basis/cpu/x86/64/authors.txt similarity index 100% rename from core/inference/known-words/authors.txt rename to basis/cpu/x86/64/authors.txt diff --git a/core/cpu/x86/64/bootstrap.factor b/basis/cpu/x86/64/bootstrap.factor similarity index 86% rename from core/cpu/x86/64/bootstrap.factor rename to basis/cpu/x86/64/bootstrap.factor index 0c9ce92edf..0092843bca 100755 --- a/core/cpu/x86/64/bootstrap.factor +++ b/basis/cpu/x86/64/bootstrap.factor @@ -15,5 +15,5 @@ IN: bootstrap.x86 : fixnum>slot@ ( -- ) ; : rex-length ( -- n ) 1 ; -<< "resource:core/cpu/x86/bootstrap.factor" parse-file parsed >> +<< "resource:basis/cpu/x86/bootstrap.factor" parse-file parsed >> call diff --git a/core/cpu/x86/64/summary.txt b/basis/cpu/x86/64/summary.txt similarity index 100% rename from core/cpu/x86/64/summary.txt rename to basis/cpu/x86/64/summary.txt diff --git a/basis/cpu/x86/64/tags.txt b/basis/cpu/x86/64/tags.txt new file mode 100644 index 0000000000..8e66660f70 --- /dev/null +++ b/basis/cpu/x86/64/tags.txt @@ -0,0 +1,2 @@ +unportable +compiler diff --git a/core/cpu/x86/allot/allot.factor b/basis/cpu/x86/allot/allot.factor similarity index 100% rename from core/cpu/x86/allot/allot.factor rename to basis/cpu/x86/allot/allot.factor diff --git a/core/inference/state/authors.txt b/basis/cpu/x86/allot/authors.txt similarity index 100% rename from core/inference/state/authors.txt rename to basis/cpu/x86/allot/authors.txt diff --git a/basis/cpu/x86/allot/tags.txt b/basis/cpu/x86/allot/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cpu/x86/allot/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/cpu/x86/architecture/architecture.factor b/basis/cpu/x86/architecture/architecture.factor similarity index 100% rename from core/cpu/x86/architecture/architecture.factor rename to basis/cpu/x86/architecture/architecture.factor diff --git a/core/inference/transforms/authors.txt b/basis/cpu/x86/architecture/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from core/inference/transforms/authors.txt rename to basis/cpu/x86/architecture/authors.txt diff --git a/basis/cpu/x86/architecture/tags.txt b/basis/cpu/x86/architecture/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cpu/x86/architecture/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/cpu/x86/assembler/assembler-tests.factor b/basis/cpu/x86/assembler/assembler-tests.factor similarity index 100% rename from core/cpu/x86/assembler/assembler-tests.factor rename to basis/cpu/x86/assembler/assembler-tests.factor diff --git a/core/cpu/x86/assembler/assembler.factor b/basis/cpu/x86/assembler/assembler.factor similarity index 100% rename from core/cpu/x86/assembler/assembler.factor rename to basis/cpu/x86/assembler/assembler.factor diff --git a/core/inspector/authors.txt b/basis/cpu/x86/assembler/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from core/inspector/authors.txt rename to basis/cpu/x86/assembler/authors.txt diff --git a/core/cpu/x86/assembler/syntax/syntax.factor b/basis/cpu/x86/assembler/syntax/syntax.factor similarity index 100% rename from core/cpu/x86/assembler/syntax/syntax.factor rename to basis/cpu/x86/assembler/syntax/syntax.factor diff --git a/basis/cpu/x86/assembler/syntax/tags.txt b/basis/cpu/x86/assembler/syntax/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cpu/x86/assembler/syntax/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/io/styles/authors.txt b/basis/cpu/x86/authors.txt similarity index 100% rename from core/io/styles/authors.txt rename to basis/cpu/x86/authors.txt diff --git a/core/cpu/x86/bootstrap.factor b/basis/cpu/x86/bootstrap.factor similarity index 100% rename from core/cpu/x86/bootstrap.factor rename to basis/cpu/x86/bootstrap.factor diff --git a/core/libc/authors.txt b/basis/cpu/x86/intrinsics/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from core/libc/authors.txt rename to basis/cpu/x86/intrinsics/authors.txt diff --git a/core/cpu/x86/intrinsics/intrinsics.factor b/basis/cpu/x86/intrinsics/intrinsics.factor similarity index 100% rename from core/cpu/x86/intrinsics/intrinsics.factor rename to basis/cpu/x86/intrinsics/intrinsics.factor diff --git a/basis/cpu/x86/intrinsics/tags.txt b/basis/cpu/x86/intrinsics/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cpu/x86/intrinsics/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/listener/authors.txt b/basis/cpu/x86/sse2/authors.txt similarity index 100% rename from core/listener/authors.txt rename to basis/cpu/x86/sse2/authors.txt diff --git a/core/cpu/x86/sse2/sse2.factor b/basis/cpu/x86/sse2/sse2.factor similarity index 100% rename from core/cpu/x86/sse2/sse2.factor rename to basis/cpu/x86/sse2/sse2.factor diff --git a/core/cpu/x86/sse2/summary.txt b/basis/cpu/x86/sse2/summary.txt similarity index 100% rename from core/cpu/x86/sse2/summary.txt rename to basis/cpu/x86/sse2/summary.txt diff --git a/basis/cpu/x86/sse2/tags.txt b/basis/cpu/x86/sse2/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/cpu/x86/sse2/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/cpu/x86/summary.txt b/basis/cpu/x86/summary.txt similarity index 100% rename from core/cpu/x86/summary.txt rename to basis/cpu/x86/summary.txt diff --git a/core/math/bitfields/authors.txt b/basis/debugger/authors.txt similarity index 100% rename from core/math/bitfields/authors.txt rename to basis/debugger/authors.txt diff --git a/core/debugger/debugger-docs.factor b/basis/debugger/debugger-docs.factor similarity index 89% rename from core/debugger/debugger-docs.factor rename to basis/debugger/debugger-docs.factor index 9dd23c6011..72463caf26 100755 --- a/core/debugger/debugger-docs.factor +++ b/basis/debugger/debugger-docs.factor @@ -4,14 +4,6 @@ help generic.standard continuations system debugger.private io.files.private listener ; IN: debugger -ARTICLE: "errors-assert" "Assertions" -"Some words to make assertions easier to enforce:" -{ $subsection assert } -{ $subsection assert= } -"Runtime stack depth checking:" -{ $subsection depth } -{ $subsection assert-depth } ; - ARTICLE: "debugger" "The debugger" "Caught errors can be logged in human-readable form:" { $subsection print-error } @@ -156,21 +148,3 @@ HELP: memory-error. HELP: primitive-error. { $error-description "Thrown by the Factor VM if an unsupported primitive word is called." } { $notes "This word is only ever thrown on Windows CE, where the " { $link cwd } ", " { $link cd } ", and " { $link os-env } " primitives are unsupported." } ; - -HELP: assert -{ $values { "got" "the obtained value" } { "expect" "the expected value" } } -{ $description "Throws an " { $link assert } " error." } -{ $error-description "Thrown when a unit test or other assertion fails." } ; - -{ assert assert-depth } related-words - -HELP: depth -{ $values { "n" "a non-negative integer" } } -{ $description "Outputs the number of elements on the data stack." } ; - -HELP: assert-depth -{ $values { "quot" "a quotation" } } -{ $description "Runs a quotation. Throws an error if the total number of elements on the stack is not the same before and after the quotation runs." } ; - -HELP: init-debugger -{ $description "Called on startup to set a pair of hooks which allow the " { $link throw } " word to function." } ; diff --git a/core/debugger/debugger-tests.factor b/basis/debugger/debugger-tests.factor similarity index 100% rename from core/debugger/debugger-tests.factor rename to basis/debugger/debugger-tests.factor diff --git a/core/debugger/debugger.factor b/basis/debugger/debugger.factor similarity index 77% rename from core/debugger/debugger.factor rename to basis/debugger/debugger.factor index 151ef3b6e9..eacbd6a125 100755 --- a/core/debugger/debugger.factor +++ b/basis/debugger/debugger.factor @@ -2,12 +2,14 @@ ! See http://factorcode.org/license.txt for BSD license. USING: slots arrays definitions generic hashtables summary io kernel math namespaces prettyprint prettyprint.config sequences -assocs sequences.private strings io.styles vectors words system -splitting math.parser classes.tuple continuations +assocs sequences.private strings io.styles io.files vectors +words system splitting math.parser classes.tuple continuations continuations.private combinators generic.math classes.builtin -classes compiler.units generic.standard vocabs threads -threads.private init kernel.private libc io.encodings -accessors math.order destructors ; +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 ; IN: debugger GENERIC: error. ( error -- ) @@ -69,33 +71,12 @@ M: string error. print ; : try ( quot -- ) [ print-error-and-restarts ] recover ; -ERROR: assert got expect ; - -: assert= ( a b -- ) 2dup = [ 2drop ] [ assert ] if ; - -: depth ( -- n ) datastack length ; - -: trim-datastacks ( seq1 seq2 -- seq1' seq2' ) - 2dup [ length ] bi@ min tuck tail >r tail r> ; - -ERROR: relative-underflow stack ; - M: relative-underflow summary drop "Too many items removed from data stack" ; -ERROR: relative-overflow stack ; - M: relative-overflow summary drop "Superfluous items pushed to data stack" ; -: assert-depth ( quot -- ) - >r datastack r> dip >r datastack r> - 2dup [ length ] compare { - { +lt+ [ trim-datastacks nip relative-underflow ] } - { +eq+ [ 2drop ] } - { +gt+ [ trim-datastacks drop relative-overflow ] } - } case ; inline - : expired-error. ( obj -- ) "Object did not survive image save/load: " write third . ; @@ -264,33 +245,6 @@ M: no-compilation-unit error. M: no-vocab summary drop "Vocabulary does not exist" ; -M: bad-ptr summary - drop "Memory allocation failed" ; - -M: double-free summary - drop "Free failed since memory is not allocated" ; - -M: realloc-error summary - drop "Memory reallocation failed" ; - -: error-in-thread. ( thread -- ) - "Error in thread " write - [ - dup thread-id # - " (" % dup thread-name % - ", " % dup thread-quot unparse-short % ")" % - ] "" make swap write-object ":" print nl ; - -! Hooks -M: thread error-in-thread ( error thread -- ) - initial-thread get-global eq? [ - die drop - ] [ - global [ - error-thread get-global error-in-thread. print-error flush - ] bind - ] if ; - M: encode-error summary drop "Character encoding error" ; M: decode-error summary drop "Character decoding error" ; @@ -301,20 +255,73 @@ M: attempt-all-error summary drop "Nothing to attempt" ; M: already-disposed summary drop "Attempting to operate on disposed object" ; - +M: staging-violation summary + drop + "A parsing word cannot be used in the same file it is defined in." ; -[ init-debugger ] "debugger" add-init-hook +M: bad-number summary + drop "Bad number literal" ; + +M: duplicate-slot-names summary + drop "Duplicate slot names" ; + +M: invalid-slot-name summary + drop "Invalid slot name" ; + +: file. ( file -- ) path>> . ; + +M: source-file-error error. + [ file>> file. ] [ error>> error. ] bi ; + +M: source-file-error summary + error>> summary ; + +M: source-file-error compute-restarts + error>> compute-restarts ; + +M: source-file-error error-help + error>> error-help ; + +M: not-in-a-method-error summary + drop "call-next-method can only be called in a method definition" ; + +GENERIC: expected>string ( obj -- str ) + +M: f expected>string drop "end of input" ; +M: word expected>string name>> ; +M: string expected>string ; + +M: unexpected error. + "Expected " write + dup unexpected-want expected>string write + " but got " write + unexpected-got expected>string print ; + +M: lexer-error error. + [ lexer-dump ] [ error>> error. ] bi ; + +M: lexer-error summary + error>> summary ; + +M: lexer-error compute-restarts + error>> compute-restarts ; + +M: lexer-error error-help + error>> error-help ; + +M: object compiler-error. ( error word -- ) + nl + "While compiling " write pprint ": " print + nl + print-error ; + +M: bad-effect summary + drop "Bad stack effect declaration" ; + +M: bad-escape summary drop "Bad escape code" ; diff --git a/core/debugger/summary.txt b/basis/debugger/summary.txt similarity index 100% rename from core/debugger/summary.txt rename to basis/debugger/summary.txt diff --git a/basis/debugger/threads/threads.factor b/basis/debugger/threads/threads.factor new file mode 100644 index 0000000000..90d70f6754 --- /dev/null +++ b/basis/debugger/threads/threads.factor @@ -0,0 +1,22 @@ +! Copyright (C) 2008 Slava Pestov. +! See http://factorcode.org/license.txt for BSD license. +USING: accessors debugger continuations threads threads.private +io io.styles prettyprint kernel math.parser namespaces ; +IN: debugger.threads + +: error-in-thread. ( thread -- ) + "Error in thread " write + [ + dup id>> # + " (" % dup name>> % + ", " % dup quot>> unparse-short % ")" % + ] "" make swap write-object ":" print nl ; + +M: thread error-in-thread ( error thread -- ) + initial-thread get-global eq? [ + die drop + ] [ + global [ + error-thread get-global error-in-thread. print-error flush + ] bind + ] if ; diff --git a/extra/delegate/author.txt b/basis/delegate/author.txt similarity index 100% rename from extra/delegate/author.txt rename to basis/delegate/author.txt diff --git a/core/io/encodings/string/authors.txt b/basis/delegate/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from core/io/encodings/string/authors.txt rename to basis/delegate/authors.txt diff --git a/extra/delegate/delegate-docs.factor b/basis/delegate/delegate-docs.factor similarity index 100% rename from extra/delegate/delegate-docs.factor rename to basis/delegate/delegate-docs.factor diff --git a/extra/delegate/delegate-tests.factor b/basis/delegate/delegate-tests.factor similarity index 99% rename from extra/delegate/delegate-tests.factor rename to basis/delegate/delegate-tests.factor index bc173ab0c8..09a90121bd 100755 --- a/extra/delegate/delegate-tests.factor +++ b/basis/delegate/delegate-tests.factor @@ -1,6 +1,6 @@ USING: delegate kernel arrays tools.test words math definitions compiler.units parser generic prettyprint io.streams.string -accessors ; +accessors eval ; IN: delegate.tests TUPLE: hello this that ; diff --git a/extra/delegate/delegate.factor b/basis/delegate/delegate.factor similarity index 100% rename from extra/delegate/delegate.factor rename to basis/delegate/delegate.factor diff --git a/core/io/encodings/utf16/authors.txt b/basis/delegate/protocols/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from core/io/encodings/utf16/authors.txt rename to basis/delegate/protocols/authors.txt diff --git a/extra/delegate/protocols/protocols.factor b/basis/delegate/protocols/protocols.factor similarity index 100% rename from extra/delegate/protocols/protocols.factor rename to basis/delegate/protocols/protocols.factor diff --git a/extra/delegate/summary.txt b/basis/delegate/summary.txt similarity index 100% rename from extra/delegate/summary.txt rename to basis/delegate/summary.txt diff --git a/core/math/intervals/authors.txt b/basis/dequeues/authors.txt similarity index 100% rename from core/math/intervals/authors.txt rename to basis/dequeues/authors.txt diff --git a/core/dequeues/dequeues-docs.factor b/basis/dequeues/dequeues-docs.factor similarity index 100% rename from core/dequeues/dequeues-docs.factor rename to basis/dequeues/dequeues-docs.factor diff --git a/core/dequeues/dequeues.factor b/basis/dequeues/dequeues.factor similarity index 100% rename from core/dequeues/dequeues.factor rename to basis/dequeues/dequeues.factor diff --git a/core/dequeues/summary.txt b/basis/dequeues/summary.txt similarity index 100% rename from core/dequeues/summary.txt rename to basis/dequeues/summary.txt diff --git a/extra/bit-arrays/tags.txt b/basis/dequeues/tags.txt similarity index 100% rename from extra/bit-arrays/tags.txt rename to basis/dequeues/tags.txt diff --git a/extra/disjoint-sets/authors.txt b/basis/disjoint-sets/authors.txt similarity index 100% rename from extra/disjoint-sets/authors.txt rename to basis/disjoint-sets/authors.txt diff --git a/basis/disjoint-sets/disjoint-sets-docs.factor b/basis/disjoint-sets/disjoint-sets-docs.factor new file mode 100644 index 0000000000..b1d7cf685a --- /dev/null +++ b/basis/disjoint-sets/disjoint-sets-docs.factor @@ -0,0 +1,58 @@ +IN: disjoint-sets +USING: help.markup help.syntax kernel assocs math ; + +HELP: +{ $values { "disjoint-set" disjoint-set } } +{ $description "Creates a new disjoint set data structure with no elements." } ; + +HELP: add-atom +{ $values { "a" object } { "disjoint-set" disjoint-set } } +{ $description "Adds a new element to the disjoint set, initially only equivalent to itself." } ; + +HELP: equiv-set-size +{ $values { "a" object } { "disjoint-set" disjoint-set } { "n" integer } } +{ $description "Outputs the number of elements in the equivalence class of " { $snippet "a" } "." } ; + +HELP: equiv? +{ $values { "a" object } { "b" object } { "disjoint-set" disjoint-set } { "?" "a boolean" } } +{ $description "Tests if two elements belong to the same equivalence class." } ; + +HELP: equate +{ $values { "a" object } { "b" object } { "disjoint-set" disjoint-set } } +{ $description "Merges the equivalence classes of two elements, which must previously have been added with " { $link add-atom } "." } ; + +HELP: assoc>disjoint-set +{ $values { "assoc" assoc } { "disjoint-set" disjoint-set } } +{ $description "Given an assoc representation of a graph where the keys are vertices and key/value pairs are edges, creates a disjoint set whose elements are the keys of assoc, and two keys are equvalent if they belong to the same connected component of the graph." } +{ $examples + { $example + "USING: disjoint-sets kernel prettyprint ;" + "H{ { 1 1 } { 2 1 } { 3 4 } { 4 4 } { 5 3 } } assoc>disjoint-set" + "1 2 pick equiv? ." + "4 5 pick equiv? ." + "1 5 pick equiv? ." + "drop" + "t\nt\nf\n" + } +} ; + +ARTICLE: "disjoint-sets" "Disjoint sets" +"The " { $emphasis "disjoint set" } " data structure, also known as " { $emphasis "union-find" } " (after the two main operations which it supports) represents a set of elements partitioned into disjoint equivalence classes, or alternatively, an equivalence relation on a set." +$nl +"The two main supported operations are equating two elements, which joins their equivalence classes, and checking if two elements belong to the same equivalence class. Both operations have the time complexity of the inverse Ackermann function, which for all intents and purposes is constant time." +$nl +"The class of disjoint sets:" +{ $subsection disjoint-set } +"Creating new disjoint sets:" +{ $subsection } +{ $subsection assoc>disjoint-set } +"Queries:" +{ $subsection equiv? } +{ $subsection equiv-set-size } +"Adding elements:" +{ $subsection add-atom } +"Equating elements:" +{ $subsection equate } +"Additionally, disjoint sets implement the " { $link clone } " generic word." ; + +ABOUT: "disjoint-sets" diff --git a/extra/disjoint-sets/disjoint-sets.factor b/basis/disjoint-sets/disjoint-sets.factor similarity index 87% rename from extra/disjoint-sets/disjoint-sets.factor rename to basis/disjoint-sets/disjoint-sets.factor index 7879f3fbb6..a885e333c5 100644 --- a/extra/disjoint-sets/disjoint-sets.factor +++ b/basis/disjoint-sets/disjoint-sets.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Eric Mertens. ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays hints kernel locals math hashtables -assocs ; +assocs fry ; IN: disjoint-sets @@ -36,8 +36,6 @@ TUPLE: disjoint-set : representative? ( a disjoint-set -- ? ) dupd parent = ; inline -PRIVATE> - GENERIC: representative ( a disjoint-set -- p ) M: disjoint-set representative @@ -45,8 +43,6 @@ M: disjoint-set representative [ [ parent ] keep representative dup ] 2keep set-parent ] if ; -> ] [ ranks>> ] [ counts>> ] tri [ clone ] tri@ + disjoint-set boa ; + +: assoc>disjoint-set ( assoc -- disjoint-set ) + + [ '[ drop , add-atom ] assoc-each ] + [ '[ , equate ] assoc-each ] + [ nip ] + 2tri ; diff --git a/extra/disjoint-sets/summary.txt b/basis/disjoint-sets/summary.txt similarity index 100% rename from extra/disjoint-sets/summary.txt rename to basis/disjoint-sets/summary.txt diff --git a/extra/bit-vectors/tags.txt b/basis/disjoint-sets/tags.txt similarity index 100% rename from extra/bit-vectors/tags.txt rename to basis/disjoint-sets/tags.txt diff --git a/core/dlists/authors.txt b/basis/dlists/authors.txt similarity index 100% rename from core/dlists/authors.txt rename to basis/dlists/authors.txt diff --git a/core/dlists/dlists-docs.factor b/basis/dlists/dlists-docs.factor similarity index 100% rename from core/dlists/dlists-docs.factor rename to basis/dlists/dlists-docs.factor diff --git a/core/dlists/dlists-tests.factor b/basis/dlists/dlists-tests.factor similarity index 93% rename from core/dlists/dlists-tests.factor rename to basis/dlists/dlists-tests.factor index ff015bf95b..119a0acadb 100755 --- a/core/dlists/dlists-tests.factor +++ b/basis/dlists/dlists-tests.factor @@ -71,3 +71,9 @@ IN: dlists.tests [ peek-back ] [ empty-dlist? ] must-fail-with [ pop-front ] [ empty-dlist? ] must-fail-with [ pop-back ] [ empty-dlist? ] must-fail-with + +[ t ] [ 3 over push-front 4 over push-back 3 swap dequeue-member? ] unit-test + +[ f ] [ 3 over push-front 4 over push-back -1 swap dequeue-member? ] unit-test + +[ f ] [ 0 swap dequeue-member? ] unit-test diff --git a/core/dlists/dlists.factor b/basis/dlists/dlists.factor similarity index 97% rename from core/dlists/dlists.factor rename to basis/dlists/dlists.factor index 370ec4042f..91a5f610ad 100755 --- a/core/dlists/dlists.factor +++ b/basis/dlists/dlists.factor @@ -1,8 +1,8 @@ ! Copyright (C) 2007, 2008 Mackenzie Straight, Doug Coleman, ! Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: combinators kernel math sequences accessors summary -dequeues ; +USING: combinators kernel math sequences accessors dequeues +summary ; IN: dlists TUPLE: dlist front back length ; @@ -122,7 +122,7 @@ M: dlist pop-back* ( dlist -- ) dlist-find nip ; inline M: dlist dequeue-member? ( value dlist -- ? ) - [ = ] curry dlist-contains? ; + [ = ] with dlist-contains? ; M: dlist delete-node ( dlist-node dlist -- ) { diff --git a/core/dlists/summary.txt b/basis/dlists/summary.txt similarity index 100% rename from core/dlists/summary.txt rename to basis/dlists/summary.txt diff --git a/extra/circular/tags.txt b/basis/dlists/tags.txt similarity index 100% rename from extra/circular/tags.txt rename to basis/dlists/tags.txt diff --git a/core/mirrors/authors.txt b/basis/documents/authors.txt similarity index 100% rename from core/mirrors/authors.txt rename to basis/documents/authors.txt diff --git a/extra/documents/documents-docs.factor b/basis/documents/documents-docs.factor similarity index 100% rename from extra/documents/documents-docs.factor rename to basis/documents/documents-docs.factor diff --git a/extra/documents/documents-tests.factor b/basis/documents/documents-tests.factor similarity index 100% rename from extra/documents/documents-tests.factor rename to basis/documents/documents-tests.factor diff --git a/extra/documents/documents.factor b/basis/documents/documents.factor similarity index 100% rename from extra/documents/documents.factor rename to basis/documents/documents.factor diff --git a/extra/documents/summary.txt b/basis/documents/summary.txt similarity index 100% rename from extra/documents/summary.txt rename to basis/documents/summary.txt diff --git a/core/none/authors.txt b/basis/editors/authors.txt similarity index 100% rename from core/none/authors.txt rename to basis/editors/authors.txt diff --git a/extra/editors/editors-docs.factor b/basis/editors/editors-docs.factor similarity index 100% rename from extra/editors/editors-docs.factor rename to basis/editors/editors-docs.factor diff --git a/extra/editors/editors.factor b/basis/editors/editors.factor similarity index 100% rename from extra/editors/editors.factor rename to basis/editors/editors.factor diff --git a/extra/editors/editpadpro/authors.txt b/basis/editors/editpadpro/authors.txt similarity index 100% rename from extra/editors/editpadpro/authors.txt rename to basis/editors/editpadpro/authors.txt diff --git a/extra/editors/editpadpro/editpadpro-docs.factor b/basis/editors/editpadpro/editpadpro-docs.factor similarity index 100% rename from extra/editors/editpadpro/editpadpro-docs.factor rename to basis/editors/editpadpro/editpadpro-docs.factor diff --git a/extra/editors/editpadpro/editpadpro.factor b/basis/editors/editpadpro/editpadpro.factor similarity index 100% rename from extra/editors/editpadpro/editpadpro.factor rename to basis/editors/editpadpro/editpadpro.factor diff --git a/extra/editors/editpadpro/summary.txt b/basis/editors/editpadpro/summary.txt similarity index 100% rename from extra/editors/editpadpro/summary.txt rename to basis/editors/editpadpro/summary.txt diff --git a/basis/editors/editpadpro/tags.txt b/basis/editors/editpadpro/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/editpadpro/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/editplus/authors.txt b/basis/editors/editplus/authors.txt similarity index 100% rename from extra/editors/editplus/authors.txt rename to basis/editors/editplus/authors.txt diff --git a/extra/editors/editplus/editplus.factor b/basis/editors/editplus/editplus.factor similarity index 100% rename from extra/editors/editplus/editplus.factor rename to basis/editors/editplus/editplus.factor diff --git a/extra/editors/editplus/summary.txt b/basis/editors/editplus/summary.txt similarity index 100% rename from extra/editors/editplus/summary.txt rename to basis/editors/editplus/summary.txt diff --git a/basis/editors/editplus/tags.txt b/basis/editors/editplus/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/editplus/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/emacs/authors.txt b/basis/editors/emacs/authors.txt similarity index 100% rename from extra/editors/emacs/authors.txt rename to basis/editors/emacs/authors.txt diff --git a/extra/editors/emacs/emacs-docs.factor b/basis/editors/emacs/emacs-docs.factor similarity index 100% rename from extra/editors/emacs/emacs-docs.factor rename to basis/editors/emacs/emacs-docs.factor diff --git a/extra/editors/emacs/emacs.factor b/basis/editors/emacs/emacs.factor similarity index 100% rename from extra/editors/emacs/emacs.factor rename to basis/editors/emacs/emacs.factor diff --git a/extra/editors/emacs/summary.txt b/basis/editors/emacs/summary.txt similarity index 100% rename from extra/editors/emacs/summary.txt rename to basis/editors/emacs/summary.txt diff --git a/basis/editors/emacs/tags.txt b/basis/editors/emacs/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/emacs/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/emeditor/authors.txt b/basis/editors/emeditor/authors.txt similarity index 100% rename from extra/editors/emeditor/authors.txt rename to basis/editors/emeditor/authors.txt diff --git a/extra/editors/emeditor/emeditor.factor b/basis/editors/emeditor/emeditor.factor similarity index 100% rename from extra/editors/emeditor/emeditor.factor rename to basis/editors/emeditor/emeditor.factor diff --git a/extra/editors/emeditor/summary.txt b/basis/editors/emeditor/summary.txt similarity index 100% rename from extra/editors/emeditor/summary.txt rename to basis/editors/emeditor/summary.txt diff --git a/basis/editors/emeditor/tags.txt b/basis/editors/emeditor/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/emeditor/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/gvim/authors.txt b/basis/editors/gvim/authors.txt similarity index 100% rename from extra/editors/gvim/authors.txt rename to basis/editors/gvim/authors.txt diff --git a/extra/editors/gvim/backend/authors.txt b/basis/editors/gvim/backend/authors.txt similarity index 100% rename from extra/editors/gvim/backend/authors.txt rename to basis/editors/gvim/backend/authors.txt diff --git a/extra/editors/gvim/backend/backend.factor b/basis/editors/gvim/backend/backend.factor similarity index 100% rename from extra/editors/gvim/backend/backend.factor rename to basis/editors/gvim/backend/backend.factor diff --git a/basis/editors/gvim/backend/tags.txt b/basis/editors/gvim/backend/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/gvim/backend/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/gvim/gvim.factor b/basis/editors/gvim/gvim.factor similarity index 100% rename from extra/editors/gvim/gvim.factor rename to basis/editors/gvim/gvim.factor diff --git a/extra/editors/gvim/summary.txt b/basis/editors/gvim/summary.txt similarity index 100% rename from extra/editors/gvim/summary.txt rename to basis/editors/gvim/summary.txt diff --git a/basis/editors/gvim/tags.txt b/basis/editors/gvim/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/gvim/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/gvim/unix/authors.txt b/basis/editors/gvim/unix/authors.txt similarity index 100% rename from extra/editors/gvim/unix/authors.txt rename to basis/editors/gvim/unix/authors.txt diff --git a/basis/editors/gvim/unix/tags.txt b/basis/editors/gvim/unix/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/gvim/unix/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/gvim/unix/unix.factor b/basis/editors/gvim/unix/unix.factor similarity index 100% rename from extra/editors/gvim/unix/unix.factor rename to basis/editors/gvim/unix/unix.factor diff --git a/extra/editors/gvim/windows/authors.txt b/basis/editors/gvim/windows/authors.txt similarity index 100% rename from extra/editors/gvim/windows/authors.txt rename to basis/editors/gvim/windows/authors.txt diff --git a/basis/editors/gvim/windows/tags.txt b/basis/editors/gvim/windows/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/gvim/windows/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/gvim/windows/windows.factor b/basis/editors/gvim/windows/windows.factor similarity index 100% rename from extra/editors/gvim/windows/windows.factor rename to basis/editors/gvim/windows/windows.factor diff --git a/core/optimizer/authors.txt b/basis/editors/jedit/authors.txt similarity index 100% rename from core/optimizer/authors.txt rename to basis/editors/jedit/authors.txt diff --git a/extra/editors/jedit/jedit.factor b/basis/editors/jedit/jedit.factor similarity index 100% rename from extra/editors/jedit/jedit.factor rename to basis/editors/jedit/jedit.factor diff --git a/extra/editors/jedit/summary.txt b/basis/editors/jedit/summary.txt similarity index 100% rename from extra/editors/jedit/summary.txt rename to basis/editors/jedit/summary.txt diff --git a/basis/editors/jedit/tags.txt b/basis/editors/jedit/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/jedit/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/notepadpp/authors.txt b/basis/editors/notepadpp/authors.txt similarity index 100% rename from extra/editors/notepadpp/authors.txt rename to basis/editors/notepadpp/authors.txt diff --git a/extra/editors/notepadpp/notepadpp.factor b/basis/editors/notepadpp/notepadpp.factor similarity index 100% rename from extra/editors/notepadpp/notepadpp.factor rename to basis/editors/notepadpp/notepadpp.factor diff --git a/extra/editors/notepadpp/summary.txt b/basis/editors/notepadpp/summary.txt similarity index 100% rename from extra/editors/notepadpp/summary.txt rename to basis/editors/notepadpp/summary.txt diff --git a/basis/editors/notepadpp/tags.txt b/basis/editors/notepadpp/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/notepadpp/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/scite/authors.txt b/basis/editors/scite/authors.txt similarity index 100% rename from extra/editors/scite/authors.txt rename to basis/editors/scite/authors.txt diff --git a/extra/editors/scite/scite.factor b/basis/editors/scite/scite.factor similarity index 100% rename from extra/editors/scite/scite.factor rename to basis/editors/scite/scite.factor diff --git a/extra/editors/scite/summary.txt b/basis/editors/scite/summary.txt similarity index 100% rename from extra/editors/scite/summary.txt rename to basis/editors/scite/summary.txt diff --git a/basis/editors/scite/tags.txt b/basis/editors/scite/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/scite/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/summary.txt b/basis/editors/summary.txt similarity index 100% rename from extra/editors/summary.txt rename to basis/editors/summary.txt diff --git a/core/listener/tags.txt b/basis/editors/tags.txt similarity index 100% rename from core/listener/tags.txt rename to basis/editors/tags.txt diff --git a/extra/editors/ted-notepad/authors.txt b/basis/editors/ted-notepad/authors.txt similarity index 100% rename from extra/editors/ted-notepad/authors.txt rename to basis/editors/ted-notepad/authors.txt diff --git a/extra/editors/ted-notepad/summary.txt b/basis/editors/ted-notepad/summary.txt similarity index 100% rename from extra/editors/ted-notepad/summary.txt rename to basis/editors/ted-notepad/summary.txt diff --git a/basis/editors/ted-notepad/tags.txt b/basis/editors/ted-notepad/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/ted-notepad/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/ted-notepad/ted-notepad.factor b/basis/editors/ted-notepad/ted-notepad.factor similarity index 100% rename from extra/editors/ted-notepad/ted-notepad.factor rename to basis/editors/ted-notepad/ted-notepad.factor diff --git a/extra/editors/textmate/authors.txt b/basis/editors/textmate/authors.txt similarity index 100% rename from extra/editors/textmate/authors.txt rename to basis/editors/textmate/authors.txt diff --git a/extra/editors/textmate/summary.txt b/basis/editors/textmate/summary.txt similarity index 100% rename from extra/editors/textmate/summary.txt rename to basis/editors/textmate/summary.txt diff --git a/basis/editors/textmate/tags.txt b/basis/editors/textmate/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/textmate/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/textmate/textmate.factor b/basis/editors/textmate/textmate.factor similarity index 100% rename from extra/editors/textmate/textmate.factor rename to basis/editors/textmate/textmate.factor diff --git a/extra/editors/textwrangler/authors.txt b/basis/editors/textwrangler/authors.txt similarity index 100% rename from extra/editors/textwrangler/authors.txt rename to basis/editors/textwrangler/authors.txt diff --git a/extra/editors/textwrangler/summary.txt b/basis/editors/textwrangler/summary.txt similarity index 100% rename from extra/editors/textwrangler/summary.txt rename to basis/editors/textwrangler/summary.txt diff --git a/basis/editors/textwrangler/tags.txt b/basis/editors/textwrangler/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/textwrangler/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/textwrangler/textwrangler.factor b/basis/editors/textwrangler/textwrangler.factor similarity index 100% rename from extra/editors/textwrangler/textwrangler.factor rename to basis/editors/textwrangler/textwrangler.factor diff --git a/extra/editors/ultraedit/authors.txt b/basis/editors/ultraedit/authors.txt similarity index 100% rename from extra/editors/ultraedit/authors.txt rename to basis/editors/ultraedit/authors.txt diff --git a/extra/editors/ultraedit/summary.txt b/basis/editors/ultraedit/summary.txt similarity index 100% rename from extra/editors/ultraedit/summary.txt rename to basis/editors/ultraedit/summary.txt diff --git a/basis/editors/ultraedit/tags.txt b/basis/editors/ultraedit/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/ultraedit/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/ultraedit/ultraedit.factor b/basis/editors/ultraedit/ultraedit.factor similarity index 100% rename from extra/editors/ultraedit/ultraedit.factor rename to basis/editors/ultraedit/ultraedit.factor diff --git a/extra/editors/vim/authors.txt b/basis/editors/vim/authors.txt similarity index 100% rename from extra/editors/vim/authors.txt rename to basis/editors/vim/authors.txt diff --git a/extra/editors/vim/generate-syntax/generate-syntax.factor b/basis/editors/vim/generate-syntax/generate-syntax.factor similarity index 100% rename from extra/editors/vim/generate-syntax/generate-syntax.factor rename to basis/editors/vim/generate-syntax/generate-syntax.factor diff --git a/basis/editors/vim/generate-syntax/tags.txt b/basis/editors/vim/generate-syntax/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/vim/generate-syntax/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/vim/summary.txt b/basis/editors/vim/summary.txt similarity index 100% rename from extra/editors/vim/summary.txt rename to basis/editors/vim/summary.txt diff --git a/basis/editors/vim/tags.txt b/basis/editors/vim/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/vim/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/vim/vim-docs.factor b/basis/editors/vim/vim-docs.factor similarity index 100% rename from extra/editors/vim/vim-docs.factor rename to basis/editors/vim/vim-docs.factor diff --git a/extra/editors/vim/vim.factor b/basis/editors/vim/vim.factor similarity index 100% rename from extra/editors/vim/vim.factor rename to basis/editors/vim/vim.factor diff --git a/extra/editors/wordpad/authors.txt b/basis/editors/wordpad/authors.txt similarity index 100% rename from extra/editors/wordpad/authors.txt rename to basis/editors/wordpad/authors.txt diff --git a/extra/editors/wordpad/summary.txt b/basis/editors/wordpad/summary.txt similarity index 100% rename from extra/editors/wordpad/summary.txt rename to basis/editors/wordpad/summary.txt diff --git a/basis/editors/wordpad/tags.txt b/basis/editors/wordpad/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/wordpad/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/editors/wordpad/wordpad.factor b/basis/editors/wordpad/wordpad.factor similarity index 100% rename from extra/editors/wordpad/wordpad.factor rename to basis/editors/wordpad/wordpad.factor diff --git a/basis/eval/eval-docs.factor b/basis/eval/eval-docs.factor new file mode 100644 index 0000000000..057d291b7f --- /dev/null +++ b/basis/eval/eval-docs.factor @@ -0,0 +1,18 @@ +IN: eval +USING: help.markup help.syntax strings io ; + +HELP: eval +{ $values { "str" string } } +{ $description "Parses Factor source code from a string, and calls the resulting quotation." } +{ $errors "Throws an error if the input is malformed, or if the evaluation itself throws an error." } ; + +HELP: eval>string +{ $values { "str" string } { "output" 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:" +{ $subsection eval } +{ $subsection eval>string } ; + +ABOUT: "eval" diff --git a/basis/eval/eval.factor b/basis/eval/eval.factor new file mode 100644 index 0000000000..5b22fec159 --- /dev/null +++ b/basis/eval/eval.factor @@ -0,0 +1,14 @@ +! Copyright (C) 2008 Slava Pestov. +! See http://factorcode.org/license.txt for BSD license. +USING: splitting parser compiler.units kernel namespaces +debugger io.streams.string ; +IN: eval + +: eval ( str -- ) + [ string-lines parse-fresh ] with-compilation-unit call ; + +: eval>string ( str -- output ) + [ + parser-notes off + [ [ eval ] keep ] try drop + ] with-string-writer ; diff --git a/core/optimizer/backend/authors.txt b/basis/float-arrays/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from core/optimizer/backend/authors.txt rename to basis/float-arrays/authors.txt diff --git a/extra/float-arrays/float-arrays-docs.factor b/basis/float-arrays/float-arrays-docs.factor similarity index 100% rename from extra/float-arrays/float-arrays-docs.factor rename to basis/float-arrays/float-arrays-docs.factor diff --git a/extra/float-arrays/float-arrays-tests.factor b/basis/float-arrays/float-arrays-tests.factor similarity index 100% rename from extra/float-arrays/float-arrays-tests.factor rename to basis/float-arrays/float-arrays-tests.factor diff --git a/extra/float-arrays/float-arrays.factor b/basis/float-arrays/float-arrays.factor similarity index 100% rename from extra/float-arrays/float-arrays.factor rename to basis/float-arrays/float-arrays.factor diff --git a/extra/float-arrays/summary.txt b/basis/float-arrays/summary.txt similarity index 100% rename from extra/float-arrays/summary.txt rename to basis/float-arrays/summary.txt diff --git a/extra/columns/tags.txt b/basis/float-arrays/tags.txt similarity index 100% rename from extra/columns/tags.txt rename to basis/float-arrays/tags.txt diff --git a/extra/float-vectors/float-vectors-docs.factor b/basis/float-vectors/float-vectors-docs.factor similarity index 100% rename from extra/float-vectors/float-vectors-docs.factor rename to basis/float-vectors/float-vectors-docs.factor diff --git a/extra/float-vectors/float-vectors-tests.factor b/basis/float-vectors/float-vectors-tests.factor similarity index 100% rename from extra/float-vectors/float-vectors-tests.factor rename to basis/float-vectors/float-vectors-tests.factor diff --git a/extra/float-vectors/float-vectors.factor b/basis/float-vectors/float-vectors.factor similarity index 100% rename from extra/float-vectors/float-vectors.factor rename to basis/float-vectors/float-vectors.factor diff --git a/extra/float-vectors/summary.txt b/basis/float-vectors/summary.txt similarity index 100% rename from extra/float-vectors/summary.txt rename to basis/float-vectors/summary.txt diff --git a/extra/disjoint-sets/tags.txt b/basis/float-vectors/tags.txt similarity index 100% rename from extra/disjoint-sets/tags.txt rename to basis/float-vectors/tags.txt diff --git a/core/optimizer/def-use/authors.txt b/basis/freetype/authors.txt similarity index 100% rename from core/optimizer/def-use/authors.txt rename to basis/freetype/authors.txt diff --git a/extra/freetype/freetype.factor b/basis/freetype/freetype.factor similarity index 100% rename from extra/freetype/freetype.factor rename to basis/freetype/freetype.factor diff --git a/extra/freetype/summary.txt b/basis/freetype/summary.txt similarity index 100% rename from extra/freetype/summary.txt rename to basis/freetype/summary.txt diff --git a/core/libc/tags.txt b/basis/freetype/tags.txt similarity index 100% rename from core/libc/tags.txt rename to basis/freetype/tags.txt diff --git a/extra/fry/authors.txt b/basis/fry/authors.txt similarity index 100% rename from extra/fry/authors.txt rename to basis/fry/authors.txt diff --git a/extra/fry/fry-docs.factor b/basis/fry/fry-docs.factor similarity index 100% rename from extra/fry/fry-docs.factor rename to basis/fry/fry-docs.factor diff --git a/extra/fry/fry-tests.factor b/basis/fry/fry-tests.factor similarity index 100% rename from extra/fry/fry-tests.factor rename to basis/fry/fry-tests.factor diff --git a/extra/fry/fry.factor b/basis/fry/fry.factor similarity index 100% rename from extra/fry/fry.factor rename to basis/fry/fry.factor diff --git a/extra/fry/summary.txt b/basis/fry/summary.txt similarity index 100% rename from extra/fry/summary.txt rename to basis/fry/summary.txt diff --git a/extra/fry/tags.txt b/basis/fry/tags.txt similarity index 100% rename from extra/fry/tags.txt rename to basis/fry/tags.txt diff --git a/extra/generalizations/generalizations-docs.factor b/basis/generalizations/generalizations-docs.factor similarity index 100% rename from extra/generalizations/generalizations-docs.factor rename to basis/generalizations/generalizations-docs.factor diff --git a/extra/generalizations/generalizations-tests.factor b/basis/generalizations/generalizations-tests.factor similarity index 100% rename from extra/generalizations/generalizations-tests.factor rename to basis/generalizations/generalizations-tests.factor diff --git a/extra/generalizations/generalizations.factor b/basis/generalizations/generalizations.factor similarity index 100% rename from extra/generalizations/generalizations.factor rename to basis/generalizations/generalizations.factor diff --git a/core/optimizer/known-words/authors.txt b/basis/generator/authors.txt similarity index 100% rename from core/optimizer/known-words/authors.txt rename to basis/generator/authors.txt diff --git a/core/optimizer/math/authors.txt b/basis/generator/fixup/authors.txt similarity index 100% rename from core/optimizer/math/authors.txt rename to basis/generator/fixup/authors.txt diff --git a/core/generator/fixup/fixup-docs.factor b/basis/generator/fixup/fixup-docs.factor similarity index 100% rename from core/generator/fixup/fixup-docs.factor rename to basis/generator/fixup/fixup-docs.factor diff --git a/core/generator/fixup/fixup.factor b/basis/generator/fixup/fixup.factor similarity index 100% rename from core/generator/fixup/fixup.factor rename to basis/generator/fixup/fixup.factor diff --git a/core/generator/fixup/summary.txt b/basis/generator/fixup/summary.txt similarity index 100% rename from core/generator/fixup/summary.txt rename to basis/generator/fixup/summary.txt diff --git a/core/generator/generator-docs.factor b/basis/generator/generator-docs.factor similarity index 100% rename from core/generator/generator-docs.factor rename to basis/generator/generator-docs.factor diff --git a/core/generator/generator.factor b/basis/generator/generator.factor similarity index 100% rename from core/generator/generator.factor rename to basis/generator/generator.factor diff --git a/core/optimizer/pattern-match/authors.txt b/basis/generator/registers/authors.txt similarity index 100% rename from core/optimizer/pattern-match/authors.txt rename to basis/generator/registers/authors.txt diff --git a/core/generator/registers/registers.factor b/basis/generator/registers/registers.factor similarity index 100% rename from core/generator/registers/registers.factor rename to basis/generator/registers/registers.factor diff --git a/core/generator/registers/summary.txt b/basis/generator/registers/summary.txt similarity index 100% rename from core/generator/registers/summary.txt rename to basis/generator/registers/summary.txt diff --git a/core/generator/summary.txt b/basis/generator/summary.txt similarity index 100% rename from core/generator/summary.txt rename to basis/generator/summary.txt diff --git a/core/cpu/ppc/tags.txt b/basis/generator/tags.txt similarity index 100% rename from core/cpu/ppc/tags.txt rename to basis/generator/tags.txt diff --git a/extra/delegate/authors.txt b/basis/hash2/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/delegate/authors.txt rename to basis/hash2/authors.txt diff --git a/extra/hash2/hash2-docs.factor b/basis/hash2/hash2-docs.factor similarity index 100% rename from extra/hash2/hash2-docs.factor rename to basis/hash2/hash2-docs.factor diff --git a/extra/hash2/hash2-tests.factor b/basis/hash2/hash2-tests.factor similarity index 100% rename from extra/hash2/hash2-tests.factor rename to basis/hash2/hash2-tests.factor diff --git a/extra/hash2/hash2.factor b/basis/hash2/hash2.factor similarity index 100% rename from extra/hash2/hash2.factor rename to basis/hash2/hash2.factor diff --git a/extra/hash2/summary.txt b/basis/hash2/summary.txt similarity index 100% rename from extra/hash2/summary.txt rename to basis/hash2/summary.txt diff --git a/extra/float-arrays/tags.txt b/basis/hash2/tags.txt similarity index 100% rename from extra/float-arrays/tags.txt rename to basis/hash2/tags.txt diff --git a/core/heaps/authors.txt b/basis/heaps/authors.txt similarity index 100% rename from core/heaps/authors.txt rename to basis/heaps/authors.txt diff --git a/core/heaps/heaps-docs.factor b/basis/heaps/heaps-docs.factor similarity index 100% rename from core/heaps/heaps-docs.factor rename to basis/heaps/heaps-docs.factor diff --git a/core/heaps/heaps-tests.factor b/basis/heaps/heaps-tests.factor similarity index 100% rename from core/heaps/heaps-tests.factor rename to basis/heaps/heaps-tests.factor diff --git a/core/heaps/heaps.factor b/basis/heaps/heaps.factor similarity index 100% rename from core/heaps/heaps.factor rename to basis/heaps/heaps.factor diff --git a/core/heaps/summary.txt b/basis/heaps/summary.txt similarity index 100% rename from core/heaps/summary.txt rename to basis/heaps/summary.txt diff --git a/extra/float-vectors/tags.txt b/basis/heaps/tags.txt similarity index 100% rename from extra/float-vectors/tags.txt rename to basis/heaps/tags.txt diff --git a/core/prettyprint/authors.txt b/basis/help/authors.txt similarity index 100% rename from core/prettyprint/authors.txt rename to basis/help/authors.txt diff --git a/core/prettyprint/backend/authors.txt b/basis/help/cookbook/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from core/prettyprint/backend/authors.txt rename to basis/help/cookbook/authors.txt diff --git a/extra/help/cookbook/cookbook.factor b/basis/help/cookbook/cookbook.factor similarity index 100% rename from extra/help/cookbook/cookbook.factor rename to basis/help/cookbook/cookbook.factor diff --git a/core/prettyprint/config/authors.txt b/basis/help/crossref/authors.txt similarity index 100% rename from core/prettyprint/config/authors.txt rename to basis/help/crossref/authors.txt diff --git a/extra/help/crossref/crossref-docs.factor b/basis/help/crossref/crossref-docs.factor similarity index 100% rename from extra/help/crossref/crossref-docs.factor rename to basis/help/crossref/crossref-docs.factor diff --git a/extra/help/crossref/crossref-tests.factor b/basis/help/crossref/crossref-tests.factor similarity index 96% rename from extra/help/crossref/crossref-tests.factor rename to basis/help/crossref/crossref-tests.factor index 1d569d8a8f..2e8c173944 100755 --- a/extra/help/crossref/crossref-tests.factor +++ b/basis/help/crossref/crossref-tests.factor @@ -1,7 +1,7 @@ IN: help.crossref.tests USING: help.crossref help.topics help.markup tools.test words definitions assocs sequences kernel namespaces parser arrays -io.streams.string continuations debugger compiler.units ; +io.streams.string continuations debugger compiler.units eval ; [ ] [ "IN: help.crossref.tests USING: help.syntax help.markup ; : foo ; HELP: foo \"foo is great\" ; ARTICLE: \"foo\" \"Foo\" { $subsection foo } ;" eval diff --git a/extra/help/crossref/crossref.factor b/basis/help/crossref/crossref.factor similarity index 100% rename from extra/help/crossref/crossref.factor rename to basis/help/crossref/crossref.factor diff --git a/extra/help/crossref/summary.txt b/basis/help/crossref/summary.txt similarity index 100% rename from extra/help/crossref/summary.txt rename to basis/help/crossref/summary.txt diff --git a/core/prettyprint/sections/authors.txt b/basis/help/definitions/authors.txt similarity index 100% rename from core/prettyprint/sections/authors.txt rename to basis/help/definitions/authors.txt diff --git a/extra/help/definitions/definitions-tests.factor b/basis/help/definitions/definitions-tests.factor similarity index 96% rename from extra/help/definitions/definitions-tests.factor rename to basis/help/definitions/definitions-tests.factor index 7134c6b0b0..2c894c3812 100755 --- a/extra/help/definitions/definitions-tests.factor +++ b/basis/help/definitions/definitions-tests.factor @@ -1,6 +1,6 @@ USING: math definitions help.topics help tools.test prettyprint parser io.streams.string kernel source-files -assocs namespaces words io sequences ; +assocs namespaces words io sequences eval ; IN: help.definitions.tests [ ] [ \ + >link see ] unit-test diff --git a/extra/help/definitions/definitions.factor b/basis/help/definitions/definitions.factor similarity index 100% rename from extra/help/definitions/definitions.factor rename to basis/help/definitions/definitions.factor diff --git a/extra/help/definitions/summary.txt b/basis/help/definitions/summary.txt similarity index 100% rename from extra/help/definitions/summary.txt rename to basis/help/definitions/summary.txt diff --git a/core/refs/authors.txt b/basis/help/handbook/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from core/refs/authors.txt rename to basis/help/handbook/authors.txt diff --git a/extra/help/handbook/handbook-tests.factor b/basis/help/handbook/handbook-tests.factor similarity index 100% rename from extra/help/handbook/handbook-tests.factor rename to basis/help/handbook/handbook-tests.factor diff --git a/extra/help/handbook/handbook.factor b/basis/help/handbook/handbook.factor similarity index 100% rename from extra/help/handbook/handbook.factor rename to basis/help/handbook/handbook.factor diff --git a/extra/help/handbook/summary.txt b/basis/help/handbook/summary.txt similarity index 100% rename from extra/help/handbook/summary.txt rename to basis/help/handbook/summary.txt diff --git a/extra/help/help-docs.factor b/basis/help/help-docs.factor similarity index 100% rename from extra/help/help-docs.factor rename to basis/help/help-docs.factor diff --git a/extra/help/help-tests.factor b/basis/help/help-tests.factor similarity index 100% rename from extra/help/help-tests.factor rename to basis/help/help-tests.factor diff --git a/extra/help/help.factor b/basis/help/help.factor similarity index 93% rename from extra/help/help.factor rename to basis/help/help.factor index 2ebb914564..7535ba8c1a 100755 --- a/extra/help/help.factor +++ b/basis/help/help.factor @@ -1,10 +1,10 @@ ! Copyright (C) 2005, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors arrays io kernel namespaces 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 ; +USING: accessors arrays io io.styles kernel namespaces 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 ; IN: help GENERIC: word-help* ( word -- content ) diff --git a/extra/help/html/html.factor b/basis/help/html/html.factor similarity index 100% rename from extra/help/html/html.factor rename to basis/help/html/html.factor diff --git a/core/search-dequeues/authors.txt b/basis/help/lint/authors.txt similarity index 100% rename from core/search-dequeues/authors.txt rename to basis/help/lint/authors.txt diff --git a/extra/help/lint/lint-docs.factor b/basis/help/lint/lint-docs.factor similarity index 100% rename from extra/help/lint/lint-docs.factor rename to basis/help/lint/lint-docs.factor diff --git a/extra/help/lint/lint.factor b/basis/help/lint/lint.factor similarity index 99% rename from extra/help/lint/lint.factor rename to basis/help/lint/lint.factor index 0926a30adc..9cbffe2d33 100755 --- a/extra/help/lint/lint.factor +++ b/basis/help/lint/lint.factor @@ -5,7 +5,7 @@ help.topics words strings classes tools.vocabs namespaces io io.streams.string prettyprint definitions arrays vectors combinators splitting debugger hashtables sorting effects vocabs vocabs.loader assocs editors continuations classes.predicate -macros math sets ; +macros math sets eval ; IN: help.lint : check-example ( element -- ) diff --git a/extra/help/lint/summary.txt b/basis/help/lint/summary.txt similarity index 100% rename from extra/help/lint/summary.txt rename to basis/help/lint/summary.txt diff --git a/extra/editors/tags.txt b/basis/help/lint/tags.txt similarity index 100% rename from extra/editors/tags.txt rename to basis/help/lint/tags.txt diff --git a/core/threads/authors.txt b/basis/help/markup/authors.txt similarity index 100% rename from core/threads/authors.txt rename to basis/help/markup/authors.txt diff --git a/extra/help/markup/markup-tests.factor b/basis/help/markup/markup-tests.factor similarity index 100% rename from extra/help/markup/markup-tests.factor rename to basis/help/markup/markup-tests.factor diff --git a/extra/help/markup/markup.factor b/basis/help/markup/markup.factor similarity index 100% rename from extra/help/markup/markup.factor rename to basis/help/markup/markup.factor diff --git a/extra/help/markup/summary.txt b/basis/help/markup/summary.txt similarity index 100% rename from extra/help/markup/summary.txt rename to basis/help/markup/summary.txt diff --git a/extra/ascii/authors.txt b/basis/help/stylesheet/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/ascii/authors.txt rename to basis/help/stylesheet/authors.txt diff --git a/extra/help/stylesheet/stylesheet.factor b/basis/help/stylesheet/stylesheet.factor similarity index 81% rename from extra/help/stylesheet/stylesheet.factor rename to basis/help/stylesheet/stylesheet.factor index 68810e2369..50357db8cf 100755 --- a/extra/help/stylesheet/stylesheet.factor +++ b/basis/help/stylesheet/stylesheet.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2005, 2006 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: io.styles namespaces ; +USING: io.styles namespaces colors ; IN: help.stylesheet SYMBOL: default-span-style @@ -17,7 +17,7 @@ H{ SYMBOL: link-style H{ - { foreground { 0 0 0.3 1 } } + { foreground T{ rgba f 0 0 0.3 1 } } { font-style bold } } link-style set-global @@ -33,7 +33,7 @@ H{ { font-size 18 } { font-style bold } { wrap-margin 500 } - { page-color { 0.8 0.8 0.8 1 } } + { page-color T{ rgba f 0.8 0.8 0.8 1 } } { border-width 5 } } title-style set-global @@ -58,12 +58,12 @@ SYMBOL: snippet-style H{ { font "monospace" } { font-size 12 } - { foreground { 0.1 0.1 0.4 1 } } + { foreground T{ rgba f 0.1 0.1 0.4 1 } } } snippet-style set-global SYMBOL: code-style H{ - { page-color { 0.8 0.8 0.8 0.5 } } + { page-color T{ rgba f 0.8 0.8 0.8 0.5 } } { border-width 5 } { wrap-margin f } } code-style set-global @@ -74,13 +74,13 @@ H{ { font-style bold } } input-style set-global SYMBOL: url-style H{ { font "monospace" } - { foreground { 0.0 0.0 1.0 1.0 } } + { foreground T{ rgba f 0.0 0.0 1.0 1.0 } } } url-style set-global SYMBOL: warning-style H{ - { page-color { 0.95 0.95 0.95 1 } } - { border-color { 1 0 0 1 } } + { page-color T{ rgba f 0.95 0.95 0.95 1 } } + { border-color T{ rgba f 1 0 0 1 } } { border-width 5 } { wrap-margin 500 } } warning-style set-global @@ -93,7 +93,7 @@ H{ SYMBOL: table-style H{ { table-gap { 5 5 } } - { table-border { 0.8 0.8 0.8 1.0 } } + { table-border T{ rgba f 0.8 0.8 0.8 1.0 } } } table-style set-global SYMBOL: list-style diff --git a/extra/help/stylesheet/summary.txt b/basis/help/stylesheet/summary.txt similarity index 100% rename from extra/help/stylesheet/summary.txt rename to basis/help/stylesheet/summary.txt diff --git a/extra/help/summary.txt b/basis/help/summary.txt similarity index 100% rename from extra/help/summary.txt rename to basis/help/summary.txt diff --git a/extra/biassocs/authors.txt b/basis/help/syntax/authors.txt similarity index 100% rename from extra/biassocs/authors.txt rename to basis/help/syntax/authors.txt diff --git a/extra/help/syntax/summary.txt b/basis/help/syntax/summary.txt similarity index 100% rename from extra/help/syntax/summary.txt rename to basis/help/syntax/summary.txt diff --git a/extra/help/syntax/syntax-tests.factor b/basis/help/syntax/syntax-tests.factor similarity index 87% rename from extra/help/syntax/syntax-tests.factor rename to basis/help/syntax/syntax-tests.factor index 5d8a1a0b78..68306263a5 100755 --- a/extra/help/syntax/syntax-tests.factor +++ b/basis/help/syntax/syntax-tests.factor @@ -1,5 +1,5 @@ IN: help.syntax.tests -USING: tools.test parser vocabs help.syntax namespaces ; +USING: tools.test parser vocabs help.syntax namespaces eval ; [ [ "foobar" ] [ diff --git a/extra/help/syntax/syntax.factor b/basis/help/syntax/syntax.factor similarity index 100% rename from extra/help/syntax/syntax.factor rename to basis/help/syntax/syntax.factor diff --git a/extra/bit-arrays/authors.txt b/basis/help/topics/authors.txt similarity index 100% rename from extra/bit-arrays/authors.txt rename to basis/help/topics/authors.txt diff --git a/extra/help/topics/summary.txt b/basis/help/topics/summary.txt similarity index 100% rename from extra/help/topics/summary.txt rename to basis/help/topics/summary.txt diff --git a/extra/help/topics/topics-docs.factor b/basis/help/topics/topics-docs.factor similarity index 98% rename from extra/help/topics/topics-docs.factor rename to basis/help/topics/topics-docs.factor index 8afdb59245..f2f3e8e82f 100644 --- a/extra/help/topics/topics-docs.factor +++ b/basis/help/topics/topics-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax help.topics help.crossref help io -hashtables ; +io.styles hashtables ; HELP: articles { $var-description "Hashtable mapping article names to " { $link article } " instances." } ; diff --git a/extra/help/topics/topics-tests.factor b/basis/help/topics/topics-tests.factor similarity index 96% rename from extra/help/topics/topics-tests.factor rename to basis/help/topics/topics-tests.factor index 1099f747bc..a343aa1734 100644 --- a/extra/help/topics/topics-tests.factor +++ b/basis/help/topics/topics-tests.factor @@ -1,6 +1,6 @@ USING: definitions help help.topics help.crossref help.markup help.syntax kernel sequences tools.test words parser namespaces -assocs source-files ; +assocs source-files eval ; IN: help.topics.tests ! Test help cross-referencing diff --git a/extra/help/topics/topics.factor b/basis/help/topics/topics.factor similarity index 100% rename from extra/help/topics/topics.factor rename to basis/help/topics/topics.factor diff --git a/extra/bootstrap/help/authors.txt b/basis/help/tutorial/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/bootstrap/help/authors.txt rename to basis/help/tutorial/authors.txt diff --git a/extra/help/tutorial/tutorial.factor b/basis/help/tutorial/tutorial.factor similarity index 100% rename from extra/help/tutorial/tutorial.factor rename to basis/help/tutorial/tutorial.factor diff --git a/extra/bootstrap/image/download/authors.txt b/basis/hints/authors.txt similarity index 100% rename from extra/bootstrap/image/download/authors.txt rename to basis/hints/authors.txt diff --git a/extra/hints/hints.factor b/basis/hints/hints.factor similarity index 100% rename from extra/hints/hints.factor rename to basis/hints/hints.factor diff --git a/extra/hints/summary.txt b/basis/hints/summary.txt similarity index 100% rename from extra/hints/summary.txt rename to basis/hints/summary.txt diff --git a/extra/hints/tags.txt b/basis/hints/tags.txt similarity index 100% rename from extra/hints/tags.txt rename to basis/hints/tags.txt diff --git a/extra/bootstrap/image/upload/authors.txt b/basis/inference/authors.txt similarity index 100% rename from extra/bootstrap/image/upload/authors.txt rename to basis/inference/authors.txt diff --git a/extra/bootstrap/io/authors.txt b/basis/inference/backend/authors.txt similarity index 100% rename from extra/bootstrap/io/authors.txt rename to basis/inference/backend/authors.txt diff --git a/core/inference/backend/backend-docs.factor b/basis/inference/backend/backend-docs.factor similarity index 100% rename from core/inference/backend/backend-docs.factor rename to basis/inference/backend/backend-docs.factor diff --git a/core/inference/backend/backend.factor b/basis/inference/backend/backend.factor similarity index 100% rename from core/inference/backend/backend.factor rename to basis/inference/backend/backend.factor diff --git a/core/inference/backend/summary.txt b/basis/inference/backend/summary.txt similarity index 100% rename from core/inference/backend/summary.txt rename to basis/inference/backend/summary.txt diff --git a/extra/bootstrap/tools/authors.txt b/basis/inference/class/authors.txt similarity index 100% rename from extra/bootstrap/tools/authors.txt rename to basis/inference/class/authors.txt diff --git a/core/inference/class/class-tests.factor b/basis/inference/class/class-tests.factor similarity index 100% rename from core/inference/class/class-tests.factor rename to basis/inference/class/class-tests.factor diff --git a/core/inference/class/class.factor b/basis/inference/class/class.factor similarity index 100% rename from core/inference/class/class.factor rename to basis/inference/class/class.factor diff --git a/core/inference/class/summary.txt b/basis/inference/class/summary.txt similarity index 100% rename from core/inference/class/summary.txt rename to basis/inference/class/summary.txt diff --git a/extra/cocoa/application/authors.txt b/basis/inference/dataflow/authors.txt similarity index 100% rename from extra/cocoa/application/authors.txt rename to basis/inference/dataflow/authors.txt diff --git a/core/inference/dataflow/dataflow-docs.factor b/basis/inference/dataflow/dataflow-docs.factor similarity index 100% rename from core/inference/dataflow/dataflow-docs.factor rename to basis/inference/dataflow/dataflow-docs.factor diff --git a/core/inference/dataflow/dataflow.factor b/basis/inference/dataflow/dataflow.factor similarity index 100% rename from core/inference/dataflow/dataflow.factor rename to basis/inference/dataflow/dataflow.factor diff --git a/core/inference/dataflow/summary.txt b/basis/inference/dataflow/summary.txt similarity index 100% rename from core/inference/dataflow/summary.txt rename to basis/inference/dataflow/summary.txt diff --git a/extra/cocoa/authors.txt b/basis/inference/errors/authors.txt similarity index 100% rename from extra/cocoa/authors.txt rename to basis/inference/errors/authors.txt diff --git a/core/inference/errors/errors.factor b/basis/inference/errors/errors.factor similarity index 100% rename from core/inference/errors/errors.factor rename to basis/inference/errors/errors.factor diff --git a/core/inference/errors/summary.txt b/basis/inference/errors/summary.txt similarity index 100% rename from core/inference/errors/summary.txt rename to basis/inference/errors/summary.txt diff --git a/core/inference/inference-docs.factor b/basis/inference/inference-docs.factor similarity index 100% rename from core/inference/inference-docs.factor rename to basis/inference/inference-docs.factor diff --git a/core/inference/inference-tests.factor b/basis/inference/inference-tests.factor similarity index 99% rename from core/inference/inference-tests.factor rename to basis/inference/inference-tests.factor index d66821e230..22a384f235 100755 --- a/core/inference/inference-tests.factor +++ b/basis/inference/inference-tests.factor @@ -5,7 +5,7 @@ sequences strings vectors words 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 ; +io.timeouts io.thread sequences.private destructors eval ; IN: inference.tests [ ] [ [ 1 ] dataflow [ ] transform-nodes drop ] unit-test diff --git a/core/inference/inference.factor b/basis/inference/inference.factor similarity index 100% rename from core/inference/inference.factor rename to basis/inference/inference.factor diff --git a/extra/cocoa/dialogs/authors.txt b/basis/inference/known-words/authors.txt similarity index 100% rename from extra/cocoa/dialogs/authors.txt rename to basis/inference/known-words/authors.txt diff --git a/core/inference/known-words/known-words.factor b/basis/inference/known-words/known-words.factor similarity index 100% rename from core/inference/known-words/known-words.factor rename to basis/inference/known-words/known-words.factor diff --git a/core/inference/known-words/summary.txt b/basis/inference/known-words/summary.txt similarity index 100% rename from core/inference/known-words/summary.txt rename to basis/inference/known-words/summary.txt diff --git a/extra/cocoa/messages/authors.txt b/basis/inference/state/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/cocoa/messages/authors.txt rename to basis/inference/state/authors.txt diff --git a/core/inference/state/state-docs.factor b/basis/inference/state/state-docs.factor similarity index 100% rename from core/inference/state/state-docs.factor rename to basis/inference/state/state-docs.factor diff --git a/core/inference/state/state-tests.factor b/basis/inference/state/state-tests.factor similarity index 100% rename from core/inference/state/state-tests.factor rename to basis/inference/state/state-tests.factor diff --git a/core/inference/state/state.factor b/basis/inference/state/state.factor similarity index 100% rename from core/inference/state/state.factor rename to basis/inference/state/state.factor diff --git a/core/inference/state/summary.txt b/basis/inference/state/summary.txt similarity index 100% rename from core/inference/state/summary.txt rename to basis/inference/state/summary.txt diff --git a/core/inference/summary.txt b/basis/inference/summary.txt similarity index 100% rename from core/inference/summary.txt rename to basis/inference/summary.txt diff --git a/core/inference/tags.txt b/basis/inference/tags.txt similarity index 100% rename from core/inference/tags.txt rename to basis/inference/tags.txt diff --git a/extra/cocoa/pasteboard/authors.txt b/basis/inference/transforms/authors.txt similarity index 100% rename from extra/cocoa/pasteboard/authors.txt rename to basis/inference/transforms/authors.txt diff --git a/core/inference/transforms/summary.txt b/basis/inference/transforms/summary.txt similarity index 100% rename from core/inference/transforms/summary.txt rename to basis/inference/transforms/summary.txt diff --git a/core/inference/transforms/transforms-docs.factor b/basis/inference/transforms/transforms-docs.factor similarity index 100% rename from core/inference/transforms/transforms-docs.factor rename to basis/inference/transforms/transforms-docs.factor diff --git a/core/inference/transforms/transforms-tests.factor b/basis/inference/transforms/transforms-tests.factor similarity index 100% rename from core/inference/transforms/transforms-tests.factor rename to basis/inference/transforms/transforms-tests.factor diff --git a/core/inference/transforms/transforms.factor b/basis/inference/transforms/transforms.factor similarity index 100% rename from core/inference/transforms/transforms.factor rename to basis/inference/transforms/transforms.factor diff --git a/extra/cocoa/plists/authors.txt b/basis/inspector/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/cocoa/plists/authors.txt rename to basis/inspector/authors.txt diff --git a/core/inspector/inspector-docs.factor b/basis/inspector/inspector-docs.factor similarity index 100% rename from core/inspector/inspector-docs.factor rename to basis/inspector/inspector-docs.factor diff --git a/core/inspector/inspector-tests.factor b/basis/inspector/inspector-tests.factor similarity index 100% rename from core/inspector/inspector-tests.factor rename to basis/inspector/inspector-tests.factor diff --git a/core/inspector/inspector.factor b/basis/inspector/inspector.factor similarity index 100% rename from core/inspector/inspector.factor rename to basis/inspector/inspector.factor diff --git a/core/inspector/summary.txt b/basis/inspector/summary.txt similarity index 100% rename from core/inspector/summary.txt rename to basis/inspector/summary.txt diff --git a/core/inspector/tags.txt b/basis/inspector/tags.txt similarity index 100% rename from core/inspector/tags.txt rename to basis/inspector/tags.txt diff --git a/extra/interval-maps/authors.txt b/basis/interval-maps/authors.txt similarity index 100% rename from extra/interval-maps/authors.txt rename to basis/interval-maps/authors.txt diff --git a/extra/interval-maps/interval-maps-docs.factor b/basis/interval-maps/interval-maps-docs.factor similarity index 100% rename from extra/interval-maps/interval-maps-docs.factor rename to basis/interval-maps/interval-maps-docs.factor diff --git a/extra/interval-maps/interval-maps-tests.factor b/basis/interval-maps/interval-maps-tests.factor similarity index 100% rename from extra/interval-maps/interval-maps-tests.factor rename to basis/interval-maps/interval-maps-tests.factor diff --git a/extra/interval-maps/interval-maps.factor b/basis/interval-maps/interval-maps.factor similarity index 100% rename from extra/interval-maps/interval-maps.factor rename to basis/interval-maps/interval-maps.factor diff --git a/extra/interval-maps/summary.txt b/basis/interval-maps/summary.txt similarity index 100% rename from extra/interval-maps/summary.txt rename to basis/interval-maps/summary.txt diff --git a/extra/interval-maps/tags.txt b/basis/interval-maps/tags.txt similarity index 100% rename from extra/interval-maps/tags.txt rename to basis/interval-maps/tags.txt diff --git a/extra/cocoa/runtime/authors.txt b/basis/io/buffers/authors.txt similarity index 100% rename from extra/cocoa/runtime/authors.txt rename to basis/io/buffers/authors.txt diff --git a/extra/io/buffers/buffers-docs.factor b/basis/io/buffers/buffers-docs.factor similarity index 100% rename from extra/io/buffers/buffers-docs.factor rename to basis/io/buffers/buffers-docs.factor diff --git a/extra/io/buffers/buffers-tests.factor b/basis/io/buffers/buffers-tests.factor similarity index 100% rename from extra/io/buffers/buffers-tests.factor rename to basis/io/buffers/buffers-tests.factor diff --git a/extra/io/buffers/buffers.factor b/basis/io/buffers/buffers.factor similarity index 100% rename from extra/io/buffers/buffers.factor rename to basis/io/buffers/buffers.factor diff --git a/extra/io/buffers/summary.txt b/basis/io/buffers/summary.txt similarity index 100% rename from extra/io/buffers/summary.txt rename to basis/io/buffers/summary.txt diff --git a/extra/io/encodings/8-bit/8-bit-docs.factor b/basis/io/encodings/8-bit/8-bit-docs.factor similarity index 100% rename from extra/io/encodings/8-bit/8-bit-docs.factor rename to basis/io/encodings/8-bit/8-bit-docs.factor diff --git a/extra/io/encodings/8-bit/8-bit-tests.factor b/basis/io/encodings/8-bit/8-bit-tests.factor similarity index 100% rename from extra/io/encodings/8-bit/8-bit-tests.factor rename to basis/io/encodings/8-bit/8-bit-tests.factor diff --git a/extra/io/encodings/8-bit/8-bit.factor b/basis/io/encodings/8-bit/8-bit.factor similarity index 97% rename from extra/io/encodings/8-bit/8-bit.factor rename to basis/io/encodings/8-bit/8-bit.factor index 16fe052867..cb645379b8 100755 --- a/extra/io/encodings/8-bit/8-bit.factor +++ b/basis/io/encodings/8-bit/8-bit.factor @@ -30,7 +30,7 @@ IN: io.encodings.8-bit } ; : encoding-file ( file-name -- stream ) - "resource:extra/io/encodings/8-bit/" swap ".TXT" + "resource:basis/io/encodings/8-bit/" swap ".TXT" 3append ascii ; : process-contents ( lines -- assoc ) diff --git a/extra/io/encodings/8-bit/8859-1.TXT b/basis/io/encodings/8-bit/8859-1.TXT similarity index 100% rename from extra/io/encodings/8-bit/8859-1.TXT rename to basis/io/encodings/8-bit/8859-1.TXT diff --git a/extra/io/encodings/8-bit/8859-10.TXT b/basis/io/encodings/8-bit/8859-10.TXT similarity index 100% rename from extra/io/encodings/8-bit/8859-10.TXT rename to basis/io/encodings/8-bit/8859-10.TXT diff --git a/extra/io/encodings/8-bit/8859-11.TXT b/basis/io/encodings/8-bit/8859-11.TXT similarity index 100% rename from extra/io/encodings/8-bit/8859-11.TXT rename to basis/io/encodings/8-bit/8859-11.TXT diff --git a/extra/io/encodings/8-bit/8859-13.TXT b/basis/io/encodings/8-bit/8859-13.TXT similarity index 100% rename from extra/io/encodings/8-bit/8859-13.TXT rename to basis/io/encodings/8-bit/8859-13.TXT diff --git a/extra/io/encodings/8-bit/8859-14.TXT b/basis/io/encodings/8-bit/8859-14.TXT similarity index 100% rename from extra/io/encodings/8-bit/8859-14.TXT rename to basis/io/encodings/8-bit/8859-14.TXT diff --git a/extra/io/encodings/8-bit/8859-15.TXT b/basis/io/encodings/8-bit/8859-15.TXT similarity index 100% rename from extra/io/encodings/8-bit/8859-15.TXT rename to basis/io/encodings/8-bit/8859-15.TXT diff --git a/extra/io/encodings/8-bit/8859-16.TXT b/basis/io/encodings/8-bit/8859-16.TXT similarity index 100% rename from extra/io/encodings/8-bit/8859-16.TXT rename to basis/io/encodings/8-bit/8859-16.TXT diff --git a/extra/io/encodings/8-bit/8859-2.TXT b/basis/io/encodings/8-bit/8859-2.TXT similarity index 100% rename from extra/io/encodings/8-bit/8859-2.TXT rename to basis/io/encodings/8-bit/8859-2.TXT diff --git a/extra/io/encodings/8-bit/8859-3.TXT b/basis/io/encodings/8-bit/8859-3.TXT similarity index 100% rename from extra/io/encodings/8-bit/8859-3.TXT rename to basis/io/encodings/8-bit/8859-3.TXT diff --git a/extra/io/encodings/8-bit/8859-4.TXT b/basis/io/encodings/8-bit/8859-4.TXT similarity index 100% rename from extra/io/encodings/8-bit/8859-4.TXT rename to basis/io/encodings/8-bit/8859-4.TXT diff --git a/extra/io/encodings/8-bit/8859-5.TXT b/basis/io/encodings/8-bit/8859-5.TXT similarity index 100% rename from extra/io/encodings/8-bit/8859-5.TXT rename to basis/io/encodings/8-bit/8859-5.TXT diff --git a/extra/io/encodings/8-bit/8859-6.TXT b/basis/io/encodings/8-bit/8859-6.TXT similarity index 100% rename from extra/io/encodings/8-bit/8859-6.TXT rename to basis/io/encodings/8-bit/8859-6.TXT diff --git a/extra/io/encodings/8-bit/8859-7.TXT b/basis/io/encodings/8-bit/8859-7.TXT similarity index 100% rename from extra/io/encodings/8-bit/8859-7.TXT rename to basis/io/encodings/8-bit/8859-7.TXT diff --git a/extra/io/encodings/8-bit/8859-8.TXT b/basis/io/encodings/8-bit/8859-8.TXT similarity index 100% rename from extra/io/encodings/8-bit/8859-8.TXT rename to basis/io/encodings/8-bit/8859-8.TXT diff --git a/extra/io/encodings/8-bit/8859-9.TXT b/basis/io/encodings/8-bit/8859-9.TXT similarity index 100% rename from extra/io/encodings/8-bit/8859-9.TXT rename to basis/io/encodings/8-bit/8859-9.TXT diff --git a/extra/io/encodings/8-bit/CP037.TXT b/basis/io/encodings/8-bit/CP037.TXT similarity index 100% rename from extra/io/encodings/8-bit/CP037.TXT rename to basis/io/encodings/8-bit/CP037.TXT diff --git a/extra/io/encodings/8-bit/CP1252.TXT b/basis/io/encodings/8-bit/CP1252.TXT similarity index 100% rename from extra/io/encodings/8-bit/CP1252.TXT rename to basis/io/encodings/8-bit/CP1252.TXT diff --git a/extra/io/encodings/8-bit/KOI8-R.TXT b/basis/io/encodings/8-bit/KOI8-R.TXT similarity index 100% rename from extra/io/encodings/8-bit/KOI8-R.TXT rename to basis/io/encodings/8-bit/KOI8-R.TXT diff --git a/extra/io/encodings/8-bit/ROMAN.TXT b/basis/io/encodings/8-bit/ROMAN.TXT similarity index 100% rename from extra/io/encodings/8-bit/ROMAN.TXT rename to basis/io/encodings/8-bit/ROMAN.TXT diff --git a/extra/delegate/protocols/authors.txt b/basis/io/encodings/8-bit/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/delegate/protocols/authors.txt rename to basis/io/encodings/8-bit/authors.txt diff --git a/extra/io/encodings/8-bit/summary.txt b/basis/io/encodings/8-bit/summary.txt similarity index 100% rename from extra/io/encodings/8-bit/summary.txt rename to basis/io/encodings/8-bit/summary.txt diff --git a/extra/ascii/tags.txt b/basis/io/encodings/8-bit/tags.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/ascii/tags.txt rename to basis/io/encodings/8-bit/tags.txt diff --git a/extra/io/encodings/ascii/ascii-docs.factor b/basis/io/encodings/ascii/ascii-docs.factor similarity index 100% rename from extra/io/encodings/ascii/ascii-docs.factor rename to basis/io/encodings/ascii/ascii-docs.factor diff --git a/extra/io/encodings/ascii/ascii-tests.factor b/basis/io/encodings/ascii/ascii-tests.factor similarity index 100% rename from extra/io/encodings/ascii/ascii-tests.factor rename to basis/io/encodings/ascii/ascii-tests.factor diff --git a/extra/io/encodings/ascii/ascii.factor b/basis/io/encodings/ascii/ascii.factor similarity index 100% rename from extra/io/encodings/ascii/ascii.factor rename to basis/io/encodings/ascii/ascii.factor diff --git a/extra/hash2/authors.txt b/basis/io/encodings/ascii/authors.txt similarity index 100% rename from extra/hash2/authors.txt rename to basis/io/encodings/ascii/authors.txt diff --git a/extra/io/encodings/ascii/summary.txt b/basis/io/encodings/ascii/summary.txt similarity index 100% rename from extra/io/encodings/ascii/summary.txt rename to basis/io/encodings/ascii/summary.txt diff --git a/extra/io/encodings/8-bit/tags.txt b/basis/io/encodings/ascii/tags.txt similarity index 100% rename from extra/io/encodings/8-bit/tags.txt rename to basis/io/encodings/ascii/tags.txt diff --git a/extra/io/encodings/8-bit/authors.txt b/basis/io/encodings/iana/authors.txt similarity index 100% rename from extra/io/encodings/8-bit/authors.txt rename to basis/io/encodings/iana/authors.txt diff --git a/extra/io/encodings/iana/character-sets b/basis/io/encodings/iana/character-sets similarity index 100% rename from extra/io/encodings/iana/character-sets rename to basis/io/encodings/iana/character-sets diff --git a/extra/io/encodings/iana/iana-docs.factor b/basis/io/encodings/iana/iana-docs.factor similarity index 100% rename from extra/io/encodings/iana/iana-docs.factor rename to basis/io/encodings/iana/iana-docs.factor diff --git a/extra/io/encodings/iana/iana-tests.factor b/basis/io/encodings/iana/iana-tests.factor similarity index 100% rename from extra/io/encodings/iana/iana-tests.factor rename to basis/io/encodings/iana/iana-tests.factor diff --git a/extra/io/encodings/iana/iana.factor b/basis/io/encodings/iana/iana.factor similarity index 96% rename from extra/io/encodings/iana/iana.factor rename to basis/io/encodings/iana/iana.factor index 4368360a4d..dcd806d9a0 100755 --- a/extra/io/encodings/iana/iana.factor +++ b/basis/io/encodings/iana/iana.factor @@ -58,5 +58,5 @@ PRIVATE> ] each ] H{ } make-assoc more-aliases assoc-union ; PRIVATE> -"resource:extra/io/encodings/iana/character-sets" +"resource:basis/io/encodings/iana/character-sets" ascii make-n>e \ n>e-table set-value diff --git a/extra/io/encodings/iana/summary.txt b/basis/io/encodings/iana/summary.txt similarity index 100% rename from extra/io/encodings/iana/summary.txt rename to basis/io/encodings/iana/summary.txt diff --git a/extra/io/encodings/ascii/authors.txt b/basis/io/encodings/strict/authors.txt similarity index 100% rename from extra/io/encodings/ascii/authors.txt rename to basis/io/encodings/strict/authors.txt diff --git a/extra/io/encodings/strict/strict-docs.factor b/basis/io/encodings/strict/strict-docs.factor similarity index 100% rename from extra/io/encodings/strict/strict-docs.factor rename to basis/io/encodings/strict/strict-docs.factor diff --git a/extra/io/encodings/strict/strict-tests.factor b/basis/io/encodings/strict/strict-tests.factor similarity index 100% rename from extra/io/encodings/strict/strict-tests.factor rename to basis/io/encodings/strict/strict-tests.factor diff --git a/extra/io/encodings/strict/strict.factor b/basis/io/encodings/strict/strict.factor similarity index 100% rename from extra/io/encodings/strict/strict.factor rename to basis/io/encodings/strict/strict.factor diff --git a/extra/io/encodings/strict/summary.txt b/basis/io/encodings/strict/summary.txt similarity index 100% rename from extra/io/encodings/strict/summary.txt rename to basis/io/encodings/strict/summary.txt diff --git a/extra/io/encodings/ascii/tags.txt b/basis/io/encodings/strict/tags.txt similarity index 100% rename from extra/io/encodings/ascii/tags.txt rename to basis/io/encodings/strict/tags.txt diff --git a/extra/io/encodings/iana/authors.txt b/basis/io/encodings/string/authors.txt similarity index 100% rename from extra/io/encodings/iana/authors.txt rename to basis/io/encodings/string/authors.txt diff --git a/core/io/encodings/string/string-docs.factor b/basis/io/encodings/string/string-docs.factor similarity index 100% rename from core/io/encodings/string/string-docs.factor rename to basis/io/encodings/string/string-docs.factor diff --git a/core/io/encodings/string/string-tests.factor b/basis/io/encodings/string/string-tests.factor similarity index 100% rename from core/io/encodings/string/string-tests.factor rename to basis/io/encodings/string/string-tests.factor diff --git a/core/io/encodings/string/string.factor b/basis/io/encodings/string/string.factor similarity index 100% rename from core/io/encodings/string/string.factor rename to basis/io/encodings/string/string.factor diff --git a/core/io/encodings/string/summary.txt b/basis/io/encodings/string/summary.txt similarity index 100% rename from core/io/encodings/string/summary.txt rename to basis/io/encodings/string/summary.txt diff --git a/core/io/encodings/string/tags.factor b/basis/io/encodings/string/tags.factor similarity index 100% rename from core/io/encodings/string/tags.factor rename to basis/io/encodings/string/tags.factor diff --git a/core/io/encodings/utf16/.utf16.factor.swo b/basis/io/encodings/utf16/.utf16.factor.swo similarity index 100% rename from core/io/encodings/utf16/.utf16.factor.swo rename to basis/io/encodings/utf16/.utf16.factor.swo diff --git a/extra/io/encodings/strict/authors.txt b/basis/io/encodings/utf16/authors.txt similarity index 100% rename from extra/io/encodings/strict/authors.txt rename to basis/io/encodings/utf16/authors.txt diff --git a/core/io/encodings/utf16/summary.txt b/basis/io/encodings/utf16/summary.txt similarity index 100% rename from core/io/encodings/utf16/summary.txt rename to basis/io/encodings/utf16/summary.txt diff --git a/extra/io/encodings/strict/tags.txt b/basis/io/encodings/utf16/tags.txt similarity index 100% rename from extra/io/encodings/strict/tags.txt rename to basis/io/encodings/utf16/tags.txt diff --git a/core/io/encodings/utf16/utf16-docs.factor b/basis/io/encodings/utf16/utf16-docs.factor similarity index 100% rename from core/io/encodings/utf16/utf16-docs.factor rename to basis/io/encodings/utf16/utf16-docs.factor diff --git a/core/io/encodings/utf16/utf16-tests.factor b/basis/io/encodings/utf16/utf16-tests.factor similarity index 100% rename from core/io/encodings/utf16/utf16-tests.factor rename to basis/io/encodings/utf16/utf16-tests.factor diff --git a/core/io/encodings/utf16/utf16.factor b/basis/io/encodings/utf16/utf16.factor similarity index 95% rename from core/io/encodings/utf16/utf16.factor rename to basis/io/encodings/utf16/utf16.factor index 80706233db..037087e452 100755 --- a/core/io/encodings/utf16/utf16.factor +++ b/basis/io/encodings/utf16/utf16.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2006, 2008 Daniel Ehrenberg. ! See http://factorcode.org/license.txt for BSD license. USING: math kernel sequences sbufs vectors namespaces io.binary -io.encodings combinators splitting io byte-arrays summary ; +io.encodings combinators splitting io byte-arrays ; IN: io.encodings.utf16 SINGLETON: utf16be @@ -10,6 +10,8 @@ SINGLETON: utf16le SINGLETON: utf16 +ERROR: missing-bom ; + le/be ( bom -- le/be ) dup bom-le sequence= [ drop utf16le ] [ bom-be sequence= [ utf16be ] [ missing-bom ] if diff --git a/extra/io/launcher/authors.txt b/basis/io/launcher/authors.txt similarity index 100% rename from extra/io/launcher/authors.txt rename to basis/io/launcher/authors.txt diff --git a/extra/io/launcher/launcher-docs.factor b/basis/io/launcher/launcher-docs.factor similarity index 100% rename from extra/io/launcher/launcher-docs.factor rename to basis/io/launcher/launcher-docs.factor diff --git a/extra/io/launcher/launcher-tests.factor b/basis/io/launcher/launcher-tests.factor similarity index 100% rename from extra/io/launcher/launcher-tests.factor rename to basis/io/launcher/launcher-tests.factor diff --git a/extra/io/launcher/launcher.factor b/basis/io/launcher/launcher.factor similarity index 100% rename from extra/io/launcher/launcher.factor rename to basis/io/launcher/launcher.factor diff --git a/extra/io/launcher/summary.txt b/basis/io/launcher/summary.txt similarity index 100% rename from extra/io/launcher/summary.txt rename to basis/io/launcher/summary.txt diff --git a/extra/io/mmap/authors.txt b/basis/io/mmap/authors.txt similarity index 100% rename from extra/io/mmap/authors.txt rename to basis/io/mmap/authors.txt diff --git a/extra/io/mmap/mmap-docs.factor b/basis/io/mmap/mmap-docs.factor similarity index 100% rename from extra/io/mmap/mmap-docs.factor rename to basis/io/mmap/mmap-docs.factor diff --git a/extra/io/mmap/mmap-tests.factor b/basis/io/mmap/mmap-tests.factor similarity index 100% rename from extra/io/mmap/mmap-tests.factor rename to basis/io/mmap/mmap-tests.factor diff --git a/extra/io/mmap/mmap.factor b/basis/io/mmap/mmap.factor similarity index 100% rename from extra/io/mmap/mmap.factor rename to basis/io/mmap/mmap.factor diff --git a/extra/io/mmap/summary.txt b/basis/io/mmap/summary.txt similarity index 100% rename from extra/io/mmap/summary.txt rename to basis/io/mmap/summary.txt diff --git a/extra/cocoa/subclassing/authors.txt b/basis/io/monitors/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/cocoa/subclassing/authors.txt rename to basis/io/monitors/authors.txt diff --git a/extra/io/monitors/monitors-docs.factor b/basis/io/monitors/monitors-docs.factor similarity index 100% rename from extra/io/monitors/monitors-docs.factor rename to basis/io/monitors/monitors-docs.factor diff --git a/extra/io/monitors/monitors-tests.factor b/basis/io/monitors/monitors-tests.factor similarity index 100% rename from extra/io/monitors/monitors-tests.factor rename to basis/io/monitors/monitors-tests.factor diff --git a/extra/io/monitors/monitors.factor b/basis/io/monitors/monitors.factor similarity index 100% rename from extra/io/monitors/monitors.factor rename to basis/io/monitors/monitors.factor diff --git a/extra/io/monitors/recursive/recursive-tests.factor b/basis/io/monitors/recursive/recursive-tests.factor similarity index 100% rename from extra/io/monitors/recursive/recursive-tests.factor rename to basis/io/monitors/recursive/recursive-tests.factor diff --git a/extra/io/monitors/recursive/recursive.factor b/basis/io/monitors/recursive/recursive.factor similarity index 100% rename from extra/io/monitors/recursive/recursive.factor rename to basis/io/monitors/recursive/recursive.factor diff --git a/extra/io/monitors/summary.txt b/basis/io/monitors/summary.txt similarity index 100% rename from extra/io/monitors/summary.txt rename to basis/io/monitors/summary.txt diff --git a/extra/io/pipes/pipes-docs.factor b/basis/io/pipes/pipes-docs.factor similarity index 100% rename from extra/io/pipes/pipes-docs.factor rename to basis/io/pipes/pipes-docs.factor diff --git a/extra/io/pipes/pipes-tests.factor b/basis/io/pipes/pipes-tests.factor similarity index 100% rename from extra/io/pipes/pipes-tests.factor rename to basis/io/pipes/pipes-tests.factor diff --git a/extra/io/pipes/pipes.factor b/basis/io/pipes/pipes.factor similarity index 100% rename from extra/io/pipes/pipes.factor rename to basis/io/pipes/pipes.factor diff --git a/extra/cocoa/types/authors.txt b/basis/io/pools/authors.txt similarity index 100% rename from extra/cocoa/types/authors.txt rename to basis/io/pools/authors.txt diff --git a/extra/io/pools/pools-docs.factor b/basis/io/pools/pools-docs.factor similarity index 100% rename from extra/io/pools/pools-docs.factor rename to basis/io/pools/pools-docs.factor diff --git a/extra/io/pools/pools.factor b/basis/io/pools/pools.factor similarity index 100% rename from extra/io/pools/pools.factor rename to basis/io/pools/pools.factor diff --git a/extra/io/pools/summary.txt b/basis/io/pools/summary.txt similarity index 100% rename from extra/io/pools/summary.txt rename to basis/io/pools/summary.txt diff --git a/extra/io/pools/tags.txt b/basis/io/pools/tags.txt similarity index 100% rename from extra/io/pools/tags.txt rename to basis/io/pools/tags.txt diff --git a/extra/cocoa/views/authors.txt b/basis/io/ports/authors.txt similarity index 100% rename from extra/cocoa/views/authors.txt rename to basis/io/ports/authors.txt diff --git a/extra/io/ports/ports-docs.factor b/basis/io/ports/ports-docs.factor similarity index 100% rename from extra/io/ports/ports-docs.factor rename to basis/io/ports/ports-docs.factor diff --git a/extra/io/ports/ports.factor b/basis/io/ports/ports.factor similarity index 100% rename from extra/io/ports/ports.factor rename to basis/io/ports/ports.factor diff --git a/extra/io/ports/summary.txt b/basis/io/ports/summary.txt similarity index 100% rename from extra/io/ports/summary.txt rename to basis/io/ports/summary.txt diff --git a/extra/cocoa/windows/authors.txt b/basis/io/servers/connection/authors.txt similarity index 100% rename from extra/cocoa/windows/authors.txt rename to basis/io/servers/connection/authors.txt diff --git a/extra/io/servers/connection/connection-docs.factor b/basis/io/servers/connection/connection-docs.factor similarity index 100% rename from extra/io/servers/connection/connection-docs.factor rename to basis/io/servers/connection/connection-docs.factor diff --git a/extra/io/servers/connection/connection-tests.factor b/basis/io/servers/connection/connection-tests.factor similarity index 100% rename from extra/io/servers/connection/connection-tests.factor rename to basis/io/servers/connection/connection-tests.factor diff --git a/extra/io/servers/connection/connection.factor b/basis/io/servers/connection/connection.factor similarity index 100% rename from extra/io/servers/connection/connection.factor rename to basis/io/servers/connection/connection.factor diff --git a/extra/io/servers/connection/summary.txt b/basis/io/servers/connection/summary.txt similarity index 100% rename from extra/io/servers/connection/summary.txt rename to basis/io/servers/connection/summary.txt diff --git a/extra/io/servers/connection/tags.txt b/basis/io/servers/connection/tags.txt similarity index 100% rename from extra/io/servers/connection/tags.txt rename to basis/io/servers/connection/tags.txt diff --git a/extra/concurrency/exchangers/authors.txt b/basis/io/servers/packet/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/concurrency/exchangers/authors.txt rename to basis/io/servers/packet/authors.txt diff --git a/extra/io/servers/packet/datagram.factor b/basis/io/servers/packet/datagram.factor similarity index 100% rename from extra/io/servers/packet/datagram.factor rename to basis/io/servers/packet/datagram.factor diff --git a/extra/io/servers/packet/summary.txt b/basis/io/servers/packet/summary.txt similarity index 100% rename from extra/io/servers/packet/summary.txt rename to basis/io/servers/packet/summary.txt diff --git a/extra/io/servers/packet/tags.txt b/basis/io/servers/packet/tags.txt similarity index 100% rename from extra/io/servers/packet/tags.txt rename to basis/io/servers/packet/tags.txt diff --git a/extra/io/sockets/authors.txt b/basis/io/sockets/authors.txt similarity index 100% rename from extra/io/sockets/authors.txt rename to basis/io/sockets/authors.txt diff --git a/extra/concurrency/locks/authors.txt b/basis/io/sockets/secure/authors.txt similarity index 100% rename from extra/concurrency/locks/authors.txt rename to basis/io/sockets/secure/authors.txt diff --git a/extra/io/sockets/secure/secure-docs.factor b/basis/io/sockets/secure/secure-docs.factor similarity index 100% rename from extra/io/sockets/secure/secure-docs.factor rename to basis/io/sockets/secure/secure-docs.factor diff --git a/extra/io/sockets/secure/secure-tests.factor b/basis/io/sockets/secure/secure-tests.factor similarity index 69% rename from extra/io/sockets/secure/secure-tests.factor rename to basis/io/sockets/secure/secure-tests.factor index 311127e333..557bba52d2 100755 --- a/extra/io/sockets/secure/secure-tests.factor +++ b/basis/io/sockets/secure/secure-tests.factor @@ -5,8 +5,8 @@ USING: accessors kernel io.sockets io.sockets.secure tools.test ; [ ] [ - "resource:extra/openssl/test/server.pem" >>key-file - "resource:extra/openssl/test/dh1024.pem" >>dh-file + "resource:basis/openssl/test/server.pem" >>key-file + "resource:basis/openssl/test/dh1024.pem" >>dh-file "password" >>password [ ] with-secure-context ] unit-test diff --git a/extra/io/sockets/secure/secure.factor b/basis/io/sockets/secure/secure.factor similarity index 97% rename from extra/io/sockets/secure/secure.factor rename to basis/io/sockets/secure/secure.factor index d399163dd8..3e516dff8b 100755 --- a/extra/io/sockets/secure/secure.factor +++ b/basis/io/sockets/secure/secure.factor @@ -26,7 +26,7 @@ ephemeral-key-bits ; secure-config new SSLv23 >>method 1024 >>ephemeral-key-bits - "resource:extra/openssl/cacert.pem" >>ca-file + "resource:basis/openssl/cacert.pem" >>ca-file t >>verify ; TUPLE: secure-context config handle disposed ; diff --git a/extra/io/sockets/secure/summary.txt b/basis/io/sockets/secure/summary.txt similarity index 100% rename from extra/io/sockets/secure/summary.txt rename to basis/io/sockets/secure/summary.txt diff --git a/extra/io/sockets/secure/tags.txt b/basis/io/sockets/secure/tags.txt similarity index 100% rename from extra/io/sockets/secure/tags.txt rename to basis/io/sockets/secure/tags.txt diff --git a/extra/io/sockets/sockets-docs.factor b/basis/io/sockets/sockets-docs.factor similarity index 100% rename from extra/io/sockets/sockets-docs.factor rename to basis/io/sockets/sockets-docs.factor diff --git a/extra/io/sockets/sockets-tests.factor b/basis/io/sockets/sockets-tests.factor similarity index 100% rename from extra/io/sockets/sockets-tests.factor rename to basis/io/sockets/sockets-tests.factor diff --git a/extra/io/sockets/sockets.factor b/basis/io/sockets/sockets.factor similarity index 100% rename from extra/io/sockets/sockets.factor rename to basis/io/sockets/sockets.factor diff --git a/extra/io/sockets/summary.txt b/basis/io/sockets/summary.txt similarity index 100% rename from extra/io/sockets/summary.txt rename to basis/io/sockets/summary.txt diff --git a/extra/io/sockets/tags.txt b/basis/io/sockets/tags.txt similarity index 100% rename from extra/io/sockets/tags.txt rename to basis/io/sockets/tags.txt diff --git a/extra/concurrency/semaphores/authors.txt b/basis/io/streams/duplex/authors.txt similarity index 100% rename from extra/concurrency/semaphores/authors.txt rename to basis/io/streams/duplex/authors.txt diff --git a/extra/io/streams/duplex/duplex-docs.factor b/basis/io/streams/duplex/duplex-docs.factor similarity index 100% rename from extra/io/streams/duplex/duplex-docs.factor rename to basis/io/streams/duplex/duplex-docs.factor diff --git a/extra/io/streams/duplex/duplex-tests.factor b/basis/io/streams/duplex/duplex-tests.factor similarity index 100% rename from extra/io/streams/duplex/duplex-tests.factor rename to basis/io/streams/duplex/duplex-tests.factor diff --git a/extra/io/streams/duplex/duplex.factor b/basis/io/streams/duplex/duplex.factor similarity index 100% rename from extra/io/streams/duplex/duplex.factor rename to basis/io/streams/duplex/duplex.factor diff --git a/extra/io/streams/duplex/summary.txt b/basis/io/streams/duplex/summary.txt similarity index 100% rename from extra/io/streams/duplex/summary.txt rename to basis/io/streams/duplex/summary.txt diff --git a/extra/io/streams/limited/limited-tests.factor b/basis/io/streams/limited/limited-tests.factor similarity index 100% rename from extra/io/streams/limited/limited-tests.factor rename to basis/io/streams/limited/limited-tests.factor diff --git a/extra/io/streams/limited/limited.factor b/basis/io/streams/limited/limited.factor similarity index 100% rename from extra/io/streams/limited/limited.factor rename to basis/io/streams/limited/limited.factor diff --git a/core/io/streams/memory/memory.factor b/basis/io/streams/memory/memory.factor similarity index 100% rename from core/io/streams/memory/memory.factor rename to basis/io/streams/memory/memory.factor diff --git a/extra/core-foundation/authors.txt b/basis/io/streams/null/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/core-foundation/authors.txt rename to basis/io/streams/null/authors.txt diff --git a/extra/io/streams/null/null.factor b/basis/io/streams/null/null.factor similarity index 100% rename from extra/io/streams/null/null.factor rename to basis/io/streams/null/null.factor diff --git a/extra/documents/authors.txt b/basis/io/styles/authors.txt similarity index 100% rename from extra/documents/authors.txt rename to basis/io/styles/authors.txt diff --git a/core/io/styles/styles-docs.factor b/basis/io/styles/styles-docs.factor similarity index 93% rename from core/io/styles/styles-docs.factor rename to basis/io/styles/styles-docs.factor index 43d93c86e7..48b72255a7 100644 --- a/core/io/styles/styles-docs.factor +++ b/basis/io/styles/styles-docs.factor @@ -24,8 +24,14 @@ ARTICLE: "table-styles" "Table styles" { $subsection table-gap } { $subsection table-border } ; +HELP: write-object +{ $values { "str" string } { "obj" "an object" } } +{ $description "Writes a string to " { $link output-stream } ", associating it with the object. If formatted output is supported, the string will become a clickable presentation of the object, otherwise this word behaves like a call to " { $link write } "." } +$io-error ; + ARTICLE: "presentations" "Presentations" -"The " { $link presented } " style can be used to emit clickable objects. The " { $link write-object } " word should be used instead of setting this directly." ; +"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" "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." diff --git a/core/io/styles/styles.factor b/basis/io/styles/styles.factor similarity index 76% rename from core/io/styles/styles.factor rename to basis/io/styles/styles.factor index 4c19d87435..752f413458 100644 --- a/core/io/styles/styles.factor +++ b/basis/io/styles/styles.factor @@ -1,5 +1,8 @@ -! Copyright (C) 2005, 2006 Slava Pestov. +! Copyright (C) 2005, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. + +USING: hashtables io colors ; + IN: io.styles SYMBOL: plain @@ -32,10 +35,12 @@ SYMBOL: table-border : standard-table-style ( -- style ) H{ { table-gap { 5 5 } } - { table-border { 0.8 0.8 0.8 1.0 } } + { table-border T{ rgba f 0.8 0.8 0.8 1.0 } } } ; ! Input history TUPLE: input string ; C: input + +: write-object ( str obj -- ) presented associate format ; diff --git a/core/io/styles/summary.txt b/basis/io/styles/summary.txt similarity index 100% rename from core/io/styles/summary.txt rename to basis/io/styles/summary.txt diff --git a/core/io/thread/thread.factor b/basis/io/thread/thread.factor similarity index 100% rename from core/io/thread/thread.factor rename to basis/io/thread/thread.factor diff --git a/extra/io/timeouts/summary.txt b/basis/io/timeouts/summary.txt similarity index 100% rename from extra/io/timeouts/summary.txt rename to basis/io/timeouts/summary.txt diff --git a/extra/io/timeouts/timeouts-docs.factor b/basis/io/timeouts/timeouts-docs.factor similarity index 100% rename from extra/io/timeouts/timeouts-docs.factor rename to basis/io/timeouts/timeouts-docs.factor diff --git a/extra/io/timeouts/timeouts.factor b/basis/io/timeouts/timeouts.factor similarity index 100% rename from extra/io/timeouts/timeouts.factor rename to basis/io/timeouts/timeouts.factor diff --git a/extra/editors/authors.txt b/basis/io/unix/authors.txt similarity index 100% rename from extra/editors/authors.txt rename to basis/io/unix/authors.txt diff --git a/extra/editors/jedit/authors.txt b/basis/io/unix/backend/authors.txt similarity index 100% rename from extra/editors/jedit/authors.txt rename to basis/io/unix/backend/authors.txt diff --git a/extra/io/unix/backend/backend.factor b/basis/io/unix/backend/backend.factor similarity index 100% rename from extra/io/unix/backend/backend.factor rename to basis/io/unix/backend/backend.factor diff --git a/extra/io/unix/backend/summary.txt b/basis/io/unix/backend/summary.txt similarity index 100% rename from extra/io/unix/backend/summary.txt rename to basis/io/unix/backend/summary.txt diff --git a/basis/io/unix/backend/tags.txt b/basis/io/unix/backend/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/backend/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/float-arrays/authors.txt b/basis/io/unix/bsd/authors.txt similarity index 100% rename from extra/float-arrays/authors.txt rename to basis/io/unix/bsd/authors.txt diff --git a/extra/io/unix/bsd/bsd.factor b/basis/io/unix/bsd/bsd.factor similarity index 100% rename from extra/io/unix/bsd/bsd.factor rename to basis/io/unix/bsd/bsd.factor diff --git a/basis/io/unix/bsd/tags.txt b/basis/io/unix/bsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/bsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/freetype/authors.txt b/basis/io/unix/epoll/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/freetype/authors.txt rename to basis/io/unix/epoll/authors.txt diff --git a/extra/io/unix/epoll/epoll.factor b/basis/io/unix/epoll/epoll.factor similarity index 100% rename from extra/io/unix/epoll/epoll.factor rename to basis/io/unix/epoll/epoll.factor diff --git a/basis/io/unix/epoll/tags.txt b/basis/io/unix/epoll/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/epoll/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/help/authors.txt b/basis/io/unix/files/authors.txt similarity index 100% rename from extra/help/authors.txt rename to basis/io/unix/files/authors.txt diff --git a/extra/io/unix/files/files-tests.factor b/basis/io/unix/files/files-tests.factor similarity index 100% rename from extra/io/unix/files/files-tests.factor rename to basis/io/unix/files/files-tests.factor diff --git a/extra/io/unix/files/files.factor b/basis/io/unix/files/files.factor similarity index 100% rename from extra/io/unix/files/files.factor rename to basis/io/unix/files/files.factor diff --git a/extra/io/unix/files/summary.txt b/basis/io/unix/files/summary.txt similarity index 100% rename from extra/io/unix/files/summary.txt rename to basis/io/unix/files/summary.txt diff --git a/basis/io/unix/files/tags.txt b/basis/io/unix/files/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/files/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/basis/io/unix/files/unique/tags.txt b/basis/io/unix/files/unique/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/files/unique/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/unix/files/unique/unique.factor b/basis/io/unix/files/unique/unique.factor similarity index 100% rename from extra/io/unix/files/unique/unique.factor rename to basis/io/unix/files/unique/unique.factor diff --git a/extra/io/unix/freebsd/freebsd.factor b/basis/io/unix/freebsd/freebsd.factor similarity index 100% rename from extra/io/unix/freebsd/freebsd.factor rename to basis/io/unix/freebsd/freebsd.factor diff --git a/basis/io/unix/freebsd/tags.txt b/basis/io/unix/freebsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/freebsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/help/cookbook/authors.txt b/basis/io/unix/kqueue/authors.txt similarity index 100% rename from extra/help/cookbook/authors.txt rename to basis/io/unix/kqueue/authors.txt diff --git a/extra/io/unix/kqueue/kqueue.factor b/basis/io/unix/kqueue/kqueue.factor similarity index 100% rename from extra/io/unix/kqueue/kqueue.factor rename to basis/io/unix/kqueue/kqueue.factor diff --git a/basis/io/unix/kqueue/tags.txt b/basis/io/unix/kqueue/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/kqueue/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/help/crossref/authors.txt b/basis/io/unix/launcher/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/help/crossref/authors.txt rename to basis/io/unix/launcher/authors.txt diff --git a/extra/io/unix/launcher/launcher-tests.factor b/basis/io/unix/launcher/launcher-tests.factor similarity index 100% rename from extra/io/unix/launcher/launcher-tests.factor rename to basis/io/unix/launcher/launcher-tests.factor diff --git a/extra/io/unix/launcher/launcher.factor b/basis/io/unix/launcher/launcher.factor similarity index 100% rename from extra/io/unix/launcher/launcher.factor rename to basis/io/unix/launcher/launcher.factor diff --git a/extra/io/unix/launcher/parser/parser-tests.factor b/basis/io/unix/launcher/parser/parser-tests.factor similarity index 100% rename from extra/io/unix/launcher/parser/parser-tests.factor rename to basis/io/unix/launcher/parser/parser-tests.factor diff --git a/extra/io/unix/launcher/parser/parser.factor b/basis/io/unix/launcher/parser/parser.factor similarity index 100% rename from extra/io/unix/launcher/parser/parser.factor rename to basis/io/unix/launcher/parser/parser.factor diff --git a/basis/io/unix/launcher/parser/tags.txt b/basis/io/unix/launcher/parser/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/launcher/parser/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/basis/io/unix/launcher/tags.txt b/basis/io/unix/launcher/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/launcher/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/help/definitions/authors.txt b/basis/io/unix/linux/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/help/definitions/authors.txt rename to basis/io/unix/linux/authors.txt diff --git a/extra/io/unix/linux/linux.factor b/basis/io/unix/linux/linux.factor similarity index 100% rename from extra/io/unix/linux/linux.factor rename to basis/io/unix/linux/linux.factor diff --git a/extra/io/unix/linux/monitors/monitors-tests.factor b/basis/io/unix/linux/monitors/monitors-tests.factor similarity index 100% rename from extra/io/unix/linux/monitors/monitors-tests.factor rename to basis/io/unix/linux/monitors/monitors-tests.factor diff --git a/extra/io/unix/linux/monitors/monitors.factor b/basis/io/unix/linux/monitors/monitors.factor similarity index 100% rename from extra/io/unix/linux/monitors/monitors.factor rename to basis/io/unix/linux/monitors/monitors.factor diff --git a/basis/io/unix/linux/monitors/tags.txt b/basis/io/unix/linux/monitors/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/linux/monitors/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/basis/io/unix/linux/tags.txt b/basis/io/unix/linux/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/linux/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/unix/macosx/macosx.factor b/basis/io/unix/macosx/macosx.factor similarity index 100% rename from extra/io/unix/macosx/macosx.factor rename to basis/io/unix/macosx/macosx.factor diff --git a/extra/io/unix/macosx/monitors/monitors.factor b/basis/io/unix/macosx/monitors/monitors.factor similarity index 100% rename from extra/io/unix/macosx/monitors/monitors.factor rename to basis/io/unix/macosx/monitors/monitors.factor diff --git a/basis/io/unix/macosx/monitors/tags.txt b/basis/io/unix/macosx/monitors/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/macosx/monitors/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/basis/io/unix/macosx/tags.txt b/basis/io/unix/macosx/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/macosx/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/help/handbook/authors.txt b/basis/io/unix/mmap/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/help/handbook/authors.txt rename to basis/io/unix/mmap/authors.txt diff --git a/extra/io/unix/mmap/mmap.factor b/basis/io/unix/mmap/mmap.factor similarity index 100% rename from extra/io/unix/mmap/mmap.factor rename to basis/io/unix/mmap/mmap.factor diff --git a/basis/io/unix/mmap/tags.txt b/basis/io/unix/mmap/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/mmap/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/unix/netbsd/netbsd.factor b/basis/io/unix/netbsd/netbsd.factor similarity index 100% rename from extra/io/unix/netbsd/netbsd.factor rename to basis/io/unix/netbsd/netbsd.factor diff --git a/basis/io/unix/netbsd/tags.txt b/basis/io/unix/netbsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/netbsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/unix/openbsd/openbsd.factor b/basis/io/unix/openbsd/openbsd.factor similarity index 100% rename from extra/io/unix/openbsd/openbsd.factor rename to basis/io/unix/openbsd/openbsd.factor diff --git a/basis/io/unix/openbsd/tags.txt b/basis/io/unix/openbsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/openbsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/unix/pipes/pipes-tests.factor b/basis/io/unix/pipes/pipes-tests.factor similarity index 100% rename from extra/io/unix/pipes/pipes-tests.factor rename to basis/io/unix/pipes/pipes-tests.factor diff --git a/extra/io/unix/pipes/pipes.factor b/basis/io/unix/pipes/pipes.factor similarity index 100% rename from extra/io/unix/pipes/pipes.factor rename to basis/io/unix/pipes/pipes.factor diff --git a/basis/io/unix/pipes/tags.txt b/basis/io/unix/pipes/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/pipes/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/help/lint/authors.txt b/basis/io/unix/select/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/help/lint/authors.txt rename to basis/io/unix/select/authors.txt diff --git a/extra/io/unix/select/select.factor b/basis/io/unix/select/select.factor similarity index 100% rename from extra/io/unix/select/select.factor rename to basis/io/unix/select/select.factor diff --git a/basis/io/unix/select/tags.txt b/basis/io/unix/select/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/select/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/help/markup/authors.txt b/basis/io/unix/sockets/authors.txt similarity index 100% rename from extra/help/markup/authors.txt rename to basis/io/unix/sockets/authors.txt diff --git a/extra/io/unix/sockets/secure/secure-tests.factor b/basis/io/unix/sockets/secure/secure-tests.factor similarity index 97% rename from extra/io/unix/sockets/secure/secure-tests.factor rename to basis/io/unix/sockets/secure/secure-tests.factor index 52bee63850..d2a1649686 100644 --- a/extra/io/unix/sockets/secure/secure-tests.factor +++ b/basis/io/unix/sockets/secure/secure-tests.factor @@ -11,8 +11,8 @@ concurrency.promises byte-arrays locals calendar io.timeouts ; : with-test-context ( quot -- ) - "resource:extra/openssl/test/server.pem" >>key-file - "resource:extra/openssl/test/dh1024.pem" >>dh-file + "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/extra/io/unix/sockets/secure/secure.factor b/basis/io/unix/sockets/secure/secure.factor similarity index 100% rename from extra/io/unix/sockets/secure/secure.factor rename to basis/io/unix/sockets/secure/secure.factor diff --git a/basis/io/unix/sockets/secure/tags.txt b/basis/io/unix/sockets/secure/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/sockets/secure/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/unix/sockets/sockets.factor b/basis/io/unix/sockets/sockets.factor similarity index 100% rename from extra/io/unix/sockets/sockets.factor rename to basis/io/unix/sockets/sockets.factor diff --git a/extra/io/unix/sockets/summary.txt b/basis/io/unix/sockets/summary.txt similarity index 100% rename from extra/io/unix/sockets/summary.txt rename to basis/io/unix/sockets/summary.txt diff --git a/basis/io/unix/sockets/tags.txt b/basis/io/unix/sockets/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/sockets/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/unix/summary.txt b/basis/io/unix/summary.txt similarity index 100% rename from extra/io/unix/summary.txt rename to basis/io/unix/summary.txt diff --git a/basis/io/unix/tags.txt b/basis/io/unix/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/unix/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/unix/unix-tests.factor b/basis/io/unix/unix-tests.factor similarity index 100% rename from extra/io/unix/unix-tests.factor rename to basis/io/unix/unix-tests.factor diff --git a/extra/io/unix/unix.factor b/basis/io/unix/unix.factor similarity index 100% rename from extra/io/unix/unix.factor rename to basis/io/unix/unix.factor diff --git a/extra/io/windows/authors.txt b/basis/io/windows/authors.txt similarity index 100% rename from extra/io/windows/authors.txt rename to basis/io/windows/authors.txt diff --git a/extra/io/windows/files/files.factor b/basis/io/windows/files/files.factor similarity index 100% rename from extra/io/windows/files/files.factor rename to basis/io/windows/files/files.factor diff --git a/basis/io/windows/files/tags.txt b/basis/io/windows/files/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/windows/files/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/basis/io/windows/files/unique/tags.txt b/basis/io/windows/files/unique/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/windows/files/unique/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/windows/files/unique/unique.factor b/basis/io/windows/files/unique/unique.factor similarity index 100% rename from extra/io/windows/files/unique/unique.factor rename to basis/io/windows/files/unique/unique.factor diff --git a/extra/io/windows/ce/files/authors.txt b/basis/io/windows/launcher/authors.txt similarity index 100% rename from extra/io/windows/ce/files/authors.txt rename to basis/io/windows/launcher/authors.txt diff --git a/extra/io/windows/launcher/launcher-tests.factor b/basis/io/windows/launcher/launcher-tests.factor similarity index 100% rename from extra/io/windows/launcher/launcher-tests.factor rename to basis/io/windows/launcher/launcher-tests.factor diff --git a/extra/io/windows/launcher/launcher.factor b/basis/io/windows/launcher/launcher.factor similarity index 100% rename from extra/io/windows/launcher/launcher.factor rename to basis/io/windows/launcher/launcher.factor diff --git a/basis/io/windows/launcher/tags.txt b/basis/io/windows/launcher/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/windows/launcher/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/sockets/headers/authors.txt b/basis/io/windows/mmap/authors.txt similarity index 100% rename from extra/io/sockets/headers/authors.txt rename to basis/io/windows/mmap/authors.txt diff --git a/extra/io/windows/mmap/mmap-tests.factor b/basis/io/windows/mmap/mmap-tests.factor similarity index 100% rename from extra/io/windows/mmap/mmap-tests.factor rename to basis/io/windows/mmap/mmap-tests.factor diff --git a/extra/io/windows/mmap/mmap.factor b/basis/io/windows/mmap/mmap.factor similarity index 100% rename from extra/io/windows/mmap/mmap.factor rename to basis/io/windows/mmap/mmap.factor diff --git a/basis/io/windows/mmap/tags.txt b/basis/io/windows/mmap/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/windows/mmap/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/windows/nt/authors.txt b/basis/io/windows/nt/authors.txt similarity index 100% rename from extra/io/windows/nt/authors.txt rename to basis/io/windows/nt/authors.txt diff --git a/extra/io/windows/ce/backend/authors.txt b/basis/io/windows/nt/backend/authors.txt similarity index 100% rename from extra/io/windows/ce/backend/authors.txt rename to basis/io/windows/nt/backend/authors.txt diff --git a/extra/io/windows/nt/backend/backend.factor b/basis/io/windows/nt/backend/backend.factor similarity index 100% rename from extra/io/windows/nt/backend/backend.factor rename to basis/io/windows/nt/backend/backend.factor diff --git a/basis/io/windows/nt/backend/tags.txt b/basis/io/windows/nt/backend/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/windows/nt/backend/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/windows/nt/backend/authors.txt b/basis/io/windows/nt/files/authors.txt similarity index 100% rename from extra/io/windows/nt/backend/authors.txt rename to basis/io/windows/nt/files/authors.txt diff --git a/extra/io/windows/nt/files/files-tests.factor b/basis/io/windows/nt/files/files-tests.factor similarity index 100% rename from extra/io/windows/nt/files/files-tests.factor rename to basis/io/windows/nt/files/files-tests.factor diff --git a/extra/io/windows/nt/files/files.factor b/basis/io/windows/nt/files/files.factor similarity index 100% rename from extra/io/windows/nt/files/files.factor rename to basis/io/windows/nt/files/files.factor diff --git a/basis/io/windows/nt/files/tags.txt b/basis/io/windows/nt/files/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/windows/nt/files/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/windows/nt/files/authors.txt b/basis/io/windows/nt/launcher/authors.txt similarity index 100% rename from extra/io/windows/nt/files/authors.txt rename to basis/io/windows/nt/launcher/authors.txt diff --git a/extra/io/windows/nt/launcher/launcher-tests.factor b/basis/io/windows/nt/launcher/launcher-tests.factor similarity index 85% rename from extra/io/windows/nt/launcher/launcher-tests.factor rename to basis/io/windows/nt/launcher/launcher-tests.factor index 254f845c48..d82871ec9e 100755 --- a/extra/io/windows/nt/launcher/launcher-tests.factor +++ b/basis/io/windows/nt/launcher/launcher-tests.factor @@ -41,7 +41,7 @@ sequences parser assocs hashtables math continuations ; ] unit-test [ ] [ - "resource:extra/io/windows/nt/launcher/test" [ + "resource:basis/io/windows/nt/launcher/test" [ vm "-script" "stderr.factor" 3array >>command "out.txt" temp-file >>stdout @@ -59,7 +59,7 @@ sequences parser assocs hashtables math continuations ; ] unit-test [ ] [ - "resource:extra/io/windows/nt/launcher/test" [ + "resource:basis/io/windows/nt/launcher/test" [ vm "-script" "stderr.factor" 3array >>command "out.txt" temp-file >>stdout @@ -73,7 +73,7 @@ sequences parser assocs hashtables math continuations ; ] unit-test [ "output" ] [ - "resource:extra/io/windows/nt/launcher/test" [ + "resource:basis/io/windows/nt/launcher/test" [ vm "-script" "stderr.factor" 3array >>command "err2.txt" temp-file >>stderr @@ -86,7 +86,7 @@ sequences parser assocs hashtables math continuations ; ] unit-test [ t ] [ - "resource:extra/io/windows/nt/launcher/test" [ + "resource:basis/io/windows/nt/launcher/test" [ vm "-script" "env.factor" 3array >>command ascii contents @@ -96,7 +96,7 @@ sequences parser assocs hashtables math continuations ; ] unit-test [ t ] [ - "resource:extra/io/windows/nt/launcher/test" [ + "resource:basis/io/windows/nt/launcher/test" [ vm "-script" "env.factor" 3array >>command +replace-environment+ >>environment-mode @@ -108,7 +108,7 @@ sequences parser assocs hashtables math continuations ; ] unit-test [ "B" ] [ - "resource:extra/io/windows/nt/launcher/test" [ + "resource:basis/io/windows/nt/launcher/test" [ vm "-script" "env.factor" 3array >>command { { "A" "B" } } >>environment @@ -119,7 +119,7 @@ sequences parser assocs hashtables math continuations ; ] unit-test [ f ] [ - "resource:extra/io/windows/nt/launcher/test" [ + "resource:basis/io/windows/nt/launcher/test" [ vm "-script" "env.factor" 3array >>command { { "HOME" "XXX" } } >>environment @@ -145,7 +145,7 @@ sequences parser assocs hashtables math continuations ; [ "Hello appender\r\nHello appender\r\n" ] [ 2 [ - "resource:extra/io/windows/nt/launcher/test" [ + "resource:basis/io/windows/nt/launcher/test" [ vm "-script" "append.factor" 3array >>command "append-test" temp-file >>stdout diff --git a/extra/io/windows/nt/launcher/launcher.factor b/basis/io/windows/nt/launcher/launcher.factor similarity index 100% rename from extra/io/windows/nt/launcher/launcher.factor rename to basis/io/windows/nt/launcher/launcher.factor diff --git a/basis/io/windows/nt/launcher/tags.txt b/basis/io/windows/nt/launcher/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/windows/nt/launcher/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/windows/nt/launcher/test/append.factor b/basis/io/windows/nt/launcher/test/append.factor similarity index 100% rename from extra/io/windows/nt/launcher/test/append.factor rename to basis/io/windows/nt/launcher/test/append.factor diff --git a/extra/io/windows/nt/launcher/test/env.factor b/basis/io/windows/nt/launcher/test/env.factor similarity index 100% rename from extra/io/windows/nt/launcher/test/env.factor rename to basis/io/windows/nt/launcher/test/env.factor diff --git a/extra/io/windows/nt/launcher/test/stderr.factor b/basis/io/windows/nt/launcher/test/stderr.factor similarity index 100% rename from extra/io/windows/nt/launcher/test/stderr.factor rename to basis/io/windows/nt/launcher/test/stderr.factor diff --git a/extra/io/sockets/headers/bsd/authors.txt b/basis/io/windows/nt/monitors/authors.txt similarity index 100% rename from extra/io/sockets/headers/bsd/authors.txt rename to basis/io/windows/nt/monitors/authors.txt diff --git a/extra/io/windows/nt/monitors/monitors-tests.factor b/basis/io/windows/nt/monitors/monitors-tests.factor similarity index 100% rename from extra/io/windows/nt/monitors/monitors-tests.factor rename to basis/io/windows/nt/monitors/monitors-tests.factor diff --git a/extra/io/windows/nt/monitors/monitors.factor b/basis/io/windows/nt/monitors/monitors.factor similarity index 100% rename from extra/io/windows/nt/monitors/monitors.factor rename to basis/io/windows/nt/monitors/monitors.factor diff --git a/basis/io/windows/nt/monitors/tags.txt b/basis/io/windows/nt/monitors/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/windows/nt/monitors/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/windows/nt/nt.factor b/basis/io/windows/nt/nt.factor similarity index 100% rename from extra/io/windows/nt/nt.factor rename to basis/io/windows/nt/nt.factor diff --git a/extra/help/stylesheet/authors.txt b/basis/io/windows/nt/pipes/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/help/stylesheet/authors.txt rename to basis/io/windows/nt/pipes/authors.txt diff --git a/extra/io/windows/nt/pipes/pipes.factor b/basis/io/windows/nt/pipes/pipes.factor similarity index 100% rename from extra/io/windows/nt/pipes/pipes.factor rename to basis/io/windows/nt/pipes/pipes.factor diff --git a/basis/io/windows/nt/pipes/tags.txt b/basis/io/windows/nt/pipes/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/windows/nt/pipes/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/windows/nt/privileges/privileges.factor b/basis/io/windows/nt/privileges/privileges.factor similarity index 100% rename from extra/io/windows/nt/privileges/privileges.factor rename to basis/io/windows/nt/privileges/privileges.factor diff --git a/basis/io/windows/nt/privileges/tags.txt b/basis/io/windows/nt/privileges/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/windows/nt/privileges/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/windows/nt/launcher/authors.txt b/basis/io/windows/nt/sockets/authors.txt similarity index 100% rename from extra/io/windows/nt/launcher/authors.txt rename to basis/io/windows/nt/sockets/authors.txt diff --git a/extra/io/windows/nt/sockets/sockets.factor b/basis/io/windows/nt/sockets/sockets.factor similarity index 100% rename from extra/io/windows/nt/sockets/sockets.factor rename to basis/io/windows/nt/sockets/sockets.factor diff --git a/basis/io/windows/nt/sockets/tags.txt b/basis/io/windows/nt/sockets/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/windows/nt/sockets/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/windows/nt/summary.txt b/basis/io/windows/nt/summary.txt similarity index 100% rename from extra/io/windows/nt/summary.txt rename to basis/io/windows/nt/summary.txt diff --git a/basis/io/windows/nt/tags.txt b/basis/io/windows/nt/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/windows/nt/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/windows/privileges/privileges.factor b/basis/io/windows/privileges/privileges.factor similarity index 100% rename from extra/io/windows/privileges/privileges.factor rename to basis/io/windows/privileges/privileges.factor diff --git a/basis/io/windows/privileges/tags.txt b/basis/io/windows/privileges/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/windows/privileges/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/windows/sockets/sockets.factor b/basis/io/windows/sockets/sockets.factor similarity index 100% rename from extra/io/windows/sockets/sockets.factor rename to basis/io/windows/sockets/sockets.factor diff --git a/basis/io/windows/sockets/tags.txt b/basis/io/windows/sockets/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/windows/sockets/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/io/windows/summary.txt b/basis/io/windows/summary.txt similarity index 100% rename from extra/io/windows/summary.txt rename to basis/io/windows/summary.txt diff --git a/basis/io/windows/tags.txt b/basis/io/windows/tags.txt new file mode 100644 index 0000000000..02ec70f741 --- /dev/null +++ b/basis/io/windows/tags.txt @@ -0,0 +1,2 @@ +unportable +windows diff --git a/extra/io/windows/windows.factor b/basis/io/windows/windows.factor similarity index 100% rename from extra/io/windows/windows.factor rename to basis/io/windows/windows.factor diff --git a/extra/lcs/authors.txt b/basis/lcs/authors.txt similarity index 100% rename from extra/lcs/authors.txt rename to basis/lcs/authors.txt diff --git a/extra/lcs/diff2html/diff2html.factor b/basis/lcs/diff2html/diff2html.factor similarity index 100% rename from extra/lcs/diff2html/diff2html.factor rename to basis/lcs/diff2html/diff2html.factor diff --git a/extra/lcs/lcs-docs.factor b/basis/lcs/lcs-docs.factor similarity index 100% rename from extra/lcs/lcs-docs.factor rename to basis/lcs/lcs-docs.factor diff --git a/extra/lcs/lcs-tests.factor b/basis/lcs/lcs-tests.factor similarity index 100% rename from extra/lcs/lcs-tests.factor rename to basis/lcs/lcs-tests.factor diff --git a/extra/lcs/lcs.factor b/basis/lcs/lcs.factor similarity index 100% rename from extra/lcs/lcs.factor rename to basis/lcs/lcs.factor diff --git a/extra/lcs/summary.txt b/basis/lcs/summary.txt similarity index 100% rename from extra/lcs/summary.txt rename to basis/lcs/summary.txt diff --git a/extra/lcs/tags.txt b/basis/lcs/tags.txt similarity index 100% rename from extra/lcs/tags.txt rename to basis/lcs/tags.txt diff --git a/extra/help/syntax/authors.txt b/basis/libc/authors.txt similarity index 100% rename from extra/help/syntax/authors.txt rename to basis/libc/authors.txt diff --git a/core/libc/libc-docs.factor b/basis/libc/libc-docs.factor similarity index 100% rename from core/libc/libc-docs.factor rename to basis/libc/libc-docs.factor diff --git a/core/libc/libc-tests.factor b/basis/libc/libc-tests.factor similarity index 62% rename from core/libc/libc-tests.factor rename to basis/libc/libc-tests.factor index 249399bdd0..b00463127f 100755 --- a/core/libc/libc-tests.factor +++ b/basis/libc/libc-tests.factor @@ -4,8 +4,8 @@ destructors kernel ; 100 malloc "block" set -[ t ] [ "block" get mallocs get key? ] unit-test +[ t ] [ "block" get mallocs key? ] unit-test [ ] [ [ "block" get &free drop ] with-destructors ] unit-test -[ f ] [ "block" get mallocs get key? ] unit-test +[ f ] [ "block" get mallocs key? ] unit-test diff --git a/core/libc/libc.factor b/basis/libc/libc.factor similarity index 75% rename from core/libc/libc.factor rename to basis/libc/libc.factor index cda5260397..cf4e2fb722 100755 --- a/core/libc/libc.factor +++ b/basis/libc/libc.factor @@ -2,8 +2,8 @@ ! Copyright (C) 2007, 2008 Slava Pestov ! Copyright (C) 2007, 2008 Doug Coleman ! See http://factorcode.org/license.txt for BSD license. -USING: alien assocs continuations destructors init kernel -namespaces accessors sets ; +USING: alien assocs continuations destructors kernel +namespaces accessors sets summary ; IN: libc malloc-expiry set-global + H{ } clone dup \ mallocs set-global + ] [ + \ mallocs get-global + ] if ; PRIVATE> ERROR: bad-ptr ; +M: bad-ptr summary + drop "Memory allocation failed" ; + : check-ptr ( c-ptr -- c-ptr ) [ bad-ptr ] unless* ; ERROR: double-free ; +M: double-free summary + drop "Free failed since memory is not allocated" ; + ERROR: realloc-error ptr size ; +M: realloc-error summary + drop "Memory reallocation failed" ; + diff --git a/core/libc/summary.txt b/basis/libc/summary.txt similarity index 100% rename from core/libc/summary.txt rename to basis/libc/summary.txt diff --git a/extra/cocoa/tags.txt b/basis/libc/tags.txt similarity index 100% rename from extra/cocoa/tags.txt rename to basis/libc/tags.txt diff --git a/extra/help/topics/authors.txt b/basis/listener/authors.txt similarity index 100% rename from extra/help/topics/authors.txt rename to basis/listener/authors.txt diff --git a/core/listener/listener-docs.factor b/basis/listener/listener-docs.factor similarity index 100% rename from core/listener/listener-docs.factor rename to basis/listener/listener-docs.factor diff --git a/core/listener/listener-tests.factor b/basis/listener/listener-tests.factor similarity index 98% rename from core/listener/listener-tests.factor rename to basis/listener/listener-tests.factor index 24449049e0..e681bac314 100755 --- a/core/listener/listener-tests.factor +++ b/basis/listener/listener-tests.factor @@ -1,6 +1,6 @@ USING: io io.streams.string io.streams.duplex listener tools.test parser math namespaces continuations vocabs kernel -compiler.units ; +compiler.units eval ; IN: listener.tests : hello "Hi" print ; parsing diff --git a/core/listener/listener.factor b/basis/listener/listener.factor similarity index 93% rename from core/listener/listener.factor rename to basis/listener/listener.factor index 5ff5830e7a..feddbdc042 100755 --- a/core/listener/listener.factor +++ b/basis/listener/listener.factor @@ -3,7 +3,8 @@ 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 ; +definitions compiler.units accessors colors ; + IN: listener SYMBOL: quit-flag @@ -41,7 +42,7 @@ M: object stream-read-quot : prompt. ( -- ) "( " in get " )" 3append - H{ { background { 1 0.7 0.7 1 } } } format bl flush ; + H{ { background T{ rgba f 1 0.7 0.7 1 } } } format bl flush ; SYMBOL: error-hook diff --git a/core/listener/summary.txt b/basis/listener/summary.txt similarity index 100% rename from core/listener/summary.txt rename to basis/listener/summary.txt diff --git a/extra/help/lint/tags.txt b/basis/listener/tags.txt similarity index 100% rename from extra/help/lint/tags.txt rename to basis/listener/tags.txt diff --git a/extra/help/tutorial/authors.txt b/basis/locals/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/help/tutorial/authors.txt rename to basis/locals/authors.txt diff --git a/extra/locals/backend/backend-tests.factor b/basis/locals/backend/backend-tests.factor similarity index 100% rename from extra/locals/backend/backend-tests.factor rename to basis/locals/backend/backend-tests.factor diff --git a/extra/locals/backend/backend.factor b/basis/locals/backend/backend.factor similarity index 100% rename from extra/locals/backend/backend.factor rename to basis/locals/backend/backend.factor diff --git a/extra/locals/locals-docs.factor b/basis/locals/locals-docs.factor similarity index 100% rename from extra/locals/locals-docs.factor rename to basis/locals/locals-docs.factor diff --git a/extra/locals/locals-tests.factor b/basis/locals/locals-tests.factor similarity index 99% rename from extra/locals/locals-tests.factor rename to basis/locals/locals-tests.factor index 025e175bc2..23a1ee9284 100755 --- a/extra/locals/locals-tests.factor +++ b/basis/locals/locals-tests.factor @@ -1,6 +1,6 @@ USING: locals math sequences tools.test hashtables words kernel namespaces arrays strings prettyprint io.streams.string parser -accessors generic ; +accessors generic eval ; IN: locals.tests :: foo ( a b -- a a ) a a ; diff --git a/extra/locals/locals.factor b/basis/locals/locals.factor similarity index 100% rename from extra/locals/locals.factor rename to basis/locals/locals.factor diff --git a/extra/locals/summary.txt b/basis/locals/summary.txt similarity index 100% rename from extra/locals/summary.txt rename to basis/locals/summary.txt diff --git a/extra/locals/tags.txt b/basis/locals/tags.txt similarity index 100% rename from extra/locals/tags.txt rename to basis/locals/tags.txt diff --git a/extra/logging/analysis/analysis-docs.factor b/basis/logging/analysis/analysis-docs.factor similarity index 100% rename from extra/logging/analysis/analysis-docs.factor rename to basis/logging/analysis/analysis-docs.factor diff --git a/extra/logging/analysis/analysis.factor b/basis/logging/analysis/analysis.factor similarity index 100% rename from extra/logging/analysis/analysis.factor rename to basis/logging/analysis/analysis.factor diff --git a/extra/logging/analysis/authors.txt b/basis/logging/analysis/authors.txt similarity index 100% rename from extra/logging/analysis/authors.txt rename to basis/logging/analysis/authors.txt diff --git a/extra/logging/analysis/summary.txt b/basis/logging/analysis/summary.txt similarity index 100% rename from extra/logging/analysis/summary.txt rename to basis/logging/analysis/summary.txt diff --git a/extra/logging/analysis/tags.txt b/basis/logging/analysis/tags.txt similarity index 100% rename from extra/logging/analysis/tags.txt rename to basis/logging/analysis/tags.txt diff --git a/extra/logging/authors.txt b/basis/logging/authors.txt similarity index 100% rename from extra/logging/authors.txt rename to basis/logging/authors.txt diff --git a/extra/logging/insomniac/authors.txt b/basis/logging/insomniac/authors.txt similarity index 100% rename from extra/logging/insomniac/authors.txt rename to basis/logging/insomniac/authors.txt diff --git a/extra/logging/insomniac/insomniac-docs.factor b/basis/logging/insomniac/insomniac-docs.factor similarity index 100% rename from extra/logging/insomniac/insomniac-docs.factor rename to basis/logging/insomniac/insomniac-docs.factor diff --git a/extra/logging/insomniac/insomniac.factor b/basis/logging/insomniac/insomniac.factor similarity index 100% rename from extra/logging/insomniac/insomniac.factor rename to basis/logging/insomniac/insomniac.factor diff --git a/extra/logging/insomniac/summary.txt b/basis/logging/insomniac/summary.txt similarity index 100% rename from extra/logging/insomniac/summary.txt rename to basis/logging/insomniac/summary.txt diff --git a/extra/logging/insomniac/tags.txt b/basis/logging/insomniac/tags.txt similarity index 100% rename from extra/logging/insomniac/tags.txt rename to basis/logging/insomniac/tags.txt diff --git a/extra/logging/logging-docs.factor b/basis/logging/logging-docs.factor similarity index 100% rename from extra/logging/logging-docs.factor rename to basis/logging/logging-docs.factor diff --git a/extra/logging/logging-tests.factor b/basis/logging/logging-tests.factor similarity index 100% rename from extra/logging/logging-tests.factor rename to basis/logging/logging-tests.factor diff --git a/extra/logging/logging.factor b/basis/logging/logging.factor similarity index 100% rename from extra/logging/logging.factor rename to basis/logging/logging.factor diff --git a/extra/logging/parser/authors.txt b/basis/logging/parser/authors.txt similarity index 100% rename from extra/logging/parser/authors.txt rename to basis/logging/parser/authors.txt diff --git a/extra/logging/parser/parser-docs.factor b/basis/logging/parser/parser-docs.factor similarity index 100% rename from extra/logging/parser/parser-docs.factor rename to basis/logging/parser/parser-docs.factor diff --git a/extra/logging/parser/parser.factor b/basis/logging/parser/parser.factor similarity index 100% rename from extra/logging/parser/parser.factor rename to basis/logging/parser/parser.factor diff --git a/extra/logging/parser/summary.txt b/basis/logging/parser/summary.txt similarity index 100% rename from extra/logging/parser/summary.txt rename to basis/logging/parser/summary.txt diff --git a/extra/logging/parser/tags.txt b/basis/logging/parser/tags.txt similarity index 100% rename from extra/logging/parser/tags.txt rename to basis/logging/parser/tags.txt diff --git a/extra/logging/server/authors.txt b/basis/logging/server/authors.txt similarity index 100% rename from extra/logging/server/authors.txt rename to basis/logging/server/authors.txt diff --git a/extra/logging/server/server-docs.factor b/basis/logging/server/server-docs.factor similarity index 100% rename from extra/logging/server/server-docs.factor rename to basis/logging/server/server-docs.factor diff --git a/extra/logging/server/server.factor b/basis/logging/server/server.factor similarity index 100% rename from extra/logging/server/server.factor rename to basis/logging/server/server.factor diff --git a/extra/logging/server/summary.txt b/basis/logging/server/summary.txt similarity index 100% rename from extra/logging/server/summary.txt rename to basis/logging/server/summary.txt diff --git a/extra/logging/server/tags.txt b/basis/logging/server/tags.txt similarity index 100% rename from extra/logging/server/tags.txt rename to basis/logging/server/tags.txt diff --git a/extra/logging/summary.txt b/basis/logging/summary.txt similarity index 100% rename from extra/logging/summary.txt rename to basis/logging/summary.txt diff --git a/extra/logging/tags.txt b/basis/logging/tags.txt similarity index 100% rename from extra/logging/tags.txt rename to basis/logging/tags.txt diff --git a/extra/hints/authors.txt b/basis/macros/authors.txt similarity index 100% rename from extra/hints/authors.txt rename to basis/macros/authors.txt diff --git a/extra/macros/macros-docs.factor b/basis/macros/macros-docs.factor similarity index 93% rename from extra/macros/macros-docs.factor rename to basis/macros/macros-docs.factor index 022458cc7c..6b54da0856 100644 --- a/extra/macros/macros-docs.factor +++ b/basis/macros/macros-docs.factor @@ -21,7 +21,7 @@ HELP: macro-expand { $values { "..." "inputs to a macro" } { "word" macro } { "quot" quotation } } { $description "Expands a macro. Useful for debugging." } { $examples - { $code "USING: math macros combinators.lib ;" "{ [ integer? ] [ 0 > ] [ 13 mod zero? ] } \ 1&& macro-expand ." } + { $code "USING: math macros combinators.short-circuit ;" "{ [ integer? ] [ 0 > ] [ 13 mod zero? ] } \ 1&& macro-expand ." } } ; ARTICLE: "macros" "Macros" diff --git a/extra/macros/macros-tests.factor b/basis/macros/macros-tests.factor similarity index 90% rename from extra/macros/macros-tests.factor rename to basis/macros/macros-tests.factor index 91527c2125..150fd9eeaa 100644 --- a/extra/macros/macros-tests.factor +++ b/basis/macros/macros-tests.factor @@ -1,6 +1,6 @@ IN: macros.tests USING: tools.test macros math kernel arrays -vectors io.streams.string prettyprint parser ; +vectors io.streams.string prettyprint parser eval ; MACRO: see-test ( a b -- c ) + ; diff --git a/extra/macros/macros.factor b/basis/macros/macros.factor similarity index 100% rename from extra/macros/macros.factor rename to basis/macros/macros.factor diff --git a/extra/macros/summary.txt b/basis/macros/summary.txt similarity index 100% rename from extra/macros/summary.txt rename to basis/macros/summary.txt diff --git a/extra/macros/tags.txt b/basis/macros/tags.txt similarity index 100% rename from extra/macros/tags.txt rename to basis/macros/tags.txt diff --git a/extra/io/buffers/authors.txt b/basis/math/bitfields/authors.txt similarity index 100% rename from extra/io/buffers/authors.txt rename to basis/math/bitfields/authors.txt diff --git a/core/math/bitfields/bitfields-docs.factor b/basis/math/bitfields/bitfields-docs.factor similarity index 100% rename from core/math/bitfields/bitfields-docs.factor rename to basis/math/bitfields/bitfields-docs.factor diff --git a/core/math/bitfields/bitfields-tests.factor b/basis/math/bitfields/bitfields-tests.factor similarity index 100% rename from core/math/bitfields/bitfields-tests.factor rename to basis/math/bitfields/bitfields-tests.factor diff --git a/core/math/bitfields/bitfields.factor b/basis/math/bitfields/bitfields.factor similarity index 100% rename from core/math/bitfields/bitfields.factor rename to basis/math/bitfields/bitfields.factor diff --git a/core/math/bitfields/summary.txt b/basis/math/bitfields/summary.txt similarity index 100% rename from core/math/bitfields/summary.txt rename to basis/math/bitfields/summary.txt diff --git a/extra/io/monitors/authors.txt b/basis/math/complex/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/io/monitors/authors.txt rename to basis/math/complex/authors.txt diff --git a/extra/math/complex/complex-docs.factor b/basis/math/complex/complex-docs.factor similarity index 100% rename from extra/math/complex/complex-docs.factor rename to basis/math/complex/complex-docs.factor diff --git a/extra/math/complex/complex-tests.factor b/basis/math/complex/complex-tests.factor similarity index 100% rename from extra/math/complex/complex-tests.factor rename to basis/math/complex/complex-tests.factor diff --git a/extra/math/complex/complex.factor b/basis/math/complex/complex.factor similarity index 100% rename from extra/math/complex/complex.factor rename to basis/math/complex/complex.factor diff --git a/extra/math/complex/summary.txt b/basis/math/complex/summary.txt similarity index 100% rename from extra/math/complex/summary.txt rename to basis/math/complex/summary.txt diff --git a/extra/io/pools/authors.txt b/basis/math/constants/authors.txt similarity index 100% rename from extra/io/pools/authors.txt rename to basis/math/constants/authors.txt diff --git a/extra/math/constants/constants-docs.factor b/basis/math/constants/constants-docs.factor similarity index 100% rename from extra/math/constants/constants-docs.factor rename to basis/math/constants/constants-docs.factor diff --git a/extra/math/constants/constants.factor b/basis/math/constants/constants.factor similarity index 100% rename from extra/math/constants/constants.factor rename to basis/math/constants/constants.factor diff --git a/extra/math/constants/summary.txt b/basis/math/constants/summary.txt similarity index 100% rename from extra/math/constants/summary.txt rename to basis/math/constants/summary.txt diff --git a/extra/io/ports/authors.txt b/basis/math/functions/authors.txt similarity index 100% rename from extra/io/ports/authors.txt rename to basis/math/functions/authors.txt diff --git a/extra/math/functions/functions-docs.factor b/basis/math/functions/functions-docs.factor similarity index 100% rename from extra/math/functions/functions-docs.factor rename to basis/math/functions/functions-docs.factor diff --git a/extra/math/functions/functions-tests.factor b/basis/math/functions/functions-tests.factor similarity index 100% rename from extra/math/functions/functions-tests.factor rename to basis/math/functions/functions-tests.factor diff --git a/extra/math/functions/functions.factor b/basis/math/functions/functions.factor similarity index 100% rename from extra/math/functions/functions.factor rename to basis/math/functions/functions.factor diff --git a/extra/math/functions/summary.txt b/basis/math/functions/summary.txt similarity index 100% rename from extra/math/functions/summary.txt rename to basis/math/functions/summary.txt diff --git a/extra/io/servers/connection/authors.txt b/basis/math/intervals/authors.txt similarity index 100% rename from extra/io/servers/connection/authors.txt rename to basis/math/intervals/authors.txt diff --git a/core/math/intervals/intervals-docs.factor b/basis/math/intervals/intervals-docs.factor similarity index 100% rename from core/math/intervals/intervals-docs.factor rename to basis/math/intervals/intervals-docs.factor diff --git a/core/math/intervals/intervals-tests.factor b/basis/math/intervals/intervals-tests.factor similarity index 100% rename from core/math/intervals/intervals-tests.factor rename to basis/math/intervals/intervals-tests.factor diff --git a/core/math/intervals/intervals.factor b/basis/math/intervals/intervals.factor similarity index 97% rename from core/math/intervals/intervals.factor rename to basis/math/intervals/intervals.factor index 8afbee3478..6e50f42726 100755 --- a/core/math/intervals/intervals.factor +++ b/basis/math/intervals/intervals.factor @@ -1,4 +1,4 @@ -! Copyright (C) 2007 Slava Pestov. +! Copyright (C) 2007, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. ! Based on Slate's src/unfinished/interval.slate by Brian Rice. USING: accessors kernel sequences arrays math math.order @@ -76,9 +76,11 @@ TUPLE: interval { from read-only } { to read-only } ; [ from>> ] [ to>> ] bi ; : points>interval ( seq -- interval ) - dup first - [ [ endpoint-min ] reduce ] 2keep - [ endpoint-max ] reduce ; + dup [ first fp-nan? ] contains? [ drop [-inf,inf] ] [ + dup first + [ [ endpoint-min ] reduce ] 2keep + [ endpoint-max ] reduce + ] if ; : (interval-op) ( p1 p2 quot -- p3 ) [ [ first ] [ first ] [ ] tri* call ] diff --git a/core/math/intervals/summary.txt b/basis/math/intervals/summary.txt similarity index 100% rename from core/math/intervals/summary.txt rename to basis/math/intervals/summary.txt diff --git a/extra/io/servers/packet/authors.txt b/basis/math/libm/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/io/servers/packet/authors.txt rename to basis/math/libm/authors.txt diff --git a/extra/math/libm/libm-docs.factor b/basis/math/libm/libm-docs.factor similarity index 100% rename from extra/math/libm/libm-docs.factor rename to basis/math/libm/libm-docs.factor diff --git a/extra/math/libm/libm.factor b/basis/math/libm/libm.factor similarity index 100% rename from extra/math/libm/libm.factor rename to basis/math/libm/libm.factor diff --git a/extra/math/libm/summary.txt b/basis/math/libm/summary.txt similarity index 100% rename from extra/math/libm/summary.txt rename to basis/math/libm/summary.txt diff --git a/extra/core-foundation/tags.txt b/basis/math/libm/tags.txt similarity index 100% rename from extra/core-foundation/tags.txt rename to basis/math/libm/tags.txt diff --git a/extra/math/ranges/authors.txt b/basis/math/ranges/authors.txt similarity index 100% rename from extra/math/ranges/authors.txt rename to basis/math/ranges/authors.txt diff --git a/extra/math/ranges/ranges-docs.factor b/basis/math/ranges/ranges-docs.factor similarity index 100% rename from extra/math/ranges/ranges-docs.factor rename to basis/math/ranges/ranges-docs.factor diff --git a/extra/math/ranges/ranges-tests.factor b/basis/math/ranges/ranges-tests.factor similarity index 100% rename from extra/math/ranges/ranges-tests.factor rename to basis/math/ranges/ranges-tests.factor diff --git a/extra/math/ranges/ranges.factor b/basis/math/ranges/ranges.factor similarity index 100% rename from extra/math/ranges/ranges.factor rename to basis/math/ranges/ranges.factor diff --git a/extra/math/ranges/summary.txt b/basis/math/ranges/summary.txt similarity index 100% rename from extra/math/ranges/summary.txt rename to basis/math/ranges/summary.txt diff --git a/extra/io/sockets/secure/authors.txt b/basis/math/ratios/authors.txt similarity index 100% rename from extra/io/sockets/secure/authors.txt rename to basis/math/ratios/authors.txt diff --git a/extra/math/ratios/ratios-docs.factor b/basis/math/ratios/ratios-docs.factor similarity index 100% rename from extra/math/ratios/ratios-docs.factor rename to basis/math/ratios/ratios-docs.factor diff --git a/extra/math/ratios/ratios-tests.factor b/basis/math/ratios/ratios-tests.factor similarity index 100% rename from extra/math/ratios/ratios-tests.factor rename to basis/math/ratios/ratios-tests.factor diff --git a/extra/math/ratios/ratios.factor b/basis/math/ratios/ratios.factor similarity index 100% rename from extra/math/ratios/ratios.factor rename to basis/math/ratios/ratios.factor diff --git a/extra/math/ratios/summary.txt b/basis/math/ratios/summary.txt similarity index 100% rename from extra/math/ratios/summary.txt rename to basis/math/ratios/summary.txt diff --git a/extra/io/streams/duplex/authors.txt b/basis/math/vectors/authors.txt similarity index 100% rename from extra/io/streams/duplex/authors.txt rename to basis/math/vectors/authors.txt diff --git a/extra/math/vectors/summary.txt b/basis/math/vectors/summary.txt similarity index 100% rename from extra/math/vectors/summary.txt rename to basis/math/vectors/summary.txt diff --git a/extra/math/vectors/vectors-docs.factor b/basis/math/vectors/vectors-docs.factor similarity index 100% rename from extra/math/vectors/vectors-docs.factor rename to basis/math/vectors/vectors-docs.factor diff --git a/extra/math/vectors/vectors-tests.factor b/basis/math/vectors/vectors-tests.factor similarity index 100% rename from extra/math/vectors/vectors-tests.factor rename to basis/math/vectors/vectors-tests.factor diff --git a/extra/math/vectors/vectors.factor b/basis/math/vectors/vectors.factor similarity index 100% rename from extra/math/vectors/vectors.factor rename to basis/math/vectors/vectors.factor diff --git a/extra/memoize/authors.txt b/basis/memoize/authors.txt similarity index 100% rename from extra/memoize/authors.txt rename to basis/memoize/authors.txt diff --git a/extra/memoize/memoize-docs.factor b/basis/memoize/memoize-docs.factor similarity index 100% rename from extra/memoize/memoize-docs.factor rename to basis/memoize/memoize-docs.factor diff --git a/extra/memoize/memoize-tests.factor b/basis/memoize/memoize-tests.factor similarity index 94% rename from extra/memoize/memoize-tests.factor rename to basis/memoize/memoize-tests.factor index c2592b38ca..1f819d281d 100644 --- a/extra/memoize/memoize-tests.factor +++ b/basis/memoize/memoize-tests.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007 Slava Pestov, Daniel Ehrenberg. ! See http://factorcode.org/license.txt for BSD license. USING: math kernel memoize tools.test parser -prettyprint io.streams.string sequences ; +prettyprint io.streams.string sequences eval ; IN: memoize.tests MEMO: fib ( m -- n ) diff --git a/extra/memoize/memoize.factor b/basis/memoize/memoize.factor similarity index 100% rename from extra/memoize/memoize.factor rename to basis/memoize/memoize.factor diff --git a/extra/memoize/summary.txt b/basis/memoize/summary.txt similarity index 100% rename from extra/memoize/summary.txt rename to basis/memoize/summary.txt diff --git a/extra/memoize/tags.txt b/basis/memoize/tags.txt similarity index 100% rename from extra/memoize/tags.txt rename to basis/memoize/tags.txt diff --git a/extra/io/streams/null/authors.txt b/basis/mime-types/authors.txt similarity index 100% rename from extra/io/streams/null/authors.txt rename to basis/mime-types/authors.txt diff --git a/extra/mime-types/mime-types-tests.factor b/basis/mime-types/mime-types-tests.factor similarity index 100% rename from extra/mime-types/mime-types-tests.factor rename to basis/mime-types/mime-types-tests.factor diff --git a/extra/mime-types/mime-types.factor b/basis/mime-types/mime-types.factor similarity index 92% rename from extra/mime-types/mime-types.factor rename to basis/mime-types/mime-types.factor index a228a8904c..9489da8149 100755 --- a/extra/mime-types/mime-types.factor +++ b/basis/mime-types/mime-types.factor @@ -5,7 +5,7 @@ kernel namespaces fry memoize ; IN: mime-types MEMO: mime-db ( -- seq ) - "resource:extra/mime-types/mime.types" ascii file-lines + "resource:basis/mime-types/mime.types" ascii file-lines [ "#" head? not ] filter [ " \t" split harvest ] map harvest ; : nonstandard-mime-types ( -- assoc ) diff --git a/extra/mime-types/mime.types b/basis/mime-types/mime.types similarity index 100% rename from extra/mime-types/mime.types rename to basis/mime-types/mime.types diff --git a/extra/io/unix/authors.txt b/basis/mirrors/authors.txt similarity index 100% rename from extra/io/unix/authors.txt rename to basis/mirrors/authors.txt diff --git a/core/mirrors/mirrors-docs.factor b/basis/mirrors/mirrors-docs.factor similarity index 100% rename from core/mirrors/mirrors-docs.factor rename to basis/mirrors/mirrors-docs.factor diff --git a/core/mirrors/mirrors-tests.factor b/basis/mirrors/mirrors-tests.factor similarity index 97% rename from core/mirrors/mirrors-tests.factor rename to basis/mirrors/mirrors-tests.factor index 879ec55861..2eda136ae5 100755 --- a/core/mirrors/mirrors-tests.factor +++ b/basis/mirrors/mirrors-tests.factor @@ -1,5 +1,5 @@ USING: mirrors tools.test assocs kernel arrays accessors words -namespaces math slots parser ; +namespaces math slots parser eval ; IN: mirrors.tests TUPLE: foo bar baz ; diff --git a/core/mirrors/mirrors.factor b/basis/mirrors/mirrors.factor similarity index 100% rename from core/mirrors/mirrors.factor rename to basis/mirrors/mirrors.factor diff --git a/core/mirrors/summary.txt b/basis/mirrors/summary.txt similarity index 100% rename from core/mirrors/summary.txt rename to basis/mirrors/summary.txt diff --git a/core/mirrors/tags.txt b/basis/mirrors/tags.txt similarity index 100% rename from core/mirrors/tags.txt rename to basis/mirrors/tags.txt diff --git a/extra/io/unix/backend/authors.txt b/basis/models/authors.txt similarity index 100% rename from extra/io/unix/backend/authors.txt rename to basis/models/authors.txt diff --git a/extra/models/compose/compose-docs.factor b/basis/models/compose/compose-docs.factor similarity index 100% rename from extra/models/compose/compose-docs.factor rename to basis/models/compose/compose-docs.factor diff --git a/extra/models/compose/compose-tests.factor b/basis/models/compose/compose-tests.factor similarity index 100% rename from extra/models/compose/compose-tests.factor rename to basis/models/compose/compose-tests.factor diff --git a/extra/models/compose/compose.factor b/basis/models/compose/compose.factor similarity index 100% rename from extra/models/compose/compose.factor rename to basis/models/compose/compose.factor diff --git a/extra/models/delay/delay-docs.factor b/basis/models/delay/delay-docs.factor similarity index 100% rename from extra/models/delay/delay-docs.factor rename to basis/models/delay/delay-docs.factor diff --git a/extra/models/delay/delay.factor b/basis/models/delay/delay.factor similarity index 100% rename from extra/models/delay/delay.factor rename to basis/models/delay/delay.factor diff --git a/extra/models/filter/filter-docs.factor b/basis/models/filter/filter-docs.factor similarity index 100% rename from extra/models/filter/filter-docs.factor rename to basis/models/filter/filter-docs.factor diff --git a/extra/models/filter/filter-tests.factor b/basis/models/filter/filter-tests.factor similarity index 100% rename from extra/models/filter/filter-tests.factor rename to basis/models/filter/filter-tests.factor diff --git a/extra/models/filter/filter.factor b/basis/models/filter/filter.factor similarity index 100% rename from extra/models/filter/filter.factor rename to basis/models/filter/filter.factor diff --git a/extra/models/history/history-docs.factor b/basis/models/history/history-docs.factor similarity index 100% rename from extra/models/history/history-docs.factor rename to basis/models/history/history-docs.factor diff --git a/extra/models/history/history-tests.factor b/basis/models/history/history-tests.factor similarity index 100% rename from extra/models/history/history-tests.factor rename to basis/models/history/history-tests.factor diff --git a/extra/models/history/history.factor b/basis/models/history/history.factor similarity index 100% rename from extra/models/history/history.factor rename to basis/models/history/history.factor diff --git a/extra/models/mapping/mapping-tests.factor b/basis/models/mapping/mapping-tests.factor similarity index 100% rename from extra/models/mapping/mapping-tests.factor rename to basis/models/mapping/mapping-tests.factor diff --git a/extra/models/mapping/mapping.factor b/basis/models/mapping/mapping.factor similarity index 100% rename from extra/models/mapping/mapping.factor rename to basis/models/mapping/mapping.factor diff --git a/extra/models/models-docs.factor b/basis/models/models-docs.factor similarity index 100% rename from extra/models/models-docs.factor rename to basis/models/models-docs.factor diff --git a/extra/models/models-tests.factor b/basis/models/models-tests.factor similarity index 100% rename from extra/models/models-tests.factor rename to basis/models/models-tests.factor diff --git a/extra/models/models.factor b/basis/models/models.factor similarity index 100% rename from extra/models/models.factor rename to basis/models/models.factor diff --git a/extra/models/range/range-docs.factor b/basis/models/range/range-docs.factor similarity index 100% rename from extra/models/range/range-docs.factor rename to basis/models/range/range-docs.factor diff --git a/extra/models/range/range-tests.factor b/basis/models/range/range-tests.factor similarity index 100% rename from extra/models/range/range-tests.factor rename to basis/models/range/range-tests.factor diff --git a/extra/models/range/range.factor b/basis/models/range/range.factor similarity index 100% rename from extra/models/range/range.factor rename to basis/models/range/range.factor diff --git a/extra/models/summary.txt b/basis/models/summary.txt similarity index 100% rename from extra/models/summary.txt rename to basis/models/summary.txt diff --git a/extra/models/tags.txt b/basis/models/tags.txt similarity index 100% rename from extra/models/tags.txt rename to basis/models/tags.txt diff --git a/extra/multiline/authors.txt b/basis/multiline/authors.txt similarity index 100% rename from extra/multiline/authors.txt rename to basis/multiline/authors.txt diff --git a/extra/multiline/multiline-docs.factor b/basis/multiline/multiline-docs.factor similarity index 100% rename from extra/multiline/multiline-docs.factor rename to basis/multiline/multiline-docs.factor diff --git a/extra/multiline/multiline-tests.factor b/basis/multiline/multiline-tests.factor similarity index 100% rename from extra/multiline/multiline-tests.factor rename to basis/multiline/multiline-tests.factor diff --git a/extra/multiline/multiline.factor b/basis/multiline/multiline.factor similarity index 100% rename from extra/multiline/multiline.factor rename to basis/multiline/multiline.factor diff --git a/extra/multiline/summary.txt b/basis/multiline/summary.txt similarity index 100% rename from extra/multiline/summary.txt rename to basis/multiline/summary.txt diff --git a/extra/multiline/tags.txt b/basis/multiline/tags.txt similarity index 100% rename from extra/multiline/tags.txt rename to basis/multiline/tags.txt diff --git a/extra/io/unix/bsd/authors.txt b/basis/none/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/io/unix/bsd/authors.txt rename to basis/none/authors.txt diff --git a/core/none/deploy.factor b/basis/none/deploy.factor similarity index 100% rename from core/none/deploy.factor rename to basis/none/deploy.factor diff --git a/core/none/none-docs.factor b/basis/none/none-docs.factor similarity index 100% rename from core/none/none-docs.factor rename to basis/none/none-docs.factor diff --git a/core/none/none.factor b/basis/none/none.factor similarity index 100% rename from core/none/none.factor rename to basis/none/none.factor diff --git a/core/none/summary.txt b/basis/none/summary.txt similarity index 100% rename from core/none/summary.txt rename to basis/none/summary.txt diff --git a/extra/openssl/authors.txt b/basis/openssl/authors.txt similarity index 100% rename from extra/openssl/authors.txt rename to basis/openssl/authors.txt diff --git a/extra/openssl/cacert.pem b/basis/openssl/cacert.pem similarity index 100% rename from extra/openssl/cacert.pem rename to basis/openssl/cacert.pem diff --git a/extra/openssl/libcrypto/libcrypto.factor b/basis/openssl/libcrypto/libcrypto.factor similarity index 100% rename from extra/openssl/libcrypto/libcrypto.factor rename to basis/openssl/libcrypto/libcrypto.factor diff --git a/extra/openssl/libssl/libssl.factor b/basis/openssl/libssl/libssl.factor similarity index 100% rename from extra/openssl/libssl/libssl.factor rename to basis/openssl/libssl/libssl.factor diff --git a/extra/openssl/openssl-tests.factor b/basis/openssl/openssl-tests.factor similarity index 56% rename from extra/openssl/openssl-tests.factor rename to basis/openssl/openssl-tests.factor index 5990153073..93af70b3e0 100755 --- a/extra/openssl/openssl-tests.factor +++ b/basis/openssl/openssl-tests.factor @@ -4,17 +4,17 @@ openssl namespaces accessors tools.test continuations kernel ; openssl secure-socket-backend [ [ ] [ - "resource:extra/openssl/test/server.pem" >>key-file - "resource:extra/openssl/test/root.pem" >>ca-file - "resource:extra/openssl/test/dh1024.pem" >>dh-file + "resource:basis/openssl/test/server.pem" >>key-file + "resource:basis/openssl/test/root.pem" >>ca-file + "resource:basis/openssl/test/dh1024.pem" >>dh-file "password" >>password [ ] with-secure-context ] unit-test [ - "resource:extra/openssl/test/server.pem" >>key-file - "resource:extra/openssl/test/root.pem" >>ca-file + "resource:basis/openssl/test/server.pem" >>key-file + "resource:basis/openssl/test/root.pem" >>ca-file "wrong password" >>password [ ] with-secure-context ] must-fail diff --git a/extra/openssl/openssl.factor b/basis/openssl/openssl.factor similarity index 100% rename from extra/openssl/openssl.factor rename to basis/openssl/openssl.factor diff --git a/extra/openssl/summary.txt b/basis/openssl/summary.txt similarity index 100% rename from extra/openssl/summary.txt rename to basis/openssl/summary.txt diff --git a/extra/openssl/tags.txt b/basis/openssl/tags.txt similarity index 100% rename from extra/openssl/tags.txt rename to basis/openssl/tags.txt diff --git a/extra/openssl/test/dh1024.pem b/basis/openssl/test/dh1024.pem similarity index 100% rename from extra/openssl/test/dh1024.pem rename to basis/openssl/test/dh1024.pem diff --git a/extra/openssl/test/errors.txt b/basis/openssl/test/errors.txt similarity index 100% rename from extra/openssl/test/errors.txt rename to basis/openssl/test/errors.txt diff --git a/extra/openssl/test/root.pem b/basis/openssl/test/root.pem similarity index 100% rename from extra/openssl/test/root.pem rename to basis/openssl/test/root.pem diff --git a/extra/openssl/test/server.pem b/basis/openssl/test/server.pem similarity index 100% rename from extra/openssl/test/server.pem rename to basis/openssl/test/server.pem diff --git a/core/optimizer/allot/allot.factor b/basis/optimizer/allot/allot.factor similarity index 100% rename from core/optimizer/allot/allot.factor rename to basis/optimizer/allot/allot.factor diff --git a/extra/io/unix/epoll/authors.txt b/basis/optimizer/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/io/unix/epoll/authors.txt rename to basis/optimizer/authors.txt diff --git a/extra/io/unix/files/authors.txt b/basis/optimizer/backend/authors.txt similarity index 100% rename from extra/io/unix/files/authors.txt rename to basis/optimizer/backend/authors.txt diff --git a/core/optimizer/backend/backend.factor b/basis/optimizer/backend/backend.factor similarity index 100% rename from core/optimizer/backend/backend.factor rename to basis/optimizer/backend/backend.factor diff --git a/core/optimizer/backend/summary.txt b/basis/optimizer/backend/summary.txt similarity index 100% rename from core/optimizer/backend/summary.txt rename to basis/optimizer/backend/summary.txt diff --git a/core/optimizer/collect/collect.factor b/basis/optimizer/collect/collect.factor similarity index 100% rename from core/optimizer/collect/collect.factor rename to basis/optimizer/collect/collect.factor diff --git a/core/optimizer/control/control-tests.factor b/basis/optimizer/control/control-tests.factor similarity index 100% rename from core/optimizer/control/control-tests.factor rename to basis/optimizer/control/control-tests.factor diff --git a/core/optimizer/control/control.factor b/basis/optimizer/control/control.factor similarity index 100% rename from core/optimizer/control/control.factor rename to basis/optimizer/control/control.factor diff --git a/extra/io/unix/kqueue/authors.txt b/basis/optimizer/def-use/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/io/unix/kqueue/authors.txt rename to basis/optimizer/def-use/authors.txt diff --git a/core/optimizer/def-use/def-use-tests.factor b/basis/optimizer/def-use/def-use-tests.factor similarity index 100% rename from core/optimizer/def-use/def-use-tests.factor rename to basis/optimizer/def-use/def-use-tests.factor diff --git a/core/optimizer/def-use/def-use.factor b/basis/optimizer/def-use/def-use.factor similarity index 100% rename from core/optimizer/def-use/def-use.factor rename to basis/optimizer/def-use/def-use.factor diff --git a/core/optimizer/def-use/summary.txt b/basis/optimizer/def-use/summary.txt similarity index 100% rename from core/optimizer/def-use/summary.txt rename to basis/optimizer/def-use/summary.txt diff --git a/core/optimizer/inlining/inlining-tests.factor b/basis/optimizer/inlining/inlining-tests.factor similarity index 100% rename from core/optimizer/inlining/inlining-tests.factor rename to basis/optimizer/inlining/inlining-tests.factor diff --git a/core/optimizer/inlining/inlining.factor b/basis/optimizer/inlining/inlining.factor similarity index 100% rename from core/optimizer/inlining/inlining.factor rename to basis/optimizer/inlining/inlining.factor diff --git a/extra/io/unix/launcher/authors.txt b/basis/optimizer/known-words/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/io/unix/launcher/authors.txt rename to basis/optimizer/known-words/authors.txt diff --git a/core/optimizer/known-words/known-words.factor b/basis/optimizer/known-words/known-words.factor similarity index 100% rename from core/optimizer/known-words/known-words.factor rename to basis/optimizer/known-words/known-words.factor diff --git a/core/optimizer/known-words/summary.txt b/basis/optimizer/known-words/summary.txt similarity index 100% rename from core/optimizer/known-words/summary.txt rename to basis/optimizer/known-words/summary.txt diff --git a/extra/io/unix/linux/authors.txt b/basis/optimizer/math/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/io/unix/linux/authors.txt rename to basis/optimizer/math/authors.txt diff --git a/core/optimizer/math/math.factor b/basis/optimizer/math/math.factor similarity index 100% rename from core/optimizer/math/math.factor rename to basis/optimizer/math/math.factor diff --git a/core/optimizer/math/partial/partial-tests.factor b/basis/optimizer/math/partial/partial-tests.factor similarity index 100% rename from core/optimizer/math/partial/partial-tests.factor rename to basis/optimizer/math/partial/partial-tests.factor diff --git a/core/optimizer/math/partial/partial.factor b/basis/optimizer/math/partial/partial.factor similarity index 100% rename from core/optimizer/math/partial/partial.factor rename to basis/optimizer/math/partial/partial.factor diff --git a/core/optimizer/math/summary.txt b/basis/optimizer/math/summary.txt similarity index 100% rename from core/optimizer/math/summary.txt rename to basis/optimizer/math/summary.txt diff --git a/core/optimizer/optimizer-docs.factor b/basis/optimizer/optimizer-docs.factor similarity index 100% rename from core/optimizer/optimizer-docs.factor rename to basis/optimizer/optimizer-docs.factor diff --git a/core/optimizer/optimizer-tests.factor b/basis/optimizer/optimizer-tests.factor similarity index 100% rename from core/optimizer/optimizer-tests.factor rename to basis/optimizer/optimizer-tests.factor diff --git a/core/optimizer/optimizer.factor b/basis/optimizer/optimizer.factor similarity index 100% rename from core/optimizer/optimizer.factor rename to basis/optimizer/optimizer.factor diff --git a/extra/io/unix/mmap/authors.txt b/basis/optimizer/pattern-match/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/io/unix/mmap/authors.txt rename to basis/optimizer/pattern-match/authors.txt diff --git a/core/optimizer/pattern-match/pattern-match.factor b/basis/optimizer/pattern-match/pattern-match.factor similarity index 100% rename from core/optimizer/pattern-match/pattern-match.factor rename to basis/optimizer/pattern-match/pattern-match.factor diff --git a/core/optimizer/pattern-match/summary.txt b/basis/optimizer/pattern-match/summary.txt similarity index 100% rename from core/optimizer/pattern-match/summary.txt rename to basis/optimizer/pattern-match/summary.txt diff --git a/core/optimizer/specializers/specializers-docs.factor b/basis/optimizer/specializers/specializers-docs.factor similarity index 100% rename from core/optimizer/specializers/specializers-docs.factor rename to basis/optimizer/specializers/specializers-docs.factor diff --git a/core/optimizer/specializers/specializers.factor b/basis/optimizer/specializers/specializers.factor similarity index 100% rename from core/optimizer/specializers/specializers.factor rename to basis/optimizer/specializers/specializers.factor diff --git a/core/optimizer/summary.txt b/basis/optimizer/summary.txt similarity index 100% rename from core/optimizer/summary.txt rename to basis/optimizer/summary.txt diff --git a/core/cpu/tags.txt b/basis/optimizer/tags.txt similarity index 100% rename from core/cpu/tags.txt rename to basis/optimizer/tags.txt diff --git a/extra/present/present.factor b/basis/present/present.factor similarity index 100% rename from extra/present/present.factor rename to basis/present/present.factor diff --git a/extra/io/unix/select/authors.txt b/basis/prettyprint/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/io/unix/select/authors.txt rename to basis/prettyprint/authors.txt diff --git a/extra/io/unix/sockets/authors.txt b/basis/prettyprint/backend/authors.txt similarity index 100% rename from extra/io/unix/sockets/authors.txt rename to basis/prettyprint/backend/authors.txt diff --git a/core/prettyprint/backend/backend-docs.factor b/basis/prettyprint/backend/backend-docs.factor similarity index 100% rename from core/prettyprint/backend/backend-docs.factor rename to basis/prettyprint/backend/backend-docs.factor diff --git a/core/prettyprint/backend/backend.factor b/basis/prettyprint/backend/backend.factor similarity index 98% rename from core/prettyprint/backend/backend.factor rename to basis/prettyprint/backend/backend.factor index 00b38ae4f8..111bcfdafc 100755 --- a/core/prettyprint/backend/backend.factor +++ b/basis/prettyprint/backend/backend.factor @@ -5,7 +5,7 @@ hashtables io assocs kernel math namespaces sequences strings sbufs io.styles vectors words prettyprint.config prettyprint.sections quotations io io.files math.parser effects classes.tuple math.order classes.tuple.private classes -combinators ; +combinators colors ; IN: prettyprint.backend GENERIC: pprint* ( obj -- ) @@ -89,7 +89,7 @@ M: f pprint* drop \ f pprint-word ; : string-style ( obj -- hash ) [ presented set - { 0.3 0.3 0.3 1.0 } foreground set + T{ rgba f 0.3 0.3 0.3 1.0 } foreground set ] H{ } make-assoc ; : unparse-string ( str prefix suffix -- str ) diff --git a/core/prettyprint/backend/summary.txt b/basis/prettyprint/backend/summary.txt similarity index 100% rename from core/prettyprint/backend/summary.txt rename to basis/prettyprint/backend/summary.txt diff --git a/extra/io/windows/nt/pipes/authors.txt b/basis/prettyprint/config/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/io/windows/nt/pipes/authors.txt rename to basis/prettyprint/config/authors.txt diff --git a/core/prettyprint/config/config-docs.factor b/basis/prettyprint/config/config-docs.factor similarity index 100% rename from core/prettyprint/config/config-docs.factor rename to basis/prettyprint/config/config-docs.factor diff --git a/core/prettyprint/config/config.factor b/basis/prettyprint/config/config.factor similarity index 100% rename from core/prettyprint/config/config.factor rename to basis/prettyprint/config/config.factor diff --git a/core/prettyprint/config/summary.txt b/basis/prettyprint/config/summary.txt similarity index 100% rename from core/prettyprint/config/summary.txt rename to basis/prettyprint/config/summary.txt diff --git a/core/prettyprint/prettyprint-docs.factor b/basis/prettyprint/prettyprint-docs.factor similarity index 100% rename from core/prettyprint/prettyprint-docs.factor rename to basis/prettyprint/prettyprint-docs.factor diff --git a/core/prettyprint/prettyprint-tests.factor b/basis/prettyprint/prettyprint-tests.factor similarity index 98% rename from core/prettyprint/prettyprint-tests.factor rename to basis/prettyprint/prettyprint-tests.factor index fd76b87dbb..534ab0fd09 100755 --- a/core/prettyprint/prettyprint-tests.factor +++ b/basis/prettyprint/prettyprint-tests.factor @@ -2,7 +2,7 @@ USING: arrays definitions io.streams.string io.streams.duplex 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 ; +continuations generic compiler.units tools.walker eval ; IN: prettyprint.tests [ "4" ] [ 4 unparse ] unit-test @@ -194,7 +194,7 @@ DEFER: parse-error-file : string-layout { - "USING: io kernel lexer ;" + "USING: debugger io kernel lexer ;" "IN: prettyprint.tests" ": string-layout-test ( error -- )" " \"Expected \" write dup unexpected-want expected>string write" diff --git a/core/prettyprint/prettyprint.factor b/basis/prettyprint/prettyprint.factor similarity index 98% rename from core/prettyprint/prettyprint.factor rename to basis/prettyprint/prettyprint.factor index 804895f6c4..f78d12a310 100755 --- a/core/prettyprint/prettyprint.factor +++ b/basis/prettyprint/prettyprint.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2003, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -IN: prettyprint + USING: arrays generic generic.standard assocs io kernel math namespaces sequences strings io.styles io.streams.string vectors words prettyprint.backend prettyprint.sections @@ -8,7 +8,9 @@ prettyprint.config sorting splitting grouping math.parser vocabs definitions effects classes.builtin classes.tuple io.files classes continuations hashtables classes.mixin classes.union classes.intersection classes.predicate classes.singleton -combinators quotations sets accessors ; +combinators quotations sets accessors colors ; + +IN: prettyprint : make-pprint ( obj quot -- block in use ) [ @@ -95,7 +97,7 @@ combinators quotations sets accessors ; SYMBOL: -> \ -> -{ { foreground { 1 1 1 1 } } { background { 0 0 0 1 } } } +{ { foreground T{ rgba f 1 1 1 1 } } { background T{ rgba f 0 0 0 1 } } } "word-style" set-word-prop : remove-step-into ( word -- ) @@ -221,6 +223,7 @@ M: word declarations. POSTPONE: parsing POSTPONE: delimiter POSTPONE: inline + POSTPONE: recursive POSTPONE: foldable POSTPONE: flushable } [ declaration. ] with each ; diff --git a/extra/locals/authors.txt b/basis/prettyprint/sections/authors.txt similarity index 100% rename from extra/locals/authors.txt rename to basis/prettyprint/sections/authors.txt diff --git a/core/prettyprint/sections/sections-docs.factor b/basis/prettyprint/sections/sections-docs.factor similarity index 100% rename from core/prettyprint/sections/sections-docs.factor rename to basis/prettyprint/sections/sections-docs.factor diff --git a/core/prettyprint/sections/sections.factor b/basis/prettyprint/sections/sections.factor similarity index 100% rename from core/prettyprint/sections/sections.factor rename to basis/prettyprint/sections/sections.factor diff --git a/core/prettyprint/sections/summary.txt b/basis/prettyprint/sections/summary.txt similarity index 100% rename from core/prettyprint/sections/summary.txt rename to basis/prettyprint/sections/summary.txt diff --git a/core/prettyprint/summary.txt b/basis/prettyprint/summary.txt similarity index 100% rename from core/prettyprint/summary.txt rename to basis/prettyprint/summary.txt diff --git a/core/prettyprint/tags.txt b/basis/prettyprint/tags.txt similarity index 100% rename from core/prettyprint/tags.txt rename to basis/prettyprint/tags.txt diff --git a/extra/qualified/authors.txt b/basis/qualified/authors.txt similarity index 100% rename from extra/qualified/authors.txt rename to basis/qualified/authors.txt diff --git a/extra/qualified/qualified-docs.factor b/basis/qualified/qualified-docs.factor similarity index 100% rename from extra/qualified/qualified-docs.factor rename to basis/qualified/qualified-docs.factor diff --git a/extra/qualified/qualified-tests.factor b/basis/qualified/qualified-tests.factor similarity index 100% rename from extra/qualified/qualified-tests.factor rename to basis/qualified/qualified-tests.factor diff --git a/extra/qualified/qualified.factor b/basis/qualified/qualified.factor similarity index 100% rename from extra/qualified/qualified.factor rename to basis/qualified/qualified.factor diff --git a/extra/qualified/summary.txt b/basis/qualified/summary.txt similarity index 100% rename from extra/qualified/summary.txt rename to basis/qualified/summary.txt diff --git a/extra/qualified/tags.txt b/basis/qualified/tags.txt similarity index 100% rename from extra/qualified/tags.txt rename to basis/qualified/tags.txt diff --git a/extra/random/dummy/dummy.factor b/basis/random/dummy/dummy.factor similarity index 100% rename from extra/random/dummy/dummy.factor rename to basis/random/dummy/dummy.factor diff --git a/extra/io/windows/ce/authors.txt b/basis/random/mersenne-twister/authors.txt similarity index 100% rename from extra/io/windows/ce/authors.txt rename to basis/random/mersenne-twister/authors.txt diff --git a/extra/random/mersenne-twister/mersenne-twister-docs.factor.bak b/basis/random/mersenne-twister/mersenne-twister-docs.factor.bak similarity index 100% rename from extra/random/mersenne-twister/mersenne-twister-docs.factor.bak rename to basis/random/mersenne-twister/mersenne-twister-docs.factor.bak diff --git a/extra/random/mersenne-twister/mersenne-twister-tests.factor b/basis/random/mersenne-twister/mersenne-twister-tests.factor similarity index 100% rename from extra/random/mersenne-twister/mersenne-twister-tests.factor rename to basis/random/mersenne-twister/mersenne-twister-tests.factor diff --git a/extra/random/mersenne-twister/mersenne-twister.factor b/basis/random/mersenne-twister/mersenne-twister.factor similarity index 100% rename from extra/random/mersenne-twister/mersenne-twister.factor rename to basis/random/mersenne-twister/mersenne-twister.factor diff --git a/extra/random/mersenne-twister/summary.txt b/basis/random/mersenne-twister/summary.txt similarity index 100% rename from extra/random/mersenne-twister/summary.txt rename to basis/random/mersenne-twister/summary.txt diff --git a/extra/random/random-docs.factor b/basis/random/random-docs.factor similarity index 100% rename from extra/random/random-docs.factor rename to basis/random/random-docs.factor diff --git a/extra/random/random-tests.factor b/basis/random/random-tests.factor similarity index 100% rename from extra/random/random-tests.factor rename to basis/random/random-tests.factor diff --git a/extra/random/random.factor b/basis/random/random.factor similarity index 100% rename from extra/random/random.factor rename to basis/random/random.factor diff --git a/basis/random/unix/tags.txt b/basis/random/unix/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/random/unix/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/random/unix/unix.factor b/basis/random/unix/unix.factor similarity index 100% rename from extra/random/unix/unix.factor rename to basis/random/unix/unix.factor diff --git a/basis/random/windows/tags.txt b/basis/random/windows/tags.txt new file mode 100644 index 0000000000..02ec70f741 --- /dev/null +++ b/basis/random/windows/tags.txt @@ -0,0 +1,2 @@ +unportable +windows diff --git a/extra/random/windows/windows.factor b/basis/random/windows/windows.factor similarity index 100% rename from extra/random/windows/windows.factor rename to basis/random/windows/windows.factor diff --git a/extra/macros/authors.txt b/basis/refs/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/macros/authors.txt rename to basis/refs/authors.txt diff --git a/core/refs/refs-docs.factor b/basis/refs/refs-docs.factor similarity index 100% rename from core/refs/refs-docs.factor rename to basis/refs/refs-docs.factor diff --git a/core/refs/refs-tests.factor b/basis/refs/refs-tests.factor similarity index 100% rename from core/refs/refs-tests.factor rename to basis/refs/refs-tests.factor diff --git a/core/refs/refs.factor b/basis/refs/refs.factor similarity index 100% rename from core/refs/refs.factor rename to basis/refs/refs.factor diff --git a/core/refs/summary.txt b/basis/refs/summary.txt similarity index 100% rename from core/refs/summary.txt rename to basis/refs/summary.txt diff --git a/extra/math/complex/authors.txt b/basis/search-dequeues/authors.txt similarity index 100% rename from extra/math/complex/authors.txt rename to basis/search-dequeues/authors.txt diff --git a/core/search-dequeues/search-dequeues-docs.factor b/basis/search-dequeues/search-dequeues-docs.factor similarity index 100% rename from core/search-dequeues/search-dequeues-docs.factor rename to basis/search-dequeues/search-dequeues-docs.factor diff --git a/core/search-dequeues/search-dequeues-tests.factor b/basis/search-dequeues/search-dequeues-tests.factor similarity index 100% rename from core/search-dequeues/search-dequeues-tests.factor rename to basis/search-dequeues/search-dequeues-tests.factor diff --git a/core/search-dequeues/search-dequeues.factor b/basis/search-dequeues/search-dequeues.factor similarity index 100% rename from core/search-dequeues/search-dequeues.factor rename to basis/search-dequeues/search-dequeues.factor diff --git a/core/search-dequeues/summary.txt b/basis/search-dequeues/summary.txt similarity index 100% rename from core/search-dequeues/summary.txt rename to basis/search-dequeues/summary.txt diff --git a/extra/hash2/tags.txt b/basis/search-dequeues/tags.txt similarity index 100% rename from extra/hash2/tags.txt rename to basis/search-dequeues/tags.txt diff --git a/extra/sequences/deep/authors.txt b/basis/sequences/deep/authors.txt similarity index 100% rename from extra/sequences/deep/authors.txt rename to basis/sequences/deep/authors.txt diff --git a/extra/sequences/deep/deep-docs.factor b/basis/sequences/deep/deep-docs.factor similarity index 100% rename from extra/sequences/deep/deep-docs.factor rename to basis/sequences/deep/deep-docs.factor diff --git a/extra/sequences/deep/deep-tests.factor b/basis/sequences/deep/deep-tests.factor similarity index 100% rename from extra/sequences/deep/deep-tests.factor rename to basis/sequences/deep/deep-tests.factor diff --git a/extra/sequences/deep/deep.factor b/basis/sequences/deep/deep.factor similarity index 90% rename from extra/sequences/deep/deep.factor rename to basis/sequences/deep/deep.factor index 3ec793f458..2e50fa5411 100644 --- a/extra/sequences/deep/deep.factor +++ b/basis/sequences/deep/deep.factor @@ -5,10 +5,12 @@ IN: sequences.deep ! All traversal goes in postorder -: branch? ( object -- ? ) - dup sequence? [ - dup string? swap number? or not - ] [ drop f ] if ; +GENERIC: branch? ( object -- ? ) + +M: sequence branch? drop t ; +M: integer branch? drop f ; +M: string branch? drop f ; +M: object branch? drop f ; : deep-each ( obj quot: ( elt -- ) -- ) [ call ] 2keep over branch? diff --git a/extra/sequences/deep/summary.txt b/basis/sequences/deep/summary.txt similarity index 100% rename from extra/sequences/deep/summary.txt rename to basis/sequences/deep/summary.txt diff --git a/extra/sequences/deep/tags.txt b/basis/sequences/deep/tags.txt similarity index 100% rename from extra/sequences/deep/tags.txt rename to basis/sequences/deep/tags.txt diff --git a/extra/sequences/next/authors.txt b/basis/sequences/next/authors.txt similarity index 100% rename from extra/sequences/next/authors.txt rename to basis/sequences/next/authors.txt diff --git a/extra/sequences/next/next-tests.factor b/basis/sequences/next/next-tests.factor similarity index 100% rename from extra/sequences/next/next-tests.factor rename to basis/sequences/next/next-tests.factor diff --git a/extra/sequences/next/next.factor b/basis/sequences/next/next.factor similarity index 100% rename from extra/sequences/next/next.factor rename to basis/sequences/next/next.factor diff --git a/extra/sequences/next/summary.txt b/basis/sequences/next/summary.txt similarity index 100% rename from extra/sequences/next/summary.txt rename to basis/sequences/next/summary.txt diff --git a/extra/sequences/next/tags.txt b/basis/sequences/next/tags.txt similarity index 100% rename from extra/sequences/next/tags.txt rename to basis/sequences/next/tags.txt diff --git a/extra/serialize/authors.txt b/basis/serialize/authors.txt similarity index 100% rename from extra/serialize/authors.txt rename to basis/serialize/authors.txt diff --git a/extra/serialize/serialize-docs.factor b/basis/serialize/serialize-docs.factor similarity index 100% rename from extra/serialize/serialize-docs.factor rename to basis/serialize/serialize-docs.factor diff --git a/extra/serialize/serialize-tests.factor b/basis/serialize/serialize-tests.factor similarity index 100% rename from extra/serialize/serialize-tests.factor rename to basis/serialize/serialize-tests.factor diff --git a/extra/serialize/serialize.factor b/basis/serialize/serialize.factor similarity index 100% rename from extra/serialize/serialize.factor rename to basis/serialize/serialize.factor diff --git a/extra/serialize/summary.txt b/basis/serialize/summary.txt similarity index 100% rename from extra/serialize/summary.txt rename to basis/serialize/summary.txt diff --git a/extra/shuffle/authors.txt b/basis/shuffle/authors.txt similarity index 100% rename from extra/shuffle/authors.txt rename to basis/shuffle/authors.txt diff --git a/extra/shuffle/shuffle-tests.factor b/basis/shuffle/shuffle-tests.factor similarity index 100% rename from extra/shuffle/shuffle-tests.factor rename to basis/shuffle/shuffle-tests.factor diff --git a/extra/shuffle/shuffle.factor b/basis/shuffle/shuffle.factor similarity index 100% rename from extra/shuffle/shuffle.factor rename to basis/shuffle/shuffle.factor diff --git a/extra/shuffle/summary.txt b/basis/shuffle/summary.txt similarity index 100% rename from extra/shuffle/summary.txt rename to basis/shuffle/summary.txt diff --git a/extra/shuffle/tags.txt b/basis/shuffle/tags.txt similarity index 100% rename from extra/shuffle/tags.txt rename to basis/shuffle/tags.txt diff --git a/extra/smtp/authors.txt b/basis/smtp/authors.txt similarity index 100% rename from extra/smtp/authors.txt rename to basis/smtp/authors.txt diff --git a/extra/smtp/server/server.factor b/basis/smtp/server/server.factor similarity index 100% rename from extra/smtp/server/server.factor rename to basis/smtp/server/server.factor diff --git a/extra/smtp/smtp-tests.factor b/basis/smtp/smtp-tests.factor similarity index 100% rename from extra/smtp/smtp-tests.factor rename to basis/smtp/smtp-tests.factor diff --git a/extra/smtp/smtp.factor b/basis/smtp/smtp.factor similarity index 100% rename from extra/smtp/smtp.factor rename to basis/smtp/smtp.factor diff --git a/extra/smtp/summary.txt b/basis/smtp/summary.txt similarity index 100% rename from extra/smtp/summary.txt rename to basis/smtp/summary.txt diff --git a/extra/smtp/tags.txt b/basis/smtp/tags.txt similarity index 100% rename from extra/smtp/tags.txt rename to basis/smtp/tags.txt diff --git a/extra/sorting/insertion/authors.txt b/basis/sorting/insertion/authors.txt similarity index 100% rename from extra/sorting/insertion/authors.txt rename to basis/sorting/insertion/authors.txt diff --git a/extra/sorting/insertion/insertion-tests.factor b/basis/sorting/insertion/insertion-tests.factor similarity index 100% rename from extra/sorting/insertion/insertion-tests.factor rename to basis/sorting/insertion/insertion-tests.factor diff --git a/extra/sorting/insertion/insertion.factor b/basis/sorting/insertion/insertion.factor similarity index 100% rename from extra/sorting/insertion/insertion.factor rename to basis/sorting/insertion/insertion.factor diff --git a/extra/sorting/insertion/summary.txt b/basis/sorting/insertion/summary.txt similarity index 100% rename from extra/sorting/insertion/summary.txt rename to basis/sorting/insertion/summary.txt diff --git a/extra/sorting/insertion/tags.txt b/basis/sorting/insertion/tags.txt similarity index 100% rename from extra/sorting/insertion/tags.txt rename to basis/sorting/insertion/tags.txt diff --git a/extra/state-parser/authors.txt b/basis/state-parser/authors.txt similarity index 100% rename from extra/state-parser/authors.txt rename to basis/state-parser/authors.txt diff --git a/extra/state-parser/state-parser-docs.factor b/basis/state-parser/state-parser-docs.factor similarity index 100% rename from extra/state-parser/state-parser-docs.factor rename to basis/state-parser/state-parser-docs.factor diff --git a/extra/state-parser/state-parser-tests.factor b/basis/state-parser/state-parser-tests.factor similarity index 100% rename from extra/state-parser/state-parser-tests.factor rename to basis/state-parser/state-parser-tests.factor diff --git a/extra/state-parser/state-parser.factor b/basis/state-parser/state-parser.factor similarity index 100% rename from extra/state-parser/state-parser.factor rename to basis/state-parser/state-parser.factor diff --git a/extra/state-parser/summary.txt b/basis/state-parser/summary.txt similarity index 100% rename from extra/state-parser/summary.txt rename to basis/state-parser/summary.txt diff --git a/extra/io/windows/mmap/authors.txt b/basis/structs/authors.txt similarity index 100% rename from extra/io/windows/mmap/authors.txt rename to basis/structs/authors.txt diff --git a/extra/structs/structs.factor b/basis/structs/structs.factor similarity index 100% rename from extra/structs/structs.factor rename to basis/structs/structs.factor diff --git a/extra/structs/summary.txt b/basis/structs/summary.txt similarity index 100% rename from extra/structs/summary.txt rename to basis/structs/summary.txt diff --git a/core/summary/summary-docs.factor b/basis/summary/summary-docs.factor similarity index 100% rename from core/summary/summary-docs.factor rename to basis/summary/summary-docs.factor diff --git a/core/summary/summary.factor b/basis/summary/summary.factor similarity index 95% rename from core/summary/summary.factor rename to basis/summary/summary.factor index 61f59682e8..5da6599c63 100644 --- a/core/summary/summary.factor +++ b/basis/summary/summary.factor @@ -14,7 +14,7 @@ M: object summary object-summary ; M: input summary [ "Input: " % - input-string "\n" split1 swap % + string>> "\n" split1 swap % "..." "" ? % ] "" make ; diff --git a/extra/symbols/authors.txt b/basis/symbols/authors.txt similarity index 100% rename from extra/symbols/authors.txt rename to basis/symbols/authors.txt diff --git a/extra/symbols/symbols-docs.factor b/basis/symbols/symbols-docs.factor similarity index 100% rename from extra/symbols/symbols-docs.factor rename to basis/symbols/symbols-docs.factor diff --git a/extra/symbols/symbols-tests.factor b/basis/symbols/symbols-tests.factor similarity index 86% rename from extra/symbols/symbols-tests.factor rename to basis/symbols/symbols-tests.factor index 1ae4a38cb7..274c4de85b 100755 --- a/extra/symbols/symbols-tests.factor +++ b/basis/symbols/symbols-tests.factor @@ -1,4 +1,5 @@ -USING: kernel symbols tools.test parser generic words accessors ; +USING: kernel symbols tools.test parser generic words accessors +eval ; IN: symbols.tests [ ] [ SYMBOLS: a b c ; ] unit-test diff --git a/extra/symbols/symbols.factor b/basis/symbols/symbols.factor similarity index 100% rename from extra/symbols/symbols.factor rename to basis/symbols/symbols.factor diff --git a/extra/math/constants/authors.txt b/basis/threads/authors.txt similarity index 100% rename from extra/math/constants/authors.txt rename to basis/threads/authors.txt diff --git a/core/threads/summary.txt b/basis/threads/summary.txt similarity index 100% rename from core/threads/summary.txt rename to basis/threads/summary.txt diff --git a/core/threads/threads-docs.factor b/basis/threads/threads-docs.factor similarity index 100% rename from core/threads/threads-docs.factor rename to basis/threads/threads-docs.factor diff --git a/core/threads/threads-tests.factor b/basis/threads/threads-tests.factor similarity index 95% rename from core/threads/threads-tests.factor rename to basis/threads/threads-tests.factor index 122b7f1d59..adac84338d 100755 --- a/core/threads/threads-tests.factor +++ b/basis/threads/threads-tests.factor @@ -41,3 +41,5 @@ yield ] ; [ t ] [ spawn-namespace-test ] unit-test + +[ "a" [ 1 1 + ] spawn 100 sleep ] must-fail diff --git a/core/threads/threads.factor b/basis/threads/threads.factor similarity index 94% rename from core/threads/threads.factor rename to basis/threads/threads.factor index 4b32f4519d..c406d0db12 100755 --- a/core/threads/threads.factor +++ b/basis/threads/threads.factor @@ -4,16 +4,22 @@ USING: arrays hashtables heaps kernel kernel.private math namespaces sequences vectors continuations continuations.private dlists assocs system combinators init boxes accessors -math.order dequeues ; +math.order dequeues strings quotations ; IN: threads SYMBOL: initial-thread TUPLE: thread -name quot exit-handler -id -continuation state runnable -mailbox variables sleep-entry ; +{ name string } +{ quot callable initial: [ ] } +{ exit-handler callable initial: [ ] } +{ id integer } +continuation +state +runnable +mailbox +variables +sleep-entry ; : self ( -- thread ) 63 getenv ; inline @@ -62,8 +68,7 @@ PRIVATE> swap >>name swap >>quot \ thread counter >>id - >>continuation - [ ] >>exit-handler ; inline + >>continuation ; inline : ( quot name -- thread ) \ thread new-thread ; @@ -211,7 +216,7 @@ GENERIC: error-in-thread ( error thread -- ) 65 setenv 66 setenv initial-thread global - [ drop f "Initial" ] cache + [ drop [ ] "Initial" ] cache >>continuation t >>runnable f >>state diff --git a/extra/tools/annotations/annotations-docs.factor b/basis/tools/annotations/annotations-docs.factor similarity index 100% rename from extra/tools/annotations/annotations-docs.factor rename to basis/tools/annotations/annotations-docs.factor diff --git a/extra/tools/annotations/annotations-tests.factor b/basis/tools/annotations/annotations-tests.factor similarity index 89% rename from extra/tools/annotations/annotations-tests.factor rename to basis/tools/annotations/annotations-tests.factor index ec8f48a161..2bdcab50cb 100755 --- a/extra/tools/annotations/annotations-tests.factor +++ b/basis/tools/annotations/annotations-tests.factor @@ -1,4 +1,4 @@ -USING: tools.test tools.annotations math parser ; +USING: tools.test tools.annotations math parser eval ; IN: tools.annotations.tests : foo ; diff --git a/extra/tools/annotations/annotations.factor b/basis/tools/annotations/annotations.factor similarity index 100% rename from extra/tools/annotations/annotations.factor rename to basis/tools/annotations/annotations.factor diff --git a/extra/math/functions/authors.txt b/basis/tools/annotations/authors.txt similarity index 100% rename from extra/math/functions/authors.txt rename to basis/tools/annotations/authors.txt diff --git a/extra/tools/annotations/summary.txt b/basis/tools/annotations/summary.txt similarity index 100% rename from extra/tools/annotations/summary.txt rename to basis/tools/annotations/summary.txt diff --git a/extra/tools/annotations/tags.txt b/basis/tools/annotations/tags.txt similarity index 100% rename from extra/tools/annotations/tags.txt rename to basis/tools/annotations/tags.txt diff --git a/extra/math/libm/authors.txt b/basis/tools/completion/authors.txt similarity index 100% rename from extra/math/libm/authors.txt rename to basis/tools/completion/authors.txt diff --git a/extra/tools/completion/completion-docs.factor b/basis/tools/completion/completion-docs.factor similarity index 100% rename from extra/tools/completion/completion-docs.factor rename to basis/tools/completion/completion-docs.factor diff --git a/extra/tools/completion/completion.factor b/basis/tools/completion/completion.factor similarity index 100% rename from extra/tools/completion/completion.factor rename to basis/tools/completion/completion.factor diff --git a/extra/tools/completion/summary.txt b/basis/tools/completion/summary.txt similarity index 100% rename from extra/tools/completion/summary.txt rename to basis/tools/completion/summary.txt diff --git a/extra/math/ratios/authors.txt b/basis/tools/crossref/authors.txt similarity index 100% rename from extra/math/ratios/authors.txt rename to basis/tools/crossref/authors.txt diff --git a/extra/tools/crossref/crossref-docs.factor b/basis/tools/crossref/crossref-docs.factor similarity index 100% rename from extra/tools/crossref/crossref-docs.factor rename to basis/tools/crossref/crossref-docs.factor diff --git a/extra/tools/crossref/crossref-tests.factor b/basis/tools/crossref/crossref-tests.factor similarity index 83% rename from extra/tools/crossref/crossref-tests.factor rename to basis/tools/crossref/crossref-tests.factor index 0717763ed0..5bf917f906 100755 --- a/extra/tools/crossref/crossref-tests.factor +++ b/basis/tools/crossref/crossref-tests.factor @@ -6,7 +6,7 @@ GENERIC: foo M: integer foo + ; -"resource:extra/tools/crossref/test/foo.factor" run-file +"resource:basis/tools/crossref/test/foo.factor" run-file [ t ] [ integer \ foo method \ + usage member? ] unit-test [ t ] [ \ foo usage [ pathname? ] contains? ] unit-test diff --git a/extra/tools/crossref/crossref.factor b/basis/tools/crossref/crossref.factor similarity index 100% rename from extra/tools/crossref/crossref.factor rename to basis/tools/crossref/crossref.factor diff --git a/extra/tools/crossref/summary.txt b/basis/tools/crossref/summary.txt similarity index 100% rename from extra/tools/crossref/summary.txt rename to basis/tools/crossref/summary.txt diff --git a/extra/tools/crossref/tags.txt b/basis/tools/crossref/tags.txt similarity index 100% rename from extra/tools/crossref/tags.txt rename to basis/tools/crossref/tags.txt diff --git a/extra/tools/crossref/test/foo.factor b/basis/tools/crossref/test/foo.factor similarity index 100% rename from extra/tools/crossref/test/foo.factor rename to basis/tools/crossref/test/foo.factor diff --git a/extra/math/vectors/authors.txt b/basis/tools/deploy/authors.txt similarity index 100% rename from extra/math/vectors/authors.txt rename to basis/tools/deploy/authors.txt diff --git a/extra/mime-types/authors.txt b/basis/tools/deploy/backend/authors.txt similarity index 100% rename from extra/mime-types/authors.txt rename to basis/tools/deploy/backend/authors.txt diff --git a/extra/tools/deploy/backend/backend.factor b/basis/tools/deploy/backend/backend.factor similarity index 98% rename from extra/tools/deploy/backend/backend.factor rename to basis/tools/deploy/backend/backend.factor index 7559b44832..723f9461a8 100755 --- a/extra/tools/deploy/backend/backend.factor +++ b/basis/tools/deploy/backend/backend.factor @@ -42,6 +42,7 @@ IN: tools.deploy.backend : bootstrap-profile ( -- profile ) { + { "threads" deploy-threads? } { "math" deploy-math? } { "compiler" deploy-compiler? } { "ui" deploy-ui? } diff --git a/extra/models/authors.txt b/basis/tools/deploy/config/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/models/authors.txt rename to basis/tools/deploy/config/authors.txt diff --git a/extra/tools/deploy/config/config-docs.factor b/basis/tools/deploy/config/config-docs.factor similarity index 100% rename from extra/tools/deploy/config/config-docs.factor rename to basis/tools/deploy/config/config-docs.factor diff --git a/extra/tools/deploy/config/config.factor b/basis/tools/deploy/config/config.factor similarity index 100% rename from extra/tools/deploy/config/config.factor rename to basis/tools/deploy/config/config.factor diff --git a/extra/tools/deploy/deploy-docs.factor b/basis/tools/deploy/deploy-docs.factor similarity index 100% rename from extra/tools/deploy/deploy-docs.factor rename to basis/tools/deploy/deploy-docs.factor diff --git a/extra/tools/deploy/deploy-tests.factor b/basis/tools/deploy/deploy-tests.factor similarity index 93% rename from extra/tools/deploy/deploy-tests.factor rename to basis/tools/deploy/deploy-tests.factor index b66688b63a..5ca63a254f 100755 --- a/extra/tools/deploy/deploy-tests.factor +++ b/basis/tools/deploy/deploy-tests.factor @@ -26,7 +26,7 @@ namespaces continuations layouts accessors ; [ t ] [ 1300000 small-enough? ] unit-test -[ "staging.math-compiler-ui-strip.image" ] [ +[ "staging.threads-math-compiler-ui-strip.image" ] [ "hello-ui" deploy-config [ bootstrap-profile staging-image-name file-name ] bind ] unit-test diff --git a/extra/tools/deploy/deploy.factor b/basis/tools/deploy/deploy.factor similarity index 100% rename from extra/tools/deploy/deploy.factor rename to basis/tools/deploy/deploy.factor diff --git a/extra/tools/annotations/authors.txt b/basis/tools/deploy/macosx/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/tools/annotations/authors.txt rename to basis/tools/deploy/macosx/authors.txt diff --git a/extra/tools/deploy/macosx/macosx.factor b/basis/tools/deploy/macosx/macosx.factor similarity index 100% rename from extra/tools/deploy/macosx/macosx.factor rename to basis/tools/deploy/macosx/macosx.factor diff --git a/extra/tools/deploy/macosx/summary.txt b/basis/tools/deploy/macosx/summary.txt similarity index 100% rename from extra/tools/deploy/macosx/summary.txt rename to basis/tools/deploy/macosx/summary.txt diff --git a/basis/tools/deploy/macosx/tags.txt b/basis/tools/deploy/macosx/tags.txt new file mode 100644 index 0000000000..660d511420 --- /dev/null +++ b/basis/tools/deploy/macosx/tags.txt @@ -0,0 +1,2 @@ +unportable +tools diff --git a/extra/tools/deploy/restage/restage.factor b/basis/tools/deploy/restage/restage.factor similarity index 100% rename from extra/tools/deploy/restage/restage.factor rename to basis/tools/deploy/restage/restage.factor diff --git a/extra/tools/completion/authors.txt b/basis/tools/deploy/shaker/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/tools/completion/authors.txt rename to basis/tools/deploy/shaker/authors.txt diff --git a/extra/tools/deploy/shaker/shaker.factor b/basis/tools/deploy/shaker/shaker.factor similarity index 96% rename from extra/tools/deploy/shaker/shaker.factor rename to basis/tools/deploy/shaker/shaker.factor index 0e20384839..eaa0342c25 100755 --- a/extra/tools/deploy/shaker/shaker.factor +++ b/basis/tools/deploy/shaker/shaker.factor @@ -16,12 +16,9 @@ QUALIFIED: init QUALIFIED: io.backend QUALIFIED: io.thread QUALIFIED: layouts -QUALIFIED: libc.private -QUALIFIED: libc.private QUALIFIED: listener QUALIFIED: prettyprint.config QUALIFIED: source-files -QUALIFIED: threads QUALIFIED: vocabs IN: tools.deploy.shaker @@ -45,21 +42,21 @@ IN: tools.deploy.shaker : strip-debugger ( -- ) strip-debugger? [ "Stripping debugger" show - "resource:extra/tools/deploy/shaker/strip-debugger.factor" + "resource:basis/tools/deploy/shaker/strip-debugger.factor" run-file ] when ; : strip-libc ( -- ) "libc" vocab [ "Stripping manual memory management debug code" show - "resource:extra/tools/deploy/shaker/strip-libc.factor" + "resource:basis/tools/deploy/shaker/strip-libc.factor" run-file ] when ; : strip-cocoa ( -- ) "cocoa" vocab [ "Stripping unused Cocoa methods" show - "resource:extra/tools/deploy/shaker/strip-cocoa.factor" + "resource:basis/tools/deploy/shaker/strip-cocoa.factor" run-file ] when ; @@ -179,15 +176,16 @@ IN: tools.deploy.shaker listener:error-hook init:init-hooks io.thread:io-thread - libc.private:mallocs source-files:source-files input-stream output-stream error-stream } % + "mallocs" "libc.private" lookup , + deploy-threads? [ - threads:initial-thread , + "initial-thread" "threads" lookup , ] unless strip-io? [ io.backend:io-backend , ] when diff --git a/extra/tools/deploy/shaker/strip-cocoa.factor b/basis/tools/deploy/shaker/strip-cocoa.factor similarity index 100% rename from extra/tools/deploy/shaker/strip-cocoa.factor rename to basis/tools/deploy/shaker/strip-cocoa.factor diff --git a/extra/tools/deploy/shaker/strip-debugger.factor b/basis/tools/deploy/shaker/strip-debugger.factor similarity index 100% rename from extra/tools/deploy/shaker/strip-debugger.factor rename to basis/tools/deploy/shaker/strip-debugger.factor diff --git a/extra/tools/deploy/shaker/strip-libc.factor b/basis/tools/deploy/shaker/strip-libc.factor similarity index 100% rename from extra/tools/deploy/shaker/strip-libc.factor rename to basis/tools/deploy/shaker/strip-libc.factor diff --git a/extra/tools/deploy/summary.txt b/basis/tools/deploy/summary.txt similarity index 100% rename from extra/tools/deploy/summary.txt rename to basis/tools/deploy/summary.txt diff --git a/extra/tools/deploy/macosx/tags.txt b/basis/tools/deploy/tags.txt similarity index 100% rename from extra/tools/deploy/macosx/tags.txt rename to basis/tools/deploy/tags.txt diff --git a/extra/tools/deploy/test/1/1.factor b/basis/tools/deploy/test/1/1.factor similarity index 100% rename from extra/tools/deploy/test/1/1.factor rename to basis/tools/deploy/test/1/1.factor diff --git a/extra/tools/deploy/test/1/deploy.factor b/basis/tools/deploy/test/1/deploy.factor similarity index 100% rename from extra/tools/deploy/test/1/deploy.factor rename to basis/tools/deploy/test/1/deploy.factor diff --git a/extra/tools/deploy/test/2/2.factor b/basis/tools/deploy/test/2/2.factor similarity index 100% rename from extra/tools/deploy/test/2/2.factor rename to basis/tools/deploy/test/2/2.factor diff --git a/extra/tools/deploy/test/2/deploy.factor b/basis/tools/deploy/test/2/deploy.factor similarity index 100% rename from extra/tools/deploy/test/2/deploy.factor rename to basis/tools/deploy/test/2/deploy.factor diff --git a/extra/tools/deploy/test/3/3.factor b/basis/tools/deploy/test/3/3.factor similarity index 100% rename from extra/tools/deploy/test/3/3.factor rename to basis/tools/deploy/test/3/3.factor diff --git a/extra/tools/deploy/test/3/deploy.factor b/basis/tools/deploy/test/3/deploy.factor similarity index 100% rename from extra/tools/deploy/test/3/deploy.factor rename to basis/tools/deploy/test/3/deploy.factor diff --git a/extra/tools/deploy/test/4/4.factor b/basis/tools/deploy/test/4/4.factor similarity index 100% rename from extra/tools/deploy/test/4/4.factor rename to basis/tools/deploy/test/4/4.factor diff --git a/extra/tools/deploy/test/4/deploy.factor b/basis/tools/deploy/test/4/deploy.factor similarity index 100% rename from extra/tools/deploy/test/4/deploy.factor rename to basis/tools/deploy/test/4/deploy.factor diff --git a/extra/tools/deploy/test/5/5.factor b/basis/tools/deploy/test/5/5.factor similarity index 100% rename from extra/tools/deploy/test/5/5.factor rename to basis/tools/deploy/test/5/5.factor diff --git a/extra/tools/deploy/test/5/deploy.factor b/basis/tools/deploy/test/5/deploy.factor similarity index 100% rename from extra/tools/deploy/test/5/deploy.factor rename to basis/tools/deploy/test/5/deploy.factor diff --git a/extra/tools/deploy/unix/authors.txt b/basis/tools/deploy/unix/authors.txt similarity index 100% rename from extra/tools/deploy/unix/authors.txt rename to basis/tools/deploy/unix/authors.txt diff --git a/extra/tools/deploy/unix/summary.txt b/basis/tools/deploy/unix/summary.txt similarity index 100% rename from extra/tools/deploy/unix/summary.txt rename to basis/tools/deploy/unix/summary.txt diff --git a/basis/tools/deploy/unix/tags.txt b/basis/tools/deploy/unix/tags.txt new file mode 100644 index 0000000000..660d511420 --- /dev/null +++ b/basis/tools/deploy/unix/tags.txt @@ -0,0 +1,2 @@ +unportable +tools diff --git a/extra/tools/deploy/unix/unix.factor b/basis/tools/deploy/unix/unix.factor similarity index 100% rename from extra/tools/deploy/unix/unix.factor rename to basis/tools/deploy/unix/unix.factor diff --git a/extra/tools/crossref/authors.txt b/basis/tools/deploy/windows/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/tools/crossref/authors.txt rename to basis/tools/deploy/windows/authors.txt diff --git a/extra/tools/deploy/windows/summary.txt b/basis/tools/deploy/windows/summary.txt similarity index 100% rename from extra/tools/deploy/windows/summary.txt rename to basis/tools/deploy/windows/summary.txt diff --git a/extra/tools/deploy/windows/tags.txt b/basis/tools/deploy/windows/tags.txt similarity index 56% rename from extra/tools/deploy/windows/tags.txt rename to basis/tools/deploy/windows/tags.txt index 6eee6b9766..b58a515ed8 100644 --- a/extra/tools/deploy/windows/tags.txt +++ b/basis/tools/deploy/windows/tags.txt @@ -1,2 +1,3 @@ +unportable windows tools diff --git a/extra/tools/deploy/windows/windows-tests.factor b/basis/tools/deploy/windows/windows-tests.factor similarity index 100% rename from extra/tools/deploy/windows/windows-tests.factor rename to basis/tools/deploy/windows/windows-tests.factor diff --git a/extra/tools/deploy/windows/windows.factor b/basis/tools/deploy/windows/windows.factor similarity index 100% rename from extra/tools/deploy/windows/windows.factor rename to basis/tools/deploy/windows/windows.factor diff --git a/extra/tools/disassembler/authors.txt b/basis/tools/disassembler/authors.txt similarity index 100% rename from extra/tools/disassembler/authors.txt rename to basis/tools/disassembler/authors.txt diff --git a/extra/tools/disassembler/disassembler-docs.factor b/basis/tools/disassembler/disassembler-docs.factor similarity index 100% rename from extra/tools/disassembler/disassembler-docs.factor rename to basis/tools/disassembler/disassembler-docs.factor diff --git a/extra/tools/disassembler/disassembler-tests.factor b/basis/tools/disassembler/disassembler-tests.factor similarity index 100% rename from extra/tools/disassembler/disassembler-tests.factor rename to basis/tools/disassembler/disassembler-tests.factor diff --git a/extra/tools/disassembler/disassembler.factor b/basis/tools/disassembler/disassembler.factor similarity index 100% rename from extra/tools/disassembler/disassembler.factor rename to basis/tools/disassembler/disassembler.factor diff --git a/extra/tools/disassembler/summary.txt b/basis/tools/disassembler/summary.txt similarity index 100% rename from extra/tools/disassembler/summary.txt rename to basis/tools/disassembler/summary.txt diff --git a/extra/tools/deploy/authors.txt b/basis/tools/memory/authors.txt similarity index 100% rename from extra/tools/deploy/authors.txt rename to basis/tools/memory/authors.txt diff --git a/extra/tools/memory/memory-docs.factor b/basis/tools/memory/memory-docs.factor similarity index 100% rename from extra/tools/memory/memory-docs.factor rename to basis/tools/memory/memory-docs.factor diff --git a/extra/tools/memory/memory-tests.factor b/basis/tools/memory/memory-tests.factor similarity index 100% rename from extra/tools/memory/memory-tests.factor rename to basis/tools/memory/memory-tests.factor diff --git a/extra/tools/memory/memory.factor b/basis/tools/memory/memory.factor similarity index 100% rename from extra/tools/memory/memory.factor rename to basis/tools/memory/memory.factor diff --git a/extra/tools/memory/summary.txt b/basis/tools/memory/summary.txt similarity index 100% rename from extra/tools/memory/summary.txt rename to basis/tools/memory/summary.txt diff --git a/extra/tools/deploy/tags.txt b/basis/tools/memory/tags.txt similarity index 100% rename from extra/tools/deploy/tags.txt rename to basis/tools/memory/tags.txt diff --git a/extra/tools/deploy/backend/authors.txt b/basis/tools/profiler/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/tools/deploy/backend/authors.txt rename to basis/tools/profiler/authors.txt diff --git a/extra/tools/profiler/profiler-docs.factor b/basis/tools/profiler/profiler-docs.factor similarity index 100% rename from extra/tools/profiler/profiler-docs.factor rename to basis/tools/profiler/profiler-docs.factor diff --git a/extra/tools/profiler/profiler-tests.factor b/basis/tools/profiler/profiler-tests.factor similarity index 100% rename from extra/tools/profiler/profiler-tests.factor rename to basis/tools/profiler/profiler-tests.factor diff --git a/extra/tools/profiler/profiler.factor b/basis/tools/profiler/profiler.factor similarity index 100% rename from extra/tools/profiler/profiler.factor rename to basis/tools/profiler/profiler.factor diff --git a/extra/tools/profiler/summary.txt b/basis/tools/profiler/summary.txt similarity index 100% rename from extra/tools/profiler/summary.txt rename to basis/tools/profiler/summary.txt diff --git a/extra/tools/deploy/unix/tags.txt b/basis/tools/profiler/tags.txt similarity index 100% rename from extra/tools/deploy/unix/tags.txt rename to basis/tools/profiler/tags.txt diff --git a/extra/tools/summary.txt b/basis/tools/summary.txt similarity index 100% rename from extra/tools/summary.txt rename to basis/tools/summary.txt diff --git a/extra/tools/deploy/config/authors.txt b/basis/tools/test/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/tools/deploy/config/authors.txt rename to basis/tools/test/authors.txt diff --git a/extra/tools/test/summary.txt b/basis/tools/test/summary.txt similarity index 100% rename from extra/tools/test/summary.txt rename to basis/tools/test/summary.txt diff --git a/extra/tools/memory/tags.txt b/basis/tools/test/tags.txt similarity index 100% rename from extra/tools/memory/tags.txt rename to basis/tools/test/tags.txt diff --git a/extra/tools/test/test-docs.factor b/basis/tools/test/test-docs.factor similarity index 100% rename from extra/tools/test/test-docs.factor rename to basis/tools/test/test-docs.factor diff --git a/extra/tools/test/test.factor b/basis/tools/test/test.factor similarity index 87% rename from extra/tools/test/test.factor rename to basis/tools/test/test.factor index abbf5e5ab9..025ee9d696 100755 --- a/extra/tools/test/test.factor +++ b/basis/tools/test/test.factor @@ -1,10 +1,9 @@ ! Copyright (C) 2003, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: namespaces arrays prettyprint sequences kernel -vectors quotations words parser assocs combinators -continuations debugger io io.files vocabs -vocabs.loader source-files compiler.units summary -inference effects tools.vocabs ; +USING: accessors namespaces arrays prettyprint sequences kernel +vectors quotations words parser assocs combinators continuations +debugger io io.styles io.files vocabs vocabs.loader source-files +compiler.units summary inference effects tools.vocabs ; IN: tools.test SYMBOL: failures @@ -31,7 +30,7 @@ SYMBOL: this-test ] 2curry (unit-test) ; : short-effect ( effect -- pair ) - dup effect-in length swap effect-out length 2array ; + [ in>> length ] [ out>> length ] bi 2array ; : must-infer-as ( effect quot -- ) >r 1quotation r> [ infer short-effect ] curry unit-test ; diff --git a/extra/tools/test/tools.factor b/basis/tools/test/tools.factor similarity index 100% rename from extra/tools/test/tools.factor rename to basis/tools/test/tools.factor diff --git a/extra/tools/deploy/macosx/authors.txt b/basis/tools/test/ui/authors.txt similarity index 100% rename from extra/tools/deploy/macosx/authors.txt rename to basis/tools/test/ui/authors.txt diff --git a/extra/tools/test/ui/ui.factor b/basis/tools/test/ui/ui.factor similarity index 100% rename from extra/tools/test/ui/ui.factor rename to basis/tools/test/ui/ui.factor diff --git a/extra/tools/threads/threads-docs.factor b/basis/tools/threads/threads-docs.factor similarity index 100% rename from extra/tools/threads/threads-docs.factor rename to basis/tools/threads/threads-docs.factor diff --git a/extra/tools/threads/threads.factor b/basis/tools/threads/threads.factor similarity index 100% rename from extra/tools/threads/threads.factor rename to basis/tools/threads/threads.factor diff --git a/extra/tools/deploy/shaker/authors.txt b/basis/tools/time/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/tools/deploy/shaker/authors.txt rename to basis/tools/time/authors.txt diff --git a/extra/tools/time/summary.txt b/basis/tools/time/summary.txt similarity index 100% rename from extra/tools/time/summary.txt rename to basis/tools/time/summary.txt diff --git a/extra/tools/profiler/tags.txt b/basis/tools/time/tags.txt similarity index 100% rename from extra/tools/profiler/tags.txt rename to basis/tools/time/tags.txt diff --git a/extra/tools/time/time-docs.factor b/basis/tools/time/time-docs.factor similarity index 100% rename from extra/tools/time/time-docs.factor rename to basis/tools/time/time-docs.factor diff --git a/extra/tools/time/time.factor b/basis/tools/time/time.factor similarity index 100% rename from extra/tools/time/time.factor rename to basis/tools/time/time.factor diff --git a/extra/tools/deploy/windows/authors.txt b/basis/tools/vocabs/browser/authors.txt similarity index 100% rename from extra/tools/deploy/windows/authors.txt rename to basis/tools/vocabs/browser/authors.txt diff --git a/extra/tools/vocabs/browser/browser-docs.factor b/basis/tools/vocabs/browser/browser-docs.factor similarity index 100% rename from extra/tools/vocabs/browser/browser-docs.factor rename to basis/tools/vocabs/browser/browser-docs.factor diff --git a/extra/tools/vocabs/browser/browser-tests.factor b/basis/tools/vocabs/browser/browser-tests.factor similarity index 100% rename from extra/tools/vocabs/browser/browser-tests.factor rename to basis/tools/vocabs/browser/browser-tests.factor diff --git a/extra/tools/vocabs/browser/browser.factor b/basis/tools/vocabs/browser/browser.factor similarity index 100% rename from extra/tools/vocabs/browser/browser.factor rename to basis/tools/vocabs/browser/browser.factor diff --git a/extra/tools/test/tags.txt b/basis/tools/vocabs/browser/tags.txt similarity index 100% rename from extra/tools/test/tags.txt rename to basis/tools/vocabs/browser/tags.txt diff --git a/extra/tools/memory/authors.txt b/basis/tools/vocabs/monitor/authors.txt similarity index 100% rename from extra/tools/memory/authors.txt rename to basis/tools/vocabs/monitor/authors.txt diff --git a/extra/tools/vocabs/monitor/monitor-tests.factor b/basis/tools/vocabs/monitor/monitor-tests.factor similarity index 100% rename from extra/tools/vocabs/monitor/monitor-tests.factor rename to basis/tools/vocabs/monitor/monitor-tests.factor diff --git a/extra/tools/vocabs/monitor/monitor.factor b/basis/tools/vocabs/monitor/monitor.factor similarity index 100% rename from extra/tools/vocabs/monitor/monitor.factor rename to basis/tools/vocabs/monitor/monitor.factor diff --git a/extra/tools/vocabs/monitor/summary.txt b/basis/tools/vocabs/monitor/summary.txt similarity index 100% rename from extra/tools/vocabs/monitor/summary.txt rename to basis/tools/vocabs/monitor/summary.txt diff --git a/extra/tools/vocabs/vocabs-docs.factor b/basis/tools/vocabs/vocabs-docs.factor similarity index 100% rename from extra/tools/vocabs/vocabs-docs.factor rename to basis/tools/vocabs/vocabs-docs.factor diff --git a/extra/tools/vocabs/vocabs-tests.factor b/basis/tools/vocabs/vocabs-tests.factor similarity index 100% rename from extra/tools/vocabs/vocabs-tests.factor rename to basis/tools/vocabs/vocabs-tests.factor diff --git a/extra/tools/vocabs/vocabs.factor b/basis/tools/vocabs/vocabs.factor similarity index 82% rename from extra/tools/vocabs/vocabs.factor rename to basis/tools/vocabs/vocabs.factor index 34bd3c81c8..6328a3d06d 100755 --- a/extra/tools/vocabs/vocabs.factor +++ b/basis/tools/vocabs/vocabs.factor @@ -1,9 +1,9 @@ ! Copyright (C) 2007, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: io.files kernel io.encodings.utf8 vocabs.loader vocabs -sequences namespaces math.parser arrays hashtables assocs -memoize summary sorting splitting combinators source-files -io debugger continuations compiler.errors init +USING: kernel io io.styles io.files io.encodings.utf8 +vocabs.loader vocabs sequences namespaces math.parser arrays +hashtables assocs memoize summary sorting splitting combinators +source-files debugger continuations compiler.errors init checksums checksums.crc32 sets ; IN: tools.vocabs @@ -232,39 +232,15 @@ M: vocab-link summary vocab-summary ; MEMO: all-vocabs-seq ( -- seq ) all-vocabs values concat ; -: dangerous? ( name -- ? ) - #! Hack - { - { [ "cpu." ?head ] [ t ] } - { [ "io.unix" ?head ] [ t ] } - { [ "io.windows" ?head ] [ t ] } - { [ "ui.x11" ?head ] [ t ] } - { [ "ui.windows" ?head ] [ t ] } - { [ "ui.cocoa" ?head ] [ t ] } - { [ "cocoa" ?head ] [ t ] } - { [ "core-foundation" ?head ] [ t ] } - { [ "vocabs.loader.test" ?head ] [ t ] } - { [ "editors." ?head ] [ t ] } - { [ ".windows" ?tail ] [ t ] } - { [ ".unix" ?tail ] [ t ] } - { [ "unix" ?head ] [ t ] } - { [ ".linux" ?tail ] [ t ] } - { [ ".bsd" ?tail ] [ t ] } - { [ ".macosx" ?tail ] [ t ] } - { [ "windows." ?head ] [ t ] } - { [ "cocoa" ?head ] [ t ] } - { [ ".test" ?tail ] [ t ] } - { [ "raptor" ?head ] [ t ] } - { [ dup "tools.deploy.app" = ] [ t ] } - [ f ] - } cond nip ; +: unportable? ( name -- ? ) + vocab-tags "unportable" swap member? ; -: filter-dangerous ( seq -- seq' ) - [ vocab-name dangerous? not ] filter ; +: filter-unportable ( seq -- seq' ) + [ vocab-name unportable? not ] filter ; : try-everything ( -- failures ) all-vocabs-seq - filter-dangerous + filter-unportable require-all ; : load-everything ( -- ) diff --git a/extra/tools/profiler/authors.txt b/basis/tools/walker/authors.txt similarity index 100% rename from extra/tools/profiler/authors.txt rename to basis/tools/walker/authors.txt diff --git a/extra/tools/test/authors.txt b/basis/tools/walker/debug/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/tools/test/authors.txt rename to basis/tools/walker/debug/authors.txt diff --git a/extra/tools/walker/debug/debug.factor b/basis/tools/walker/debug/debug.factor similarity index 100% rename from extra/tools/walker/debug/debug.factor rename to basis/tools/walker/debug/debug.factor diff --git a/extra/tools/walker/summary.txt b/basis/tools/walker/summary.txt similarity index 100% rename from extra/tools/walker/summary.txt rename to basis/tools/walker/summary.txt diff --git a/extra/tools/walker/walker-tests.factor b/basis/tools/walker/walker-tests.factor similarity index 100% rename from extra/tools/walker/walker-tests.factor rename to basis/tools/walker/walker-tests.factor diff --git a/extra/tools/walker/walker.factor b/basis/tools/walker/walker.factor similarity index 100% rename from extra/tools/walker/walker.factor rename to basis/tools/walker/walker.factor diff --git a/extra/tools/test/ui/authors.txt b/basis/tr/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/tools/test/ui/authors.txt rename to basis/tr/authors.txt diff --git a/extra/tr/summary.txt b/basis/tr/summary.txt similarity index 100% rename from extra/tr/summary.txt rename to basis/tr/summary.txt diff --git a/extra/tr/tr-tests.factor b/basis/tr/tr-tests.factor similarity index 100% rename from extra/tr/tr-tests.factor rename to basis/tr/tr-tests.factor diff --git a/extra/tr/tr.factor b/basis/tr/tr.factor similarity index 100% rename from extra/tr/tr.factor rename to basis/tr/tr.factor diff --git a/extra/tuple-arrays/authors.txt b/basis/tuple-arrays/authors.txt similarity index 100% rename from extra/tuple-arrays/authors.txt rename to basis/tuple-arrays/authors.txt diff --git a/extra/tuple-arrays/summary.txt b/basis/tuple-arrays/summary.txt similarity index 100% rename from extra/tuple-arrays/summary.txt rename to basis/tuple-arrays/summary.txt diff --git a/extra/tuple-arrays/tags.txt b/basis/tuple-arrays/tags.txt similarity index 100% rename from extra/tuple-arrays/tags.txt rename to basis/tuple-arrays/tags.txt diff --git a/extra/tuple-arrays/tuple-arrays-docs.factor b/basis/tuple-arrays/tuple-arrays-docs.factor similarity index 100% rename from extra/tuple-arrays/tuple-arrays-docs.factor rename to basis/tuple-arrays/tuple-arrays-docs.factor diff --git a/extra/tuple-arrays/tuple-arrays-tests.factor b/basis/tuple-arrays/tuple-arrays-tests.factor similarity index 100% rename from extra/tuple-arrays/tuple-arrays-tests.factor rename to basis/tuple-arrays/tuple-arrays-tests.factor diff --git a/extra/tuple-arrays/tuple-arrays.factor b/basis/tuple-arrays/tuple-arrays.factor similarity index 100% rename from extra/tuple-arrays/tuple-arrays.factor rename to basis/tuple-arrays/tuple-arrays.factor diff --git a/extra/unicode/authors.txt b/basis/unicode/authors.txt similarity index 100% rename from extra/unicode/authors.txt rename to basis/unicode/authors.txt diff --git a/extra/unicode/breaks/authors.txt b/basis/unicode/breaks/authors.txt similarity index 100% rename from extra/unicode/breaks/authors.txt rename to basis/unicode/breaks/authors.txt diff --git a/extra/unicode/breaks/breaks-tests.factor b/basis/unicode/breaks/breaks-tests.factor similarity index 100% rename from extra/unicode/breaks/breaks-tests.factor rename to basis/unicode/breaks/breaks-tests.factor diff --git a/extra/unicode/breaks/breaks.factor b/basis/unicode/breaks/breaks.factor similarity index 100% rename from extra/unicode/breaks/breaks.factor rename to basis/unicode/breaks/breaks.factor diff --git a/extra/unicode/breaks/tags.txt b/basis/unicode/breaks/tags.txt similarity index 100% rename from extra/unicode/breaks/tags.txt rename to basis/unicode/breaks/tags.txt diff --git a/extra/unicode/case/SpecialCasing.txt b/basis/unicode/case/SpecialCasing.txt similarity index 100% rename from extra/unicode/case/SpecialCasing.txt rename to basis/unicode/case/SpecialCasing.txt diff --git a/extra/unicode/case/authors.txt b/basis/unicode/case/authors.txt similarity index 100% rename from extra/unicode/case/authors.txt rename to basis/unicode/case/authors.txt diff --git a/extra/unicode/case/case-tests.factor b/basis/unicode/case/case-tests.factor similarity index 100% rename from extra/unicode/case/case-tests.factor rename to basis/unicode/case/case-tests.factor diff --git a/extra/unicode/case/case.factor b/basis/unicode/case/case.factor similarity index 100% rename from extra/unicode/case/case.factor rename to basis/unicode/case/case.factor diff --git a/extra/unicode/case/tags.txt b/basis/unicode/case/tags.txt similarity index 100% rename from extra/unicode/case/tags.txt rename to basis/unicode/case/tags.txt diff --git a/extra/unicode/categories/authors.txt b/basis/unicode/categories/authors.txt similarity index 100% rename from extra/unicode/categories/authors.txt rename to basis/unicode/categories/authors.txt diff --git a/extra/unicode/categories/categories-tests.factor b/basis/unicode/categories/categories-tests.factor similarity index 100% rename from extra/unicode/categories/categories-tests.factor rename to basis/unicode/categories/categories-tests.factor diff --git a/extra/unicode/categories/categories.factor b/basis/unicode/categories/categories.factor similarity index 100% rename from extra/unicode/categories/categories.factor rename to basis/unicode/categories/categories.factor diff --git a/extra/unicode/categories/tags.txt b/basis/unicode/categories/tags.txt similarity index 100% rename from extra/unicode/categories/tags.txt rename to basis/unicode/categories/tags.txt diff --git a/extra/unicode/collation/CollationTest_SHIFTED.txt b/basis/unicode/collation/CollationTest_SHIFTED.txt similarity index 100% rename from extra/unicode/collation/CollationTest_SHIFTED.txt rename to basis/unicode/collation/CollationTest_SHIFTED.txt diff --git a/extra/unicode/collation/allkeys.txt b/basis/unicode/collation/allkeys.txt similarity index 100% rename from extra/unicode/collation/allkeys.txt rename to basis/unicode/collation/allkeys.txt diff --git a/extra/unicode/collation/collation-docs.factor b/basis/unicode/collation/collation-docs.factor similarity index 100% rename from extra/unicode/collation/collation-docs.factor rename to basis/unicode/collation/collation-docs.factor diff --git a/extra/unicode/collation/collation-tests.factor b/basis/unicode/collation/collation-tests.factor similarity index 91% rename from extra/unicode/collation/collation-tests.factor rename to basis/unicode/collation/collation-tests.factor index d523a15ada..bf87c6b7da 100755 --- a/extra/unicode/collation/collation-tests.factor +++ b/basis/unicode/collation/collation-tests.factor @@ -4,7 +4,7 @@ tools.test assocs io.streams.null words ; IN: unicode.collation.tests : parse-test ( -- strings ) - "resource:extra/unicode/collation/CollationTest_SHIFTED.txt" + "resource:basis/unicode/collation/CollationTest_SHIFTED.txt" utf8 file-lines 5 tail [ ";" split1 drop " " split [ hex> ] "" map-as ] map ; diff --git a/extra/unicode/collation/collation.factor b/basis/unicode/collation/collation.factor similarity index 95% rename from extra/unicode/collation/collation.factor rename to basis/unicode/collation/collation.factor index 3e239430d4..b5c7665b8b 100755 --- a/extra/unicode/collation/collation.factor +++ b/basis/unicode/collation/collation.factor @@ -26,7 +26,7 @@ TUPLE: weight primary secondary tertiary ignorable? ; lines filter-comments [ parse-line ] H{ } map>assoc ; -"resource:extra/unicode/collation/allkeys.txt" +"resource:basis/unicode/collation/allkeys.txt" ascii parse-ducet \ ducet set-value ! Fix up table for long contractions diff --git a/extra/unicode/data/PropList.txt b/basis/unicode/data/PropList.txt similarity index 100% rename from extra/unicode/data/PropList.txt rename to basis/unicode/data/PropList.txt diff --git a/extra/unicode/data/SpecialCasing.txt b/basis/unicode/data/SpecialCasing.txt similarity index 100% rename from extra/unicode/data/SpecialCasing.txt rename to basis/unicode/data/SpecialCasing.txt diff --git a/extra/unicode/data/UnicodeData.txt b/basis/unicode/data/UnicodeData.txt similarity index 100% rename from extra/unicode/data/UnicodeData.txt rename to basis/unicode/data/UnicodeData.txt diff --git a/extra/unicode/data/authors.txt b/basis/unicode/data/authors.txt similarity index 100% rename from extra/unicode/data/authors.txt rename to basis/unicode/data/authors.txt diff --git a/extra/unicode/data/data.factor b/basis/unicode/data/data.factor similarity index 97% rename from extra/unicode/data/data.factor rename to basis/unicode/data/data.factor index fdcf495307..6d6ed276a8 100755 --- a/extra/unicode/data/data.factor +++ b/basis/unicode/data/data.factor @@ -39,7 +39,7 @@ VALUE: properties ascii file-lines [ split-; ] map ; : load-data ( -- data ) - "resource:extra/unicode/data/UnicodeData.txt" data ; + "resource:basis/unicode/data/UnicodeData.txt" data ; : filter-comments ( lines -- lines ) [ "#@" split first ] map harvest ; @@ -140,7 +140,7 @@ C: code-point ! Extra properties : properties-lines ( -- lines ) - "resource:extra/unicode/data/PropList.txt" + "resource:basis/unicode/data/PropList.txt" ascii file-lines ; : parse-properties ( -- {{[a,b],prop}} ) @@ -159,7 +159,7 @@ C: code-point ! Special casing data : load-special-casing ( -- special-casing ) - "resource:extra/unicode/data/SpecialCasing.txt" data + "resource:basis/unicode/data/SpecialCasing.txt" data [ length 5 = ] filter [ [ set-code-point ] each ] H{ } make-assoc ; diff --git a/extra/unicode/data/tags.txt b/basis/unicode/data/tags.txt similarity index 100% rename from extra/unicode/data/tags.txt rename to basis/unicode/data/tags.txt diff --git a/extra/unicode/normalize/NormalizationTest.txt b/basis/unicode/normalize/NormalizationTest.txt similarity index 100% rename from extra/unicode/normalize/NormalizationTest.txt rename to basis/unicode/normalize/NormalizationTest.txt diff --git a/extra/unicode/normalize/authors.txt b/basis/unicode/normalize/authors.txt similarity index 100% rename from extra/unicode/normalize/authors.txt rename to basis/unicode/normalize/authors.txt diff --git a/extra/unicode/normalize/normalize-tests.factor b/basis/unicode/normalize/normalize-tests.factor similarity index 96% rename from extra/unicode/normalize/normalize-tests.factor rename to basis/unicode/normalize/normalize-tests.factor index d4de423e36..cae1380ab4 100755 --- a/extra/unicode/normalize/normalize-tests.factor +++ b/basis/unicode/normalize/normalize-tests.factor @@ -21,7 +21,7 @@ IN: unicode.normalize.tests [ "\u00d55c" ] [ "\u001112\u001161\u0011ab" nfc ] unit-test : parse-test ( -- tests ) - "resource:extra/unicode/normalize/NormalizationTest.txt" + "resource:basis/unicode/normalize/NormalizationTest.txt" utf8 file-lines filter-comments [ ";" split 5 head [ " " split [ hex> ] "" map-as ] map ] map ; diff --git a/extra/unicode/normalize/normalize.factor b/basis/unicode/normalize/normalize.factor similarity index 100% rename from extra/unicode/normalize/normalize.factor rename to basis/unicode/normalize/normalize.factor diff --git a/extra/unicode/normalize/tags.txt b/basis/unicode/normalize/tags.txt similarity index 100% rename from extra/unicode/normalize/tags.txt rename to basis/unicode/normalize/tags.txt diff --git a/extra/unicode/script/Scripts.txt b/basis/unicode/script/Scripts.txt similarity index 100% rename from extra/unicode/script/Scripts.txt rename to basis/unicode/script/Scripts.txt diff --git a/extra/unicode/script/authors.txt b/basis/unicode/script/authors.txt similarity index 100% rename from extra/unicode/script/authors.txt rename to basis/unicode/script/authors.txt diff --git a/extra/unicode/script/script-docs.factor b/basis/unicode/script/script-docs.factor similarity index 100% rename from extra/unicode/script/script-docs.factor rename to basis/unicode/script/script-docs.factor diff --git a/extra/unicode/script/script-tests.factor b/basis/unicode/script/script-tests.factor similarity index 100% rename from extra/unicode/script/script-tests.factor rename to basis/unicode/script/script-tests.factor diff --git a/extra/unicode/script/script.factor b/basis/unicode/script/script.factor similarity index 96% rename from extra/unicode/script/script.factor rename to basis/unicode/script/script.factor index d100d6dbc3..40b0751e2c 100755 --- a/extra/unicode/script/script.factor +++ b/basis/unicode/script/script.factor @@ -36,7 +36,7 @@ SYMBOL: interned ] with-variable ; : load-script ( -- ) - "resource:extra/unicode/script/Scripts.txt" + "resource:basis/unicode/script/Scripts.txt" ascii parse-script process-script ; load-script diff --git a/extra/unicode/script/summary.txt b/basis/unicode/script/summary.txt similarity index 100% rename from extra/unicode/script/summary.txt rename to basis/unicode/script/summary.txt diff --git a/extra/unicode/summary.txt b/basis/unicode/summary.txt similarity index 100% rename from extra/unicode/summary.txt rename to basis/unicode/summary.txt diff --git a/extra/unicode/syntax/authors.txt b/basis/unicode/syntax/authors.txt similarity index 100% rename from extra/unicode/syntax/authors.txt rename to basis/unicode/syntax/authors.txt diff --git a/extra/unicode/syntax/syntax.factor b/basis/unicode/syntax/syntax.factor similarity index 97% rename from extra/unicode/syntax/syntax.factor rename to basis/unicode/syntax/syntax.factor index 2410779804..9df14a3928 100755 --- a/extra/unicode/syntax/syntax.factor +++ b/basis/unicode/syntax/syntax.factor @@ -1,6 +1,6 @@ USING: unicode.data kernel math sequences parser lexer bit-arrays namespaces sequences.private arrays quotations assocs -classes.predicate math.order ; +classes.predicate math.order eval ; IN: unicode.syntax ! Character classes (categories) diff --git a/extra/unicode/syntax/tags.txt b/basis/unicode/syntax/tags.txt similarity index 100% rename from extra/unicode/syntax/tags.txt rename to basis/unicode/syntax/tags.txt diff --git a/extra/unicode/tags.txt b/basis/unicode/tags.txt similarity index 100% rename from extra/unicode/tags.txt rename to basis/unicode/tags.txt diff --git a/extra/io/windows/nt/monitors/authors.txt b/basis/units/authors.txt similarity index 100% rename from extra/io/windows/nt/monitors/authors.txt rename to basis/units/authors.txt diff --git a/extra/random/mersenne-twister/authors.txt b/basis/units/constants/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/random/mersenne-twister/authors.txt rename to basis/units/constants/authors.txt diff --git a/extra/units/constants/constants.factor b/basis/units/constants/constants.factor similarity index 100% rename from extra/units/constants/constants.factor rename to basis/units/constants/constants.factor diff --git a/extra/units/constants/constants.txt b/basis/units/constants/constants.txt similarity index 100% rename from extra/units/constants/constants.txt rename to basis/units/constants/constants.txt diff --git a/extra/structs/authors.txt b/basis/units/imperial/authors.txt similarity index 100% rename from extra/structs/authors.txt rename to basis/units/imperial/authors.txt diff --git a/extra/units/imperial/imperial-tests.factor b/basis/units/imperial/imperial-tests.factor similarity index 100% rename from extra/units/imperial/imperial-tests.factor rename to basis/units/imperial/imperial-tests.factor diff --git a/extra/units/imperial/imperial.factor b/basis/units/imperial/imperial.factor similarity index 100% rename from extra/units/imperial/imperial.factor rename to basis/units/imperial/imperial.factor diff --git a/extra/units/authors.txt b/basis/units/si/authors.txt similarity index 100% rename from extra/units/authors.txt rename to basis/units/si/authors.txt diff --git a/extra/units/si/si-tests.factor b/basis/units/si/si-tests.factor similarity index 100% rename from extra/units/si/si-tests.factor rename to basis/units/si/si-tests.factor diff --git a/extra/units/si/si.factor b/basis/units/si/si.factor similarity index 100% rename from extra/units/si/si.factor rename to basis/units/si/si.factor diff --git a/extra/units/units-tests.factor b/basis/units/units-tests.factor similarity index 100% rename from extra/units/units-tests.factor rename to basis/units/units-tests.factor diff --git a/extra/units/units.factor b/basis/units/units.factor similarity index 100% rename from extra/units/units.factor rename to basis/units/units.factor diff --git a/extra/tools/time/authors.txt b/basis/unix/authors.txt similarity index 100% rename from extra/tools/time/authors.txt rename to basis/unix/authors.txt diff --git a/extra/tools/vocabs/browser/authors.txt b/basis/unix/bsd/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/tools/vocabs/browser/authors.txt rename to basis/unix/bsd/authors.txt diff --git a/extra/unix/bsd/bsd.factor b/basis/unix/bsd/bsd.factor similarity index 100% rename from extra/unix/bsd/bsd.factor rename to basis/unix/bsd/bsd.factor diff --git a/extra/unix/bsd/freebsd/freebsd.factor b/basis/unix/bsd/freebsd/freebsd.factor similarity index 100% rename from extra/unix/bsd/freebsd/freebsd.factor rename to basis/unix/bsd/freebsd/freebsd.factor diff --git a/basis/unix/bsd/freebsd/tags.txt b/basis/unix/bsd/freebsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/bsd/freebsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/bsd/macosx/macosx.factor b/basis/unix/bsd/macosx/macosx.factor similarity index 100% rename from extra/unix/bsd/macosx/macosx.factor rename to basis/unix/bsd/macosx/macosx.factor diff --git a/basis/unix/bsd/macosx/tags.txt b/basis/unix/bsd/macosx/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/bsd/macosx/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/bsd/netbsd/netbsd.factor b/basis/unix/bsd/netbsd/netbsd.factor similarity index 100% rename from extra/unix/bsd/netbsd/netbsd.factor rename to basis/unix/bsd/netbsd/netbsd.factor diff --git a/basis/unix/bsd/netbsd/tags.txt b/basis/unix/bsd/netbsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/bsd/netbsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/bsd/openbsd/openbsd.factor b/basis/unix/bsd/openbsd/openbsd.factor similarity index 100% rename from extra/unix/bsd/openbsd/openbsd.factor rename to basis/unix/bsd/openbsd/openbsd.factor diff --git a/basis/unix/bsd/openbsd/tags.txt b/basis/unix/bsd/openbsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/bsd/openbsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/bsd/summary.txt b/basis/unix/bsd/summary.txt similarity index 100% rename from extra/unix/bsd/summary.txt rename to basis/unix/bsd/summary.txt diff --git a/basis/unix/bsd/tags.txt b/basis/unix/bsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/bsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/tools/vocabs/monitor/authors.txt b/basis/unix/kqueue/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/tools/vocabs/monitor/authors.txt rename to basis/unix/kqueue/authors.txt diff --git a/extra/unix/kqueue/freebsd/freebsd.factor b/basis/unix/kqueue/freebsd/freebsd.factor similarity index 100% rename from extra/unix/kqueue/freebsd/freebsd.factor rename to basis/unix/kqueue/freebsd/freebsd.factor diff --git a/basis/unix/kqueue/freebsd/tags.txt b/basis/unix/kqueue/freebsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/kqueue/freebsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/kqueue/kqueue.factor b/basis/unix/kqueue/kqueue.factor similarity index 100% rename from extra/unix/kqueue/kqueue.factor rename to basis/unix/kqueue/kqueue.factor diff --git a/extra/unix/kqueue/macosx/macosx.factor b/basis/unix/kqueue/macosx/macosx.factor similarity index 100% rename from extra/unix/kqueue/macosx/macosx.factor rename to basis/unix/kqueue/macosx/macosx.factor diff --git a/basis/unix/kqueue/macosx/tags.txt b/basis/unix/kqueue/macosx/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/kqueue/macosx/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/kqueue/netbsd/netbsd.factor b/basis/unix/kqueue/netbsd/netbsd.factor similarity index 100% rename from extra/unix/kqueue/netbsd/netbsd.factor rename to basis/unix/kqueue/netbsd/netbsd.factor diff --git a/basis/unix/kqueue/netbsd/tags.txt b/basis/unix/kqueue/netbsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/kqueue/netbsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/kqueue/openbsd/openbsd.factor b/basis/unix/kqueue/openbsd/openbsd.factor similarity index 100% rename from extra/unix/kqueue/openbsd/openbsd.factor rename to basis/unix/kqueue/openbsd/openbsd.factor diff --git a/basis/unix/kqueue/openbsd/tags.txt b/basis/unix/kqueue/openbsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/kqueue/openbsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/basis/unix/kqueue/tags.txt b/basis/unix/kqueue/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/kqueue/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/tools/walker/authors.txt b/basis/unix/linux/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/tools/walker/authors.txt rename to basis/unix/linux/authors.txt diff --git a/extra/tools/walker/debug/authors.txt b/basis/unix/linux/epoll/authors.txt similarity index 100% rename from extra/tools/walker/debug/authors.txt rename to basis/unix/linux/epoll/authors.txt diff --git a/extra/unix/linux/epoll/epoll.factor b/basis/unix/linux/epoll/epoll.factor similarity index 100% rename from extra/unix/linux/epoll/epoll.factor rename to basis/unix/linux/epoll/epoll.factor diff --git a/basis/unix/linux/epoll/tags.txt b/basis/unix/linux/epoll/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/linux/epoll/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/linux/fs/authors.txt b/basis/unix/linux/fs/authors.txt similarity index 100% rename from extra/unix/linux/fs/authors.txt rename to basis/unix/linux/fs/authors.txt diff --git a/extra/unix/linux/fs/fs.factor b/basis/unix/linux/fs/fs.factor similarity index 100% rename from extra/unix/linux/fs/fs.factor rename to basis/unix/linux/fs/fs.factor diff --git a/basis/unix/linux/fs/tags.txt b/basis/unix/linux/fs/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/linux/fs/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/linux/if/authors.txt b/basis/unix/linux/if/authors.txt similarity index 100% rename from extra/unix/linux/if/authors.txt rename to basis/unix/linux/if/authors.txt diff --git a/extra/unix/linux/if/if.factor b/basis/unix/linux/if/if.factor similarity index 100% rename from extra/unix/linux/if/if.factor rename to basis/unix/linux/if/if.factor diff --git a/basis/unix/linux/if/tags.txt b/basis/unix/linux/if/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/linux/if/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/linux/ifreq/authors.txt b/basis/unix/linux/ifreq/authors.txt similarity index 100% rename from extra/unix/linux/ifreq/authors.txt rename to basis/unix/linux/ifreq/authors.txt diff --git a/extra/unix/linux/ifreq/ifreq.factor b/basis/unix/linux/ifreq/ifreq.factor similarity index 100% rename from extra/unix/linux/ifreq/ifreq.factor rename to basis/unix/linux/ifreq/ifreq.factor diff --git a/basis/unix/linux/ifreq/tags.txt b/basis/unix/linux/ifreq/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/linux/ifreq/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/linux/inotify/inotify.factor b/basis/unix/linux/inotify/inotify.factor similarity index 100% rename from extra/unix/linux/inotify/inotify.factor rename to basis/unix/linux/inotify/inotify.factor diff --git a/basis/unix/linux/inotify/tags.txt b/basis/unix/linux/inotify/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/linux/inotify/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/linux/linux.factor b/basis/unix/linux/linux.factor similarity index 100% rename from extra/unix/linux/linux.factor rename to basis/unix/linux/linux.factor diff --git a/extra/unix/linux/route/authors.txt b/basis/unix/linux/route/authors.txt similarity index 100% rename from extra/unix/linux/route/authors.txt rename to basis/unix/linux/route/authors.txt diff --git a/extra/unix/linux/route/route.factor b/basis/unix/linux/route/route.factor similarity index 100% rename from extra/unix/linux/route/route.factor rename to basis/unix/linux/route/route.factor diff --git a/basis/unix/linux/route/tags.txt b/basis/unix/linux/route/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/linux/route/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/linux/sockios/authors.txt b/basis/unix/linux/sockios/authors.txt similarity index 100% rename from extra/unix/linux/sockios/authors.txt rename to basis/unix/linux/sockios/authors.txt diff --git a/extra/unix/linux/sockios/sockios.factor b/basis/unix/linux/sockios/sockios.factor similarity index 100% rename from extra/unix/linux/sockios/sockios.factor rename to basis/unix/linux/sockios/sockios.factor diff --git a/basis/unix/linux/sockios/tags.txt b/basis/unix/linux/sockios/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/linux/sockios/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/linux/swap/authors.txt b/basis/unix/linux/swap/authors.txt similarity index 100% rename from extra/unix/linux/swap/authors.txt rename to basis/unix/linux/swap/authors.txt diff --git a/extra/unix/linux/swap/swap.factor b/basis/unix/linux/swap/swap.factor similarity index 100% rename from extra/unix/linux/swap/swap.factor rename to basis/unix/linux/swap/swap.factor diff --git a/basis/unix/linux/swap/tags.txt b/basis/unix/linux/swap/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/linux/swap/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/basis/unix/linux/tags.txt b/basis/unix/linux/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/linux/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/process/authors.txt b/basis/unix/process/authors.txt similarity index 100% rename from extra/unix/process/authors.txt rename to basis/unix/process/authors.txt diff --git a/extra/unix/process/process.factor b/basis/unix/process/process.factor similarity index 100% rename from extra/unix/process/process.factor rename to basis/unix/process/process.factor diff --git a/basis/unix/process/tags.txt b/basis/unix/process/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/process/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/tr/authors.txt b/basis/unix/solaris/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/tr/authors.txt rename to basis/unix/solaris/authors.txt diff --git a/extra/unix/solaris/solaris.factor b/basis/unix/solaris/solaris.factor similarity index 100% rename from extra/unix/solaris/solaris.factor rename to basis/unix/solaris/solaris.factor diff --git a/basis/unix/solaris/tags.txt b/basis/unix/solaris/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/solaris/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/stat/freebsd/32/32.factor b/basis/unix/stat/freebsd/32/32.factor similarity index 100% rename from extra/unix/stat/freebsd/32/32.factor rename to basis/unix/stat/freebsd/32/32.factor diff --git a/basis/unix/stat/freebsd/32/tags.txt b/basis/unix/stat/freebsd/32/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/stat/freebsd/32/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/stat/freebsd/64/64.factor b/basis/unix/stat/freebsd/64/64.factor similarity index 100% rename from extra/unix/stat/freebsd/64/64.factor rename to basis/unix/stat/freebsd/64/64.factor diff --git a/basis/unix/stat/freebsd/64/tags.txt b/basis/unix/stat/freebsd/64/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/stat/freebsd/64/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/stat/freebsd/freebsd.factor b/basis/unix/stat/freebsd/freebsd.factor similarity index 100% rename from extra/unix/stat/freebsd/freebsd.factor rename to basis/unix/stat/freebsd/freebsd.factor diff --git a/basis/unix/stat/freebsd/tags.txt b/basis/unix/stat/freebsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/stat/freebsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/stat/linux/32/32.factor b/basis/unix/stat/linux/32/32.factor similarity index 100% rename from extra/unix/stat/linux/32/32.factor rename to basis/unix/stat/linux/32/32.factor diff --git a/basis/unix/stat/linux/32/tags.txt b/basis/unix/stat/linux/32/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/stat/linux/32/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/stat/linux/64/64.factor b/basis/unix/stat/linux/64/64.factor similarity index 100% rename from extra/unix/stat/linux/64/64.factor rename to basis/unix/stat/linux/64/64.factor diff --git a/basis/unix/stat/linux/64/tags.txt b/basis/unix/stat/linux/64/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/stat/linux/64/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/stat/linux/linux.factor b/basis/unix/stat/linux/linux.factor similarity index 100% rename from extra/unix/stat/linux/linux.factor rename to basis/unix/stat/linux/linux.factor diff --git a/basis/unix/stat/linux/tags.txt b/basis/unix/stat/linux/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/stat/linux/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/stat/macosx/macosx.factor b/basis/unix/stat/macosx/macosx.factor similarity index 100% rename from extra/unix/stat/macosx/macosx.factor rename to basis/unix/stat/macosx/macosx.factor diff --git a/basis/unix/stat/macosx/tags.txt b/basis/unix/stat/macosx/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/stat/macosx/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/stat/netbsd/32/32.factor b/basis/unix/stat/netbsd/32/32.factor similarity index 100% rename from extra/unix/stat/netbsd/32/32.factor rename to basis/unix/stat/netbsd/32/32.factor diff --git a/basis/unix/stat/netbsd/32/tags.txt b/basis/unix/stat/netbsd/32/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/stat/netbsd/32/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/stat/netbsd/64/64.factor b/basis/unix/stat/netbsd/64/64.factor similarity index 100% rename from extra/unix/stat/netbsd/64/64.factor rename to basis/unix/stat/netbsd/64/64.factor diff --git a/basis/unix/stat/netbsd/64/tags.txt b/basis/unix/stat/netbsd/64/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/stat/netbsd/64/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/stat/netbsd/netbsd.factor b/basis/unix/stat/netbsd/netbsd.factor similarity index 100% rename from extra/unix/stat/netbsd/netbsd.factor rename to basis/unix/stat/netbsd/netbsd.factor diff --git a/basis/unix/stat/netbsd/tags.txt b/basis/unix/stat/netbsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/stat/netbsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/stat/openbsd/openbsd.factor b/basis/unix/stat/openbsd/openbsd.factor similarity index 100% rename from extra/unix/stat/openbsd/openbsd.factor rename to basis/unix/stat/openbsd/openbsd.factor diff --git a/basis/unix/stat/openbsd/tags.txt b/basis/unix/stat/openbsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/stat/openbsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/stat/stat.factor b/basis/unix/stat/stat.factor similarity index 100% rename from extra/unix/stat/stat.factor rename to basis/unix/stat/stat.factor diff --git a/basis/unix/stat/tags.txt b/basis/unix/stat/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/stat/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/summary.txt b/basis/unix/summary.txt similarity index 100% rename from extra/unix/summary.txt rename to basis/unix/summary.txt diff --git a/basis/unix/tags.txt b/basis/unix/tags.txt new file mode 100644 index 0000000000..2320bdd648 --- /dev/null +++ b/basis/unix/tags.txt @@ -0,0 +1,2 @@ +unportable +bindings diff --git a/basis/unix/time/tags.txt b/basis/unix/time/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/time/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/time/time.factor b/basis/unix/time/time.factor similarity index 100% rename from extra/unix/time/time.factor rename to basis/unix/time/time.factor diff --git a/extra/unix/types/freebsd/freebsd.factor b/basis/unix/types/freebsd/freebsd.factor similarity index 100% rename from extra/unix/types/freebsd/freebsd.factor rename to basis/unix/types/freebsd/freebsd.factor diff --git a/basis/unix/types/freebsd/tags.txt b/basis/unix/types/freebsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/types/freebsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/types/linux/linux.factor b/basis/unix/types/linux/linux.factor similarity index 100% rename from extra/unix/types/linux/linux.factor rename to basis/unix/types/linux/linux.factor diff --git a/basis/unix/types/linux/tags.txt b/basis/unix/types/linux/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/types/linux/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/types/macosx/macosx.factor b/basis/unix/types/macosx/macosx.factor similarity index 100% rename from extra/unix/types/macosx/macosx.factor rename to basis/unix/types/macosx/macosx.factor diff --git a/basis/unix/types/macosx/tags.txt b/basis/unix/types/macosx/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/types/macosx/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/types/netbsd/32/32.factor b/basis/unix/types/netbsd/32/32.factor similarity index 100% rename from extra/unix/types/netbsd/32/32.factor rename to basis/unix/types/netbsd/32/32.factor diff --git a/basis/unix/types/netbsd/32/tags.txt b/basis/unix/types/netbsd/32/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/types/netbsd/32/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/types/netbsd/64/64.factor b/basis/unix/types/netbsd/64/64.factor similarity index 100% rename from extra/unix/types/netbsd/64/64.factor rename to basis/unix/types/netbsd/64/64.factor diff --git a/basis/unix/types/netbsd/64/tags.txt b/basis/unix/types/netbsd/64/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/types/netbsd/64/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/types/netbsd/netbsd.factor b/basis/unix/types/netbsd/netbsd.factor similarity index 100% rename from extra/unix/types/netbsd/netbsd.factor rename to basis/unix/types/netbsd/netbsd.factor diff --git a/basis/unix/types/netbsd/tags.txt b/basis/unix/types/netbsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/types/netbsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/types/openbsd/openbsd.factor b/basis/unix/types/openbsd/openbsd.factor similarity index 100% rename from extra/unix/types/openbsd/openbsd.factor rename to basis/unix/types/openbsd/openbsd.factor diff --git a/basis/unix/types/openbsd/tags.txt b/basis/unix/types/openbsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/types/openbsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/basis/unix/types/tags.txt b/basis/unix/types/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/types/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/unix/types/types.factor b/basis/unix/types/types.factor similarity index 100% rename from extra/unix/types/types.factor rename to basis/unix/types/types.factor diff --git a/extra/unix/unix.factor b/basis/unix/unix.factor similarity index 100% rename from extra/unix/unix.factor rename to basis/unix/unix.factor diff --git a/extra/unix/authors.txt b/basis/urls/authors.txt similarity index 100% rename from extra/unix/authors.txt rename to basis/urls/authors.txt diff --git a/extra/urls/summary.txt b/basis/urls/summary.txt similarity index 100% rename from extra/urls/summary.txt rename to basis/urls/summary.txt diff --git a/extra/urls/tags.txt b/basis/urls/tags.txt similarity index 100% rename from extra/urls/tags.txt rename to basis/urls/tags.txt diff --git a/extra/urls/urls-tests.factor b/basis/urls/urls-tests.factor similarity index 100% rename from extra/urls/urls-tests.factor rename to basis/urls/urls-tests.factor diff --git a/extra/urls/urls.factor b/basis/urls/urls.factor similarity index 100% rename from extra/urls/urls.factor rename to basis/urls/urls.factor diff --git a/extra/validators/validators-tests.factor b/basis/validators/validators-tests.factor similarity index 100% rename from extra/validators/validators-tests.factor rename to basis/validators/validators-tests.factor diff --git a/extra/validators/validators.factor b/basis/validators/validators.factor similarity index 100% rename from extra/validators/validators.factor rename to basis/validators/validators.factor diff --git a/extra/values/authors.txt b/basis/values/authors.txt similarity index 100% rename from extra/values/authors.txt rename to basis/values/authors.txt diff --git a/extra/values/summary.txt b/basis/values/summary.txt similarity index 100% rename from extra/values/summary.txt rename to basis/values/summary.txt diff --git a/extra/values/tags.txt b/basis/values/tags.txt similarity index 100% rename from extra/values/tags.txt rename to basis/values/tags.txt diff --git a/extra/values/values-docs.factor b/basis/values/values-docs.factor similarity index 100% rename from extra/values/values-docs.factor rename to basis/values/values-docs.factor diff --git a/extra/values/values-tests.factor b/basis/values/values-tests.factor similarity index 100% rename from extra/values/values-tests.factor rename to basis/values/values-tests.factor diff --git a/extra/values/values.factor b/basis/values/values.factor similarity index 100% rename from extra/values/values.factor rename to basis/values/values.factor diff --git a/extra/windows/advapi32/advapi32.factor b/basis/windows/advapi32/advapi32.factor similarity index 100% rename from extra/windows/advapi32/advapi32.factor rename to basis/windows/advapi32/advapi32.factor diff --git a/extra/units/constants/authors.txt b/basis/windows/advapi32/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/units/constants/authors.txt rename to basis/windows/advapi32/authors.txt diff --git a/basis/windows/advapi32/tags.txt b/basis/windows/advapi32/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/windows/advapi32/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/windows/authors.txt b/basis/windows/authors.txt similarity index 100% rename from extra/windows/authors.txt rename to basis/windows/authors.txt diff --git a/extra/units/imperial/authors.txt b/basis/windows/ce/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/units/imperial/authors.txt rename to basis/windows/ce/authors.txt diff --git a/extra/windows/ce/ce.factor b/basis/windows/ce/ce.factor similarity index 100% rename from extra/windows/ce/ce.factor rename to basis/windows/ce/ce.factor diff --git a/basis/windows/ce/tags.txt b/basis/windows/ce/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/windows/ce/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/windows/com/authors.txt b/basis/windows/com/authors.txt similarity index 100% rename from extra/windows/com/authors.txt rename to basis/windows/com/authors.txt diff --git a/extra/windows/com/com-docs.factor b/basis/windows/com/com-docs.factor similarity index 100% rename from extra/windows/com/com-docs.factor rename to basis/windows/com/com-docs.factor diff --git a/extra/windows/com/com-tests.factor b/basis/windows/com/com-tests.factor similarity index 98% rename from extra/windows/com/com-tests.factor rename to basis/windows/com/com-tests.factor index cd67fd19d2..289581a929 100755 --- a/extra/windows/com/com-tests.factor +++ b/basis/windows/com/com-tests.factor @@ -45,7 +45,7 @@ C: test-implementation } } { "IUnrelated" { [ swap x>> + ] ! IUnrelated::xPlus - [ spin x>> * + ] ! IUnrealted::xMulAdd + [ spin x>> * + ] ! IUnrelated::xMulAdd } } } dup +test-wrapper+ set [ diff --git a/extra/windows/com/com.factor b/basis/windows/com/com.factor similarity index 100% rename from extra/windows/com/com.factor rename to basis/windows/com/com.factor diff --git a/extra/windows/com/summary.txt b/basis/windows/com/summary.txt similarity index 100% rename from extra/windows/com/summary.txt rename to basis/windows/com/summary.txt diff --git a/extra/windows/com/syntax/authors.txt b/basis/windows/com/syntax/authors.txt similarity index 100% rename from extra/windows/com/syntax/authors.txt rename to basis/windows/com/syntax/authors.txt diff --git a/extra/windows/com/syntax/summary.txt b/basis/windows/com/syntax/summary.txt similarity index 100% rename from extra/windows/com/syntax/summary.txt rename to basis/windows/com/syntax/summary.txt diff --git a/extra/windows/com/syntax/syntax-docs.factor b/basis/windows/com/syntax/syntax-docs.factor similarity index 100% rename from extra/windows/com/syntax/syntax-docs.factor rename to basis/windows/com/syntax/syntax-docs.factor diff --git a/extra/windows/com/syntax/syntax.factor b/basis/windows/com/syntax/syntax.factor similarity index 100% rename from extra/windows/com/syntax/syntax.factor rename to basis/windows/com/syntax/syntax.factor diff --git a/extra/windows/com/syntax/tags.txt b/basis/windows/com/syntax/tags.txt similarity index 65% rename from extra/windows/com/syntax/tags.txt rename to basis/windows/com/syntax/tags.txt index 49139bab66..71c5900baf 100644 --- a/extra/windows/com/syntax/tags.txt +++ b/basis/windows/com/syntax/tags.txt @@ -1,3 +1,4 @@ -windows -com -bindings +unportable +windows +com +bindings diff --git a/extra/windows/com/tags.txt b/basis/windows/com/tags.txt similarity index 65% rename from extra/windows/com/tags.txt rename to basis/windows/com/tags.txt index 49139bab66..71c5900baf 100644 --- a/extra/windows/com/tags.txt +++ b/basis/windows/com/tags.txt @@ -1,3 +1,4 @@ -windows -com -bindings +unportable +windows +com +bindings diff --git a/extra/windows/com/wrapper/authors.txt b/basis/windows/com/wrapper/authors.txt similarity index 100% rename from extra/windows/com/wrapper/authors.txt rename to basis/windows/com/wrapper/authors.txt diff --git a/extra/windows/com/wrapper/summary.txt b/basis/windows/com/wrapper/summary.txt similarity index 100% rename from extra/windows/com/wrapper/summary.txt rename to basis/windows/com/wrapper/summary.txt diff --git a/extra/windows/com/wrapper/tags.txt b/basis/windows/com/wrapper/tags.txt similarity index 65% rename from extra/windows/com/wrapper/tags.txt rename to basis/windows/com/wrapper/tags.txt index ffb665dc8f..71c5900baf 100644 --- a/extra/windows/com/wrapper/tags.txt +++ b/basis/windows/com/wrapper/tags.txt @@ -1,3 +1,4 @@ +unportable windows com bindings diff --git a/extra/windows/com/wrapper/wrapper-docs.factor b/basis/windows/com/wrapper/wrapper-docs.factor similarity index 100% rename from extra/windows/com/wrapper/wrapper-docs.factor rename to basis/windows/com/wrapper/wrapper-docs.factor diff --git a/extra/windows/com/wrapper/wrapper.factor b/basis/windows/com/wrapper/wrapper.factor similarity index 73% rename from extra/windows/com/wrapper/wrapper.factor rename to basis/windows/com/wrapper/wrapper.factor index 40c61dfbe7..782ebae516 100755 --- a/extra/windows/com/wrapper/wrapper.factor +++ b/basis/windows/com/wrapper/wrapper.factor @@ -1,11 +1,11 @@ -USING: alien alien.c-types windows.com.syntax +USING: alien alien.c-types windows.com.syntax init windows.com.syntax.private windows.com continuations kernel namespaces windows.ole32 libc vocabs assocs accessors arrays sequences quotations combinators math words compiler.units -destructors fry math.parser generalizations ; +destructors fry math.parser generalizations sets ; IN: windows.com.wrapper -TUPLE: com-wrapper vtbls disposed ; +TUPLE: com-wrapper callbacks vtbls disposed ; malloc ( byte-array -- alien ) [ byte-length malloc ] [ over byte-array>memory ] bi ; : (callback-word) ( function-name interface-name counter -- word ) @@ -99,7 +103,7 @@ unless [ dup empty? [ 2drop [ ] ] [ swap 1- '[ , , ndip ] ] if ] dip compose ; -: (make-vtbl) ( interface-name quots iunknown-methods n -- vtbl ) +: (make-interface-callbacks) ( interface-name quots iunknown-methods n -- words ) (thunk) (thunked-quots) swap [ find-com-interface-definition family-tree-functions ] keep (next-vtbl-counter) '[ @@ -114,12 +118,12 @@ unless first2 (finish-thunk) ] bi* "stdcall" swap compile-alien-callback - ] 2map >c-void*-array - (byte-array-to-malloced-buffer) ; + ] 2map ; -: (make-vtbls) ( implementations -- vtbls ) +: (make-callbacks) ( implementations -- sequence ) dup [ first ] map (make-iunknown-methods) - [ >r >r first2 r> r> swap (make-vtbl) ] curry map-index ; + [ >r >r first2 r> r> swap (make-interface-callbacks) ] + curry map-index ; : (malloc-wrapped-object) ( wrapper -- wrapped-object ) vtbls>> length "void*" heap-size * @@ -127,13 +131,34 @@ unless over 1 0 rot set-ulong-nth ; +: (callbacks>vtbl) ( callbacks -- vtbl ) + [ execute ] map >c-void*-array byte-array>malloc ; +: (callbacks>vtbls) ( callbacks -- vtbls ) + [ (callbacks>vtbl) ] map ; + +: (allocate-wrapper) ( wrapper -- ) + dup callbacks>> (callbacks>vtbls) >>vtbls + f >>disposed drop ; + +: (init-hook) ( -- ) + +live-wrappers+ get-global [ (allocate-wrapper) ] each + H{ } +wrapped-objects+ set-global ; + +[ (init-hook) ] "windows.com.wrapper" add-init-hook + PRIVATE> +: allocate-wrapper ( wrapper -- ) + [ (allocate-wrapper) ] + [ +live-wrappers+ get adjoin ] bi ; + : ( implementations -- wrapper ) - (make-vtbls) f com-wrapper boa ; + (make-callbacks) f f com-wrapper boa + dup allocate-wrapper ; M: com-wrapper dispose* - vtbls>> [ free ] each ; + [ [ free ] each f ] change-vtbls + +live-wrappers+ get-global delete ; : com-wrap ( object wrapper -- wrapped-object ) [ vtbls>> ] [ (malloc-wrapped-object) ] bi diff --git a/extra/windows/dinput/authors.txt b/basis/windows/dinput/authors.txt similarity index 100% rename from extra/windows/dinput/authors.txt rename to basis/windows/dinput/authors.txt diff --git a/basis/windows/dinput/constants/constants.factor b/basis/windows/dinput/constants/constants.factor new file mode 100755 index 0000000000..b918ec121b --- /dev/null +++ b/basis/windows/dinput/constants/constants.factor @@ -0,0 +1,854 @@ +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 +libc continuations generalizations splitting locals assocs init ; +IN: windows.dinput.constants + +! Some global variables aren't provided by the DirectInput DLL (they're in the +! dinput8.lib import library), so we lovingly hand-craft equivalent values here + +SYMBOLS: + GUID_XAxis_malloced GUID_YAxis_malloced GUID_ZAxis_malloced + GUID_RxAxis_malloced GUID_RyAxis_malloced GUID_RzAxis_malloced + GUID_Slider_malloced GUID_Button_malloced GUID_Key_malloced GUID_POV_malloced GUID_Unknown_malloced + GUID_SysMouse_malloced GUID_SysKeyboard_malloced GUID_Joystick_malloced GUID_SysMouseEm_malloced + GUID_SysMouseEm2_malloced GUID_SysKeyboardEm_malloced GUID_SysKeyboardEm2_malloced + c_dfDIKeyboard c_dfDIKeyboard_HID c_dfDIMouse2 c_dfDIJoystick2 ; + +> [ name>> = ] with find nip ; +: (offsetof) ( field struct -- offset ) + [ (field-spec-of) offset>> ] [ drop 0 ] if* ; +: (sizeof) ( field struct -- size ) + [ (field-spec-of) class>> "[" split1 drop heap-size ] [ drop 1 ] if* ; + +: (flag) ( thing -- integer ) + { + { [ dup word? ] [ execute ] } + { [ dup callable? ] [ call ] } + [ ] + } cond ; + +: (flags) ( array -- ) + 0 [ (flag) bitor ] reduce ; + +: (DIOBJECTDATAFORMAT) ( pguid dwOfs dwType dwFlags alien -- alien ) + [ { + [ set-DIOBJECTDATAFORMAT-dwFlags ] + [ set-DIOBJECTDATAFORMAT-dwType ] + [ set-DIOBJECTDATAFORMAT-dwOfs ] + [ set-DIOBJECTDATAFORMAT-pguid ] + } cleave ] keep ; + +: ( struct {pguid-var,field,index,dwType-flags,dwFlags} -- alien ) + { + [ first dup word? [ get ] when ] + [ second rot [ (offsetof) ] [ (sizeof) ] 2bi ] + [ third * + ] + [ fourth (flags) ] + [ 4 swap nth (flag) ] + } cleave + "DIOBJECTDATAFORMAT" (DIOBJECTDATAFORMAT) ; + +: malloc-DIOBJECTDATAFORMAT-array ( struct array -- alien ) + [ nip length "DIOBJECTDATAFORMAT" malloc-array dup ] + [ + -rot [| args i alien struct | + struct args + i alien set-DIOBJECTDATAFORMAT-nth + ] 2curry each-index + ] 2bi ; + +: (DIDATAFORMAT) ( dwSize dwObjSize dwFlags dwDataSize dwNumObjs rgodf alien -- alien ) + [ { + [ set-DIDATAFORMAT-rgodf ] + [ set-DIDATAFORMAT-dwNumObjs ] + [ set-DIDATAFORMAT-dwDataSize ] + [ set-DIDATAFORMAT-dwFlags ] + [ set-DIDATAFORMAT-dwObjSize ] + [ set-DIDATAFORMAT-dwSize ] + } cleave ] keep ; + +: ( dwFlags dwDataSize struct rgodf-array -- alien ) + [ "DIDATAFORMAT" heap-size "DIOBJECTDATAFORMAT" heap-size ] 4 ndip + [ nip length ] [ malloc-DIOBJECTDATAFORMAT-array ] 2bi + "DIDATAFORMAT" (DIDATAFORMAT) ; + +: (malloc-guid-symbol) ( symbol guid -- ) + global swap '[ [ + , execute [ byte-length malloc ] [ over byte-array>memory ] bi + ] unless* ] change-at ; + +: define-guid-constants ( -- ) + { + { GUID_XAxis_malloced GUID_XAxis } + { GUID_YAxis_malloced GUID_YAxis } + { GUID_ZAxis_malloced GUID_ZAxis } + { GUID_RxAxis_malloced GUID_RxAxis } + { GUID_RyAxis_malloced GUID_RyAxis } + { GUID_RzAxis_malloced GUID_RzAxis } + { GUID_Slider_malloced GUID_Slider } + { GUID_Button_malloced GUID_Button } + { GUID_Key_malloced GUID_Key } + { GUID_POV_malloced GUID_POV } + { GUID_Unknown_malloced GUID_Unknown } + { GUID_SysMouse_malloced GUID_SysMouse } + { GUID_SysKeyboard_malloced GUID_SysKeyboard } + { GUID_Joystick_malloced GUID_Joystick } + { GUID_SysMouseEm_malloced GUID_SysMouseEm } + { GUID_SysMouseEm2_malloced GUID_SysMouseEm2 } + { GUID_SysKeyboardEm_malloced GUID_SysKeyboardEm } + { GUID_SysKeyboardEm2_malloced GUID_SysKeyboardEm2 } + } [ first2 (malloc-guid-symbol) ] each ; + +: define-joystick-format-constant ( -- ) + c_dfDIJoystick2 global [ [ + DIDF_ABSAXIS + "DIJOYSTATE2" heap-size + "DIJOYSTATE2" { + { GUID_XAxis_malloced "lX" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } 0 } + { GUID_YAxis_malloced "lY" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } 0 } + { GUID_ZAxis_malloced "lZ" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } 0 } + { GUID_RxAxis_malloced "lRx" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } 0 } + { GUID_RyAxis_malloced "lRy" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } 0 } + { GUID_RzAxis_malloced "lRz" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } 0 } + { GUID_Slider_malloced "rglSlider" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } 0 } + { GUID_Slider_malloced "rglSlider" 1 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } 0 } + { GUID_POV_malloced "rgdwPOV" 0 { DIDFT_OPTIONAL DIDFT_POV DIDFT_ANYINSTANCE } 0 } + { GUID_POV_malloced "rgdwPOV" 1 { DIDFT_OPTIONAL DIDFT_POV DIDFT_ANYINSTANCE } 0 } + { GUID_POV_malloced "rgdwPOV" 2 { DIDFT_OPTIONAL DIDFT_POV DIDFT_ANYINSTANCE } 0 } + { GUID_POV_malloced "rgdwPOV" 3 { DIDFT_OPTIONAL DIDFT_POV DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 0 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 1 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 2 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 3 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 4 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 5 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 6 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 7 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 8 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 9 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 10 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 11 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 12 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 13 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 14 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 15 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 16 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 17 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 18 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 19 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 20 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 21 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 22 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 23 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 24 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 25 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 26 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 27 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 28 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 29 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 30 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 31 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 32 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 33 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 34 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 35 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 36 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 37 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 38 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 39 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 40 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 41 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 42 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 43 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 44 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 45 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 46 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 47 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 48 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 49 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 50 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 51 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 52 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 53 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 54 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 55 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 56 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 57 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 58 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 59 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 60 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 61 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 62 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 63 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 64 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 65 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 66 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 67 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 68 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 69 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 70 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 71 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 72 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 73 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 74 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 75 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 76 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 77 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 78 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 79 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 80 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 81 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 82 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 83 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 84 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 85 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 86 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 87 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 88 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 89 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 90 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 91 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 92 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 93 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 94 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 95 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 96 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 97 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 98 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 99 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 100 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 101 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 102 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 103 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 104 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 105 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 106 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 107 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 108 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 109 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 110 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 111 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 112 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 113 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 114 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 115 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 116 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 117 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 118 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 119 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 120 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 121 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 122 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 123 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 124 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 125 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 126 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { f "rgbButtons" 127 { DIDFT_OPTIONAL DIDFT_BUTTON DIDFT_ANYINSTANCE } 0 } + { GUID_XAxis_malloced "lVX" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTVELOCITY } + { GUID_YAxis_malloced "lVY" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTVELOCITY } + { GUID_ZAxis_malloced "lVZ" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTVELOCITY } + { GUID_RxAxis_malloced "lVRx" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTVELOCITY } + { GUID_RyAxis_malloced "lVRy" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTVELOCITY } + { GUID_RzAxis_malloced "lVRz" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTVELOCITY } + { GUID_Slider_malloced "rglVSlider" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTVELOCITY } + { GUID_Slider_malloced "rglVSlider" 1 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTVELOCITY } + { GUID_XAxis_malloced "lAX" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTACCEL } + { GUID_YAxis_malloced "lAY" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTACCEL } + { GUID_ZAxis_malloced "lAZ" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTACCEL } + { GUID_RxAxis_malloced "lARx" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTACCEL } + { GUID_RyAxis_malloced "lARy" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTACCEL } + { GUID_RzAxis_malloced "lARz" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTACCEL } + { GUID_Slider_malloced "rglASlider" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTACCEL } + { GUID_Slider_malloced "rglASlider" 1 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTACCEL } + { GUID_XAxis_malloced "lFX" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTFORCE } + { GUID_YAxis_malloced "lFY" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTFORCE } + { GUID_ZAxis_malloced "lFZ" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTFORCE } + { GUID_RxAxis_malloced "lFRx" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTFORCE } + { GUID_RyAxis_malloced "lFRy" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTFORCE } + { GUID_RzAxis_malloced "lFRz" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTFORCE } + { GUID_Slider_malloced "rglFSlider" 0 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTFORCE } + { GUID_Slider_malloced "rglFSlider" 1 { DIDFT_OPTIONAL DIDFT_AXIS DIDFT_ANYINSTANCE } DIDOI_ASPECTFORCE } + } + ] unless* ] change-at ; + +: define-mouse-format-constant ( -- ) + c_dfDIMouse2 global [ [ + DIDF_RELAXIS + "DIMOUSESTATE2" heap-size + "DIMOUSESTATE2" { + { GUID_XAxis_malloced "lX" 0 { DIDFT_ANYINSTANCE DIDFT_AXIS } 0 } + { GUID_YAxis_malloced "lY" 0 { DIDFT_ANYINSTANCE DIDFT_AXIS } 0 } + { GUID_ZAxis_malloced "lZ" 0 { DIDFT_OPTIONAL DIDFT_ANYINSTANCE DIDFT_AXIS } 0 } + { GUID_Button_malloced "rgbButtons" 0 { DIDFT_ANYINSTANCE DIDFT_BUTTON } 0 } + { GUID_Button_malloced "rgbButtons" 1 { DIDFT_ANYINSTANCE DIDFT_BUTTON } 0 } + { GUID_Button_malloced "rgbButtons" 2 { DIDFT_OPTIONAL DIDFT_ANYINSTANCE DIDFT_BUTTON } 0 } + { GUID_Button_malloced "rgbButtons" 3 { DIDFT_OPTIONAL DIDFT_ANYINSTANCE DIDFT_BUTTON } 0 } + { GUID_Button_malloced "rgbButtons" 4 { DIDFT_OPTIONAL DIDFT_ANYINSTANCE DIDFT_BUTTON } 0 } + { GUID_Button_malloced "rgbButtons" 5 { DIDFT_OPTIONAL DIDFT_ANYINSTANCE DIDFT_BUTTON } 0 } + { GUID_Button_malloced "rgbButtons" 6 { DIDFT_OPTIONAL DIDFT_ANYINSTANCE DIDFT_BUTTON } 0 } + { GUID_Button_malloced "rgbButtons" 7 { DIDFT_OPTIONAL DIDFT_ANYINSTANCE DIDFT_BUTTON } 0 } + } + ] unless* ] change-at ; + +! Not a standard DirectInput format. Included for cross-platform niceness. +! This format returns the keyboard keys in USB HID order rather than Windows +! order +: define-hid-keyboard-format-constant ( -- ) + c_dfDIKeyboard_HID global [ [ + DIDF_RELAXIS + 256 + f { + { GUID_Key_malloced f 0 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 1 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 2 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 3 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 4 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_A DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 5 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_B DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 6 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_C DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 7 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_D DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 8 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_E DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 9 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_F DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 10 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_G DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 11 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_H DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 12 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_I DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 13 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_J DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 14 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_K DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 15 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_L DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 16 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_M DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 17 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_N DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 18 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_O DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 19 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_P DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 20 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_Q DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 21 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_R DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 22 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_S DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 23 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_T DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 24 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_U DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 25 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_V DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 26 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_W DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 27 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_X DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 28 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_Y DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 29 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_Z DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 30 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_1 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 31 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_2 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 32 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_3 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 33 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_4 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 34 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_5 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 35 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_6 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 36 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_7 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 37 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_8 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 38 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_9 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 39 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 40 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_RETURN DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 41 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_ESCAPE DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 42 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_BACK DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 43 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_TAB DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 44 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_SPACE DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 45 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_MINUS DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 46 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_EQUALS DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 47 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_LBRACKET DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 48 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_RBRACKET DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 49 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_BACKSLASH DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 50 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 51 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_SEMICOLON DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 52 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_APOSTROPHE DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 53 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_GRAVE DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 54 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_COMMA DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 55 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_PERIOD DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 56 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_SLASH DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 57 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_CAPITAL DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 58 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_F1 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 59 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_F2 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 60 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_F3 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 61 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_F4 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 62 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_F5 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 63 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_F6 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 64 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_F7 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 65 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_F8 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 66 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_F9 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 67 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_F10 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 68 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_F11 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 69 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_F12 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 70 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_SYSRQ DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 71 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_SCROLL DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 72 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_PAUSE DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 73 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_INSERT DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 74 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_HOME DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 75 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_PRIOR DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 76 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_DELETE DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 77 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_END DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 78 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_NEXT DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 79 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_RIGHT DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 80 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_LEFT DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 81 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_DOWN DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 82 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_UP DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 83 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_NUMLOCK DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 84 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_DIVIDE DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 85 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_MULTIPLY DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 86 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_SUBTRACT DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 87 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_ADD DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 88 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_NUMPADENTER DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 89 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_NUMPAD1 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 90 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_NUMPAD2 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 91 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_NUMPAD3 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 92 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_NUMPAD4 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 93 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_NUMPAD5 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 94 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_NUMPAD6 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 95 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_NUMPAD7 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 96 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_NUMPAD8 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 97 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_NUMPAD9 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 98 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_NUMPAD0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 99 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_DECIMAL DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 100 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_OEM_102 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 101 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_APPS DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 102 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_POWER DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 103 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_NUMPADEQUALS DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 104 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_F13 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 105 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_F14 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 106 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_F15 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 107 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 108 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 109 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 110 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 111 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 112 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 113 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 114 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 115 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 116 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 117 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 118 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 119 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 120 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 121 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 122 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 123 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 124 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 125 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 126 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 127 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_MUTE DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 128 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_VOLUMEUP DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 129 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_VOLUMEDOWN DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 130 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 131 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 132 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 133 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_ABNT_C2 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 134 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 135 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_ABNT_C1 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 136 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_KANA DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 137 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_YEN DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 138 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_CONVERT DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 139 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_NOCONVERT DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 140 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 141 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 142 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 143 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 144 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 145 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 146 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 147 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 148 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 149 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 150 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 151 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 152 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 153 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 154 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 155 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 156 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 157 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 158 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 159 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 160 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 161 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 162 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 163 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 164 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 165 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 166 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 167 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 168 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 169 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 170 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 171 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 172 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 173 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 174 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 175 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 176 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 177 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 178 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 179 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 180 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 181 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 182 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 183 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 184 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 185 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 186 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 187 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 188 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 189 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 190 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 191 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 192 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 193 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 194 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 195 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 196 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 197 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 198 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 199 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 200 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 201 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 202 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 203 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 204 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 205 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 206 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 207 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 208 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 209 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 210 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 211 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 212 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 213 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 214 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 215 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 216 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 217 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 218 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 219 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 220 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 221 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 222 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 223 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 224 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_LCONTROL DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 225 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_LSHIFT DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 226 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_LMENU DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 227 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_LWIN DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 228 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_RCONTROL DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 229 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_RSHIFT DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 230 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_RMENU DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 231 { DIDFT_OPTIONAL DIDFT_BUTTON [ DIK_RWIN DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 232 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 233 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 234 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 235 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 236 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 237 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 238 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 239 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 240 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 241 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 242 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 243 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 244 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 245 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 246 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 247 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 248 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 249 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 250 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 251 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 252 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 253 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 254 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 255 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + } + ] unless* ] change-at ; + +: define-keyboard-format-constant ( -- ) + c_dfDIKeyboard global [ [ + DIDF_RELAXIS + 256 + f { + { GUID_Key_malloced f 0 { DIDFT_OPTIONAL DIDFT_BUTTON [ 0 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 1 { DIDFT_OPTIONAL DIDFT_BUTTON [ 1 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 2 { DIDFT_OPTIONAL DIDFT_BUTTON [ 2 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 3 { DIDFT_OPTIONAL DIDFT_BUTTON [ 3 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 4 { DIDFT_OPTIONAL DIDFT_BUTTON [ 4 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 5 { DIDFT_OPTIONAL DIDFT_BUTTON [ 5 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 6 { DIDFT_OPTIONAL DIDFT_BUTTON [ 6 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 7 { DIDFT_OPTIONAL DIDFT_BUTTON [ 7 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 8 { DIDFT_OPTIONAL DIDFT_BUTTON [ 8 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 9 { DIDFT_OPTIONAL DIDFT_BUTTON [ 9 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 10 { DIDFT_OPTIONAL DIDFT_BUTTON [ 10 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 11 { DIDFT_OPTIONAL DIDFT_BUTTON [ 11 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 12 { DIDFT_OPTIONAL DIDFT_BUTTON [ 12 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 13 { DIDFT_OPTIONAL DIDFT_BUTTON [ 13 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 14 { DIDFT_OPTIONAL DIDFT_BUTTON [ 14 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 15 { DIDFT_OPTIONAL DIDFT_BUTTON [ 15 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 16 { DIDFT_OPTIONAL DIDFT_BUTTON [ 16 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 17 { DIDFT_OPTIONAL DIDFT_BUTTON [ 17 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 18 { DIDFT_OPTIONAL DIDFT_BUTTON [ 18 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 19 { DIDFT_OPTIONAL DIDFT_BUTTON [ 19 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 20 { DIDFT_OPTIONAL DIDFT_BUTTON [ 20 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 21 { DIDFT_OPTIONAL DIDFT_BUTTON [ 21 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 22 { DIDFT_OPTIONAL DIDFT_BUTTON [ 22 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 23 { DIDFT_OPTIONAL DIDFT_BUTTON [ 23 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 24 { DIDFT_OPTIONAL DIDFT_BUTTON [ 24 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 25 { DIDFT_OPTIONAL DIDFT_BUTTON [ 25 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 26 { DIDFT_OPTIONAL DIDFT_BUTTON [ 26 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 27 { DIDFT_OPTIONAL DIDFT_BUTTON [ 27 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 28 { DIDFT_OPTIONAL DIDFT_BUTTON [ 28 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 29 { DIDFT_OPTIONAL DIDFT_BUTTON [ 29 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 30 { DIDFT_OPTIONAL DIDFT_BUTTON [ 30 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 31 { DIDFT_OPTIONAL DIDFT_BUTTON [ 31 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 32 { DIDFT_OPTIONAL DIDFT_BUTTON [ 32 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 33 { DIDFT_OPTIONAL DIDFT_BUTTON [ 33 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 34 { DIDFT_OPTIONAL DIDFT_BUTTON [ 34 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 35 { DIDFT_OPTIONAL DIDFT_BUTTON [ 35 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 36 { DIDFT_OPTIONAL DIDFT_BUTTON [ 36 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 37 { DIDFT_OPTIONAL DIDFT_BUTTON [ 37 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 38 { DIDFT_OPTIONAL DIDFT_BUTTON [ 38 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 39 { DIDFT_OPTIONAL DIDFT_BUTTON [ 39 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 40 { DIDFT_OPTIONAL DIDFT_BUTTON [ 40 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 41 { DIDFT_OPTIONAL DIDFT_BUTTON [ 41 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 42 { DIDFT_OPTIONAL DIDFT_BUTTON [ 42 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 43 { DIDFT_OPTIONAL DIDFT_BUTTON [ 43 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 44 { DIDFT_OPTIONAL DIDFT_BUTTON [ 44 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 45 { DIDFT_OPTIONAL DIDFT_BUTTON [ 45 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 46 { DIDFT_OPTIONAL DIDFT_BUTTON [ 46 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 47 { DIDFT_OPTIONAL DIDFT_BUTTON [ 47 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 48 { DIDFT_OPTIONAL DIDFT_BUTTON [ 48 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 49 { DIDFT_OPTIONAL DIDFT_BUTTON [ 49 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 50 { DIDFT_OPTIONAL DIDFT_BUTTON [ 50 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 51 { DIDFT_OPTIONAL DIDFT_BUTTON [ 51 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 52 { DIDFT_OPTIONAL DIDFT_BUTTON [ 52 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 53 { DIDFT_OPTIONAL DIDFT_BUTTON [ 53 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 54 { DIDFT_OPTIONAL DIDFT_BUTTON [ 54 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 55 { DIDFT_OPTIONAL DIDFT_BUTTON [ 55 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 56 { DIDFT_OPTIONAL DIDFT_BUTTON [ 56 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 57 { DIDFT_OPTIONAL DIDFT_BUTTON [ 57 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 58 { DIDFT_OPTIONAL DIDFT_BUTTON [ 58 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 59 { DIDFT_OPTIONAL DIDFT_BUTTON [ 59 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 60 { DIDFT_OPTIONAL DIDFT_BUTTON [ 60 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 61 { DIDFT_OPTIONAL DIDFT_BUTTON [ 61 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 62 { DIDFT_OPTIONAL DIDFT_BUTTON [ 62 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 63 { DIDFT_OPTIONAL DIDFT_BUTTON [ 63 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 64 { DIDFT_OPTIONAL DIDFT_BUTTON [ 64 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 65 { DIDFT_OPTIONAL DIDFT_BUTTON [ 65 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 66 { DIDFT_OPTIONAL DIDFT_BUTTON [ 66 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 67 { DIDFT_OPTIONAL DIDFT_BUTTON [ 67 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 68 { DIDFT_OPTIONAL DIDFT_BUTTON [ 68 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 69 { DIDFT_OPTIONAL DIDFT_BUTTON [ 69 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 70 { DIDFT_OPTIONAL DIDFT_BUTTON [ 70 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 71 { DIDFT_OPTIONAL DIDFT_BUTTON [ 71 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 72 { DIDFT_OPTIONAL DIDFT_BUTTON [ 72 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 73 { DIDFT_OPTIONAL DIDFT_BUTTON [ 73 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 74 { DIDFT_OPTIONAL DIDFT_BUTTON [ 74 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 75 { DIDFT_OPTIONAL DIDFT_BUTTON [ 75 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 76 { DIDFT_OPTIONAL DIDFT_BUTTON [ 76 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 77 { DIDFT_OPTIONAL DIDFT_BUTTON [ 77 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 78 { DIDFT_OPTIONAL DIDFT_BUTTON [ 78 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 79 { DIDFT_OPTIONAL DIDFT_BUTTON [ 79 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 80 { DIDFT_OPTIONAL DIDFT_BUTTON [ 80 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 81 { DIDFT_OPTIONAL DIDFT_BUTTON [ 81 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 82 { DIDFT_OPTIONAL DIDFT_BUTTON [ 82 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 83 { DIDFT_OPTIONAL DIDFT_BUTTON [ 83 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 84 { DIDFT_OPTIONAL DIDFT_BUTTON [ 84 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 85 { DIDFT_OPTIONAL DIDFT_BUTTON [ 85 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 86 { DIDFT_OPTIONAL DIDFT_BUTTON [ 86 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 87 { DIDFT_OPTIONAL DIDFT_BUTTON [ 87 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 88 { DIDFT_OPTIONAL DIDFT_BUTTON [ 88 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 89 { DIDFT_OPTIONAL DIDFT_BUTTON [ 89 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 90 { DIDFT_OPTIONAL DIDFT_BUTTON [ 90 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 91 { DIDFT_OPTIONAL DIDFT_BUTTON [ 91 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 92 { DIDFT_OPTIONAL DIDFT_BUTTON [ 92 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 93 { DIDFT_OPTIONAL DIDFT_BUTTON [ 93 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 94 { DIDFT_OPTIONAL DIDFT_BUTTON [ 94 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 95 { DIDFT_OPTIONAL DIDFT_BUTTON [ 95 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 96 { DIDFT_OPTIONAL DIDFT_BUTTON [ 96 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 97 { DIDFT_OPTIONAL DIDFT_BUTTON [ 97 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 98 { DIDFT_OPTIONAL DIDFT_BUTTON [ 98 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 99 { DIDFT_OPTIONAL DIDFT_BUTTON [ 99 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 100 { DIDFT_OPTIONAL DIDFT_BUTTON [ 100 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 101 { DIDFT_OPTIONAL DIDFT_BUTTON [ 101 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 102 { DIDFT_OPTIONAL DIDFT_BUTTON [ 102 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 103 { DIDFT_OPTIONAL DIDFT_BUTTON [ 103 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 104 { DIDFT_OPTIONAL DIDFT_BUTTON [ 104 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 105 { DIDFT_OPTIONAL DIDFT_BUTTON [ 105 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 106 { DIDFT_OPTIONAL DIDFT_BUTTON [ 106 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 107 { DIDFT_OPTIONAL DIDFT_BUTTON [ 107 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 108 { DIDFT_OPTIONAL DIDFT_BUTTON [ 108 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 109 { DIDFT_OPTIONAL DIDFT_BUTTON [ 109 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 110 { DIDFT_OPTIONAL DIDFT_BUTTON [ 110 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 111 { DIDFT_OPTIONAL DIDFT_BUTTON [ 111 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 112 { DIDFT_OPTIONAL DIDFT_BUTTON [ 112 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 113 { DIDFT_OPTIONAL DIDFT_BUTTON [ 113 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 114 { DIDFT_OPTIONAL DIDFT_BUTTON [ 114 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 115 { DIDFT_OPTIONAL DIDFT_BUTTON [ 115 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 116 { DIDFT_OPTIONAL DIDFT_BUTTON [ 116 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 117 { DIDFT_OPTIONAL DIDFT_BUTTON [ 117 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 118 { DIDFT_OPTIONAL DIDFT_BUTTON [ 118 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 119 { DIDFT_OPTIONAL DIDFT_BUTTON [ 119 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 120 { DIDFT_OPTIONAL DIDFT_BUTTON [ 120 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 121 { DIDFT_OPTIONAL DIDFT_BUTTON [ 121 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 122 { DIDFT_OPTIONAL DIDFT_BUTTON [ 122 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 123 { DIDFT_OPTIONAL DIDFT_BUTTON [ 123 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 124 { DIDFT_OPTIONAL DIDFT_BUTTON [ 124 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 125 { DIDFT_OPTIONAL DIDFT_BUTTON [ 125 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 126 { DIDFT_OPTIONAL DIDFT_BUTTON [ 126 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 127 { DIDFT_OPTIONAL DIDFT_BUTTON [ 127 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 128 { DIDFT_OPTIONAL DIDFT_BUTTON [ 128 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 129 { DIDFT_OPTIONAL DIDFT_BUTTON [ 129 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 130 { DIDFT_OPTIONAL DIDFT_BUTTON [ 130 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 131 { DIDFT_OPTIONAL DIDFT_BUTTON [ 131 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 132 { DIDFT_OPTIONAL DIDFT_BUTTON [ 132 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 133 { DIDFT_OPTIONAL DIDFT_BUTTON [ 133 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 134 { DIDFT_OPTIONAL DIDFT_BUTTON [ 134 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 135 { DIDFT_OPTIONAL DIDFT_BUTTON [ 135 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 136 { DIDFT_OPTIONAL DIDFT_BUTTON [ 136 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 137 { DIDFT_OPTIONAL DIDFT_BUTTON [ 137 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 138 { DIDFT_OPTIONAL DIDFT_BUTTON [ 138 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 139 { DIDFT_OPTIONAL DIDFT_BUTTON [ 139 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 140 { DIDFT_OPTIONAL DIDFT_BUTTON [ 140 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 141 { DIDFT_OPTIONAL DIDFT_BUTTON [ 141 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 142 { DIDFT_OPTIONAL DIDFT_BUTTON [ 142 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 143 { DIDFT_OPTIONAL DIDFT_BUTTON [ 143 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 144 { DIDFT_OPTIONAL DIDFT_BUTTON [ 144 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 145 { DIDFT_OPTIONAL DIDFT_BUTTON [ 145 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 146 { DIDFT_OPTIONAL DIDFT_BUTTON [ 146 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 147 { DIDFT_OPTIONAL DIDFT_BUTTON [ 147 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 148 { DIDFT_OPTIONAL DIDFT_BUTTON [ 148 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 149 { DIDFT_OPTIONAL DIDFT_BUTTON [ 149 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 150 { DIDFT_OPTIONAL DIDFT_BUTTON [ 150 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 151 { DIDFT_OPTIONAL DIDFT_BUTTON [ 151 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 152 { DIDFT_OPTIONAL DIDFT_BUTTON [ 152 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 153 { DIDFT_OPTIONAL DIDFT_BUTTON [ 153 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 154 { DIDFT_OPTIONAL DIDFT_BUTTON [ 154 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 155 { DIDFT_OPTIONAL DIDFT_BUTTON [ 155 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 156 { DIDFT_OPTIONAL DIDFT_BUTTON [ 156 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 157 { DIDFT_OPTIONAL DIDFT_BUTTON [ 157 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 158 { DIDFT_OPTIONAL DIDFT_BUTTON [ 158 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 159 { DIDFT_OPTIONAL DIDFT_BUTTON [ 159 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 160 { DIDFT_OPTIONAL DIDFT_BUTTON [ 160 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 161 { DIDFT_OPTIONAL DIDFT_BUTTON [ 161 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 162 { DIDFT_OPTIONAL DIDFT_BUTTON [ 162 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 163 { DIDFT_OPTIONAL DIDFT_BUTTON [ 163 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 164 { DIDFT_OPTIONAL DIDFT_BUTTON [ 164 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 165 { DIDFT_OPTIONAL DIDFT_BUTTON [ 165 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 166 { DIDFT_OPTIONAL DIDFT_BUTTON [ 166 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 167 { DIDFT_OPTIONAL DIDFT_BUTTON [ 167 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 168 { DIDFT_OPTIONAL DIDFT_BUTTON [ 168 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 169 { DIDFT_OPTIONAL DIDFT_BUTTON [ 169 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 170 { DIDFT_OPTIONAL DIDFT_BUTTON [ 170 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 171 { DIDFT_OPTIONAL DIDFT_BUTTON [ 171 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 172 { DIDFT_OPTIONAL DIDFT_BUTTON [ 172 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 173 { DIDFT_OPTIONAL DIDFT_BUTTON [ 173 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 174 { DIDFT_OPTIONAL DIDFT_BUTTON [ 174 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 175 { DIDFT_OPTIONAL DIDFT_BUTTON [ 175 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 176 { DIDFT_OPTIONAL DIDFT_BUTTON [ 176 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 177 { DIDFT_OPTIONAL DIDFT_BUTTON [ 177 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 178 { DIDFT_OPTIONAL DIDFT_BUTTON [ 178 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 179 { DIDFT_OPTIONAL DIDFT_BUTTON [ 179 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 180 { DIDFT_OPTIONAL DIDFT_BUTTON [ 180 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 181 { DIDFT_OPTIONAL DIDFT_BUTTON [ 181 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 182 { DIDFT_OPTIONAL DIDFT_BUTTON [ 182 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 183 { DIDFT_OPTIONAL DIDFT_BUTTON [ 183 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 184 { DIDFT_OPTIONAL DIDFT_BUTTON [ 184 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 185 { DIDFT_OPTIONAL DIDFT_BUTTON [ 185 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 186 { DIDFT_OPTIONAL DIDFT_BUTTON [ 186 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 187 { DIDFT_OPTIONAL DIDFT_BUTTON [ 187 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 188 { DIDFT_OPTIONAL DIDFT_BUTTON [ 188 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 189 { DIDFT_OPTIONAL DIDFT_BUTTON [ 189 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 190 { DIDFT_OPTIONAL DIDFT_BUTTON [ 190 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 191 { DIDFT_OPTIONAL DIDFT_BUTTON [ 191 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 192 { DIDFT_OPTIONAL DIDFT_BUTTON [ 192 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 193 { DIDFT_OPTIONAL DIDFT_BUTTON [ 193 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 194 { DIDFT_OPTIONAL DIDFT_BUTTON [ 194 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 195 { DIDFT_OPTIONAL DIDFT_BUTTON [ 195 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 196 { DIDFT_OPTIONAL DIDFT_BUTTON [ 196 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 197 { DIDFT_OPTIONAL DIDFT_BUTTON [ 197 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 198 { DIDFT_OPTIONAL DIDFT_BUTTON [ 198 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 199 { DIDFT_OPTIONAL DIDFT_BUTTON [ 199 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 200 { DIDFT_OPTIONAL DIDFT_BUTTON [ 200 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 201 { DIDFT_OPTIONAL DIDFT_BUTTON [ 201 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 202 { DIDFT_OPTIONAL DIDFT_BUTTON [ 202 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 203 { DIDFT_OPTIONAL DIDFT_BUTTON [ 203 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 204 { DIDFT_OPTIONAL DIDFT_BUTTON [ 204 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 205 { DIDFT_OPTIONAL DIDFT_BUTTON [ 205 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 206 { DIDFT_OPTIONAL DIDFT_BUTTON [ 206 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 207 { DIDFT_OPTIONAL DIDFT_BUTTON [ 207 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 208 { DIDFT_OPTIONAL DIDFT_BUTTON [ 208 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 209 { DIDFT_OPTIONAL DIDFT_BUTTON [ 209 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 210 { DIDFT_OPTIONAL DIDFT_BUTTON [ 210 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 211 { DIDFT_OPTIONAL DIDFT_BUTTON [ 211 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 212 { DIDFT_OPTIONAL DIDFT_BUTTON [ 212 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 213 { DIDFT_OPTIONAL DIDFT_BUTTON [ 213 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 214 { DIDFT_OPTIONAL DIDFT_BUTTON [ 214 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 215 { DIDFT_OPTIONAL DIDFT_BUTTON [ 215 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 216 { DIDFT_OPTIONAL DIDFT_BUTTON [ 216 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 217 { DIDFT_OPTIONAL DIDFT_BUTTON [ 217 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 218 { DIDFT_OPTIONAL DIDFT_BUTTON [ 218 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 219 { DIDFT_OPTIONAL DIDFT_BUTTON [ 219 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 220 { DIDFT_OPTIONAL DIDFT_BUTTON [ 220 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 221 { DIDFT_OPTIONAL DIDFT_BUTTON [ 221 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 222 { DIDFT_OPTIONAL DIDFT_BUTTON [ 222 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 223 { DIDFT_OPTIONAL DIDFT_BUTTON [ 223 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 224 { DIDFT_OPTIONAL DIDFT_BUTTON [ 224 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 225 { DIDFT_OPTIONAL DIDFT_BUTTON [ 225 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 226 { DIDFT_OPTIONAL DIDFT_BUTTON [ 226 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 227 { DIDFT_OPTIONAL DIDFT_BUTTON [ 227 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 228 { DIDFT_OPTIONAL DIDFT_BUTTON [ 228 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 229 { DIDFT_OPTIONAL DIDFT_BUTTON [ 229 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 230 { DIDFT_OPTIONAL DIDFT_BUTTON [ 230 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 231 { DIDFT_OPTIONAL DIDFT_BUTTON [ 231 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 232 { DIDFT_OPTIONAL DIDFT_BUTTON [ 232 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 233 { DIDFT_OPTIONAL DIDFT_BUTTON [ 233 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 234 { DIDFT_OPTIONAL DIDFT_BUTTON [ 234 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 235 { DIDFT_OPTIONAL DIDFT_BUTTON [ 235 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 236 { DIDFT_OPTIONAL DIDFT_BUTTON [ 236 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 237 { DIDFT_OPTIONAL DIDFT_BUTTON [ 237 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 238 { DIDFT_OPTIONAL DIDFT_BUTTON [ 238 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 239 { DIDFT_OPTIONAL DIDFT_BUTTON [ 239 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 240 { DIDFT_OPTIONAL DIDFT_BUTTON [ 240 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 241 { DIDFT_OPTIONAL DIDFT_BUTTON [ 241 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 242 { DIDFT_OPTIONAL DIDFT_BUTTON [ 242 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 243 { DIDFT_OPTIONAL DIDFT_BUTTON [ 243 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 244 { DIDFT_OPTIONAL DIDFT_BUTTON [ 244 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 245 { DIDFT_OPTIONAL DIDFT_BUTTON [ 245 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 246 { DIDFT_OPTIONAL DIDFT_BUTTON [ 246 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 247 { DIDFT_OPTIONAL DIDFT_BUTTON [ 247 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 248 { DIDFT_OPTIONAL DIDFT_BUTTON [ 248 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 249 { DIDFT_OPTIONAL DIDFT_BUTTON [ 249 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 250 { DIDFT_OPTIONAL DIDFT_BUTTON [ 250 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 251 { DIDFT_OPTIONAL DIDFT_BUTTON [ 251 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 252 { DIDFT_OPTIONAL DIDFT_BUTTON [ 252 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 253 { DIDFT_OPTIONAL DIDFT_BUTTON [ 253 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 254 { DIDFT_OPTIONAL DIDFT_BUTTON [ 254 DIDFT_MAKEINSTANCE ] } 0 } + { GUID_Key_malloced f 255 { DIDFT_OPTIONAL DIDFT_BUTTON [ 255 DIDFT_MAKEINSTANCE ] } 0 } + } + ] unless* ] change-at ; + +: define-format-constants ( -- ) + define-joystick-format-constant + define-mouse-format-constant + define-keyboard-format-constant + define-hid-keyboard-format-constant ; + +: define-constants + define-guid-constants + define-format-constants ; + +[ define-constants ] "windows.dinput.constants" add-init-hook +define-constants + +: free-dinput-constants ( -- ) + { + GUID_XAxis_malloced GUID_YAxis_malloced GUID_ZAxis_malloced + GUID_RxAxis_malloced GUID_RyAxis_malloced GUID_RzAxis_malloced + GUID_Slider_malloced GUID_Button_malloced GUID_Key_malloced GUID_POV_malloced GUID_Unknown_malloced + GUID_SysMouse_malloced GUID_SysKeyboard_malloced GUID_Joystick_malloced GUID_SysMouseEm_malloced + GUID_SysMouseEm2_malloced GUID_SysKeyboardEm_malloced GUID_SysKeyboardEm2_malloced + } [ global [ [ free ] when* f ] change-at ] each + { + c_dfDIKeyboard c_dfDIKeyboard_HID c_dfDIMouse2 c_dfDIJoystick2 + } [ global [ [ DIDATAFORMAT-rgodf free ] when* f ] change-at ] each ; + +PRIVATE> + diff --git a/basis/windows/dinput/constants/tags.txt b/basis/windows/dinput/constants/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/windows/dinput/constants/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/windows/dinput/dinput.factor b/basis/windows/dinput/dinput.factor similarity index 53% rename from extra/windows/dinput/dinput.factor rename to basis/windows/dinput/dinput.factor index a41f2ed80d..0c75f43770 100755 --- a/extra/windows/dinput/dinput.factor +++ b/basis/windows/dinput/dinput.factor @@ -31,10 +31,12 @@ TYPEDEF: void* LPDIENUMCREATEDEFFECTOBJECTSCALLBACK [ "BOOL" { "LPDIRECTINPUTEFFECT" "LPVOID" } "stdcall" ] dip alien-callback ; inline TYPEDEF: void* LPDIENUMEFFECTSINFILECALLBACK +: LPDIENUMEFFECTSINFILECALLBACK [ "BOOL" { "LPCDIFILEEFFECT" "LPVOID" } "stdcall" ] dip alien-callback ; inline TYPEDEF: void* LPDIENUMDEVICEOBJECTSCALLBACKW - [ "BOOL" { "LPCDIDEVICEOBJECTINSTANCE" "LPVOID" } "stdcall" ] +: LPDIENUMDEVICEOBJECTSCALLBACKW + [ "BOOL" { "LPCDIDEVICEOBJECTINSTANCEW" "LPVOID" } "stdcall" ] dip alien-callback ; inline TYPEDEF: DWORD D3DCOLOR @@ -105,29 +107,35 @@ TYPEDEF: DICONFIGUREDEVICESPARAMSW* LPDICONFIGUREDEVICESPARAMSW TYPEDEF: DICONFIGUREDEVICESPARAMSW* LPDICONFIGUREDEVICESPARAMSW C-STRUCT: DIDEVCAPS - { "DWORD" "wSize" } - { "DWORD" "wFlags" } - { "DWORD" "wDevType" } - { "DWORD" "wAxes" } - { "DWORD" "wButtons" } - { "DWORD" "wPOVs" } - { "DWORD" "wFFSamplePeriod" } - { "DWORD" "wFFMinTimeResolution" } - { "DWORD" "wFirmwareRevision" } - { "DWORD" "wHardwareRevision" } - { "DWORD" "wFFDriverVersion" } ; + { "DWORD" "dwSize" } + { "DWORD" "dwFlags" } + { "DWORD" "dwDevType" } + { "DWORD" "dwAxes" } + { "DWORD" "dwButtons" } + { "DWORD" "dwPOVs" } + { "DWORD" "dwFFSamplePeriod" } + { "DWORD" "dwFFMinTimeResolution" } + { "DWORD" "dwFirmwareRevision" } + { "DWORD" "dwHardwareRevision" } + { "DWORD" "dwFFDriverVersion" } ; TYPEDEF: DIDEVCAPS* LPDIDEVCAPS TYPEDEF: DIDEVCAPS* LPCDIDEVCAPS C-STRUCT: DIDEVICEOBJECTINSTANCEW - { "DWORD" "dwSize" } - { "GUID" "guidInstance" } - { "GUID" "guidProduct" } - { "DWORD" "dwDevType" } - { "WCHAR[260]" "tszInstanceName" } - { "WCHAR[260]" "tszProductName" } - { "GUID" "guidFFDriver" } - { "WORD" "wUsagePage" } - { "WORD" "wUsage" } ; + { "DWORD" "dwSize" } + { "GUID" "guidType" } + { "DWORD" "dwOfs" } + { "DWORD" "dwType" } + { "DWORD" "dwFlags" } + { "WCHAR[260]" "tszName" } + { "DWORD" "dwFFMaxForce" } + { "DWORD" "dwFFForceResolution" } + { "WORD" "wCollectionNumber" } + { "WORD" "wDesignatorIndex" } + { "WORD" "wUsagePage" } + { "WORD" "wUsage" } + { "DWORD" "dwDimension" } + { "WORD" "wExponent" } + { "WORD" "wReportId" } ; TYPEDEF: DIDEVICEOBJECTINSTANCEW* LPDIDEVICEOBJECTINSTANCEW TYPEDEF: DIDEVICEOBJECTINSTANCEW* LPCDIDEVICEOBJECTINSTANCEW C-STRUCT: DIDEVICEOBJECTDATA @@ -161,6 +169,49 @@ C-STRUCT: DIPROPHEADER { "DWORD" "dwHow" } ; TYPEDEF: DIPROPHEADER* LPDIPROPHEADER TYPEDEF: DIPROPHEADER* LPCDIPROPHEADER +C-STRUCT: DIPROPDWORD + { "DIPROPHEADER" "diph" } + { "DWORD" "dwData" } ; +TYPEDEF: DIPROPDWORD* LPDIPROPDWORD +TYPEDEF: DIPROPDWORD* LPCDIPROPDWORD +C-STRUCT: DIPROPPOINTER + { "DIPROPHEADER" "diph" } + { "UINT_PTR" "uData" } ; +TYPEDEF: DIPROPPOINTER* LPDIPROPPOINTER +TYPEDEF: DIPROPPOINTER* LPCDIPROPPOINTER +C-STRUCT: DIPROPRANGE + { "DIPROPHEADER" "diph" } + { "LONG" "lMin" } + { "LONG" "lMax" } ; +TYPEDEF: DIPROPRANGE* LPDIPROPRANGE +TYPEDEF: DIPROPRANGE* LPCDIPROPRANGE +C-STRUCT: DIPROPCAL + { "DIPROPHEADER" "diph" } + { "LONG" "lMin" } + { "LONG" "lCenter" } + { "LONG" "lMax" } ; +TYPEDEF: DIPROPCAL* LPDIPROPCAL +TYPEDEF: DIPROPCAL* LPCDIPROPCAL +C-STRUCT: DIPROPGUIDANDPATH + { "DIPROPHEADER" "diph" } + { "GUID" "guidClass" } + { "WCHAR[260]" "wszPath" } ; +TYPEDEF: DIPROPGUIDANDPATH* LPDIPROPGUIDANDPATH +TYPEDEF: DIPROPGUIDANDPATH* LPCDIPROPGUIDANDPATH +C-STRUCT: DIPROPSTRING + { "DIPROPHEADER" "diph" } + { "WCHAR[260]" "wsz" } ; +TYPEDEF: DIPROPSTRING* LPDIPROPSTRING +TYPEDEF: DIPROPSTRING* LPCDIPROPSTRING +C-STRUCT: CPOINT + { "LONG" "lP" } + { "DWORD" "dwLog" } ; +C-STRUCT: DIPROPCPOINTS + { "DIPROPHEADER" "diph" } + { "DWORD" "dwCPointsNum" } + { "CPOINT[8]" "cp" } ; +TYPEDEF: DIPROPCPOINTS* LPDIPROPCPOINTS +TYPEDEF: DIPROPCPOINTS* LPCDIPROPCPOINTS C-STRUCT: DIENVELOPE { "DWORD" "dwSize" } { "DWORD" "dwAttackLevel" } @@ -383,19 +434,264 @@ FUNCTION: HRESULT DirectInput8Create ( HINSTANCE hinst, DWORD dwVersion, REFIID : 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 -SYMBOL: +dinput+ +: 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 -: create-dinput ( -- ) - f GetModuleHandle DIRECTINPUT_VERSION IDirectInput8W-iid - f [ f DirectInput8Create ole32-error ] keep *void* - +dinput+ set ; +: 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 -: delete-dinput ( -- ) - +dinput+ [ com-release f ] change ; +: 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 + +: 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 + +: DIMAKEUSAGEDWORD ( UsagePage Usage -- DWORD ) 16 shift bitor ; inline + +: DIPROP_BUFFERSIZE 1 ; inline +: DIPROP_AXISMODE 2 ; inline + +: DIPROPAXISMODE_ABS 0 ; inline +: DIPROPAXISMODE_REL 1 ; inline + +: DIPROP_GRANULARITY 3 ; inline +: DIPROP_RANGE 4 ; inline +: DIPROP_DEADZONE 5 ; inline +: DIPROP_SATURATION 6 ; inline +: DIPROP_FFGAIN 7 ; inline +: DIPROP_FFLOAD 8 ; inline +: DIPROP_AUTOCENTER 9 ; inline + +: DIPROPAUTOCENTER_OFF 0 ; inline +: DIPROPAUTOCENTER_ON 1 ; inline + +: DIPROP_CALIBRATIONMODE 10 ; inline + +: DIPROPCALIBRATIONMODE_COOKED 0 ; inline +: DIPROPCALIBRATIONMODE_RAW 1 ; inline + +: DIPROP_CALIBRATION 11 ; inline +: DIPROP_GUIDANDPATH 12 ; inline +: DIPROP_INSTANCENAME 13 ; inline +: DIPROP_PRODUCTNAME 14 ; inline +: DIPROP_JOYSTICKID 15 ; inline +: DIPROP_GETPORTDISPLAYNAME 16 ; inline +: DIPROP_PHYSICALRANGE 18 ; inline +: DIPROP_LOGICALRANGE 19 ; inline +: DIPROP_KEYNAME 20 ; inline +: DIPROP_CPOINTS 21 ; inline +: DIPROP_APPDATA 22 ; inline +: DIPROP_SCANCODE 23 ; inline +: DIPROP_VIDPID 24 ; inline +: DIPROP_USERNAME 25 ; inline +: DIPROP_TYPENAME 26 ; 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 diff --git a/extra/windows/dinput/summary.txt b/basis/windows/dinput/summary.txt similarity index 100% rename from extra/windows/dinput/summary.txt rename to basis/windows/dinput/summary.txt diff --git a/extra/windows/dinput/tags.txt b/basis/windows/dinput/tags.txt similarity index 60% rename from extra/windows/dinput/tags.txt rename to basis/windows/dinput/tags.txt index 5aebfa6848..1431506222 100755 --- a/extra/windows/dinput/tags.txt +++ b/basis/windows/dinput/tags.txt @@ -1,2 +1,3 @@ +unportable windows bindings diff --git a/extra/windows/dragdrop-listener/dragdrop-listener.factor b/basis/windows/dragdrop-listener/dragdrop-listener.factor similarity index 100% rename from extra/windows/dragdrop-listener/dragdrop-listener.factor rename to basis/windows/dragdrop-listener/dragdrop-listener.factor diff --git a/basis/windows/dragdrop-listener/tags.txt b/basis/windows/dragdrop-listener/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/windows/dragdrop-listener/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/units/si/authors.txt b/basis/windows/errors/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/units/si/authors.txt rename to basis/windows/errors/authors.txt diff --git a/extra/windows/errors/errors.factor b/basis/windows/errors/errors.factor similarity index 100% rename from extra/windows/errors/errors.factor rename to basis/windows/errors/errors.factor diff --git a/basis/windows/errors/tags.txt b/basis/windows/errors/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/windows/errors/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/windows/advapi32/authors.txt b/basis/windows/gdi32/authors.txt similarity index 100% rename from extra/windows/advapi32/authors.txt rename to basis/windows/gdi32/authors.txt diff --git a/extra/windows/gdi32/gdi32.factor b/basis/windows/gdi32/gdi32.factor similarity index 100% rename from extra/windows/gdi32/gdi32.factor rename to basis/windows/gdi32/gdi32.factor diff --git a/basis/windows/gdi32/tags.txt b/basis/windows/gdi32/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/windows/gdi32/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/windows/ce/authors.txt b/basis/windows/kernel32/authors.txt similarity index 100% rename from extra/windows/ce/authors.txt rename to basis/windows/kernel32/authors.txt diff --git a/extra/windows/kernel32/kernel32.factor b/basis/windows/kernel32/kernel32.factor similarity index 100% rename from extra/windows/kernel32/kernel32.factor rename to basis/windows/kernel32/kernel32.factor diff --git a/basis/windows/kernel32/tags.txt b/basis/windows/kernel32/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/windows/kernel32/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/windows/errors/authors.txt b/basis/windows/messages/authors.txt similarity index 100% rename from extra/windows/errors/authors.txt rename to basis/windows/messages/authors.txt diff --git a/extra/windows/messages/messages.factor b/basis/windows/messages/messages.factor similarity index 100% rename from extra/windows/messages/messages.factor rename to basis/windows/messages/messages.factor diff --git a/basis/windows/messages/tags.txt b/basis/windows/messages/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/windows/messages/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/windows/gdi32/authors.txt b/basis/windows/nt/authors.txt similarity index 100% rename from extra/windows/gdi32/authors.txt rename to basis/windows/nt/authors.txt diff --git a/extra/windows/nt/nt.factor b/basis/windows/nt/nt.factor similarity index 100% rename from extra/windows/nt/nt.factor rename to basis/windows/nt/nt.factor diff --git a/basis/windows/nt/tags.txt b/basis/windows/nt/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/windows/nt/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/windows/ole32/authors.txt b/basis/windows/ole32/authors.txt similarity index 100% rename from extra/windows/ole32/authors.txt rename to basis/windows/ole32/authors.txt diff --git a/basis/windows/ole32/ole32-tests.factor b/basis/windows/ole32/ole32-tests.factor new file mode 100644 index 0000000000..ecd25738b1 --- /dev/null +++ b/basis/windows/ole32/ole32-tests.factor @@ -0,0 +1,36 @@ +USING: kernel tools.test windows.ole32 alien.c-types ; +IN: windows.ole32.tests + +[ t ] [ + "{01234567-89ab-cdef-0123-456789abcdef}" string>guid + "{01234567-89ab-cdef-0123-456789abcdef}" string>guid + guid= +] unit-test + +[ f ] [ + "{76543210-89ab-cdef-0123-456789abcdef}" string>guid + "{01234567-89ab-cdef-0123-456789abcdef}" string>guid + guid= +] unit-test + +[ f ] [ + "{01234567-89ab-cdef-0123-fedcba987654}" string>guid + "{01234567-89ab-cdef-0123-456789abcdef}" string>guid + guid= +] unit-test + +little-endian? +[ B{ + HEX: 67 HEX: 45 HEX: 23 HEX: 01 HEX: ab HEX: 89 HEX: ef HEX: cd + HEX: 01 HEX: 23 HEX: 45 HEX: 67 HEX: 89 HEX: ab HEX: cd HEX: ef +} ] +[ B{ + HEX: 01 HEX: 23 HEX: 45 HEX: 67 HEX: 89 HEX: ab HEX: cd HEX: ef + HEX: 01 HEX: 23 HEX: 45 HEX: 67 HEX: 89 HEX: ab HEX: cd HEX: ef +} ] ? +[ "{01234567-89ab-cdef-0123-456789abcdef}" string>guid ] +unit-test + +[ "{01234567-89ab-cdef-0123-456789abcdef}" ] +[ "{01234567-89ab-cdef-0123-456789abcdef}" string>guid guid>string ] +unit-test diff --git a/extra/windows/ole32/ole32.factor b/basis/windows/ole32/ole32.factor similarity index 67% rename from extra/windows/ole32/ole32.factor rename to basis/windows/ole32/ole32.factor index 0e74dcfca3..21b07f9a7d 100755 --- a/extra/windows/ole32/ole32.factor +++ b/basis/windows/ole32/ole32.factor @@ -1,6 +1,6 @@ USING: alien alien.syntax alien.c-types alien.strings math -kernel sequences windows windows.types -math.order ; +kernel sequences windows windows.types debugger io accessors +math.order namespaces math.parser windows.kernel32 combinators ; IN: windows.ole32 LIBRARY: ole32 @@ -115,23 +115,67 @@ FUNCTION: void ReleaseStgMedium ( LPSTGMEDIUM pmedium ) ; : succeeded? ( hresult -- ? ) 0 HEX: 7FFFFFFF between? ; +TUPLE: ole32-error error-code ; +C: ole32-error + +M: ole32-error error. + "COM method failed: " print error-code>> (win32-error-string) print ; + : ole32-error ( hresult -- ) - dup succeeded? [ - drop - ] [ (win32-error-string) throw ] if ; + dup succeeded? [ drop ] [ throw ] if ; : ole-initialize ( -- ) f OleInitialize ole32-error ; : guid= ( a b -- ? ) - IsEqualGUID c-bool> ; + [ 16 memory>byte-array ] bi@ = ; : GUID-STRING-LENGTH "{01234567-89ab-cdef-0123-456789abcdef}" length ; inline -: string>guid ( string -- guid ) - utf16n string>alien "GUID" [ CLSIDFromString ole32-error ] keep ; -: guid>string ( guid -- string ) - GUID-STRING-LENGTH 1+ [ "ushort" ] keep - [ StringFromGUID2 drop ] 2keep drop utf16n alien>string ; +: (guid-section>guid) ( guid string start end quot -- ) + [ roll subseq hex> swap ] dip call ; inline +: (guid-byte>guid) ( guid string start end byte -- ) + [ roll subseq hex> ] dip + rot GUID-Data4 set-uchar-nth ; inline + +: string>guid ( string -- guid ) + "GUID" [ { + [ 1 9 [ set-GUID-Data1 ] (guid-section>guid) ] + + [ 10 14 [ set-GUID-Data2 ] (guid-section>guid) ] + + [ 15 19 [ set-GUID-Data3 ] (guid-section>guid) ] + + [ 20 22 0 (guid-byte>guid) ] + [ 22 24 1 (guid-byte>guid) ] + + [ 25 27 2 (guid-byte>guid) ] + [ 27 29 3 (guid-byte>guid) ] + [ 29 31 4 (guid-byte>guid) ] + [ 31 33 5 (guid-byte>guid) ] + [ 33 35 6 (guid-byte>guid) ] + [ 35 37 7 (guid-byte>guid) ] + } 2cleave ] keep ; + +: (guid-section%) ( guid quot len -- ) + [ call >hex ] dip CHAR: 0 pad-left % ; inline +: (guid-byte%) ( guid byte -- ) + swap GUID-Data4 uchar-nth >hex 2 + CHAR: 0 pad-left % ; inline + +: guid>string ( guid -- string ) + [ "{" % { + [ [ GUID-Data1 ] 8 (guid-section%) "-" % ] + [ [ GUID-Data2 ] 4 (guid-section%) "-" % ] + [ [ GUID-Data3 ] 4 (guid-section%) "-" % ] + [ 0 (guid-byte%) ] + [ 1 (guid-byte%) "-" % ] + [ 2 (guid-byte%) ] + [ 3 (guid-byte%) ] + [ 4 (guid-byte%) ] + [ 5 (guid-byte%) ] + [ 6 (guid-byte%) ] + [ 7 (guid-byte%) "}" % ] + } cleave ] "" make ; diff --git a/basis/windows/ole32/tags.txt b/basis/windows/ole32/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/windows/ole32/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/windows/kernel32/authors.txt b/basis/windows/opengl32/authors.txt similarity index 100% rename from extra/windows/kernel32/authors.txt rename to basis/windows/opengl32/authors.txt diff --git a/extra/windows/opengl32/opengl32.factor b/basis/windows/opengl32/opengl32.factor similarity index 100% rename from extra/windows/opengl32/opengl32.factor rename to basis/windows/opengl32/opengl32.factor diff --git a/basis/windows/opengl32/tags.txt b/basis/windows/opengl32/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/windows/opengl32/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/windows/messages/authors.txt b/basis/windows/shell32/authors.txt similarity index 100% rename from extra/windows/messages/authors.txt rename to basis/windows/shell32/authors.txt diff --git a/extra/windows/shell32/shell32.factor b/basis/windows/shell32/shell32.factor similarity index 100% rename from extra/windows/shell32/shell32.factor rename to basis/windows/shell32/shell32.factor diff --git a/basis/windows/shell32/tags.txt b/basis/windows/shell32/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/windows/shell32/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/windows/summary.txt b/basis/windows/summary.txt similarity index 100% rename from extra/windows/summary.txt rename to basis/windows/summary.txt diff --git a/basis/windows/tags.txt b/basis/windows/tags.txt new file mode 100644 index 0000000000..1431506222 --- /dev/null +++ b/basis/windows/tags.txt @@ -0,0 +1,3 @@ +unportable +windows +bindings diff --git a/extra/windows/nt/authors.txt b/basis/windows/time/authors.txt similarity index 100% rename from extra/windows/nt/authors.txt rename to basis/windows/time/authors.txt diff --git a/basis/windows/time/tags.txt b/basis/windows/time/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/windows/time/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/windows/time/time-tests.factor b/basis/windows/time/time-tests.factor similarity index 100% rename from extra/windows/time/time-tests.factor rename to basis/windows/time/time-tests.factor diff --git a/extra/windows/time/time.factor b/basis/windows/time/time.factor similarity index 100% rename from extra/windows/time/time.factor rename to basis/windows/time/time.factor diff --git a/extra/windows/opengl32/authors.txt b/basis/windows/types/authors.txt similarity index 100% rename from extra/windows/opengl32/authors.txt rename to basis/windows/types/authors.txt diff --git a/basis/windows/types/tags.txt b/basis/windows/types/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/windows/types/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/windows/types/types.factor b/basis/windows/types/types.factor similarity index 100% rename from extra/windows/types/types.factor rename to basis/windows/types/types.factor diff --git a/extra/windows/shell32/authors.txt b/basis/windows/user32/authors.txt similarity index 100% rename from extra/windows/shell32/authors.txt rename to basis/windows/user32/authors.txt diff --git a/basis/windows/user32/tags.txt b/basis/windows/user32/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/windows/user32/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/windows/user32/user32.factor b/basis/windows/user32/user32.factor similarity index 97% rename from extra/windows/user32/user32.factor rename to basis/windows/user32/user32.factor index 241eddf9f0..481f00f36b 100755 --- a/extra/windows/user32/user32.factor +++ b/basis/windows/user32/user32.factor @@ -528,6 +528,27 @@ C-STRUCT: TRACKMOUSEEVENT { "DWORD" "dwHoverTime" } ; TYPEDEF: TRACKMOUSEEVENT* LPTRACKMOUSEEVENT +: DBT_DEVICEARRIVAL HEX: 8000 ; inline +: DBT_DEVICEREMOVECOMPLETE HEX: 8004 ; inline + +: DBT_DEVTYP_DEVICEINTERFACE 5 ; inline + +: DEVICE_NOTIFY_WINDOW_HANDLE 0 ; inline +: DEVICE_NOTIFY_SERVICE_HANDLE 1 ; inline + +: DEVICE_NOTIFY_ALL_INTERFACE_CLASSES 4 ; inline + +C-STRUCT: DEV_BROADCAST_HDR + { "DWORD" "dbch_size" } + { "DWORD" "dbch_devicetype" } + { "DWORD" "dbch_reserved" } ; +C-STRUCT: DEV_BROADCAST_DEVICEW + { "DWORD" "dbcc_size" } + { "DWORD" "dbcc_devicetype" } + { "DWORD" "dbcc_reserved" } + { "GUID" "dbcc_classguid" } + { "WCHAR[1]" "dbcc_name" } ; + LIBRARY: user32 FUNCTION: HKL ActivateKeyboardLayout ( HKL hkl, UINT Flags ) ; @@ -1176,8 +1197,9 @@ ALIAS: RegisterClassEx RegisterClassExW ! FUNCTION: RegisterClipboardFormatA ! FUNCTION: RegisterClipboardFormatW -! FUNCTION: RegisterDeviceNotificationA -! FUNCTION: RegisterDeviceNotificationW +FUNCTION: HANDLE RegisterDeviceNotificationA ( HANDLE hRecipient, LPVOID NotificationFilter, DWORD Flags ) ; +FUNCTION: HANDLE RegisterDeviceNotificationW ( HANDLE hRecipient, LPVOID NotificationFilter, DWORD Flags ) ; +ALIAS: RegisterDeviceNotification RegisterDeviceNotificationW ! FUNCTION: RegisterHotKey ! FUNCTION: RegisterLogonProcess ! FUNCTION: RegisterMessagePumpHook @@ -1344,7 +1366,7 @@ FUNCTION: BOOL TranslateMessage ( MSG* lpMsg ) ; ! FUNCTION: UnpackDDElParam FUNCTION: BOOL UnregisterClassW ( LPCWSTR lpClassName, HINSTANCE hInstance ) ; ALIAS: UnregisterClass UnregisterClassW -! FUNCTION: UnregisterDeviceNotification +FUNCTION: BOOL UnregisterDeviceNotification ( HANDLE hDevNotify ) ; ! FUNCTION: UnregisterHotKey ! FUNCTION: UnregisterMessagePumpHook ! FUNCTION: UnregisterUserApiHook diff --git a/extra/windows/windows.factor b/basis/windows/windows.factor similarity index 100% rename from extra/windows/windows.factor rename to basis/windows/windows.factor diff --git a/extra/windows/time/authors.txt b/basis/windows/winsock/authors.txt similarity index 100% rename from extra/windows/time/authors.txt rename to basis/windows/winsock/authors.txt diff --git a/basis/windows/winsock/tags.txt b/basis/windows/winsock/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/windows/winsock/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/windows/winsock/winsock.factor b/basis/windows/winsock/winsock.factor similarity index 100% rename from extra/windows/winsock/winsock.factor rename to basis/windows/winsock/winsock.factor diff --git a/extra/wrap/authors.txt b/basis/wrap/authors.txt similarity index 100% rename from extra/wrap/authors.txt rename to basis/wrap/authors.txt diff --git a/extra/wrap/summary.txt b/basis/wrap/summary.txt similarity index 100% rename from extra/wrap/summary.txt rename to basis/wrap/summary.txt diff --git a/extra/wrap/tags.txt b/basis/wrap/tags.txt similarity index 100% rename from extra/wrap/tags.txt rename to basis/wrap/tags.txt diff --git a/extra/wrap/wrap.factor b/basis/wrap/wrap.factor similarity index 100% rename from extra/wrap/wrap.factor rename to basis/wrap/wrap.factor diff --git a/extra/x11/clipboard/authors.txt b/basis/x11/clipboard/authors.txt similarity index 100% rename from extra/x11/clipboard/authors.txt rename to basis/x11/clipboard/authors.txt diff --git a/extra/x11/clipboard/clipboard.factor b/basis/x11/clipboard/clipboard.factor similarity index 100% rename from extra/x11/clipboard/clipboard.factor rename to basis/x11/clipboard/clipboard.factor diff --git a/extra/x11/clipboard/summary.txt b/basis/x11/clipboard/summary.txt similarity index 100% rename from extra/x11/clipboard/summary.txt rename to basis/x11/clipboard/summary.txt diff --git a/extra/x11/constants/authors.txt b/basis/x11/constants/authors.txt similarity index 100% rename from extra/x11/constants/authors.txt rename to basis/x11/constants/authors.txt diff --git a/extra/x11/constants/constants.factor b/basis/x11/constants/constants.factor similarity index 100% rename from extra/x11/constants/constants.factor rename to basis/x11/constants/constants.factor diff --git a/extra/x11/constants/summary.txt b/basis/x11/constants/summary.txt similarity index 100% rename from extra/x11/constants/summary.txt rename to basis/x11/constants/summary.txt diff --git a/extra/x11/events/authors.txt b/basis/x11/events/authors.txt similarity index 100% rename from extra/x11/events/authors.txt rename to basis/x11/events/authors.txt diff --git a/extra/x11/events/events.factor b/basis/x11/events/events.factor similarity index 100% rename from extra/x11/events/events.factor rename to basis/x11/events/events.factor diff --git a/extra/x11/events/summary.txt b/basis/x11/events/summary.txt similarity index 100% rename from extra/x11/events/summary.txt rename to basis/x11/events/summary.txt diff --git a/extra/x11/glx/authors.txt b/basis/x11/glx/authors.txt similarity index 100% rename from extra/x11/glx/authors.txt rename to basis/x11/glx/authors.txt diff --git a/extra/x11/glx/glx.factor b/basis/x11/glx/glx.factor similarity index 100% rename from extra/x11/glx/glx.factor rename to basis/x11/glx/glx.factor diff --git a/extra/x11/glx/summary.txt b/basis/x11/glx/summary.txt similarity index 100% rename from extra/x11/glx/summary.txt rename to basis/x11/glx/summary.txt diff --git a/extra/freetype/tags.txt b/basis/x11/glx/tags.txt similarity index 100% rename from extra/freetype/tags.txt rename to basis/x11/glx/tags.txt diff --git a/extra/x11/summary.txt b/basis/x11/summary.txt similarity index 100% rename from extra/x11/summary.txt rename to basis/x11/summary.txt diff --git a/extra/math/libm/tags.txt b/basis/x11/tags.txt similarity index 100% rename from extra/math/libm/tags.txt rename to basis/x11/tags.txt diff --git a/extra/x11/windows/authors.txt b/basis/x11/windows/authors.txt similarity index 100% rename from extra/x11/windows/authors.txt rename to basis/x11/windows/authors.txt diff --git a/extra/x11/windows/summary.txt b/basis/x11/windows/summary.txt similarity index 100% rename from extra/x11/windows/summary.txt rename to basis/x11/windows/summary.txt diff --git a/basis/x11/windows/tags.txt b/basis/x11/windows/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/x11/windows/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/extra/x11/windows/windows.factor b/basis/x11/windows/windows.factor similarity index 100% rename from extra/x11/windows/windows.factor rename to basis/x11/windows/windows.factor diff --git a/extra/unix/bsd/authors.txt b/basis/x11/xim/authors.txt similarity index 100% rename from extra/unix/bsd/authors.txt rename to basis/x11/xim/authors.txt diff --git a/extra/x11/xim/summary.txt b/basis/x11/xim/summary.txt similarity index 100% rename from extra/x11/xim/summary.txt rename to basis/x11/xim/summary.txt diff --git a/extra/unix/tags.txt b/basis/x11/xim/tags.txt similarity index 100% rename from extra/unix/tags.txt rename to basis/x11/xim/tags.txt diff --git a/extra/x11/xim/xim.factor b/basis/x11/xim/xim.factor similarity index 100% rename from extra/x11/xim/xim.factor rename to basis/x11/xim/xim.factor diff --git a/extra/x11/xlib/authors.txt b/basis/x11/xlib/authors.txt similarity index 100% rename from extra/x11/xlib/authors.txt rename to basis/x11/xlib/authors.txt diff --git a/extra/x11/xlib/summary.txt b/basis/x11/xlib/summary.txt similarity index 100% rename from extra/x11/xlib/summary.txt rename to basis/x11/xlib/summary.txt diff --git a/extra/x11/glx/tags.txt b/basis/x11/xlib/tags.txt similarity index 100% rename from extra/x11/glx/tags.txt rename to basis/x11/xlib/tags.txt diff --git a/extra/x11/xlib/xlib.factor b/basis/x11/xlib/xlib.factor similarity index 100% rename from extra/x11/xlib/xlib.factor rename to basis/x11/xlib/xlib.factor diff --git a/extra/xml-rpc/authors.txt b/basis/xml-rpc/authors.txt similarity index 100% rename from extra/xml-rpc/authors.txt rename to basis/xml-rpc/authors.txt diff --git a/extra/xml-rpc/example.factor b/basis/xml-rpc/example.factor similarity index 100% rename from extra/xml-rpc/example.factor rename to basis/xml-rpc/example.factor diff --git a/extra/xml-rpc/summary.txt b/basis/xml-rpc/summary.txt similarity index 100% rename from extra/xml-rpc/summary.txt rename to basis/xml-rpc/summary.txt diff --git a/extra/xml-rpc/tags.txt b/basis/xml-rpc/tags.txt similarity index 100% rename from extra/xml-rpc/tags.txt rename to basis/xml-rpc/tags.txt diff --git a/extra/xml-rpc/xml-rpc-docs.factor b/basis/xml-rpc/xml-rpc-docs.factor similarity index 100% rename from extra/xml-rpc/xml-rpc-docs.factor rename to basis/xml-rpc/xml-rpc-docs.factor diff --git a/extra/xml-rpc/xml-rpc-tests.factor b/basis/xml-rpc/xml-rpc-tests.factor similarity index 100% rename from extra/xml-rpc/xml-rpc-tests.factor rename to basis/xml-rpc/xml-rpc-tests.factor diff --git a/extra/xml-rpc/xml-rpc.factor b/basis/xml-rpc/xml-rpc.factor similarity index 100% rename from extra/xml-rpc/xml-rpc.factor rename to basis/xml-rpc/xml-rpc.factor diff --git a/extra/xml/authors.txt b/basis/xml/authors.txt similarity index 100% rename from extra/xml/authors.txt rename to basis/xml/authors.txt diff --git a/extra/xml/backend/backend.factor b/basis/xml/backend/backend.factor similarity index 100% rename from extra/xml/backend/backend.factor rename to basis/xml/backend/backend.factor diff --git a/extra/xml/char-classes/authors.txt b/basis/xml/char-classes/authors.txt similarity index 100% rename from extra/xml/char-classes/authors.txt rename to basis/xml/char-classes/authors.txt diff --git a/extra/xml/char-classes/char-classes.factor b/basis/xml/char-classes/char-classes.factor similarity index 100% rename from extra/xml/char-classes/char-classes.factor rename to basis/xml/char-classes/char-classes.factor diff --git a/extra/xml/data/authors.txt b/basis/xml/data/authors.txt similarity index 100% rename from extra/xml/data/authors.txt rename to basis/xml/data/authors.txt diff --git a/extra/xml/data/data.factor b/basis/xml/data/data.factor similarity index 100% rename from extra/xml/data/data.factor rename to basis/xml/data/data.factor diff --git a/extra/xml/entities/authors.txt b/basis/xml/entities/authors.txt similarity index 100% rename from extra/xml/entities/authors.txt rename to basis/xml/entities/authors.txt diff --git a/extra/xml/entities/entities.factor b/basis/xml/entities/entities.factor similarity index 100% rename from extra/xml/entities/entities.factor rename to basis/xml/entities/entities.factor diff --git a/extra/xml/errors/authors.txt b/basis/xml/errors/authors.txt similarity index 100% rename from extra/xml/errors/authors.txt rename to basis/xml/errors/authors.txt diff --git a/extra/xml/errors/errors-tests.factor b/basis/xml/errors/errors-tests.factor similarity index 100% rename from extra/xml/errors/errors-tests.factor rename to basis/xml/errors/errors-tests.factor diff --git a/extra/xml/errors/errors.factor b/basis/xml/errors/errors.factor similarity index 100% rename from extra/xml/errors/errors.factor rename to basis/xml/errors/errors.factor diff --git a/extra/xml/generator/authors.txt b/basis/xml/generator/authors.txt similarity index 100% rename from extra/xml/generator/authors.txt rename to basis/xml/generator/authors.txt diff --git a/extra/xml/generator/generator-tests.factor b/basis/xml/generator/generator-tests.factor similarity index 100% rename from extra/xml/generator/generator-tests.factor rename to basis/xml/generator/generator-tests.factor diff --git a/extra/xml/generator/generator.factor b/basis/xml/generator/generator.factor similarity index 100% rename from extra/xml/generator/generator.factor rename to basis/xml/generator/generator.factor diff --git a/extra/xml/summary.txt b/basis/xml/summary.txt similarity index 100% rename from extra/xml/summary.txt rename to basis/xml/summary.txt diff --git a/extra/xml/tags.txt b/basis/xml/tags.txt similarity index 100% rename from extra/xml/tags.txt rename to basis/xml/tags.txt diff --git a/extra/xml/tests/arithmetic.factor b/basis/xml/tests/arithmetic.factor similarity index 100% rename from extra/xml/tests/arithmetic.factor rename to basis/xml/tests/arithmetic.factor diff --git a/extra/xml/tests/authors.txt b/basis/xml/tests/authors.txt similarity index 100% rename from extra/xml/tests/authors.txt rename to basis/xml/tests/authors.txt diff --git a/extra/xml/tests/soap.factor b/basis/xml/tests/soap.factor similarity index 88% rename from extra/xml/tests/soap.factor rename to basis/xml/tests/soap.factor index c7452bb079..d2568a24e1 100755 --- a/extra/xml/tests/soap.factor +++ b/basis/xml/tests/soap.factor @@ -10,6 +10,6 @@ IN: xml.tests [ assemble-data ] map ; [ "http://www.foxnews.com/oreilly/" ] [ - "resource:extra/xml/tests/soap.xml" file>xml + "resource:basis/xml/tests/soap.xml" file>xml parse-result first first ] unit-test diff --git a/extra/xml/tests/soap.xml b/basis/xml/tests/soap.xml similarity index 100% rename from extra/xml/tests/soap.xml rename to basis/xml/tests/soap.xml diff --git a/extra/xml/tests/templating.factor b/basis/xml/tests/templating.factor similarity index 100% rename from extra/xml/tests/templating.factor rename to basis/xml/tests/templating.factor diff --git a/extra/xml/tests/test.factor b/basis/xml/tests/test.factor similarity index 98% rename from extra/xml/tests/test.factor rename to basis/xml/tests/test.factor index 7794930144..e3fc9d9bca 100644 --- a/extra/xml/tests/test.factor +++ b/basis/xml/tests/test.factor @@ -9,7 +9,7 @@ USING: kernel xml tools.test io namespaces sequences xml.errors xml.entities \ read-xml must-infer SYMBOL: xml-file -[ ] [ "resource:extra/xml/tests/test.xml" +[ ] [ "resource:basis/xml/tests/test.xml" [ file>xml ] with-html-entities xml-file set ] unit-test [ "1.0" ] [ xml-file get xml-prolog prolog-version ] unit-test [ f ] [ xml-file get xml-prolog prolog-standalone ] unit-test diff --git a/extra/xml/tests/test.xml b/basis/xml/tests/test.xml similarity index 100% rename from extra/xml/tests/test.xml rename to basis/xml/tests/test.xml diff --git a/extra/xml/tokenize/authors.txt b/basis/xml/tokenize/authors.txt similarity index 100% rename from extra/xml/tokenize/authors.txt rename to basis/xml/tokenize/authors.txt diff --git a/extra/xml/tokenize/tokenize.factor b/basis/xml/tokenize/tokenize.factor similarity index 100% rename from extra/xml/tokenize/tokenize.factor rename to basis/xml/tokenize/tokenize.factor diff --git a/extra/xml/utilities/authors.txt b/basis/xml/utilities/authors.txt similarity index 100% rename from extra/xml/utilities/authors.txt rename to basis/xml/utilities/authors.txt diff --git a/extra/xml/utilities/utilities-tests.factor b/basis/xml/utilities/utilities-tests.factor similarity index 100% rename from extra/xml/utilities/utilities-tests.factor rename to basis/xml/utilities/utilities-tests.factor diff --git a/extra/xml/utilities/utilities.factor b/basis/xml/utilities/utilities.factor similarity index 100% rename from extra/xml/utilities/utilities.factor rename to basis/xml/utilities/utilities.factor diff --git a/extra/xml/writer/authors.txt b/basis/xml/writer/authors.txt similarity index 100% rename from extra/xml/writer/authors.txt rename to basis/xml/writer/authors.txt diff --git a/extra/xml/writer/writer.factor b/basis/xml/writer/writer.factor similarity index 100% rename from extra/xml/writer/writer.factor rename to basis/xml/writer/writer.factor diff --git a/extra/xml/xml-docs.factor b/basis/xml/xml-docs.factor similarity index 100% rename from extra/xml/xml-docs.factor rename to basis/xml/xml-docs.factor diff --git a/extra/xml/xml.factor b/basis/xml/xml.factor similarity index 100% rename from extra/xml/xml.factor rename to basis/xml/xml.factor diff --git a/core/alien/alien-docs.factor b/core/alien/alien-docs.factor index 70e1d2b399..7eca2af858 100755 --- a/core/alien/alien-docs.factor +++ b/core/alien/alien-docs.factor @@ -1,7 +1,7 @@ USING: byte-arrays arrays help.syntax help.markup alien.syntax compiler definitions math libc debugger parser io io.backend system -alien.accessors ; +alien.accessors eval ; IN: alien HELP: alien diff --git a/core/bootstrap/primitives.factor b/core/bootstrap/primitives.factor index b512ea6380..5d7d5e0d2c 100755 --- a/core/bootstrap/primitives.factor +++ b/core/bootstrap/primitives.factor @@ -18,7 +18,7 @@ H{ } clone sub-primitives set "resource:core/bootstrap/syntax.factor" parse-file -"resource:core/cpu/" architecture get { +"resource:basis/cpu/" architecture get { { "x86.32" "x86/32" } { "x86.64" "x86/64" } { "linux-ppc" "ppc/linux" } diff --git a/core/bootstrap/stage1.factor b/core/bootstrap/stage1.factor index 5c55bb15ca..92558561d2 100755 --- a/core/bootstrap/stage1.factor +++ b/core/bootstrap/stage1.factor @@ -1,26 +1,30 @@ ! Copyright (C) 2004, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -IN: bootstrap.stage1 USING: arrays debugger generic hashtables io assocs kernel.private kernel math memory namespaces parser prettyprint sequences vectors words system splitting init io.files bootstrap.image bootstrap.image.private vocabs vocabs.loader system debugger continuations ; - -{ "resource:core" } vocab-roots set +IN: bootstrap.stage1 "Bootstrap stage 1..." print flush "resource:core/bootstrap/primitives.factor" run-file load-help? off +{ "resource:core" } vocab-roots set ! Create a boot quotation for the target [ [ ! Rehash hashtables, since bootstrap.image creates them - ! using the host image's hashing algorithms - [ hashtable? ] instances [ rehash ] each + ! using the host image's hashing algorithms. We don't + ! use each-object here since the catch stack isn't yet + ! set up. + begin-scan + [ hashtable? ] pusher [ (each-object) ] dip + end-scan + [ rehash ] each boot ] % @@ -28,9 +32,6 @@ load-help? off "math.floats" require "memory" require - ! this must add its init hook before io.backend does - "libc" require - "io.streams.c" require "vocabs.loader" require @@ -38,17 +39,9 @@ load-help? off "bootstrap.layouts" require [ - "resource:core/bootstrap/stage2.factor" + "resource:basis/bootstrap/stage2.factor" dup exists? [ - [ run-file ] - [ - :c - dup print-error flush - "listener" vocab - [ restarts. vocab-main execute ] - [ die ] if* - 1 exit - ] recover + run-file ] [ "Cannot find " write write "." print "Please move " write image write " to the same directory as the Factor sources," print diff --git a/core/classes/mixin/mixin-tests.factor b/core/classes/mixin/mixin-tests.factor index b455676c38..f6ca9184b2 100644 --- a/core/classes/mixin/mixin-tests.factor +++ b/core/classes/mixin/mixin-tests.factor @@ -3,7 +3,7 @@ kernel math namespaces parser prettyprint sequences strings tools.test vectors words quotations classes classes.private classes.union classes.mixin classes.predicate classes.algebra vectors definitions source-files -compiler.units kernel.private sorting vocabs ; +compiler.units kernel.private sorting vocabs eval ; IN: classes.mixin.tests ! Test mixins diff --git a/core/classes/tuple/parser/parser-tests.factor b/core/classes/tuple/parser/parser-tests.factor index 6f7d4af6bc..7b0cb998e4 100644 --- a/core/classes/tuple/parser/parser-tests.factor +++ b/core/classes/tuple/parser/parser-tests.factor @@ -1,7 +1,7 @@ IN: classes.tuple.parser.tests USING: accessors classes.tuple.parser lexer words classes sequences math kernel slots tools.test parser compiler.units -arrays classes.tuple ; +arrays classes.tuple eval ; TUPLE: test-1 ; diff --git a/core/classes/tuple/parser/parser.factor b/core/classes/tuple/parser/parser.factor index ded0ca2a72..47363378fa 100644 --- a/core/classes/tuple/parser/parser.factor +++ b/core/classes/tuple/parser/parser.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors kernel sets namespaces sequences summary parser +USING: accessors kernel sets namespaces sequences parser lexer combinators words classes.parser classes.tuple arrays ; IN: classes.tuple.parser @@ -23,18 +23,12 @@ IN: classes.tuple.parser ERROR: duplicate-slot-names names ; -M: duplicate-slot-names summary - drop "Duplicate slot names" ; - : check-duplicate-slots ( slots -- ) slot-names duplicates dup empty? [ drop ] [ duplicate-slot-names ] if ; ERROR: invalid-slot-name name ; -M: invalid-slot-name summary - drop "Invalid slot name" ; - : parse-long-slot-name ( -- ) [ scan , \ } parse-until % ] { } make ; diff --git a/core/classes/tuple/tuple-tests.factor b/core/classes/tuple/tuple-tests.factor index 35d4149d37..dc83a15e9b 100755 --- a/core/classes/tuple/tuple-tests.factor +++ b/core/classes/tuple/tuple-tests.factor @@ -4,7 +4,7 @@ namespaces quotations sequences.private classes continuations generic.standard effects classes.tuple classes.tuple.private arrays vectors strings compiler.units accessors classes.algebra calendar prettyprint io.streams.string splitting summary -columns math.order classes.private slots slots.private ; +columns math.order classes.private slots slots.private eval ; IN: classes.tuple.tests TUPLE: rect x y w h ; diff --git a/core/classes/union/union-tests.factor b/core/classes/union/union-tests.factor index 4fd8cf643e..97baf08874 100644 --- a/core/classes/union/union-tests.factor +++ b/core/classes/union/union-tests.factor @@ -3,7 +3,8 @@ kernel math namespaces parser prettyprint sequences strings tools.test vectors words quotations classes classes.private classes.union classes.mixin classes.predicate classes.algebra vectors definitions source-files -compiler.units kernel.private sorting vocabs io.streams.string ; +compiler.units kernel.private sorting vocabs io.streams.string +eval ; IN: classes.union.tests ! DEFER: bah diff --git a/core/combinators/combinators-docs.factor b/core/combinators/combinators-docs.factor index 4f8efc499f..af79b92bea 100755 --- a/core/combinators/combinators-docs.factor +++ b/core/combinators/combinators-docs.factor @@ -25,9 +25,17 @@ $nl $nl "A combinator which can help with implementing methods on " { $link hashcode* } ":" { $subsection recursive-hashcode } +{ $subsection "assertions" } { $subsection "combinators-quot" } { $see-also "quotations" "dataflow" } ; +ARTICLE: "assertions" "Assertions" +"Some words to make assertions easier to enforce:" +{ $subsection assert } +{ $subsection assert= } +"Runtime stack depth checking:" +{ $subsection assert-depth } ; + ABOUT: "combinators" HELP: cleave @@ -145,3 +153,7 @@ HELP: dispatch ( n array -- ) { $values { "n" "a fixnum" } { "array" "an array of quotations" } } { $description "Calls the " { $snippet "n" } "th quotation in the array." } { $warning "This word is in the " { $vocab-link "kernel.private" } " vocabulary because it is an implementation detail used by the generic word system to accelerate method dispatch. It does not perform type or bounds checks, and user code should not need to call it directly." } ; + +HELP: assert-depth +{ $values { "quot" "a quotation" } } +{ $description "Runs a quotation. Throws an error if the total number of elements on the stack is not the same before and after the quotation runs." } ; diff --git a/core/combinators/combinators.factor b/core/combinators/combinators.factor index 1cc64432cc..188dcb3d11 100755 --- a/core/combinators/combinators.factor +++ b/core/combinators/combinators.factor @@ -138,6 +138,22 @@ ERROR: no-case ; [ drop linear-case-quot ] } cond ; +! assert-depth +: trim-datastacks ( seq1 seq2 -- seq1' seq2' ) + 2dup [ length ] bi@ min tuck tail >r tail r> ; + +ERROR: relative-underflow stack ; + +ERROR: relative-overflow stack ; + +: assert-depth ( quot -- ) + >r datastack r> dip >r datastack r> + 2dup [ length ] compare { + { +lt+ [ trim-datastacks nip relative-underflow ] } + { +eq+ [ 2drop ] } + { +gt+ [ trim-datastacks drop relative-overflow ] } + } case ; inline + ! recursive-hashcode : recursive-hashcode ( n obj quot -- code ) pick 0 <= [ 3drop 0 ] [ rot 1- -rot call ] if ; inline diff --git a/core/compiler/errors/errors.factor b/core/compiler/errors/errors.factor index 2bea6ad974..e21348fd19 100755 --- a/core/compiler/errors/errors.factor +++ b/core/compiler/errors/errors.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel namespaces assocs prettyprint io sequences -sorting continuations debugger math math.parser ; +USING: kernel namespaces assocs io sequences +sorting continuations math math.parser ; IN: compiler.errors SYMBOL: +error+ @@ -12,18 +12,14 @@ GENERIC: compiler-error-type ( error -- ? ) M: object compiler-error-type drop +error+ ; +GENERIC# compiler-error. 1 ( error word -- ) + r nip compiler-error-type r> eq? ] curry @@ -53,18 +49,18 @@ SYMBOL: with-compiler-errors? PRIVATE> -: compiler-error ( error word -- ) - with-compiler-errors? get [ - compiler-errors get pick - [ set-at ] [ delete-at drop ] if - ] [ 2drop ] if ; - : :errors ( -- ) +error+ compiler-errors. ; : :warnings ( -- ) +warning+ compiler-errors. ; : :linkage ( -- ) +linkage+ compiler-errors. ; +: compiler-error ( error word -- ) + with-compiler-errors? get [ + compiler-errors get pick + [ set-at ] [ delete-at drop ] if + ] [ 2drop ] if ; + : with-compiler-errors ( quot -- ) with-compiler-errors? get "quiet" get or [ call ] [ [ diff --git a/core/continuations/continuations-docs.factor b/core/continuations/continuations-docs.factor index 332e8eea67..3949c4b566 100755 --- a/core/continuations/continuations-docs.factor +++ b/core/continuations/continuations-docs.factor @@ -209,5 +209,5 @@ HELP: with-datastack { $values { "stack" sequence } { "quot" quotation } { "newstack" sequence } } { $description "Executes the quotation with the given data stack contents, and outputs the new data stack after the word returns. The input sequence is not modified. Does not affect the data stack in surrounding code, other than consuming the two inputs and pushing the output." } { $examples - { $example "USING: combinators math prettyprint ;" "{ 3 7 } [ + ] with-datastack ." "{ 10 }" } + { $example "USING: continuations math prettyprint ;" "{ 3 7 } [ + ] with-datastack ." "{ 10 }" } } ; diff --git a/core/continuations/continuations-tests.factor b/core/continuations/continuations-tests.factor index c292cf7691..28658d67d7 100755 --- a/core/continuations/continuations-tests.factor +++ b/core/continuations/continuations-tests.factor @@ -1,6 +1,6 @@ USING: kernel math namespaces io tools.test sequences vectors continuations debugger parser memory arrays words -kernel.private accessors ; +kernel.private accessors eval ; IN: continuations.tests : (callcc1-test) diff --git a/core/continuations/continuations.factor b/core/continuations/continuations.factor index f2cc0f74ba..11162be4d3 100755 --- a/core/continuations/continuations.factor +++ b/core/continuations/continuations.factor @@ -184,3 +184,20 @@ M: condition compute-restarts [ condition-continuation [ ] curry ] bi { } assoc>map ] bi append ; + + diff --git a/core/cpu/x86/64/tags.txt b/core/cpu/x86/64/tags.txt deleted file mode 100644 index 86a7c8e637..0000000000 --- a/core/cpu/x86/64/tags.txt +++ /dev/null @@ -1 +0,0 @@ -compiler diff --git a/core/effects/parser/parser.factor b/core/effects/parser/parser.factor index 93401d321c..77bcd7cad6 100644 --- a/core/effects/parser/parser.factor +++ b/core/effects/parser/parser.factor @@ -1,16 +1,13 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: lexer sets sequences kernel splitting effects summary -combinators debugger arrays parser ; +USING: lexer sets sequences kernel splitting effects +combinators arrays parser ; IN: effects.parser DEFER: parse-effect ERROR: bad-effect ; -M: bad-effect summary - drop "Bad stack effect declaration" ; - : parse-effect-token ( end -- token/f ) scan tuck = [ drop f ] [ dup { f "(" "((" } member? [ bad-effect ] [ diff --git a/core/generator/tags.txt b/core/generator/tags.txt deleted file mode 100644 index 86a7c8e637..0000000000 --- a/core/generator/tags.txt +++ /dev/null @@ -1 +0,0 @@ -compiler diff --git a/core/generic/generic-tests.factor b/core/generic/generic-tests.factor index f3c51506fb..5927927122 100755 --- a/core/generic/generic-tests.factor +++ b/core/generic/generic-tests.factor @@ -2,7 +2,7 @@ USING: accessors alien arrays definitions generic generic.standard generic.math assocs hashtables io kernel math namespaces parser prettyprint sequences strings tools.test vectors words quotations classes classes.algebra classes.tuple continuations -layouts classes.union sorting compiler.units ; +layouts classes.union sorting compiler.units eval ; IN: generic.tests GENERIC: foobar ( x -- y ) diff --git a/core/generic/generic.factor b/core/generic/generic.factor index a621c7fa91..80cf790b23 100755 --- a/core/generic/generic.factor +++ b/core/generic/generic.factor @@ -39,7 +39,7 @@ GENERIC: effective-method ( generic -- method ) order [ class<= ] with filter reverse dup length 1 = [ drop f ] [ second ] if ; -: next-method ( class generic -- class/f ) +: next-method ( class generic -- method/f ) [ next-method-class ] keep method ; GENERIC: next-method-quot* ( class generic combination -- quot ) diff --git a/core/generic/parser/parser.factor b/core/generic/parser/parser.factor index 74ab769933..70f57f85e3 100644 --- a/core/generic/parser/parser.factor +++ b/core/generic/parser/parser.factor @@ -1,13 +1,10 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: parser kernel words generic namespaces summary ; +USING: parser kernel words generic namespaces ; IN: generic.parser ERROR: not-in-a-method-error ; -M: not-in-a-method-error summary - drop "call-next-method can only be called in a method definition" ; - : CREATE-GENERIC ( -- word ) CREATE dup reset-word ; : create-method-in ( class generic -- method ) diff --git a/core/init/init-tests.factor b/core/init/init-tests.factor deleted file mode 100644 index ce68a1d7ab..0000000000 --- a/core/init/init-tests.factor +++ /dev/null @@ -1,7 +0,0 @@ -IN: init.tests -USING: init namespaces sequences math tools.test kernel ; - -[ t ] [ - init-hooks get [ first "libc" = ] find drop - init-hooks get [ first "io.backend" = ] find drop < -] unit-test diff --git a/core/init/init.factor b/core/init/init.factor index 6ee11c76fc..953340b985 100755 --- a/core/init/init.factor +++ b/core/init/init.factor @@ -1,4 +1,4 @@ -! Copyright (C) 2004, 2007 Slava Pestov. +! Copyright (C) 2004, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: continuations continuations.private kernel kernel.private sequences assocs namespaces namespaces.private ; @@ -15,7 +15,7 @@ init-hooks global [ drop V{ } clone ] cache drop dup init-hooks get at [ over call ] unless init-hooks get set-at ; -: boot ( -- ) init-namespaces init-catchstack ; +: boot ( -- ) init-namespaces init-catchstack init-error-handler ; : boot-quot ( -- quot ) 20 getenv ; diff --git a/core/io/encodings/encodings.factor b/core/io/encodings/encodings.factor index fc02d880f1..3df441ae03 100755 --- a/core/io/encodings/encodings.factor +++ b/core/io/encodings/encodings.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: math kernel sequences sbufs vectors namespaces growable strings io classes continuations destructors combinators -io.styles io.streams.plain splitting byte-arrays +io.streams.plain splitting byte-arrays sequences.private accessors ; IN: io.encodings diff --git a/core/io/files/files-docs.factor b/core/io/files/files-docs.factor index cac8a4c6c5..8e32c100e0 100755 --- a/core/io/files/files-docs.factor +++ b/core/io/files/files-docs.factor @@ -1,4 +1,4 @@ -USING: help.markup help.syntax io io.styles strings +USING: help.markup help.syntax io strings io.backend io.files.private quotations ; IN: io.files @@ -170,16 +170,16 @@ 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." } ; +{ $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." } ; +{ $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." } ; +{ $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." } ; +{ $description "A Unix socket file. This type exists on Unix platforms only." } ; HELP: +unknown+ { $description "A unknown file type." } ; @@ -327,7 +327,7 @@ HELP: resource-path { $description "Resolve a path relative to the Factor source code location." } ; HELP: pathname -{ $class-description "Class of pathname presentations. Path name presentations can be created by calling " { $link } ". Instances can be passed to " { $link write-object } " to output a clickable pathname." } ; +{ $class-description "Class of path name objects. Path name objects can be created by calling " { $link } "." } ; HELP: normalize-directory { $values { "str" "a pathname string" } { "newstr" "a new pathname string" } } diff --git a/core/io/io-docs.factor b/core/io/io-docs.factor index 782d4044ae..b639696f57 100755 --- a/core/io/io-docs.factor +++ b/core/io/io-docs.factor @@ -87,7 +87,6 @@ $nl { $subsection bl } "Formatted output:" { $subsection format } -{ $subsection write-object } { $subsection with-style } { $subsection with-nesting } "Tabular output:" @@ -356,11 +355,6 @@ HELP: bl { $description "Outputs a space character (" { $snippet "\" \"" } ") to " { $link output-stream } "." } $io-error ; -HELP: write-object -{ $values { "str" string } { "obj" "an object" } } -{ $description "Writes a string to " { $link output-stream } ", associating it with the object. If formatted output is supported, the string will become a clickable presentation of the object, otherwise this word behaves like a call to " { $link write } "." } -$io-error ; - HELP: lines { $values { "stream" "an input stream" } { "seq" "a sequence of strings" } } { $description "Reads lines of text until the stream is exhausted, collecting them in a sequence of strings." } ; diff --git a/core/io/io.factor b/core/io/io.factor index da7585e7ea..a03aaac6d8 100755 --- a/core/io/io.factor +++ b/core/io/io.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2003, 2007 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: hashtables generic kernel math namespaces sequences -continuations destructors assocs io.styles ; +continuations destructors assocs ; IN: io GENERIC: stream-readln ( stream -- str/f ) @@ -96,9 +96,6 @@ SYMBOL: error-stream : bl ( -- ) " " write ; -: write-object ( str obj -- ) - presented associate format ; - : lines ( stream -- seq ) [ [ readln dup ] [ ] [ drop ] produce ] with-input-stream ; diff --git a/core/io/streams/nested/nested-tests.factor b/core/io/streams/nested/nested-tests.factor deleted file mode 100644 index 402cb19c3b..0000000000 --- a/core/io/streams/nested/nested-tests.factor +++ /dev/null @@ -1,3 +0,0 @@ -USING: io io.streams.string io.streams.nested kernel math -namespaces io.styles tools.test ; -IN: io.streams.nested.tests diff --git a/core/kernel/kernel-docs.factor b/core/kernel/kernel-docs.factor index a04a698965..0a1a3cb7f2 100755 --- a/core/kernel/kernel-docs.factor +++ b/core/kernel/kernel-docs.factor @@ -437,7 +437,7 @@ HELP: or HELP: xor { $values { "obj1" "a generalized boolean" } { "obj2" "a generalized boolean" } { "?" "a generalized boolean" } } -{ $description "Tests if at exactly one object is not " { $link f } "." } +{ $description "If exactly one input is false, outputs the other input. Otherwise outputs " { $link f } "." } { $notes "This word implements boolean exclusive or, so applying it to integers will not yield useful results (all integers have a true value). Bitwise exclusive or is the " { $link bitxor } " word." } ; HELP: both? @@ -903,3 +903,8 @@ $nl "[ P ] [ Q ] [ ] while T" } "However, depending on the stack effects of " { $snippet "pred" } " and " { $snippet "quot" } ", the " { $snippet "tail" } " quotation might need to be non-empty in order to balance out the stack effect of branches for stack effect inference." } ; + +HELP: assert +{ $values { "got" "the obtained value" } { "expect" "the expected value" } } +{ $description "Throws an " { $link assert } " error." } +{ $error-description "Thrown when a unit test or other assertion fails." } ; diff --git a/core/kernel/kernel-tests.factor b/core/kernel/kernel-tests.factor index 195e9becae..5cb4abc2e9 100755 --- a/core/kernel/kernel-tests.factor +++ b/core/kernel/kernel-tests.factor @@ -50,6 +50,10 @@ IN: kernel.tests [ f ] [ 3 f and ] unit-test [ 4 ] [ 4 6 or ] unit-test [ 6 ] [ f 6 or ] unit-test +[ f ] [ 1 2 xor ] unit-test +[ 1 ] [ 1 f xor ] unit-test +[ 2 ] [ f 2 xor ] unit-test +[ f ] [ f f xor ] unit-test [ slip ] must-fail [ ] [ :c ] unit-test diff --git a/core/kernel/kernel.factor b/core/kernel/kernel.factor index e8d3de4b11..337fe6c8b0 100755 --- a/core/kernel/kernel.factor +++ b/core/kernel/kernel.factor @@ -173,7 +173,7 @@ GENERIC: boa ( ... class -- tuple ) : or ( obj1 obj2 -- ? ) dupd ? ; inline -: xor ( obj1 obj2 -- ? ) dup not swap ? ; inline +: xor ( obj1 obj2 -- ? ) [ f swap ? ] when* ; inline : both? ( x y quot -- ? ) bi@ and ; inline @@ -186,6 +186,10 @@ GENERIC: boa ( ... class -- tuple ) ! throw errors before continuations are loaded : throw ( error -- * ) 5 getenv [ die ] or 1 (throw) ; +ERROR: assert got expect ; + +: assert= ( a b -- ) 2dup = [ 2drop ] [ assert ] if ; + string ( obj -- str ) - -M: f expected>string drop "end of input" ; -M: word expected>string name>> ; -M: string expected>string ; - -M: unexpected error. - "Expected " write - dup unexpected-want expected>string write - " but got " write - unexpected-got expected>string print ; - PREDICATE: unexpected-eof < unexpected unexpected-got not ; @@ -113,18 +100,6 @@ TUPLE: lexer-error line column line-text error ; pick length + CHAR: \s [ write ] [ print ] [ write "^" print ] tri* ; -M: lexer-error error. - [ lexer-dump ] [ error>> error. ] bi ; - -M: lexer-error summary - error>> summary ; - -M: lexer-error compute-restarts - error>> compute-restarts ; - -M: lexer-error error-help - error>> error-help ; - : with-lexer ( lexer quot -- newquot ) [ lexer set ] dip [ rethrow ] recover ; inline diff --git a/core/memory/memory-tests.factor b/core/memory/memory-tests.factor index 2b5b1333c0..3fe1387582 100755 --- a/core/memory/memory-tests.factor +++ b/core/memory/memory-tests.factor @@ -23,3 +23,6 @@ TUPLE: testing x y z ; ] when* ] each ] unit-test + +! Erg's bug +2 [ [ [ 3 throw ] instances ] must-fail ] times diff --git a/core/memory/memory.factor b/core/memory/memory.factor index 227aa1f9dc..cb5c5bf7e4 100644 --- a/core/memory/memory.factor +++ b/core/memory/memory.factor @@ -1,17 +1,15 @@ -! Copyright (C) 2005, 2007 Slava Pestov. +! Copyright (C) 2005, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. +USING: kernel continuations sequences arrays system ; IN: memory -USING: arrays kernel sequences vectors system hashtables -kernel.private sbufs growable assocs namespaces quotations -math strings combinators ; : (each-object) ( quot: ( obj -- ) -- ) [ next-object dup ] swap [ drop ] while ; inline : each-object ( quot -- ) - begin-scan (each-object) end-scan ; inline + begin-scan [ (each-object) ] [ end-scan ] [ ] cleanup ; inline : instances ( quot -- seq ) - pusher >r each-object r> >array ; inline + pusher [ each-object ] dip >array ; inline : save ( -- ) image save-image ; diff --git a/core/optimizer/tags.txt b/core/optimizer/tags.txt deleted file mode 100644 index 86a7c8e637..0000000000 --- a/core/optimizer/tags.txt +++ /dev/null @@ -1 +0,0 @@ -compiler diff --git a/core/parser/parser-docs.factor b/core/parser/parser-docs.factor index 9fe17af35b..1d8d1f0714 100755 --- a/core/parser/parser-docs.factor +++ b/core/parser/parser-docs.factor @@ -144,12 +144,6 @@ $nl "While the above words are useful for one-off experiments, real programs should be written to use the vocabulary system instead; see " { $link "vocabs.loader" } "." { $see-also "source-files" } ; -ARTICLE: "parser-usage" "Reflective parser usage" -"The parser can be called on a string:" -{ $subsection eval } -"The parser can also parse from a stream:" -{ $subsection parse-stream } ; - ARTICLE: "top-level-forms" "Top level forms" "Any code outside of a definition is known as a " { $emphasis "top-level form" } "; top-level forms are run after the entire source file has been parsed, regardless of their position in the file." $nl @@ -163,11 +157,12 @@ $nl "This section concerns itself with usage and extension of the parser. Standard syntax is described in " { $link "syntax" } "." { $subsection "vocabulary-search" } { $subsection "parser-files" } -{ $subsection "parser-usage" } { $subsection "top-level-forms" } "The parser can be extended." { $subsection "parsing-words" } { $subsection "parser-lexer" } +"The parser can be invoked reflectively;" +{ $subsection parse-stream } { $see-also "definitions" "definition-checking" } ; ABOUT: "parser" @@ -322,11 +317,6 @@ HELP: parse-fresh { $description "Parses Factor source code in a sequence of lines. The initial vocabulary search path is used (see " { $link with-file-vocabs } ")." } { $errors "Throws a parse error if the input is malformed." } ; -HELP: eval -{ $values { "str" string } } -{ $description "Parses Factor source code from a string, and calls the resulting quotation." } -{ $errors "Throws an error if the input is malformed, or if the evaluation itself throws an error." } ; - HELP: filter-moved { $values { "assoc1" assoc } { "assoc2" assoc } { "seq" "an seqence of definitions" } } { $description "Removes all definitions from " { $snippet "assoc2" } " which are in " { $snippet "assoc1" } " or are are no longer present in the current " { $link file } "." } ; @@ -358,10 +348,6 @@ HELP: ?run-file { $values { "path" "a pathname string" } } { $description "If the file exists, runs it with " { $link run-file } ", otherwise does nothing." } ; -HELP: eval>string -{ $values { "str" string } { "output" string } } -{ $description "Evaluates the Factor code in " { $snippet "str" } " with " { $link output-stream } " rebound to a string output stream, then outputs the resulting string." } ; - HELP: staging-violation { $values { "word" word } } { $description "Throws a " { $link staging-violation } " error." } diff --git a/core/parser/parser-tests.factor b/core/parser/parser-tests.factor index 074b3738ac..2d4073d107 100755 --- a/core/parser/parser-tests.factor +++ b/core/parser/parser-tests.factor @@ -2,7 +2,7 @@ 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 ; +vocabs.loader accessors eval combinators ; IN: parser.tests diff --git a/core/parser/parser.factor b/core/parser/parser.factor index 2e42c3a678..502d4c1eba 100755 --- a/core/parser/parser.factor +++ b/core/parser/parser.factor @@ -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 -prettyprint sequences strings vectors words quotations summary -io.styles io combinators sorting splitting math.parser effects -continuations debugger io.files io.streams.string vocabs -io.encodings.utf8 source-files classes hashtables -compiler.errors compiler.units accessors sets lexer ; +sequences strings vectors words 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 ; IN: parser : location ( -- loc ) @@ -24,7 +24,7 @@ t parser-notes set-global : note. ( str -- ) parser-notes? [ - file get [ file. ] when* + file get [ path>> write ] when* lexer get line>> number>string write ": " write "Note: " write dup print ] when drop ; @@ -54,9 +54,6 @@ M: parsing-word stack-effect drop (( parsed -- parsed )) ; ERROR: no-current-vocab ; -M: no-current-vocab summary ( obj -- ) - drop "Not in a vocabulary; IN: form required" ; - : current-vocab ( -- str ) in get [ no-current-vocab ] unless* ; @@ -69,14 +66,13 @@ M: no-current-vocab summary ( obj -- ) : word-restarts ( possibilities -- restarts ) natural-sort [ - [ "Use the word " swap summary append ] keep + [ + "Use the " swap vocabulary>> " vocabulary" 3append + ] keep ] { } map>assoc ; TUPLE: no-word-error name ; -M: no-word-error summary - drop "Word not found in current vocabulary search path" ; - : no-word ( name -- newword ) dup no-word-error boa swap words-named [ forward-reference? not ] filter @@ -105,10 +101,6 @@ M: no-word-error summary ERROR: staging-violation word ; -M: staging-violation summary - drop - "A parsing word cannot be used in the same file it is defined in." ; - : execute-parsing ( word -- ) dup changed-definitions get key? [ staging-violation ] when execute ; @@ -150,9 +142,6 @@ M: staging-violation summary ERROR: bad-number ; -M: bad-number summary - drop "Bad number literal" ; - : parse-base ( parsed base -- parsed ) scan swap base> [ bad-number ] unless* parsed ; @@ -221,7 +210,7 @@ SYMBOL: interactive-vocabs "quiet" get [ drop ] [ - "Loading " write . flush + "Loading " write print flush ] if ; : filter-moved ( assoc1 assoc2 -- seq ) @@ -292,12 +281,3 @@ SYMBOL: interactive-vocabs : ?run-file ( path -- ) dup exists? [ run-file ] [ drop ] if ; - -: eval ( str -- ) - [ string-lines parse-fresh ] with-compilation-unit call ; - -: eval>string ( str -- output ) - [ - parser-notes off - [ [ eval ] keep ] try drop - ] with-string-writer ; diff --git a/core/slots/slots-tests.factor b/core/slots/slots-tests.factor index c1d2a5cf9b..4f4a0cadad 100644 --- a/core/slots/slots-tests.factor +++ b/core/slots/slots-tests.factor @@ -1,6 +1,6 @@ IN: slots.tests USING: math accessors slots strings generic.standard kernel -tools.test generic words parser ; +tools.test generic words parser eval ; TUPLE: r/w-test foo ; diff --git a/core/sorting/sorting-docs.factor b/core/sorting/sorting-docs.factor index 18bc7f14cf..036ff2f759 100644 --- a/core/sorting/sorting-docs.factor +++ b/core/sorting/sorting-docs.factor @@ -20,7 +20,7 @@ ABOUT: "sequences-sorting" HELP: sort { $values { "seq" "a sequence" } { "quot" "a quotation with stack effect " { $snippet "( obj1 obj2 -- <=> )" } } { "sortedseq" "a new sorted sequence" } } -{ $description "Sorts the elements into a new sequence of the same class as " { $snippet "seq" } "." } ; +{ $description "Sorts the elements into a new array." } ; HELP: sort-keys { $values { "seq" "an alist" } { "sortedseq" "a new sorted sequence" } } diff --git a/core/source-files/source-files.factor b/core/source-files/source-files.factor index abe1b8b661..50c79fc2c6 100755 --- a/core/source-files/source-files.factor +++ b/core/source-files/source-files.factor @@ -1,10 +1,10 @@ ! Copyright (C) 2007, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: arrays definitions generic assocs kernel math namespaces -prettyprint sequences strings vectors words quotations summary -io.styles io combinators sorting splitting math.parser effects -continuations debugger io.files checksums checksums.crc32 vocabs -hashtables graphs compiler.units io.encodings.utf8 accessors ; +sequences strings vectors words quotations io +combinators sorting splitting math.parser effects continuations +io.files checksums checksums.crc32 vocabs hashtables graphs +compiler.units io.encodings.utf8 accessors ; IN: source-files SYMBOL: source-files @@ -82,20 +82,6 @@ TUPLE: source-file-error file error ; file get >>file swap >>error ; -: file. ( file -- ) path>> . ; - -M: source-file-error error. - [ file>> file. ] [ error>> error. ] bi ; - -M: source-file-error summary - error>> summary ; - -M: source-file-error compute-restarts - error>> compute-restarts ; - -M: source-file-error error-help - error>> error-help ; - : with-source-file ( name quot -- ) #! Should be called from inside with-compilation-unit. [ diff --git a/core/strings/parser/parser.factor b/core/strings/parser/parser.factor index 847fba9530..7304df2419 100644 --- a/core/strings/parser/parser.factor +++ b/core/strings/parser/parser.factor @@ -1,13 +1,11 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel summary assocs namespaces splitting sequences +USING: kernel assocs namespaces splitting sequences strings math.parser lexer ; IN: strings.parser ERROR: bad-escape ; -M: bad-escape summary drop "Bad escape code" ; - : escape ( escape -- ch ) H{ { CHAR: a CHAR: \a } diff --git a/core/syntax/syntax.factor b/core/syntax/syntax.factor index 54df692895..ce84943328 100755 --- a/core/syntax/syntax.factor +++ b/core/syntax/syntax.factor @@ -8,7 +8,7 @@ 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 debugger effects.parser slots ; +combinators effects.parser slots ; IN: bootstrap.syntax ! These words are defined as a top-level form, instead of with diff --git a/core/vocabs/loader/loader-tests.factor b/core/vocabs/loader/loader-tests.factor index 5ed0b0a34c..b945126be4 100755 --- a/core/vocabs/loader/loader-tests.factor +++ b/core/vocabs/loader/loader-tests.factor @@ -3,7 +3,7 @@ IN: vocabs.loader.tests 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 ; +debugger compiler.units tools.vocabs accessors eval ; ! This vocab should not exist, but just in case... [ ] [ diff --git a/core/vocabs/loader/loader.factor b/core/vocabs/loader/loader.factor index 51a82da96b..26a6e8ae7a 100755 --- a/core/vocabs/loader/loader.factor +++ b/core/vocabs/loader/loader.factor @@ -1,15 +1,16 @@ ! Copyright (C) 2007, 2008 Eduardo Cavazos, Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: namespaces sequences io.files kernel assocs words vocabs -definitions parser continuations summary debugger io io.styles -hashtables sorting prettyprint source-files arrays combinators -strings system math.parser compiler.errors splitting init ; +definitions parser continuations io hashtables sorting +source-files arrays combinators strings system math.parser +compiler.errors splitting init ; IN: vocabs.loader SYMBOL: vocab-roots V{ "resource:core" + "resource:basis" "resource:extra" "resource:work" } clone vocab-roots set-global diff --git a/core/vocabs/loader/test/a/tags.txt b/core/vocabs/loader/test/a/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/core/vocabs/loader/test/a/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/vocabs/loader/test/b/tags.txt b/core/vocabs/loader/test/b/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/core/vocabs/loader/test/b/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/vocabs/loader/test/c/tags.txt b/core/vocabs/loader/test/c/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/core/vocabs/loader/test/c/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/vocabs/loader/test/d/tags.txt b/core/vocabs/loader/test/d/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/core/vocabs/loader/test/d/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/words/words-tests.factor b/core/words/words-tests.factor index 3f8c492aff..09ebcb6b77 100755 --- a/core/words/words-tests.factor +++ b/core/words/words-tests.factor @@ -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 ; +io.streams.string accessors eval ; IN: words.tests [ 4 ] [ diff --git a/extra/automata/tags.txt b/extra/24-game/tags.txt similarity index 100% rename from extra/automata/tags.txt rename to extra/24-game/tags.txt diff --git a/extra/boids/tags.txt b/extra/automata/ui/tags.txt similarity index 100% rename from extra/boids/tags.txt rename to extra/automata/ui/tags.txt diff --git a/extra/automata/ui/ui.factor b/extra/automata/ui/ui.factor index cfb0462877..037cf41118 100644 --- a/extra/automata/ui/ui.factor +++ b/extra/automata/ui/ui.factor @@ -30,7 +30,7 @@ IN: automata.ui : draw-bitmap ( bitmap -- ) GL_POINTS glBegin (draw-bitmap) glEnd ; -: display ( -- ) black gl-color bitmap> draw-bitmap ; +: display ( -- ) black set-color bitmap> draw-bitmap ; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/extra/balloon-bomber/tags.txt b/extra/balloon-bomber/tags.txt index 4717ffd987..dfed6b33f2 100644 --- a/extra/balloon-bomber/tags.txt +++ b/extra/balloon-bomber/tags.txt @@ -1,2 +1,3 @@ +demos games applications diff --git a/extra/boids/boids.factor b/extra/boids/boids.factor index ab624a606b..8c045ee270 100644 --- a/extra/boids/boids.factor +++ b/extra/boids/boids.factor @@ -220,7 +220,7 @@ cond ; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -: init-boids ( -- ) 50 random-boids >boids ; +: init-boids ( -- ) 100 random-boids >boids ; : init-world-size ( -- ) { 100 100 } >world-size ; diff --git a/extra/boids/ui/tags.txt b/extra/boids/ui/tags.txt new file mode 100644 index 0000000000..cb5fc203e1 --- /dev/null +++ b/extra/boids/ui/tags.txt @@ -0,0 +1 @@ +demos diff --git a/extra/boids/ui/ui.factor b/extra/boids/ui/ui.factor index 4639a0b58d..cd73c67a71 100755 --- a/extra/boids/ui/ui.factor +++ b/extra/boids/ui/ui.factor @@ -1,6 +1,7 @@ USING: combinators.short-circuit kernel namespaces math + math.trig math.functions math.vectors math.parser @@ -21,7 +22,8 @@ USING: combinators.short-circuit kernel namespaces ui.gestures assocs.lib vars rewrite-closures boids accessors math.geometry.rect - newfx ; + newfx + processing.shapes ; IN: boids.ui @@ -29,17 +31,21 @@ IN: boids.ui ! draw-boid ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -: point-a ( boid -- a ) pos>> ; - -: point-b ( boid -- b ) [ pos>> ] [ vel>> normalize* 20 v*n ] bi v+ ; - -: boid-points ( boid -- point-a point-b ) [ point-a ] [ point-b ] bi ; - -: draw-boid ( boid -- ) boid-points gl-line ; +: draw-boid ( boid -- ) + glPushMatrix + dup pos>> gl-translate-2d + vel>> first2 rect> arg rad>deg 0 0 1 glRotated + { { 0 5 } { 0 -5 } { 20 0 } } triangle + fill-mode + glPopMatrix ; : draw-boids ( -- ) boids> [ draw-boid ] each ; -: display ( -- ) black gl-color draw-boids ; +: boid-color ( -- color ) T{ rgba f 1.0 0 0 0.3 } ; + +: display ( -- ) + boid-color >fill-color + draw-boids ; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -100,72 +106,68 @@ VARS: population-label cohesion-label alignment-label separation-label ; : boids-window* ( -- ) init-variables init-world-size init-boids loop on - C[ display ] >slate - t slate> set-gadget-clipped? - { 600 400 } slate> set-slate-pdim - C[ [ run ] in-thread ] slate> set-slate-graft - C[ loop off ] slate> set-slate-ungraft - ""