chiark / gitweb /
lintian sorted out
[chiark-tcl.git] / hbytes / hbytes.tct
1 # hbytes - hex-stringrep efficient byteblocks for Tcl
2 # Copyright 2006 Ian Jackson
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 2 of the
7 # License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this library; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
17 # 02110-1301, USA.
18
19
20 Table *hbytestoplevel TopLevel_Command
21         hbytes
22                 subcmd  enum(HBytes/_SubCommand, "hbytes subcommand")
23                 ...     obj
24         ulong
25                 subcmd  enum(ULong/_SubCommand, "ulong subcommand")
26                 ...     obj
27
28 Table ulong ULong_SubCommand
29         ul2int
30                 v       ulong
31                 =>      int
32         int2ul
33                 v       int
34                 =>      ulong
35         mask
36                 a       ulong
37                 b       ulong
38                 =>      ulong
39         add
40                 a       ulong
41                 b       ulong
42                 =>      ulong
43         multiply
44                 a       ulong
45                 b       ulong
46                 =>      ulong
47         subtract
48                 a       ulong
49                 b       ulong
50                 =>      ulong
51         compare
52                 a       ulong
53                 b       ulong
54                 =>      int
55         shift
56                 right   charfrom("lr", "shift direction")
57                 v       ulong
58                 bits    int
59                 =>      ulong
60         ul2bitfields
61                 value   ulong
62                 ...     obj
63                 =>      int
64         bitfields2ul
65                 base    ulong
66                 ...     obj
67                 =>      ulong
68
69 Table hbytes HBytes_SubCommand
70         raw2h
71                 binary  obj
72                 =>      hb
73         h2raw
74                 hex     hb
75                 =>      obj
76         ushort2h
77                 value   long
78                 =>      hb
79         h2ushort
80                 hex     hb
81                 =>      long
82         length
83                 v       hb
84                 =>      int
85         compare
86                 a       hb
87                 b       hb
88                 =>      int
89         range
90                 v       hb
91                 start   int
92                 size    int
93                 =>      hb
94         prepend
95                 v       hbv
96                 ...     str
97         append
98                 v       hbv
99                 ...     str
100         rep-info
101                 v       obj
102                 =>      obj
103         concat
104                 ...     str
105                 =>      hb
106         unprepend
107                 v       hbv
108                 length  int
109                 =>      hb
110         unappend
111                 v       hbv
112                 length  int
113                 =>      hb
114         chopto
115                 v       hbv
116                 length  int
117                 =>      hb
118         overwrite
119                 v       hbv
120                 start   int
121                 sub     hb
122         trimleft
123                 v       hbv
124         zeroes
125                 length  int
126                 =>      hb
127         repeat
128                 v       hb
129                 count   int
130                 =>      hb
131         xor
132                 v       hbv
133                 d       hb
134         random
135                 length  int
136                 =>      hb