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

View File

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

View File

@ -6,7 +6,7 @@ CONSTANT: the-real-slim-shady "marshall mathers" ;
CONSTANT: will
IH{
{ $ the-real-slim-shady t }
{ $\ the-real-slim-shady t }
{ "marshall mathers" f }
} ;
@ -32,5 +32,5 @@ CONSTANT: will
CONSTANT: 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
{ 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

View File

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

View File

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

View File

@ -43,5 +43,5 @@ M: nehe3-gadget draw-gadget* ( gadget -- )
-1.0 -1.0 0.0 glVertex3f
] 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 ;

View File

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

View File

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

View File

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

View File

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

View File

@ -142,7 +142,7 @@ CONSTANT: DIRID_SRCPATH 1 ;
CONSTANT: DIRID_WINDOWS 10 ;
CONSTANT: DIRID_SYSTEM 11 ;
CONSTANT: DIRID_DRIVERS 12 ;
CONSTANT: DIRID_IOSUBSYS $ DIRID_DRIVERS ;
CONSTANT: DIRID_IOSUBSYS $\ DIRID_DRIVERS ;
CONSTANT: DIRID_INF 17 ;
CONSTANT: DIRID_HELP 18 ;
CONSTANT: DIRID_FONTS 20 ;
@ -157,7 +157,7 @@ CONSTANT: DIRID_SPOOLDRIVERS 52 ;
CONSTANT: DIRID_USERPROFILE 53 ;
CONSTANT: DIRID_LOADER 54 ;
CONSTANT: DIRID_PRINTPROCESSOR 55 ;
CONSTANT: DIRID_DEFAULT $ DIRID_SYSTEM ;
CONSTANT: DIRID_DEFAULT $\ DIRID_SYSTEM ;
CONSTANT: DIRID_COMMON_STARTMENU 16406 ;
CONSTANT: DIRID_COMMON_PROGRAMS 16407 ;
CONSTANT: DIRID_COMMON_STARTUP 16408 ;
@ -212,7 +212,7 @@ CONSTANT: FILEOP_BACKUP 3 ;
CONSTANT: FILEOP_ABORT 0 ;
CONSTANT: FILEOP_DOIT 1 ;
CONSTANT: FILEOP_SKIP 2 ;
CONSTANT: FILEOP_RETRY $ FILEOP_DOIT ;
CONSTANT: FILEOP_RETRY $\ FILEOP_DOIT ;
CONSTANT: FILEOP_NEWPATH 4 ;
CONSTANT: COPYFLG_WARN_IF_SKIP 0x00000001 ;
CONSTANT: COPYFLG_NOSKIP 0x00000002 ;
@ -400,9 +400,9 @@ CONSTANT: SPINT_DEFAULT 0x00000002 ;
CONSTANT: SPINT_REMOVED 0x00000004 ;
TYPEDEF: SP_DEVICE_INTERFACE_DATA SP_INTERFACE_DEVICE_DATA ;
TYPEDEF: PSP_DEVICE_INTERFACE_DATA PSP_INTERFACE_DEVICE_DAT ;
CONSTANT: SPID_ACTIVE $ SPINT_ACTIVE ;
CONSTANT: SPID_DEFAULT $ SPINT_DEFAULT ;
CONSTANT: SPID_REMOVED $ SPINT_REMOVED ;
CONSTANT: SPID_ACTIVE $\ SPINT_ACTIVE ;
CONSTANT: SPID_DEFAULT $\ SPINT_DEFAULT ;
CONSTANT: SPID_REMOVED $\ SPINT_REMOVED ;
PACKED-STRUCT: SP_DEVICE_INTERFACE_DETAIL_DATA_A
{ cbSize DWORD }
@ -663,8 +663,8 @@ TYPEDEF: SP_INSTALLWIZARD_DATA* PSP_INSTALLWIZARD_DATA ;
CONSTANT: NDW_INSTALLFLAG_DIDFACTDEFS 0x00000001 ;
CONSTANT: NDW_INSTALLFLAG_HARDWAREALLREADYIN 0x00000002 ;
CONSTANT: NDW_INSTALLFLAG_NEEDRESTART $ DI_NEEDRESTART ;
CONSTANT: NDW_INSTALLFLAG_NEEDREBOOT $ DI_NEEDREBOOT ;
CONSTANT: NDW_INSTALLFLAG_NEEDRESTART $\ DI_NEEDRESTART ;
CONSTANT: NDW_INSTALLFLAG_NEEDREBOOT $\ DI_NEEDREBOOT ;
CONSTANT: NDW_INSTALLFLAG_NEEDSHUTDOWN 0x00000200 ;
CONSTANT: NDW_INSTALLFLAG_EXPRESSINTRO 0x00000400 ;
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_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: EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW $ ERROR_UNRECOVERABLE_STACK_OVERFLOW ;
CONSTANT: ERROR_NO_DEFAULT_INTERFACE_DEVICE $ ERROR_NO_DEFAULT_DEVICE_INTERFACE ;
CONSTANT: ERROR_INTERFACE_DEVICE_ACTIVE $ ERROR_DEVICE_INTERFACE_ACTIVE ;
CONSTANT: ERROR_INTERFACE_DEVICE_REMOVED $ ERROR_DEVICE_INTERFACE_REMOVED ;
CONSTANT: ERROR_NO_SUCH_INTERFACE_DEVICE $ ERROR_NO_SUCH_DEVICE_INTERFACE ;
CONSTANT: EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW $\ ERROR_UNRECOVERABLE_STACK_OVERFLOW ;
CONSTANT: ERROR_NO_DEFAULT_INTERFACE_DEVICE $\ ERROR_NO_DEFAULT_DEVICE_INTERFACE ;
CONSTANT: ERROR_INTERFACE_DEVICE_ACTIVE $\ ERROR_DEVICE_INTERFACE_ACTIVE ;
CONSTANT: ERROR_INTERFACE_DEVICE_REMOVED $\ ERROR_DEVICE_INTERFACE_REMOVED ;
CONSTANT: ERROR_NO_SUCH_INTERFACE_DEVICE $\ ERROR_NO_SUCH_DEVICE_INTERFACE ;
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 ) ;
@ -1206,7 +1206,7 @@ ALIAS: SetupInstallFileEx SetupInstallFileExW ;
CONSTANT: SP_COPY_DELETESOURCE 0x0000001 ;
CONSTANT: SP_COPY_REPLACEONLY 0x0000002 ;
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_NODECOMP 0x0000010 ;
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_NONE 0x00020001 ;
CONSTANT: FLG_DELREG_VALUE 0x00000000 ;
CONSTANT: FLG_DELREG_TYPE_MASK $ FLG_ADDREG_TYPE_MASK ;
CONSTANT: FLG_DELREG_TYPE_SZ $ FLG_ADDREG_TYPE_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_BINARY $ FLG_ADDREG_TYPE_BINARY ;
CONSTANT: FLG_DELREG_TYPE_DWORD $ FLG_ADDREG_TYPE_DWORD ;
CONSTANT: FLG_DELREG_TYPE_NONE $ FLG_ADDREG_TYPE_NONE ;
CONSTANT: FLG_DELREG_64BITKEY $ FLG_ADDREG_64BITKEY ;
CONSTANT: FLG_DELREG_KEYONLY_COMMON $ FLG_ADDREG_KEYONLY_COMMON ;
CONSTANT: FLG_DELREG_32BITKEY $ FLG_ADDREG_32BITKEY ;
CONSTANT: FLG_DELREG_TYPE_MASK $\ FLG_ADDREG_TYPE_MASK ;
CONSTANT: FLG_DELREG_TYPE_SZ $\ FLG_ADDREG_TYPE_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_BINARY $\ FLG_ADDREG_TYPE_BINARY ;
CONSTANT: FLG_DELREG_TYPE_DWORD $\ FLG_ADDREG_TYPE_DWORD ;
CONSTANT: FLG_DELREG_TYPE_NONE $\ FLG_ADDREG_TYPE_NONE ;
CONSTANT: FLG_DELREG_64BITKEY $\ FLG_ADDREG_64BITKEY ;
CONSTANT: FLG_DELREG_KEYONLY_COMMON $\ FLG_ADDREG_KEYONLY_COMMON ;
CONSTANT: FLG_DELREG_32BITKEY $\ FLG_ADDREG_32BITKEY ;
CONSTANT: FLG_DELREG_OPERATION_MASK 0x000000FE ;
CONSTANT: FLG_DELREG_MULTI_SZ_DELSTRING 0x00018002 ;
CONSTANT: FLG_BITREG_CLEARBITS 0x00000000 ;
@ -1670,7 +1670,7 @@ CONSTANT: DIGCF_PRESENT 0x00000002 ;
CONSTANT: DIGCF_ALLCLASSES 0x00000004 ;
CONSTANT: DIGCF_PROFILE 0x00000008 ;
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 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 ( -- )
{
{ GUID_XAxis_malloced $ GUID_XAxis }
{ GUID_YAxis_malloced $ GUID_YAxis }
{ GUID_ZAxis_malloced $ GUID_ZAxis }
{ GUID_RxAxis_malloced $ GUID_RxAxis }
{ GUID_RyAxis_malloced $ GUID_RyAxis }
{ GUID_RzAxis_malloced $ GUID_RzAxis }
{ GUID_Slider_malloced $ GUID_Slider }
{ GUID_Button_malloced $ GUID_Button }
{ GUID_Key_malloced $ GUID_Key }
{ GUID_POV_malloced $ GUID_POV }
{ GUID_Unknown_malloced $ GUID_Unknown }
{ GUID_SysMouse_malloced $ GUID_SysMouse }
{ GUID_SysKeyboard_malloced $ GUID_SysKeyboard }
{ GUID_Joystick_malloced $ GUID_Joystick }
{ GUID_SysMouseEm_malloced $ GUID_SysMouseEm }
{ GUID_SysMouseEm2_malloced $ GUID_SysMouseEm2 }
{ GUID_SysKeyboardEm_malloced $ GUID_SysKeyboardEm }
{ GUID_SysKeyboardEm2_malloced $ GUID_SysKeyboardEm2 }
{ GUID_XAxis_malloced $\ GUID_XAxis }
{ GUID_YAxis_malloced $\ GUID_YAxis }
{ GUID_ZAxis_malloced $\ GUID_ZAxis }
{ GUID_RxAxis_malloced $\ GUID_RxAxis }
{ GUID_RyAxis_malloced $\ GUID_RyAxis }
{ GUID_RzAxis_malloced $\ GUID_RzAxis }
{ GUID_Slider_malloced $\ GUID_Slider }
{ GUID_Button_malloced $\ GUID_Button }
{ GUID_Key_malloced $\ GUID_Key }
{ GUID_POV_malloced $\ GUID_POV }
{ GUID_Unknown_malloced $\ GUID_Unknown }
{ GUID_SysMouse_malloced $\ GUID_SysMouse }
{ GUID_SysKeyboard_malloced $\ GUID_SysKeyboard }
{ GUID_Joystick_malloced $\ GUID_Joystick }
{ GUID_SysMouseEm_malloced $\ GUID_SysMouseEm }
{ GUID_SysMouseEm2_malloced $\ GUID_SysMouseEm2 }
{ GUID_SysKeyboardEm_malloced $\ GUID_SysKeyboardEm }
{ GUID_SysKeyboardEm2_malloced $\ GUID_SysKeyboardEm2 }
} [ first2 (malloc-guid-symbol) ] each ;
: define-joystick-format-constant ( -- )

