minor cleanups
parent
e54b7b10a5
commit
6a4062bf38
|
@ -78,7 +78,7 @@ SYMBOL: K
|
|||
K get nth ,
|
||||
A get 5 bitroll-32 ,
|
||||
E get ,
|
||||
] { } make sum 4294967295 bitand ; inline
|
||||
] { } make sum >32-bit ; inline
|
||||
|
||||
: set-vars ( temp -- )
|
||||
! E = D; D = C; C = S^30(B); B = A; A = TEMP;
|
||||
|
|
|
@ -17,7 +17,7 @@ TUPLE: sniffer-spec path ifname ;
|
|||
C: <sniffer-spec> sniffer-spec
|
||||
|
||||
: IOCPARM_MASK HEX: 1fff ; inline
|
||||
: IOCPARM_MAX IOCPARM_MASK 1 + ; inline
|
||||
: IOCPARM_MAX IOCPARM_MASK 1+ ; inline
|
||||
: IOC_VOID HEX: 20000000 ; inline
|
||||
: IOC_OUT HEX: 40000000 ; inline
|
||||
: IOC_IN HEX: 80000000 ; inline
|
||||
|
|
|
@ -9,7 +9,7 @@ IN: io.sniffer.filter.bsd
|
|||
|
||||
: bpf-align ( n -- n' )
|
||||
#! Align to next higher word size
|
||||
"long" heap-size 1- [ + ] keep bitnot bitand ;
|
||||
"long" heap-size align ;
|
||||
|
||||
M: unix-io packet. ( string -- )
|
||||
18 cut swap >byte-array bpfh.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
USING: arrays kernel sequences vectors math math.vectors namespaces
|
||||
shuffle splitting ;
|
||||
shuffle splitting sequences.lib ;
|
||||
IN: math.polynomials
|
||||
|
||||
! Polynomials are vectors with the highest powers on the right:
|
||||
|
@ -22,7 +22,7 @@ PRIVATE>
|
|||
: p= ( p p -- ? ) pextend = ;
|
||||
|
||||
: ptrim ( p -- p )
|
||||
dup length 1 = [ [ zero? ] right-trim ] unless ;
|
||||
dup singleton? [ [ zero? ] right-trim ] unless ;
|
||||
|
||||
: 2ptrim ( p p -- p p ) [ ptrim ] 2apply ;
|
||||
: p+ ( p p -- p ) pextend v+ ;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
USING: kernel namespaces
|
||||
math math.constants math.functions math.matrices math.vectors
|
||||
sequences splitting self ;
|
||||
sequences splitting self math.trig ;
|
||||
|
||||
IN: ori
|
||||
|
||||
|
@ -11,13 +11,6 @@ C: <ori> ori
|
|||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
! Temporarily defined here until math-contrib gets moved to extra/
|
||||
|
||||
: deg>rad pi * 180 / ; inline
|
||||
: rad>deg 180 * pi / ; inline
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
: ori> ( -- val ) self> ori-val ;
|
||||
|
||||
: >ori ( val -- ) self> set-ori-val ;
|
||||
|
|
Loading…
Reference in New Issue