factor: move literals to core. rename $ to $\

locals-and-roots
Doug Coleman 2016-06-25 17:11:54 -07:00
parent c52788d3ef
commit a0d1316c8d
51 changed files with 519 additions and 513 deletions

View File

@ -5,7 +5,7 @@ CONSTANT: the-real-slim-shady "marshall mathers" ;
CONSTANT: will CONSTANT: will
IHS{ IHS{
$ the-real-slim-shady $\ the-real-slim-shady
"marshall mathers" "marshall mathers"
} ; } ;
@ -23,5 +23,5 @@ CONSTANT: will
CONSTANT: same-as-it-ever-was "same as it ever was" ; CONSTANT: same-as-it-ever-was "same as it ever was" ;
{ IHS{ $ same-as-it-ever-was } } { IHS{ $\ same-as-it-ever-was } }
[ HS{ $ same-as-it-ever-was } IHS{ } set-like ] unit-test [ HS{ $\ same-as-it-ever-was } IHS{ } set-like ] unit-test

View File

@ -13,6 +13,7 @@ IN: bootstrap.syntax
";" ";"
"--" "--"
"`" "``" "```" "````" "`" "``" "```" "````"
"$\\"
"![[" "![=[" "![==[" "![[" "![=[" "![==["
"[[" "[=[" "[==[" "[[" "[=[" "[==["
"factor[[" "factor[=[" "factor[==[" "factor[[" "factor[=[" "factor[==["

View File

@ -6,7 +6,7 @@ CONSTANT: the-real-slim-shady "marshall mathers" ;
CONSTANT: will CONSTANT: will
IH{ IH{
{ $ the-real-slim-shady t } { $\ the-real-slim-shady t }
{ "marshall mathers" f } { "marshall mathers" f }
} ; } ;
@ -32,5 +32,5 @@ CONSTANT: will
CONSTANT: same-as-it-ever-was "same as it ever was" ; CONSTANT: same-as-it-ever-was "same as it ever was" ;
{ IH{ { $ same-as-it-ever-was $ same-as-it-ever-was } } } { IH{ { $\ same-as-it-ever-was $\ same-as-it-ever-was } } }
[ H{ { $ same-as-it-ever-was $ same-as-it-ever-was } } IH{ } assoc-like ] unit-test [ H{ { $\ same-as-it-ever-was $\ same-as-it-ever-was } } IH{ } assoc-like ] unit-test

View File

