X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=base%2Ftables-examples.tct;h=37286adb6bcf5597d479aaa4dfbcb9534b59cedd;hb=bc152fdba00b88a09a1c263bc8ff8490099b7027;hp=581433499be1f53c54dc1b7c0189a3f1a83a7dac;hpb=d23a32272b954579fe15c78d6ea605e087d0a512;p=chiark-tcl.git diff --git a/base/tables-examples.tct b/base/tables-examples.tct index 5814334..37286ad 100644 --- a/base/tables-examples.tct +++ b/base/tables-examples.tct @@ -8,8 +8,8 @@ Fini hbv fini_hbv(ip, rc, &@); Type sockaddr: SockAddr_Value @ Init sockaddr sockaddr_clear(&@); -Type sockid: int @ -Init sockid @=-1; +Type sockid: DgramSockID @ +Type ulong: unsigned long @ H-Include "hbytes.h" @@ -28,6 +28,18 @@ Table hbytes HBytes_SubCommand h2raw hex hb => obj + ulong2h + value ulong + => hb + h2ulong + hex hb + => ulong + ushort2h + value ulong + => hb + h2ushort + hex hb + => ulong length v hb => int @@ -89,5 +101,12 @@ Table dgram_socket DgramSocket_SubCommand create local sockaddr => sockid -# transmit -# + close + sock sockid + transmit + sock sockid + data hb + remote sockaddr + on-receive + sock sockid + ?script obj