Cleaning out newfx references

db4
Maxim Savchenko 2009-04-22 16:39:28 -04:00
parent 263f116a23
commit 553de434bb
2 changed files with 18 additions and 18 deletions

View File

@ -6,7 +6,7 @@ USING: kernel byte-arrays combinators strings arrays sequences splitting
io io.binary io.sockets io.encodings.binary io io.binary io.sockets io.encodings.binary
accessors accessors
combinators.smart combinators.smart
newfx assocs
; ;
IN: dns IN: dns
@ -148,8 +148,8 @@ SYMBOLS: NO-ERROR FORMAT-ERROR SERVER-FAILURE NAME-ERROR NOT-IMPLEMENTED
[ [
{ {
[ name>> dn->ba ] [ name>> dn->ba ]
[ type>> type-table of uint16->ba ] [ type>> type-table at uint16->ba ]
[ class>> class-table of uint16->ba ] [ class>> class-table at uint16->ba ]
} cleave } cleave
] output>array concat ; ] output>array concat ;
@ -203,8 +203,8 @@ SYMBOLS: NO-ERROR FORMAT-ERROR SERVER-FAILURE NAME-ERROR NOT-IMPLEMENTED
[ [
{ {
[ name>> dn->ba ] [ name>> dn->ba ]
[ type>> type-table of uint16->ba ] [ type>> type-table at uint16->ba ]
[ class>> class-table of uint16->ba ] [ class>> class-table at uint16->ba ]
[ ttl>> uint32->ba ] [ ttl>> uint32->ba ]
[ [
[ type>> ] [ rdata>> ] bi rdata->ba [ type>> ] [ rdata>> ] bi rdata->ba
@ -219,13 +219,13 @@ SYMBOLS: NO-ERROR FORMAT-ERROR SERVER-FAILURE NAME-ERROR NOT-IMPLEMENTED
[ [
{ {
[ qr>> 15 shift ] [ qr>> 15 shift ]
[ opcode>> opcode-table of 11 shift ] [ opcode>> opcode-table at 11 shift ]
[ aa>> 10 shift ] [ aa>> 10 shift ]
[ tc>> 9 shift ] [ tc>> 9 shift ]
[ rd>> 8 shift ] [ rd>> 8 shift ]
[ ra>> 7 shift ] [ ra>> 7 shift ]
[ z>> 4 shift ] [ z>> 4 shift ]
[ rcode>> rcode-table of 0 shift ] [ rcode>> rcode-table at 0 shift ]
} cleave } cleave
] sum-outputs uint16->ba ; ] sum-outputs uint16->ba ;
@ -301,8 +301,8 @@ SYMBOLS: NO-ERROR FORMAT-ERROR SERVER-FAILURE NAME-ERROR NOT-IMPLEMENTED
[ get-name ] [ get-name ]
[ [
skip-name skip-name
[ 0 + get-double type-table key-of ] [ 0 + get-double type-table value-at ]
[ 2 + get-double class-table key-of ] [ 2 + get-double class-table value-at ]
2bi 2bi
] ]
2bi query boa ; 2bi query boa ;
@ -364,10 +364,10 @@ SYMBOLS: NO-ERROR FORMAT-ERROR SERVER-FAILURE NAME-ERROR NOT-IMPLEMENTED
[ [
skip-name skip-name
{ {
[ 0 + get-double type-table key-of ] [ 0 + get-double type-table value-at ]
[ 2 + get-double class-table key-of ] [ 2 + get-double class-table value-at ]
[ 4 + get-quad ] [ 4 + get-quad ]
[ [ 10 + ] [ get-double type-table key-of ] 2bi get-rdata ] [ [ 10 + ] [ get-double type-table value-at ] 2bi get-rdata ]
} }
2cleave 2cleave
] ]
@ -393,13 +393,13 @@ SYMBOLS: NO-ERROR FORMAT-ERROR SERVER-FAILURE NAME-ERROR NOT-IMPLEMENTED
get-double get-double
{ {
[ 15 >> BIN: 1 bitand ] [ 15 >> BIN: 1 bitand ]
[ 11 >> BIN: 111 bitand opcode-table key-of ] [ 11 >> BIN: 111 bitand opcode-table value-at ]
[ 10 >> BIN: 1 bitand ] [ 10 >> BIN: 1 bitand ]
[ 9 >> BIN: 1 bitand ] [ 9 >> BIN: 1 bitand ]
[ 8 >> BIN: 1 bitand ] [ 8 >> BIN: 1 bitand ]
[ 7 >> BIN: 1 bitand ] [ 7 >> BIN: 1 bitand ]
[ 4 >> BIN: 111 bitand ] [ 4 >> BIN: 111 bitand ]
[ BIN: 1111 bitand rcode-table key-of ] [ BIN: 1111 bitand rcode-table value-at ]
} }
cleave ; cleave ;
@ -484,7 +484,7 @@ SYMBOLS: NO-ERROR FORMAT-ERROR SERVER-FAILURE NAME-ERROR NOT-IMPLEMENTED
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: message-query ( message -- query ) question-section>> 1st ; : message-query ( message -- query ) question-section>> first ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

View File

@ -1,6 +1,6 @@
USING: kernel combinators sequences splitting math USING: kernel combinators sequences splitting math
io.files io.encodings.utf8 random newfx dns.util ; io.files io.encodings.utf8 random dns.util ;
IN: dns.misc IN: dns.misc
@ -9,8 +9,8 @@ IN: dns.misc
: resolv-conf-servers ( -- seq ) : resolv-conf-servers ( -- seq )
"/etc/resolv.conf" utf8 file-lines "/etc/resolv.conf" utf8 file-lines
[ " " split ] map [ " " split ] map
[ 1st "nameserver" = ] filter [ first "nameserver" = ] filter
[ 2nd ] map ; [ second ] map ;
: resolv-conf-server ( -- ip ) resolv-conf-servers random ; : resolv-conf-server ( -- ip ) resolv-conf-servers random ;