chiark / gitweb /
Compiles but does not link. Before undo silly pad indirection.
[chiark-tcl.git] / base / tables-examples.tct
index 2c6711a..13a3e5d 100644 (file)
@@ -1,5 +1,5 @@
 Type hb:                       HBytes_Value @
-Init hb                                @.start=0; @.end=0;
+Init hb                                hbytes_sentinel(&@);
 Type hbv:                      HBytes_Var @
 Init hbv                       @.hb=0; @.obj=0; @.var=0;
 Fini hbv                       fini_hbv(ip, rc, &@);
@@ -24,24 +24,27 @@ Table hbytes HBytes_SubCommand
        append
                v       hbv
                str     ...
+       rep-info
+               v       hb
+               =>      obj
        concat
                str     ...
                =>      hb
-#      unprepend
-#              v       hbv
-#              length  int
-#              =>      hb
-#      unappend
-#              v       hbv
-#              length  int
-#              =>      hb
-#      chopto
-#              v       hbv
-#              length  int
-#              =>      hb
-#      pkcs5
-#              meth    enum(PadMethod, "hbytes pad subcommand")
-#              obj     ...
+       unprepend
+               v       hbv
+               length  int
+               =>      hb
+       unappend
+               v       hbv
+               length  int
+               =>      hb
+       chopto
+               v       hbv
+               length  int
+               =>      hb
+       pkcs5
+               meth    enum(PadMethod, "hbytes pad subcommand")
+               obj     ...
 #      blockcipher
 #              encrypt charfrom("de","encrypt/decrypt")
 #              v       hbv
@@ -60,8 +63,19 @@ Table hbytes HBytes_SubCommand
 #              maclen  int
 #              =>      hb
 
-#Table padmethod PadMethod
-#      pa      1, 0
+Table padmethod PadMethod
+       pa      1
+               v       hbv
+               alg     enum(BlockCipherAlgInfo, "pad alg")
+       ua      0
+               v       hbv
+               alg     enum(BlockCipherAlgInfo, "pad alg")
+       pn      1
+               v       hbv
+               block   int
+       un      0
+               v       hbv
+               block   int
 
-#EntryExtra PadMethod
-#      int pad, algname;
+EntryExtra PadMethod
+       int pad;