factor: Trim whitespace after ! comments and a few USING: lines that got skipped before.

db4
Doug Coleman 2015-07-18 20:14:22 -07:00
parent 035ccf7984
commit 4ec2311406
35 changed files with 72 additions and 72 deletions

View File

@ -8,7 +8,7 @@ HOOK: find-library* os ( name -- path/f )
! Try to find the library from a list, but if it's not found,
! try to open a library that is the first name in that list anyway
! or "library_not_found" as a last resort for better debugging.
! or "library_not_found" as a last resort for better debugging.
: find-library-from-list ( seq -- path/f )
dup [ find-library* ] map-find drop
[ nip ] [ ?first "library_not_found" or ] if* ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2005 Chris Double. All Rights Reserved.
! See http://factorcode.org/license.txt for BSD license.
!
USING: kernel tools.test math channels channels.private
USING: kernel tools.test math channels channels.private
sequences threads sorting ;
IN: channels.tests

View File

@ -11,7 +11,7 @@ CONSTANT: NSMiniaturizableWindowMask 4
CONSTANT: NSResizableWindowMask 8
CONSTANT: NSTexturedBackgroundWindowMask 256
! Additional panel-only styles
! Additional panel-only styles
CONSTANT: NSUtilityWindowMask 16
CONSTANT: NSDocModalWindowMask 64
CONSTANT: NSNonactivatingPanelMask 128

View File