View File

@ -31,9 +31,9 @@ PRIVATE<
: origin>seek-type ( origin -- seek-type )
{
{ $ STREAM_SEEK_SET [ seek-absolute ] }
{ $ STREAM_SEEK_CUR [ seek-relative ] }
{ $ STREAM_SEEK_END [ seek-end ] }
{ $\ STREAM_SEEK_SET [ seek-absolute ] }
{ $\ STREAM_SEEK_CUR [ seek-relative ] }
{ $\ STREAM_SEEK_END [ seek-end ] }
} case ;
:: 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 ;
: bind-name% ( -- )
char: $ 0,
char: \$ 0,
sql-counter [ inc ] [ get 0# ] bi ;
M: postgresql-db-connection bind% ( spec -- )

View File

@ -67,7 +67,7 @@ M: sphere audio-distance radius>> fsqrt 2.0 * ; inline
raytrace-uniforms boa ;
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 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 } }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -97,14 +97,14 @@ GENERIC: (print-input) ( object -- ) ;
SYMBOL: listener-input-style
H{
{ font-style bold }
{ foreground $ text-color }
{ foreground $\ text-color }
} listener-input-style set-global
SYMBOL: listener-word-style
H{
{ font-name "sans-serif" }
{ font-style bold }
{ foreground $ text-color }
{ foreground $\ text-color }
} listener-word-style set-global
M: input (print-input)
@ -399,7 +399,7 @@ interactor "completion" f {
: introduction. ( -- )
[
H{ { font-size $ default-font-size } } [
H{ { font-size $\ default-font-size } } [
{ $tip-of-the-day } print-element nl
{ $strong "Press " { $snippet "F1" } " at any time for help." } print-element nl
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 )
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 )
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' )
-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 -- )
dup rightward-vector [ v+ ] curry change-velocity drop ; inline
: 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 -- )
[ - ] curry change-yaw drop ; inline
: rotate-rightward ( player x -- )

