chiark / gitweb /
hbytes overwrite; hbytes repeat
[chiark-tcl.git] / base / tables-examples.tct
index b5a104b..f2146a5 100644 (file)
@@ -13,13 +13,45 @@ Type ulong:                 unsigned long @
 
 H-Include      "hbytes.h"
 
-Untabled
+Table toplevel TopLevel_Command
        hbytes
                subcmd  enum(HBytes_SubCommand, "hbytes subcommand")
-               obj     ...
+               ...     obj
        dgram-socket
-               subcmd enum(DgramSocket_SubCommand,"dgram-socket subcommand")
-               obj     ...
+               subcmd  enum(DgramSocket_SubCommand,"dgram-socket subcommand")
+               ...     obj
+       ulong
+               subcmd  enum(ULong_SubCommand,"ulong subcommand")
+               ...     obj
+
+Table ulong ULong_SubCommand
+       shift
+               right   charfrom("lr", "shift direction")
+               v       ulong
+               bits    int
+               =>      ulong
+       mask
+               a       ulong
+               b       ulong
+               =>      ulong
+       compare
+               a       ulong
+               b       ulong
+               =>      int
+       ul2int
+               v       ulong
+               =>      int
+       int2ul
+               v       int
+               =>      ulong
+       ul2bitfields
+               value   ulong
+               ...     obj
+               =>      int
+       bitfields2ul
+               base    ulong
+               ...     obj
+               =>      ulong
 
 Table hbytes HBytes_SubCommand
        raw2h
@@ -54,15 +86,15 @@ Table hbytes HBytes_SubCommand
                =>      hb
        prepend
                v       hbv
-               str     ...
+               ...     str
        append
                v       hbv
-               str     ...
+               ...     str
        rep-info
                v       obj
                =>      obj
        concat
-               str     ...
+               ...     str
                =>      hb
        unprepend
                v       hbv
@@ -76,6 +108,20 @@ Table hbytes HBytes_SubCommand
                v       hbv
                length  int
                =>      hb
+       overwrite
+               v       hbv
+               start   int
+               sub     hb
+       zeroes
+               length  int
+               =>      hb
+       repeat
+               v       hb
+               count   int
+               =>      hb
+       random
+               length  int
+               =>      hb
        pkcs5
                meth    enum(PadMethod, "hbytes pad subcommand")
                v       hbv
@@ -99,12 +145,6 @@ Table hbytes HBytes_SubCommand
                key     obj
                ?maclen obj
                =>      hb
-       zeroes
-               length  int
-               =>      hb
-       random
-               length  int
-               =>      hb
 
 Table dgram_socket DgramSocket_SubCommand
        create