From 6023070fec9d9b073022c8d8bce7fd02c252f322 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 25 Apr 2010 14:59:07 -0500 Subject: [PATCH 1/5] A little overzealous with the factor.sh echo cleanup --- build-support/factor.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-support/factor.sh b/build-support/factor.sh index bcc3e8f966..d8b547d8d6 100755 --- a/build-support/factor.sh +++ b/build-support/factor.sh @@ -25,7 +25,8 @@ test_program_installed() { exit_script() { if [[ $FIND_MAKE_TARGET -eq true ]] ; then - $ECHO $MAKE_TARGET; + # Must be echo not $ECHO + echo $MAKE_TARGET; fi exit $1 } From daf63d11b6b0a67a1d8515866e00f00da23eda39 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 25 Apr 2010 15:16:08 -0500 Subject: [PATCH 2/5] gitignore the fresh boot image --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 3bc5a6ffda..7bd42557b7 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ Factor/factor *.res *.RES *.image +factor.image.fresh *.dylib factor factor.com From 13baf777c9b48e3a016c23b861eff4ad04a937dc Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 25 Apr 2010 15:23:44 -0500 Subject: [PATCH 3/5] Test factor.sh output on unix platforms --- extra/build-support/authors.txt | 1 + extra/build-support/build-support-tests.factor | 6 ++++++ extra/build-support/build-support.factor | 10 ++++++++++ extra/build-support/platforms.txt | 1 + 4 files changed, 18 insertions(+) create mode 100644 extra/build-support/authors.txt create mode 100644 extra/build-support/build-support-tests.factor create mode 100644 extra/build-support/build-support.factor create mode 100644 extra/build-support/platforms.txt diff --git a/extra/build-support/authors.txt b/extra/build-support/authors.txt new file mode 100644 index 0000000000..7c1b2f2279 --- /dev/null +++ b/extra/build-support/authors.txt @@ -0,0 +1 @@ +Doug Coleman diff --git a/extra/build-support/build-support-tests.factor b/extra/build-support/build-support-tests.factor new file mode 100644 index 0000000000..1f855d5701 --- /dev/null +++ b/extra/build-support/build-support-tests.factor @@ -0,0 +1,6 @@ +! Copyright (C) 2010 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: build-support sequences tools.test ; +IN: build-support.tests + +[ f ] [ factor.sh-make-target empty? ] unit-test diff --git a/extra/build-support/build-support.factor b/extra/build-support/build-support.factor new file mode 100644 index 0000000000..177042e186 --- /dev/null +++ b/extra/build-support/build-support.factor @@ -0,0 +1,10 @@ +! Copyright (C) 2010 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: arrays io io.backend io.encodings.utf8 io.launcher ; +IN: build-support + +CONSTANT: factor.sh-path "resource:build-support/factor.sh" + +: factor.sh-make-target ( -- string ) + factor.sh-path normalize-path "make-target" 2array + utf8 [ readln ] with-process-reader ; diff --git a/extra/build-support/platforms.txt b/extra/build-support/platforms.txt new file mode 100644 index 0000000000..509143d863 --- /dev/null +++ b/extra/build-support/platforms.txt @@ -0,0 +1 @@ +unix From 879687521defefcffba194814e7170dcd136819a Mon Sep 17 00:00:00 2001 From: Daniel Ehrenberg Date: Sun, 25 Apr 2010 18:09:58 -0500 Subject: [PATCH 4/5] Documenting bitfields in structs --- basis/classes/struct/struct-docs.factor | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basis/classes/struct/struct-docs.factor b/basis/classes/struct/struct-docs.factor index 7dbfda1f4f..68a4876f92 100644 --- a/basis/classes/struct/struct-docs.factor +++ b/basis/classes/struct/struct-docs.factor @@ -35,7 +35,8 @@ HELP: STRUCT: { "Struct classes cannot have a superclass defined." } { "The slots of a struct must all have a type declared. The type must be a C type." } { { $link read-only } " slots on structs are not enforced, though they may be declared." } -} } ; +} +"Additionally, structs may use bit fields. A slot specifier may use the syntax " { $snippet "bits: n" } " to specify that the bit width of the slot is " { $snippet "n" } ". Bit width may be specified on signed or unsigned integer slots. The layout of bit fields is not guaranteed to match that of any particular C compiler." } ; HELP: S{ { $syntax "S{ class slots... }" } From c9db8f4269439805eeac8c1d1236cf7883b945a8 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 27 Apr 2010 10:52:19 -0400 Subject: [PATCH 5/5] io.sockets: update docs --- basis/io/sockets/sockets-docs.factor | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/basis/io/sockets/sockets-docs.factor b/basis/io/sockets/sockets-docs.factor index 8cc6ef731d..a41fc1e6c3 100644 --- a/basis/io/sockets/sockets-docs.factor +++ b/basis/io/sockets/sockets-docs.factor @@ -192,12 +192,13 @@ HELP: } } { $notes - "To accept UDP/IP packets from any host, use an address specifier returned by the following code, where 1234 is the desired port number:" - { $code "f 1234 resolve-host" } - "To accept UDP/IP packets from the loopback interface only, use an address specifier returned by the following code, where 1234 is the desired port number:" - { $code "\"localhost\" 1234 resolve-host" } + "To accept UDP/IP packets from any host, use an address specifier where the host name is set to " { $link f } ":" + { $code "f 1234 " } + "To create a datagram socket bound to a randomly-assigned port, set the port number in the address specifier to 0, and then read the " { $snippet "addr" } " slot of the datagram instance to obtain the actual port number it is bound to:" + { $code "f 0 " } + "To accept UDP/IP packets from the loopback interface only, use an address specifier like the following:" + { $code "\"127.0.0.1\" 1234 s" } "Since " { $link resolve-host } " can return multiple address specifiers, your code must create a datagram socket for each one and co-ordinate packet sending accordingly." - "Datagrams are low-level binary ports that don't map onto streams, so the constructor does not use an encoding" } { $errors "Throws an error if the port is already in use, or if the OS forbids access." } ;