@ -164,7 +164,7 @@ cell 4 = [
{ { 0x66 0x0f 0x71 0xd0 0x05 } } [ [ XMM0 5 PSRLW ] { } make ] unit-test
{ { 0x66 0x0f 0xd1 0xc1 } } [ [ XMM0 XMM1 PSRLW ] { } make ] unit-test
! sse comparison instructions
! sse comparison instructions
{ { 0x66 0x0f 0xc2 0xc1 0x02 } } [ [ XMM0 XMM1 CMPLEPD ] { } make ] unit-test
! unique sse instructions

View File

@ -15,28 +15,28 @@ IN: db.sqlite.ffi
! Return values from sqlite functions
CONSTANT: SQLITE_OK 0 ! Successful result
CONSTANT: SQLITE_ERROR 1 ! SQL error or missing database
CONSTANT: SQLITE_INTERNAL 2 ! An internal logic error in SQLite
CONSTANT: SQLITE_PERM 3 ! Access permission denied
CONSTANT: SQLITE_ABORT 4 ! Callback routine requested an abort
CONSTANT: SQLITE_BUSY 5 ! The database file is locked
CONSTANT: SQLITE_LOCKED 6 ! A table in the database is locked
CONSTANT: SQLITE_NOMEM 7 ! A malloc() failed
CONSTANT: SQLITE_READONLY 8 ! Attempt to write a readonly database
CONSTANT: SQLITE_INTERRUPT 9 ! Operation terminated by sqlite_interrupt()
CONSTANT: SQLITE_IOERR 10 ! Some kind of disk I/O error occurred
CONSTANT: SQLITE_CORRUPT 11 ! The database disk image is malformed
CONSTANT: SQLITE_NOTFOUND 12 ! (Internal Only) Table or record not found
CONSTANT: SQLITE_FULL 13 ! Insertion failed because database is full
CONSTANT: SQLITE_CANTOPEN 14 ! Unable to open the database file
CONSTANT: SQLITE_PROTOCOL 15 ! Database lock protocol error
CONSTANT: SQLITE_EMPTY 16 ! (Internal Only) Database table is empty
CONSTANT: SQLITE_SCHEMA 17 ! The database schema changed
CONSTANT: SQLITE_TOOBIG 18 ! Too much data for one row of a table
CONSTANT: SQLITE_CONSTRAINT 19 ! Abort due to contraint violation
CONSTANT: SQLITE_MISMATCH 20 ! Data type mismatch
CONSTANT: SQLITE_MISUSE 21 ! Library used incorrectly
CONSTANT: SQLITE_NOLFS 22 ! Uses OS features not supported on host
CONSTANT: SQLITE_AUTH 23 ! Authorization denied
CONSTANT: SQLITE_INTERNAL 2 ! An internal logic error in SQLite
CONSTANT: SQLITE_PERM 3 ! Access permission denied
CONSTANT: SQLITE_ABORT 4 ! Callback routine requested an abort
CONSTANT: SQLITE_BUSY 5 ! The database file is locked
CONSTANT: SQLITE_LOCKED 6 ! A table in the database is locked
CONSTANT: SQLITE_NOMEM 7 ! A malloc() failed
CONSTANT: SQLITE_READONLY 8 ! Attempt to write a readonly database
CONSTANT: SQLITE_INTERRUPT 9 ! Operation terminated by sqlite_interrupt()
CONSTANT: SQLITE_IOERR 10 ! Some kind of disk I/O error occurred
CONSTANT: SQLITE_CORRUPT 11 ! The database disk image is malformed
CONSTANT: SQLITE_NOTFOUND 12 ! (Internal Only) Table or record not found
CONSTANT: SQLITE_FULL 13 ! Insertion failed because database is full
CONSTANT: SQLITE_CANTOPEN 14 ! Unable to open the database file
CONSTANT: SQLITE_PROTOCOL 15 ! Database lock protocol error
CONSTANT: SQLITE_EMPTY 16 ! (Internal Only) Database table is empty
CONSTANT: SQLITE_SCHEMA 17 ! The database schema changed
CONSTANT: SQLITE_TOOBIG 18 ! Too much data for one row of a table
CONSTANT: SQLITE_CONSTRAINT 19 ! Abort due to contraint violation
CONSTANT: SQLITE_MISMATCH 20 ! Data type mismatch
CONSTANT: SQLITE_MISUSE 21 ! Library used incorrectly
CONSTANT: SQLITE_NOLFS 22 ! Uses OS features not supported on host
CONSTANT: SQLITE_AUTH 23 ! Authorization denied
CONSTANT: SQLITE_FORMAT 24 ! Auxiliary database format error
CONSTANT: SQLITE_RANGE 25 ! 2nd parameter to sqlite3_bind out of range
CONSTANT: SQLITE_NOTADB 26 ! File opened that is not a database file
@ -82,7 +82,7 @@ CONSTANT: SQLITE_TEXT 3
CONSTANT: SQLITE_BLOB 4
CONSTANT: SQLITE_NULL 5
! Values for the 'destructor' parameter of the 'bind' routines.
! Values for the 'destructor' parameter of the 'bind' routines.
CONSTANT: SQLITE_STATIC 0
CONSTANT: SQLITE_TRANSIENT -1

View File

@ -7,7 +7,7 @@ memoize.private arrays ;
IN: generalizations
! These words can be inline combinators the word does no math on
! the input parameters, e.g. n.
! the input parameters, e.g. n.
! If math is done, the word needs to be a macro so the math can
! be done at compile-time.
<<

View File

@ -71,7 +71,7 @@ M:: iso2022-state encode-char ( char stream encoding -- )
] }
{ CHAR: $ [
dup stream-read1 {
{ CHAR: @ [ drop jis208 get-global ] } ! want: JIS X 0208-1978
{ CHAR: @ [ drop jis208 get-global ] } ! want: JIS X 0208-1978
{ CHAR: B [ drop jis208 get-global ] }
{ CHAR: ( [
stream-read1 CHAR: D = jis212 get-global f ?

View File

@ -2,7 +2,7 @@ IN: models.range.tests
USING: arrays generic kernel math models namespaces sequences assocs
tools.test models.range ;
! Test <range>
! Test <range>
: setup-range ( -- range ) 0 0 0 255 1 <range> ;
: setup-stepped-range ( -- range ) 0 0 0 255 2 <range> ;

View File

@ -1,6 +1,6 @@
! Copyright (C) 2005, 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
! mersenne twister based on
! mersenne twister based on
! http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/mt19937ar.c
USING: accessors alien.c-types alien.data fry init kernel math
math.bitwise namespaces random sequences sequences.private

View File

@ -44,7 +44,7 @@ CONSTANT: final-count 28
medial-base - + final-count *
] dip final-base - + hangul-base + ;
! Normalization -- Decomposition
! Normalization -- Decomposition
: reorder-slice ( string start -- slice done? )
2dup swap [ non-starter? not ] find-from drop

View File

@ -133,7 +133,7 @@ CONSTANT: SyncBoth 7
CONSTANT: RevertToParent 2
! *****************************************************************
! * ERROR CODES
! * ERROR CODES
! *****************************************************************
CONSTANT: Success 0 ! everything's okay
@ -148,9 +148,9 @@ CONSTANT: BadMatch 8 ! parameter mismatch
CONSTANT: BadDrawable 9 ! parameter not a Pixmap or Window
CONSTANT: BadAccess 10 ! depending on context:
! - key/button already grabbed
! - attempt to free an illegal
! cmap entry
! - attempt to store into a read-only
! - attempt to free an illegal
! cmap entry
! - attempt to store into a read-only
! color map entry.
! - attempt to modify the access control
! list from other than the local host.
@ -166,7 +166,7 @@ CONSTANT: FirstExtensionError 128
CONSTANT: LastExtensionError 255
! *****************************************************************
! * WINDOW DEFINITIONS
! * WINDOW DEFINITIONS
! *****************************************************************
! Window classes used by CreateWindow
@ -275,7 +275,7 @@ CONSTANT: ArcChord 0 ! join endpoints of arc
CONSTANT: ArcPieSlice 1 ! join endpoints to center of arc
! *****************************************************************
! * FONTS
! * FONTS
! *****************************************************************
! used in QueryFont -- draw direction
@ -286,7 +286,7 @@ CONSTANT: FontRightToLeft 1
CONSTANT: FontChange 255
! *****************************************************************
! * IMAGING
! * IMAGING
! *****************************************************************
! ImageFormat -- PutImage, GetImage
@ -296,7 +296,7 @@ CONSTANT: XYPixmap 1 ! depth == drawable depth
CONSTANT: ZPixmap 2 ! depth == drawable depth
! *****************************************************************
! * COLOR MAP STUFF
! * COLOR MAP STUFF
! *****************************************************************
! For CreateColormap
@ -321,7 +321,7 @@ CONSTANT: CursorShape 0 ! largest size that can be displayed
CONSTANT: TileShape 1 ! size tiled fastest
CONSTANT: StippleShape 2 ! size stippled fastest
! *****************************************************************
! *****************************************************************
! * KEYBOARD/POINTER STUFF
! *****************************************************************
@ -352,7 +352,7 @@ CONSTANT: MappingKeyboard 1
CONSTANT: MappingPointer 2
! *****************************************************************
! * SCREEN SAVER STUFF
! * SCREEN SAVER STUFF
! *****************************************************************
CONSTANT: DontPreferBlanking 0
@ -385,7 +385,7 @@ CONSTANT: HostDelete 1
CONSTANT: EnableAccess 1
CONSTANT: DisableAccess 0
! Display classes used in opening the connection
! Display classes used in opening the connection
! Note that the statically allocated ones are even numbered and the
! dynamically changeable ones are odd numbered

View File

@ -94,7 +94,7 @@ CONSTANT: default-uuids-to-cache 100
: next-uuid ( server -- uuid )
ensure-uuids uuids>> pop ;
! db
! db
TUPLE: db { server server } { name string } ;
C: <db> db
@ -187,7 +187,7 @@ C: <db> db
! H{ } clone "name" pick set-at "content-type" pick set-at ;
!
! : add-attachment ( assoc name attachment -- )
! pick attachments> [ H{ } clone ] unless*
! pick attachments> [ H{ } clone ] unless*
!
! : attach ( assoc name content-type data -- )
! construct-attachment H{ } clone

View File

@ -29,7 +29,7 @@ IN: ctags.etags.tests
etag-vector =
] unit-test
! etag-pair
! etag-pair
{ t }
[
{ if 28 }

View File

@ -80,4 +80,4 @@ ERROR: not-a-string-number string ;
[ parent-directory make-directories ] keep ;
! : path>next-vnode-version-name ( path -- path' )
! [ file-name ]
! [ file-name ]

View File

@ -10,7 +10,7 @@ IN: images.atlas
! place first rect at x 0
! place rects that fit in remaining stripe
! pack stripes(y + height)
! if height > max height
! if height > max height
TUPLE: image-placement
{ image read-only }

View File

@ -29,7 +29,7 @@ IN: images.viewer.tests
! test that when changing the model, the gadget updates the texture.
! - same size images (both smaller than 512x512) (updates)
! test that when changing the model, the gadget creates a new texture.
! test different cases :
! test different cases :
! - same size images (both bigger than 512x512) (creates)
! - different size images (both smaller than 512x512) (creates)
! - different size images (both bigger than 512x512) (creates)

View File

@ -129,7 +129,7 @@ ERROR: add-permission-failed permission-set permission ;
acl-entry>flagset flagset>strings ;
! Acl, acl entry, principal, group,
! Acl, acl entry, principal, group,
! acl_get_qualifier, acl_get_tag_type, acl_get_flagset_np,
! acl_get_permset

View File

@ -368,7 +368,7 @@ SUBROUTINE: ZHPR2 ( CHARACTER*1 UPLO, INTEGER N,
DOUBLE-COMPLEX ALPHA, DOUBLE-COMPLEX(*) X, INTEGER INCX,
DOUBLE-COMPLEX(*) Y, INTEGER INCY, DOUBLE-COMPLEX(*) AP ) ;
! LEVEL 3 BLAS (MATRIX-MATRIX)
! LEVEL 3 BLAS (MATRIX-MATRIX)
SUBROUTINE: SGEMM ( CHARACTER*1 TRANSA,
CHARACTER*1 TRANSB, INTEGER M, INTEGER N,

View File

@ -14,7 +14,7 @@ DERIVATIVE: + [ 2drop ] [ 2drop ]
DERIVATIVE: - [ 2drop ] [ 2drop neg ]
DERIVATIVE: * [ nip * ] [ drop * ]
DERIVATIVE: / [ nip / ] [ sq / neg * ]
! Conditional checks if the epsilon-part of the exponent is
! Conditional checks if the epsilon-part of the exponent is
! 0 to avoid getting float answers for integer powers.
DERIVATIVE: ^ [ [ 1 - ^ ] keep * * ]
[ [ dup zero? ] 2dip [ 3drop 0 ] [ [ ^ ] keep log * * ] if ]

View File

@ -11,7 +11,7 @@ TUPLE: dual ordinary-part epsilon-part ;
C: <dual> dual
! Ordinary numbers implement the dual protocol by returning
! Ordinary numbers implement the dual protocol by returning
! themselves as the ordinary part, and 0 as the epsilon part.
M: number ordinary-part>> ;
@ -28,10 +28,10 @@ MACRO: ordinary-op ( word -- o )
[ input-length ] keep
'[ [ ordinary-part>> ] _ napply _ execute ] ;
! Takes N dual numbers <o1,e1> <o2,e2> ... <oN,eN> and weaves
! Takes N dual numbers <o1,e1> <o2,e2> ... <oN,eN> and weaves
! their ordinary and epsilon parts to produce
! e1 o1 o2 ... oN e2 o1 o2 ... oN ... eN o1 o2 ... oN
! This allows a set of partial derivatives each to be evaluated
! This allows a set of partial derivatives each to be evaluated
! at the same point.
MACRO: duals>nweave ( n -- )
dup dup dup

View File

@ -117,8 +117,8 @@ CONSTANT: logout-cmd
T{ mongodb-cmd f "logout" t f f H{ { "logout" 1 } } }
! Value: { "findandmodify" collection-name }
! Options: { { "query" selector } { "sort" sort-spec }
! { "remove" t/f } { "update" modified-object }
! Options: { { "query" selector } { "sort" sort-spec }
! { "remove" t/f } { "update" modified-object }
! { "new" t/f } }
CONSTANT: findandmodify-cmd
T{ mongodb-cmd f "findandmodify" f f f H{ { "findandmodify" f } } }

View File

@ -68,7 +68,7 @@ CONSTRUCTOR: <cond-value> cond-value ( value quot -- cond-value ) ;
} cond ;
: write-tuple-fields ( mirror tuple assoc quot: ( tuple -- assoc ) -- )
swap ! m t q q a
swap ! m t q q a
'[ _ 2over write-field?
[ _ write-field swap _ set-at ]
[ 2drop ] if

View File

@ -87,7 +87,7 @@ orig-timestamp recv-timestamp tx-timestamp ;
[ [ { 7 8 } ] dip nths (time) ] ! ref-timestamp
[ [ { 9 10 } ] dip nths (time) ] ! orig-timestamp
[ [ { 11 12 } ] dip nths (time) ] ! recv-timestamp
[ [ { 13 14 } ] dip nths (time) ] ! tx-timestamp
[ [ { 13 14 } ] dip nths (time) ] ! tx-timestamp
} cleave ntp boa
dup stratum>> '[ _ (ref-id) ] change-ref-id
[ dup (leap) 2array ] change-leap

View File

@ -1,7 +1,7 @@
! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
!
USING:
USING:
alien
alien.c-types
alien.libraries

View File

@ -1,7 +1,7 @@
! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
!
USING:
USING:
alien
alien.c-types
alien.libraries

View File

@ -1,7 +1,7 @@
! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
!
USING:
USING:
alien
alien.c-types
alien.libraries

View File

@ -1,7 +1,7 @@
! Copyright (C) 2008 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
!
USING: kernel tools.test peg peg.javascript.ast peg.javascript.parser
USING: kernel tools.test peg peg.javascript.ast peg.javascript.parser
accessors sequences math peg.ebnf peg.ebnf.private ;
IN: peg.javascript.parser.tests

View File

@ -1,7 +1,7 @@
! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
!
USING: kernel tools.test peg peg.ebnf peg.ebnf.private peg.pl0
USING: kernel tools.test peg peg.ebnf peg.ebnf.private peg.pl0
sequences accessors ;
IN: peg.pl0.tests

View File

@ -18,7 +18,7 @@ IN: pop3.server
! +OK Password required
! PASS password
! +OK Logged in
! STAT
! STAT
! +OK 2 1753
! LIST
! +OK 2 messages:

View File

@ -31,7 +31,7 @@ IN: project-euler.065
! 1 + - = - ; 1 + ----- = - ; 1 + --------- = -- ; 1 + ------------- = --
! 2 2 1 5 1 12 1 29
! 2 + - 2 + ----- 2 + ---------
! 2 1 1
! 2 1 1
! 2 + - 2 + -----
! 2 1
! 2 + -

View File

@ -7,7 +7,7 @@ regexp.combinators sequences sets splitting splitting.monotonic
unicode.case unicode.categories urls ;
IN: robots
! visit-time is GMT, request-rate is pages/second
! visit-time is GMT, request-rate is pages/second
! crawl-rate is seconds
SYMBOL: robot-identities

View File

@ -26,7 +26,7 @@ IN: rosetta-code.arithmetic-evaluation
! * Parentheses
! * Multiplication/Division (left to right)
! * Addition/Subtraction (left to right)
! * Addition/Subtraction (left to right)
TUPLE: operator left right ;
TUPLE: add < operator ; C: <add> add

View File

@ -34,7 +34,7 @@ M: sqrt2 cfrac-b
! Napier's constant
SINGLETON: napier
M: napier cfrac-a
! If n is 1, then a_n is 2, else a_n is n - 1.
! If n is 1, then a_n is 2, else a_n is n - 1.
drop { { 1 [ 2 ] } [ 1 - ] } case ;
M: napier cfrac-b
! If n is 1, then b_n is 1, else b_n is n - 1.

View File

@ -77,9 +77,9 @@ IN: rosetta-code.raycasting
! if Py = Ay or Py = By then
! Py ← Py + ε
! end if
! if Py < Ay or Py > By then
! if Py < Ay or Py > By then
! return false
! else if Px > max(Ax, Bx) then
! else if Px > max(Ax, Bx) then
! return false
! else
! if Px < min(Ax, Bx) then

View File

@ -6,7 +6,7 @@ taxes.usa.medicare taxes.usa taxes.usa.w4 ;
IN: taxes.usa.federal
! http://www.irs.gov/pub/irs-pdf/p15.pdf
! Table 7 ANNUAL Payroll Period
! Table 7 ANNUAL Payroll Period
: federal-single ( -- triples )
{