chiark / gitweb /
Many bugfixes.
[chiark-tcl.git] / base / tables-examples.tct
index c130136bc094ba3079aa276d07cd5ce824fb0fb5..5a1859dfdaa602975ffcac79853c547fc5ab8856 100644 (file)
@@ -2,14 +2,15 @@ Type hb:                      HBytes_Value @
 Init hb                                hbytes_sentinel(&@);
 
 Type hbv:                      HBytes_Var @
-Init hbv                       @.hb=0; @.obj=0; @.var=0;
+Init hbv                       @.hb=0; @.obj=0; @.var=0; @.copied=0;
 Fini hbv                       fini_hbv(ip, rc, &@);
 
 Type sockaddr:                 SockAddr_Value @
 Init sockaddr                  sockaddr_clear(&@);
 
 Type sockid:                   DgramSockID @
-Type ulong:                    unsigned long @
+Type ulong:                    uint32_t @
+Type long:                     long @
 
 H-Include      "hbytes.h"
 
@@ -25,24 +26,36 @@ Table toplevel TopLevel_Command
                ...     obj
 
 Table ulong ULong_SubCommand
-       shift
-               right   charfrom("lr", "shift direction")
+       ul2int
                v       ulong
-               bits    int
+               =>      int
+       int2ul
+               v       int
                =>      ulong
        mask
                a       ulong
                b       ulong
                =>      ulong
+       add
+               a       ulong
+               b       ulong
+               =>      ulong
+       multiply
+               a       ulong
+               b       ulong
+               =>      ulong
+       subtract
+               a       ulong
+               b       ulong
+               =>      ulong
        compare
                a       ulong
                b       ulong
                =>      int
-       ul2int
+       shift
+               right   charfrom("lr", "shift direction")
                v       ulong
-               =>      int
-       int2ul
-               v       int
+               bits    int
                =>      ulong
        ul2bitfields
                value   ulong
@@ -60,18 +73,12 @@ Table hbytes HBytes_SubCommand
        h2raw
                hex     hb
                =>      obj
-       ulong2h
-               value   ulong
-               =>      hb
-       h2ulong
-               hex     hb
-               =>      ulong
        ushort2h
-               value   ulong
+               value   long
                =>      hb
        h2ushort
                hex     hb
-               =>      ulong
+               =>      long
        length
                v       hb
                =>      int
@@ -121,10 +128,6 @@ Table hbytes HBytes_SubCommand
                v       hb
                count   int
                =>      hb
-       clockincrement
-               value   hbv
-               change  int
-               =>      int
        random
                length  int
                =>      hb