diff --git a/core/kernel/kernel.factor b/core/kernel/kernel.factor index 88ca0a64f7..6fe0a9588c 100644 --- a/core/kernel/kernel.factor +++ b/core/kernel/kernel.factor @@ -3,7 +3,7 @@ USING: kernel.private ; IN: kernel -: version ( -- str ) "0.91" ; foldable +: version ( -- str ) "0.92" ; foldable ! Stack stuff : roll ( x y z t -- y z t x ) >r rot r> swap ; inline diff --git a/extra/documents/documents.factor b/extra/documents/documents.factor index 01034e0e3f..97433d247f 100755 --- a/extra/documents/documents.factor +++ b/extra/documents/documents.factor @@ -195,11 +195,11 @@ TUPLE: one-word-elt ; M: one-word-elt prev-elt drop - [ [ f -rot >r 1- r> (prev-word) ] (word-elt) ] (prev-char) ; + [ f -rot >r 1- r> (prev-word) ] (word-elt) ; M: one-word-elt next-elt drop - [ [ f -rot (next-word) ] (word-elt) ] (next-char) ; + [ f -rot (next-word) ] (word-elt) ; TUPLE: word-elt ; diff --git a/extra/springies/models/2x2snake/deploy.factor b/extra/springies/models/2x2snake/deploy.factor new file mode 100644 index 0000000000..1ad6cfe172 --- /dev/null +++ b/extra/springies/models/2x2snake/deploy.factor @@ -0,0 +1,13 @@ +USING: tools.deploy.config ; +H{ + { deploy-compiler? t } + { deploy-word-props? f } + { deploy-ui? t } + { deploy-reflection 1 } + { deploy-name "springies.models.2x2snake" } + { deploy-c-types? f } + { deploy-word-defs? f } + { "stop-after-last-window?" t } + { deploy-math? t } + { deploy-io 1 } +} diff --git a/extra/ui/gadgets/editors/editors-tests.factor b/extra/ui/gadgets/editors/editors-tests.factor index 6be0423e95..cbccb37111 100755 --- a/extra/ui/gadgets/editors/editors-tests.factor +++ b/extra/ui/gadgets/editors/editors-tests.factor @@ -30,6 +30,16 @@ tools.test.inference tools.test.ui models ; ] with-grafted-gadget ] unit-test +[ "bar" ] [ + "editor" set + "editor" get [ + "bar\nbaz quux" "editor" get set-editor-string + { 0 3 } "editor" get editor-caret set-model + "editor" get select-word + "editor" get gadget-selection + ] with-grafted-gadget +] unit-test + { 0 1 } [ ] unit-test-effect "hello" "field" set diff --git a/extra/ui/gadgets/editors/editors.factor b/extra/ui/gadgets/editors/editors.factor index 84cc01cdb6..eb1d5daf26 100755 --- a/extra/ui/gadgets/editors/editors.factor +++ b/extra/ui/gadgets/editors/editors.factor @@ -320,11 +320,6 @@ M: editor gadget-text* editor-string % ; : end-of-document ( editor -- ) T{ doc-elt } editor-next ; -: selected-word ( editor -- string ) - dup gadget-selection? [ - dup T{ one-word-elt } select-elt - ] unless gadget-selection ; - : position-caret ( editor -- ) mouse-elt dup T{ one-char-elt } = [ drop dup extend-selection dup editor-mark click-loc ] @@ -408,6 +403,11 @@ editor "caret-motion" f { : select-word T{ one-word-elt } select-elt ; +: selected-word ( editor -- string ) + dup gadget-selection? + [ dup select-word ] unless + gadget-selection ; + : select-previous-character T{ char-elt } editor-select-prev ; : select-next-character T{ char-elt } editor-select-next ; diff --git a/misc/macos-release.sh b/misc/macos-release.sh index 6a25ba2012..3a080e0ae6 100644 --- a/misc/macos-release.sh +++ b/misc/macos-release.sh @@ -1,15 +1,21 @@ +source misc/version.sh + TARGET=$1 -if [ "$TARGET" = "x86" ]; then +if [ "$1" = "x86" ]; then CPU="x86.32" + TARGET=macosx-x86-32 else - CPU="ppc" + CPU="macosx-ppc" + TARGET=macosx-ppc fi -make macosx-$TARGET -Factor.app/Contents/MacOS/factor -i=boot.$CPU.image -no-user-init +BOOT_IMAGE=boot.$CPU.image +wget http://factorcode.org/images/$VERSION/$BOOT_IMAGE + +make $TARGET +Factor.app/Contents/MacOS/factor -i=$BOOT_IMAGE -no-user-init -VERSION=0.91 DISK_IMAGE_DIR=Factor-$VERSION DISK_IMAGE=Factor-$VERSION-$TARGET.dmg @@ -24,3 +30,6 @@ find core extra fonts misc unmaintained -type f \ -exec ./cp_dir {} $DISK_IMAGE_DIR/Factor/{} \; hdiutil create -srcfolder "$DISK_IMAGE_DIR" -fs HFS+ \ -volname "$DISK_IMAGE_DIR" "$DISK_IMAGE" + +ssh linode mkdir -p w/downloads/$VERSION/ +scp $DISK_IMAGE linode:w/downloads/$VERSION/ diff --git a/misc/source-release.sh b/misc/source-release.sh new file mode 100644 index 0000000000..37aa98e1e3 --- /dev/null +++ b/misc/source-release.sh @@ -0,0 +1,7 @@ +source misc/version.sh +rm -rf .git +cd .. +tar cfz Factor-$VERSION.tar.gz factor/ + +ssh linode mkdir -p w/downloads/$VERSION/ +scp Factor-$VERSION.tar.gz linode:w/downloads/$VERSION/ diff --git a/misc/version.sh b/misc/version.sh new file mode 100644 index 0000000000..9c5d02d463 --- /dev/null +++ b/misc/version.sh @@ -0,0 +1 @@ +export VERSION=0.92 diff --git a/misc/windows-release.sh b/misc/windows-release.sh index 052dc396ae..91c5935f81 100644 --- a/misc/windows-release.sh +++ b/misc/windows-release.sh @@ -1,19 +1,31 @@ +source misc/version.sh + CPU=$1 -VERSION=0.91 if [ "$CPU" = "x86" ]; then FLAGS="-no-sse2" fi make windows-nt-x86 + +wget http://factorcode.org/dlls/freetype6.dll +wget http://factorcode.org/dlls/zlib1.dll +wget http://factorcode.org/images/$VERSION/boot.x86.32.image + CMD="./factor-nt -i=boot.x86.32.image -no-user-init $FLAGS" echo $CMD $CMD +rm -rf .git/ rm -rf Factor.app/ rm -rf vm/ rm -f Makefile rm -f cp_dir rm -f boot.*.image +FILE=Factor-$VERSION-win32-$CPU.zip + cd .. -zip -r Factor-$VERSION-win32-$CPU.zip Factor/ +zip -r $FILE Factor/ + +ssh linode mkdir -p w/downloads/$VERSION/ +scp $FILE linode:w/downloads/$VERSION/ diff --git a/vm/platform.h b/vm/platform.h index a3b7350b69..d5687b849d 100644 --- a/vm/platform.h +++ b/vm/platform.h @@ -72,7 +72,6 @@ #elif defined(FACTOR_ARM) #include "os-linux-arm.h" #elif defined(FACTOR_AMD64) - #include "os-unix-ucontext.h" #include "os-linux-x86-64.h" #else #error "Unsupported Linux flavor"