basis: whitespace commit
parent
6e1c2ecc6c
commit
dc1cb5b7d1
|
@ -4,4 +4,3 @@ IN: bit-vectors.prettyprint
|
||||||
M: bit-vector >pprint-sequence ;
|
M: bit-vector >pprint-sequence ;
|
||||||
M: bit-vector pprint-delims drop \ \?V{ \ \} ;
|
M: bit-vector pprint-delims drop \ \?V{ \ \} ;
|
||||||
M: bit-vector pprint* pprint-object ;
|
M: bit-vector pprint* pprint-object ;
|
||||||
|
|
||||||
|
|
|
@ -7,5 +7,5 @@ M: freebsd init-io ( -- )
|
||||||
|
|
||||||
freebsd set-io-backend
|
freebsd set-io-backend
|
||||||
|
|
||||||
[ start-signal-pipe-thread ]
|
[ start-signal-pipe-thread ]
|
||||||
"io.backend.unix:signal-pipe-thread" add-startup-hook
|
"io.backend.unix:signal-pipe-thread" add-startup-hook
|
||||||
|
|
|
@ -213,7 +213,7 @@ IMPORT: NSAttributedString
|
||||||
0 0 <NSRange> :> effective-range
|
0 0 <NSRange> :> effective-range
|
||||||
text send: string CFString>string :> str
|
text send: string CFString>string :> str
|
||||||
str utf16n encode :> byte-16n
|
str utf16n encode :> byte-16n
|
||||||
0 :> cp-loc!
|
0 :> cp-loc!
|
||||||
"NSMarkedClauseSegment" <NSString> :> segment-attr
|
"NSMarkedClauseSegment" <NSString> :> segment-attr
|
||||||
[ effective-range [ location>> ] [ length>> ] bi + text-length < ] [
|
[ effective-range [ location>> ] [ length>> ] bi + text-length < ] [
|
||||||
text
|
text
|
||||||
|
@ -231,8 +231,8 @@ IMPORT: NSAttributedString
|
||||||
[ str swap >codepoint-index ] bi@ swap - :> len
|
[ str swap >codepoint-index ] bi@ swap - :> len
|
||||||
cp-loc cp-loc len + dup cp-loc!
|
cp-loc cp-loc len + dup cp-loc!
|
||||||
2array thickness 2array
|
2array thickness 2array
|
||||||
suffix underlines!
|
suffix underlines!
|
||||||
] while
|
] while
|
||||||
underlines length 1 = [
|
underlines length 1 = [
|
||||||
underlines first first 2 2array 1array ! thickness: 2
|
underlines first first 2 2array 1array ! thickness: 2
|
||||||
] [ underlines ] if ;
|
] [ underlines ] if ;
|
||||||
|
@ -242,7 +242,7 @@ IMPORT: NSAttributedString
|
||||||
replacementRange length>> NSNotFound = not and [ ! erase this line
|
replacementRange length>> NSNotFound = not and [ ! erase this line
|
||||||
gadget editor-caret first
|
gadget editor-caret first
|
||||||
dup gadget editor-line
|
dup gadget editor-line
|
||||||
[
|
[
|
||||||
replacementRange length>> ! location>>
|
replacementRange length>> ! location>>
|
||||||
>codepoint-index
|
>codepoint-index
|
||||||
2array gadget set-caret
|
2array gadget set-caret
|
||||||
|
@ -272,9 +272,9 @@ IMPORT: NSAttributedString
|
||||||
[ str swap >codepoint-index ] bi@ -
|
[ str swap >codepoint-index ] bi@ -
|
||||||
2array v+
|
2array v+
|
||||||
dup gadget preedit-selected-end<<
|
dup gadget preedit-selected-end<<
|
||||||
dup gadget set-caret gadget set-mark
|
dup gadget set-caret gadget set-mark
|
||||||
gadget preedit-start>> gadget preedit-end>> = [
|
gadget preedit-start>> gadget preedit-end>> = [
|
||||||
gadget remove-preedit-info
|
gadget remove-preedit-info
|
||||||
] when ;
|
] when ;
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
@ -463,33 +463,33 @@ PRIVATE>
|
||||||
window [
|
window [
|
||||||
"" clone :> str!
|
"" clone :> str!
|
||||||
text NSString send: class send: isKindOfClass: 0 = not [
|
text NSString send: class send: isKindOfClass: 0 = not [
|
||||||
text CFString>string str!
|
text CFString>string str!
|
||||||
] [
|
] [
|
||||||
text send: string CFString>string str!
|
text send: string CFString>string str!
|
||||||
] if
|
] if
|
||||||
window world-focus :> gadget
|
window world-focus :> gadget
|
||||||
gadget [
|
gadget [
|
||||||
gadget support-input-methods? [
|
gadget support-input-methods? [
|
||||||
replacementRange location>> NSNotFound = [
|
replacementRange location>> NSNotFound = [
|
||||||
gadget editor-caret first
|
gadget editor-caret first
|
||||||
dup gadget editor-line
|
dup gadget editor-line
|
||||||
[
|
[
|
||||||
replacementRange location>> >codepoint-index
|
replacementRange location>> >codepoint-index
|
||||||
2array gadget set-caret
|
2array gadget set-caret
|
||||||
] [
|
] [
|
||||||
replacementRange [ location>> ] [ length>> ] bi +
|
replacementRange [ location>> ] [ length>> ] bi +
|
||||||
>codepoint-index
|
>codepoint-index
|
||||||
2array gadget set-mark
|
2array gadget set-mark
|
||||||
] 2bi
|
] 2bi
|
||||||
] unless
|
] unless
|
||||||
gadget preedit? [
|
gadget preedit? [
|
||||||
gadget [ remove-preedit-text ] [ remove-preedit-info ] bi
|
gadget [ remove-preedit-text ] [ remove-preedit-info ] bi
|
||||||
str gadget user-input* drop
|
str gadget user-input* drop
|
||||||
f gadget preedit-selection-mode?<<
|
f gadget preedit-selection-mode?<<
|
||||||
] [
|
] [
|
||||||
str window user-input
|
str window user-input
|
||||||
] if
|
] if
|
||||||
] [
|
] [
|
||||||
str window user-input
|
str window user-input
|
||||||
] if
|
] if
|
||||||
] when
|
] when
|
||||||
|
@ -506,14 +506,14 @@ PRIVATE>
|
||||||
] [ 0 ] if
|
] [ 0 ] if
|
||||||
] ;
|
] ;
|
||||||
|
|
||||||
COCOA-METHOD: NSRange markedRange [
|
COCOA-METHOD: NSRange markedRange [
|
||||||
self window :> window
|
self window :> window
|
||||||
window [
|
window [
|
||||||
window world-focus :> gadget
|
window world-focus :> gadget
|
||||||
gadget [
|
gadget [
|
||||||
gadget preedit? [
|
gadget preedit? [
|
||||||
gadget [ preedit-start>> second ] [ preedit-end>> second ] bi >= [
|
gadget [ preedit-start>> second ] [ preedit-end>> second ] bi >= [
|
||||||
NSNotFound 0
|
NSNotFound 0
|
||||||
] [
|
] [
|
||||||
gadget preedit-start>> first gadget editor-line :> str
|
gadget preedit-start>> first gadget editor-line :> str
|
||||||
gadget
|
gadget
|
||||||
|
@ -538,23 +538,23 @@ PRIVATE>
|
||||||
str
|
str
|
||||||
gadget
|
gadget
|
||||||
[ preedit-selected-start>> second ]
|
[ preedit-selected-start>> second ]
|
||||||
[ preedit-start>> second ]
|
[ preedit-start>> second ]
|
||||||
bi - >utf16-index ! location
|
bi - >utf16-index ! location
|
||||||
gadget
|
gadget
|
||||||
[ preedit-selected-end>> second ]
|
[ preedit-selected-end>> second ]
|
||||||
[ preedit-selected-start>> second ]
|
[ preedit-selected-start>> second ]
|
||||||
bi [ str swap >utf16-index ] bi@ - ! length
|
bi [ str swap >utf16-index ] bi@ - ! length
|
||||||
] [
|
] [
|
||||||
str gadget editor-caret second >utf16-index 0
|
str gadget editor-caret second >utf16-index 0
|
||||||
] if
|
] if
|
||||||
] [ 0 0 ] if
|
] [ 0 0 ] if
|
||||||
] [ 0 0 ] if
|
] [ 0 0 ] if
|
||||||
] [ 0 0 ] if
|
] [ 0 0 ] if
|
||||||
<NSRange>
|
<NSRange>
|
||||||
] ;
|
] ;
|
||||||
|
|
||||||
COCOA-METHOD: void setMarkedText: id text selectedRange: NSRange selectedRange
|
COCOA-METHOD: void setMarkedText: id text selectedRange: NSRange selectedRange
|
||||||
replacementRange: NSRange replacementRange [
|
replacementRange: NSRange replacementRange [
|
||||||
self window :> window
|
self window :> window
|
||||||
window [
|
window [
|
||||||
window world-focus :> gadget
|
window world-focus :> gadget
|
||||||
|
@ -562,9 +562,9 @@ PRIVATE>
|
||||||
{ } clone :> underlines!
|
{ } clone :> underlines!
|
||||||
"" clone :> str!
|
"" clone :> str!
|
||||||
text NSString send: class send: isKindOfClass: 0 = not [
|
text NSString send: class send: isKindOfClass: 0 = not [
|
||||||
text CFString>string str!
|
text CFString>string str!
|
||||||
] [
|
] [
|
||||||
text send: string CFString>string str!
|
text send: string CFString>string str!
|
||||||
gadget support-input-methods? [
|
gadget support-input-methods? [
|
||||||
gadget text selectedRange make-preedit-underlines underlines!
|
gadget text selectedRange make-preedit-underlines underlines!
|
||||||
] when
|
] when
|
||||||
|
@ -574,10 +574,10 @@ PRIVATE>
|
||||||
underlines gadget preedit-underlines<<
|
underlines gadget preedit-underlines<<
|
||||||
] when
|
] when
|
||||||
] when
|
] when
|
||||||
] when
|
] when
|
||||||
] ;
|
] ;
|
||||||
|
|
||||||
COCOA-METHOD: void unmarkText [
|
COCOA-METHOD: void unmarkText [
|
||||||
self window :> window
|
self window :> window
|
||||||
window [
|
window [
|
||||||
window world-focus :> gadget
|
window world-focus :> gadget
|
||||||
|
@ -598,7 +598,7 @@ PRIVATE>
|
||||||
] when
|
] when
|
||||||
] ;
|
] ;
|
||||||
|
|
||||||
COCOA-METHOD: id validAttributesForMarkedText [
|
COCOA-METHOD: id validAttributesForMarkedText [
|
||||||
NSArray "NSMarkedClauseSegment" <NSString> send: \arrayWithObject:
|
NSArray "NSMarkedClauseSegment" <NSString> send: \arrayWithObject:
|
||||||
] ;
|
] ;
|
||||||
|
|
||||||
|
@ -614,10 +614,10 @@ PRIVATE>
|
||||||
window world-focus :> gadget
|
window world-focus :> gadget
|
||||||
gadget [
|
gadget [
|
||||||
gadget support-input-methods? [
|
gadget support-input-methods? [
|
||||||
gadget editor-caret first gadget editor-line :> str
|
gadget editor-caret first gadget editor-line :> str
|
||||||
str aRange location>> >codepoint-index :> start-pos
|
str aRange location>> >codepoint-index :> start-pos
|
||||||
gadget editor-caret first start-pos 2array gadget loc>x
|
gadget editor-caret first start-pos 2array gadget loc>x
|
||||||
gadget caret-loc second gadget caret-dim second +
|
gadget caret-loc second gadget caret-dim second +
|
||||||
2array ! character pos
|
2array ! character pos
|
||||||
gadget screen-loc v+ ! + gadget pos
|
gadget screen-loc v+ ! + gadget pos
|
||||||
{ 1 -1 } v*
|
{ 1 -1 } v*
|
||||||
|
|
|
@ -178,10 +178,10 @@ M: editor ungraft*
|
||||||
editor [ caret-loc second ] [ caret-dim second ] bi + 2.0 - :> y
|
editor [ caret-loc second ] [ caret-dim second ] bi + 2.0 - :> y
|
||||||
editor editor-caret first :> row
|
editor editor-caret first :> row
|
||||||
editor font>> foreground>> gl-color
|
editor font>> foreground>> gl-color
|
||||||
editor preedit-underlines>> [
|
editor preedit-underlines>> [
|
||||||
GL_LINE_BIT [
|
GL_LINE_BIT [
|
||||||
dup second glLineWidth
|
dup second glLineWidth
|
||||||
first editor preedit-start>> second dup 2array v+ first2
|
first editor preedit-start>> second dup 2array v+ first2
|
||||||
[ row swap 2array editor loc>x 1.0 + y 2array ]
|
[ row swap 2array editor loc>x 1.0 + y 2array ]
|
||||||
[ row swap 2array editor loc>x 1.0 - y 2array ]
|
[ row swap 2array editor loc>x 1.0 - y 2array ]
|
||||||
bi*
|
bi*
|
||||||
|
|
|
@ -54,7 +54,7 @@ M:: core-text-renderer x>offset ( x font string -- n )
|
||||||
utf16n decode length ;
|
utf16n decode length ;
|
||||||
|
|
||||||
M:: core-text-renderer offset>x ( n font string -- x )
|
M:: core-text-renderer offset>x ( n font string -- x )
|
||||||
font string cached-line line>>
|
font string cached-line line>>
|
||||||
0 n string subseq utf16n encode length 2 / >integer
|
0 n string subseq utf16n encode length 2 / >integer
|
||||||
f
|
f
|
||||||
CTLineGetOffsetForStringIndex unscale ;
|
CTLineGetOffsetForStringIndex unscale ;
|
||||||
|
|
|
@ -80,7 +80,7 @@ CATEGORY: grapheme-control Zl Zp Cc Cf ;
|
||||||
CATEGORY: spacing Mc ;
|
CATEGORY: spacing Mc ;
|
||||||
|
|
||||||
: regional? ( ch -- ? )
|
: regional? ( ch -- ? )
|
||||||
"Regional_Indicator" property? ;
|
"Regional_Indicator" property? ;
|
||||||
>>
|
>>
|
||||||
|
|
||||||
: modifier? ( ch -- ? ) emoji-modifier-table interval-key? ; inline
|
: modifier? ( ch -- ? ) emoji-modifier-table interval-key? ; inline
|
||||||
|
@ -99,10 +99,10 @@ CATEGORY: spacing Mc ;
|
||||||
[ modifier? ]
|
[ modifier? ]
|
||||||
tri or or not
|
tri or or not
|
||||||
] find-last drop [ swap ?nth ] [ last ] if*
|
] find-last drop [ swap ?nth ] [ last ] if*
|
||||||
extended-pictographic-table interval-key? [
|
extended-pictographic-table interval-key? [
|
||||||
(Extended_Pictographic-Extend*-)ZWJ
|
(Extended_Pictographic-Extend*-)ZWJ
|
||||||
] [ ZWJ ] if
|
] [ ZWJ ] if
|
||||||
] when
|
] when
|
||||||
] }
|
] }
|
||||||
{ [ dup extend? ] [ drop Extend ] }
|
{ [ dup extend? ] [ drop Extend ] }
|
||||||
{ [ dup modifier? ] [ drop Extend ] }
|
{ [ dup modifier? ] [ drop Extend ] }
|
||||||
|
@ -110,7 +110,7 @@ CATEGORY: spacing Mc ;
|
||||||
interval-key? [ Any ] [ SpacingMark ] if ] }
|
interval-key? [ Any ] [ SpacingMark ] if ] }
|
||||||
{ [ dup loe? ] [ drop Prepend ] }
|
{ [ dup loe? ] [ drop Prepend ] }
|
||||||
{ [ dup regional? ] [
|
{ [ dup regional? ] [
|
||||||
drop
|
drop
|
||||||
f :> ri-even?!
|
f :> ri-even?!
|
||||||
str unclip-last-slice drop [
|
str unclip-last-slice drop [
|
||||||
regional? [ ri-even? not ri-even?! f ] [ t ] if
|
regional? [ ri-even? not ri-even?! f ] [ t ] if
|
||||||
|
@ -338,7 +338,7 @@ define-constant
|
||||||
{ check-Extended_Pictographic
|
{ check-Extended_Pictographic
|
||||||
[ swap ?nth extended-pictographic-table interval-key? ] }
|
[ swap ?nth extended-pictographic-table interval-key? ] }
|
||||||
{ check-RI-pair [
|
{ check-RI-pair [
|
||||||
2drop
|
2drop
|
||||||
f :> ri-even?!
|
f :> ri-even?!
|
||||||
i str [
|
i str [
|
||||||
regional? [ ri-even? not ri-even?! f ] [ t ] if
|
regional? [ ri-even? not ri-even?! f ] [ t ] if
|
||||||
|
|
|
@ -82,5 +82,3 @@ CONSTANT: AI_PASSIVE 1
|
||||||
CONSTANT: SEEK_SET 0
|
CONSTANT: SEEK_SET 0
|
||||||
CONSTANT: SEEK_CUR 1
|
CONSTANT: SEEK_CUR 1
|
||||||
CONSTANT: SEEK_END 2
|
CONSTANT: SEEK_END 2
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -49,4 +49,3 @@ CONSTANT: SO_SNDTIMEO 0x1005
|
||||||
CONSTANT: SO_RCVTIMEO 0x1006
|
CONSTANT: SO_RCVTIMEO 0x1006
|
||||||
CONSTANT: SO_ERROR 0x1007
|
CONSTANT: SO_ERROR 0x1007
|
||||||
CONSTANT: SO_TYPE 0x1008
|
CONSTANT: SO_TYPE 0x1008
|
||||||
|
|
||||||
|
|
|
@ -8,5 +8,5 @@ CONSTANT: MNT_LAZY 3 ! push data not written by filesystem syncer
|
||||||
CONSTANT: MNT_SUSPEND 4 ! suspend file system after sync
|
CONSTANT: MNT_SUSPEND 4 ! suspend file system after sync
|
||||||
|
|
||||||
|
|
||||||
FUNCTION: int getfsstat ( statfs* buf, long bufsize, int flags )
|
FUNCTION: int getfsstat ( statfs* buf, long bufsize, int flags )
|
||||||
FUNCTION: int getmntinfo ( statfs **mntbufp, int flags )
|
FUNCTION: int getmntinfo ( statfs **mntbufp, int flags )
|
||||||
|
|
|
@ -7,7 +7,7 @@ STRUCT: kevent
|
||||||
{ flags ushort }
|
{ flags ushort }
|
||||||
{ fflags uint }
|
{ fflags uint }
|
||||||
{ data __int64_t }
|
{ data __int64_t }
|
||||||
{ udata void* }
|
{ udata void* }
|
||||||
{ ext __uint64_t[4] } ;
|
{ ext __uint64_t[4] } ;
|
||||||
|
|
||||||
FUNCTION-ALIAS: kevent-func int kevent ( int kq, kevent* changelist, int nchanges, kevent* eventlist, int nevents, timespec* timeout )
|
FUNCTION-ALIAS: kevent-func int kevent ( int kq, kevent* changelist, int nchanges, kevent* eventlist, int nevents, timespec* timeout )
|
||||||
|
@ -28,4 +28,3 @@ CONSTANT: EVFILT_USER -11 ! user events
|
||||||
CONSTANT: EVFILT_SENDFILE -12 ! attached to sendfile requests
|
CONSTANT: EVFILT_SENDFILE -12 ! attached to sendfile requests
|
||||||
CONSTANT: EVFILT_EMPTY -13 ! empty send socket buf
|
CONSTANT: EVFILT_EMPTY -13 ! empty send socket buf
|
||||||
CONSTANT: EVFILT_SYSCOUNT 13
|
CONSTANT: EVFILT_SYSCOUNT 13
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ STRUCT: stat
|
||||||
{ st_gen __uint64_t }
|
{ st_gen __uint64_t }
|
||||||
{ st_spare __int64_t[10] } ;
|
{ st_spare __int64_t[10] } ;
|
||||||
|
|
||||||
FUNCTION-ALIAS: stat-func int stat ( c-string pathname, stat* buf )
|
FUNCTION-ALIAS: stat-func int stat ( c-string pathname, stat* buf )
|
||||||
FUNCTION: int lstat ( c-string pathname, stat* buf )
|
FUNCTION: int lstat ( c-string pathname, stat* buf )
|
||||||
FUNCTION: int fstat ( int fd, stat* buf )
|
FUNCTION: int fstat ( int fd, stat* buf )
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ STRUCT: statfs
|
||||||
{ f_mntfromname { char MNAMELEN } }
|
{ f_mntfromname { char MNAMELEN } }
|
||||||
{ f_mntonname { char MNAMELEN } } ;
|
{ f_mntonname { char MNAMELEN } } ;
|
||||||
|
|
||||||
FUNCTION-ALIAS: statfs-func int statfs ( c-string path, statfs* buf )
|
FUNCTION-ALIAS: statfs-func int statfs ( c-string path, statfs* buf )
|
||||||
CONSTANT: MNT_WAIT 1 ! synchronously wait for I/O to complete
|
CONSTANT: MNT_WAIT 1 ! synchronously wait for I/O to complete
|
||||||
CONSTANT: MNT_NOWAIT 2 ! start all I/O, but do not wait for it
|
CONSTANT: MNT_NOWAIT 2 ! start all I/O, but do not wait for it
|
||||||
|
|
||||||
|
|
|
@ -21,4 +21,3 @@ CONSTANT: ST_RDONLY 1 ! Read-only file system
|
||||||
CONSTANT: ST_NOSUID 2 ! Does not honor setuid/setgid
|
CONSTANT: ST_NOSUID 2 ! Does not honor setuid/setgid
|
||||||
|
|
||||||
FUNCTION-ALIAS: statvfs-func int statvfs ( c-string path, statvfs* buf )
|
FUNCTION-ALIAS: statvfs-func int statvfs ( c-string path, statvfs* buf )
|
||||||
|
|
||||||
|
|
|
@ -22,4 +22,3 @@ TYPEDEF: int pid_t
|
||||||
TYPEDEF: long time_t
|
TYPEDEF: long time_t
|
||||||
TYPEDEF: __uint64_t fsblkcnt_t
|
TYPEDEF: __uint64_t fsblkcnt_t
|
||||||
TYPEDEF: __uint64_t fsfilcnt_t
|
TYPEDEF: __uint64_t fsfilcnt_t
|
||||||
|
|
||||||
|
|
|
@ -427,4 +427,3 @@ MACOS>
|
||||||
|
|
||||||
: with-dns-servers ( servers quot -- )
|
: with-dns-servers ( servers quot -- )
|
||||||
[ dns-servers ] dip with-variable ; inline
|
[ dns-servers ] dip with-variable ; inline
|
||||||
|
|
||||||
|
|
|
@ -61,4 +61,4 @@ TUPLE: hashtag < lexed object ;
|
||||||
CONSTRUCTOR: <hashtag> hashtag ( object -- obj ) ;
|
CONSTRUCTOR: <hashtag> hashtag ( object -- obj ) ;
|
||||||
|
|
||||||
TUPLE: token < lexed name ;
|
TUPLE: token < lexed name ;
|
||||||
CONSTRUCTOR: <token> token ( name -- obj ) ;
|
CONSTRUCTOR: <token> token ( name -- obj ) ;
|
||||||
|
|
Loading…
Reference in New Issue