chiark / gitweb /
add misc:Depends
[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                 dispatch(HBytes/_SubCommand, "hbytes subcommand")
23         ulong
24                 dispatch(ULong/_SubCommand, "ulong subcommand")
25
26 Table ulong ULong_SubCommand
27         ul2int
28                 v       ulong
29                 =>      int
30         int2ul
31                 v       int
32                 =>      ulong
33         mask
34                 a       ulong
35                 b       ulong
36                 =>      ulong
37         add
38                 a       ulong
39                 b       ulong
40                 =>      ulong
41         multiply
42                 a       ulong
43                 b       ulong
44                 =>      ulong
45         subtract
46                 a       ulong
47                 b       ulong
48                 =>      ulong
49         compare
50                 a       ulong
51                 b       ulong
52                 =>      int
53         shift
54                 right   charfrom("lr", "shift direction")
55                 v       ulong
56                 bits    int
57                 =>      ulong
58         ul2bitfields
59                 value   ulong
60                 ...     obj
61                 =>      int
62         bitfields2ul
63                 base    ulong
64                 ...     obj
65                 =>      ulong
66
67 Table hbytes HBytes_SubCommand
68         raw2h
69                 binary  obj
70                 =>      hb
71         h2raw
72                 hex     hb
73                 =>      obj
74         ushort2h
75                 value   long
76                 =>      hb
77         h2ushort
78                 hex     hb
79                 =>      long
80         length
81                 v       hb
82                 =>      int
83         compare
84                 a       hb
85                 b       hb
86                 =>      int
87         range
88                 v       hb
89                 start   int
90                 size    int
91                 =>      hb
92         prepend
93                 v       hbv
94                 ...     str
95         append
96                 v       hbv
97                 ...     str
98         rep-info
99                 v       obj
100                 =>      obj
101         concat
102                 ...     str
103                 =>      hb
104         unprepend
105                 v       hbv
106                 length  int
107                 =>      hb
108         unappend
109                 v       hbv
110                 length  int
111                 =>      hb
112         chopto
113                 v       hbv
114                 length  int
115                 =>      hb
116         overwrite
117                 v       hbv
118                 start   int
119                 sub     hb
120         trimleft
121                 v       hbv
122         zeroes
123                 length  int
124                 =>      hb
125         repeat
126                 v       hb
127                 count   int
128                 =>      hb
129         xor
130                 v       hbv
131                 d       hb
132         random
133                 length  int
134                 =>      hb