@ -5,14 +5,15 @@ classes.algebra.private classes.builtin classes.error
classes.intersection classes.maybe classes.mixin classes.parser classes.intersection classes.maybe classes.mixin classes.parser
classes.predicate classes.singleton classes.tuple classes.predicate classes.singleton classes.tuple
classes.tuple.parser classes.union combinators compiler.units classes.tuple.parser classes.union combinators compiler.units
definitions delegate effects effects.parser fry generic definitions delegate delegate.private effects effects.parser fry
generic.hook generic.math generic.parser generic.standard generic generic.hook generic.math generic.parser
hash-sets hashtables hashtables.identity io.pathnames kernel generic.standard hash-sets hashtables hashtables.identity hints
lexer locals.errors locals.parser macros math memoize namespaces io.pathnames kernel lexer literals literals.private locals.errors
parser quotations sbufs sequences slots source-files splitting locals.parser macros math memoize multiline namespaces parser
quotations sbufs sequences slots source-files splitting
stack-checker strings strings.parser strings.parser.private stack-checker strings strings.parser strings.parser.private
typed vectors vocabs vocabs.parser words words.alias typed vectors vocabs vocabs.parser words words.alias
words.constant words.symbol delegate.private hints multiline ; words.constant words.symbol ;
IN: bootstrap.syntax IN: bootstrap.syntax
! These words are defined as a top-level form, instead of with ! These words are defined as a top-level form, instead of with
@ -102,6 +103,10 @@ IN: bootstrap.syntax
"````" parse-multiline-string-new suffix! "````" parse-multiline-string-new suffix!
] define-core-syntax ] define-core-syntax
"$\\" [
scan-word expand-literal >vector
] define-core-syntax
! Different from parse-multiline-string ! Different from parse-multiline-string
"factor\"" [ "factor\"" [
lexer get skip-blank parse-string suffix! lexer get skip-blank parse-string suffix!

View File

@ -43,7 +43,7 @@ M: nehe2-gadget draw-gadget* ( gadget -- )
MAIN-WINDOW: run2 MAIN-WINDOW: run2
{ {
{ title "NeHe Tutorial 2" } { title "NeHe Tutorial 2" }
{ pref-dim { $ width $ height } } { pref-dim { $\ width $\ height } }
{ pixel-format-attributes { { pixel-format-attributes {
windowed windowed
double-buffered double-buffered

View File

@ -43,5 +43,5 @@ M: nehe3-gadget draw-gadget* ( gadget -- )
-1.0 -1.0 0.0 glVertex3f -1.0 -1.0 0.0 glVertex3f
] do-state ; ] do-state ;
MAIN-WINDOW: run3 { { title "NeHe Tutorial 3" } { pref-dim { $ width $ height } } } MAIN-WINDOW: run3 { { title "NeHe Tutorial 3" } { pref-dim { $\ width $\ height } } }
<nehe3-gadget> >>gadgets ; <nehe3-gadget> >>gadgets ;

View File

@ -71,7 +71,7 @@ M: nehe4-gadget ungraft* ( gadget -- )
MAIN-WINDOW: run4 MAIN-WINDOW: run4
{ {
{ title "NeHe Tutorial 4" } { title "NeHe Tutorial 4" }
{ pref-dim { $ width $ height } } { pref-dim { $\ width $\ height } }
{ pixel-format-attributes { { pixel-format-attributes {
windowed windowed
double-buffered double-buffered

View File

@ -123,7 +123,7 @@ M: nehe5-gadget ungraft* ( gadget -- )
MAIN-WINDOW: run5 MAIN-WINDOW: run5
{ {
{ title "NeHe Tutorial 5" } { title "NeHe Tutorial 5" }
{ pref-dim { $ width $ height } } { pref-dim { $\ width $\ height } }
{ pixel-format-attributes { { pixel-format-attributes {
windowed windowed
double-buffered double-buffered

View File

@ -21,7 +21,7 @@ CONSTANT: validation-output [[
]] ; ]] ;
cpu ppc? [ cpu ppc? [
{ $ validation-output } { $\ validation-output }
[ [ "resource:extra/macho/a.macho" macho-nm ] with-string-writer ] [ [ "resource:extra/macho/a.macho" macho-nm ] with-string-writer ]
unit-test unit-test

View File

@ -27,110 +27,110 @@ SYMBOL: non-power-of-2-textures?
ERROR: unsupported-component-order component-order component-type ; ERROR: unsupported-component-order component-order component-type ;
CONSTANT: image-internal-formats H{ CONSTANT: image-internal-formats H{
{ { A ubyte-components } $ GL_ALPHA8 } { { A ubyte-components } $\ GL_ALPHA8 }
{ { A ushort-components } $ GL_ALPHA16 } { { A ushort-components } $\ GL_ALPHA16 }
{ { A half-components } $ GL_ALPHA16F_ARB } { { A half-components } $\ GL_ALPHA16F_ARB }
{ { A float-components } $ GL_ALPHA32F_ARB } { { A float-components } $\ GL_ALPHA32F_ARB }
{ { A byte-integer-components } $ GL_ALPHA8I_EXT } { { A byte-integer-components } $\ GL_ALPHA8I_EXT }
{ { A ubyte-integer-components } $ GL_ALPHA8UI_EXT } { { A ubyte-integer-components } $\ GL_ALPHA8UI_EXT }
{ { A short-integer-components } $ GL_ALPHA16I_EXT } { { A short-integer-components } $\ GL_ALPHA16I_EXT }
{ { A ushort-integer-components } $ GL_ALPHA16UI_EXT } { { A ushort-integer-components } $\ GL_ALPHA16UI_EXT }
{ { A int-integer-components } $ GL_ALPHA32I_EXT } { { A int-integer-components } $\ GL_ALPHA32I_EXT }
{ { A uint-integer-components } $ GL_ALPHA32UI_EXT } { { A uint-integer-components } $\ GL_ALPHA32UI_EXT }
{ { L ubyte-components } $ GL_LUMINANCE8 } { { L ubyte-components } $\ GL_LUMINANCE8 }
{ { L ushort-components } $ GL_LUMINANCE16 } { { L ushort-components } $\ GL_LUMINANCE16 }
{ { L half-components } $ GL_LUMINANCE16F_ARB } { { L half-components } $\ GL_LUMINANCE16F_ARB }
{ { L float-components } $ GL_LUMINANCE32F_ARB } { { L float-components } $\ GL_LUMINANCE32F_ARB }
{ { L byte-integer-components } $ GL_LUMINANCE8I_EXT } { { L byte-integer-components } $\ GL_LUMINANCE8I_EXT }
{ { L ubyte-integer-components } $ GL_LUMINANCE8UI_EXT } { { L ubyte-integer-components } $\ GL_LUMINANCE8UI_EXT }
{ { L short-integer-components } $ GL_LUMINANCE16I_EXT } { { L short-integer-components } $\ GL_LUMINANCE16I_EXT }
{ { L ushort-integer-components } $ GL_LUMINANCE16UI_EXT } { { L ushort-integer-components } $\ GL_LUMINANCE16UI_EXT }
{ { L int-integer-components } $ GL_LUMINANCE32I_EXT } { { L int-integer-components } $\ GL_LUMINANCE32I_EXT }
{ { L uint-integer-components } $ GL_LUMINANCE32UI_EXT } { { L uint-integer-components } $\ GL_LUMINANCE32UI_EXT }
{ { R ubyte-components } $ GL_R8 } { { R ubyte-components } $\ GL_R8 }
{ { R ushort-components } $ GL_R16 } { { R ushort-components } $\ GL_R16 }
{ { R half-components } $ GL_R16F } { { R half-components } $\ GL_R16F }
{ { R float-components } $ GL_R32F } { { R float-components } $\ GL_R32F }
{ { R byte-integer-components } $ GL_R8I } { { R byte-integer-components } $\ GL_R8I }
{ { R ubyte-integer-components } $ GL_R8UI } { { R ubyte-integer-components } $\ GL_R8UI }
{ { R short-integer-components } $ GL_R16I } { { R short-integer-components } $\ GL_R16I }
{ { R ushort-integer-components } $ GL_R16UI } { { R ushort-integer-components } $\ GL_R16UI }
{ { R int-integer-components } $ GL_R32I } { { R int-integer-components } $\ GL_R32I }
{ { R uint-integer-components } $ GL_R32UI } { { R uint-integer-components } $\ GL_R32UI }
{ { INTENSITY ubyte-components } $ GL_INTENSITY8 } { { INTENSITY ubyte-components } $\ GL_INTENSITY8 }
{ { INTENSITY ushort-components } $ GL_INTENSITY16 } { { INTENSITY ushort-components } $\ GL_INTENSITY16 }
{ { INTENSITY half-components } $ GL_INTENSITY16F_ARB } { { INTENSITY half-components } $\ GL_INTENSITY16F_ARB }
{ { INTENSITY float-components } $ GL_INTENSITY32F_ARB } { { INTENSITY float-components } $\ GL_INTENSITY32F_ARB }
{ { INTENSITY byte-integer-components } $ GL_INTENSITY8I_EXT } { { INTENSITY byte-integer-components } $\ GL_INTENSITY8I_EXT }
{ { INTENSITY ubyte-integer-components } $ GL_INTENSITY8UI_EXT } { { INTENSITY ubyte-integer-components } $\ GL_INTENSITY8UI_EXT }
{ { INTENSITY short-integer-components } $ GL_INTENSITY16I_EXT } { { INTENSITY short-integer-components } $\ GL_INTENSITY16I_EXT }
{ { INTENSITY ushort-integer-components } $ GL_INTENSITY16UI_EXT } { { INTENSITY ushort-integer-components } $\ GL_INTENSITY16UI_EXT }
{ { INTENSITY int-integer-components } $ GL_INTENSITY32I_EXT } { { INTENSITY int-integer-components } $\ GL_INTENSITY32I_EXT }
{ { INTENSITY uint-integer-components } $ GL_INTENSITY32UI_EXT } { { INTENSITY uint-integer-components } $\ GL_INTENSITY32UI_EXT }
{ { DEPTH ushort-components } $ GL_DEPTH_COMPONENT16 } { { DEPTH ushort-components } $\ GL_DEPTH_COMPONENT16 }
{ { DEPTH u-24-components } $ GL_DEPTH_COMPONENT24 } { { DEPTH u-24-components } $\ GL_DEPTH_COMPONENT24 }
{ { DEPTH uint-components } $ GL_DEPTH_COMPONENT32 } { { DEPTH uint-components } $\ GL_DEPTH_COMPONENT32 }
{ { DEPTH float-components } $ GL_DEPTH_COMPONENT32F } { { DEPTH float-components } $\ GL_DEPTH_COMPONENT32F }
{ { LA ubyte-components } $ GL_LUMINANCE8_ALPHA8 } { { LA ubyte-components } $\ GL_LUMINANCE8_ALPHA8 }
{ { LA ushort-components } $ GL_LUMINANCE16_ALPHA16 } { { LA ushort-components } $\ GL_LUMINANCE16_ALPHA16 }
{ { LA half-components } $ GL_LUMINANCE_ALPHA16F_ARB } { { LA half-components } $\ GL_LUMINANCE_ALPHA16F_ARB }
{ { LA float-components } $ GL_LUMINANCE_ALPHA32F_ARB } { { LA float-components } $\ GL_LUMINANCE_ALPHA32F_ARB }
{ { LA byte-integer-components } $ GL_LUMINANCE_ALPHA8I_EXT } { { LA byte-integer-components } $\ GL_LUMINANCE_ALPHA8I_EXT }
{ { LA ubyte-integer-components } $ GL_LUMINANCE_ALPHA8UI_EXT } { { LA ubyte-integer-components } $\ GL_LUMINANCE_ALPHA8UI_EXT }
{ { LA short-integer-components } $ GL_LUMINANCE_ALPHA16I_EXT } { { LA short-integer-components } $\ GL_LUMINANCE_ALPHA16I_EXT }
{ { LA ushort-integer-components } $ GL_LUMINANCE_ALPHA16UI_EXT } { { LA ushort-integer-components } $\ GL_LUMINANCE_ALPHA16UI_EXT }
{ { LA int-integer-components } $ GL_LUMINANCE_ALPHA32I_EXT } { { LA int-integer-components } $\ GL_LUMINANCE_ALPHA32I_EXT }
{ { LA uint-integer-components } $ GL_LUMINANCE_ALPHA32UI_EXT } { { LA uint-integer-components } $\ GL_LUMINANCE_ALPHA32UI_EXT }
{ { RG ubyte-components } $ GL_RG8 } { { RG ubyte-components } $\ GL_RG8 }
{ { RG ushort-components } $ GL_RG16 } { { RG ushort-components } $\ GL_RG16 }
{ { RG half-components } $ GL_RG16F } { { RG half-components } $\ GL_RG16F }
{ { RG float-components } $ GL_RG32F } { { RG float-components } $\ GL_RG32F }
{ { RG byte-integer-components } $ GL_RG8I } { { RG byte-integer-components } $\ GL_RG8I }
{ { RG ubyte-integer-components } $ GL_RG8UI } { { RG ubyte-integer-components } $\ GL_RG8UI }
{ { RG short-integer-components } $ GL_RG16I } { { RG short-integer-components } $\ GL_RG16I }
{ { RG ushort-integer-components } $ GL_RG16UI } { { RG ushort-integer-components } $\ GL_RG16UI }
{ { RG int-integer-components } $ GL_RG32I } { { RG int-integer-components } $\ GL_RG32I }
{ { RG uint-integer-components } $ GL_RG32UI } { { RG uint-integer-components } $\ GL_RG32UI }
{ { DEPTH-STENCIL u-24-8-components } $ GL_DEPTH24_STENCIL8 } { { DEPTH-STENCIL u-24-8-components } $\ GL_DEPTH24_STENCIL8 }
{ { DEPTH-STENCIL float-32-u-8-components } $ GL_DEPTH32F_STENCIL8 } { { DEPTH-STENCIL float-32-u-8-components } $\ GL_DEPTH32F_STENCIL8 }
{ { RGB ubyte-components } $ GL_RGB8 } { { RGB ubyte-components } $\ GL_RGB8 }
{ { RGB ushort-components } $ GL_RGB16 } { { RGB ushort-components } $\ GL_RGB16 }
{ { RGB half-components } $ GL_RGB16F } { { RGB half-components } $\ GL_RGB16F }
{ { RGB float-components } $ GL_RGB32F } { { RGB float-components } $\ GL_RGB32F }
{ { RGB byte-integer-components } $ GL_RGB8I } { { RGB byte-integer-components } $\ GL_RGB8I }
{ { RGB ubyte-integer-components } $ GL_RGB8UI } { { RGB ubyte-integer-components } $\ GL_RGB8UI }
{ { RGB byte-integer-components } $ GL_RGB8I } { { RGB byte-integer-components } $\ GL_RGB8I }
{ { RGB ubyte-integer-components } $ GL_RGB8UI } { { RGB ubyte-integer-components } $\ GL_RGB8UI }
{ { RGB short-integer-components } $ GL_RGB16I } { { RGB short-integer-components } $\ GL_RGB16I }
{ { RGB ushort-integer-components } $ GL_RGB16UI } { { RGB ushort-integer-components } $\ GL_RGB16UI }
{ { RGB int-integer-components } $ GL_RGB32I } { { RGB int-integer-components } $\ GL_RGB32I }
{ { RGB uint-integer-components } $ GL_RGB32UI } { { RGB uint-integer-components } $\ GL_RGB32UI }
{ { RGB u-5-6-5-components } $ GL_RGB5 } { { RGB u-5-6-5-components } $\ GL_RGB5 }
{ { RGB u-9-9-9-e5-components } $ GL_RGB9_E5 } { { RGB u-9-9-9-e5-components } $\ GL_RGB9_E5 }
{ { RGB float-11-11-10-components } $ GL_R11F_G11F_B10F } { { RGB float-11-11-10-components } $\ GL_R11F_G11F_B10F }
{ { RGBA ubyte-components } $ GL_RGBA8 } { { RGBA ubyte-components } $\ GL_RGBA8 }
{ { RGBA ushort-components } $ GL_RGBA16 } { { RGBA ushort-components } $\ GL_RGBA16 }
{ { RGBA half-components } $ GL_RGBA16F } { { RGBA half-components } $\ GL_RGBA16F }
{ { RGBA float-components } $ GL_RGBA32F } { { RGBA float-components } $\ GL_RGBA32F }
{ { RGBA byte-integer-components } $ GL_RGBA8I } { { RGBA byte-integer-components } $\ GL_RGBA8I }
{ { RGBA ubyte-integer-components } $ GL_RGBA8UI } { { RGBA ubyte-integer-components } $\ GL_RGBA8UI }
{ { RGBA byte-integer-components } $ GL_RGBA8I } { { RGBA byte-integer-components } $\ GL_RGBA8I }
{ { RGBA ubyte-integer-components } $ GL_RGBA8UI } { { RGBA ubyte-integer-components } $\ GL_RGBA8UI }
{ { RGBA short-integer-components } $ GL_RGBA16I } { { RGBA short-integer-components } $\ GL_RGBA16I }
{ { RGBA ushort-integer-components } $ GL_RGBA16UI } { { RGBA ushort-integer-components } $\ GL_RGBA16UI }
{ { RGBA int-integer-components } $ GL_RGBA32I } { { RGBA int-integer-components } $\ GL_RGBA32I }
{ { RGBA uint-integer-components } $ GL_RGBA32UI } { { RGBA uint-integer-components } $\ GL_RGBA32UI }
{ { RGBA u-5-5-5-1-components } $ GL_RGB5_A1 } { { RGBA u-5-5-5-1-components } $\ GL_RGB5_A1 }
{ { RGBA u-10-10-10-2-components } $ GL_RGB10_A2 } { { RGBA u-10-10-10-2-components } $\ GL_RGB10_A2 }
} ; } ;
GENERIC: fix-internal-component-order ( order -- order' ) ; GENERIC: fix-internal-component-order ( order -- order' ) ;

View File

@ -39,11 +39,11 @@ os unix? [ [ 10 ] [ PCRE_CONFIG_NEWLINE pcre-config ] unit-test ] when
! these configuration parameters. ! these configuration parameters.
{ t } [ { t } [
[ PCRE_CONFIG_UTF16 pcre-config ] [ what>> ] recover [ PCRE_CONFIG_UTF16 pcre-config ] [ what>> ] recover
{ 0 $ PCRE_CONFIG_UTF16 } member? { 0 $\ PCRE_CONFIG_UTF16 } member?
] unit-test ] unit-test
{ t } [ { t } [
[ PCRE_CONFIG_UTF32 pcre-config ] [ what>> ] recover [ PCRE_CONFIG_UTF32 pcre-config ] [ what>> ] recover
{ 0 $ PCRE_CONFIG_UTF32 } member? { 0 $\ PCRE_CONFIG_UTF32 } member?
] unit-test ] unit-test
{ 33 } { 33 }

View File

@ -142,7 +142,7 @@ CONSTANT: DIRID_SRCPATH 1 ;
CONSTANT: DIRID_WINDOWS 10 ; CONSTANT: DIRID_WINDOWS 10 ;
CONSTANT: DIRID_SYSTEM 11 ; CONSTANT: DIRID_SYSTEM 11 ;
CONSTANT: DIRID_DRIVERS 12 ; CONSTANT: DIRID_DRIVERS 12 ;
CONSTANT: DIRID_IOSUBSYS $ DIRID_DRIVERS ; CONSTANT: DIRID_IOSUBSYS $\ DIRID_DRIVERS ;
CONSTANT: DIRID_INF 17 ; CONSTANT: DIRID_INF 17 ;
CONSTANT: DIRID_HELP 18 ; CONSTANT: DIRID_HELP 18 ;
CONSTANT: DIRID_FONTS 20 ; CONSTANT: DIRID_FONTS 20 ;
@ -157,7 +157,7 @@ CONSTANT: DIRID_SPOOLDRIVERS 52 ;
CONSTANT: DIRID_USERPROFILE 53 ; CONSTANT: DIRID_USERPROFILE 53 ;
CONSTANT: DIRID_LOADER 54 ; CONSTANT: DIRID_LOADER 54 ;
CONSTANT: DIRID_PRINTPROCESSOR 55 ; CONSTANT: DIRID_PRINTPROCESSOR 55 ;
CONSTANT: DIRID_DEFAULT $ DIRID_SYSTEM ; CONSTANT: DIRID_DEFAULT $\ DIRID_SYSTEM ;
CONSTANT: DIRID_COMMON_STARTMENU 16406 ; CONSTANT: DIRID_COMMON_STARTMENU 16406 ;
CONSTANT: DIRID_COMMON_PROGRAMS 16407 ; CONSTANT: DIRID_COMMON_PROGRAMS 16407 ;
CONSTANT: DIRID_COMMON_STARTUP 16408 ; CONSTANT: DIRID_COMMON_STARTUP 16408 ;
@ -212,7 +212,7 @@ CONSTANT: FILEOP_BACKUP 3 ;
CONSTANT: FILEOP_ABORT 0 ; CONSTANT: FILEOP_ABORT 0 ;
CONSTANT: FILEOP_DOIT 1 ; CONSTANT: FILEOP_DOIT 1 ;
CONSTANT: FILEOP_SKIP 2 ; CONSTANT: FILEOP_SKIP 2 ;
CONSTANT: FILEOP_RETRY $ FILEOP_DOIT ; CONSTANT: FILEOP_RETRY $\ FILEOP_DOIT ;
CONSTANT: FILEOP_NEWPATH 4 ; CONSTANT: FILEOP_NEWPATH 4 ;
CONSTANT: COPYFLG_WARN_IF_SKIP 0x00000001 ; CONSTANT: COPYFLG_WARN_IF_SKIP 0x00000001 ;
CONSTANT: COPYFLG_NOSKIP 0x00000002 ; CONSTANT: COPYFLG_NOSKIP 0x00000002 ;
@ -400,9 +400,9 @@ CONSTANT: SPINT_DEFAULT 0x00000002 ;
CONSTANT: SPINT_REMOVED 0x00000004 ; CONSTANT: SPINT_REMOVED 0x00000004 ;
TYPEDEF: SP_DEVICE_INTERFACE_DATA SP_INTERFACE_DEVICE_DATA ; TYPEDEF: SP_DEVICE_INTERFACE_DATA SP_INTERFACE_DEVICE_DATA ;
TYPEDEF: PSP_DEVICE_INTERFACE_DATA PSP_INTERFACE_DEVICE_DAT ; TYPEDEF: PSP_DEVICE_INTERFACE_DATA PSP_INTERFACE_DEVICE_DAT ;
CONSTANT: SPID_ACTIVE $ SPINT_ACTIVE ; CONSTANT: SPID_ACTIVE $\ SPINT_ACTIVE ;
CONSTANT: SPID_DEFAULT $ SPINT_DEFAULT ; CONSTANT: SPID_DEFAULT $\ SPINT_DEFAULT ;
CONSTANT: SPID_REMOVED $ SPINT_REMOVED ; CONSTANT: SPID_REMOVED $\ SPINT_REMOVED ;
PACKED-STRUCT: SP_DEVICE_INTERFACE_DETAIL_DATA_A PACKED-STRUCT: SP_DEVICE_INTERFACE_DETAIL_DATA_A
{ cbSize DWORD } { cbSize DWORD }
@ -663,8 +663,8 @@ TYPEDEF: SP_INSTALLWIZARD_DATA* PSP_INSTALLWIZARD_DATA ;
CONSTANT: NDW_INSTALLFLAG_DIDFACTDEFS 0x00000001 ; CONSTANT: NDW_INSTALLFLAG_DIDFACTDEFS 0x00000001 ;
CONSTANT: NDW_INSTALLFLAG_HARDWAREALLREADYIN 0x00000002 ; CONSTANT: NDW_INSTALLFLAG_HARDWAREALLREADYIN 0x00000002 ;
CONSTANT: NDW_INSTALLFLAG_NEEDRESTART $ DI_NEEDRESTART ; CONSTANT: NDW_INSTALLFLAG_NEEDRESTART $\ DI_NEEDRESTART ;
CONSTANT: NDW_INSTALLFLAG_NEEDREBOOT $ DI_NEEDREBOOT ; CONSTANT: NDW_INSTALLFLAG_NEEDREBOOT $\ DI_NEEDREBOOT ;
CONSTANT: NDW_INSTALLFLAG_NEEDSHUTDOWN 0x00000200 ; CONSTANT: NDW_INSTALLFLAG_NEEDSHUTDOWN 0x00000200 ;
CONSTANT: NDW_INSTALLFLAG_EXPRESSINTRO 0x00000400 ; CONSTANT: NDW_INSTALLFLAG_EXPRESSINTRO 0x00000400 ;
CONSTANT: NDW_INSTALLFLAG_SKIPISDEVINSTALLED 0x00000800 ; CONSTANT: NDW_INSTALLFLAG_SKIPISDEVINSTALLED 0x00000800 ;
@ -994,11 +994,11 @@ CONSTANT: ERROR_WRONG_INF_TYPE $$[ APPLICATION_ERROR_MASK ER
CONSTANT: ERROR_FILE_HASH_NOT_IN_CATALOG $$[ APPLICATION_ERROR_MASK ERROR_SEVERITY_ERROR 0x24B bitor bitor ] ; CONSTANT: ERROR_FILE_HASH_NOT_IN_CATALOG $$[ APPLICATION_ERROR_MASK ERROR_SEVERITY_ERROR 0x24B bitor bitor ] ;
CONSTANT: ERROR_DRIVER_STORE_DELETE_FAILED $$[ APPLICATION_ERROR_MASK ERROR_SEVERITY_ERROR 0x24C bitor bitor ] ; CONSTANT: ERROR_DRIVER_STORE_DELETE_FAILED $$[ APPLICATION_ERROR_MASK ERROR_SEVERITY_ERROR 0x24C bitor bitor ] ;
CONSTANT: ERROR_UNRECOVERABLE_STACK_OVERFLOW $$[ APPLICATION_ERROR_MASK ERROR_SEVERITY_ERROR 0x300 bitor bitor ] ; CONSTANT: ERROR_UNRECOVERABLE_STACK_OVERFLOW $$[ APPLICATION_ERROR_MASK ERROR_SEVERITY_ERROR 0x300 bitor bitor ] ;
CONSTANT: EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW $ ERROR_UNRECOVERABLE_STACK_OVERFLOW ; CONSTANT: EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW $\ ERROR_UNRECOVERABLE_STACK_OVERFLOW ;
CONSTANT: ERROR_NO_DEFAULT_INTERFACE_DEVICE $ ERROR_NO_DEFAULT_DEVICE_INTERFACE ; CONSTANT: ERROR_NO_DEFAULT_INTERFACE_DEVICE $\ ERROR_NO_DEFAULT_DEVICE_INTERFACE ;
CONSTANT: ERROR_INTERFACE_DEVICE_ACTIVE $ ERROR_DEVICE_INTERFACE_ACTIVE ; CONSTANT: ERROR_INTERFACE_DEVICE_ACTIVE $\ ERROR_DEVICE_INTERFACE_ACTIVE ;
CONSTANT: ERROR_INTERFACE_DEVICE_REMOVED $ ERROR_DEVICE_INTERFACE_REMOVED ; CONSTANT: ERROR_INTERFACE_DEVICE_REMOVED $\ ERROR_DEVICE_INTERFACE_REMOVED ;
CONSTANT: ERROR_NO_SUCH_INTERFACE_DEVICE $ ERROR_NO_SUCH_DEVICE_INTERFACE ; CONSTANT: ERROR_NO_SUCH_INTERFACE_DEVICE $\ ERROR_NO_SUCH_DEVICE_INTERFACE ;
CONSTANT: ERROR_NOT_INSTALLED $$[ APPLICATION_ERROR_MASK ERROR_SEVERITY_ERROR 0x1000 bitor bitor ] ; CONSTANT: ERROR_NOT_INSTALLED $$[ APPLICATION_ERROR_MASK ERROR_SEVERITY_ERROR 0x1000 bitor bitor ] ;
FUNCTION: BOOL SetupGetInfInformationA ( LPCVOID InfSpec, DWORD SearchControl, PSP_INF_INFORMATION ReturnBuffer, DWORD ReturnBufferSize, PDWORD RequiredSize ) ; FUNCTION: BOOL SetupGetInfInformationA ( LPCVOID InfSpec, DWORD SearchControl, PSP_INF_INFORMATION ReturnBuffer, DWORD ReturnBufferSize, PDWORD RequiredSize ) ;
@ -1206,7 +1206,7 @@ ALIAS: SetupInstallFileEx SetupInstallFileExW ;
CONSTANT: SP_COPY_DELETESOURCE 0x0000001 ; CONSTANT: SP_COPY_DELETESOURCE 0x0000001 ;
CONSTANT: SP_COPY_REPLACEONLY 0x0000002 ; CONSTANT: SP_COPY_REPLACEONLY 0x0000002 ;
CONSTANT: SP_COPY_NEWER 0x0000004 ; CONSTANT: SP_COPY_NEWER 0x0000004 ;
CONSTANT: SP_COPY_NEWER_OR_SAME $ SP_COPY_NEWER ; CONSTANT: SP_COPY_NEWER_OR_SAME $\ SP_COPY_NEWER ;
CONSTANT: SP_COPY_NOOVERWRITE 0x0000008 ; CONSTANT: SP_COPY_NOOVERWRITE 0x0000008 ;
CONSTANT: SP_COPY_NODECOMP 0x0000010 ; CONSTANT: SP_COPY_NODECOMP 0x0000010 ;
CONSTANT: SP_COPY_LANGUAGEAWARE 0x0000020 ; CONSTANT: SP_COPY_LANGUAGEAWARE 0x0000020 ;
@ -1413,16 +1413,16 @@ CONSTANT: FLG_ADDREG_TYPE_BINARY 0x00000001 ;
CONSTANT: FLG_ADDREG_TYPE_DWORD 0x00010001 ; CONSTANT: FLG_ADDREG_TYPE_DWORD 0x00010001 ;
CONSTANT: FLG_ADDREG_TYPE_NONE 0x00020001 ; CONSTANT: FLG_ADDREG_TYPE_NONE 0x00020001 ;
CONSTANT: FLG_DELREG_VALUE 0x00000000 ; CONSTANT: FLG_DELREG_VALUE 0x00000000 ;
CONSTANT: FLG_DELREG_TYPE_MASK $ FLG_ADDREG_TYPE_MASK ; CONSTANT: FLG_DELREG_TYPE_MASK $\ FLG_ADDREG_TYPE_MASK ;
CONSTANT: FLG_DELREG_TYPE_SZ $ FLG_ADDREG_TYPE_SZ ; CONSTANT: FLG_DELREG_TYPE_SZ $\ FLG_ADDREG_TYPE_SZ ;
CONSTANT: FLG_DELREG_TYPE_MULTI_SZ $ FLG_ADDREG_TYPE_MULTI_SZ ; CONSTANT: FLG_DELREG_TYPE_MULTI_SZ $\ FLG_ADDREG_TYPE_MULTI_SZ ;
CONSTANT: FLG_DELREG_TYPE_EXPAND_SZ $ FLG_ADDREG_TYPE_EXPAND_SZ ; CONSTANT: FLG_DELREG_TYPE_EXPAND_SZ $\ FLG_ADDREG_TYPE_EXPAND_SZ ;
CONSTANT: FLG_DELREG_TYPE_BINARY $ FLG_ADDREG_TYPE_BINARY ; CONSTANT: FLG_DELREG_TYPE_BINARY $\ FLG_ADDREG_TYPE_BINARY ;
CONSTANT: FLG_DELREG_TYPE_DWORD $ FLG_ADDREG_TYPE_DWORD ; CONSTANT: FLG_DELREG_TYPE_DWORD $\ FLG_ADDREG_TYPE_DWORD ;
CONSTANT: FLG_DELREG_TYPE_NONE $ FLG_ADDREG_TYPE_NONE ; CONSTANT: FLG_DELREG_TYPE_NONE $\ FLG_ADDREG_TYPE_NONE ;
CONSTANT: FLG_DELREG_64BITKEY $ FLG_ADDREG_64BITKEY ; CONSTANT: FLG_DELREG_64BITKEY $\ FLG_ADDREG_64BITKEY ;
CONSTANT: FLG_DELREG_KEYONLY_COMMON $ FLG_ADDREG_KEYONLY_COMMON ; CONSTANT: FLG_DELREG_KEYONLY_COMMON $\ FLG_ADDREG_KEYONLY_COMMON ;
CONSTANT: FLG_DELREG_32BITKEY $ FLG_ADDREG_32BITKEY ; CONSTANT: FLG_DELREG_32BITKEY $\ FLG_ADDREG_32BITKEY ;
CONSTANT: FLG_DELREG_OPERATION_MASK 0x000000FE ; CONSTANT: FLG_DELREG_OPERATION_MASK 0x000000FE ;
CONSTANT: FLG_DELREG_MULTI_SZ_DELSTRING 0x00018002 ; CONSTANT: FLG_DELREG_MULTI_SZ_DELSTRING 0x00018002 ;
CONSTANT: FLG_BITREG_CLEARBITS 0x00000000 ; CONSTANT: FLG_BITREG_CLEARBITS 0x00000000 ;
@ -1670,7 +1670,7 @@ CONSTANT: DIGCF_PRESENT 0x00000002 ;
CONSTANT: DIGCF_ALLCLASSES 0x00000004 ; CONSTANT: DIGCF_ALLCLASSES 0x00000004 ;
CONSTANT: DIGCF_PROFILE 0x00000008 ; CONSTANT: DIGCF_PROFILE 0x00000008 ;
CONSTANT: DIGCF_DEVICEINTERFACE 0x00000010 ; CONSTANT: DIGCF_DEVICEINTERFACE 0x00000010 ;
CONSTANT: DIGCF_INTERFACEDEVICE $ DIGCF_DEVICEINTERFACE ; CONSTANT: DIGCF_INTERFACEDEVICE $\ DIGCF_DEVICEINTERFACE ;
FUNCTION: HDEVINFO SetupDiGetClassDevsA ( GUID* ClassGuid, PCSTR Enumerator, HWND hwndParent, DWORD Flags ) ; FUNCTION: HDEVINFO SetupDiGetClassDevsA ( GUID* ClassGuid, PCSTR Enumerator, HWND hwndParent, DWORD Flags ) ;
FUNCTION: HDEVINFO SetupDiGetClassDevsW ( GUID* ClassGuid, PCWSTR Enumerator, HWND hwndParent, DWORD Flags ) ; FUNCTION: HDEVINFO SetupDiGetClassDevsW ( GUID* ClassGuid, PCWSTR Enumerator, HWND hwndParent, DWORD Flags ) ;

View File

@ -80,24 +80,24 @@ MACRO: <DIDATAFORMAT> ( dwFlags dwDataSize struct rgodf-array -- alien )
: define-guid-constants ( -- ) : define-guid-constants ( -- )
{ {
{ GUID_XAxis_malloced $ GUID_XAxis } { GUID_XAxis_malloced $\ GUID_XAxis }
{ GUID_YAxis_malloced $ GUID_YAxis } { GUID_YAxis_malloced $\ GUID_YAxis }
{ GUID_ZAxis_malloced $ GUID_ZAxis } { GUID_ZAxis_malloced $\ GUID_ZAxis }
{ GUID_RxAxis_malloced $ GUID_RxAxis } { GUID_RxAxis_malloced $\ GUID_RxAxis }
{ GUID_RyAxis_malloced $ GUID_RyAxis } { GUID_RyAxis_malloced $\ GUID_RyAxis }
{ GUID_RzAxis_malloced $ GUID_RzAxis } { GUID_RzAxis_malloced $\ GUID_RzAxis }
{ GUID_Slider_malloced $ GUID_Slider } { GUID_Slider_malloced $\ GUID_Slider }
{ GUID_Button_malloced $ GUID_Button } { GUID_Button_malloced $\ GUID_Button }
{ GUID_Key_malloced $ GUID_Key } { GUID_Key_malloced $\ GUID_Key }
{ GUID_POV_malloced $ GUID_POV } { GUID_POV_malloced $\ GUID_POV }
{ GUID_Unknown_malloced $ GUID_Unknown } { GUID_Unknown_malloced $\ GUID_Unknown }
{ GUID_SysMouse_malloced $ GUID_SysMouse } { GUID_SysMouse_malloced $\ GUID_SysMouse }
{ GUID_SysKeyboard_malloced $ GUID_SysKeyboard } { GUID_SysKeyboard_malloced $\ GUID_SysKeyboard }
{ GUID_Joystick_malloced $ GUID_Joystick } { GUID_Joystick_malloced $\ GUID_Joystick }
{ GUID_SysMouseEm_malloced $ GUID_SysMouseEm } { GUID_SysMouseEm_malloced $\ GUID_SysMouseEm }
{ GUID_SysMouseEm2_malloced $ GUID_SysMouseEm2 } { GUID_SysMouseEm2_malloced $\ GUID_SysMouseEm2 }
{ GUID_SysKeyboardEm_malloced $ GUID_SysKeyboardEm } { GUID_SysKeyboardEm_malloced $\ GUID_SysKeyboardEm }
{ GUID_SysKeyboardEm2_malloced $ GUID_SysKeyboardEm2 } { GUID_SysKeyboardEm2_malloced $\ GUID_SysKeyboardEm2 }
} [ first2 (malloc-guid-symbol) ] each ; } [ first2 (malloc-guid-symbol) ] each ;
: define-joystick-format-constant ( -- ) : define-joystick-format-constant ( -- )

View File

@ -31,9 +31,9 @@ PRIVATE<
: origin>seek-type ( origin -- seek-type ) : origin>seek-type ( origin -- seek-type )
{ {
{ $ STREAM_SEEK_SET [ seek-absolute ] } { $\ STREAM_SEEK_SET [ seek-absolute ] }
{ $ STREAM_SEEK_CUR [ seek-relative ] } { $\ STREAM_SEEK_CUR [ seek-relative ] }
{ $ STREAM_SEEK_END [ seek-end ] } { $\ STREAM_SEEK_END [ seek-end ] }
} case ; } case ;
:: IStream-seek ( stream move origin new-position -- hresult ) :: IStream-seek ( stream move origin new-position -- hresult )

View File

@ -117,7 +117,7 @@ M: postgresql-db-connection <prepared-statement> ( sql in out -- statement )
<simple-statement> dup prepare-statement ; <simple-statement> dup prepare-statement ;
: bind-name% ( -- ) : bind-name% ( -- )
char: $ 0, char: \$ 0,
sql-counter [ inc ] [ get 0# ] bi ; sql-counter [ inc ] [ get 0# ] bi ;
M: postgresql-db-connection bind% ( spec -- ) M: postgresql-db-connection bind% ( spec -- )

View File

@ -67,7 +67,7 @@ M: sphere audio-distance radius>> fsqrt 2.0 * ; inline
raytrace-uniforms boa ; raytrace-uniforms boa ;
CONSTANT: initial-spheres { CONSTANT: initial-spheres {
T{ sphere f { 0.0 1.0 0.0 } { 0.0 0.0 0.0 } 0.0 4.0 $ reflection-color } T{ sphere f { 0.0 1.0 0.0 } { 0.0 0.0 0.0 } 0.0 4.0 $\ reflection-color }
T{ sphere f { 0.0 1.0 0.0 } { 7.0 0.0 0.0 } 0.02 1.0 { 1.0 0.0 0.0 1.0 } } T{ sphere f { 0.0 1.0 0.0 } { 7.0 0.0 0.0 } 0.02 1.0 { 1.0 0.0 0.0 1.0 } }
T{ sphere f { 0.0 0.0 -1.0 } { -9.0 0.0 0.0 } 0.03 1.0 { 0.0 1.0 0.0 1.0 } } T{ sphere f { 0.0 0.0 -1.0 } { -9.0 0.0 0.0 } 0.03 1.0 { 0.0 1.0 0.0 1.0 } }
T{ sphere f { 1.0 0.0 0.0 } { 0.0 5.0 0.0 } 0.025 1.0 { 1.0 1.0 0.0 1.0 } } T{ sphere f { 1.0 0.0 0.0 } { 0.0 5.0 0.0 } 0.025 1.0 { 1.0 1.0 0.0 1.0 } }

View File

@ -120,18 +120,18 @@ TR: hyphens>underscores "-" "_" ;
: feedback-type= ( component-type dim gl-type -- ? ) : feedback-type= ( component-type dim gl-type -- ? )
[ 2array ] dip { [ 2array ] dip {
{ $ GL_FLOAT [ { float-components 1 } ] } { $\ GL_FLOAT [ { float-components 1 } ] }
{ $ GL_FLOAT_VEC2 [ { float-components 2 } ] } { $\ GL_FLOAT_VEC2 [ { float-components 2 } ] }
{ $ GL_FLOAT_VEC3 [ { float-components 3 } ] } { $\ GL_FLOAT_VEC3 [ { float-components 3 } ] }
{ $ GL_FLOAT_VEC4 [ { float-components 4 } ] } { $\ GL_FLOAT_VEC4 [ { float-components 4 } ] }
{ $ GL_INT [ { int-integer-components 1 } ] } { $\ GL_INT [ { int-integer-components 1 } ] }
{ $ GL_INT_VEC2 [ { int-integer-components 2 } ] } { $\ GL_INT_VEC2 [ { int-integer-components 2 } ] }
{ $ GL_INT_VEC3 [ { int-integer-components 3 } ] } { $\ GL_INT_VEC3 [ { int-integer-components 3 } ] }
{ $ GL_INT_VEC4 [ { int-integer-components 4 } ] } { $\ GL_INT_VEC4 [ { int-integer-components 4 } ] }
{ $ GL_UNSIGNED_INT [ { uint-integer-components 1 } ] } { $\ GL_UNSIGNED_INT [ { uint-integer-components 1 } ] }
{ $ GL_UNSIGNED_INT_VEC2 [ { uint-integer-components 2 } ] } { $\ GL_UNSIGNED_INT_VEC2 [ { uint-integer-components 2 } ] }
{ $ GL_UNSIGNED_INT_VEC3 [ { uint-integer-components 3 } ] } { $\ GL_UNSIGNED_INT_VEC3 [ { uint-integer-components 3 } ] }
{ $ GL_UNSIGNED_INT_VEC4 [ { uint-integer-components 4 } ] } { $\ GL_UNSIGNED_INT_VEC4 [ { uint-integer-components 4 } ] }
} case = ; } case = ;
:: assert-feedback-attribute ( size gl-type name vertex-attribute -- ) :: assert-feedback-attribute ( size gl-type name vertex-attribute -- )

View File

@ -175,9 +175,9 @@ PRIVATE<
: gl-triangle-mode> ( triangle-mode -- mode ) : gl-triangle-mode> ( triangle-mode -- mode )
{ {
{ $ GL_POINT [ triangle-points ] } { $\ GL_POINT [ triangle-points ] }
{ $ GL_LINE [ triangle-lines ] } { $\ GL_LINE [ triangle-lines ] }
{ $ GL_FILL [ triangle-fill ] } { $\ GL_FILL [ triangle-fill ] }
} case ; } case ;
: gl-point-sprite-origin ( point-sprite-origin -- sprite-origin ) : gl-point-sprite-origin ( point-sprite-origin -- sprite-origin )
@ -188,8 +188,8 @@ PRIVATE<
: gl-point-sprite-origin> ( point-sprite-origin -- sprite-origin ) : gl-point-sprite-origin> ( point-sprite-origin -- sprite-origin )
{ {
{ $ GL_UPPER_LEFT [ origin-upper-left ] } { $\ GL_UPPER_LEFT [ origin-upper-left ] }
{ $ GL_LOWER_LEFT [ origin-lower-left ] } { $\ GL_LOWER_LEFT [ origin-lower-left ] }
} case ; } case ;
: gl-comparison ( comparison -- comparison ) : gl-comparison ( comparison -- comparison )
@ -206,14 +206,14 @@ PRIVATE<
: gl-comparison> ( comparison -- comparison ) : gl-comparison> ( comparison -- comparison )
{ {
{ $ GL_NEVER [ cmp-never ] } { $\ GL_NEVER [ cmp-never ] }
{ $ GL_ALWAYS [ cmp-always ] } { $\ GL_ALWAYS [ cmp-always ] }
{ $ GL_LESS [ cmp-less ] } { $\ GL_LESS [ cmp-less ] }
{ $ GL_LEQUAL [ cmp-less-equal ] } { $\ GL_LEQUAL [ cmp-less-equal ] }
{ $ GL_EQUAL [ cmp-equal ] } { $\ GL_EQUAL [ cmp-equal ] }
{ $ GL_GEQUAL [ cmp-greater-equal ] } { $\ GL_GEQUAL [ cmp-greater-equal ] }
{ $ GL_GREATER [ cmp-greater ] } { $\ GL_GREATER [ cmp-greater ] }
{ $ GL_NOTEQUAL [ cmp-not-equal ] } { $\ GL_NOTEQUAL [ cmp-not-equal ] }
} case ; } case ;
: gl-stencil-op ( stencil-op -- op ) : gl-stencil-op ( stencil-op -- op )
@ -230,14 +230,14 @@ PRIVATE<
: gl-stencil-op> ( op -- op ) : gl-stencil-op> ( op -- op )
{ {
{ $ GL_KEEP [ op-keep ] } { $\ GL_KEEP [ op-keep ] }
{ $ GL_ZERO [ op-zero ] } { $\ GL_ZERO [ op-zero ] }
{ $ GL_REPLACE [ op-replace ] } { $\ GL_REPLACE [ op-replace ] }
{ $ GL_INVERT [ op-invert ] } { $\ GL_INVERT [ op-invert ] }
{ $ GL_INCR [ op-inc-sat ] } { $\ GL_INCR [ op-inc-sat ] }
{ $ GL_DECR [ op-dec-sat ] } { $\ GL_DECR [ op-dec-sat ] }
{ $ GL_INCR_WRAP [ op-inc-wrap ] } { $\ GL_INCR_WRAP [ op-inc-wrap ] }
{ $ GL_DECR_WRAP [ op-dec-wrap ] } { $\ GL_DECR_WRAP [ op-dec-wrap ] }
} case ; } case ;
: (set-stencil-mode) ( gl-face stencil-mode -- ) : (set-stencil-mode) ( gl-face stencil-mode -- )
@ -260,11 +260,11 @@ PRIVATE<
: gl-blend-equation> ( blend-equation -- blend-equation ) : gl-blend-equation> ( blend-equation -- blend-equation )
{ {
{ $ GL_FUNC_ADD [ eq-add ] } { $\ GL_FUNC_ADD [ eq-add ] }
{ $ GL_FUNC_SUBTRACT [ eq-subtract ] } { $\ GL_FUNC_SUBTRACT [ eq-subtract ] }
{ $ GL_FUNC_REVERSE_SUBTRACT [ eq-reverse-subtract ] } { $\ GL_FUNC_REVERSE_SUBTRACT [ eq-reverse-subtract ] }
{ $ GL_MIN [ eq-min ] } { $\ GL_MIN [ eq-min ] }
{ $ GL_MAX [ eq-max ] } { $\ GL_MAX [ eq-max ] }
} case ; } case ;
: gl-blend-function ( blend-function -- blend-function ) : gl-blend-function ( blend-function -- blend-function )

View File

@ -20,26 +20,26 @@ C: <window-handle> window-handle ;
SINGLETON: cocoa-ui-backend SINGLETON: cocoa-ui-backend
PIXEL-FORMAT-ATTRIBUTE-TABLE: NSOpenGLPFA { } H{ PIXEL-FORMAT-ATTRIBUTE-TABLE: NSOpenGLPFA { } H{
{ double-buffered { $ NSOpenGLPFADoubleBuffer } } { double-buffered { $\ NSOpenGLPFADoubleBuffer } }
{ stereo { $ NSOpenGLPFAStereo } } { stereo { $\ NSOpenGLPFAStereo } }
{ offscreen { $ NSOpenGLPFAOffScreen } } { offscreen { $\ NSOpenGLPFAOffScreen } }
{ fullscreen { $ NSOpenGLPFAFullScreen } } { fullscreen { $\ NSOpenGLPFAFullScreen } }
{ windowed { $ NSOpenGLPFAWindow } } { windowed { $\ NSOpenGLPFAWindow } }
{ accelerated { $ NSOpenGLPFAAccelerated } } { accelerated { $\ NSOpenGLPFAAccelerated } }
{ software-rendered { $ NSOpenGLPFARendererID $ kCGLRendererGenericFloatID } } { software-rendered { $\ NSOpenGLPFARendererID $\ kCGLRendererGenericFloatID } }
{ backing-store { $ NSOpenGLPFABackingStore } } { backing-store { $\ NSOpenGLPFABackingStore } }
{ multisampled { $ NSOpenGLPFAMultisample } } { multisampled { $\ NSOpenGLPFAMultisample } }
{ supersampled { $ NSOpenGLPFASupersample } } { supersampled { $\ NSOpenGLPFASupersample } }
{ sample-alpha { $ NSOpenGLPFASampleAlpha } } { sample-alpha { $\ NSOpenGLPFASampleAlpha } }
{ color-float { $ NSOpenGLPFAColorFloat } } { color-float { $\ NSOpenGLPFAColorFloat } }
{ color-bits { $ NSOpenGLPFAColorSize } } { color-bits { $\ NSOpenGLPFAColorSize } }
{ alpha-bits { $ NSOpenGLPFAAlphaSize } } { alpha-bits { $\ NSOpenGLPFAAlphaSize } }
{ accum-bits { $ NSOpenGLPFAAccumSize } } { accum-bits { $\ NSOpenGLPFAAccumSize } }
{ depth-bits { $ NSOpenGLPFADepthSize } } { depth-bits { $\ NSOpenGLPFADepthSize } }
{ stencil-bits { $ NSOpenGLPFAStencilSize } } { stencil-bits { $\ NSOpenGLPFAStencilSize } }
{ aux-buffers { $ NSOpenGLPFAAuxBuffers } } { aux-buffers { $\ NSOpenGLPFAAuxBuffers } }
{ sample-buffers { $ NSOpenGLPFASampleBuffers } } { sample-buffers { $\ NSOpenGLPFASampleBuffers } }
{ samples { $ NSOpenGLPFASamples } } { samples { $\ NSOpenGLPFASamples } }
} ; } ;
M: cocoa-ui-backend (make-pixel-format) M: cocoa-ui-backend (make-pixel-format)
@ -113,14 +113,14 @@ M: cocoa-ui-backend (fullscreen?) ( world -- ? )
! dialog-window is the same as normal-title-window ! dialog-window is the same as normal-title-window
CONSTANT: window-control>styleMask CONSTANT: window-control>styleMask
H{ H{
{ close-button $ NSClosableWindowMask } { close-button $\ NSClosableWindowMask }
{ minimize-button $ NSMiniaturizableWindowMask } { minimize-button $\ NSMiniaturizableWindowMask }
{ maximize-button 0 } { maximize-button 0 }
{ resize-handles $ NSResizableWindowMask } { resize-handles $\ NSResizableWindowMask }
{ small-title-bar $$[ NSTitledWindowMask NSUtilityWindowMask bitor ] } { small-title-bar $$[ NSTitledWindowMask NSUtilityWindowMask bitor ] }
{ textured-background $ NSTexturedBackgroundWindowMask } { textured-background $\ NSTexturedBackgroundWindowMask }
{ normal-title-bar $ NSTitledWindowMask } { normal-title-bar $\ NSTitledWindowMask }
{ dialog-window $ NSTitledWindowMask } { dialog-window $\ NSTitledWindowMask }
} ; } ;
: world>styleMask ( world -- n ) : world>styleMask ( world -- n )

View File

@ -34,10 +34,10 @@ CONSTANT: NSHelpKeyMask 0x400000 ;
CONSTANT: NSFunctionKeyMask 0x800000 ; CONSTANT: NSFunctionKeyMask 0x800000 ;
CONSTANT: modifiers { CONSTANT: modifiers {
{ S+ $ NSShiftKeyMask } { S+ $\ NSShiftKeyMask }
{ C+ $ NSControlKeyMask } { C+ $\ NSControlKeyMask }
{ A+ $ NSCommandKeyMask } { A+ $\ NSCommandKeyMask }
{ M+ $ NSAlternateKeyMask } { M+ $\ NSAlternateKeyMask }
} ; } ;
CONSTANT: key-codes CONSTANT: key-codes

View File

@ -100,41 +100,41 @@ CONSTANT: events-mask
CONSTANT: modifiers CONSTANT: modifiers
{ {
{ S+ $ GDK_SHIFT_MASK } { S+ $\ GDK_SHIFT_MASK }
{ C+ $ GDK_CONTROL_MASK } { C+ $\ GDK_CONTROL_MASK }
{ A+ $ GDK_MOD1_MASK } { A+ $\ GDK_MOD1_MASK }
} ; } ;
CONSTANT: action-key-codes CONSTANT: action-key-codes
H{ H{
{ $ GDK_KEY_BackSpace "BACKSPACE" } { $\ GDK_KEY_BackSpace "BACKSPACE" }
{ $ GDK_KEY_Tab "TAB" } { $\ GDK_KEY_Tab "TAB" }
{ $ GDK_KEY_ISO_Left_Tab "TAB" } { $\ GDK_KEY_ISO_Left_Tab "TAB" }
{ $ GDK_KEY_Return "RET" } { $\ GDK_KEY_Return "RET" }
{ $ GDK_KEY_KP_Enter "ENTER" } { $\ GDK_KEY_KP_Enter "ENTER" }
{ $ GDK_KEY_Escape "ESC" } { $\ GDK_KEY_Escape "ESC" }
{ $ GDK_KEY_Delete "DELETE" } { $\ GDK_KEY_Delete "DELETE" }
{ $ GDK_KEY_Home "HOME" } { $\ GDK_KEY_Home "HOME" }
{ $ GDK_KEY_Left "LEFT" } { $\ GDK_KEY_Left "LEFT" }
{ $ GDK_KEY_Up "UP" } { $\ GDK_KEY_Up "UP" }
{ $ GDK_KEY_Right "RIGHT" } { $\ GDK_KEY_Right "RIGHT" }
{ $ GDK_KEY_Down "DOWN" } { $\ GDK_KEY_Down "DOWN" }
{ $ GDK_KEY_Page_Up "PAGE_UP" } { $\ GDK_KEY_Page_Up "PAGE_UP" }
{ $ GDK_KEY_Page_Down "PAGE_DOWN" } { $\ GDK_KEY_Page_Down "PAGE_DOWN" }
{ $ GDK_KEY_End "END" } { $\ GDK_KEY_End "END" }
{ $ GDK_KEY_Begin "BEGIN" } { $\ GDK_KEY_Begin "BEGIN" }
{ $ GDK_KEY_F1 "F1" } { $\ GDK_KEY_F1 "F1" }
{ $ GDK_KEY_F2 "F2" } { $\ GDK_KEY_F2 "F2" }
{ $ GDK_KEY_F3 "F3" } { $\ GDK_KEY_F3 "F3" }
{ $ GDK_KEY_F4 "F4" } { $\ GDK_KEY_F4 "F4" }
{ $ GDK_KEY_F5 "F5" } { $\ GDK_KEY_F5 "F5" }
{ $ GDK_KEY_F6 "F6" } { $\ GDK_KEY_F6 "F6" }
{ $ GDK_KEY_F7 "F7" } { $\ GDK_KEY_F7 "F7" }
{ $ GDK_KEY_F8 "F8" } { $\ GDK_KEY_F8 "F8" }
{ $ GDK_KEY_F9 "F9" } { $\ GDK_KEY_F9 "F9" }
{ $ GDK_KEY_F10 "F10" } { $\ GDK_KEY_F10 "F10" }
{ $ GDK_KEY_F11 "F11" } { $\ GDK_KEY_F11 "F11" }
{ $ GDK_KEY_F12 "F12" } { $\ GDK_KEY_F12 "F12" }
} ; } ;
: event-modifiers ( event -- seq ) : event-modifiers ( event -- seq )
@ -148,10 +148,10 @@ CONSTANT: action-key-codes
: scroll-direction ( event -- pair ) : scroll-direction ( event -- pair )
direction>> { direction>> {
{ $ GDK_SCROLL_UP { 0 -1 } } { $\ GDK_SCROLL_UP { 0 -1 } }
{ $ GDK_SCROLL_DOWN { 0 1 } } { $\ GDK_SCROLL_DOWN { 0 1 } }
{ $ GDK_SCROLL_LEFT { -1 0 } } { $\ GDK_SCROLL_LEFT { -1 0 } }
{ $ GDK_SCROLL_RIGHT { 1 0 } } { $\ GDK_SCROLL_RIGHT { 1 0 } }
} at ; } at ;
: on-motion ( win event user-data -- ? ) : on-motion ( win event user-data -- ? )
@ -350,21 +350,21 @@ CONSTANT: action-key-codes
CONSTANT: window-controls>decor-flags CONSTANT: window-controls>decor-flags
H{ H{
{ close-button 0 } { close-button 0 }
{ minimize-button $ GDK_DECOR_MINIMIZE } { minimize-button $\ GDK_DECOR_MINIMIZE }
{ maximize-button $ GDK_DECOR_MAXIMIZE } { maximize-button $\ GDK_DECOR_MAXIMIZE }
{ resize-handles $ GDK_DECOR_RESIZEH } { resize-handles $\ GDK_DECOR_RESIZEH }
{ small-title-bar $ GDK_DECOR_TITLE } { small-title-bar $\ GDK_DECOR_TITLE }
{ normal-title-bar $ GDK_DECOR_TITLE } { normal-title-bar $\ GDK_DECOR_TITLE }
{ textured-background 0 } { textured-background 0 }
{ dialog-window 0 } { dialog-window 0 }
} ; } ;
CONSTANT: window-controls>func-flags CONSTANT: window-controls>func-flags
H{ H{
{ close-button $ GDK_FUNC_CLOSE } { close-button $\ GDK_FUNC_CLOSE }
{ minimize-button $ GDK_FUNC_MINIMIZE } { minimize-button $\ GDK_FUNC_MINIMIZE }
{ maximize-button $ GDK_FUNC_MAXIMIZE } { maximize-button $\ GDK_FUNC_MAXIMIZE }
{ resize-handles $ GDK_FUNC_RESIZE } { resize-handles $\ GDK_FUNC_RESIZE }
{ small-title-bar 0 } { small-title-bar 0 }
{ normal-title-bar 0 } { normal-title-bar 0 }
{ textured-background 0 } { textured-background 0 }

View File

@ -26,31 +26,31 @@ C: <win> win ;
PRIVATE< PRIVATE<
PIXEL-FORMAT-ATTRIBUTE-TABLE: WGL_ARB { $ WGL_SUPPORT_OPENGL_ARB 1 } H{ PIXEL-FORMAT-ATTRIBUTE-TABLE: WGL_ARB { $\ WGL_SUPPORT_OPENGL_ARB 1 } H{
{ double-buffered { $ WGL_DOUBLE_BUFFER_ARB 1 } } { double-buffered { $\ WGL_DOUBLE_BUFFER_ARB 1 } }
{ stereo { $ WGL_STEREO_ARB 1 } } { stereo { $\ WGL_STEREO_ARB 1 } }
{ offscreen { $ WGL_DRAW_TO_BITMAP_ARB 1 } } { offscreen { $\ WGL_DRAW_TO_BITMAP_ARB 1 } }
{ fullscreen { $ WGL_DRAW_TO_WINDOW_ARB 1 } } { fullscreen { $\ WGL_DRAW_TO_WINDOW_ARB 1 } }
{ windowed { $ WGL_DRAW_TO_WINDOW_ARB 1 } } { windowed { $\ WGL_DRAW_TO_WINDOW_ARB 1 } }
{ accelerated { $ WGL_ACCELERATION_ARB $ WGL_FULL_ACCELERATION_ARB } } { accelerated { $\ WGL_ACCELERATION_ARB $\ WGL_FULL_ACCELERATION_ARB } }
{ software-rendered { $ WGL_ACCELERATION_ARB $ WGL_NO_ACCELERATION_ARB } } { software-rendered { $\ WGL_ACCELERATION_ARB $\ WGL_NO_ACCELERATION_ARB } }
{ backing-store { $ WGL_SWAP_METHOD_ARB $ WGL_SWAP_COPY_ARB } } { backing-store { $\ WGL_SWAP_METHOD_ARB $\ WGL_SWAP_COPY_ARB } }
{ color-float { $ WGL_TYPE_RGBA_FLOAT_ARB 1 } } { color-float { $\ WGL_TYPE_RGBA_FLOAT_ARB 1 } }
{ color-bits { $ WGL_COLOR_BITS_ARB } } { color-bits { $\ WGL_COLOR_BITS_ARB } }
{ red-bits { $ WGL_RED_BITS_ARB } } { red-bits { $\ WGL_RED_BITS_ARB } }
{ green-bits { $ WGL_GREEN_BITS_ARB } } { green-bits { $\ WGL_GREEN_BITS_ARB } }
{ blue-bits { $ WGL_BLUE_BITS_ARB } } { blue-bits { $\ WGL_BLUE_BITS_ARB } }
{ alpha-bits { $ WGL_ALPHA_BITS_ARB } } { alpha-bits { $\ WGL_ALPHA_BITS_ARB } }
{ accum-bits { $ WGL_ACCUM_BITS_ARB } } { accum-bits { $\ WGL_ACCUM_BITS_ARB } }
{ accum-red-bits { $ WGL_ACCUM_RED_BITS_ARB } } { accum-red-bits { $\ WGL_ACCUM_RED_BITS_ARB } }
{ accum-green-bits { $ WGL_ACCUM_GREEN_BITS_ARB } } { accum-green-bits { $\ WGL_ACCUM_GREEN_BITS_ARB } }
{ accum-blue-bits { $ WGL_ACCUM_BLUE_BITS_ARB } } { accum-blue-bits { $\ WGL_ACCUM_BLUE_BITS_ARB } }
{ accum-alpha-bits { $ WGL_ACCUM_ALPHA_BITS_ARB } } { accum-alpha-bits { $\ WGL_ACCUM_ALPHA_BITS_ARB } }
{ depth-bits { $ WGL_DEPTH_BITS_ARB } } { depth-bits { $\ WGL_DEPTH_BITS_ARB } }
{ stencil-bits { $ WGL_STENCIL_BITS_ARB } } { stencil-bits { $\ WGL_STENCIL_BITS_ARB } }
{ aux-buffers { $ WGL_AUX_BUFFERS_ARB } } { aux-buffers { $\ WGL_AUX_BUFFERS_ARB } }
{ sample-buffers { $ WGL_SAMPLE_BUFFERS_ARB } } { sample-buffers { $\ WGL_SAMPLE_BUFFERS_ARB } }
{ samples { $ WGL_SAMPLES_ARB } } { samples { $\ WGL_SAMPLES_ARB } }
} ; } ;
: has-wglChoosePixelFormatARB? ( world -- ? ) : has-wglChoosePixelFormatARB? ( world -- ? )
@ -70,13 +70,13 @@ PIXEL-FORMAT-ATTRIBUTE-TABLE: WGL_ARB { $ WGL_SUPPORT_OPENGL_ARB 1 } H{
] if-empty ; ] if-empty ;
CONSTANT: pfd-flag-map H{ CONSTANT: pfd-flag-map H{
{ double-buffered $ PFD_DOUBLEBUFFER } { double-buffered $\ PFD_DOUBLEBUFFER }
{ stereo $ PFD_STEREO } { stereo $\ PFD_STEREO }
{ offscreen $ PFD_DRAW_TO_BITMAP } { offscreen $\ PFD_DRAW_TO_BITMAP }
{ fullscreen $ PFD_DRAW_TO_WINDOW } { fullscreen $\ PFD_DRAW_TO_WINDOW }
{ windowed $ PFD_DRAW_TO_WINDOW } { windowed $\ PFD_DRAW_TO_WINDOW }
{ backing-store $ PFD_SWAP_COPY } { backing-store $\ PFD_SWAP_COPY }
{ software-rendered $ PFD_GENERIC_FORMAT } { software-rendered $\ PFD_GENERIC_FORMAT }
} ; } ;
: >pfd-flag ( attribute -- value ) : >pfd-flag ( attribute -- value )
@ -223,11 +223,11 @@ CONSTANT: window-control>style
H{ H{
{ close-button 0 } { close-button 0 }
{ textured-background 0 } { textured-background 0 }
{ minimize-button $ WS_MINIMIZEBOX } { minimize-button $\ WS_MINIMIZEBOX }
{ maximize-button $ WS_MAXIMIZEBOX } { maximize-button $\ WS_MAXIMIZEBOX }
{ resize-handles $ WS_THICKFRAME } { resize-handles $\ WS_THICKFRAME }
{ small-title-bar $ WS_CAPTION } { small-title-bar $\ WS_CAPTION }
{ normal-title-bar $ WS_CAPTION } { normal-title-bar $\ WS_CAPTION }
{ dialog-window 0 } { dialog-window 0 }
} ; } ;
@ -237,9 +237,9 @@ CONSTANT: window-control>ex-style
{ textured-background 0 } { textured-background 0 }
{ minimize-button 0 } { minimize-button 0 }
{ maximize-button 0 } { maximize-button 0 }
{ resize-handles $ WS_EX_WINDOWEDGE } { resize-handles $\ WS_EX_WINDOWEDGE }
{ small-title-bar $$[ WS_EX_TOOLWINDOW WS_EX_TOPMOST bitor ] } { small-title-bar $$[ WS_EX_TOOLWINDOW WS_EX_TOPMOST bitor ] }
{ normal-title-bar $ WS_EX_APPWINDOW } { normal-title-bar $\ WS_EX_APPWINDOW }
{ dialog-window 0 } { dialog-window 0 }
} ; } ;

View File

@ -61,23 +61,23 @@ M: world configure-event
! In case dimensions didn't change ! In case dimensions didn't change
relayout-1 ; relayout-1 ;
PIXEL-FORMAT-ATTRIBUTE-TABLE: glx-visual { $ GLX_RGBA } H{ PIXEL-FORMAT-ATTRIBUTE-TABLE: glx-visual { $\ GLX_RGBA } H{
{ double-buffered { $ GLX_DOUBLEBUFFER } } { double-buffered { $\ GLX_DOUBLEBUFFER } }
{ stereo { $ GLX_STEREO } } { stereo { $\ GLX_STEREO } }
{ color-bits { $ GLX_BUFFER_SIZE } } { color-bits { $\ GLX_BUFFER_SIZE } }
{ red-bits { $ GLX_RED_SIZE } } { red-bits { $\ GLX_RED_SIZE } }
{ green-bits { $ GLX_GREEN_SIZE } } { green-bits { $\ GLX_GREEN_SIZE } }
{ blue-bits { $ GLX_BLUE_SIZE } } { blue-bits { $\ GLX_BLUE_SIZE } }
{ alpha-bits { $ GLX_ALPHA_SIZE } } { alpha-bits { $\ GLX_ALPHA_SIZE } }
{ accum-red-bits { $ GLX_ACCUM_RED_SIZE } } { accum-red-bits { $\ GLX_ACCUM_RED_SIZE } }
{ accum-green-bits { $ GLX_ACCUM_GREEN_SIZE } } { accum-green-bits { $\ GLX_ACCUM_GREEN_SIZE } }
{ accum-blue-bits { $ GLX_ACCUM_BLUE_SIZE } } { accum-blue-bits { $\ GLX_ACCUM_BLUE_SIZE } }
{ accum-alpha-bits { $ GLX_ACCUM_ALPHA_SIZE } } { accum-alpha-bits { $\ GLX_ACCUM_ALPHA_SIZE } }
{ depth-bits { $ GLX_DEPTH_SIZE } } { depth-bits { $\ GLX_DEPTH_SIZE } }
{ stencil-bits { $ GLX_STENCIL_SIZE } } { stencil-bits { $\ GLX_STENCIL_SIZE } }
{ aux-buffers { $ GLX_AUX_BUFFERS } } { aux-buffers { $\ GLX_AUX_BUFFERS } }
{ sample-buffers { $ GLX_SAMPLE_BUFFERS } } { sample-buffers { $\ GLX_SAMPLE_BUFFERS } }
{ samples { $ GLX_SAMPLES } } { samples { $\ GLX_SAMPLES } }
} ; } ;
M: x11-ui-backend (make-pixel-format) M: x11-ui-backend (make-pixel-format)

View File

@ -52,8 +52,8 @@ TUPLE: world-attributes
{ title string initial: "Factor Window" } { title string initial: "Factor Window" }
status status
gadgets gadgets
{ pixel-format-attributes initial: $ default-world-pixel-format-attributes } { pixel-format-attributes initial: $\ default-world-pixel-format-attributes }
{ window-controls initial: $ default-world-window-controls } { window-controls initial: $\ default-world-window-controls }
pref-dim ; pref-dim ;
: <world-attributes> ( -- world-attributes ) : <world-attributes> ( -- world-attributes )

View File

@ -97,14 +97,14 @@ GENERIC: (print-input) ( object -- ) ;
SYMBOL: listener-input-style SYMBOL: listener-input-style
H{ H{
{ font-style bold } { font-style bold }
{ foreground $ text-color } { foreground $\ text-color }
} listener-input-style set-global } listener-input-style set-global
SYMBOL: listener-word-style SYMBOL: listener-word-style
H{ H{
{ font-name "sans-serif" } { font-name "sans-serif" }
{ font-style bold } { font-style bold }
{ foreground $ text-color } { foreground $\ text-color }
} listener-word-style set-global } listener-word-style set-global
M: input (print-input) M: input (print-input)
@ -399,7 +399,7 @@ interactor "completion" f {
: introduction. ( -- ) : introduction. ( -- )
[ [
H{ { font-size $ default-font-size } } [ H{ { font-size $\ default-font-size } } [
{ $tip-of-the-day } print-element nl { $tip-of-the-day } print-element nl
{ $strong "Press " { $snippet "F1" } " at any time for help." } print-element nl { $strong "Press " { $snippet "F1" } " at any time for help." } print-element nl
version-info print-element version-info print-element

View File

@ -79,10 +79,10 @@ TYPED: eye-rotate ( yaw: float pitch: float v: float-4 -- v': float-4 )
: forward-vector ( player -- v ) : forward-vector ( player -- v )
yaw>> 0.0 yaw>> 0.0
float-4{ 0.0 0.0 $ MOVEMENT-SPEED 1.0 } vneg eye-rotate ; inline float-4{ 0.0 0.0 $\ MOVEMENT-SPEED 1.0 } vneg eye-rotate ; inline
: rightward-vector ( player -- v ) : rightward-vector ( player -- v )
yaw>> 0.0 yaw>> 0.0
float-4{ $ MOVEMENT-SPEED 0.0 0.0 1.0 } eye-rotate ; inline float-4{ $\ MOVEMENT-SPEED 0.0 0.0 1.0 } eye-rotate ; inline
: clamp-pitch ( pitch -- pitch' ) : clamp-pitch ( pitch -- pitch' )
-90.0 90.0 clamp ; inline -90.0 90.0 clamp ; inline
@ -95,7 +95,7 @@ TYPED: eye-rotate ( yaw: float pitch: float v: float-4 -- v': float-4 )
: walk-rightward ( player -- ) : walk-rightward ( player -- )
dup rightward-vector [ v+ ] curry change-velocity drop ; inline dup rightward-vector [ v+ ] curry change-velocity drop ; inline
: jump ( player -- ) : jump ( player -- )
[ float-4{ 0.0 $ JUMP 0.0 0.0 } v+ ] change-velocity drop ; inline [ float-4{ 0.0 $\ JUMP 0.0 0.0 } v+ ] change-velocity drop ; inline
: rotate-leftward ( player x -- ) : rotate-leftward ( player x -- )
[ - ] curry change-yaw drop ; inline [ - ] curry change-yaw drop ; inline
: rotate-rightward ( player x -- ) : rotate-rightward ( player x -- )

View File

@ -72,9 +72,9 @@ CONSTANT: rt-safepoint 15 ;
: rc-absolute? ( n -- ? ) : rc-absolute? ( n -- ? )
$${ $${
$ rc-absolute-ppc-2/2 rc-absolute-ppc-2/2
$ rc-absolute-cell rc-absolute-cell
$ rc-absolute rc-absolute
$ rc-absolute-2 rc-absolute-2
$ rc-absolute-1 rc-absolute-1
} member? ; } member? ;

View File

@ -7,32 +7,32 @@ IN: debugger.windows
CONSTANT: seh-names CONSTANT: seh-names
H{ H{
{ $ STATUS_GUARD_PAGE_VIOLATION "STATUS_GUARD_PAGE_VIOLATION" } { $\ STATUS_GUARD_PAGE_VIOLATION "STATUS_GUARD_PAGE_VIOLATION" }
{ $ STATUS_DATATYPE_MISALIGNMENT "STATUS_DATATYPE_MISALIGNMENT" } { $\ STATUS_DATATYPE_MISALIGNMENT "STATUS_DATATYPE_MISALIGNMENT" }
{ $ STATUS_BREAKPOINT "STATUS_BREAKPOINT" } { $\ STATUS_BREAKPOINT "STATUS_BREAKPOINT" }
{ $ STATUS_SINGLE_STEP "STATUS_SINGLE_STEP" } { $\ STATUS_SINGLE_STEP "STATUS_SINGLE_STEP" }
{ $ STATUS_ACCESS_VIOLATION "STATUS_ACCESS_VIOLATION" } { $\ STATUS_ACCESS_VIOLATION "STATUS_ACCESS_VIOLATION" }
{ $ STATUS_IN_PAGE_ERROR "STATUS_IN_PAGE_ERROR" } { $\ STATUS_IN_PAGE_ERROR "STATUS_IN_PAGE_ERROR" }
{ $ STATUS_INVALID_HANDLE "STATUS_INVALID_HANDLE" } { $\ STATUS_INVALID_HANDLE "STATUS_INVALID_HANDLE" }
{ $ STATUS_NO_MEMORY "STATUS_NO_MEMORY" } { $\ STATUS_NO_MEMORY "STATUS_NO_MEMORY" }
{ $ STATUS_ILLEGAL_INSTRUCTION "STATUS_ILLEGAL_INSTRUCTION" } { $\ STATUS_ILLEGAL_INSTRUCTION "STATUS_ILLEGAL_INSTRUCTION" }
{ $ STATUS_NONCONTINUABLE_EXCEPTION "STATUS_NONCONTINUABLE_EXCEPTION" } { $\ STATUS_NONCONTINUABLE_EXCEPTION "STATUS_NONCONTINUABLE_EXCEPTION" }
{ $ STATUS_INVALID_DISPOSITION "STATUS_INVALID_DISPOSITION" } { $\ STATUS_INVALID_DISPOSITION "STATUS_INVALID_DISPOSITION" }
{ $ STATUS_ARRAY_BOUNDS_EXCEEDED "STATUS_ARRAY_BOUNDS_EXCEEDED" } { $\ STATUS_ARRAY_BOUNDS_EXCEEDED "STATUS_ARRAY_BOUNDS_EXCEEDED" }
{ $ STATUS_FLOAT_DENORMAL_OPERAND "STATUS_FLOAT_DENORMAL_OPERAND" } { $\ STATUS_FLOAT_DENORMAL_OPERAND "STATUS_FLOAT_DENORMAL_OPERAND" }
{ $ STATUS_FLOAT_DIVIDE_BY_ZERO "STATUS_FLOAT_DIVIDE_BY_ZERO" } { $\ STATUS_FLOAT_DIVIDE_BY_ZERO "STATUS_FLOAT_DIVIDE_BY_ZERO" }
{ $ STATUS_FLOAT_INEXACT_RESULT "STATUS_FLOAT_INEXACT_RESULT" } { $\ STATUS_FLOAT_INEXACT_RESULT "STATUS_FLOAT_INEXACT_RESULT" }
{ $ STATUS_FLOAT_INVALID_OPERATION "STATUS_FLOAT_INVALID_OPERATION" } { $\ STATUS_FLOAT_INVALID_OPERATION "STATUS_FLOAT_INVALID_OPERATION" }
{ $ STATUS_FLOAT_OVERFLOW "STATUS_FLOAT_OVERFLOW" } { $\ STATUS_FLOAT_OVERFLOW "STATUS_FLOAT_OVERFLOW" }
{ $ STATUS_FLOAT_STACK_CHECK "STATUS_FLOAT_STACK_CHECK" } { $\ STATUS_FLOAT_STACK_CHECK "STATUS_FLOAT_STACK_CHECK" }
{ $ STATUS_FLOAT_UNDERFLOW "STATUS_FLOAT_UNDERFLOW" } { $\ STATUS_FLOAT_UNDERFLOW "STATUS_FLOAT_UNDERFLOW" }
{ $ STATUS_INTEGER_DIVIDE_BY_ZERO "STATUS_INTEGER_DIVIDE_BY_ZERO" } { $\ STATUS_INTEGER_DIVIDE_BY_ZERO "STATUS_INTEGER_DIVIDE_BY_ZERO" }
{ $ STATUS_INTEGER_OVERFLOW "STATUS_INTEGER_OVERFLOW" } { $\ STATUS_INTEGER_OVERFLOW "STATUS_INTEGER_OVERFLOW" }
{ $ STATUS_PRIVILEGED_INSTRUCTION "STATUS_PRIVILEGED_INSTRUCTION" } { $\ STATUS_PRIVILEGED_INSTRUCTION "STATUS_PRIVILEGED_INSTRUCTION" }
{ $ STATUS_STACK_OVERFLOW "STATUS_STACK_OVERFLOW" } { $\ STATUS_STACK_OVERFLOW "STATUS_STACK_OVERFLOW" }
{ $ STATUS_CONTROL_C_EXIT "STATUS_CONTROL_C_EXIT" } { $\ STATUS_CONTROL_C_EXIT "STATUS_CONTROL_C_EXIT" }
{ $ STATUS_FLOAT_MULTIPLE_FAULTS "STATUS_FLOAT_MULTIPLE_FAULTS" } { $\ STATUS_FLOAT_MULTIPLE_FAULTS "STATUS_FLOAT_MULTIPLE_FAULTS" }
{ $ STATUS_FLOAT_MULTIPLE_TRAPS "STATUS_FLOAT_MULTIPLE_TRAPS" } { $\ STATUS_FLOAT_MULTIPLE_TRAPS "STATUS_FLOAT_MULTIPLE_TRAPS" }
{ 0xe06d7363 "Visual C++ exception" } { 0xe06d7363 "Visual C++ exception" }
} ; } ;

View File

@ -40,14 +40,14 @@ M: unix copy-file ( from to -- )
: dirent-type>file-type ( type -- file-type ) : dirent-type>file-type ( type -- file-type )
H{ H{
{ $ DT_BLK +block-device+ } { $\ DT_BLK +block-device+ }
{ $ DT_CHR +character-device+ } { $\ DT_CHR +character-device+ }
{ $ DT_DIR +directory+ } { $\ DT_DIR +directory+ }
{ $ DT_LNK +symbolic-link+ } { $\ DT_LNK +symbolic-link+ }
{ $ DT_SOCK +socket+ } { $\ DT_SOCK +socket+ }
{ $ DT_FIFO +fifo+ } { $\ DT_FIFO +fifo+ }
{ $ DT_REG +regular-file+ } { $\ DT_REG +regular-file+ }
{ $ DT_WHT +whiteout+ } { $\ DT_WHT +whiteout+ }
} at* [ drop +unknown+ ] unless ; } at* [ drop +unknown+ ] unless ;
! An easy way to return +unknown+ is to mount a .iso on OSX and ! An easy way to return +unknown+ is to mount a .iso on OSX and

View File

@ -7,30 +7,30 @@ IN: io.encodings.iso2022
{ "hello" } [ "hello" >byte-array iso2022 decode ] unit-test { "hello" } [ "hello" >byte-array iso2022 decode ] unit-test
{ "hello" } [ "hello" iso2022 encode >string ] unit-test { "hello" } [ "hello" iso2022 encode >string ] unit-test
{ "hi" } [ B{ char: h $ ESC char: \( char: B char: i } iso2022 decode ] unit-test { "hi" } [ B{ char: h $\ ESC char: \( char: B char: i } iso2022 decode ] unit-test
{ "hi" } [ B{ char: h char: i $ ESC char: \( char: B } iso2022 decode ] unit-test { "hi" } [ B{ char: h char: i $\ ESC char: \( char: B } iso2022 decode ] unit-test
{ "hi\u00fffd" } [ B{ char: h char: i $ ESC char: \( } iso2022 decode ] unit-test { "hi\u00fffd" } [ B{ char: h char: i $\ ESC char: \( } iso2022 decode ] unit-test
{ "hi\u00fffd" } [ B{ char: h char: i $ ESC } iso2022 decode ] unit-test { "hi\u00fffd" } [ B{ char: h char: i $\ ESC } iso2022 decode ] unit-test
{ B{ char: h $ ESC char: \( char: J 0xD8 } } [ "h\u00ff98" iso2022 encode ] unit-test { B{ char: h $\ ESC char: \( char: J 0xD8 } } [ "h\u00ff98" iso2022 encode ] unit-test
{ "h\u00ff98" } [ B{ char: h $ ESC char: \( char: J 0xD8 } iso2022 decode ] unit-test { "h\u00ff98" } [ B{ char: h $\ ESC char: \( char: J 0xD8 } iso2022 decode ] unit-test
{ "hi" } [ B{ char: h $ ESC char: \( char: J char: i } iso2022 decode ] unit-test { "hi" } [ B{ char: h $\ ESC char: \( char: J char: i } iso2022 decode ] unit-test
{ "h" } [ B{ char: h $ ESC char: \( char: J } iso2022 decode ] unit-test { "h" } [ B{ char: h $\ ESC char: \( char: J } iso2022 decode ] unit-test
{ "h\u00fffd" } [ B{ char: h $ ESC char: \( char: J 0x80 } iso2022 decode ] unit-test { "h\u00fffd" } [ B{ char: h $\ ESC char: \( char: J 0x80 } iso2022 decode ] unit-test
{ B{ char: h $ ESC char: $ char: B 0x3E 0x47 } } [ "h\u007126" iso2022 encode ] unit-test { B{ char: h $\ ESC char: \$ char: B 0x3E 0x47 } } [ "h\u007126" iso2022 encode ] unit-test
{ "h\u007126" } [ B{ char: h $ ESC char: $ char: B 0x3E 0x47 } iso2022 decode ] unit-test { "h\u007126" } [ B{ char: h $\ ESC char: \$ char: B 0x3E 0x47 } iso2022 decode ] unit-test
{ "h\u00fffd" } [ B{ char: h $ ESC char: $ char: B 0x3E } iso2022 decode ] unit-test { "h\u00fffd" } [ B{ char: h $\ ESC char: \$ char: B 0x3E } iso2022 decode ] unit-test
{ "h" } [ B{ char: h $ ESC char: $ char: B } iso2022 decode ] unit-test { "h" } [ B{ char: h $\ ESC char: \$ char: B } iso2022 decode ] unit-test
{ "h\u00fffd" } [ B{ char: h $ ESC char: $ } iso2022 decode ] unit-test { "h\u00fffd" } [ B{ char: h $\ ESC char: \$ } iso2022 decode ] unit-test
{ "h\u00fffd" } [ B{ char: h $ ESC } iso2022 decode ] unit-test { "h\u00fffd" } [ B{ char: h $\ ESC } iso2022 decode ] unit-test
{ "h\u00fffd" } [ B{ char: h $ ESC char: $ char: B 0x80 0x80 } iso2022 decode ] unit-test { "h\u00fffd" } [ B{ char: h $\ ESC char: \$ char: B 0x80 0x80 } iso2022 decode ] unit-test
{ B{ char: h $ ESC char: $ char: \( char: D 0x38 0x54 } } [ "h\u0058ce" iso2022 encode ] unit-test { B{ char: h $\ ESC char: \$ char: \( char: D 0x38 0x54 } } [ "h\u0058ce" iso2022 encode ] unit-test
{ "h\u0058ce" } [ B{ char: h $ ESC char: $ char: \( char: D 0x38 0x54 } iso2022 decode ] unit-test { "h\u0058ce" } [ B{ char: h $\ ESC char: \$ char: \( char: D 0x38 0x54 } iso2022 decode ] unit-test
{ "h\u00fffd" } [ B{ char: h $ ESC char: $ char: \( char: D 0x38 } iso2022 decode ] unit-test { "h\u00fffd" } [ B{ char: h $\ ESC char: \$ char: \( char: D 0x38 } iso2022 decode ] unit-test
{ "h" } [ B{ char: h $ ESC char: $ char: \( char: D } iso2022 decode ] unit-test { "h" } [ B{ char: h $\ ESC char: \$ char: \( char: D } iso2022 decode ] unit-test
{ "h\u00fffd" } [ B{ char: h $ ESC char: $ char: \( } iso2022 decode ] unit-test { "h\u00fffd" } [ B{ char: h $\ ESC char: \$ char: \( } iso2022 decode ] unit-test
{ "h\u00fffd" } [ B{ char: h $ ESC char: $ char: \( char: D 0x70 0x70 } iso2022 decode ] unit-test { "h\u00fffd" } [ B{ char: h $\ ESC char: \$ char: \( char: D 0x70 0x70 } iso2022 decode ] unit-test
[ "\u{syriac-music}" iso2022 encode ] must-fail [ "\u{syriac-music}" iso2022 encode ] must-fail

View File

@ -33,10 +33,10 @@ M: iso2022 <decoder>
CONSTANT: ESC 0x16 ; CONSTANT: ESC 0x16 ;
CONSTANT: switch-ascii B{ $ ESC char: \( char: B } ; CONSTANT: switch-ascii B{ $\ ESC char: \( char: B } ;
CONSTANT: switch-jis201 B{ $ ESC char: \( char: J } ; CONSTANT: switch-jis201 B{ $\ ESC char: \( char: J } ;
CONSTANT: switch-jis208 B{ $ ESC char: $ char: B } ; CONSTANT: switch-jis208 B{ $\ ESC char: \$ char: B } ;
CONSTANT: switch-jis212 B{ $ ESC char: $ char: \( char: D } ; CONSTANT: switch-jis212 B{ $\ ESC char: \$ char: \( char: D } ;
: find-type ( char -- code type ) : find-type ( char -- code type )
{ {
@ -69,7 +69,7 @@ M:: iso2022-state encode-char ( char stream encoding -- )
[ drop f ] [ drop f ]
} case } case
] } ] }
{ char: $ [ { char: \$ [
dup stream-read1 { dup stream-read1 {
{ char: @ [ drop jis208 get-global ] } ! want: JIS X 0208-1978 { char: @ [ drop jis208 get-global ] } ! want: JIS X 0208-1978
{ char: B [ drop jis208 get-global ] } { char: B [ drop jis208 get-global ] }
@ -90,7 +90,7 @@ M:: iso2022-state encode-char ( char stream encoding -- )
M:: iso2022-state decode-char ( stream encoding -- char ) M:: iso2022-state decode-char ( stream encoding -- char )
stream stream-read1 { stream stream-read1 {
{ $ ESC [ { $\ ESC [
stream read-escape [ stream read-escape [
encoding type<< encoding type<<
stream encoding decode-char stream encoding decode-char

View File

@ -137,7 +137,7 @@ PRIVATE<
al-source { al-source {
[ AL_BUFFERS_PROCESSED get-source-param 0 = ] [ AL_BUFFERS_PROCESSED get-source-param 0 = ]
[ AL_BUFFERS_QUEUED get-source-param 0 = ] [ AL_BUFFERS_QUEUED get-source-param 0 = ]
[ AL_SOURCE_STATE get-source-param { $ AL_INITIAL $ AL_STOPPED } member? ] [ AL_SOURCE_STATE get-source-param { $\ AL_INITIAL $\ AL_STOPPED } member? ]
} 1&& } 1&&
[ next-source# al-source ] [ [ next-source# al-source ] [
next-source# stop-source# = next-source# stop-source# =

View File

@ -47,7 +47,7 @@ CONSTANT: validation-output [[
]] ; ]] ;
cpu ppc? [ cpu ppc? [
{ $ validation-output } { $\ validation-output }
[ [ "resource:extra/elf/a.elf" elf-nm ] with-string-writer ] [ [ "resource:extra/elf/a.elf" elf-nm ] with-string-writer ]
unit-test unit-test
] unless ] unless

View File

@ -59,7 +59,7 @@ f 2/2 6/2 8/4 4/4
f 5/1 1/1 3/3 7/3 f 5/1 1/1 3/3 7/3
" ; " ;
{ $ valid-cube-obj } [ [ valid-cube-b-rep write-obj ] with-string-writer ] unit-test { $\ valid-cube-obj } [ [ valid-cube-b-rep write-obj ] with-string-writer ] unit-test
{ {
V{ V{

View File

@ -72,15 +72,15 @@ IN: math.functions.tests
CONSTANT: log-factorial-1000 0x1.71820d04e2eb6p12 ; CONSTANT: log-factorial-1000 0x1.71820d04e2eb6p12 ;
CONSTANT: log10-factorial-1000 0x1.40f3593ed6f8ep11 ; CONSTANT: log10-factorial-1000 0x1.40f3593ed6f8ep11 ;
{ $ log-factorial-1000 t } [ 1000 factorial [ log ] [ bignum? ] bi ] unit-test { $\ log-factorial-1000 t } [ 1000 factorial [ log ] [ bignum? ] bi ] unit-test
{ C{ $ log-factorial-1000 $ pi } t } [ 1000 factorial neg [ log ] [ bignum? ] bi ] unit-test { C{ $\ log-factorial-1000 $\ pi } t } [ 1000 factorial neg [ log ] [ bignum? ] bi ] unit-test
{ 0.0 } [ 1.0 log10 ] unit-test { 0.0 } [ 1.0 log10 ] unit-test
{ 1.0 } [ 10.0 log10 ] unit-test { 1.0 } [ 10.0 log10 ] unit-test
{ 2.0 } [ 100.0 log10 ] unit-test { 2.0 } [ 100.0 log10 ] unit-test
{ 3.0 } [ 1000.0 log10 ] unit-test { 3.0 } [ 1000.0 log10 ] unit-test
{ 4.0 } [ 10000.0 log10 ] unit-test { 4.0 } [ 10000.0 log10 ] unit-test
{ $ log10-factorial-1000 t } [ 1000 factorial [ log10 ] [ bignum? ] bi ] unit-test { $\ log10-factorial-1000 t } [ 1000 factorial [ log10 ] [ bignum? ] bi ] unit-test
{ t } [ 1 e^ e 1.e-10 ~ ] unit-test { t } [ 1 e^ e 1.e-10 ~ ] unit-test
{ f } [ 1 e^ 0/0. 1.e-10 ~ ] unit-test { f } [ 1 e^ 0/0. 1.e-10 ~ ] unit-test

View File

@ -5,7 +5,7 @@ namespaces sequences splitting ;
IN: money IN: money
SYMBOL: currency-token SYMBOL: currency-token
char: $ currency-token set-global char: \$ currency-token set-global
: dollars/cents ( dollars -- dollars cents ) : dollars/cents ( dollars -- dollars cents )
100 * 100 /mod round ; 100 * 100 /mod round ;

View File

@ -16,7 +16,7 @@ SingleLineComment = "//" (!("\n") .)* "\n" => [[ ignore ]]
MultiLineComment = "/*" (!("*/") .)* "*/" => [[ ignore ]] MultiLineComment = "/*" (!("*/") .)* "*/" => [[ ignore ]]
Space = [ \t\r\n] | SingleLineComment | MultiLineComment Space = [ \t\r\n] | SingleLineComment | MultiLineComment
Spaces = Space* => [[ ignore ]] Spaces = Space* => [[ ignore ]]
NameFirst = Letter | "$" => [[ char: $ ]] | "_" => [[ char: _ ]] NameFirst = Letter | "$" => [[ char: \$ ]] | "_" => [[ char: _ ]]
NameRest = NameFirst | Digit NameRest = NameFirst | Digit
iName = NameFirst NameRest* => [[ first2 swap prefix >string ]] iName = NameFirst NameRest* => [[ first2 swap prefix >string ]]
Keyword = ("break" Keyword = ("break"

View File

@ -22,7 +22,7 @@ COMPILE>
CONSTANT: digit-probability $$[ letters-count 2 * digits-count / 1 + recip ] ; CONSTANT: digit-probability $$[ letters-count 2 * digits-count / 1 + recip ] ;
: random-ch ( -- ch ) : random-ch ( -- ch )
{ {
{ $ digit-probability [ random-digit ] } { $\ digit-probability [ random-digit ] }
[ random-Letter ] [ random-Letter ]
} casep ; } casep ;

View File

@ -31,10 +31,10 @@ PRIVATE>
: read-response ( -- response ) : read-response ( -- response )
readln unclip { readln unclip {
{ char: \: [ string>number ] } { char: \: [ string>number ] }
{ char: + [ handle-response ] } { char: \+ [ handle-response ] }
{ char: $ [ string>number read-bulk ] } { char: \$ [ string>number read-bulk ] }
{ char: * [ string>number read-multi-bulk ] } { char: \* [ string>number read-multi-bulk ] }
{ char: - [ handle-error ] } { char: \- [ handle-error ] }
} case ; } case ;
: check-response ( -- ) : check-response ( -- )

View File

@ -10,7 +10,7 @@ CONSTANT: stylesheet
H{ H{
{ default-span-style { default-span-style
H{ H{
{ font-name $ default-sans-serif-font-name } { font-name $\ default-sans-serif-font-name }
{ font-size $$[ default-font-size 3 * ] } { font-size $$[ default-font-size 3 * ] }
} }
} }
@ -21,7 +21,7 @@ CONSTANT: stylesheet
} }
{ code-char-style { code-char-style
H{ H{
{ font-name $ default-monospace-font-name } { font-name $\ default-monospace-font-name }
{ font-size $$[ default-font-size 3 * ] } { font-size $$[ default-font-size 3 * ] }
} }
} }
@ -32,7 +32,7 @@ CONSTANT: stylesheet
} }
{ snippet-style { snippet-style
H{ H{
{ font-name $ default-monospace-font-name } { font-name $\ default-monospace-font-name }
{ font-size $$[ default-font-size 3 * ] } { font-size $$[ default-font-size 3 * ] }
{ foreground T{ rgba f 0.1 0.1 0.4 1 } } { foreground T{ rgba f 0.1 0.1 0.4 1 } }
} }
@ -52,7 +52,7 @@ CONSTANT: stylesheet
: $title ( string -- ) : $title ( string -- )
[ [
H{ H{
{ font-name $ default-sans-serif-font-name } { font-name $\ default-sans-serif-font-name }
{ font-size $$[ default-font-size 4 * ] } { font-size $$[ default-font-size 4 * ] }
} format } format
] ($block) ; ] ($block) ;

View File

@ -546,11 +546,11 @@ CONSTANT: YAML_SEQ_TAG "tag:yaml.org,2002:seq" ;
CONSTANT: YAML_MAP_TAG "tag:yaml.org,2002:map" ; CONSTANT: YAML_MAP_TAG "tag:yaml.org,2002:map" ;
! /** The default scalar tag is @c !!str. */ ! /** The default scalar tag is @c !!str. */
CONSTANT: YAML_DEFAULT_SCALAR_TAG $ YAML_STR_TAG ; CONSTANT: YAML_DEFAULT_SCALAR_TAG $\ YAML_STR_TAG ;
! /** The default sequence tag is @c !!seq. */ ! /** The default sequence tag is @c !!seq. */
CONSTANT: YAML_DEFAULT_SEQUENCE_TAG $ YAML_SEQ_TAG ; CONSTANT: YAML_DEFAULT_SEQUENCE_TAG $\ YAML_SEQ_TAG ;
! /** The default mapping tag is @c !!map. */ ! /** The default mapping tag is @c !!map. */
CONSTANT: YAML_DEFAULT_MAPPING_TAG $ YAML_MAP_TAG ; CONSTANT: YAML_DEFAULT_MAPPING_TAG $\ YAML_MAP_TAG ;
! /** Node types. */ ! /** Node types. */
ENUM: yaml_node_type_t ENUM: yaml_node_type_t

View File

@ -45,9 +45,9 @@ CONSTANT: test-represented-string "--- !!seq
... ...
" ; " ;
$${ test-obj } [ $ test-string yaml> ] unit-test $${ test-obj } [ $\ test-string yaml> ] unit-test
$${ test-represented-string } [ $ test-obj >yaml ] unit-test $${ test-represented-string } [ $\ test-obj >yaml ] unit-test
$${ test-represented-string } [ $ test-represented-string yaml> >yaml ] unit-test $${ test-represented-string } [ $\ test-represented-string yaml> >yaml ] unit-test
! Non-scalar key ! Non-scalar key
CONSTANT: complex-key H{ { { "foo" } "bar" } } ; CONSTANT: complex-key H{ { { "foo" } "bar" } } ;
@ -58,7 +58,7 @@ CONSTANT: complex-key-represented "--- !!map
... ...
" ; " ;
$${ complex-key } [ $ complex-key-represented yaml> ] unit-test $${ complex-key } [ $\ complex-key-represented yaml> ] unit-test
! Multiple docs ! Multiple docs
CONSTANT: test-docs "--- !!str a CONSTANT: test-docs "--- !!str a
@ -73,9 +73,9 @@ CONSTANT: test-docs "--- !!str a
" ; " ;
CONSTANT: test-objs { "a" { "b" "c" } H{ { "d" "e" } } } ; CONSTANT: test-objs { "a" { "b" "c" } H{ { "d" "e" } } } ;
$${ test-objs } [ $ test-docs yaml-docs> ] unit-test $${ test-objs } [ $\ test-docs yaml-docs> ] unit-test
$${ test-docs } [ $ test-objs >yaml-docs ] unit-test $${ test-docs } [ $\ test-objs >yaml-docs ] unit-test
$${ test-docs } [ $ test-docs yaml-docs> >yaml-docs ] unit-test $${ test-docs } [ $\ test-docs yaml-docs> >yaml-docs ] unit-test
! Misc types ! Misc types
CONSTANT: test-types { 1 t f 1.0 } ; CONSTANT: test-types { 1 t f 1.0 } ;
@ -87,8 +87,8 @@ CONSTANT: test-represented-types "--- !!seq
... ...
" ; " ;
$${ test-types } [ $ test-represented-types yaml> ] unit-test $${ test-types } [ $\ test-represented-types yaml> ] unit-test
$${ test-types } [ $ test-types >yaml yaml> ] unit-test $${ test-types } [ $\ test-types >yaml yaml> ] unit-test
! Anchors ! Anchors
@ -105,11 +105,11 @@ CONSTANT: test-anchors-obj {
"1" "1" { "1" "2" } { "1" "2" } H{ { "1" "one" } } H{ { "1" "one" } } "1" "1" { "1" "2" } { "1" "2" } H{ { "1" "one" } } H{ { "1" "one" } }
} ; } ;
$${ test-anchors-obj } [ $ test-anchors yaml> ] unit-test $${ test-anchors-obj } [ $\ test-anchors yaml> ] unit-test
$${ test-anchors-obj } [ $ test-anchors-obj >yaml yaml> ] unit-test $${ test-anchors-obj } [ $\ test-anchors-obj >yaml yaml> ] unit-test
! and test indentity ! and test indentity
{ t } [ $ test-anchors yaml> 2 group [ all-eq? ] all? ] unit-test { t } [ $\ test-anchors yaml> 2 group [ all-eq? ] all? ] unit-test
{ t } [ $ test-anchors yaml> >yaml yaml> 2 group [ all-eq? ] all? ] unit-test { t } [ $\ test-anchors yaml> >yaml yaml> 2 group [ all-eq? ] all? ] unit-test
! Anchors and fancy types ! Anchors and fancy types
CONSTANT: fancy-anchors "- &1 [ \"foo\" ] CONSTANT: fancy-anchors "- &1 [ \"foo\" ]
@ -122,8 +122,8 @@ CONSTANT: fancy-anchors-obj {
{ "foo" } HS{ { "foo" } } HS{ { "foo" } } { "foo" } HS{ { "foo" } } HS{ { "foo" } }
} ; } ;
$${ fancy-anchors-obj } [ $ fancy-anchors yaml> ] unit-test $${ fancy-anchors-obj } [ $\ fancy-anchors yaml> ] unit-test
$${ fancy-anchors-obj } [ $ fancy-anchors-obj >yaml yaml> ] unit-test $${ fancy-anchors-obj } [ $\ fancy-anchors-obj >yaml yaml> ] unit-test
! Simple Recursive output ! Simple Recursive output
: simple-recursive-list ( -- obj ) : simple-recursive-list ( -- obj )
@ -135,7 +135,7 @@ CONSTANT: simple-recursive-list-yaml "&0
- *0" ; - *0" ;
$${ simple-recursive-list-anchored } [ simple-recursive-list replace-identities ] unit-test $${ simple-recursive-list-anchored } [ simple-recursive-list replace-identities ] unit-test
$${ simple-recursive-list-anchored } [ $ simple-recursive-list-yaml yaml> replace-identities ] unit-test $${ simple-recursive-list-anchored } [ $\ simple-recursive-list-yaml yaml> replace-identities ] unit-test
$${ simple-recursive-list-anchored } [ simple-recursive-list >yaml yaml> replace-identities ] unit-test $${ simple-recursive-list-anchored } [ simple-recursive-list >yaml yaml> replace-identities ] unit-test
! many recursive outputs ! many recursive outputs
@ -190,8 +190,8 @@ $${ transitive-recursive-objects-anchored } [ transitive-recursive-objects repla
! n: is a string ! n: is a string
! " ; ! " ;
! !
! $${ construct-bool-obj } [ $ construct-bool-str yaml> ] unit-test ! $${ construct-bool-obj } [ $\ construct-bool-str yaml> ] unit-test
! $${ construct-bool-obj } [ $ construct-bool-obj >yaml yaml> ] unit-test ! $${ construct-bool-obj } [ $\ construct-bool-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!
! construct-int ! construct-int
@ -213,8 +213,8 @@ $${ transitive-recursive-objects-anchored } [ transitive-recursive-objects repla
! sexagesimal: 190:20:30 ! sexagesimal: 190:20:30
! " ; ! " ;
! !
! $${ construct-int-obj } [ $ construct-int-str yaml> ] unit-test ! $${ construct-int-obj } [ $\ construct-int-str yaml> ] unit-test
! $${ construct-int-obj } [ $ construct-int-obj >yaml yaml> ] unit-test ! $${ construct-int-obj } [ $\ construct-int-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!
! construct-map ! construct-map
@ -235,8 +235,8 @@ Block style: !!map
Flow style: !!map { Clark: Evans, Brian: Ingerson, Oren: Ben-Kiki } Flow style: !!map { Clark: Evans, Brian: Ingerson, Oren: Ben-Kiki }
" ; " ;
$${ construct-map-obj } [ $ construct-map-str yaml> ] unit-test $${ construct-map-obj } [ $\ construct-map-str yaml> ] unit-test
$${ construct-map-obj } [ $ construct-map-obj >yaml yaml> ] unit-test $${ construct-map-obj } [ $\ construct-map-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!
! construct-null ! construct-null
@ -276,9 +276,9 @@ sparse:
- Null - Null
" ; " ;
$${ construct-null-obj } [ $ construct-null-str yaml-docs> ] unit-test $${ construct-null-obj } [ $\ construct-null-str yaml-docs> ] unit-test
! TODO Decide what to do with null -> f -> false ! TODO Decide what to do with null -> f -> false
! $${ construct-null-obj } [ $ construct-null-obj >yaml-docs yaml-docs> ] unit-test ! $${ construct-null-obj } [ $\ construct-null-obj >yaml-docs yaml-docs> ] unit-test
! !!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!
! construct-seq ! construct-seq
@ -303,8 +303,8 @@ Flow style: !!seq [ Mercury, Venus, Earth, Mars, # Rocks
Pluto ] # Overrated Pluto ] # Overrated
" ; " ;
$${ construct-seq-obj } [ $ construct-seq-str yaml> ] unit-test $${ construct-seq-obj } [ $\ construct-seq-str yaml> ] unit-test
$${ construct-seq-obj } [ $ construct-seq-obj >yaml yaml> ] unit-test $${ construct-seq-obj } [ $\ construct-seq-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!
! construct-set ! construct-set
@ -333,8 +333,8 @@ baseball players: !!set
baseball teams: !!set { Boston Red Sox, Detroit Tigers, New York Yankees } baseball teams: !!set { Boston Red Sox, Detroit Tigers, New York Yankees }
" ; " ;
$${ construct-set-obj } [ $ construct-set-str yaml> ] unit-test $${ construct-set-obj } [ $\ construct-set-str yaml> ] unit-test
$${ construct-set-obj } [ $ construct-set-obj >yaml yaml> ] unit-test $${ construct-set-obj } [ $\ construct-set-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!
! construct-binary ! construct-binary
@ -401,8 +401,8 @@ description:
The binary value above is a tiny arrow encoded as a gif image. The binary value above is a tiny arrow encoded as a gif image.
" ; " ;
$${ construct-binary-obj } [ $ construct-binary-str yaml> ] unit-test $${ construct-binary-obj } [ $\ construct-binary-str yaml> ] unit-test
$${ construct-binary-obj } [ $ construct-binary-obj >yaml yaml> ] unit-test $${ construct-binary-obj } [ $\ construct-binary-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!
! construct-merge ! construct-merge
@ -462,8 +462,8 @@ CONSTANT: construct-merge-str "---
label: center/big label: center/big
" ; " ;
$${ construct-merge-obj } [ $ construct-merge-str yaml> ] unit-test $${ construct-merge-obj } [ $\ construct-merge-str yaml> ] unit-test
$${ construct-merge-obj } [ $ construct-merge-obj2 >yaml yaml> ] unit-test $${ construct-merge-obj } [ $\ construct-merge-obj2 >yaml yaml> ] unit-test
! More merge tests ! More merge tests
! see http://sourceforge.net/p/yaml/mailman/message/12308050 ! see http://sourceforge.net/p/yaml/mailman/message/12308050
@ -479,15 +479,15 @@ CONSTANT: nested-merge-obj H{
{ "baz" 3 } { "baz" 3 }
} ; } ;
$${ nested-merge-obj } [ $ nested-merge-str yaml> ] unit-test $${ nested-merge-obj } [ $\ nested-merge-str yaml> ] unit-test
$${ nested-merge-obj } [ $ nested-merge-obj >yaml yaml> ] unit-test $${ nested-merge-obj } [ $\ nested-merge-obj >yaml yaml> ] unit-test
CONSTANT: recursive-merge-str "--- &A CONSTANT: recursive-merge-str "--- &A
COMPILE<: *A" ; COMPILE<: *A" ;
CONSTANT: recursive-merge-obj H{ } ; CONSTANT: recursive-merge-obj H{ } ;
$${ recursive-merge-obj } [ $ recursive-merge-str yaml> ] unit-test $${ recursive-merge-obj } [ $\ recursive-merge-str yaml> ] unit-test
$${ recursive-merge-obj } [ $ recursive-merge-obj >yaml yaml> ] unit-test $${ recursive-merge-obj } [ $\ recursive-merge-obj >yaml yaml> ] unit-test
! Compare with pyyaml ! Compare with pyyaml
! >>> print yaml.load("&1 {1: 2, 2: 3, 3: {4: 5, <<: *1}}") ! >>> print yaml.load("&1 {1: 2, 2: 3, 3: {4: 5, <<: *1}}")
@ -515,15 +515,15 @@ CONSTANT: recursive-merge-obj3 H{
} ; } ;
{ t } [ { t } [
$ recursive-merge-str2 yaml> recursive-merge-obj2 $\ recursive-merge-str2 yaml> recursive-merge-obj2
[ replace-identities ] bi@ = [ replace-identities ] bi@ =
] unit-test ] unit-test
{ t } [ { t } [
recursive-merge-obj2 >yaml yaml> recursive-merge-obj2 recursive-merge-obj2 >yaml yaml> recursive-merge-obj2
[ replace-identities ] bi@ = [ replace-identities ] bi@ =
] unit-test ] unit-test
$${ recursive-merge-obj3 } [ $ recursive-merge-str3 yaml> ] unit-test $${ recursive-merge-obj3 } [ $\ recursive-merge-str3 yaml> ] unit-test
$${ recursive-merge-obj3 } [ $ recursive-merge-obj3 >yaml yaml> ] unit-test $${ recursive-merge-obj3 } [ $\ recursive-merge-obj3 >yaml yaml> ] unit-test
! Serializing merge ! Serializing merge
CONSTANT: serialize-merge-obj H{ CONSTANT: serialize-merge-obj H{
@ -531,9 +531,9 @@ CONSTANT: serialize-merge-obj H{
} ; } ;
CONSTANT: serialize-merge-obj2 H{ { 1 2 } } ; CONSTANT: serialize-merge-obj2 H{ { 1 2 } } ;
$${ serialize-merge-obj2 } [ $ serialize-merge-obj >yaml yaml> ] unit-test $${ serialize-merge-obj2 } [ $\ serialize-merge-obj >yaml yaml> ] unit-test
f merge [ f merge [
$${ serialize-merge-obj } [ $ serialize-merge-obj >yaml yaml> ] unit-test $${ serialize-merge-obj } [ $\ serialize-merge-obj >yaml yaml> ] unit-test
] with-variable ] with-variable
! !!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!
@ -566,7 +566,7 @@ Bestiary: !!omap
Numbers: !!omap [ one: 1, two: 2, three : 3 ] Numbers: !!omap [ one: 1, two: 2, three : 3 ]
" ; " ;
$${ construct-omap-obj } [ $ construct-omap-str yaml> ] unit-test $${ construct-omap-obj } [ $\ construct-omap-str yaml> ] unit-test
$${ construct-omap-obj } [ construct-omap-obj >yaml yaml> ] unit-test $${ construct-omap-obj } [ construct-omap-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!
@ -610,8 +610,8 @@ CONSTANT: construct-pairs-obj-roundtripped H{
} }
} ; } ;
$${ construct-pairs-obj } [ $ construct-pairs-str yaml> ] unit-test $${ construct-pairs-obj } [ $\ construct-pairs-str yaml> ] unit-test
$${ construct-pairs-obj } [ $ construct-pairs-obj >yaml yaml> ] unit-test $${ construct-pairs-obj } [ $\ construct-pairs-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!
! construct-timestamp ! construct-timestamp
@ -689,8 +689,8 @@ date (00:00:00Z): 2002-12-14
crazy: 2002-2-4 \t\t \t 1:02:59.123 \t\t +10:23 crazy: 2002-2-4 \t\t \t 1:02:59.123 \t\t +10:23
" ; " ;
$${ construct-timestamp-obj } [ $ construct-timestamp-str yaml> ] unit-test $${ construct-timestamp-obj } [ $\ construct-timestamp-str yaml> ] unit-test
$${ construct-timestamp-obj } [ $ construct-timestamp-obj >yaml yaml> ] unit-test $${ construct-timestamp-obj } [ $\ construct-timestamp-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!
! construct-value ! construct-value
@ -720,13 +720,13 @@ link with:
version: 2.3 version: 2.3
" ; " ;
$${ construct-value-safe-obj } [ $ construct-value-str yaml-docs> ] unit-test $${ construct-value-safe-obj } [ $\ construct-value-str yaml-docs> ] unit-test
$${ construct-value-safe-obj } [ $ construct-value-safe-obj >yaml-docs yaml-docs> ] unit-test $${ construct-value-safe-obj } [ $\ construct-value-safe-obj >yaml-docs yaml-docs> ] unit-test
f value [ f value [
$${ construct-value-unsafe-obj } [ $ construct-value-str yaml-docs> ] unit-test $${ construct-value-unsafe-obj } [ $\ construct-value-str yaml-docs> ] unit-test
$${ construct-value-unsafe-obj } [ $ construct-value-unsafe-obj >yaml-docs yaml-docs> ] unit-test $${ construct-value-unsafe-obj } [ $\ construct-value-unsafe-obj >yaml-docs yaml-docs> ] unit-test
$${ construct-value-safe-obj } [ $${ construct-value-safe-obj } [
$ construct-value-str yaml-docs> [ $\ construct-value-str yaml-docs> [
dup "link with" swap [ [ scalar-value ] map ] change-at dup "link with" swap [ [ scalar-value ] map ] change-at
] map ] map
] unit-test ] unit-test
@ -737,9 +737,9 @@ CONSTANT: serialize-value-obj H{
{ T{ yaml-value } 1 } { T{ yaml-value } 1 }
} ; } ;
CONSTANT: serialize-value-obj2 1 ; CONSTANT: serialize-value-obj2 1 ;
$${ serialize-value-obj2 } [ $ serialize-value-obj >yaml yaml> ] unit-test $${ serialize-value-obj2 } [ $\ serialize-value-obj >yaml yaml> ] unit-test
f value [ f value [
$${ serialize-value-obj } [ $ serialize-value-obj >yaml yaml> ] unit-test $${ serialize-value-obj } [ $\ serialize-value-obj >yaml yaml> ] unit-test
] with-variable ] with-variable
! !!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!

View File

@ -24,20 +24,20 @@ IN: help.stylesheet
SYMBOL: default-span-style SYMBOL: default-span-style
H{ H{
{ font-name $ default-sans-serif-font-name } { font-name $\ default-sans-serif-font-name }
{ font-size $ font-size-span } { font-size $\ font-size-span }
{ foreground $ text-color } { foreground $\ text-color }
{ font-style plain } { font-style plain }
} default-span-style set-global } default-span-style set-global
SYMBOL: default-block-style SYMBOL: default-block-style
H{ H{
{ wrap-margin $ wrap-margin-full } { wrap-margin $\ wrap-margin-full }
} default-block-style set-global } default-block-style set-global
SYMBOL: link-style SYMBOL: link-style
H{ H{
{ foreground $ link-color } { foreground $\ link-color }
{ font-style bold } { font-style bold }
} link-style set-global } link-style set-global
@ -49,52 +49,52 @@ H{ { font-style bold } } strong-style set-global
SYMBOL: title-style SYMBOL: title-style
H{ H{
{ font-name $ default-sans-serif-font-name } { font-name $\ default-sans-serif-font-name }
{ font-size $ font-size-title } { font-size $\ font-size-title }
{ font-style bold } { font-style bold }
{ wrap-margin $ wrap-margin-full } { wrap-margin $\ wrap-margin-full }
{ foreground $ title-color } { foreground $\ title-color }
{ page-color color: FactorLightTan } { page-color color: FactorLightTan }
{ inset { 5 5 } } { inset { 5 5 } }
} title-style set-global } title-style set-global
SYMBOL: help-path-style SYMBOL: help-path-style
H{ H{
{ font-size $ default-font-size } { font-size $\ default-font-size }
{ table-gap { 5 5 } } { table-gap { 5 5 } }
} help-path-style set-global } help-path-style set-global
SYMBOL: heading-style SYMBOL: heading-style
H{ H{
{ font-name $ default-sans-serif-font-name } { font-name $\ default-sans-serif-font-name }
{ font-size $ font-size-heading } { font-size $\ font-size-heading }
{ font-style bold } { font-style bold }
{ foreground $ heading-color } { foreground $\ heading-color }
} heading-style set-global } heading-style set-global
SYMBOL: subsection-style SYMBOL: subsection-style
H{ H{
{ font-name $ default-sans-serif-font-name } { font-name $\ default-sans-serif-font-name }
{ font-size $ font-size-subsection } { font-size $\ font-size-subsection }
{ font-style bold } { font-style bold }
} subsection-style set-global } subsection-style set-global
SYMBOL: snippet-style SYMBOL: snippet-style
H{ H{
{ font-name $ default-monospace-font-name } { font-name $\ default-monospace-font-name }
{ font-size $ default-font-size } { font-size $\ default-font-size }
{ foreground $ snippet-color } { foreground $\ snippet-color }
} snippet-style set-global } snippet-style set-global
SYMBOL: code-char-style SYMBOL: code-char-style
H{ H{
{ font-name $ default-monospace-font-name } { font-name $\ default-monospace-font-name }
{ font-size $ default-font-size } { font-size $\ default-font-size }
} code-char-style set-global } code-char-style set-global
SYMBOL: code-style SYMBOL: code-style
H{ H{
{ page-color $ code-background-color } { page-color $\ code-background-color }
{ inset { 5 5 } } { inset { 5 5 } }
{ wrap-margin f } { wrap-margin f }
} code-style set-global } code-style set-global
@ -102,40 +102,40 @@ H{
SYMBOL: output-style SYMBOL: output-style
H{ H{
{ font-style bold } { font-style bold }
{ foreground $ output-color } { foreground $\ output-color }
} output-style set-global } output-style set-global
SYMBOL: url-style SYMBOL: url-style
H{ H{
{ font-name $ default-monospace-font-name } { font-name $\ default-monospace-font-name }
{ foreground $ link-color } { foreground $\ link-color }
} url-style set-global } url-style set-global
SYMBOL: warning-style SYMBOL: warning-style
H{ H{
{ page-color $ warning-background-color } { page-color $\ warning-background-color }
{ border-color $ warning-border-color } { border-color $\ warning-border-color }
{ inset { 5 5 } } { inset { 5 5 } }
{ wrap-margin $ wrap-margin-full } { wrap-margin $\ wrap-margin-full }
} warning-style set-global } warning-style set-global
SYMBOL: deprecated-style SYMBOL: deprecated-style
H{ H{
{ page-color $ warning-background-color } { page-color $\ warning-background-color }
{ border-color $ warning-border-color } { border-color $\ warning-border-color }
{ inset { 5 5 } } { inset { 5 5 } }
{ wrap-margin $ wrap-margin-full } { wrap-margin $\ wrap-margin-full }
} deprecated-style set-global } deprecated-style set-global
SYMBOL: table-content-style SYMBOL: table-content-style
H{ H{
{ wrap-margin $ wrap-margin-table-content } { wrap-margin $\ wrap-margin-table-content }
} table-content-style set-global } table-content-style set-global
SYMBOL: table-style SYMBOL: table-style
H{ H{
{ table-gap { 5 5 } } { table-gap { 5 5 } }
{ table-border $ line-color } { table-border $\ line-color }
} table-style set-global } table-style set-global
SYMBOL: list-style SYMBOL: list-style

View File

@ -29,9 +29,9 @@ SYNTAX: \ TIP:
SYMBOL: tip-of-the-day-style SYMBOL: tip-of-the-day-style
H{ H{
{ page-color $ tip-background-color } { page-color $\ tip-background-color }
{ inset { 5 5 } } { inset { 5 5 } }
{ wrap-margin $ wrap-margin-full } { wrap-margin $\ wrap-margin-full }
} tip-of-the-day-style set-global } tip-of-the-day-style set-global
: $tip-title ( tip -- ) : $tip-title ( tip -- )

View File

@ -394,7 +394,7 @@ TUPLE: pdf info pages fonts ;
[ [
pdf info>> pdf-value , pdf info>> pdf-value ,
pdf-catalog , pdf-catalog ,
{ $ sans-serif-font $ serif-font $ monospace-font } { { $\ sans-serif-font $\ serif-font $\ monospace-font } {
[ [ f >>bold? f >>italic? pdf-value , ] each ] [ [ f >>bold? f >>italic? pdf-value , ] each ]
[ [ t >>bold? f >>italic? pdf-value , ] each ] [ [ t >>bold? f >>italic? pdf-value , ] each ]
[ [ f >>bold? t >>italic? pdf-value , ] each ] [ [ f >>bold? t >>italic? pdf-value , ] each ]