Fix conflict

db4
Slava Pestov 2008-01-27 23:23:12 -06:00
commit dccab9116f
3 changed files with 12 additions and 14 deletions

View File

@ -88,8 +88,6 @@ HELP: typedef
{ $description "Alises the C type " { $snippet "old" } " under the name " { $snippet "new" } "." }
{ $notes "Using this word in the same source file which defines C bindings can cause problems, because words are compiled before top-level forms are run. Use the " { $link POSTPONE: TYPEDEF: } " word instead." } ;
{ typedef POSTPONE: TYPEDEF: POSTPONE: TYPEDEF-IF: } related-words
{ POSTPONE: TYPEDEF: typedef POSTPONE: TYPEDEF-IF: } related-words
{ POSTPONE: TYPEDEF-IF: POSTPONE: TYPEDEF: typedef } related-words
HELP: c-struct?

12
extra/assocs/lib/lib.factor Normal file → Executable file
View File

@ -7,18 +7,18 @@ IN: assocs.lib
: >set ( seq -- hash )
[ dup ] H{ } map>assoc ;
: ref-hash ( table key -- value ) swap at ;
: ref-at ( table key -- value ) swap at ;
! set-hash with alternative stack effects
! set-at with alternative stack effects
: put-hash* ( table key value -- ) spin set-at ;
: put-at* ( table key value -- ) swap rot set-at ;
: put-hash ( table key value -- table ) swap pick set-at ;
: put-at ( table key value -- table ) swap pick set-at ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: set-hash-stack ( value key seq -- )
dupd [ key? ] with find-last nip set-at ;
: set-assoc-stack ( value key seq -- )
dupd [ key? ] with find-last nip set-at ;
: at-default ( key assoc -- value/key )
dupd at [ nip ] when* ;

View File

@ -1,10 +1,10 @@
USING: unicode.categories kernel math const combinators splitting
USING: unicode.categories kernel math combinators splitting
sequences math.parser io.files io assocs arrays namespaces
combinators.lib assocs.lib math.ranges unicode.normalize
unicode.syntax unicode.data ;
unicode.syntax unicode.data compiler.units alien.syntax ;
IN: unicode.breaks
ENUM: Any L V T Extend Control CR LF graphemes ;
C-ENUM: Any L V T Extend Control CR LF graphemes ;
: jamo-class ( ch -- class )
dup initial? [ drop L ]
@ -71,9 +71,9 @@ SYMBOL: table
: make-grapheme-table ( -- )
CR LF connect
{ Control CR LF } graphemes break-around
L { L V } connect-before
V { V T } connect-before
Control CR LF 3array graphemes break-around
L L V 2array connect-before
V V T 2array connect-before
T T connect
graphemes Extend connect-after ;