pick header>> set-at ;
: set-basic-auth ( request username password -- request )
- ":" glue >base64 "Basic " prepend "Authorization" set-header ;
-
+ ":" glue >base64 "Basic " "" prepend-as "Authorization" set-header ;
+
: <request> ( -- request )
request new
"1.1" >>version
GENERIC: >ber ( obj -- byte-array )
M: fixnum >ber ( n -- byte-array )
>128-ber dup length 2 swap 2array
- "cc" pack-native prepend ;
+ "cc" pack-native B{ } prepend-as ;
: >ber-enumerated ( n -- byte-array )
- >128-ber >byte-array dup length 10 swap 2array
- "CC" pack-native prepend ;
+ >128-ber dup length 10 swap 2array
+ "CC" pack-native B{ } prepend-as ;
: >ber-length-encoding ( n -- byte-array )
dup 127 <= [
1array "C" pack-be
] [
1array "I" pack-be 0 swap remove dup length
- 0x80 + 1array "C" pack-be prepend
+ 0x80 + 1array "C" pack-be B{ } prepend-as
] if ;
! =========================================================
! =========================================================
M: bignum >ber ( n -- byte-array )
- >128-ber >byte-array dup length
+ >128-ber dup length
dup 126 > [
"range error in bignum" throw
] [
- 2 swap 2array "CC" pack-native prepend
+ 2 swap 2array "CC" pack-native B{ } prepend-as
] if ;
! =========================================================
dup texture-uniform = [ drop 1 ] [ "uniform-tuple-texture-units" word-prop 0 or ] if ;
: all-uniform-tuple-slots ( class -- slots )
- dup "uniform-tuple-slots" word-prop
- [ swap superclass all-uniform-tuple-slots prepend ] [ drop { } ] if* ;
+ dup "uniform-tuple-slots" word-prop
+ [ [ superclass all-uniform-tuple-slots ] dip append ] [ drop { } ] if* ;
DEFER: uniform-texture-accessors
quot-prefix prepend
] 2map :> ( texture-unit' value-cleave )
- texture-unit'
+ texture-unit'
value>>-quot { value-cleave 2cleave } append ;
:: [bind-uniform] ( texture-unit uniform prefix -- texture-unit' quot )
IN: mason.report
: git-link ( id -- link )
- [ "http://github.com/slavapestov/factor/commit/" prepend ] keep
+ [ "http://github.com/slavapestov/factor/commit/" "" prepend-as ] keep
[XML <a href=<->><-></a> XML] ;
: common-report ( -- xml )
[
error [ error. ] with-string-writer :> error
file utf8 400 file-tail :> output
-
+
[XML
<h2><-what-></h2>
Build output:
test-all-vocabs-file
test-all-errors-file
error-dump
-
+
"Help lint failures"
help-lint-vocabs-file
help-lint-errors-file
} [ eval-file empty? ] all? ;
: success ( -- status )
- successful-report build-clean? status-clean status-dirty ? ;
\ No newline at end of file
+ successful-report build-clean? status-clean status-dirty ? ;