diff --git a/library/dlists.factor b/library/dlists.factor index 51aef3013c..b147b98811 100644 --- a/library/dlists.factor +++ b/library/dlists.factor @@ -29,3 +29,17 @@ C: dlist-node : dlist-pop-front ( dlist -- data ) dup dlist-empty? [ drop f ] [ (dlist-pop-front) ] ifte ; + +: (dlist-each) ( quot dnode -- ) + [ + [ dlist-node-data swap [ call ] keep ] keep + dlist-node-next (dlist-each) + ] [ + drop + ] ifte* ; + +: dlist-each ( dlist quot -- ) + swap dlist-first (dlist-each) ; + +: dlist-length ( dlist -- length ) + 0 swap [ drop 1 + ] dlist-each ; diff --git a/library/io/win32-io-internals.factor b/library/io/win32-io-internals.factor index 2f25cc2a50..1664b87f19 100644 --- a/library/io/win32-io-internals.factor +++ b/library/io/win32-io-internals.factor @@ -1,8 +1,6 @@ -! :folding=indent:collapseFolds=1: - ! $Id$ ! -! Copyright (C) 2004 Mackenzie Straight. +! Copyright (C) 2004, 2005 Mackenzie Straight. ! ! Redistribution and use in source and binary forms, with or without ! modification, are permitted provided that the following conditions are met: @@ -131,7 +129,7 @@ END-STRUCT : win32-io-thread ( -- ) 10 wait-for-io swap [ - [ schedule-thread call ] callcc0 + [ schedule-thread call ] callcc0 2drop ] [ drop yield ] ifte*