chiark / gitweb /
hbytes overwrite; hbytes repeat
[chiark-tcl.git] / base / tables-examples.tct
index 6bdc7ff4afc95966cbc0182826be367ce232524f..f2146a552c6dc23b1c3518ce7604a415c27ca09a 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
@@ -47,17 +79,22 @@ Table hbytes HBytes_SubCommand
                a       hb
                b       hb
                =>      int
+       range
+               v       hb
+               start   int
+               size    int
+               =>      hb
        prepend
                v       hbv
-               str     ...
+               ...     str
        append
                v       hbv
-               str     ...
+               ...     str
        rep-info
                v       obj
                =>      obj
        concat
-               str     ...
+               ...     str
                =>      hb
        unprepend
                v       hbv
@@ -71,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
@@ -94,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