From 53db40ba1373ce4c27defa711844d20a57fdfa11 Mon Sep 17 00:00:00 2001 From: "U-SLAVA-DFB8FF805\\Slava" Date: Sat, 13 Dec 2008 05:06:28 -0600 Subject: [PATCH 01/58] Add more stack declarations --- basis/concurrency/combinators/combinators.factor | 3 ++- basis/io/backend/windows/nt/nt.factor | 3 +++ basis/io/files/windows/nt/nt.factor | 15 ++++++--------- basis/math/bitwise/bitwise.factor | 2 +- basis/ui/gadgets/grid-lines/grid-lines.factor | 2 +- core/math/math.factor | 6 +++--- 6 files changed, 16 insertions(+), 15 deletions(-) mode change 100644 => 100755 basis/concurrency/combinators/combinators.factor mode change 100644 => 100755 basis/math/bitwise/bitwise.factor mode change 100644 => 100755 core/math/math.factor diff --git a/basis/concurrency/combinators/combinators.factor b/basis/concurrency/combinators/combinators.factor old mode 100644 new mode 100755 index 932605fc36..3d18b9e029 --- a/basis/concurrency/combinators/combinators.factor +++ b/basis/concurrency/combinators/combinators.factor @@ -28,7 +28,8 @@ PRIVATE> : [future] ( quot -- quot' ) '[ _ curry future ] ; inline -: future-values dup [ ?future ] change-each ; inline +: future-values ( futures -- futures ) + dup [ ?future ] change-each ; inline PRIVATE> diff --git a/basis/io/backend/windows/nt/nt.factor b/basis/io/backend/windows/nt/nt.factor index bb8175b35c..b8887debed 100755 --- a/basis/io/backend/windows/nt/nt.factor +++ b/basis/io/backend/windows/nt/nt.factor @@ -21,6 +21,9 @@ C: io-callback [ (make-overlapped) ] dip handle>> ptr>> [ over set-OVERLAPPED-offset ] when* ; +M: winnt FileArgs-overlapped ( port -- overlapped ) + make-overlapped ; + : ( handle existing -- handle ) f 1 CreateIoCompletionPort dup win32-error=0/f ; diff --git a/basis/io/files/windows/nt/nt.factor b/basis/io/files/windows/nt/nt.factor index 37c6e3190a..d0d9d5174a 100755 --- a/basis/io/files/windows/nt/nt.factor +++ b/basis/io/files/windows/nt/nt.factor @@ -1,10 +1,10 @@ USING: continuations destructors io.buffers io.files io.backend -io.timeouts io.ports io.pathnames io.files.private io.backend.windows -io.files.windows io.backend.windows.nt io.encodings.utf16n -windows windows.kernel32 kernel libc math threads system -environment alien.c-types alien.arrays alien.strings sequences -combinators combinators.short-circuit ascii splitting alien -strings assocs namespaces make accessors tr ; +io.timeouts io.ports io.pathnames io.files.private +io.backend.windows io.files.windows io.encodings.utf16n windows +windows.kernel32 kernel libc math threads system environment +alien.c-types alien.arrays alien.strings sequences combinators +combinators.short-circuit ascii splitting alien strings assocs +namespaces make accessors tr ; IN: io.files.windows.nt M: winnt cwd @@ -44,9 +44,6 @@ M: winnt normalize-path ( string -- string' ) M: winnt CreateFile-flags ( DWORD -- DWORD ) FILE_FLAG_OVERLAPPED bitor ; -M: winnt FileArgs-overlapped ( port -- overlapped ) - make-overlapped ; - M: winnt open-append 0 ! [ dup file-info size>> ] [ drop 0 ] recover [ (open-append) ] dip >>ptr ; diff --git a/basis/math/bitwise/bitwise.factor b/basis/math/bitwise/bitwise.factor old mode 100644 new mode 100755 index 11a623113a..2c03164ae7 --- a/basis/math/bitwise/bitwise.factor +++ b/basis/math/bitwise/bitwise.factor @@ -67,7 +67,7 @@ DEFER: byte-bit-count 256 [ 0 swap [ [ 1+ ] when ] each-bit ] B{ } map-as '[ HEX: ff bitand _ nth-unsafe ] -(( -- table )) define-declared +(( byte -- table )) define-declared \ byte-bit-count make-inline diff --git a/basis/ui/gadgets/grid-lines/grid-lines.factor b/basis/ui/gadgets/grid-lines/grid-lines.factor index 8d79c9e07c..03e2e64d95 100755 --- a/basis/ui/gadgets/grid-lines/grid-lines.factor +++ b/basis/ui/gadgets/grid-lines/grid-lines.factor @@ -11,7 +11,7 @@ C: grid-lines SYMBOL: grid-dim -: half-gap grid get gap>> [ 2/ ] map ; inline +: half-gap ( -- gap ) grid get gap>> [ 2/ ] map ; inline : grid-line-from/to ( orientation point -- from to ) half-gap v- diff --git a/core/math/math.factor b/core/math/math.factor old mode 100644 new mode 100755 index 2434bf8ec6..03be2208c2 --- a/core/math/math.factor +++ b/core/math/math.factor @@ -114,15 +114,15 @@ M: float fp-infinity? ( float -- ? ) From b062425935a85da63a8c05008e9e01da867d1fae Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 15 Dec 2008 09:48:37 -0600 Subject: [PATCH 02/58] clean up io.serial a bit --- extra/io/serial/serial.factor | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extra/io/serial/serial.factor b/extra/io/serial/serial.factor index 936bc182bc..bcea984579 100644 --- a/extra/io/serial/serial.factor +++ b/extra/io/serial/serial.factor @@ -10,9 +10,8 @@ TUPLE: serial stream path baud ERROR: invalid-baud baud ; M: invalid-baud summary ( invalid-baud -- string ) - "Baud rate " - swap baud>> number>string - " not supported" 3append ; + baud>> number>string + "Baud rate " " not supported" surround ; HOOK: lookup-baud os ( m -- n ) HOOK: open-serial os ( serial -- stream ) From 9b17f0a7f213cea6067d4c678a3eedb2fb8659be Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Mon, 15 Dec 2008 19:01:07 -0600 Subject: [PATCH 03/58] bubble-chamber: Rearrange the example configurations --- extra/bubble-chamber/bubble-chamber.factor | 35 +++++++++++----------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/extra/bubble-chamber/bubble-chamber.factor b/extra/bubble-chamber/bubble-chamber.factor index 086faf4f23..292ac7e59f 100644 --- a/extra/bubble-chamber/bubble-chamber.factor +++ b/extra/bubble-chamber/bubble-chamber.factor @@ -524,6 +524,24 @@ M:: update-frame-buffer ( BUBBLE-CHAMBER -- ) ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +: hadron-chamber ( -- ) + bubble-chamber-window + 1000 [ hadron add-particle ] times + big-bang + drop ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! Experimental +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: muon-chamber ( -- ) + bubble-chamber-window + 1000 [ muon add-particle ] times + dup particles>> [ collide randomize-collision-theta ] each + drop ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + : original-big-bang ( -- ) bubble-chamber { 1000 1000 } >>size @@ -541,22 +559,6 @@ M:: update-frame-buffer ( BUBBLE-CHAMBER -- ) ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -: hadron-chamber ( -- ) - bubble-chamber-window - 1000 [ hadron add-particle ] times - big-bang - drop ; - -! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -: muon-chamber ( -- ) - bubble-chamber-window - 1000 [ muon add-particle ] times - dup particles>> [ collide randomize-collision-theta ] each - drop ; - -! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - : original-big-bang-variant ( -- ) bubble-chamber-window 1789 [ muon add-particle ] times @@ -565,4 +567,3 @@ M:: update-frame-buffer ( BUBBLE-CHAMBER -- ) 111 [ axion add-particle ] times dup particles>> [ collide randomize-collision-theta ] each drop ; - From 23330d7653793f13ad2e6e7508da4fae1c608c55 Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Mon, 15 Dec 2008 19:02:46 -0600 Subject: [PATCH 04/58] Add runnable demo vocabulary 'bubble-chamber.ten-hadrons' --- extra/bubble-chamber/ten-hadrons/tags.txt | 1 + extra/bubble-chamber/ten-hadrons/ten-hadrons.factor | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 extra/bubble-chamber/ten-hadrons/tags.txt create mode 100644 extra/bubble-chamber/ten-hadrons/ten-hadrons.factor diff --git a/extra/bubble-chamber/ten-hadrons/tags.txt b/extra/bubble-chamber/ten-hadrons/tags.txt new file mode 100644 index 0000000000..cb5fc203e1 --- /dev/null +++ b/extra/bubble-chamber/ten-hadrons/tags.txt @@ -0,0 +1 @@ +demos diff --git a/extra/bubble-chamber/ten-hadrons/ten-hadrons.factor b/extra/bubble-chamber/ten-hadrons/ten-hadrons.factor new file mode 100644 index 0000000000..a29ecf8990 --- /dev/null +++ b/extra/bubble-chamber/ten-hadrons/ten-hadrons.factor @@ -0,0 +1,8 @@ + +USING: ui bubble-chamber ; + +IN: bubble-chamber.ten-hadrons + +: main ( -- ) [ ten-hadrons ] with-ui ; + +MAIN: main \ No newline at end of file From 078988b5231131e8a64253745368630cec8106a6 Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Mon, 15 Dec 2008 19:03:31 -0600 Subject: [PATCH 05/58] Add runnable demo vocabulary 'bubble-chamber.hadron-chamber' --- extra/bubble-chamber/hadron-chamber/hadron-chamber.factor | 8 ++++++++ extra/bubble-chamber/hadron-chamber/tags.txt | 1 + 2 files changed, 9 insertions(+) create mode 100644 extra/bubble-chamber/hadron-chamber/hadron-chamber.factor create mode 100644 extra/bubble-chamber/hadron-chamber/tags.txt diff --git a/extra/bubble-chamber/hadron-chamber/hadron-chamber.factor b/extra/bubble-chamber/hadron-chamber/hadron-chamber.factor new file mode 100644 index 0000000000..4046724b82 --- /dev/null +++ b/extra/bubble-chamber/hadron-chamber/hadron-chamber.factor @@ -0,0 +1,8 @@ + +USING: ui bubble-chamber ; + +IN: bubble-chamber.hadron-chamber + +: main ( -- ) [ hadron-chamber ] with-ui ; + +MAIN: main \ No newline at end of file diff --git a/extra/bubble-chamber/hadron-chamber/tags.txt b/extra/bubble-chamber/hadron-chamber/tags.txt new file mode 100644 index 0000000000..cb5fc203e1 --- /dev/null +++ b/extra/bubble-chamber/hadron-chamber/tags.txt @@ -0,0 +1 @@ +demos From 5d20b0e202a3cf63d0e20d76dc7ab77fa5085be5 Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Mon, 15 Dec 2008 19:03:55 -0600 Subject: [PATCH 06/58] Add runnable demo vocabulary 'bubble-chamber.original' --- extra/bubble-chamber/original/original.factor | 8 ++++++++ extra/bubble-chamber/original/tags.txt | 1 + 2 files changed, 9 insertions(+) create mode 100644 extra/bubble-chamber/original/original.factor create mode 100644 extra/bubble-chamber/original/tags.txt diff --git a/extra/bubble-chamber/original/original.factor b/extra/bubble-chamber/original/original.factor new file mode 100644 index 0000000000..4d1744eb64 --- /dev/null +++ b/extra/bubble-chamber/original/original.factor @@ -0,0 +1,8 @@ + +USING: ui bubble-chamber ; + +IN: bubble-chamber.original + +: main ( -- ) [ original ] with-ui ; + +MAIN: main \ No newline at end of file diff --git a/extra/bubble-chamber/original/tags.txt b/extra/bubble-chamber/original/tags.txt new file mode 100644 index 0000000000..cb5fc203e1 --- /dev/null +++ b/extra/bubble-chamber/original/tags.txt @@ -0,0 +1 @@ +demos From 472a8edcc880467836555966d2f6a4f0d2630e52 Mon Sep 17 00:00:00 2001 From: "Jose A. Ortega Ruiz" Date: Tue, 16 Dec 2008 02:09:18 +0100 Subject: [PATCH 07/58] FUEL: Word completion in listener, bound to TAB by default. --- extra/fuel/fuel.factor | 19 +++++++++++-------- misc/fuel/README | 12 ++++++++++-- misc/fuel/fuel-completion.el | 17 ++++++++++------- misc/fuel/fuel-listener.el | 22 +++++++++++++++++++--- misc/fuel/fuel-syntax.el | 16 ++++++++++++++-- 5 files changed, 64 insertions(+), 22 deletions(-) diff --git a/extra/fuel/fuel.factor b/extra/fuel/fuel.factor index 5a39fe9f2b..bf36969219 100644 --- a/extra/fuel/fuel.factor +++ b/extra/fuel/fuel.factor @@ -163,32 +163,35 @@ M: source-file fuel-pprint path>> fuel-pprint ; : fuel-get-edit-location ( defspec -- ) where [ first2 [ (normalize-path) ] dip 2array fuel-eval-set-result - ] when* ; + ] when* ; inline : fuel-get-vocab-location ( vocab -- ) - >vocab-link fuel-get-edit-location ; + >vocab-link fuel-get-edit-location ; inline : (fuel-get-vocabs) ( -- seq ) all-vocabs-seq [ vocab-name ] map ; inline : fuel-get-vocabs ( -- ) - (fuel-get-vocabs) fuel-eval-set-result ; + (fuel-get-vocabs) fuel-eval-set-result ; inline MEMO: (fuel-vocab-words) ( name -- seq ) >vocab-link words [ name>> ] map ; -: fuel-vocabs-words ( names/f -- seq ) - [ (fuel-get-vocabs) ] unless* prune - [ (fuel-vocab-words) ] map concat natural-sort ; +: fuel-current-words ( -- seq ) + use get [ keys ] map concat ; inline + +: fuel-vocabs-words ( names -- seq ) + prune [ (fuel-vocab-words) ] map concat ; inline : (fuel-get-words) ( prefix names/f -- seq ) - fuel-vocabs-words swap [ drop-prefix nip length 0 = ] curry filter ; + [ fuel-vocabs-words ] [ fuel-current-words ] if* natural-sort + swap [ drop-prefix nip length 0 = ] curry filter ; : fuel-get-words ( prefix names -- ) (fuel-get-words) fuel-eval-set-result ; inline : fuel-run-file ( path -- ) run-file ; inline -: fuel-startup ( -- ) "listener" run ; inline +: fuel-startup ( -- ) "listener" run-file ; inline MAIN: fuel-startup diff --git a/misc/fuel/README b/misc/fuel/README index 3754e816a9..2bf58cbdc7 100644 --- a/misc/fuel/README +++ b/misc/fuel/README @@ -55,19 +55,27 @@ the same as C-cz)). - C-cz : switch to listener - C-co : cycle between code, tests and docs factor files - - M-. : edit word at point in Emacs (also in listener) + - M-. : edit word at point in Emacs - M-TAB : complete word at point - C-cC-ev : edit vocabulary - C-cr, C-cC-er : eval region - C-M-r, C-cC-ee : eval region, extending it to definition boundaries - C-M-x, C-cC-ex : eval definition around point - - C-ck, C-cC-ek : compile file + - C-ck, C-cC-ek : run file - C-cC-da : toggle autodoc mode - C-cC-dd : help for word at point - C-cC-ds : short help word at point +* In the listener: + + - TAB : complete word at point + - M-. : edit word at point in Emacs + - C-cv : edit vocabulary + - C-ch : help for word at point + - C-ck : run file + * In the debugger (it pops up upon eval/compilation errors): - g : go to error diff --git a/misc/fuel/fuel-completion.el b/misc/fuel/fuel-completion.el index bffa2aa0fc..66657cbfcf 100644 --- a/misc/fuel/fuel-completion.el +++ b/misc/fuel/fuel-completion.el @@ -32,9 +32,11 @@ (fuel-eval--send/wait '(:fuel* (fuel-get-vocabs) "fuel" (:array))))))) fuel-completion--vocabs) -(defsubst fuel-completion--words (prefix vocabs) - (fuel-eval--retort-result - (fuel-eval--send/wait `(:fuel* (,prefix V{ ,@vocabs } fuel-get-words) t ,vocabs)))) +(defun fuel-completion--words (prefix vocabs) + (let ((vs (if vocabs (cons :array vocabs) 'f)) + (us (or vocabs 't))) + (fuel-eval--retort-result + (fuel-eval--send/wait `(:fuel* (,prefix ,vs fuel-get-words) t ,us))))) ;;; Completions window handling, heavily inspired in slime's: @@ -135,10 +137,11 @@ terminates a current completion." ;;; Completion functionality: -(defsubst fuel-completion--word-list (prefix) - (let ((fuel-log--inhibit-p t)) - (fuel-completion--words - prefix `("syntax" ,(fuel-syntax--current-vocab) ,@(fuel-syntax--usings))))) +(defun fuel-completion--word-list (prefix) + (let* ((fuel-log--inhibit-p t) + (cv (fuel-syntax--current-vocab)) + (vs (and cv `("syntax" ,cv ,@(fuel-syntax--usings))))) + (fuel-completion--words prefix vs))) (defun fuel-completion--complete (prefix) (let* ((words (fuel-completion--word-list prefix)) diff --git a/misc/fuel/fuel-listener.el b/misc/fuel/fuel-listener.el index 7c71cbf03c..d2f8cff9db 100644 --- a/misc/fuel/fuel-listener.el +++ b/misc/fuel/fuel-listener.el @@ -15,6 +15,8 @@ (require 'fuel-eval) (require 'fuel-base) +(require 'fuel-completion) +(require 'fuel-syntax) (require 'comint) @@ -68,10 +70,10 @@ buffer." (error "Could not run factor: image file %s not readable" image)) (message "Starting FUEL listener ...") (comint-exec (fuel-listener--buffer) "factor" - factor nil `("-run=fuel" ,(format "-i=%s" image))) + factor nil `("-run=listener" ,(format "-i=%s" image))) (pop-to-buffer (fuel-listener--buffer)) (goto-char (point-max)) - (comint-send-string nil "USE: fuel \"\\nFUEL loaded\\n\" write\n") + (comint-send-string nil "USE: fuel \"FUEL loaded\\n\" write\n") (fuel-listener--wait-for-prompt 30) (message "FUEL listener up and running!"))) @@ -101,6 +103,17 @@ buffer." (goto-char (point-max)) (unless seen (error "No prompt found!"))))) + +;;; Completion support + +(defsubst fuel-listener--current-vocab () nil) +(defsubst fuel-listener--usings () nil) + +(defun fuel-listener--setup-completion () + (setq fuel-syntax--current-vocab-function 'fuel-listener--current-vocab) + (setq fuel-syntax--usings-function 'fuel-listener--usings) + (set-syntax-table fuel-syntax--syntax-table)) + ;;; Interface: starting fuel listener @@ -126,13 +139,16 @@ buffer." \\{fuel-listener-mode-map}" (set (make-local-variable 'comint-prompt-regexp) fuel-listener--prompt-regex) (set (make-local-variable 'comint-prompt-read-only) t) - (setq fuel-listener--compilation-begin nil)) + (fuel-listener--setup-completion)) (define-key fuel-listener-mode-map "\C-cz" 'run-factor) (define-key fuel-listener-mode-map "\C-c\C-z" 'run-factor) (define-key fuel-listener-mode-map "\C-ch" 'fuel-help) (define-key fuel-listener-mode-map "\M-." 'fuel-edit-word-at-point) +(define-key fuel-listener-mode-map "\C-cv" 'fuel-edit-vocabulary) +(define-key fuel-listener-mode-map "\C-c\C-v" 'fuel-edit-vocabulary) (define-key fuel-listener-mode-map "\C-ck" 'fuel-run-file) +(define-key fuel-listener-mode-map (kbd "TAB") 'fuel-completion--complete-symbol) (provide 'fuel-listener) diff --git a/misc/fuel/fuel-syntax.el b/misc/fuel/fuel-syntax.el index a492a7b647..936bded3a5 100644 --- a/misc/fuel/fuel-syntax.el +++ b/misc/fuel/fuel-syntax.el @@ -241,7 +241,13 @@ ;;; USING/IN: -(defun fuel-syntax--current-vocab () +(make-variable-buffer-local + (defvar fuel-syntax--current-vocab-function 'fuel-syntax--find-in)) + +(defsubst fuel-syntax--current-vocab () + (funcall fuel-syntax--current-vocab-function)) + +(defun fuel-syntax--find-in () (let* ((vocab) (ip (save-excursion @@ -258,7 +264,13 @@ (setq vocab (format "%s.%s" vocab (downcase sub)))))))) vocab)) -(defun fuel-syntax--usings () +(make-variable-buffer-local + (defvar fuel-syntax--usings-function 'fuel-syntax--find-usings)) + +(defsubst fuel-syntax--usings () + (funcall fuel-syntax--usings-function)) + +(defun fuel-syntax--find-usings () (save-excursion (let ((usings) (in (fuel-syntax--current-vocab))) From 6098fb09cb01289a16fef81a92c8a0ee21417321 Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Mon, 15 Dec 2008 19:28:34 -0600 Subject: [PATCH 08/58] bubble-chamber: Add comment giving credit to J Tarbell --- extra/bubble-chamber/bubble-chamber.factor | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extra/bubble-chamber/bubble-chamber.factor b/extra/bubble-chamber/bubble-chamber.factor index 292ac7e59f..d88c53c99f 100644 --- a/extra/bubble-chamber/bubble-chamber.factor +++ b/extra/bubble-chamber/bubble-chamber.factor @@ -18,6 +18,14 @@ USING: kernel syntax accessors sequences IN: bubble-chamber +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +! This is a Factor implementation of an art piece by Jared Tarbell: +! +! http://complexification.net/gallery/machines/bubblechamber/ +! +! Jared's version is written in Processing (Java) + ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! processing ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! From de10ff8cb41884c065b1a156d955d1e8d609b3e3 Mon Sep 17 00:00:00 2001 From: "Jose A. Ortega Ruiz" Date: Tue, 16 Dec 2008 02:29:24 +0100 Subject: [PATCH 09/58] FUEL: Highlight matched subword in completion buffer; autodoc in listener. --- misc/fuel/README | 1 + misc/fuel/fuel-completion.el | 2 +- misc/fuel/fuel-listener.el | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/fuel/README b/misc/fuel/README index 2bf58cbdc7..9686124813 100644 --- a/misc/fuel/README +++ b/misc/fuel/README @@ -72,6 +72,7 @@ the same as C-cz)). - TAB : complete word at point - M-. : edit word at point in Emacs + - C-ca : toggle autodoc mode - C-cv : edit vocabulary - C-ch : help for word at point - C-ck : run file diff --git a/misc/fuel/fuel-completion.el b/misc/fuel/fuel-completion.el index 66657cbfcf..6b89dbb008 100644 --- a/misc/fuel/fuel-completion.el +++ b/misc/fuel/fuel-completion.el @@ -110,7 +110,7 @@ terminates a current completion." (defun fuel-completion--display-comp-list (completions base) (let ((savedp (fuel-completion--maybe-save-window-configuration))) (with-output-to-temp-buffer fuel-completion--comp-buffer - (display-completion-list completions) + (display-completion-list completions base) (let ((offset (- (point) 1 (length base)))) (with-current-buffer standard-output (setq completion-base-size offset) diff --git a/misc/fuel/fuel-listener.el b/misc/fuel/fuel-listener.el index d2f8cff9db..f2dc760f94 100644 --- a/misc/fuel/fuel-listener.el +++ b/misc/fuel/fuel-listener.el @@ -143,6 +143,7 @@ buffer." (define-key fuel-listener-mode-map "\C-cz" 'run-factor) (define-key fuel-listener-mode-map "\C-c\C-z" 'run-factor) +(define-key fuel-listener-mode-map "\C-ca" 'fuel-autodoc-mode) (define-key fuel-listener-mode-map "\C-ch" 'fuel-help) (define-key fuel-listener-mode-map "\M-." 'fuel-edit-word-at-point) (define-key fuel-listener-mode-map "\C-cv" 'fuel-edit-vocabulary) From daf2857d7ba278db7a47c1277bb768befb6b8ca9 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 15 Dec 2008 19:44:56 -0600 Subject: [PATCH 10/58] define-inline now takes an effect parameter C: now sets the stack effect of the new word to slot names add new basis/constants vocab; CONSTANT: foo bar is equivalent to : foo bar ; inline (going to fold CONSTANT:, ALIAS: and qualified into core soon perhaps) tighten the screws: inline words now need a stack declaration too update some usages of inline words --- basis/alias/alias.factor | 15 +- basis/alien/c-types/c-types.factor | 11 +- basis/alien/structs/fields/fields.factor | 10 +- basis/bit-arrays/bit-arrays.factor | 6 +- basis/bootstrap/image/image.factor | 2 +- basis/calendar/calendar.factor | 5 +- basis/checksums/openssl/openssl-docs.factor | 2 +- basis/cocoa/windows/windows.factor | 2 +- basis/columns/columns-docs.factor | 4 +- .../cfg/alias-analysis/alias-analysis.factor | 3 +- basis/compiler/cfg/hats/hats.factor | 20 +- .../cfg/instructions/syntax/syntax.factor | 7 +- .../cfg/linearization/linearization.factor | 2 +- basis/compiler/codegen/codegen.factor | 5 +- basis/constants/constants.factor | 8 + .../redirection/redirection-docs.factor | 4 +- basis/grouping/grouping.factor | 3 +- basis/heaps/heaps.factor | 3 +- basis/html/templates/chloe/chloe-docs.factor | 4 +- basis/html/templates/fhtml/fhtml-docs.factor | 2 +- basis/http/server/server-docs.factor | 2 +- basis/io/files/unix/unix.factor | 8 +- basis/io/sockets/secure/secure-docs.factor | 2 +- basis/io/styles/styles-docs.factor | 2 +- basis/locals/backend/backend.factor | 4 +- basis/math/bitwise/bitwise.factor | 5 +- basis/math/functions/functions.factor | 3 +- basis/math/geometry/rect/rect-docs.factor | 4 +- basis/math/intervals/intervals-docs.factor | 2 +- basis/math/ranges/ranges.factor | 6 +- basis/mirrors/mirrors-docs.factor | 2 +- basis/multiline/multiline.factor | 3 +- basis/opengl/gl/gl.factor | 1862 ++++++++--------- basis/openssl/libssl/libssl.factor | 142 +- basis/refs/refs.factor | 2 +- basis/search-deques/search-deques-docs.factor | 2 +- basis/smtp/smtp-docs.factor | 2 +- basis/stack-checker/backend/backend.factor | 1 - basis/tools/disassembler/udis/udis.factor | 5 +- basis/ui/freetype/freetype.factor | 4 +- basis/ui/gadgets/panes/panes-docs.factor | 2 +- basis/unix/bsd/bsd.factor | 12 +- basis/unix/bsd/macosx/macosx.factor | 4 +- basis/unix/kqueue/kqueue.factor | 68 +- basis/unix/statfs/macosx/macosx.factor | 131 +- basis/xml/xml-docs.factor | 8 +- core/assocs/assocs.factor | 6 +- core/bootstrap/primitives.factor | 4 +- core/checksums/crc32/crc32.factor | 6 +- core/classes/tuple/tuple.factor | 6 + core/io/encodings/encodings.factor | 4 +- core/io/pathnames/pathnames-docs.factor | 4 +- core/io/streams/c/c-docs.factor | 4 +- core/layouts/layouts.factor | 6 +- core/quotations/quotations.factor | 6 +- core/sequences/sequences-docs.factor | 4 +- core/sequences/sequences.factor | 14 +- core/slots/slots.factor | 19 +- core/sorting/sorting.factor | 31 +- core/strings/strings.factor | 7 +- core/syntax/syntax.factor | 3 +- core/words/words-docs.factor | 2 +- core/words/words.factor | 6 +- 63 files changed, 1293 insertions(+), 1245 deletions(-) create mode 100644 basis/constants/constants.factor diff --git a/basis/alias/alias.factor b/basis/alias/alias.factor index 4de4d833fa..79914527ff 100644 --- a/basis/alias/alias.factor +++ b/basis/alias/alias.factor @@ -1,18 +1,19 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors words quotations kernel effects sequences parser ; +USING: accessors words quotations kernel effects sequences +parser definitions ; IN: alias PREDICATE: alias < word "alias" word-prop ; +: define-alias ( new old -- ) + [ [ 1quotation ] [ stack-effect ] bi define-inline ] + [ drop t "alias" set-word-prop ] 2bi ; + +: ALIAS: CREATE-WORD scan-word define-alias ; parsing + M: alias reset-word [ call-next-method ] [ f "alias" set-word-prop ] bi ; M: alias stack-effect def>> first stack-effect ; - -: define-alias ( new old -- ) - [ 1quotation define-inline ] - [ drop t "alias" set-word-prop ] 2bi ; - -: ALIAS: CREATE-WORD scan-word define-alias ; parsing diff --git a/basis/alien/c-types/c-types.factor b/basis/alien/c-types/c-types.factor index ae148e3ac0..d1354cb04e 100644 --- a/basis/alien/c-types/c-types.factor +++ b/basis/alien/c-types/c-types.factor @@ -234,17 +234,16 @@ M: long-long-type box-return ( type -- ) f swap box-parameter ; : define-deref ( name -- ) - [ CHAR: * prefix "alien.c-types" create ] - [ c-getter 0 prefix ] bi - define-inline ; + [ CHAR: * prefix "alien.c-types" create ] [ c-getter 0 prefix ] bi + (( c-ptr -- value )) define-inline ; : define-out ( name -- ) [ "alien.c-types" constructor-word ] - [ dup c-setter '[ _ [ 0 @ ] keep ] ] - bi define-inline ; + [ dup c-setter '[ _ [ 0 @ ] keep ] ] bi + (( value -- c-ptr )) define-inline ; : c-bool> ( int -- ? ) - zero? not ; + 0 = not ; inline : define-primitive-type ( type name -- ) [ typedef ] diff --git a/basis/alien/structs/fields/fields.factor b/basis/alien/structs/fields/fields.factor index abce91f56f..f5537fa239 100644 --- a/basis/alien/structs/fields/fields.factor +++ b/basis/alien/structs/fields/fields.factor @@ -52,8 +52,8 @@ PREDICATE: slot-writer < word "writing" word-prop >boolean ; [ (>>offset) ] [ type>> heap-size + ] 2bi ] reduce ; -: define-struct-slot-word ( word quot spec -- ) - offset>> prefix define-inline ; +: define-struct-slot-word ( word quot spec effect -- ) + [ offset>> prefix ] dip define-inline ; : define-getter ( type spec -- ) [ set-reader-props ] keep @@ -62,11 +62,13 @@ PREDICATE: slot-writer < word "writing" word-prop >boolean ; type>> [ c-getter ] [ c-type-boxer-quot ] bi append ] - [ ] tri define-struct-slot-word ; + [ ] tri + (( c-ptr -- value )) define-struct-slot-word ; : define-setter ( type spec -- ) [ set-writer-props ] keep - [ writer>> ] [ type>> c-setter ] [ ] tri define-struct-slot-word ; + [ writer>> ] [ type>> c-setter ] [ ] tri + (( value c-ptr -- )) define-struct-slot-word ; : define-field ( type spec -- ) [ define-getter ] [ define-setter ] 2bi ; diff --git a/basis/bit-arrays/bit-arrays.factor b/basis/bit-arrays/bit-arrays.factor index d407f0b84d..66c786f6bb 100644 --- a/basis/bit-arrays/bit-arrays.factor +++ b/basis/bit-arrays/bit-arrays.factor @@ -11,7 +11,7 @@ TUPLE: bit-array byte -3 shift ; inline +: n>byte ( m -- n ) -3 shift ; inline : byte/bit ( n alien -- byte bit ) over n>byte alien-unsigned-1 swap 7 bitand ; inline @@ -19,9 +19,9 @@ TUPLE: bit-array : set-bit ( ? byte bit -- byte ) 2^ rot [ bitor ] [ bitnot bitand ] if ; inline -: bits>cells 31 + -5 shift ; inline +: bits>cells ( m -- n ) 31 + -5 shift ; inline -: bits>bytes 7 + n>byte ; inline +: bits>bytes ( m -- n ) 7 + n>byte ; inline : (set-bits) ( bit-array n -- ) [ [ length bits>cells ] keep ] dip swap underlying>> diff --git a/basis/bootstrap/image/image.factor b/basis/bootstrap/image/image.factor index d9ecdf22eb..bbd7df9108 100644 --- a/basis/bootstrap/image/image.factor +++ b/basis/bootstrap/image/image.factor @@ -66,7 +66,7 @@ M: id equal? SYMBOL: objects -: (objects) objects get ; inline +: (objects) ( obj -- id assoc ) objects get ; inline : lookup-object ( obj -- n/f ) (objects) at ; diff --git a/basis/calendar/calendar.factor b/basis/calendar/calendar.factor index 793c771b64..7683c2592f 100644 --- a/basis/calendar/calendar.factor +++ b/basis/calendar/calendar.factor @@ -211,7 +211,7 @@ M: real +minute ( timestamp n -- timestamp ) M: number +second ( timestamp n -- timestamp ) [ over second>> + seconds/minutes [ >>second ] dip +minute ] unless-zero ; -: (time+) +: (time+) ( timestamp duration -- timestamp' ) [ second>> +second ] keep [ minute>> +minute ] keep [ hour>> +hour ] keep @@ -219,7 +219,8 @@ M: number +second ( timestamp n -- timestamp ) [ month>> +month ] keep [ year>> +year ] keep ; inline -: +slots [ bi@ + ] curry 2keep ; inline +: +slots ( obj1 obj2 quot -- n obj1 obj2 ) + [ bi@ + ] curry 2keep ; inline PRIVATE> diff --git a/basis/checksums/openssl/openssl-docs.factor b/basis/checksums/openssl/openssl-docs.factor index fd067997a7..fafe9386d6 100644 --- a/basis/checksums/openssl/openssl-docs.factor +++ b/basis/checksums/openssl/openssl-docs.factor @@ -4,7 +4,7 @@ USING: help.syntax help.markup ; HELP: openssl-checksum { $class-description "The class of checksum algorithms implemented by OpenSSL. The exact set of algorithms supported depends on how the OpenSSL library was compiled; " { $snippet "md5" } " and " { $snippet "sha1" } " should be universally available." } ; -HELP: ( name -- checksum ) +HELP: { $values { "name" "an EVP message digest name" } { "checksum" openssl-checksum } } { $description "Creates a new OpenSSL checksum object." } ; diff --git a/basis/cocoa/windows/windows.factor b/basis/cocoa/windows/windows.factor index 3a53a1cc3c..51f692d02d 100644 --- a/basis/cocoa/windows/windows.factor +++ b/basis/cocoa/windows/windows.factor @@ -14,7 +14,7 @@ IN: cocoa.windows : NSBackingStoreNonretained 1 ; inline : NSBackingStoreBuffered 2 ; inline -: standard-window-type +: standard-window-type ( -- n ) { NSTitledWindowMask NSClosableWindowMask diff --git a/basis/columns/columns-docs.factor b/basis/columns/columns-docs.factor index 27dc160812..1dd9257281 100644 --- a/basis/columns/columns-docs.factor +++ b/basis/columns/columns-docs.factor @@ -4,8 +4,8 @@ IN: columns HELP: column { $class-description "A virtual sequence which presents a fixed column of a matrix represented as a sequence of rows. New instances can be created by calling " { $link } "." } ; -HELP: ( seq n -- column ) -{ $values { "seq" sequence } { "n" "a non-negative integer" } { "column" column } } +HELP: +{ $values { "seq" sequence } { "col" "a non-negative integer" } { "column" column } } { $description "Outputs a new virtual sequence which presents a fixed column of a matrix represented as a sequence of rows." "The " { $snippet "i" } "th element of a column is the " { $snippet "n" } "th element of the " { $snippet "i" } "th element of " { $snippet "seq" } ". Every element of " { $snippet "seq" } " must be a sequence, and all sequences must have equal length." } { $examples { $example diff --git a/basis/compiler/cfg/alias-analysis/alias-analysis.factor b/basis/compiler/cfg/alias-analysis/alias-analysis.factor index 90227bb5da..86bd388d8d 100644 --- a/basis/compiler/cfg/alias-analysis/alias-analysis.factor +++ b/basis/compiler/cfg/alias-analysis/alias-analysis.factor @@ -68,7 +68,8 @@ IN: compiler.cfg.alias-analysis ! Map vregs -> alias classes SYMBOL: vregs>acs -: check [ "BUG: static type error detected" throw ] unless* ; inline +: check ( obj -- obj ) + [ "BUG: static type error detected" throw ] unless* ; inline : vreg>ac ( vreg -- ac ) #! Only vregs produced by ##allot, ##peek and ##slot can diff --git a/basis/compiler/cfg/hats/hats.factor b/basis/compiler/cfg/hats/hats.factor index c0d5bf79a6..817c0f4680 100644 --- a/basis/compiler/cfg/hats/hats.factor +++ b/basis/compiler/cfg/hats/hats.factor @@ -5,17 +5,17 @@ sequences classes.tuple cpu.architecture compiler.cfg.registers compiler.cfg.instructions ; IN: compiler.cfg.hats -: i int-regs next-vreg ; inline -: ^^i i dup ; inline -: ^^i1 [ ^^i ] dip ; inline -: ^^i2 [ ^^i ] 2dip ; inline -: ^^i3 [ ^^i ] 3dip ; inline +: i ( -- vreg ) int-regs next-vreg ; inline +: ^^i ( -- vreg vreg ) i dup ; inline +: ^^i1 ( obj -- vreg vreg obj ) [ ^^i ] dip ; inline +: ^^i2 ( obj obj -- vreg vreg obj obj ) [ ^^i ] 2dip ; inline +: ^^i3 ( obj obj obj -- vreg vreg obj obj obj ) [ ^^i ] 3dip ; inline -: d double-float-regs next-vreg ; inline -: ^^d d dup ; inline -: ^^d1 [ ^^d ] dip ; inline -: ^^d2 [ ^^d ] 2dip ; inline -: ^^d3 [ ^^d ] 3dip ; inline +: d ( -- vreg ) double-float-regs next-vreg ; inline +: ^^d ( -- vreg vreg ) d dup ; inline +: ^^d1 ( obj -- vreg vreg obj ) [ ^^d ] dip ; inline +: ^^d2 ( obj obj -- vreg vreg obj obj ) [ ^^d ] 2dip ; inline +: ^^d3 ( obj obj obj -- vreg vreg obj obj obj ) [ ^^d ] 3dip ; inline : ^^load-literal ( obj -- dst ) ^^i1 ##load-literal ; inline : ^^peek ( loc -- dst ) ^^i1 ##peek ; inline diff --git a/basis/compiler/cfg/instructions/syntax/syntax.factor b/basis/compiler/cfg/instructions/syntax/syntax.factor index 5a5df88112..30d062d4cc 100644 --- a/basis/compiler/cfg/instructions/syntax/syntax.factor +++ b/basis/compiler/cfg/instructions/syntax/syntax.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: classes.tuple classes.tuple.parser kernel words -make fry sequences parser ; +make fry sequences parser accessors ; IN: compiler.cfg.instructions.syntax : insn-word ( -- word ) @@ -10,10 +10,13 @@ IN: compiler.cfg.instructions.syntax #! this one. "insn" "compiler.cfg.instructions" lookup ; +: insn-effect ( word -- effect ) + boa-effect [ but-last ] change-in { } >>out ; + : INSN: parse-tuple-definition "regs" suffix [ dup tuple eq? [ drop insn-word ] when ] dip [ define-tuple-class ] [ 2drop save-location ] - [ 2drop dup '[ f _ boa , ] define-inline ] + [ 2drop [ ] [ '[ f _ boa , ] ] [ insn-effect ] tri define-inline ] 3tri ; parsing diff --git a/basis/compiler/cfg/linearization/linearization.factor b/basis/compiler/cfg/linearization/linearization.factor index 7433df9617..6926ce7b4b 100644 --- a/basis/compiler/cfg/linearization/linearization.factor +++ b/basis/compiler/cfg/linearization/linearization.factor @@ -37,7 +37,7 @@ M: insn linearize-insn , drop ; M: ##branch linearize-insn drop dup successors>> first emit-branch ; -: (binary-conditional) +: (binary-conditional) ( basic-block insn -- basic-block successor1 successor2 src1 src2 cc -- ) [ dup successors>> first2 ] [ [ src1>> ] [ src2>> ] [ cc>> ] tri ] bi* ; inline diff --git a/basis/compiler/codegen/codegen.factor b/basis/compiler/codegen/codegen.factor index 9f134c02d7..6e76badc9c 100644 --- a/basis/compiler/codegen/codegen.factor +++ b/basis/compiler/codegen/codegen.factor @@ -109,7 +109,7 @@ M: ##slot generate-insn M: ##slot-imm generate-insn >slot< %slot-imm ; -: >set-slot< +: >set-slot< ( insn -- src obj slot tag ) { [ src>> register ] [ obj>> register ] @@ -209,7 +209,8 @@ M: ##alien-cell generate-insn dst/src %alien-cell ; M: ##alien-float generate-insn dst/src %alien-float ; M: ##alien-double generate-insn dst/src %alien-double ; -: >alien-setter< [ src>> register ] [ value>> register ] bi ; inline +: >alien-setter< ( insn -- src value ) + [ src>> register ] [ value>> register ] bi ; inline M: ##set-alien-integer-1 generate-insn >alien-setter< %set-alien-integer-1 ; M: ##set-alien-integer-2 generate-insn >alien-setter< %set-alien-integer-2 ; diff --git a/basis/constants/constants.factor b/basis/constants/constants.factor new file mode 100644 index 0000000000..bd2b3f188f --- /dev/null +++ b/basis/constants/constants.factor @@ -0,0 +1,8 @@ +! Copyright (C) 2008 Slava Pestov. +! See http://factorcode.org/license.txt for BSD license. +USING: parser kernel words ; +IN: constants + +: CONSTANT: + CREATE scan-object [ ] curry (( -- value )) + define-inline ; parsing diff --git a/basis/furnace/redirection/redirection-docs.factor b/basis/furnace/redirection/redirection-docs.factor index fd3671fa1c..b70ec0ae57 100644 --- a/basis/furnace/redirection/redirection-docs.factor +++ b/basis/furnace/redirection/redirection-docs.factor @@ -10,8 +10,8 @@ HELP: { $values { "url" url } { "response" response } } { $description "Creates a response which redirects the client to the given URL." } ; -HELP: ( responder -- responder' ) -{ $values { "responder" "a responder" } { "responder'" "a responder" } } +HELP: +{ $values { "responder" "a responder" } { "secure-only" "a responder" } } { $description "Creates a new responder which ensures that the client is connecting via HTTPS before delegating to the underlying responder. If the client is connecting via HTTP, a redirect is sent instead." } ; HELP: diff --git a/basis/grouping/grouping.factor b/basis/grouping/grouping.factor index 0fa20b41fc..b4d4c08d42 100644 --- a/basis/grouping/grouping.factor +++ b/basis/grouping/grouping.factor @@ -8,7 +8,8 @@ IN: grouping TUPLE: chunking-seq { seq read-only } { n read-only } ; -: check-groups dup 0 <= [ "Invalid group count" throw ] when ; inline +: check-groups ( n -- n ) + dup 0 <= [ "Invalid group count" throw ] when ; inline : new-groups ( seq n class -- groups ) [ check-groups ] dip boa ; inline diff --git a/basis/heaps/heaps.factor b/basis/heaps/heaps.factor index ba95a9f249..aa1ebf7786 100644 --- a/basis/heaps/heaps.factor +++ b/basis/heaps/heaps.factor @@ -87,7 +87,8 @@ M: heap heap-size ( heap -- n ) GENERIC: heap-compare ( pair1 pair2 heap -- ? ) -: (heap-compare) drop [ key>> ] compare ; inline +: (heap-compare) ( pair1 pair2 heap -- <=> ) + drop [ key>> ] compare ; inline M: min-heap heap-compare (heap-compare) +gt+ eq? ; diff --git a/basis/html/templates/chloe/chloe-docs.factor b/basis/html/templates/chloe/chloe-docs.factor index 1f2975bce1..f6408d3b59 100644 --- a/basis/html/templates/chloe/chloe-docs.factor +++ b/basis/html/templates/chloe/chloe-docs.factor @@ -4,8 +4,8 @@ html.templates html.templates.chloe.syntax html.templates.chloe.compiler html.templates.chloe.components math xml.data strings quotations namespaces ; -HELP: ( path -- template ) -{ $values { "path" "a pathname string without the trailing " { $snippet ".xml" } " extension" } { "template" chloe } } +HELP: +{ $values { "path" "a pathname string without the trailing " { $snippet ".xml" } " extension" } { "chloe" chloe } } { $description "Creates a new Chloe template object which can be passed to " { $link call-template } "." } ; HELP: required-attr diff --git a/basis/html/templates/fhtml/fhtml-docs.factor b/basis/html/templates/fhtml/fhtml-docs.factor index c302a581ab..e775651cbc 100644 --- a/basis/html/templates/fhtml/fhtml-docs.factor +++ b/basis/html/templates/fhtml/fhtml-docs.factor @@ -1,7 +1,7 @@ IN: html.templates.fhtml USING: help.markup help.syntax ; -HELP: ( path -- fhtml ) +HELP: { $values { "path" "a pathname string" } { "fhtml" fhtml } } { $description "Creates an FHTML template descriptor." } ; diff --git a/basis/http/server/server-docs.factor b/basis/http/server/server-docs.factor index 12183f1b25..18e1ab1323 100644 --- a/basis/http/server/server-docs.factor +++ b/basis/http/server/server-docs.factor @@ -4,7 +4,7 @@ IN: http.server HELP: trivial-responder { $description "The class of trivial responders, which output the same response for every request. New instances are created by calling " { $link } "." } ; -HELP: ( response -- responder ) +HELP: { $values { "response" response } { "responder" trivial-responder } } { $description "Creates a new trivial responder which outputs the same response for every request." } ; diff --git a/basis/io/files/unix/unix.factor b/basis/io/files/unix/unix.factor index ac78cdff0c..9518d1c754 100644 --- a/basis/io/files/unix/unix.factor +++ b/basis/io/files/unix/unix.factor @@ -11,14 +11,15 @@ M: unix cwd ( -- path ) M: unix cd ( path -- ) [ chdir ] unix-system-call drop ; -: read-flags O_RDONLY ; inline +: read-flags ( -- n ) O_RDONLY ; inline : open-read ( path -- fd ) O_RDONLY file-mode open-file ; M: unix (file-reader) ( path -- stream ) open-read init-fd ; -: write-flags { O_WRONLY O_CREAT O_TRUNC } flags ; inline +: write-flags ( -- n ) + { O_WRONLY O_CREAT O_TRUNC } flags ; inline : open-write ( path -- fd ) write-flags file-mode open-file ; @@ -26,7 +27,8 @@ M: unix (file-reader) ( path -- stream ) M: unix (file-writer) ( path -- stream ) open-write init-fd ; -: append-flags { O_WRONLY O_APPEND O_CREAT } flags ; inline +: append-flags ( -- n ) + { O_WRONLY O_APPEND O_CREAT } flags ; inline : open-append ( path -- fd ) [ diff --git a/basis/io/sockets/secure/secure-docs.factor b/basis/io/sockets/secure/secure-docs.factor index 01f64dfccf..5dd4fe6b40 100644 --- a/basis/io/sockets/secure/secure-docs.factor +++ b/basis/io/sockets/secure/secure-docs.factor @@ -86,7 +86,7 @@ ARTICLE: "ssl-contexts" "Secure socket contexts" HELP: secure { $class-description "The class of secure socket addresses." } ; -HELP: ( addrspec -- secure ) +HELP: { $values { "addrspec" "an address specifier" } { "secure" secure } } { $description "Creates a new secure socket address, which can then be passed to " { $link } " or " { $link } "." } ; diff --git a/basis/io/styles/styles-docs.factor b/basis/io/styles/styles-docs.factor index febec6573a..c29f3d5d70 100644 --- a/basis/io/styles/styles-docs.factor +++ b/basis/io/styles/styles-docs.factor @@ -150,7 +150,7 @@ HELP: input { $code "\"2 3 + .\" dup write-object nl" } } ; -HELP: ( string -- input ) +HELP: { $values { "string" string } { "input" input } } { $description "Creates a new " { $link input } "." } ; diff --git a/basis/locals/backend/backend.factor b/basis/locals/backend/backend.factor index ece5c1d200..1c1f288797 100644 --- a/basis/locals/backend/backend.factor +++ b/basis/locals/backend/backend.factor @@ -3,6 +3,6 @@ USING: slots.private ; IN: locals.backend -: local-value 2 slot ; inline +: local-value ( box -- value ) 2 slot ; inline -: set-local-value 2 set-slot ; inline +: set-local-value ( value box -- ) 2 set-slot ; inline diff --git a/basis/math/bitwise/bitwise.factor b/basis/math/bitwise/bitwise.factor index 89a21b65ab..11a623113a 100644 --- a/basis/math/bitwise/bitwise.factor +++ b/basis/math/bitwise/bitwise.factor @@ -66,7 +66,10 @@ DEFER: byte-bit-count \ byte-bit-count 256 [ 0 swap [ [ 1+ ] when ] each-bit -] B{ } map-as '[ HEX: ff bitand _ nth-unsafe ] define-inline +] B{ } map-as '[ HEX: ff bitand _ nth-unsafe ] +(( -- table )) define-declared + +\ byte-bit-count make-inline >> diff --git a/basis/math/functions/functions.factor b/basis/math/functions/functions.factor index 8411baf94c..ff52c17047 100644 --- a/basis/math/functions/functions.factor +++ b/basis/math/functions/functions.factor @@ -46,7 +46,8 @@ M: real sqrt GENERIC# ^n 1 ( z w -- z^w ) -: (^n) 1 swap [ [ dupd * ] when [ sq ] dip ] each-bit nip ; inline +: (^n) ( z w -- z^w ) + 1 swap [ [ dupd * ] when [ sq ] dip ] each-bit nip ; inline M: integer ^n [ factor-2s ] dip [ (^n) ] keep rot * shift ; diff --git a/basis/math/geometry/rect/rect-docs.factor b/basis/math/geometry/rect/rect-docs.factor index 31c9e44b1d..2077d82b70 100644 --- a/basis/math/geometry/rect/rect-docs.factor +++ b/basis/math/geometry/rect/rect-docs.factor @@ -11,7 +11,7 @@ HELP: rect "Rectangles are constructed by calling " { $link } " and " { $link } "." } ; -HELP: ( loc dim -- rect ) +HELP: { $values { "loc" "a pair of integers" } { "dim" "a pair of integers" } { "rect" "a new " { $link rect } } } { $description "Creates a new rectangle with the specified top-left location and dimensions." } ; @@ -23,7 +23,7 @@ HELP: rect-bounds { rect-bounds rect-extent } related-words -HELP: ( loc ext -- rect ) +HELP: { $values { "loc" "a pair of integers" } { "ext" "a pair of integers" } { "rect" "a new " { $link rect } } } { $description "Creates a new rectangle with the specified top-left and bottom-right corner locations." } ; diff --git a/basis/math/intervals/intervals-docs.factor b/basis/math/intervals/intervals-docs.factor index d8a80340ba..4be8dcc9a7 100644 --- a/basis/math/intervals/intervals-docs.factor +++ b/basis/math/intervals/intervals-docs.factor @@ -93,7 +93,7 @@ $nl $nl "Intervals are created by calling " { $link [a,b] } ", " { $link (a,b) } ", " { $link [a,b) } ", " { $link (a,b] } " or " { $link [a,a] } "." } ; -HELP: ( from to -- interval ) +HELP: { $values { "from" "a " { $snippet "{ point included? }" } " pair" } { "to" "a " { $snippet "{ point included? }" } " pair" } { "interval" interval } } { $description "Creates a new interval. Usually it is more convenient to create intervals using one of the following words instead:" { $list diff --git a/basis/math/ranges/ranges.factor b/basis/math/ranges/ranges.factor index f7b3b37e25..1a28904705 100644 --- a/basis/math/ranges/ranges.factor +++ b/basis/math/ranges/ranges.factor @@ -20,11 +20,11 @@ M: range nth-unsafe ( n range -- obj ) INSTANCE: range immutable-sequence -: twiddle 2dup > -1 1 ? ; inline +: twiddle ( a b -- a b step ) 2dup > -1 1 ? ; inline -: (a, dup [ + ] curry 2dip ; inline +: (a, ( a b step -- a' b' step ) dup [ + ] curry 2dip ; inline -: ,b) dup [ - ] curry dip ; inline +: ,b) ( a b step -- a' b' step ) dup [ - ] curry dip ; inline : [a,b] ( a b -- range ) twiddle ; inline diff --git a/basis/mirrors/mirrors-docs.factor b/basis/mirrors/mirrors-docs.factor index d6a8d51fbe..e498919f11 100644 --- a/basis/mirrors/mirrors-docs.factor +++ b/basis/mirrors/mirrors-docs.factor @@ -20,7 +20,7 @@ $nl $nl "Mirrors are created by calling " { $link } " or " { $link make-mirror } "." } ; -HELP: ( object -- mirror ) +HELP: { $values { "object" object } { "mirror" mirror } } { $description "Creates a " { $link mirror } " reflecting an object." } { $examples diff --git a/basis/multiline/multiline.factor b/basis/multiline/multiline.factor index 64d4b1a041..930e5b9f1c 100644 --- a/basis/multiline/multiline.factor +++ b/basis/multiline/multiline.factor @@ -22,7 +22,8 @@ PRIVATE> : STRING: CREATE-WORD - parse-here 1quotation define-inline ; parsing + parse-here 1quotation + (( -- string )) define-inline ; parsing > -: X509_FILETYPE_PEM 1 ; inline -: X509_FILETYPE_ASN1 2 ; inline -: X509_FILETYPE_DEFAULT 3 ; inline +CONSTANT: X509_FILETYPE_PEM 1 +CONSTANT: X509_FILETYPE_ASN1 2 +CONSTANT: X509_FILETYPE_DEFAULT 3 -: SSL_FILETYPE_ASN1 X509_FILETYPE_ASN1 ; inline -: SSL_FILETYPE_PEM X509_FILETYPE_PEM ; inline +ALIAS: SSL_FILETYPE_ASN1 X509_FILETYPE_ASN1 +ALIAS: SSL_FILETYPE_PEM X509_FILETYPE_PEM -: SSL_CTRL_NEED_TMP_RSA 1 ; inline -: SSL_CTRL_SET_TMP_RSA 2 ; inline -: SSL_CTRL_SET_TMP_DH 3 ; inline -: SSL_CTRL_SET_TMP_RSA_CB 4 ; inline -: SSL_CTRL_SET_TMP_DH_CB 5 ; inline +CONSTANT: SSL_CTRL_NEED_TMP_RSA 1 +CONSTANT: SSL_CTRL_SET_TMP_RSA 2 +CONSTANT: SSL_CTRL_SET_TMP_DH 3 +CONSTANT: SSL_CTRL_SET_TMP_RSA_CB 4 +CONSTANT: SSL_CTRL_SET_TMP_DH_CB 5 -: SSL_CTRL_GET_SESSION_REUSED 6 ; inline -: SSL_CTRL_GET_CLIENT_CERT_REQUEST 7 ; inline -: SSL_CTRL_GET_NUM_RENEGOTIATIONS 8 ; inline -: SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 9 ; inline -: SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 10 ; inline -: SSL_CTRL_GET_FLAGS 11 ; inline -: SSL_CTRL_EXTRA_CHAIN_CERT 12 ; inline +CONSTANT: SSL_CTRL_GET_SESSION_REUSED 6 +CONSTANT: SSL_CTRL_GET_CLIENT_CERT_REQUEST 7 +CONSTANT: SSL_CTRL_GET_NUM_RENEGOTIATIONS 8 +CONSTANT: SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 9 +CONSTANT: SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 10 +CONSTANT: SSL_CTRL_GET_FLAGS 11 +CONSTANT: SSL_CTRL_EXTRA_CHAIN_CERT 12 -: SSL_CTRL_SET_MSG_CALLBACK 13 ; inline -: SSL_CTRL_SET_MSG_CALLBACK_ARG 14 ; inline +CONSTANT: SSL_CTRL_SET_MSG_CALLBACK 13 +CONSTANT: SSL_CTRL_SET_MSG_CALLBACK_ARG 14 -: SSL_CTRL_SESS_NUMBER 20 ; inline -: SSL_CTRL_SESS_CONNECT 21 ; inline -: SSL_CTRL_SESS_CONNECT_GOOD 22 ; inline -: SSL_CTRL_SESS_CONNECT_RENEGOTIATE 23 ; inline -: SSL_CTRL_SESS_ACCEPT 24 ; inline -: SSL_CTRL_SESS_ACCEPT_GOOD 25 ; inline -: SSL_CTRL_SESS_ACCEPT_RENEGOTIATE 26 ; inline -: SSL_CTRL_SESS_HIT 27 ; inline -: SSL_CTRL_SESS_CB_HIT 28 ; inline -: SSL_CTRL_SESS_MISSES 29 ; inline -: SSL_CTRL_SESS_TIMEOUTS 30 ; inline -: SSL_CTRL_SESS_CACHE_FULL 31 ; inline -: SSL_CTRL_OPTIONS 32 ; inline -: SSL_CTRL_MODE 33 ; inline +CONSTANT: SSL_CTRL_SESS_NUMBER 20 +CONSTANT: SSL_CTRL_SESS_CONNECT 21 +CONSTANT: SSL_CTRL_SESS_CONNECT_GOOD 22 +CONSTANT: SSL_CTRL_SESS_CONNECT_RENEGOTIATE 23 +CONSTANT: SSL_CTRL_SESS_ACCEPT 24 +CONSTANT: SSL_CTRL_SESS_ACCEPT_GOOD 25 +CONSTANT: SSL_CTRL_SESS_ACCEPT_RENEGOTIATE 26 +CONSTANT: SSL_CTRL_SESS_HIT 27 +CONSTANT: SSL_CTRL_SESS_CB_HIT 28 +CONSTANT: SSL_CTRL_SESS_MISSES 29 +CONSTANT: SSL_CTRL_SESS_TIMEOUTS 30 +CONSTANT: SSL_CTRL_SESS_CACHE_FULL 31 +CONSTANT: SSL_CTRL_OPTIONS 32 +CONSTANT: SSL_CTRL_MODE 33 -: SSL_CTRL_GET_READ_AHEAD 40 ; inline -: SSL_CTRL_SET_READ_AHEAD 41 ; inline -: SSL_CTRL_SET_SESS_CACHE_SIZE 42 ; inline -: SSL_CTRL_GET_SESS_CACHE_SIZE 43 ; inline -: SSL_CTRL_SET_SESS_CACHE_MODE 44 ; inline -: SSL_CTRL_GET_SESS_CACHE_MODE 45 ; inline +CONSTANT: SSL_CTRL_GET_READ_AHEAD 40 +CONSTANT: SSL_CTRL_SET_READ_AHEAD 41 +CONSTANT: SSL_CTRL_SET_SESS_CACHE_SIZE 42 +CONSTANT: SSL_CTRL_GET_SESS_CACHE_SIZE 43 +CONSTANT: SSL_CTRL_SET_SESS_CACHE_MODE 44 +CONSTANT: SSL_CTRL_GET_SESS_CACHE_MODE 45 -: SSL_CTRL_GET_MAX_CERT_LIST 50 ; inline -: SSL_CTRL_SET_MAX_CERT_LIST 51 ; inline +CONSTANT: SSL_CTRL_GET_MAX_CERT_LIST 50 +CONSTANT: SSL_CTRL_SET_MAX_CERT_LIST 51 -: SSL_ERROR_NONE 0 ; inline -: SSL_ERROR_SSL 1 ; inline -: SSL_ERROR_WANT_READ 2 ; inline -: SSL_ERROR_WANT_WRITE 3 ; inline -: SSL_ERROR_WANT_X509_LOOKUP 4 ; inline -: SSL_ERROR_SYSCALL 5 ; inline ! consult errno for details -: SSL_ERROR_ZERO_RETURN 6 ; inline -: SSL_ERROR_WANT_CONNECT 7 ; inline -: SSL_ERROR_WANT_ACCEPT 8 ; inline +CONSTANT: SSL_ERROR_NONE 0 +CONSTANT: SSL_ERROR_SSL 1 +CONSTANT: SSL_ERROR_WANT_READ 2 +CONSTANT: SSL_ERROR_WANT_WRITE 3 +CONSTANT: SSL_ERROR_WANT_X509_LOOKUP 4 +CONSTANT: SSL_ERROR_SYSCALL 5 ! consult errno for details +CONSTANT: SSL_ERROR_ZERO_RETURN 6 +CONSTANT: SSL_ERROR_WANT_CONNECT 7 +CONSTANT: SSL_ERROR_WANT_ACCEPT 8 ! Error messages table : error-messages ( -- hash ) @@ -157,8 +158,8 @@ FUNCTION: int SSL_read ( SSL* ssl, void* buf, int num ) ; FUNCTION: int SSL_shutdown ( SSL* ssl ) ; -: SSL_SENT_SHUTDOWN 1 ; -: SSL_RECEIVED_SHUTDOWN 2 ; +CONSTANT: SSL_SENT_SHUTDOWN 1 +CONSTANT: SSL_RECEIVED_SHUTDOWN 2 FUNCTION: int SSL_get_shutdown ( SSL* ssl ) ; @@ -172,10 +173,10 @@ FUNCTION: void SSL_SESSION_free ( SSL_SESSION* ses ) ; FUNCTION: int SSL_want ( SSL* ssl ) ; -: SSL_NOTHING 1 ; inline -: SSL_WRITING 2 ; inline -: SSL_READING 3 ; inline -: SSL_X509_LOOKUP 4 ; inline +CONSTANT: SSL_NOTHING 1 +CONSTANT: SSL_WRITING 2 +CONSTANT: SSL_READING 3 +CONSTANT: SSL_X509_LOOKUP 4 FUNCTION: long SSL_get_verify_result ( SSL* ssl ) ; @@ -199,10 +200,10 @@ FUNCTION: int SSL_CTX_load_verify_locations ( SSL_CTX* ctx, char* CAfile, FUNCTION: int SSL_CTX_set_default_verify_paths ( SSL_CTX* ctx ) ; -: SSL_VERIFY_NONE 0 ; inline -: SSL_VERIFY_PEER 1 ; inline -: SSL_VERIFY_FAIL_IF_NO_PEER_CERT 2 ; inline -: SSL_VERIFY_CLIENT_ONCE 4 ; inline +CONSTANT: SSL_VERIFY_NONE 0 +CONSTANT: SSL_VERIFY_PEER 1 +CONSTANT: SSL_VERIFY_FAIL_IF_NO_PEER_CERT 2 +CONSTANT: SSL_VERIFY_CLIENT_ONCE 4 FUNCTION: void SSL_CTX_set_verify ( SSL_CTX* ctx, int mode, void* callback ) ; @@ -242,16 +243,16 @@ FUNCTION: void* BIO_f_ssl ( ) ; : SSL_CTX_set_session_cache_mode ( ctx mode -- n ) [ SSL_CTRL_SET_SESS_CACHE_MODE ] dip f SSL_CTX_ctrl ; -: SSL_SESS_CACHE_OFF HEX: 0000 ; inline -: SSL_SESS_CACHE_CLIENT HEX: 0001 ; inline -: SSL_SESS_CACHE_SERVER HEX: 0002 ; inline +CONSTANT: SSL_SESS_CACHE_OFF HEX: 0000 +CONSTANT: SSL_SESS_CACHE_CLIENT HEX: 0001 +CONSTANT: SSL_SESS_CACHE_SERVER HEX: 0002 : SSL_SESS_CACHE_BOTH ( -- n ) { SSL_SESS_CACHE_CLIENT SSL_SESS_CACHE_SERVER } flags ; inline -: SSL_SESS_CACHE_NO_AUTO_CLEAR HEX: 0080 ; inline -: SSL_SESS_CACHE_NO_INTERNAL_LOOKUP HEX: 0100 ; inline -: SSL_SESS_CACHE_NO_INTERNAL_STORE HEX: 0200 ; inline +CONSTANT: SSL_SESS_CACHE_NO_AUTO_CLEAR HEX: 0080 +CONSTANT: SSL_SESS_CACHE_NO_INTERNAL_LOOKUP HEX: 0100 +CONSTANT: SSL_SESS_CACHE_NO_INTERNAL_STORE HEX: 0200 : SSL_SESS_CACHE_NO_INTERNAL ( -- n ) { SSL_SESS_CACHE_NO_INTERNAL_LOOKUP SSL_SESS_CACHE_NO_INTERNAL_STORE } flags ; inline @@ -282,8 +283,9 @@ H{ } clone verify-messages set-global : X509_V_: scan "X509_V_" prepend create-in scan-word - [ 1quotation define-inline ] - [ verify-messages get set-at ] 2bi ; parsing + [ 1quotation (( -- value )) define-inline ] + [ verify-messages get set-at ] + 2bi ; parsing >> @@ -333,4 +335,4 @@ X509_V_: ERR_APPLICATION_VERIFICATION 50 ! obj_mac.h ! =============================================== -: NID_commonName 13 ; inline +CONSTANT: NID_commonName 13 diff --git a/basis/refs/refs.factor b/basis/refs/refs.factor index 81a2338b8f..5f21dad776 100644 --- a/basis/refs/refs.factor +++ b/basis/refs/refs.factor @@ -5,7 +5,7 @@ IN: refs TUPLE: ref assoc key ; -: >ref< [ key>> ] [ assoc>> ] bi ; inline +: >ref< ( ref -- key value ) [ key>> ] [ assoc>> ] bi ; inline : delete-ref ( ref -- ) >ref< delete-at ; GENERIC: get-ref ( ref -- obj ) diff --git a/basis/search-deques/search-deques-docs.factor b/basis/search-deques/search-deques-docs.factor index fe0ce7c157..c20e67d13c 100644 --- a/basis/search-deques/search-deques-docs.factor +++ b/basis/search-deques/search-deques-docs.factor @@ -10,6 +10,6 @@ $nl ABOUT: "search-deques" -HELP: ( assoc deque -- search-deque ) +HELP: { $values { "assoc" assoc } { "deque" deque } { "search-deque" search-deque } } { $description "Creates a new " { $link search-deque } "." } ; diff --git a/basis/smtp/smtp-docs.factor b/basis/smtp/smtp-docs.factor index 83b9287043..8e34411604 100644 --- a/basis/smtp/smtp-docs.factor +++ b/basis/smtp/smtp-docs.factor @@ -25,7 +25,7 @@ HELP: no-auth HELP: plain-auth { $class-description "If the " { $link smtp-auth } " variable is set to this value, plain authentication will be performed, with the username and password stored in the " { $slot "username" } " and " { $slot "password" } " slots of the tuple sent to the server as plain-text." } ; -HELP: ( username password -- plain-auth ) +HELP: { $values { "username" string } { "password" string } { "plain-auth" plain-auth } } { $description "Creates a new " { $link plain-auth } " instance." } ; diff --git a/basis/stack-checker/backend/backend.factor b/basis/stack-checker/backend/backend.factor index 147749864d..9516b8cd7d 100644 --- a/basis/stack-checker/backend/backend.factor +++ b/basis/stack-checker/backend/backend.factor @@ -145,7 +145,6 @@ M: object apply-object push-literal ; : effect-required? ( word -- ? ) { - { [ dup inline? ] [ drop f ] } { [ dup deferred? ] [ drop f ] } { [ dup crossref? not ] [ drop f ] } [ def>> [ word? ] contains? ] diff --git a/basis/tools/disassembler/udis/udis.factor b/basis/tools/disassembler/udis/udis.factor index c5b5c80d13..a915551263 100644 --- a/basis/tools/disassembler/udis/udis.factor +++ b/basis/tools/disassembler/udis/udis.factor @@ -20,8 +20,9 @@ TYPEDEF: char[592] ud FUNCTION: void ud_translate_intel ( ud* u ) ; FUNCTION: void ud_translate_att ( ud* u ) ; -: UD_SYN_INTEL &: ud_translate_intel ; inline -: UD_SYN_ATT &: ud_translate_att ; inline +: UD_SYN_INTEL ( -- addr ) &: ud_translate_intel ; inline +: UD_SYN_ATT ( -- addr ) &: ud_translate_att ; inline + : UD_EOI -1 ; inline : UD_INP_CACHE_SZ 32 ; inline : UD_VENDOR_AMD 0 ; inline diff --git a/basis/ui/freetype/freetype.factor b/basis/ui/freetype/freetype.factor index 22a4f1722d..0f36f3dcba 100644 --- a/basis/ui/freetype/freetype.factor +++ b/basis/ui/freetype/freetype.factor @@ -78,9 +78,9 @@ SYMBOL: dpi 72 dpi set-global -: ft-floor -6 shift ; inline +: ft-floor ( m -- n ) -6 shift ; inline -: ft-ceil 63 + -64 bitand -6 shift ; inline +: ft-ceil ( m -- n ) 63 + -64 bitand -6 shift ; inline : font-units>pixels ( n font -- n ) face-size face-size-y-scale FT_MulFix ; diff --git a/basis/ui/gadgets/panes/panes-docs.factor b/basis/ui/gadgets/panes/panes-docs.factor index d53cba5f76..cad4937572 100644 --- a/basis/ui/gadgets/panes/panes-docs.factor +++ b/basis/ui/gadgets/panes/panes-docs.factor @@ -49,7 +49,7 @@ HELP: HELP: pane-stream { $class-description "Pane streams implement the portion of the " { $link "stream-protocol" } " responsible for output of text, including full support for " { $link "styles" } ". Pane streams also support direct output of gadgets via " { $link write-gadget } " and " { $link print-gadget } ". Pane streams are created by calling " { $link } "." } ; -HELP: ( pane -- stream ) +HELP: { $values { "pane" pane } { "stream" "a new " { $link pane-stream } } } { $description "Creates a new " { $link pane-stream } " for writing to " { $snippet "pane" } "." } ; diff --git a/basis/unix/bsd/bsd.factor b/basis/unix/bsd/bsd.factor index bf426ad867..761b1d14e3 100644 --- a/basis/unix/bsd/bsd.factor +++ b/basis/unix/bsd/bsd.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2005, 2006 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax combinators system vocabs.loader ; +USING: alien.syntax combinators system vocabs.loader alias ; IN: unix : MAXPATHLEN 1024 ; inline @@ -14,7 +14,7 @@ IN: unix : O_TRUNC HEX: 0400 ; inline : O_EXCL HEX: 0800 ; inline : O_NOCTTY HEX: 20000 ; inline -: O_NDELAY O_NONBLOCK ; inline +ALIAS: O_NDELAY O_NONBLOCK : SOL_SOCKET HEX: ffff ; inline : SO_REUSEADDR HEX: 4 ; inline @@ -69,10 +69,10 @@ C-STRUCT: passwd : AF_INET 2 ; inline : AF_INET6 30 ; inline -: PF_UNSPEC AF_UNSPEC ; inline -: PF_UNIX AF_UNIX ; inline -: PF_INET AF_INET ; inline -: PF_INET6 AF_INET6 ; inline +ALIAS: PF_UNSPEC AF_UNSPEC +ALIAS: PF_UNIX AF_UNIX +ALIAS: PF_INET AF_INET +ALIAS: PF_INET6 AF_INET6 : IPPROTO_TCP 6 ; inline : IPPROTO_UDP 17 ; inline diff --git a/basis/unix/bsd/macosx/macosx.factor b/basis/unix/bsd/macosx/macosx.factor index fb9eb9a621..6cb086b11b 100644 --- a/basis/unix/bsd/macosx/macosx.factor +++ b/basis/unix/bsd/macosx/macosx.factor @@ -1,4 +1,4 @@ -USING: alien.syntax unix.time ; +USING: alien.syntax unix.time alias ; IN: unix : FD_SETSIZE 1024 ; inline @@ -74,7 +74,7 @@ C-STRUCT: dirent : EDOM 33 ; inline : ERANGE 34 ; inline : EAGAIN 35 ; inline -: EWOULDBLOCK EAGAIN ; inline +ALIAS: EWOULDBLOCK EAGAIN : EINPROGRESS 36 ; inline : EALREADY 37 ; inline : ENOTSOCK 38 ; inline diff --git a/basis/unix/kqueue/kqueue.factor b/basis/unix/kqueue/kqueue.factor index d7623df8be..0f75354589 100644 --- a/basis/unix/kqueue/kqueue.factor +++ b/basis/unix/kqueue/kqueue.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: alien.syntax system sequences vocabs.loader words -accessors ; +accessors alias constants ; IN: unix.kqueue << "unix.kqueue." os name>> append require >> @@ -9,47 +9,47 @@ IN: unix.kqueue FUNCTION: int kqueue ( ) ; ! actions -: EV_ADD HEX: 1 ; inline ! add event to kq (implies enable) -: EV_DELETE HEX: 2 ; inline ! delete event from kq -: EV_ENABLE HEX: 4 ; inline ! enable event -: EV_DISABLE HEX: 8 ; inline ! disable event (not reported) +CONSTANT: EV_ADD HEX: 1 ! add event to kq (implies enable) +CONSTANT: EV_DELETE HEX: 2 ! delete event from kq +CONSTANT: EV_ENABLE HEX: 4 ! enable event +CONSTANT: EV_DISABLE HEX: 8 ! disable event (not reported) ! flags -: EV_ONESHOT HEX: 10 ; inline ! only report one occurrence -: EV_CLEAR HEX: 20 ; inline ! clear event state after reporting +CONSTANT: EV_ONESHOT HEX: 10 ! only report one occurrence +CONSTANT: EV_CLEAR HEX: 20 ! clear event state after reporting -: EV_SYSFLAGS HEX: f000 ; inline ! reserved by system -: EV_FLAG0 HEX: 1000 ; inline ! filter-specific flag -: EV_FLAG1 HEX: 2000 ; inline ! filter-specific flag +CONSTANT: EV_SYSFLAGS HEX: f000 ! reserved by system +CONSTANT: EV_FLAG0 HEX: 1000 ! filter-specific flag +CONSTANT: EV_FLAG1 HEX: 2000 ! filter-specific flag ! returned values -: EV_EOF HEX: 8000 ; inline ! EOF detected -: EV_ERROR HEX: 4000 ; inline ! error, data contains errno +CONSTANT: EV_EOF HEX: 8000 ! EOF detected +CONSTANT: EV_ERROR HEX: 4000 ! error, data contains errno -: EV_POLL EV_FLAG0 ; inline -: EV_OOBAND EV_FLAG1 ; inline +ALIAS: EV_POLL EV_FLAG0 +ALIAS: EV_OOBAND EV_FLAG1 -: NOTE_LOWAT HEX: 00000001 ; inline ! low water mark +CONSTANT: NOTE_LOWAT HEX: 00000001 ! low water mark -: NOTE_DELETE HEX: 00000001 ; inline ! vnode was removed -: NOTE_WRITE HEX: 00000002 ; inline ! data contents changed -: NOTE_EXTEND HEX: 00000004 ; inline ! size increased -: NOTE_ATTRIB HEX: 00000008 ; inline ! attributes changed -: NOTE_LINK HEX: 00000010 ; inline ! link count changed -: NOTE_RENAME HEX: 00000020 ; inline ! vnode was renamed -: NOTE_REVOKE HEX: 00000040 ; inline ! vnode access was revoked +CONSTANT: NOTE_DELETE HEX: 00000001 ! vnode was removed +CONSTANT: NOTE_WRITE HEX: 00000002 ! data contents changed +CONSTANT: NOTE_EXTEND HEX: 00000004 ! size increased +CONSTANT: NOTE_ATTRIB HEX: 00000008 ! attributes changed +CONSTANT: NOTE_LINK HEX: 00000010 ! link count changed +CONSTANT: NOTE_RENAME HEX: 00000020 ! vnode was renamed +CONSTANT: NOTE_REVOKE HEX: 00000040 ! vnode access was revoked -: NOTE_EXIT HEX: 80000000 ; inline ! process exited -: NOTE_FORK HEX: 40000000 ; inline ! process forked -: NOTE_EXEC HEX: 20000000 ; inline ! process exec'd -: NOTE_PCTRLMASK HEX: f0000000 ; inline ! mask for hint bits -: NOTE_PDATAMASK HEX: 000fffff ; inline ! mask for pid +CONSTANT: NOTE_EXIT HEX: 80000000 ! process exited +CONSTANT: NOTE_FORK HEX: 40000000 ! process forked +CONSTANT: NOTE_EXEC HEX: 20000000 ! process exec'd +CONSTANT: NOTE_PCTRLMASK HEX: f0000000 ! mask for hint bits +CONSTANT: NOTE_PDATAMASK HEX: 000fffff ! mask for pid -: NOTE_SECONDS HEX: 00000001 ; inline ! data is seconds -: NOTE_USECONDS HEX: 00000002 ; inline ! data is microseconds -: NOTE_NSECONDS HEX: 00000004 ; inline ! data is nanoseconds -: NOTE_ABSOLUTE HEX: 00000008 ; inline ! absolute timeout +CONSTANT: NOTE_SECONDS HEX: 00000001 ! data is seconds +CONSTANT: NOTE_USECONDS HEX: 00000002 ! data is microseconds +CONSTANT: NOTE_NSECONDS HEX: 00000004 ! data is nanoseconds +CONSTANT: NOTE_ABSOLUTE HEX: 00000008 ! absolute timeout -: NOTE_TRACK HEX: 00000001 ; inline ! follow across forks -: NOTE_TRACKERR HEX: 00000002 ; inline ! could not track child -: NOTE_CHILD HEX: 00000004 ; inline ! am a child process +CONSTANT: NOTE_TRACK HEX: 00000001 ! follow across forks +CONSTANT: NOTE_TRACKERR HEX: 00000002 ! could not track child +CONSTANT: NOTE_CHILD HEX: 00000004 ! am a child process diff --git a/basis/unix/statfs/macosx/macosx.factor b/basis/unix/statfs/macosx/macosx.factor index 210e9fbe12..6d0bc344ee 100644 --- a/basis/unix/statfs/macosx/macosx.factor +++ b/basis/unix/statfs/macosx/macosx.factor @@ -2,31 +2,32 @@ ! See http://factorcode.org/license.txt for BSD license. USING: alien.c-types io.encodings.utf8 io.encodings.string kernel sequences unix.stat accessors unix combinators math -grouping system alien.strings math.bitwise alien.syntax ; +grouping system alien.strings math.bitwise alien.syntax +alias constants ; IN: unix.statfs.macosx -: MNT_RDONLY HEX: 00000001 ; inline -: MNT_SYNCHRONOUS HEX: 00000002 ; inline -: MNT_NOEXEC HEX: 00000004 ; inline -: MNT_NOSUID HEX: 00000008 ; inline -: MNT_NODEV HEX: 00000010 ; inline -: MNT_UNION HEX: 00000020 ; inline -: MNT_ASYNC HEX: 00000040 ; inline -: MNT_EXPORTED HEX: 00000100 ; inline -: MNT_QUARANTINE HEX: 00000400 ; inline -: MNT_LOCAL HEX: 00001000 ; inline -: MNT_QUOTA HEX: 00002000 ; inline -: MNT_ROOTFS HEX: 00004000 ; inline -: MNT_DOVOLFS HEX: 00008000 ; inline -: MNT_DONTBROWSE HEX: 00100000 ; inline -: MNT_IGNORE_OWNERSHIP HEX: 00200000 ; inline -: MNT_AUTOMOUNTED HEX: 00400000 ; inline -: MNT_JOURNALED HEX: 00800000 ; inline -: MNT_NOUSERXATTR HEX: 01000000 ; inline -: MNT_DEFWRITE HEX: 02000000 ; inline -: MNT_MULTILABEL HEX: 04000000 ; inline -: MNT_NOATIME HEX: 10000000 ; inline -: MNT_UNKNOWNPERMISSIONS MNT_IGNORE_OWNERSHIP ; inline +CONSTANT: MNT_RDONLY HEX: 00000001 +CONSTANT: MNT_SYNCHRONOUS HEX: 00000002 +CONSTANT: MNT_NOEXEC HEX: 00000004 +CONSTANT: MNT_NOSUID HEX: 00000008 +CONSTANT: MNT_NODEV HEX: 00000010 +CONSTANT: MNT_UNION HEX: 00000020 +CONSTANT: MNT_ASYNC HEX: 00000040 +CONSTANT: MNT_EXPORTED HEX: 00000100 +CONSTANT: MNT_QUARANTINE HEX: 00000400 +CONSTANT: MNT_LOCAL HEX: 00001000 +CONSTANT: MNT_QUOTA HEX: 00002000 +CONSTANT: MNT_ROOTFS HEX: 00004000 +CONSTANT: MNT_DOVOLFS HEX: 00008000 +CONSTANT: MNT_DONTBROWSE HEX: 00100000 +CONSTANT: MNT_IGNORE_OWNERSHIP HEX: 00200000 +CONSTANT: MNT_AUTOMOUNTED HEX: 00400000 +CONSTANT: MNT_JOURNALED HEX: 00800000 +CONSTANT: MNT_NOUSERXATTR HEX: 01000000 +CONSTANT: MNT_DEFWRITE HEX: 02000000 +CONSTANT: MNT_MULTILABEL HEX: 04000000 +CONSTANT: MNT_NOATIME HEX: 10000000 +ALIAS: MNT_UNKNOWNPERMISSIONS MNT_IGNORE_OWNERSHIP : MNT_VISFLAGMASK ( -- n ) { @@ -39,58 +40,60 @@ IN: unix.statfs.macosx MNT_NOUSERXATTR MNT_DEFWRITE MNT_MULTILABEL MNT_NOATIME } flags ; inline -: MNT_UPDATE HEX: 00010000 ; inline -: MNT_RELOAD HEX: 00040000 ; inline -: MNT_FORCE HEX: 00080000 ; inline -: MNT_CMDFLAGS { MNT_UPDATE MNT_RELOAD MNT_FORCE } flags ; inline +CONSTANT: MNT_UPDATE HEX: 00010000 +CONSTANT: MNT_RELOAD HEX: 00040000 +CONSTANT: MNT_FORCE HEX: 00080000 -: VFS_GENERIC 0 ; inline -: VFS_NUMMNTOPS 1 ; inline -: VFS_MAXTYPENUM 1 ; inline -: VFS_CONF 2 ; inline -: VFS_SET_PACKAGE_EXTS 3 ; inline +: MNT_CMDFLAGS ( -- n ) + { MNT_UPDATE MNT_RELOAD MNT_FORCE } flags ; inline -: MNT_WAIT 1 ; inline -: MNT_NOWAIT 2 ; inline +CONSTANT: VFS_GENERIC 0 +CONSTANT: VFS_NUMMNTOPS 1 +CONSTANT: VFS_MAXTYPENUM 1 +CONSTANT: VFS_CONF 2 +CONSTANT: VFS_SET_PACKAGE_EXTS 3 -: VFS_CTL_VERS1 HEX: 01 ; inline +CONSTANT: MNT_WAIT 1 +CONSTANT: MNT_NOWAIT 2 -: VFS_CTL_STATFS HEX: 00010001 ; inline -: VFS_CTL_UMOUNT HEX: 00010002 ; inline -: VFS_CTL_QUERY HEX: 00010003 ; inline -: VFS_CTL_NEWADDR HEX: 00010004 ; inline -: VFS_CTL_TIMEO HEX: 00010005 ; inline -: VFS_CTL_NOLOCKS HEX: 00010006 ; inline +CONSTANT: VFS_CTL_VERS1 HEX: 01 + +CONSTANT: VFS_CTL_STATFS HEX: 00010001 +CONSTANT: VFS_CTL_UMOUNT HEX: 00010002 +CONSTANT: VFS_CTL_QUERY HEX: 00010003 +CONSTANT: VFS_CTL_NEWADDR HEX: 00010004 +CONSTANT: VFS_CTL_TIMEO HEX: 00010005 +CONSTANT: VFS_CTL_NOLOCKS HEX: 00010006 C-STRUCT: vfsquery { "uint32_t" "vq_flags" } { { "uint32_t" 31 } "vq_spare" } ; -: VQ_NOTRESP HEX: 0001 ; inline -: VQ_NEEDAUTH HEX: 0002 ; inline -: VQ_LOWDISK HEX: 0004 ; inline -: VQ_MOUNT HEX: 0008 ; inline -: VQ_UNMOUNT HEX: 0010 ; inline -: VQ_DEAD HEX: 0020 ; inline -: VQ_ASSIST HEX: 0040 ; inline -: VQ_NOTRESPLOCK HEX: 0080 ; inline -: VQ_UPDATE HEX: 0100 ; inline -: VQ_FLAG0200 HEX: 0200 ; inline -: VQ_FLAG0400 HEX: 0400 ; inline -: VQ_FLAG0800 HEX: 0800 ; inline -: VQ_FLAG1000 HEX: 1000 ; inline -: VQ_FLAG2000 HEX: 2000 ; inline -: VQ_FLAG4000 HEX: 4000 ; inline -: VQ_FLAG8000 HEX: 8000 ; inline +CONSTANT: VQ_NOTRESP HEX: 0001 +CONSTANT: VQ_NEEDAUTH HEX: 0002 +CONSTANT: VQ_LOWDISK HEX: 0004 +CONSTANT: VQ_MOUNT HEX: 0008 +CONSTANT: VQ_UNMOUNT HEX: 0010 +CONSTANT: VQ_DEAD HEX: 0020 +CONSTANT: VQ_ASSIST HEX: 0040 +CONSTANT: VQ_NOTRESPLOCK HEX: 0080 +CONSTANT: VQ_UPDATE HEX: 0100 +CONSTANT: VQ_FLAG0200 HEX: 0200 +CONSTANT: VQ_FLAG0400 HEX: 0400 +CONSTANT: VQ_FLAG0800 HEX: 0800 +CONSTANT: VQ_FLAG1000 HEX: 1000 +CONSTANT: VQ_FLAG2000 HEX: 2000 +CONSTANT: VQ_FLAG4000 HEX: 4000 +CONSTANT: VQ_FLAG8000 HEX: 8000 -: NFSV4_MAX_FH_SIZE 128 ; inline -: NFSV3_MAX_FH_SIZE 64 ; inline -: NFSV2_MAX_FH_SIZE 32 ; inline -: NFS_MAX_FH_SIZE NFSV4_MAX_FH_SIZE ; inline +CONSTANT: NFSV4_MAX_FH_SIZE 128 +CONSTANT: NFSV3_MAX_FH_SIZE 64 +CONSTANT: NFSV2_MAX_FH_SIZE 32 +CONSTANT: NFS_MAX_FH_SIZE NFSV4_MAX_FH_SIZE -: MFSNAMELEN 15 ; inline -: MNAMELEN 90 ; inline -: MFSTYPENAMELEN 16 ; inline +CONSTANT: MFSNAMELEN 15 +CONSTANT: MNAMELEN 90 +CONSTANT: MFSTYPENAMELEN 16 C-STRUCT: fsid_t { { "int32_t" 2 } "val" } ; diff --git a/basis/xml/xml-docs.factor b/basis/xml/xml-docs.factor index 05dd85251d..6d5a7f810f 100644 --- a/basis/xml/xml-docs.factor +++ b/basis/xml/xml-docs.factor @@ -112,7 +112,7 @@ HELP: name { $class-description "represents an XML name, with the fields space (a string representing the namespace, as written in the document, tag (a string of the actual name of the tag) and url (a string of the URL that the namespace points to)" } { $see-also tag } ; -HELP: ( space tag url -- name ) +HELP: { $values { "space" "a string" } { "tag" "a string" } { "url" "a string" } { "name" "an XML tag name" } } { $description "creates a name tuple with the name-space space and the tag-name tag and the tag-url url." } @@ -143,7 +143,7 @@ HELP: prolog { $class-description "represents an XML prolog, with the tuple fields version (containing \"1.0\" or \"1.1\"), encoding (a string representing the encoding type), and standalone (t or f, whether the document is standalone without external entities)" } { $see-also xml } ; -HELP: ( version encoding standalone -- prolog ) +HELP: { $values { "version" "a string, 1.0 or 1.1" } { "encoding" "a string" } { "standalone" "a boolean" } { "prolog" "an XML prolog" } } { $description "creates an XML prolog tuple" } @@ -153,7 +153,7 @@ HELP: comment { $class-description "represents a comment in XML. Has one slot, text, which contains the string of the comment" } { $see-also } ; -HELP: ( text -- comment ) +HELP: { $values { "text" "a string" } { "comment" "a comment" } } { $description "creates an XML comment tuple" } { $see-also comment } ; @@ -162,7 +162,7 @@ HELP: instruction { $class-description "represents an XML instruction, such as . Contains one slot, text, which contains the string between the question marks." } { $see-also } ; -HELP: ( text -- instruction ) +HELP: { $values { "text" "a string" } { "instruction" "an XML instruction" } } { $description "creates an XML parsing instruction, such as ." } { $see-also instruction } ; diff --git a/core/assocs/assocs.factor b/core/assocs/assocs.factor index 320e370ec9..17eab7f672 100644 --- a/core/assocs/assocs.factor +++ b/core/assocs/assocs.factor @@ -122,14 +122,14 @@ M: assoc assoc-clone-like ( assoc exemplar -- newassoc ) : remove-all ( assoc seq -- subseq ) swap [ key? not ] curry filter ; -: (substitute) +: substituter ( assoc -- quot ) [ dupd at* [ nip ] [ drop ] if ] curry ; inline : substitute-here ( seq assoc -- ) - (substitute) change-each ; + substituter change-each ; : substitute ( seq assoc -- newseq ) - (substitute) map ; + substituter map ; : cache ( key assoc quot -- value ) 2over at* [ diff --git a/core/bootstrap/primitives.factor b/core/bootstrap/primitives.factor index 6cc97531a4..b3c3cb88e4 100644 --- a/core/bootstrap/primitives.factor +++ b/core/bootstrap/primitives.factor @@ -287,11 +287,11 @@ tuple "((empty))" "hashtables.private" create "tombstone" "hashtables.private" lookup f -2array >tuple 1quotation define-inline +2array >tuple 1quotation (( -- value )) define-inline "((tombstone))" "hashtables.private" create "tombstone" "hashtables.private" lookup t -2array >tuple 1quotation define-inline +2array >tuple 1quotation (( -- value )) define-inline ! Some tuple classes "curry" "kernel" create diff --git a/core/checksums/crc32/crc32.factor b/core/checksums/crc32/crc32.factor index 7cff22de19..d373a96f39 100644 --- a/core/checksums/crc32/crc32.factor +++ b/core/checksums/crc32/crc32.factor @@ -24,9 +24,11 @@ SINGLETON: crc32 INSTANCE: crc32 checksum -: init-crc32 drop [ HEX: ffffffff dup ] dip ; inline +: init-crc32 ( input checksum -- x y input ) + drop [ HEX: ffffffff dup ] dip ; inline -: finish-crc32 bitxor 4 >be ; inline +: finish-crc32 ( x y -- bytes ) + bitxor 4 >be ; inline M: crc32 checksum-bytes init-crc32 diff --git a/core/classes/tuple/tuple.factor b/core/classes/tuple/tuple.factor index d9464399a9..3ee9b8e40b 100644 --- a/core/classes/tuple/tuple.factor +++ b/core/classes/tuple/tuple.factor @@ -290,6 +290,12 @@ M: tuple-class (define-tuple-class) tri* define-declared ] 3tri ; +: boa-effect ( class -- effect ) + [ all-slots [ name>> ] map ] [ name>> 1array ] bi ; + +: define-boa-word ( word class -- ) + [ [ boa ] curry ] [ boa-effect ] bi define-inline ; + M: tuple-class reset-class [ dup "slots" word-prop [ diff --git a/core/io/encodings/encodings.factor b/core/io/encodings/encodings.factor index d165ad3138..94d2115478 100644 --- a/core/io/encodings/encodings.factor +++ b/core/io/encodings/encodings.factor @@ -32,9 +32,9 @@ M: object f decoder boa ; >cr drop ; inline +: cr+ ( stream -- ) t >>cr drop ; inline -: cr- f >>cr drop ; inline +: cr- ( stream -- ) f >>cr drop ; inline : >decoder< ( decoder -- stream encoding ) [ stream>> ] [ code>> ] bi ; inline diff --git a/core/io/pathnames/pathnames-docs.factor b/core/io/pathnames/pathnames-docs.factor index 8ef0de86b7..020911e61f 100644 --- a/core/io/pathnames/pathnames-docs.factor +++ b/core/io/pathnames/pathnames-docs.factor @@ -57,8 +57,8 @@ HELP: normalize-path { $values { "str" "a pathname string" } { "newstr" "a new pathname string" } } { $description "Called by words such as " { $link } " and " { $link } " to prepare a pathname before passing it to underlying code." } ; -HELP: ( str -- pathname ) -{ $values { "str" "a pathname string" } { "pathname" pathname } } +HELP: +{ $values { "string" "a pathname string" } { "pathname" pathname } } { $description "Creates a new " { $link pathname } "." } ; HELP: home diff --git a/core/io/streams/c/c-docs.factor b/core/io/streams/c/c-docs.factor index a579153353..09dcb31458 100644 --- a/core/io/streams/c/c-docs.factor +++ b/core/io/streams/c/c-docs.factor @@ -20,12 +20,12 @@ ARTICLE: "io.streams.c" "ANSI C streams" ABOUT: "io.streams.c" -HELP: ( in -- stream ) +HELP: { $values { "in" "a C FILE* handle" } { "stream" "a new stream" } } { $description "Creates a stream which reads data by calling C standard library functions." } { $notes "Usually C streams are only used during bootstrap, and non-blocking OS-specific I/O routines are used during normal operation." } ; -HELP: ( out -- stream ) +HELP: { $values { "out" "a C FILE* handle" } { "stream" "a new stream" } } { $description "Creates a stream which writes data by calling C standard library functions." } { $notes "Usually C streams are only used during bootstrap, and non-blocking OS-specific I/O routines are used during normal operation." } ; diff --git a/core/layouts/layouts.factor b/core/layouts/layouts.factor index 9522aa5a0b..5a32ca2dce 100644 --- a/core/layouts/layouts.factor +++ b/core/layouts/layouts.factor @@ -37,11 +37,11 @@ SYMBOL: type-numbers : cell-bits ( -- n ) 8 cells ; inline -: bootstrap-cell \ cell get cell or ; inline +: bootstrap-cell ( -- n ) \ cell get cell or ; inline -: bootstrap-cells bootstrap-cell * ; inline +: bootstrap-cells ( m -- n ) bootstrap-cell * ; inline -: bootstrap-cell-bits 8 bootstrap-cells ; inline +: bootstrap-cell-bits ( -- n ) 8 bootstrap-cells ; inline : first-bignum ( -- n ) cell-bits (first-bignum) ; inline diff --git a/core/quotations/quotations.factor b/core/quotations/quotations.factor index 2df11d4858..2c3b41ca4e 100644 --- a/core/quotations/quotations.factor +++ b/core/quotations/quotations.factor @@ -7,9 +7,11 @@ IN: quotations diff --git a/core/sequences/sequences-docs.factor b/core/sequences/sequences-docs.factor index 7354759bb6..6e3a06da26 100644 --- a/core/sequences/sequences-docs.factor +++ b/core/sequences/sequences-docs.factor @@ -602,7 +602,7 @@ HELP: reverse { reverse reverse-here } related-words -HELP: ( seq -- reversed ) +HELP: { $values { "seq" sequence } { "reversed" "a new sequence" } } { $description "Creates an instance of the " { $link reversed } " class." } { $see-also "virtual-sequences" } ; @@ -649,7 +649,7 @@ HELP: HELP: repetition { $class-description "A virtual sequence consisting of " { $snippet "elt" } " repeated " { $snippet "len" } " times. Repetitions are created by calling " { $link } "." } ; -HELP: ( len elt -- repetition ) +HELP: { $values { "len" "a non-negative integer" } { "elt" object } { "repetition" repetition } } { $description "Creates a new " { $link repetition } "." } { $examples diff --git a/core/sequences/sequences.factor b/core/sequences/sequences.factor index 7bb509cb67..eda8091de9 100644 --- a/core/sequences/sequences.factor +++ b/core/sequences/sequences.factor @@ -101,16 +101,16 @@ M: integer nth-unsafe drop ; INSTANCE: integer immutable-sequence -: first-unsafe +: first-unsafe ( seq -- elt ) 0 swap nth-unsafe ; inline -: first2-unsafe +: first2-unsafe ( seq -- elt1 elt2 ) [ first-unsafe ] [ 1 swap nth-unsafe ] bi ; inline -: first3-unsafe +: first3-unsafe ( seq -- elt1 elt2 elt3 ) [ first2-unsafe ] [ 2 swap nth-unsafe ] bi ; inline -: first4-unsafe +: first4-unsafe ( seq -- elt1 elt2 elt3 elt4 ) [ first3-unsafe ] [ 3 swap nth-unsafe ] bi ; inline : exchange-unsafe ( m n seq -- ) @@ -123,15 +123,15 @@ INSTANCE: integer immutable-sequence : from-end [ dup length ] dip - ; inline -: (2sequence) +: (2sequence) ( obj1 obj2 seq -- seq ) tuck 1 swap set-nth-unsafe tuck 0 swap set-nth-unsafe ; inline -: (3sequence) +: (3sequence) ( obj1 obj2 obj3 seq -- seq ) tuck 2 swap set-nth-unsafe (2sequence) ; inline -: (4sequence) +: (4sequence) ( obj1 obj2 obj3 obj4 seq -- seq ) tuck 3 swap set-nth-unsafe (3sequence) ; inline diff --git a/core/slots/slots.factor b/core/slots/slots.factor index 438e604e78..99766cadc2 100644 --- a/core/slots/slots.factor +++ b/core/slots/slots.factor @@ -22,10 +22,6 @@ PREDICATE: writer < word "writer" word-prop ; [ drop define ] 3bi ; -: create-accessor ( name effect -- word ) - [ "accessors" create dup ] dip - "declared-effect" set-word-prop ; - : reader-quot ( slot-spec -- quot ) [ dup offset>> , @@ -35,7 +31,8 @@ PREDICATE: writer < word "writer" word-prop ; ] [ ] make ; : reader-word ( name -- word ) - ">>" append (( object -- value )) create-accessor + ">>" append "accessors" create + dup (( object -- value )) "declared-effect" set-word-prop dup t "reader" set-word-prop ; : reader-props ( slot-spec -- assoc ) @@ -50,7 +47,8 @@ PREDICATE: writer < word "writer" word-prop ; define-typecheck ; : writer-word ( name -- word ) - "(>>" ")" surround (( value object -- )) create-accessor + "(>>" ")" surround "accessors" create + dup (( value object -- )) "declared-effect" set-word-prop dup t "writer" set-word-prop ; ERROR: bad-slot-value value class ; @@ -95,15 +93,16 @@ ERROR: bad-slot-value value class ; define-typecheck ; : setter-word ( name -- word ) - ">>" prepend (( object value -- object )) create-accessor ; + ">>" prepend "accessors" create ; : define-setter ( name -- ) dup setter-word dup deferred? [ - [ \ over , swap writer-word , ] [ ] make define-inline + [ \ over , swap writer-word , ] [ ] make + (( object value -- object )) define-inline ] [ 2drop ] if ; : changer-word ( name -- word ) - "change-" prepend (( object quot -- object )) create-accessor ; + "change-" prepend "accessors" create ; : define-changer ( name -- ) dup changer-word dup deferred? [ @@ -112,7 +111,7 @@ ERROR: bad-slot-value value class ; over reader-word 1quotation [ dip call ] curry [ dip swap ] curry % swap setter-word , - ] [ ] make define-inline + ] [ ] make (( object quot -- object )) define-inline ] [ 2drop ] if ; : define-slot-methods ( class slot-spec -- ) diff --git a/core/sorting/sorting.factor b/core/sorting/sorting.factor index 47399b6176..938bf17cd2 100644 --- a/core/sorting/sorting.factor +++ b/core/sorting/sorting.factor @@ -42,15 +42,28 @@ TUPLE: merge ] if ] if ; inline -: l-elt [ from1>> ] [ seq>> ] bi nth-unsafe ; inline -: r-elt [ from2>> ] [ seq>> ] bi nth-unsafe ; inline -: l-done? [ from1>> ] [ to1>> ] bi number= ; inline -: r-done? [ from2>> ] [ to2>> ] bi number= ; inline -: dump-l [ [ from1>> ] [ to1>> ] [ seq>> ] tri ] [ accum>> ] bi dump ; inline -: dump-r [ [ from2>> ] [ to2>> ] [ seq>> ] tri ] [ accum>> ] bi dump ; inline -: l-next [ [ l-elt ] [ [ 1+ ] change-from1 drop ] bi ] [ accum>> ] bi push ; inline -: r-next [ [ r-elt ] [ [ 1+ ] change-from2 drop ] bi ] [ accum>> ] bi push ; inline -: decide [ [ l-elt ] [ r-elt ] bi ] dip call +gt+ eq? ; inline +: l-elt ( merge -- elt ) [ from1>> ] [ seq>> ] bi nth-unsafe ; inline + +: r-elt ( merge -- elt ) [ from2>> ] [ seq>> ] bi nth-unsafe ; inline + +: l-done? ( merge -- ? ) [ from1>> ] [ to1>> ] bi eq? ; inline + +: r-done? ( merge -- ? ) [ from2>> ] [ to2>> ] bi eq? ; inline + +: dump-l ( merge -- ) + [ [ from1>> ] [ to1>> ] [ seq>> ] tri ] [ accum>> ] bi dump ; inline + +: dump-r ( merge -- ) + [ [ from2>> ] [ to2>> ] [ seq>> ] tri ] [ accum>> ] bi dump ; inline + +: l-next ( merge -- ) + [ [ l-elt ] [ [ 1+ ] change-from1 drop ] bi ] [ accum>> ] bi push ; inline + +: r-next ( merge -- ) + [ [ r-elt ] [ [ 1+ ] change-from2 drop ] bi ] [ accum>> ] bi push ; inline + +: decide ( merge -- ? ) + [ [ l-elt ] [ r-elt ] bi ] dip call +gt+ eq? ; inline : (merge) ( merge quot: ( elt1 elt2 -- <=> ) -- ) over r-done? [ drop dump-l ] [ diff --git a/core/strings/strings.factor b/core/strings/strings.factor index 0c3f918fdc..7e4c80d4ae 100644 --- a/core/strings/strings.factor +++ b/core/strings/strings.factor @@ -7,11 +7,12 @@ IN: strings Date: Mon, 15 Dec 2008 19:46:43 -0600 Subject: [PATCH 11/58] Remove redundant call to normalize-path --- extra/graphics/bitmap/bitmap.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/graphics/bitmap/bitmap.factor b/extra/graphics/bitmap/bitmap.factor index 9bb8db0f6d..a0212e47de 100755 --- a/extra/graphics/bitmap/bitmap.factor +++ b/extra/graphics/bitmap/bitmap.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien arrays byte-arrays combinators summary io.backend +USING: alien arrays byte-arrays combinators summary graphics.viewer io io.binary io.files kernel libc math math.functions math.bitwise namespaces opengl opengl.gl prettyprint sequences strings ui ui.gadgets.panes fry @@ -91,7 +91,7 @@ M: bitmap-magic summary dup color-index-length read >>color-index drop ; : load-bitmap ( path -- bitmap ) - normalize-path binary [ + binary [ bitmap new dup parse-file-header dup parse-bitmap-header From 5662d5fda637e9b1791f0cd651cec21daf48bb5e Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Mon, 15 Dec 2008 19:50:25 -0600 Subject: [PATCH 12/58] bubble-chamber: Add small, medium, and large configurations like those on the complexification web site --- extra/bubble-chamber/bubble-chamber.factor | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/extra/bubble-chamber/bubble-chamber.factor b/extra/bubble-chamber/bubble-chamber.factor index d88c53c99f..7fe80ba138 100644 --- a/extra/bubble-chamber/bubble-chamber.factor +++ b/extra/bubble-chamber/bubble-chamber.factor @@ -504,6 +504,16 @@ M:: update-frame-buffer ( BUBBLE-CHAMBER -- ) : big-bang ( bubble-chamber -- bubble-chamber ) dup particles>> [ collide ] each ; +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: collide-one-of-each ( bubble-chamber -- bubble-chamber ) + dup + particles>> + [ [ ? ] filter random collide ] + [ [ ? ] filter random collide ] + [ [ ? ] filter random collide ] + tri ; + ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Some initial configurations ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -538,6 +548,60 @@ M:: update-frame-buffer ( BUBBLE-CHAMBER -- ) big-bang drop ; +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: small ( -- ) + new-gadget + { 200 200 } >>size + randomize-collision-theta + dup start-bubble-chamber-thread + dup "Bubble Chamber" open-window + + 42 [ muon add-particle ] times + 30 [ quark add-particle ] times + 21 [ hadron add-particle ] times + 7 [ axion add-particle ] times + + collide-one-of-each + + drop ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: medium ( -- ) + new-gadget + { 400 400 } >>size + randomize-collision-theta + dup start-bubble-chamber-thread + dup "Bubble Chamber" open-window + + 100 [ muon add-particle ] times + 81 [ quark add-particle ] times + 60 [ hadron add-particle ] times + 9 [ axion add-particle ] times + + collide-one-of-each + + drop ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: large ( -- ) + new-gadget + { 600 600 } >>size + randomize-collision-theta + dup start-bubble-chamber-thread + dup "Bubble Chamber" open-window + + 550 [ muon add-particle ] times + 339 [ quark add-particle ] times + 100 [ hadron add-particle ] times + 11 [ axion add-particle ] times + + collide-one-of-each + + drop ; + ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Experimental ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -575,3 +639,6 @@ M:: update-frame-buffer ( BUBBLE-CHAMBER -- ) 111 [ axion add-particle ] times dup particles>> [ collide randomize-collision-theta ] each drop ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + From 8ef2add3a1bc07877e92ed12664a93705eec8314 Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Mon, 15 Dec 2008 19:51:33 -0600 Subject: [PATCH 13/58] Add bubble-chamber.large runnable demo --- extra/bubble-chamber/large/large.factor | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 extra/bubble-chamber/large/large.factor diff --git a/extra/bubble-chamber/large/large.factor b/extra/bubble-chamber/large/large.factor new file mode 100644 index 0000000000..8520277749 --- /dev/null +++ b/extra/bubble-chamber/large/large.factor @@ -0,0 +1,8 @@ + +USING: ui bubble-chamber ; + +IN: bubble-chamber.large + +: main ( -- ) [ large ] with-ui ; + +MAIN: main \ No newline at end of file From 277ded8276e13b371d0778e53cb28ec8693f387e Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Mon, 15 Dec 2008 19:51:56 -0600 Subject: [PATCH 14/58] Add bubble-chamber.large tags file --- extra/bubble-chamber/large/tags.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 extra/bubble-chamber/large/tags.txt diff --git a/extra/bubble-chamber/large/tags.txt b/extra/bubble-chamber/large/tags.txt new file mode 100644 index 0000000000..cb5fc203e1 --- /dev/null +++ b/extra/bubble-chamber/large/tags.txt @@ -0,0 +1 @@ +demos From 8e3d38b2f87f8e1247cab10a51997d2acad7cd63 Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Mon, 15 Dec 2008 19:52:14 -0600 Subject: [PATCH 15/58] Add bubble-chamber.medium runnable demo --- extra/bubble-chamber/medium/medium.factor | 8 ++++++++ extra/bubble-chamber/medium/tags.txt | 1 + 2 files changed, 9 insertions(+) create mode 100644 extra/bubble-chamber/medium/medium.factor create mode 100644 extra/bubble-chamber/medium/tags.txt diff --git a/extra/bubble-chamber/medium/medium.factor b/extra/bubble-chamber/medium/medium.factor new file mode 100644 index 0000000000..35ee88ec0f --- /dev/null +++ b/extra/bubble-chamber/medium/medium.factor @@ -0,0 +1,8 @@ + +USING: ui bubble-chamber ; + +IN: bubble-chamber.medium + +: main ( -- ) [ medium ] with-ui ; + +MAIN: main \ No newline at end of file diff --git a/extra/bubble-chamber/medium/tags.txt b/extra/bubble-chamber/medium/tags.txt new file mode 100644 index 0000000000..cb5fc203e1 --- /dev/null +++ b/extra/bubble-chamber/medium/tags.txt @@ -0,0 +1 @@ +demos From 59cc36ba5253d388286ea322c8e986d3f1301d56 Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Mon, 15 Dec 2008 19:52:33 -0600 Subject: [PATCH 16/58] Add bubble-chamber.small runnable demo --- extra/bubble-chamber/small/small.factor | 8 ++++++++ extra/bubble-chamber/small/tags.txt | 1 + 2 files changed, 9 insertions(+) create mode 100644 extra/bubble-chamber/small/small.factor create mode 100644 extra/bubble-chamber/small/tags.txt diff --git a/extra/bubble-chamber/small/small.factor b/extra/bubble-chamber/small/small.factor new file mode 100644 index 0000000000..d02e3ac019 --- /dev/null +++ b/extra/bubble-chamber/small/small.factor @@ -0,0 +1,8 @@ + +USING: ui bubble-chamber ; + +IN: bubble-chamber.small + +: main ( -- ) [ small ] with-ui ; + +MAIN: main \ No newline at end of file diff --git a/extra/bubble-chamber/small/tags.txt b/extra/bubble-chamber/small/tags.txt new file mode 100644 index 0000000000..cb5fc203e1 --- /dev/null +++ b/extra/bubble-chamber/small/tags.txt @@ -0,0 +1 @@ +demos From 09c60f7e904b8b1e9204f92921114e58338da3ad Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 15 Dec 2008 20:31:55 -0600 Subject: [PATCH 17/58] Fix some vocabularies for new requirement that inline words have a stack effect declaration --- basis/cpu/ppc/assembler/assembler.factor | 22 +- basis/math/quaternions/quaternions.factor | 2 +- basis/nibble-arrays/nibble-arrays.factor | 2 +- basis/persistent/vectors/vectors.factor | 4 +- .../functor/functor.factor | 4 +- basis/vlists/vlists.factor | 3 +- basis/x11/xlib/xlib.factor | 208 +++++++++--------- basis/xmode/utilities/utilities.factor | 2 +- extra/benchmark/mandel/mandel.factor | 4 +- extra/benchmark/nbody/nbody.factor | 2 +- extra/formatting/formatting.factor | 2 +- extra/iokit/hid/hid.factor | 2 +- extra/math/trig/trig.factor | 4 +- extra/tetris/tetris.factor | 1 + unfinished/benchmark/richards/richards.factor | 14 +- 15 files changed, 139 insertions(+), 137 deletions(-) diff --git a/basis/cpu/ppc/assembler/assembler.factor b/basis/cpu/ppc/assembler/assembler.factor index f94cc00abc..6711c139b9 100644 --- a/basis/cpu/ppc/assembler/assembler.factor +++ b/basis/cpu/ppc/assembler/assembler.factor @@ -189,19 +189,19 @@ MTSPR: LR 8 MTSPR: CTR 9 ! Pseudo-instructions -: LI 0 rot ADDI ; inline -: SUBI neg ADDI ; inline -: LIS 0 rot ADDIS ; inline -: SUBIC neg ADDIC ; inline -: SUBIC. neg ADDIC. ; inline -: NOT dup NOR ; inline -: NOT. dup NOR. ; inline -: MR dup OR ; inline -: MR. dup OR. ; inline -: (SLWI) 0 31 pick - ; inline +: LI ( value dst -- ) 0 rot ADDI ; inline +: SUBI ( dst src1 src2 -- ) neg ADDI ; inline +: LIS ( value dst -- ) 0 rot ADDIS ; inline +: SUBIC ( dst src1 src2 -- ) neg ADDIC ; inline +: SUBIC. ( dst src1 src2 -- ) neg ADDIC. ; inline +: NOT ( dst src -- ) dup NOR ; inline +: NOT. ( dst src -- ) dup NOR. ; inline +: MR ( dst src -- ) dup OR ; inline +: MR. ( dst src -- ) dup OR. ; inline +: (SLWI) ( d a b -- d a b x y ) 0 31 pick - ; inline : SLWI ( d a b -- ) (SLWI) RLWINM ; : SLWI. ( d a b -- ) (SLWI) RLWINM. ; -: (SRWI) 32 over - swap 31 ; inline +: (SRWI) ( d a b -- d a b x y ) 32 over - swap 31 ; inline : SRWI ( d a b -- ) (SRWI) RLWINM ; : SRWI. ( d a b -- ) (SRWI) RLWINM. ; : LOAD32 ( n r -- ) >r w>h/h r> tuck LIS dup rot ORI ; diff --git a/basis/math/quaternions/quaternions.factor b/basis/math/quaternions/quaternions.factor index bb0d025dc6..bc6da9f564 100755 --- a/basis/math/quaternions/quaternions.factor +++ b/basis/math/quaternions/quaternions.factor @@ -10,7 +10,7 @@ IN: math.quaternions bytes 1 + 2/ ; inline +: nibbles>bytes ( m -- n ) 1 + 2/ ; inline : byte/nibble ( n -- shift n' ) [ 1 bitand 2 shift ] [ -1 shift ] bi ; inline diff --git a/basis/persistent/vectors/vectors.factor b/basis/persistent/vectors/vectors.factor index cd8e7c49e0..554db08e70 100644 --- a/basis/persistent/vectors/vectors.factor +++ b/basis/persistent/vectors/vectors.factor @@ -22,9 +22,9 @@ M: persistent-vector length count>> ; : node-size 32 ; inline -: node-mask node-size mod ; inline +: node-mask ( m -- n ) node-size mod ; inline -: node-shift -5 * shift ; inline +: node-shift ( m n -- x ) -5 * shift ; inline : node-nth ( i node -- obj ) [ node-mask ] [ children>> ] bi* nth ; diff --git a/basis/specialized-vectors/functor/functor.factor b/basis/specialized-vectors/functor/functor.factor index 8ba5354dc4..6069a4cb4a 100644 --- a/basis/specialized-vectors/functor/functor.factor +++ b/basis/specialized-vectors/functor/functor.factor @@ -18,7 +18,7 @@ WHERE TUPLE: V { underlying A } { length array-capacity } ; -: execute 0 V boa ; inline +: ( capacity -- vector ) execute 0 V boa ; inline M: V like drop dup V instance? [ @@ -31,7 +31,7 @@ M: A new-resizable drop execute ; M: V equal? over V instance? [ sequence= ] [ 2drop f ] if ; -: >V V new clone-like ; inline +: >V ( seq -- vector ) V new clone-like ; inline M: V pprint-delims drop V{ \ } ; diff --git a/basis/vlists/vlists.factor b/basis/vlists/vlists.factor index ea40594964..e4f64ca8f8 100644 --- a/basis/vlists/vlists.factor +++ b/basis/vlists/vlists.factor @@ -17,7 +17,8 @@ M: vlist nth-unsafe vector>> nth-unsafe ; vlist< [ length>> ] [ vector>> ] bi ; inline +: >vlist< ( vlist -- len vec ) + [ length>> ] [ vector>> ] bi ; inline : unshare ( len vec -- len vec' ) clone [ set-length ] 2keep ; inline diff --git a/basis/x11/xlib/xlib.factor b/basis/x11/xlib/xlib.factor index 1eee8307b1..07872fe576 100644 --- a/basis/x11/xlib/xlib.factor +++ b/basis/x11/xlib/xlib.factor @@ -13,7 +13,7 @@ USING: kernel arrays alien alien.c-types alien.strings alien.syntax math math.bitwise words sequences namespaces -continuations io io.encodings.ascii ; +continuations io io.encodings.ascii alias ; IN: x11.xlib LIBRARY: xlib @@ -50,17 +50,17 @@ TYPEDEF: ulong Time TYPEDEF: void* Window** TYPEDEF: void* Atom** -: ; inline -: ; inline -: ; inline -: ; inline -: ; inline +ALIAS: +ALIAS: +ALIAS: +ALIAS: +ALIAS: -: *XID *ulong ; inline -: *Window *XID ; inline -: *Drawable *XID ; inline -: *KeySym *XID ; inline -: *Atom *ulong ; inline +ALIAS: *XID *ulong +ALIAS: *Window *XID +ALIAS: *Drawable *XID +ALIAS: *KeySym *XID +ALIAS: *Atom *ulong ! ! 2 - Display Functions ! @@ -98,21 +98,21 @@ FUNCTION: int XCloseDisplay ( Display* display ) ; ! 3.2 - Window Attributes -: CWBackPixmap 1 0 shift ; inline -: CWBackPixel 1 1 shift ; inline -: CWBorderPixmap 1 2 shift ; inline -: CWBorderPixel 1 3 shift ; inline -: CWBitGravity 1 4 shift ; inline -: CWWinGravity 1 5 shift ; inline -: CWBackingStore 1 6 shift ; inline -: CWBackingPlanes 1 7 shift ; inline -: CWBackingPixel 1 8 shift ; inline -: CWOverrideRedirect 1 9 shift ; inline -: CWSaveUnder 1 10 shift ; inline -: CWEventMask 1 11 shift ; inline -: CWDontPropagate 1 12 shift ; inline -: CWColormap 1 13 shift ; inline -: CWCursor 1 14 shift ; inline +: CWBackPixmap ( -- n ) 0 2^ ; inline +: CWBackPixel ( -- n ) 1 2^ ; inline +: CWBorderPixmap ( -- n ) 2 2^ ; inline +: CWBorderPixel ( -- n ) 3 2^ ; inline +: CWBitGravity ( -- n ) 4 2^ ; inline +: CWWinGravity ( -- n ) 5 2^ ; inline +: CWBackingStore ( -- n ) 6 2^ ; inline +: CWBackingPlanes ( -- n ) 7 2^ ; inline +: CWBackingPixel ( -- n ) 8 2^ ; inline +: CWOverrideRedirect ( -- n ) 9 2^ ; inline +: CWSaveUnder ( -- n ) 10 2^ ; inline +: CWEventMask ( -- n ) 11 2^ ; inline +: CWDontPropagate ( -- n ) 12 2^ ; inline +: CWColormap ( -- n ) 13 2^ ; inline +: CWCursor ( -- n ) 14 2^ ; inline C-STRUCT: XSetWindowAttributes { "Pixmap" "background_pixmap" } @@ -161,13 +161,13 @@ FUNCTION: int XMapRaised ( Display* display, Window w ) ; ! 3.7 - Configuring Windows -: CWX 1 0 shift ; inline -: CWY 1 1 shift ; inline -: CWWidth 1 2 shift ; inline -: CWHeight 1 3 shift ; inline -: CWBorderWidth 1 4 shift ; inline -: CWSibling 1 5 shift ; inline -: CWStackMode 1 6 shift ; inline +: CWX ( -- n ) 0 2^ ; inline +: CWY ( -- n ) 1 2^ ; inline +: CWWidth ( -- n ) 2 2^ ; inline +: CWHeight ( -- n ) 3 2^ ; inline +: CWBorderWidth ( -- n ) 4 2^ ; inline +: CWSibling ( -- n ) 5 2^ ; inline +: CWStackMode ( -- n ) 6 2^ ; inline C-STRUCT: XWindowChanges { "int" "x" } @@ -312,29 +312,29 @@ FUNCTION: Colormap XCreateColormap ( Display* display, Window w, Visual* visual, ! 7 - Graphics Context Functions ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -: GCFunction 1 0 shift ; inline -: GCPlaneMask 1 1 shift ; inline -: GCForeground 1 2 shift ; inline -: GCBackground 1 3 shift ; inline -: GCLineWidth 1 4 shift ; inline -: GCLineStyle 1 5 shift ; inline -: GCCapStyle 1 6 shift ; inline -: GCJoinStyle 1 7 shift ; inline -: GCFillStyle 1 8 shift ; inline -: GCFillRule 1 9 shift ; inline -: GCTile 1 10 shift ; inline -: GCStipple 1 11 shift ; inline -: GCTileStipXOrigin 1 12 shift ; inline -: GCTileStipYOrigin 1 13 shift ; inline -: GCFont 1 14 shift ; inline -: GCSubwindowMode 1 15 shift ; inline -: GCGraphicsExposures 1 16 shift ; inline -: GCClipXOrigin 1 17 shift ; inline -: GCClipYOrigin 1 18 shift ; inline -: GCClipMask 1 19 shift ; inline -: GCDashOffset 1 20 shift ; inline -: GCDashList 1 21 shift ; inline -: GCArcMode 1 22 shift ; inline +: GCFunction ( -- n ) 0 2^ ; inline +: GCPlaneMask ( -- n ) 1 2^ ; inline +: GCForeground ( -- n ) 2 2^ ; inline +: GCBackground ( -- n ) 3 2^ ; inline +: GCLineWidth ( -- n ) 4 2^ ; inline +: GCLineStyle ( -- n ) 5 2^ ; inline +: GCCapStyle ( -- n ) 6 2^ ; inline +: GCJoinStyle ( -- n ) 7 2^ ; inline +: GCFillStyle ( -- n ) 8 2^ ; inline +: GCFillRule ( -- n ) 9 2^ ; inline +: GCTile ( -- n ) 10 2^ ; inline +: GCStipple ( -- n ) 11 2^ ; inline +: GCTileStipXOrigin ( -- n ) 12 2^ ; inline +: GCTileStipYOrigin ( -- n ) 13 2^ ; inline +: GCFont ( -- n ) 14 2^ ; inline +: GCSubwindowMode ( -- n ) 15 2^ ; inline +: GCGraphicsExposures ( -- n ) 16 2^ ; inline +: GCClipXOrigin ( -- n ) 17 2^ ; inline +: GCClipYOrigin ( -- n ) 18 2^ ; inline +: GCClipMask ( -- n ) 19 2^ ; inline +: GCDashOffset ( -- n ) 20 2^ ; inline +: GCDashList ( -- n ) 21 2^ ; inline +: GCArcMode ( -- n ) 22 2^ ; inline : GXclear HEX: 0 ; inline : GXand HEX: 1 ; inline @@ -505,32 +505,32 @@ FUNCTION: Status XKillClient ( Display* display, XID resource ) ; ! 10.3 - Event Masks -: NoEventMask 0 ; inline -: KeyPressMask 1 0 shift ; inline -: KeyReleaseMask 1 1 shift ; inline -: ButtonPressMask 1 2 shift ; inline -: ButtonReleaseMask 1 3 shift ; inline -: EnterWindowMask 1 4 shift ; inline -: LeaveWindowMask 1 5 shift ; inline -: PointerMotionMask 1 6 shift ; inline -: PointerMotionHintMask 1 7 shift ; inline -: Button1MotionMask 1 8 shift ; inline -: Button2MotionMask 1 9 shift ; inline -: Button3MotionMask 1 10 shift ; inline -: Button4MotionMask 1 11 shift ; inline -: Button5MotionMask 1 12 shift ; inline -: ButtonMotionMask 1 13 shift ; inline -: KeymapStateMask 1 14 shift ; inline -: ExposureMask 1 15 shift ; inline -: VisibilityChangeMask 1 16 shift ; inline -: StructureNotifyMask 1 17 shift ; inline -: ResizeRedirectMask 1 18 shift ; inline -: SubstructureNotifyMask 1 19 shift ; inline -: SubstructureRedirectMask 1 20 shift ; inline -: FocusChangeMask 1 21 shift ; inline -: PropertyChangeMask 1 22 shift ; inline -: ColormapChangeMask 1 23 shift ; inline -: OwnerGrabButtonMask 1 24 shift ; inline +: NoEventMask ( -- n ) 0 ; inline +: KeyPressMask ( -- n ) 0 2^ ; inline +: KeyReleaseMask ( -- n ) 1 2^ ; inline +: ButtonPressMask ( -- n ) 2 2^ ; inline +: ButtonReleaseMask ( -- n ) 3 2^ ; inline +: EnterWindowMask ( -- n ) 4 2^ ; inline +: LeaveWindowMask ( -- n ) 5 2^ ; inline +: PointerMotionMask ( -- n ) 6 2^ ; inline +: PointerMotionHintMask ( -- n ) 7 2^ ; inline +: Button1MotionMask ( -- n ) 8 2^ ; inline +: Button2MotionMask ( -- n ) 9 2^ ; inline +: Button3MotionMask ( -- n ) 10 2^ ; inline +: Button4MotionMask ( -- n ) 11 2^ ; inline +: Button5MotionMask ( -- n ) 12 2^ ; inline +: ButtonMotionMask ( -- n ) 13 2^ ; inline +: KeymapStateMask ( -- n ) 14 2^ ; inline +: ExposureMask ( -- n ) 15 2^ ; inline +: VisibilityChangeMask ( -- n ) 16 2^ ; inline +: StructureNotifyMask ( -- n ) 17 2^ ; inline +: ResizeRedirectMask ( -- n ) 18 2^ ; inline +: SubstructureNotifyMask ( -- n ) 19 2^ ; inline +: SubstructureRedirectMask ( -- n ) 20 2^ ; inline +: FocusChangeMask ( -- n ) 21 2^ ; inline +: PropertyChangeMask ( -- n ) 22 2^ ; inline +: ColormapChangeMask ( -- n ) 23 2^ ; inline +: OwnerGrabButtonMask ( -- n ) 24 2^ ; inline : KeyPress 2 ; inline : KeyRelease 3 ; inline @@ -584,20 +584,20 @@ C-STRUCT: XAnyEvent : Button4 4 ; inline : Button5 5 ; inline -: Button1Mask 1 8 shift ; inline -: Button2Mask 1 9 shift ; inline -: Button3Mask 1 10 shift ; inline -: Button4Mask 1 11 shift ; inline -: Button5Mask 1 12 shift ; inline +: Button1Mask ( -- n ) 1 8 shift ; inline +: Button2Mask ( -- n ) 1 9 shift ; inline +: Button3Mask ( -- n ) 1 10 shift ; inline +: Button4Mask ( -- n ) 1 11 shift ; inline +: Button5Mask ( -- n ) 1 12 shift ; inline -: ShiftMask 1 0 shift ; inline -: LockMask 1 1 shift ; inline -: ControlMask 1 2 shift ; inline -: Mod1Mask 1 3 shift ; inline -: Mod2Mask 1 4 shift ; inline -: Mod3Mask 1 5 shift ; inline -: Mod4Mask 1 6 shift ; inline -: Mod5Mask 1 7 shift ; inline +: ShiftMask ( -- n ) 1 0 shift ; inline +: LockMask ( -- n ) 1 1 shift ; inline +: ControlMask ( -- n ) 1 2 shift ; inline +: Mod1Mask ( -- n ) 1 3 shift ; inline +: Mod2Mask ( -- n ) 1 4 shift ; inline +: Mod3Mask ( -- n ) 1 5 shift ; inline +: Mod4Mask ( -- n ) 1 6 shift ; inline +: Mod5Mask ( -- n ) 1 7 shift ; inline C-STRUCT: XButtonEvent { "int" "type" } @@ -1321,15 +1321,15 @@ FUNCTION: int XBell ( Display* display, int percent ) ; ! !!! INPUT METHODS -: XIMPreeditArea HEX: 0001 ; -: XIMPreeditCallbacks HEX: 0002 ; -: XIMPreeditPosition HEX: 0004 ; -: XIMPreeditNothing HEX: 0008 ; -: XIMPreeditNone HEX: 0010 ; -: XIMStatusArea HEX: 0100 ; -: XIMStatusCallbacks HEX: 0200 ; -: XIMStatusNothing HEX: 0400 ; -: XIMStatusNone HEX: 0800 ; +: XIMPreeditArea HEX: 0001 ; inline +: XIMPreeditCallbacks HEX: 0002 ; inline +: XIMPreeditPosition HEX: 0004 ; inline +: XIMPreeditNothing HEX: 0008 ; inline +: XIMPreeditNone HEX: 0010 ; inline +: XIMStatusArea HEX: 0100 ; inline +: XIMStatusCallbacks HEX: 0200 ; inline +: XIMStatusNothing HEX: 0400 ; inline +: XIMStatusNone HEX: 0800 ; inline : XNVaNestedList "XNVaNestedList" ; : XNQueryInputStyle "queryInputStyle" ; diff --git a/basis/xmode/utilities/utilities.factor b/basis/xmode/utilities/utilities.factor index 23e4195158..69fc08742b 100644 --- a/basis/xmode/utilities/utilities.factor +++ b/basis/xmode/utilities/utilities.factor @@ -2,7 +2,7 @@ USING: accessors sequences assocs kernel quotations namespaces xml.data xml.utilities combinators macros parser lexer words fry ; IN: xmode.utilities -: implies [ not ] dip or ; inline +: implies ( x y -- z ) [ not ] dip or ; inline : child-tags ( tag -- seq ) children>> [ tag? ] filter ; diff --git a/extra/benchmark/mandel/mandel.factor b/extra/benchmark/mandel/mandel.factor index c501c35c6a..1da3d91c61 100755 --- a/extra/benchmark/mandel/mandel.factor +++ b/extra/benchmark/mandel/mandel.factor @@ -6,8 +6,8 @@ io.encodings.binary fry benchmark.mandel.params benchmark.mandel.colors ; IN: benchmark.mandel -: x-inc width 200000 zoom-fact * / ; inline -: y-inc height 150000 zoom-fact * / ; inline +: x-inc ( -- x ) width 200000 zoom-fact * / ; inline +: y-inc ( -- y ) height 150000 zoom-fact * / ; inline : c ( i j -- c ) [ x-inc * center real-part x-inc width 2 / * - + >float ] diff --git a/extra/benchmark/nbody/nbody.factor b/extra/benchmark/nbody/nbody.factor index 305fc2e33b..84c41ee69f 100644 --- a/extra/benchmark/nbody/nbody.factor +++ b/extra/benchmark/nbody/nbody.factor @@ -5,7 +5,7 @@ math.constants math.functions math.vectors prettyprint sequences hints arrays ; IN: benchmark.nbody -: solar-mass 4 pi sq * ; inline +: solar-mass ( -- x ) 4 pi sq * ; inline : days-per-year 365.24 ; inline TUPLE: body diff --git a/extra/formatting/formatting.factor b/extra/formatting/formatting.factor index 55ebfdf607..7dd8458488 100644 --- a/extra/formatting/formatting.factor +++ b/extra/formatting/formatting.factor @@ -113,7 +113,7 @@ MACRO: printf ( format-string -- ) time ( timestamp -- string ) [ hour>> ] [ minute>> ] [ second>> floor ] tri 3array diff --git a/extra/iokit/hid/hid.factor b/extra/iokit/hid/hid.factor index 11ba5d3687..465c55c833 100644 --- a/extra/iokit/hid/hid.factor +++ b/extra/iokit/hid/hid.factor @@ -53,7 +53,7 @@ IN: iokit.hid : kIOHIDElementDuplicateIndexKey "DuplicateIndex" ; inline : kIOHIDElementParentCollectionKey "ParentCollection" ; inline -: kIOHIDElementVendorSpecificKey +: kIOHIDElementVendorSpecificKey ( -- str ) cpu ppc? "VendorSpecifc" "VendorSpecific" ? ; inline : kIOHIDElementCookieMinKey "ElementCookieMin" ; inline diff --git a/extra/math/trig/trig.factor b/extra/math/trig/trig.factor index 3d9428adda..515d7c7b99 100644 --- a/extra/math/trig/trig.factor +++ b/extra/math/trig/trig.factor @@ -3,5 +3,5 @@ USING: math math.constants ; IN: math.trig -: deg>rad pi * 180 / ; inline -: rad>deg 180 * pi / ; inline +: deg>rad ( x -- y ) pi * 180 / ; inline +: rad>deg ( x -- y ) 180 * pi / ; inline diff --git a/extra/tetris/tetris.factor b/extra/tetris/tetris.factor index b200c4d735..5c819f6e69 100644 --- a/extra/tetris/tetris.factor +++ b/extra/tetris/tetris.factor @@ -25,6 +25,7 @@ M: tetris-gadget draw-gadget* ( gadget -- ) [ ] change-tetris ; tetris-gadget H{ + { T{ button-down f f 1 } [ request-focus ] } { T{ key-down f f "UP" } [ tetris>> rotate-right ] } { T{ key-down f f "d" } [ tetris>> rotate-left ] } { T{ key-down f f "f" } [ tetris>> rotate-right ] } diff --git a/unfinished/benchmark/richards/richards.factor b/unfinished/benchmark/richards/richards.factor index 894948e44f..90d4304eee 100644 --- a/unfinished/benchmark/richards/richards.factor +++ b/unfinished/benchmark/richards/richards.factor @@ -47,13 +47,13 @@ TUPLE: packet link id kind a1 a2 ; : HOLDBIT 4 ; inline : S_RUN 0 ; inline -: S_RUNPKT { PKTBIT } flags ; inline -: S_WAIT { WAITBIT } flags ; inline -: S_WAITPKT { WAITBIT PKTBIT } flags ; inline -: S_HOLD { HOLDBIT } flags ; inline -: S_HOLDPKT { HOLDBIT PKTBIT } flags ; inline -: S_HOLDWAIT { HOLDBIT WAITBIT } flags ; inline -: S_HOLDWAITPKT { HOLDBIT WAITBIT PKTBIT } flags ; inline +: S_RUNPKT ( -- n ) { PKTBIT } flags ; inline +: S_WAIT ( -- n ) { WAITBIT } flags ; inline +: S_WAITPKT ( -- n ) { WAITBIT PKTBIT } flags ; inline +: S_HOLD ( -- n ) { HOLDBIT } flags ; inline +: S_HOLDPKT ( -- n ) { HOLDBIT PKTBIT } flags ; inline +: S_HOLDWAIT ( -- n ) { HOLDBIT WAITBIT } flags ; inline +: S_HOLDWAITPKT ( -- n ) { HOLDBIT WAITBIT PKTBIT } flags ; inline : task-tab-size 10 ; inline From 53e3568fa3d60f16f6a3def533ea44899be76a99 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 15 Dec 2008 20:34:57 -0600 Subject: [PATCH 18/58] Remove >r/r> usage from x11 --- basis/x11/clipboard/clipboard.factor | 8 ++++---- basis/x11/events/events.factor | 18 +++++++++--------- basis/x11/windows/windows.factor | 15 ++++++++------- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/basis/x11/clipboard/clipboard.factor b/basis/x11/clipboard/clipboard.factor index 1612b7ec11..472488ddc2 100644 --- a/basis/x11/clipboard/clipboard.factor +++ b/basis/x11/clipboard/clipboard.factor @@ -22,14 +22,14 @@ TUPLE: x-clipboard atom contents ; "org.factorcode.Factor.SELECTION" x-atom ; : convert-selection ( win selection -- ) - swap >r >r dpy get r> XA_UTF8_STRING selection-property r> + swap [ [ dpy get ] dip XA_UTF8_STRING selection-property ] dip CurrentTime XConvertSelection drop ; : snarf-property ( prop-return -- string ) dup *void* [ *void* ascii alien>string ] [ drop f ] if ; : window-property ( win prop delete? -- string ) - >r dpy get -rot 0 -1 r> AnyPropertyType + [ [ dpy get ] 2dip 0 -1 ] dip AnyPropertyType 0 0 0 0 f [ XGetWindowProperty drop ] keep snarf-property ; @@ -58,7 +58,7 @@ TUPLE: x-clipboard atom contents ; dpy get swap [ XSelectionRequestEvent-requestor ] keep [ XSelectionRequestEvent-property ] keep - >r "TIMESTAMP" x-atom 32 PropModeReplace r> + [ "TIMESTAMP" x-atom 32 PropModeReplace ] dip XSelectionRequestEvent-time 1 XChangeProperty drop ; @@ -71,7 +71,7 @@ TUPLE: x-clipboard atom contents ; over XSelectionRequestEvent-selection over set-XSelectionEvent-selection over XSelectionRequestEvent-target over set-XSelectionEvent-target over XSelectionRequestEvent-time over set-XSelectionEvent-time - >r dpy get swap XSelectionRequestEvent-requestor 0 0 r> + [ dpy get swap XSelectionRequestEvent-requestor 0 0 ] dip XSendEvent drop flush-dpy ; diff --git a/basis/x11/events/events.factor b/basis/x11/events/events.factor index 0a389c8034..07650a9da7 100644 --- a/basis/x11/events/events.factor +++ b/basis/x11/events/events.factor @@ -36,12 +36,12 @@ GENERIC: selection-request-event ( event window -- ) GENERIC: client-event ( event window -- ) : next-event ( -- event ) - dpy get "XEvent" dup >r XNextEvent drop r> ; + dpy get "XEvent" [ XNextEvent drop ] keep ; : mask-event ( mask -- event ) - >r dpy get r> "XEvent" dup >r XMaskEvent drop r> ; + [ dpy get ] dip "XEvent" [ XMaskEvent drop ] keep ; -: events-queued ( mode -- n ) >r dpy get r> XEventsQueued ; +: events-queued ( mode -- n ) [ dpy get ] dip XEventsQueued ; : wheel? ( event -- ? ) XButtonEvent-button 4 7 between? ; @@ -71,15 +71,15 @@ GENERIC: client-event ( event window -- ) } case ; : configured-loc ( event -- dim ) - dup XConfigureEvent-x swap XConfigureEvent-y 2array ; + [ XConfigureEvent-x ] [ XConfigureEvent-y ] bi 2array ; : configured-dim ( event -- dim ) - dup XConfigureEvent-width swap XConfigureEvent-height 2array ; + [ XConfigureEvent-width ] [ XConfigureEvent-height ] bi 2array ; : mouse-event-loc ( event -- loc ) - dup XButtonEvent-x swap XButtonEvent-y 2array ; + [ XButtonEvent-x ] [ XButtonEvent-y ] bi 2array ; : close-box? ( event -- ? ) - dup XClientMessageEvent-message_type "WM_PROTOCOLS" x-atom = - swap XClientMessageEvent-data0 "WM_DELETE_WINDOW" x-atom = - and ; + [ XClientMessageEvent-message_type "WM_PROTOCOLS" x-atom = ] + [ XClientMessageEvent-data0 "WM_DELETE_WINDOW" x-atom = ] + bi and ; diff --git a/basis/x11/windows/windows.factor b/basis/x11/windows/windows.factor index 3c41a78584..67ece9d1c7 100644 --- a/basis/x11/windows/windows.factor +++ b/basis/x11/windows/windows.factor @@ -31,7 +31,7 @@ IN: x11.windows "XSetWindowAttributes" 0 over set-XSetWindowAttributes-background_pixel 0 over set-XSetWindowAttributes-border_pixel - [ >r create-colormap r> set-XSetWindowAttributes-colormap ] keep + [ [ create-colormap ] dip set-XSetWindowAttributes-colormap ] keep event-mask over set-XSetWindowAttributes-event_mask ; : set-size-hints ( window -- ) @@ -43,12 +43,13 @@ IN: x11.windows { 0 0 } = [ drop ] [ set-size-hints ] if ; : create-window ( loc dim visinfo -- window ) - pick >r - >r >r >r dpy get root get r> first2 r> { 1 1 } vmax first2 0 r> - [ XVisualInfo-depth InputOutput ] keep - [ XVisualInfo-visual create-window-mask ] keep - window-attributes XCreateWindow - dup r> auto-position ; + pick [ + [ [ [ dpy get root get ] dip first2 ] dip { 1 1 } vmax first2 0 ] dip + [ XVisualInfo-depth InputOutput ] keep + [ XVisualInfo-visual create-window-mask ] keep + window-attributes XCreateWindow + dup + ] dip auto-position ; : glx-window ( loc dim -- window glx ) GLX_DOUBLEBUFFER 1array choose-visual From c9e10e7b4afe2341a1f35c7e2ce393ffe61f91fe Mon Sep 17 00:00:00 2001 From: Aaron Schaefer Date: Mon, 15 Dec 2008 21:49:31 -0500 Subject: [PATCH 19/58] Update math.english with faster algorithm and new combinators --- extra/math/text/english/english.factor | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/extra/math/text/english/english.factor b/extra/math/text/english/english.factor index 41f19b9b07..643fc3ae05 100755 --- a/extra/math/text/english/english.factor +++ b/extra/math/text/english/english.factor @@ -32,23 +32,22 @@ SYMBOL: and-needed? 0 < "Negative " "" ? ; : 3digit-groups ( n -- seq ) - number>string 3 - [ reverse string>number ] map ; + [ dup 0 > ] [ 1000 /mod ] [ ] produce nip ; : hundreds-place ( n -- str ) - 100 /mod swap dup zero? [ + 100 /mod over 0 = [ 2drop "" ] [ - small-numbers " Hundred" append - swap zero? [ " and " append ] unless + [ small-numbers " Hundred" append ] dip + 0 = [ " and " append ] unless ] if ; : tens-place ( n -- str ) 100 mod dup 20 >= [ 10 /mod [ tens ] dip - dup zero? [ drop ] [ "-" swap small-numbers 3append ] if + dup 0 = [ drop ] [ small-numbers "-" glue ] if ] [ - dup zero? [ drop "" ] [ small-numbers ] if + dup 0 = [ drop "" ] [ small-numbers ] if ] if ; : 3digits>text ( n -- str ) @@ -59,15 +58,15 @@ SYMBOL: and-needed? [ " " glue ] unless-empty ; : append-with-conjunction ( str1 str2 -- newstr ) - over length zero? [ + over length 0 = [ nip ] [ - and-needed? get " and " ", " ? rot 3append - and-needed? off + swap and-needed? get " and " ", " ? + glue and-needed? off ] if ; : (recombine) ( str index seq -- newstr ) - 2dup nth zero? [ + 2dup nth 0 = [ 2drop ] [ text-with-scale append-with-conjunction From 3b83db3a0682c983dea245efc461962d5756d00d Mon Sep 17 00:00:00 2001 From: Aaron Schaefer Date: Mon, 15 Dec 2008 21:50:10 -0500 Subject: [PATCH 20/58] Fix vim-docs.factor after moving around io words --- basis/editors/vim/vim-docs.factor | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basis/editors/vim/vim-docs.factor b/basis/editors/vim/vim-docs.factor index cf42884084..3387dc5971 100644 --- a/basis/editors/vim/vim-docs.factor +++ b/basis/editors/vim/vim-docs.factor @@ -1,4 +1,5 @@ -USING: definitions help help.markup help.syntax io io.files editors words ; +USING: definitions editors help help.markup help.syntax io io.files + io.pathnames words ; IN: editors.vim ARTICLE: { "vim" "vim" } "Vim support" From 5a4511925242dfc6ca2fd5e60ce6b08a49240a3e Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 15 Dec 2008 20:55:24 -0600 Subject: [PATCH 21/58] Fix jit-dispatch on x86-64; was broken on windows --- basis/cpu/x86/bootstrap.factor | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/basis/cpu/x86/bootstrap.factor b/basis/cpu/x86/bootstrap.factor index 42fcfaa6a2..26488b8d95 100644 --- a/basis/cpu/x86/bootstrap.factor +++ b/basis/cpu/x86/bootstrap.factor @@ -79,9 +79,10 @@ big-endian off ! compute quotation location temp0 temp1 ADD ! load quotation - temp0 temp0 array-start-offset [+] MOV - ! execute branch - temp0 quot-xt-offset [+] JMP + arg temp0 array-start-offset [+] MOV + ! execute branch. the quot must be in arg, since it might + ! not be compiled yet + arg quot-xt-offset [+] JMP ] rc-absolute-cell rt-immediate 1 rex-length + jit-dispatch jit-define : jit->r ( -- ) From b5d98e6a1e9d8e165f9f8a7141dffeac704fab17 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 15 Dec 2008 21:19:04 -0600 Subject: [PATCH 22/58] Fix warning --- vm/os-windows.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vm/os-windows.h b/vm/os-windows.h index 227d44af77..c5a74e5b09 100755 --- a/vm/os-windows.h +++ b/vm/os-windows.h @@ -20,13 +20,14 @@ typedef wchar_t F_CHAR; #define STRNCMP wcsncmp #define STRDUP _wcsdup -#define CELL_FORMAT "%lu" #ifdef WIN64 + #define CELL_FORMAT "%Iu" #define CELL_HEX_FORMAT "%Ix" #define CELL_HEX_PAD_FORMAT "%016Ix" #define FIXNUM_FORMAT "%Id" #else + #define CELL_FORMAT "%lu" #define CELL_HEX_FORMAT "%lx" #define CELL_HEX_PAD_FORMAT "%08lx" #define FIXNUM_FORMAT "%ld" From de3a4f5462b6d9fdd4b662893932bc476f6fdc90 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 15 Dec 2008 21:20:32 -0600 Subject: [PATCH 23/58] Change some dup ... swap to bi and keep --- core/assocs/assocs.factor | 2 +- core/generic/standard/standard.factor | 2 +- core/hashtables/hashtables.factor | 2 +- core/sequences/sequences.factor | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/assocs/assocs.factor b/core/assocs/assocs.factor index 17eab7f672..748300ef0f 100644 --- a/core/assocs/assocs.factor +++ b/core/assocs/assocs.factor @@ -90,7 +90,7 @@ M: assoc assoc-clone-like ( assoc exemplar -- newassoc ) ] if ; inline recursive : assoc-stack ( key seq -- value ) - dup length 1- swap (assoc-stack) ; flushable + [ length 1- ] keep (assoc-stack) ; flushable : assoc-subset? ( assoc1 assoc2 -- ? ) [ swapd at* [ = ] [ 2drop f ] if ] curry assoc-all? ; diff --git a/core/generic/standard/standard.factor b/core/generic/standard/standard.factor index 300bd44fb4..9ace1a01f4 100644 --- a/core/generic/standard/standard.factor +++ b/core/generic/standard/standard.factor @@ -33,7 +33,7 @@ ERROR: no-method object generic ; ] change-at ; : flatten-method ( class method assoc -- ) - [ dup flatten-class keys swap ] 2dip [ + [ [ flatten-class keys ] keep ] 2dip [ [ spin ] dip push-method ] 3curry each ; diff --git a/core/hashtables/hashtables.factor b/core/hashtables/hashtables.factor index 8663f25a70..9268340c79 100644 --- a/core/hashtables/hashtables.factor +++ b/core/hashtables/hashtables.factor @@ -77,7 +77,7 @@ TUPLE: hashtable [ deleted>> 10 fixnum*fast ] [ count>> ] bi fixnum> ; inline : grow-hash ( hash -- ) - [ dup >alist swap assoc-size 1+ ] keep + [ [ >alist ] [ assoc-size 1+ ] bi ] keep [ reset-hash ] keep swap (rehash) ; inline diff --git a/core/sequences/sequences.factor b/core/sequences/sequences.factor index eda8091de9..80b2849f25 100644 --- a/core/sequences/sequences.factor +++ b/core/sequences/sequences.factor @@ -331,7 +331,7 @@ PRIVATE> over [ 2pusher [ each ] 2dip ] dip tuck [ like ] 2bi@ ; inline : monotonic? ( seq quot -- ? ) - [ dup length 1- swap ] dip (monotonic) all? ; inline + [ [ length 1- ] keep ] dip (monotonic) all? ; inline : interleave ( seq between quot -- ) - [ (interleave) ] 2curry [ dup length swap ] dip 2each ; inline + [ (interleave) ] 2curry [ [ length ] keep ] dip 2each ; inline : accumulator ( quot -- quot' vec ) V{ } clone [ [ push ] curry compose ] keep ; inline @@ -679,7 +679,7 @@ PRIVATE> From 400b2a0ccb1c48720cfa5901b0df4c8a22f1518a Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 15 Dec 2008 21:34:25 -0600 Subject: [PATCH 24/58] Add declaration to from-end --- core/sequences/sequences.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/sequences/sequences.factor b/core/sequences/sequences.factor index 80b2849f25..865a074ad3 100644 --- a/core/sequences/sequences.factor +++ b/core/sequences/sequences.factor @@ -121,7 +121,7 @@ INSTANCE: integer immutable-sequence : (tail) ( seq n -- from to seq ) over length rot ; inline -: from-end [ dup length ] dip - ; inline +: from-end ( seq n -- seq n' ) [ dup length ] dip - ; inline : (2sequence) ( obj1 obj2 seq -- seq ) tuck 1 swap set-nth-unsafe From fa3172f78ea11daaa6a7e95292b88393ba8c617e Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 15 Dec 2008 21:44:48 -0600 Subject: [PATCH 25/58] Fix formatting help-lint --- extra/formatting/formatting-docs.factor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extra/formatting/formatting-docs.factor b/extra/formatting/formatting-docs.factor index 4203dd891f..8db3567c23 100644 --- a/extra/formatting/formatting-docs.factor +++ b/extra/formatting/formatting-docs.factor @@ -111,9 +111,9 @@ HELP: strftime } } { $examples - { $example - "USING: calendar formatting ;" - "now \"%c\" strftime" + { $unchecked-example + "USING: calendar formatting io ;" + "now \"%c\" strftime print" "Mon Dec 15 14:40:43 2008" } } ; From f04e74f78fcca03cccdc7ad97a1ecd9402930125 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 15 Dec 2008 21:45:18 -0600 Subject: [PATCH 26/58] fix windows editors --- basis/editors/editpadlite/editpadlite.factor | 2 +- basis/editors/editpadpro/editpadpro.factor | 2 +- basis/editors/editplus/editplus.factor | 3 ++- basis/editors/emeditor/emeditor.factor | 3 ++- basis/editors/etexteditor/etexteditor.factor | 4 ++-- basis/editors/gvim/windows/windows.factor | 3 ++- basis/editors/notepad2/notepad2.factor | 4 ++-- basis/editors/notepadpp/notepadpp.factor | 2 +- basis/editors/scite/scite.factor | 2 +- basis/editors/ted-notepad/ted-notepad.factor | 2 +- basis/editors/textpad/authors.txt | 1 + basis/editors/textpad/summary.txt | 1 + basis/editors/textpad/textpad.factor | 16 ++++++++++++++++ basis/editors/ultraedit/ultraedit.factor | 2 +- basis/editors/wordpad/wordpad.factor | 2 +- 15 files changed, 35 insertions(+), 14 deletions(-) create mode 100644 basis/editors/textpad/authors.txt create mode 100644 basis/editors/textpad/summary.txt create mode 100644 basis/editors/textpad/textpad.factor diff --git a/basis/editors/editpadlite/editpadlite.factor b/basis/editors/editpadlite/editpadlite.factor index c002c2fa75..0ffb4f7d95 100644 --- a/basis/editors/editpadlite/editpadlite.factor +++ b/basis/editors/editpadlite/editpadlite.factor @@ -1,6 +1,6 @@ USING: definitions kernel parser words sequences math.parser namespaces editors io.launcher windows.shell32 io.files -io.paths.windows strings unicode.case make ; +io.directories.search.windows strings unicode.case make ; IN: editors.editpadlite : editpadlite-path ( -- path ) diff --git a/basis/editors/editpadpro/editpadpro.factor b/basis/editors/editpadpro/editpadpro.factor index 2a7f92f932..6c540b0e21 100644 --- a/basis/editors/editpadpro/editpadpro.factor +++ b/basis/editors/editpadpro/editpadpro.factor @@ -1,6 +1,6 @@ USING: definitions kernel parser words sequences math.parser namespaces editors io.launcher windows.shell32 io.files -io.paths.windows strings unicode.case make ; +io.directories.search.windows strings unicode.case make ; IN: editors.editpadpro : editpadpro-path ( -- path ) diff --git a/basis/editors/editplus/editplus.factor b/basis/editors/editplus/editplus.factor index 9fa477f51a..cfcc42dced 100644 --- a/basis/editors/editplus/editplus.factor +++ b/basis/editors/editplus/editplus.factor @@ -1,5 +1,6 @@ USING: editors io.files io.launcher kernel math.parser -namespaces sequences windows.shell32 make io.paths.windows ; +namespaces sequences windows.shell32 make +io.directories.search.windows ; IN: editors.editplus : editplus-path ( -- path ) diff --git a/basis/editors/emeditor/emeditor.factor b/basis/editors/emeditor/emeditor.factor index fc3deae670..f946095578 100644 --- a/basis/editors/emeditor/emeditor.factor +++ b/basis/editors/emeditor/emeditor.factor @@ -1,5 +1,6 @@ USING: editors io.files io.launcher kernel math.parser -namespaces sequences windows.shell32 make io.paths.windows ; +namespaces sequences windows.shell32 make +io.directories.search.windows ; IN: editors.emeditor : emeditor-path ( -- path ) diff --git a/basis/editors/etexteditor/etexteditor.factor b/basis/editors/etexteditor/etexteditor.factor index c4b3ad35c1..375559c20a 100755 --- a/basis/editors/etexteditor/etexteditor.factor +++ b/basis/editors/etexteditor/etexteditor.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Kibleur Christophe. ! See http://factorcode.org/license.txt for BSD license. -USING: editors io.files io.launcher kernel math.parser -namespaces sequences windows.shell32 io.paths.windows make ; +USING: editors io.files io.launcher kernel math.parser make +namespaces sequences windows.shell32 io.directories.search.windows ; IN: editors.etexteditor : etexteditor-path ( -- str ) diff --git a/basis/editors/gvim/windows/windows.factor b/basis/editors/gvim/windows/windows.factor index 1a6f8e902c..b574e7f824 100644 --- a/basis/editors/gvim/windows/windows.factor +++ b/basis/editors/gvim/windows/windows.factor @@ -1,5 +1,6 @@ USING: editors.gvim io.files kernel namespaces sequences -windows.shell32 io.paths.windows system ; +windows.shell32 io.directories.search.windows system +io.pathnames ; IN: editors.gvim.windows M: windows gvim-path diff --git a/basis/editors/notepad2/notepad2.factor b/basis/editors/notepad2/notepad2.factor index e22de4f68d..c21d5283dd 100644 --- a/basis/editors/notepad2/notepad2.factor +++ b/basis/editors/notepad2/notepad2.factor @@ -1,10 +1,10 @@ USING: editors io.files io.launcher kernel math.parser -namespaces sequences windows.shell32 make ; +namespaces sequences windows.shell32 make io.pathnames ; IN: editors.notepad2 : notepad2-path ( -- path ) \ notepad2-path get-global [ - "C:\\Windows\\system32\\notepad.exe" + windows-directory "system32\\notepad.exe" append-path ] unless* ; : notepad2 ( file line -- ) diff --git a/basis/editors/notepadpp/notepadpp.factor b/basis/editors/notepadpp/notepadpp.factor index d68008c2ca..5acaef10a7 100644 --- a/basis/editors/notepadpp/notepadpp.factor +++ b/basis/editors/notepadpp/notepadpp.factor @@ -1,5 +1,5 @@ USING: editors io.files io.launcher kernel math.parser -namespaces sequences io.paths.windows make ; +namespaces sequences io.directories.search.windows make ; IN: editors.notepadpp : notepadpp-path ( -- path ) diff --git a/basis/editors/scite/scite.factor b/basis/editors/scite/scite.factor index e0b48a3e72..3bfd764b06 100644 --- a/basis/editors/scite/scite.factor +++ b/basis/editors/scite/scite.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007 Clemens F. Hofreither. ! See http://factorcode.org/license.txt for BSD license. ! clemens.hofreither@gmx.net -USING: io.files io.launcher kernel namespaces io.paths.windows +USING: io.files io.launcher kernel namespaces io.directories.search.windows math math.parser editors sequences make unicode.case ; IN: editors.scite diff --git a/basis/editors/ted-notepad/ted-notepad.factor b/basis/editors/ted-notepad/ted-notepad.factor index 994dc60ba3..41f5ff5fa5 100644 --- a/basis/editors/ted-notepad/ted-notepad.factor +++ b/basis/editors/ted-notepad/ted-notepad.factor @@ -1,5 +1,5 @@ USING: editors io.files io.launcher kernel math.parser -namespaces sequences io.paths.windows make ; +namespaces sequences io.directories.search.windows make ; IN: editors.ted-notepad : ted-notepad-path ( -- path ) diff --git a/basis/editors/textpad/authors.txt b/basis/editors/textpad/authors.txt new file mode 100644 index 0000000000..7c1b2f2279 --- /dev/null +++ b/basis/editors/textpad/authors.txt @@ -0,0 +1 @@ +Doug Coleman diff --git a/basis/editors/textpad/summary.txt b/basis/editors/textpad/summary.txt new file mode 100644 index 0000000000..c8820501ae --- /dev/null +++ b/basis/editors/textpad/summary.txt @@ -0,0 +1 @@ +TextPad editor integration diff --git a/basis/editors/textpad/textpad.factor b/basis/editors/textpad/textpad.factor new file mode 100644 index 0000000000..4963eab66f --- /dev/null +++ b/basis/editors/textpad/textpad.factor @@ -0,0 +1,16 @@ +USING: editors io.files io.launcher kernel math.parser +namespaces sequences make io.directories.search +io.directories.search.windows ; +IN: editors.textpad + +: textpad-path ( -- path ) + \ textpad-path get-global [ + "TextPad 5" t [ "TextPad.exe" tail? ] find-in-program-files + ] unless* ; + +: textpad ( file line -- ) + [ + textpad-path , [ , ] [ number>string "(" ",0)" surround , ] bi* + ] { } make run-detached drop ; + +[ textpad ] edit-hook set-global diff --git a/basis/editors/ultraedit/ultraedit.factor b/basis/editors/ultraedit/ultraedit.factor index f1929ebf64..088d3cabbf 100644 --- a/basis/editors/ultraedit/ultraedit.factor +++ b/basis/editors/ultraedit/ultraedit.factor @@ -1,5 +1,5 @@ USING: editors io.files io.launcher kernel math.parser -namespaces sequences io.paths.windows make ; +namespaces sequences io.directories.search.windows make ; IN: editors.ultraedit : ultraedit-path ( -- path ) diff --git a/basis/editors/wordpad/wordpad.factor b/basis/editors/wordpad/wordpad.factor index fa0f6852dd..ef670d5d28 100644 --- a/basis/editors/wordpad/wordpad.factor +++ b/basis/editors/wordpad/wordpad.factor @@ -1,4 +1,4 @@ -USING: editors io.launcher kernel io.paths.windows +USING: editors io.launcher kernel io.directories.search.windows math.parser namespaces sequences io.files arrays ; IN: editors.wordpad From bc4b8c8dee324c3de0baf9561920c6240c19e481 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 15 Dec 2008 21:45:36 -0600 Subject: [PATCH 27/58] fix using and in, rename windows -> windows-directory in shell32 --- basis/io/directories/search/search.factor | 2 +- basis/io/directories/search/windows/windows.factor | 5 +++-- basis/windows/shell32/shell32.factor | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/basis/io/directories/search/search.factor b/basis/io/directories/search/search.factor index 17f8552c2b..137e919412 100755 --- a/basis/io/directories/search/search.factor +++ b/basis/io/directories/search/search.factor @@ -56,4 +56,4 @@ PRIVATE> : find-in-directories ( directories bfs? quot -- path' ) '[ _ _ find-file ] attempt-all ; inline -os windows? [ "io.paths.windows" require ] when +os windows? [ "io.directories.search.windows" require ] when diff --git a/basis/io/directories/search/windows/windows.factor b/basis/io/directories/search/windows/windows.factor index b9ef53f4f5..91a4afd20d 100644 --- a/basis/io/directories/search/windows/windows.factor +++ b/basis/io/directories/search/windows/windows.factor @@ -1,7 +1,8 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: arrays fry io.pathnames kernel sequences windows.shell32 ; -IN: io.paths +USING: arrays fry io.pathnames kernel sequences windows.shell32 +io.directories.search ; +IN: io.directories.search.windows : program-files-directories ( -- array ) program-files program-files-x86 2array ; inline diff --git a/basis/windows/shell32/shell32.factor b/basis/windows/shell32/shell32.factor index 13d71f1ff3..9fe83840e4 100644 --- a/basis/windows/shell32/shell32.factor +++ b/basis/windows/shell32/shell32.factor @@ -105,7 +105,7 @@ FUNCTION: HINSTANCE ShellExecuteW ( HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFi : application-data ( -- str ) CSIDL_APPDATA shell32-directory ; -: windows ( -- str ) +: windows-directory ( -- str ) CSIDL_WINDOWS shell32-directory ; : programs ( -- str ) From 1ae5a3e08e651bfd4d4ef27786f70440d3bcdd20 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 15 Dec 2008 21:52:53 -0600 Subject: [PATCH 28/58] use CONSTANT: and fix compile errors --- basis/windows/shell32/shell32.factor | 219 +++++++++++++-------------- 1 file changed, 109 insertions(+), 110 deletions(-) diff --git a/basis/windows/shell32/shell32.factor b/basis/windows/shell32/shell32.factor index 9fe83840e4..1282d3b9a5 100644 --- a/basis/windows/shell32/shell32.factor +++ b/basis/windows/shell32/shell32.factor @@ -3,87 +3,87 @@ USING: alien alien.c-types alien.strings alien.syntax combinators io.encodings.utf16n io.files io.pathnames kernel windows windows.com windows.com.syntax windows.ole32 -windows.user32 ; +windows.user32 constants alias ; IN: windows.shell32 -: CSIDL_DESKTOP HEX: 00 ; inline -: CSIDL_INTERNET HEX: 01 ; inline -: CSIDL_PROGRAMS HEX: 02 ; inline -: CSIDL_CONTROLS HEX: 03 ; inline -: CSIDL_PRINTERS HEX: 04 ; inline -: CSIDL_PERSONAL HEX: 05 ; inline -: CSIDL_FAVORITES HEX: 06 ; inline -: CSIDL_STARTUP HEX: 07 ; inline -: CSIDL_RECENT HEX: 08 ; inline -: CSIDL_SENDTO HEX: 09 ; inline -: CSIDL_BITBUCKET HEX: 0a ; inline -: CSIDL_STARTMENU HEX: 0b ; inline -: CSIDL_MYDOCUMENTS HEX: 0c ; inline -: CSIDL_MYMUSIC HEX: 0d ; inline -: CSIDL_MYVIDEO HEX: 0e ; inline -: CSIDL_DESKTOPDIRECTORY HEX: 10 ; inline -: CSIDL_DRIVES HEX: 11 ; inline -: CSIDL_NETWORK HEX: 12 ; inline -: CSIDL_NETHOOD HEX: 13 ; inline -: CSIDL_FONTS HEX: 14 ; inline -: CSIDL_TEMPLATES HEX: 15 ; inline -: CSIDL_COMMON_STARTMENU HEX: 16 ; inline -: CSIDL_COMMON_PROGRAMS HEX: 17 ; inline -: CSIDL_COMMON_STARTUP HEX: 18 ; inline -: CSIDL_COMMON_DESKTOPDIRECTORY HEX: 19 ; inline -: CSIDL_APPDATA HEX: 1a ; inline -: CSIDL_PRINTHOOD HEX: 1b ; inline -: CSIDL_LOCAL_APPDATA HEX: 1c ; inline -: CSIDL_ALTSTARTUP HEX: 1d ; inline -: CSIDL_COMMON_ALTSTARTUP HEX: 1e ; inline -: CSIDL_COMMON_FAVORITES HEX: 1f ; inline -: CSIDL_INTERNET_CACHE HEX: 20 ; inline -: CSIDL_COOKIES HEX: 21 ; inline -: CSIDL_HISTORY HEX: 22 ; inline -: CSIDL_COMMON_APPDATA HEX: 23 ; inline -: CSIDL_WINDOWS HEX: 24 ; inline -: CSIDL_SYSTEM HEX: 25 ; inline -: CSIDL_PROGRAM_FILES HEX: 26 ; inline -: CSIDL_MYPICTURES HEX: 27 ; inline -: CSIDL_PROFILE HEX: 28 ; inline -: CSIDL_SYSTEMX86 HEX: 29 ; inline -: CSIDL_PROGRAM_FILESX86 HEX: 2a ; inline -: CSIDL_PROGRAM_FILES_COMMON HEX: 2b ; inline -: CSIDL_PROGRAM_FILES_COMMONX86 HEX: 2c ; inline -: CSIDL_COMMON_TEMPLATES HEX: 2d ; inline -: CSIDL_COMMON_DOCUMENTS HEX: 2e ; inline -: CSIDL_COMMON_ADMINTOOLS HEX: 2f ; inline -: CSIDL_ADMINTOOLS HEX: 30 ; inline -: CSIDL_CONNECTIONS HEX: 31 ; inline -: CSIDL_COMMON_MUSIC HEX: 35 ; inline -: CSIDL_COMMON_PICTURES HEX: 36 ; inline -: CSIDL_COMMON_VIDEO HEX: 37 ; inline -: CSIDL_RESOURCES HEX: 38 ; inline -: CSIDL_RESOURCES_LOCALIZED HEX: 39 ; inline -: CSIDL_COMMON_OEM_LINKS HEX: 3a ; inline -: CSIDL_CDBURN_AREA HEX: 3b ; inline -: CSIDL_COMPUTERSNEARME HEX: 3d ; inline -: CSIDL_PROFILES HEX: 3e ; inline -: CSIDL_FOLDER_MASK HEX: ff ; inline -: CSIDL_FLAG_PER_USER_INIT HEX: 800 ; inline -: CSIDL_FLAG_NO_ALIAS HEX: 1000 ; inline -: CSIDL_FLAG_DONT_VERIFY HEX: 4000 ; inline -: CSIDL_FLAG_CREATE HEX: 8000 ; inline -: CSIDL_FLAG_MASK HEX: ff00 ; inline +CONSTANT: CSIDL_DESKTOP HEX: 00 +CONSTANT: CSIDL_INTERNET HEX: 01 +CONSTANT: CSIDL_PROGRAMS HEX: 02 +CONSTANT: CSIDL_CONTROLS HEX: 03 +CONSTANT: CSIDL_PRINTERS HEX: 04 +CONSTANT: CSIDL_PERSONAL HEX: 05 +CONSTANT: CSIDL_FAVORITES HEX: 06 +CONSTANT: CSIDL_STARTUP HEX: 07 +CONSTANT: CSIDL_RECENT HEX: 08 +CONSTANT: CSIDL_SENDTO HEX: 09 +CONSTANT: CSIDL_BITBUCKET HEX: 0a +CONSTANT: CSIDL_STARTMENU HEX: 0b +CONSTANT: CSIDL_MYDOCUMENTS HEX: 0c +CONSTANT: CSIDL_MYMUSIC HEX: 0d +CONSTANT: CSIDL_MYVIDEO HEX: 0e +CONSTANT: CSIDL_DESKTOPDIRECTORY HEX: 10 +CONSTANT: CSIDL_DRIVES HEX: 11 +CONSTANT: CSIDL_NETWORK HEX: 12 +CONSTANT: CSIDL_NETHOOD HEX: 13 +CONSTANT: CSIDL_FONTS HEX: 14 +CONSTANT: CSIDL_TEMPLATES HEX: 15 +CONSTANT: CSIDL_COMMON_STARTMENU HEX: 16 +CONSTANT: CSIDL_COMMON_PROGRAMS HEX: 17 +CONSTANT: CSIDL_COMMON_STARTUP HEX: 18 +CONSTANT: CSIDL_COMMON_DESKTOPDIRECTORY HEX: 19 +CONSTANT: CSIDL_APPDATA HEX: 1a +CONSTANT: CSIDL_PRINTHOOD HEX: 1b +CONSTANT: CSIDL_LOCAL_APPDATA HEX: 1c +CONSTANT: CSIDL_ALTSTARTUP HEX: 1d +CONSTANT: CSIDL_COMMON_ALTSTARTUP HEX: 1e +CONSTANT: CSIDL_COMMON_FAVORITES HEX: 1f +CONSTANT: CSIDL_INTERNET_CACHE HEX: 20 +CONSTANT: CSIDL_COOKIES HEX: 21 +CONSTANT: CSIDL_HISTORY HEX: 22 +CONSTANT: CSIDL_COMMON_APPDATA HEX: 23 +CONSTANT: CSIDL_WINDOWS HEX: 24 +CONSTANT: CSIDL_SYSTEM HEX: 25 +CONSTANT: CSIDL_PROGRAM_FILES HEX: 26 +CONSTANT: CSIDL_MYPICTURES HEX: 27 +CONSTANT: CSIDL_PROFILE HEX: 28 +CONSTANT: CSIDL_SYSTEMX86 HEX: 29 +CONSTANT: CSIDL_PROGRAM_FILESX86 HEX: 2a +CONSTANT: CSIDL_PROGRAM_FILES_COMMON HEX: 2b +CONSTANT: CSIDL_PROGRAM_FILES_COMMONX86 HEX: 2c +CONSTANT: CSIDL_COMMON_TEMPLATES HEX: 2d +CONSTANT: CSIDL_COMMON_DOCUMENTS HEX: 2e +CONSTANT: CSIDL_COMMON_ADMINTOOLS HEX: 2f +CONSTANT: CSIDL_ADMINTOOLS HEX: 30 +CONSTANT: CSIDL_CONNECTIONS HEX: 31 +CONSTANT: CSIDL_COMMON_MUSIC HEX: 35 +CONSTANT: CSIDL_COMMON_PICTURES HEX: 36 +CONSTANT: CSIDL_COMMON_VIDEO HEX: 37 +CONSTANT: CSIDL_RESOURCES HEX: 38 +CONSTANT: CSIDL_RESOURCES_LOCALIZED HEX: 39 +CONSTANT: CSIDL_COMMON_OEM_LINKS HEX: 3a +CONSTANT: CSIDL_CDBURN_AREA HEX: 3b +CONSTANT: CSIDL_COMPUTERSNEARME HEX: 3d +CONSTANT: CSIDL_PROFILES HEX: 3e +CONSTANT: CSIDL_FOLDER_MASK HEX: ff +CONSTANT: CSIDL_FLAG_PER_USER_INIT HEX: 800 +CONSTANT: CSIDL_FLAG_NO_ALIAS HEX: 1000 +CONSTANT: CSIDL_FLAG_DONT_VERIFY HEX: 4000 +CONSTANT: CSIDL_FLAG_CREATE HEX: 8000 +CONSTANT: CSIDL_FLAG_MASK HEX: ff00 -: ERROR_FILE_NOT_FOUND 2 ; inline +CONSTANT: ERROR_FILE_NOT_FOUND 2 -: SHGFP_TYPE_CURRENT 0 ; inline -: SHGFP_TYPE_DEFAULT 1 ; inline +CONSTANT: SHGFP_TYPE_CURRENT 0 +CONSTANT: SHGFP_TYPE_DEFAULT 1 LIBRARY: shell32 FUNCTION: HRESULT SHGetFolderPathW ( HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPTSTR pszPath ) ; -: SHGetFolderPath SHGetFolderPathW ; inline +ALIAS: SHGetFolderPath SHGetFolderPathW FUNCTION: HINSTANCE ShellExecuteW ( HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory, INT nShowCmd ) ; -: ShellExecute ShellExecuteW ; inline +ALIAS: ShellExecute ShellExecuteW : open-in-explorer ( dir -- ) f "open" rot (normalize-path) f f SW_SHOWNORMAL ShellExecute drop ; @@ -123,50 +123,50 @@ FUNCTION: HINSTANCE ShellExecuteW ( HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFi : program-files-common-x86 ( -- str ) CSIDL_PROGRAM_FILES_COMMONX86 shell32-directory ; -: SHCONTF_FOLDERS 32 ; inline -: SHCONTF_NONFOLDERS 64 ; inline -: SHCONTF_INCLUDEHIDDEN 128 ; inline -: SHCONTF_INIT_ON_FIRST_NEXT 256 ; inline -: SHCONTF_NETPRINTERSRCH 512 ; inline -: SHCONTF_SHAREABLE 1024 ; inline -: SHCONTF_STORAGE 2048 ; inline +CONSTANT: SHCONTF_FOLDERS 32 +CONSTANT: SHCONTF_NONFOLDERS 64 +CONSTANT: SHCONTF_INCLUDEHIDDEN 128 +CONSTANT: SHCONTF_INIT_ON_FIRST_NEXT 256 +CONSTANT: SHCONTF_NETPRINTERSRCH 512 +CONSTANT: SHCONTF_SHAREABLE 1024 +CONSTANT: SHCONTF_STORAGE 2048 TYPEDEF: DWORD SHCONTF -: SHGDN_NORMAL 0 ; inline -: SHGDN_INFOLDER 1 ; inline -: SHGDN_FOREDITING HEX: 1000 ; inline -: SHGDN_INCLUDE_NONFILESYS HEX: 2000 ; inline -: SHGDN_FORADDRESSBAR HEX: 4000 ; inline -: SHGDN_FORPARSING HEX: 8000 ; inline +CONSTANT: SHGDN_NORMAL 0 +CONSTANT: SHGDN_INFOLDER 1 +CONSTANT: SHGDN_FOREDITING HEX: 1000 +CONSTANT: SHGDN_INCLUDE_NONFILESYS HEX: 2000 +CONSTANT: SHGDN_FORADDRESSBAR HEX: 4000 +CONSTANT: SHGDN_FORPARSING HEX: 8000 TYPEDEF: DWORD SHGDNF -: SFGAO_CANCOPY DROPEFFECT_COPY ; inline -: SFGAO_CANMOVE DROPEFFECT_MOVE ; inline -: SFGAO_CANLINK DROPEFFECT_LINK ; inline -: SFGAO_CANRENAME HEX: 00000010 ; inline -: SFGAO_CANDELETE HEX: 00000020 ; inline -: SFGAO_HASPROPSHEET HEX: 00000040 ; inline -: SFGAO_DROPTARGET HEX: 00000100 ; inline -: SFGAO_CAPABILITYMASK HEX: 00000177 ; inline -: SFGAO_LINK HEX: 00010000 ; inline -: SFGAO_SHARE HEX: 00020000 ; inline -: SFGAO_READONLY HEX: 00040000 ; inline -: SFGAO_GHOSTED HEX: 00080000 ; inline -: SFGAO_HIDDEN HEX: 00080000 ; inline -: SFGAO_DISPLAYATTRMASK HEX: 000F0000 ; inline -: SFGAO_FILESYSANCESTOR HEX: 10000000 ; inline -: SFGAO_FOLDER HEX: 20000000 ; inline -: SFGAO_FILESYSTEM HEX: 40000000 ; inline -: SFGAO_HASSUBFOLDER HEX: 80000000 ; inline -: SFGAO_CONTENTSMASK HEX: 80000000 ; inline -: SFGAO_VALIDATE HEX: 01000000 ; inline -: SFGAO_REMOVABLE HEX: 02000000 ; inline -: SFGAO_COMPRESSED HEX: 04000000 ; inline -: SFGAO_BROWSABLE HEX: 08000000 ; inline -: SFGAO_NONENUMERATED HEX: 00100000 ; inline -: SFGAO_NEWCONTENT HEX: 00200000 ; inline +ALIAS: SFGAO_CANCOPY DROPEFFECT_COPY +ALIAS: SFGAO_CANMOVE DROPEFFECT_MOVE +ALIAS: SFGAO_CANLINK DROPEFFECT_LINK +CONSTANT: SFGAO_CANRENAME HEX: 00000010 +CONSTANT: SFGAO_CANDELETE HEX: 00000020 +CONSTANT: SFGAO_HASPROPSHEET HEX: 00000040 +CONSTANT: SFGAO_DROPTARGET HEX: 00000100 +CONSTANT: SFGAO_CAPABILITYMASK HEX: 00000177 +CONSTANT: SFGAO_LINK HEX: 00010000 +CONSTANT: SFGAO_SHARE HEX: 00020000 +CONSTANT: SFGAO_READONLY HEX: 00040000 +CONSTANT: SFGAO_GHOSTED HEX: 00080000 +CONSTANT: SFGAO_HIDDEN HEX: 00080000 +CONSTANT: SFGAO_DISPLAYATTRMASK HEX: 000F0000 +CONSTANT: SFGAO_FILESYSANCESTOR HEX: 10000000 +CONSTANT: SFGAO_FOLDER HEX: 20000000 +CONSTANT: SFGAO_FILESYSTEM HEX: 40000000 +CONSTANT: SFGAO_HASSUBFOLDER HEX: 80000000 +CONSTANT: SFGAO_CONTENTSMASK HEX: 80000000 +CONSTANT: SFGAO_VALIDATE HEX: 01000000 +CONSTANT: SFGAO_REMOVABLE HEX: 02000000 +CONSTANT: SFGAO_COMPRESSED HEX: 04000000 +CONSTANT: SFGAO_BROWSABLE HEX: 08000000 +CONSTANT: SFGAO_NONENUMERATED HEX: 00100000 +CONSTANT: SFGAO_NEWCONTENT HEX: 00200000 TYPEDEF: ULONG SFGAOF @@ -223,5 +223,4 @@ COM-INTERFACE: IShellFolder IUnknown {000214E6-0000-0000-C000-000000000046} FUNCTION: HRESULT SHGetDesktopFolder ( IShellFolder** ppshf ) ; FUNCTION: UINT DragQueryFileW ( HDROP hDrop, UINT iFile, LPWSTR lpszFile, UINT cch ) ; -: DragQueryFile DragQueryFileW ; inline - +ALIAS: DragQueryFile DragQueryFileW From 0655a06a7c00198a5e3bed313f801bfb38826c0c Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 15 Dec 2008 21:56:44 -0600 Subject: [PATCH 29/58] use CONSTANT: and fix compile errors --- basis/windows/advapi32/advapi32.factor | 182 ++++++++++++------------- 1 file changed, 91 insertions(+), 91 deletions(-) diff --git a/basis/windows/advapi32/advapi32.factor b/basis/windows/advapi32/advapi32.factor index 251b59a4d8..0d95c06a87 100644 --- a/basis/windows/advapi32/advapi32.factor +++ b/basis/windows/advapi32/advapi32.factor @@ -1,65 +1,65 @@ -USING: alias alien.syntax kernel math windows.types math.bitwise ; +USING: alias alien.syntax kernel math windows.types math.bitwise +constants ; IN: windows.advapi32 LIBRARY: advapi32 -: PROV_RSA_FULL 1 ; inline -: PROV_RSA_SIG 2 ; inline -: PROV_DSS 3 ; inline -: PROV_FORTEZZA 4 ; inline -: PROV_MS_EXCHANGE 5 ; inline -: PROV_SSL 6 ; inline -: PROV_RSA_SCHANNEL 12 ; inline -: PROV_DSS_DH 13 ; inline -: PROV_EC_ECDSA_SIG 14 ; inline -: PROV_EC_ECNRA_SIG 15 ; inline -: PROV_EC_ECDSA_FULL 16 ; inline -: PROV_EC_ECNRA_FULL 17 ; inline -: PROV_DH_SCHANNEL 18 ; inline -: PROV_SPYRUS_LYNKS 20 ; inline -: PROV_RNG 21 ; inline -: PROV_INTEL_SEC 22 ; inline -: PROV_REPLACE_OWF 23 ; inline -: PROV_RSA_AES 24 ; inline +CONSTANT: PROV_RSA_FULL 1 +CONSTANT: PROV_RSA_SIG 2 +CONSTANT: PROV_DSS 3 +CONSTANT: PROV_FORTEZZA 4 +CONSTANT: PROV_MS_EXCHANGE 5 +CONSTANT: PROV_SSL 6 +CONSTANT: PROV_RSA_SCHANNEL 12 +CONSTANT: PROV_DSS_DH 13 +CONSTANT: PROV_EC_ECDSA_SIG 14 +CONSTANT: PROV_EC_ECNRA_SIG 15 +CONSTANT: PROV_EC_ECDSA_FULL 16 +CONSTANT: PROV_EC_ECNRA_FULL 17 +CONSTANT: PROV_DH_SCHANNEL 18 +CONSTANT: PROV_SPYRUS_LYNKS 20 +CONSTANT: PROV_RNG 21 +CONSTANT: PROV_INTEL_SEC 22 +CONSTANT: PROV_REPLACE_OWF 23 +CONSTANT: PROV_RSA_AES 24 -: MS_DEF_DH_SCHANNEL_PROV - "Microsoft DH Schannel Cryptographic Provider" ; inline +CONSTANT: MS_DEF_DH_SCHANNEL_PROV "Microsoft DH Schannel Cryptographic Provider" -: MS_DEF_DSS_DH_PROV - "Microsoft Base DSS and Diffie-Hellman Cryptographic Provider" ; inline +CONSTANT: MS_DEF_DSS_DH_PROV + "Microsoft Base DSS and Diffie-Hellman Cryptographic Provider" -: MS_DEF_DSS_PROV - "Microsoft Base DSS Cryptographic Provider" ; inline +CONSTANT: MS_DEF_DSS_PROV + "Microsoft Base DSS Cryptographic Provider" -: MS_DEF_PROV - "Microsoft Base Cryptographic Provider v1.0" ; inline +CONSTANT: MS_DEF_PROV + "Microsoft Base Cryptographic Provider v1.0" -: MS_DEF_RSA_SCHANNEL_PROV - "Microsoft RSA Schannel Cryptographic Provider" ; inline +CONSTANT: MS_DEF_RSA_SCHANNEL_PROV + "Microsoft RSA Schannel Cryptographic Provider" ! Unsupported (!) -: MS_DEF_RSA_SIG_PROV - "Microsoft RSA Signature Cryptographic Provider" ; inline +CONSTANT: MS_DEF_RSA_SIG_PROV + "Microsoft RSA Signature Cryptographic Provider" -: MS_ENH_DSS_DH_PROV - "Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider" ; inline +CONSTANT: MS_ENH_DSS_DH_PROV + "Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider" -: MS_ENH_RSA_AES_PROV - "Microsoft Enhanced RSA and AES Cryptographic Provider" ; inline +CONSTANT: MS_ENH_RSA_AES_PROV + "Microsoft Enhanced RSA and AES Cryptographic Provider" -: MS_ENHANCED_PROV - "Microsoft Enhanced Cryptographic Provider v1.0" ; inline +CONSTANT: MS_ENHANCED_PROV + "Microsoft Enhanced Cryptographic Provider v1.0" -: MS_SCARD_PROV - "Microsoft Base Smart Card Crypto Provider" ; inline +CONSTANT: MS_SCARD_PROV + "Microsoft Base Smart Card Crypto Provider" -: MS_STRONG_PROV - "Microsoft Strong Cryptographic Provider" ; inline +CONSTANT: MS_STRONG_PROV + "Microsoft Strong Cryptographic Provider" -: CRYPT_VERIFYCONTEXT HEX: F0000000 ; inline -: CRYPT_NEWKEYSET HEX: 8 ; inline -: CRYPT_DELETEKEYSET HEX: 10 ; inline -: CRYPT_MACHINE_KEYSET HEX: 20 ; inline -: CRYPT_SILENT HEX: 40 ; inline +CONSTANT: CRYPT_VERIFYCONTEXT HEX: F0000000 +CONSTANT: CRYPT_NEWKEYSET HEX: 8 +CONSTANT: CRYPT_DELETEKEYSET HEX: 10 +CONSTANT: CRYPT_MACHINE_KEYSET HEX: 20 +CONSTANT: CRYPT_SILENT HEX: 40 C-STRUCT: ACL { "BYTE" "AclRevision" } @@ -70,16 +70,16 @@ C-STRUCT: ACL TYPEDEF: ACL* PACL -: ACCESS_ALLOWED_ACE_TYPE 0 ; inline -: ACCESS_DENIED_ACE_TYPE 1 ; inline -: SYSTEM_AUDIT_ACE_TYPE 2 ; inline -: SYSTEM_ALARM_ACE_TYPE 3 ; inline +CONSTANT: ACCESS_ALLOWED_ACE_TYPE 0 +CONSTANT: ACCESS_DENIED_ACE_TYPE 1 +CONSTANT: SYSTEM_AUDIT_ACE_TYPE 2 +CONSTANT: SYSTEM_ALARM_ACE_TYPE 3 -: OBJECT_INHERIT_ACE HEX: 1 ; inline -: CONTAINER_INHERIT_ACE HEX: 2 ; inline -: NO_PROPAGATE_INHERIT_ACE HEX: 4 ; inline -: INHERIT_ONLY_ACE HEX: 8 ; inline -: VALID_INHERIT_FLAGS HEX: f ; inline +CONSTANT: OBJECT_INHERIT_ACE HEX: 1 +CONSTANT: CONTAINER_INHERIT_ACE HEX: 2 +CONSTANT: NO_PROPAGATE_INHERIT_ACE HEX: 4 +CONSTANT: INHERIT_ONLY_ACE HEX: 8 +CONSTANT: VALID_INHERIT_FLAGS HEX: f C-STRUCT: ACE_HEADER { "BYTE" "AceType" } @@ -125,46 +125,46 @@ TYPEDEF: ACCESS_ALLOWED_CALLBACK_ACE* PACCESS_ALLOWED_CALLBACK_ACE ! typedef enum _TOKEN_INFORMATION_CLASS { -: TokenUser 1 ; inline -: TokenGroups 2 ; inline -: TokenPrivileges 3 ; inline -: TokenOwner 4 ; inline -: TokenPrimaryGroup 5 ; inline -: TokenDefaultDacl 6 ; inline -: TokenSource 7 ; inline -: TokenType 8 ; inline -: TokenImpersonationLevel 9 ; inline -: TokenStatistics 10 ; inline -: TokenRestrictedSids 11 ; inline -: TokenSessionId 12 ; inline -: TokenGroupsAndPrivileges 13 ; inline -: TokenSessionReference 14 ; inline -: TokenSandBoxInert 15 ; inline +CONSTANT: TokenUser 1 +CONSTANT: TokenGroups 2 +CONSTANT: TokenPrivileges 3 +CONSTANT: TokenOwner 4 +CONSTANT: TokenPrimaryGroup 5 +CONSTANT: TokenDefaultDacl 6 +CONSTANT: TokenSource 7 +CONSTANT: TokenType 8 +CONSTANT: TokenImpersonationLevel 9 +CONSTANT: TokenStatistics 10 +CONSTANT: TokenRestrictedSids 11 +CONSTANT: TokenSessionId 12 +CONSTANT: TokenGroupsAndPrivileges 13 +CONSTANT: TokenSessionReference 14 +CONSTANT: TokenSandBoxInert 15 ! } TOKEN_INFORMATION_CLASS; -: DELETE HEX: 00010000 ; inline -: READ_CONTROL HEX: 00020000 ; inline -: WRITE_DAC HEX: 00040000 ; inline -: WRITE_OWNER HEX: 00080000 ; inline -: SYNCHRONIZE HEX: 00100000 ; inline -: STANDARD_RIGHTS_REQUIRED HEX: 000f0000 ; inline +CONSTANT: DELETE HEX: 00010000 +CONSTANT: READ_CONTROL HEX: 00020000 +CONSTANT: WRITE_DAC HEX: 00040000 +CONSTANT: WRITE_OWNER HEX: 00080000 +CONSTANT: SYNCHRONIZE HEX: 00100000 +CONSTANT: STANDARD_RIGHTS_REQUIRED HEX: 000f0000 -: STANDARD_RIGHTS_READ READ_CONTROL ; inline -: STANDARD_RIGHTS_WRITE READ_CONTROL ; inline -: STANDARD_RIGHTS_EXECUTE READ_CONTROL ; inline +ALIAS: STANDARD_RIGHTS_READ READ_CONTROL +ALIAS: STANDARD_RIGHTS_WRITE READ_CONTROL +ALIAS: STANDARD_RIGHTS_EXECUTE READ_CONTROL -: TOKEN_TOKEN_ADJUST_DEFAULT HEX: 0080 ; inline -: TOKEN_ADJUST_GROUPS HEX: 0040 ; inline -: TOKEN_ADJUST_PRIVILEGES HEX: 0020 ; inline -: TOKEN_ADJUST_SESSIONID HEX: 0100 ; inline -: TOKEN_ASSIGN_PRIMARY HEX: 0001 ; inline -: TOKEN_DUPLICATE HEX: 0002 ; inline -: TOKEN_EXECUTE STANDARD_RIGHTS_EXECUTE ; inline -: TOKEN_IMPERSONATE HEX: 0004 ; inline -: TOKEN_QUERY HEX: 0008 ; inline -: TOKEN_QUERY_SOURCE HEX: 0010 ; inline -: TOKEN_ADJUST_DEFAULT HEX: 0080 ; inline -: TOKEN_READ ( -- n ) STANDARD_RIGHTS_READ TOKEN_QUERY bitor ; +CONSTANT: TOKEN_TOKEN_ADJUST_DEFAULT HEX: 0080 +CONSTANT: TOKEN_ADJUST_GROUPS HEX: 0040 +CONSTANT: TOKEN_ADJUST_PRIVILEGES HEX: 0020 +CONSTANT: TOKEN_ADJUST_SESSIONID HEX: 0100 +CONSTANT: TOKEN_ASSIGN_PRIMARY HEX: 0001 +CONSTANT: TOKEN_DUPLICATE HEX: 0002 +ALIAS: TOKEN_EXECUTE STANDARD_RIGHTS_EXECUTE +CONSTANT: TOKEN_IMPERSONATE HEX: 0004 +CONSTANT: TOKEN_QUERY HEX: 0008 +CONSTANT: TOKEN_QUERY_SOURCE HEX: 0010 +CONSTANT: TOKEN_ADJUST_DEFAULT HEX: 0080 +: TOKEN_READ ( -- n ) { STANDARD_RIGHTS_READ TOKEN_QUERY } flags ; : TOKEN_WRITE ( -- n ) { From 1e8c0fb3726f8da14ff67e307af1238c169f012f Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 15 Dec 2008 22:08:03 -0600 Subject: [PATCH 30/58] fix dinput compile errors --- basis/windows/dinput/dinput.factor | 573 +++++++++++++++-------------- 1 file changed, 287 insertions(+), 286 deletions(-) mode change 100644 => 100755 basis/windows/dinput/dinput.factor diff --git a/basis/windows/dinput/dinput.factor b/basis/windows/dinput/dinput.factor old mode 100644 new mode 100755 index 0c75f43770..76cba4ff36 --- a/basis/windows/dinput/dinput.factor +++ b/basis/windows/dinput/dinput.factor @@ -1,5 +1,6 @@ USING: windows.kernel32 windows.ole32 windows.com windows.com.syntax -alien alien.c-types alien.syntax kernel system namespaces math ; +alien alien.c-types alien.syntax kernel system namespaces math constants +alias ; IN: windows.dinput << @@ -384,314 +385,314 @@ COM-INTERFACE: IDirectInput8W IUnknown {BF798031-483A-4DA2-AA99-5D64ED369700} FUNCTION: HRESULT DirectInput8Create ( HINSTANCE hinst, DWORD dwVersion, REFIID riidtlf, LPVOID* ppvOut, LPUNKNOWN punkOuter ) ; -: DIRECTINPUT_VERSION HEX: 0800 ; inline +CONSTANT: DIRECTINPUT_VERSION HEX: 0800 + +CONSTANT: DI8DEVCLASS_ALL 0 +CONSTANT: DI8DEVCLASS_DEVICE 1 +CONSTANT: DI8DEVCLASS_POINTER 2 +CONSTANT: DI8DEVCLASS_KEYBOARD 3 +CONSTANT: DI8DEVCLASS_GAMECTRL 4 -: DI8DEVCLASS_ALL 0 ; inline -: DI8DEVCLASS_DEVICE 1 ; inline -: DI8DEVCLASS_POINTER 2 ; inline -: DI8DEVCLASS_KEYBOARD 3 ; inline -: DI8DEVCLASS_GAMECTRL 4 ; inline +CONSTANT: DIEDFL_ALLDEVICES HEX: 00000000 +CONSTANT: DIEDFL_ATTACHEDONLY HEX: 00000001 +CONSTANT: DIEDFL_FORCEFEEDBACK HEX: 00000100 +CONSTANT: DIEDFL_INCLUDEALIASES HEX: 00010000 +CONSTANT: DIEDFL_INCLUDEPHANTOMS HEX: 00020000 +CONSTANT: DIEDFL_INCLUDEHIDDEN HEX: 00040000 + +CONSTANT: DIENUM_STOP 0 +CONSTANT: DIENUM_CONTINUE 1 -: DIEDFL_ALLDEVICES HEX: 00000000 ; inline -: DIEDFL_ATTACHEDONLY HEX: 00000001 ; inline -: DIEDFL_FORCEFEEDBACK HEX: 00000100 ; inline -: DIEDFL_INCLUDEALIASES HEX: 00010000 ; inline -: DIEDFL_INCLUDEPHANTOMS HEX: 00020000 ; inline -: DIEDFL_INCLUDEHIDDEN HEX: 00040000 ; inline +CONSTANT: DIDF_ABSAXIS 1 +CONSTANT: DIDF_RELAXIS 2 -: DIENUM_STOP 0 ; inline -: DIENUM_CONTINUE 1 ; inline - -: DIDF_ABSAXIS 1 ; -: DIDF_RELAXIS 2 ; - -: DIDFT_ALL HEX: 00000000 ; inline - -: DIDFT_RELAXIS HEX: 00000001 ; inline -: DIDFT_ABSAXIS HEX: 00000002 ; inline -: DIDFT_AXIS HEX: 00000003 ; inline - -: DIDFT_PSHBUTTON HEX: 00000004 ; inline -: DIDFT_TGLBUTTON HEX: 00000008 ; inline -: DIDFT_BUTTON HEX: 0000000C ; inline - -: DIDFT_POV HEX: 00000010 ; inline -: DIDFT_COLLECTION HEX: 00000040 ; inline -: DIDFT_NODATA HEX: 00000080 ; inline - -: DIDFT_ANYINSTANCE HEX: 00FFFF00 ; inline -: DIDFT_INSTANCEMASK DIDFT_ANYINSTANCE ; inline +CONSTANT: DIDFT_ALL HEX: 00000000 + +CONSTANT: DIDFT_RELAXIS HEX: 00000001 +CONSTANT: DIDFT_ABSAXIS HEX: 00000002 +CONSTANT: DIDFT_AXIS HEX: 00000003 + +CONSTANT: DIDFT_PSHBUTTON HEX: 00000004 +CONSTANT: DIDFT_TGLBUTTON HEX: 00000008 +CONSTANT: DIDFT_BUTTON HEX: 0000000C + +CONSTANT: DIDFT_POV HEX: 00000010 +CONSTANT: DIDFT_COLLECTION HEX: 00000040 +CONSTANT: DIDFT_NODATA HEX: 00000080 + +CONSTANT: DIDFT_ANYINSTANCE HEX: 00FFFF00 +ALIAS: DIDFT_INSTANCEMASK DIDFT_ANYINSTANCE : DIDFT_MAKEINSTANCE ( n -- instance ) 8 shift ; inline : DIDFT_GETTYPE ( n -- type ) HEX: FF bitand ; inline : DIDFT_GETINSTANCE ( n -- instance ) -8 shift HEX: FFFF bitand ; inline -: DIDFT_FFACTUATOR HEX: 01000000 ; inline -: DIDFT_FFEFFECTTRIGGER HEX: 02000000 ; inline -: DIDFT_OUTPUT HEX: 10000000 ; inline -: DIDFT_VENDORDEFINED HEX: 04000000 ; inline -: DIDFT_ALIAS HEX: 08000000 ; inline -: DIDFT_OPTIONAL HEX: 80000000 ; inline +CONSTANT: DIDFT_FFACTUATOR HEX: 01000000 +CONSTANT: DIDFT_FFEFFECTTRIGGER HEX: 02000000 +CONSTANT: DIDFT_OUTPUT HEX: 10000000 +CONSTANT: DIDFT_VENDORDEFINED HEX: 04000000 +CONSTANT: DIDFT_ALIAS HEX: 08000000 +CONSTANT: DIDFT_OPTIONAL HEX: 80000000 : DIDFT_ENUMCOLLECTION ( n -- instance ) 8 shift HEX: FFFF bitand ; inline -: DIDFT_NOCOLLECTION HEX: 00FFFF00 ; inline +CONSTANT: DIDFT_NOCOLLECTION HEX: 00FFFF00 -: 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 +CONSTANT: DIDOI_FFACTUATOR HEX: 00000001 +CONSTANT: DIDOI_FFEFFECTTRIGGER HEX: 00000002 +CONSTANT: DIDOI_POLLED HEX: 00008000 +CONSTANT: DIDOI_ASPECTPOSITION HEX: 00000100 +CONSTANT: DIDOI_ASPECTVELOCITY HEX: 00000200 +CONSTANT: DIDOI_ASPECTACCEL HEX: 00000300 +CONSTANT: DIDOI_ASPECTFORCE HEX: 00000400 +CONSTANT: DIDOI_ASPECTMASK HEX: 00000F00 +CONSTANT: DIDOI_GUIDISUSAGE HEX: 00010000 -: 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 +CONSTANT: DISCL_EXCLUSIVE HEX: 00000001 +CONSTANT: DISCL_NONEXCLUSIVE HEX: 00000002 +CONSTANT: DISCL_FOREGROUND HEX: 00000004 +CONSTANT: DISCL_BACKGROUND HEX: 00000008 +CONSTANT: DISCL_NOWINKEY HEX: 00000010 -: 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 +CONSTANT: DIK_ESCAPE HEX: 01 +CONSTANT: DIK_1 HEX: 02 +CONSTANT: DIK_2 HEX: 03 +CONSTANT: DIK_3 HEX: 04 +CONSTANT: DIK_4 HEX: 05 +CONSTANT: DIK_5 HEX: 06 +CONSTANT: DIK_6 HEX: 07 +CONSTANT: DIK_7 HEX: 08 +CONSTANT: DIK_8 HEX: 09 +CONSTANT: DIK_9 HEX: 0A +CONSTANT: DIK_0 HEX: 0B +CONSTANT: DIK_MINUS HEX: 0C +CONSTANT: DIK_EQUALS HEX: 0D +CONSTANT: DIK_BACK HEX: 0E +CONSTANT: DIK_TAB HEX: 0F +CONSTANT: DIK_Q HEX: 10 +CONSTANT: DIK_W HEX: 11 +CONSTANT: DIK_E HEX: 12 +CONSTANT: DIK_R HEX: 13 +CONSTANT: DIK_T HEX: 14 +CONSTANT: DIK_Y HEX: 15 +CONSTANT: DIK_U HEX: 16 +CONSTANT: DIK_I HEX: 17 +CONSTANT: DIK_O HEX: 18 +CONSTANT: DIK_P HEX: 19 +CONSTANT: DIK_LBRACKET HEX: 1A +CONSTANT: DIK_RBRACKET HEX: 1B +CONSTANT: DIK_RETURN HEX: 1C +CONSTANT: DIK_LCONTROL HEX: 1D +CONSTANT: DIK_A HEX: 1E +CONSTANT: DIK_S HEX: 1F +CONSTANT: DIK_D HEX: 20 +CONSTANT: DIK_F HEX: 21 +CONSTANT: DIK_G HEX: 22 +CONSTANT: DIK_H HEX: 23 +CONSTANT: DIK_J HEX: 24 +CONSTANT: DIK_K HEX: 25 +CONSTANT: DIK_L HEX: 26 +CONSTANT: DIK_SEMICOLON HEX: 27 +CONSTANT: DIK_APOSTROPHE HEX: 28 +CONSTANT: DIK_GRAVE HEX: 29 +CONSTANT: DIK_LSHIFT HEX: 2A +CONSTANT: DIK_BACKSLASH HEX: 2B +CONSTANT: DIK_Z HEX: 2C +CONSTANT: DIK_X HEX: 2D +CONSTANT: DIK_C HEX: 2E +CONSTANT: DIK_V HEX: 2F +CONSTANT: DIK_B HEX: 30 +CONSTANT: DIK_N HEX: 31 +CONSTANT: DIK_M HEX: 32 +CONSTANT: DIK_COMMA HEX: 33 +CONSTANT: DIK_PERIOD HEX: 34 +CONSTANT: DIK_SLASH HEX: 35 +CONSTANT: DIK_RSHIFT HEX: 36 +CONSTANT: DIK_MULTIPLY HEX: 37 +CONSTANT: DIK_LMENU HEX: 38 +CONSTANT: DIK_SPACE HEX: 39 +CONSTANT: DIK_CAPITAL HEX: 3A +CONSTANT: DIK_F1 HEX: 3B +CONSTANT: DIK_F2 HEX: 3C +CONSTANT: DIK_F3 HEX: 3D +CONSTANT: DIK_F4 HEX: 3E +CONSTANT: DIK_F5 HEX: 3F +CONSTANT: DIK_F6 HEX: 40 +CONSTANT: DIK_F7 HEX: 41 +CONSTANT: DIK_F8 HEX: 42 +CONSTANT: DIK_F9 HEX: 43 +CONSTANT: DIK_F10 HEX: 44 +CONSTANT: DIK_NUMLOCK HEX: 45 +CONSTANT: DIK_SCROLL HEX: 46 +CONSTANT: DIK_NUMPAD7 HEX: 47 +CONSTANT: DIK_NUMPAD8 HEX: 48 +CONSTANT: DIK_NUMPAD9 HEX: 49 +CONSTANT: DIK_SUBTRACT HEX: 4A +CONSTANT: DIK_NUMPAD4 HEX: 4B +CONSTANT: DIK_NUMPAD5 HEX: 4C +CONSTANT: DIK_NUMPAD6 HEX: 4D +CONSTANT: DIK_ADD HEX: 4E +CONSTANT: DIK_NUMPAD1 HEX: 4F +CONSTANT: DIK_NUMPAD2 HEX: 50 +CONSTANT: DIK_NUMPAD3 HEX: 51 +CONSTANT: DIK_NUMPAD0 HEX: 52 +CONSTANT: DIK_DECIMAL HEX: 53 +CONSTANT: DIK_OEM_102 HEX: 56 +CONSTANT: DIK_F11 HEX: 57 +CONSTANT: DIK_F12 HEX: 58 +CONSTANT: DIK_F13 HEX: 64 +CONSTANT: DIK_F14 HEX: 65 +CONSTANT: DIK_F15 HEX: 66 +CONSTANT: DIK_KANA HEX: 70 +CONSTANT: DIK_ABNT_C1 HEX: 73 +CONSTANT: DIK_CONVERT HEX: 79 +CONSTANT: DIK_NOCONVERT HEX: 7B +CONSTANT: DIK_YEN HEX: 7D +CONSTANT: DIK_ABNT_C2 HEX: 7E +CONSTANT: DIK_NUMPADEQUALS HEX: 8D +CONSTANT: DIK_PREVTRACK HEX: 90 +CONSTANT: DIK_AT HEX: 91 +CONSTANT: DIK_COLON HEX: 92 +CONSTANT: DIK_UNDERLINE HEX: 93 +CONSTANT: DIK_KANJI HEX: 94 +CONSTANT: DIK_STOP HEX: 95 +CONSTANT: DIK_AX HEX: 96 +CONSTANT: DIK_UNLABELED HEX: 97 +CONSTANT: DIK_NEXTTRACK HEX: 99 +CONSTANT: DIK_NUMPADENTER HEX: 9C +CONSTANT: DIK_RCONTROL HEX: 9D +CONSTANT: DIK_MUTE HEX: A0 +CONSTANT: DIK_CALCULATOR HEX: A1 +CONSTANT: DIK_PLAYPAUSE HEX: A2 +CONSTANT: DIK_MEDIASTOP HEX: A4 +CONSTANT: DIK_VOLUMEDOWN HEX: AE +CONSTANT: DIK_VOLUMEUP HEX: B0 +CONSTANT: DIK_WEBHOME HEX: B2 +CONSTANT: DIK_NUMPADCOMMA HEX: B3 +CONSTANT: DIK_DIVIDE HEX: B5 +CONSTANT: DIK_SYSRQ HEX: B7 +CONSTANT: DIK_RMENU HEX: B8 +CONSTANT: DIK_PAUSE HEX: C5 +CONSTANT: DIK_HOME HEX: C7 +CONSTANT: DIK_UP HEX: C8 +CONSTANT: DIK_PRIOR HEX: C9 +CONSTANT: DIK_LEFT HEX: CB +CONSTANT: DIK_RIGHT HEX: CD +CONSTANT: DIK_END HEX: CF +CONSTANT: DIK_DOWN HEX: D0 +CONSTANT: DIK_NEXT HEX: D1 +CONSTANT: DIK_INSERT HEX: D2 +CONSTANT: DIK_DELETE HEX: D3 +CONSTANT: DIK_LWIN HEX: DB +CONSTANT: DIK_RWIN HEX: DC +CONSTANT: DIK_APPS HEX: DD +CONSTANT: DIK_POWER HEX: DE +CONSTANT: DIK_SLEEP HEX: DF +CONSTANT: DIK_WAKE HEX: E3 +CONSTANT: DIK_WEBSEARCH HEX: E5 +CONSTANT: DIK_WEBFAVORITES HEX: E6 +CONSTANT: DIK_WEBREFRESH HEX: E7 +CONSTANT: DIK_WEBSTOP HEX: E8 +CONSTANT: DIK_WEBFORWARD HEX: E9 +CONSTANT: DIK_WEBBACK HEX: EA +CONSTANT: DIK_MYCOMPUTER HEX: EB +CONSTANT: DIK_MAIL HEX: EC +CONSTANT: DIK_MEDIASELECT HEX: ED -: 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 +ALIAS: DIK_BACKSPACE DIK_BACK +ALIAS: DIK_NUMPADSTAR DIK_MULTIPLY +ALIAS: DIK_LALT DIK_LMENU +ALIAS: DIK_CAPSLOCK DIK_CAPITAL +ALIAS: DIK_NUMPADMINUS DIK_SUBTRACT +ALIAS: DIK_NUMPADPLUS DIK_ADD +ALIAS: DIK_NUMPADPERIOD DIK_DECIMAL +ALIAS: DIK_NUMPADSLASH DIK_DIVIDE +ALIAS: DIK_RALT DIK_RMENU +ALIAS: DIK_UPARROW DIK_UP +ALIAS: DIK_PGUP DIK_PRIOR +ALIAS: DIK_LEFTARROW DIK_LEFT +ALIAS: DIK_RIGHTARROW DIK_RIGHT +ALIAS: DIK_DOWNARROW DIK_DOWN +ALIAS: DIK_PGDN DIK_NEXT -: DIK_CIRCUMFLEX DIK_PREVTRACK ; inline +ALIAS: DIK_CIRCUMFLEX DIK_PREVTRACK -: DI8DEVTYPE_DEVICE HEX: 11 ; inline -: DI8DEVTYPE_MOUSE HEX: 12 ; inline -: DI8DEVTYPE_KEYBOARD HEX: 13 ; inline -: DI8DEVTYPE_JOYSTICK HEX: 14 ; inline -: DI8DEVTYPE_GAMEPAD HEX: 15 ; inline -: DI8DEVTYPE_DRIVING HEX: 16 ; inline -: DI8DEVTYPE_FLIGHT HEX: 17 ; inline -: DI8DEVTYPE_1STPERSON HEX: 18 ; inline -: DI8DEVTYPE_DEVICECTRL HEX: 19 ; inline -: DI8DEVTYPE_SCREENPOINTER HEX: 1A ; inline -: DI8DEVTYPE_REMOTE HEX: 1B ; inline -: DI8DEVTYPE_SUPPLEMENTAL HEX: 1C ; inline +CONSTANT: DI8DEVTYPE_DEVICE HEX: 11 +CONSTANT: DI8DEVTYPE_MOUSE HEX: 12 +CONSTANT: DI8DEVTYPE_KEYBOARD HEX: 13 +CONSTANT: DI8DEVTYPE_JOYSTICK HEX: 14 +CONSTANT: DI8DEVTYPE_GAMEPAD HEX: 15 +CONSTANT: DI8DEVTYPE_DRIVING HEX: 16 +CONSTANT: DI8DEVTYPE_FLIGHT HEX: 17 +CONSTANT: DI8DEVTYPE_1STPERSON HEX: 18 +CONSTANT: DI8DEVTYPE_DEVICECTRL HEX: 19 +CONSTANT: DI8DEVTYPE_SCREENPOINTER HEX: 1A +CONSTANT: DI8DEVTYPE_REMOTE HEX: 1B +CONSTANT: DI8DEVTYPE_SUPPLEMENTAL HEX: 1C : GET_DIDEVICE_TYPE ( dwType -- type ) HEX: FF bitand ; inline -: DIPROPRANGE_NOMIN HEX: 80000000 ; inline -: DIPROPRANGE_NOMAX HEX: 7FFFFFFF ; inline -: MAXCPOINTSNUM 8 ; inline - -: DIPH_DEVICE 0 ; inline -: DIPH_BYOFFSET 1 ; inline -: DIPH_BYID 2 ; inline -: DIPH_BYUSAGE 3 ; inline +CONSTANT: DIPROPRANGE_NOMIN HEX: 80000000 +CONSTANT: DIPROPRANGE_NOMAX HEX: 7FFFFFFF +CONSTANT: MAXCPOINTSNUM 8 +CONSTANT: DIPH_DEVICE 0 +CONSTANT: DIPH_BYOFFSET 1 +CONSTANT: DIPH_BYID 2 +CONSTANT: DIPH_BYUSAGE 3 + : DIMAKEUSAGEDWORD ( UsagePage Usage -- DWORD ) 16 shift bitor ; inline -: DIPROP_BUFFERSIZE 1 ; inline -: DIPROP_AXISMODE 2 ; inline +: DIPROP_BUFFERSIZE ( -- alien ) 1 ; inline +: DIPROP_AXISMODE ( -- alien ) 2 ; inline -: DIPROPAXISMODE_ABS 0 ; inline -: DIPROPAXISMODE_REL 1 ; inline +CONSTANT: DIPROPAXISMODE_ABS 0 +CONSTANT: DIPROPAXISMODE_REL 1 + +: DIPROP_GRANULARITY ( -- alien ) 3 ; inline +: DIPROP_RANGE ( -- alien ) 4 ; inline +: DIPROP_DEADZONE ( -- alien ) 5 ; inline +: DIPROP_SATURATION ( -- alien ) 6 ; inline +: DIPROP_FFGAIN ( -- alien ) 7 ; inline +: DIPROP_FFLOAD ( -- alien ) 8 ; inline +: DIPROP_AUTOCENTER ( -- alien ) 9 ; 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 +CONSTANT: DIPROPAUTOCENTER_OFF 0 +CONSTANT: DIPROPAUTOCENTER_ON 1 -: DIPROPAUTOCENTER_OFF 0 ; inline -: DIPROPAUTOCENTER_ON 1 ; inline +: DIPROP_CALIBRATIONMODE ( -- alien ) 10 ; inline -: DIPROP_CALIBRATIONMODE 10 ; inline +CONSTANT: DIPROPCALIBRATIONMODE_COOKED 0 +CONSTANT: DIPROPCALIBRATIONMODE_RAW 1 -: DIPROPCALIBRATIONMODE_COOKED 0 ; inline -: DIPROPCALIBRATIONMODE_RAW 1 ; inline +: DIPROP_CALIBRATION ( -- alien ) 11 ; inline +: DIPROP_GUIDANDPATH ( -- alien ) 12 ; inline +: DIPROP_INSTANCENAME ( -- alien ) 13 ; inline +: DIPROP_PRODUCTNAME ( -- alien ) 14 ; inline +: DIPROP_JOYSTICKID ( -- alien ) 15 ; inline +: DIPROP_GETPORTDISPLAYNAME ( -- alien ) 16 ; inline +: DIPROP_PHYSICALRANGE ( -- alien ) 18 ; inline +: DIPROP_LOGICALRANGE ( -- alien ) 19 ; inline +: DIPROP_KEYNAME ( -- alien ) 20 ; inline +: DIPROP_CPOINTS ( -- alien ) 21 ; inline +: DIPROP_APPDATA ( -- alien ) 22 ; inline +: DIPROP_SCANCODE ( -- alien ) 23 ; inline +: DIPROP_VIDPID ( -- alien ) 24 ; inline +: DIPROP_USERNAME ( -- alien ) 25 ; inline +: DIPROP_TYPENAME ( -- alien ) 26 ; 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 +CONSTANT: GUID_XAxis GUID: {A36D02E0-C9F3-11CF-BFC7-444553540000} +CONSTANT: GUID_YAxis GUID: {A36D02E1-C9F3-11CF-BFC7-444553540000} +CONSTANT: GUID_ZAxis GUID: {A36D02E2-C9F3-11CF-BFC7-444553540000} +CONSTANT: GUID_RxAxis GUID: {A36D02F4-C9F3-11CF-BFC7-444553540000} +CONSTANT: GUID_RyAxis GUID: {A36D02F5-C9F3-11CF-BFC7-444553540000} +CONSTANT: GUID_RzAxis GUID: {A36D02E3-C9F3-11CF-BFC7-444553540000} +CONSTANT: GUID_Slider GUID: {A36D02E4-C9F3-11CF-BFC7-444553540000} +CONSTANT: GUID_Button GUID: {A36D02F0-C9F3-11CF-BFC7-444553540000} +CONSTANT: GUID_Key GUID: {55728220-D33C-11CF-BFC7-444553540000} +CONSTANT: GUID_POV GUID: {A36D02F2-C9F3-11CF-BFC7-444553540000} +CONSTANT: GUID_Unknown GUID: {A36D02F3-C9F3-11CF-BFC7-444553540000} +CONSTANT: GUID_SysMouse GUID: {6F1D2B60-D5A0-11CF-BFC7-444553540000} +CONSTANT: GUID_SysKeyboard GUID: {6F1D2B61-D5A0-11CF-BFC7-444553540000} +CONSTANT: GUID_Joystick GUID: {6F1D2B70-D5A0-11CF-BFC7-444553540000} +CONSTANT: GUID_SysMouseEm GUID: {6F1D2B80-D5A0-11CF-BFC7-444553540000} +CONSTANT: GUID_SysMouseEm2 GUID: {6F1D2B81-D5A0-11CF-BFC7-444553540000} +CONSTANT: GUID_SysKeyboardEm GUID: {6F1D2B82-D5A0-11CF-BFC7-444553540000} +CONSTANT: GUID_SysKeyboardEm2 GUID: {6F1D2B83-D5A0-11CF-BFC7-444553540000} From 0021cde7430a3e07e7c25d61c26c46d1afdd8e84 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 15 Dec 2008 22:21:56 -0600 Subject: [PATCH 31/58] Fix more compile errors --- basis/calendar/calendar.factor | 2 +- .../cfg/linearization/linearization.factor | 2 +- basis/compiler/codegen/codegen.factor | 2 +- basis/cpu/x86/64/64.factor | 2 +- basis/sequences/next/next.factor | 3 +- basis/unix/unix.factor | 40 +++++++++---------- core/math/math-docs.factor | 1 + core/math/math.factor | 2 +- 8 files changed, 28 insertions(+), 26 deletions(-) diff --git a/basis/calendar/calendar.factor b/basis/calendar/calendar.factor index 7683c2592f..522e0c52f3 100644 --- a/basis/calendar/calendar.factor +++ b/basis/calendar/calendar.factor @@ -211,7 +211,7 @@ M: real +minute ( timestamp n -- timestamp ) M: number +second ( timestamp n -- timestamp ) [ over second>> + seconds/minutes [ >>second ] dip +minute ] unless-zero ; -: (time+) ( timestamp duration -- timestamp' ) +: (time+) ( timestamp duration -- timestamp' duration ) [ second>> +second ] keep [ minute>> +minute ] keep [ hour>> +hour ] keep diff --git a/basis/compiler/cfg/linearization/linearization.factor b/basis/compiler/cfg/linearization/linearization.factor index 6926ce7b4b..584c4cd662 100644 --- a/basis/compiler/cfg/linearization/linearization.factor +++ b/basis/compiler/cfg/linearization/linearization.factor @@ -37,7 +37,7 @@ M: insn linearize-insn , drop ; M: ##branch linearize-insn drop dup successors>> first emit-branch ; -: (binary-conditional) ( basic-block insn -- basic-block successor1 successor2 src1 src2 cc -- ) +: (binary-conditional) ( basic-block insn -- basic-block successor1 successor2 src1 src2 cc ) [ dup successors>> first2 ] [ [ src1>> ] [ src2>> ] [ cc>> ] tri ] bi* ; inline diff --git a/basis/compiler/codegen/codegen.factor b/basis/compiler/codegen/codegen.factor index 6e76badc9c..0dc5a855e3 100644 --- a/basis/compiler/codegen/codegen.factor +++ b/basis/compiler/codegen/codegen.factor @@ -95,7 +95,7 @@ M: ##dispatch-label generate-insn label>> %dispatch-label ; M: ##dispatch generate-insn [ src>> register ] [ temp>> register ] [ offset>> ] tri %dispatch ; -: >slot< +: >slot< ( insn -- dst obj slot tag ) { [ dst>> register ] [ obj>> register ] diff --git a/basis/cpu/x86/64/64.factor b/basis/cpu/x86/64/64.factor index 2077f51e0a..841a4e4c55 100644 --- a/basis/cpu/x86/64/64.factor +++ b/basis/cpu/x86/64/64.factor @@ -37,7 +37,7 @@ M:: x86.64 %dispatch ( src temp offset -- ) M: x86.64 param-reg-1 int-regs param-regs first ; M: x86.64 param-reg-2 int-regs param-regs second ; -: param-reg-3 int-regs param-regs third ; inline +: param-reg-3 ( -- reg ) int-regs param-regs third ; inline M: int-regs return-reg drop RAX ; M: float-regs return-reg drop XMM0 ; diff --git a/basis/sequences/next/next.factor b/basis/sequences/next/next.factor index a0a441ab50..19b406cc58 100644 --- a/basis/sequences/next/next.factor +++ b/basis/sequences/next/next.factor @@ -3,7 +3,8 @@ IN: sequences.next ; inline -: MAP_FAILED -1 ; inline +CONSTANT: NGROUPS_MAX 16 -: NGROUPS_MAX 16 ; inline - -: DT_UNKNOWN 0 ; inline -: DT_FIFO 1 ; inline -: DT_CHR 2 ; inline -: DT_DIR 4 ; inline -: DT_BLK 6 ; inline -: DT_REG 8 ; inline -: DT_LNK 10 ; inline -: DT_SOCK 12 ; inline -: DT_WHT 14 ; inline +CONSTANT: DT_UNKNOWN 0 +CONSTANT: DT_FIFO 1 +CONSTANT: DT_CHR 2 +CONSTANT: DT_DIR 4 +CONSTANT: DT_BLK 6 +CONSTANT: DT_REG 8 +CONSTANT: DT_LNK 10 +CONSTANT: DT_SOCK 12 +CONSTANT: DT_WHT 14 C-STRUCT: group { "char*" "gr_name" } diff --git a/core/math/math-docs.factor b/core/math/math-docs.factor index 3c2b7f67e2..2f7ab75103 100644 --- a/core/math/math-docs.factor +++ b/core/math/math-docs.factor @@ -180,6 +180,7 @@ HELP: 1- } ; HELP: ?1+ +{ $values { "x" { $maybe number } } { "y" number } } { $description "If the input is not " { $link f } ", adds one. Otherwise, outputs a " { $snippet "0" } "." } ; HELP: sq diff --git a/core/math/math.factor b/core/math/math.factor index 03be2208c2..7c9be868b3 100755 --- a/core/math/math.factor +++ b/core/math/math.factor @@ -64,7 +64,7 @@ PRIVATE> : recip ( x -- y ) 1 swap / ; inline : sgn ( x -- n ) dup 0 < [ drop -1 ] [ 0 > 1 0 ? ] if ; inline -: ?1+ [ 1+ ] [ 0 ] if* ; inline +: ?1+ ( x -- y ) [ 1+ ] [ 0 ] if* ; inline : rem ( x y -- z ) abs tuck mod over + swap mod ; foldable From fccf6417b14541349a54e48236b7d3e14e84c0ff Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 15 Dec 2008 22:44:01 -0600 Subject: [PATCH 32/58] fix compile errors on windows --- basis/windows/errors/errors.factor | 16 +- basis/windows/gdi32/gdi32.factor | 56 +- basis/windows/kernel32/kernel32.factor | 539 ++++--- basis/windows/messages/messages.factor | 2015 ++++++++++++------------ 4 files changed, 1313 insertions(+), 1313 deletions(-) mode change 100644 => 100755 basis/windows/kernel32/kernel32.factor mode change 100644 => 100755 basis/windows/messages/messages.factor diff --git a/basis/windows/errors/errors.factor b/basis/windows/errors/errors.factor index bd938fdbad..7c19cbde53 100644 --- a/basis/windows/errors/errors.factor +++ b/basis/windows/errors/errors.factor @@ -1,10 +1,10 @@ -USING: kernel ; +USING: kernel constants ; IN: windows.errors -: ERROR_SUCCESS 0 ; inline -: ERROR_NO_MORE_FILES 18 ; inline -: ERROR_HANDLE_EOF 38 ; inline -: ERROR_BROKEN_PIPE 109 ; inline -: ERROR_ENVVAR_NOT_FOUND 203 ; inline -: ERROR_IO_INCOMPLETE 996 ; inline -: ERROR_IO_PENDING 997 ; inline +CONSTANT: ERROR_SUCCESS 0 +CONSTANT: ERROR_NO_MORE_FILES 18 +CONSTANT: ERROR_HANDLE_EOF 38 +CONSTANT: ERROR_BROKEN_PIPE 109 +CONSTANT: ERROR_ENVVAR_NOT_FOUND 203 +CONSTANT: ERROR_IO_INCOMPLETE 996 +CONSTANT: ERROR_IO_PENDING 997 diff --git a/basis/windows/gdi32/gdi32.factor b/basis/windows/gdi32/gdi32.factor index 32e4f3cd8a..9c16664de8 100755 --- a/basis/windows/gdi32/gdi32.factor +++ b/basis/windows/gdi32/gdi32.factor @@ -1,38 +1,38 @@ ! FUNCTION: AbortDoc ! Copyright (C) 2005, 2006 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien alien.syntax kernel windows.types alias ; +USING: alien alien.syntax kernel windows.types alias constants ; IN: windows.gdi32 ! Stock Logical Objects -: WHITE_BRUSH 0 ; inline -: LTGRAY_BRUSH 1 ; inline -: GRAY_BRUSH 2 ; inline -: DKGRAY_BRUSH 3 ; inline -: BLACK_BRUSH 4 ; inline -: NULL_BRUSH 5 ; inline -: HOLLOW_BRUSH NULL_BRUSH ; inline -: WHITE_PEN 6 ; inline -: BLACK_PEN 7 ; inline -: NULL_PEN 8 ; inline -: OEM_FIXED_FONT 10 ; inline -: ANSI_FIXED_FONT 11 ; inline -: ANSI_VAR_FONT 12 ; inline -: SYSTEM_FONT 13 ; inline -: DEVICE_DEFAULT_FONT 14 ; inline -: DEFAULT_PALETTE 15 ; inline -: SYSTEM_FIXED_FONT 16 ; inline -: DEFAULT_GUI_FONT 17 ; inline -: DC_BRUSH 18 ; inline -: DC_PEN 19 ; inline +CONSTANT: WHITE_BRUSH 0 +CONSTANT: LTGRAY_BRUSH 1 +CONSTANT: GRAY_BRUSH 2 +CONSTANT: DKGRAY_BRUSH 3 +CONSTANT: BLACK_BRUSH 4 +CONSTANT: NULL_BRUSH 5 +ALIAS: HOLLOW_BRUSH NULL_BRUSH +CONSTANT: WHITE_PEN 6 +CONSTANT: BLACK_PEN 7 +CONSTANT: NULL_PEN 8 +CONSTANT: OEM_FIXED_FONT 10 +CONSTANT: ANSI_FIXED_FONT 11 +CONSTANT: ANSI_VAR_FONT 12 +CONSTANT: SYSTEM_FONT 13 +CONSTANT: DEVICE_DEFAULT_FONT 14 +CONSTANT: DEFAULT_PALETTE 15 +CONSTANT: SYSTEM_FIXED_FONT 16 +CONSTANT: DEFAULT_GUI_FONT 17 +CONSTANT: DC_BRUSH 18 +CONSTANT: DC_PEN 19 + +CONSTANT: BI_RGB 0 +CONSTANT: BI_RLE8 1 +CONSTANT: BI_RLE4 2 +CONSTANT: BI_BITFIELDS 3 -: BI_RGB 0 ; inline -: BI_RLE8 1 ; inline -: BI_RLE4 2 ; inline -: BI_BITFIELDS 3 ; inline - -: DIB_RGB_COLORS 0 ; inline -: DIB_PAL_COLORS 1 ; inline +CONSTANT: DIB_RGB_COLORS 0 +CONSTANT: DIB_PAL_COLORS 1 LIBRARY: gdi32 diff --git a/basis/windows/kernel32/kernel32.factor b/basis/windows/kernel32/kernel32.factor old mode 100644 new mode 100755 index 7d6f0ab5f2..cdfb31cbf7 --- a/basis/windows/kernel32/kernel32.factor +++ b/basis/windows/kernel32/kernel32.factor @@ -1,93 +1,93 @@ ! Copyright (C) 2005, 2006 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien alien.syntax kernel windows.types alias ; +USING: alien alien.syntax kernel windows.types alias constants ; IN: windows.kernel32 -: MAX_PATH 260 ; inline +CONSTANT: MAX_PATH 260 -: GHND HEX: 40 ; inline -: GMEM_FIXED 0 ; inline -: GMEM_MOVEABLE 2 ; inline -: GMEM_ZEROINIT HEX: 40 ; inline -: GPTR HEX: 40 ; inline +CONSTANT: GHND HEX: 40 +CONSTANT: GMEM_FIXED 0 +CONSTANT: GMEM_MOVEABLE 2 +CONSTANT: GMEM_ZEROINIT HEX: 40 +CONSTANT: GPTR HEX: 40 -: GENERIC_READ HEX: 80000000 ; inline -: GENERIC_WRITE HEX: 40000000 ; inline -: GENERIC_EXECUTE HEX: 20000000 ; inline -: GENERIC_ALL HEX: 10000000 ; inline +CONSTANT: GENERIC_READ HEX: 80000000 +CONSTANT: GENERIC_WRITE HEX: 40000000 +CONSTANT: GENERIC_EXECUTE HEX: 20000000 +CONSTANT: GENERIC_ALL HEX: 10000000 -: CREATE_NEW 1 ; inline -: CREATE_ALWAYS 2 ; inline -: OPEN_EXISTING 3 ; inline -: OPEN_ALWAYS 4 ; inline -: TRUNCATE_EXISTING 5 ; inline +CONSTANT: CREATE_NEW 1 +CONSTANT: CREATE_ALWAYS 2 +CONSTANT: OPEN_EXISTING 3 +CONSTANT: OPEN_ALWAYS 4 +CONSTANT: TRUNCATE_EXISTING 5 -: FILE_LIST_DIRECTORY HEX: 00000001 ; inline -: FILE_READ_DAT HEX: 00000001 ; inline -: FILE_ADD_FILE HEX: 00000002 ; inline -: FILE_WRITE_DATA HEX: 00000002 ; inline -: FILE_ADD_SUBDIRECTORY HEX: 00000004 ; inline -: FILE_APPEND_DATA HEX: 00000004 ; inline -: FILE_CREATE_PIPE_INSTANCE HEX: 00000004 ; inline -: FILE_READ_EA HEX: 00000008 ; inline -: FILE_READ_PROPERTIES HEX: 00000008 ; inline -: FILE_WRITE_EA HEX: 00000010 ; inline -: FILE_WRITE_PROPERTIES HEX: 00000010 ; inline -: FILE_EXECUTE HEX: 00000020 ; inline -: FILE_TRAVERSE HEX: 00000020 ; inline -: FILE_DELETE_CHILD HEX: 00000040 ; inline -: FILE_READ_ATTRIBUTES HEX: 00000080 ; inline -: FILE_WRITE_ATTRIBUTES HEX: 00000100 ; inline +CONSTANT: FILE_LIST_DIRECTORY HEX: 00000001 +CONSTANT: FILE_READ_DAT HEX: 00000001 +CONSTANT: FILE_ADD_FILE HEX: 00000002 +CONSTANT: FILE_WRITE_DATA HEX: 00000002 +CONSTANT: FILE_ADD_SUBDIRECTORY HEX: 00000004 +CONSTANT: FILE_APPEND_DATA HEX: 00000004 +CONSTANT: FILE_CREATE_PIPE_INSTANCE HEX: 00000004 +CONSTANT: FILE_READ_EA HEX: 00000008 +CONSTANT: FILE_READ_PROPERTIES HEX: 00000008 +CONSTANT: FILE_WRITE_EA HEX: 00000010 +CONSTANT: FILE_WRITE_PROPERTIES HEX: 00000010 +CONSTANT: FILE_EXECUTE HEX: 00000020 +CONSTANT: FILE_TRAVERSE HEX: 00000020 +CONSTANT: FILE_DELETE_CHILD HEX: 00000040 +CONSTANT: FILE_READ_ATTRIBUTES HEX: 00000080 +CONSTANT: FILE_WRITE_ATTRIBUTES HEX: 00000100 -: FILE_SHARE_READ 1 ; inline -: FILE_SHARE_WRITE 2 ; inline -: FILE_SHARE_DELETE 4 ; inline -: FILE_SHARE_VALID_FLAGS 7 ; inline +CONSTANT: FILE_SHARE_READ 1 +CONSTANT: FILE_SHARE_WRITE 2 +CONSTANT: FILE_SHARE_DELETE 4 +CONSTANT: FILE_SHARE_VALID_FLAGS 7 -: FILE_FLAG_WRITE_THROUGH HEX: 80000000 ; inline -: FILE_FLAG_OVERLAPPED HEX: 40000000 ; inline -: FILE_FLAG_NO_BUFFERING HEX: 20000000 ; inline -: FILE_FLAG_RANDOM_ACCESS HEX: 10000000 ; inline -: FILE_FLAG_SEQUENTIAL_SCAN HEX: 08000000 ; inline -: FILE_FLAG_DELETE_ON_CLOSE HEX: 04000000 ; inline -: FILE_FLAG_BACKUP_SEMANTICS HEX: 02000000 ; inline -: FILE_FLAG_POSIX_SEMANTICS HEX: 01000000 ; inline -: FILE_FLAG_OPEN_REPARSE_POINT HEX: 00200000 ; inline -: FILE_FLAG_OPEN_NO_RECALL HEX: 00100000 ; inline -: FILE_FLAG_FIRST_PIPE_INSTANCE HEX: 00080000 ; inline +CONSTANT: FILE_FLAG_WRITE_THROUGH HEX: 80000000 +CONSTANT: FILE_FLAG_OVERLAPPED HEX: 40000000 +CONSTANT: FILE_FLAG_NO_BUFFERING HEX: 20000000 +CONSTANT: FILE_FLAG_RANDOM_ACCESS HEX: 10000000 +CONSTANT: FILE_FLAG_SEQUENTIAL_SCAN HEX: 08000000 +CONSTANT: FILE_FLAG_DELETE_ON_CLOSE HEX: 04000000 +CONSTANT: FILE_FLAG_BACKUP_SEMANTICS HEX: 02000000 +CONSTANT: FILE_FLAG_POSIX_SEMANTICS HEX: 01000000 +CONSTANT: FILE_FLAG_OPEN_REPARSE_POINT HEX: 00200000 +CONSTANT: FILE_FLAG_OPEN_NO_RECALL HEX: 00100000 +CONSTANT: FILE_FLAG_FIRST_PIPE_INSTANCE HEX: 00080000 -: FILE_ATTRIBUTE_READONLY HEX: 00000001 ; inline -: FILE_ATTRIBUTE_HIDDEN HEX: 00000002 ; inline -: FILE_ATTRIBUTE_SYSTEM HEX: 00000004 ; inline -: FILE_ATTRIBUTE_DIRECTORY HEX: 00000010 ; inline -: FILE_ATTRIBUTE_ARCHIVE HEX: 00000020 ; inline -: FILE_ATTRIBUTE_DEVICE HEX: 00000040 ; inline -: FILE_ATTRIBUTE_NORMAL HEX: 00000080 ; inline -: FILE_ATTRIBUTE_TEMPORARY HEX: 00000100 ; inline -: FILE_ATTRIBUTE_SPARSE_FILE HEX: 00000200 ; inline -: FILE_ATTRIBUTE_REPARSE_POINT HEX: 00000400 ; inline -: FILE_ATTRIBUTE_COMPRESSED HEX: 00000800 ; inline -: FILE_ATTRIBUTE_OFFLINE HEX: 00001000 ; inline -: FILE_ATTRIBUTE_NOT_CONTENT_INDEXED HEX: 00002000 ; inline -: FILE_ATTRIBUTE_ENCRYPTED HEX: 00004000 ; inline +CONSTANT: FILE_ATTRIBUTE_READONLY HEX: 00000001 +CONSTANT: FILE_ATTRIBUTE_HIDDEN HEX: 00000002 +CONSTANT: FILE_ATTRIBUTE_SYSTEM HEX: 00000004 +CONSTANT: FILE_ATTRIBUTE_DIRECTORY HEX: 00000010 +CONSTANT: FILE_ATTRIBUTE_ARCHIVE HEX: 00000020 +CONSTANT: FILE_ATTRIBUTE_DEVICE HEX: 00000040 +CONSTANT: FILE_ATTRIBUTE_NORMAL HEX: 00000080 +CONSTANT: FILE_ATTRIBUTE_TEMPORARY HEX: 00000100 +CONSTANT: FILE_ATTRIBUTE_SPARSE_FILE HEX: 00000200 +CONSTANT: FILE_ATTRIBUTE_REPARSE_POINT HEX: 00000400 +CONSTANT: FILE_ATTRIBUTE_COMPRESSED HEX: 00000800 +CONSTANT: FILE_ATTRIBUTE_OFFLINE HEX: 00001000 +CONSTANT: FILE_ATTRIBUTE_NOT_CONTENT_INDEXED HEX: 00002000 +CONSTANT: FILE_ATTRIBUTE_ENCRYPTED HEX: 00004000 -: FILE_NOTIFY_CHANGE_FILE HEX: 001 ; inline -: FILE_NOTIFY_CHANGE_DIR_NAME HEX: 002 ; inline -: FILE_NOTIFY_CHANGE_ATTRIBUTES HEX: 004 ; inline -: FILE_NOTIFY_CHANGE_SIZE HEX: 008 ; inline -: FILE_NOTIFY_CHANGE_LAST_WRITE HEX: 010 ; inline -: FILE_NOTIFY_CHANGE_LAST_ACCESS HEX: 020 ; inline -: FILE_NOTIFY_CHANGE_CREATION HEX: 040 ; inline -: FILE_NOTIFY_CHANGE_EA HEX: 080 ; inline -: FILE_NOTIFY_CHANGE_SECURITY HEX: 100 ; inline -: FILE_NOTIFY_CHANGE_FILE_NAME HEX: 200 ; inline -: FILE_NOTIFY_CHANGE_ALL HEX: 3ff ; inline +CONSTANT: FILE_NOTIFY_CHANGE_FILE HEX: 001 +CONSTANT: FILE_NOTIFY_CHANGE_DIR_NAME HEX: 002 +CONSTANT: FILE_NOTIFY_CHANGE_ATTRIBUTES HEX: 004 +CONSTANT: FILE_NOTIFY_CHANGE_SIZE HEX: 008 +CONSTANT: FILE_NOTIFY_CHANGE_LAST_WRITE HEX: 010 +CONSTANT: FILE_NOTIFY_CHANGE_LAST_ACCESS HEX: 020 +CONSTANT: FILE_NOTIFY_CHANGE_CREATION HEX: 040 +CONSTANT: FILE_NOTIFY_CHANGE_EA HEX: 080 +CONSTANT: FILE_NOTIFY_CHANGE_SECURITY HEX: 100 +CONSTANT: FILE_NOTIFY_CHANGE_FILE_NAME HEX: 200 +CONSTANT: FILE_NOTIFY_CHANGE_ALL HEX: 3ff -: FILE_ACTION_ADDED 1 ; inline -: FILE_ACTION_REMOVED 2 ; inline -: FILE_ACTION_MODIFIED 3 ; inline -: FILE_ACTION_RENAMED_OLD_NAME 4 ; inline -: FILE_ACTION_RENAMED_NEW_NAME 5 ; inline +CONSTANT: FILE_ACTION_ADDED 1 +CONSTANT: FILE_ACTION_REMOVED 2 +CONSTANT: FILE_ACTION_MODIFIED 3 +CONSTANT: FILE_ACTION_RENAMED_OLD_NAME 4 +CONSTANT: FILE_ACTION_RENAMED_NEW_NAME 5 C-STRUCT: FILE_NOTIFY_INFORMATION { "DWORD" "NextEntryOffset" } @@ -96,107 +96,106 @@ C-STRUCT: FILE_NOTIFY_INFORMATION { "WCHAR[1]" "FileName" } ; TYPEDEF: FILE_NOTIFY_INFORMATION* PFILE_NOTIFY_INFORMATION -: STD_INPUT_HANDLE -10 ; inline -: STD_OUTPUT_HANDLE -11 ; inline -: STD_ERROR_HANDLE -12 ; inline +CONSTANT: STD_INPUT_HANDLE -10 +CONSTANT: STD_OUTPUT_HANDLE -11 +CONSTANT: STD_ERROR_HANDLE -12 -: INVALID_HANDLE_VALUE -1 ; inline -: INVALID_FILE_SIZE HEX: FFFFFFFF ; inline -: INVALID_SET_FILE_POINTER HEX: ffffffff ; inline +: INVALID_HANDLE_VALUE ( -- alien ) -1 ; inline +CONSTANT: INVALID_FILE_SIZE HEX: FFFFFFFF +CONSTANT: INVALID_SET_FILE_POINTER HEX: ffffffff -: FILE_BEGIN 0 ; inline -: FILE_CURRENT 1 ; inline -: FILE_END 2 ; inline +CONSTANT: FILE_BEGIN 0 +CONSTANT: FILE_CURRENT 1 +CONSTANT: FILE_END 2 -: OF_READ 0 ; -: OF_READWRITE 2 ; -: OF_WRITE 1 ; -: OF_SHARE_COMPAT 0 ; -: OF_SHARE_DENY_NONE 64 ; -: OF_SHARE_DENY_READ 48 ; -: OF_SHARE_DENY_WRITE 32 ; -: OF_SHARE_EXCLUSIVE 16 ; -: OF_CANCEL 2048 ; -: OF_CREATE 4096 ; -: OF_DELETE 512 ; -: OF_EXIST 16384 ; -: OF_PARSE 256 ; -: OF_PROMPT 8192 ; -: OF_REOPEN 32768 ; -: OF_VERIFY 1024 ; +CONSTANT: OF_READ 0 +CONSTANT: OF_READWRITE 2 +CONSTANT: OF_WRITE 1 +CONSTANT: OF_SHARE_COMPAT 0 +CONSTANT: OF_SHARE_DENY_NONE 64 +CONSTANT: OF_SHARE_DENY_READ 48 +CONSTANT: OF_SHARE_DENY_WRITE 32 +CONSTANT: OF_SHARE_EXCLUSIVE 16 +CONSTANT: OF_CANCEL 2048 +CONSTANT: OF_CREATE 4096 +CONSTANT: OF_DELETE 512 +CONSTANT: OF_EXIST 16384 +CONSTANT: OF_PARSE 256 +CONSTANT: OF_PROMPT 8192 +CONSTANT: OF_REOPEN 32768 +CONSTANT: OF_VERIFY 1024 -: INFINITE HEX: FFFFFFFF ; inline +CONSTANT: INFINITE HEX: FFFFFFFF ! From C:\cygwin\usr\include\w32api\winbase.h -: FILE_TYPE_UNKNOWN 0 ; -: FILE_TYPE_DISK 1 ; -: FILE_TYPE_CHAR 2 ; -: FILE_TYPE_PIPE 3 ; -: FILE_TYPE_REMOTE HEX: 8000 ; +CONSTANT: FILE_TYPE_UNKNOWN 0 +CONSTANT: FILE_TYPE_DISK 1 +CONSTANT: FILE_TYPE_CHAR 2 +CONSTANT: FILE_TYPE_PIPE 3 +CONSTANT: FILE_TYPE_REMOTE HEX: 8000 -: TIME_ZONE_ID_UNKNOWN 0 ; inline -: TIME_ZONE_ID_STANDARD 1 ; inline -: TIME_ZONE_ID_DAYLIGHT 2 ; inline -: TIME_ZONE_ID_INVALID HEX: FFFFFFFF ; inline +CONSTANT: TIME_ZONE_ID_UNKNOWN 0 +CONSTANT: TIME_ZONE_ID_STANDARD 1 +CONSTANT: TIME_ZONE_ID_DAYLIGHT 2 +CONSTANT: TIME_ZONE_ID_INVALID HEX: FFFFFFFF +CONSTANT: PF_XMMI64_INSTRUCTIONS_AVAILABLE 10 +CONSTANT: PF_SSE3_INSTRUCTIONS_AVAILABLE 13 -: PF_XMMI64_INSTRUCTIONS_AVAILABLE 10 ; inline -: PF_SSE3_INSTRUCTIONS_AVAILABLE 13 ; inline +CONSTANT: MAX_COMPUTERNAME_LENGTH 15 +CONSTANT: UNLEN 256 -: MAX_COMPUTERNAME_LENGTH 15 ; inline -: UNLEN 256 ; inline +CONSTANT: PROCESS_TERMINATE HEX: 1 +CONSTANT: PROCESS_CREATE_THREAD HEX: 2 +CONSTANT: PROCESS_VM_OPERATION HEX: 8 +CONSTANT: PROCESS_VM_READ HEX: 10 +CONSTANT: PROCESS_VM_WRITE HEX: 20 +CONSTANT: PROCESS_DUP_HANDLE HEX: 40 +CONSTANT: PROCESS_CREATE_PROCESS HEX: 80 +CONSTANT: PROCESS_SET_QUOTA HEX: 100 +CONSTANT: PROCESS_SET_INFORMATION HEX: 200 +CONSTANT: PROCESS_QUERY_INFORMATION HEX: 400 -: PROCESS_TERMINATE ( -- n ) HEX: 1 ; inline -: PROCESS_CREATE_THREAD ( -- n ) HEX: 2 ; inline -: PROCESS_VM_OPERATION ( -- n ) HEX: 8 ; inline -: PROCESS_VM_READ ( -- n ) HEX: 10 ; inline -: PROCESS_VM_WRITE ( -- n ) HEX: 20 ; inline -: PROCESS_DUP_HANDLE ( -- n ) HEX: 40 ; inline -: PROCESS_CREATE_PROCESS ( -- n ) HEX: 80 ; inline -: PROCESS_SET_QUOTA ( -- n ) HEX: 100 ; inline -: PROCESS_SET_INFORMATION ( -- n ) HEX: 200 ; inline -: PROCESS_QUERY_INFORMATION ( -- n ) HEX: 400 ; inline +CONSTANT: MEM_COMMIT HEX: 1000 +CONSTANT: MEM_RELEASE HEX: 8000 -: MEM_COMMIT ( -- n ) HEX: 1000 ; inline -: MEM_RELEASE ( -- n ) HEX: 8000 ; inline +CONSTANT: PAGE_NOACCESS 1 +CONSTANT: PAGE_READONLY 2 +CONSTANT: PAGE_READWRITE 4 +CONSTANT: PAGE_WRITECOPY 8 +CONSTANT: PAGE_EXECUTE HEX: 10 +CONSTANT: PAGE_EXECUTE_READ HEX: 20 +CONSTANT: PAGE_EXECUTE_READWRITE HEX: 40 +CONSTANT: PAGE_EXECUTE_WRITECOPY HEX: 80 +CONSTANT: PAGE_GUARD HEX: 100 +CONSTANT: PAGE_NOCACHE HEX: 200 -: PAGE_NOACCESS 1 ; inline -: PAGE_READONLY 2 ; inline -: PAGE_READWRITE 4 ; inline -: PAGE_WRITECOPY 8 ; inline -: PAGE_EXECUTE HEX: 10 ; inline -: PAGE_EXECUTE_READ HEX: 20 ; inline -: PAGE_EXECUTE_READWRITE HEX: 40 ; inline -: PAGE_EXECUTE_WRITECOPY HEX: 80 ; inline -: PAGE_GUARD HEX: 100 ; inline -: PAGE_NOCACHE HEX: 200 ; inline +CONSTANT: SEC_BASED HEX: 00200000 +CONSTANT: SEC_NO_CHANGE HEX: 00400000 +CONSTANT: SEC_FILE HEX: 00800000 +CONSTANT: SEC_IMAGE HEX: 01000000 +CONSTANT: SEC_VLM HEX: 02000000 +CONSTANT: SEC_RESERVE HEX: 04000000 +CONSTANT: SEC_COMMIT HEX: 08000000 +CONSTANT: SEC_NOCACHE HEX: 10000000 +ALIAS: MEM_IMAGE SEC_IMAGE -: SEC_BASED HEX: 00200000 ; inline -: SEC_NO_CHANGE HEX: 00400000 ; inline -: SEC_FILE HEX: 00800000 ; inline -: SEC_IMAGE HEX: 01000000 ; inline -: SEC_VLM HEX: 02000000 ; inline -: SEC_RESERVE HEX: 04000000 ; inline -: SEC_COMMIT HEX: 08000000 ; inline -: SEC_NOCACHE HEX: 10000000 ; inline -: MEM_IMAGE SEC_IMAGE ; inline +CONSTANT: ERROR_ALREADY_EXISTS 183 -: ERROR_ALREADY_EXISTS 183 ; inline +CONSTANT: FILE_MAP_ALL_ACCESS HEX: f001f +CONSTANT: FILE_MAP_READ 4 +CONSTANT: FILE_MAP_WRITE 2 +CONSTANT: FILE_MAP_COPY 1 -: FILE_MAP_ALL_ACCESS HEX: f001f ; -: FILE_MAP_READ 4 ; -: FILE_MAP_WRITE 2 ; -: FILE_MAP_COPY 1 ; - -: THREAD_MODE_BACKGROUND_BEGIN HEX: 10000 ; inline -: THREAD_MODE_BACKGROUND_END HEX: 20000 ; inline -: THREAD_PRIORITY_ABOVE_NORMAL 1 ; inline -: THREAD_PRIORITY_BELOW_NORMAL -1 ; inline -: THREAD_PRIORITY_HIGHEST 2 ; inline -: THREAD_PRIORITY_IDLE -15 ; inline -: THREAD_PRIORITY_LOWEST -2 ; inline -: THREAD_PRIORITY_NORMAL 0 ; inline -: THREAD_PRIORITY_TIME_CRITICAL 15 ; inline +CONSTANT: THREAD_MODE_BACKGROUND_BEGIN HEX: 10000 +CONSTANT: THREAD_MODE_BACKGROUND_END HEX: 20000 +CONSTANT: THREAD_PRIORITY_ABOVE_NORMAL 1 +CONSTANT: THREAD_PRIORITY_BELOW_NORMAL -1 +CONSTANT: THREAD_PRIORITY_HIGHEST 2 +CONSTANT: THREAD_PRIORITY_IDLE -15 +CONSTANT: THREAD_PRIORITY_LOWEST -2 +CONSTANT: THREAD_PRIORITY_NORMAL 0 +CONSTANT: THREAD_PRIORITY_TIME_CRITICAL 15 C-STRUCT: OVERLAPPED { "UINT_PTR" "internal" } @@ -321,74 +320,74 @@ C-STRUCT: GUID { { "UCHAR" 8 } "Data4" } ; -: SE_CREATE_TOKEN_NAME "SeCreateTokenPrivilege" ; -: SE_ASSIGNPRIMARYTOKEN_NAME "SeAssignPrimaryTokenPrivilege" ; -: SE_LOCK_MEMORY_NAME "SeLockMemoryPrivilege" ; -: SE_INCREASE_QUOTA_NAME "SeIncreaseQuotaPrivilege" ; -: SE_UNSOLICITED_INPUT_NAME "SeUnsolicitedInputPrivilege" ; -: SE_MACHINE_ACCOUNT_NAME "SeMachineAccountPrivilege" ; -: SE_TCB_NAME "SeTcbPrivilege" ; -: SE_SECURITY_NAME "SeSecurityPrivilege" ; -: SE_TAKE_OWNERSHIP_NAME "SeTakeOwnershipPrivilege" ; -: SE_LOAD_DRIVER_NAME "SeLoadDriverPrivilege" ; -: SE_SYSTEM_PROFILE_NAME "SeSystemProfilePrivilege" ; -: SE_SYSTEMTIME_NAME "SeSystemtimePrivilege" ; -: SE_PROF_SINGLE_PROCESS_NAME "SeProfileSingleProcessPrivilege" ; -: SE_INC_BASE_PRIORITY_NAME "SeIncreaseBasePriorityPrivilege" ; -: SE_CREATE_PAGEFILE_NAME "SeCreatePagefilePrivilege" ; -: SE_CREATE_PERMANENT_NAME "SeCreatePermanentPrivilege" ; -: SE_BACKUP_NAME "SeBackupPrivilege" ; -: SE_RESTORE_NAME "SeRestorePrivilege" ; -: SE_SHUTDOWN_NAME "SeShutdownPrivilege" ; -: SE_DEBUG_NAME "SeDebugPrivilege" ; -: SE_AUDIT_NAME "SeAuditPrivilege" ; -: SE_SYSTEM_ENVIRONMENT_NAME "SeSystemEnvironmentPrivilege" ; -: SE_CHANGE_NOTIFY_NAME "SeChangeNotifyPrivilege" ; -: SE_REMOTE_SHUTDOWN_NAME "SeRemoteShutdownPrivilege" ; -: SE_UNDOCK_NAME "SeUndockPrivilege" ; -: SE_ENABLE_DELEGATION_NAME "SeEnableDelegationPrivilege" ; -: SE_MANAGE_VOLUME_NAME "SeManageVolumePrivilege" ; -: SE_IMPERSONATE_NAME "SeImpersonatePrivilege" ; -: SE_CREATE_GLOBAL_NAME "SeCreateGlobalPrivilege" ; +CONSTANT: SE_CREATE_TOKEN_NAME "SeCreateTokenPrivilege" +CONSTANT: SE_ASSIGNPRIMARYTOKEN_NAME "SeAssignPrimaryTokenPrivilege" +CONSTANT: SE_LOCK_MEMORY_NAME "SeLockMemoryPrivilege" +CONSTANT: SE_INCREASE_QUOTA_NAME "SeIncreaseQuotaPrivilege" +CONSTANT: SE_UNSOLICITED_INPUT_NAME "SeUnsolicitedInputPrivilege" +CONSTANT: SE_MACHINE_ACCOUNT_NAME "SeMachineAccountPrivilege" +CONSTANT: SE_TCB_NAME "SeTcbPrivilege" +CONSTANT: SE_SECURITY_NAME "SeSecurityPrivilege" +CONSTANT: SE_TAKE_OWNERSHIP_NAME "SeTakeOwnershipPrivilege" +CONSTANT: SE_LOAD_DRIVER_NAME "SeLoadDriverPrivilege" +CONSTANT: SE_SYSTEM_PROFILE_NAME "SeSystemProfilePrivilege" +CONSTANT: SE_SYSTEMTIME_NAME "SeSystemtimePrivilege" +CONSTANT: SE_PROF_SINGLE_PROCESS_NAME "SeProfileSingleProcessPrivilege" +CONSTANT: SE_INC_BASE_PRIORITY_NAME "SeIncreaseBasePriorityPrivilege" +CONSTANT: SE_CREATE_PAGEFILE_NAME "SeCreatePagefilePrivilege" +CONSTANT: SE_CREATE_PERMANENT_NAME "SeCreatePermanentPrivilege" +CONSTANT: SE_BACKUP_NAME "SeBackupPrivilege" +CONSTANT: SE_RESTORE_NAME "SeRestorePrivilege" +CONSTANT: SE_SHUTDOWN_NAME "SeShutdownPrivilege" +CONSTANT: SE_DEBUG_NAME "SeDebugPrivilege" +CONSTANT: SE_AUDIT_NAME "SeAuditPrivilege" +CONSTANT: SE_SYSTEM_ENVIRONMENT_NAME "SeSystemEnvironmentPrivilege" +CONSTANT: SE_CHANGE_NOTIFY_NAME "SeChangeNotifyPrivilege" +CONSTANT: SE_REMOTE_SHUTDOWN_NAME "SeRemoteShutdownPrivilege" +CONSTANT: SE_UNDOCK_NAME "SeUndockPrivilege" +CONSTANT: SE_ENABLE_DELEGATION_NAME "SeEnableDelegationPrivilege" +CONSTANT: SE_MANAGE_VOLUME_NAME "SeManageVolumePrivilege" +CONSTANT: SE_IMPERSONATE_NAME "SeImpersonatePrivilege" +CONSTANT: SE_CREATE_GLOBAL_NAME "SeCreateGlobalPrivilege" -: SE_GROUP_MANDATORY HEX: 00000001 ; -: SE_GROUP_ENABLED_BY_DEFAULT HEX: 00000002 ; -: SE_GROUP_ENABLED HEX: 00000004 ; -: SE_GROUP_OWNER HEX: 00000008 ; -: SE_GROUP_USE_FOR_DENY_ONLY HEX: 00000010 ; -: SE_GROUP_LOGON_ID HEX: C0000000 ; -: SE_GROUP_RESOURCE HEX: 20000000 ; +CONSTANT: SE_GROUP_MANDATORY HEX: 00000001 +CONSTANT: SE_GROUP_ENABLED_BY_DEFAULT HEX: 00000002 +CONSTANT: SE_GROUP_ENABLED HEX: 00000004 +CONSTANT: SE_GROUP_OWNER HEX: 00000008 +CONSTANT: SE_GROUP_USE_FOR_DENY_ONLY HEX: 00000010 +CONSTANT: SE_GROUP_LOGON_ID HEX: C0000000 +CONSTANT: SE_GROUP_RESOURCE HEX: 20000000 -: SE_PRIVILEGE_ENABLED_BY_DEFAULT HEX: 00000001 ; -: SE_PRIVILEGE_ENABLED HEX: 00000002 ; -: SE_PRIVILEGE_REMOVE HEX: 00000004 ; -: SE_PRIVILEGE_USED_FOR_ACCESS HEX: 80000000 ; +CONSTANT: SE_PRIVILEGE_ENABLED_BY_DEFAULT HEX: 00000001 +CONSTANT: SE_PRIVILEGE_ENABLED HEX: 00000002 +CONSTANT: SE_PRIVILEGE_REMOVE HEX: 00000004 +CONSTANT: SE_PRIVILEGE_USED_FOR_ACCESS HEX: 80000000 -: PRIVILEGE_SET_ALL_NECESSARY 1 ; +CONSTANT: PRIVILEGE_SET_ALL_NECESSARY 1 -: SE_OWNER_DEFAULTED HEX: 00000001 ; -: SE_GROUP_DEFAULTED HEX: 00000002 ; -: SE_DACL_PRESENT HEX: 00000004 ; -: SE_DACL_DEFAULTED HEX: 00000008 ; -: SE_SACL_PRESENT HEX: 00000010 ; -: SE_SACL_DEFAULTED HEX: 00000020 ; -: SE_DACL_AUTO_INHERIT_REQ HEX: 00000100 ; -: SE_SACL_AUTO_INHERIT_REQ HEX: 00000200 ; -: SE_DACL_AUTO_INHERITED HEX: 00000400 ; -: SE_SACL_AUTO_INHERITED HEX: 00000800 ; -: SE_DACL_PROTECTED HEX: 00001000 ; -: SE_SACL_PROTECTED HEX: 00002000 ; -: SE_SELF_RELATIVE HEX: 00008000 ; +CONSTANT: SE_OWNER_DEFAULTED HEX: 00000001 +CONSTANT: SE_GROUP_DEFAULTED HEX: 00000002 +CONSTANT: SE_DACL_PRESENT HEX: 00000004 +CONSTANT: SE_DACL_DEFAULTED HEX: 00000008 +CONSTANT: SE_SACL_PRESENT HEX: 00000010 +CONSTANT: SE_SACL_DEFAULTED HEX: 00000020 +CONSTANT: SE_DACL_AUTO_INHERIT_REQ HEX: 00000100 +CONSTANT: SE_SACL_AUTO_INHERIT_REQ HEX: 00000200 +CONSTANT: SE_DACL_AUTO_INHERITED HEX: 00000400 +CONSTANT: SE_SACL_AUTO_INHERITED HEX: 00000800 +CONSTANT: SE_DACL_PROTECTED HEX: 00001000 +CONSTANT: SE_SACL_PROTECTED HEX: 00002000 +CONSTANT: SE_SELF_RELATIVE HEX: 00008000 -: ANYSIZE_ARRAY 1 ; inline +CONSTANT: ANYSIZE_ARRAY 1 -: MAXIMUM_WAIT_OBJECTS 64 ; inline -: MAXIMUM_SUSPEND_COUNT HEX: 7f ; inline -: WAIT_OBJECT_0 0 ; inline -: WAIT_ABANDONED_0 128 ; inline -: WAIT_TIMEOUT 258 ; inline -: WAIT_IO_COMPLETION HEX: c0 ; inline -: WAIT_FAILED HEX: ffffffff ; inline +CONSTANT: MAXIMUM_WAIT_OBJECTS 64 +CONSTANT: MAXIMUM_SUSPEND_COUNT HEX: 7f +CONSTANT: WAIT_OBJECT_0 0 +CONSTANT: WAIT_ABANDONED_0 128 +CONSTANT: WAIT_TIMEOUT 258 +CONSTANT: WAIT_IO_COMPLETION HEX: c0 +CONSTANT: WAIT_FAILED HEX: ffffffff C-STRUCT: LUID { "DWORD" "LowPart" } @@ -427,7 +426,7 @@ C-STRUCT: BY_HANDLE_FILE_INFORMATION { "DWORD" "nFileIndexLow" } ; TYPEDEF: BY_HANDLE_FILE_INFORMATION* LPBY_HANDLE_FILE_INFORMATION -: OFS_MAXPATHNAME 128 ; +CONSTANT: OFS_MAXPATHNAME 128 C-STRUCT: OFSTRUCT { "BYTE" "cBytes" } @@ -489,34 +488,34 @@ C-STRUCT: SECURITY_ATTRIBUTES { "LPVOID" "lpSecurityDescriptor" } { "BOOL" "bInheritHandle" } ; -: HANDLE_FLAG_INHERIT 1 ; inline -: HANDLE_FLAG_PROTECT_FROM_CLOSE 2 ; inline +CONSTANT: HANDLE_FLAG_INHERIT 1 +CONSTANT: HANDLE_FLAG_PROTECT_FROM_CLOSE 2 -: STARTF_USESHOWWINDOW HEX: 00000001 ; inline -: STARTF_USESIZE HEX: 00000002 ; inline -: STARTF_USEPOSITION HEX: 00000004 ; inline -: STARTF_USECOUNTCHARS HEX: 00000008 ; inline -: STARTF_USEFILLATTRIBUTE HEX: 00000010 ; inline -: STARTF_RUNFULLSCREEN HEX: 00000020 ; inline -: STARTF_FORCEONFEEDBACK HEX: 00000040 ; inline -: STARTF_FORCEOFFFEEDBACK HEX: 00000080 ; inline -: STARTF_USESTDHANDLES HEX: 00000100 ; inline -: STARTF_USEHOTKEY HEX: 00000200 ; inline +CONSTANT: STARTF_USESHOWWINDOW HEX: 00000001 +CONSTANT: STARTF_USESIZE HEX: 00000002 +CONSTANT: STARTF_USEPOSITION HEX: 00000004 +CONSTANT: STARTF_USECOUNTCHARS HEX: 00000008 +CONSTANT: STARTF_USEFILLATTRIBUTE HEX: 00000010 +CONSTANT: STARTF_RUNFULLSCREEN HEX: 00000020 +CONSTANT: STARTF_FORCEONFEEDBACK HEX: 00000040 +CONSTANT: STARTF_FORCEOFFFEEDBACK HEX: 00000080 +CONSTANT: STARTF_USESTDHANDLES HEX: 00000100 +CONSTANT: STARTF_USEHOTKEY HEX: 00000200 -: PIPE_ACCESS_INBOUND 1 ; inline -: PIPE_ACCESS_OUTBOUND 2 ; inline -: PIPE_ACCESS_DUPLEX 3 ; inline +CONSTANT: PIPE_ACCESS_INBOUND 1 +CONSTANT: PIPE_ACCESS_OUTBOUND 2 +CONSTANT: PIPE_ACCESS_DUPLEX 3 -: PIPE_TYPE_BYTE 0 ; inline -: PIPE_TYPE_MESSAGE 4 ; inline +CONSTANT: PIPE_TYPE_BYTE 0 +CONSTANT: PIPE_TYPE_MESSAGE 4 -: PIPE_READMODE_BYTE 0 ; inline -: PIPE_READMODE_MESSAGE 2 ; inline +CONSTANT: PIPE_READMODE_BYTE 0 +CONSTANT: PIPE_READMODE_MESSAGE 2 -: PIPE_WAIT 0 ; inline -: PIPE_NOWAIT 1 ; inline +CONSTANT: PIPE_WAIT 0 +CONSTANT: PIPE_NOWAIT 1 -: PIPE_UNLIMITED_INSTANCES 255 ; inline +CONSTANT: PIPE_UNLIMITED_INSTANCES 255 LIBRARY: kernel32 ! FUNCTION: _hread @@ -641,29 +640,29 @@ ALIAS: CreateNamedPipe CreateNamedPipeW ! FUNCTION: CreateNlsSecurityDescriptor FUNCTION: BOOL CreatePipe ( PHANDLE hReadPipe, PHANDLE hWritePipe, LPSECURITY_ATTRIBUTES lpPipeAttributes, DWORD nSize ) ; -: DEBUG_PROCESS HEX: 00000001 ; -: DEBUG_ONLY_THIS_PROCESS HEX: 00000002 ; -: CREATE_SUSPENDED HEX: 00000004 ; -: DETACHED_PROCESS HEX: 00000008 ; -: CREATE_NEW_CONSOLE HEX: 00000010 ; -: NORMAL_PRIORITY_CLASS HEX: 00000020 ; -: IDLE_PRIORITY_CLASS HEX: 00000040 ; -: HIGH_PRIORITY_CLASS HEX: 00000080 ; -: REALTIME_PRIORITY_CLASS HEX: 00000100 ; -: CREATE_NEW_PROCESS_GROUP HEX: 00000200 ; -: CREATE_UNICODE_ENVIRONMENT HEX: 00000400 ; -: CREATE_SEPARATE_WOW_VDM HEX: 00000800 ; -: CREATE_SHARED_WOW_VDM HEX: 00001000 ; -: CREATE_FORCEDOS HEX: 00002000 ; -: BELOW_NORMAL_PRIORITY_CLASS HEX: 00004000 ; -: ABOVE_NORMAL_PRIORITY_CLASS HEX: 00008000 ; -: CREATE_BREAKAWAY_FROM_JOB HEX: 01000000 ; -: CREATE_WITH_USERPROFILE HEX: 02000000 ; -: CREATE_DEFAULT_ERROR_MODE HEX: 04000000 ; -: CREATE_NO_WINDOW HEX: 08000000 ; -: PROFILE_USER HEX: 10000000 ; -: PROFILE_KERNEL HEX: 20000000 ; -: PROFILE_SERVER HEX: 40000000 ; +CONSTANT: DEBUG_PROCESS HEX: 00000001 +CONSTANT: DEBUG_ONLY_THIS_PROCESS HEX: 00000002 +CONSTANT: CREATE_SUSPENDED HEX: 00000004 +CONSTANT: DETACHED_PROCESS HEX: 00000008 +CONSTANT: CREATE_NEW_CONSOLE HEX: 00000010 +CONSTANT: NORMAL_PRIORITY_CLASS HEX: 00000020 +CONSTANT: IDLE_PRIORITY_CLASS HEX: 00000040 +CONSTANT: HIGH_PRIORITY_CLASS HEX: 00000080 +CONSTANT: REALTIME_PRIORITY_CLASS HEX: 00000100 +CONSTANT: CREATE_NEW_PROCESS_GROUP HEX: 00000200 +CONSTANT: CREATE_UNICODE_ENVIRONMENT HEX: 00000400 +CONSTANT: CREATE_SEPARATE_WOW_VDM HEX: 00000800 +CONSTANT: CREATE_SHARED_WOW_VDM HEX: 00001000 +CONSTANT: CREATE_FORCEDOS HEX: 00002000 +CONSTANT: BELOW_NORMAL_PRIORITY_CLASS HEX: 00004000 +CONSTANT: ABOVE_NORMAL_PRIORITY_CLASS HEX: 00008000 +CONSTANT: CREATE_BREAKAWAY_FROM_JOB HEX: 01000000 +CONSTANT: CREATE_WITH_USERPROFILE HEX: 02000000 +CONSTANT: CREATE_DEFAULT_ERROR_MODE HEX: 04000000 +CONSTANT: CREATE_NO_WINDOW HEX: 08000000 +CONSTANT: PROFILE_USER HEX: 10000000 +CONSTANT: PROFILE_KERNEL HEX: 20000000 +CONSTANT: PROFILE_SERVER HEX: 40000000 FUNCTION: BOOL CreateProcessW ( LPCTSTR lpApplicationname, LPTSTR lpCommandLine, diff --git a/basis/windows/messages/messages.factor b/basis/windows/messages/messages.factor old mode 100644 new mode 100755 index 0f271b4b59..bb30968217 --- a/basis/windows/messages/messages.factor +++ b/basis/windows/messages/messages.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2005, 2006 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: accessors assocs hashtables kernel math namespaces words -windows.types vocabs sequences ; +windows.types vocabs sequences constants alias ; IN: windows.messages SYMBOL: windows-messages @@ -14,1012 +14,1013 @@ windows-messages set-global : windows-message-name ( n -- name ) windows-messages get at "unknown message" or ; -: WM_NULL HEX: 0000 ; inline -: WM_CREATE HEX: 0001 ; inline -: WM_DESTROY HEX: 0002 ; inline -: WM_MOVE HEX: 0003 ; inline -: WM_SIZE HEX: 0005 ; inline -: WM_ACTIVATE HEX: 0006 ; inline -: WM_SETFOCUS HEX: 0007 ; inline -: WM_KILLFOCUS HEX: 0008 ; inline -: WM_ENABLE HEX: 000A ; inline -: WM_SETREDRAW HEX: 000B ; inline -: WM_SETTEXT HEX: 000C ; inline -: WM_GETTEXT HEX: 000D ; inline -: WM_GETTEXTLENGTH HEX: 000E ; inline -: WM_PAINT HEX: 000F ; inline -: WM_CLOSE HEX: 0010 ; inline -: WM_QUERYENDSESSION HEX: 0011 ; inline -: WM_QUERYOPEN HEX: 0013 ; inline -: WM_ENDSESSION HEX: 0016 ; inline -: WM_QUIT HEX: 0012 ; inline -: WM_ERASEBKGND HEX: 0014 ; inline -: WM_SYSCOLORCHANGE HEX: 0015 ; inline -: WM_SHOWWINDOW HEX: 0018 ; inline -: WM_WININICHANGE HEX: 001A ; inline -: WM_SETTINGCHANGE HEX: 001A ; inline -: WM_DEVMODECHANGE HEX: 001B ; inline -: WM_ACTIVATEAPP HEX: 001C ; inline -: WM_FONTCHANGE HEX: 001D ; inline -: WM_TIMECHANGE HEX: 001E ; inline -: WM_CANCELMODE HEX: 001F ; inline -: WM_SETCURSOR HEX: 0020 ; inline -: WM_MOUSEACTIVATE HEX: 0021 ; inline -: WM_CHILDACTIVATE HEX: 0022 ; inline -: WM_QUEUESYNC HEX: 0023 ; inline -: WM_GETMINMAXINFO HEX: 0024 ; inline -: WM_PAINTICON HEX: 0026 ; inline -: WM_ICONERASEBKGND HEX: 0027 ; inline -: WM_NEXTDLGCTL HEX: 0028 ; inline -: WM_SPOOLERSTATUS HEX: 002A ; inline -: WM_DRAWITEM HEX: 002B ; inline -: WM_MEASUREITEM HEX: 002C ; inline -: WM_DELETEITEM HEX: 002D ; inline -: WM_VKEYTOITEM HEX: 002E ; inline -: WM_CHARTOITEM HEX: 002F ; inline -: WM_SETFONT HEX: 0030 ; inline -: WM_GETFONT HEX: 0031 ; inline -: WM_SETHOTKEY HEX: 0032 ; inline -: WM_GETHOTKEY HEX: 0033 ; inline -: WM_QUERYDRAGICON HEX: 0037 ; inline -: WM_COMPAREITEM HEX: 0039 ; inline -: WM_GETOBJECT HEX: 003D ; inline -: WM_COMPACTING HEX: 0041 ; inline -: WM_COMMNOTIFY HEX: 0044 ; inline -: WM_WINDOWPOSCHANGING HEX: 0046 ; inline -: WM_WINDOWPOSCHANGED HEX: 0047 ; inline -: WM_POWER HEX: 0048 ; inline -: WM_COPYDATA HEX: 004A ; inline -: WM_CANCELJOURNAL HEX: 004B ; inline -: WM_NOTIFY HEX: 004E ; inline -: WM_INPUTLANGCHANGEREQUEST HEX: 0050 ; inline -: WM_INPUTLANGCHANGE HEX: 0051 ; inline -: WM_TCARD HEX: 0052 ; inline -: WM_HELP HEX: 0053 ; inline -: WM_USERCHANGED HEX: 0054 ; inline -: WM_NOTIFYFORMAT HEX: 0055 ; inline -: WM_CONTEXTMENU HEX: 007B ; inline -: WM_STYLECHANGING HEX: 007C ; inline -: WM_STYLECHANGED HEX: 007D ; inline -: WM_DISPLAYCHANGE HEX: 007E ; inline -: WM_GETICON HEX: 007F ; inline -: WM_SETICON HEX: 0080 ; inline -: WM_NCCREATE HEX: 0081 ; inline -: WM_NCDESTROY HEX: 0082 ; inline -: WM_NCCALCSIZE HEX: 0083 ; inline -: WM_NCHITTEST HEX: 0084 ; inline -: WM_NCPAINT HEX: 0085 ; inline -: WM_NCACTIVATE HEX: 0086 ; inline -: WM_GETDLGCODE HEX: 0087 ; inline -: WM_SYNCPAINT HEX: 0088 ; inline -: WM_NCMOUSEMOVE HEX: 00A0 ; inline -: WM_NCLBUTTONDOWN HEX: 00A1 ; inline -: WM_NCLBUTTONUP HEX: 00A2 ; inline -: WM_NCLBUTTONDBLCLK HEX: 00A3 ; inline -: WM_NCRBUTTONDOWN HEX: 00A4 ; inline -: WM_NCRBUTTONUP HEX: 00A5 ; inline -: WM_NCRBUTTONDBLCLK HEX: 00A6 ; inline -: WM_NCMBUTTONDOWN HEX: 00A7 ; inline -: WM_NCMBUTTONUP HEX: 00A8 ; inline -: WM_NCMBUTTONDBLCLK HEX: 00A9 ; inline -: WM_NCXBUTTONDOWN HEX: 00AB ; inline -: WM_NCXBUTTONUP HEX: 00AC ; inline -: WM_NCXBUTTONDBLCLK HEX: 00AD ; inline -: WM_NCUAHDRAWCAPTION HEX: 00AE ; inline ! undocumented -: WM_NCUAHDRAWFRAME HEX: 00AF ; inline ! undocumented -: WM_INPUT HEX: 00FF ; inline -: WM_KEYFIRST HEX: 0100 ; inline -: WM_KEYDOWN HEX: 0100 ; inline -: WM_KEYUP HEX: 0101 ; inline -: WM_CHAR HEX: 0102 ; inline -: WM_DEADCHAR HEX: 0103 ; inline -: WM_SYSKEYDOWN HEX: 0104 ; inline -: WM_SYSKEYUP HEX: 0105 ; inline -: WM_SYSCHAR HEX: 0106 ; inline -: WM_SYSDEADCHAR HEX: 0107 ; inline -: WM_UNICHAR HEX: 0109 ; inline -: WM_KEYLAST_NT501 HEX: 0109 ; inline -: UNICODE_NOCHAR HEX: FFFF ; inline -: WM_KEYLAST_PRE501 HEX: 0108 ; inline -: WM_IME_STARTCOMPOSITION HEX: 010D ; inline -: WM_IME_ENDCOMPOSITION HEX: 010E ; inline -: WM_IME_COMPOSITION HEX: 010F ; inline -: WM_IME_KEYLAST HEX: 010F ; inline -: WM_INITDIALOG HEX: 0110 ; inline -: WM_COMMAND HEX: 0111 ; inline -: WM_SYSCOMMAND HEX: 0112 ; inline -: WM_TIMER HEX: 0113 ; inline -: WM_HSCROLL HEX: 0114 ; inline -: WM_VSCROLL HEX: 0115 ; inline -: WM_INITMENU HEX: 0116 ; inline -: WM_INITMENUPOPUP HEX: 0117 ; inline -: WM_MENUSELECT HEX: 011F ; inline -: WM_MENUCHAR HEX: 0120 ; inline -: WM_ENTERIDLE HEX: 0121 ; inline -: WM_MENURBUTTONUP HEX: 0122 ; inline -: WM_MENUDRAG HEX: 0123 ; inline -: WM_MENUGETOBJECT HEX: 0124 ; inline -: WM_UNINITMENUPOPUP HEX: 0125 ; inline -: WM_MENUCOMMAND HEX: 0126 ; inline -: WM_CHANGEUISTATE HEX: 0127 ; inline -: WM_UPDATEUISTATE HEX: 0128 ; inline -: WM_QUERYUISTATE HEX: 0129 ; inline -: WM_CTLCOLORMSGBOX HEX: 0132 ; inline -: WM_CTLCOLOREDIT HEX: 0133 ; inline -: WM_CTLCOLORLISTBOX HEX: 0134 ; inline -: WM_CTLCOLORBTN HEX: 0135 ; inline -: WM_CTLCOLORDLG HEX: 0136 ; inline -: WM_CTLCOLORSCROLLBAR HEX: 0137 ; inline -: WM_CTLCOLORSTATIC HEX: 0138 ; inline -: WM_MOUSEFIRST HEX: 0200 ; inline -: WM_MOUSEMOVE HEX: 0200 ; inline -: WM_LBUTTONDOWN HEX: 0201 ; inline -: WM_LBUTTONUP HEX: 0202 ; inline -: WM_LBUTTONDBLCLK HEX: 0203 ; inline -: WM_RBUTTONDOWN HEX: 0204 ; inline -: WM_RBUTTONUP HEX: 0205 ; inline -: WM_RBUTTONDBLCLK HEX: 0206 ; inline -: WM_MBUTTONDOWN HEX: 0207 ; inline -: WM_MBUTTONUP HEX: 0208 ; inline -: WM_MBUTTONDBLCLK HEX: 0209 ; inline -: WM_MOUSEWHEEL HEX: 020A ; inline -: WM_XBUTTONDOWN HEX: 020B ; inline -: WM_XBUTTONUP HEX: 020C ; inline -: WM_XBUTTONDBLCLK HEX: 020D ; inline -: WM_MOUSELAST_5 HEX: 020D ; inline -: WM_MOUSELAST_4 HEX: 020A ; inline -: WM_MOUSELAST_PRE_4 HEX: 0209 ; inline -: WM_PARENTNOTIFY HEX: 0210 ; inline -: WM_ENTERMENULOOP HEX: 0211 ; inline -: WM_EXITMENULOOP HEX: 0212 ; inline -: WM_NEXTMENU HEX: 0213 ; inline -: WM_SIZING HEX: 0214 ; inline -: WM_CAPTURECHANGED HEX: 0215 ; inline -: WM_MOVING HEX: 0216 ; inline -: WM_POWERBROADCAST HEX: 0218 ; inline -: WM_DEVICECHANGE HEX: 0219 ; inline -: WM_MDICREATE HEX: 0220 ; inline -: WM_MDIDESTROY HEX: 0221 ; inline -: WM_MDIACTIVATE HEX: 0222 ; inline -: WM_MDIRESTORE HEX: 0223 ; inline -: WM_MDINEXT HEX: 0224 ; inline -: WM_MDIMAXIMIZE HEX: 0225 ; inline -: WM_MDITILE HEX: 0226 ; inline -: WM_MDICASCADE HEX: 0227 ; inline -: WM_MDIICONARRANGE HEX: 0228 ; inline -: WM_MDIGETACTIVE HEX: 0229 ; inline -: WM_MDISETMENU HEX: 0230 ; inline -: WM_ENTERSIZEMOVE HEX: 0231 ; inline -: WM_EXITSIZEMOVE HEX: 0232 ; inline -: WM_DROPFILES HEX: 0233 ; inline -: WM_MDIREFRESHMENU HEX: 0234 ; inline -: WM_IME_SETCONTEXT HEX: 0281 ; inline -: WM_IME_NOTIFY HEX: 0282 ; inline -: WM_IME_CONTROL HEX: 0283 ; inline -: WM_IME_COMPOSITIONFULL HEX: 0284 ; inline -: WM_IME_SELECT HEX: 0285 ; inline -: WM_IME_CHAR HEX: 0286 ; inline -: WM_IME_REQUEST HEX: 0288 ; inline -: WM_IME_KEYDOWN HEX: 0290 ; inline -: WM_IME_KEYUP HEX: 0291 ; inline -: WM_MOUSEHOVER HEX: 02A1 ; inline -: WM_MOUSELEAVE HEX: 02A3 ; inline -: WM_NCMOUSEHOVER HEX: 02A0 ; inline -: WM_NCMOUSELEAVE HEX: 02A2 ; inline -: WM_WTSSESSION_CHANGE HEX: 02B1 ; inline -: WM_TABLET_FIRST HEX: 02c0 ; inline -: WM_TABLET_LAST HEX: 02df ; inline -: WM_CUT HEX: 0300 ; inline -: WM_COPY HEX: 0301 ; inline -: WM_PASTE HEX: 0302 ; inline -: WM_CLEAR HEX: 0303 ; inline -: WM_UNDO HEX: 0304 ; inline -: WM_RENDERFORMAT HEX: 0305 ; inline -: WM_RENDERALLFORMATS HEX: 0306 ; inline -: WM_DESTROYCLIPBOARD HEX: 0307 ; inline -: WM_DRAWCLIPBOARD HEX: 0308 ; inline -: WM_PAINTCLIPBOARD HEX: 0309 ; inline -: WM_VSCROLLCLIPBOARD HEX: 030A ; inline -: WM_SIZECLIPBOARD HEX: 030B ; inline -: WM_ASKCBFORMATNAME HEX: 030C ; inline -: WM_CHANGECBCHAIN HEX: 030D ; inline -: WM_HSCROLLCLIPBOARD HEX: 030E ; inline -: WM_QUERYNEWPALETTE HEX: 030F ; inline -: WM_PALETTEISCHANGING HEX: 0310 ; inline -: WM_PALETTECHANGED HEX: 0311 ; inline -: WM_HOTKEY HEX: 0312 ; inline -: WM_PRINT HEX: 0317 ; inline -: WM_PRINTCLIENT HEX: 0318 ; inline -: WM_APPCOMMAND HEX: 0319 ; inline -: WM_THEMECHANGED HEX: 031A ; inline -: WM_HANDHELDFIRST HEX: 0358 ; inline -: WM_HANDHELDLAST HEX: 035F ; inline -: WM_AFXFIRST HEX: 0360 ; inline -: WM_AFXLAST HEX: 037F ; inline -: WM_PENWINFIRST HEX: 0380 ; inline -: WM_PENWINLAST HEX: 038F ; inline -: WM_APP HEX: 8000 ; inline -: WM_USER HEX: 0400 ; inline -: EM_GETSEL HEX: 00B0 ; inline -: EM_SETSEL HEX: 00B1 ; inline -: EM_GETRECT HEX: 00B2 ; inline -: EM_SETRECT HEX: 00B3 ; inline -: EM_SETRECTNP HEX: 00B4 ; inline -: EM_SCROLL HEX: 00B5 ; inline -: EM_LINESCROLL HEX: 00B6 ; inline -: EM_SCROLLCARET HEX: 00B7 ; inline -: EM_GETMODIFY HEX: 00B8 ; inline -: EM_SETMODIFY HEX: 00B9 ; inline -: EM_GETLINECOUNT HEX: 00BA ; inline -: EM_LINEINDEX HEX: 00BB ; inline -: EM_SETHANDLE HEX: 00BC ; inline -: EM_GETHANDLE HEX: 00BD ; inline -: EM_GETTHUMB HEX: 00BE ; inline -: EM_LINELENGTH HEX: 00C1 ; inline -: EM_REPLACESEL HEX: 00C2 ; inline -: EM_GETLINE HEX: 00C4 ; inline -: EM_LIMITTEXT HEX: 00C5 ; inline -: EM_CANUNDO HEX: 00C6 ; inline -: EM_UNDO HEX: 00C7 ; inline -: EM_FMTLINES HEX: 00C8 ; inline -: EM_LINEFROMCHAR HEX: 00C9 ; inline -: EM_SETTABSTOPS HEX: 00CB ; inline -: EM_SETPASSWORDCHAR HEX: 00CC ; inline -: EM_EMPTYUNDOBUFFER HEX: 00CD ; inline -: EM_GETFIRSTVISIBLELINE HEX: 00CE ; inline -: EM_SETREADONLY HEX: 00CF ; inline -: EM_SETWORDBREAKPROC HEX: 00D0 ; inline -: EM_GETWORDBREAKPROC HEX: 00D1 ; inline -: EM_GETPASSWORDCHAR HEX: 00D2 ; inline -: EM_SETMARGINS HEX: 00D3 ; inline -: EM_GETMARGINS HEX: 00D4 ; inline -: EM_SETLIMITTEXT EM_LIMITTEXT ; inline -: EM_GETLIMITTEXT HEX: 00D5 ; inline -: EM_POSFROMCHAR HEX: 00D6 ; inline -: EM_CHARFROMPOS HEX: 00D7 ; inline -: EM_SETIMESTATUS HEX: 00D8 ; inline -: EM_GETIMESTATUS HEX: 00D9 ; inline -: BM_GETCHECK HEX: 00F0 ; inline -: BM_SETCHECK HEX: 00F1 ; inline -: BM_GETSTATE HEX: 00F2 ; inline -: BM_SETSTATE HEX: 00F3 ; inline -: BM_SETSTYLE HEX: 00F4 ; inline -: BM_CLICK HEX: 00F5 ; inline -: BM_GETIMAGE HEX: 00F6 ; inline -: BM_SETIMAGE HEX: 00F7 ; inline -: STM_SETICON HEX: 0170 ; inline -: STM_GETICON HEX: 0171 ; inline -: STM_SETIMAGE HEX: 0172 ; inline -: STM_GETIMAGE HEX: 0173 ; inline -: STM_MSGMAX HEX: 0174 ; inline -: DM_GETDEFID WM_USER ; inline -: DM_SETDEFID WM_USER 1 + ; inline -: DM_REPOSITION WM_USER 2 + ; inline -: LB_ADDSTRING HEX: 0180 ; inline -: LB_INSERTSTRING HEX: 0181 ; inline -: LB_DELETESTRING HEX: 0182 ; inline -: LB_SELITEMRANGEEX HEX: 0183 ; inline -: LB_RESETCONTENT HEX: 0184 ; inline -: LB_SETSEL HEX: 0185 ; inline -: LB_SETCURSEL HEX: 0186 ; inline -: LB_GETSEL HEX: 0187 ; inline -: LB_GETCURSEL HEX: 0188 ; inline -: LB_GETTEXT HEX: 0189 ; inline -: LB_GETTEXTLEN HEX: 018A ; inline -: LB_GETCOUNT HEX: 018B ; inline -: LB_SELECTSTRING HEX: 018C ; inline -: LB_DIR HEX: 018D ; inline -: LB_GETTOPINDEX HEX: 018E ; inline -: LB_FINDSTRING HEX: 018F ; inline -: LB_GETSELCOUNT HEX: 0190 ; inline -: LB_GETSELITEMS HEX: 0191 ; inline -: LB_SETTABSTOPS HEX: 0192 ; inline -: LB_GETHORIZONTALEXTENT HEX: 0193 ; inline -: LB_SETHORIZONTALEXTENT HEX: 0194 ; inline -: LB_SETCOLUMNWIDTH HEX: 0195 ; inline -: LB_ADDFILE HEX: 0196 ; inline -: LB_SETTOPINDEX HEX: 0197 ; inline -: LB_GETITEMRECT HEX: 0198 ; inline -: LB_GETITEMDATA HEX: 0199 ; inline -: LB_SETITEMDATA HEX: 019A ; inline -: LB_SELITEMRANGE HEX: 019B ; inline -: LB_SETANCHORINDEX HEX: 019C ; inline -: LB_GETANCHORINDEX HEX: 019D ; inline -: LB_SETCARETINDEX HEX: 019E ; inline -: LB_GETCARETINDEX HEX: 019F ; inline -: LB_SETITEMHEIGHT HEX: 01A0 ; inline -: LB_GETITEMHEIGHT HEX: 01A1 ; inline -: LB_FINDSTRINGEXACT HEX: 01A2 ; inline -: LB_SETLOCALE HEX: 01A5 ; inline -: LB_GETLOCALE HEX: 01A6 ; inline -: LB_SETCOUNT HEX: 01A7 ; inline -: LB_INITSTORAGE HEX: 01A8 ; inline -: LB_ITEMFROMPOINT HEX: 01A9 ; inline -: LB_MULTIPLEADDSTRING HEX: 01B1 ; inline -: LB_GETLISTBOXINFO HEX: 01B2 ; inline -: LB_MSGMAX_501 HEX: 01B3 ; inline -: LB_MSGMAX_WCE4 HEX: 01B1 ; inline -: LB_MSGMAX_4 HEX: 01B0 ; inline -: LB_MSGMAX_PRE4 HEX: 01A8 ; inline -: CB_GETEDITSEL HEX: 0140 ; inline -: CB_LIMITTEXT HEX: 0141 ; inline -: CB_SETEDITSEL HEX: 0142 ; inline -: CB_ADDSTRING HEX: 0143 ; inline -: CB_DELETESTRING HEX: 0144 ; inline -: CB_DIR HEX: 0145 ; inline -: CB_GETCOUNT HEX: 0146 ; inline -: CB_GETCURSEL HEX: 0147 ; inline -: CB_GETLBTEXT HEX: 0148 ; inline -: CB_GETLBTEXTLEN HEX: 0149 ; inline -: CB_INSERTSTRING HEX: 014A ; inline -: CB_RESETCONTENT HEX: 014B ; inline -: CB_FINDSTRING HEX: 014C ; inline -: CB_SELECTSTRING HEX: 014D ; inline -: CB_SETCURSEL HEX: 014E ; inline -: CB_SHOWDROPDOWN HEX: 014F ; inline -: CB_GETITEMDATA HEX: 0150 ; inline -: CB_SETITEMDATA HEX: 0151 ; inline -: CB_GETDROPPEDCONTROLRECT HEX: 0152 ; inline -: CB_SETITEMHEIGHT HEX: 0153 ; inline -: CB_GETITEMHEIGHT HEX: 0154 ; inline -: CB_SETEXTENDEDUI HEX: 0155 ; inline -: CB_GETEXTENDEDUI HEX: 0156 ; inline -: CB_GETDROPPEDSTATE HEX: 0157 ; inline -: CB_FINDSTRINGEXACT HEX: 0158 ; inline -: CB_SETLOCALE HEX: 0159 ; inline -: CB_GETLOCALE HEX: 015A ; inline -: CB_GETTOPINDEX HEX: 015B ; inline -: CB_SETTOPINDEX HEX: 015C ; inline -: CB_GETHORIZONTALEXTENT HEX: 015d ; inline -: CB_SETHORIZONTALEXTENT HEX: 015e ; inline -: CB_GETDROPPEDWIDTH HEX: 015f ; inline -: CB_SETDROPPEDWIDTH HEX: 0160 ; inline -: CB_INITSTORAGE HEX: 0161 ; inline -: CB_MULTIPLEADDSTRING HEX: 0163 ; inline -: CB_GETCOMBOBOXINFO HEX: 0164 ; inline -: CB_MSGMAX_501 HEX: 0165 ; inline -: CB_MSGMAX_WCE400 HEX: 0163 ; inline -: CB_MSGMAX_400 HEX: 0162 ; inline -: CB_MSGMAX_PRE400 HEX: 015B ; inline -: SBM_SETPOS HEX: 00E0 ; inline -: SBM_GETPOS HEX: 00E1 ; inline -: SBM_SETRANGE HEX: 00E2 ; inline -: SBM_SETRANGEREDRAW HEX: 00E6 ; inline -: SBM_GETRANGE HEX: 00E3 ; inline -: SBM_ENABLE_ARROWS HEX: 00E4 ; inline -: SBM_SETSCROLLINFO HEX: 00E9 ; inline -: SBM_GETSCROLLINFO HEX: 00EA ; inline -: SBM_GETSCROLLBARINFO HEX: 00EB ; inline -: LVM_FIRST HEX: 1000 ; inline ! ListView messages -: TV_FIRST HEX: 1100 ; inline ! TreeView messages -: HDM_FIRST HEX: 1200 ; inline ! Header messages -: TCM_FIRST HEX: 1300 ; inline ! Tab control messages -: PGM_FIRST HEX: 1400 ; inline ! Pager control messages -: ECM_FIRST HEX: 1500 ; inline ! Edit control messages -: BCM_FIRST HEX: 1600 ; inline ! Button control messages -: CBM_FIRST HEX: 1700 ; inline ! Combobox control messages -: CCM_FIRST HEX: 2000 ; inline ! Common control shared messages -: CCM_LAST CCM_FIRST HEX: 0200 + ; inline -: CCM_SETBKCOLOR CCM_FIRST 1 + ; inline -: CCM_SETCOLORSCHEME CCM_FIRST 2 + ; inline -: CCM_GETCOLORSCHEME CCM_FIRST 3 + ; inline -: CCM_GETDROPTARGET CCM_FIRST 4 + ; inline -: CCM_SETUNICODEFORMAT CCM_FIRST 5 + ; inline -: CCM_GETUNICODEFORMAT CCM_FIRST 6 + ; inline -: CCM_SETVERSION CCM_FIRST 7 + ; inline -: CCM_GETVERSION CCM_FIRST 8 + ; inline -: CCM_SETNOTIFYWINDOW CCM_FIRST 9 + ; inline -: CCM_SETWINDOWTHEME CCM_FIRST HEX: b + ; inline -: CCM_DPISCALE CCM_FIRST HEX: c + ; inline -: HDM_GETITEMCOUNT HDM_FIRST 0 + ; inline -: HDM_INSERTITEMA HDM_FIRST 1 + ; inline -: HDM_INSERTITEMW HDM_FIRST 10 + ; inline -: HDM_DELETEITEM HDM_FIRST 2 + ; inline -: HDM_GETITEMA HDM_FIRST 3 + ; inline -: HDM_GETITEMW HDM_FIRST 11 + ; inline -: HDM_SETITEMA HDM_FIRST 4 + ; inline -: HDM_SETITEMW HDM_FIRST 12 + ; inline -: HDM_LAYOUT HDM_FIRST 5 + ; inline -: HDM_HITTEST HDM_FIRST 6 + ; inline -: HDM_GETITEMRECT HDM_FIRST 7 + ; inline -: HDM_SETIMAGELIST HDM_FIRST 8 + ; inline -: HDM_GETIMAGELIST HDM_FIRST 9 + ; inline -: HDM_ORDERTOINDEX HDM_FIRST 15 + ; inline -: HDM_CREATEDRAGIMAGE HDM_FIRST 16 + ; inline -: HDM_GETORDERARRAY HDM_FIRST 17 + ; inline -: HDM_SETORDERARRAY HDM_FIRST 18 + ; inline -: HDM_SETHOTDIVIDER HDM_FIRST 19 + ; inline -: HDM_SETBITMAPMARGIN HDM_FIRST 20 + ; inline -: HDM_GETBITMAPMARGIN HDM_FIRST 21 + ; inline -: HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline -: HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline -: HDM_SETFILTERCHANGETIMEOUT HDM_FIRST 22 + ; inline -: HDM_EDITFILTER HDM_FIRST 23 + ; inline -: HDM_CLEARFILTER HDM_FIRST 24 + ; inline -: TB_ENABLEBUTTON WM_USER 1 + ; inline -: TB_CHECKBUTTON WM_USER 2 + ; inline -: TB_PRESSBUTTON WM_USER 3 + ; inline -: TB_HIDEBUTTON WM_USER 4 + ; inline -: TB_INDETERMINATE WM_USER 5 + ; inline -: TB_MARKBUTTON WM_USER 6 + ; inline -: TB_ISBUTTONENABLED WM_USER 9 + ; inline -: TB_ISBUTTONCHECKED WM_USER 10 + ; inline -: TB_ISBUTTONPRESSED WM_USER 11 + ; inline -: TB_ISBUTTONHIDDEN WM_USER 12 + ; inline -: TB_ISBUTTONINDETERMINATE WM_USER 13 + ; inline -: TB_ISBUTTONHIGHLIGHTED WM_USER 14 + ; inline -: TB_SETSTATE WM_USER 17 + ; inline -: TB_GETSTATE WM_USER 18 + ; inline -: TB_ADDBITMAP WM_USER 19 + ; inline -: TB_ADDBUTTONSA WM_USER 20 + ; inline -: TB_INSERTBUTTONA WM_USER 21 + ; inline -: TB_ADDBUTTONS WM_USER 20 + ; inline -: TB_INSERTBUTTON WM_USER 21 + ; inline -: TB_DELETEBUTTON WM_USER 22 + ; inline -: TB_GETBUTTON WM_USER 23 + ; inline -: TB_BUTTONCOUNT WM_USER 24 + ; inline -: TB_COMMANDTOINDEX WM_USER 25 + ; inline -: TB_SAVERESTOREA WM_USER 26 + ; inline -: TB_SAVERESTOREW WM_USER 76 + ; inline -: TB_CUSTOMIZE WM_USER 27 + ; inline -: TB_ADDSTRINGA WM_USER 28 + ; inline -: TB_ADDSTRINGW WM_USER 77 + ; inline -: TB_GETITEMRECT WM_USER 29 + ; inline -: TB_BUTTONSTRUCTSIZE WM_USER 30 + ; inline -: TB_SETBUTTONSIZE WM_USER 31 + ; inline -: TB_SETBITMAPSIZE WM_USER 32 + ; inline -: TB_AUTOSIZE WM_USER 33 + ; inline -: TB_GETTOOLTIPS WM_USER 35 + ; inline -: TB_SETTOOLTIPS WM_USER 36 + ; inline -: TB_SETPARENT WM_USER 37 + ; inline -: TB_SETROWS WM_USER 39 + ; inline -: TB_GETROWS WM_USER 40 + ; inline -: TB_SETCMDID WM_USER 42 + ; inline -: TB_CHANGEBITMAP WM_USER 43 + ; inline -: TB_GETBITMAP WM_USER 44 + ; inline -: TB_GETBUTTONTEXTA WM_USER 45 + ; inline -: TB_GETBUTTONTEXTW WM_USER 75 + ; inline -: TB_REPLACEBITMAP WM_USER 46 + ; inline -: TB_SETINDENT WM_USER 47 + ; inline -: TB_SETIMAGELIST WM_USER 48 + ; inline -: TB_GETIMAGELIST WM_USER 49 + ; inline -: TB_LOADIMAGES WM_USER 50 + ; inline -: TB_GETRECT WM_USER 51 + ; inline -: TB_SETHOTIMAGELIST WM_USER 52 + ; inline -: TB_GETHOTIMAGELIST WM_USER 53 + ; inline -: TB_SETDISABLEDIMAGELIST WM_USER 54 + ; inline -: TB_GETDISABLEDIMAGELIST WM_USER 55 + ; inline -: TB_SETSTYLE WM_USER 56 + ; inline -: TB_GETSTYLE WM_USER 57 + ; inline -: TB_GETBUTTONSIZE WM_USER 58 + ; inline -: TB_SETBUTTONWIDTH WM_USER 59 + ; inline -: TB_SETMAXTEXTROWS WM_USER 60 + ; inline -: TB_GETTEXTROWS WM_USER 61 + ; inline -: TB_GETOBJECT WM_USER 62 + ; inline -: TB_GETHOTITEM WM_USER 71 + ; inline -: TB_SETHOTITEM WM_USER 72 + ; inline -: TB_SETANCHORHIGHLIGHT WM_USER 73 + ; inline -: TB_GETANCHORHIGHLIGHT WM_USER 74 + ; inline -: TB_MAPACCELERATORA WM_USER 78 + ; inline -: TB_GETINSERTMARK WM_USER 79 + ; inline -: TB_SETINSERTMARK WM_USER 80 + ; inline -: TB_INSERTMARKHITTEST WM_USER 81 + ; inline -: TB_MOVEBUTTON WM_USER 82 + ; inline -: TB_GETMAXSIZE WM_USER 83 + ; inline -: TB_SETEXTENDEDSTYLE WM_USER 84 + ; inline -: TB_GETEXTENDEDSTYLE WM_USER 85 + ; inline -: TB_GETPADDING WM_USER 86 + ; inline -: TB_SETPADDING WM_USER 87 + ; inline -: TB_SETINSERTMARKCOLOR WM_USER 88 + ; inline -: TB_GETINSERTMARKCOLOR WM_USER 89 + ; inline -: TB_SETCOLORSCHEME CCM_SETCOLORSCHEME ; inline -: TB_GETCOLORSCHEME CCM_GETCOLORSCHEME ; inline -: TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline -: TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline -: TB_MAPACCELERATORW WM_USER 90 + ; inline -: TB_GETBITMAPFLAGS WM_USER 41 + ; inline -: TB_GETBUTTONINFOW WM_USER 63 + ; inline -: TB_SETBUTTONINFOW WM_USER 64 + ; inline -: TB_GETBUTTONINFOA WM_USER 65 + ; inline -: TB_SETBUTTONINFOA WM_USER 66 + ; inline -: TB_INSERTBUTTONW WM_USER 67 + ; inline -: TB_ADDBUTTONSW WM_USER 68 + ; inline -: TB_HITTEST WM_USER 69 + ; inline -: TB_SETDRAWTEXTFLAGS WM_USER 70 + ; inline -: TB_GETSTRINGW WM_USER 91 + ; inline -: TB_GETSTRINGA WM_USER 92 + ; inline -: TB_GETMETRICS WM_USER 101 + ; inline -: TB_SETMETRICS WM_USER 102 + ; inline -: TB_SETWINDOWTHEME CCM_SETWINDOWTHEME ; inline -: RB_INSERTBANDA WM_USER 1 + ; inline -: RB_DELETEBAND WM_USER 2 + ; inline -: RB_GETBARINFO WM_USER 3 + ; inline -: RB_SETBARINFO WM_USER 4 + ; inline -: RB_GETBANDINFO WM_USER 5 + ; inline -: RB_SETBANDINFOA WM_USER 6 + ; inline -: RB_SETPARENT WM_USER 7 + ; inline -: RB_HITTEST WM_USER 8 + ; inline -: RB_GETRECT WM_USER 9 + ; inline -: RB_INSERTBANDW WM_USER 10 + ; inline -: RB_SETBANDINFOW WM_USER 11 + ; inline -: RB_GETBANDCOUNT WM_USER 12 + ; inline -: RB_GETROWCOUNT WM_USER 13 + ; inline -: RB_GETROWHEIGHT WM_USER 14 + ; inline -: RB_IDTOINDEX WM_USER 16 + ; inline -: RB_GETTOOLTIPS WM_USER 17 + ; inline -: RB_SETTOOLTIPS WM_USER 18 + ; inline -: RB_SETBKCOLOR WM_USER 19 + ; inline -: RB_GETBKCOLOR WM_USER 20 + ; inline -: RB_SETTEXTCOLOR WM_USER 21 + ; inline -: RB_GETTEXTCOLOR WM_USER 22 + ; inline -: RB_SIZETORECT WM_USER 23 + ; inline -: RB_SETCOLORSCHEME CCM_SETCOLORSCHEME ; inline -: RB_GETCOLORSCHEME CCM_GETCOLORSCHEME ; inline -: RB_BEGINDRAG WM_USER 24 + ; inline -: RB_ENDDRAG WM_USER 25 + ; inline -: RB_DRAGMOVE WM_USER 26 + ; inline -: RB_GETBARHEIGHT WM_USER 27 + ; inline -: RB_GETBANDINFOW WM_USER 28 + ; inline -: RB_GETBANDINFOA WM_USER 29 + ; inline -: RB_MINIMIZEBAND WM_USER 30 + ; inline -: RB_MAXIMIZEBAND WM_USER 31 + ; inline -: RB_GETDROPTARGET CCM_GETDROPTARGET ; inline -: RB_GETBANDBORDERS WM_USER 34 + ; inline -: RB_SHOWBAND WM_USER 35 + ; inline -: RB_SETPALETTE WM_USER 37 + ; inline -: RB_GETPALETTE WM_USER 38 + ; inline -: RB_MOVEBAND WM_USER 39 + ; inline -: RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline -: RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline -: RB_GETBANDMARGINS WM_USER 40 + ; inline -: RB_SETWINDOWTHEME CCM_SETWINDOWTHEME ; inline -: RB_PUSHCHEVRON WM_USER 43 + ; inline -: TTM_ACTIVATE WM_USER 1 + ; inline -: TTM_SETDELAYTIME WM_USER 3 + ; inline -: TTM_ADDTOOLA WM_USER 4 + ; inline -: TTM_ADDTOOLW WM_USER 50 + ; inline -: TTM_DELTOOLA WM_USER 5 + ; inline -: TTM_DELTOOLW WM_USER 51 + ; inline -: TTM_NEWTOOLRECTA WM_USER 6 + ; inline -: TTM_NEWTOOLRECTW WM_USER 52 + ; inline -: TTM_RELAYEVENT WM_USER 7 + ; inline -: TTM_GETTOOLINFOA WM_USER 8 + ; inline -: TTM_GETTOOLINFOW WM_USER 53 + ; inline -: TTM_SETTOOLINFOA WM_USER 9 + ; inline -: TTM_SETTOOLINFOW WM_USER 54 + ; inline -: TTM_HITTESTA WM_USER 10 + ; inline -: TTM_HITTESTW WM_USER 55 + ; inline -: TTM_GETTEXTA WM_USER 11 + ; inline -: TTM_GETTEXTW WM_USER 56 + ; inline -: TTM_UPDATETIPTEXTA WM_USER 12 + ; inline -: TTM_UPDATETIPTEXTW WM_USER 57 + ; inline -: TTM_GETTOOLCOUNT WM_USER 13 + ; inline -: TTM_ENUMTOOLSA WM_USER 14 + ; inline -: TTM_ENUMTOOLSW WM_USER 58 + ; inline -: TTM_GETCURRENTTOOLA WM_USER 15 + ; inline -: TTM_GETCURRENTTOOLW WM_USER 59 + ; inline -: TTM_WINDOWFROMPOINT WM_USER 16 + ; inline -: TTM_TRACKACTIVATE WM_USER 17 + ; inline -: TTM_TRACKPOSITION WM_USER 18 + ; inline -: TTM_SETTIPBKCOLOR WM_USER 19 + ; inline -: TTM_SETTIPTEXTCOLOR WM_USER 20 + ; inline -: TTM_GETDELAYTIME WM_USER 21 + ; inline -: TTM_GETTIPBKCOLOR WM_USER 22 + ; inline -: TTM_GETTIPTEXTCOLOR WM_USER 23 + ; inline -: TTM_SETMAXTIPWIDTH WM_USER 24 + ; inline -: TTM_GETMAXTIPWIDTH WM_USER 25 + ; inline -: TTM_SETMARGIN WM_USER 26 + ; inline -: TTM_GETMARGIN WM_USER 27 + ; inline -: TTM_POP WM_USER 28 + ; inline -: TTM_UPDATE WM_USER 29 + ; inline -: TTM_GETBUBBLESIZE WM_USER 30 + ; inline -: TTM_ADJUSTRECT WM_USER 31 + ; inline -: TTM_SETTITLEA WM_USER 32 + ; inline -: TTM_SETTITLEW WM_USER 33 + ; inline -: TTM_POPUP WM_USER 34 + ; inline -: TTM_GETTITLE WM_USER 35 + ; inline -: TTM_SETWINDOWTHEME CCM_SETWINDOWTHEME ; inline -: SB_SETTEXTA WM_USER 1+ ; inline -: SB_SETTEXTW WM_USER 11 + ; inline -: SB_GETTEXTA WM_USER 2 + ; inline -: SB_GETTEXTW WM_USER 13 + ; inline -: SB_GETTEXTLENGTHA WM_USER 3 + ; inline -: SB_GETTEXTLENGTHW WM_USER 12 + ; inline -: SB_SETPARTS WM_USER 4 + ; inline -: SB_GETPARTS WM_USER 6 + ; inline -: SB_GETBORDERS WM_USER 7 + ; inline -: SB_SETMINHEIGHT WM_USER 8 + ; inline -: SB_SIMPLE WM_USER 9 + ; inline -: SB_GETRECT WM_USER 10 + ; inline -: SB_ISSIMPLE WM_USER 14 + ; inline -: SB_SETICON WM_USER 15 + ; inline -: SB_SETTIPTEXTA WM_USER 16 + ; inline -: SB_SETTIPTEXTW WM_USER 17 + ; inline -: SB_GETTIPTEXTA WM_USER 18 + ; inline -: SB_GETTIPTEXTW WM_USER 19 + ; inline -: SB_GETICON WM_USER 20 + ; inline -: SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline -: SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline -: SB_SETBKCOLOR CCM_SETBKCOLOR ; inline -: SB_SIMPLEID HEX: 00ff ; inline -: TBM_GETPOS WM_USER ; inline -: TBM_GETRANGEMIN WM_USER 1 + ; inline -: TBM_GETRANGEMAX WM_USER 2 + ; inline -: TBM_GETTIC WM_USER 3 + ; inline -: TBM_SETTIC WM_USER 4 + ; inline -: TBM_SETPOS WM_USER 5 + ; inline -: TBM_SETRANGE WM_USER 6 + ; inline -: TBM_SETRANGEMIN WM_USER 7 + ; inline -: TBM_SETRANGEMAX WM_USER 8 + ; inline -: TBM_CLEARTICS WM_USER 9 + ; inline -: TBM_SETSEL WM_USER 10 + ; inline -: TBM_SETSELSTART WM_USER 11 + ; inline -: TBM_SETSELEND WM_USER 12 + ; inline -: TBM_GETPTICS WM_USER 14 + ; inline -: TBM_GETTICPOS WM_USER 15 + ; inline -: TBM_GETNUMTICS WM_USER 16 + ; inline -: TBM_GETSELSTART WM_USER 17 + ; inline -: TBM_GETSELEND WM_USER 18 + ; inline -: TBM_CLEARSEL WM_USER 19 + ; inline -: TBM_SETTICFREQ WM_USER 20 + ; inline -: TBM_SETPAGESIZE WM_USER 21 + ; inline -: TBM_GETPAGESIZE WM_USER 22 + ; inline -: TBM_SETLINESIZE WM_USER 23 + ; inline -: TBM_GETLINESIZE WM_USER 24 + ; inline -: TBM_GETTHUMBRECT WM_USER 25 + ; inline -: TBM_GETCHANNELRECT WM_USER 26 + ; inline -: TBM_SETTHUMBLENGTH WM_USER 27 + ; inline -: TBM_GETTHUMBLENGTH WM_USER 28 + ; inline -: TBM_SETTOOLTIPS WM_USER 29 + ; inline -: TBM_GETTOOLTIPS WM_USER 30 + ; inline -: TBM_SETTIPSIDE WM_USER 31 + ; inline -: TBM_SETBUDDY WM_USER 32 + ; inline -: TBM_GETBUDDY WM_USER 33 + ; inline -: TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline -: TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline -: DL_BEGINDRAG WM_USER 133 + ; inline -: DL_DRAGGING WM_USER 134 + ; inline -: DL_DROPPED WM_USER 135 + ; inline -: DL_CANCELDRAG WM_USER 136 + ; inline -: UDM_SETRANGE WM_USER 101 + ; inline -: UDM_GETRANGE WM_USER 102 + ; inline -: UDM_SETPOS WM_USER 103 + ; inline -: UDM_GETPOS WM_USER 104 + ; inline -: UDM_SETBUDDY WM_USER 105 + ; inline -: UDM_GETBUDDY WM_USER 106 + ; inline -: UDM_SETACCEL WM_USER 107 + ; inline -: UDM_GETACCEL WM_USER 108 + ; inline -: UDM_SETBASE WM_USER 109 + ; inline -: UDM_GETBASE WM_USER 110 + ; inline -: UDM_SETRANGE32 WM_USER 111 + ; inline -: UDM_GETRANGE32 WM_USER 112 + ; inline -: UDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline -: UDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline -: UDM_SETPOS32 WM_USER 113 + ; inline -: UDM_GETPOS32 WM_USER 114 + ; inline -: PBM_SETRANGE WM_USER 1 + ; inline -: PBM_SETPOS WM_USER 2 + ; inline -: PBM_DELTAPOS WM_USER 3 + ; inline -: PBM_SETSTEP WM_USER 4 + ; inline -: PBM_STEPIT WM_USER 5 + ; inline -: PBM_SETRANGE32 WM_USER 6 + ; inline -: PBM_GETRANGE WM_USER 7 + ; inline -: PBM_GETPOS WM_USER 8 + ; inline -: PBM_SETBARCOLOR WM_USER 9 + ; inline -: PBM_SETBKCOLOR CCM_SETBKCOLOR ; inline -: HKM_SETHOTKEY WM_USER 1 + ; inline -: HKM_GETHOTKEY WM_USER 2 + ; inline -: HKM_SETRULES WM_USER 3 + ; inline -: LVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline -: LVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline -: LVM_GETBKCOLOR LVM_FIRST 0 + ; inline -: LVM_SETBKCOLOR LVM_FIRST 1 + ; inline -: LVM_GETIMAGELIST LVM_FIRST 2 + ; inline -: LVM_SETIMAGELIST LVM_FIRST 3 + ; inline -: LVM_GETITEMCOUNT LVM_FIRST 4 + ; inline -: LVM_GETITEMA LVM_FIRST 5 + ; inline -: LVM_GETITEMW LVM_FIRST 75 + ; inline -: LVM_SETITEMA LVM_FIRST 6 + ; inline -: LVM_SETITEMW LVM_FIRST 76 + ; inline -: LVM_INSERTITEMA LVM_FIRST 7 + ; inline -: LVM_INSERTITEMW LVM_FIRST 77 + ; inline -: LVM_DELETEITEM LVM_FIRST 8 + ; inline -: LVM_DELETEALLITEMS LVM_FIRST 9 + ; inline -: LVM_GETCALLBACKMASK LVM_FIRST 10 + ; inline -: LVM_SETCALLBACKMASK LVM_FIRST 11 + ; inline -: LVM_FINDITEMA LVM_FIRST 13 + ; inline -: LVM_FINDITEMW LVM_FIRST 83 + ; inline -: LVM_GETITEMRECT LVM_FIRST 14 + ; inline -: LVM_SETITEMPOSITION LVM_FIRST 15 + ; inline -: LVM_GETITEMPOSITION LVM_FIRST 16 + ; inline -: LVM_GETSTRINGWIDTHA LVM_FIRST 17 + ; inline -: LVM_GETSTRINGWIDTHW LVM_FIRST 87 + ; inline -: LVM_HITTEST LVM_FIRST 18 + ; inline -: LVM_ENSUREVISIBLE LVM_FIRST 19 + ; inline -: LVM_SCROLL LVM_FIRST 20 + ; inline -: LVM_REDRAWITEMS LVM_FIRST 21 + ; inline -: LVM_ARRANGE LVM_FIRST 22 + ; inline -: LVM_EDITLABELA LVM_FIRST 23 + ; inline -: LVM_EDITLABELW LVM_FIRST 118 + ; inline -: LVM_GETEDITCONTROL LVM_FIRST 24 + ; inline -: LVM_GETCOLUMNA LVM_FIRST 25 + ; inline -: LVM_GETCOLUMNW LVM_FIRST 95 + ; inline -: LVM_SETCOLUMNA LVM_FIRST 26 + ; inline -: LVM_SETCOLUMNW LVM_FIRST 96 + ; inline -: LVM_INSERTCOLUMNA LVM_FIRST 27 + ; inline -: LVM_INSERTCOLUMNW LVM_FIRST 97 + ; inline -: LVM_DELETECOLUMN LVM_FIRST 28 + ; inline -: LVM_GETCOLUMNWIDTH LVM_FIRST 29 + ; inline -: LVM_SETCOLUMNWIDTH LVM_FIRST 30 + ; inline -: LVM_CREATEDRAGIMAGE LVM_FIRST 33 + ; inline -: LVM_GETVIEWRECT LVM_FIRST 34 + ; inline -: LVM_GETTEXTCOLOR LVM_FIRST 35 + ; inline -: LVM_SETTEXTCOLOR LVM_FIRST 36 + ; inline -: LVM_GETTEXTBKCOLOR LVM_FIRST 37 + ; inline -: LVM_SETTEXTBKCOLOR LVM_FIRST 38 + ; inline -: LVM_GETTOPINDEX LVM_FIRST 39 + ; inline -: LVM_GETCOUNTPERPAGE LVM_FIRST 40 + ; inline -: LVM_GETORIGIN LVM_FIRST 41 + ; inline -: LVM_UPDATE LVM_FIRST 42 + ; inline -: LVM_SETITEMSTATE LVM_FIRST 43 + ; inline -: LVM_GETITEMSTATE LVM_FIRST 44 + ; inline -: LVM_GETITEMTEXTA LVM_FIRST 45 + ; inline -: LVM_GETITEMTEXTW LVM_FIRST 115 + ; inline -: LVM_SETITEMTEXTA LVM_FIRST 46 + ; inline -: LVM_SETITEMTEXTW LVM_FIRST 116 + ; inline -: LVM_SETITEMCOUNT LVM_FIRST 47 + ; inline -: LVM_SORTITEMS LVM_FIRST 48 + ; inline -: LVM_SETITEMPOSITION32 LVM_FIRST 49 + ; inline -: LVM_GETSELECTEDCOUNT LVM_FIRST 50 + ; inline -: LVM_GETITEMSPACING LVM_FIRST 51 + ; inline -: LVM_GETISEARCHSTRINGA LVM_FIRST 52 + ; inline -: LVM_GETISEARCHSTRINGW LVM_FIRST 117 + ; inline -: LVM_SETICONSPACING LVM_FIRST 53 + ; inline -: LVM_SETEXTENDEDLISTVIEWSTYLE LVM_FIRST 54 + ; inline -: LVM_GETEXTENDEDLISTVIEWSTYLE LVM_FIRST 55 + ; inline -: LVM_GETSUBITEMRECT LVM_FIRST 56 + ; inline -: LVM_SUBITEMHITTEST LVM_FIRST 57 + ; inline -: LVM_SETCOLUMNORDERARRAY LVM_FIRST 58 + ; inline -: LVM_GETCOLUMNORDERARRAY LVM_FIRST 59 + ; inline -: LVM_SETHOTITEM LVM_FIRST 60 + ; inline -: LVM_GETHOTITEM LVM_FIRST 61 + ; inline -: LVM_SETHOTCURSOR LVM_FIRST 62 + ; inline -: LVM_GETHOTCURSOR LVM_FIRST 63 + ; inline -: LVM_APPROXIMATEVIEWRECT LVM_FIRST 64 + ; inline -: LVM_SETWORKAREAS LVM_FIRST 65 + ; inline -: LVM_GETWORKAREAS LVM_FIRST 70 + ; inline -: LVM_GETNUMBEROFWORKAREAS LVM_FIRST 73 + ; inline -: LVM_GETSELECTIONMARK LVM_FIRST 66 + ; inline -: LVM_SETSELECTIONMARK LVM_FIRST 67 + ; inline -: LVM_SETHOVERTIME LVM_FIRST 71 + ; inline -: LVM_GETHOVERTIME LVM_FIRST 72 + ; inline -: LVM_SETTOOLTIPS LVM_FIRST 74 + ; inline -: LVM_GETTOOLTIPS LVM_FIRST 78 + ; inline -: LVM_SORTITEMSEX LVM_FIRST 81 + ; inline -: LVM_SETBKIMAGEA LVM_FIRST 68 + ; inline -: LVM_SETBKIMAGEW LVM_FIRST 138 + ; inline -: LVM_GETBKIMAGEA LVM_FIRST 69 + ; inline -: LVM_GETBKIMAGEW LVM_FIRST 139 + ; inline -: LVM_SETSELECTEDCOLUMN LVM_FIRST 140 + ; inline -: LVM_SETTILEWIDTH LVM_FIRST 141 + ; inline -: LVM_SETVIEW LVM_FIRST 142 + ; inline -: LVM_GETVIEW LVM_FIRST 143 + ; inline -: LVM_INSERTGROUP LVM_FIRST 145 + ; inline -: LVM_SETGROUPINFO LVM_FIRST 147 + ; inline -: LVM_GETGROUPINFO LVM_FIRST 149 + ; inline -: LVM_REMOVEGROUP LVM_FIRST 150 + ; inline -: LVM_MOVEGROUP LVM_FIRST 151 + ; inline -: LVM_MOVEITEMTOGROUP LVM_FIRST 154 + ; inline -: LVM_SETGROUPMETRICS LVM_FIRST 155 + ; inline -: LVM_GETGROUPMETRICS LVM_FIRST 156 + ; inline -: LVM_ENABLEGROUPVIEW LVM_FIRST 157 + ; inline -: LVM_SORTGROUPS LVM_FIRST 158 + ; inline -: LVM_INSERTGROUPSORTED LVM_FIRST 159 + ; inline -: LVM_REMOVEALLGROUPS LVM_FIRST 160 + ; inline -: LVM_HASGROUP LVM_FIRST 161 + ; inline -: LVM_SETTILEVIEWINFO LVM_FIRST 162 + ; inline -: LVM_GETTILEVIEWINFO LVM_FIRST 163 + ; inline -: LVM_SETTILEINFO LVM_FIRST 164 + ; inline -: LVM_GETTILEINFO LVM_FIRST 165 + ; inline -: LVM_SETINSERTMARK LVM_FIRST 166 + ; inline -: LVM_GETINSERTMARK LVM_FIRST 167 + ; inline -: LVM_INSERTMARKHITTEST LVM_FIRST 168 + ; inline -: LVM_GETINSERTMARKRECT LVM_FIRST 169 + ; inline -: LVM_SETINSERTMARKCOLOR LVM_FIRST 170 + ; inline -: LVM_GETINSERTMARKCOLOR LVM_FIRST 171 + ; inline -: LVM_SETINFOTIP LVM_FIRST 173 + ; inline -: LVM_GETSELECTEDCOLUMN LVM_FIRST 174 + ; inline -: LVM_ISGROUPVIEWENABLED LVM_FIRST 175 + ; inline -: LVM_GETOUTLINECOLOR LVM_FIRST 176 + ; inline -: LVM_SETOUTLINECOLOR LVM_FIRST 177 + ; inline -: LVM_CANCELEDITLABEL LVM_FIRST 179 + ; inline -: LVM_MAPINDEXTOID LVM_FIRST 180 + ; inline -: LVM_MAPIDTOINDEX LVM_FIRST 181 + ; inline -: TVM_INSERTITEMA TV_FIRST 0 + ; inline -: TVM_INSERTITEMW TV_FIRST 50 + ; inline -: TVM_DELETEITEM TV_FIRST 1 + ; inline -: TVM_EXPAND TV_FIRST 2 + ; inline -: TVM_GETITEMRECT TV_FIRST 4 + ; inline -: TVM_GETCOUNT TV_FIRST 5 + ; inline -: TVM_GETINDENT TV_FIRST 6 + ; inline -: TVM_SETINDENT TV_FIRST 7 + ; inline -: TVM_GETIMAGELIST TV_FIRST 8 + ; inline -: TVM_SETIMAGELIST TV_FIRST 9 + ; inline -: TVM_GETNEXTITEM TV_FIRST 10 + ; inline -: TVM_SELECTITEM TV_FIRST 11 + ; inline -: TVM_GETITEMA TV_FIRST 12 + ; inline -: TVM_GETITEMW TV_FIRST 62 + ; inline -: TVM_SETITEMA TV_FIRST 13 + ; inline -: TVM_SETITEMW TV_FIRST 63 + ; inline -: TVM_EDITLABELA TV_FIRST 14 + ; inline -: TVM_EDITLABELW TV_FIRST 65 + ; inline -: TVM_GETEDITCONTROL TV_FIRST 15 + ; inline -: TVM_GETVISIBLECOUNT TV_FIRST 16 + ; inline -: TVM_HITTEST TV_FIRST 17 + ; inline -: TVM_CREATEDRAGIMAGE TV_FIRST 18 + ; inline -: TVM_SORTCHILDREN TV_FIRST 19 + ; inline -: TVM_ENSUREVISIBLE TV_FIRST 20 + ; inline -: TVM_SORTCHILDRENCB TV_FIRST 21 + ; inline -: TVM_ENDEDITLABELNOW TV_FIRST 22 + ; inline -: TVM_GETISEARCHSTRINGA TV_FIRST 23 + ; inline -: TVM_GETISEARCHSTRINGW TV_FIRST 64 + ; inline -: TVM_SETTOOLTIPS TV_FIRST 24 + ; inline -: TVM_GETTOOLTIPS TV_FIRST 25 + ; inline -: TVM_SETINSERTMARK TV_FIRST 26 + ; inline -: TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline -: TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline -: TVM_SETITEMHEIGHT TV_FIRST 27 + ; inline -: TVM_GETITEMHEIGHT TV_FIRST 28 + ; inline -: TVM_SETBKCOLOR TV_FIRST 29 + ; inline -: TVM_SETTEXTCOLOR TV_FIRST 30 + ; inline -: TVM_GETBKCOLOR TV_FIRST 31 + ; inline -: TVM_GETTEXTCOLOR TV_FIRST 32 + ; inline -: TVM_SETSCROLLTIME TV_FIRST 33 + ; inline -: TVM_GETSCROLLTIME TV_FIRST 34 + ; inline -: TVM_SETINSERTMARKCOLOR TV_FIRST 37 + ; inline -: TVM_GETINSERTMARKCOLOR TV_FIRST 38 + ; inline -: TVM_GETITEMSTATE TV_FIRST 39 + ; inline -: TVM_SETLINECOLOR TV_FIRST 40 + ; inline -: TVM_GETLINECOLOR TV_FIRST 41 + ; inline -: TVM_MAPACCIDTOHTREEITEM TV_FIRST 42 + ; inline -: TVM_MAPHTREEITEMTOACCID TV_FIRST 43 + ; inline -: CBEM_INSERTITEMA WM_USER 1 + ; inline -: CBEM_SETIMAGELIST WM_USER 2 + ; inline -: CBEM_GETIMAGELIST WM_USER 3 + ; inline -: CBEM_GETITEMA WM_USER 4 + ; inline -: CBEM_SETITEMA WM_USER 5 + ; inline -: CBEM_DELETEITEM CB_DELETESTRING ; inline -: CBEM_GETCOMBOCONTROL WM_USER 6 + ; inline -: CBEM_GETEDITCONTROL WM_USER 7 + ; inline -: CBEM_SETEXTENDEDSTYLE WM_USER 14 + ; inline -: CBEM_GETEXTENDEDSTYLE WM_USER 9 + ; inline -: CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline -: CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline -: CBEM_SETEXSTYLE WM_USER 8 + ; inline -: CBEM_GETEXSTYLE WM_USER 9 + ; inline -: CBEM_HASEDITCHANGED WM_USER 10 + ; inline -: CBEM_INSERTITEMW WM_USER 11 + ; inline -: CBEM_SETITEMW WM_USER 12 + ; inline -: CBEM_GETITEMW WM_USER 13 + ; inline -: TCM_GETIMAGELIST TCM_FIRST 2 + ; inline -: TCM_SETIMAGELIST TCM_FIRST 3 + ; inline -: TCM_GETITEMCOUNT TCM_FIRST 4 + ; inline -: TCM_GETITEMA TCM_FIRST 5 + ; inline -: TCM_GETITEMW TCM_FIRST 60 + ; inline -: TCM_SETITEMA TCM_FIRST 6 + ; inline -: TCM_SETITEMW TCM_FIRST 61 + ; inline -: TCM_INSERTITEMA TCM_FIRST 7 + ; inline -: TCM_INSERTITEMW TCM_FIRST 62 + ; inline -: TCM_DELETEITEM TCM_FIRST 8 + ; inline -: TCM_DELETEALLITEMS TCM_FIRST 9 + ; inline -: TCM_GETITEMRECT TCM_FIRST 10 + ; inline -: TCM_GETCURSEL TCM_FIRST 11 + ; inline -: TCM_SETCURSEL TCM_FIRST 12 + ; inline -: TCM_HITTEST TCM_FIRST 13 + ; inline -: TCM_SETITEMEXTRA TCM_FIRST 14 + ; inline -: TCM_ADJUSTRECT TCM_FIRST 40 + ; inline -: TCM_SETITEMSIZE TCM_FIRST 41 + ; inline -: TCM_REMOVEIMAGE TCM_FIRST 42 + ; inline -: TCM_SETPADDING TCM_FIRST 43 + ; inline -: TCM_GETROWCOUNT TCM_FIRST 44 + ; inline -: TCM_GETTOOLTIPS TCM_FIRST 45 + ; inline -: TCM_SETTOOLTIPS TCM_FIRST 46 + ; inline -: TCM_GETCURFOCUS TCM_FIRST 47 + ; inline -: TCM_SETCURFOCUS TCM_FIRST 48 + ; inline -: TCM_SETMINTABWIDTH TCM_FIRST 49 + ; inline -: TCM_DESELECTALL TCM_FIRST 50 + ; inline -: TCM_HIGHLIGHTITEM TCM_FIRST 51 + ; inline -: TCM_SETEXTENDEDSTYLE TCM_FIRST 52 + ; inline -: TCM_GETEXTENDEDSTYLE TCM_FIRST 53 + ; inline -: TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline -: TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline -: ACM_OPENA WM_USER 100 + ; inline -: ACM_OPENW WM_USER 103 + ; inline -: ACM_PLAY WM_USER 101 + ; inline -: ACM_STOP WM_USER 102 + ; inline -: MCM_FIRST HEX: 1000 ; inline -: MCM_GETCURSEL MCM_FIRST 1 + ; inline -: MCM_SETCURSEL MCM_FIRST 2 + ; inline -: MCM_GETMAXSELCOUNT MCM_FIRST 3 + ; inline -: MCM_SETMAXSELCOUNT MCM_FIRST 4 + ; inline -: MCM_GETSELRANGE MCM_FIRST 5 + ; inline -: MCM_SETSELRANGE MCM_FIRST 6 + ; inline -: MCM_GETMONTHRANGE MCM_FIRST 7 + ; inline -: MCM_SETDAYSTATE MCM_FIRST 8 + ; inline -: MCM_GETMINREQRECT MCM_FIRST 9 + ; inline -: MCM_SETCOLOR MCM_FIRST 10 + ; inline -: MCM_GETCOLOR MCM_FIRST 11 + ; inline -: MCM_SETTODAY MCM_FIRST 12 + ; inline -: MCM_GETTODAY MCM_FIRST 13 + ; inline -: MCM_HITTEST MCM_FIRST 14 + ; inline -: MCM_SETFIRSTDAYOFWEEK MCM_FIRST 15 + ; inline -: MCM_GETFIRSTDAYOFWEEK MCM_FIRST 16 + ; inline -: MCM_GETRANGE MCM_FIRST 17 + ; inline -: MCM_SETRANGE MCM_FIRST 18 + ; inline -: MCM_GETMONTHDELTA MCM_FIRST 19 + ; inline -: MCM_SETMONTHDELTA MCM_FIRST 20 + ; inline -: MCM_GETMAXTODAYWIDTH MCM_FIRST 21 + ; inline -: MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT ; inline -: MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT ; inline -: DTM_FIRST HEX: 1000 ; inline -: DTM_GETSYSTEMTIME DTM_FIRST 1 + ; inline -: DTM_SETSYSTEMTIME DTM_FIRST 2 + ; inline -: DTM_GETRANGE DTM_FIRST 3 + ; inline -: DTM_SETRANGE DTM_FIRST 4 + ; inline -: DTM_SETFORMATA DTM_FIRST 5 + ; inline -: DTM_SETFORMATW DTM_FIRST 50 + ; inline -: DTM_SETMCCOLOR DTM_FIRST 6 + ; inline -: DTM_GETMCCOLOR DTM_FIRST 7 + ; inline -: DTM_GETMONTHCAL DTM_FIRST 8 + ; inline -: DTM_SETMCFONT DTM_FIRST 9 + ; inline -: DTM_GETMCFONT DTM_FIRST 10 + ; inline -: PGM_SETCHILD PGM_FIRST 1 + ; inline -: PGM_RECALCSIZE PGM_FIRST 2 + ; inline -: PGM_FORWARDMOUSE PGM_FIRST 3 + ; inline -: PGM_SETBKCOLOR PGM_FIRST 4 + ; inline -: PGM_GETBKCOLOR PGM_FIRST 5 + ; inline -: PGM_SETBORDER PGM_FIRST 6 + ; inline -: PGM_GETBORDER PGM_FIRST 7 + ; inline -: PGM_SETPOS PGM_FIRST 8 + ; inline -: PGM_GETPOS PGM_FIRST 9 + ; inline -: PGM_SETBUTTONSIZE PGM_FIRST 10 + ; inline -: PGM_GETBUTTONSIZE PGM_FIRST 11 + ; inline -: PGM_GETBUTTONSTATE PGM_FIRST 12 + ; inline -: PGM_GETDROPTARGET CCM_GETDROPTARGET ; inline -: BCM_GETIDEALSIZE BCM_FIRST 1 + ; inline -: BCM_SETIMAGELIST BCM_FIRST 2 + ; inline -: BCM_GETIMAGELIST BCM_FIRST 3 + ; inline -: BCM_SETTEXTMARGIN BCM_FIRST 4 + ; inline -: BCM_GETTEXTMARGIN BCM_FIRST 5 + ; inline -: EM_SETCUEBANNER ECM_FIRST 1 + ; inline -: EM_GETCUEBANNER ECM_FIRST 2 + ; inline -: EM_SHOWBALLOONTIP ECM_FIRST 3 + ; inline -: EM_HIDEBALLOONTIP ECM_FIRST 4 + ; inline -: CB_SETMINVISIBLE CBM_FIRST 1 + ; inline -: CB_GETMINVISIBLE CBM_FIRST 2 + ; inline -: LM_HITTEST WM_USER HEX: 0300 + ; inline -: LM_GETIDEALHEIGHT WM_USER HEX: 0301 + ; inline -: LM_SETITEM WM_USER HEX: 0302 + ; inline -: LM_GETITEM WM_USER HEX: 0303 + ; inline +CONSTANT: WM_NULL HEX: 0000 +CONSTANT: WM_CREATE HEX: 0001 +CONSTANT: WM_DESTROY HEX: 0002 +CONSTANT: WM_MOVE HEX: 0003 +CONSTANT: WM_SIZE HEX: 0005 +CONSTANT: WM_ACTIVATE HEX: 0006 +CONSTANT: WM_SETFOCUS HEX: 0007 +CONSTANT: WM_KILLFOCUS HEX: 0008 +CONSTANT: WM_ENABLE HEX: 000A +CONSTANT: WM_SETREDRAW HEX: 000B +CONSTANT: WM_SETTEXT HEX: 000C +CONSTANT: WM_GETTEXT HEX: 000D +CONSTANT: WM_GETTEXTLENGTH HEX: 000E +CONSTANT: WM_PAINT HEX: 000F +CONSTANT: WM_CLOSE HEX: 0010 +CONSTANT: WM_QUERYENDSESSION HEX: 0011 +CONSTANT: WM_QUERYOPEN HEX: 0013 +CONSTANT: WM_ENDSESSION HEX: 0016 +CONSTANT: WM_QUIT HEX: 0012 +CONSTANT: WM_ERASEBKGND HEX: 0014 +CONSTANT: WM_SYSCOLORCHANGE HEX: 0015 +CONSTANT: WM_SHOWWINDOW HEX: 0018 +CONSTANT: WM_WININICHANGE HEX: 001A +CONSTANT: WM_SETTINGCHANGE HEX: 001A +CONSTANT: WM_DEVMODECHANGE HEX: 001B +CONSTANT: WM_ACTIVATEAPP HEX: 001C +CONSTANT: WM_FONTCHANGE HEX: 001D +CONSTANT: WM_TIMECHANGE HEX: 001E +CONSTANT: WM_CANCELMODE HEX: 001F +CONSTANT: WM_SETCURSOR HEX: 0020 +CONSTANT: WM_MOUSEACTIVATE HEX: 0021 +CONSTANT: WM_CHILDACTIVATE HEX: 0022 +CONSTANT: WM_QUEUESYNC HEX: 0023 +CONSTANT: WM_GETMINMAXINFO HEX: 0024 +CONSTANT: WM_PAINTICON HEX: 0026 +CONSTANT: WM_ICONERASEBKGND HEX: 0027 +CONSTANT: WM_NEXTDLGCTL HEX: 0028 +CONSTANT: WM_SPOOLERSTATUS HEX: 002A +CONSTANT: WM_DRAWITEM HEX: 002B +CONSTANT: WM_MEASUREITEM HEX: 002C +CONSTANT: WM_DELETEITEM HEX: 002D +CONSTANT: WM_VKEYTOITEM HEX: 002E +CONSTANT: WM_CHARTOITEM HEX: 002F +CONSTANT: WM_SETFONT HEX: 0030 +CONSTANT: WM_GETFONT HEX: 0031 +CONSTANT: WM_SETHOTKEY HEX: 0032 +CONSTANT: WM_GETHOTKEY HEX: 0033 +CONSTANT: WM_QUERYDRAGICON HEX: 0037 +CONSTANT: WM_COMPAREITEM HEX: 0039 +CONSTANT: WM_GETOBJECT HEX: 003D +CONSTANT: WM_COMPACTING HEX: 0041 +CONSTANT: WM_COMMNOTIFY HEX: 0044 +CONSTANT: WM_WINDOWPOSCHANGING HEX: 0046 +CONSTANT: WM_WINDOWPOSCHANGED HEX: 0047 +CONSTANT: WM_POWER HEX: 0048 +CONSTANT: WM_COPYDATA HEX: 004A +CONSTANT: WM_CANCELJOURNAL HEX: 004B +CONSTANT: WM_NOTIFY HEX: 004E +CONSTANT: WM_INPUTLANGCHANGEREQUEST HEX: 0050 +CONSTANT: WM_INPUTLANGCHANGE HEX: 0051 +CONSTANT: WM_TCARD HEX: 0052 +CONSTANT: WM_HELP HEX: 0053 +CONSTANT: WM_USERCHANGED HEX: 0054 +CONSTANT: WM_NOTIFYFORMAT HEX: 0055 +CONSTANT: WM_CONTEXTMENU HEX: 007B +CONSTANT: WM_STYLECHANGING HEX: 007C +CONSTANT: WM_STYLECHANGED HEX: 007D +CONSTANT: WM_DISPLAYCHANGE HEX: 007E +CONSTANT: WM_GETICON HEX: 007F +CONSTANT: WM_SETICON HEX: 0080 +CONSTANT: WM_NCCREATE HEX: 0081 +CONSTANT: WM_NCDESTROY HEX: 0082 +CONSTANT: WM_NCCALCSIZE HEX: 0083 +CONSTANT: WM_NCHITTEST HEX: 0084 +CONSTANT: WM_NCPAINT HEX: 0085 +CONSTANT: WM_NCACTIVATE HEX: 0086 +CONSTANT: WM_GETDLGCODE HEX: 0087 +CONSTANT: WM_SYNCPAINT HEX: 0088 +CONSTANT: WM_NCMOUSEMOVE HEX: 00A0 +CONSTANT: WM_NCLBUTTONDOWN HEX: 00A1 +CONSTANT: WM_NCLBUTTONUP HEX: 00A2 +CONSTANT: WM_NCLBUTTONDBLCLK HEX: 00A3 +CONSTANT: WM_NCRBUTTONDOWN HEX: 00A4 +CONSTANT: WM_NCRBUTTONUP HEX: 00A5 +CONSTANT: WM_NCRBUTTONDBLCLK HEX: 00A6 +CONSTANT: WM_NCMBUTTONDOWN HEX: 00A7 +CONSTANT: WM_NCMBUTTONUP HEX: 00A8 +CONSTANT: WM_NCMBUTTONDBLCLK HEX: 00A9 +CONSTANT: WM_NCXBUTTONDOWN HEX: 00AB +CONSTANT: WM_NCXBUTTONUP HEX: 00AC +CONSTANT: WM_NCXBUTTONDBLCLK HEX: 00AD +CONSTANT: WM_NCUAHDRAWCAPTION HEX: 00AE ! undocumented +CONSTANT: WM_NCUAHDRAWFRAME HEX: 00AF ! undocumented +CONSTANT: WM_INPUT HEX: 00FF +CONSTANT: WM_KEYFIRST HEX: 0100 +CONSTANT: WM_KEYDOWN HEX: 0100 +CONSTANT: WM_KEYUP HEX: 0101 +CONSTANT: WM_CHAR HEX: 0102 +CONSTANT: WM_DEADCHAR HEX: 0103 +CONSTANT: WM_SYSKEYDOWN HEX: 0104 +CONSTANT: WM_SYSKEYUP HEX: 0105 +CONSTANT: WM_SYSCHAR HEX: 0106 +CONSTANT: WM_SYSDEADCHAR HEX: 0107 +CONSTANT: WM_UNICHAR HEX: 0109 +CONSTANT: WM_KEYLAST_NT501 HEX: 0109 +CONSTANT: UNICODE_NOCHAR HEX: FFFF +CONSTANT: WM_KEYLAST_PRE501 HEX: 0108 +CONSTANT: WM_IME_STARTCOMPOSITION HEX: 010D +CONSTANT: WM_IME_ENDCOMPOSITION HEX: 010E +CONSTANT: WM_IME_COMPOSITION HEX: 010F +CONSTANT: WM_IME_KEYLAST HEX: 010F +CONSTANT: WM_INITDIALOG HEX: 0110 +CONSTANT: WM_COMMAND HEX: 0111 +CONSTANT: WM_SYSCOMMAND HEX: 0112 +CONSTANT: WM_TIMER HEX: 0113 +CONSTANT: WM_HSCROLL HEX: 0114 +CONSTANT: WM_VSCROLL HEX: 0115 +CONSTANT: WM_INITMENU HEX: 0116 +CONSTANT: WM_INITMENUPOPUP HEX: 0117 +CONSTANT: WM_MENUSELECT HEX: 011F +CONSTANT: WM_MENUCHAR HEX: 0120 +CONSTANT: WM_ENTERIDLE HEX: 0121 +CONSTANT: WM_MENURBUTTONUP HEX: 0122 +CONSTANT: WM_MENUDRAG HEX: 0123 +CONSTANT: WM_MENUGETOBJECT HEX: 0124 +CONSTANT: WM_UNINITMENUPOPUP HEX: 0125 +CONSTANT: WM_MENUCOMMAND HEX: 0126 +CONSTANT: WM_CHANGEUISTATE HEX: 0127 +CONSTANT: WM_UPDATEUISTATE HEX: 0128 +CONSTANT: WM_QUERYUISTATE HEX: 0129 +CONSTANT: WM_CTLCOLORMSGBOX HEX: 0132 +CONSTANT: WM_CTLCOLOREDIT HEX: 0133 +CONSTANT: WM_CTLCOLORLISTBOX HEX: 0134 +CONSTANT: WM_CTLCOLORBTN HEX: 0135 +CONSTANT: WM_CTLCOLORDLG HEX: 0136 +CONSTANT: WM_CTLCOLORSCROLLBAR HEX: 0137 +CONSTANT: WM_CTLCOLORSTATIC HEX: 0138 +CONSTANT: WM_MOUSEFIRST HEX: 0200 +CONSTANT: WM_MOUSEMOVE HEX: 0200 +CONSTANT: WM_LBUTTONDOWN HEX: 0201 +CONSTANT: WM_LBUTTONUP HEX: 0202 +CONSTANT: WM_LBUTTONDBLCLK HEX: 0203 +CONSTANT: WM_RBUTTONDOWN HEX: 0204 +CONSTANT: WM_RBUTTONUP HEX: 0205 +CONSTANT: WM_RBUTTONDBLCLK HEX: 0206 +CONSTANT: WM_MBUTTONDOWN HEX: 0207 +CONSTANT: WM_MBUTTONUP HEX: 0208 +CONSTANT: WM_MBUTTONDBLCLK HEX: 0209 +CONSTANT: WM_MOUSEWHEEL HEX: 020A +CONSTANT: WM_XBUTTONDOWN HEX: 020B +CONSTANT: WM_XBUTTONUP HEX: 020C +CONSTANT: WM_XBUTTONDBLCLK HEX: 020D +CONSTANT: WM_MOUSELAST_5 HEX: 020D +CONSTANT: WM_MOUSELAST_4 HEX: 020A +CONSTANT: WM_MOUSELAST_PRE_4 HEX: 0209 +CONSTANT: WM_PARENTNOTIFY HEX: 0210 +CONSTANT: WM_ENTERMENULOOP HEX: 0211 +CONSTANT: WM_EXITMENULOOP HEX: 0212 +CONSTANT: WM_NEXTMENU HEX: 0213 +CONSTANT: WM_SIZING HEX: 0214 +CONSTANT: WM_CAPTURECHANGED HEX: 0215 +CONSTANT: WM_MOVING HEX: 0216 +CONSTANT: WM_POWERBROADCAST HEX: 0218 +CONSTANT: WM_DEVICECHANGE HEX: 0219 +CONSTANT: WM_MDICREATE HEX: 0220 +CONSTANT: WM_MDIDESTROY HEX: 0221 +CONSTANT: WM_MDIACTIVATE HEX: 0222 +CONSTANT: WM_MDIRESTORE HEX: 0223 +CONSTANT: WM_MDINEXT HEX: 0224 +CONSTANT: WM_MDIMAXIMIZE HEX: 0225 +CONSTANT: WM_MDITILE HEX: 0226 +CONSTANT: WM_MDICASCADE HEX: 0227 +CONSTANT: WM_MDIICONARRANGE HEX: 0228 +CONSTANT: WM_MDIGETACTIVE HEX: 0229 +CONSTANT: WM_MDISETMENU HEX: 0230 +CONSTANT: WM_ENTERSIZEMOVE HEX: 0231 +CONSTANT: WM_EXITSIZEMOVE HEX: 0232 +CONSTANT: WM_DROPFILES HEX: 0233 +CONSTANT: WM_MDIREFRESHMENU HEX: 0234 +CONSTANT: WM_IME_SETCONTEXT HEX: 0281 +CONSTANT: WM_IME_NOTIFY HEX: 0282 +CONSTANT: WM_IME_CONTROL HEX: 0283 +CONSTANT: WM_IME_COMPOSITIONFULL HEX: 0284 +CONSTANT: WM_IME_SELECT HEX: 0285 +CONSTANT: WM_IME_CHAR HEX: 0286 +CONSTANT: WM_IME_REQUEST HEX: 0288 +CONSTANT: WM_IME_KEYDOWN HEX: 0290 +CONSTANT: WM_IME_KEYUP HEX: 0291 +CONSTANT: WM_MOUSEHOVER HEX: 02A1 +CONSTANT: WM_MOUSELEAVE HEX: 02A3 +CONSTANT: WM_NCMOUSEHOVER HEX: 02A0 +CONSTANT: WM_NCMOUSELEAVE HEX: 02A2 +CONSTANT: WM_WTSSESSION_CHANGE HEX: 02B1 +CONSTANT: WM_TABLET_FIRST HEX: 02c0 +CONSTANT: WM_TABLET_LAST HEX: 02df +CONSTANT: WM_CUT HEX: 0300 +CONSTANT: WM_COPY HEX: 0301 +CONSTANT: WM_PASTE HEX: 0302 +CONSTANT: WM_CLEAR HEX: 0303 +CONSTANT: WM_UNDO HEX: 0304 +CONSTANT: WM_RENDERFORMAT HEX: 0305 +CONSTANT: WM_RENDERALLFORMATS HEX: 0306 +CONSTANT: WM_DESTROYCLIPBOARD HEX: 0307 +CONSTANT: WM_DRAWCLIPBOARD HEX: 0308 +CONSTANT: WM_PAINTCLIPBOARD HEX: 0309 +CONSTANT: WM_VSCROLLCLIPBOARD HEX: 030A +CONSTANT: WM_SIZECLIPBOARD HEX: 030B +CONSTANT: WM_ASKCBFORMATNAME HEX: 030C +CONSTANT: WM_CHANGECBCHAIN HEX: 030D +CONSTANT: WM_HSCROLLCLIPBOARD HEX: 030E +CONSTANT: WM_QUERYNEWPALETTE HEX: 030F +CONSTANT: WM_PALETTEISCHANGING HEX: 0310 +CONSTANT: WM_PALETTECHANGED HEX: 0311 +CONSTANT: WM_HOTKEY HEX: 0312 +CONSTANT: WM_PRINT HEX: 0317 +CONSTANT: WM_PRINTCLIENT HEX: 0318 +CONSTANT: WM_APPCOMMAND HEX: 0319 +CONSTANT: WM_THEMECHANGED HEX: 031A +CONSTANT: WM_HANDHELDFIRST HEX: 0358 +CONSTANT: WM_HANDHELDLAST HEX: 035F +CONSTANT: WM_AFXFIRST HEX: 0360 +CONSTANT: WM_AFXLAST HEX: 037F +CONSTANT: WM_PENWINFIRST HEX: 0380 +CONSTANT: WM_PENWINLAST HEX: 038F +CONSTANT: WM_APP HEX: 8000 +CONSTANT: WM_USER HEX: 0400 +CONSTANT: EM_GETSEL HEX: 00B0 +CONSTANT: EM_SETSEL HEX: 00B1 +CONSTANT: EM_GETRECT HEX: 00B2 +CONSTANT: EM_SETRECT HEX: 00B3 +CONSTANT: EM_SETRECTNP HEX: 00B4 +CONSTANT: EM_SCROLL HEX: 00B5 +CONSTANT: EM_LINESCROLL HEX: 00B6 +CONSTANT: EM_SCROLLCARET HEX: 00B7 +CONSTANT: EM_GETMODIFY HEX: 00B8 +CONSTANT: EM_SETMODIFY HEX: 00B9 +CONSTANT: EM_GETLINECOUNT HEX: 00BA +CONSTANT: EM_LINEINDEX HEX: 00BB +CONSTANT: EM_SETHANDLE HEX: 00BC +CONSTANT: EM_GETHANDLE HEX: 00BD +CONSTANT: EM_GETTHUMB HEX: 00BE +CONSTANT: EM_LINELENGTH HEX: 00C1 +CONSTANT: EM_REPLACESEL HEX: 00C2 +CONSTANT: EM_GETLINE HEX: 00C4 +CONSTANT: EM_LIMITTEXT HEX: 00C5 +CONSTANT: EM_CANUNDO HEX: 00C6 +CONSTANT: EM_UNDO HEX: 00C7 +CONSTANT: EM_FMTLINES HEX: 00C8 +CONSTANT: EM_LINEFROMCHAR HEX: 00C9 +CONSTANT: EM_SETTABSTOPS HEX: 00CB +CONSTANT: EM_SETPASSWORDCHAR HEX: 00CC +CONSTANT: EM_EMPTYUNDOBUFFER HEX: 00CD +CONSTANT: EM_GETFIRSTVISIBLELINE HEX: 00CE +CONSTANT: EM_SETREADONLY HEX: 00CF +CONSTANT: EM_SETWORDBREAKPROC HEX: 00D0 +CONSTANT: EM_GETWORDBREAKPROC HEX: 00D1 +CONSTANT: EM_GETPASSWORDCHAR HEX: 00D2 +CONSTANT: EM_SETMARGINS HEX: 00D3 +CONSTANT: EM_GETMARGINS HEX: 00D4 +ALIAS: EM_SETLIMITTEXT EM_LIMITTEXT +CONSTANT: EM_GETLIMITTEXT HEX: 00D5 +CONSTANT: EM_POSFROMCHAR HEX: 00D6 +CONSTANT: EM_CHARFROMPOS HEX: 00D7 +CONSTANT: EM_SETIMESTATUS HEX: 00D8 +CONSTANT: EM_GETIMESTATUS HEX: 00D9 +CONSTANT: BM_GETCHECK HEX: 00F0 +CONSTANT: BM_SETCHECK HEX: 00F1 +CONSTANT: BM_GETSTATE HEX: 00F2 +CONSTANT: BM_SETSTATE HEX: 00F3 +CONSTANT: BM_SETSTYLE HEX: 00F4 +CONSTANT: BM_CLICK HEX: 00F5 +CONSTANT: BM_GETIMAGE HEX: 00F6 +CONSTANT: BM_SETIMAGE HEX: 00F7 +CONSTANT: STM_SETICON HEX: 0170 +CONSTANT: STM_GETICON HEX: 0171 +CONSTANT: STM_SETIMAGE HEX: 0172 +CONSTANT: STM_GETIMAGE HEX: 0173 +CONSTANT: STM_MSGMAX HEX: 0174 +CONSTANT: DM_GETDEFID WM_USER +: DM_SETDEFID ( -- n ) ( -- n ) WM_USER 1 + ; inline +: DM_REPOSITION ( -- n ) ( -- n ) WM_USER 2 + ; inline +CONSTANT: LB_ADDSTRING HEX: 0180 +CONSTANT: LB_INSERTSTRING HEX: 0181 +CONSTANT: LB_DELETESTRING HEX: 0182 +CONSTANT: LB_SELITEMRANGEEX HEX: 0183 +CONSTANT: LB_RESETCONTENT HEX: 0184 +CONSTANT: LB_SETSEL HEX: 0185 +CONSTANT: LB_SETCURSEL HEX: 0186 +CONSTANT: LB_GETSEL HEX: 0187 +CONSTANT: LB_GETCURSEL HEX: 0188 +CONSTANT: LB_GETTEXT HEX: 0189 +CONSTANT: LB_GETTEXTLEN HEX: 018A +CONSTANT: LB_GETCOUNT HEX: 018B +CONSTANT: LB_SELECTSTRING HEX: 018C +CONSTANT: LB_DIR HEX: 018D +CONSTANT: LB_GETTOPINDEX HEX: 018E +CONSTANT: LB_FINDSTRING HEX: 018F +CONSTANT: LB_GETSELCOUNT HEX: 0190 +CONSTANT: LB_GETSELITEMS HEX: 0191 +CONSTANT: LB_SETTABSTOPS HEX: 0192 +CONSTANT: LB_GETHORIZONTALEXTENT HEX: 0193 +CONSTANT: LB_SETHORIZONTALEXTENT HEX: 0194 +CONSTANT: LB_SETCOLUMNWIDTH HEX: 0195 +CONSTANT: LB_ADDFILE HEX: 0196 +CONSTANT: LB_SETTOPINDEX HEX: 0197 +CONSTANT: LB_GETITEMRECT HEX: 0198 +CONSTANT: LB_GETITEMDATA HEX: 0199 +CONSTANT: LB_SETITEMDATA HEX: 019A +CONSTANT: LB_SELITEMRANGE HEX: 019B +CONSTANT: LB_SETANCHORINDEX HEX: 019C +CONSTANT: LB_GETANCHORINDEX HEX: 019D +CONSTANT: LB_SETCARETINDEX HEX: 019E +CONSTANT: LB_GETCARETINDEX HEX: 019F +CONSTANT: LB_SETITEMHEIGHT HEX: 01A0 +CONSTANT: LB_GETITEMHEIGHT HEX: 01A1 +CONSTANT: LB_FINDSTRINGEXACT HEX: 01A2 +CONSTANT: LB_SETLOCALE HEX: 01A5 +CONSTANT: LB_GETLOCALE HEX: 01A6 +CONSTANT: LB_SETCOUNT HEX: 01A7 +CONSTANT: LB_INITSTORAGE HEX: 01A8 +CONSTANT: LB_ITEMFROMPOINT HEX: 01A9 +CONSTANT: LB_MULTIPLEADDSTRING HEX: 01B1 +CONSTANT: LB_GETLISTBOXINFO HEX: 01B2 +CONSTANT: LB_MSGMAX_501 HEX: 01B3 +CONSTANT: LB_MSGMAX_WCE4 HEX: 01B1 +CONSTANT: LB_MSGMAX_4 HEX: 01B0 +CONSTANT: LB_MSGMAX_PRE4 HEX: 01A8 +CONSTANT: CB_GETEDITSEL HEX: 0140 +CONSTANT: CB_LIMITTEXT HEX: 0141 +CONSTANT: CB_SETEDITSEL HEX: 0142 +CONSTANT: CB_ADDSTRING HEX: 0143 +CONSTANT: CB_DELETESTRING HEX: 0144 +CONSTANT: CB_DIR HEX: 0145 +CONSTANT: CB_GETCOUNT HEX: 0146 +CONSTANT: CB_GETCURSEL HEX: 0147 +CONSTANT: CB_GETLBTEXT HEX: 0148 +CONSTANT: CB_GETLBTEXTLEN HEX: 0149 +CONSTANT: CB_INSERTSTRING HEX: 014A +CONSTANT: CB_RESETCONTENT HEX: 014B +CONSTANT: CB_FINDSTRING HEX: 014C +CONSTANT: CB_SELECTSTRING HEX: 014D +CONSTANT: CB_SETCURSEL HEX: 014E +CONSTANT: CB_SHOWDROPDOWN HEX: 014F +CONSTANT: CB_GETITEMDATA HEX: 0150 +CONSTANT: CB_SETITEMDATA HEX: 0151 +CONSTANT: CB_GETDROPPEDCONTROLRECT HEX: 0152 +CONSTANT: CB_SETITEMHEIGHT HEX: 0153 +CONSTANT: CB_GETITEMHEIGHT HEX: 0154 +CONSTANT: CB_SETEXTENDEDUI HEX: 0155 +CONSTANT: CB_GETEXTENDEDUI HEX: 0156 +CONSTANT: CB_GETDROPPEDSTATE HEX: 0157 +CONSTANT: CB_FINDSTRINGEXACT HEX: 0158 +CONSTANT: CB_SETLOCALE HEX: 0159 +CONSTANT: CB_GETLOCALE HEX: 015A +CONSTANT: CB_GETTOPINDEX HEX: 015B +CONSTANT: CB_SETTOPINDEX HEX: 015C +CONSTANT: CB_GETHORIZONTALEXTENT HEX: 015d +CONSTANT: CB_SETHORIZONTALEXTENT HEX: 015e +CONSTANT: CB_GETDROPPEDWIDTH HEX: 015f +CONSTANT: CB_SETDROPPEDWIDTH HEX: 0160 +CONSTANT: CB_INITSTORAGE HEX: 0161 +CONSTANT: CB_MULTIPLEADDSTRING HEX: 0163 +CONSTANT: CB_GETCOMBOBOXINFO HEX: 0164 +CONSTANT: CB_MSGMAX_501 HEX: 0165 +CONSTANT: CB_MSGMAX_WCE400 HEX: 0163 +CONSTANT: CB_MSGMAX_400 HEX: 0162 +CONSTANT: CB_MSGMAX_PRE400 HEX: 015B +CONSTANT: SBM_SETPOS HEX: 00E0 +CONSTANT: SBM_GETPOS HEX: 00E1 +CONSTANT: SBM_SETRANGE HEX: 00E2 +CONSTANT: SBM_SETRANGEREDRAW HEX: 00E6 +CONSTANT: SBM_GETRANGE HEX: 00E3 +CONSTANT: SBM_ENABLE_ARROWS HEX: 00E4 +CONSTANT: SBM_SETSCROLLINFO HEX: 00E9 +CONSTANT: SBM_GETSCROLLINFO HEX: 00EA +CONSTANT: SBM_GETSCROLLBARINFO HEX: 00EB +CONSTANT: LVM_FIRST HEX: 1000 ! ListView messages +CONSTANT: TV_FIRST HEX: 1100 ! TreeView messages +CONSTANT: HDM_FIRST HEX: 1200 ! Header messages +CONSTANT: TCM_FIRST HEX: 1300 ! Tab control messages +CONSTANT: PGM_FIRST HEX: 1400 ! Pager control messages +CONSTANT: ECM_FIRST HEX: 1500 ! Edit control messages +CONSTANT: BCM_FIRST HEX: 1600 ! Button control messages +CONSTANT: CBM_FIRST HEX: 1700 ! Combobox control messages +CONSTANT: CCM_FIRST HEX: 2000 ! Common control shared messages +: CCM_LAST ( -- n ) CCM_FIRST HEX: 0200 + ; inline +: CCM_SETBKCOLOR ( -- n ) CCM_FIRST 1 + ; inline +: CCM_SETCOLORSCHEME ( -- n ) CCM_FIRST 2 + ; inline +: CCM_GETCOLORSCHEME ( -- n ) CCM_FIRST 3 + ; inline +: CCM_GETDROPTARGET ( -- n ) CCM_FIRST 4 + ; inline +: CCM_SETUNICODEFORMAT ( -- n ) CCM_FIRST 5 + ; inline +: CCM_GETUNICODEFORMAT ( -- n ) CCM_FIRST 6 + ; inline +: CCM_SETVERSION ( -- n ) CCM_FIRST 7 + ; inline +: CCM_GETVERSION ( -- n ) CCM_FIRST 8 + ; inline +: CCM_SETNOTIFYWINDOW ( -- n ) CCM_FIRST 9 + ; inline +: CCM_SETWINDOWTHEME ( -- n ) CCM_FIRST HEX: b + ; inline +: CCM_DPISCALE ( -- n ) CCM_FIRST HEX: c + ; inline +: HDM_GETITEMCOUNT ( -- n ) HDM_FIRST 0 + ; inline +: HDM_INSERTITEMA ( -- n ) HDM_FIRST 1 + ; inline +: HDM_INSERTITEMW ( -- n ) HDM_FIRST 10 + ; inline +: HDM_DELETEITEM ( -- n ) HDM_FIRST 2 + ; inline +: HDM_GETITEMA ( -- n ) HDM_FIRST 3 + ; inline +: HDM_GETITEMW ( -- n ) HDM_FIRST 11 + ; inline +: HDM_SETITEMA ( -- n ) HDM_FIRST 4 + ; inline +: HDM_SETITEMW ( -- n ) HDM_FIRST 12 + ; inline +: HDM_LAYOUT ( -- n ) HDM_FIRST 5 + ; inline +: HDM_HITTEST ( -- n ) HDM_FIRST 6 + ; inline +: HDM_GETITEMRECT ( -- n ) HDM_FIRST 7 + ; inline +: HDM_SETIMAGELIST ( -- n ) HDM_FIRST 8 + ; inline +: HDM_GETIMAGELIST ( -- n ) HDM_FIRST 9 + ; inline +: HDM_ORDERTOINDEX ( -- n ) HDM_FIRST 15 + ; inline +: HDM_CREATEDRAGIMAGE ( -- n ) HDM_FIRST 16 + ; inline +: HDM_GETORDERARRAY ( -- n ) HDM_FIRST 17 + ; inline +: HDM_SETORDERARRAY ( -- n ) HDM_FIRST 18 + ; inline +: HDM_SETHOTDIVIDER ( -- n ) HDM_FIRST 19 + ; inline +: HDM_SETBITMAPMARGIN ( -- n ) HDM_FIRST 20 + ; inline +: HDM_GETBITMAPMARGIN ( -- n ) HDM_FIRST 21 + ; inline +CONSTANT: HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT +CONSTANT: HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT +: HDM_SETFILTERCHANGETIMEOUT ( -- n ) HDM_FIRST 22 + ; inline +: HDM_EDITFILTER ( -- n ) HDM_FIRST 23 + ; inline +: HDM_CLEARFILTER ( -- n ) HDM_FIRST 24 + ; inline +: TB_ENABLEBUTTON ( -- n ) WM_USER 1 + ; inline +: TB_CHECKBUTTON ( -- n ) WM_USER 2 + ; inline +: TB_PRESSBUTTON ( -- n ) WM_USER 3 + ; inline +: TB_HIDEBUTTON ( -- n ) WM_USER 4 + ; inline +: TB_INDETERMINATE ( -- n ) WM_USER 5 + ; inline +: TB_MARKBUTTON ( -- n ) WM_USER 6 + ; inline +: TB_ISBUTTONENABLED ( -- n ) WM_USER 9 + ; inline +: TB_ISBUTTONCHECKED ( -- n ) WM_USER 10 + ; inline +: TB_ISBUTTONPRESSED ( -- n ) WM_USER 11 + ; inline +: TB_ISBUTTONHIDDEN ( -- n ) WM_USER 12 + ; inline +: TB_ISBUTTONINDETERMINATE ( -- n ) WM_USER 13 + ; inline +: TB_ISBUTTONHIGHLIGHTED ( -- n ) WM_USER 14 + ; inline +: TB_SETSTATE ( -- n ) WM_USER 17 + ; inline +: TB_GETSTATE ( -- n ) WM_USER 18 + ; inline +: TB_ADDBITMAP ( -- n ) WM_USER 19 + ; inline +: TB_ADDBUTTONSA ( -- n ) WM_USER 20 + ; inline +: TB_INSERTBUTTONA ( -- n ) WM_USER 21 + ; inline +: TB_ADDBUTTONS ( -- n ) WM_USER 20 + ; inline +: TB_INSERTBUTTON ( -- n ) WM_USER 21 + ; inline +: TB_DELETEBUTTON ( -- n ) WM_USER 22 + ; inline +: TB_GETBUTTON ( -- n ) WM_USER 23 + ; inline +: TB_BUTTONCOUNT ( -- n ) WM_USER 24 + ; inline +: TB_COMMANDTOINDEX ( -- n ) WM_USER 25 + ; inline +: TB_SAVERESTOREA ( -- n ) WM_USER 26 + ; inline +: TB_SAVERESTOREW ( -- n ) WM_USER 76 + ; inline +: TB_CUSTOMIZE ( -- n ) WM_USER 27 + ; inline +: TB_ADDSTRINGA ( -- n ) WM_USER 28 + ; inline +: TB_ADDSTRINGW ( -- n ) WM_USER 77 + ; inline +: TB_GETITEMRECT ( -- n ) WM_USER 29 + ; inline +: TB_BUTTONSTRUCTSIZE ( -- n ) WM_USER 30 + ; inline +: TB_SETBUTTONSIZE ( -- n ) WM_USER 31 + ; inline +: TB_SETBITMAPSIZE ( -- n ) WM_USER 32 + ; inline +: TB_AUTOSIZE ( -- n ) WM_USER 33 + ; inline +: TB_GETTOOLTIPS ( -- n ) WM_USER 35 + ; inline +: TB_SETTOOLTIPS ( -- n ) WM_USER 36 + ; inline +: TB_SETPARENT ( -- n ) WM_USER 37 + ; inline +: TB_SETROWS ( -- n ) WM_USER 39 + ; inline +: TB_GETROWS ( -- n ) WM_USER 40 + ; inline +: TB_SETCMDID ( -- n ) WM_USER 42 + ; inline +: TB_CHANGEBITMAP ( -- n ) WM_USER 43 + ; inline +: TB_GETBITMAP ( -- n ) WM_USER 44 + ; inline +: TB_GETBUTTONTEXTA ( -- n ) WM_USER 45 + ; inline +: TB_GETBUTTONTEXTW ( -- n ) WM_USER 75 + ; inline +: TB_REPLACEBITMAP ( -- n ) WM_USER 46 + ; inline +: TB_SETINDENT ( -- n ) WM_USER 47 + ; inline +: TB_SETIMAGELIST ( -- n ) WM_USER 48 + ; inline +: TB_GETIMAGELIST ( -- n ) WM_USER 49 + ; inline +: TB_LOADIMAGES ( -- n ) WM_USER 50 + ; inline +: TB_GETRECT ( -- n ) WM_USER 51 + ; inline +: TB_SETHOTIMAGELIST ( -- n ) WM_USER 52 + ; inline +: TB_GETHOTIMAGELIST ( -- n ) WM_USER 53 + ; inline +: TB_SETDISABLEDIMAGELIST ( -- n ) WM_USER 54 + ; inline +: TB_GETDISABLEDIMAGELIST ( -- n ) WM_USER 55 + ; inline +: TB_SETSTYLE ( -- n ) WM_USER 56 + ; inline +: TB_GETSTYLE ( -- n ) WM_USER 57 + ; inline +: TB_GETBUTTONSIZE ( -- n ) WM_USER 58 + ; inline +: TB_SETBUTTONWIDTH ( -- n ) WM_USER 59 + ; inline +: TB_SETMAXTEXTROWS ( -- n ) WM_USER 60 + ; inline +: TB_GETTEXTROWS ( -- n ) WM_USER 61 + ; inline +: TB_GETOBJECT ( -- n ) WM_USER 62 + ; inline +: TB_GETHOTITEM ( -- n ) WM_USER 71 + ; inline +: TB_SETHOTITEM ( -- n ) WM_USER 72 + ; inline +: TB_SETANCHORHIGHLIGHT ( -- n ) WM_USER 73 + ; inline +: TB_GETANCHORHIGHLIGHT ( -- n ) WM_USER 74 + ; inline +: TB_MAPACCELERATORA ( -- n ) WM_USER 78 + ; inline +: TB_GETINSERTMARK ( -- n ) WM_USER 79 + ; inline +: TB_SETINSERTMARK ( -- n ) WM_USER 80 + ; inline +: TB_INSERTMARKHITTEST ( -- n ) WM_USER 81 + ; inline +: TB_MOVEBUTTON ( -- n ) WM_USER 82 + ; inline +: TB_GETMAXSIZE ( -- n ) WM_USER 83 + ; inline +: TB_SETEXTENDEDSTYLE ( -- n ) WM_USER 84 + ; inline +: TB_GETEXTENDEDSTYLE ( -- n ) WM_USER 85 + ; inline +: TB_GETPADDING ( -- n ) WM_USER 86 + ; inline +: TB_SETPADDING ( -- n ) WM_USER 87 + ; inline +: TB_SETINSERTMARKCOLOR ( -- n ) WM_USER 88 + ; inline +: TB_GETINSERTMARKCOLOR ( -- n ) WM_USER 89 + ; inline +ALIAS: TB_SETCOLORSCHEME CCM_SETCOLORSCHEME +ALIAS: TB_GETCOLORSCHEME CCM_GETCOLORSCHEME +ALIAS: TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT +ALIAS: TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT +: TB_MAPACCELERATORW ( -- n ) WM_USER 90 + ; inline +: TB_GETBITMAPFLAGS ( -- n ) WM_USER 41 + ; inline +: TB_GETBUTTONINFOW ( -- n ) WM_USER 63 + ; inline +: TB_SETBUTTONINFOW ( -- n ) WM_USER 64 + ; inline +: TB_GETBUTTONINFOA ( -- n ) WM_USER 65 + ; inline +: TB_SETBUTTONINFOA ( -- n ) WM_USER 66 + ; inline +: TB_INSERTBUTTONW ( -- n ) WM_USER 67 + ; inline +: TB_ADDBUTTONSW ( -- n ) WM_USER 68 + ; inline +: TB_HITTEST ( -- n ) WM_USER 69 + ; inline +: TB_SETDRAWTEXTFLAGS ( -- n ) WM_USER 70 + ; inline +: TB_GETSTRINGW ( -- n ) WM_USER 91 + ; inline +: TB_GETSTRINGA ( -- n ) WM_USER 92 + ; inline +: TB_GETMETRICS ( -- n ) WM_USER 101 + ; inline +: TB_SETMETRICS ( -- n ) WM_USER 102 + ; inline +ALIAS: TB_SETWINDOWTHEME CCM_SETWINDOWTHEME +: RB_INSERTBANDA ( -- n ) WM_USER 1 + ; inline +: RB_DELETEBAND ( -- n ) WM_USER 2 + ; inline +: RB_GETBARINFO ( -- n ) WM_USER 3 + ; inline +: RB_SETBARINFO ( -- n ) WM_USER 4 + ; inline +: RB_GETBANDINFO ( -- n ) WM_USER 5 + ; inline +: RB_SETBANDINFOA ( -- n ) WM_USER 6 + ; inline +: RB_SETPARENT ( -- n ) WM_USER 7 + ; inline +: RB_HITTEST ( -- n ) WM_USER 8 + ; inline +: RB_GETRECT ( -- n ) WM_USER 9 + ; inline +: RB_INSERTBANDW ( -- n ) WM_USER 10 + ; inline +: RB_SETBANDINFOW ( -- n ) WM_USER 11 + ; inline +: RB_GETBANDCOUNT ( -- n ) WM_USER 12 + ; inline +: RB_GETROWCOUNT ( -- n ) WM_USER 13 + ; inline +: RB_GETROWHEIGHT ( -- n ) WM_USER 14 + ; inline +: RB_IDTOINDEX ( -- n ) WM_USER 16 + ; inline +: RB_GETTOOLTIPS ( -- n ) WM_USER 17 + ; inline +: RB_SETTOOLTIPS ( -- n ) WM_USER 18 + ; inline +: RB_SETBKCOLOR ( -- n ) WM_USER 19 + ; inline +: RB_GETBKCOLOR ( -- n ) WM_USER 20 + ; inline +: RB_SETTEXTCOLOR ( -- n ) WM_USER 21 + ; inline +: RB_GETTEXTCOLOR ( -- n ) WM_USER 22 + ; inline +: RB_SIZETORECT ( -- n ) WM_USER 23 + ; inline +CONSTANT: RB_SETCOLORSCHEME CCM_SETCOLORSCHEME +CONSTANT: RB_GETCOLORSCHEME CCM_GETCOLORSCHEME +: RB_BEGINDRAG ( -- n ) WM_USER 24 + ; inline +: RB_ENDDRAG ( -- n ) WM_USER 25 + ; inline +: RB_DRAGMOVE ( -- n ) WM_USER 26 + ; inline +: RB_GETBARHEIGHT ( -- n ) WM_USER 27 + ; inline +: RB_GETBANDINFOW ( -- n ) WM_USER 28 + ; inline +: RB_GETBANDINFOA ( -- n ) WM_USER 29 + ; inline +: RB_MINIMIZEBAND ( -- n ) WM_USER 30 + ; inline +: RB_MAXIMIZEBAND ( -- n ) WM_USER 31 + ; inline +ALIAS: RB_GETDROPTARGET CCM_GETDROPTARGET +: RB_GETBANDBORDERS ( -- n ) WM_USER 34 + ; inline +: RB_SHOWBAND ( -- n ) WM_USER 35 + ; inline +: RB_SETPALETTE ( -- n ) WM_USER 37 + ; inline +: RB_GETPALETTE ( -- n ) WM_USER 38 + ; inline +: RB_MOVEBAND ( -- n ) WM_USER 39 + ; inline +CONSTANT: RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT +CONSTANT: RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT +: RB_GETBANDMARGINS ( -- n ) WM_USER 40 + ; inline +ALIAS: RB_SETWINDOWTHEME CCM_SETWINDOWTHEME +: RB_PUSHCHEVRON ( -- n ) WM_USER 43 + ; inline +: TTM_ACTIVATE ( -- n ) WM_USER 1 + ; inline +: TTM_SETDELAYTIME ( -- n ) WM_USER 3 + ; inline +: TTM_ADDTOOLA ( -- n ) WM_USER 4 + ; inline +: TTM_ADDTOOLW ( -- n ) WM_USER 50 + ; inline +: TTM_DELTOOLA ( -- n ) WM_USER 5 + ; inline +: TTM_DELTOOLW ( -- n ) WM_USER 51 + ; inline +: TTM_NEWTOOLRECTA ( -- n ) WM_USER 6 + ; inline +: TTM_NEWTOOLRECTW ( -- n ) WM_USER 52 + ; inline +: TTM_RELAYEVENT ( -- n ) WM_USER 7 + ; inline +: TTM_GETTOOLINFOA ( -- n ) WM_USER 8 + ; inline +: TTM_GETTOOLINFOW ( -- n ) WM_USER 53 + ; inline +: TTM_SETTOOLINFOA ( -- n ) WM_USER 9 + ; inline +: TTM_SETTOOLINFOW ( -- n ) WM_USER 54 + ; inline +: TTM_HITTESTA ( -- n ) WM_USER 10 + ; inline +: TTM_HITTESTW ( -- n ) WM_USER 55 + ; inline +: TTM_GETTEXTA ( -- n ) WM_USER 11 + ; inline +: TTM_GETTEXTW ( -- n ) WM_USER 56 + ; inline +: TTM_UPDATETIPTEXTA ( -- n ) WM_USER 12 + ; inline +: TTM_UPDATETIPTEXTW ( -- n ) WM_USER 57 + ; inline +: TTM_GETTOOLCOUNT ( -- n ) WM_USER 13 + ; inline +: TTM_ENUMTOOLSA ( -- n ) WM_USER 14 + ; inline +: TTM_ENUMTOOLSW ( -- n ) WM_USER 58 + ; inline +: TTM_GETCURRENTTOOLA ( -- n ) WM_USER 15 + ; inline +: TTM_GETCURRENTTOOLW ( -- n ) WM_USER 59 + ; inline +: TTM_WINDOWFROMPOINT ( -- n ) WM_USER 16 + ; inline +: TTM_TRACKACTIVATE ( -- n ) WM_USER 17 + ; inline +: TTM_TRACKPOSITION ( -- n ) WM_USER 18 + ; inline +: TTM_SETTIPBKCOLOR ( -- n ) WM_USER 19 + ; inline +: TTM_SETTIPTEXTCOLOR ( -- n ) WM_USER 20 + ; inline +: TTM_GETDELAYTIME ( -- n ) WM_USER 21 + ; inline +: TTM_GETTIPBKCOLOR ( -- n ) WM_USER 22 + ; inline +: TTM_GETTIPTEXTCOLOR ( -- n ) WM_USER 23 + ; inline +: TTM_SETMAXTIPWIDTH ( -- n ) WM_USER 24 + ; inline +: TTM_GETMAXTIPWIDTH ( -- n ) WM_USER 25 + ; inline +: TTM_SETMARGIN ( -- n ) WM_USER 26 + ; inline +: TTM_GETMARGIN ( -- n ) WM_USER 27 + ; inline +: TTM_POP ( -- n ) WM_USER 28 + ; inline +: TTM_UPDATE ( -- n ) WM_USER 29 + ; inline +: TTM_GETBUBBLESIZE ( -- n ) WM_USER 30 + ; inline +: TTM_ADJUSTRECT ( -- n ) WM_USER 31 + ; inline +: TTM_SETTITLEA ( -- n ) WM_USER 32 + ; inline +: TTM_SETTITLEW ( -- n ) WM_USER 33 + ; inline +: TTM_POPUP ( -- n ) WM_USER 34 + ; inline +: TTM_GETTITLE ( -- n ) WM_USER 35 + ; inline +ALIAS: TTM_SETWINDOWTHEME CCM_SETWINDOWTHEME +: SB_SETTEXTA ( -- n ) WM_USER 1 + ; inline +: SB_SETTEXTW ( -- n ) WM_USER 11 + ; inline +: SB_GETTEXTA ( -- n ) WM_USER 2 + ; inline +: SB_GETTEXTW ( -- n ) WM_USER 13 + ; inline +: SB_GETTEXTLENGTHA ( -- n ) WM_USER 3 + ; inline +: SB_GETTEXTLENGTHW ( -- n ) WM_USER 12 + ; inline +: SB_SETPARTS ( -- n ) WM_USER 4 + ; inline +: SB_GETPARTS ( -- n ) WM_USER 6 + ; inline +: SB_GETBORDERS ( -- n ) WM_USER 7 + ; inline +: SB_SETMINHEIGHT ( -- n ) WM_USER 8 + ; inline +: SB_SIMPLE ( -- n ) WM_USER 9 + ; inline +: SB_GETRECT ( -- n ) WM_USER 10 + ; inline +: SB_ISSIMPLE ( -- n ) WM_USER 14 + ; inline +: SB_SETICON ( -- n ) WM_USER 15 + ; inline +: SB_SETTIPTEXTA ( -- n ) WM_USER 16 + ; inline +: SB_SETTIPTEXTW ( -- n ) WM_USER 17 + ; inline +: SB_GETTIPTEXTA ( -- n ) WM_USER 18 + ; inline +: SB_GETTIPTEXTW ( -- n ) WM_USER 19 + ; inline +: SB_GETICON ( -- n ) WM_USER 20 + ; inline +CONSTANT: SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT +CONSTANT: SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT +ALIAS: SB_SETBKCOLOR CCM_SETBKCOLOR +CONSTANT: SB_SIMPLEID HEX: 00ff +ALIAS: TBM_GETPOS WM_USER +: TBM_GETRANGEMIN ( -- n ) WM_USER 1 + ; inline +: TBM_GETRANGEMAX ( -- n ) WM_USER 2 + ; inline +: TBM_GETTIC ( -- n ) WM_USER 3 + ; inline +: TBM_SETTIC ( -- n ) WM_USER 4 + ; inline +: TBM_SETPOS ( -- n ) WM_USER 5 + ; inline +: TBM_SETRANGE ( -- n ) WM_USER 6 + ; inline +: TBM_SETRANGEMIN ( -- n ) WM_USER 7 + ; inline +: TBM_SETRANGEMAX ( -- n ) WM_USER 8 + ; inline +: TBM_CLEARTICS ( -- n ) WM_USER 9 + ; inline +: TBM_SETSEL ( -- n ) WM_USER 10 + ; inline +: TBM_SETSELSTART ( -- n ) WM_USER 11 + ; inline +: TBM_SETSELEND ( -- n ) WM_USER 12 + ; inline +: TBM_GETPTICS ( -- n ) WM_USER 14 + ; inline +: TBM_GETTICPOS ( -- n ) WM_USER 15 + ; inline +: TBM_GETNUMTICS ( -- n ) WM_USER 16 + ; inline +: TBM_GETSELSTART ( -- n ) WM_USER 17 + ; inline +: TBM_GETSELEND ( -- n ) WM_USER 18 + ; inline +: TBM_CLEARSEL ( -- n ) WM_USER 19 + ; inline +: TBM_SETTICFREQ ( -- n ) WM_USER 20 + ; inline +: TBM_SETPAGESIZE ( -- n ) WM_USER 21 + ; inline +: TBM_GETPAGESIZE ( -- n ) WM_USER 22 + ; inline +: TBM_SETLINESIZE ( -- n ) WM_USER 23 + ; inline +: TBM_GETLINESIZE ( -- n ) WM_USER 24 + ; inline +: TBM_GETTHUMBRECT ( -- n ) WM_USER 25 + ; inline +: TBM_GETCHANNELRECT ( -- n ) WM_USER 26 + ; inline +: TBM_SETTHUMBLENGTH ( -- n ) WM_USER 27 + ; inline +: TBM_GETTHUMBLENGTH ( -- n ) WM_USER 28 + ; inline +: TBM_SETTOOLTIPS ( -- n ) WM_USER 29 + ; inline +: TBM_GETTOOLTIPS ( -- n ) WM_USER 30 + ; inline +: TBM_SETTIPSIDE ( -- n ) WM_USER 31 + ; inline +: TBM_SETBUDDY ( -- n ) WM_USER 32 + ; inline +: TBM_GETBUDDY ( -- n ) WM_USER 33 + ; inline +ALIAS: TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT +ALIAS: TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT +: DL_BEGINDRAG ( -- n ) WM_USER 133 + ; inline +: DL_DRAGGING ( -- n ) WM_USER 134 + ; inline +: DL_DROPPED ( -- n ) WM_USER 135 + ; inline +: DL_CANCELDRAG ( -- n ) WM_USER 136 + ; inline +: UDM_SETRANGE ( -- n ) WM_USER 101 + ; inline +: UDM_GETRANGE ( -- n ) WM_USER 102 + ; inline +: UDM_SETPOS ( -- n ) WM_USER 103 + ; inline +: UDM_GETPOS ( -- n ) WM_USER 104 + ; inline +: UDM_SETBUDDY ( -- n ) WM_USER 105 + ; inline +: UDM_GETBUDDY ( -- n ) WM_USER 106 + ; inline +: UDM_SETACCEL ( -- n ) WM_USER 107 + ; inline +: UDM_GETACCEL ( -- n ) WM_USER 108 + ; inline +: UDM_SETBASE ( -- n ) WM_USER 109 + ; inline +: UDM_GETBASE ( -- n ) WM_USER 110 + ; inline +: UDM_SETRANGE32 ( -- n ) WM_USER 111 + ; inline +: UDM_GETRANGE32 ( -- n ) WM_USER 112 + ; inline +ALIAS: UDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT +ALIAS: UDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT +: UDM_SETPOS32 ( -- n ) WM_USER 113 + ; inline +: UDM_GETPOS32 ( -- n ) WM_USER 114 + ; inline +: PBM_SETRANGE ( -- n ) WM_USER 1 + ; inline +: PBM_SETPOS ( -- n ) WM_USER 2 + ; inline +: PBM_DELTAPOS ( -- n ) WM_USER 3 + ; inline +: PBM_SETSTEP ( -- n ) WM_USER 4 + ; inline +: PBM_STEPIT ( -- n ) WM_USER 5 + ; inline +: PBM_SETRANGE32 ( -- n ) WM_USER 6 + ; inline +: PBM_GETRANGE ( -- n ) WM_USER 7 + ; inline +: PBM_GETPOS ( -- n ) WM_USER 8 + ; inline +: PBM_SETBARCOLOR ( -- n ) WM_USER 9 + ; inline +ALIAS: PBM_SETBKCOLOR CCM_SETBKCOLOR +: HKM_SETHOTKEY ( -- n ) WM_USER 1 + ; inline +: HKM_GETHOTKEY ( -- n ) WM_USER 2 + ; inline +: HKM_SETRULES ( -- n ) WM_USER 3 + ; inline +ALIAS: LVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT +ALIAS: LVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT +: LVM_GETBKCOLOR ( -- n ) LVM_FIRST 0 + ; inline +: LVM_SETBKCOLOR ( -- n ) LVM_FIRST 1 + ; inline +: LVM_GETIMAGELIST ( -- n ) LVM_FIRST 2 + ; inline +: LVM_SETIMAGELIST ( -- n ) LVM_FIRST 3 + ; inline +: LVM_GETITEMCOUNT ( -- n ) LVM_FIRST 4 + ; inline +: LVM_GETITEMA ( -- n ) LVM_FIRST 5 + ; inline +: LVM_GETITEMW ( -- n ) LVM_FIRST 75 + ; inline +: LVM_SETITEMA ( -- n ) LVM_FIRST 6 + ; inline +: LVM_SETITEMW ( -- n ) LVM_FIRST 76 + ; inline +: LVM_INSERTITEMA ( -- n ) LVM_FIRST 7 + ; inline +: LVM_INSERTITEMW ( -- n ) LVM_FIRST 77 + ; inline +: LVM_DELETEITEM ( -- n ) LVM_FIRST 8 + ; inline +: LVM_DELETEALLITEMS ( -- n ) LVM_FIRST 9 + ; inline +: LVM_GETCALLBACKMASK ( -- n ) LVM_FIRST 10 + ; inline +: LVM_SETCALLBACKMASK ( -- n ) LVM_FIRST 11 + ; inline +: LVM_FINDITEMA ( -- n ) LVM_FIRST 13 + ; inline +: LVM_FINDITEMW ( -- n ) LVM_FIRST 83 + ; inline +: LVM_GETITEMRECT ( -- n ) LVM_FIRST 14 + ; inline +: LVM_SETITEMPOSITION ( -- n ) LVM_FIRST 15 + ; inline +: LVM_GETITEMPOSITION ( -- n ) LVM_FIRST 16 + ; inline +: LVM_GETSTRINGWIDTHA ( -- n ) LVM_FIRST 17 + ; inline +: LVM_GETSTRINGWIDTHW ( -- n ) LVM_FIRST 87 + ; inline +: LVM_HITTEST ( -- n ) LVM_FIRST 18 + ; inline +: LVM_ENSUREVISIBLE ( -- n ) LVM_FIRST 19 + ; inline +: LVM_SCROLL ( -- n ) LVM_FIRST 20 + ; inline +: LVM_REDRAWITEMS ( -- n ) LVM_FIRST 21 + ; inline +: LVM_ARRANGE ( -- n ) LVM_FIRST 22 + ; inline +: LVM_EDITLABELA ( -- n ) LVM_FIRST 23 + ; inline +: LVM_EDITLABELW ( -- n ) LVM_FIRST 118 + ; inline +: LVM_GETEDITCONTROL ( -- n ) LVM_FIRST 24 + ; inline +: LVM_GETCOLUMNA ( -- n ) LVM_FIRST 25 + ; inline +: LVM_GETCOLUMNW ( -- n ) LVM_FIRST 95 + ; inline +: LVM_SETCOLUMNA ( -- n ) LVM_FIRST 26 + ; inline +: LVM_SETCOLUMNW ( -- n ) LVM_FIRST 96 + ; inline +: LVM_INSERTCOLUMNA ( -- n ) LVM_FIRST 27 + ; inline +: LVM_INSERTCOLUMNW ( -- n ) LVM_FIRST 97 + ; inline +: LVM_DELETECOLUMN ( -- n ) LVM_FIRST 28 + ; inline +: LVM_GETCOLUMNWIDTH ( -- n ) LVM_FIRST 29 + ; inline +: LVM_SETCOLUMNWIDTH ( -- n ) LVM_FIRST 30 + ; inline +: LVM_CREATEDRAGIMAGE ( -- n ) LVM_FIRST 33 + ; inline +: LVM_GETVIEWRECT ( -- n ) LVM_FIRST 34 + ; inline +: LVM_GETTEXTCOLOR ( -- n ) LVM_FIRST 35 + ; inline +: LVM_SETTEXTCOLOR ( -- n ) LVM_FIRST 36 + ; inline +: LVM_GETTEXTBKCOLOR ( -- n ) LVM_FIRST 37 + ; inline +: LVM_SETTEXTBKCOLOR ( -- n ) LVM_FIRST 38 + ; inline +: LVM_GETTOPINDEX ( -- n ) LVM_FIRST 39 + ; inline +: LVM_GETCOUNTPERPAGE ( -- n ) LVM_FIRST 40 + ; inline +: LVM_GETORIGIN ( -- n ) LVM_FIRST 41 + ; inline +: LVM_UPDATE ( -- n ) LVM_FIRST 42 + ; inline +: LVM_SETITEMSTATE ( -- n ) LVM_FIRST 43 + ; inline +: LVM_GETITEMSTATE ( -- n ) LVM_FIRST 44 + ; inline +: LVM_GETITEMTEXTA ( -- n ) LVM_FIRST 45 + ; inline +: LVM_GETITEMTEXTW ( -- n ) LVM_FIRST 115 + ; inline +: LVM_SETITEMTEXTA ( -- n ) LVM_FIRST 46 + ; inline +: LVM_SETITEMTEXTW ( -- n ) LVM_FIRST 116 + ; inline +: LVM_SETITEMCOUNT ( -- n ) LVM_FIRST 47 + ; inline +: LVM_SORTITEMS ( -- n ) LVM_FIRST 48 + ; inline +: LVM_SETITEMPOSITION32 ( -- n ) LVM_FIRST 49 + ; inline +: LVM_GETSELECTEDCOUNT ( -- n ) LVM_FIRST 50 + ; inline +: LVM_GETITEMSPACING ( -- n ) LVM_FIRST 51 + ; inline +: LVM_GETISEARCHSTRINGA ( -- n ) LVM_FIRST 52 + ; inline +: LVM_GETISEARCHSTRINGW ( -- n ) LVM_FIRST 117 + ; inline +: LVM_SETICONSPACING ( -- n ) LVM_FIRST 53 + ; inline +: LVM_SETEXTENDEDLISTVIEWSTYLE ( -- n ) LVM_FIRST 54 + ; inline +: LVM_GETEXTENDEDLISTVIEWSTYLE ( -- n ) LVM_FIRST 55 + ; inline +: LVM_GETSUBITEMRECT ( -- n ) LVM_FIRST 56 + ; inline +: LVM_SUBITEMHITTEST ( -- n ) LVM_FIRST 57 + ; inline +: LVM_SETCOLUMNORDERARRAY ( -- n ) LVM_FIRST 58 + ; inline +: LVM_GETCOLUMNORDERARRAY ( -- n ) LVM_FIRST 59 + ; inline +: LVM_SETHOTITEM ( -- n ) LVM_FIRST 60 + ; inline +: LVM_GETHOTITEM ( -- n ) LVM_FIRST 61 + ; inline +: LVM_SETHOTCURSOR ( -- n ) LVM_FIRST 62 + ; inline +: LVM_GETHOTCURSOR ( -- n ) LVM_FIRST 63 + ; inline +: LVM_APPROXIMATEVIEWRECT ( -- n ) LVM_FIRST 64 + ; inline +: LVM_SETWORKAREAS ( -- n ) LVM_FIRST 65 + ; inline +: LVM_GETWORKAREAS ( -- n ) LVM_FIRST 70 + ; inline +: LVM_GETNUMBEROFWORKAREAS ( -- n ) LVM_FIRST 73 + ; inline +: LVM_GETSELECTIONMARK ( -- n ) LVM_FIRST 66 + ; inline +: LVM_SETSELECTIONMARK ( -- n ) LVM_FIRST 67 + ; inline +: LVM_SETHOVERTIME ( -- n ) LVM_FIRST 71 + ; inline +: LVM_GETHOVERTIME ( -- n ) LVM_FIRST 72 + ; inline +: LVM_SETTOOLTIPS ( -- n ) LVM_FIRST 74 + ; inline +: LVM_GETTOOLTIPS ( -- n ) LVM_FIRST 78 + ; inline +: LVM_SORTITEMSEX ( -- n ) LVM_FIRST 81 + ; inline +: LVM_SETBKIMAGEA ( -- n ) LVM_FIRST 68 + ; inline +: LVM_SETBKIMAGEW ( -- n ) LVM_FIRST 138 + ; inline +: LVM_GETBKIMAGEA ( -- n ) LVM_FIRST 69 + ; inline +: LVM_GETBKIMAGEW ( -- n ) LVM_FIRST 139 + ; inline +: LVM_SETSELECTEDCOLUMN ( -- n ) LVM_FIRST 140 + ; inline +: LVM_SETTILEWIDTH ( -- n ) LVM_FIRST 141 + ; inline +: LVM_SETVIEW ( -- n ) LVM_FIRST 142 + ; inline +: LVM_GETVIEW ( -- n ) LVM_FIRST 143 + ; inline +: LVM_INSERTGROUP ( -- n ) LVM_FIRST 145 + ; inline +: LVM_SETGROUPINFO ( -- n ) LVM_FIRST 147 + ; inline +: LVM_GETGROUPINFO ( -- n ) LVM_FIRST 149 + ; inline +: LVM_REMOVEGROUP ( -- n ) LVM_FIRST 150 + ; inline +: LVM_MOVEGROUP ( -- n ) LVM_FIRST 151 + ; inline +: LVM_MOVEITEMTOGROUP ( -- n ) LVM_FIRST 154 + ; inline +: LVM_SETGROUPMETRICS ( -- n ) LVM_FIRST 155 + ; inline +: LVM_GETGROUPMETRICS ( -- n ) LVM_FIRST 156 + ; inline +: LVM_ENABLEGROUPVIEW ( -- n ) LVM_FIRST 157 + ; inline +: LVM_SORTGROUPS ( -- n ) LVM_FIRST 158 + ; inline +: LVM_INSERTGROUPSORTED ( -- n ) LVM_FIRST 159 + ; inline +: LVM_REMOVEALLGROUPS ( -- n ) LVM_FIRST 160 + ; inline +: LVM_HASGROUP ( -- n ) LVM_FIRST 161 + ; inline +: LVM_SETTILEVIEWINFO ( -- n ) LVM_FIRST 162 + ; inline +: LVM_GETTILEVIEWINFO ( -- n ) LVM_FIRST 163 + ; inline +: LVM_SETTILEINFO ( -- n ) LVM_FIRST 164 + ; inline +: LVM_GETTILEINFO ( -- n ) LVM_FIRST 165 + ; inline +: LVM_SETINSERTMARK ( -- n ) LVM_FIRST 166 + ; inline +: LVM_GETINSERTMARK ( -- n ) LVM_FIRST 167 + ; inline +: LVM_INSERTMARKHITTEST ( -- n ) LVM_FIRST 168 + ; inline +: LVM_GETINSERTMARKRECT ( -- n ) LVM_FIRST 169 + ; inline +: LVM_SETINSERTMARKCOLOR ( -- n ) LVM_FIRST 170 + ; inline +: LVM_GETINSERTMARKCOLOR ( -- n ) LVM_FIRST 171 + ; inline +: LVM_SETINFOTIP ( -- n ) LVM_FIRST 173 + ; inline +: LVM_GETSELECTEDCOLUMN ( -- n ) LVM_FIRST 174 + ; inline +: LVM_ISGROUPVIEWENABLED ( -- n ) LVM_FIRST 175 + ; inline +: LVM_GETOUTLINECOLOR ( -- n ) LVM_FIRST 176 + ; inline +: LVM_SETOUTLINECOLOR ( -- n ) LVM_FIRST 177 + ; inline +: LVM_CANCELEDITLABEL ( -- n ) LVM_FIRST 179 + ; inline +: LVM_MAPINDEXTOID ( -- n ) LVM_FIRST 180 + ; inline +: LVM_MAPIDTOINDEX ( -- n ) LVM_FIRST 181 + ; inline +: TVM_INSERTITEMA ( -- n ) TV_FIRST 0 + ; inline +: TVM_INSERTITEMW ( -- n ) TV_FIRST 50 + ; inline +: TVM_DELETEITEM ( -- n ) TV_FIRST 1 + ; inline +: TVM_EXPAND ( -- n ) TV_FIRST 2 + ; inline +: TVM_GETITEMRECT ( -- n ) TV_FIRST 4 + ; inline +: TVM_GETCOUNT ( -- n ) TV_FIRST 5 + ; inline +: TVM_GETINDENT ( -- n ) TV_FIRST 6 + ; inline +: TVM_SETINDENT ( -- n ) TV_FIRST 7 + ; inline +: TVM_GETIMAGELIST ( -- n ) TV_FIRST 8 + ; inline +: TVM_SETIMAGELIST ( -- n ) TV_FIRST 9 + ; inline +: TVM_GETNEXTITEM ( -- n ) TV_FIRST 10 + ; inline +: TVM_SELECTITEM ( -- n ) TV_FIRST 11 + ; inline +: TVM_GETITEMA ( -- n ) TV_FIRST 12 + ; inline +: TVM_GETITEMW ( -- n ) TV_FIRST 62 + ; inline +: TVM_SETITEMA ( -- n ) TV_FIRST 13 + ; inline +: TVM_SETITEMW ( -- n ) TV_FIRST 63 + ; inline +: TVM_EDITLABELA ( -- n ) TV_FIRST 14 + ; inline +: TVM_EDITLABELW ( -- n ) TV_FIRST 65 + ; inline +: TVM_GETEDITCONTROL ( -- n ) TV_FIRST 15 + ; inline +: TVM_GETVISIBLECOUNT ( -- n ) TV_FIRST 16 + ; inline +: TVM_HITTEST ( -- n ) TV_FIRST 17 + ; inline +: TVM_CREATEDRAGIMAGE ( -- n ) TV_FIRST 18 + ; inline +: TVM_SORTCHILDREN ( -- n ) TV_FIRST 19 + ; inline +: TVM_ENSUREVISIBLE ( -- n ) TV_FIRST 20 + ; inline +: TVM_SORTCHILDRENCB ( -- n ) TV_FIRST 21 + ; inline +: TVM_ENDEDITLABELNOW ( -- n ) TV_FIRST 22 + ; inline +: TVM_GETISEARCHSTRINGA ( -- n ) TV_FIRST 23 + ; inline +: TVM_GETISEARCHSTRINGW ( -- n ) TV_FIRST 64 + ; inline +: TVM_SETTOOLTIPS ( -- n ) TV_FIRST 24 + ; inline +: TVM_GETTOOLTIPS ( -- n ) TV_FIRST 25 + ; inline +: TVM_SETINSERTMARK ( -- n ) TV_FIRST 26 + ; inline +ALIAS: TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT +ALIAS: TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT +: TVM_SETITEMHEIGHT ( -- n ) TV_FIRST 27 + ; inline +: TVM_GETITEMHEIGHT ( -- n ) TV_FIRST 28 + ; inline +: TVM_SETBKCOLOR ( -- n ) TV_FIRST 29 + ; inline +: TVM_SETTEXTCOLOR ( -- n ) TV_FIRST 30 + ; inline +: TVM_GETBKCOLOR ( -- n ) TV_FIRST 31 + ; inline +: TVM_GETTEXTCOLOR ( -- n ) TV_FIRST 32 + ; inline +: TVM_SETSCROLLTIME ( -- n ) TV_FIRST 33 + ; inline +: TVM_GETSCROLLTIME ( -- n ) TV_FIRST 34 + ; inline +: TVM_SETINSERTMARKCOLOR ( -- n ) TV_FIRST 37 + ; inline +: TVM_GETINSERTMARKCOLOR ( -- n ) TV_FIRST 38 + ; inline +: TVM_GETITEMSTATE ( -- n ) TV_FIRST 39 + ; inline +: TVM_SETLINECOLOR ( -- n ) TV_FIRST 40 + ; inline +: TVM_GETLINECOLOR ( -- n ) TV_FIRST 41 + ; inline +: TVM_MAPACCIDTOHTREEITEM ( -- n ) TV_FIRST 42 + ; inline +: TVM_MAPHTREEITEMTOACCID ( -- n ) TV_FIRST 43 + ; inline +: CBEM_INSERTITEMA ( -- n ) WM_USER 1 + ; inline +: CBEM_SETIMAGELIST ( -- n ) WM_USER 2 + ; inline +: CBEM_GETIMAGELIST ( -- n ) WM_USER 3 + ; inline +: CBEM_GETITEMA ( -- n ) WM_USER 4 + ; inline +: CBEM_SETITEMA ( -- n ) WM_USER 5 + ; inline +ALIAS: CBEM_DELETEITEM CB_DELETESTRING +: CBEM_GETCOMBOCONTROL ( -- n ) WM_USER 6 + ; inline +: CBEM_GETEDITCONTROL ( -- n ) WM_USER 7 + ; inline +: CBEM_SETEXTENDEDSTYLE ( -- n ) WM_USER 14 + ; inline +: CBEM_GETEXTENDEDSTYLE ( -- n ) WM_USER 9 + ; inline +ALIAS: CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT +ALIAS: CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT +: CBEM_SETEXSTYLE ( -- n ) WM_USER 8 + ; inline +: CBEM_GETEXSTYLE ( -- n ) WM_USER 9 + ; inline +: CBEM_HASEDITCHANGED ( -- n ) WM_USER 10 + ; inline +: CBEM_INSERTITEMW ( -- n ) WM_USER 11 + ; inline +: CBEM_SETITEMW ( -- n ) WM_USER 12 + ; inline +: CBEM_GETITEMW ( -- n ) WM_USER 13 + ; inline +: TCM_GETIMAGELIST ( -- n ) TCM_FIRST 2 + ; inline +: TCM_SETIMAGELIST ( -- n ) TCM_FIRST 3 + ; inline +: TCM_GETITEMCOUNT ( -- n ) TCM_FIRST 4 + ; inline +: TCM_GETITEMA ( -- n ) TCM_FIRST 5 + ; inline +: TCM_GETITEMW ( -- n ) TCM_FIRST 60 + ; inline +: TCM_SETITEMA ( -- n ) TCM_FIRST 6 + ; inline +: TCM_SETITEMW ( -- n ) TCM_FIRST 61 + ; inline +: TCM_INSERTITEMA ( -- n ) TCM_FIRST 7 + ; inline +: TCM_INSERTITEMW ( -- n ) TCM_FIRST 62 + ; inline +: TCM_DELETEITEM ( -- n ) TCM_FIRST 8 + ; inline +: TCM_DELETEALLITEMS ( -- n ) TCM_FIRST 9 + ; inline +: TCM_GETITEMRECT ( -- n ) TCM_FIRST 10 + ; inline +: TCM_GETCURSEL ( -- n ) TCM_FIRST 11 + ; inline +: TCM_SETCURSEL ( -- n ) TCM_FIRST 12 + ; inline +: TCM_HITTEST ( -- n ) TCM_FIRST 13 + ; inline +: TCM_SETITEMEXTRA ( -- n ) TCM_FIRST 14 + ; inline +: TCM_ADJUSTRECT ( -- n ) TCM_FIRST 40 + ; inline +: TCM_SETITEMSIZE ( -- n ) TCM_FIRST 41 + ; inline +: TCM_REMOVEIMAGE ( -- n ) TCM_FIRST 42 + ; inline +: TCM_SETPADDING ( -- n ) TCM_FIRST 43 + ; inline +: TCM_GETROWCOUNT ( -- n ) TCM_FIRST 44 + ; inline +: TCM_GETTOOLTIPS ( -- n ) TCM_FIRST 45 + ; inline +: TCM_SETTOOLTIPS ( -- n ) TCM_FIRST 46 + ; inline +: TCM_GETCURFOCUS ( -- n ) TCM_FIRST 47 + ; inline +: TCM_SETCURFOCUS ( -- n ) TCM_FIRST 48 + ; inline +: TCM_SETMINTABWIDTH ( -- n ) TCM_FIRST 49 + ; inline +: TCM_DESELECTALL ( -- n ) TCM_FIRST 50 + ; inline +: TCM_HIGHLIGHTITEM ( -- n ) TCM_FIRST 51 + ; inline +: TCM_SETEXTENDEDSTYLE ( -- n ) TCM_FIRST 52 + ; inline +: TCM_GETEXTENDEDSTYLE ( -- n ) TCM_FIRST 53 + ; inline +ALIAS: TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT +ALIAS: TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT +: ACM_OPENA ( -- n ) WM_USER 100 + ; inline +: ACM_OPENW ( -- n ) WM_USER 103 + ; inline +: ACM_PLAY ( -- n ) WM_USER 101 + ; inline +: ACM_STOP ( -- n ) WM_USER 102 + ; inline +CONSTANT: MCM_FIRST HEX: 1000 +: MCM_GETCURSEL ( -- n ) MCM_FIRST 1 + ; inline +: MCM_SETCURSEL ( -- n ) MCM_FIRST 2 + ; inline +: MCM_GETMAXSELCOUNT ( -- n ) MCM_FIRST 3 + ; inline +: MCM_SETMAXSELCOUNT ( -- n ) MCM_FIRST 4 + ; inline +: MCM_GETSELRANGE ( -- n ) MCM_FIRST 5 + ; inline +: MCM_SETSELRANGE ( -- n ) MCM_FIRST 6 + ; inline +: MCM_GETMONTHRANGE ( -- n ) MCM_FIRST 7 + ; inline +: MCM_SETDAYSTATE ( -- n ) MCM_FIRST 8 + ; inline +: MCM_GETMINREQRECT ( -- n ) MCM_FIRST 9 + ; inline +: MCM_SETCOLOR ( -- n ) MCM_FIRST 10 + ; inline +: MCM_GETCOLOR ( -- n ) MCM_FIRST 11 + ; inline +: MCM_SETTODAY ( -- n ) MCM_FIRST 12 + ; inline +: MCM_GETTODAY ( -- n ) MCM_FIRST 13 + ; inline +: MCM_HITTEST ( -- n ) MCM_FIRST 14 + ; inline +: MCM_SETFIRSTDAYOFWEEK ( -- n ) MCM_FIRST 15 + ; inline +: MCM_GETFIRSTDAYOFWEEK ( -- n ) MCM_FIRST 16 + ; inline +: MCM_GETRANGE ( -- n ) MCM_FIRST 17 + ; inline +: MCM_SETRANGE ( -- n ) MCM_FIRST 18 + ; inline +: MCM_GETMONTHDELTA ( -- n ) MCM_FIRST 19 + ; inline +: MCM_SETMONTHDELTA ( -- n ) MCM_FIRST 20 + ; inline +: MCM_GETMAXTODAYWIDTH ( -- n ) MCM_FIRST 21 + ; inline +ALIAS: MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT +ALIAS: MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT +CONSTANT: DTM_FIRST HEX: 1000 +: DTM_GETSYSTEMTIME ( -- n ) DTM_FIRST 1 + ; inline +: DTM_SETSYSTEMTIME ( -- n ) DTM_FIRST 2 + ; inline +: DTM_GETRANGE ( -- n ) DTM_FIRST 3 + ; inline +: DTM_SETRANGE ( -- n ) DTM_FIRST 4 + ; inline +: DTM_SETFORMATA ( -- n ) DTM_FIRST 5 + ; inline +: DTM_SETFORMATW ( -- n ) DTM_FIRST 50 + ; inline +: DTM_SETMCCOLOR ( -- n ) DTM_FIRST 6 + ; inline +: DTM_GETMCCOLOR ( -- n ) DTM_FIRST 7 + ; inline +: DTM_GETMONTHCAL ( -- n ) DTM_FIRST 8 + ; inline +: DTM_SETMCFONT ( -- n ) DTM_FIRST 9 + ; inline +: DTM_GETMCFONT ( -- n ) DTM_FIRST 10 + ; inline +: PGM_SETCHILD ( -- n ) PGM_FIRST 1 + ; inline +: PGM_RECALCSIZE ( -- n ) PGM_FIRST 2 + ; inline +: PGM_FORWARDMOUSE ( -- n ) PGM_FIRST 3 + ; inline +: PGM_SETBKCOLOR ( -- n ) PGM_FIRST 4 + ; inline +: PGM_GETBKCOLOR ( -- n ) PGM_FIRST 5 + ; inline +: PGM_SETBORDER ( -- n ) PGM_FIRST 6 + ; inline +: PGM_GETBORDER ( -- n ) PGM_FIRST 7 + ; inline +: PGM_SETPOS ( -- n ) PGM_FIRST 8 + ; inline +: PGM_GETPOS ( -- n ) PGM_FIRST 9 + ; inline +: PGM_SETBUTTONSIZE ( -- n ) PGM_FIRST 10 + ; inline +: PGM_GETBUTTONSIZE ( -- n ) PGM_FIRST 11 + ; inline +: PGM_GETBUTTONSTATE ( -- n ) PGM_FIRST 12 + ; inline +CONSTANT: PGM_GETDROPTARGET CCM_GETDROPTARGET +: BCM_GETIDEALSIZE ( -- n ) BCM_FIRST 1 + ; inline +: BCM_SETIMAGELIST ( -- n ) BCM_FIRST 2 + ; inline +: BCM_GETIMAGELIST ( -- n ) BCM_FIRST 3 + ; inline +: BCM_SETTEXTMARGIN ( -- n ) BCM_FIRST 4 + ; inline +: BCM_GETTEXTMARGIN ( -- n ) BCM_FIRST 5 + ; inline +: EM_SETCUEBANNER ( -- n ) ECM_FIRST 1 + ; inline +: EM_GETCUEBANNER ( -- n ) ECM_FIRST 2 + ; inline +: EM_SHOWBALLOONTIP ( -- n ) ECM_FIRST 3 + ; inline +: EM_HIDEBALLOONTIP ( -- n ) ECM_FIRST 4 + ; inline +: CB_SETMINVISIBLE ( -- n ) CBM_FIRST 1 + ; inline +: CB_GETMINVISIBLE ( -- n ) CBM_FIRST 2 + ; inline +: LM_HITTEST ( -- n ) WM_USER HEX: 0300 + ; inline +: LM_GETIDEALHEIGHT ( -- n ) WM_USER HEX: 0301 + ; inline +: LM_SETITEM ( -- n ) WM_USER HEX: 0302 + ; inline +: LM_GETITEM ( -- n ) WM_USER HEX: 0303 + ; inline -: WA_INACTIVE 0 ; inline -: WA_ACTIVE 1 ; inline -: WA_CLICKACTIVE 2 ; inline -: SC_SIZE HEX: f000 ; inline -: SC_MOVE HEX: f010 ; inline -: SC_MINIMIZE HEX: f020 ; inline -: SC_MAXIMIZE HEX: f030 ; inline -: SC_NEXTWINDOW HEX: f040 ; inline -: SC_PREVWINDOW HEX: f050 ; inline -: SC_CLOSE HEX: f060 ; inline -: SC_VSCROLL HEX: f070 ; inline -: SC_HSCROLL HEX: f080 ; inline -: SC_MOUSEMENU HEX: f090 ; inline -: SC_KEYMENU HEX: f100 ; inline -: SC_ARRANGE HEX: f110 ; inline -: SC_RESTORE HEX: f120 ; inline -: SC_TASKLIST HEX: f130 ; inline -: SC_SCREENSAVE HEX: f140 ; inline -: SC_HOTKEY HEX: f150 ; inline +CONSTANT: WA_INACTIVE 0 +CONSTANT: WA_ACTIVE 1 +CONSTANT: WA_CLICKACTIVE 2 + +CONSTANT: SC_SIZE HEX: f000 +CONSTANT: SC_MOVE HEX: f010 +CONSTANT: SC_MINIMIZE HEX: f020 +CONSTANT: SC_MAXIMIZE HEX: f030 +CONSTANT: SC_NEXTWINDOW HEX: f040 +CONSTANT: SC_PREVWINDOW HEX: f050 +CONSTANT: SC_CLOSE HEX: f060 +CONSTANT: SC_VSCROLL HEX: f070 +CONSTANT: SC_HSCROLL HEX: f080 +CONSTANT: SC_MOUSEMENU HEX: f090 +CONSTANT: SC_KEYMENU HEX: f100 +CONSTANT: SC_ARRANGE HEX: f110 +CONSTANT: SC_RESTORE HEX: f120 +CONSTANT: SC_TASKLIST HEX: f130 +CONSTANT: SC_SCREENSAVE HEX: f140 +CONSTANT: SC_HOTKEY HEX: f150 From c073a8b4f506df6df77672beeb4d6effa32d59c2 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 15 Dec 2008 22:49:35 -0600 Subject: [PATCH 33/58] Fix more compile errors --- basis/csv/csv.factor | 2 +- extra/benchmark/mandel/colors/colors.factor | 2 +- extra/opengl/demo-support/demo-support.factor | 2 +- extra/project-euler/215/215.factor | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/basis/csv/csv.factor b/basis/csv/csv.factor index 133223b6e4..483a5825a9 100644 --- a/basis/csv/csv.factor +++ b/basis/csv/csv.factor @@ -12,7 +12,7 @@ SYMBOL: delimiter CHAR: , delimiter set-global -: delimiter> delimiter get ; inline +: delimiter> ( -- delimiter ) delimiter get ; inline DEFER: quoted-field ( -- endchar ) diff --git a/extra/benchmark/mandel/colors/colors.factor b/extra/benchmark/mandel/colors/colors.factor index 218f566eda..edc848a0ca 100644 --- a/extra/benchmark/mandel/colors/colors.factor +++ b/extra/benchmark/mandel/colors/colors.factor @@ -2,7 +2,7 @@ USING: math math.order kernel arrays byte-arrays sequences colors.hsv benchmark.mandel.params accessors colors ; IN: benchmark.mandel.colors -: scale 255 * >fixnum ; inline +: scale ( x -- y ) 255 * >fixnum ; inline : scale-rgb ( rgba -- n ) [ red>> scale ] [ green>> scale ] [ blue>> scale ] tri 3byte-array ; diff --git a/extra/opengl/demo-support/demo-support.factor b/extra/opengl/demo-support/demo-support.factor index 92778194e3..c1b656b6c8 100755 --- a/extra/opengl/demo-support/demo-support.factor +++ b/extra/opengl/demo-support/demo-support.factor @@ -3,7 +3,7 @@ namespaces opengl opengl.gl sequences ui ui.gadgets ui.gestures ui.render accessors combinators ; IN: opengl.demo-support -: FOV 2.0 sqrt 1+ ; inline +: FOV ( -- x ) 2.0 sqrt 1+ ; inline : MOUSE-MOTION-SCALE 0.5 ; inline : KEY-ROTATE-STEP 10.0 ; inline diff --git a/extra/project-euler/215/215.factor b/extra/project-euler/215/215.factor index 82d6a31c66..297fb69de3 100644 --- a/extra/project-euler/215/215.factor +++ b/extra/project-euler/215/215.factor @@ -33,8 +33,8 @@ TUPLE: end { ways integer } ; C: block C: end -: 0 ; inline -: 1 ; inline +: ( -- end ) 0 ; inline +: ( -- end ) 1 ; inline : failure? ( t -- ? ) ways>> 0 = ; inline From 732f726c963f956f6021c4beb8218d5b06948cd2 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 15 Dec 2008 22:49:47 -0600 Subject: [PATCH 34/58] Help lint no longer flags symbols as having violations --- basis/help/lint/lint.factor | 1 + 1 file changed, 1 insertion(+) diff --git a/basis/help/lint/lint.factor b/basis/help/lint/lint.factor index fbebc7f0f6..f6ed13b3fa 100644 --- a/basis/help/lint/lint.factor +++ b/basis/help/lint/lint.factor @@ -45,6 +45,7 @@ IN: help.lint { [ drop "declared-effect" word-prop not ] [ nip contains-funky-elements? ] + [ drop symbol? ] [ drop macro? ] [ [ effect-values >array ] From ba547ffb984fc0cb29f8880c8af759474e2836bd Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Tue, 16 Dec 2008 00:38:34 -0600 Subject: [PATCH 35/58] bubble-chamber: Add quark-chamber --- extra/bubble-chamber/bubble-chamber.factor | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extra/bubble-chamber/bubble-chamber.factor b/extra/bubble-chamber/bubble-chamber.factor index 7fe80ba138..76f9f6070e 100644 --- a/extra/bubble-chamber/bubble-chamber.factor +++ b/extra/bubble-chamber/bubble-chamber.factor @@ -550,6 +550,14 @@ M:: update-frame-buffer ( BUBBLE-CHAMBER -- ) ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +: quark-chamber ( -- ) + bubble-chamber-window + 100 [ quark add-particle ] times + big-bang + drop ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + : small ( -- ) new-gadget { 200 200 } >>size From f01331312c353b5206dd2d086707bc4cbbb2ffea Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Tue, 16 Dec 2008 00:41:00 -0600 Subject: [PATCH 36/58] Add 'bubble-chamber.quark-chamber' runnable demo --- extra/bubble-chamber/quark-chamber/quark-chamber.factor | 8 ++++++++ extra/bubble-chamber/quark-chamber/tags.txt | 1 + 2 files changed, 9 insertions(+) create mode 100644 extra/bubble-chamber/quark-chamber/quark-chamber.factor create mode 100644 extra/bubble-chamber/quark-chamber/tags.txt diff --git a/extra/bubble-chamber/quark-chamber/quark-chamber.factor b/extra/bubble-chamber/quark-chamber/quark-chamber.factor new file mode 100644 index 0000000000..99aa97b351 --- /dev/null +++ b/extra/bubble-chamber/quark-chamber/quark-chamber.factor @@ -0,0 +1,8 @@ + +USING: ui bubble-chamber ; + +IN: bubble-chamber.quark-chamber + +: main ( -- ) [ quark-chamber ] with-ui ; + +MAIN: main \ No newline at end of file diff --git a/extra/bubble-chamber/quark-chamber/tags.txt b/extra/bubble-chamber/quark-chamber/tags.txt new file mode 100644 index 0000000000..cb5fc203e1 --- /dev/null +++ b/extra/bubble-chamber/quark-chamber/tags.txt @@ -0,0 +1 @@ +demos From 034022ec7fb7007babafc44bb59f88b25cfc2e25 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 16 Dec 2008 00:43:32 -0600 Subject: [PATCH 37/58] Add meta-data --- basis/io/directories/unix/tags.txt | 1 + basis/io/files/info/unix/tags.txt | 1 + basis/io/files/links/unix/tags.txt | 1 + 3 files changed, 3 insertions(+) create mode 100644 basis/io/directories/unix/tags.txt create mode 100644 basis/io/files/info/unix/tags.txt create mode 100644 basis/io/files/links/unix/tags.txt diff --git a/basis/io/directories/unix/tags.txt b/basis/io/directories/unix/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/directories/unix/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/basis/io/files/info/unix/tags.txt b/basis/io/files/info/unix/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/files/info/unix/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/basis/io/files/links/unix/tags.txt b/basis/io/files/links/unix/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/io/files/links/unix/tags.txt @@ -0,0 +1 @@ +unportable From 63fda570bffde14589794c8dd18f480ff4e604f7 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 16 Dec 2008 01:12:36 -0600 Subject: [PATCH 38/58] Fixing assorted compile errors and help lint warnings --- basis/channels/remote/remote-docs.factor | 1 + basis/checksums/openssl/openssl-docs.factor | 2 +- basis/http/server/server-docs.factor | 2 +- basis/io/files/windows/nt/nt-tests.factor | 2 +- basis/io/launcher/windows/nt/nt-tests.factor | 3 +- basis/io/streams/duplex/duplex-docs.factor | 2 +- basis/math/intervals/intervals.factor | 2 +- basis/ui/gadgets/panes/panes-docs.factor | 2 +- basis/unix/bsd/bsd.factor | 65 ++-- basis/unix/bsd/freebsd/freebsd.factor | 190 +++++------ basis/unix/bsd/macosx/macosx.factor | 224 ++++++------ basis/unix/bsd/netbsd/netbsd.factor | 208 ++++++------ basis/unix/bsd/openbsd/openbsd.factor | 182 +++++----- basis/unix/getfsstat/freebsd/freebsd.factor | 10 +- basis/unix/getfsstat/macosx/macosx.factor | 6 +- basis/unix/getfsstat/netbsd/netbsd.factor | 8 +- basis/unix/getfsstat/openbsd/openbsd.factor | 8 +- basis/unix/kqueue/freebsd/freebsd.factor | 20 +- basis/unix/kqueue/macosx/macosx.factor | 20 +- basis/unix/kqueue/netbsd/netbsd.factor | 18 +- basis/unix/kqueue/openbsd/openbsd.factor | 16 +- basis/unix/linux/epoll/epoll.factor | 30 +- basis/unix/linux/inotify/inotify.factor | 42 +-- basis/unix/linux/linux.factor | 339 ++++++++++--------- basis/unix/process/process.factor | 30 +- basis/unix/solaris/solaris.factor | 58 ++-- basis/unix/stat/netbsd/32/32.factor | 4 +- basis/unix/stat/netbsd/64/64.factor | 4 +- basis/unix/stat/stat.factor | 18 +- basis/unix/statfs/freebsd/freebsd.factor | 6 +- basis/unix/statfs/openbsd/openbsd.factor | 4 +- basis/unix/statvfs/freebsd/freebsd.factor | 6 +- basis/unix/statvfs/linux/linux.factor | 20 +- basis/unix/statvfs/macosx/macosx.factor | 6 +- basis/unix/statvfs/netbsd/netbsd.factor | 36 +- basis/unix/statvfs/openbsd/openbsd.factor | 6 +- basis/unix/unix.factor | 2 +- basis/unix/utmpx/utmpx.factor | 24 +- basis/windows/ole32/ole32.factor | 2 +- basis/xml-rpc/xml-rpc-docs.factor | 6 +- basis/xml/xml-docs.factor | 4 +- core/continuations/continuations-docs.factor | 4 - core/io/streams/c/c-docs.factor | 4 +- core/sequences/sequences-docs.factor | 4 + core/sequences/sequences.factor | 8 +- core/words/words-docs.factor | 2 +- extra/assoc-heaps/assoc-heaps-docs.factor | 8 +- 47 files changed, 835 insertions(+), 833 deletions(-) diff --git a/basis/channels/remote/remote-docs.factor b/basis/channels/remote/remote-docs.factor index 862084e1d9..309f764d2d 100644 --- a/basis/channels/remote/remote-docs.factor +++ b/basis/channels/remote/remote-docs.factor @@ -6,6 +6,7 @@ IN: channels.remote HELP: { $values { "node" "a node object" } { "id" "the id of the published channel on the node" } + { "remote-channel" remote-channel } } { $description "Create a remote channel that acts as a proxy for a " "channel on another node. The remote node's channel must have been " diff --git a/basis/checksums/openssl/openssl-docs.factor b/basis/checksums/openssl/openssl-docs.factor index fafe9386d6..750e05f3c8 100644 --- a/basis/checksums/openssl/openssl-docs.factor +++ b/basis/checksums/openssl/openssl-docs.factor @@ -5,7 +5,7 @@ HELP: openssl-checksum { $class-description "The class of checksum algorithms implemented by OpenSSL. The exact set of algorithms supported depends on how the OpenSSL library was compiled; " { $snippet "md5" } " and " { $snippet "sha1" } " should be universally available." } ; HELP: -{ $values { "name" "an EVP message digest name" } { "checksum" openssl-checksum } } +{ $values { "name" "an EVP message digest name" } { "openssl-checksum" openssl-checksum } } { $description "Creates a new OpenSSL checksum object." } ; HELP: openssl-md5 diff --git a/basis/http/server/server-docs.factor b/basis/http/server/server-docs.factor index 18e1ab1323..29f61416fa 100644 --- a/basis/http/server/server-docs.factor +++ b/basis/http/server/server-docs.factor @@ -5,7 +5,7 @@ HELP: trivial-responder { $description "The class of trivial responders, which output the same response for every request. New instances are created by calling " { $link } "." } ; HELP: -{ $values { "response" response } { "responder" trivial-responder } } +{ $values { "response" response } { "trivial-responder" trivial-responder } } { $description "Creates a new trivial responder which outputs the same response for every request." } ; HELP: benchmark? diff --git a/basis/io/files/windows/nt/nt-tests.factor b/basis/io/files/windows/nt/nt-tests.factor index 727f72c808..e934dc8cd2 100644 --- a/basis/io/files/windows/nt/nt-tests.factor +++ b/basis/io/files/windows/nt/nt-tests.factor @@ -1,4 +1,4 @@ -USING: io.files kernel tools.test io.backend +USING: io.files io.pathnames kernel tools.test io.backend io.files.windows.nt splitting sequences ; IN: io.files.windows.nt.tests diff --git a/basis/io/launcher/windows/nt/nt-tests.factor b/basis/io/launcher/windows/nt/nt-tests.factor index 2cdb7d5f89..62fe45dc7f 100644 --- a/basis/io/launcher/windows/nt/nt-tests.factor +++ b/basis/io/launcher/windows/nt/nt-tests.factor @@ -1,6 +1,7 @@ USING: io.launcher tools.test calendar accessors environment namespaces kernel system arrays io io.files io.encodings.ascii -sequences parser assocs hashtables math continuations eval ; +sequences parser assocs hashtables math continuations eval +io.files.temp io.directories io.pathnames ; IN: io.launcher.windows.nt.tests [ ] [ diff --git a/basis/io/streams/duplex/duplex-docs.factor b/basis/io/streams/duplex/duplex-docs.factor index ca4f424fb6..48afafeec7 100644 --- a/basis/io/streams/duplex/duplex-docs.factor +++ b/basis/io/streams/duplex/duplex-docs.factor @@ -15,7 +15,7 @@ HELP: duplex-stream { $class-description "A bidirectional stream wrapping an input and output stream." } ; HELP: -{ $values { "in" "an input stream" } { "out" "an output stream" } { "stream" " a duplex stream" } } +{ $values { "in" "an input stream" } { "out" "an output stream" } { "duplex-stream" duplex-stream } } { $description "Creates a duplex stream. Writing to a duplex stream will write to " { $snippet "out" } ", and reading from a duplex stream will read from " { $snippet "in" } ". Closing a duplex stream closes both the input and output streams." } ; HELP: with-stream diff --git a/basis/math/intervals/intervals.factor b/basis/math/intervals/intervals.factor index ed76ccaedd..86c3b0de0b 100644 --- a/basis/math/intervals/intervals.factor +++ b/basis/math/intervals/intervals.factor @@ -11,7 +11,7 @@ SYMBOL: full-interval TUPLE: interval { from read-only } { to read-only } ; -: ( from to -- int ) +: ( from to -- interval ) 2dup [ first ] bi@ { { [ 2dup > ] [ 2drop 2drop empty-interval ] } { [ 2dup = ] [ diff --git a/basis/ui/gadgets/panes/panes-docs.factor b/basis/ui/gadgets/panes/panes-docs.factor index cad4937572..23dc99da82 100644 --- a/basis/ui/gadgets/panes/panes-docs.factor +++ b/basis/ui/gadgets/panes/panes-docs.factor @@ -50,7 +50,7 @@ HELP: pane-stream { $class-description "Pane streams implement the portion of the " { $link "stream-protocol" } " responsible for output of text, including full support for " { $link "styles" } ". Pane streams also support direct output of gadgets via " { $link write-gadget } " and " { $link print-gadget } ". Pane streams are created by calling " { $link } "." } ; HELP: -{ $values { "pane" pane } { "stream" "a new " { $link pane-stream } } } +{ $values { "pane" pane } { "pane-stream" "a new " { $link pane-stream } } } { $description "Creates a new " { $link pane-stream } " for writing to " { $snippet "pane" } "." } ; { with-pane make-pane } related-words diff --git a/basis/unix/bsd/bsd.factor b/basis/unix/bsd/bsd.factor index 761b1d14e3..42f2a07e62 100644 --- a/basis/unix/bsd/bsd.factor +++ b/basis/unix/bsd/bsd.factor @@ -1,30 +1,31 @@ ! Copyright (C) 2005, 2006 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax combinators system vocabs.loader alias ; +USING: alien.syntax combinators system vocabs.loader alias +constants ; IN: unix -: MAXPATHLEN 1024 ; inline +CONSTANT: MAXPATHLEN 1024 -: O_RDONLY HEX: 0000 ; inline -: O_WRONLY HEX: 0001 ; inline -: O_RDWR HEX: 0002 ; inline -: O_NONBLOCK HEX: 0004 ; inline -: O_APPEND HEX: 0008 ; inline -: O_CREAT HEX: 0200 ; inline -: O_TRUNC HEX: 0400 ; inline -: O_EXCL HEX: 0800 ; inline -: O_NOCTTY HEX: 20000 ; inline +CONSTANT: O_RDONLY HEX: 0000 +CONSTANT: O_WRONLY HEX: 0001 +CONSTANT: O_RDWR HEX: 0002 +CONSTANT: O_NONBLOCK HEX: 0004 +CONSTANT: O_APPEND HEX: 0008 +CONSTANT: O_CREAT HEX: 0200 +CONSTANT: O_TRUNC HEX: 0400 +CONSTANT: O_EXCL HEX: 0800 +CONSTANT: O_NOCTTY HEX: 20000 ALIAS: O_NDELAY O_NONBLOCK -: SOL_SOCKET HEX: ffff ; inline -: SO_REUSEADDR HEX: 4 ; inline -: SO_OOBINLINE HEX: 100 ; inline -: SO_SNDTIMEO HEX: 1005 ; inline -: SO_RCVTIMEO HEX: 1006 ; inline +CONSTANT: SOL_SOCKET HEX: ffff +CONSTANT: SO_REUSEADDR HEX: 4 +CONSTANT: SO_OOBINLINE HEX: 100 +CONSTANT: SO_SNDTIMEO HEX: 1005 +CONSTANT: SO_RCVTIMEO HEX: 1006 -: F_SETFD 2 ; inline -: F_SETFL 4 ; inline -: FD_CLOEXEC 1 ; inline +CONSTANT: F_SETFD 2 +CONSTANT: F_SETFL 4 +CONSTANT: FD_CLOEXEC 1 C-STRUCT: sockaddr-in { "uchar" "len" } @@ -59,29 +60,29 @@ C-STRUCT: passwd { "time_t" "pw_expire" } { "int" "pw_fields" } ; -: max-un-path 104 ; inline +CONSTANT: max-un-path 104 -: SOCK_STREAM 1 ; inline -: SOCK_DGRAM 2 ; inline +CONSTANT: SOCK_STREAM 1 +CONSTANT: SOCK_DGRAM 2 -: AF_UNSPEC 0 ; inline -: AF_UNIX 1 ; inline -: AF_INET 2 ; inline -: AF_INET6 30 ; inline +CONSTANT: AF_UNSPEC 0 +CONSTANT: AF_UNIX 1 +CONSTANT: AF_INET 2 +CONSTANT: AF_INET6 30 ALIAS: PF_UNSPEC AF_UNSPEC ALIAS: PF_UNIX AF_UNIX ALIAS: PF_INET AF_INET ALIAS: PF_INET6 AF_INET6 -: IPPROTO_TCP 6 ; inline -: IPPROTO_UDP 17 ; inline +CONSTANT: IPPROTO_TCP 6 +CONSTANT: IPPROTO_UDP 17 -: AI_PASSIVE 1 ; inline +CONSTANT: AI_PASSIVE 1 -: SEEK_SET 0 ; inline -: SEEK_CUR 1 ; inline -: SEEK_END 2 ; inline +CONSTANT: SEEK_SET 0 +CONSTANT: SEEK_CUR 1 +CONSTANT: SEEK_END 2 os { { macosx [ "unix.bsd.macosx" require ] } diff --git a/basis/unix/bsd/freebsd/freebsd.factor b/basis/unix/bsd/freebsd/freebsd.factor index 81885ff141..d58cfbb90d 100644 --- a/basis/unix/bsd/freebsd/freebsd.factor +++ b/basis/unix/bsd/freebsd/freebsd.factor @@ -1,4 +1,4 @@ -USING: alien.syntax ; +USING: alien.syntax alias constants ; IN: unix : FD_SETSIZE 1024 ; @@ -20,97 +20,97 @@ C-STRUCT: dirent { "u_int8_t" "d_namlen" } { { "char" 256 } "d_name" } ; -: EPERM 1 ; inline -: ENOENT 2 ; inline -: ESRCH 3 ; inline -: EINTR 4 ; inline -: EIO 5 ; inline -: ENXIO 6 ; inline -: E2BIG 7 ; inline -: ENOEXEC 8 ; inline -: EBADF 9 ; inline -: ECHILD 10 ; inline -: EDEADLK 11 ; inline -: ENOMEM 12 ; inline -: EACCES 13 ; inline -: EFAULT 14 ; inline -: ENOTBLK 15 ; inline -: EBUSY 16 ; inline -: EEXIST 17 ; inline -: EXDEV 18 ; inline -: ENODEV 19 ; inline -: ENOTDIR 20 ; inline -: EISDIR 21 ; inline -: EINVAL 22 ; inline -: ENFILE 23 ; inline -: EMFILE 24 ; inline -: ENOTTY 25 ; inline -: ETXTBSY 26 ; inline -: EFBIG 27 ; inline -: ENOSPC 28 ; inline -: ESPIPE 29 ; inline -: EROFS 30 ; inline -: EMLINK 31 ; inline -: EPIPE 32 ; inline -: EDOM 33 ; inline -: ERANGE 34 ; inline -: EAGAIN 35 ; inline -: EWOULDBLOCK EAGAIN ; inline -: EINPROGRESS 36 ; inline -: EALREADY 37 ; inline -: ENOTSOCK 38 ; inline -: EDESTADDRREQ 39 ; inline -: EMSGSIZE 40 ; inline -: EPROTOTYPE 41 ; inline -: ENOPROTOOPT 42 ; inline -: EPROTONOSUPPORT 43 ; inline -: ESOCKTNOSUPPORT 44 ; inline -: EOPNOTSUPP 45 ; inline -: ENOTSUP EOPNOTSUPP ; inline -: EPFNOSUPPORT 46 ; inline -: EAFNOSUPPORT 47 ; inline -: EADDRINUSE 48 ; inline -: EADDRNOTAVAIL 49 ; inline -: ENETDOWN 50 ; inline -: ENETUNREACH 51 ; inline -: ENETRESET 52 ; inline -: ECONNABORTED 53 ; inline -: ECONNRESET 54 ; inline -: ENOBUFS 55 ; inline -: EISCONN 56 ; inline -: ENOTCONN 57 ; inline -: ESHUTDOWN 58 ; inline -: ETOOMANYREFS 59 ; inline -: ETIMEDOUT 60 ; inline -: ECONNREFUSED 61 ; inline -: ELOOP 62 ; inline -: ENAMETOOLONG 63 ; inline -: EHOSTDOWN 64 ; inline -: EHOSTUNREACH 65 ; inline -: ENOTEMPTY 66 ; inline -: EPROCLIM 67 ; inline -: EUSERS 68 ; inline -: EDQUOT 69 ; inline -: ESTALE 70 ; inline -: EREMOTE 71 ; inline -: EBADRPC 72 ; inline -: ERPCMISMATCH 73 ; inline -: EPROGUNAVAIL 74 ; inline -: EPROGMISMATCH 75 ; inline -: EPROCUNAVAIL 76 ; inline -: ENOLCK 77 ; inline -: ENOSYS 78 ; inline -: EFTYPE 79 ; inline -: EAUTH 80 ; inline -: ENEEDAUTH 81 ; inline -: EIDRM 82 ; inline -: ENOMSG 83 ; inline -: EOVERFLOW 84 ; inline -: ECANCELED 85 ; inline -: EILSEQ 86 ; inline -: ENOATTR 87 ; inline -: EDOOFUS 88 ; inline -: EBADMSG 89 ; inline -: EMULTIHOP 90 ; inline -: ENOLINK 91 ; inline -: EPROTO 92 ; inline +CONSTANT: EPERM 1 +CONSTANT: ENOENT 2 +CONSTANT: ESRCH 3 +CONSTANT: EINTR 4 +CONSTANT: EIO 5 +CONSTANT: ENXIO 6 +CONSTANT: E2BIG 7 +CONSTANT: ENOEXEC 8 +CONSTANT: EBADF 9 +CONSTANT: ECHILD 10 +CONSTANT: EDEADLK 11 +CONSTANT: ENOMEM 12 +CONSTANT: EACCES 13 +CONSTANT: EFAULT 14 +CONSTANT: ENOTBLK 15 +CONSTANT: EBUSY 16 +CONSTANT: EEXIST 17 +CONSTANT: EXDEV 18 +CONSTANT: ENODEV 19 +CONSTANT: ENOTDIR 20 +CONSTANT: EISDIR 21 +CONSTANT: EINVAL 22 +CONSTANT: ENFILE 23 +CONSTANT: EMFILE 24 +CONSTANT: ENOTTY 25 +CONSTANT: ETXTBSY 26 +CONSTANT: EFBIG 27 +CONSTANT: ENOSPC 28 +CONSTANT: ESPIPE 29 +CONSTANT: EROFS 30 +CONSTANT: EMLINK 31 +CONSTANT: EPIPE 32 +CONSTANT: EDOM 33 +CONSTANT: ERANGE 34 +CONSTANT: EAGAIN 35 +ALIAS: EWOULDBLOCK EAGAIN +CONSTANT: EINPROGRESS 36 +CONSTANT: EALREADY 37 +CONSTANT: ENOTSOCK 38 +CONSTANT: EDESTADDRREQ 39 +CONSTANT: EMSGSIZE 40 +CONSTANT: EPROTOTYPE 41 +CONSTANT: ENOPROTOOPT 42 +CONSTANT: EPROTONOSUPPORT 43 +CONSTANT: ESOCKTNOSUPPORT 44 +CONSTANT: EOPNOTSUPP 45 +ALIAS: ENOTSUP EOPNOTSUPP +CONSTANT: EPFNOSUPPORT 46 +CONSTANT: EAFNOSUPPORT 47 +CONSTANT: EADDRINUSE 48 +CONSTANT: EADDRNOTAVAIL 49 +CONSTANT: ENETDOWN 50 +CONSTANT: ENETUNREACH 51 +CONSTANT: ENETRESET 52 +CONSTANT: ECONNABORTED 53 +CONSTANT: ECONNRESET 54 +CONSTANT: ENOBUFS 55 +CONSTANT: EISCONN 56 +CONSTANT: ENOTCONN 57 +CONSTANT: ESHUTDOWN 58 +CONSTANT: ETOOMANYREFS 59 +CONSTANT: ETIMEDOUT 60 +CONSTANT: ECONNREFUSED 61 +CONSTANT: ELOOP 62 +CONSTANT: ENAMETOOLONG 63 +CONSTANT: EHOSTDOWN 64 +CONSTANT: EHOSTUNREACH 65 +CONSTANT: ENOTEMPTY 66 +CONSTANT: EPROCLIM 67 +CONSTANT: EUSERS 68 +CONSTANT: EDQUOT 69 +CONSTANT: ESTALE 70 +CONSTANT: EREMOTE 71 +CONSTANT: EBADRPC 72 +CONSTANT: ERPCMISMATCH 73 +CONSTANT: EPROGUNAVAIL 74 +CONSTANT: EPROGMISMATCH 75 +CONSTANT: EPROCUNAVAIL 76 +CONSTANT: ENOLCK 77 +CONSTANT: ENOSYS 78 +CONSTANT: EFTYPE 79 +CONSTANT: EAUTH 80 +CONSTANT: ENEEDAUTH 81 +CONSTANT: EIDRM 82 +CONSTANT: ENOMSG 83 +CONSTANT: EOVERFLOW 84 +CONSTANT: ECANCELED 85 +CONSTANT: EILSEQ 86 +CONSTANT: ENOATTR 87 +CONSTANT: EDOOFUS 88 +CONSTANT: EBADMSG 89 +CONSTANT: EMULTIHOP 90 +CONSTANT: ENOLINK 91 +CONSTANT: EPROTO 92 diff --git a/basis/unix/bsd/macosx/macosx.factor b/basis/unix/bsd/macosx/macosx.factor index 6cb086b11b..f38707b456 100644 --- a/basis/unix/bsd/macosx/macosx.factor +++ b/basis/unix/bsd/macosx/macosx.factor @@ -1,7 +1,7 @@ -USING: alien.syntax unix.time alias ; +USING: alien.syntax unix.time alias constants ; IN: unix -: FD_SETSIZE 1024 ; inline +CONSTANT: FD_SETSIZE 1024 C-STRUCT: addrinfo { "int" "flags" } @@ -13,10 +13,10 @@ C-STRUCT: addrinfo { "void*" "addr" } { "addrinfo*" "next" } ; -: _UTX_USERSIZE 256 ; inline -: _UTX_LINESIZE 32 ; inline -: _UTX_IDSIZE 4 ; inline -: _UTX_HOSTSIZE 256 ; inline +CONSTANT: _UTX_USERSIZE 256 +CONSTANT: _UTX_LINESIZE 32 +CONSTANT: _UTX_IDSIZE 4 +CONSTANT: _UTX_HOSTSIZE 256 C-STRUCT: utmpx { { "char" _UTX_USERSIZE } "ut_user" } @@ -28,9 +28,9 @@ C-STRUCT: utmpx { { "char" _UTX_HOSTSIZE } "ut_host" } { { "uint" 16 } "ut_pad" } ; -: __DARWIN_MAXPATHLEN 1024 ; inline -: __DARWIN_MAXNAMELEN 255 ; inline -: __DARWIN_MAXNAMELEN+1 255 ; inline +CONSTANT: __DARWIN_MAXPATHLEN 1024 +CONSTANT: __DARWIN_MAXNAMELEN 255 +CONSTANT: __DARWIN_MAXNAMELEN+1 255 C-STRUCT: dirent { "ino_t" "d_ino" } @@ -39,107 +39,107 @@ C-STRUCT: dirent { "__uint8_t" "d_namlen" } { { "char" __DARWIN_MAXNAMELEN+1 } "d_name" } ; -: EPERM 1 ; inline -: ENOENT 2 ; inline -: ESRCH 3 ; inline -: EINTR 4 ; inline -: EIO 5 ; inline -: ENXIO 6 ; inline -: E2BIG 7 ; inline -: ENOEXEC 8 ; inline -: EBADF 9 ; inline -: ECHILD 10 ; inline -: EDEADLK 11 ; inline -: ENOMEM 12 ; inline -: EACCES 13 ; inline -: EFAULT 14 ; inline -: ENOTBLK 15 ; inline -: EBUSY 16 ; inline -: EEXIST 17 ; inline -: EXDEV 18 ; inline -: ENODEV 19 ; inline -: ENOTDIR 20 ; inline -: EISDIR 21 ; inline -: EINVAL 22 ; inline -: ENFILE 23 ; inline -: EMFILE 24 ; inline -: ENOTTY 25 ; inline -: ETXTBSY 26 ; inline -: EFBIG 27 ; inline -: ENOSPC 28 ; inline -: ESPIPE 29 ; inline -: EROFS 30 ; inline -: EMLINK 31 ; inline -: EPIPE 32 ; inline -: EDOM 33 ; inline -: ERANGE 34 ; inline -: EAGAIN 35 ; inline +CONSTANT: EPERM 1 +CONSTANT: ENOENT 2 +CONSTANT: ESRCH 3 +CONSTANT: EINTR 4 +CONSTANT: EIO 5 +CONSTANT: ENXIO 6 +CONSTANT: E2BIG 7 +CONSTANT: ENOEXEC 8 +CONSTANT: EBADF 9 +CONSTANT: ECHILD 10 +CONSTANT: EDEADLK 11 +CONSTANT: ENOMEM 12 +CONSTANT: EACCES 13 +CONSTANT: EFAULT 14 +CONSTANT: ENOTBLK 15 +CONSTANT: EBUSY 16 +CONSTANT: EEXIST 17 +CONSTANT: EXDEV 18 +CONSTANT: ENODEV 19 +CONSTANT: ENOTDIR 20 +CONSTANT: EISDIR 21 +CONSTANT: EINVAL 22 +CONSTANT: ENFILE 23 +CONSTANT: EMFILE 24 +CONSTANT: ENOTTY 25 +CONSTANT: ETXTBSY 26 +CONSTANT: EFBIG 27 +CONSTANT: ENOSPC 28 +CONSTANT: ESPIPE 29 +CONSTANT: EROFS 30 +CONSTANT: EMLINK 31 +CONSTANT: EPIPE 32 +CONSTANT: EDOM 33 +CONSTANT: ERANGE 34 +CONSTANT: EAGAIN 35 ALIAS: EWOULDBLOCK EAGAIN -: EINPROGRESS 36 ; inline -: EALREADY 37 ; inline -: ENOTSOCK 38 ; inline -: EDESTADDRREQ 39 ; inline -: EMSGSIZE 40 ; inline -: EPROTOTYPE 41 ; inline -: ENOPROTOOPT 42 ; inline -: EPROTONOSUPPORT 43 ; inline -: ESOCKTNOSUPPORT 44 ; inline -: ENOTSUP 45 ; inline -: EPFNOSUPPORT 46 ; inline -: EAFNOSUPPORT 47 ; inline -: EADDRINUSE 48 ; inline -: EADDRNOTAVAIL 49 ; inline -: ENETDOWN 50 ; inline -: ENETUNREACH 51 ; inline -: ENETRESET 52 ; inline -: ECONNABORTED 53 ; inline -: ECONNRESET 54 ; inline -: ENOBUFS 55 ; inline -: EISCONN 56 ; inline -: ENOTCONN 57 ; inline -: ESHUTDOWN 58 ; inline -: ETOOMANYREFS 59 ; inline -: ETIMEDOUT 60 ; inline -: ECONNREFUSED 61 ; inline -: ELOOP 62 ; inline -: ENAMETOOLONG 63 ; inline -: EHOSTDOWN 64 ; inline -: EHOSTUNREACH 65 ; inline -: ENOTEMPTY 66 ; inline -: EPROCLIM 67 ; inline -: EUSERS 68 ; inline -: EDQUOT 69 ; inline -: ESTALE 70 ; inline -: EREMOTE 71 ; inline -: EBADRPC 72 ; inline -: ERPCMISMATCH 73 ; inline -: EPROGUNAVAIL 74 ; inline -: EPROGMISMATCH 75 ; inline -: EPROCUNAVAIL 76 ; inline -: ENOLCK 77 ; inline -: ENOSYS 78 ; inline -: EFTYPE 79 ; inline -: EAUTH 80 ; inline -: ENEEDAUTH 81 ; inline -: EPWROFF 82 ; inline -: EDEVERR 83 ; inline -: EOVERFLOW 84 ; inline -: EBADEXEC 85 ; inline -: EBADARCH 86 ; inline -: ESHLIBVERS 87 ; inline -: EBADMACHO 88 ; inline -: ECANCELED 89 ; inline -: EIDRM 90 ; inline -: ENOMSG 91 ; inline -: EILSEQ 92 ; inline -: ENOATTR 93 ; inline -: EBADMSG 94 ; inline -: EMULTIHOP 95 ; inline -: ENODATA 96 ; inline -: ENOLINK 97 ; inline -: ENOSR 98 ; inline -: ENOSTR 99 ; inline -: EPROTO 100 ; inline -: ETIME 101 ; inline -: EOPNOTSUPP 102 ; inline -: ENOPOLICY 103 ; inline +CONSTANT: EINPROGRESS 36 +CONSTANT: EALREADY 37 +CONSTANT: ENOTSOCK 38 +CONSTANT: EDESTADDRREQ 39 +CONSTANT: EMSGSIZE 40 +CONSTANT: EPROTOTYPE 41 +CONSTANT: ENOPROTOOPT 42 +CONSTANT: EPROTONOSUPPORT 43 +CONSTANT: ESOCKTNOSUPPORT 44 +CONSTANT: ENOTSUP 45 +CONSTANT: EPFNOSUPPORT 46 +CONSTANT: EAFNOSUPPORT 47 +CONSTANT: EADDRINUSE 48 +CONSTANT: EADDRNOTAVAIL 49 +CONSTANT: ENETDOWN 50 +CONSTANT: ENETUNREACH 51 +CONSTANT: ENETRESET 52 +CONSTANT: ECONNABORTED 53 +CONSTANT: ECONNRESET 54 +CONSTANT: ENOBUFS 55 +CONSTANT: EISCONN 56 +CONSTANT: ENOTCONN 57 +CONSTANT: ESHUTDOWN 58 +CONSTANT: ETOOMANYREFS 59 +CONSTANT: ETIMEDOUT 60 +CONSTANT: ECONNREFUSED 61 +CONSTANT: ELOOP 62 +CONSTANT: ENAMETOOLONG 63 +CONSTANT: EHOSTDOWN 64 +CONSTANT: EHOSTUNREACH 65 +CONSTANT: ENOTEMPTY 66 +CONSTANT: EPROCLIM 67 +CONSTANT: EUSERS 68 +CONSTANT: EDQUOT 69 +CONSTANT: ESTALE 70 +CONSTANT: EREMOTE 71 +CONSTANT: EBADRPC 72 +CONSTANT: ERPCMISMATCH 73 +CONSTANT: EPROGUNAVAIL 74 +CONSTANT: EPROGMISMATCH 75 +CONSTANT: EPROCUNAVAIL 76 +CONSTANT: ENOLCK 77 +CONSTANT: ENOSYS 78 +CONSTANT: EFTYPE 79 +CONSTANT: EAUTH 80 +CONSTANT: ENEEDAUTH 81 +CONSTANT: EPWROFF 82 +CONSTANT: EDEVERR 83 +CONSTANT: EOVERFLOW 84 +CONSTANT: EBADEXEC 85 +CONSTANT: EBADARCH 86 +CONSTANT: ESHLIBVERS 87 +CONSTANT: EBADMACHO 88 +CONSTANT: ECANCELED 89 +CONSTANT: EIDRM 90 +CONSTANT: ENOMSG 91 +CONSTANT: EILSEQ 92 +CONSTANT: ENOATTR 93 +CONSTANT: EBADMSG 94 +CONSTANT: EMULTIHOP 95 +CONSTANT: ENODATA 96 +CONSTANT: ENOLINK 97 +CONSTANT: ENOSR 98 +CONSTANT: ENOSTR 99 +CONSTANT: EPROTO 100 +CONSTANT: ETIME 101 +CONSTANT: EOPNOTSUPP 102 +CONSTANT: ENOPOLICY 103 diff --git a/basis/unix/bsd/netbsd/netbsd.factor b/basis/unix/bsd/netbsd/netbsd.factor index 149f35afce..5853210d13 100644 --- a/basis/unix/bsd/netbsd/netbsd.factor +++ b/basis/unix/bsd/netbsd/netbsd.factor @@ -1,7 +1,7 @@ -USING: alien.syntax alien.c-types math vocabs.loader ; +USING: alien.syntax alien.c-types math vocabs.loader constants ; IN: unix -: FD_SETSIZE 256 ; inline +CONSTANT: FD_SETSIZE 256 C-STRUCT: addrinfo { "int" "flags" } @@ -20,111 +20,111 @@ C-STRUCT: dirent { "__uint8_t" "d_namlen" } { { "char" 256 } "d_name" } ; -: EPERM 1 ; inline -: ENOENT 2 ; inline -: ESRCH 3 ; inline -: EINTR 4 ; inline -: EIO 5 ; inline -: ENXIO 6 ; inline -: E2BIG 7 ; inline -: ENOEXEC 8 ; inline -: EBADF 9 ; inline -: ECHILD 10 ; inline -: EDEADLK 11 ; inline -: ENOMEM 12 ; inline -: EACCES 13 ; inline -: EFAULT 14 ; inline -: ENOTBLK 15 ; inline -: EBUSY 16 ; inline -: EEXIST 17 ; inline -: EXDEV 18 ; inline -: ENODEV 19 ; inline -: ENOTDIR 20 ; inline -: EISDIR 21 ; inline -: EINVAL 22 ; inline -: ENFILE 23 ; inline -: EMFILE 24 ; inline -: ENOTTY 25 ; inline -: ETXTBSY 26 ; inline -: EFBIG 27 ; inline -: ENOSPC 28 ; inline -: ESPIPE 29 ; inline -: EROFS 30 ; inline -: EMLINK 31 ; inline -: EPIPE 32 ; inline -: EDOM 33 ; inline -: ERANGE 34 ; inline -: EAGAIN 35 ; inline -: EWOULDBLOCK EAGAIN ; inline -: EINPROGRESS 36 ; inline -: EALREADY 37 ; inline -: ENOTSOCK 38 ; inline -: EDESTADDRREQ 39 ; inline -: EMSGSIZE 40 ; inline -: EPROTOTYPE 41 ; inline -: ENOPROTOOPT 42 ; inline -: EPROTONOSUPPORT 43 ; inline -: ESOCKTNOSUPPORT 44 ; inline -: EOPNOTSUPP 45 ; inline -: EPFNOSUPPORT 46 ; inline -: EAFNOSUPPORT 47 ; inline -: EADDRINUSE 48 ; inline -: EADDRNOTAVAIL 49 ; inline -: ENETDOWN 50 ; inline -: ENETUNREACH 51 ; inline -: ENETRESET 52 ; inline -: ECONNABORTED 53 ; inline -: ECONNRESET 54 ; inline -: ENOBUFS 55 ; inline -: EISCONN 56 ; inline -: ENOTCONN 57 ; inline -: ESHUTDOWN 58 ; inline -: ETOOMANYREFS 59 ; inline -: ETIMEDOUT 60 ; inline -: ECONNREFUSED 61 ; inline -: ELOOP 62 ; inline -: ENAMETOOLONG 63 ; inline -: EHOSTDOWN 64 ; inline -: EHOSTUNREACH 65 ; inline -: ENOTEMPTY 66 ; inline -: EPROCLIM 67 ; inline -: EUSERS 68 ; inline -: EDQUOT 69 ; inline -: ESTALE 70 ; inline -: EREMOTE 71 ; inline -: EBADRPC 72 ; inline -: ERPCMISMATCH 73 ; inline -: EPROGUNAVAIL 74 ; inline -: EPROGMISMATCH 75 ; inline -: EPROCUNAVAIL 76 ; inline -: ENOLCK 77 ; inline -: ENOSYS 78 ; inline -: EFTYPE 79 ; inline -: EAUTH 80 ; inline -: ENEEDAUTH 81 ; inline -: EIDRM 82 ; inline -: ENOMSG 83 ; inline -: EOVERFLOW 84 ; inline -: EILSEQ 85 ; inline -: ENOTSUP 86 ; inline -: ECANCELED 87 ; inline -: EBADMSG 88 ; inline -: ENODATA 89 ; inline -: ENOSR 90 ; inline -: ENOSTR 91 ; inline -: ETIME 92 ; inline -: ENOATTR 93 ; inline -: EMULTIHOP 94 ; inline -: ENOLINK 95 ; inline -: EPROTO 96 ; inline -: ELAST 96 ; inline +CONSTANT: EPERM 1 +CONSTANT: ENOENT 2 +CONSTANT: ESRCH 3 +CONSTANT: EINTR 4 +CONSTANT: EIO 5 +CONSTANT: ENXIO 6 +CONSTANT: E2BIG 7 +CONSTANT: ENOEXEC 8 +CONSTANT: EBADF 9 +CONSTANT: ECHILD 10 +CONSTANT: EDEADLK 11 +CONSTANT: ENOMEM 12 +CONSTANT: EACCES 13 +CONSTANT: EFAULT 14 +CONSTANT: ENOTBLK 15 +CONSTANT: EBUSY 16 +CONSTANT: EEXIST 17 +CONSTANT: EXDEV 18 +CONSTANT: ENODEV 19 +CONSTANT: ENOTDIR 20 +CONSTANT: EISDIR 21 +CONSTANT: EINVAL 22 +CONSTANT: ENFILE 23 +CONSTANT: EMFILE 24 +CONSTANT: ENOTTY 25 +CONSTANT: ETXTBSY 26 +CONSTANT: EFBIG 27 +CONSTANT: ENOSPC 28 +CONSTANT: ESPIPE 29 +CONSTANT: EROFS 30 +CONSTANT: EMLINK 31 +CONSTANT: EPIPE 32 +CONSTANT: EDOM 33 +CONSTANT: ERANGE 34 +CONSTANT: EAGAIN 35 +ALIAS: EWOULDBLOCK EAGAIN +CONSTANT: EINPROGRESS 36 +CONSTANT: EALREADY 37 +CONSTANT: ENOTSOCK 38 +CONSTANT: EDESTADDRREQ 39 +CONSTANT: EMSGSIZE 40 +CONSTANT: EPROTOTYPE 41 +CONSTANT: ENOPROTOOPT 42 +CONSTANT: EPROTONOSUPPORT 43 +CONSTANT: ESOCKTNOSUPPORT 44 +CONSTANT: EOPNOTSUPP 45 +CONSTANT: EPFNOSUPPORT 46 +CONSTANT: EAFNOSUPPORT 47 +CONSTANT: EADDRINUSE 48 +CONSTANT: EADDRNOTAVAIL 49 +CONSTANT: ENETDOWN 50 +CONSTANT: ENETUNREACH 51 +CONSTANT: ENETRESET 52 +CONSTANT: ECONNABORTED 53 +CONSTANT: ECONNRESET 54 +CONSTANT: ENOBUFS 55 +CONSTANT: EISCONN 56 +CONSTANT: ENOTCONN 57 +CONSTANT: ESHUTDOWN 58 +CONSTANT: ETOOMANYREFS 59 +CONSTANT: ETIMEDOUT 60 +CONSTANT: ECONNREFUSED 61 +CONSTANT: ELOOP 62 +CONSTANT: ENAMETOOLONG 63 +CONSTANT: EHOSTDOWN 64 +CONSTANT: EHOSTUNREACH 65 +CONSTANT: ENOTEMPTY 66 +CONSTANT: EPROCLIM 67 +CONSTANT: EUSERS 68 +CONSTANT: EDQUOT 69 +CONSTANT: ESTALE 70 +CONSTANT: EREMOTE 71 +CONSTANT: EBADRPC 72 +CONSTANT: ERPCMISMATCH 73 +CONSTANT: EPROGUNAVAIL 74 +CONSTANT: EPROGMISMATCH 75 +CONSTANT: EPROCUNAVAIL 76 +CONSTANT: ENOLCK 77 +CONSTANT: ENOSYS 78 +CONSTANT: EFTYPE 79 +CONSTANT: EAUTH 80 +CONSTANT: ENEEDAUTH 81 +CONSTANT: EIDRM 82 +CONSTANT: ENOMSG 83 +CONSTANT: EOVERFLOW 84 +CONSTANT: EILSEQ 85 +CONSTANT: ENOTSUP 86 +CONSTANT: ECANCELED 87 +CONSTANT: EBADMSG 88 +CONSTANT: ENODATA 89 +CONSTANT: ENOSR 90 +CONSTANT: ENOSTR 91 +CONSTANT: ETIME 92 +CONSTANT: ENOATTR 93 +CONSTANT: EMULTIHOP 94 +CONSTANT: ENOLINK 95 +CONSTANT: EPROTO 96 +CONSTANT: ELAST 96 TYPEDEF: __uint8_t sa_family_t -: _UTX_USERSIZE 32 ; inline -: _UTX_LINESIZE 32 ; inline -: _UTX_IDSIZE 4 ; inline -: _UTX_HOSTSIZE 256 ; inline +CONSTANT: _UTX_USERSIZE 32 +CONSTANT: _UTX_LINESIZE 32 +CONSTANT: _UTX_IDSIZE 4 +CONSTANT: _UTX_HOSTSIZE 256 : _SS_MAXSIZE ( -- n ) 128 ; inline diff --git a/basis/unix/bsd/openbsd/openbsd.factor b/basis/unix/bsd/openbsd/openbsd.factor index a4189775e7..46f889cef9 100644 --- a/basis/unix/bsd/openbsd/openbsd.factor +++ b/basis/unix/bsd/openbsd/openbsd.factor @@ -1,7 +1,7 @@ -USING: alien.syntax ; +USING: alien.syntax constants ; IN: unix -: FD_SETSIZE 1024 ; inline +CONSTANT: FD_SETSIZE 1024 C-STRUCT: addrinfo { "int" "flags" } @@ -20,92 +20,92 @@ C-STRUCT: dirent { "__uint8_t" "d_namlen" } { { "char" 256 } "d_name" } ; -: EPERM 1 ; inline -: ENOENT 2 ; inline -: ESRCH 3 ; inline -: EINTR 4 ; inline -: EIO 5 ; inline -: ENXIO 6 ; inline -: E2BIG 7 ; inline -: ENOEXEC 8 ; inline -: EBADF 9 ; inline -: ECHILD 10 ; inline -: EDEADLK 11 ; inline -: ENOMEM 12 ; inline -: EACCES 13 ; inline -: EFAULT 14 ; inline -: ENOTBLK 15 ; inline -: EBUSY 16 ; inline -: EEXIST 17 ; inline -: EXDEV 18 ; inline -: ENODEV 19 ; inline -: ENOTDIR 20 ; inline -: EISDIR 21 ; inline -: EINVAL 22 ; inline -: ENFILE 23 ; inline -: EMFILE 24 ; inline -: ENOTTY 25 ; inline -: ETXTBSY 26 ; inline -: EFBIG 27 ; inline -: ENOSPC 28 ; inline -: ESPIPE 29 ; inline -: EROFS 30 ; inline -: EMLINK 31 ; inline -: EPIPE 32 ; inline -: EDOM 33 ; inline -: ERANGE 34 ; inline -: EAGAIN 35 ; inline -: EWOULDBLOCK EAGAIN ; inline -: EINPROGRESS 36 ; inline -: EALREADY 37 ; inline -: ENOTSOCK 38 ; inline -: EDESTADDRREQ 39 ; inline -: EMSGSIZE 40 ; inline -: EPROTOTYPE 41 ; inline -: ENOPROTOOPT 42 ; inline -: EPROTONOSUPPORT 43 ; inline -: ESOCKTNOSUPPORT 44 ; inline -: EOPNOTSUPP 45 ; inline -: EPFNOSUPPORT 46 ; inline -: EAFNOSUPPORT 47 ; inline -: EADDRINUSE 48 ; inline -: EADDRNOTAVAIL 49 ; inline -: ENETDOWN 50 ; inline -: ENETUNREACH 51 ; inline -: ENETRESET 52 ; inline -: ECONNABORTED 53 ; inline -: ECONNRESET 54 ; inline -: ENOBUFS 55 ; inline -: EISCONN 56 ; inline -: ENOTCONN 57 ; inline -: ESHUTDOWN 58 ; inline -: ETOOMANYREFS 59 ; inline -: ETIMEDOUT 60 ; inline -: ECONNREFUSED 61 ; inline -: ELOOP 62 ; inline -: ENAMETOOLONG 63 ; inline -: EHOSTDOWN 64 ; inline -: EHOSTUNREACH 65 ; inline -: ENOTEMPTY 66 ; inline -: EPROCLIM 67 ; inline -: EUSERS 68 ; inline -: EDQUOT 69 ; inline -: ESTALE 70 ; inline -: EREMOTE 71 ; inline -: EBADRPC 72 ; inline -: ERPCMISMATCH 73 ; inline -: EPROGUNAVAIL 74 ; inline -: EPROGMISMATCH 75 ; inline -: EPROCUNAVAIL 76 ; inline -: ENOLCK 77 ; inline -: ENOSYS 78 ; inline -: EFTYPE 79 ; inline -: EAUTH 80 ; inline -: ENEEDAUTH 81 ; inline -: EIPSEC 82 ; inline -: ENOATTR 83 ; inline -: EILSEQ 84 ; inline -: ENOMEDIUM 85 ; inline -: EMEDIUMTYPE 86 ; inline -: EOVERFLOW 87 ; inline -: ECANCELED 88 ; inline +CONSTANT: EPERM 1 +CONSTANT: ENOENT 2 +CONSTANT: ESRCH 3 +CONSTANT: EINTR 4 +CONSTANT: EIO 5 +CONSTANT: ENXIO 6 +CONSTANT: E2BIG 7 +CONSTANT: ENOEXEC 8 +CONSTANT: EBADF 9 +CONSTANT: ECHILD 10 +CONSTANT: EDEADLK 11 +CONSTANT: ENOMEM 12 +CONSTANT: EACCES 13 +CONSTANT: EFAULT 14 +CONSTANT: ENOTBLK 15 +CONSTANT: EBUSY 16 +CONSTANT: EEXIST 17 +CONSTANT: EXDEV 18 +CONSTANT: ENODEV 19 +CONSTANT: ENOTDIR 20 +CONSTANT: EISDIR 21 +CONSTANT: EINVAL 22 +CONSTANT: ENFILE 23 +CONSTANT: EMFILE 24 +CONSTANT: ENOTTY 25 +CONSTANT: ETXTBSY 26 +CONSTANT: EFBIG 27 +CONSTANT: ENOSPC 28 +CONSTANT: ESPIPE 29 +CONSTANT: EROFS 30 +CONSTANT: EMLINK 31 +CONSTANT: EPIPE 32 +CONSTANT: EDOM 33 +CONSTANT: ERANGE 34 +CONSTANT: EAGAIN 35 +ALIAS: EWOULDBLOCK EAGAIN +CONSTANT: EINPROGRESS 36 +CONSTANT: EALREADY 37 +CONSTANT: ENOTSOCK 38 +CONSTANT: EDESTADDRREQ 39 +CONSTANT: EMSGSIZE 40 +CONSTANT: EPROTOTYPE 41 +CONSTANT: ENOPROTOOPT 42 +CONSTANT: EPROTONOSUPPORT 43 +CONSTANT: ESOCKTNOSUPPORT 44 +CONSTANT: EOPNOTSUPP 45 +CONSTANT: EPFNOSUPPORT 46 +CONSTANT: EAFNOSUPPORT 47 +CONSTANT: EADDRINUSE 48 +CONSTANT: EADDRNOTAVAIL 49 +CONSTANT: ENETDOWN 50 +CONSTANT: ENETUNREACH 51 +CONSTANT: ENETRESET 52 +CONSTANT: ECONNABORTED 53 +CONSTANT: ECONNRESET 54 +CONSTANT: ENOBUFS 55 +CONSTANT: EISCONN 56 +CONSTANT: ENOTCONN 57 +CONSTANT: ESHUTDOWN 58 +CONSTANT: ETOOMANYREFS 59 +CONSTANT: ETIMEDOUT 60 +CONSTANT: ECONNREFUSED 61 +CONSTANT: ELOOP 62 +CONSTANT: ENAMETOOLONG 63 +CONSTANT: EHOSTDOWN 64 +CONSTANT: EHOSTUNREACH 65 +CONSTANT: ENOTEMPTY 66 +CONSTANT: EPROCLIM 67 +CONSTANT: EUSERS 68 +CONSTANT: EDQUOT 69 +CONSTANT: ESTALE 70 +CONSTANT: EREMOTE 71 +CONSTANT: EBADRPC 72 +CONSTANT: ERPCMISMATCH 73 +CONSTANT: EPROGUNAVAIL 74 +CONSTANT: EPROGMISMATCH 75 +CONSTANT: EPROCUNAVAIL 76 +CONSTANT: ENOLCK 77 +CONSTANT: ENOSYS 78 +CONSTANT: EFTYPE 79 +CONSTANT: EAUTH 80 +CONSTANT: ENEEDAUTH 81 +CONSTANT: EIPSEC 82 +CONSTANT: ENOATTR 83 +CONSTANT: EILSEQ 84 +CONSTANT: ENOMEDIUM 85 +CONSTANT: EMEDIUMTYPE 86 +CONSTANT: EOVERFLOW 87 +CONSTANT: ECANCELED 88 diff --git a/basis/unix/getfsstat/freebsd/freebsd.factor b/basis/unix/getfsstat/freebsd/freebsd.factor index 1d9cab577e..0cc63229c4 100644 --- a/basis/unix/getfsstat/freebsd/freebsd.factor +++ b/basis/unix/getfsstat/freebsd/freebsd.factor @@ -1,11 +1,11 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax ; +USING: alien.syntax constants ; IN: unix.getfsstat.freebsd -: MNT_WAIT 1 ; inline ! synchronously wait for I/O to complete -: MNT_NOWAIT 2 ; inline ! start all I/O, but do not wait for it -: MNT_LAZY 3 ; inline ! push data not written by filesystem syncer -: MNT_SUSPEND 4 ; inline ! Suspend file system after sync +CONSTANT: MNT_WAIT 1 ! synchronously wait for I/O to complete +CONSTANT: MNT_NOWAIT 2 ! start all I/O, but do not wait for it +CONSTANT: MNT_LAZY 3 ! push data not written by filesystem syncer +CONSTANT: MNT_SUSPEND 4 ! Suspend file system after sync FUNCTION: int getfsstat ( statfs* buf, int bufsize, int flags ) ; diff --git a/basis/unix/getfsstat/macosx/macosx.factor b/basis/unix/getfsstat/macosx/macosx.factor index fe39f8556b..23d9a14b9b 100644 --- a/basis/unix/getfsstat/macosx/macosx.factor +++ b/basis/unix/getfsstat/macosx/macosx.factor @@ -1,9 +1,9 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax ; +USING: alien.syntax constants ; IN: unix.getfsstat.macosx -: MNT_WAIT 1 ; inline ! synchronously wait for I/O to complete -: MNT_NOWAIT 2 ; inline ! start all I/O, but do not wait for it +CONSTANT: MNT_WAIT 1 ! synchronously wait for I/O to complete +CONSTANT: MNT_NOWAIT 2 ! start all I/O, but do not wait for it FUNCTION: int getfsstat64 ( statfs* buf, int bufsize, int flags ) ; diff --git a/basis/unix/getfsstat/netbsd/netbsd.factor b/basis/unix/getfsstat/netbsd/netbsd.factor index 1c8941a653..18064822eb 100644 --- a/basis/unix/getfsstat/netbsd/netbsd.factor +++ b/basis/unix/getfsstat/netbsd/netbsd.factor @@ -1,10 +1,10 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax ; +USING: alien.syntax constants ; IN: unix.getfsstat.netbsd -: MNT_WAIT 1 ; inline ! synchronously wait for I/O to complete -: MNT_NOWAIT 2 ; inline ! start all I/O, but do not wait for it -: MNT_LAZY 3 ; inline ! push data not written by filesystem syncer +CONSTANT: MNT_WAIT 1 ! synchronously wait for I/O to complete +CONSTANT: MNT_NOWAIT 2 ! start all I/O, but do not wait for it +CONSTANT: MNT_LAZY 3 ! push data not written by filesystem syncer FUNCTION: int getvfsstat ( statfs* buf, int bufsize, int flags ) ; diff --git a/basis/unix/getfsstat/openbsd/openbsd.factor b/basis/unix/getfsstat/openbsd/openbsd.factor index 8bf692bd9c..41adfeaacd 100644 --- a/basis/unix/getfsstat/openbsd/openbsd.factor +++ b/basis/unix/getfsstat/openbsd/openbsd.factor @@ -1,10 +1,10 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax ; +USING: alien.syntax constants ; IN: unix.getfsstat.openbsd -: MNT_WAIT 1 ; ! synchronously wait for I/O to complete -: MNT_NOWAIT 2 ; ! start all I/O, but do not wait for it -: MNT_LAZY 3 ; ! push data not written by filesystem syncer +CONSTANT: MNT_WAIT 1 ! synchronously wait for I/O to complete +CONSTANT: MNT_NOWAIT 2 ! start all I/O, but do not wait for it +CONSTANT: MNT_LAZY 3 ! push data not written by filesystem syncer FUNCTION: int getfsstat ( statfs* buf, int bufsize, int flags ) ; diff --git a/basis/unix/kqueue/freebsd/freebsd.factor b/basis/unix/kqueue/freebsd/freebsd.factor index edddae2c16..4c90ef739e 100644 --- a/basis/unix/kqueue/freebsd/freebsd.factor +++ b/basis/unix/kqueue/freebsd/freebsd.factor @@ -1,4 +1,4 @@ -USE: alien.syntax +USING: alien.syntax constants ; IN: unix.kqueue C-STRUCT: kevent @@ -12,12 +12,12 @@ C-STRUCT: kevent FUNCTION: int kevent ( int kq, kevent* changelist, int nchanges, kevent* eventlist, int nevents, timespec* timeout ) ; -: EVFILT_READ -1 ; inline -: EVFILT_WRITE -2 ; inline -: EVFILT_AIO -3 ; inline ! attached to aio requests -: EVFILT_VNODE -4 ; inline ! attached to vnodes -: EVFILT_PROC -5 ; inline ! attached to struct proc -: EVFILT_SIGNAL -6 ; inline ! attached to struct proc -: EVFILT_TIMER -7 ; inline ! timers -: EVFILT_NETDEV -8 ; inline ! Mach ports -: EVFILT_FS -9 ; inline ! Filesystem events +CONSTANT: EVFILT_READ -1 +CONSTANT: EVFILT_WRITE -2 +CONSTANT: EVFILT_AIO -3 ! attached to aio requests +CONSTANT: EVFILT_VNODE -4 ! attached to vnodes +CONSTANT: EVFILT_PROC -5 ! attached to struct proc +CONSTANT: EVFILT_SIGNAL -6 ! attached to struct proc +CONSTANT: EVFILT_TIMER -7 ! timers +CONSTANT: EVFILT_NETDEV -8 ! Mach ports +CONSTANT: EVFILT_FS -9 ! Filesystem events diff --git a/basis/unix/kqueue/macosx/macosx.factor b/basis/unix/kqueue/macosx/macosx.factor index 7dc2a79c09..0bc6ce5785 100644 --- a/basis/unix/kqueue/macosx/macosx.factor +++ b/basis/unix/kqueue/macosx/macosx.factor @@ -1,4 +1,4 @@ -USE: alien.syntax +USING: alien.syntax constants ; IN: unix.kqueue C-STRUCT: kevent @@ -12,12 +12,12 @@ C-STRUCT: kevent FUNCTION: int kevent ( int kq, kevent* changelist, int nchanges, kevent* eventlist, int nevents, timespec* timeout ) ; -: EVFILT_READ -1 ; inline -: EVFILT_WRITE -2 ; inline -: EVFILT_AIO -3 ; inline ! attached to aio requests -: EVFILT_VNODE -4 ; inline ! attached to vnodes -: EVFILT_PROC -5 ; inline ! attached to struct proc -: EVFILT_SIGNAL -6 ; inline ! attached to struct proc -: EVFILT_TIMER -7 ; inline ! timers -: EVFILT_MACHPORT -8 ; inline ! Mach ports -: EVFILT_FS -9 ; inline ! Filesystem events +CONSTANT: EVFILT_READ -1 +CONSTANT: EVFILT_WRITE -2 +CONSTANT: EVFILT_AIO -3 ! attached to aio requests +CONSTANT: EVFILT_VNODE -4 ! attached to vnodes +CONSTANT: EVFILT_PROC -5 ! attached to struct proc +CONSTANT: EVFILT_SIGNAL -6 ! attached to struct proc +CONSTANT: EVFILT_TIMER -7 ! timers +CONSTANT: EVFILT_MACHPORT -8 ! Mach ports +CONSTANT: EVFILT_FS -9 ! Filesystem events diff --git a/basis/unix/kqueue/netbsd/netbsd.factor b/basis/unix/kqueue/netbsd/netbsd.factor index e3fc11a688..5e23626e1d 100644 --- a/basis/unix/kqueue/netbsd/netbsd.factor +++ b/basis/unix/kqueue/netbsd/netbsd.factor @@ -1,4 +1,4 @@ -USE: alien.syntax +USING: alien.syntax constants ; IN: unix.kqueue C-STRUCT: kevent @@ -12,11 +12,11 @@ C-STRUCT: kevent FUNCTION: int kevent ( int kq, kevent* changelist, size_t nchanges, kevent* eventlist, size_t nevents, timespec* timeout ) ; -: EVFILT_READ 0 ; inline -: EVFILT_WRITE 1 ; inline -: EVFILT_AIO 2 ; inline ! attached to aio requests -: EVFILT_VNODE 3 ; inline ! attached to vnodes -: EVFILT_PROC 4 ; inline ! attached to struct proc -: EVFILT_SIGNAL 5 ; inline ! attached to struct proc -: EVFILT_TIMER 6 ; inline ! timers -: EVFILT_SYSCOUNT 7 ; inline ! Filesystem events +CONSTANT: EVFILT_READ 0 +CONSTANT: EVFILT_WRITE 1 +CONSTANT: EVFILT_AIO 2 ! attached to aio requests +CONSTANT: EVFILT_VNODE 3 ! attached to vnodes +CONSTANT: EVFILT_PROC 4 ! attached to struct proc +CONSTANT: EVFILT_SIGNAL 5 ! attached to struct proc +CONSTANT: EVFILT_TIMER 6 ! timers +CONSTANT: EVFILT_SYSCOUNT 7 ! Filesystem events diff --git a/basis/unix/kqueue/openbsd/openbsd.factor b/basis/unix/kqueue/openbsd/openbsd.factor index bc4be88c42..fc2e7d20ca 100644 --- a/basis/unix/kqueue/openbsd/openbsd.factor +++ b/basis/unix/kqueue/openbsd/openbsd.factor @@ -1,4 +1,4 @@ -USE: alien.syntax +USING: alien.syntax constants ; IN: unix.kqueue C-STRUCT: kevent @@ -12,10 +12,10 @@ C-STRUCT: kevent FUNCTION: int kevent ( int kq, kevent* changelist, int nchanges, kevent* eventlist, int nevents, timespec* timeout ) ; -: EVFILT_READ -1 ; inline -: EVFILT_WRITE -2 ; inline -: EVFILT_AIO -3 ; inline ! attached to aio requests -: EVFILT_VNODE -4 ; inline ! attached to vnodes -: EVFILT_PROC -5 ; inline ! attached to struct proc -: EVFILT_SIGNAL -6 ; inline ! attached to struct proc -: EVFILT_TIMER -7 ; inline ! timers +CONSTANT: EVFILT_READ -1 +CONSTANT: EVFILT_WRITE -2 +CONSTANT: EVFILT_AIO -3 ! attached to aio requests +CONSTANT: EVFILT_VNODE -4 ! attached to vnodes +CONSTANT: EVFILT_PROC -5 ! attached to struct proc +CONSTANT: EVFILT_SIGNAL -6 ! attached to struct proc +CONSTANT: EVFILT_TIMER -7 ! timers diff --git a/basis/unix/linux/epoll/epoll.factor b/basis/unix/linux/epoll/epoll.factor index 72935807c3..1a42765ee8 100644 --- a/basis/unix/linux/epoll/epoll.factor +++ b/basis/unix/linux/epoll/epoll.factor @@ -14,19 +14,19 @@ C-STRUCT: epoll-event FUNCTION: int epoll_wait ( int epfd, epoll_event* events, int maxevents, int timeout ) ; -: EPOLL_CTL_ADD 1 ; inline ! Add a file decriptor to the interface. -: EPOLL_CTL_DEL 2 ; inline ! Remove a file decriptor from the interface. -: EPOLL_CTL_MOD 3 ; inline ! Change file decriptor epoll_event structure. +CONSTANT: EPOLL_CTL_ADD 1 ! Add a file decriptor to the interface. +CONSTANT: EPOLL_CTL_DEL 2 ! Remove a file decriptor from the interface. +CONSTANT: EPOLL_CTL_MOD 3 ! Change file decriptor epoll_event structure. -: EPOLLIN HEX: 001 ; inline -: EPOLLPRI HEX: 002 ; inline -: EPOLLOUT HEX: 004 ; inline -: EPOLLRDNORM HEX: 040 ; inline -: EPOLLRDBAND HEX: 080 ; inline -: EPOLLWRNORM HEX: 100 ; inline -: EPOLLWRBAND HEX: 200 ; inline -: EPOLLMSG HEX: 400 ; inline -: EPOLLERR HEX: 008 ; inline -: EPOLLHUP HEX: 010 ; inline -: EPOLLONESHOT 30 2^ ; inline -: EPOLLET 31 2^ ; inline +CONSTANT: EPOLLIN HEX: 001 +CONSTANT: EPOLLPRI HEX: 002 +CONSTANT: EPOLLOUT HEX: 004 +CONSTANT: EPOLLRDNORM HEX: 040 +CONSTANT: EPOLLRDBAND HEX: 080 +CONSTANT: EPOLLWRNORM HEX: 100 +CONSTANT: EPOLLWRBAND HEX: 200 +CONSTANT: EPOLLMSG HEX: 400 +CONSTANT: EPOLLERR HEX: 008 +CONSTANT: EPOLLHUP HEX: 010 +CONSTANT: EPOLLONESHOT 30 2^ +CONSTANT: EPOLLET 31 2^ diff --git a/basis/unix/linux/inotify/inotify.factor b/basis/unix/linux/inotify/inotify.factor index 3385e454d2..e3d40b5b28 100644 --- a/basis/unix/linux/inotify/inotify.factor +++ b/basis/unix/linux/inotify/inotify.factor @@ -11,31 +11,31 @@ C-STRUCT: inotify-event { "char[0]" "name" } ! stub for possible name ; -: IN_ACCESS HEX: 1 ; inline ! File was accessed -: IN_MODIFY HEX: 2 ; inline ! File was modified -: IN_ATTRIB HEX: 4 ; inline ! Metadata changed -: IN_CLOSE_WRITE HEX: 8 ; inline ! Writtable file was closed -: IN_CLOSE_NOWRITE HEX: 10 ; inline ! Unwrittable file closed -: IN_OPEN HEX: 20 ; inline ! File was opened -: IN_MOVED_FROM HEX: 40 ; inline ! File was moved from X -: IN_MOVED_TO HEX: 80 ; inline ! File was moved to Y -: IN_CREATE HEX: 100 ; inline ! Subfile was created -: IN_DELETE HEX: 200 ; inline ! Subfile was deleted -: IN_DELETE_SELF HEX: 400 ; inline ! Self was deleted -: IN_MOVE_SELF HEX: 800 ; inline ! Self was moved +CONSTANT: IN_ACCESS HEX: 1 ! File was accessed +CONSTANT: IN_MODIFY HEX: 2 ! File was modified +CONSTANT: IN_ATTRIB HEX: 4 ! Metadata changed +CONSTANT: IN_CLOSE_WRITE HEX: 8 ! Writtable file was closed +CONSTANT: IN_CLOSE_NOWRITE HEX: 10 ! Unwrittable file closed +CONSTANT: IN_OPEN HEX: 20 ! File was opened +CONSTANT: IN_MOVED_FROM HEX: 40 ! File was moved from X +CONSTANT: IN_MOVED_TO HEX: 80 ! File was moved to Y +CONSTANT: IN_CREATE HEX: 100 ! Subfile was created +CONSTANT: IN_DELETE HEX: 200 ! Subfile was deleted +CONSTANT: IN_DELETE_SELF HEX: 400 ! Self was deleted +CONSTANT: IN_MOVE_SELF HEX: 800 ! Self was moved -: IN_UNMOUNT HEX: 2000 ; inline ! Backing fs was unmounted -: IN_Q_OVERFLOW HEX: 4000 ; inline ! Event queued overflowed -: IN_IGNORED HEX: 8000 ; inline ! File was ignored +CONSTANT: IN_UNMOUNT HEX: 2000 ! Backing fs was unmounted +CONSTANT: IN_Q_OVERFLOW HEX: 4000 ! Event queued overflowed +CONSTANT: IN_IGNORED HEX: 8000 ! File was ignored : IN_CLOSE ( -- n ) IN_CLOSE_WRITE IN_CLOSE_NOWRITE bitor ; inline ! close -: IN_MOVE ( -- n ) IN_MOVED_FROM IN_MOVED_TO bitor ; inline ! moves +: IN_MOVE ( -- n ) IN_MOVED_FROM IN_MOVED_TO bitor ; inline ! moves -: IN_ONLYDIR HEX: 1000000 ; inline ! only watch the path if it is a directory -: IN_DONT_FOLLOW HEX: 2000000 ; inline ! don't follow a sym link -: IN_MASK_ADD HEX: 20000000 ; inline ! add to the mask of an already existing watch -: IN_ISDIR HEX: 40000000 ; inline ! event occurred against dir -: IN_ONESHOT HEX: 80000000 ; inline ! only send event once +CONSTANT: IN_ONLYDIR HEX: 1000000 ! only watch the path if it is a directory +CONSTANT: IN_DONT_FOLLOW HEX: 2000000 ! don't follow a sym link +CONSTANT: IN_MASK_ADD HEX: 20000000 ! add to the mask of an already existing watch +CONSTANT: IN_ISDIR HEX: 40000000 ! event occurred against dir +CONSTANT: IN_ONESHOT HEX: 80000000 ! only send event once : IN_CHANGE_EVENTS ( -- n ) { diff --git a/basis/unix/linux/linux.factor b/basis/unix/linux/linux.factor index 7a77dc9316..61ced5c97b 100644 --- a/basis/unix/linux/linux.factor +++ b/basis/unix/linux/linux.factor @@ -1,36 +1,37 @@ ! Copyright (C) 2005, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax ; +USING: alien.syntax alias constants ; IN: unix ! Linux. -: MAXPATHLEN 1024 ; inline +CONSTANT: MAXPATHLEN 1024 -: O_RDONLY HEX: 0000 ; inline -: O_WRONLY HEX: 0001 ; inline -: O_RDWR HEX: 0002 ; inline -: O_CREAT HEX: 0040 ; inline -: O_EXCL HEX: 0080 ; inline -: O_NOCTTY HEX: 0100 ; inline -: O_TRUNC HEX: 0200 ; inline -: O_APPEND HEX: 0400 ; inline -: O_NONBLOCK HEX: 0800 ; inline -: O_NDELAY O_NONBLOCK ; inline +CONSTANT: O_RDONLY HEX: 0000 +CONSTANT: O_WRONLY HEX: 0001 +CONSTANT: O_RDWR HEX: 0002 +CONSTANT: O_CREAT HEX: 0040 +CONSTANT: O_EXCL HEX: 0080 +CONSTANT: O_NOCTTY HEX: 0100 +CONSTANT: O_TRUNC HEX: 0200 +CONSTANT: O_APPEND HEX: 0400 +CONSTANT: O_NONBLOCK HEX: 0800 -: SOL_SOCKET 1 ; inline +ALIAS: O_NDELAY O_NONBLOCK -: FD_SETSIZE 1024 ; inline +CONSTANT: SOL_SOCKET 1 -: SO_REUSEADDR 2 ; inline -: SO_OOBINLINE 10 ; inline -: SO_SNDTIMEO HEX: 15 ; inline -: SO_RCVTIMEO HEX: 14 ; inline +CONSTANT: FD_SETSIZE 1024 -: F_SETFD 2 ; inline -: FD_CLOEXEC 1 ; inline +CONSTANT: SO_REUSEADDR 2 +CONSTANT: SO_OOBINLINE 10 +CONSTANT: SO_SNDTIMEO HEX: 15 +CONSTANT: SO_RCVTIMEO HEX: 14 -: F_SETFL 4 ; inline +CONSTANT: F_SETFD 2 +CONSTANT: FD_CLOEXEC 1 + +CONSTANT: F_SETFL 4 C-STRUCT: addrinfo { "int" "flags" } @@ -55,33 +56,33 @@ C-STRUCT: sockaddr-in6 { { "uchar" 16 } "addr" } { "uint" "scopeid" } ; -: max-un-path 108 ; inline +CONSTANT: max-un-path 108 C-STRUCT: sockaddr-un { "ushort" "family" } { { "char" max-un-path } "path" } ; -: SOCK_STREAM 1 ; inline -: SOCK_DGRAM 2 ; inline +CONSTANT: SOCK_STREAM 1 +CONSTANT: SOCK_DGRAM 2 -: AF_UNSPEC 0 ; inline -: AF_UNIX 1 ; inline -: AF_INET 2 ; inline -: AF_INET6 10 ; inline +CONSTANT: AF_UNSPEC 0 +CONSTANT: AF_UNIX 1 +CONSTANT: AF_INET 2 +CONSTANT: AF_INET6 10 -: PF_UNSPEC AF_UNSPEC ; inline -: PF_UNIX AF_UNIX ; inline -: PF_INET AF_INET ; inline -: PF_INET6 AF_INET6 ; inline +ALIAS: PF_UNSPEC AF_UNSPEC +ALIAS: PF_UNIX AF_UNIX +ALIAS: PF_INET AF_INET +ALIAS: PF_INET6 AF_INET6 -: IPPROTO_TCP 6 ; inline -: IPPROTO_UDP 17 ; inline +CONSTANT: IPPROTO_TCP 6 +CONSTANT: IPPROTO_UDP 17 -: AI_PASSIVE 1 ; inline +CONSTANT: AI_PASSIVE 1 -: SEEK_SET 0 ; inline -: SEEK_CUR 1 ; inline -: SEEK_END 2 ; inline +CONSTANT: SEEK_SET 0 +CONSTANT: SEEK_CUR 1 +CONSTANT: SEEK_END 2 C-STRUCT: passwd { "char*" "pw_name" } @@ -99,134 +100,134 @@ C-STRUCT: dirent { "uchar" "d_type" } { { "char" 256 } "d_name" } ; -: EPERM 1 ; inline -: ENOENT 2 ; inline -: ESRCH 3 ; inline -: EINTR 4 ; inline -: EIO 5 ; inline -: ENXIO 6 ; inline -: E2BIG 7 ; inline -: ENOEXEC 8 ; inline -: EBADF 9 ; inline -: ECHILD 10 ; inline -: EAGAIN 11 ; inline -: ENOMEM 12 ; inline -: EACCES 13 ; inline -: EFAULT 14 ; inline -: ENOTBLK 15 ; inline -: EBUSY 16 ; inline -: EEXIST 17 ; inline -: EXDEV 18 ; inline -: ENODEV 19 ; inline -: ENOTDIR 20 ; inline -: EISDIR 21 ; inline -: EINVAL 22 ; inline -: ENFILE 23 ; inline -: EMFILE 24 ; inline -: ENOTTY 25 ; inline -: ETXTBSY 26 ; inline -: EFBIG 27 ; inline -: ENOSPC 28 ; inline -: ESPIPE 29 ; inline -: EROFS 30 ; inline -: EMLINK 31 ; inline -: EPIPE 32 ; inline -: EDOM 33 ; inline -: ERANGE 34 ; inline -: EDEADLK 35 ; inline -: ENAMETOOLONG 36 ; inline -: ENOLCK 37 ; inline -: ENOSYS 38 ; inline -: ENOTEMPTY 39 ; inline -: ELOOP 40 ; inline -: EWOULDBLOCK EAGAIN ; inline -: ENOMSG 42 ; inline -: EIDRM 43 ; inline -: ECHRNG 44 ; inline -: EL2NSYNC 45 ; inline -: EL3HLT 46 ; inline -: EL3RST 47 ; inline -: ELNRNG 48 ; inline -: EUNATCH 49 ; inline -: ENOCSI 50 ; inline -: EL2HLT 51 ; inline -: EBADE 52 ; inline -: EBADR 53 ; inline -: EXFULL 54 ; inline -: ENOANO 55 ; inline -: EBADRQC 56 ; inline -: EBADSLT 57 ; inline -: EDEADLOCK EDEADLK ; inline -: EBFONT 59 ; inline -: ENOSTR 60 ; inline -: ENODATA 61 ; inline -: ETIME 62 ; inline -: ENOSR 63 ; inline -: ENONET 64 ; inline -: ENOPKG 65 ; inline -: EREMOTE 66 ; inline -: ENOLINK 67 ; inline -: EADV 68 ; inline -: ESRMNT 69 ; inline -: ECOMM 70 ; inline -: EPROTO 71 ; inline -: EMULTIHOP 72 ; inline -: EDOTDOT 73 ; inline -: EBADMSG 74 ; inline -: EOVERFLOW 75 ; inline -: ENOTUNIQ 76 ; inline -: EBADFD 77 ; inline -: EREMCHG 78 ; inline -: ELIBACC 79 ; inline -: ELIBBAD 80 ; inline -: ELIBSCN 81 ; inline -: ELIBMAX 82 ; inline -: ELIBEXEC 83 ; inline -: EILSEQ 84 ; inline -: ERESTART 85 ; inline -: ESTRPIPE 86 ; inline -: EUSERS 87 ; inline -: ENOTSOCK 88 ; inline -: EDESTADDRREQ 89 ; inline -: EMSGSIZE 90 ; inline -: EPROTOTYPE 91 ; inline -: ENOPROTOOPT 92 ; inline -: EPROTONOSUPPORT 93 ; inline -: ESOCKTNOSUPPORT 94 ; inline -: EOPNOTSUPP 95 ; inline -: EPFNOSUPPORT 96 ; inline -: EAFNOSUPPORT 97 ; inline -: EADDRINUSE 98 ; inline -: EADDRNOTAVAIL 99 ; inline -: ENETDOWN 100 ; inline -: ENETUNREACH 101 ; inline -: ENETRESET 102 ; inline -: ECONNABORTED 103 ; inline -: ECONNRESET 104 ; inline -: ENOBUFS 105 ; inline -: EISCONN 106 ; inline -: ENOTCONN 107 ; inline -: ESHUTDOWN 108 ; inline -: ETOOMANYREFS 109 ; inline -: ETIMEDOUT 110 ; inline -: ECONNREFUSED 111 ; inline -: EHOSTDOWN 112 ; inline -: EHOSTUNREACH 113 ; inline -: EALREADY 114 ; inline -: EINPROGRESS 115 ; inline -: ESTALE 116 ; inline -: EUCLEAN 117 ; inline -: ENOTNAM 118 ; inline -: ENAVAIL 119 ; inline -: EISNAM 120 ; inline -: EREMOTEIO 121 ; inline -: EDQUOT 122 ; inline -: ENOMEDIUM 123 ; inline -: EMEDIUMTYPE 124 ; inline -: ECANCELED 125 ; inline -: ENOKEY 126 ; inline -: EKEYEXPIRED 127 ; inline -: EKEYREVOKED 128 ; inline -: EKEYREJECTED 129 ; inline -: EOWNERDEAD 130 ; inline -: ENOTRECOVERABLE 131 ; inline +CONSTANT: EPERM 1 +CONSTANT: ENOENT 2 +CONSTANT: ESRCH 3 +CONSTANT: EINTR 4 +CONSTANT: EIO 5 +CONSTANT: ENXIO 6 +CONSTANT: E2BIG 7 +CONSTANT: ENOEXEC 8 +CONSTANT: EBADF 9 +CONSTANT: ECHILD 10 +CONSTANT: EAGAIN 11 +CONSTANT: ENOMEM 12 +CONSTANT: EACCES 13 +CONSTANT: EFAULT 14 +CONSTANT: ENOTBLK 15 +CONSTANT: EBUSY 16 +CONSTANT: EEXIST 17 +CONSTANT: EXDEV 18 +CONSTANT: ENODEV 19 +CONSTANT: ENOTDIR 20 +CONSTANT: EISDIR 21 +CONSTANT: EINVAL 22 +CONSTANT: ENFILE 23 +CONSTANT: EMFILE 24 +CONSTANT: ENOTTY 25 +CONSTANT: ETXTBSY 26 +CONSTANT: EFBIG 27 +CONSTANT: ENOSPC 28 +CONSTANT: ESPIPE 29 +CONSTANT: EROFS 30 +CONSTANT: EMLINK 31 +CONSTANT: EPIPE 32 +CONSTANT: EDOM 33 +CONSTANT: ERANGE 34 +CONSTANT: EDEADLK 35 +CONSTANT: ENAMETOOLONG 36 +CONSTANT: ENOLCK 37 +CONSTANT: ENOSYS 38 +CONSTANT: ENOTEMPTY 39 +CONSTANT: ELOOP 40 +ALIAS: EWOULDBLOCK EAGAIN +CONSTANT: ENOMSG 42 +CONSTANT: EIDRM 43 +CONSTANT: ECHRNG 44 +CONSTANT: EL2NSYNC 45 +CONSTANT: EL3HLT 46 +CONSTANT: EL3RST 47 +CONSTANT: ELNRNG 48 +CONSTANT: EUNATCH 49 +CONSTANT: ENOCSI 50 +CONSTANT: EL2HLT 51 +CONSTANT: EBADE 52 +CONSTANT: EBADR 53 +CONSTANT: EXFULL 54 +CONSTANT: ENOANO 55 +CONSTANT: EBADRQC 56 +CONSTANT: EBADSLT 57 +ALIAS: EDEADLOCK EDEADLK +CONSTANT: EBFONT 59 +CONSTANT: ENOSTR 60 +CONSTANT: ENODATA 61 +CONSTANT: ETIME 62 +CONSTANT: ENOSR 63 +CONSTANT: ENONET 64 +CONSTANT: ENOPKG 65 +CONSTANT: EREMOTE 66 +CONSTANT: ENOLINK 67 +CONSTANT: EADV 68 +CONSTANT: ESRMNT 69 +CONSTANT: ECOMM 70 +CONSTANT: EPROTO 71 +CONSTANT: EMULTIHOP 72 +CONSTANT: EDOTDOT 73 +CONSTANT: EBADMSG 74 +CONSTANT: EOVERFLOW 75 +CONSTANT: ENOTUNIQ 76 +CONSTANT: EBADFD 77 +CONSTANT: EREMCHG 78 +CONSTANT: ELIBACC 79 +CONSTANT: ELIBBAD 80 +CONSTANT: ELIBSCN 81 +CONSTANT: ELIBMAX 82 +CONSTANT: ELIBEXEC 83 +CONSTANT: EILSEQ 84 +CONSTANT: ERESTART 85 +CONSTANT: ESTRPIPE 86 +CONSTANT: EUSERS 87 +CONSTANT: ENOTSOCK 88 +CONSTANT: EDESTADDRREQ 89 +CONSTANT: EMSGSIZE 90 +CONSTANT: EPROTOTYPE 91 +CONSTANT: ENOPROTOOPT 92 +CONSTANT: EPROTONOSUPPORT 93 +CONSTANT: ESOCKTNOSUPPORT 94 +CONSTANT: EOPNOTSUPP 95 +CONSTANT: EPFNOSUPPORT 96 +CONSTANT: EAFNOSUPPORT 97 +CONSTANT: EADDRINUSE 98 +CONSTANT: EADDRNOTAVAIL 99 +CONSTANT: ENETDOWN 100 +CONSTANT: ENETUNREACH 101 +CONSTANT: ENETRESET 102 +CONSTANT: ECONNABORTED 103 +CONSTANT: ECONNRESET 104 +CONSTANT: ENOBUFS 105 +CONSTANT: EISCONN 106 +CONSTANT: ENOTCONN 107 +CONSTANT: ESHUTDOWN 108 +CONSTANT: ETOOMANYREFS 109 +CONSTANT: ETIMEDOUT 110 +CONSTANT: ECONNREFUSED 111 +CONSTANT: EHOSTDOWN 112 +CONSTANT: EHOSTUNREACH 113 +CONSTANT: EALREADY 114 +CONSTANT: EINPROGRESS 115 +CONSTANT: ESTALE 116 +CONSTANT: EUCLEAN 117 +CONSTANT: ENOTNAM 118 +CONSTANT: ENAVAIL 119 +CONSTANT: EISNAM 120 +CONSTANT: EREMOTEIO 121 +CONSTANT: EDQUOT 122 +CONSTANT: ENOMEDIUM 123 +CONSTANT: EMEDIUMTYPE 124 +CONSTANT: ECANCELED 125 +CONSTANT: ENOKEY 126 +CONSTANT: EKEYEXPIRED 127 +CONSTANT: EKEYREVOKED 128 +CONSTANT: EKEYREJECTED 129 +CONSTANT: EOWNERDEAD 130 +CONSTANT: ENOTRECOVERABLE 131 diff --git a/basis/unix/process/process.factor b/basis/unix/process/process.factor index 04ba4d3438..ec782f5164 100644 --- a/basis/unix/process/process.factor +++ b/basis/unix/process/process.factor @@ -1,6 +1,6 @@ USING: kernel alien.c-types alien.strings sequences math alien.syntax unix vectors kernel namespaces continuations threads assocs vectors -io.backend.unix io.encodings.utf8 unix.utilities ; +io.backend.unix io.encodings.utf8 unix.utilities constants ; IN: unix.process ! Low-level Unix process launching utilities. These are used @@ -39,34 +39,34 @@ FUNCTION: int execve ( char* path, char** argv, char** envp ) ; [ [ fork-process dup zero? ] dip [ drop ] prepose ] dip if ; inline -: SIGKILL 9 ; inline -: SIGTERM 15 ; inline +CONSTANT: SIGKILL 9 +CONSTANT: SIGTERM 15 FUNCTION: int kill ( pid_t pid, int sig ) ; -: PRIO_PROCESS 0 ; inline -: PRIO_PGRP 1 ; inline -: PRIO_USER 2 ; inline +CONSTANT: PRIO_PROCESS 0 +CONSTANT: PRIO_PGRP 1 +CONSTANT: PRIO_USER 2 -: PRIO_MIN -20 ; inline -: PRIO_MAX 20 ; inline +CONSTANT: PRIO_MIN -20 +CONSTANT: PRIO_MAX 20 ! which/who = 0 for current process FUNCTION: int getpriority ( int which, int who ) ; FUNCTION: int setpriority ( int which, int who, int prio ) ; : set-priority ( n -- ) - 0 0 rot setpriority io-error ; + [ 0 0 ] dip setpriority io-error ; ! Flags for waitpid -: WNOHANG 1 ; inline -: WUNTRACED 2 ; inline +CONSTANT: WNOHANG 1 +CONSTANT: WUNTRACED 2 -: WSTOPPED 2 ; inline -: WEXITED 4 ; inline -: WCONTINUED 8 ; inline -: WNOWAIT HEX: 1000000 ; inline +CONSTANT: WSTOPPED 2 +CONSTANT: WEXITED 4 +CONSTANT: WCONTINUED 8 +CONSTANT: WNOWAIT HEX: 1000000 ! Examining status diff --git a/basis/unix/solaris/solaris.factor b/basis/unix/solaris/solaris.factor index 2bca20c6b6..267e89e98d 100644 --- a/basis/unix/solaris/solaris.factor +++ b/basis/unix/solaris/solaris.factor @@ -5,23 +5,23 @@ USING: alien.syntax system kernel ; ! Solaris. -: O_RDONLY HEX: 0000 ; inline -: O_WRONLY HEX: 0001 ; inline -: O_RDWR HEX: 0002 ; inline -: O_APPEND HEX: 0008 ; inline -: O_CREAT HEX: 0100 ; inline -: O_TRUNC HEX: 0200 ; inline +CONSTANT: O_RDONLY HEX: 0000 +CONSTANT: O_WRONLY HEX: 0001 +CONSTANT: O_RDWR HEX: 0002 +CONSTANT: O_APPEND HEX: 0008 +CONSTANT: O_CREAT HEX: 0100 +CONSTANT: O_TRUNC HEX: 0200 -: SEEK_END 2 ; inline +CONSTANT: SEEK_END 2 -: SOL_SOCKET HEX: ffff ; inline +CONSTANT: SOL_SOCKET HEX: ffff -: FD_SETSIZE cell 4 = 1024 65536 ? ; inline +CONSTANT: FD_SETSIZE cell 4 = 1024 65536 ? -: SO_REUSEADDR 4 ; inline -: SO_OOBINLINE HEX: 0100 ; inline -: SO_SNDTIMEO HEX: 1005 ; inline -: SO_RCVTIMEO HEX: 1006 ; inline +CONSTANT: SO_REUSEADDR 4 +CONSTANT: SO_OOBINLINE HEX: 0100 +CONSTANT: SO_SNDTIMEO HEX: 1005 +CONSTANT: SO_RCVTIMEO HEX: 1006 : F_SETFL 4 ; ! set file status flags : O_NONBLOCK HEX: 80 ; ! no delay @@ -58,24 +58,24 @@ C-STRUCT: sockaddr-un { "ushort" "family" } { { "char" max-un-path } "path" } ; -: EINTR 4 ; inline -: EAGAIN 11 ; inline -: EINPROGRESS 150 ; inline +CONSTANT: EINTR 4 +CONSTANT: EAGAIN 11 +CONSTANT: EINPROGRESS 150 -: SOCK_STREAM 2 ; inline -: SOCK_DGRAM 1 ; inline +CONSTANT: SOCK_STREAM 2 +CONSTANT: SOCK_DGRAM 1 -: AF_UNSPEC 0 ; inline -: AF_UNIX 1 ; inline -: AF_INET 2 ; inline -: AF_INET6 26 ; inline +CONSTANT: AF_UNSPEC 0 +CONSTANT: AF_UNIX 1 +CONSTANT: AF_INET 2 +CONSTANT: AF_INET6 26 -: PF_UNSPEC AF_UNSPEC ; inline -: PF_UNIX AF_UNIX ; inline -: PF_INET AF_INET ; inline -: PF_INET6 AF_INET6 ; inline +CONSTANT: PF_UNSPEC AF_UNSPEC +CONSTANT: PF_UNIX AF_UNIX +CONSTANT: PF_INET AF_INET +CONSTANT: PF_INET6 AF_INET6 -: IPPROTO_TCP 6 ; inline -: IPPROTO_UDP 17 ; inline +CONSTANT: IPPROTO_TCP 6 +CONSTANT: IPPROTO_UDP 17 -: AI_PASSIVE 8 ; inline +CONSTANT: AI_PASSIVE 8 diff --git a/basis/unix/stat/netbsd/32/32.factor b/basis/unix/stat/netbsd/32/32.factor index d6a60ba5c8..adf13a3845 100644 --- a/basis/unix/stat/netbsd/32/32.factor +++ b/basis/unix/stat/netbsd/32/32.factor @@ -25,5 +25,5 @@ C-STRUCT: stat FUNCTION: int __stat30 ( char* pathname, stat* buf ) ; FUNCTION: int __lstat30 ( char* pathname, stat* buf ) ; -: stat ( pathname buf -- n ) __stat30 ; inline -: lstat ( pathname buf -- n ) __lstat30 ; inline +CONSTANT: stat ( pathname buf -- n ) __stat30 +CONSTANT: lstat ( pathname buf -- n ) __lstat30 diff --git a/basis/unix/stat/netbsd/64/64.factor b/basis/unix/stat/netbsd/64/64.factor index 1a1f97507c..a832ff8d1c 100644 --- a/basis/unix/stat/netbsd/64/64.factor +++ b/basis/unix/stat/netbsd/64/64.factor @@ -25,5 +25,5 @@ C-STRUCT: stat FUNCTION: int __stat13 ( char* pathname, stat* buf ) ; FUNCTION: int __lstat13 ( char* pathname, stat* buf ) ; -: stat ( pathname buf -- n ) __stat13 ; inline -: lstat ( pathname buf -- n ) __lstat13 ; inline +CONSTANT: stat ( pathname buf -- n ) __stat13 +CONSTANT: lstat ( pathname buf -- n ) __lstat13 diff --git a/basis/unix/stat/stat.factor b/basis/unix/stat/stat.factor index a3f8a5ce82..5e7529fb82 100644 --- a/basis/unix/stat/stat.factor +++ b/basis/unix/stat/stat.factor @@ -1,19 +1,19 @@ USING: kernel system combinators alien.syntax alien.c-types -math io.backend.unix vocabs.loader unix ; +math io.backend.unix vocabs.loader unix constants ; IN: unix.stat ! File Types : S_IFMT OCT: 170000 ; ! These bits determine file type. -: S_IFDIR OCT: 40000 ; inline ! Directory. -: S_IFCHR OCT: 20000 ; inline ! Character device. -: S_IFBLK OCT: 60000 ; inline ! Block device. -: S_IFREG OCT: 100000 ; inline ! Regular file. -: S_IFIFO OCT: 010000 ; inline ! FIFO. -: S_IFLNK OCT: 120000 ; inline ! Symbolic link. -: S_IFSOCK OCT: 140000 ; inline ! Socket. -: S_IFWHT OCT: 160000 ; inline ! Whiteout. +CONSTANT: S_IFDIR OCT: 40000 ! Directory. +CONSTANT: S_IFCHR OCT: 20000 ! Character device. +CONSTANT: S_IFBLK OCT: 60000 ! Block device. +CONSTANT: S_IFREG OCT: 100000 ! Regular file. +CONSTANT: S_IFIFO OCT: 010000 ! FIFO. +CONSTANT: S_IFLNK OCT: 120000 ! Symbolic link. +CONSTANT: S_IFSOCK OCT: 140000 ! Socket. +CONSTANT: S_IFWHT OCT: 160000 ! Whiteout. FUNCTION: int chmod ( char* path, mode_t mode ) ; FUNCTION: int fchmod ( int fd, mode_t mode ) ; diff --git a/basis/unix/statfs/freebsd/freebsd.factor b/basis/unix/statfs/freebsd/freebsd.factor index 038178f6f8..e6a033e09d 100644 --- a/basis/unix/statfs/freebsd/freebsd.factor +++ b/basis/unix/statfs/freebsd/freebsd.factor @@ -3,9 +3,9 @@ USING: alien.syntax ; IN: unix.statfs.freebsd -: MFSNAMELEN 16 ; inline ! length of type name including null */ -: MNAMELEN 88 ; inline ! size of on/from name bufs -: STATFS_VERSION HEX: 20030518 ; inline ! current version number +CONSTANT: MFSNAMELEN 16 ! length of type name including null */ +CONSTANT: MNAMELEN 88 ! size of on/from name bufs +CONSTANT: STATFS_VERSION HEX: 20030518 ! current version number C-STRUCT: statfs { "uint32_t" "f_version" } diff --git a/basis/unix/statfs/openbsd/openbsd.factor b/basis/unix/statfs/openbsd/openbsd.factor index 378e335c11..f495f2af4e 100644 --- a/basis/unix/statfs/openbsd/openbsd.factor +++ b/basis/unix/statfs/openbsd/openbsd.factor @@ -3,8 +3,8 @@ USING: alien.syntax ; IN: unix.statfs.openbsd -: MFSNAMELEN 16 ; inline -: MNAMELEN 90 ; inline +CONSTANT: MFSNAMELEN 16 +CONSTANT: MNAMELEN 90 C-STRUCT: statfs { "u_int32_t" "f_flags" } diff --git a/basis/unix/statvfs/freebsd/freebsd.factor b/basis/unix/statvfs/freebsd/freebsd.factor index 7d1a6afb61..a2a3168464 100644 --- a/basis/unix/statvfs/freebsd/freebsd.factor +++ b/basis/unix/statvfs/freebsd/freebsd.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax ; +USING: alien.syntax constants ; IN: unix.statvfs.freebsd C-STRUCT: statvfs @@ -17,7 +17,7 @@ C-STRUCT: statvfs { "ulong" "f_namemax" } ; ! Flags -: ST_RDONLY HEX: 1 ; inline ! Read-only file system -: ST_NOSUID HEX: 2 ; inline ! Does not honor setuid/setgid +CONSTANT: ST_RDONLY HEX: 1 ! Read-only file system +CONSTANT: ST_NOSUID HEX: 2 ! Does not honor setuid/setgid FUNCTION: int statvfs ( char* path, statvfs* buf ) ; diff --git a/basis/unix/statvfs/linux/linux.factor b/basis/unix/statvfs/linux/linux.factor index 3bfbffa197..c92fef6aaa 100644 --- a/basis/unix/statvfs/linux/linux.factor +++ b/basis/unix/statvfs/linux/linux.factor @@ -19,13 +19,13 @@ C-STRUCT: statvfs64 FUNCTION: int statvfs64 ( char* path, statvfs64* buf ) ; -: ST_RDONLY 1 ; inline ! Mount read-only. -: ST_NOSUID 2 ; inline ! Ignore suid and sgid bits. -: ST_NODEV 4 ; inline ! Disallow access to device special files. -: ST_NOEXEC 8 ; inline ! Disallow program execution. -: ST_SYNCHRONOUS 16 ; inline ! Writes are synced at once. -: ST_MANDLOCK 64 ; inline ! Allow mandatory locks on an FS. -: ST_WRITE 128 ; inline ! Write on file/directory/symlink. -: ST_APPEND 256 ; inline ! Append-only file. -: ST_IMMUTABLE 512 ; inline ! Immutable file. -: ST_NOATIME 1024 ; inline ! Do not update access times. +CONSTANT: ST_RDONLY 1 ! Mount read-only. +CONSTANT: ST_NOSUID 2 ! Ignore suid and sgid bits. +CONSTANT: ST_NODEV 4 ! Disallow access to device special files. +CONSTANT: ST_NOEXEC 8 ! Disallow program execution. +CONSTANT: ST_SYNCHRONOUS 16 ! Writes are synced at once. +CONSTANT: ST_MANDLOCK 64 ! Allow mandatory locks on an FS. +CONSTANT: ST_WRITE 128 ! Write on file/directory/symlink. +CONSTANT: ST_APPEND 256 ! Append-only file. +CONSTANT: ST_IMMUTABLE 512 ! Immutable file. +CONSTANT: ST_NOATIME 1024 ! Do not update access times. diff --git a/basis/unix/statvfs/macosx/macosx.factor b/basis/unix/statvfs/macosx/macosx.factor index 7078ff9f33..fc85b9d9dc 100644 --- a/basis/unix/statvfs/macosx/macosx.factor +++ b/basis/unix/statvfs/macosx/macosx.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax ; +USING: alien.syntax constants ; IN: unix.statvfs.macosx C-STRUCT: statvfs @@ -17,7 +17,7 @@ C-STRUCT: statvfs { "ulong" "f_namemax" } ; ! Flags -: ST_RDONLY HEX: 1 ; inline ! Read-only file system -: ST_NOSUID HEX: 2 ; inline ! Does not honor setuid/setgid +CONSTANT: ST_RDONLY HEX: 1 ! Read-only file system +CONSTANT: ST_NOSUID HEX: 2 ! Does not honor setuid/setgid FUNCTION: int statvfs ( char* path, statvfs* buf ) ; diff --git a/basis/unix/statvfs/netbsd/netbsd.factor b/basis/unix/statvfs/netbsd/netbsd.factor index cf575c74b1..e3e54fb4e2 100644 --- a/basis/unix/statvfs/netbsd/netbsd.factor +++ b/basis/unix/statvfs/netbsd/netbsd.factor @@ -1,33 +1,33 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax ; +USING: alien.syntax constants ; IN: unix.statvfs.netbsd -: _VFS_NAMELEN 32 ; inline -: _VFS_MNAMELEN 1024 ; inline +CONSTANT: _VFS_NAMELEN 32 +CONSTANT: _VFS_MNAMELEN 1024 C-STRUCT: statvfs - { "ulong" "f_flag" } + { "ulong" "f_flag" } { "ulong" "f_bsize" } - { "ulong" "f_frsize" } - { "ulong" "f_iosize" } - { "fsblkcnt_t" "f_blocks" } - { "fsblkcnt_t" "f_bfree" } - { "fsblkcnt_t" "f_bavail" } - { "fsblkcnt_t" "f_bresvd" } + { "ulong" "f_frsize" } + { "ulong" "f_iosize" } + { "fsblkcnt_t" "f_blocks" } + { "fsblkcnt_t" "f_bfree" } + { "fsblkcnt_t" "f_bavail" } + { "fsblkcnt_t" "f_bresvd" } { "fsfilcnt_t" "f_files" } { "fsfilcnt_t" "f_ffree" } - { "fsfilcnt_t" "f_favail" } - { "fsfilcnt_t" "f_fresvd" } - { "uint64_t" "f_syncreads" } - { "uint64_t" "f_syncwrites" } - { "uint64_t" "f_asyncreads" } - { "uint64_t" "f_asyncwrites" } + { "fsfilcnt_t" "f_favail" } + { "fsfilcnt_t" "f_fresvd" } + { "uint64_t" "f_syncreads" } + { "uint64_t" "f_syncwrites" } + { "uint64_t" "f_asyncreads" } + { "uint64_t" "f_asyncwrites" } { "fsid_t" "f_fsidx" } { "ulong" "f_fsid" } - { "ulong" "f_namemax" } + { "ulong" "f_namemax" } { "uid_t" "f_owner" } - { { "uint32_t" 4 } "f_spare" } + { { "uint32_t" 4 } "f_spare" } { { "char" _VFS_NAMELEN } "f_fstypename" } { { "char" _VFS_MNAMELEN } "f_mntonname" } { { "char" _VFS_MNAMELEN } "f_mntfromname" } ; diff --git a/basis/unix/statvfs/openbsd/openbsd.factor b/basis/unix/statvfs/openbsd/openbsd.factor index 3f9353f926..76c2af9127 100644 --- a/basis/unix/statvfs/openbsd/openbsd.factor +++ b/basis/unix/statvfs/openbsd/openbsd.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax ; +USING: alien.syntax constants ; IN: unix.statvfs.openbsd C-STRUCT: statvfs @@ -16,7 +16,7 @@ C-STRUCT: statvfs { "ulong" "f_flag" } { "ulong" "f_namemax" } ; -: ST_RDONLY 1 ; inline -: ST_NOSUID 2 ; inline +CONSTANT: ST_RDONLY 1 +CONSTANT: ST_NOSUID 2 FUNCTION: int statvfs ( char* path, statvfs* buf ) ; diff --git a/basis/unix/unix.factor b/basis/unix/unix.factor index 8e73a212d9..c0e496a041 100644 --- a/basis/unix/unix.factor +++ b/basis/unix/unix.factor @@ -168,7 +168,7 @@ FUNCTION: int readdir_r ( void* dirp, dirent* entry, dirent** result ) ; FUNCTION: ssize_t readlink ( char* path, char* buf, size_t bufsize ) ; -: PATH_MAX 1024 ; inline +CONSTANT: PATH_MAX 1024 : read-symbolic-link ( path -- path ) PATH_MAX dup [ diff --git a/basis/unix/utmpx/utmpx.factor b/basis/unix/utmpx/utmpx.factor index e1756daa00..6b70ceee2e 100644 --- a/basis/unix/utmpx/utmpx.factor +++ b/basis/unix/utmpx/utmpx.factor @@ -6,18 +6,18 @@ unix calendar system accessors unix.time calendar.unix vocabs.loader ; IN: unix.utmpx -: EMPTY 0 ; inline -: RUN_LVL 1 ; inline -: BOOT_TIME 2 ; inline -: OLD_TIME 3 ; inline -: NEW_TIME 4 ; inline -: INIT_PROCESS 5 ; inline -: LOGIN_PROCESS 6 ; inline -: USER_PROCESS 7 ; inline -: DEAD_PROCESS 8 ; inline -: ACCOUNTING 9 ; inline -: SIGNATURE 10 ; inline -: SHUTDOWN_TIME 11 ; inline +CONSTANT: EMPTY 0 +CONSTANT: RUN_LVL 1 +CONSTANT: BOOT_TIME 2 +CONSTANT: OLD_TIME 3 +CONSTANT: NEW_TIME 4 +CONSTANT: INIT_PROCESS 5 +CONSTANT: LOGIN_PROCESS 6 +CONSTANT: USER_PROCESS 7 +CONSTANT: DEAD_PROCESS 8 +CONSTANT: ACCOUNTING 9 +CONSTANT: SIGNATURE 10 +CONSTANT: SHUTDOWN_TIME 11 FUNCTION: void setutxent ( ) ; FUNCTION: void endutxent ( ) ; diff --git a/basis/windows/ole32/ole32.factor b/basis/windows/ole32/ole32.factor index 6d4e60ab22..05a306640d 100755 --- a/basis/windows/ole32/ole32.factor +++ b/basis/windows/ole32/ole32.factor @@ -131,7 +131,7 @@ M: ole32-error error. : guid= ( a b -- ? ) [ 16 memory>byte-array ] bi@ = ; -: GUID-STRING-LENGTH +: GUID-STRING-LENGTH ( -- n ) "{01234567-89ab-cdef-0123-456789abcdef}" length ; inline :: (guid-section>guid) ( string guid start end quot -- ) diff --git a/basis/xml-rpc/xml-rpc-docs.factor b/basis/xml-rpc/xml-rpc-docs.factor index 8c20df1fd0..d812e8503b 100644 --- a/basis/xml-rpc/xml-rpc-docs.factor +++ b/basis/xml-rpc/xml-rpc-docs.factor @@ -21,7 +21,7 @@ HELP: base64 { $see-also } ; HELP: -{ $values { "name" "a string" } { "params" "a sequence" } } +{ $values { "name" "a string" } { "params" "a sequence" } { "rpc-method" rpc-method } } { $description "creates a tuple reprsenting a method call which can be translated using send-rpc into an XML-RPC document" } { $see-also rpc-method } ; @@ -30,7 +30,7 @@ HELP: rpc-method { $see-also rpc-response rpc-fault } ; HELP: -{ $values { "params" "a sequence" } } +{ $values { "params" "a sequence" } { "rpc-response" rpc-response } } { $description "creates a tuple representing a data response in XML-RPC" } { $see-also rpc-response } ; @@ -39,7 +39,7 @@ HELP: rpc-response { $see-also rpc-method rpc-fault } ; HELP: -{ $values { "code" "an integer" } { "string" "a string" } } +{ $values { "code" "an integer" } { "string" "a string" } { "rpc-fault" rpc-fault } } { $description "creates a tuple representing an exception in RPC, to be returned to the caller. The code is a number representing what type of error it is, and the string is a description" } { $see-also rpc-fault } ; diff --git a/basis/xml/xml-docs.factor b/basis/xml/xml-docs.factor index 6d5a7f810f..16a817d628 100644 --- a/basis/xml/xml-docs.factor +++ b/basis/xml/xml-docs.factor @@ -113,7 +113,7 @@ HELP: name { $see-also tag } ; HELP: -{ $values { "space" "a string" } { "tag" "a string" } { "url" "a string" } +{ $values { "space" "a string" } { "main" "a string" } { "url" "a string" } { "name" "an XML tag name" } } { $description "creates a name tuple with the name-space space and the tag-name tag and the tag-url url." } { $see-also name } ; @@ -135,7 +135,7 @@ HELP: xml HELP: { $values { "prolog" "an XML prolog" } { "before" "a sequence of XML elements" } -{ "main" tag } { "after" "a sequence of XML elements" } { "xml" "an XML document" } } +{ "body" tag } { "after" "a sequence of XML elements" } { "xml" "an XML document" } } { $description "creates an XML document, delegating to the main tag, with the specified prolog, before, and after" } { $see-also xml } ; diff --git a/core/continuations/continuations-docs.factor b/core/continuations/continuations-docs.factor index 3632482162..ea3470feb3 100644 --- a/core/continuations/continuations-docs.factor +++ b/core/continuations/continuations-docs.factor @@ -221,10 +221,6 @@ HELP: assert-depth { $values { "quot" "a quotation" } } { $description "Runs a quotation. Throws an error if the quotation attempts to take input values from the stack, or leave outputs on the stack." } ; -HELP: -{ $description "Constructs a new continuation." } -{ $notes "User code should call " { $link continuation } " instead." } ; - HELP: attempt-all { $values { "seq" sequence } { "quot" quotation } diff --git a/core/io/streams/c/c-docs.factor b/core/io/streams/c/c-docs.factor index 09dcb31458..41cc878c79 100644 --- a/core/io/streams/c/c-docs.factor +++ b/core/io/streams/c/c-docs.factor @@ -21,12 +21,12 @@ ARTICLE: "io.streams.c" "ANSI C streams" ABOUT: "io.streams.c" HELP: -{ $values { "in" "a C FILE* handle" } { "stream" "a new stream" } } +{ $values { "handle" "a C FILE* handle" } { "stream" "a new stream" } } { $description "Creates a stream which reads data by calling C standard library functions." } { $notes "Usually C streams are only used during bootstrap, and non-blocking OS-specific I/O routines are used during normal operation." } ; HELP: -{ $values { "out" "a C FILE* handle" } { "stream" "a new stream" } } +{ $values { "handle" "a C FILE* handle" } { "stream" "a new stream" } } { $description "Creates a stream which writes data by calling C standard library functions." } { $notes "Usually C streams are only used during bootstrap, and non-blocking OS-specific I/O routines are used during normal operation." } ; diff --git a/core/sequences/sequences-docs.factor b/core/sequences/sequences-docs.factor index 6e3a06da26..b3df0b889f 100644 --- a/core/sequences/sequences-docs.factor +++ b/core/sequences/sequences-docs.factor @@ -191,6 +191,10 @@ HELP: exchange-unsafe { $values { "m" "a non-negative integer" } { "n" "a non-negative integer" } { "seq" "a mutable sequence" } } { $description "Unsafe variant of " { $link exchange } " that does not perform bounds checks." } ; +HELP: first-unsafe +{ $values { "seq" sequence } { "first" "the first element" } } +{ $contract "Unsafe variant of " { $link first } " that does not perform bounds checks." } ; + HELP: first2-unsafe { $values { "seq" sequence } { "first" "the first element" } { "second" "the second element" } } { $contract "Unsafe variant of " { $link first2 } " that does not perform bounds checks." } ; diff --git a/core/sequences/sequences.factor b/core/sequences/sequences.factor index 865a074ad3..31c7c8a4d7 100644 --- a/core/sequences/sequences.factor +++ b/core/sequences/sequences.factor @@ -101,16 +101,16 @@ M: integer nth-unsafe drop ; INSTANCE: integer immutable-sequence -: first-unsafe ( seq -- elt ) +: first-unsafe ( seq -- first ) 0 swap nth-unsafe ; inline -: first2-unsafe ( seq -- elt1 elt2 ) +: first2-unsafe ( seq -- first second ) [ first-unsafe ] [ 1 swap nth-unsafe ] bi ; inline -: first3-unsafe ( seq -- elt1 elt2 elt3 ) +: first3-unsafe ( seq -- first second third ) [ first2-unsafe ] [ 2 swap nth-unsafe ] bi ; inline -: first4-unsafe ( seq -- elt1 elt2 elt3 elt4 ) +: first4-unsafe ( seq -- first second third fourth ) [ first3-unsafe ] [ 3 swap nth-unsafe ] bi ; inline : exchange-unsafe ( m n seq -- ) diff --git a/core/words/words-docs.factor b/core/words/words-docs.factor index 1db322f8c3..389f16c68e 100644 --- a/core/words/words-docs.factor +++ b/core/words/words-docs.factor @@ -344,6 +344,6 @@ HELP: make-inline { $side-effects "word" } ; HELP: define-inline -{ $values { "word" word } { "quot" quotation } { "effect" effect } } +{ $values { "word" word } { "def" quotation } { "effect" effect } } { $description "Defines a word and makes it " { $link POSTPONE: inline } "." } { $side-effects "word" } ; diff --git a/extra/assoc-heaps/assoc-heaps-docs.factor b/extra/assoc-heaps/assoc-heaps-docs.factor index 8beaf9c4b1..e5636dee3e 100644 --- a/extra/assoc-heaps/assoc-heaps-docs.factor +++ b/extra/assoc-heaps/assoc-heaps-docs.factor @@ -4,17 +4,15 @@ USING: help.markup help.syntax io.streams.string ; IN: assoc-heaps HELP: +{ $values { "assoc" assoc } { "heap" heap } } { $description "Constructs a new " { $link assoc-heap } " from two existing data structures." } ; HELP: -{ $values - - { "unique-heap" assoc-heap } } +{ $values { "unique-heap" assoc-heap } } { $description "Creates a new " { $link assoc-heap } " where the assoc is a hashtable and the heap is a max-heap. Popping an element from the heap leaves this element in the hashtable to ensure that the element will not be processed again." } ; HELP: -{ $values - { "unique-heap" assoc-heap } } +{ $values { "unique-heap" assoc-heap } } { $description "Creates a new " { $link assoc-heap } " where the assoc is a hashtable and the heap is a min-heap. Popping an element from the heap leaves this element in the hashtable to ensure that the element will not be processed again." } ; { } related-words From 75389287540706a40c9761820524897c3fb7cf2a Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 16 Dec 2008 01:33:51 -0600 Subject: [PATCH 39/58] game-input doesnt need a backend, now loads dinput or iokit directly --- extra/game-input/backend/backend.factor | 21 ------------------- extra/game-input/backend/iokit/authors.txt | 1 - extra/game-input/backend/summary.txt | 1 - extra/game-input/backend/tags.txt | 1 - .../{backend => dinput}/authors.txt | 0 .../{backend => }/dinput/dinput.factor | 10 ++++----- .../dinput/keys-array/keys-array.factor | 2 +- .../{backend => }/dinput/summary.txt | 0 .../game-input/{backend => }/dinput/tags.txt | 0 extra/game-input/game-input.factor | 16 +++++++------- .../{backend/dinput => iokit}/authors.txt | 0 .../{backend => }/iokit/iokit.factor | 7 ++++--- .../{backend => }/iokit/summary.txt | 0 extra/game-input/{backend => }/iokit/tags.txt | 0 14 files changed, 18 insertions(+), 41 deletions(-) delete mode 100644 extra/game-input/backend/backend.factor delete mode 100644 extra/game-input/backend/iokit/authors.txt delete mode 100644 extra/game-input/backend/summary.txt delete mode 100755 extra/game-input/backend/tags.txt rename extra/game-input/{backend => dinput}/authors.txt (100%) mode change 100644 => 100755 rename extra/game-input/{backend => }/dinput/dinput.factor (98%) rename extra/game-input/{backend => }/dinput/keys-array/keys-array.factor (88%) rename extra/game-input/{backend => }/dinput/summary.txt (100%) rename extra/game-input/{backend => }/dinput/tags.txt (100%) rename extra/game-input/{backend/dinput => iokit}/authors.txt (100%) mode change 100755 => 100644 rename extra/game-input/{backend => }/iokit/iokit.factor (98%) rename extra/game-input/{backend => }/iokit/summary.txt (100%) rename extra/game-input/{backend => }/iokit/tags.txt (100%) diff --git a/extra/game-input/backend/backend.factor b/extra/game-input/backend/backend.factor deleted file mode 100644 index df61179da7..0000000000 --- a/extra/game-input/backend/backend.factor +++ /dev/null @@ -1,21 +0,0 @@ -USING: eval multiline system combinators ; -IN: game-input.backend - -STRING: set-backend-for-macosx -USING: namespaces parser game-input.backend.iokit ; -<< "game-input" (use+) >> -iokit-game-input-backend game-input-backend set-global -; - -STRING: set-backend-for-windows -USING: namespaces parser game-input.backend.dinput ; -<< "game-input" (use+) >> -dinput-game-input-backend game-input-backend set-global -; - -{ - { [ os macosx? ] [ set-backend-for-macosx eval ] } - { [ os windows? ] [ set-backend-for-windows eval ] } - { [ t ] [ ] } -} cond - diff --git a/extra/game-input/backend/iokit/authors.txt b/extra/game-input/backend/iokit/authors.txt deleted file mode 100644 index f13c9c1e77..0000000000 --- a/extra/game-input/backend/iokit/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Joe Groff diff --git a/extra/game-input/backend/summary.txt b/extra/game-input/backend/summary.txt deleted file mode 100644 index 6a77f8e1e0..0000000000 --- a/extra/game-input/backend/summary.txt +++ /dev/null @@ -1 +0,0 @@ -Platform-specific backends for game-input diff --git a/extra/game-input/backend/tags.txt b/extra/game-input/backend/tags.txt deleted file mode 100755 index 84d4140a70..0000000000 --- a/extra/game-input/backend/tags.txt +++ /dev/null @@ -1 +0,0 @@ -games diff --git a/extra/game-input/backend/authors.txt b/extra/game-input/dinput/authors.txt old mode 100644 new mode 100755 similarity index 100% rename from extra/game-input/backend/authors.txt rename to extra/game-input/dinput/authors.txt diff --git a/extra/game-input/backend/dinput/dinput.factor b/extra/game-input/dinput/dinput.factor similarity index 98% rename from extra/game-input/backend/dinput/dinput.factor rename to extra/game-input/dinput/dinput.factor index b66a722258..d89e23db2b 100755 --- a/extra/game-input/backend/dinput/dinput.factor +++ b/extra/game-input/dinput/dinput.factor @@ -1,16 +1,16 @@ USING: windows.dinput windows.dinput.constants parser symbols alien.c-types windows.ole32 namespaces assocs kernel arrays vectors windows.kernel32 windows.com windows.dinput shuffle -windows.user32 windows.messages sequences combinators +windows.user32 windows.messages sequences combinators locals math.geometry.rect ui.windows accessors math windows alien alien.strings io.encodings.utf16 io.encodings.utf16n -continuations byte-arrays locals -game-input.backend.dinput.keys-array ; -<< "game-input" (use+) >> -IN: game-input.backend.dinput +continuations byte-arrays game-input.dinput.keys-array ; +IN: game-input.dinput SINGLETON: dinput-game-input-backend +dinput-game-input-backend game-input-backend set-global + SYMBOLS: +dinput+ +keyboard-device+ +keyboard-state+ +controller-devices+ +controller-guids+ +device-change-window+ +device-change-handle+ ; diff --git a/extra/game-input/backend/dinput/keys-array/keys-array.factor b/extra/game-input/dinput/keys-array/keys-array.factor similarity index 88% rename from extra/game-input/backend/dinput/keys-array/keys-array.factor rename to extra/game-input/dinput/keys-array/keys-array.factor index b2dbe9ad93..12ad072449 100755 --- a/extra/game-input/backend/dinput/keys-array/keys-array.factor +++ b/extra/game-input/dinput/keys-array/keys-array.factor @@ -1,6 +1,6 @@ USING: sequences sequences.private math alien.c-types accessors ; -IN: game-input.backend.dinput.keys-array +IN: game-input.dinput.keys-array TUPLE: keys-array underlying ; C: keys-array diff --git a/extra/game-input/backend/dinput/summary.txt b/extra/game-input/dinput/summary.txt similarity index 100% rename from extra/game-input/backend/dinput/summary.txt rename to extra/game-input/dinput/summary.txt diff --git a/extra/game-input/backend/dinput/tags.txt b/extra/game-input/dinput/tags.txt similarity index 100% rename from extra/game-input/backend/dinput/tags.txt rename to extra/game-input/dinput/tags.txt diff --git a/extra/game-input/game-input.factor b/extra/game-input/game-input.factor index 18ec04df1f..7699b8bd1e 100755 --- a/extra/game-input/game-input.factor +++ b/extra/game-input/game-input.factor @@ -1,5 +1,6 @@ -USING: arrays accessors continuations kernel symbols -combinators.lib sequences namespaces init vocabs ; +USING: arrays accessors continuations kernel symbols system +combinators.lib sequences namespaces init vocabs vocabs.loader +combinators ; IN: game-input SYMBOLS: game-input-backend game-input-opened ; @@ -19,10 +20,6 @@ M: f (reset-game-input) ; game-input-opened off (reset-game-input) ; -: load-game-input-backend ( -- ) - game-input-backend get - [ "game-input.backend" load-vocab drop ] unless ; - [ reset-game-input ] "game-input" add-init-hook PRIVATE> @@ -76,5 +73,8 @@ M: keyboard-state clone HOOK: read-keyboard game-input-backend ( -- keyboard-state ) -load-game-input-backend - +{ + { [ os windows? ] [ "game-input.dinput" require ] } + { [ os macosx? ] [ "game-input.iokit" require ] } + { [ t ] [ ] } +} cond diff --git a/extra/game-input/backend/dinput/authors.txt b/extra/game-input/iokit/authors.txt old mode 100755 new mode 100644 similarity index 100% rename from extra/game-input/backend/dinput/authors.txt rename to extra/game-input/iokit/authors.txt diff --git a/extra/game-input/backend/iokit/iokit.factor b/extra/game-input/iokit/iokit.factor similarity index 98% rename from extra/game-input/backend/iokit/iokit.factor rename to extra/game-input/iokit/iokit.factor index 5267dd6d6e..8bfce00fb0 100755 --- a/extra/game-input/backend/iokit/iokit.factor +++ b/extra/game-input/iokit/iokit.factor @@ -3,12 +3,13 @@ kernel cocoa.enumeration destructors math.parser cocoa.application sequences locals combinators.short-circuit threads symbols namespaces assocs vectors arrays combinators core-foundation.run-loop accessors sequences.private -alien.c-types math parser ; -<< "game-input" (use+) >> -IN: game-input.backend.iokit +alien.c-types math parser game-input ; +IN: game-input.iokit SINGLETON: iokit-game-input-backend +iokit-game-input-backend game-input-backend set-global + : hid-manager-matching ( matching-seq -- alien ) f 0 IOHIDManagerCreate [ swap >plist IOHIDManagerSetDeviceMatchingMultiple ] diff --git a/extra/game-input/backend/iokit/summary.txt b/extra/game-input/iokit/summary.txt similarity index 100% rename from extra/game-input/backend/iokit/summary.txt rename to extra/game-input/iokit/summary.txt diff --git a/extra/game-input/backend/iokit/tags.txt b/extra/game-input/iokit/tags.txt similarity index 100% rename from extra/game-input/backend/iokit/tags.txt rename to extra/game-input/iokit/tags.txt From b8406f709e00deecfdd1de9894c6a6a5546f2b2c Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 16 Dec 2008 01:50:25 -0600 Subject: [PATCH 40/58] fix load error in ftp, refactor --- basis/ftp/server/server.factor | 46 ++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/basis/ftp/server/server.factor b/basis/ftp/server/server.factor index d71179d599..f6d5013ed0 100644 --- a/basis/ftp/server/server.factor +++ b/basis/ftp/server/server.factor @@ -8,7 +8,7 @@ sequences ftp io.launcher.unix.parser unicode.case splitting assocs classes io.servers.connection destructors calendar io.timeouts io.streams.duplex threads continuations math concurrency.promises byte-arrays io.backend tools.hexdump -tools.files io.streams.string ; +tools.files io.streams.string math.bitwise ; IN: ftp.server TUPLE: ftp-client url mode state command-promise user password ; @@ -49,7 +49,7 @@ C: ftp-list [ >>raw ] [ tokenize-command >>tokenized ] bi ; : (send-response) ( n string separator -- ) - rot number>string write write ftp-send ; + [ number>string write ] 2dip write ftp-send ; : send-response ( ftp-response -- ) [ n>> ] [ strings>> ] bi @@ -102,7 +102,7 @@ ERROR: type-error type ; : handle-TYPE ( obj -- ) [ tokenized>> second parse-type - 200 "Switching to " rot " mode" 3append server-response + [ 200 ] dip "Switching to " " mode" surround server-response ] [ 2drop "TYPE is binary only" ftp-error ] recover ; @@ -111,11 +111,11 @@ ERROR: type-error type ; remote-address get class new 0 >>port binary ; : port>bytes ( port -- hi lo ) - [ -8 shift ] keep [ HEX: ff bitand ] bi@ ; + [ -8 shift ] keep [ 8 bits ] bi@ ; : handle-PWD ( obj -- ) drop - 257 current-directory get "\"" "\"" surround server-response ; + 257 current-directory get "\"" dup surround server-response ; : handle-SYST ( obj -- ) drop @@ -155,15 +155,19 @@ M: ftp-list service-command ( stream obj -- ) finish-directory ; : transfer-outgoing-file ( path -- ) - 150 "Opening BINARY mode data connection for " - rot - [ file-name ] [ - " " swap file-info size>> number>string - "(" " bytes)." surround append - ] bi 3append server-response ; + [ + 150 + "Opening BINARY mode data connection for " + ] dip + [ + file-name + ] [ + file-info size>> number>string + "(" " bytes)." surround + ] bi " " glue append server-response ; : transfer-incoming-file ( path -- ) - 150 "Opening BINARY mode data connection for " rot append + [ 150 ] dip "Opening BINARY mode data connection for " prepend server-response ; : finish-file-transfer ( -- ) @@ -209,8 +213,9 @@ M: ftp-put service-command ( stream obj -- ) : handle-SIZE ( obj -- ) [ + [ 213 ] dip tokenized>> second file-info size>> - 213 swap number>string server-response + number>string server-response ] [ 2drop 550 "Could not get file size" server-response @@ -228,21 +233,20 @@ M: ftp-put service-command ( stream obj -- ) : handle-PASV ( obj -- ) drop client get passive >>mode drop - expect-connection - [ - "Entering Passive Mode (127,0,0,1," % - port>bytes [ number>string ] bi@ "," glue % - ")" % - ] "" make 227 swap server-response ; + 221 + expect-connection port>bytes [ number>string ] bi@ "," glue + "Entering Passive Mode (127,0,0,1," ")" surround + server-response ; : handle-EPSV ( obj -- ) drop client get command-promise>> [ "You already have a passive stream" ftp-error ] [ - 229 "Entering Extended Passive Mode (|||" + 229 expect-connection number>string - "|)" 3append server-response + "Entering Extended Passive Mode (|||" "|)" surround + server-response ] if ; ! LPRT 6,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,242,186 From b796529be417d1b007632ca2a44490b0de312109 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 16 Dec 2008 01:54:05 -0600 Subject: [PATCH 41/58] add unportable tag --- basis/editors/textpad/tags.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 basis/editors/textpad/tags.txt diff --git a/basis/editors/textpad/tags.txt b/basis/editors/textpad/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/editors/textpad/tags.txt @@ -0,0 +1 @@ +unportable From 7926cab415ebd65fda3ca76cb2d30568b9caf1b7 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 16 Dec 2008 02:03:04 -0600 Subject: [PATCH 42/58] Fix Linux load error --- basis/unix/linux/epoll/epoll.factor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/basis/unix/linux/epoll/epoll.factor b/basis/unix/linux/epoll/epoll.factor index 1a42765ee8..ebc3ab8bd1 100644 --- a/basis/unix/linux/epoll/epoll.factor +++ b/basis/unix/linux/epoll/epoll.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. IN: unix.linux.epoll -USING: alien.syntax math ; +USING: alien.syntax math constants ; FUNCTION: int epoll_create ( int size ) ; @@ -28,5 +28,5 @@ CONSTANT: EPOLLWRBAND HEX: 200 CONSTANT: EPOLLMSG HEX: 400 CONSTANT: EPOLLERR HEX: 008 CONSTANT: EPOLLHUP HEX: 010 -CONSTANT: EPOLLONESHOT 30 2^ -CONSTANT: EPOLLET 31 2^ +: EPOLLONESHOT ( -- n ) 30 2^ ; inline +: EPOLLET ( -- n ) 31 2^ ; inline From 97fd662d618b4cedb0f7c3343f6c4b14334f61bd Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 16 Dec 2008 02:03:21 -0600 Subject: [PATCH 43/58] Clean up PPC backend a bit --- basis/cpu/ppc/assembler/assembler.factor | 2 +- .../cpu/ppc/assembler/backend/backend.factor | 4 +- basis/cpu/ppc/ppc.factor | 49 ++++++++++--------- 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/basis/cpu/ppc/assembler/assembler.factor b/basis/cpu/ppc/assembler/assembler.factor index 6711c139b9..0bb0d70ee0 100644 --- a/basis/cpu/ppc/assembler/assembler.factor +++ b/basis/cpu/ppc/assembler/assembler.factor @@ -204,6 +204,6 @@ MTSPR: CTR 9 : (SRWI) ( d a b -- d a b x y ) 32 over - swap 31 ; inline : SRWI ( d a b -- ) (SRWI) RLWINM ; : SRWI. ( d a b -- ) (SRWI) RLWINM. ; -: LOAD32 ( n r -- ) >r w>h/h r> tuck LIS dup rot ORI ; +: LOAD32 ( n r -- ) [ w>h/h ] dip tuck LIS dup rot ORI ; : immediate? ( n -- ? ) HEX: -8000 HEX: 7fff between? ; : LOAD ( n r -- ) over immediate? [ LI ] [ LOAD32 ] if ; diff --git a/basis/cpu/ppc/assembler/backend/backend.factor b/basis/cpu/ppc/assembler/backend/backend.factor index 881b094ca2..a2c3a6c8d5 100644 --- a/basis/cpu/ppc/assembler/backend/backend.factor +++ b/basis/cpu/ppc/assembler/backend/backend.factor @@ -79,8 +79,8 @@ M: label (B) 0 -rot (B) rc-relative-ppc-3 label-fixup ; GENERIC: BC ( a b c -- ) M: integer BC 0 0 16 b-insn ; -M: word BC >r 0 BC r> rc-relative-ppc-2 rel-word ; -M: label BC >r 0 BC r> rc-relative-ppc-2 label-fixup ; +M: word BC [ 0 BC ] dip rc-relative-ppc-2 rel-word ; +M: label BC [ 0 BC ] dip rc-relative-ppc-2 label-fixup ; : CREATE-B ( -- word ) scan "B" prepend create-in ; diff --git a/basis/cpu/ppc/ppc.factor b/basis/cpu/ppc/ppc.factor index c555c4b809..232608e4ef 100644 --- a/basis/cpu/ppc/ppc.factor +++ b/basis/cpu/ppc/ppc.factor @@ -467,19 +467,21 @@ M: ppc %gc M: ppc %prologue ( n -- ) 0 11 LOAD32 rc-absolute-ppc-2/2 rel-this 0 MFLR - 1 1 pick neg ADDI - 11 1 pick xt-save STW - dup 11 LI - 11 1 pick next-save STW - 0 1 rot lr-save + STW ; + { + [ [ 1 1 ] dip neg ADDI ] + [ [ 11 1 ] dip xt-save STW ] + [ 11 LI ] + [ [ 11 1 ] dip next-save STW ] + [ [ 0 1 ] dip lr-save + STW ] + } cleave ; M: ppc %epilogue ( n -- ) #! At the end of each word that calls a subroutine, we store #! the previous link register value in r0 by popping it off #! the stack, set the link register to the contents of r0, #! and jump to the link register. - 0 1 pick lr-save + LWZ - 1 1 rot ADDI + [ [ 0 1 ] dip lr-save + LWZ ] + [ [ 1 1 ] dip ADDI ] bi 0 MTLR ; :: (%boolean) ( dst temp word -- ) @@ -541,17 +543,17 @@ GENERIC: STF ( src dst off reg-class -- ) M: single-float-regs STF drop STFS ; M: double-float-regs STF drop STFD ; -M: float-regs %save-param-reg >r 1 rot local@ r> STF ; +M: float-regs %save-param-reg [ 1 rot local@ ] dip STF ; GENERIC: LF ( dst src off reg-class -- ) M: single-float-regs LF drop LFS ; M: double-float-regs LF drop LFD ; -M: float-regs %load-param-reg >r 1 rot local@ r> LF ; +M: float-regs %load-param-reg [ 1 rot local@ ] dip LF ; M: stack-params %load-param-reg ( stack reg reg-class -- ) - drop >r 0 1 rot local@ LWZ 0 1 r> param@ STW ; + drop [ 0 1 rot local@ LWZ 0 1 ] dip param@ STW ; : next-param@ ( n -- x ) param@ stack-frame get total-size>> + ; @@ -559,8 +561,8 @@ M: stack-params %save-param-reg ( stack reg reg-class -- ) #! Funky. Read the parameter from the caller's stack frame. #! This word is used in callbacks drop - 0 1 rot next-param@ LWZ - 0 1 rot local@ STW ; + [ 0 1 ] dip next-param@ LWZ + [ 0 1 ] dip local@ STW ; M: ppc %prepare-unbox ( -- ) ! First parameter is top of stack @@ -580,14 +582,14 @@ M: ppc %unbox-long-long ( n func -- ) f %alien-invoke ! Store the return value on the C stack [ - 3 1 pick local@ STW - 4 1 rot cell + local@ STW + [ [ 3 1 ] dip local@ STW ] + [ [ 4 1 ] dip cell + local@ STW ] bi ] when* ; M: ppc %unbox-large-struct ( n c-type -- ) ! Value must be in r3 ! Compute destination address and load struct size - [ 4 1 rot local@ ADDI ] [ heap-size 5 LI ] bi* + [ [ 4 1 ] dip local@ ADDI ] [ heap-size 5 LI ] bi* ! Call the function "to_value_struct" f %alien-invoke ; @@ -595,15 +597,16 @@ M: ppc %box ( n reg-class func -- ) ! If the source is a stack location, load it into freg #0. ! If the source is f, then we assume the value is already in ! freg #0. - >r - over [ 0 over param-reg swap %load-param-reg ] [ 2drop ] if - r> f %alien-invoke ; + [ over [ 0 over param-reg swap %load-param-reg ] [ 2drop ] if ] dip + f %alien-invoke ; M: ppc %box-long-long ( n func -- ) - >r [ - 3 1 pick local@ LWZ - 4 1 rot cell + local@ LWZ - ] when* r> f %alien-invoke ; + [ + [ + [ [ 3 1 ] dip local@ LWZ ] + [ [ 4 1 ] dip cell + local@ LWZ ] bi + ] when* + ] dip f %alien-invoke ; : struct-return@ ( n -- n ) [ stack-frame get params>> ] unless* local@ ; @@ -616,7 +619,7 @@ M: ppc %prepare-box-struct ( -- ) M: ppc %box-large-struct ( n c-type -- ) ! If n = f, then we're boxing a returned struct ! Compute destination address and load struct size - [ 3 1 rot struct-return@ ADDI ] [ heap-size 4 LI ] bi* + [ [ 3 1 ] dip struct-return@ ADDI ] [ heap-size 4 LI ] bi* ! Call the function "box_value_struct" f %alien-invoke ; From 425c70caa9d45eccba4a86327d1579a065808a1d Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 16 Dec 2008 02:03:35 -0600 Subject: [PATCH 44/58] Remove empty tags file --- core/syntax/tags.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100755 core/syntax/tags.txt diff --git a/core/syntax/tags.txt b/core/syntax/tags.txt deleted file mode 100755 index e69de29bb2..0000000000 From 00212bb62660e22548c46704462da3480b7fb15f Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 16 Dec 2008 02:06:53 -0600 Subject: [PATCH 45/58] Save and restore r31 --- vm/cpu-ppc.S | 68 +++++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/vm/cpu-ppc.S b/vm/cpu-ppc.S index 4cf997a515..30b61b5c0c 100755 --- a/vm/cpu-ppc.S +++ b/vm/cpu-ppc.S @@ -5,44 +5,44 @@ in the public domain. */ #define DS_REG r29 DEF(void,primitive_fixnum_add,(void)): - lwz r3,0(DS_REG) - lwz r4,-4(DS_REG) - subi DS_REG,DS_REG,4 - li r0,0 - mtxer r0 - addo. r5,r3,r4 - bso add_overflow - stw r5,0(DS_REG) - blr + lwz r3,0(DS_REG) + lwz r4,-4(DS_REG) + subi DS_REG,DS_REG,4 + li r0,0 + mtxer r0 + addo. r5,r3,r4 + bso add_overflow + stw r5,0(DS_REG) + blr add_overflow: b MANGLE(overflow_fixnum_add) DEF(void,primitive_fixnum_subtract,(void)): - lwz r3,-4(DS_REG) - lwz r4,0(DS_REG) - subi DS_REG,DS_REG,4 - li r0,0 - mtxer r0 - subfo. r5,r4,r3 + lwz r3,-4(DS_REG) + lwz r4,0(DS_REG) + subi DS_REG,DS_REG,4 + li r0,0 + mtxer r0 + subfo. r5,r4,r3 bso sub_overflow - stw r5,0(DS_REG) - blr + stw r5,0(DS_REG) + blr sub_overflow: - b MANGLE(overflow_fixnum_subtract) + b MANGLE(overflow_fixnum_subtract) DEF(void,primitive_fixnum_multiply,(void)): - lwz r3,0(DS_REG) - lwz r4,-4(DS_REG) - subi DS_REG,DS_REG,4 - srawi r3,r3,3 - mullwo. r5,r3,r4 - bso multiply_overflow - stw r5,0(DS_REG) - blr + lwz r3,0(DS_REG) + lwz r4,-4(DS_REG) + subi DS_REG,DS_REG,4 + srawi r3,r3,3 + mullwo. r5,r3,r4 + bso multiply_overflow + stw r5,0(DS_REG) + blr multiply_overflow: - srawi r4,r4,3 - b MANGLE(overflow_fixnum_multiply) - + srawi r4,r4,3 + b MANGLE(overflow_fixnum_multiply) + /* Note that the XT is passed to the quotation in r11 */ #define CALL_OR_JUMP_QUOT \ lwz r11,9(r3) /* load quotation-xt slot */ XX \ @@ -116,8 +116,9 @@ DEF(void,c_to_factor,(CELL quot)): SAVE_INT(r26,13) SAVE_INT(r27,14) SAVE_INT(r28,15) + SAVE_INT(r31,16) - SAVE_FP(f14,20) /* save FPRs */ + SAVE_FP(f14,20) /* save FPRs */ SAVE_FP(f15,22) SAVE_FP(f16,24) SAVE_FP(f17,26) @@ -141,7 +142,7 @@ DEF(void,c_to_factor,(CELL quot)): mr r3,r1 /* pass call stack pointer as an argument */ bl MANGLE(save_callstack_bottom) - RESTORE_INT(r3,19) /* restore quotation */ + RESTORE_INT(r3,19) /* restore quotation */ CALL_QUOT RESTORE_FP(f31,54) @@ -161,9 +162,10 @@ DEF(void,c_to_factor,(CELL quot)): RESTORE_FP(f17,26) RESTORE_FP(f16,24) RESTORE_FP(f15,22) - RESTORE_FP(f14,20) /* save FPRs */ + RESTORE_FP(f14,20) /* save FPRs */ - RESTORE_INT(r28,15) /* restore GPRs */ + RESTORE_INT(r31,16) /* restore GPRs */ + RESTORE_INT(r28,15) RESTORE_INT(r27,14) RESTORE_INT(r26,13) RESTORE_INT(r25,12) From c03a12a8852def0e0a448c0b5e9c618788624f04 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 16 Dec 2008 02:11:52 -0600 Subject: [PATCH 46/58] Add alias to USING: --- basis/unix/bsd/netbsd/netbsd.factor | 2 +- basis/unix/bsd/openbsd/openbsd.factor | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/basis/unix/bsd/netbsd/netbsd.factor b/basis/unix/bsd/netbsd/netbsd.factor index 5853210d13..8ca78c72a6 100644 --- a/basis/unix/bsd/netbsd/netbsd.factor +++ b/basis/unix/bsd/netbsd/netbsd.factor @@ -1,4 +1,4 @@ -USING: alien.syntax alien.c-types math vocabs.loader constants ; +USING: alien.syntax alien.c-types math vocabs.loader constants alias ; IN: unix CONSTANT: FD_SETSIZE 256 diff --git a/basis/unix/bsd/openbsd/openbsd.factor b/basis/unix/bsd/openbsd/openbsd.factor index 46f889cef9..4d40e9e502 100644 --- a/basis/unix/bsd/openbsd/openbsd.factor +++ b/basis/unix/bsd/openbsd/openbsd.factor @@ -1,4 +1,4 @@ -USING: alien.syntax constants ; +USING: alien.syntax constants alias ; IN: unix CONSTANT: FD_SETSIZE 1024 From e909f7b2904f723c343e58c4134bf337a0c1f175 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 16 Dec 2008 02:28:04 -0600 Subject: [PATCH 47/58] fix windows compile errors --- basis/windows/user32/user32.factor | 16 ++++++++-------- basis/windows/winsock/winsock.factor | 27 ++++++++++++++------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/basis/windows/user32/user32.factor b/basis/windows/user32/user32.factor index e5c9f96275..73b42e1288 100644 --- a/basis/windows/user32/user32.factor +++ b/basis/windows/user32/user32.factor @@ -45,12 +45,12 @@ IN: windows.user32 : WS_POPUPWINDOW ( -- n ) { WS_POPUP WS_BORDER WS_SYSMENU } flags ; foldable -: WS_CHILDWINDOW WS_CHILD ; inline +ALIAS: WS_CHILDWINDOW WS_CHILD -: WS_TILED WS_OVERLAPPED ; inline -: WS_ICONIC WS_MINIMIZE ; inline -: WS_SIZEBOX WS_THICKFRAME ; inline -: WS_TILEDWINDOW WS_OVERLAPPEDWINDOW ; inline +ALIAS: WS_TILED WS_OVERLAPPED +ALIAS: WS_ICONIC WS_MINIMIZE +ALIAS: WS_SIZEBOX WS_THICKFRAME +ALIAS: WS_TILEDWINDOW WS_OVERLAPPEDWINDOW ! Extended window styles @@ -503,7 +503,7 @@ IN: windows.user32 : MB_ICONQUESTION HEX: 00000020 ; inline : MB_OK HEX: 00000000 ; inline -: FVIRTKEY TRUE ; inline +ALIAS: FVIRTKEY TRUE : FNOINVERT 2 ; inline : FSHIFT 4 ; inline : FCONTROL 8 ; inline @@ -670,7 +670,7 @@ FUNCTION: HWND CreateWindowExW ( ALIAS: CreateWindowEx CreateWindowExW -: CreateWindow 0 12 -nrot CreateWindowEx ; inline +: CreateWindow ( a b c d e f g h i j k -- hwnd ) 0 12 -nrot CreateWindowEx ; inline ! FUNCTION: CreateWindowStationA @@ -1265,7 +1265,7 @@ FUNCTION: BOOL SetForegroundWindow ( HWND hWnd ) ; ! FUNCTION: SetKeyboardState ! type is ignored FUNCTION: void SetLastErrorEx ( DWORD dwErrCode, DWORD dwType ) ; -: SetLastError 0 SetLastErrorEx ; inline +: SetLastError ( errcode -- ) 0 SetLastErrorEx ; inline ! FUNCTION: SetLayeredWindowAttributes ! FUNCTION: SetLogonNotifyWindow ! FUNCTION: SetMenu diff --git a/basis/windows/winsock/winsock.factor b/basis/windows/winsock/winsock.factor index 5d450897e2..341d5ffb69 100644 --- a/basis/windows/winsock/winsock.factor +++ b/basis/windows/winsock/winsock.factor @@ -2,7 +2,8 @@ ! See http://factorcode.org/license.txt for BSD license. USING: alien alien.c-types alien.strings alien.syntax arrays byte-arrays kernel math sequences windows.types windows.kernel32 -windows.errors windows math.bitwise alias io.encodings.utf16n ; +windows.errors windows math.bitwise alias io.encodings.utf16n +alias ; IN: windows.winsock USE: libc @@ -29,7 +30,7 @@ TYPEDEF: void* SOCKET : SO_USELOOPBACK HEX: 40 ; inline : SO_LINGER HEX: 80 ; inline : SO_OOBINLINE HEX: 100 ; inline -: SO_DONTLINGER SO_LINGER bitnot ; inline +: SO_DONTLINGER ( -- n ) SO_LINGER bitnot ; inline : SO_SNDBUF HEX: 1001 ; inline : SO_RCVBUF HEX: 1002 ; inline @@ -50,7 +51,7 @@ TYPEDEF: void* SOCKET : AF_CHAOS 5 ; inline : AF_NS 6 ; inline : AF_ISO 7 ; inline -: AF_OSI AF_ISO ; inline +ALIAS: AF_OSI AF_ISO : AF_ECMA 8 ; inline : AF_DATAKIT 9 ; inline : AF_CCITT 10 ; inline @@ -83,19 +84,19 @@ TYPEDEF: void* SOCKET : IPPROTO_UDP 17 ; inline : IPPROTO_RM 113 ; inline -: WSA_FLAG_OVERLAPPED 1 ; inline -: WSA_WAIT_EVENT_0 WAIT_OBJECT_0 ; inline -: WSA_MAXIMUM_WAIT_EVENTS MAXIMUM_WAIT_OBJECTS ; inline -: WSA_INVALID_EVENT f ; inline -: WSA_WAIT_FAILED -1 ; inline -: WSA_WAIT_IO_COMPLETION WAIT_IO_COMPLETION ; inline -: WSA_WAIT_TIMEOUT WAIT_TIMEOUT ; inline -: WSA_INFINITE INFINITE ; inline -: WSA_IO_PENDING ERROR_IO_PENDING ; inline +CONSTANT: WSA_FLAG_OVERLAPPED 1 +ALIAS: WSA_WAIT_EVENT_0 WAIT_OBJECT_0 +ALIAS: WSA_MAXIMUM_WAIT_EVENTS MAXIMUM_WAIT_OBJECTS +CONSTANT: WSA_INVALID_EVENT f +CONSTANT: WSA_WAIT_FAILED -1 +ALIAS: WSA_WAIT_IO_COMPLETION WAIT_IO_COMPLETION +ALIAS: WSA_WAIT_TIMEOUT WAIT_TIMEOUT +ALIAS: WSA_INFINITE INFINITE +ALIAS: WSA_IO_PENDING ERROR_IO_PENDING : INADDR_ANY 0 ; inline -: INVALID_SOCKET -1 ; inline +: INVALID_SOCKET ( -- alien ) -1 ; inline : SOCKET_ERROR -1 ; inline : SD_RECV 0 ; inline From de759095500e8e0e8604d248f4e3558cfa6d0742 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 16 Dec 2008 02:28:05 -0600 Subject: [PATCH 48/58] More unix updates --- basis/unix/statfs/freebsd/freebsd.factor | 2 +- basis/unix/statfs/openbsd/openbsd.factor | 2 +- basis/unix/statvfs/linux/linux.factor | 2 +- basis/unix/utmpx/utmpx.factor | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/basis/unix/statfs/freebsd/freebsd.factor b/basis/unix/statfs/freebsd/freebsd.factor index e6a033e09d..17b58aede6 100644 --- a/basis/unix/statfs/freebsd/freebsd.factor +++ b/basis/unix/statfs/freebsd/freebsd.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax ; +USING: alien.syntax constants ; IN: unix.statfs.freebsd CONSTANT: MFSNAMELEN 16 ! length of type name including null */ diff --git a/basis/unix/statfs/openbsd/openbsd.factor b/basis/unix/statfs/openbsd/openbsd.factor index f495f2af4e..d9e6b867b6 100644 --- a/basis/unix/statfs/openbsd/openbsd.factor +++ b/basis/unix/statfs/openbsd/openbsd.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax ; +USING: alien.syntax constants ; IN: unix.statfs.openbsd CONSTANT: MFSNAMELEN 16 diff --git a/basis/unix/statvfs/linux/linux.factor b/basis/unix/statvfs/linux/linux.factor index c92fef6aaa..5c04468ad3 100644 --- a/basis/unix/statvfs/linux/linux.factor +++ b/basis/unix/statvfs/linux/linux.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax ; +USING: alien.syntax constants ; IN: unix.statvfs.linux C-STRUCT: statvfs64 diff --git a/basis/unix/utmpx/utmpx.factor b/basis/unix/utmpx/utmpx.factor index 6b70ceee2e..30dac2de1f 100644 --- a/basis/unix/utmpx/utmpx.factor +++ b/basis/unix/utmpx/utmpx.factor @@ -3,7 +3,7 @@ USING: alien.c-types alien.syntax combinators continuations io.encodings.string io.encodings.utf8 kernel sequences strings unix calendar system accessors unix.time calendar.unix -vocabs.loader ; +vocabs.loader constants ; IN: unix.utmpx CONSTANT: EMPTY 0 From 3142d53c0df769e7ac92351c41796b5ca8176f05 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 16 Dec 2008 02:30:47 -0600 Subject: [PATCH 49/58] fix load error --- basis/windows/winsock/winsock.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/windows/winsock/winsock.factor b/basis/windows/winsock/winsock.factor index 341d5ffb69..3ee333d05d 100644 --- a/basis/windows/winsock/winsock.factor +++ b/basis/windows/winsock/winsock.factor @@ -3,7 +3,7 @@ USING: alien alien.c-types alien.strings alien.syntax arrays byte-arrays kernel math sequences windows.types windows.kernel32 windows.errors windows math.bitwise alias io.encodings.utf16n -alias ; +alias constants ; IN: windows.winsock USE: libc From 4dcef7e94f0dc02c3f3b2232e1b088c095893f2a Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 16 Dec 2008 02:32:57 -0600 Subject: [PATCH 50/58] Yet more unix fixes --- basis/unix/solaris/solaris.factor | 16 ++++++++-------- basis/unix/stat/linux/32/32.factor | 4 ++-- basis/unix/stat/linux/64/64.factor | 4 ++-- basis/unix/stat/netbsd/32/32.factor | 4 ++-- basis/unix/stat/netbsd/64/64.factor | 4 ++-- basis/unix/stat/stat.factor | 6 +++--- basis/unix/statfs/macosx/macosx.factor | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/basis/unix/solaris/solaris.factor b/basis/unix/solaris/solaris.factor index 267e89e98d..fc7e152931 100644 --- a/basis/unix/solaris/solaris.factor +++ b/basis/unix/solaris/solaris.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2006 Patrick Mauritz. ! See http://factorcode.org/license.txt for BSD license. IN: unix -USING: alien.syntax system kernel ; +USING: alien.syntax system kernel layouts constants ; ! Solaris. @@ -16,15 +16,15 @@ CONSTANT: SEEK_END 2 CONSTANT: SOL_SOCKET HEX: ffff -CONSTANT: FD_SETSIZE cell 4 = 1024 65536 ? +: FD_SETSIZE ( -- n ) cell 4 = 1024 65536 ? ; CONSTANT: SO_REUSEADDR 4 CONSTANT: SO_OOBINLINE HEX: 0100 CONSTANT: SO_SNDTIMEO HEX: 1005 CONSTANT: SO_RCVTIMEO HEX: 1006 -: F_SETFL 4 ; ! set file status flags -: O_NONBLOCK HEX: 80 ; ! no delay +CONSTANT: F_SETFL 4 ! set file status flags +CONSTANT: O_NONBLOCK HEX: 80 ! no delay C-STRUCT: addrinfo { "int" "flags" } @@ -70,10 +70,10 @@ CONSTANT: AF_UNIX 1 CONSTANT: AF_INET 2 CONSTANT: AF_INET6 26 -CONSTANT: PF_UNSPEC AF_UNSPEC -CONSTANT: PF_UNIX AF_UNIX -CONSTANT: PF_INET AF_INET -CONSTANT: PF_INET6 AF_INET6 +ALIAS: PF_UNSPEC AF_UNSPEC +ALIAS: PF_UNIX AF_UNIX +ALIAS: PF_INET AF_INET +ALIAS: PF_INET6 AF_INET6 CONSTANT: IPPROTO_TCP 6 CONSTANT: IPPROTO_UDP 17 diff --git a/basis/unix/stat/linux/32/32.factor b/basis/unix/stat/linux/32/32.factor index ded06595de..35963cf4ed 100644 --- a/basis/unix/stat/linux/32/32.factor +++ b/basis/unix/stat/linux/32/32.factor @@ -25,5 +25,5 @@ C-STRUCT: stat FUNCTION: int __xstat ( int ver, char* pathname, stat* buf ) ; FUNCTION: int __lxstat ( int ver, char* pathname, stat* buf ) ; -: stat ( pathname buf -- int ) 3 -rot __xstat ; -: lstat ( pathname buf -- int ) 3 -rot __lxstat ; +: stat ( pathname buf -- int ) [ 3 ] 2dip __xstat ; +: lstat ( pathname buf -- int ) [ 3 ] 2dip __lxstat ; diff --git a/basis/unix/stat/linux/64/64.factor b/basis/unix/stat/linux/64/64.factor index f406b2ccee..81b33f3227 100644 --- a/basis/unix/stat/linux/64/64.factor +++ b/basis/unix/stat/linux/64/64.factor @@ -26,5 +26,5 @@ C-STRUCT: stat FUNCTION: int __xstat ( int ver, char* pathname, stat* buf ) ; FUNCTION: int __lxstat ( int ver, char* pathname, stat* buf ) ; -: stat ( pathname buf -- int ) 1 -rot __xstat ; -: lstat ( pathname buf -- int ) 1 -rot __lxstat ; +: stat ( pathname buf -- int ) [ 1 ] 2dip __xstat ; +: lstat ( pathname buf -- int ) [ 1 ] 2dip __lxstat ; diff --git a/basis/unix/stat/netbsd/32/32.factor b/basis/unix/stat/netbsd/32/32.factor index adf13a3845..c4cf5cc7a0 100644 --- a/basis/unix/stat/netbsd/32/32.factor +++ b/basis/unix/stat/netbsd/32/32.factor @@ -25,5 +25,5 @@ C-STRUCT: stat FUNCTION: int __stat30 ( char* pathname, stat* buf ) ; FUNCTION: int __lstat30 ( char* pathname, stat* buf ) ; -CONSTANT: stat ( pathname buf -- n ) __stat30 -CONSTANT: lstat ( pathname buf -- n ) __lstat30 +: stat ( pathname buf -- n ) __stat30 ; +: lstat ( pathname buf -- n ) __lstat30 ; diff --git a/basis/unix/stat/netbsd/64/64.factor b/basis/unix/stat/netbsd/64/64.factor index a832ff8d1c..cd9286c6ba 100644 --- a/basis/unix/stat/netbsd/64/64.factor +++ b/basis/unix/stat/netbsd/64/64.factor @@ -25,5 +25,5 @@ C-STRUCT: stat FUNCTION: int __stat13 ( char* pathname, stat* buf ) ; FUNCTION: int __lstat13 ( char* pathname, stat* buf ) ; -CONSTANT: stat ( pathname buf -- n ) __stat13 -CONSTANT: lstat ( pathname buf -- n ) __lstat13 +: stat ( pathname buf -- n ) __stat13 ; +: lstat ( pathname buf -- n ) __lstat13 ; diff --git a/basis/unix/stat/stat.factor b/basis/unix/stat/stat.factor index 5e7529fb82..2164d89ac6 100644 --- a/basis/unix/stat/stat.factor +++ b/basis/unix/stat/stat.factor @@ -4,7 +4,7 @@ IN: unix.stat ! File Types -: S_IFMT OCT: 170000 ; ! These bits determine file type. +CONSTANT: S_IFMT OCT: 170000 ! These bits determine file type. CONSTANT: S_IFDIR OCT: 40000 ! Directory. CONSTANT: S_IFCHR OCT: 20000 ! Character device. @@ -22,8 +22,8 @@ FUNCTION: int mkdir ( char* path, mode_t mode ) ; C-STRUCT: fsid { { "int" 2 } "__val" } ; - TYPEDEF: fsid __fsid_t - TYPEDEF: fsid fsid_t +TYPEDEF: fsid __fsid_t +TYPEDEF: fsid fsid_t << os { { linux [ "unix.stat.linux" require ] } diff --git a/basis/unix/statfs/macosx/macosx.factor b/basis/unix/statfs/macosx/macosx.factor index 6d0bc344ee..829a49c81f 100644 --- a/basis/unix/statfs/macosx/macosx.factor +++ b/basis/unix/statfs/macosx/macosx.factor @@ -89,7 +89,7 @@ CONSTANT: VQ_FLAG8000 HEX: 8000 CONSTANT: NFSV4_MAX_FH_SIZE 128 CONSTANT: NFSV3_MAX_FH_SIZE 64 CONSTANT: NFSV2_MAX_FH_SIZE 32 -CONSTANT: NFS_MAX_FH_SIZE NFSV4_MAX_FH_SIZE +ALIAS: NFS_MAX_FH_SIZE NFSV4_MAX_FH_SIZE CONSTANT: MFSNAMELEN 15 CONSTANT: MNAMELEN 90 From 05c5a353787ad9901e8471d355cb25332c9c5c9e Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 16 Dec 2008 02:36:25 -0600 Subject: [PATCH 51/58] fix compile error --- basis/windows/user32/user32.factor | 198 ++++++++++++++--------------- 1 file changed, 99 insertions(+), 99 deletions(-) diff --git a/basis/windows/user32/user32.factor b/basis/windows/user32/user32.factor index 73b42e1288..88c6d54f0a 100644 --- a/basis/windows/user32/user32.factor +++ b/basis/windows/user32/user32.factor @@ -1,35 +1,35 @@ ! Copyright (C) 2005, 2006 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: alien alien.syntax parser namespaces kernel math -windows.types generalizations math.bitwise alias ; +windows.types generalizations math.bitwise alias constants ; IN: windows.user32 ! HKL for ActivateKeyboardLayout -: HKL_PREV 0 ; inline -: HKL_NEXT 1 ; inline +CONSTANT: HKL_PREV 0 +CONSTANT: HKL_NEXT 1 -: CW_USEDEFAULT HEX: 80000000 ; inline +CONSTANT: CW_USEDEFAULT HEX: 80000000 -: WS_OVERLAPPED HEX: 00000000 ; inline -: WS_POPUP HEX: 80000000 ; inline -: WS_CHILD HEX: 40000000 ; inline -: WS_MINIMIZE HEX: 20000000 ; inline -: WS_VISIBLE HEX: 10000000 ; inline -: WS_DISABLED HEX: 08000000 ; inline -: WS_CLIPSIBLINGS HEX: 04000000 ; inline -: WS_CLIPCHILDREN HEX: 02000000 ; inline -: WS_MAXIMIZE HEX: 01000000 ; inline -: WS_CAPTION HEX: 00C00000 ; inline -: WS_BORDER HEX: 00800000 ; inline -: WS_DLGFRAME HEX: 00400000 ; inline -: WS_VSCROLL HEX: 00200000 ; inline -: WS_HSCROLL HEX: 00100000 ; inline -: WS_SYSMENU HEX: 00080000 ; inline -: WS_THICKFRAME HEX: 00040000 ; inline -: WS_GROUP HEX: 00020000 ; inline -: WS_TABSTOP HEX: 00010000 ; inline -: WS_MINIMIZEBOX HEX: 00020000 ; inline -: WS_MAXIMIZEBOX HEX: 00010000 ; inline +CONSTANT: WS_OVERLAPPED HEX: 00000000 +CONSTANT: WS_POPUP HEX: 80000000 +CONSTANT: WS_CHILD HEX: 40000000 +CONSTANT: WS_MINIMIZE HEX: 20000000 +CONSTANT: WS_VISIBLE HEX: 10000000 +CONSTANT: WS_DISABLED HEX: 08000000 +CONSTANT: WS_CLIPSIBLINGS HEX: 04000000 +CONSTANT: WS_CLIPCHILDREN HEX: 02000000 +CONSTANT: WS_MAXIMIZE HEX: 01000000 +CONSTANT: WS_CAPTION HEX: 00C00000 +CONSTANT: WS_BORDER HEX: 00800000 +CONSTANT: WS_DLGFRAME HEX: 00400000 +CONSTANT: WS_VSCROLL HEX: 00200000 +CONSTANT: WS_HSCROLL HEX: 00100000 +CONSTANT: WS_SYSMENU HEX: 00080000 +CONSTANT: WS_THICKFRAME HEX: 00040000 +CONSTANT: WS_GROUP HEX: 00020000 +CONSTANT: WS_TABSTOP HEX: 00010000 +CONSTANT: WS_MINIMIZEBOX HEX: 00020000 +CONSTANT: WS_MAXIMIZEBOX HEX: 00010000 ! Common window styles : WS_OVERLAPPEDWINDOW ( -- n ) @@ -54,93 +54,93 @@ ALIAS: WS_TILEDWINDOW WS_OVERLAPPEDWINDOW ! Extended window styles -: WS_EX_DLGMODALFRAME HEX: 00000001 ; inline -: WS_EX_NOPARENTNOTIFY HEX: 00000004 ; inline -: WS_EX_TOPMOST HEX: 00000008 ; inline -: WS_EX_ACCEPTFILES HEX: 00000010 ; inline -: WS_EX_TRANSPARENT HEX: 00000020 ; inline -: WS_EX_MDICHILD HEX: 00000040 ; inline -: WS_EX_TOOLWINDOW HEX: 00000080 ; inline -: WS_EX_WINDOWEDGE HEX: 00000100 ; inline -: WS_EX_CLIENTEDGE HEX: 00000200 ; inline -: WS_EX_CONTEXTHELP HEX: 00000400 ; inline +CONSTANT: WS_EX_DLGMODALFRAME HEX: 00000001 +CONSTANT: WS_EX_NOPARENTNOTIFY HEX: 00000004 +CONSTANT: WS_EX_TOPMOST HEX: 00000008 +CONSTANT: WS_EX_ACCEPTFILES HEX: 00000010 +CONSTANT: WS_EX_TRANSPARENT HEX: 00000020 +CONSTANT: WS_EX_MDICHILD HEX: 00000040 +CONSTANT: WS_EX_TOOLWINDOW HEX: 00000080 +CONSTANT: WS_EX_WINDOWEDGE HEX: 00000100 +CONSTANT: WS_EX_CLIENTEDGE HEX: 00000200 +CONSTANT: WS_EX_CONTEXTHELP HEX: 00000400 -: WS_EX_RIGHT HEX: 00001000 ; inline -: WS_EX_LEFT HEX: 00000000 ; inline -: WS_EX_RTLREADING HEX: 00002000 ; inline -: WS_EX_LTRREADING HEX: 00000000 ; inline -: WS_EX_LEFTSCROLLBAR HEX: 00004000 ; inline -: WS_EX_RIGHTSCROLLBAR HEX: 00000000 ; inline -: WS_EX_CONTROLPARENT HEX: 00010000 ; inline -: WS_EX_STATICEDGE HEX: 00020000 ; inline -: WS_EX_APPWINDOW HEX: 00040000 ; inline +CONSTANT: WS_EX_RIGHT HEX: 00001000 +CONSTANT: WS_EX_LEFT HEX: 00000000 +CONSTANT: WS_EX_RTLREADING HEX: 00002000 +CONSTANT: WS_EX_LTRREADING HEX: 00000000 +CONSTANT: WS_EX_LEFTSCROLLBAR HEX: 00004000 +CONSTANT: WS_EX_RIGHTSCROLLBAR HEX: 00000000 +CONSTANT: WS_EX_CONTROLPARENT HEX: 00010000 +CONSTANT: WS_EX_STATICEDGE HEX: 00020000 +CONSTANT: WS_EX_APPWINDOW HEX: 00040000 : WS_EX_OVERLAPPEDWINDOW ( -- n ) WS_EX_WINDOWEDGE WS_EX_CLIENTEDGE bitor ; foldable : WS_EX_PALETTEWINDOW ( -- n ) { WS_EX_WINDOWEDGE WS_EX_TOOLWINDOW WS_EX_TOPMOST } flags ; foldable -: CS_VREDRAW HEX: 0001 ; inline -: CS_HREDRAW HEX: 0002 ; inline -: CS_DBLCLKS HEX: 0008 ; inline -: CS_OWNDC HEX: 0020 ; inline -: CS_CLASSDC HEX: 0040 ; inline -: CS_PARENTDC HEX: 0080 ; inline -: CS_NOCLOSE HEX: 0200 ; inline -: CS_SAVEBITS HEX: 0800 ; inline -: CS_BYTEALIGNCLIENT HEX: 1000 ; inline -: CS_BYTEALIGNWINDOW HEX: 2000 ; inline -: CS_GLOBALCLASS HEX: 4000 ; inline +CONSTANT: CS_VREDRAW HEX: 0001 +CONSTANT: CS_HREDRAW HEX: 0002 +CONSTANT: CS_DBLCLKS HEX: 0008 +CONSTANT: CS_OWNDC HEX: 0020 +CONSTANT: CS_CLASSDC HEX: 0040 +CONSTANT: CS_PARENTDC HEX: 0080 +CONSTANT: CS_NOCLOSE HEX: 0200 +CONSTANT: CS_SAVEBITS HEX: 0800 +CONSTANT: CS_BYTEALIGNCLIENT HEX: 1000 +CONSTANT: CS_BYTEALIGNWINDOW HEX: 2000 +CONSTANT: CS_GLOBALCLASS HEX: 4000 -: COLOR_SCROLLBAR 0 ; inline -: COLOR_BACKGROUND 1 ; inline -: COLOR_ACTIVECAPTION 2 ; inline -: COLOR_INACTIVECAPTION 3 ; inline -: COLOR_MENU 4 ; inline -: COLOR_WINDOW 5 ; inline -: COLOR_WINDOWFRAME 6 ; inline -: COLOR_MENUTEXT 7 ; inline -: COLOR_WINDOWTEXT 8 ; inline -: COLOR_CAPTIONTEXT 9 ; inline -: COLOR_ACTIVEBORDER 10 ; inline -: COLOR_INACTIVEBORDER 11 ; inline -: COLOR_APPWORKSPACE 12 ; inline -: COLOR_HIGHLIGHT 13 ; inline -: COLOR_HIGHLIGHTTEXT 14 ; inline -: COLOR_BTNFACE 15 ; inline -: COLOR_BTNSHADOW 16 ; inline -: COLOR_GRAYTEXT 17 ; inline -: COLOR_BTNTEXT 18 ; inline -: COLOR_INACTIVECAPTIONTEXT 19 ; inline -: COLOR_BTNHIGHLIGHT 20 ; inline +CONSTANT: COLOR_SCROLLBAR 0 +CONSTANT: COLOR_BACKGROUND 1 +CONSTANT: COLOR_ACTIVECAPTION 2 +CONSTANT: COLOR_INACTIVECAPTION 3 +CONSTANT: COLOR_MENU 4 +CONSTANT: COLOR_WINDOW 5 +CONSTANT: COLOR_WINDOWFRAME 6 +CONSTANT: COLOR_MENUTEXT 7 +CONSTANT: COLOR_WINDOWTEXT 8 +CONSTANT: COLOR_CAPTIONTEXT 9 +CONSTANT: COLOR_ACTIVEBORDER 10 +CONSTANT: COLOR_INACTIVEBORDER 11 +CONSTANT: COLOR_APPWORKSPACE 12 +CONSTANT: COLOR_HIGHLIGHT 13 +CONSTANT: COLOR_HIGHLIGHTTEXT 14 +CONSTANT: COLOR_BTNFACE 15 +CONSTANT: COLOR_BTNSHADOW 16 +CONSTANT: COLOR_GRAYTEXT 17 +CONSTANT: COLOR_BTNTEXT 18 +CONSTANT: COLOR_INACTIVECAPTIONTEXT 19 +CONSTANT: COLOR_BTNHIGHLIGHT 20 -: IDI_APPLICATION 32512 ; inline -: IDI_HAND 32513 ; inline -: IDI_QUESTION 32514 ; inline -: IDI_EXCLAMATION 32515 ; inline -: IDI_ASTERISK 32516 ; inline -: IDI_WINLOGO 32517 ; inline +CONSTANT: IDI_APPLICATION 32512 +CONSTANT: IDI_HAND 32513 +CONSTANT: IDI_QUESTION 32514 +CONSTANT: IDI_EXCLAMATION 32515 +CONSTANT: IDI_ASTERISK 32516 +CONSTANT: IDI_WINLOGO 32517 ! ShowWindow() Commands -: SW_HIDE 0 ; inline -: SW_SHOWNORMAL 1 ; inline -: SW_NORMAL 1 ; inline -: SW_SHOWMINIMIZED 2 ; inline -: SW_SHOWMAXIMIZED 3 ; inline -: SW_MAXIMIZE 3 ; inline -: SW_SHOWNOACTIVATE 4 ; inline -: SW_SHOW 5 ; inline -: SW_MINIMIZE 6 ; inline -: SW_SHOWMINNOACTIVE 7 ; inline -: SW_SHOWNA 8 ; inline -: SW_RESTORE 9 ; inline -: SW_SHOWDEFAULT 10 ; inline -: SW_FORCEMINIMIZE 11 ; inline -: SW_MAX 11 ; inline +CONSTANT: SW_HIDE 0 +CONSTANT: SW_SHOWNORMAL 1 +CONSTANT: SW_NORMAL 1 +CONSTANT: SW_SHOWMINIMIZED 2 +CONSTANT: SW_SHOWMAXIMIZED 3 +CONSTANT: SW_MAXIMIZE 3 +CONSTANT: SW_SHOWNOACTIVATE 4 +CONSTANT: SW_SHOW 5 +CONSTANT: SW_MINIMIZE 6 +CONSTANT: SW_SHOWMINNOACTIVE 7 +CONSTANT: SW_SHOWNA 8 +CONSTANT: SW_RESTORE 9 +CONSTANT: SW_SHOWDEFAULT 10 +CONSTANT: SW_FORCEMINIMIZE 11 +CONSTANT: SW_MAX 11 ! PeekMessage -: PM_NOREMOVE 0 ; inline -: PM_REMOVE 1 ; inline -: PM_NOYIELD 2 ; inline +CONSTANT: PM_NOREMOVE 0 +CONSTANT: PM_REMOVE 1 +CONSTANT: PM_NOYIELD 2 ! : PM_QS_INPUT (QS_INPUT << 16) ; ! : PM_QS_POSTMESSAGE ((QS_POSTMESSAGE | QS_HOTKEY | QS_TIMER) << 16) ; ! : PM_QS_PAINT (QS_PAINT << 16) ; From 3bcb2ef6451a09310ad4ff91a60f01cd8cf57607 Mon Sep 17 00:00:00 2001 From: slava Date: Tue, 16 Dec 2008 02:45:58 -0600 Subject: [PATCH 52/58] Use constants in inotify --- basis/unix/linux/inotify/inotify.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/unix/linux/inotify/inotify.factor b/basis/unix/linux/inotify/inotify.factor index e3d40b5b28..9084b41c50 100644 --- a/basis/unix/linux/inotify/inotify.factor +++ b/basis/unix/linux/inotify/inotify.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax math math.bitwise ; +USING: alien.syntax math math.bitwise constants ; IN: unix.linux.inotify C-STRUCT: inotify-event From 92928f63224146f3d6cf16685b1e805fc091ee0d Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 16 Dec 2008 02:46:58 -0600 Subject: [PATCH 53/58] add using --- extra/game-input/dinput/dinput.factor | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extra/game-input/dinput/dinput.factor b/extra/game-input/dinput/dinput.factor index d89e23db2b..cb7b34d8a4 100755 --- a/extra/game-input/dinput/dinput.factor +++ b/extra/game-input/dinput/dinput.factor @@ -4,7 +4,8 @@ vectors windows.kernel32 windows.com windows.dinput shuffle windows.user32 windows.messages sequences combinators locals math.geometry.rect ui.windows accessors math windows alien alien.strings io.encodings.utf16 io.encodings.utf16n -continuations byte-arrays game-input.dinput.keys-array ; +continuations byte-arrays game-input.dinput.keys-array +game-input ; IN: game-input.dinput SINGLETON: dinput-game-input-backend From 78207c1e949f7a88747079e2c2048954126a1db7 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 16 Dec 2008 02:51:57 -0600 Subject: [PATCH 54/58] add using --- basis/tools/files/windows/windows.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/tools/files/windows/windows.factor b/basis/tools/files/windows/windows.factor index 76e6ea5590..328bb8dc71 100755 --- a/basis/tools/files/windows/windows.factor +++ b/basis/tools/files/windows/windows.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors calendar.format combinators io.files kernel math.parser sequences splitting system tools.files -generalizations tools.files.private ; +generalizations tools.files.private io.files.info ; IN: tools.files.windows Date: Tue, 16 Dec 2008 02:55:01 -0600 Subject: [PATCH 55/58] add using for linux inotify --- basis/unix/linux/inotify/inotify.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/unix/linux/inotify/inotify.factor b/basis/unix/linux/inotify/inotify.factor index e3d40b5b28..9084b41c50 100644 --- a/basis/unix/linux/inotify/inotify.factor +++ b/basis/unix/linux/inotify/inotify.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax math math.bitwise ; +USING: alien.syntax math math.bitwise constants ; IN: unix.linux.inotify C-STRUCT: inotify-event From 7ef5addd4cf40cdd5563b090ae75f01c2b2a3167 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 16 Dec 2008 03:19:11 -0600 Subject: [PATCH 56/58] fix load error in assoc-heaps --- extra/assoc-heaps/assoc-heaps-docs.factor | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extra/assoc-heaps/assoc-heaps-docs.factor b/extra/assoc-heaps/assoc-heaps-docs.factor index e5636dee3e..1ad6005911 100644 --- a/extra/assoc-heaps/assoc-heaps-docs.factor +++ b/extra/assoc-heaps/assoc-heaps-docs.factor @@ -1,6 +1,7 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: help.markup help.syntax io.streams.string ; +USING: help.markup help.syntax io.streams.string assocs +heaps.private ; IN: assoc-heaps HELP: From 184de13b57836460d9986a3b20b998ea506e6442 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 16 Dec 2008 06:00:45 -0600 Subject: [PATCH 57/58] Some help lint fixes, including a fix for help lint itself --- basis/db/types/types-docs.factor | 3 +++ basis/help/lint/lint.factor | 3 +-- extra/assoc-heaps/assoc-heaps-docs.factor | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/basis/db/types/types-docs.factor b/basis/db/types/types-docs.factor index bd0b443fbe..d5908740c6 100644 --- a/basis/db/types/types-docs.factor +++ b/basis/db/types/types-docs.factor @@ -41,12 +41,15 @@ HELP: +user-assigned-id+ { $description "The user is responsible for choosing a primary key for tuples inserted with this database type. Keys must be unique or else the database will throw an error. Usually it is better to use a " { $link +db-assigned-id+ } "." } ; HELP: +{ $values { "slot-name" object } { "key" object } { "generator-singleton" object } { "type" object } { "generator-bind" generator-bind } } { $description "" } ; HELP: +{ $values { "key" object } { "type" object } { "value" object } { "literal-bind" literal-bind } } { $description "" } ; HELP: +{ $values { "value" object } { "low-level-binding" low-level-binding } } { $description "" } ; HELP: BIG-INTEGER diff --git a/basis/help/lint/lint.factor b/basis/help/lint/lint.factor index f6ed13b3fa..817285412e 100644 --- a/basis/help/lint/lint.factor +++ b/basis/help/lint/lint.factor @@ -43,10 +43,9 @@ IN: help.lint : check-values ( word element -- ) { + [ drop { [ symbol? ] [ macro? ] [ parsing-word? ] } 1|| ] [ drop "declared-effect" word-prop not ] [ nip contains-funky-elements? ] - [ drop symbol? ] - [ drop macro? ] [ [ effect-values >array ] [ extract-values >array ] diff --git a/extra/assoc-heaps/assoc-heaps-docs.factor b/extra/assoc-heaps/assoc-heaps-docs.factor index 1ad6005911..b148995cb8 100644 --- a/extra/assoc-heaps/assoc-heaps-docs.factor +++ b/extra/assoc-heaps/assoc-heaps-docs.factor @@ -5,7 +5,7 @@ heaps.private ; IN: assoc-heaps HELP: -{ $values { "assoc" assoc } { "heap" heap } } +{ $values { "assoc" assoc } { "heap" heap } { "assoc-heap" assoc-heap } } { $description "Constructs a new " { $link assoc-heap } " from two existing data structures." } ; HELP: From 6c7bd04e146ac7353e0bfa283c526fcb3d962845 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 16 Dec 2008 06:12:45 -0600 Subject: [PATCH 58/58] Use bi instead of dup/swap --- basis/help/lint/lint.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/help/lint/lint.factor b/basis/help/lint/lint.factor index 817285412e..d5729f218b 100644 --- a/basis/help/lint/lint.factor +++ b/basis/help/lint/lint.factor @@ -59,7 +59,7 @@ IN: help.lint ] each ; : vocab-exists? ( name -- ? ) - dup vocab swap "all-vocabs" get member? or ; + [ vocab ] [ "all-vocabs" get member? ] bi or ; : check-modules ( element -- ) \ $vocab-link swap elements [