chiark
/
gitweb
/
~ian
/
chiark-tcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ulongs and ushorts
[chiark-tcl.git]
/
base
/
tables-examples.tct
diff --git
a/base/tables-examples.tct
b/base/tables-examples.tct
index 5115813ad127f13c2ea6d43ecad882f81d800049..37286adb6bcf5597d479aaa4dfbcb9534b59cedd 100644
(file)
--- a/
base/tables-examples.tct
+++ b/
base/tables-examples.tct
@@
-1,15
+1,25
@@
Type hb: HBytes_Value @
Init hb hbytes_sentinel(&@);
Type hb: HBytes_Value @
Init hb hbytes_sentinel(&@);
+
Type hbv: HBytes_Var @
Init hbv @.hb=0; @.obj=0; @.var=0;
Fini hbv fini_hbv(ip, rc, &@);
Type hbv: HBytes_Var @
Init hbv @.hb=0; @.obj=0; @.var=0;
Fini hbv fini_hbv(ip, rc, &@);
+Type sockaddr: SockAddr_Value @
+Init sockaddr sockaddr_clear(&@);
+
+Type sockid: DgramSockID @
+Type ulong: unsigned long @
+
H-Include "hbytes.h"
Untabled
hbytes
subcmd enum(HBytes_SubCommand, "hbytes subcommand")
obj ...
H-Include "hbytes.h"
Untabled
hbytes
subcmd enum(HBytes_SubCommand, "hbytes subcommand")
obj ...
+ dgram-socket
+ subcmd enum(DgramSocket_SubCommand,"dgram-socket subcommand")
+ obj ...
Table hbytes HBytes_SubCommand
raw2h
Table hbytes HBytes_SubCommand
raw2h
@@
-18,6
+28,18
@@
Table hbytes HBytes_SubCommand
h2raw
hex hb
=> obj
h2raw
hex hb
=> obj
+ ulong2h
+ value ulong
+ => hb
+ h2ulong
+ hex hb
+ => ulong
+ ushort2h
+ value ulong
+ => hb
+ h2ushort
+ hex hb
+ => ulong
length
v hb
=> int
length
v hb
=> int
@@
-68,3
+90,23
@@
Table hbytes HBytes_SubCommand
key obj
?maclen obj
=> hb
key obj
?maclen obj
=> hb
+ zeroes
+ length int
+ => hb
+ random
+ length int
+ => hb
+
+Table dgram_socket DgramSocket_SubCommand
+ create
+ local sockaddr
+ => sockid
+ close
+ sock sockid
+ transmit
+ sock sockid
+ data hb
+ remote sockaddr
+ on-receive
+ sock sockid
+ ?script obj