View File

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

View File

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

View File

@ -40,14 +40,14 @@ M: unix copy-file ( from to -- )
: dirent-type>file-type ( type -- file-type )
H{
{ $ DT_BLK +block-device+ }
{ $ DT_CHR +character-device+ }
{ $ DT_DIR +directory+ }
{ $ DT_LNK +symbolic-link+ }
{ $ DT_SOCK +socket+ }
{ $ DT_FIFO +fifo+ }
{ $ DT_REG +regular-file+ }
{ $ DT_WHT +whiteout+ }
{ $\ DT_BLK +block-device+ }
{ $\ DT_CHR +character-device+ }
{ $\ DT_DIR +directory+ }
{ $\ DT_LNK +symbolic-link+ }
{ $\ DT_SOCK +socket+ }
{ $\ DT_FIFO +fifo+ }
{ $\ DT_REG +regular-file+ }
{ $\ DT_WHT +whiteout+ }
} at* [ drop +unknown+ ] unless ;
! 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" iso2022 encode >string ] 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\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" } [ 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\u00fffd" } [ B{ char: h char: i $\ ESC char: \( } 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
{ "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
{ "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
{ 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
{ "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\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
{ "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" } [ 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 } 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: 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\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\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 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
{ "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" } [ 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: \( char: D 0x70 0x70 } iso2022 decode ] 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\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\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
[ "\u{syriac-music}" iso2022 encode ] must-fail

View File

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

View File

@ -137,7 +137,7 @@ PRIVATE<
al-source {
[ AL_BUFFERS_PROCESSED 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&&
[ next-source# al-source ] [
next-source# stop-source# =

View File

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

View File

@ -72,15 +72,15 @@ IN: math.functions.tests
CONSTANT: log-factorial-1000 0x1.71820d04e2eb6p12 ;
CONSTANT: log10-factorial-1000 0x1.40f3593ed6f8ep11 ;
{ $ 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
{ $\ 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
{ 0.0 } [ 1.0 log10 ] unit-test
{ 1.0 } [ 10.0 log10 ] unit-test
{ 2.0 } [ 100.0 log10 ] unit-test
{ 3.0 } [ 1000.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
{ f } [ 1 e^ 0/0. 1.e-10 ~ ] unit-test

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@ CONSTANT: stylesheet
H{
{ default-span-style
H{
{ font-name $ default-sans-serif-font-name }
{ font-name $\ default-sans-serif-font-name }
{ font-size $$[ default-font-size 3 * ] }
}
}
@ -21,7 +21,7 @@ CONSTANT: stylesheet
}
{ code-char-style
H{
{ font-name $ default-monospace-font-name }
{ font-name $\ default-monospace-font-name }
{ font-size $$[ default-font-size 3 * ] }
}
}
@ -32,7 +32,7 @@ CONSTANT: stylesheet
}
{ snippet-style
H{
{ font-name $ default-monospace-font-name }
{ font-name $\ default-monospace-font-name }
{ font-size $$[ default-font-size 3 * ] }
{ foreground T{ rgba f 0.1 0.1 0.4 1 } }
}
@ -52,7 +52,7 @@ CONSTANT: stylesheet
: $title ( string -- )
[
H{
{ font-name $ default-sans-serif-font-name }
{ font-name $\ default-sans-serif-font-name }
{ font-size $$[ default-font-size 4 * ] }
} format
] ($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" ;
! /** 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. */
CONSTANT: YAML_DEFAULT_SEQUENCE_TAG $ YAML_SEQ_TAG ;
CONSTANT: YAML_DEFAULT_SEQUENCE_TAG $\ YAML_SEQ_TAG ;
! /** 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. */
ENUM: yaml_node_type_t

View File

@ -45,9 +45,9 @@ CONSTANT: test-represented-string "--- !!seq
...
" ;
$${ test-obj } [ $ test-string yaml> ] unit-test
$${ test-represented-string } [ $ test-obj >yaml ] unit-test
$${ test-represented-string } [ $ test-represented-string yaml> >yaml ] unit-test
$${ test-obj } [ $\ test-string yaml> ] unit-test
$${ test-represented-string } [ $\ test-obj >yaml ] unit-test
$${ test-represented-string } [ $\ test-represented-string yaml> >yaml ] unit-test
! Non-scalar key
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
CONSTANT: test-docs "--- !!str a
@ -73,9 +73,9 @@ CONSTANT: test-docs "--- !!str a
" ;
CONSTANT: test-objs { "a" { "b" "c" } H{ { "d" "e" } } } ;
$${ test-objs } [ $ test-docs yaml-docs> ] unit-test
$${ test-docs } [ $ test-objs >yaml-docs ] unit-test
$${ test-docs } [ $ test-docs yaml-docs> >yaml-docs ] unit-test
$${ test-objs } [ $\ test-docs yaml-docs> ] unit-test
$${ test-docs } [ $\ test-objs >yaml-docs ] unit-test
$${ test-docs } [ $\ test-docs yaml-docs> >yaml-docs ] unit-test
! Misc types
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-types >yaml yaml> ] unit-test
$${ test-types } [ $\ test-represented-types yaml> ] unit-test
$${ test-types } [ $\ test-types >yaml yaml> ] unit-test
! Anchors
@ -105,11 +105,11 @@ CONSTANT: test-anchors-obj {
"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-obj >yaml yaml> ] unit-test
$${ test-anchors-obj } [ $\ test-anchors yaml> ] unit-test
$${ test-anchors-obj } [ $\ test-anchors-obj >yaml yaml> ] unit-test
! and test indentity
{ 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> 2 group [ all-eq? ] all? ] unit-test
{ t } [ $\ test-anchors yaml> >yaml yaml> 2 group [ all-eq? ] all? ] unit-test
! Anchors and fancy types
CONSTANT: fancy-anchors "- &1 [ \"foo\" ]
@ -122,8 +122,8 @@ CONSTANT: fancy-anchors-obj {
{ "foo" } HS{ { "foo" } } HS{ { "foo" } }
} ;
$${ fancy-anchors-obj } [ $ fancy-anchors yaml> ] unit-test
$${ fancy-anchors-obj } [ $ fancy-anchors-obj >yaml yaml> ] unit-test
$${ fancy-anchors-obj } [ $\ fancy-anchors yaml> ] unit-test
$${ fancy-anchors-obj } [ $\ fancy-anchors-obj >yaml yaml> ] unit-test
! Simple Recursive output
: simple-recursive-list ( -- obj )
@ -135,7 +135,7 @@ CONSTANT: simple-recursive-list-yaml "&0
- *0" ;
$${ 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
! many recursive outputs
@ -190,8 +190,8 @@ $${ transitive-recursive-objects-anchored } [ transitive-recursive-objects repla
! n: is a string
! " ;
!
! $${ construct-bool-obj } [ $ construct-bool-str yaml> ] unit-test
! $${ construct-bool-obj } [ $ construct-bool-obj >yaml yaml> ] unit-test
! $${ construct-bool-obj } [ $\ construct-bool-str yaml> ] unit-test
! $${ construct-bool-obj } [ $\ construct-bool-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!!
! construct-int
@ -213,8 +213,8 @@ $${ transitive-recursive-objects-anchored } [ transitive-recursive-objects repla
! sexagesimal: 190:20:30
! " ;
!
! $${ construct-int-obj } [ $ construct-int-str yaml> ] unit-test
! $${ construct-int-obj } [ $ construct-int-obj >yaml yaml> ] unit-test
! $${ construct-int-obj } [ $\ construct-int-str yaml> ] unit-test
! $${ construct-int-obj } [ $\ construct-int-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!!
! construct-map
@ -235,8 +235,8 @@ Block style: !!map
Flow style: !!map { Clark: Evans, Brian: Ingerson, Oren: Ben-Kiki }
" ;
$${ construct-map-obj } [ $ construct-map-str yaml> ] unit-test
$${ construct-map-obj } [ $ construct-map-obj >yaml yaml> ] unit-test
$${ construct-map-obj } [ $\ construct-map-str yaml> ] unit-test
$${ construct-map-obj } [ $\ construct-map-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!!
! construct-null
@ -276,9 +276,9 @@ sparse:
- 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
! $${ 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
@ -303,8 +303,8 @@ Flow style: !!seq [ Mercury, Venus, Earth, Mars, # Rocks
Pluto ] # Overrated
" ;
$${ construct-seq-obj } [ $ construct-seq-str yaml> ] unit-test
$${ construct-seq-obj } [ $ construct-seq-obj >yaml yaml> ] unit-test
$${ construct-seq-obj } [ $\ construct-seq-str yaml> ] unit-test
$${ construct-seq-obj } [ $\ construct-seq-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!!
! construct-set
@ -333,8 +333,8 @@ baseball players: !!set
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-obj >yaml yaml> ] unit-test
$${ construct-set-obj } [ $\ construct-set-str yaml> ] unit-test
$${ construct-set-obj } [ $\ construct-set-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!!
! construct-binary
@ -401,8 +401,8 @@ description:
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-obj >yaml yaml> ] unit-test
$${ construct-binary-obj } [ $\ construct-binary-str yaml> ] unit-test
$${ construct-binary-obj } [ $\ construct-binary-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!!
! construct-merge
@ -462,8 +462,8 @@ CONSTANT: construct-merge-str "---
label: center/big
" ;
$${ construct-merge-obj } [ $ construct-merge-str yaml> ] unit-test
$${ construct-merge-obj } [ $ construct-merge-obj2 >yaml yaml> ] unit-test
$${ construct-merge-obj } [ $\ construct-merge-str yaml> ] unit-test
$${ construct-merge-obj } [ $\ construct-merge-obj2 >yaml yaml> ] unit-test
! More merge tests
! see http://sourceforge.net/p/yaml/mailman/message/12308050
@ -479,15 +479,15 @@ CONSTANT: nested-merge-obj H{
{ "baz" 3 }
} ;
$${ nested-merge-obj } [ $ nested-merge-str yaml> ] unit-test
$${ nested-merge-obj } [ $ nested-merge-obj >yaml yaml> ] unit-test
$${ nested-merge-obj } [ $\ nested-merge-str yaml> ] unit-test
$${ nested-merge-obj } [ $\ nested-merge-obj >yaml yaml> ] unit-test
CONSTANT: recursive-merge-str "--- &A
COMPILE<: *A" ;
CONSTANT: recursive-merge-obj H{ } ;
$${ recursive-merge-obj } [ $ recursive-merge-str yaml> ] unit-test
$${ recursive-merge-obj } [ $ recursive-merge-obj >yaml yaml> ] unit-test
$${ recursive-merge-obj } [ $\ recursive-merge-str yaml> ] unit-test
$${ recursive-merge-obj } [ $\ recursive-merge-obj >yaml yaml> ] unit-test
! Compare with pyyaml
! >>> print yaml.load("&1 {1: 2, 2: 3, 3: {4: 5, <<: *1}}")
@ -515,15 +515,15 @@ CONSTANT: recursive-merge-obj3 H{
} ;
{ t } [
$ recursive-merge-str2 yaml> recursive-merge-obj2
$\ recursive-merge-str2 yaml> recursive-merge-obj2
[ replace-identities ] bi@ =
] unit-test
{ t } [
recursive-merge-obj2 >yaml yaml> recursive-merge-obj2
[ replace-identities ] bi@ =
] 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-str3 yaml> ] unit-test
$${ recursive-merge-obj3 } [ $\ recursive-merge-obj3 >yaml yaml> ] unit-test
! Serializing merge
CONSTANT: serialize-merge-obj H{
@ -531,9 +531,9 @@ CONSTANT: serialize-merge-obj H{
} ;
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 [
$${ serialize-merge-obj } [ $ serialize-merge-obj >yaml yaml> ] unit-test
$${ serialize-merge-obj } [ $\ serialize-merge-obj >yaml yaml> ] unit-test
] with-variable
! !!!!!!!!!!!!!!!
@ -566,7 +566,7 @@ Bestiary: !!omap
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
! !!!!!!!!!!!!!!!
@ -610,8 +610,8 @@ CONSTANT: construct-pairs-obj-roundtripped H{
}
} ;
$${ construct-pairs-obj } [ $ construct-pairs-str yaml> ] unit-test
$${ construct-pairs-obj } [ $ construct-pairs-obj >yaml yaml> ] unit-test
$${ construct-pairs-obj } [ $\ construct-pairs-str yaml> ] unit-test
$${ construct-pairs-obj } [ $\ construct-pairs-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!!
! 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
" ;
$${ construct-timestamp-obj } [ $ construct-timestamp-str yaml> ] unit-test
$${ construct-timestamp-obj } [ $ construct-timestamp-obj >yaml yaml> ] unit-test
$${ construct-timestamp-obj } [ $\ construct-timestamp-str yaml> ] unit-test
$${ construct-timestamp-obj } [ $\ construct-timestamp-obj >yaml yaml> ] unit-test
! !!!!!!!!!!!!!!!
! construct-value
@ -720,13 +720,13 @@ link with:
version: 2.3
" ;
$${ 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-str yaml-docs> ] unit-test
$${ construct-value-safe-obj } [ $\ construct-value-safe-obj >yaml-docs yaml-docs> ] unit-test
f value [
$${ 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-str yaml-docs> ] unit-test
$${ construct-value-unsafe-obj } [ $\ construct-value-unsafe-obj >yaml-docs yaml-docs> ] unit-test
$${ construct-value-safe-obj } [
$ construct-value-str yaml-docs> [
$\ construct-value-str yaml-docs> [
dup "link with" swap [ [ scalar-value ] map ] change-at
] map
] unit-test
@ -737,9 +737,9 @@ CONSTANT: serialize-value-obj H{
{ T{ yaml-value } 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 [
$${ serialize-value-obj } [ $ serialize-value-obj >yaml yaml> ] unit-test
$${ serialize-value-obj } [ $\ serialize-value-obj >yaml yaml> ] unit-test
] with-variable
! !!!!!!!!!!!!!!!

View File

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

View File

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

View File

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